mirror of
https://github.com/cerc-io/watcher-ts
synced 2026-09-09 09:14:06 +00:00
Implement eth_call for methods returning struct type (#59)
* Handle tuple return type in ethereum host API * Update graph-cli version to fix eth_call error * Handle all types in struct based on abi Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
This commit is contained in:
@@ -18,6 +18,30 @@
|
||||
"name": "Test",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint128",
|
||||
"name": "bidAmount1",
|
||||
"type": "uint128"
|
||||
},
|
||||
{
|
||||
"internalType": "uint128",
|
||||
"name": "bidAmount2",
|
||||
"type": "uint128"
|
||||
}
|
||||
],
|
||||
"name": "addMethod",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "pure",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "emitEvent",
|
||||
@@ -43,5 +67,41 @@
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint128",
|
||||
"name": "bidAmount1",
|
||||
"type": "uint128"
|
||||
},
|
||||
{
|
||||
"internalType": "uint128",
|
||||
"name": "bidAmount2",
|
||||
"type": "uint128"
|
||||
}
|
||||
],
|
||||
"name": "structMethod",
|
||||
"outputs": [
|
||||
{
|
||||
"components": [
|
||||
{
|
||||
"internalType": "uint128",
|
||||
"name": "bidAmount1",
|
||||
"type": "uint128"
|
||||
},
|
||||
{
|
||||
"internalType": "uint128",
|
||||
"name": "bidAmount2",
|
||||
"type": "uint128"
|
||||
}
|
||||
],
|
||||
"internalType": "struct Example.Bid",
|
||||
"name": "",
|
||||
"type": "tuple"
|
||||
}
|
||||
],
|
||||
"stateMutability": "pure",
|
||||
"type": "function"
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user