contracts

package
v0.0.0-...-77861b7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_CONTRACT_GROUP = "default"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContractAddress

type ContractAddress struct {
	ChainId uint64 `mapstructure:"chain_id"`
	Address string
}

func (*ContractAddress) Equal

func (c *ContractAddress) Equal(o *ContractAddress) bool

func (*ContractAddress) GetAddress

func (c *ContractAddress) GetAddress() eth.Addr

func (*ContractAddress) String

func (a *ContractAddress) String() string

type ContractAddresses

type ContractAddresses []*ContractAddress

func (ContractAddresses) Has

func (a ContractAddresses) Has(sender *ContractAddress) bool

type ReceiverContract

type ReceiverContract struct {
	ChainId uint64 `mapstructure:"chain_id"`
	Address string `mapstructure:"address"`
	// the payable value to add when calling executeMessage or executeMessageWithTransfer
	PayableValue string `mapstructure:"add_payable_value_for_execution"`
	// sender verification
	AllowSenderGroups []string `mapstructure:"allow_sender_groups"`
}

func (*ReceiverContract) ContractAddress

func (c *ReceiverContract) ContractAddress() *ContractAddress

func (*ReceiverContract) ContractInfo

func (c *ReceiverContract) ContractInfo() *comtypes.ContractInfo

func (*ReceiverContract) GetAddress

func (c *ReceiverContract) GetAddress() eth.Addr

type ReceiverContracts

type ReceiverContracts []*ReceiverContract

func (ReceiverContracts) AddressHashes

func (c ReceiverContracts) AddressHashes(chid uint64) []eth.Hash

func (ReceiverContracts) Addresses

func (c ReceiverContracts) Addresses(chid uint64) []eth.Addr

func (ReceiverContracts) ContractInfoList

func (c ReceiverContracts) ContractInfoList() []*comtypes.ContractInfo

func (ReceiverContracts) Get

func (c ReceiverContracts) Get(chid uint64, addr string) (ReceiverContract, bool)

func (ReceiverContracts) GetByChain

func (c ReceiverContracts) GetByChain(chid uint64) ReceiverContracts

func (ReceiverContracts) String

func (c ReceiverContracts) String() string

func (ReceiverContracts) Validate

func (c ReceiverContracts) Validate() error

type SenderGroup

type SenderGroup struct {
	Name  string
	Allow ContractAddresses
}

func (SenderGroup) String

func (s SenderGroup) String() string

type SenderGroups

type SenderGroups []*SenderGroup

func (SenderGroups) AllowedSenders

func (s SenderGroups) AllowedSenders(senderGroupName string) ContractAddresses

func (SenderGroups) String

func (s SenderGroups) String() string

func (SenderGroups) Validate

func (s SenderGroups) Validate() error

Validate senderGroups does not contain duplicated name.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL