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

better metadata reading to tokens from being stuck in the bridge #249

Merged
merged 4 commits into from
Mar 6, 2024

Conversation

josojo
Copy link
Collaborator

@josojo josojo commented Mar 2, 2024

closes #222

/// encoding the function signature of N
abi.encodeWithSignature("name()")
);
if (!successNameCall) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason for our fallbacks to be named subtly differently from the way upstream does it?

https://github.com/0xPolygonHermez/zkevm-contracts/blob/d70266b8742672d59d4060019538d03fe0aac181/contracts/PolygonZkEVMBridge.sol#L800

Copy link
Contributor

@edmundedgar edmundedgar left a comment

Choose a reason for hiding this comment

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

Code looks fine, except the comment that polygon upstream seems to be subtly different, it would be good to align it if there isn't a reason not to.

Also I would suggest either adding tests or making an issue or a TODO comment (either in the original code or in the place where the tests should go) that we should add tests.

@josojo
Copy link
Collaborator Author

josojo commented Mar 5, 2024

I reused the functions from the bridge contract. It's kinda ucly code duplications, but I can not think of a better method, since I dont' wanna modify the zkevm-contracts repo and refactor the changes there, to keep the diff minimal to the polygon zkevm

Copy link
Contributor

@edmundedgar edmundedgar left a comment

Choose a reason for hiding this comment

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

Awesome, looks great.

I wouldn't worry about the fact that this copy-pastes some code, I think it's better to copy-paste than do something ugly to make a dependency work.

@josojo josojo merged commit b696b5a into main Mar 6, 2024
3 checks passed
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.

Suppport more tokens
2 participants