For the complete documentation index, see llms.txt. This page is also available as Markdown.

A0xRouter

A0xRouter

See docs/0x/ACTION_ALLOWLIST.md for security rationale and blocked action details.

constructor

constructor(address allowanceHolder, address deployer) public

Parameters

Name
Type
Description

allowanceHolder

address

The 0x AllowanceHolder contract address (chain-specific, immutable).

deployer

address

The 0x Deployer/Registry contract address (same on all chains).

onlyDelegateCall

modifier onlyDelegateCall()

requiredVersion

function requiredVersion() external pure returns (string)

Returns the minimum implementation version to use an external application.

Adapters must implement it when modifying proxy state or storage.

Return Values

Name
Type
Description

[0]

string

String of the minimum supported version.

exec

Execute a swap via the 0x AllowanceHolder contract.

The calldata is forwarded unmodified to AllowanceHolder after validation.

Parameters

Name
Type
Description

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

Name
Type
Description

[0]

bytes

Last updated