import Configuration from "../../Configuration" ; import IProvider from "./IProvider" ; interface CallRpcRequest { from ? : string ; to : string ; gas ? : string ; gasPrice ? : string ; value ? : string ; data ? : string ; } interface RpcResponse { id : number ; jsonrpc : string ; result : any ; } async function createRpcRequest ( url , method , params ) { const response = await fetch ( url , { method : 'POST' , body : JSON . stringify ( { jsonrpc : '2.0' , id : 1 , method , params , } ) , } ) ; const data = await response . json ( ) ; return data ; } export param { string } rpcUrl param { CallRpcRequest } params returns export function executeRutileRpcCall ( rpcUrl , params ) { const data = [ params , 'latest' , ] ; return createRpcRequest ( rpcUrl , 'eth_call' , data ) ; } export function getTransactionReceipt ( ) { }