Module ethereum_serai::router::abi
source · Expand description
Generated by the following Solidity interface…
interface Router {
struct Call {
address to;
uint256 value;
bytes data;
}
struct OutInstruction {
address to;
Call[] calls;
uint256 value;
}
struct Signature {
bytes32 c;
bytes32 s;
}
error FailedTransfer();
error InvalidAmount();
error InvalidKey();
error InvalidSOrA();
error InvalidSignature();
error MalformedSignature();
error TooManyTransactions();
event Executed(uint256 indexed nonce, bytes32 indexed batch, uint256 success, Signature signature);
event InInstruction(address indexed from, address indexed coin, uint256 amount, bytes instruction);
event SeraiKeyUpdated(uint256 indexed nonce, bytes32 indexed key, Signature signature);
constructor(bytes32 _seraiKey);
function execute(OutInstruction[] memory transactions, Signature memory sig) external;
function inInstruction(address coin, uint256 amount, bytes memory instruction) external payable;
function nonce() external view returns (uint256);
function seraiKey() external view returns (bytes32);
function updateSeraiKey(bytes32 _seraiKey, Signature memory sig) external;
}
…which was generated by the following JSON ABI:
[
{
"type": "constructor",
"inputs": [
{
"name": "_seraiKey",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "execute",
"inputs": [
{
"name": "transactions",
"type": "tuple[]",
"internalType": "struct Router.OutInstruction[]",
"components": [
{
"name": "to",
"type": "address",
"internalType": "address"
},
{
"name": "calls",
"type": "tuple[]",
"internalType": "struct Call[]",
"components": [
{
"name": "to",
"type": "address",
"internalType": "address"
},
{
"name": "value",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "data",
"type": "bytes",
"internalType": "bytes"
}
]
},
{
"name": "value",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"name": "sig",
"type": "tuple",
"internalType": "struct Router.Signature",
"components": [
{
"name": "c",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "s",
"type": "bytes32",
"internalType": "bytes32"
}
]
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "inInstruction",
"inputs": [
{
"name": "coin",
"type": "address",
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "instruction",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [],
"stateMutability": "payable"
},
{
"type": "function",
"name": "nonce",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "seraiKey",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "updateSeraiKey",
"inputs": [
{
"name": "_seraiKey",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "sig",
"type": "tuple",
"internalType": "struct Router.Signature",
"components": [
{
"name": "c",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "s",
"type": "bytes32",
"internalType": "bytes32"
}
]
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "event",
"name": "Executed",
"inputs": [
{
"name": "nonce",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"name": "batch",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "success",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "signature",
"type": "tuple",
"indexed": false,
"internalType": "struct Router.Signature",
"components": [
{
"name": "c",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "s",
"type": "bytes32",
"internalType": "bytes32"
}
]
}
],
"anonymous": false
},
{
"type": "event",
"name": "InInstruction",
"inputs": [
{
"name": "from",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "coin",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "instruction",
"type": "bytes",
"indexed": false,
"internalType": "bytes"
}
],
"anonymous": false
},
{
"type": "event",
"name": "SeraiKeyUpdated",
"inputs": [
{
"name": "nonce",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"name": "key",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "signature",
"type": "tuple",
"indexed": false,
"internalType": "struct Router.Signature",
"components": [
{
"name": "c",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "s",
"type": "bytes32",
"internalType": "bytes32"
}
]
}
],
"anonymous": false
},
{
"type": "error",
"name": "FailedTransfer",
"inputs": []
},
{
"type": "error",
"name": "InvalidAmount",
"inputs": []
},
{
"type": "error",
"name": "InvalidKey",
"inputs": []
},
{
"type": "error",
"name": "InvalidSOrA",
"inputs": []
},
{
"type": "error",
"name": "InvalidSignature",
"inputs": []
},
{
"type": "error",
"name": "MalformedSignature",
"inputs": []
},
{
"type": "error",
"name": "TooManyTransactions",
"inputs": []
}
]
Structs§
- Event with signature
Executed(uint256,bytes32,uint256,(bytes32,bytes32))
and selector0x891a780ae8c443cf9c84ae09da10342d62fae18673502574ff73ec6cc94ce051
. - Custom error with signature
FailedTransfer()
and selector0xbfa871c5
. - Event with signature
InInstruction(address,address,uint256,bytes)
and selector0x346fd5cd6d19d26d3afd222f43033ecd0d5614ca64bec0aed101482cd87e922f
. - Custom error with signature
InvalidAmount()
and selector0x2c5211c6
. - Custom error with signature
InvalidKey()
and selector0x76d4e1e8
. - Custom error with signature
InvalidSOrA()
and selector0x4e99a12e
. - Custom error with signature
InvalidSignature()
and selector0x8baa579f
. - Custom error with signature
MalformedSignature()
and selector0x55a1e16e
. - Event with signature
SeraiKeyUpdated(uint256,bytes32,(bytes32,bytes32))
and selector0x01f8e4fa2e4a7438dacc2f41b27c1bf12fd6cbb1063dea2abddf465767465b80
. - Custom error with signature
TooManyTransactions()
and selector0xfb4593ba
. - Constructor`.
- Function with signature
execute((address,(address,uint256,bytes)[],uint256)[],(bytes32,bytes32))
and selector0x97898414
. - Container type for the return parameters of the
execute((address,(address,uint256,bytes)[],uint256)[],(bytes32,bytes32))
function. - Function with signature
inInstruction(address,uint256,bytes)
and selector0x0759a1a4
. - Container type for the return parameters of the
inInstruction(address,uint256,bytes)
function. - Function with signature
nonce()
and selector0xaffed0e0
. - Container type for the return parameters of the
nonce()
function. - Function with signature
seraiKey()
and selector0x9d6eea0a
. - Container type for the return parameters of the
seraiKey()
function. - Function with signature
updateSeraiKey(bytes32,(bytes32,bytes32))
and selector0xb5071c6a
. - Container type for the return parameters of the
updateSeraiKey(bytes32,(bytes32,bytes32))
function.