MCPcopy Create free account
hub / github.com/CPChain/chain / Call

Method Call

internal/cpcapi/api.go:779–782  ·  view source on GitHub ↗

Call executes the given transaction on the state for the given block number. It doesn't make and changes in the state/blockchain and is useful to execute and retrieve values.

(ctx context.Context, args CallArgs, blockNr rpc.BlockNumber)

Source from the content-addressed store, hash-verified

777// Call executes the given transaction on the state for the given block number.
778// It doesn't make and changes in the state/blockchain and is useful to execute and retrieve values.
779func (s *PublicBlockChainAPI) Call(ctx context.Context, args CallArgs, blockNr rpc.BlockNumber) (hexutil.Bytes, error) {
780 result, _, _, err := s.doCall(ctx, args, blockNr, vm.Config{}, 5*time.Second)
781 return (hexutil.Bytes)(result), err
782}
783
784// EstimateGas returns an estimate of the amount of gas needed to execute the
785// given transaction against the current pending block.

Callers

nothing calls this directly

Calls 1

doCallMethod · 0.95

Tested by

no test coverage detected