Approval Facet
The Approval Facet handles all approval and permit related functions for the Silo.
Call Functions
Approvals
Approves an address to access a Farmer's Deposit.
Parameter | Type | Description |
---|---|---|
|
| Address to be given approval. |
|
| Address of ERC20. |
|
| Amount to be approved. |
Increases transfer allowance of a Deposit.
Parameter | Type | Description |
---|---|---|
|
| Address to increase approval for. |
|
| Address of ERC20. |
|
| Additional approval value to be given. |
Return Value | Description |
---|---|
| If the allowance increase was successful. |
Decreases transfer allowance of a Deposit.
Parameter | Type | Description |
---|---|---|
|
| Address to decrease approval for. |
|
| Address of ERC20. |
|
| Amount of approval value to be removed. |
Return Value | Description |
---|---|
| Success. |
Permits
Farm balances and Silo Deposits support EIP-2612 permits, which allows Farmers to delegate use of their Farm balances and Silo Deposits through permits without the need for a separate transaction.
Permits multiple Deposits.
Parameter | Type | Description |
---|---|---|
|
| Owner of the Deposit. |
|
| Address to permit. |
|
| Array of ERC20s to permit. |
|
| Array of amount (corresponding to |
|
| Expiration of signature (Unix time). |
|
| Recovery ID. |
|
| ECDSA signature output. |
|
| ECDSA signature output. |
Permits a single Deposit.
Parameter | Type | Description |
---|---|---|
|
| Owner of the Deposit. |
|
| Address to permit. |
|
| ERC20 to permit. |
|
| Amount of |
|
| Expiration of signature (Unix time). |
|
| Recovery ID. |
|
| ECDSA signature output. |
|
| ECDSA signature output. |
Set ERC-1155 approvals. Grants or revokes permission to operator
to transfer the caller’s tokens, according to approved
.
Parameter | Type | Description |
---|---|---|
|
| Address to approve spending for. |
|
| Whether or not to approve. |
View Functions
Returns the current nonce for Deposit permits.
Parameter | Type | Description |
---|---|---|
|
| Owner of the Deposit. |
Return Value | Description |
---|---|
| Current nonce for Deposit permits. |
Returns the domain separator for the current chain (link).
Return Value | Description |
---|---|
| The domain separator for the current chain. |
Returns how much of a token
Deposit that spender
can transfer on behalf of owner
.
Parameter | Type | Description |
---|---|---|
|
| Owner of the Deposit. |
|
| The address that can spend the Deposit. |
|
| The token Deposit that |
Return Value | Description |
---|---|
| The |
Returns true if _operator
is approved to transfer _owner
's Deposit.
Parameter | Type | Description |
---|---|---|
|
| Owner of the Deposit. |
|
| Spender of the Deposit. |
Return Value | Description |
---|---|
| True if |
Events
Emitted when a Deposit is approved to spend by another account.
Parameter | Type | Description |
---|---|---|
|
| Owner of the Deposit. |
|
| Spender of the Deposit. |
|
| Deposit token that can be spent. |
|
| Amount of the Deposit token that can be spent. |
Emitted when account
grants or revokes permission to operator
to transfer their tokens, according to approved
(link).
Parameter | Type | Description |
---|---|---|
|
| Owner of the Deposit. |
|
| Spender of the Deposit. |
|
| Whether or not the Deposit was approved. |
Last updated