-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Description
Hi,
I'm getting some errors while trying to run the example code on my environment.
This code here:
graph-node/tests/integration-tests/host-exports/src/mapping.ts
Lines 73 to 88 in 6a7806c
let address = ethereum.Value.fromAddress(Address.fromString("0x0000000000000000000000000000000000000420")); | |
let bigInt1 = ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)); | |
let bigInt2 = ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(63)); | |
let bool = ethereum.Value.fromBoolean(true); | |
let fixedSizedArray = ethereum.Value.fromFixedSizedArray([ | |
bigInt1, | |
bigInt2 | |
]); | |
let tupleArray: Array<ethereum.Value> = [ | |
fixedSizedArray, | |
bool | |
]; | |
let tuple = ethereum.Value.fromTuple(tupleArray as ethereum.Tuple); |
Gives:
Describe entity assertions:
thread 'main' panicked at '🆘 Unexpected error upon calling hook: Mapping aborted at tests/boost.test.ts, line 40, column 42, with message: unexpected upcast
wasm backtrace:
0: 0x1c63 - <unknown>!start:tests/boost.test~anonymous|0~anonymous|0
The problem comes from the as ethereum.Tuple
casting. I've tried other examples, they all give the same result.
My setup:
mac m1
running with graph test -d
versions:
"dependencies": {
"@graphprotocol/graph-cli": "0.64.0",
"@graphprotocol/graph-ts": "0.32.0"
},
"devDependencies": {
"matchstick-as": "^0.6.0"
}