Closed magj2006 closed 2 weeks ago
The changes in this pull request focus on enhancing the response handling and messaging logic within the ExocoreGateway
and ExocoreGatewayStorage
contracts. Modifications include updates to several functions to include additional data in responses for specific source chain IDs related to Solana. New constants for Solana's mainnet and devnet chain IDs, along with a messaging value, have been introduced. Function signatures have also been updated to reflect these changes, ensuring improved interchain communication.
File | Change Summary |
---|---|
src/core/ExocoreGateway.sol | Updated response handling in handleLSTTransfer , handleNSTTransfer , and handleRewardOperation to include token and staker data. Altered _sendInterchainMsg and quote functions to conditionally set options based on source chain ID and action type. Function signatures modified to include public onlyCalledFromThis and internal whenNotPaused modifiers. |
src/storage/ExocoreGatewayStorage.sol | Added constants for Solana blockchain: SOLANA_MAINNET_CHAIN_ID , SOLANA_DEVNET_CHAIN_ID , and SOLANA_WHITELIST_TOKEN_MSG_VALUE . Introduced _isSolana function to check if a chain ID corresponds to Solana. No changes to existing logic or control flow. |
test/foundry/unit/ExocoreGateway.t.sol | Enhanced test suite for Solana client chain support, added new variables, overloaded generateUID , and introduced test_Success_AddWhiteListTokenOnSolana function. Updated RegisterOrUpdateClientChain for Solana client chain handling. |
ClientChainGateway
to the Exocore chain, which relates to the changes in the ExocoreGateway.sol
where the handling of tokens is enhanced.addWhitelistTokens
function to require more token information, which aligns with the updates in the main PR that enhance the response handling and token management in ExocoreGateway.sol
.ClientChainGateway
, which is relevant to the changes in the main PR that enhance the response handling in the ExocoreGateway.sol
.ExocoreGateway.sol
.RewardVault
and associated reward management functions in this PR complements the main PR's focus on enhancing the ExocoreGateway
functionalities, particularly in managing rewards and token interactions.🐰 In the realm of chains where tokens flow,
New constants gleam, like stars aglow.
Responses richer, with data to share,
In the world of Solana, we leap without care.
With each transfer, a hop and a cheer,
Our gateway's magic brings us near! ✨
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?
Linting failed. Please check the logs.
The build has failed. Please check the logs.
Please make similar edits in
ExocoreGatewayMock.sol
and add unit tests to verify the event emission inExocoreGateway.t.sol
Added, please review again.
update for #119 : add definition of Solana devnet & mainnet ChinaID set unordered options when sending message to Solana Chain set value when calling addWhitelistToken to add token on Solana Chain
Summary by CodeRabbit
New Features
Bug Fixes
Documentation