web3dart icon indicating copy to clipboard operation
web3dart copied to clipboard

JsonRpcError(code: 5000, message: Cannot read property 'gasLimit' of undefined)

Open Adebayo2016 opened this issue 11 months ago • 0 comments

i keep getting the error JsonRpcError(code: 5000, message: Cannot read property 'gasLimit' of undefined)

here is my code

` Transaction transaction = Transaction.callContract( maxGas: 100000, gasPrice: EtherAmount.inWei(BigInt.one), from: EthereumAddress.fromHex(account!), contract: contract, function: contract.function(name), parameters: args, ); EthereumTransaction ethereumTransaction = await EthereumTransaction( from: account!, to: contractAddress, value: "0x0", data: hex.encode(List.from(transaction.data!)),

);`


an here is my request 

`final signResponse = await wcClient.request(
  topic: _sessionData!.topic,
  chainId: "eip155:80001",
  request: SessionRequestParams(
      method: 'eth_sendTransaction',
      params: [ethereumTransaction.toJson()]),
);
return signResponse;

}`

Adebayo2016 avatar Mar 19 '24 12:03 Adebayo2016