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.

31 lines
871 B

3 years ago
  1. package common
  2. // SCVariables joins all the smart contract variables in a single struct
  3. type SCVariables struct {
  4. Rollup RollupVariables `validate:"required"`
  5. Auction AuctionVariables `validate:"required"`
  6. WDelayer WDelayerVariables `validate:"required"`
  7. }
  8. func (v *SCVariables) AsPtr() *SCVariablesPtr {
  9. return &SCVariablesPtr{
  10. Rollup: &v.Rollup,
  11. Auction: &v.Auction,
  12. WDelayer: &v.WDelayer,
  13. }
  14. }
  15. // SCVariablesPtr joins all the smart contract variables as pointers in a single
  16. // struct
  17. type SCVariablesPtr struct {
  18. Rollup *RollupVariables `validate:"required"`
  19. Auction *AuctionVariables `validate:"required"`
  20. WDelayer *WDelayerVariables `validate:"required"`
  21. }
  22. // SCConsts joins all the smart contract constants in a single struct
  23. type SCConsts struct {
  24. Rollup RollupConstants
  25. Auction AuctionConstants
  26. WDelayer WDelayerConstants
  27. }