Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs/new oz docgen #138

Merged
merged 3 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 1 addition & 44 deletions docs/contracts/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,47 +26,4 @@
* [EthReceiver](mixins/EthReceiver.md)
* [OnlyWethReceiver](mixins/OnlyWethReceiver.md)
* [PermitAndCall](mixins/PermitAndCall.md)
* [SelfdestructEthSender](mixins/SelfdestructEthSender.md)
* [mocks](mocks/README.md)
* [ERC20PermitMock](mocks/ERC20PermitMock.md)
* [SelfdestructEthSenderMock](mocks/SelfdestructEthSenderMock.md)
* [TokenCustomDecimalsMock](mocks/TokenCustomDecimalsMock.md)
* [TokenMock](mocks/TokenMock.md)
* [tests](tests/README.md)
* [libraries](tests/libraries/README.md)
* [StringUtilNaive](tests/libraries/StringUtilNaive.md)
* [mocks](tests/mocks/README.md)
* [AddressArrayMock](tests/mocks/AddressArrayMock.md)
* [AddressLibMock](tests/mocks/AddressLibMock.md)
* [AddressSetMock](tests/mocks/AddressSetMock.md)
* [BySigTraitsMock](tests/mocks/BySigTraitsMock.md)
* [BytesMemoryMock](tests/mocks/BytesMemoryMock.md)
* [BytesStorageMock](tests/mocks/BytesStorageMock.md)
* [DaiLikePermitMock](tests/mocks/DaiLikePermitMock.md)
* [ERC1271WalletMock](tests/mocks/ERC1271WalletMock.md)
* [ERC20Capitals](tests/mocks/ERC20Capitals.md)
* [ERC20NoReturnMock](tests/mocks/ERC20NoReturnMock.md)
* [ERC20PermitNoRevertMock](tests/mocks/ERC20PermitNoRevertMock.md)
* [ERC20ReturnFalseMock](tests/mocks/ERC20ReturnFalseMock.md)
* [ERC20ReturnTrueMock](tests/mocks/ERC20ReturnTrueMock.md)
* [ERC20ThroughZeroApprove](tests/mocks/ERC20ThroughZeroApprove.md)
* [ERC20WithSafeBalance](tests/mocks/ERC20WithSafeBalance.md)
* [ERC20bytes32](tests/mocks/ERC20bytes32.md)
* [ERC20bytes32Capitals](tests/mocks/ERC20bytes32Capitals.md)
* [ETHBadReceiver](tests/mocks/ETHBadReceiver.md)
* [EthReceiverMock](tests/mocks/EthReceiverMock.md)
* [EthSenderMock](tests/mocks/EthSenderMock.md)
* [IUniERC20Wrapper](tests/mocks/IUniERC20Wrapper.md)
* [Permit2ReturnTrueMock](tests/mocks/Permit2ReturnTrueMock.md)
* [PermitAndCallMock](tests/mocks/PermitAndCallMock.md)
* [PermitableMock](tests/mocks/PermitableMock.md)
* [SafeERC20Wrapper](tests/mocks/SafeERC20Wrapper.md)
* [SafeWETHWrapper](tests/mocks/SafeWETHWrapper.md)
* [TokenWithBySig](tests/mocks/TokenWithBySig.md)
* [USDCLikePermitMock](tests/mocks/USDCLikePermitMock.md)
* [UniERC20Wrapper](tests/mocks/UniERC20Wrapper.md)
* [WETH](tests/mocks/WETH.md)
* [WethReceiverMock](tests/mocks/WethReceiverMock.md)
* [ECDSATest](tests/ECDSATest.md)
* [RevertReasonParserTest](tests/RevertReasonParserTest.md)
* [StringUtilTest](tests/StringUtilTest.md)
* [SelfdestructEthSender](mixins/SelfdestructEthSender.md)
59 changes: 29 additions & 30 deletions docs/contracts/interfaces/ICreate3Deployer.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,49 @@
# ICreate3Deployer

## ICreate3Deployer

ICreate3Deployer
_Interface for deploying contracts with deterministic addresses via CREATE3._

### Functions list
- [deploy(salt, code) external](#deploy)
- [addressOf(salt) external](#addressof)

Interface for deploying contracts with deterministic addresses via CREATE3.


## Functions
### Functions
### deploy

```solidity
function deploy(
bytes32 salt,
bytes code
) external returns (address)
function deploy(bytes32 salt, bytes code) external returns (address)
```
Deploys a contract using CREATE3 with a given salt and bytecode.

#### Parameters

#### Parameters:
| Name | Type | Description |
| :--- | :--- | :------------------------------------------------------------------- |
|`salt` | bytes32 | Unique value to create deterministic address.
|`code` | bytes | Contract bytecode to deploy.
| Name | Type | Description |
| ---- | ---- | ----------- |
| salt | bytes32 | Unique value to create deterministic address. |
| code | bytes | Contract bytecode to deploy. |

#### Return Values:
| Name | Type | Description |
| :----------------------------- | :------------ | :--------------------------------------------------------------------------- |
|`Address`| address | of the deployed contract.
#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
[0] | address | Address of the deployed contract. |

### addressOf

```solidity
function addressOf(
bytes32 salt
) external returns (address)
function addressOf(bytes32 salt) external view returns (address)
```
Computes the address of a contract deployed with the given salt.

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| salt | bytes32 | Unique value used during deployment. |

#### Parameters:
| Name | Type | Description |
| :--- | :--- | :------------------------------------------------------------------- |
|`salt` | bytes32 | Unique value used during deployment.
#### Return Values

#### Return Values:
| Name | Type | Description |
| :----------------------------- | :------------ | :--------------------------------------------------------------------------- |
|`Address`| address | of the contract.
| Name | Type | Description |
| ---- | ---- | ----------- |
[0] | address | Address of the contract. |

48 changes: 19 additions & 29 deletions docs/contracts/interfaces/IDaiLikePermit.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,29 @@
# IDaiLikePermit

## IDaiLikePermit

IDaiLikePermit
_Interface for Dai-like permit function allowing token spending via signatures._

### Functions list
- [permit(holder, spender, nonce, expiry, allowed, v, r, s) external](#permit)

Interface for Dai-like permit function allowing token spending via signatures.


## Functions
### Functions
### permit

```solidity
function permit(
address holder,
address spender,
uint256 nonce,
uint256 expiry,
bool allowed,
uint8 v,
bytes32 r,
bytes32 s
) external
function permit(address holder, address spender, uint256 nonce, uint256 expiry, bool allowed, uint8 v, bytes32 r, bytes32 s) external
```
Approves spending of tokens via off-chain signatures.


#### Parameters:
| Name | Type | Description |
| :--- | :--- | :------------------------------------------------------------------- |
|`holder` | address | Token holder's address.
|`spender` | address | Spender's address.
|`nonce` | uint256 | Current nonce of the holder.
|`expiry` | uint256 | Time when the permit expires.
|`allowed` | bool | True to allow, false to disallow spending.
|`v` | uint8 | Signature components.
|`r` | bytes32 |
|`s` | bytes32 |

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| holder | address | Token holder's address. |
| spender | address | Spender's address. |
| nonce | uint256 | Current nonce of the holder. |
| expiry | uint256 | Time when the permit expires. |
| allowed | bool | True to allow, false to disallow spending. |
| v | uint8 | |
| r | bytes32 | |
| s | bytes32 | Signature components. |

38 changes: 18 additions & 20 deletions docs/contracts/interfaces/IERC20MetadataUppercase.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,36 @@
# IERC20MetadataUppercase

## IERC20MetadataUppercase

IERC20MetadataUppercase
_Interface for ERC20 token metadata with uppercase naming convention._

### Functions list
- [NAME() external](#name)
- [SYMBOL() external](#symbol)

Interface for ERC20 token metadata with uppercase naming convention.


## Functions
### Functions
### NAME

```solidity
function NAME(
) external returns (string)
function NAME() external view returns (string)
```
Gets the token name.

#### Return Values


#### Return Values:
| Name | Type | Description |
| :----------------------------- | :------------ | :--------------------------------------------------------------------------- |
|`Token`| string | name.
| Name | Type | Description |
| ---- | ---- | ----------- |
[0] | string | Token name. |

### SYMBOL

```solidity
function SYMBOL(
) external returns (string)
function SYMBOL() external view returns (string)
```
Gets the token symbol.

#### Return Values


#### Return Values:
| Name | Type | Description |
| :----------------------------- | :------------ | :--------------------------------------------------------------------------- |
|`Token`| string | symbol.
| Name | Type | Description |
| ---- | ---- | ----------- |
[0] | string | Token symbol. |

38 changes: 16 additions & 22 deletions docs/contracts/interfaces/IERC7597Permit.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,28 @@
# IERC7597Permit

## IERC7597Permit

IERC7597Permit
_A new extension for ERC-2612 permit, which has already been added to USDC v2.2._

### Functions list
- [permit(owner, spender, value, deadline, signature) external](#permit)

A new extension for ERC-2612 permit, which has already been added to USDC v2.2.


## Functions
### Functions
### permit

```solidity
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
bytes signature
) external
function permit(address owner, address spender, uint256 value, uint256 deadline, bytes signature) external
```
Update allowance with a signed permit.

Signature bytes can be used for both EOA wallets and contract wallets.
_Signature bytes can be used for both EOA wallets and contract wallets._

#### Parameters:
| Name | Type | Description |
| :--- | :--- | :------------------------------------------------------------------- |
|`owner` | address | Token owner's address (Authorizer).
|`spender` | address | Spender's address.
|`value` | uint256 | Amount of allowance.
|`deadline` | uint256 | The time at which the signature expires (unixtime).
|`signature` | bytes | Unstructured bytes signature signed by an EOA wallet or a contract wallet.
#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| owner | address | Token owner's address (Authorizer). |
| spender | address | Spender's address. |
| value | uint256 | Amount of allowance. |
| deadline | uint256 | The time at which the signature expires (unixtime). |
| signature | bytes | Unstructured bytes signature signed by an EOA wallet or a contract wallet. |

Loading
Loading