chainutil

package
v1.5.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 30 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 EVMTrace added in v1.5.0

func EVMTrace(
	ch chain.ChainCore,
	aliasOutput *isc.AliasOutputWithID,
	blockTime time.Time,
	iscRequestsInBlock []isc.Request,
	txIndex *uint64,
	blockNumber *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