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.

33 lines
1.2 KiB

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