chainutil

package
v1.0.1-rc.14 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallView

func CallView(
	chainState state.State,
	ch chain.ChainCore,
	contractHname,
	viewHname isc.Hname,
	params dict.Dict,
) (dict.Dict, error)

CallView executes a view call on the latest block of the chain

func EVMCall

func EVMCall(ch chain.ChainCore, aliasOutput *isc.AliasOutputWithID, call ethereum.CallMsg) ([]byte, error)

EVMCall executes an EVM contract call and returns its output, discarding any state changes

func EVMEstimateGas

func EVMEstimateGas(ch chain.ChainCore, aliasOutput *isc.AliasOutputWithID, call ethereum.CallMsg) (uint64, error)

EVMEstimateGas executes the given request and discards the resulting chain state. It is useful for estimating gas.

func EVMTraceTransaction

func EVMTraceTransaction(
	ch chain.ChainCore,
	aliasOutput *isc.AliasOutputWithID,
	blockTime time.Time,
	iscRequestsInBlock []isc.Request,
	txIndex uint64,
	tracer tracers.Tracer,
) error

func GetAccountBalance

func GetAccountBalance(ch chain.ChainCore, agentID isc.AgentID) (*isc.Assets, error)

func ResolveError

func ResolveError(ch chain.ChainCore, e *isc.UnresolvedVMError) (*isc.VMError, error)

func SimulateRequest

func SimulateRequest(
	ch chain.ChainCore,
	req isc.Request,
	estimateGas bool,
) (*blocklog.RequestReceipt, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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