simple

package
v0.0.0-...-a67bbdc Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contract

type Contract interface {
	Deploy(auth *bind.TransactOpts, backend bind.ContractBackend, params []string) (common.Address, error)
	SetContractAddr(contractAddr common.Address)
	GenTxBuilder(conn *ethclient.Client, method string, params []string) (tester.CreateTx, error)
	MethodMap(conn *ethclient.Client) (map[string]Method, error)
}

Contract is an interface that defines the GenTxBuilder method.

type ETicketSampler

type ETicketSampler struct {
	// contains filtered or unexported fields
}

ETicketSampler is a struct that implements the Sampler interface.

func (*ETicketSampler) Deploy

func (tgs *ETicketSampler) Deploy(auth *bind.TransactOpts, backend bind.ContractBackend, params []string) (common.Address, error)

Deploy deploys the ETicketSampler contract.

It takes an authenticated transaction options and a contract backend as parameters. It returns the address of the deployed contract and an error if the deployment fails.

func (*ETicketSampler) GenTxBuilder

func (tgs *ETicketSampler) GenTxBuilder(conn *ethclient.Client, method string, params []string) (tester.CreateTx, error)

GenTxBuilder generates a CreateOrSendTx function for the ETicketSampler struct.

It takes a *cobra.Command, *ethclient.Client, and common.Address as parameters. It returns a CreateOrSendTx function and an error.

func (*ETicketSampler) MethodMap

func (tgs *ETicketSampler) MethodMap(conn *ethclient.Client) (map[string]Method, error)

MethodMap returns a map of methods for the ETicketSampler type.

No parameters. Returns a map of string keys to Method values.

func (*ETicketSampler) SetContractAddr

func (tgs *ETicketSampler) SetContractAddr(contractAddr common.Address)

SetContractAddr sets the contract address for the ETicketSampler.

contractAddr: the address of the contract to be set.

type ETicketSamplerMintMethod

type ETicketSamplerMintMethod struct {
	// contains filtered or unexported fields
}

ETicketSamplerMintMethod is a struct that implements the Method interface.

func (*ETicketSamplerMintMethod) Display

func (t *ETicketSamplerMintMethod) Display() string

Display returns a string representation of the ETicketSamplerMintMethod.

It does not take any parameters. It returns a string.

func (*ETicketSamplerMintMethod) FormatParams

func (t *ETicketSamplerMintMethod) FormatParams(params []string) ([]interface{}, error)

FormatParams formats the params for the ETicketSamplerMintMethod Go function.

It takes in a slice of strings called params and returns a slice of interfaces and an error.

func (*ETicketSamplerMintMethod) GenTx

func (t *ETicketSamplerMintMethod) GenTx(opts *bind.TransactOpts, params ...interface{}) (*types.Transaction, error)

GenTx generates a transaction for the ETicketSamplerMintMethod Go function.

It takes in the following parameter(s): - opts: a *bind.TransactOpts object representing the transaction options. - params: a variadic parameter that can take in any number of arguments.

It returns a *types.Transaction object and an error.

type ETicketSamplerTranferMethod

type ETicketSamplerTranferMethod struct {
	// contains filtered or unexported fields
}

ETicketSamplerTranferMethod is a struct that implements the Method interface.

func (ETicketSamplerTranferMethod) Display

func (t ETicketSamplerTranferMethod) Display() string

Display returns a string representing the ETicketSamplerTranferMethod.

No parameters. Returns a string.

func (ETicketSamplerTranferMethod) FormatParams

func (t ETicketSamplerTranferMethod) FormatParams(params []string) ([]interface{}, error)

FormatParams formats the params for the ETicketSamplerTranferMethod Go function.

It takes in a slice of strings called params and returns a slice of interfaces and an error.

func (ETicketSamplerTranferMethod) GenTx

func (t ETicketSamplerTranferMethod) GenTx(opts *bind.TransactOpts, params ...interface{}) (*types.Transaction, error)

GenTx generates a transaction for the ETicketSamplerTranferMethod Go function.

It takes in the following parameter(s): - opts: a *bind.TransactOpts object representing the transaction options. - params: a variadic parameter that can take in any number of arguments.

It returns a *types.Transaction object and an error.

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager is a struct that manages a map of samplers.

func NewManager

func NewManager() *Manager

NewManager creates a new Manager.

It returns a pointer to a Manager struct.

func (*Manager) GetContract

func (m *Manager) GetContract(name string) Contract

GetContract returns the Contract with the given name.

It takes a string parameter called name which is the name of the Contract to retrieve. It returns a Contract.

func (*Manager) ListContracts

func (m *Manager) ListContracts() (names []string)

ListContracts lists all the samplers in the Manager.

It returns a slice of strings, containing the names of the samplers.

type Method

type Method interface {
	FormatParams(params []string) ([]interface{}, error)
	GenTx(opts *bind.TransactOpts, params ...interface{}) (*types.Transaction, error)
	Display() string
}

Method is an interface that defines the Call method.

type POAPSampler

type POAPSampler struct {
	// contains filtered or unexported fields
}

POAPSampler is a struct that implements the Sampler interface.

func (*POAPSampler) Deploy

func (poap *POAPSampler) Deploy(auth *bind.TransactOpts, backend bind.ContractBackend, params []string) (common.Address, error)

Deploy implements Contract.

func (*POAPSampler) GenTxBuilder

func (poap *POAPSampler) GenTxBuilder(conn *ethclient.Client, method string, params []string) (tester.CreateTx, error)

GenTxBuilder implements Contract.

func (*POAPSampler) MethodMap

func (poap *POAPSampler) MethodMap(conn *ethclient.Client) (map[string]Method, error)

MethodMap implements Contract.

func (*POAPSampler) SetContractAddr

func (poap *POAPSampler) SetContractAddr(contractAddr common.Address)

SetContractAddr implements Contract.

type POAPSamplerBatchMintMethod

type POAPSamplerBatchMintMethod struct {
	// contains filtered or unexported fields
}

POAPSamplerBatchMintMethod is a struct that implements the Method interface.

func (*POAPSamplerBatchMintMethod) Display

func (t *POAPSamplerBatchMintMethod) Display() string

Display implements Method.

func (*POAPSamplerBatchMintMethod) FormatParams

func (t *POAPSamplerBatchMintMethod) FormatParams(params []string) ([]interface{}, error)

FormatParams formats the params for the POAPSamplerBatchMintMethod Go function.

func (*POAPSamplerBatchMintMethod) GenTx

func (t *POAPSamplerBatchMintMethod) GenTx(opts *bind.TransactOpts, params ...interface{}) (*types.Transaction, error)

GenTx generates a transaction for the POAPSamplerBatchMintMethod Go function.

type TicketGameSampler

type TicketGameSampler struct {
	// contains filtered or unexported fields
}

TicketGameSampler is a struct that implements the Sampler interface.

func (*TicketGameSampler) Deploy

func (tgs *TicketGameSampler) Deploy(auth *bind.TransactOpts, backend bind.ContractBackend, params []string) (common.Address, error)

Deploy deploys the TicketGame contract.

It takes an authenticated transaction options and a contract backend as parameters. It returns the address of the deployed contract and an error if the deployment fails.

func (*TicketGameSampler) GenTxBuilder

func (tgs *TicketGameSampler) GenTxBuilder(conn *ethclient.Client, method string, params []string) (tester.CreateTx, error)

GenTxBuilder generates a CreateOrSendTx function for the TicketGameSampler struct.

It takes a *cobra.Command, *ethclient.Client, and common.Address as parameters. It returns a CreateOrSendTx function and an error.

func (*TicketGameSampler) MethodMap

func (tgs *TicketGameSampler) MethodMap(conn *ethclient.Client) (map[string]Method, error)

MethodMap returns a map of methods for the TicketGameSampler type.

No parameters. Returns a map of string keys to Method values.

func (*TicketGameSampler) SetContractAddr

func (tgs *TicketGameSampler) SetContractAddr(contractAddr common.Address)

SetContractAddr sets the contract address for the TicketGameSampler.

contractAddr: the address of the contract to be set.

type TicketGameSamplerBatchRedeemMethod

type TicketGameSamplerBatchRedeemMethod struct {
	// contains filtered or unexported fields
}

TicketGameSamplerBatchRedeemMethod is a struct that implements the Method interface.

func (TicketGameSamplerBatchRedeemMethod) Display

Display returns the string representation of the TicketGameSamplerBatchRedeemMethod.

It does not take any parameters. It returns a string.

func (TicketGameSamplerBatchRedeemMethod) FormatParams

func (t TicketGameSamplerBatchRedeemMethod) FormatParams(params []string) ([]interface{}, error)

FormatParams formats the params for the TicketGameSamplerBatchRedeemMethod Go function.

It takes in a slice of strings called params and returns a slice of interfaces and an error.

func (TicketGameSamplerBatchRedeemMethod) GenTx

func (t TicketGameSamplerBatchRedeemMethod) GenTx(opts *bind.TransactOpts, params ...interface{}) (*types.Transaction, error)

GenTx generates a transaction to redeem tickets in batches for the TicketGameSamplerBatchRedeemMethod contract.

It takes the following parameters: - opts: The transaction options. - params: A variadic parameter list that represents the player addresses and token URIs.

It returns a transaction object and an error.

type TicketGameSamplerRedeemMethod

type TicketGameSamplerRedeemMethod struct {
	// contains filtered or unexported fields
}

TicketGameSamplerRedeemMethod is a struct that implements the Method interface.

func (TicketGameSamplerRedeemMethod) Display

Display returns the string representation of the TicketGameSamplerRedeemMethod.

No parameters. Returns a string.

func (TicketGameSamplerRedeemMethod) FormatParams

func (t TicketGameSamplerRedeemMethod) FormatParams(params []string) ([]interface{}, error)

FormatParams formats the params for the TicketGameSamplerRedeemMethod Go function.

It takes in a slice of strings called params and returns a slice of interfaces and an error.

func (TicketGameSamplerRedeemMethod) GenTx

func (t TicketGameSamplerRedeemMethod) GenTx(opts *bind.TransactOpts, params ...interface{}) (*types.Transaction, error)

GenTx generates a transaction for redeeming a ticket in the TicketGame contract.

It takes in the following parameters:

  • opts: The transaction options (bind.TransactOpts).
  • params: The parameters required for redeeming the ticket.

It returns a transaction object (*types.Transaction) and an error object (error).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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