contracts

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	SaveContract(contract types.Contract) error
	GetContract(address string) (*types.Contract, error)
}

type Module

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

Module represents a generic smart contract module that can be extended for custom contracts handling

func NewModule

func NewModule(wasmClient wasmtypes.QueryClient, db Database) *Module

NewModule returns a new Module instance

func (*Module) HandleMsgInstantiateContract

func (m *Module) HandleMsgInstantiateContract(tx *juno.Tx, index int, contractType string) error

HandleMsgInstantiateContract handles a MsgInstantiateContract instance by refreshing the stored tips contracts

func (*Module) ParseContractAddress

func (m *Module) ParseContractAddress(tx *juno.Tx, index int) (string, error)

ParseContractAddress returns the contract address that is instantiated with the provided transaction

func (*Module) QuerySmartContractState

func (m *Module) QuerySmartContractState(height int64, address string, query interface{}) (wasmtypes.RawContractMessage, error)

QuerySmartContractState queries a generic smart contract state given its address and the query to perform

Jump to

Keyboard shortcuts

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