V1
The first version of calldata for transact method
selector
4
0
Contract method selector (0xaf989083)
tx_index
6
68
Transaction's first leaf index within Merkle tree (0-based counter)
energy_amount
14
74
Account XP delta (signed integer, Gwei)
token_amount
8
88
Account token delta (signed integer, Gwei)
tx_proof
256
96
zkSNARK proof
root_after
32
352
Merkle tree root after adding the transaction
tree_proof
256
384
zkSNARK proof
tx_type
2
640
0 - approve deposit
1 - transfer
2 - withdraw 3 - permit deposit
memo_size
2
642
The following memo block size in bytes
memo.fee
8
644
The tokens amount to be transferred to the operator (the Pool contract will multiply the fee by denominator)
memo.ItemsNum
4
652
Number of encrypted items in the memo block (deposit transactions contains an account only, i.e. ItemsNum always equals 1)
memo.Hash_acc
32
656
Output account hash (with updated balance)
memo.Ap_x
32
688
Ephemeral public key (using to decrypt memo.keys_enc by transaction sender)
memo.keys_enc
48
720
Encrypted account encryption key
memo.acc_enc
86
768
Encrypted account with an updated balance
ECDSA signature (r, s)
64
854
The nullifier signature. Used to recover deposit spender
Total bytes: 918
selector
4
0
Contract method selector (0xaf989083)
tx_index
6
68
Transaction's first leaf index within Merkle tree (0-based counter)
energy_amount
14
74
Account XP delta (signed integer, Gwei)
token_amount
8
88
Account token delta (signed integer, Gwei)
tx_proof
256
96
zkSNARK proof
root_after
32
352
Merkle tree root after adding the transaction
tree_proof
256
384
zkSNARK proof
tx_type
2
640
0 - approve deposit
1 - transfer
2 - withdraw 3 - permit deposit
memo_size
2
642
The following memo block size in bytes
memo.fee
8
644
The tokens amount to be transferred to the operator (the Pool contract will multiply the fee by denominator)
memo.ItemsNum
4
652
Number of encrypted items in the memo block (an account and zero or more notes; the maximum items number is 128)
memo.Hash_acc
32
656
Output account hash (with updated balance)
memo.Hash_notes
32 * (memo.ItemsNum - 1)
688
Output note hash
memo.Ap_x
32
656 + 32 β memo.ItemsNum
Ephemeral public key (using to decrypt memo.keys_enc by transaction sender)
memo.keys_enc
32 * memo.ItemsNum + 16
688+ 32 β memo.ItemsNum
Account and notes encryption keys
memo.acc_enc
86
704 + 64 * memo.ItemsNum
Encrypted account with an updated balance
memo.notes_enc
108*(memo.ItemsNum - 1)
790+ 64 * memo.ItemsNum
A single encrypted note (Aiβ,Noteiencβ) takes 108 bytes:
sizeof(Aiβ)= 32 sizeof(Noteiencβ)= 76
Typical calldata length: 1026 bytes (single-note transfer)
selector
4
0
Contract method selector (0xaf989083)
tx_index
6
68
Transaction's first leaf index within Merkle tree (0-based counter)
energy_amount
14
74
Account energy delta (signed integer, Gwei)
token_amount
8
88
Account token delta (signed integer, Gwei)
tx_proof
256
96
zkSNARK proof
root_after
32
352
Merkle tree root after adding the transaction
tree_proof
256
384
zkSNARK proof
tx_type
2
640
0 - deposit
1 - transfer
2 - withdraw 3 - permit deposit
memo_size
2
642
The following memo block size in bytes
memo.fee
8
644
The tokens amount to be transferred to the operator (the Pool contract will multiply the fee by denominator)
memo.nativeamount
8
652
Count of the native coin to withdraw
memo.receiver
20
660
Destination native (L1) address for withdrawal
memo.ItemsNum
4
680
Number of encrypted items in the memo block (withdrawal transactions contains an account only, i.e. ItemsNum always equals 1)
memo.Hash_acc
32
684
Output account hash (with updated balance)
memo.Ap_x
32
716
Ephemeral public key (using to decrypt memo.keys_enc by transaction sender)
memo.keys_enc
48
748
Encrypted account encryption key
memo.acc_enc
86
796
Encrypted account with an updated balance
Total bytes: 882
selector
4
0
Contract method selector (0xaf989083)
tx_index
6
68
Transaction's first leaf index within Merkle tree (0-based counter)
energy_amount
14
74
Account energy delta (signed integer, Gwei)
token_amount
8
88
Account token delta (signed integer, Gwei)
tx_proof
256
96
zkSNARK proof
root_after
32
352
Merkle tree root after adding the transaction
tree_proof
256
384
zkSNARK proof
tx_type
2
640
0 - deposit
1 - transfer
2 - withdraw 3 - permit deposit
memo_size
2
642
The following memo block size in bytes
memo.fee
8
644
The tokens amount to be transferred to the operator (the Pool contract will multiply the fee by denominator)
memo.deadline
8
652
Timestamp used in the typed data signing
memo.holder
20
660
Deposit spender L1-address (used to recover typed data signature)
memo.ItemsNum
4
680
Number of encrypted items in the memo block (deposit transactions contains an account only, i.e. ItemsNum always equals 1)
memo.Hash_acc
32
684
Output account hash (with updated balance)
memo.Ap_x
32
716
Ephemeral public key (using to decrypt memo.keys_enc by transaction sender)
memo.keys_enc
48
748
Encrypted account encryption key
memo.acc_enc
86
796
Encrypted account with an updated balance
ECDSA signature (r, s)
64
882
EIP-712 signature (typed data). Used to perform gasless transfer of user's tokens
Total bytes: 946
Last updated
Was this helpful?