Scroll Router
Last updated
Last updated
Parameter name | Value | Description |
---|---|---|
Parameter name | Type | Description |
---|---|---|
Parameter name | Type | Description |
---|---|---|
token_in
address
contract address of token to sell
token_out
address
contract address of token to buy
amount_in
u256
amount of token to sell
min_received
u256
minimum received amount of user get
destination
address
The receiver address for the output token
swap_type
enum(SwapType)
swap type
ethToToken
0
swap Eth to erc20 token
tokenToEth
1
swap erc20 token to Eth
tokenToToken
2
swap erc20 to erc20 token
token_in
address
contract address of token to sell
token_out
address
contract address of token to buy
rate
u32
rate * 10**4 gives 4 precision points
protocol_id
u32
procotol id
pool_address
address
pool contract address
swap_tpe
enum(SwapType)
swap type
extra_data
Array<felt252>
extra data for route
sender
address
address that execute the transaction.
token_in
address
contract address of token to sell
token_out
address
contract address of token to buy
amount_in
u256
amount of token to sold
amount_out
u256
amount of token to bought.
destination
address
receiver address for the output token