This repository has been archived by the owner on Aug 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
I terminus #53
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,3 +132,6 @@ dmypy.json | |
.dao/ | ||
.secrets/ | ||
.vscode/ | ||
|
||
# MacOS | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
import "@openzeppelin-contracts/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol"; | ||
|
||
interface IERC1155WithTerminusStorage is IERC1155, IERC1155MetadataURI { | ||
function isApprovedForPool(uint256 poolID, address operator) | ||
external | ||
view | ||
returns (bool); | ||
|
||
function approveForPool(uint256 poolID, address operator) external; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
pragma solidity ^0.8.0; | ||
import "./IERC1155WithTerminusStorage.sol"; | ||
|
||
interface ITerminus is IERC1155WithTerminusStorage { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would rather this was codegen'd instead of created manually. |
||
event PoolMintBatch( | ||
uint256 indexed id, | ||
address indexed operator, | ||
address from, | ||
address[] toAddresses, | ||
uint256[] amounts | ||
); | ||
|
||
function setController(address newController) external; | ||
|
||
function poolMintBatch( | ||
uint256 id, | ||
address[] memory toAddresses, | ||
uint256[] memory amounts | ||
) external; | ||
|
||
function terminusController() external view returns (address); | ||
|
||
function paymentToken() external view returns (address); | ||
|
||
function setPaymentToken(address newPaymentToken) external; | ||
|
||
function poolBasePrice() external view returns (uint256); | ||
|
||
function setPoolBasePrice(uint256 newBasePrice) external; | ||
|
||
function withdrawPayments(address toAddress, uint256 amount) external; | ||
|
||
function contractURI() external view returns (string memory); | ||
|
||
function setContractURI(string memory _contractURI) external; | ||
|
||
function setURI(uint256 poolID, string memory poolURI) external; | ||
|
||
function totalPools() external view returns (uint256); | ||
|
||
function setPoolController(uint256 poolID, address newController) external; | ||
|
||
function terminusPoolController(uint256 poolID) | ||
external | ||
view | ||
returns (address); | ||
|
||
function terminusPoolCapacity(uint256 poolID) | ||
external | ||
view | ||
returns (uint256); | ||
|
||
function terminusPoolSupply(uint256 poolID) external view returns (uint256); | ||
|
||
function createSimplePool(uint256 _capacity) external returns (uint256); | ||
|
||
function createPoolV1( | ||
uint256 _capacity, | ||
bool _transferable, | ||
bool _burnable | ||
) external returns (uint256); | ||
|
||
function mint( | ||
address to, | ||
uint256 poolID, | ||
uint256 amount, | ||
bytes memory data | ||
) external; | ||
|
||
function mintBatch( | ||
address to, | ||
uint256[] memory poolIDs, | ||
uint256[] memory amounts, | ||
bytes memory data | ||
) external; | ||
|
||
function burn( | ||
address from, | ||
uint256 poolID, | ||
uint256 amount | ||
) external; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this interface. Might as well roll this into
ITerminus
.