expand.network provides Account abstraction capabilities.
What is Account Abstraction?
Regular ways of keeping your digital stuff safe, like browser extensions, seed phrases, and wallets, can be a hassle. But the idea is to make using Web3 super easy so regular folks can use it without realizing they are.
With the current Ethereum architecture, users sign transactions and pay gas fees from their externally owned accounts (EOAs). Account abstraction proposes a more flexible system where these responsibilities can be offloaded or changed to allow more varied transaction models.
Account Abstraction lets computer whizzes create special "smart accounts" or flexible wallets. It does this by changing who's in charge of saying "yes" to money moves. Instead of wallets doing it, smart accounts take over. This means these accounts can do more than just move money around. They can also do fancy things like running computer code, triggering events, and managing how things change on the internet money system. Cool, right?
The following functions are implemented considering the Account Abstraction capabilities:-
Name | Type | Description |
---|---|---|
Following is the diagram for account abstraction on-chain wallet creation:-
Following is the diagram for executing call data operation via On-chain wallet contract:-
Following is the diagram for account abstraction gas payment via paymaster contract:-
As per ERC-4337, Paymasters facilitate transaction sponsorship, allowing third-party-designed mechanisms to pay for transactions. Many of these mechanisms could be done by having the paymaster wrap a UserOperation
with their own, but there are some important fundamental limitations to that approach:
No possibility for “passive” paymasters (eg. that accept fees in some ERC-20 token at an exchange rate pulled from an on-chain DEX)
Paymasters run the risk of getting griefed, as users could send ops that appear to pay the paymaster but then change their behavior after a block
GET
https://api.expand.network/aa/getpaymasterdata
Name | Type | Description |
---|---|---|
As per ERC-4337, Bundler is a node (block builder) that can handle UserOperations, create a valid an EntryPoint.handleOps() transaction, and add it to the block while it is still valid. This can be achieved by a number of ways:
Bundler can act as a block builder itself
If the bundler is not a block builder, it MUST work with the block building infrastructure such as mev-boost
or other kind of PBS (proposer-builder separation)
The bundler
can also rely on an experimental eth_sendRawTransactionConditional
RPC API if it is available.
POST
https://api.expand.network/aa/senduserops
Name | Type | Description |
---|---|---|
As per ERC-4337, User Operations is a structure that describes a transaction to be sent on behalf of a user. To avoid confusion, it is not named “transaction”.
Like a transaction, it contains “sender”, “to”, “calldata”, “maxFeePerGas”, “maxPriorityFee”, “signature”, “nonce”
unlike a transaction, it contains several other fields, described below
also, the “signature” field usage is not defined by the protocol, but by each account implementation
GET
https://api.expand.network/aa/getsignaturemessage
Name | Type | Description |
---|---|---|
GET
https://api.expand.network/aa/getuserops
Name | Type | Description |
---|---|---|
chainId
String
Refer to the Chain ID page for details.
chainSymbol
String
Refer to the Chain ID page for details.
sender*
String
On-chain wallet address.
rpc
String
Remote procedural call URL.
nonce
String
Anti-replay parameter.
initCode
String
The initCode of the account. (needed if and only if the account is not yet on-chain and needs to be created)
preVerificationGas
String
The amount of gas to pay for to compensate the bundler for pre-verification execution and calldata.
verificationGasLimit
String
The amount of gas to allocate for the verification step.
gasLimit
String
Maximum gas limit provided by the sender, for the transaction.
callGasLimit
String
The amount of gas to allocate the main execution call.
callData
String
Encoded data for executing the primary function call or operation within the user's transaction.
maxPriorityFeePerGas
String
Maximum priority fee per gas. (similar to EIP-1559 max_priority_fee_per_gas
)
maxFeePerGas
String
The maximum fee per gas to pay for the execution of this operation. (similar to EIP-1559 max_fee_per_gas
)
signature
String
Data passed into the account along with the nonce during the verification step.
paymasterAndData
String
Address of paymaster sponsoring the transaction, followed by extra data to send to the paymaster. (empty for self-sponsored transaction)
paymasterContractAddress*
String
Address of the contract from where, gas is to be paid.
mockValidAfter*
String
The UserOp is valid only after this time, to be sent in epoch time format.
mockValidUntil*
String
The UserOp is valid only up to this time, to be sent in epoch time format.
rpc
String
Remote procedural call URL.
chainId
String
Refer to the Chain ID page for details.
signature*
String
Data passed into the account along with the nonce during the verification step.
paymasterAndData*
String
Address of paymaster sponsoring the transaction, followed by extra data to send to the paymaster. (empty for self-sponsored transaction)
maxPriorityFeePerGas*
String
Maximum priority fee per gas. (similar to EIP-1559 max_priority_fee_per_gas
)
maxFeePerGas*
String
Maximum fee per gas. (similar to EIP-1559 max_fee_per_gas
)
preVerificationGas*
String
The amount of gas to pay for to compensate the bundler for pre-verification execution and calldata.
verificationGasLimit*
String
The amount of gas to allocate for the verification step.
gasLimit*
String
Maximum gas limit provided by the sender, for the transaction.
callGasLimit*
String
The amount of gas to allocate the main execution call.
callData*
String
The data to pass to the sender
during the main execution call.
initCode*
String
The initCode of the account. (needed if and only if the account is not yet on-chain and needs to be created)
sender*
String
The account making the operation.
userOps*
Array
The user operation object as per ERC-4337.
chainSymbol
String
Refer to the Chain ID page for details.
bundler*
String
Beneficiary address for bundle execution.
gas*
String
Gas limit for bundler transaction.
chainId
String
Refer to the Chain ID page for details.
chainSymbol
String
Refer to the Chain ID page for details.
sender*
String
On-chain wallet address.
rpc
String
Remote procedural call URL.
nonce
String
Anti-replay parameter.
initCode
String
The initCode of the account. (needed if and only if the account is not yet on-chain and needs to be created)
preVerificationGas
String
The amount of gas to pay for to compensate the bundler for pre-verification execution and calldata.
verificationGasLimit
String
The amount of gas to allocate for the verification step.
gasLimit
String
Maximum gas limit provided by the sender, for the transaction.
callGasLimit
String
The amount of gas to allocate the main execution call.
callData
String
Encoded data for executing the primary function call or operation within the user's transaction.
maxPriorityFeePerGas
String
Maximum priority fee per gas. (similar to EIP-1559 max_priority_fee_per_gas
)
maxFeePerGas
String
The maximum fee per gas to pay for the execution of this operation. (similar to EIP-1559 max_fee_per_gas
)
signature
String
Data passed into the account along with the nonce during the verification step.
paymasterAndData
String
Address of paymaster sponsoring the transaction, followed by extra data to send to the paymaster. (empty for self-sponsored transaction)
chainId
String
Refer to the Chain ID page for details.
chainSymbol
String
Refer to the Chain ID page for details.
sender*
String
On-chain wallet address.
rpc
String
Remote procedural call URL.
nonce
String
Anti-replay parameter.
initCode
String
The initCode of the account. (needed if and only if the account is not yet on-chain and needs to be created)
preVerificationGas
String
The amount of gas to pay for to compensate the bundler for pre-verification execution and calldata.
verificationGasLimit
String
The amount of gas to allocate for the verification step.
gasLimit
String
Maximum gas limit provided by the sender, for the transaction.
callGasLimit
String
The amount of gas to allocate the main execution call.
callData
String
Encoded data for executing the primary function call or operation within the user's transaction.
maxPriorityFeePerGas
String
Maximum priority fee per gas. (similar to EIP-1559 max_priority_fee_per_gas
)
maxFeePerGas
String
The maximum fee per gas to pay for the execution of this operation. (similar to EIP-1559 max_fee_per_gas
)
signature
String
Data passed into the account along with the nonce during the verification step.
paymasterAndData
String
Address of paymaster sponsoring the transaction, followed by extra data to send to the paymaster. (empty for self-sponsored transaction)
getsignaturemessage
Read
Get the signature message, which needs to be signed.
getuserops
Read
Get the user operation, which can be signed and sent to the bundler.
getpaymasterdata
Read
Get the paymaster data, that can be sent in the user operations.
senduserops
Write
Prepare the data, to send the bundle of user operations, to the bundler.