-
Notifications
You must be signed in to change notification settings - Fork 5
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
Multiple offramps support according to CCIP minor version [NONEVM-1200] #501
base: main
Are you sure you want to change the base?
Conversation
#[derive(Accounts)] | ||
pub struct UpdateSupportedChainsConfigCCIPRouter<'info> { | ||
#[account( | ||
mut, | ||
seeds = [CONFIG_SEED], | ||
bump, | ||
constraint = valid_version(config.load()?.version, MAX_CONFIG_V) @ CcipRouterError::InvalidInputs, // validate state version | ||
)] | ||
pub config: AccountLoader<'info, Config>, | ||
#[account(address = config.load()?.owner @ CcipRouterError::Unauthorized)] | ||
pub authority: Signer<'info>, | ||
pub system_program: Program<'info, System>, | ||
} |
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.
This seemed to be dead code
pub const DEST_CHAIN_SEED: &[u8] = b"dest_chain_state"; | ||
pub const SOURCE_CHAIN_SEED: &[u8] = b"source_chain_state"; |
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.
I'm removing the state
bit of the names here as they hold config & state. I left the seeds untouched to no affect offchain code that may already be using those values though. If you think it's ok to change the seed values and just notify people, I'll happily do it.
d15f05f
to
63fb48a
Compare
|
This PR differentiates the offramp between CCIP minor versions, so that a message must be executed invoking the same offramp that it was committed in.
add_chain_selector
into two methods, one for the source chain (versioned) and one for the dest chain (unversioned, as we can't change PDAs in the onramp transparently to the end user).ccip_version
parameterccip_version
in themTODOs (may be separate PRs to not make this one grow even more)