nearprotocol / near-bindgen-as

Deprecated -->
https://github.com/near/near-sdk-as
0 stars 0 forks source link

Confusing error message #10

Open dmitrykurochka opened 4 years ago

dmitrykurochka commented 4 years ago

In respond to call callPromise method with args (provided binary below):

serializedArgs.zip

Recieve"Transaction 6H9ibV7NXjwE67GSbGP5F1XmXknwRGStHgJ9dCdk9z2E failed. WebAssembly trap: memory out-of-bounds access", message: "ActionError::FunctionCallError" It's not clear what the issue is. Would appreciate more details about what's wrong

contract: main.wasm from near-hello 0.3.1 envirornment : CI

vgrichina commented 4 years ago

{"callbackBalance":0,"callbackGas":0,"gas":300000,"receiver":"cnt1576009886871437","methodName":"callbackWithName","balance":0}

this fails because {"args": ... } is expected on top-level https://github.com/nearprotocol/near-hello/blob/master/assembly/main.ts#L194

we'll need to improve error handling in args parser though