IDepositSplitter
This interface exposes functionality for splitting deposits between the Payer Registry and App Chain.
Functions
deposit
Deposits payerRegistryAmount_ fee tokens into the Payer Registry for payer_, and appChainAmount_
fee tokens into the App Chain for appChainRecipient_.
function deposit(
address payer_,
uint96 payerRegistryAmount_,
address appChainRecipient_,
uint96 appChainAmount_,
uint256 appChainGasLimit_,
uint256 appChainMaxFeePerGas_
) external;
Parameters
| Name | Type | Description |
|---|---|---|
payer_ | address | The address of the payer. |
payerRegistryAmount_ | uint96 | The amount of fee tokens to deposit into the Payer Registry. |
appChainRecipient_ | address | The address of the recipient on the AppChain. |
appChainAmount_ | uint96 | The amount of fee tokens to deposit into the AppChain. |
appChainGasLimit_ | uint256 | The gas limit for the AppChain deposit. |
appChainMaxFeePerGas_ | uint256 | The maximum fee per gas (EIP-1559) for the AppChain deposit. |
depositWithPermit
Deposits payerRegistryAmount_ fee tokens into the Payer Registry for payer_, and appChainAmount_
fee tokens into the App Chain for appChainRecipient_.
function depositWithPermit(
address payer_,
uint96 payerRegistryAmount_,
address appChainRecipient_,
uint96 appChainAmount_,
uint256 appChainGasLimit_,
uint256 appChainMaxFeePerGas_,
uint256 deadline_,
uint8 v_,
bytes32 r_,
bytes32 s_
) external;
Parameters
| Name | Type | Description |
|---|---|---|
payer_ | address | The address of the payer. |
payerRegistryAmount_ | uint96 | The amount of fee tokens to deposit into the Payer Registry. |
appChainRecipient_ | address | The address of the recipient on the AppChain. |
appChainAmount_ | uint96 | The amount of fee tokens to deposit into the AppChain. |
appChainGasLimit_ | uint256 | The gas limit for the AppChain deposit. |
appChainMaxFeePerGas_ | uint256 | The maximum fee per gas (EIP-1559) for the AppChain deposit. |
deadline_ | uint256 | The deadline of the permit (must be the current or future timestamp). |
v_ | uint8 | An ECDSA secp256k1 signature parameter (EIP-2612 via EIP-712). |
r_ | bytes32 | An ECDSA secp256k1 signature parameter (EIP-2612 via EIP-712). |
s_ | bytes32 | An ECDSA secp256k1 signature parameter (EIP-2612 via EIP-712). |
depositFromUnderlying
Deposits payerRegistryAmount_ fee tokens into the Payer Registry for payer_, and appChainAmount_
fee tokens into the App Chain for appChainRecipient_, wrapping them from underlying fee tokens.
function depositFromUnderlying(
address payer_,
uint96 payerRegistryAmount_,
address appChainRecipient_,
uint96 appChainAmount_,
uint256 appChainGasLimit_,
uint256 appChainMaxFeePerGas_
) external;
Parameters
| Name | Type | Description |
|---|---|---|
payer_ | address | The address of the payer. |
payerRegistryAmount_ | uint96 | The amount of fee tokens to deposit into the Payer Registry. |
appChainRecipient_ | address | The address of the recipient on the AppChain. |
appChainAmount_ | uint96 | The amount of fee tokens to deposit into the AppChain. |
appChainGasLimit_ | uint256 | The gas limit for the AppChain deposit. |
appChainMaxFeePerGas_ | uint256 | The maximum fee per gas (EIP-1559) for the AppChain deposit. |
depositFromUnderlyingWithPermit
Deposits payerRegistryAmount_ fee tokens into the Payer Registry for payer_, and appChainAmount_
fee tokens into the App Chain for appChainRecipient_, wrapping them from underlying fee tokens.
function depositFromUnderlyingWithPermit(
address payer_,
uint96 payerRegistryAmount_,
address appChainRecipient_,
uint96 appChainAmount_,
uint256 appChainGasLimit_,
uint256 appChainMaxFeePerGas_,
uint256 deadline_,
uint8 v_,
bytes32 r_,
bytes32 s_
) external;
Parameters
| Name | Type | Description |
|---|---|---|
payer_ | address | The address of the payer. |
payerRegistryAmount_ | uint96 | The amount of fee tokens to deposit into the Payer Registry. |
appChainRecipient_ | address | The address of the recipient on the AppChain. |
appChainAmount_ | uint96 | The amount of fee tokens to deposit into the AppChain. |
appChainGasLimit_ | uint256 | The gas limit for the AppChain deposit. |
appChainMaxFeePerGas_ | uint256 | The maximum fee per gas (EIP-1559) for the AppChain deposit. |
deadline_ | uint256 | The deadline of the permit (must be the current or future timestamp). |
v_ | uint8 | An ECDSA secp256k1 signature parameter (EIP-2612 via EIP-712). |
r_ | bytes32 | An ECDSA secp256k1 signature parameter (EIP-2612 via EIP-712). |
s_ | bytes32 | An ECDSA secp256k1 signature parameter (EIP-2612 via EIP-712). |
appChainId
The app chain ID.
function appChainId() external view returns (uint256 appChainId_);
feeToken
The address of the fee token contract used for deposits.
function feeToken() external view returns (address feeToken_);
payerRegistry
The address of the payer registry.
function payerRegistry() external view returns (address payerRegistry_);
settlementChainGateway
The address of the settlement chain gateway.
function settlementChainGateway() external view returns (address settlementChainGateway_);
Errors
TransferFromFailed
Thrown when the ERC20.transferFrom call fails.
This is an identical redefinition of SafeTransferLib.TransferFromFailed.
error TransferFromFailed();
ZeroFeeToken
Thrown when the fee token is the zero address.
error ZeroFeeToken();
ZeroPayerRegistry
Thrown when the payer registry is the zero address.
error ZeroPayerRegistry();
ZeroSettlementChainGateway
Thrown when the settlement chain gateway is the zero address.
error ZeroSettlementChainGateway();
ZeroAppChainId
Thrown when the app chain ID is zero.
error ZeroAppChainId();
ZeroTotalAmount
Thrown when the total amount is zero.
error ZeroTotalAmount();