Skip to content

Remove Mento dependencies, repoint stable tokens to IERC20CeloTokens#777

Draft
martinvol wants to merge 1 commit into
masterfrom
martinvol/removeMentoDependencies
Draft

Remove Mento dependencies, repoint stable tokens to IERC20CeloTokens#777
martinvol wants to merge 1 commit into
masterfrom
martinvol/removeMentoDependencies

Conversation

@martinvol
Copy link
Copy Markdown
Contributor

@martinvol martinvol commented May 26, 2026

Summary

Removes ContractKit's dependency on the Mento web3 ABIs (Reserve, StableToken), which are no longer generated by the monorepo @celo/abis package, and repoints the Celo stable tokens onto the new consolidated IERC20CeloTokens ABI.

Changes

  • Remove Reserve support. Deletes the ReserveWrapper and every reference to it (contract-cache, kit, proxy, and the CeloContract.Reserve enum in base).
  • Repoint stable tokens to IERC20CeloTokens. The StableToken / StableTokenBRL / StableTokenEUR factories (web3-contract-cache, mini-contract-cache), the StableTokenWrapper contract type, and the proxy ABI (proxy.ts) now import from @celo/abis/web3/IERC20CeloTokens instead of the removed @celo/abis/web3/mento/* paths.

Dependency on celo-monorepo

This PR depends on celo-org/celo-monorepo#11745, which introduces the new IERC20CeloTokens interface and stops generating the Mento ABIs in @celo/abis. This PR cannot be merged until that lands and a new @celo/abis version containing IERC20CeloTokens is published and pinned here.

Kept as a draft until the monorepo change is merged and released.


PR-Codex overview

This PR focuses on the removal of the Reserve component from various parts of the codebase, alongside updates to dependency resolutions and imports related to StableToken.

Detailed summary

  • Removed references to Reserve in multiple files.
  • Changed the import of StableToken to IERC20CeloTokens.
  • Updated package.json with a new resolution for @celo/abis.
  • Commented out a line in authorize.ts.
  • Adjusted ABI map in proxy.ts to remove Reserve.
  • Updated contract cache and wrapper references to exclude Reserve.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Drop ContractKit's dependency on the Mento web3 ABIs (Reserve, StableToken)
which are no longer generated by the monorepo abis package.

- Remove the Reserve wrapper and all its references (contract-cache, kit,
  proxy, base CeloContract enum).
- Repoint the StableToken / StableTokenBRL / StableTokenEUR factories, the
  StableTokenWrapper contract type, and the proxy ABI to the new
  @celo/abis/web3/IERC20CeloTokens generated artifacts.
@gitguardian
Copy link
Copy Markdown

gitguardian Bot commented May 26, 2026

⚠️ GitGuardian has uncovered 3 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
33192604 Triggered Generic High Entropy Secret e35180a packages/sdk/contractkit/src/mini-contract-cache.ts View secret
33192604 Triggered Generic High Entropy Secret e35180a packages/sdk/contractkit/src/mini-contract-cache.ts View secret
33192604 Triggered Generic High Entropy Secret e35180a packages/sdk/contractkit/src/mini-contract-cache.ts View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 26, 2026

⚠️ No Changeset found

Latest commit: e35180a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment thread package.json
"typescript": "5.3.3"
},
"resolutions": {
"@celo/abis": "file:/Users/martinvol/celo/celo-monorepo/packages/protocol/abis/celo-abis-13.0.0-post-audit.0.tgz",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This will not work in the CI, this has to be reverted once the new version ABI's are published after celo-org/celo-monorepo#11745 gets merged

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