Ethereum Function Call
Imagine that our organization agreed on changing a value in a simple counter we deployed on Sepolia Ethereum, and now want to leave this intent in the Abstract DAO. For this, we will call theregister_signature_request function on Abstract Dao saying:
We allow executor.testnet to request signatures for one of our Ethereum accounts, making it set a counter to 1000.
Here are the parameters, take a quick glance for now, since we will go over each one of them:
derivation_seed_number, transaction_payload, and allowed_account_id lets see them in depth.
Derivation Path
The parameterderivation seed number will be used to derive which external address we will be requesting signatures from, the address will be derived as:
DAO Address + Derivation Path + Contract Address = EVM Address
For example, if we register a request from the address ... using the derivation path 0 we will obtain control the 0x... account.
Transaction Payload
Thetransaction_payload contains all the information on the transaction that we want to perform, particularly:
to: The recipient address of the transactionnonce: The transaction nonce, used to ensure uniquenessfunction_data: (optional) Defines the function that will be called on the recipient’s contract, including:function_abi: The ABI of the function being calledarguments: The input arguments for the function, all ABI encoded (e.g. integers arebase64)
transaction_payload:
- Readable Payload: The parameters make it easy for anyone to quickly understand what transaction will be executed externally. The Abstract DAO is designed to be transparent and easy to audit, abstracting away the complexity of creating the transaction.
-
We Are Setting a Nonce: By setting the nonce, we make sure that the transaction will only be valid once, as future transactions will need higher
nonces -
We Are Not Setting the GAS: Gas prices are expected to vary wildly across EVMs, for which it makes no sense to setup a fixed gas amount and gas price for all the networks, for this is that we use the last parameter
allowed_account
Allowed Account
In this case, theallowed_account will be the one in charge of generating the signatures. At the time of generating the signature, the account will also set the gas_price for the transaction on a per-chain basis.