Corrected broken enum import in demoAcrossV3.ts#1615
Corrected broken enum import in demoAcrossV3.ts#1615S0nee wants to merge 1 commit intolifinance:mainfrom
Conversation
WalkthroughThis PR updates type references in a demo script from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested labels
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Important Action Needed: IP Allowlist UpdateIf your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:
Failure to add the new IP will result in interrupted reviews. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
script/demoScripts/demoAcrossV3.ts (1)
12-31:⚠️ Potential issue | 🟠 MajorReplace deprecated ethers helpers with viem-based demo helpers.
This script imports and uses deprecated ethers-based helpers (
getProvider,getWalletFromPrivateKeyInDotEnv,sendTransaction,ensureBalanceAndAllowanceToDiamond) throughout, which violates the viem-only requirement for demo scripts. Migrate to the viem-based alternatives available indemoScriptHelpers: usesetupEnvironment()to initialize viem clients,executeTransaction()for sending transactions, andensureBalance()for balance checks. SeedemoUnit.tsfor reference implementation of the correct pattern.
Which Jira task belongs to this PR?
I found an error in demoAcrossV3.ts, where TransactionTypeEnum was imported incorrectly and used in the code itself, even though demoScriptHelpers exports ITransactionTypeEnum.
Initially, I assumed that the error itself was due to an incorrect export in demoScriptHelpers, and checked the demoAcrossV4.ts file, but it contained the correct import of ITransactionTypeEnum and its subsequent use.
Therefore, I corrected the import and all uses of TransactionTypeEnum to the correct ITransactionTypeEnum in demoAcrossV3.ts.
Why did I implement it this way?
Checklist before requesting a review
Checklist for reviewer (DO NOT DEPLOY and contracts BEFORE CHECKING THIS!!!)