diff --git a/docs/mock/ERC20/ERC20.md b/docs/mock/ERC20/ERC20.md deleted file mode 100644 index 1075c96..0000000 --- a/docs/mock/ERC20/ERC20.md +++ /dev/null @@ -1,205 +0,0 @@ -# Solidity API - -## ERC20 - -_Lightweight ERC20 with Permit extension._ - -### constructor - -```solidity -constructor(string name_, string symbol_) internal -``` - -_Sets the values for {name} and {symbol}._ - -### name - -```solidity -function name() public view virtual returns (string) -``` - -_Returns the name of the token._ - -### symbol - -```solidity -function symbol() public view virtual returns (string) -``` - -_Returns the symbol of the token, usually a shorter version of the -name._ - -### decimals - -```solidity -function decimals() public view virtual returns (uint8) -``` - -_Returns the number of decimals used to get its user representation. -For example, if `decimals` equals `2`, a balance of `505` tokens should -be displayed to a user as `5.05` (`505 / 10 ** 2`). - -Tokens usually opt for a value of 18, imitating the relationship between -Ether and Wei. This is the default value returned by this function, unless -it's overridden. - -NOTE: This information is only used for _display_ purposes: it in -no way affects any of the arithmetic of the contract, including -{IERC20-balanceOf} and {IERC20-transfer}._ - -### totalSupply - -```solidity -function totalSupply() public view virtual returns (uint256) -``` - -_See {IERC20-totalSupply}._ - -### balanceOf - -```solidity -function balanceOf(address account) public view virtual returns (uint256) -``` - -_See {IERC20-balanceOf}._ - -### allowance - -```solidity -function allowance(address owner, address spender) public view virtual returns (uint256) -``` - -_See {IERC20-allowance}._ - -### nonces - -```solidity -function nonces(address owner) public view virtual returns (uint256) -``` - -_Returns the current nonce of an address._ - -### DOMAIN_SEPARATOR - -```solidity -function DOMAIN_SEPARATOR() public view virtual returns (bytes32) -``` - -_See {IERC20Permit-DOMAIN_SEPARATOR}._ - -### approve - -```solidity -function approve(address spender, uint256 value) public virtual returns (bool) -``` - -_See {IERC20-approve}. - -NOTE: If `value` is the maximum `uint256`, the allowance is not updated on -`transferFrom`. This is semantically equivalent to an infinite approval._ - -### increaseAllowance - -```solidity -function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) -``` - -_See {IERC20-increaseAllowance}._ - -### decreaseAllowance - -```solidity -function decreaseAllowance(address spender, uint256 requestedDecrease) public virtual returns (bool) -``` - -_See {IERC20-decreaseAllowance}. - -Requirements: - -- `spender` must have allowance for the caller of at least -`requestedDecrease`._ - -### permit - -```solidity -function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public virtual returns (bool) -``` - -_See {IERC20Permit-permit}. - -Requirements: - -- `spender` cannot be the zero address. -- `deadline` must be a timestamp in the future. -- `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` -over the EIP712-formatted function arguments. -- the signature must use ``owner``'s current nonce (see {IERC20Permit-nonces})._ - -### _mint - -```solidity -function _mint(address to, uint256 value) internal -``` - -_Creates an `value` of tokens and assigns them to `to` by creating supply. - -Emits a {Transfer} event with `from` set to the zero address._ - -### _burn - -```solidity -function _burn(address from, uint256 value) internal -``` - -_Destroys an `value` of tokens from `from` by lowering the total supply. - -Requirements: - -- `from` must have a balance of at least `value`. - -Emits a {Transfer} event with `to` set to the zero address._ - -### transfer - -```solidity -function transfer(address to, uint256 value) public virtual returns (bool) -``` - -_See {IERC20-transfer}. - -Requirements: - -- the caller must have a balance of at least `value`._ - -### transferFrom - -```solidity -function transferFrom(address from, address to, uint256 value) public virtual returns (bool) -``` - -_See {IERC20-transferFrom}. - -Requirements: - -- `from` must have a balance of at least `value`. -- the caller must have allowance for `from`'s tokens of at least -`value`. - -NOTE: Does not update the allowance if the current allowance -is the maximum `uint256`._ - -### permitTransfer - -```solidity -function permitTransfer(address from, address to, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public virtual returns (bool) -``` - -_See {IERC20Permit-permitTransfer}. - -Requirements: - -- `deadline` must be a timestamp in the future. -- `v`, `r` and `s` must be a valid `secp256k1` signature from `from` -over the EIP712-formatted function arguments. -- the signature must use `from`'s current nonce (see {IERC20Permit-nonces})._ - diff --git a/docs/mock/ERC20/interfaces/IERC20.md b/docs/mock/ERC20/interfaces/IERC20.md deleted file mode 100644 index d5bf51b..0000000 --- a/docs/mock/ERC20/interfaces/IERC20.md +++ /dev/null @@ -1,154 +0,0 @@ -# Solidity API - -## IERC20 - -_Interface of the ERC20 standard as defined in the EIP._ - -### Approval - -```solidity -event Approval(address owner, address spender, uint256 value) -``` - -_Emitted when the allowance of a `spender` for an `owner` is set by -a call to {approve}. `value` is the new allowance._ - -### Transfer - -```solidity -event Transfer(address from, address to, uint256 value) -``` - -_Emitted when `value` tokens are moved from `from` to `to`. - -NOTE: `value` can be zero._ - -### name - -```solidity -function name() external view returns (string) -``` - -_Returns the name of the token._ - -### symbol - -```solidity -function symbol() external view returns (string) -``` - -_Returns the symbol of the token._ - -### decimals - -```solidity -function decimals() external view returns (uint8) -``` - -_Returns the decimals places of the token._ - -### totalSupply - -```solidity -function totalSupply() external view returns (uint256) -``` - -_Returns the value of tokens in existence._ - -### balanceOf - -```solidity -function balanceOf(address account) external view returns (uint256) -``` - -_Returns the value of tokens owned by `account`._ - -### allowance - -```solidity -function allowance(address owner, address spender) external view returns (uint256) -``` - -_Returns the remaining number of tokens that `spender` will be -allowed to spend on behalf of `owner` through {transferFrom}. This is -zero by default. - -This value changes when {approve} or {transferFrom} are called. - -NOTE: If `value` is the maximum `uint256`, the allowance is not updated on -`transferFrom`. This is semantically equivalent to an infinite approval._ - -### approve - -```solidity -function approve(address spender, uint256 value) external returns (bool) -``` - -_Sets a `value` amount of tokens as the allowance of `spender` over the -caller's tokens. - -Returns a boolean value indicating whether the operation succeeded. - -IMPORTANT: Beware that changing an allowance with this method brings the risk -that someone may use both the old and the new allowance by unfortunate -transaction ordering. One possible solution to mitigate this race -condition is to first reduce the spender's allowance to 0 and set the -desired value afterwards: -https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 - -Emits an {Approval} event._ - -### increaseAllowance - -```solidity -function increaseAllowance(address spender, uint256 addedValue) external returns (bool) -``` - -_Atomically increases the allowance granted to `spender` by the caller. - -This is an alternative to {approve} that can be used as a mitigation for -problems described in {IERC20-approve}. - -Emits an {IERC20-Approval} event indicating the updated allowance._ - -### decreaseAllowance - -```solidity -function decreaseAllowance(address spender, uint256 requestedDecrease) external returns (bool) -``` - -_Atomically decreases the allowance granted to `spender` by the caller. - -This is an alternative to {approve} that can be used as a mitigation for -problems described in {IERC20-approve}. - -Emits an {Approval} event indicating the updated allowance. - -NOTE: Although this function is designed to avoid double spending with {approval}, -it can still be frontrunned, preventing any attempt of allowance reduction._ - -### transfer - -```solidity -function transfer(address to, uint256 value) external returns (bool) -``` - -_Moves a `value` amount of tokens from the caller's account to `to`. -Returns a boolean value indicating whether the operation succeeded. - -Emits a {Transfer} event._ - -### transferFrom - -```solidity -function transferFrom(address from, address to, uint256 value) external returns (bool) -``` - -_Moves a `value` amount of tokens from `from` to `to` using the -allowance mechanism. `value` is then deducted from the caller's -allowance. - -Returns a boolean value indicating whether the operation succeeded. - -Emits a {Transfer} event._ - diff --git a/docs/mock/ERC20/interfaces/IERC20Errors.md b/docs/mock/ERC20/interfaces/IERC20Errors.md deleted file mode 100644 index b0f5ae6..0000000 --- a/docs/mock/ERC20/interfaces/IERC20Errors.md +++ /dev/null @@ -1,98 +0,0 @@ -# Solidity API - -## IERC20Errors - -_Standard ERC20 Errors_ - -### ERC20InsufficientBalance - -```solidity -error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed) -``` - -_Indicates an error related to the current `balance` of a `sender`. Used in transfers._ - -#### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| sender | address | Address whose tokens are being transferred. | -| balance | uint256 | Current balance for the interacting account. | -| needed | uint256 | Minimum amount required to perform a transfer. | - -### ERC20InsufficientAllowance - -```solidity -error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed) -``` - -_Indicates a failure with the `spender`’s `allowance`. Used in transfers._ - -#### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| spender | address | Address that may be allowed to operate on tokens without being their owner. | -| allowance | uint256 | Amount of tokens a `spender` is allowed to operate with. | -| needed | uint256 | Minimum amount required to perform a transfer. | - -### ERC20FailedDecreaseAllowance - -```solidity -error ERC20FailedDecreaseAllowance(address spender, uint256 allowance, uint256 needed) -``` - -_Indicates a failed `decreaseAllowance` request._ - -#### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| spender | address | Address that may be allowed to operate on tokens without being their owner. | -| allowance | uint256 | Amount of tokens a `spender` want to operate with. | -| needed | uint256 | Amount required to decrease the allowance. | - -### ERC20PermitInvalidNonce - -```solidity -error ERC20PermitInvalidNonce(address account, uint256 nonce) -``` - -_Indicates the nonce used for an `account` is not the expected current nonce._ - -#### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| account | address | Address whose nonce is being checked. | -| nonce | uint256 | Expected nonce for the given `account`. | - -### ERC2612ExpiredSignature - -```solidity -error ERC2612ExpiredSignature(uint256 deadline) -``` - -_Indicates the expiration of a permit to be used._ - -#### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| deadline | uint256 | Expiration time limit in seconds. | - -### ERC2612InvalidSigner - -```solidity -error ERC2612InvalidSigner(address signer, address owner) -``` - -_Indicates the mismatched owner when validating the signature._ - -#### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| signer | address | Address of the signer recovered. | -| owner | address | Address of the owner expected to match `signer`. | - diff --git a/docs/mock/ERC20/interfaces/IERC20Permit.md b/docs/mock/ERC20/interfaces/IERC20Permit.md deleted file mode 100644 index bf13c88..0000000 --- a/docs/mock/ERC20/interfaces/IERC20Permit.md +++ /dev/null @@ -1,69 +0,0 @@ -# Solidity API - -## IERC20Permit - -_Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in -https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. - -Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by -presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't -need to send a transaction, and thus is not required to hold Ether at all._ - -### nonces - -```solidity -function nonces(address owner) external view returns (uint256) -``` - -_Returns the current nonce for `owner`. This value must be -included whenever a signature is generated for {permit}. - -Every successful call to {permit} increases `owner`'s nonce by one. -This prevents a signature from being used multiple times._ - -### DOMAIN_SEPARATOR - -```solidity -function DOMAIN_SEPARATOR() external view returns (bytes32) -``` - -_Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}._ - -### permit - -```solidity -function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external returns (bool) -``` - -_Sets `value` as the allowance of `spender` over `owner`'s tokens, -given `owner`'s signed approval. - -IMPORTANT: The same issues {IERC20-approve} has related to transaction -ordering also apply here. - -Emits an {IERC20-Approval} event. - -NOTE: `spender` can be the zero address. Checking this on-chain is a bad -usage of gas. For more information on the signature format, see the -https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIPsection]._ - -### permitTransfer - -```solidity -function permitTransfer(address from, address to, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external returns (bool) -``` - -_Allows {IERC20-transferFrom} to be used with the `owner`'s signature. -Similar to permit but changing the scope to handle the balance instead of -allowance. - -Requires less gas than regular {permit} and {IERC20-transferFrom}. - -IMPORTANT: `owner` works as `from` and `spender` as `to` (see {IERC20Permit-permit}). - -Emits an {IERC20-Transfer} event. - -NOTE: Realize that {PERMIT_TYPEHASH} is different from the one in {permit}. -This is because the arguments name differ. But won't result in a different -output as long as it is encoded following the EIP712 and ERC20Permit specs._ - diff --git a/docs/mock/MockERC20.md b/docs/mock/MockERC20.md deleted file mode 100644 index ee80b9c..0000000 --- a/docs/mock/MockERC20.md +++ /dev/null @@ -1,16 +0,0 @@ -# Solidity API - -## MockERC20 - -### constructor - -```solidity -constructor() public -``` - -### mintTo - -```solidity -function mintTo(address to, uint256 amount) public -``` - diff --git a/docs/mock/MockERC721.md b/docs/mock/MockERC721.md deleted file mode 100644 index ad0f209..0000000 --- a/docs/mock/MockERC721.md +++ /dev/null @@ -1,22 +0,0 @@ -# Solidity API - -## MockERC721 - -### totalSupply - -```solidity -uint256 totalSupply -``` - -### constructor - -```solidity -constructor() public -``` - -### mintTo - -```solidity -function mintTo(address to, uint256 id) public -``` -