You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After following a bit around the lib I found that the place where it gets the error is on Promise+Batching.swift --> Batch class --> trigger func --> Line 82, when it calls sendAsync the JSONRPCRequest batch, more specifically the error message comes on Promise+HTTPProvider.swift --> post func --> Line 92, this is the request that is being sent:
(lldb) po request
▿ JSONRPCrequestBatch
▿ requests : 1 element
▿ 0 : JSONRPCrequest
- jsonrpc : "2.0"
▿ method : Optional<JSONRPCmethod>
- some : Web3swift.JSONRPCmethod.sendTransaction
▿ params : Optional<JSONRPCparams>
▿ some : JSONRPCparams
▿ params : 1 element
▿ 0 : TransactionParameters
▿ data : Optional<String>
- some : "0x7e54b8e20000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001054686973206973206120737472696e6700000000000000000000000000000000"
▿ from : Optional<String>
- some : "0xf92901dbdfec2a0599ee5108808c5ec85244eaf9"
▿ gas : Optional<String>
- some : "0x15b5f"
▿ gasPrice : Optional<String>
- some : "0x3b9aca00"
▿ to : Optional<String>
- some : "0x11e8e870d72b5fbc46f886f865aa98470d01e249"
▿ value : Optional<String>
- some : "0x0"
- id : 32
Edit: after inspecting a little more I found that the actual data we get back is:
(lldb) po JSONSerialization.jsonObject(with: data, options: [])
▿ 2 elements
▿ 0 : 2 elements
- key : jsonrpc
- value : 2.0
▿ 1 : 2 elements
- key : error
▿ value : 2 elements
▿ 0 : 2 elements
- key : message
- value : The method eth_sendTransaction does not exist/is not available
▿ 1 : 2 elements
- key : code
- value : -32601
and indeed eth_sendTransaction doesn't exist in infura API, we have eth_sendRawTransaction.
Edit2: Found the issue, it was that I forgot to provide the keystoreManager to the client so it could locally sign the transactions, errors were quite misleading.
The text was updated successfully, but these errors were encountered:
Hi, I'm currently trying to send a transaction to a contract and I'm getting the following error:
The way I'm sending the transaction is:
and this is the ABI of that method:
After following a bit around the lib I found that the place where it gets the error is on Promise+Batching.swift --> Batch class --> trigger func --> Line 82, when it calls
sendAsync
the JSONRPCRequest batch, more specifically the error message comes on Promise+HTTPProvider.swift --> post func --> Line 92, this is the request that is being sent:Edit: after inspecting a little more I found that the actual data we get back is:
and indeed eth_sendTransaction doesn't exist in infura API, we have eth_sendRawTransaction.
Edit2: Found the issue, it was that I forgot to provide the keystoreManager to the client so it could locally sign the transactions, errors were quite misleading.
The text was updated successfully, but these errors were encountered: