You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
936 B

  1. package common
  2. import (
  3. "math/big"
  4. eth "github.com/ethereum/go-ethereum/common"
  5. "github.com/iden3/go-iden3-crypto/babyjub"
  6. )
  7. // L1Tx is a struct that represents a L1 tx
  8. type L1Tx struct {
  9. Tx
  10. 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
  11. PublicKey babyjub.PublicKey
  12. LoadAmount *big.Int // amount transfered from L1 -> L2
  13. EthBlockNum uint64 // Ethereum Block Number in which this L1Tx was added to the queue
  14. EthTxHash eth.Hash // TxHash that added this L1Tx to the queue
  15. Position int // Position among all the L1Txs in that batch
  16. ToForgeL1TxsNum uint32 // toForgeL1TxsNum in which the tx was forged / will be forged
  17. FromBJJ babyjub.PublicKey
  18. CreateAccount bool // "from" + token ID is a new account
  19. FromEthAddr eth.Address
  20. }