hermez-node/common/l1tx.go
common/l1tx.goRaw
1package common
2
3import (
4 "math/big"
5
6 eth "github.com/ethereum/go-ethereum/common"
7 "github.com/iden3/go-iden3-crypto/babyjub"
8)
9
10// L1Tx is a struct that represents a L1 tx
11type L1Tx struct {
12 Tx
13 UserOrigin bool // true if the tx was originated by a user, false if it was aoriginated by a coordinator. Note that this differ from the spec for implementation simplification purpposes
14 PublicKey babyjub.PublicKey
15 LoadAmount *big.Int // amount transfered from L1 -> L2
16 EthBlockNum uint64 // Ethereum Block Number in which this L1Tx was added to the queue
17 EthTxHash eth.Hash // TxHash that added this L1Tx to the queue
18 Position int // Position among all the L1Txs in that batch
19 ToForgeL1TxsNum uint32 // toForgeL1TxsNum in which the tx was forged / will be forged
20 FromBJJ babyjub.PublicKey
21 CreateAccount bool // "from" + token ID is a new account
22 FromEthAddr eth.Address
23}