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
Raw Call Arguments:
to: 0x0ba5ed0c6aa8c49038f819e587e2633c4a9f428a
data: 0x250b1b4100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000AB5ACC57FB1B38D74A5EcB6a33da8CFDc2ce207d
Docs: https://viem.sh/docs/contract/readContract
Details: Unexpected token p in JSON at position 4
Version: 2.21.5
at getContractError (/var/task/src/functions/rewards.js:81057:10)
at readContract (/var/task/src/functions/rewards.js:82305:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.getAddress (/var/task/src/functions/rewards.js:86727:14)
... 3 lines matching cause stack trace ...
at async Runtime.sendRewardPointsAction [as handler] (/var/task/src/functions/rewards.js:89574:17) {
cause: CallExecutionError: HTTP request failed.
Not sure if the issue is due to missing the id field in the jsonrpc call,
If I try locally
curl -s https://api.developer.coinbase.com/rpc/v1/base-sepolia/
-H "Content-Type: application/json"
-d '{"method":"eth_call","params":[{"data":"0x250b1b4100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000AB5ACC57FB1B38D74A5EcB6a33da8CFDc2ce207d","to":"0x0ba5ed0c6aa8c49038f819e587e2633c4a9f428a"},"latest"]}'
I get this response, with id as null which is probably why parsing is failing
{"id":null,"jsonrpc":"2.0","result":"0x0000000000000000000000008ebfb11cbc1c0e3a14b998698ffef075732923c0"}%
but if I include the jsonrps version and id then I get the following response
This issue has been locked since it has been closed for more than 14 days.
If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Viem version. If you have any questions or comments you can create a new discussion thread.
Check existing issues
Viem Version
2.21.5
Current Behavior
When calling getAddress in coinbase AA Factory contract getting this error
URL: https://api.developer.coinbase.com/rpc/v1/base-sepolia/
Request body:
{
"method": "eth_call",
"params": [
{
"data": "0x250b1b4100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000AB5ACC57FB1B38D74A5EcB6a33da8CFDc2ce207d",
"to": "0x0ba5ed0c6aa8c49038f819e587e2633c4a9f428a"
},
"latest"
]
}
Raw Call Arguments:
to: 0x0ba5ed0c6aa8c49038f819e587e2633c4a9f428a
data: 0x250b1b4100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000AB5ACC57FB1B38D74A5EcB6a33da8CFDc2ce207d
Contract Call:
address: 0x0ba5ed0c6aa8c49038f819e587e2633c4a9f428a
function: getAddress(bytes[] owners, uint256 nonce)
args: (["0x000000000000000000000000AB5ACC57FB1B38D74A5EcB6a33da8CFDc2ce207d"], 0)
Docs: https://viem.sh/docs/contract/readContract
Details: Unexpected token p in JSON at position 4
Version: 2.21.5
at getContractError (/var/task/src/functions/rewards.js:81057:10)
at readContract (/var/task/src/functions/rewards.js:82305:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.getAddress (/var/task/src/functions/rewards.js:86727:14)
... 3 lines matching cause stack trace ...
at async Runtime.sendRewardPointsAction [as handler] (/var/task/src/functions/rewards.js:89574:17) {
cause: CallExecutionError: HTTP request failed.
Not sure if the issue is due to missing the id field in the jsonrpc call,
If I try locally
curl -s https://api.developer.coinbase.com/rpc/v1/base-sepolia/
-H "Content-Type: application/json"
-d '{"method":"eth_call","params":[{"data":"0x250b1b4100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000AB5ACC57FB1B38D74A5EcB6a33da8CFDc2ce207d","to":"0x0ba5ed0c6aa8c49038f819e587e2633c4a9f428a"},"latest"]}'
I get this response, with id as null which is probably why parsing is failing
{"id":null,"jsonrpc":"2.0","result":"0x0000000000000000000000008ebfb11cbc1c0e3a14b998698ffef075732923c0"}%
but if I include the jsonrps version and id then I get the following response
curl -s https://api.developer.coinbase.com/rpc/v1/base-sepolia/
-H "Content-Type: application/json"
-d '{"jsonrpc": "2.0", "id": 1, "method":"eth_call","params":[{"data":"0x250b1b4100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000754e49da4978bd9FF2e9Bfddd9399898FbB3dEc3","to":"0x0ba5ed0c6aa8c49038f819e587e2633c4a9f428a"},"latest"]}
{"id":1,"jsonrpc":"2.0","result":"0x0000000000000000000000001fcef92e1fe743d6e99cb38d757482d74ccb196d"}
Expected Behavior
The call should include the jsonrps version and id
check https://www.jsonrpc.org/specification#id2
Steps To Reproduce
No response
Link to Minimal Reproducible Example
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: