Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update usage of warp and starknet utilities #46

Open
Hyodar opened this issue Feb 27, 2023 · 0 comments
Open

Update usage of warp and starknet utilities #46

Hyodar opened this issue Feb 27, 2023 · 0 comments

Comments

@Hyodar
Copy link

Hyodar commented Feb 27, 2023

The current version of warp does not provide some utilities for hardhat-warp anymore in the same way. The ones I catched were:

  • callClassHashScript: Closest one currently seems to be runStarkNetClassHash, and the path here probably needs an artifacts/ first.
  • warpEventCanonicalSignatureHash: Closest one currently seems to be warpEventCanonicalSignaturehash256, but it's not equivalent as shown by the return type being changed - is now a { low: string; high: string } instead of a string.

Besides this, there was an encoding issue I encountered - on a contract deployment which got an address and a uint as parameters, the expected encoding by the starknet module was [address, [low, high]], not [address, low, high] as would result from this:

return types.flatMap((ty) => encode_(ty, inputs));

Calls worked as usual though.

Also, is the deployer supposed to be the first signer you get on ethers.getSigners()? It didn't seem to be the case when I tested it. Some tests rely on this and it may be good to keep this as a standard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant