Comments (1)
Hello,
We've seen this error before, it has to do with the contract ABI. Contracts are invoked with a list of felts as arguments, then Cairo's serde (not Rust's, even though they're named the same) decodes it into the correct argument types.
There are some times where the arguments cannot be decoded, for example: there's not enough felts, there's too many felts, the felts have invalid data (for example, an enum tag is out of range)...
My recommendation is that you try to extract the arguments and the expected types from the execution, then try making sense of it from there. The arguments should be as easy as adding dbg!()
to the arguments in invoke_contract_dynamic
. The expected types is a bit more complicated; if I remember correctly, it's just a sequence of the function arguments. You should be able to find the exact serde implementation for each type in the corelib
.
from cairo_native.
Related Issues (20)
- Port Cairo1 tests from cairo-vm
- Issue with Dockerfile HOT 3
- Implement cheatcodes support HOT 1
- Implement CoreTypeConcrete::Bytes31 return type HOT 3
- Better support for scarb HOT 1
- Implement CoreTypeConcrete::SquashedFelt252Dict return type HOT 1
- Implement CoreTypeConcrete::RangeCheck return type HOT 5
- Bug: cast from i8 to u8 always fails
- Error when compiling Bravos Class Hash. HOT 12
- Error when compiling Kakarot core contract HOT 3
- Implement jitvalue_to_felt for JitValue::Felt252Dict
- Improve error handling HOT 6
- Fix nullable_box_vec.cairo error HOT 3
- Check issue with short_string.cairo program HOT 2
- Coupon libfunc tests HOT 2
- Consolidate syscall handler trait implementations
- Failing contract test: alloc_constant_size
- Cairo Native Stress Binary HOT 2
- Invalid transaction nonce: StarkGate: STRK Token HOT 1
- Invalid linker library in README.md for compiling MLIR -> native HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cairo_native.