LimeChain / matchstick

🔥 Unit testing framework for Subgraph development on The Graph protocol. ⚙️
MIT License
207 stars 17 forks source link

Ethereum Transaction / Block Issue, Expected X got X+1 #321

Closed shreyas3336 closed 2 years ago

shreyas3336 commented 2 years ago

ERROR TS2554: Expected 14 arguments, but got 15.

 return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress,
defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt,
defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt);
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

in ~lib/matchstick-as/assembly/defaults.ts(18,12)

ERROR TS2554: Expected 8 arguments, but got 9.

 return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress,
defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt);
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

in ~lib/matchstick-as/assembly/defaults.ts(24,12)

dimitrovmaksim commented 2 years ago

One more field to the Block and Transactions classed were added in graph-ts 0.24.0, the change was handled in matchstick-as v0.2.1. The best way to solve this issue is to update the deps to the latest versions, or you have to be sure to match the graph-ts and matchstick-as versions graph-ts <0.24.0 with matchstick-as <0.2.1 and graph-ts >= 0.24.0 with matchstick-as >= 0.2.1