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

Fix gas meter and setNetwork #18

Merged
merged 17 commits into from
Aug 9, 2024
Merged

Fix gas meter and setNetwork #18

merged 17 commits into from
Aug 9, 2024

Conversation

Lohann
Copy link
Collaborator

@Lohann Lohann commented Aug 9, 2024

No description provided.

Comment on lines +65 to +69
function ternaryU128(bool condition, uint128 a, uint128 b) internal pure returns (uint128 r) {
assembly {
r := xor(b, mul(xor(a, b), condition))
}
}
Copy link
Collaborator Author

@Lohann Lohann Aug 9, 2024

Choose a reason for hiding this comment

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

Yeah.. even so solidity supports method overloading, it doesn't work with types of the same family, only between different types like bytes*, address, uint*, but fails if you attempt to overload uint256and uint128.

Comment on lines +80 to +82
// GAP necessary for migration purposes
mapping(GmpSender => mapping(uint16 => uint256)) private _deprecated_Deposits;
mapping(uint16 => bytes32) private _deprecated_Networks;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Upgrade was failling because I had to add it back.

@Lohann Lohann merged commit 690a689 into main Aug 9, 2024
1 check passed
@Lohann Lohann deleted the feature/refactor-gas-utils branch August 9, 2024 20:35
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.

1 participant