-
Notifications
You must be signed in to change notification settings - Fork 8
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
Migrate From ContractKit to Viem #294
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: cfde4ce The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
10990680 | Triggered | Generic High Entropy Secret | 4a7b2c8 | packages/common/src/test/values.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.
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@celo/[email protected] |
await selfTransferTx.sendAndWaitForReceipt({ from: account }) | ||
} | ||
|
||
export async function registerWalletAddress( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a test function not used in any tests
fix rawKey should actually not be a hex
Description
Rather than use ContractKit use viem as the rpc caller / contracts library.
Changes
WalletSigner now takes a sign191 function instead of a contractKit instance. this makes it easy to use with whatever library you like such as viem client.signMessage or ethers.signMessage as long as they support eip191.
Many places that were expecting an address but typed as a regular string are now typed as
0x{string}
aka Addressalmost everywhere
kit
has been replaced withclient
and in some caseswalletClient
@celo/phone-number-privacy-common/lib/contracts
contract instances used internally (viem getContract + abi + address)getAccountsContract, getCUSDContract, getOdisPaymentsContract,
ContractKit is still needed for the @celo/identity/lib/offchain functions however these are not used in social connect as such ck is now a peer dependencies and marked as optional. Pottentially these offchain functions can be either deprecated or moved to a different codebase.
Tested
Needs someone who understand the system really well to really test it out.
TODO
need to re mock the getDataEncryptionKey method in the authentication.test in common package. one was done but the rest still need it and each seems to require different implementatation
try to replace contractkit with @celo/[email protected]
dont merge until we get this deployed to staging.
Related issues
Backwards compatibility
No. This is a Major Change
Documentation
documented in changesets the differences