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

feat: Add custom upgradeable TokenPool contracts #3

Merged
merged 18 commits into from
Jun 11, 2024

Conversation

miguelmtzinf
Copy link

Based on community's discussions regarding the strategy for cross-chain GHO and the consensus to utilize Chainlink Cross-Chain Interoperability Protocol (CCIP) as the initial bridge, new facilitator contracts have been developed to enable the bridging of GHO from Ethereum to other networks.

These new contracts, UpgradeableBurnMintTokenPool and UpgradeableLockReleaseTokenPool, are a duplication of CCIP contracts BurnMintTokenPool and LockReleaseTokenPool respectively (CCIP v2.8.0 release), with the following modifications:

  • Soften Solidity compiler version of all base contracts of BurnMintTokenPool and LockReleaseTokenPool to ^0.8.0 so they are compatible with gho-core.
  • Removal of named parameters in mapping types (as it was introduced in v0.8.18).
  • Change of _transferOwnership function so it can be used to initialize the owner outside the contract's constructor.
  • Addition of upgradeability mechanism using the battle-tested transparent proxy pattern (VersionedInitializable and TransparentUpgradeableProxy).
  • Move of allowlist and router definition to initialization stage of the contracts.
  • Addition of a bridge limit on UpgradeableLockReleaseTokenPool to regulate the maximum amount of tokens that can be transferred out (burned/locked).

Copy link

height bot commented May 8, 2024

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

nisnislevi and others added 2 commits May 28, 2024 13:28
* remove space at the end of file name

* initial version of certora directory

* spec for CCIP

* clean and add yml

* fix yml

* fix yml

* clean and document spec file

* for PR
/// @notice Sets the Rebalancer address.
/// @dev Only callable by the owner.
function setRebalancer(address rebalancer) external onlyOwner {
s_rebalancer = rebalancer;
Copy link

Choose a reason for hiding this comment

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

Any reason to not have an event here? (same applicable for setRateLimitAdmin()

Copy link
Author

@miguelmtzinf miguelmtzinf Jun 5, 2024

Choose a reason for hiding this comment

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

just because the standard CCIP implementation does not have it and want to minimize changes as much as possible. In terms of GHO related code, it impacts the bridge limit admin. We could add an event there

* fix: Use modern version of Initializable

* fix: Update diffs

* fix: Add event emission on bridge limit admin update

* fix: Rebuild GHO diffs

* fix: Fix certora and test config files

* fix: Remove unneeded revision getter
Copy link

Go solidity wrappers are out-of-date, regenerate them via the make wrappers-all command

Copy link

LCOV of commit 7c777f9 during Solidity Foundry #8

Summary coverage rate:
  lines......: 94.7% (1120 of 1183 lines)
  functions..: 91.7% (264 of 288 functions)
  branches...: 87.5% (462 of 528 branches)

Files changed coverage rate: n/a

⛔ The code coverage is too low: 94.67. Expected at least 98.5.

* fix: Use modern version of Initializable

* fix: Update diffs

* fix: Add event emission on bridge limit admin update

* fix: Rebuild GHO diffs

* ci: Remove unneeded ci actions

* ci: Remove unneeded ci actions

* fix: Add dep

* fix: Fix certora config file

* test: Force seletors in invariant tests

* fix: Fix config files

* test: Fix test assume

* test: Fix test assume

* fix: Fix certora config file
@miguelmtzinf miguelmtzinf merged commit d6cb9da into ccip-gho Jun 11, 2024
2 checks passed
@miguelmtzinf miguelmtzinf deleted the feat/gho-token-pool branch June 11, 2024 08:50
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