graph-tooling
graph-tooling copied to clipboard
Codegen for fixed size array solidity parameters incorrect
Hey all! So I am trying to make a contract call to a solidity method in the Wyvern OpenSea exchange contract. I've linked a gist explaining where I think the codegen is incorrect, but the TLDR is:
- For inputs with fixed sized arrays,
graph-tsseems to use the wrongethereum.Valueconverters when passing in the variables toethereum.call. - The inputs use the
fromArrayconverter, when I think they should be using thefromFixedSizeArrayconverter - Additionally, there is a small bug I think where
uint8arrays get converted toi32values, where they should be getting converted toUnsignedBigInt
Here is the gist, with the solidity method, resulting codegen, and comments describing where I think should be different: https://gist.github.com/adamgobes/6ef7ae141797dc3b789eafab728291c7
FWIW, I manually changed my codegen to what I describe in the comments, and it seems to work (no failures on deploy to studio). However, with the default codegen, i get type mismatches between dynamic arrays and fixed size arrays.