mirror of
https://github.com/serai-dex/serai.git
synced 2024-12-27 22:19:39 +00:00
946 B
946 B
Ethereum
Addresses
Ethereum addresses are 20-byte hashes, identical to Ethereum proper.
In Instructions
In Instructions may be created in one of two ways.
- Have an EOA call
transfer
ortransferFrom
on an ERC20, appending the encoded InInstruction directly after the calldata.origin
defaults to the party transferred from. - Call
inInstruction
on the Router.origin
defaults tomsg.sender
.
Out Instructions
data
is limited to 512 bytes.
If data
isn't provided or is malformed, ETH transfers will execute with 5,000
gas and token transfers with 100,000 gas.
If data
is provided and well-formed, destination
is ignored and the Ethereum
Router will construct and call a new contract to proxy the contained calls. The
transfer executes to the constructed contract as above, before the constructed
contract is called with the calls inside data
. The sandboxed execution has a
gas limit of 350,000.