-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: implement getTokenInfo
for Hardhat
#142
Conversation
77bd525
to
58e4459
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work.
SlotMap is great stuff, can' you update the PR description to summarize logic there but I'm also looking forward to in depth description of it elsewhere
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
ff8b0e4
to
e6a1503
Compare
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description:
This PR implements
getTokenInfo
for Hardhat. It extends thegetHtsStorageAt
to interpret Solidity structs and arrays together with support for more types. Also supports extracting keys and custom fees (except royalty fees which are only applicable to NFTs).It builds a "
SlotMap
" for a giventoken
. This is a mapping from slots to primitive values. It uses the Solidity storage layout definition to build the slot map.Additionally, this PR includes a script to create tokens with custom fees to aid testing f5eef27, a144b29, 55f688c. The
launch-token
submodule was removed in favor of this new script 7292022.Related issue(s):
Fixes #141.
Notes for reviewer:
When testing fractional fees, two issues appeared in the Foundry solution. One was it was unable to
abi.decode
. I had to includeall_collectors_are_exempt
insrc/IMirrorNodeResponses.sol
. The other issue was that field values were shifted. I guess there was a missing++
insrc/HtsSystemContractJson.sol
. See this changes in 40893c8.Checklist