Skip to content

Commit

Permalink
Rename config var
Browse files Browse the repository at this point in the history
  • Loading branch information
toblich committed Feb 9, 2025
1 parent ed7ca6e commit c665e52
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ pub struct BaseConfig {
pub owner: Pubkey,
pub proposed_owner: Pubkey,
pub rate_limit_admin: Pubkey,
pub onramp_authority: Pubkey, // signer for CCIP onramp calls
pub router: Pubkey, // router address
pub router_onramp_authority: Pubkey, // signer PDA for CCIP onramp calls
pub router: Pubkey, // router address

// rebalancing - only used for lock/release pools
pub rebalancer: Pubkey,
Expand Down Expand Up @@ -73,7 +73,7 @@ impl BaseConfig {
self.owner = owner;
self.rate_limit_admin = owner;
self.router = router;
(self.onramp_authority, _) =
(self.router_onramp_authority, _) =
Pubkey::find_program_address(&[EXTERNAL_TOKENPOOL_SIGNER], &router);

Ok(())
Expand Down Expand Up @@ -115,7 +115,8 @@ impl BaseConfig {

let old_router = self.router;
self.router = new_router;
(self.onramp_authority, _) = Pubkey::find_program_address(&[POOL_SIGNER_SEED], &new_router);
(self.router_onramp_authority, _) =
Pubkey::find_program_address(&[POOL_SIGNER_SEED], &new_router);
emit!(RouterUpdated {
old_router,
new_router,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ pub struct TokenOfframp<'info> {
#[instruction(lock_or_burn: LockOrBurnInV1)]
pub struct TokenOnramp<'info> {
// CCIP accounts ------------------------
#[account(address = state.config.onramp_authority @ CcipTokenPoolError::InvalidPoolCaller)]
#[account(address = state.config.router_onramp_authority @ CcipTokenPoolError::InvalidPoolCaller)]
pub authority: Signer<'info>,

// Token pool accounts ------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ pub struct TokenOfframp<'info> {
#[instruction(lock_or_burn: LockOrBurnInV1)]
pub struct TokenOnramp<'info> {
// CCIP accounts ------------------------
#[account(address = state.config.onramp_authority @ CcipTokenPoolError::InvalidPoolCaller)]
#[account(address = state.config.router_onramp_authority @ CcipTokenPoolError::InvalidPoolCaller)]
pub authority: Signer<'info>,

// Token pool accounts ------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ pub struct TokenOfframp<'info> {
#[instruction(lock_or_burn: LockOrBurnInV1)]
pub struct TokenOnramp<'info> {
// CCIP accounts ------------------------
#[account(address = state.config.onramp_authority @ CcipTokenPoolError::InvalidPoolCaller)]
#[account(address = state.config.router_onramp_authority @ CcipTokenPoolError::InvalidPoolCaller)]
pub authority: Signer<'info>,

// Token pool accounts ------------------
Expand Down
2 changes: 1 addition & 1 deletion chains/solana/contracts/target/idl/base_token_pool.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"type": "publicKey"
},
{
"name": "onrampAuthority",
"name": "routerOnrampAuthority",
"type": "publicKey"
},
{
Expand Down
36 changes: 18 additions & 18 deletions chains/solana/gobindings/base_token_pool/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c665e52

Please sign in to comment.