handler

package
v0.14.10 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContractHandler

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

ContractHandler handles all interaction with smart contracts such as get/set/update it also captures all changes as deltas and only commit them when called so smart contract updates can be delayed until end of the tx execution

func NewContractHandler

func NewContractHandler(accounts *state.Accounts, restrictedDeploymentEnabled bool, authorizedAccounts []runtime.Address) *ContractHandler

func (*ContractHandler) Commit

func (h *ContractHandler) Commit() ([]ContractUpdateKey, error)

func (*ContractHandler) GetContract

func (h *ContractHandler) GetContract(address runtime.Address, name string) (code []byte, err error)

func (*ContractHandler) GetContractNames

func (h *ContractHandler) GetContractNames(address runtime.Address) (names []string, err error)

func (*ContractHandler) HasUpdates

func (h *ContractHandler) HasUpdates() bool

func (*ContractHandler) RemoveContract

func (h *ContractHandler) RemoveContract(address runtime.Address, name string, signingAccounts []runtime.Address) (err error)

func (*ContractHandler) Rollback

func (h *ContractHandler) Rollback() error

func (*ContractHandler) SetContract

func (h *ContractHandler) SetContract(address runtime.Address, name string, code []byte, signingAccounts []runtime.Address) (err error)

func (*ContractHandler) UpdateKeys

func (h *ContractHandler) UpdateKeys() []ContractUpdateKey

type ContractUpdate

type ContractUpdate struct {
	ContractUpdateKey
	Code []byte
}

type ContractUpdateKey

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

Jump to

Keyboard shortcuts

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