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
970 B

3 years ago
3 years ago
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. // AsPtr returns the SCVariables as a SCVariablesPtr using pointers to the
  9. // original SCVariables
  10. func (v *SCVariables) AsPtr() *SCVariablesPtr {
  11. return &SCVariablesPtr{
  12. Rollup: &v.Rollup,
  13. Auction: &v.Auction,
  14. WDelayer: &v.WDelayer,
  15. }
  16. }
  17. // SCVariablesPtr joins all the smart contract variables as pointers in a single
  18. // struct
  19. type SCVariablesPtr struct {
  20. Rollup *RollupVariables `validate:"required"`
  21. Auction *AuctionVariables `validate:"required"`
  22. WDelayer *WDelayerVariables `validate:"required"`
  23. }
  24. // SCConsts joins all the smart contract constants in a single struct
  25. type SCConsts struct {
  26. Rollup RollupConstants
  27. Auction AuctionConstants
  28. WDelayer WDelayerConstants
  29. }