V1

The first version of calldata for transact method

Field
Size (bytes)
Offset (bytes)
Description

selector

4

0

Contract method selector (0xaf989083)

nullifier

32

4

out_commit

32

36

Transaction commitment (transaction subtree root in the Merkle tree)

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

Last updated

Was this helpful?