Skip to content

Commit

Permalink
Lint fixes and remove TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
toblich committed Feb 1, 2025
1 parent 1142668 commit 523c1d2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,11 @@ fn get_fee_cpi<'info>(
.token_amounts
.iter()
.map(|x| fee_quoter::messages::SVMTokenAmount {
token: x.token.clone(),
token: x.token,
amount: x.amount,
})
.collect(),
fee_token: message.fee_token.clone(),
fee_token: message.fee_token,
extra_args: message.extra_args.clone(),
};

Expand All @@ -284,7 +284,7 @@ fn token_transfer(

require!(
extra_data_length <= CCIP_LOCK_OR_BURN_V1_RET_BYTES
|| extra_data_length <= additional_data.dest_bytes_overhead, // TODO is this ok here?
|| extra_data_length <= additional_data.dest_bytes_overhead,
CcipRouterError::SourceTokenDataTooLarge
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub(super) struct TokenAccounts<'a> {
pub pool_signer: &'a AccountInfo<'a>,
pub token_program: &'a AccountInfo<'a>,
pub mint: &'a AccountInfo<'a>,
pub fee_token_config: &'a AccountInfo<'a>, // TODO review this...
pub fee_token_config: &'a AccountInfo<'a>,
pub remaining_accounts: &'a [AccountInfo<'a>],
}

Expand Down
15 changes: 1 addition & 14 deletions chains/solana/contracts/programs/ccip-router/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub struct Config {

_padding2: [u8; 8],
pub ocr3: [Ocr3Config; 2],
pub fee_quoter: Pubkey, // TODO configure this
pub fee_quoter: Pubkey,

pub link_token_mint: Pubkey,
pub fee_aggregator: Pubkey, // Allowed address to withdraw billed fees to (will use ATAs derived from it)
Expand Down Expand Up @@ -200,19 +200,6 @@ pub struct RateLimitTokenBucket {
pub rate: u128, // Number of tokens per second that the bucket is refilled.
}

#[derive(InitSpace, Clone, AnchorSerialize, AnchorDeserialize, Debug)]
// TODO remove?
pub struct BillingTokenConfig {
// NOTE: when modifying this struct, make sure to update the version in the wrapper
pub enabled: bool,
pub mint: Pubkey,

// price tracking
pub usd_per_token: TimestampedPackedU224,
// billing configs
pub premium_multiplier_wei_per_eth: u64,
}

#[derive(InitSpace, Clone, AnchorSerialize, AnchorDeserialize, Debug)]
pub struct TimestampedPackedU224 {
pub value: [u8; 28],
Expand Down

0 comments on commit 523c1d2

Please sign in to comment.