diff --git a/soroban-env-host/src/native_contract/token/balance.rs b/soroban-env-host/src/native_contract/token/balance.rs index 68db4fd0c..2f637c46f 100644 --- a/soroban-env-host/src/native_contract/token/balance.rs +++ b/soroban-env-host/src/native_contract/token/balance.rs @@ -13,7 +13,7 @@ use soroban_env_common::xdr::{ }; use soroban_env_common::{Env, StorageType, TryIntoVal}; -use super::storage_types::{BalanceValue, BUMP_AMOUNT}; +use super::storage_types::{BalanceValue, BALANCE_BUMP_AMOUNT}; /// This module handles all balance and authorization related logic for both /// Accounts and non-Accounts. For Accounts, a trustline is expected (unless this @@ -37,7 +37,7 @@ pub fn read_balance(e: &Host, addr: Address) -> Result { e.bump_contract_data( key.try_into_val(e)?, StorageType::Persistent, - BUMP_AMOUNT.into(), + BALANCE_BUMP_AMOUNT.into(), )?; let balance: BalanceValue = raw_balance.try_into_val(e)?; Ok(balance.amount) @@ -68,7 +68,7 @@ fn write_balance(e: &Host, addr: Address, balance: BalanceValue) -> Result<(), H e.bump_contract_data( key.try_into_val(e)?, StorageType::Persistent, - BUMP_AMOUNT.into(), + BALANCE_BUMP_AMOUNT.into(), )?; Ok(()) } diff --git a/soroban-env-host/src/native_contract/token/storage_types.rs b/soroban-env-host/src/native_contract/token/storage_types.rs index 3d8c2381b..85711abac 100644 --- a/soroban-env-host/src/native_contract/token/storage_types.rs +++ b/soroban-env-host/src/native_contract/token/storage_types.rs @@ -2,7 +2,8 @@ use crate::native_contract::base_types::Address; use soroban_env_common::TryIntoVal; use soroban_native_sdk_macros::contracttype; -pub(crate) const BUMP_AMOUNT: u32 = 1000; +pub(crate) const INSTANCE_BUMP_AMOUNT: u32 = 34560; // 2 hours +pub(crate) const BALANCE_BUMP_AMOUNT: u32 = 518400; // 30 days #[contracttype] pub struct AllowanceDataKey {