Remove Mento dependencies, repoint stable tokens to IERC20CeloTokens#777
Remove Mento dependencies, repoint stable tokens to IERC20CeloTokens#777martinvol wants to merge 2 commits into
Conversation
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 id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 33192604 | Triggered | Generic High Entropy Secret | e35180a | packages/sdk/contractkit/src/mini-contract-cache.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- 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
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 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.
|
| "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", |
There was a problem hiding this comment.
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
- packages-to-be/stable-tokens.ts: repoint USD/EUR/BRL factories from the removed stableToken*ABI exports to ierc20CeloTokensABI (matches the contractkit repoint in e35180a; all three stables share the same type). - transfer-stable-base.ts: drop now-unused @ts-expect-error suppression (the repoint makes the types align, so the directive errors with TS2578). - commands/releasecelo/authorize.ts: revert accidentally-committed debug leftovers (re-enable await checker.runChecks(), drop console.log(sig)). - commands/network/{parameters,contracts}: update the inline + .snap snapshots to drop the Reserve block now that the contract is gone. - contractkit: remove the orphaned Reserve.test.ts left over from the Reserve wrapper deletion.
Summary
Removes ContractKit's dependency on the Mento web3 ABIs (
Reserve,StableToken), which are no longer generated by the monorepo@celo/abispackage, and repoints the Celo stable tokens onto the new consolidatedIERC20CeloTokensABI.Changes
ReserveWrapperand every reference to it (contract-cache,kit,proxy, and theCeloContract.Reserveenum inbase).IERC20CeloTokens. TheStableToken/StableTokenBRL/StableTokenEURfactories (web3-contract-cache,mini-contract-cache), theStableTokenWrappercontract type, and the proxy ABI (proxy.ts) now import from@celo/abis/web3/IERC20CeloTokensinstead 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
IERC20CeloTokensinterface and stops generating the Mento ABIs in@celo/abis. This PR cannot be merged until that lands and a new@celo/abisversion containingIERC20CeloTokensis published and pinned here.Kept as a draft until the monorepo change is merged and released.
PR-Codex overview
This PR primarily removes the
Reservecontract and its references throughout the codebase while updating imports and configurations related to theStableTokencontract.Detailed summary
Reserve.tsandReserve.test.tsfiles.Reservereferences frompackage.json,kit.ts, and various wrappers.StableTokenimport to useIERC20CeloTokens.StableToken.Reservedata.