-
Notifications
You must be signed in to change notification settings - Fork 51
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
Solana and Sui support #232
Conversation
Warning Rate limit exceeded@fadeev has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 12 minutes and 15 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis pull request introduces several updates across workflow configurations, project dependency versions, and scripts. A new GitHub Actions step has been added to install the Anchor framework for Solana development. Multiple examples have been updated to adjust dependency versions, ignore certain test files, and modify local network scripts. Additionally, changes to smart contracts introduce control flow modifications: one contract now reverts unconditionally on call, while the swap contract functions have been extended with a new parameter to handle gas fee withdrawals. Minor task modifications further adjust recipient validation and gas limit defaults. Changes
Sequence Diagram(s)sequenceDiagram
participant Runner as GitHub Runner
participant Workflow as Test Workflow
participant Anchor as Anchor Setup
participant Test as Test Script
Runner->>Workflow: Start Test Job
Workflow->>Anchor: Execute "Install Anchor (Solana)" step
Anchor-->>Workflow: Anchor environment set up
Workflow->>Test: Run test script
Test-->>Workflow: Return test results
sequenceDiagram
participant User as End User
participant Swap as Swap Contract
participant Handler as Gas & Swap Handler
User->>Swap: Call swap/onCall with `withdraw` flag
Swap->>Handler: Invoke handleGasAndSwap(inputToken, amount, targetToken, withdraw)
alt withdraw is true
Handler-->>Swap: Process gas fee withdrawal logic
else withdraw is false
Handler-->>Swap: Execute standard swap logic
end
Swap-->>User: Return outcome
Suggested Reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
♻️ Duplicate comments (1)
examples/swap/contracts/Swap.sol (1)
185-185
: 🛠️ Refactor suggestionAvoid parameter name shadowing.
The parameterbool withdraw
inhandleGasAndSwap
shadows the function namewithdraw(...)
declared at lines 227-271. This might lead to confusion or unintended issues.Below is a suggested rename to disambiguate:
- function handleGasAndSwap(address inputToken, uint256 amount, address targetToken, bool withdraw) + function handleGasAndSwap(address inputToken, uint256 amount, address targetToken, bool shouldWithdraw) ... - if (withdraw) { + if (shouldWithdraw) {🧰 Tools
🪛 GitHub Check: Slither
[notice] 185-185: Local variable shadowing
Swap.handleGasAndSwap(address,uint256,address,bool).withdraw (contracts/Swap.sol#185) shadows:
- Swap.withdraw(Swap.Params,address,uint256,address,uint256,address) (contracts/Swap.sol#227-271) (function)
🧹 Nitpick comments (4)
examples/swap/contracts/Swap.sol (1)
189-211
: Enhance revert messages to aid debugging.
When reverting due to insufficient input, consider including the computedminInput
in the revert message to help users diagnose failures more quickly.For example, you might need to import
Strings
from OpenZeppelin and show the minimum required amount in the revert message:- revert InsufficientAmount( - "The input amount is less than the min amount required to cover the withdraw gas fee" - ); + revert InsufficientAmount( + string( + abi.encodePacked( + "The input amount (", Strings.toString(amount), + ") is less than the min required (", Strings.toString(minInput), + ") to cover the withdraw gas fee" + ) + ) + );examples/swap/scripts/localnet.sh (2)
22-22
: Addition of DEFAULT_MNEMONIC.
A new variableDEFAULT_MNEMONIC
is declared. However, static analysis indicates that it appears unused. Please verify whether this variable is meant to be exported for external use or if it can be removed to avoid confusion.🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 22-22: DEFAULT_MNEMONIC appears unused. Verify use (or export if used externally).
(SC2034)
120-144
: Commented-Out Revert Test Commands.
Several blocks of commented-out test commands for handling reverts are present. While it is acceptable to disable tests temporarily, please confirm that these lines are either slated for future refinement or removed if no longer needed. Their presence might confuse future maintainers if left without context.examples/call/scripts/localnet.sh (1)
14-14
: Unused Variable Notice for ZRC20_BNB.
Static analysis has flagged thatZRC20_BNB
appears unused in this script. If this variable is not needed, please consider removing it to maintain code clarity. Alternatively, if it is intended for future use, a comment indicating so would be beneficial.🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 14-14: ZRC20_BNB appears unused. Verify use (or export if used externally).
(SC2034)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (5)
examples/call/yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
examples/hello/yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
examples/nft/yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
examples/swap/yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
examples/token/yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
📒 Files selected for processing (17)
.github/workflows/test.yaml
(1 hunks)examples/call/.gitignore
(1 hunks)examples/call/package.json
(2 hunks)examples/call/scripts/localnet.sh
(2 hunks)examples/hello/.gitignore
(1 hunks)examples/hello/contracts/Universal.sol
(1 hunks)examples/hello/package.json
(2 hunks)examples/nft/.gitignore
(1 hunks)examples/nft/package.json
(2 hunks)examples/swap/.gitignore
(1 hunks)examples/swap/contracts/Swap.sol
(4 hunks)examples/swap/package.json
(2 hunks)examples/swap/scripts/localnet.sh
(5 hunks)examples/swap/tasks/companionSwap.ts
(3 hunks)examples/swap/tasks/evmSwap.ts
(1 hunks)examples/token/.gitignore
(1 hunks)examples/token/package.json
(2 hunks)
✅ Files skipped from review due to trivial changes (4)
- examples/call/.gitignore
- examples/hello/.gitignore
- examples/token/.gitignore
- examples/nft/.gitignore
🧰 Additional context used
🪛 Shellcheck (0.10.0)
examples/call/scripts/localnet.sh
[warning] 14-14: ZRC20_BNB appears unused. Verify use (or export if used externally).
(SC2034)
examples/swap/scripts/localnet.sh
[warning] 22-22: DEFAULT_MNEMONIC appears unused. Verify use (or export if used externally).
(SC2034)
🪛 GitHub Check: Slither
examples/swap/contracts/Swap.sol
[notice] 185-185: Local variable shadowing
Swap.handleGasAndSwap(address,uint256,address,bool).withdraw (contracts/Swap.sol#185) shadows:
- Swap.withdraw(Swap.Params,address,uint256,address,uint256,address) (contracts/Swap.sol#227-271) (function)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: slither (examples/swap, swap.sarif)
- GitHub Check: slither (examples/call, call.sarif)
- GitHub Check: slither (examples/hello, hello.sarif)
🔇 Additional comments (33)
examples/swap/.gitignore (1)
21-23
: Enhanced Ignore Patterns for Test Artifacts and DependenciesThe addition of the
test-ledger
and.openzeppelin
entries ensures that temporary test artifacts and dependency folders are consistently excluded from version control. This update aligns well with the broader repository convention observed in other examples and promotes a cleaner workspace.examples/swap/contracts/Swap.sol (3)
115-116
: Looks good to me.
The addedbool withdraw
parameter in the function call allows fine-grained control of swap logic. This change appears consistent with the broader refactor to handle withdrawals.
150-155
: Parameter alignment is consistent.
Passing thewithdrawFlag
parameter tohandleGasAndSwap
follows the same pattern used inonCall
, ensuring consistent swap logic across functions.
283-287
: Confirm forced withdrawal on revert.
Here,onRevert
always passestrue
for thewithdraw
parameter tohandleGasAndSwap
. Ensure that a forced withdrawal on every revert scenario is intended. Consider making it conditional if some reverts should not withdraw tokens automatically.examples/hello/contracts/Universal.sol (1)
27-27
: Double-check the necessity of unconditional revert.
The newly addedrevert();
ensures this function will never successfully execute its intended logic (e.g., emittingHelloEvent
). Confirm this is intentional, as it effectively disables the function.examples/swap/tasks/companionSwap.ts (3)
13-15
: Recipient parameter handling is correct.
Converting non-Ethereum address recipients to UTF-8 bytes ensures broader compatibility. This usage seems appropriate for scenarios involving cross-chain or arbitrary identifiers.
46-47
: Recipient parameter well-applied for ERC20 swaps.
Replacingargs.recipient
with the newrecipient
variable is consistent with the logic above, which handles address vs. UTF-8 bytes.
56-57
: Recipient parameter well-applied for native gas swaps.
Likewise, the same approach for handling therecipient
variable ensures consistent behavior across ERC20 and native gas swaps.examples/swap/tasks/evmSwap.ts (1)
98-103
:✅ Verification successful
Verify the increased gas limit for complex swap operations.
The gas limit has been increased by 10x, which could be necessary for complex swap operations with Solana. However, let's verify this is not excessive.
🏁 Script executed:
#!/bin/bash # Description: Check gas usage patterns in swap transactions # Search for gas usage patterns in tests and contracts rg -A 5 "gasLimit|gas limit" . # Search for any gas-related comments or discussions rg -A 5 "gas consumption|out of gas" .Length of output: 14339
Gas Limit Increase Verified
The gas limit in
examples/swap/tasks/evmSwap.ts
has been increased to 500000, which aligns with similar configurations in other tasks throughout the codebase. This change appears consistent with the requirements for supporting complex swap operations (including Solana support). The additional parameter for the revert transaction (set at 50000) remains distinct and intentional.
- Confirm that the 500000 gas limit is in line with other modules (e.g., in universalCall, connectedDeposit).
- Ensure that comprehensive testing validates that the increased gas limit does not lead to any unexpected resource consumption issues.
.github/workflows/test.yaml (1)
38-40
: LGTM! Well-placed Anchor installation step.The addition of the Anchor installation step is appropriate for Solana support and uses a pinned version for reproducibility.
examples/swap/package.json (1)
32-32
:❓ Verification inconclusive
Verify compatibility with updated ZetaChain dependencies.
The updates to ZetaChain packages are significant version jumps. Please ensure:
- Compatibility between localnet 6.0.0-rc8 and toolkit 13.0.0-rc17
- No breaking changes affecting the swap functionality
Also applies to: 60-60
🌐 Web query:
What are the breaking changes in @zetachain/toolkit version 13.0.0-rc17?
💡 Result:
The @zetachain/toolkit v13.0.0-rc17 introduces several breaking changes developers need to address:
Breaking Changes
Removed
getGasPrice
from EVM module
The deprecatedgetGasPrice
helper function has been permanently removed from the EVM utilities[1][2]. Use provider-specific gas price estimation instead.Deprecated LegacyFeeCalculator
TheLegacyFeeCalculator
class has been replaced byDynamicFeeCalculator
[1][2]. Update imports and instantiate with:import { DynamicFeeCalculator } from '@zetachain/toolkit'; const feeCalculator = new DynamicFeeCalculator();Environment variable renaming
ZETA_NETWORK
environment variable has been renamed toNETWORK
[1][2]. Update your.env
files and deployment scripts accordingly.Transaction parameter changes
ThesendTransaction
method now requires parameters as a single object instead of positional arguments[1][2]. Migrate from:sendTransaction(signer, contractAddress, abi, methodName, params)To:
sendTransaction({ signer, contractAddress, abi, methodName, params })These changes aim to improve API consistency and prepare for mainnet compatibility[1][2]. Developers should test thoroughly before deploying updates, as some error handling patterns might require adjustment due to underlying Ethers.js updates[1][2].
Verify ZetaChain Dependency Compatibility & Breaking Changes Adjustments
The update to ZetaChain dependencies, notably moving to
@zetachain/localnet
6.0.0-rc8 and@zetachain/toolkit
13.0.0-rc17, introduces several breaking changes that could affect the swap functionality:
- EVM Module Adjustment: The removal of
getGasPrice
now requires provider-specific gas price estimation.- Fee Calculation Update: Replace any usage of the deprecated
LegacyFeeCalculator
with the newDynamicFeeCalculator
.- Environment Variable Changes: Update references from
ZETA_NETWORK
toNETWORK
in your configuration files and deployment scripts.- Transaction Parameter Update: Modify calls to
sendTransaction
to pass parameters as a single object rather than as positional arguments.Please confirm that:
- The swap functionality has been tested for compatibility with these changes.
- All instances in the code (or in related modules) that interact with these APIs have been appropriately updated. For example, consider updating:
- sendTransaction(signer, contractAddress, abi, methodName, params) + sendTransaction({ signer, contractAddress, abi, methodName, params })- There are no unintended side effects resulting from the removal of older dependencies (e.g.,
@zetachain/networks
) or the inclusion of new Solana-related dependencies.Kindly review these points to ensure that the integration with updated ZetaChain modules is robust and production-grade.
examples/hello/package.json (1)
31-32
: LGTM! Consistent dependency versions.The dependency versions are kept consistent with other projects in the repository, which is a good practice for maintaining compatibility.
examples/call/package.json (1)
31-32
: Dependency Version Upgrades.
The versions for both@zetachain/localnet
(updated to6.0.0-rc8
) and@zetachain/toolkit
(updated to13.0.0-rc17
) have been upgraded. These changes are consistent with coordinated updates across the repository. Please ensure that any breaking changes in these new versions are accounted for during integration and testing.examples/token/package.json (2)
31-31
: DevDependency Version Upgrade.
The@zetachain/localnet
version has been updated to6.0.0-rc8
in thedevDependencies
section. This update aligns with similar changes in other examples, ensuring consistency across the project.
61-62
: Dependency Updates and Removal.
The dependency@zetachain/standard-contracts
has been updated to1.0.0-rc6
and@zetachain/toolkit
to13.0.0-rc17
. Additionally, the removal of@zetachain/networks
(as noted in the summary) helps streamline dependency management. Verify that no parts of the project still rely on the removed package.examples/nft/package.json (2)
31-31
: DevDependency Version Upgrade for Localnet.
The update of@zetachain/localnet
to version6.0.0-rc8
is applied here as well. This consistent change across examples reinforces the standardized dependency strategy.
61-62
: Dependency Updates and Streamlining.
Both@zetachain/standard-contracts
and@zetachain/toolkit
have been upgraded to1.0.0-rc6
and13.0.0-rc17
, respectively. Also, the removal of@zetachain/networks
from dependencies further streamlines the setup. Ensure that these changes do not remove any required functionality.examples/swap/scripts/localnet.sh (14)
7-7
: Extended Sleep Duration for Localnet Startup.
The startup command now includes a sleep duration of 15 seconds (increased from 10 seconds) to allow sufficient time for the local network to initialize. This change should help avoid race conditions during deployment.
13-13
: Refined USDC Address Selection.
The extraction filter forUSDC_ETHEREUM
now specifically selects entries with.type=="ERC-20 USDC"
and.chain=="ethereum"
, ensuring greater accuracy when picking the correct address.
16-17
: Introduction of New Variables for Enhanced Targeting.
New variablesZRC20_SOL
andWZETA
have been added to extract specific addresses fromlocalnet.json
. This improves the clarity and precision when targeting SOL and the wrapped ZETA token, respectively.
27-35
: New EVM Swap Command for WZETA.
A new block invokingnpx hardhat evm-swap
targets theWZETA
address with a reduced swap amount (0.1). This command now explicitly disables withdrawal (--withdraw false
) and specifies the recipient. Verify that these parameters correctly reflect the intended behavior of swapping to WZETA.
36-37
: Consistent Post-Command Validation.
The immediate call tonpx hardhat localnet-check
following the swap command ensures that the state is validated. This is a good practice for ensuring transactional integrity.
38-45
: Additional EVM Swap Operation.
This subsequent swap command targets theZRC20_USDC
token with similar parameters (amount 0.1, skip checks, designated recipient). The consistency in command structure is commendable; please verify that the adjusted targets deliver expected outcomes.
48-56
: Companion-Swap Command for SOL Target.
Thenpx hardhat companion-swap
command now includes an updated--target
parameter pointing toZRC20_SOL
and uses a fixed amount of 0.1. This enhances cross-chain operation testing. Ensure that the provided recipient address meets the expected format.
57-57
: State Verification After Swap.
The subsequentnpx hardhat localnet-check
call validates the state post companion-swap. This helps catch potential issues immediately after deployment commands.
59-63
: Solana Deposit-and-Call Operation.
The addition of thenpx hardhat localnet:solana-deposit-and-call
command further tests cross-chain interactions by depositing and calling on Solana with the specified types and parameters. Confirm that the type definitions and argument ordering match the contract expectations.
66-75
: Companion-Swap Command for BNB Target.
An additional companion-swap is executed targetingZRC20_BNB
with a swap amount of 0.1. This block is similar in structure to previous swap commands but focuses on a different token. Ensure that token-specific logic (if any) is correctly handled.
77-86
: Companion-Swap Using ERC20 Flag.
This companion-swap command includes the--erc20
flag and similarly targetsZRC20_BNB
. The explicit adoption of ERC-20 parameters here helps test alternative transaction flows. Validate that this command does not conflict with non-ERC20 operations.
89-97
: Standard EVM Swap Execution.
A furthernpx hardhat evm-swap
is performed targetingZRC20_BNB
, maintaining consistency in swap commands while varying parameters like the withdrawal option.
99-107
: EVM Swap Command with Explicit No Withdrawal.
This swap command reiterates the no-withdrawal condition (--withdraw false
) while targetingZRC20_BNB
. Double-check that disabling withdrawal aligns with test expectations and that downstream logic does not inadvertently rely on a withdrawal flag.
110-117
: ZetaChain Swap Invocation.
Thenpx hardhat zetachain-swap
command tests the swap from ZetaChain by targetingZRC20_ETHEREUM
with a fixed amount. The switch to a dedicated ZetaChain swap command should provide broader test coverage across chains.examples/call/scripts/localnet.sh (2)
7-7
: Localnet Startup Update with Extended Delay.
The startup condition now includes a sleep period of 15 seconds. This additional delay can help ensure that the local network is fully ready before subsequent commands execute.
15-15
: Addition of ZRC20_SOL Variable.
A new variableZRC20_SOL
has been introduced to retrieve the SOL token address fromlocalnet.json
. This update mirrors similar changes in the swap script and enhances consistency across scripts.
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
examples/swap/scripts/localnet.sh (2)
22-22
: Unused DEFAULT_MNEMONIC Variable.
TheDEFAULT_MNEMONIC
is defined but not referenced elsewhere in the script. Consider exporting it for downstream use or removing it to prevent confusion.🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 22-22: DEFAULT_MNEMONIC appears unused. Verify use (or export if used externally).
(SC2034)
55-58
: Companion-swap Invocation for SOL Target.
The companion-swap command now targets$ZRC20_SOL
with a hardcoded recipient address. While this supports the new Solana swapping flow, consider parameterizing the recipient for greater flexibility in production environments.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
examples/swap/scripts/localnet.sh
(5 hunks)examples/swap/tasks/evmSwap.ts
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- examples/swap/tasks/evmSwap.ts
🧰 Additional context used
🪛 Shellcheck (0.10.0)
examples/swap/scripts/localnet.sh
[warning] 22-22: DEFAULT_MNEMONIC appears unused. Verify use (or export if used externally).
(SC2034)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: test (examples/call)
🔇 Additional comments (22)
examples/swap/scripts/localnet.sh (22)
7-7
: Localnet Startup with Increased Sleep Duration.
The command conditionally starts the local network when invoked with "start" and now includes a 15‑second sleep to accommodate network initialization, aligning with the PR objectives.
13-13
: Refined Address Extraction for USDC on Ethereum.
The updatedjq
filter now selects addresses with type"ERC-20 USDC"
and chain"ethereum"
, ensuring more precise extraction.
16-17
: New Address Variables for Solana and WZETA.
The introduction ofZRC20_SOL
andWZETA
with their respective filters supports the enhanced Solana functionality and proper differentiation of token types.
27-35
: Configuring evm-swap for WZETA Transactions.
This evm-swap command is now set to target$WZETA
with an amount of 0.1 and includes necessary flags like--gateway-evm
and--withdraw false
. The configuration aligns with the PR’s objective to resolve previous swap issues.
37-38
: Post-Swap Network Check.
The addednpx hardhat localnet-check
invocation verifies the network’s state immediately after initiating the swap, enhancing operational stability.
39-47
: Additional evm-swap for USDC Swap.
This command adjusts the swap parameters to target$ZRC20_USDC
, consistent with the refined address extraction logic. It ensures that swaps for USDC are processed correctly on the Ethereum network.
48-48
: Immediate Network Health Verification.
The repeatedlocalnet-check
call helps confirm network integrity following the previous swap operations.
59-60
: Subsequent Network Verification Post Companion-swap.
The followinglocalnet-check
confirms that the network remains stable after the companion-swap execution.
61-65
: Introduced Solana Deposit-and-Call Operation.
The newnpx hardhat localnet:solana-deposit-and-call
command facilitates cross-chain interactions by passing explicit parameters (including types, addresses, and flags), enhancing the testing framework.
66-67
: Additional Localnet Health Check.
The inclusion of anotherlocalnet-check
call further reinforces the reliability of the network state after the Solana operation.
68-73
: Companion-swap Configuration for BNB Target.
This companion-swap segment initiates a swap targeting$ZRC20_BNB
, with the amount explicitly set to 0.1. Though lines 74–75 aren’t marked as changed, the block maintains consistency in the overall swap strategy.
84-84
: Companion-swap Enhancement with ERC20 Specification.
The addition of the--erc20 "$USDC_ETHEREUM"
flag refines the swap command by explicitly designating the ERC-20 token, which supports accurate transaction processing.
95-95
: Uniform evm-swap Parameters for BNB.
The evm-swap command targeting$ZRC20_BNB
now explicitly sets the amount to 0.1, matching the consistency observed in other swap operations.
105-105
: Explicit No-Withdrawal Behavior.
The inclusion of--withdraw false
ensures that no unintended withdrawal occurs, aligning with updated swap flows and providing greater control over transaction behavior.
115-115
: Consistent Amount Setting in zetachain-swap.
The parameter setting of--amount 0.1
in the zetachain-swap operation maintains uniformity across all swap commands, thereby supporting a consistent user experience across chains.
122-122
: Designation for Revert Testing Section.
The comment# TESTING REVERTS
clearly demarcates the section for potential revert test cases, aiding in future troubleshooting and testing efforts.
124-131
: Commented-out Revert Test Block for Companion-swap.
This block serves as a reference for testing revert scenarios without interfering with standard operations. Its presence facilitates future debugging when testing error conditions.
132-132
: Supplementary Commented-out Network Check for Reverts.
The commentedlocalnet-check
call supports the revert testing configuration and is appropriately disabled to prevent accidental execution.
134-138
: Optional Solana Deposit-and-Call Revert Test Example.
The commented section provides an alternative test case for simulating reverts in solana deposit-and-call operations, useful for further validation if needed.
141-144
: Placeholder for Solana Deposit Revert Testing.
This commented-out block is retained as a potential test scenario for the solana deposit feature, without impacting the current script flow.
145-146
: Additional Commented-out localnet-check After Deposit.
This final commented-out check hints at further testing possibilities post-deposit, reinforcing a robust testing strategy.
147-147
: Conditional Localnet Shutdown.
The script conditionally stops the local network if it was initiated with the "start" argument, ensuring a clean environment shutdown after operations.
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.
utACK
Summary by CodeRabbit
onCall
function to prevent unauthorized execution.