A0xRouter
Overview
License: Apache-2.0-or-later
contract A0xRouter is IA0xRouter, IMinimumVersion, ReentrancyGuardTransientAuthor: Gabriele Rigo - gab@rigoblock.com
See docs/0x/ACTION_ALLOWLIST.md for the validation model and security rationale.
Modifiers info
onlyDelegateCall
modifier onlyDelegateCall()Functions info
constructor
constructor(address allowanceHolder, address deployer)Parameters:
allowanceHolder
address
The 0x AllowanceHolder contract address (chain-specific, immutable).
deployer
address
The 0x Deployer/Registry contract address (same on all chains).
requiredVersion (0x2ea6c3f0)
Returns the minimum implementation version to use an external application.
Adapters must implement it when modifying proxy state or storage.
Return values:
[0]
string
String of the minimum supported version.
exec (0x2213bc0b)
Execute a swap via the 0x AllowanceHolder contract.
The calldata is forwarded unmodified to AllowanceHolder after validation.
Parameters:
operator
address
The address authorized to consume the ephemeral allowance. Must equal target.
token
address
The sell token address.
amount
uint256
The sell token amount.
target
address payable
The 0x Settler contract address that will execute the swap.
data
bytes
The Settler.execute() calldata containing swap instructions.
Return values:
result
bytes
The return data from AllowanceHolder.exec.
Last updated