-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement AstriaMintableERC20, update deposit tx to have erc20 mint o…
…ptions
- Loading branch information
Showing
27 changed files
with
2,803 additions
and
9 deletions.
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 |
---|---|---|
|
@@ -50,3 +50,6 @@ profile.cov | |
logs/ | ||
|
||
tests/spec-tests/ | ||
|
||
contracts/abi | ||
contracts/bin |
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,6 @@ | ||
// SPDX-License-Identifier: MIT | ||
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol) | ||
|
||
pragma solidity ^0.8.20; | ||
|
||
import {IERC20} from "../token/ERC20/IERC20.sol"; |
6 changes: 6 additions & 0 deletions
6
contracts/@openzeppelin/contracts/interfaces/IERC20Metadata.sol
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,6 @@ | ||
// SPDX-License-Identifier: MIT | ||
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20Metadata.sol) | ||
|
||
pragma solidity ^0.8.20; | ||
|
||
import {IERC20Metadata} from "../token/ERC20/extensions/IERC20Metadata.sol"; |
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,82 @@ | ||
= Interfaces | ||
|
||
[.readme-notice] | ||
NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/interfaces | ||
|
||
== List of standardized interfaces | ||
These interfaces are available as `.sol` files, and also as compiler `.json` ABI files (through the npm package). These | ||
are useful to interact with third party contracts that implement them. | ||
|
||
- {IERC20} | ||
- {IERC20Errors} | ||
- {IERC20Metadata} | ||
- {IERC165} | ||
- {IERC721} | ||
- {IERC721Receiver} | ||
- {IERC721Enumerable} | ||
- {IERC721Metadata} | ||
- {IERC721Errors} | ||
- {IERC777} | ||
- {IERC777Recipient} | ||
- {IERC777Sender} | ||
- {IERC1155} | ||
- {IERC1155Receiver} | ||
- {IERC1155MetadataURI} | ||
- {IERC1155Errors} | ||
- {IERC1271} | ||
- {IERC1363} | ||
- {IERC1363Receiver} | ||
- {IERC1363Spender} | ||
- {IERC1820Implementer} | ||
- {IERC1820Registry} | ||
- {IERC1822Proxiable} | ||
- {IERC2612} | ||
- {IERC2981} | ||
- {IERC3156FlashLender} | ||
- {IERC3156FlashBorrower} | ||
- {IERC4626} | ||
- {IERC4906} | ||
- {IERC5267} | ||
- {IERC5313} | ||
- {IERC5805} | ||
- {IERC6372} | ||
|
||
== Detailed ABI | ||
|
||
{{IERC20Errors}} | ||
|
||
{{IERC721Errors}} | ||
|
||
{{IERC1155Errors}} | ||
|
||
{{IERC1271}} | ||
|
||
{{IERC1363}} | ||
|
||
{{IERC1363Receiver}} | ||
|
||
{{IERC1363Spender}} | ||
|
||
{{IERC1820Implementer}} | ||
|
||
{{IERC1820Registry}} | ||
|
||
{{IERC1822Proxiable}} | ||
|
||
{{IERC2612}} | ||
|
||
{{IERC2981}} | ||
|
||
{{IERC3156FlashLender}} | ||
|
||
{{IERC3156FlashBorrower}} | ||
|
||
{{IERC4626}} | ||
|
||
{{IERC5313}} | ||
|
||
{{IERC5267}} | ||
|
||
{{IERC5805}} | ||
|
||
{{IERC6372}} |
161 changes: 161 additions & 0 deletions
161
contracts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol
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,161 @@ | ||
// SPDX-License-Identifier: MIT | ||
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) | ||
pragma solidity ^0.8.20; | ||
|
||
/** | ||
* @dev Standard ERC-20 Errors | ||
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens. | ||
*/ | ||
interface IERC20Errors { | ||
/** | ||
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. | ||
* @param sender Address whose tokens are being transferred. | ||
* @param balance Current balance for the interacting account. | ||
* @param needed Minimum amount required to perform a transfer. | ||
*/ | ||
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); | ||
|
||
/** | ||
* @dev Indicates a failure with the token `sender`. Used in transfers. | ||
* @param sender Address whose tokens are being transferred. | ||
*/ | ||
error ERC20InvalidSender(address sender); | ||
|
||
/** | ||
* @dev Indicates a failure with the token `receiver`. Used in transfers. | ||
* @param receiver Address to which tokens are being transferred. | ||
*/ | ||
error ERC20InvalidReceiver(address receiver); | ||
|
||
/** | ||
* @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. | ||
* @param spender Address that may be allowed to operate on tokens without being their owner. | ||
* @param allowance Amount of tokens a `spender` is allowed to operate with. | ||
* @param needed Minimum amount required to perform a transfer. | ||
*/ | ||
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); | ||
|
||
/** | ||
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. | ||
* @param approver Address initiating an approval operation. | ||
*/ | ||
error ERC20InvalidApprover(address approver); | ||
|
||
/** | ||
* @dev Indicates a failure with the `spender` to be approved. Used in approvals. | ||
* @param spender Address that may be allowed to operate on tokens without being their owner. | ||
*/ | ||
error ERC20InvalidSpender(address spender); | ||
} | ||
|
||
/** | ||
* @dev Standard ERC-721 Errors | ||
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens. | ||
*/ | ||
interface IERC721Errors { | ||
/** | ||
* @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20. | ||
* Used in balance queries. | ||
* @param owner Address of the current owner of a token. | ||
*/ | ||
error ERC721InvalidOwner(address owner); | ||
|
||
/** | ||
* @dev Indicates a `tokenId` whose `owner` is the zero address. | ||
* @param tokenId Identifier number of a token. | ||
*/ | ||
error ERC721NonexistentToken(uint256 tokenId); | ||
|
||
/** | ||
* @dev Indicates an error related to the ownership over a particular token. Used in transfers. | ||
* @param sender Address whose tokens are being transferred. | ||
* @param tokenId Identifier number of a token. | ||
* @param owner Address of the current owner of a token. | ||
*/ | ||
error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); | ||
|
||
/** | ||
* @dev Indicates a failure with the token `sender`. Used in transfers. | ||
* @param sender Address whose tokens are being transferred. | ||
*/ | ||
error ERC721InvalidSender(address sender); | ||
|
||
/** | ||
* @dev Indicates a failure with the token `receiver`. Used in transfers. | ||
* @param receiver Address to which tokens are being transferred. | ||
*/ | ||
error ERC721InvalidReceiver(address receiver); | ||
|
||
/** | ||
* @dev Indicates a failure with the `operator`’s approval. Used in transfers. | ||
* @param operator Address that may be allowed to operate on tokens without being their owner. | ||
* @param tokenId Identifier number of a token. | ||
*/ | ||
error ERC721InsufficientApproval(address operator, uint256 tokenId); | ||
|
||
/** | ||
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. | ||
* @param approver Address initiating an approval operation. | ||
*/ | ||
error ERC721InvalidApprover(address approver); | ||
|
||
/** | ||
* @dev Indicates a failure with the `operator` to be approved. Used in approvals. | ||
* @param operator Address that may be allowed to operate on tokens without being their owner. | ||
*/ | ||
error ERC721InvalidOperator(address operator); | ||
} | ||
|
||
/** | ||
* @dev Standard ERC-1155 Errors | ||
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens. | ||
*/ | ||
interface IERC1155Errors { | ||
/** | ||
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. | ||
* @param sender Address whose tokens are being transferred. | ||
* @param balance Current balance for the interacting account. | ||
* @param needed Minimum amount required to perform a transfer. | ||
* @param tokenId Identifier number of a token. | ||
*/ | ||
error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); | ||
|
||
/** | ||
* @dev Indicates a failure with the token `sender`. Used in transfers. | ||
* @param sender Address whose tokens are being transferred. | ||
*/ | ||
error ERC1155InvalidSender(address sender); | ||
|
||
/** | ||
* @dev Indicates a failure with the token `receiver`. Used in transfers. | ||
* @param receiver Address to which tokens are being transferred. | ||
*/ | ||
error ERC1155InvalidReceiver(address receiver); | ||
|
||
/** | ||
* @dev Indicates a failure with the `operator`’s approval. Used in transfers. | ||
* @param operator Address that may be allowed to operate on tokens without being their owner. | ||
* @param owner Address of the current owner of a token. | ||
*/ | ||
error ERC1155MissingApprovalForAll(address operator, address owner); | ||
|
||
/** | ||
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. | ||
* @param approver Address initiating an approval operation. | ||
*/ | ||
error ERC1155InvalidApprover(address approver); | ||
|
||
/** | ||
* @dev Indicates a failure with the `operator` to be approved. Used in approvals. | ||
* @param operator Address that may be allowed to operate on tokens without being their owner. | ||
*/ | ||
error ERC1155InvalidOperator(address operator); | ||
|
||
/** | ||
* @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. | ||
* Used in batch transfers. | ||
* @param idsLength Length of the array of token identifiers | ||
* @param valuesLength Length of the array of token amounts | ||
*/ | ||
error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); | ||
} |
Oops, something went wrong.