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

Method Call

api/rpc/client.go:281–284  ·  view source on GitHub ↗

Call performs a JSON-RPC call with the given arguments and unmarshals into result if no error occurred. The result must be a pointer so that package json can unmarshal into it. You can also pass nil, in which case the result is ignored.

(result interface{}, method string, args ...interface{})

Source from the content-addressed store, hash-verified

279// The result must be a pointer so that package json can unmarshal into it. You
280// can also pass nil, in which case the result is ignored.
281func (c *Client) Call(result interface{}, method string, args ...interface{}) error {
282 ctx := context.Background()
283 return c.CallContext(ctx, result, method, args...)
284}
285
286// CallContext performs a JSON-RPC call with the given arguments. If the context is
287// canceled before the call has successfully returned, CallContext returns immediately.

Callers

nothing calls this directly

Calls 1

CallContextMethod · 0.95

Tested by

no test coverage detected