difftreelog
Merge fix
in: master
1 file changed
pallets/nft/src/lib.rsdiffbeforeafterboth46mod default_weights;46mod default_weights;474748pub const MAX_DECIMAL_POINTS: DecimalPoints = 30;48pub const MAX_DECIMAL_POINTS: DecimalPoints = 30;49pub const MAX_SPONSOR_TIMEOUT: u32 = 10_368_000;50pub const MAX_TOKEN_OWNERSHIP: u32 = 10_000_000;495150// Structs52// Structs51// #region53// #region186impl Default for CollectionLimits {188impl Default for CollectionLimits {187 fn default() -> CollectionLimits {189 fn default() -> CollectionLimits {188 CollectionLimits { 190 CollectionLimits { 189 account_token_ownership_limit: u32::max_value(), 191 account_token_ownership_limit: 10_000_000, 190 token_limit: u32::max_value(),192 token_limit: u32::max_value(),191 sponsored_data_size: u32::max_value(), 193 sponsored_data_size: u32::max_value(), 192 sponsor_transfer_timeout: u32::max_value() }194 sponsor_transfer_timeout: 14400 }193 }195 }194}196}195197354 /// Collection token limit exceeded356 /// Collection token limit exceeded355 CollectionTokenLimitExceeded,357 CollectionTokenLimitExceeded,356 /// Account token limit exceeded per collection358 /// Account token limit exceeded per collection357 AccountTokenLimitExceeded359 AccountTokenLimitExceeded,360 /// Collection limit bounds per collection exceeded361 CollectionLimitBoundsExceeded358 }362 }359}363}3603641433 let chain_limits = ChainLimit::get();1437 let chain_limits = ChainLimit::get();1434 let climits = target_collection.limits;1438 let climits = target_collection.limits;14391440 // collection bounds1441 ensure!(limits.sponsor_transfer_timeout <= MAX_SPONSOR_TIMEOUT &&1442 limits.account_token_ownership_limit <= MAX_TOKEN_OWNERSHIP, 1443 Error::<T>::CollectionLimitBoundsExceeded);143514441436 // token_limit check prev1445 // token_limit check prev1437 ensure!(climits.token_limit > limits.token_limit && 1446 ensure!(climits.token_limit > limits.token_limit && 1438 climits.token_limit <= chain_limits.account_token_ownership_limit, 1447 limits.token_limit <= chain_limits.account_token_ownership_limit, 1439 Error::<T>::AccountTokenLimitExceeded);1448 Error::<T>::AccountTokenLimitExceeded);144014491441 target_collection.limits = limits;1450 target_collection.limits = limits;