Skip to content

Commit

Permalink
Merge #2250
Browse files Browse the repository at this point in the history
2250: Update base price for withdrawals r=Deniallugo a=Deniallugo

Signed-off-by: deniallugo <[email protected]>

Co-authored-by: deniallugo <[email protected]>
Co-authored-by: Danil <[email protected]>
  • Loading branch information
bors-matterlabs-dev[bot] and Deniallugo authored May 23, 2022
2 parents 06918e1 + ada220d commit 99527f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions core/bin/zksync_api/src/fee_ticker/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ pub(crate) const BASE_TRANSFER_TO_NEW_COST: u64 = VerifyCost::TRANSFER_TO_NEW_CO
+ CommitCost::TRANSFER_TO_NEW_COST
+ AMORTIZED_COST_PER_CHUNK * (TransferToNewOp::CHUNKS as u64);
pub(crate) const BASE_WITHDRAW_COST: u64 = VerifyCost::WITHDRAW_COST
+ VerifyCost::PENDING_WITHDRAW_COST
+ CommitCost::WITHDRAW_COST
+ AMORTIZED_COST_PER_CHUNK * (WithdrawOp::CHUNKS as u64);
pub(crate) const BASE_WITHDRAW_NFT_COST: u64 = VerifyCost::WITHDRAW_NFT_COST
+ VerifyCost::PENDING_WITHDRAW_NFT_COST
+ CommitCost::WITHDRAW_NFT_COST
+ AMORTIZED_COST_PER_CHUNK * (WithdrawNFTOp::CHUNKS as u64);
pub(crate) const BASE_OLD_CHANGE_PUBKEY_OFFCHAIN_COST: u64 =
Expand Down
6 changes: 4 additions & 2 deletions core/lib/types/src/gas_counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,12 @@ impl VerifyCost {
pub const TRANSFER_TO_NEW_COST: u64 = 0;
pub const SWAP_COST: u64 = 0;
pub const FULL_EXIT_COST: u64 = 30_000;
pub const WITHDRAW_COST: u64 = 48_000;
pub const WITHDRAW_COST: u64 = 30_000;
pub const PENDING_WITHDRAW_COST: u64 = 60_000;
pub const FORCED_EXIT_COST: u64 = Self::WITHDRAW_COST;
pub const MINT_NFT_COST: u64 = 0;
pub const WITHDRAW_NFT_COST: u64 = 200_000;
pub const WITHDRAW_NFT_COST: u64 = 80_000;
pub const PENDING_WITHDRAW_NFT_COST: u64 = 240_000;

pub fn base_cost() -> U256 {
U256::from(Self::BASE_COST)
Expand Down

0 comments on commit 99527f5

Please sign in to comment.