update documentation
This commit is contained in:
@@ -1,46 +1,42 @@
|
||||
# Owned
|
||||
# Solidity API
|
||||
|
||||
_Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Owned.sol)_
|
||||
## Owned
|
||||
|
||||
Simple single owner authorization mixin.
|
||||
|
||||
## Methods
|
||||
|
||||
### owner
|
||||
### Unauthorized
|
||||
|
||||
```solidity
|
||||
function owner() external view returns (address)
|
||||
error Unauthorized()
|
||||
```
|
||||
|
||||
#### Returns
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ------- | ----------- |
|
||||
| \_0 | address | undefined |
|
||||
|
||||
### setOwner
|
||||
|
||||
```solidity
|
||||
function setOwner(address newOwner) external nonpayable
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| -------- | ------- | ----------- |
|
||||
| newOwner | address | undefined |
|
||||
|
||||
## Events
|
||||
|
||||
### OwnerUpdated
|
||||
|
||||
```solidity
|
||||
event OwnerUpdated(address indexed user, address indexed newOwner)
|
||||
event OwnerUpdated(address user, address newOwner)
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
### owner
|
||||
|
||||
```solidity
|
||||
address owner
|
||||
```
|
||||
|
||||
### onlyOwner
|
||||
|
||||
```solidity
|
||||
modifier onlyOwner()
|
||||
```
|
||||
|
||||
### constructor
|
||||
|
||||
```solidity
|
||||
constructor(address _owner) internal
|
||||
```
|
||||
|
||||
### setOwner
|
||||
|
||||
```solidity
|
||||
function setOwner(address newOwner) public virtual
|
||||
```
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------------ | ------- | ----------- |
|
||||
| user `indexed` | address | undefined |
|
||||
| newOwner `indexed` | address | undefined |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# IReputation
|
||||
# Solidity API
|
||||
|
||||
## Methods
|
||||
## IReputation
|
||||
|
||||
### limiter
|
||||
|
||||
@@ -8,14 +8,3 @@
|
||||
function limiter(uint256 _userCredit) external pure returns (uint256 _spendLimit)
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------ | ------- | ----------- |
|
||||
| \_userCredit | uint256 | undefined |
|
||||
|
||||
#### Returns
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------ | ------- | ----------- |
|
||||
| \_spendLimit | uint256 | undefined |
|
||||
|
||||
53
docs/lib/metatx/ERC2771Context.md
Normal file
53
docs/lib/metatx/ERC2771Context.md
Normal file
@@ -0,0 +1,53 @@
|
||||
# Solidity API
|
||||
|
||||
## Context
|
||||
|
||||
_Provides information about the current execution context, including the
|
||||
sender of the transaction and its data. While these are generally available
|
||||
via msg.sender and msg.data, they should not be accessed in such a direct
|
||||
manner, since when dealing with meta-transactions the account sending and
|
||||
paying for execution may not be the actual sender (as far as an application
|
||||
is concerned).
|
||||
|
||||
This contract is only required for intermediate, library-like contracts._
|
||||
|
||||
### _msgSender
|
||||
|
||||
```solidity
|
||||
function _msgSender() internal view virtual returns (address)
|
||||
```
|
||||
|
||||
### _msgData
|
||||
|
||||
```solidity
|
||||
function _msgData() internal view virtual returns (bytes)
|
||||
```
|
||||
|
||||
## ERC2771Context
|
||||
|
||||
_Context variant with ERC2771 support._
|
||||
|
||||
### trustedForwarders
|
||||
|
||||
```solidity
|
||||
mapping(address => bool) trustedForwarders
|
||||
```
|
||||
|
||||
### _msgSender
|
||||
|
||||
```solidity
|
||||
function _msgSender() internal view virtual returns (address sender)
|
||||
```
|
||||
|
||||
### isTrustedForwarder
|
||||
|
||||
```solidity
|
||||
function isTrustedForwarder(address forwarder) public view virtual returns (bool)
|
||||
```
|
||||
|
||||
### _msgData
|
||||
|
||||
```solidity
|
||||
function _msgData() internal view virtual returns (bytes)
|
||||
```
|
||||
|
||||
16
docs/lib/mock/mockToken.md
Normal file
16
docs/lib/mock/mockToken.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Solidity API
|
||||
|
||||
## MockToken
|
||||
|
||||
### constructor
|
||||
|
||||
```solidity
|
||||
constructor(uint256 supply) public
|
||||
```
|
||||
|
||||
### mint
|
||||
|
||||
```solidity
|
||||
function mint(address[] to, uint256 value) public virtual
|
||||
```
|
||||
|
||||
@@ -1,230 +1,128 @@
|
||||
# ERC20
|
||||
# Solidity API
|
||||
|
||||
_Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)_
|
||||
## ERC20
|
||||
|
||||
Modern and gas efficient ERC20 + EIP-2612 implementation.
|
||||
|
||||
_Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it._
|
||||
|
||||
## Methods
|
||||
|
||||
### DOMAIN_SEPARATOR
|
||||
### Transfer
|
||||
|
||||
```solidity
|
||||
function DOMAIN_SEPARATOR() external view returns (bytes32)
|
||||
event Transfer(address from, address to, uint256 amount)
|
||||
```
|
||||
|
||||
#### Returns
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ------- | ----------- |
|
||||
| \_0 | bytes32 | undefined |
|
||||
|
||||
### allowance
|
||||
|
||||
```solidity
|
||||
function allowance(address, address) external view returns (uint256)
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ------- | ----------- |
|
||||
| \_0 | address | undefined |
|
||||
| \_1 | address | undefined |
|
||||
|
||||
#### Returns
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ------- | ----------- |
|
||||
| \_0 | uint256 | undefined |
|
||||
|
||||
### approve
|
||||
|
||||
```solidity
|
||||
function approve(address spender, uint256 amount) external nonpayable returns (bool)
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------- | ------- | ----------- |
|
||||
| spender | address | undefined |
|
||||
| amount | uint256 | undefined |
|
||||
|
||||
#### Returns
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| \_0 | bool | undefined |
|
||||
|
||||
### balanceOf
|
||||
|
||||
```solidity
|
||||
function balanceOf(address) external view returns (uint256)
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ------- | ----------- |
|
||||
| \_0 | address | undefined |
|
||||
|
||||
#### Returns
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ------- | ----------- |
|
||||
| \_0 | uint256 | undefined |
|
||||
|
||||
### decimals
|
||||
|
||||
```solidity
|
||||
function decimals() external view returns (uint8)
|
||||
```
|
||||
|
||||
#### Returns
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ----- | ----------- |
|
||||
| \_0 | uint8 | undefined |
|
||||
|
||||
### name
|
||||
|
||||
```solidity
|
||||
function name() external view returns (string)
|
||||
```
|
||||
|
||||
#### Returns
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ------ | ----------- |
|
||||
| \_0 | string | undefined |
|
||||
|
||||
### nonces
|
||||
|
||||
```solidity
|
||||
function nonces(address) external view returns (uint256)
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ------- | ----------- |
|
||||
| \_0 | address | undefined |
|
||||
|
||||
#### Returns
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ------- | ----------- |
|
||||
| \_0 | uint256 | undefined |
|
||||
|
||||
### permit
|
||||
|
||||
```solidity
|
||||
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external nonpayable
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| -------- | ------- | ----------- |
|
||||
| owner | address | undefined |
|
||||
| spender | address | undefined |
|
||||
| value | uint256 | undefined |
|
||||
| deadline | uint256 | undefined |
|
||||
| v | uint8 | undefined |
|
||||
| r | bytes32 | undefined |
|
||||
| s | bytes32 | undefined |
|
||||
|
||||
### symbol
|
||||
|
||||
```solidity
|
||||
function symbol() external view returns (string)
|
||||
```
|
||||
|
||||
#### Returns
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ------ | ----------- |
|
||||
| \_0 | string | undefined |
|
||||
|
||||
### totalSupply
|
||||
|
||||
```solidity
|
||||
function totalSupply() external view returns (uint256)
|
||||
```
|
||||
|
||||
#### Returns
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ------- | ----------- |
|
||||
| \_0 | uint256 | undefined |
|
||||
|
||||
### transfer
|
||||
|
||||
```solidity
|
||||
function transfer(address to, uint256 amount) external nonpayable returns (bool)
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------ | ------- | ----------- |
|
||||
| to | address | undefined |
|
||||
| amount | uint256 | undefined |
|
||||
|
||||
#### Returns
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| \_0 | bool | undefined |
|
||||
|
||||
### transferFrom
|
||||
|
||||
```solidity
|
||||
function transferFrom(address from, address to, uint256 amount) external nonpayable returns (bool)
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------ | ------- | ----------- |
|
||||
| from | address | undefined |
|
||||
| to | address | undefined |
|
||||
| amount | uint256 | undefined |
|
||||
|
||||
#### Returns
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| \_0 | bool | undefined |
|
||||
|
||||
## Events
|
||||
|
||||
### Approval
|
||||
|
||||
```solidity
|
||||
event Approval(address indexed owner, address indexed spender, uint256 amount)
|
||||
event Approval(address owner, address spender, uint256 amount)
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----------------- | ------- | ----------- |
|
||||
| owner `indexed` | address | undefined |
|
||||
| spender `indexed` | address | undefined |
|
||||
| amount | uint256 | undefined |
|
||||
|
||||
### Transfer
|
||||
### name
|
||||
|
||||
```solidity
|
||||
event Transfer(address indexed from, address indexed to, uint256 amount)
|
||||
string name
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
### symbol
|
||||
|
||||
```solidity
|
||||
string symbol
|
||||
```
|
||||
|
||||
### decimals
|
||||
|
||||
```solidity
|
||||
uint8 decimals
|
||||
```
|
||||
|
||||
### totalSupply
|
||||
|
||||
```solidity
|
||||
uint256 totalSupply
|
||||
```
|
||||
|
||||
### balanceOf
|
||||
|
||||
```solidity
|
||||
mapping(address => uint256) balanceOf
|
||||
```
|
||||
|
||||
### allowance
|
||||
|
||||
```solidity
|
||||
mapping(address => mapping(address => uint256)) allowance
|
||||
```
|
||||
|
||||
### INITIAL_CHAIN_ID
|
||||
|
||||
```solidity
|
||||
uint256 INITIAL_CHAIN_ID
|
||||
```
|
||||
|
||||
### INITIAL_DOMAIN_SEPARATOR
|
||||
|
||||
```solidity
|
||||
bytes32 INITIAL_DOMAIN_SEPARATOR
|
||||
```
|
||||
|
||||
### nonces
|
||||
|
||||
```solidity
|
||||
mapping(address => uint256) nonces
|
||||
```
|
||||
|
||||
### constructor
|
||||
|
||||
```solidity
|
||||
constructor(string _name, string _symbol, uint8 _decimals) internal
|
||||
```
|
||||
|
||||
### approve
|
||||
|
||||
```solidity
|
||||
function approve(address spender, uint256 amount) public virtual returns (bool)
|
||||
```
|
||||
|
||||
### transfer
|
||||
|
||||
```solidity
|
||||
function transfer(address to, uint256 amount) public virtual returns (bool)
|
||||
```
|
||||
|
||||
### transferFrom
|
||||
|
||||
```solidity
|
||||
function transferFrom(address from, address to, uint256 amount) public virtual returns (bool)
|
||||
```
|
||||
|
||||
### permit
|
||||
|
||||
```solidity
|
||||
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public virtual
|
||||
```
|
||||
|
||||
### DOMAIN_SEPARATOR
|
||||
|
||||
```solidity
|
||||
function DOMAIN_SEPARATOR() public view virtual returns (bytes32)
|
||||
```
|
||||
|
||||
### computeDomainSeparator
|
||||
|
||||
```solidity
|
||||
function computeDomainSeparator() internal view virtual returns (bytes32)
|
||||
```
|
||||
|
||||
### _mint
|
||||
|
||||
```solidity
|
||||
function _mint(address to, uint256 amount) internal virtual
|
||||
```
|
||||
|
||||
### _burn
|
||||
|
||||
```solidity
|
||||
function _burn(address from, uint256 amount) internal virtual
|
||||
```
|
||||
|
||||
| Name | Type | Description |
|
||||
| -------------- | ------- | ----------- |
|
||||
| from `indexed` | address | undefined |
|
||||
| to `indexed` | address | undefined |
|
||||
| amount | uint256 | undefined |
|
||||
|
||||
38
docs/lib/utils/ECDSA.md
Normal file
38
docs/lib/utils/ECDSA.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# Solidity API
|
||||
|
||||
## ECDSA
|
||||
|
||||
Gas optimized ECDSA wrapper.
|
||||
|
||||
### InvalidSignature
|
||||
|
||||
```solidity
|
||||
error InvalidSignature()
|
||||
```
|
||||
|
||||
_The signature is invalid._
|
||||
|
||||
### recoverCalldata
|
||||
|
||||
```solidity
|
||||
function recoverCalldata(bytes32 hash, bytes signature) internal view returns (address result)
|
||||
```
|
||||
|
||||
_Recovers the signer's address from a message digest `hash`,
|
||||
and the `signature`.
|
||||
|
||||
This function does NOT accept EIP-2098 short form signatures.
|
||||
Use `recover(bytes32 hash, bytes32 r, bytes32 vs)` for EIP-2098
|
||||
short form signatures instead._
|
||||
|
||||
### toEthSignedMessageHash
|
||||
|
||||
```solidity
|
||||
function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 result)
|
||||
```
|
||||
|
||||
_Returns an Ethereum Signed Message, created from a `hash`.
|
||||
This produces a hash corresponding to the one signed with the
|
||||
[`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)
|
||||
JSON-RPC method as part of EIP-191._
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# MerkleProofLib
|
||||
# Solidity API
|
||||
|
||||
_Solady (https://github.com/vectorized/solady/blob/main/src/utils/MerkleProofLib.sol)Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/MerkleProofLib.sol)Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/MerkleProof.sol)_
|
||||
## MerkleProofLib
|
||||
|
||||
Gas optimized verification of proof of inclusion for a leaf in a Merkle tree.
|
||||
|
||||
### verify
|
||||
|
||||
```solidity
|
||||
function verify(bytes32[] proof, bytes32 root, bytes32 leaf) internal pure returns (bool isValid)
|
||||
```
|
||||
|
||||
_Returns whether `leaf` exists in the Merkle tree with `root`, given `proof`._
|
||||
|
||||
|
||||
50
docs/lib/utils/Multicall.md
Normal file
50
docs/lib/utils/Multicall.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Solidity API
|
||||
|
||||
## Multicall
|
||||
|
||||
Contract that batches view function calls and aggregates their results.
|
||||
|
||||
### CallFailed
|
||||
|
||||
```solidity
|
||||
error CallFailed(string reason)
|
||||
```
|
||||
|
||||
_0x_
|
||||
|
||||
### Call
|
||||
|
||||
```solidity
|
||||
struct Call {
|
||||
address target;
|
||||
bytes callData;
|
||||
}
|
||||
```
|
||||
|
||||
### Result
|
||||
|
||||
```solidity
|
||||
struct Result {
|
||||
bool success;
|
||||
bytes returnData;
|
||||
}
|
||||
```
|
||||
|
||||
### constructor
|
||||
|
||||
```solidity
|
||||
constructor() public payable
|
||||
```
|
||||
|
||||
### mtc1
|
||||
|
||||
```solidity
|
||||
function mtc1(struct Multicall.Call[] calls) external returns (uint256, bytes[])
|
||||
```
|
||||
|
||||
### mtc2
|
||||
|
||||
```solidity
|
||||
function mtc2(struct Multicall.Call[] calls) external returns (uint256, bytes32, struct Multicall.Result[])
|
||||
```
|
||||
|
||||
@@ -1,13 +1,34 @@
|
||||
# ReentrancyGuard
|
||||
# Solidity API
|
||||
|
||||
_z0r0z.ethModified from Seaport (https://github.com/ProjectOpenSea/seaport/blob/main/contracts/lib/ReentrancyGuard.sol)Modified from Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/ReentrancyGuard.sol)_
|
||||
## ReentrancyGuard
|
||||
|
||||
Reentrancy protection for smart contracts.
|
||||
|
||||
## Errors
|
||||
|
||||
### Reentrancy
|
||||
|
||||
```solidity
|
||||
error Reentrancy()
|
||||
```
|
||||
|
||||
### nonReentrant
|
||||
|
||||
```solidity
|
||||
modifier nonReentrant()
|
||||
```
|
||||
|
||||
### setReentrancyGuard
|
||||
|
||||
```solidity
|
||||
function setReentrancyGuard() internal virtual
|
||||
```
|
||||
|
||||
_Check guard sentinel value and set it._
|
||||
|
||||
### clearReentrancyGuard
|
||||
|
||||
```solidity
|
||||
function clearReentrancyGuard() internal virtual
|
||||
```
|
||||
|
||||
_Unset sentinel value._
|
||||
|
||||
|
||||
@@ -1,7 +1,62 @@
|
||||
# SafeTransferLib
|
||||
# Solidity API
|
||||
|
||||
_Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeTransferLib.sol)_
|
||||
## SafeTransferLib
|
||||
|
||||
Safe ETH and ERC20 transfer library that gracefully handles missing return values.
|
||||
|
||||
_Caution! This library won't check that a token has code, responsibility is delegated to the caller._
|
||||
_Caution! This library won't check that a token has code, responsibility is delegated to the caller._
|
||||
|
||||
### ETHTransferFailed
|
||||
|
||||
```solidity
|
||||
error ETHTransferFailed()
|
||||
```
|
||||
|
||||
_The ETH transfer has failed._
|
||||
|
||||
### TransferFromFailed
|
||||
|
||||
```solidity
|
||||
error TransferFromFailed()
|
||||
```
|
||||
|
||||
_The ERC20 `transferFrom` has failed._
|
||||
|
||||
### TransferFailed
|
||||
|
||||
```solidity
|
||||
error TransferFailed()
|
||||
```
|
||||
|
||||
_The ERC20 `transfer` has failed._
|
||||
|
||||
### safeTransferETH
|
||||
|
||||
```solidity
|
||||
function safeTransferETH(address to, uint256 amount) internal
|
||||
```
|
||||
|
||||
_Sends `amount` (in wei) ETH to `to`.
|
||||
Reverts upon failure._
|
||||
|
||||
### safeTransferFrom
|
||||
|
||||
```solidity
|
||||
function safeTransferFrom(contract ERC20 token, address from, address to, uint256 amount) internal
|
||||
```
|
||||
|
||||
_Sends `amount` of ERC20 `token` from `from` to `to`.
|
||||
Reverts upon failure.
|
||||
|
||||
The `from` account must have at least `amount` approved for
|
||||
the current contract to manage._
|
||||
|
||||
### safeTransfer
|
||||
|
||||
```solidity
|
||||
function safeTransfer(contract ERC20 token, address to, uint256 amount) internal
|
||||
```
|
||||
|
||||
_Sends `amount` of ERC20 `token` from the current contract to `to`.
|
||||
Reverts upon failure._
|
||||
|
||||
|
||||
Reference in New Issue
Block a user