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

Feature/spear bits audit3 #87

Merged
merged 13 commits into from
Jan 26, 2023
Merged

Feature/spear bits audit3 #87

merged 13 commits into from
Jan 26, 2023

Conversation

@invocamanman invocamanman marked this pull request as ready for review January 24, 2023 20:16
@invocamanman invocamanman marked this pull request as draft January 24, 2023 20:16
@krlosMata krlosMata changed the base branch from main to develop January 25, 2023 10:20
contracts/PolygonZkEVM.sol Outdated Show resolved Hide resolved
@@ -153,6 +155,9 @@ contract PolygonZkEVMBridge is
// Ether is treated as ether from mainnet
originNetwork = MAINNET_NETWORK_ID;
} else {
// Check msg.value is 0 if tokens are bridged
require(msg.value == 0, "PolygonZkEVMBridge::bridgeAsset: Expected zero native asset value when bridging ERC20 tokens");
Copy link
Contributor

Choose a reason for hiding this comment

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

What if there is an ERC20 token that requires some msg.value in order to perform its safeTransferFrom custom implementation?

Copy link
Collaborator Author

@invocamanman invocamanman Jan 25, 2023

Choose a reason for hiding this comment

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

This is not contemplated, and if it was the case we should send the msg.value along with the transferFrom function, which i think usually is not payable

Copy link
Contributor

Choose a reason for hiding this comment

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

This avoids bad usage of the Bridge but I think it is not required xD

@invocamanman invocamanman marked this pull request as ready for review January 25, 2023 14:56
@invocamanman invocamanman changed the base branch from develop to main January 25, 2023 16:08
@invocamanman invocamanman changed the base branch from main to develop January 25, 2023 16:08
@krlosMata krlosMata self-requested a review January 25, 2023 16:14
Copy link
Contributor

@krlosMata krlosMata left a comment

Choose a reason for hiding this comment

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

😸

Copy link
Contributor

@ignasirv ignasirv left a comment

Choose a reason for hiding this comment

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

💯

@invocamanman invocamanman merged commit 2e987cd into develop Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants