CowRpc
Defined in: protocol-swap2-cow/src/rpc.ts:8
Methods
Section titled “Methods”call()
Section titled “call()”call(
chainId,to,data):Promise<string>
Defined in: protocol-swap2-cow/src/rpc.ts:14
eth_call at the latest block; the returned bytes (hex).
Parameters
Section titled “Parameters”chainId
Section titled “chainId”number
string
string
Returns
Section titled “Returns”Promise<string>
has(
chainId):boolean
Defined in: protocol-swap2-cow/src/rpc.ts:10
True when at least one endpoint is configured for the chain.
Parameters
Section titled “Parameters”chainId
Section titled “chainId”number
Returns
Section titled “Returns”boolean
request()
Section titled “request()”request(
chainId,method,params):Promise<unknown>
Defined in: protocol-swap2-cow/src/rpc.ts:12
One JSON-RPC call; an error the node answered carries rpc: true (and data), “no endpoint answered” does not.
Parameters
Section titled “Parameters”chainId
Section titled “chainId”number
method
Section titled “method”string
params
Section titled “params”unknown[]
Returns
Section titled “Returns”Promise<unknown>