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

Challenge 6 extension #249

Merged
merged 2 commits into from
Dec 19, 2024
Merged

Conversation

rin-st
Copy link
Member

@rin-st rin-st commented Dec 13, 2024

To test

yarn cli -e scaffold-eth/se-2-challenges:ch6-extension-init

Fixes #248

}

function recover(bytes32 _hash, bytes memory _signature) public pure returns (address) {
return ECDSA.recover(MessageHashUtils.toEthSignedMessageHash(_hash), _signature);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is changed because of openZeppelin v5. See previous version here

contractName: "MetaMultiSigWallet",
});

const historyHashes = useMemo(() => eventsHistory?.map(ev => ev.args.hash) || [], [eventsHistory]);
Copy link
Member Author

@rin-st rin-st Dec 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also changed this fromev.log.args.hash to ev.args.hash since event history hook was rewritten

Copy link
Collaborator

@Pabl0cks Pabl0cks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GJ Rinat! It's looking good to me 🙏

Only issue I found is events look duplicated, but haven't found a pattern. My first events looked duplicated, but then (after 2-3 extra transactions signed by the mulsitig) the first events look fine and the last events look duplicated.

First screenshotimage

Second screenshot after some more eventsimage

Can try to check later if it was happening also in the old ch6 or if it comes from the changes in our hook.

@rin-st
Copy link
Member Author

rin-st commented Dec 14, 2024

Good catch Pablo, thanks!

Can try to check later if it was happening also in the old ch6 or if it comes from the changes in our hook.

It works in the old ch6 as expected, no need to check. Looks like we need to update useScaffoldEventHistory hook since it doesn't work as expected for latest versions of react-query/wagmi. Working on it

@rin-st
Copy link
Member Author

rin-st commented Dec 16, 2024

Looks like we need to update useScaffoldEventHistory hook since it doesn't work as expected for latest versions of react-query/wagmi. Working on it

I fixed it inside SE-2. Let's wait a bit until the fix is backmerged to create-eth, recheck if everything works as expected for this extension, and then merge this

README.md Outdated Show resolved Hide resolved
Copy link
Member

@damianmarti damianmarti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rin-st for the migration!!

Everything is working as expected.

Added some small comments!

@rin-st
Copy link
Member Author

rin-st commented Dec 16, 2024

Thanks @damianmarti ! Updated PR

Also, waiting for scaffold-eth/create-eth#172 to fix events on multisig page

Copy link
Member

@damianmarti damianmarti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rin-st Thanks for the fixes!

@Pabl0cks
Copy link
Collaborator

Tested with latest create-eth version and events look great. I think we can merge right @rin-st ?

In the future we might need to update all the challenges to start using the new hook parameter spec.

@rin-st
Copy link
Member Author

rin-st commented Dec 19, 2024

Tested with latest create-eth version and events look great. I think we can merge right @rin-st ?

Yes, thank you! Merging this!

@rin-st rin-st merged commit 720799e into challenge-6-multisig--extension Dec 19, 2024
@rin-st rin-st deleted the ch6-extension-init branch December 19, 2024 10:59
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

Successfully merging this pull request may close these issues.

3 participants