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.

37 lines
1.4 KiB

  1. package common
  2. import (
  3. "math/big"
  4. ethCommon "github.com/ethereum/go-ethereum/common"
  5. "github.com/iden3/go-merkletree"
  6. )
  7. // ExitInfo represents the ExitTree Leaf data
  8. type ExitInfo struct {
  9. BatchNum BatchNum `meddler:"batch_num"`
  10. AccountIdx Idx `meddler:"account_idx"`
  11. MerkleProof *merkletree.CircomVerifierProof `meddler:"merkle_proof,json"`
  12. Balance *big.Int `meddler:"balance,bigint"`
  13. // InstantWithdrawn is the ethBlockNum in which the exit is withdrawn
  14. // instantly. nil means this hasn't happened.
  15. InstantWithdrawn *int64 `meddler:"instant_withdrawn"`
  16. // DelayedWithdrawRequest is the ethBlockNum in which the exit is
  17. // requested to be withdrawn from the delayedWithdrawn smart contract.
  18. // nil means this hasn't happened.
  19. DelayedWithdrawRequest *int64 `meddler:"delayed_withdraw_request"`
  20. // DelayedWithdrawn is the ethBlockNum in which the exit is withdrawn
  21. // from the delayedWithdrawn smart contract. nil means this hasn't
  22. // happened.
  23. DelayedWithdrawn *int64 `meddler:"delayed_withdrawn"`
  24. }
  25. // WithdrawInfo represents a withdraw action to the rollup
  26. type WithdrawInfo struct {
  27. Idx Idx
  28. NumExitRoot BatchNum
  29. InstantWithdraw bool
  30. TxHash ethCommon.Hash // hash of the transaction in which the withdraw happened
  31. Owner ethCommon.Address
  32. Token ethCommon.Address
  33. }