Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Adebayo2016 opened this issue Mar 19, 2024 · 0 comments

Comments

@Adebayo2016
Copy link

Adebayo2016 commented Mar 19, 2024

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;

}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant