diff --git a/Cargo.toml b/Cargo.toml index db46e46..38b46c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,3 +20,11 @@ panic = "abort" codegen-units = 1 lto = true +# Suppress PDB generation on Windows to prevent linker exhaustion (LNK1318) +# under disk-constrained environments. Setting debug = 0 disables the Program +# Database file that the MSVC linker writes alongside the test binary. +# [profile.test] inherits from [profile.dev], so setting debug = 0 here +# covers both `cargo build` and `cargo test` invocations. +[profile.dev] +debug = 0 + diff --git a/creator-keys/src/lib.rs b/creator-keys/src/lib.rs index d4811ad..126a76c 100644 --- a/creator-keys/src/lib.rs +++ b/creator-keys/src/lib.rs @@ -265,8 +265,16 @@ pub struct ProtocolFeeView { /// Stable, non-optional view of creator details. /// -/// Returned by [`CreatorKeysContract::get_creator_details`] for indexer-friendly consumption. -/// When `is_registered` is `false`, default values are returned for other fields. +/// Returned by [`CreatorKeysContract::get_creator_details`] and +/// [`CreatorKeysContract::get_creators_batch`] for indexer-friendly consumption. +/// When `is_registered` is `false`, default values are returned for all other fields, +/// including `registered_at: 0`. +/// +/// # Field Stability +/// +/// Fields are append-only. Do not reorder existing fields; the Soroban XDR encoder +/// serialises struct fields in declaration order and downstream indexers rely on +/// positional stability. #[derive(Clone)] #[contracttype] pub struct CreatorDetailsView { @@ -274,6 +282,13 @@ pub struct CreatorDetailsView { pub handle: String, pub supply: u32, pub is_registered: bool, + /// Ledger sequence number at the time the creator registered. + /// + /// Set to `env.ledger().sequence()` inside [`CreatorKeysContract::register_creator`]. + /// Returns `0` for unregistered addresses so callers never receive an `Option`. + /// Clients can use this field to sort a marketplace grid chronologically without + /// maintaining a separate off-chain index. + pub registered_at: u32, } /// Stable, non-optional view of a creator's fee configuration. /// @@ -358,6 +373,12 @@ pub struct CreatorProfile { pub supply: u32, pub holder_count: u32, pub fee_recipient: Address, + /// Ledger sequence number captured at registration time via `env.ledger().sequence()`. + /// + /// Stored as the last field so existing serialised profiles written before this + /// field was added deserialise correctly — the Soroban persistent storage layer + /// reads structs by field index, so appending is the only safe extension pattern. + pub registered_at: u32, } /// Reads a creator profile from storage, returning `None` for unregistered creators. @@ -643,6 +664,7 @@ impl CreatorKeysContract { supply: 0, holder_count: 0, fee_recipient: creator.clone(), + registered_at: env.ledger().sequence(), }; let fee_config = read_protocol_fee_config(&env).unwrap_or(fee::FeeConfig { @@ -811,7 +833,7 @@ impl CreatorKeysContract { /// /// Returns a [`CreatorDetailsView`] regardless of registration status. /// When the creator is not registered, `is_registered` is `false` and - /// default values are provided for other fields. + /// default values are provided for other fields, including `registered_at: 0`. pub fn get_creator_details(env: Env, creator: Address) -> CreatorDetailsView { let key = constants::storage::creator(&creator); match env @@ -824,15 +846,67 @@ impl CreatorKeysContract { handle: profile.handle, supply: profile.supply, is_registered: true, + registered_at: profile.registered_at, }, None => CreatorDetailsView { creator, handle: read_none_string(&env), supply: 0, is_registered: false, + registered_at: 0, }, } } + + /// Read-only batch view: returns [`CreatorDetailsView`] for each address in `creators`. + /// + /// Iterates the provided addresses in order and fetches each creator's profile + /// from persistent storage. The output `Vec` is the same length as the input and + /// preserves input order, so clients can zip the two slices without an extra sort. + /// + /// Unregistered addresses never cause the call to fail: they produce a default + /// [`CreatorDetailsView`] with `is_registered: false` and `registered_at: 0`, + /// matching the single-address behaviour of [`get_creator_details`]. + /// + /// # Usage + /// + /// ```text + /// let views = client.get_creators_batch(&vec![alice, bob, unknown]); + /// // views[0] → alice's details (is_registered: true) + /// // views[1] → bob's details (is_registered: true) + /// // views[2] → default view (is_registered: false, registered_at: 0) + /// ``` + pub fn get_creators_batch( + env: Env, + creators: soroban_sdk::Vec
, + ) -> soroban_sdk::Vec { + let mut results = soroban_sdk::Vec::new(&env); + for creator in creators.iter() { + let key = constants::storage::creator(&creator); + let view = match env + .storage() + .persistent() + .get::(&key) + { + Some(profile) => CreatorDetailsView { + creator: profile.creator, + handle: profile.handle, + supply: profile.supply, + is_registered: true, + registered_at: profile.registered_at, + }, + None => CreatorDetailsView { + creator, + handle: read_none_string(&env), + supply: 0, + is_registered: false, + registered_at: 0, + }, + }; + results.push_back(view); + } + results + } /// Read-only view: returns the protocol state version. /// /// Returns a stable scalar value for clients and indexers to detect diff --git a/creator-keys/src/test.rs b/creator-keys/src/test.rs index 21dde35..7fdc32e 100644 --- a/creator-keys/src/test.rs +++ b/creator-keys/src/test.rs @@ -15,6 +15,7 @@ fn test_read_key_balance_returns_registered_creator_supply() { supply: 7, holder_count: 3, fee_recipient: creator.clone(), + registered_at: 0, }; let supply = env.as_contract(&contract_id, || { diff --git a/creator-keys/test_snapshots/buy_at_max_supply_is_rejected_with_overflow_and_no_state_corruption.1.json b/creator-keys/test_snapshots/buy_at_max_supply_is_rejected_with_overflow_and_no_state_corruption.1.json index bbecdbd..13adc61 100644 --- a/creator-keys/test_snapshots/buy_at_max_supply_is_rejected_with_overflow_and_no_state_corruption.1.json +++ b/creator-keys/test_snapshots/buy_at_max_supply_is_rejected_with_overflow_and_no_state_corruption.1.json @@ -137,6 +137,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/holder_count_tracks_distinct_buyers_and_decrements_on_exit.1.json b/creator-keys/test_snapshots/holder_count_tracks_distinct_buyers_and_decrements_on_exit.1.json index 9a3b149..5f201e3 100644 --- a/creator-keys/test_snapshots/holder_count_tracks_distinct_buyers_and_decrements_on_exit.1.json +++ b/creator-keys/test_snapshots/holder_count_tracks_distinct_buyers_and_decrements_on_exit.1.json @@ -288,6 +288,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/sell_fee_split_invariant_100_creator_zero_protocol.1.json b/creator-keys/test_snapshots/sell_fee_split_invariant_100_creator_zero_protocol.1.json index c08e802..46585cd 100644 --- a/creator-keys/test_snapshots/sell_fee_split_invariant_100_creator_zero_protocol.1.json +++ b/creator-keys/test_snapshots/sell_fee_split_invariant_100_creator_zero_protocol.1.json @@ -187,6 +187,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/sell_fee_split_invariant_50_50_equal_split.1.json b/creator-keys/test_snapshots/sell_fee_split_invariant_50_50_equal_split.1.json index b82a2c7..87850e7 100644 --- a/creator-keys/test_snapshots/sell_fee_split_invariant_50_50_equal_split.1.json +++ b/creator-keys/test_snapshots/sell_fee_split_invariant_50_50_equal_split.1.json @@ -187,6 +187,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/sell_fee_split_invariant_90_10_nominal_case.1.json b/creator-keys/test_snapshots/sell_fee_split_invariant_90_10_nominal_case.1.json index a1fdb6f..4485339 100644 --- a/creator-keys/test_snapshots/sell_fee_split_invariant_90_10_nominal_case.1.json +++ b/creator-keys/test_snapshots/sell_fee_split_invariant_90_10_nominal_case.1.json @@ -187,6 +187,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/sell_fee_split_invariant_across_multiple_fee_configs.1.json b/creator-keys/test_snapshots/sell_fee_split_invariant_across_multiple_fee_configs.1.json index ee0273c..1ae4cb6 100644 --- a/creator-keys/test_snapshots/sell_fee_split_invariant_across_multiple_fee_configs.1.json +++ b/creator-keys/test_snapshots/sell_fee_split_invariant_across_multiple_fee_configs.1.json @@ -493,6 +493,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -579,6 +587,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -665,6 +681,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -751,6 +775,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/sell_fee_split_invariant_across_price_range.1.json b/creator-keys/test_snapshots/sell_fee_split_invariant_across_price_range.1.json index d87dc35..5b834ec 100644 --- a/creator-keys/test_snapshots/sell_fee_split_invariant_across_price_range.1.json +++ b/creator-keys/test_snapshots/sell_fee_split_invariant_across_price_range.1.json @@ -1105,6 +1105,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -1191,6 +1199,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -1277,6 +1293,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -1363,6 +1387,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -1449,6 +1481,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -1535,6 +1575,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -1621,6 +1669,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -1707,6 +1763,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -1793,6 +1857,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -1879,6 +1951,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/sell_fee_split_invariant_boundary_odd_price_999.1.json b/creator-keys/test_snapshots/sell_fee_split_invariant_boundary_odd_price_999.1.json index 5111519..9731b51 100644 --- a/creator-keys/test_snapshots/sell_fee_split_invariant_boundary_odd_price_999.1.json +++ b/creator-keys/test_snapshots/sell_fee_split_invariant_boundary_odd_price_999.1.json @@ -188,6 +188,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/sell_fee_split_invariant_boundary_price_one.1.json b/creator-keys/test_snapshots/sell_fee_split_invariant_boundary_price_one.1.json index be359d2..766f404 100644 --- a/creator-keys/test_snapshots/sell_fee_split_invariant_boundary_price_one.1.json +++ b/creator-keys/test_snapshots/sell_fee_split_invariant_boundary_price_one.1.json @@ -188,6 +188,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/sell_fee_split_invariant_boundary_price_two.1.json b/creator-keys/test_snapshots/sell_fee_split_invariant_boundary_price_two.1.json index 5b3bf6f..e75f9f8 100644 --- a/creator-keys/test_snapshots/sell_fee_split_invariant_boundary_price_two.1.json +++ b/creator-keys/test_snapshots/sell_fee_split_invariant_boundary_price_two.1.json @@ -188,6 +188,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/sell_fee_split_invariant_deterministic_assertions.1.json b/creator-keys/test_snapshots/sell_fee_split_invariant_deterministic_assertions.1.json index 419eb8e..4450e00 100644 --- a/creator-keys/test_snapshots/sell_fee_split_invariant_deterministic_assertions.1.json +++ b/creator-keys/test_snapshots/sell_fee_split_invariant_deterministic_assertions.1.json @@ -187,6 +187,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/sell_fee_split_invariant_large_amount.1.json b/creator-keys/test_snapshots/sell_fee_split_invariant_large_amount.1.json index 033d517..1e93347 100644 --- a/creator-keys/test_snapshots/sell_fee_split_invariant_large_amount.1.json +++ b/creator-keys/test_snapshots/sell_fee_split_invariant_large_amount.1.json @@ -187,6 +187,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/sell_fee_split_invariant_max_protocol_50_percent.1.json b/creator-keys/test_snapshots/sell_fee_split_invariant_max_protocol_50_percent.1.json index 90ce19a..3c7b787 100644 --- a/creator-keys/test_snapshots/sell_fee_split_invariant_max_protocol_50_percent.1.json +++ b/creator-keys/test_snapshots/sell_fee_split_invariant_max_protocol_50_percent.1.json @@ -187,6 +187,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/sell_fee_split_invariant_zero_net_boundary.1.json b/creator-keys/test_snapshots/sell_fee_split_invariant_zero_net_boundary.1.json index 1a79111..f700641 100644 --- a/creator-keys/test_snapshots/sell_fee_split_invariant_zero_net_boundary.1.json +++ b/creator-keys/test_snapshots/sell_fee_split_invariant_zero_net_boundary.1.json @@ -497,6 +497,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -583,6 +591,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -669,6 +685,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -755,6 +779,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/sell_quote_100_percent_creator_seller_net_is_zero_fees_absorb_full_price.1.json b/creator-keys/test_snapshots/sell_quote_100_percent_creator_seller_net_is_zero_fees_absorb_full_price.1.json index ad593e4..74befeb 100644 --- a/creator-keys/test_snapshots/sell_quote_100_percent_creator_seller_net_is_zero_fees_absorb_full_price.1.json +++ b/creator-keys/test_snapshots/sell_quote_100_percent_creator_seller_net_is_zero_fees_absorb_full_price.1.json @@ -187,6 +187,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/sell_quote_50_50_price_ten_equal_split_zero_net.1.json b/creator-keys/test_snapshots/sell_quote_50_50_price_ten_equal_split_zero_net.1.json index 746c24d..f22b939 100644 --- a/creator-keys/test_snapshots/sell_quote_50_50_price_ten_equal_split_zero_net.1.json +++ b/creator-keys/test_snapshots/sell_quote_50_50_price_ten_equal_split_zero_net.1.json @@ -189,6 +189,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/sell_quote_50_50_small_price_protocol_takes_first_floor_unit.1.json b/creator-keys/test_snapshots/sell_quote_50_50_small_price_protocol_takes_first_floor_unit.1.json index 6f0043f..83990e0 100644 --- a/creator-keys/test_snapshots/sell_quote_50_50_small_price_protocol_takes_first_floor_unit.1.json +++ b/creator-keys/test_snapshots/sell_quote_50_50_small_price_protocol_takes_first_floor_unit.1.json @@ -188,6 +188,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/sell_quote_90_10_dust_price_one_all_creator_no_protocol_rounding.1.json b/creator-keys/test_snapshots/sell_quote_90_10_dust_price_one_all_creator_no_protocol_rounding.1.json index 68defdf..d202598 100644 --- a/creator-keys/test_snapshots/sell_quote_90_10_dust_price_one_all_creator_no_protocol_rounding.1.json +++ b/creator-keys/test_snapshots/sell_quote_90_10_dust_price_one_all_creator_no_protocol_rounding.1.json @@ -189,6 +189,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/sell_quote_90_10_remainder_favors_creator_on_indivisible_price.1.json b/creator-keys/test_snapshots/sell_quote_90_10_remainder_favors_creator_on_indivisible_price.1.json index 5251025..c2e6dd8 100644 --- a/creator-keys/test_snapshots/sell_quote_90_10_remainder_favors_creator_on_indivisible_price.1.json +++ b/creator-keys/test_snapshots/sell_quote_90_10_remainder_favors_creator_on_indivisible_price.1.json @@ -188,6 +188,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/sell_quote_max_allowed_protocol_bps_50_50_dust_price_floors_protocol_share_to_zero.1.json b/creator-keys/test_snapshots/sell_quote_max_allowed_protocol_bps_50_50_dust_price_floors_protocol_share_to_zero.1.json index 04c7a6c..997ee8c 100644 --- a/creator-keys/test_snapshots/sell_quote_max_allowed_protocol_bps_50_50_dust_price_floors_protocol_share_to_zero.1.json +++ b/creator-keys/test_snapshots/sell_quote_max_allowed_protocol_bps_50_50_dust_price_floors_protocol_share_to_zero.1.json @@ -189,6 +189,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test/test_buy_event_topic_and_data_order_is_stable.1.json b/creator-keys/test_snapshots/test/test_buy_event_topic_and_data_order_is_stable.1.json index 7c32b54..bfa45bf 100644 --- a/creator-keys/test_snapshots/test/test_buy_event_topic_and_data_order_is_stable.1.json +++ b/creator-keys/test_snapshots/test/test_buy_event_topic_and_data_order_is_stable.1.json @@ -185,6 +185,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test/test_buy_key_insufficient_payment.1.json b/creator-keys/test_snapshots/test/test_buy_key_insufficient_payment.1.json index 3fbbbf8..929ca35 100644 --- a/creator-keys/test_snapshots/test/test_buy_key_insufficient_payment.1.json +++ b/creator-keys/test_snapshots/test/test_buy_key_insufficient_payment.1.json @@ -133,6 +133,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test/test_buy_key_success.1.json b/creator-keys/test_snapshots/test/test_buy_key_success.1.json index d79e29e..b94fe4d 100644 --- a/creator-keys/test_snapshots/test/test_buy_key_success.1.json +++ b/creator-keys/test_snapshots/test/test_buy_key_success.1.json @@ -161,6 +161,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test/test_duplicate_registration_fails.1.json b/creator-keys/test_snapshots/test/test_duplicate_registration_fails.1.json index 61ac89a..84f8c85 100644 --- a/creator-keys/test_snapshots/test/test_duplicate_registration_fails.1.json +++ b/creator-keys/test_snapshots/test/test_duplicate_registration_fails.1.json @@ -108,6 +108,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test/test_get_buy_quote_success.1.json b/creator-keys/test_snapshots/test/test_get_buy_quote_success.1.json index d938f48..b0dfb80 100644 --- a/creator-keys/test_snapshots/test/test_get_buy_quote_success.1.json +++ b/creator-keys/test_snapshots/test/test_get_buy_quote_success.1.json @@ -158,6 +158,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test/test_get_creator_fee_recipient_success.1.json b/creator-keys/test_snapshots/test/test_get_creator_fee_recipient_success.1.json index 61ac89a..84f8c85 100644 --- a/creator-keys/test_snapshots/test/test_get_creator_fee_recipient_success.1.json +++ b/creator-keys/test_snapshots/test/test_get_creator_fee_recipient_success.1.json @@ -108,6 +108,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test/test_get_creator_holder_count_counts_unique_holders.1.json b/creator-keys/test_snapshots/test/test_get_creator_holder_count_counts_unique_holders.1.json index 02f10f2..9d5c81d 100644 --- a/creator-keys/test_snapshots/test/test_get_creator_holder_count_counts_unique_holders.1.json +++ b/creator-keys/test_snapshots/test/test_get_creator_holder_count_counts_unique_holders.1.json @@ -218,6 +218,14 @@ "u32": 2 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test/test_get_fee_config_persists_across_repeated_reads.1.json b/creator-keys/test_snapshots/test/test_get_fee_config_persists_across_repeated_reads.1.json index 8b977ef..ef7851b 100644 --- a/creator-keys/test_snapshots/test/test_get_fee_config_persists_across_repeated_reads.1.json +++ b/creator-keys/test_snapshots/test/test_get_fee_config_persists_across_repeated_reads.1.json @@ -147,6 +147,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test/test_get_key_balance_returns_zero_for_unregistered_wallet.1.json b/creator-keys/test_snapshots/test/test_get_key_balance_returns_zero_for_unregistered_wallet.1.json index f659b6e..c868154 100644 --- a/creator-keys/test_snapshots/test/test_get_key_balance_returns_zero_for_unregistered_wallet.1.json +++ b/creator-keys/test_snapshots/test/test_get_key_balance_returns_zero_for_unregistered_wallet.1.json @@ -108,6 +108,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test/test_get_quote_fails_if_fee_not_set.1.json b/creator-keys/test_snapshots/test/test_get_quote_fails_if_fee_not_set.1.json index d6ba4c9..3f608e3 100644 --- a/creator-keys/test_snapshots/test/test_get_quote_fails_if_fee_not_set.1.json +++ b/creator-keys/test_snapshots/test/test_get_quote_fails_if_fee_not_set.1.json @@ -133,6 +133,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test/test_get_sell_quote_fails_if_insufficient_balance.1.json b/creator-keys/test_snapshots/test/test_get_sell_quote_fails_if_insufficient_balance.1.json index fa1bb07..953ea7c 100644 --- a/creator-keys/test_snapshots/test/test_get_sell_quote_fails_if_insufficient_balance.1.json +++ b/creator-keys/test_snapshots/test/test_get_sell_quote_fails_if_insufficient_balance.1.json @@ -158,6 +158,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test/test_get_sell_quote_success.1.json b/creator-keys/test_snapshots/test/test_get_sell_quote_success.1.json index e75965b..7f8ea06 100644 --- a/creator-keys/test_snapshots/test/test_get_sell_quote_success.1.json +++ b/creator-keys/test_snapshots/test/test_get_sell_quote_success.1.json @@ -186,6 +186,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test/test_quote_overflow_guards.1.json b/creator-keys/test_snapshots/test/test_quote_overflow_guards.1.json index bcb085a..309afaf 100644 --- a/creator-keys/test_snapshots/test/test_quote_overflow_guards.1.json +++ b/creator-keys/test_snapshots/test/test_quote_overflow_guards.1.json @@ -158,6 +158,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test/test_read_key_balance_returns_registered_creator_supply.1.json b/creator-keys/test_snapshots/test/test_read_key_balance_returns_registered_creator_supply.1.json index 6241aa9..8d9983d 100644 --- a/creator-keys/test_snapshots/test/test_read_key_balance_returns_registered_creator_supply.1.json +++ b/creator-keys/test_snapshots/test/test_read_key_balance_returns_registered_creator_supply.1.json @@ -86,6 +86,14 @@ "u32": 3 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test/test_register_creator.1.json b/creator-keys/test_snapshots/test/test_register_creator.1.json index 61ac89a..84f8c85 100644 --- a/creator-keys/test_snapshots/test/test_register_creator.1.json +++ b/creator-keys/test_snapshots/test/test_register_creator.1.json @@ -108,6 +108,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test/test_register_creator_persists_registration_metadata.1.json b/creator-keys/test_snapshots/test/test_register_creator_persists_registration_metadata.1.json index 61ac89a..84f8c85 100644 --- a/creator-keys/test_snapshots/test/test_register_creator_persists_registration_metadata.1.json +++ b/creator-keys/test_snapshots/test/test_register_creator_persists_registration_metadata.1.json @@ -108,6 +108,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test/test_register_event_fee_adjacent_fields_are_zero_and_ordered_after_identity_fields.1.json b/creator-keys/test_snapshots/test/test_register_event_fee_adjacent_fields_are_zero_and_ordered_after_identity_fields.1.json index 3d14841..945ea8e 100644 --- a/creator-keys/test_snapshots/test/test_register_event_fee_adjacent_fields_are_zero_and_ordered_after_identity_fields.1.json +++ b/creator-keys/test_snapshots/test/test_register_event_fee_adjacent_fields_are_zero_and_ordered_after_identity_fields.1.json @@ -107,6 +107,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test/test_register_event_field_order_is_stable.1.json b/creator-keys/test_snapshots/test/test_register_event_field_order_is_stable.1.json index cb5c4df..a6a6f1e 100644 --- a/creator-keys/test_snapshots/test/test_register_event_field_order_is_stable.1.json +++ b/creator-keys/test_snapshots/test/test_register_event_field_order_is_stable.1.json @@ -107,6 +107,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_assert_event_topic_matches_rejects_unexpected_identifier.1.json b/creator-keys/test_snapshots/test_assert_event_topic_matches_rejects_unexpected_identifier.1.json index 79aa282..807f929 100644 --- a/creator-keys/test_snapshots/test_assert_event_topic_matches_rejects_unexpected_identifier.1.json +++ b/creator-keys/test_snapshots/test_assert_event_topic_matches_rejects_unexpected_identifier.1.json @@ -132,6 +132,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_balance_after_buys_then_sells.1.json b/creator-keys/test_snapshots/test_balance_after_buys_then_sells.1.json index b64fa5b..060a7fe 100644 --- a/creator-keys/test_snapshots/test_balance_after_buys_then_sells.1.json +++ b/creator-keys/test_snapshots/test_balance_after_buys_then_sells.1.json @@ -317,6 +317,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_balance_after_sequence_of_buys_and_sells.1.json b/creator-keys/test_snapshots/test_balance_after_sequence_of_buys_and_sells.1.json index c08acbb..83fffc4 100644 --- a/creator-keys/test_snapshots/test_balance_after_sequence_of_buys_and_sells.1.json +++ b/creator-keys/test_snapshots/test_balance_after_sequence_of_buys_and_sells.1.json @@ -283,6 +283,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_balance_with_non_zero_initial.1.json b/creator-keys/test_snapshots/test_balance_with_non_zero_initial.1.json index 4efb72d..207b8d7 100644 --- a/creator-keys/test_snapshots/test_balance_with_non_zero_initial.1.json +++ b/creator-keys/test_snapshots/test_balance_with_non_zero_initial.1.json @@ -373,6 +373,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_batch_length_matches_input_length.1.json b/creator-keys/test_snapshots/test_batch_length_matches_input_length.1.json new file mode 100644 index 0000000..b63f33c --- /dev/null +++ b/creator-keys/test_snapshots/test_batch_length_matches_input_length.1.json @@ -0,0 +1,374 @@ +{ + "generators": { + "address": 4, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register_creator", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "string": "alice" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register_creator", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + }, + { + "string": "bob" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + }, + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "fee_recipient" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "handle" + }, + "val": { + "string": "alice" + } + }, + { + "key": { + "symbol": "holder_count" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "supply" + }, + "val": { + "u32": 0 + } + } + ] + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + ] + }, + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + }, + { + "key": { + "symbol": "fee_recipient" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + }, + { + "key": { + "symbol": "handle" + }, + "val": { + "string": "bob" + } + }, + { + "key": { + "symbol": "holder_count" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "supply" + }, + "val": { + "u32": 0 + } + } + ] + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": null + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/creator-keys/test_snapshots/test_batch_matches_individual_get_creator_details_calls.1.json b/creator-keys/test_snapshots/test_batch_matches_individual_get_creator_details_calls.1.json new file mode 100644 index 0000000..6563f7e --- /dev/null +++ b/creator-keys/test_snapshots/test_batch_matches_individual_get_creator_details_calls.1.json @@ -0,0 +1,376 @@ +{ + "generators": { + "address": 3, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register_creator", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "string": "alice" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register_creator", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + }, + { + "string": "bob" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [], + [], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 25, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + }, + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "fee_recipient" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "handle" + }, + "val": { + "string": "alice" + } + }, + { + "key": { + "symbol": "holder_count" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 15 + } + }, + { + "key": { + "symbol": "supply" + }, + "val": { + "u32": 0 + } + } + ] + } + } + }, + "ext": "v0" + }, + 4110 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + ] + }, + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + }, + { + "key": { + "symbol": "fee_recipient" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + }, + { + "key": { + "symbol": "handle" + }, + "val": { + "string": "bob" + } + }, + { + "key": { + "symbol": "holder_count" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 25 + } + }, + { + "key": { + "symbol": "supply" + }, + "val": { + "u32": 0 + } + } + ] + } + } + }, + "ext": "v0" + }, + 4120 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": null + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6312014 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6312024 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/creator-keys/test_snapshots/test_batch_mixed_registered_and_unregistered.1.json b/creator-keys/test_snapshots/test_batch_mixed_registered_and_unregistered.1.json new file mode 100644 index 0000000..4adedde --- /dev/null +++ b/creator-keys/test_snapshots/test_batch_mixed_registered_and_unregistered.1.json @@ -0,0 +1,374 @@ +{ + "generators": { + "address": 4, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register_creator", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "string": "alice" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register_creator", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" + }, + { + "string": "bob" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 22, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + }, + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "fee_recipient" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "handle" + }, + "val": { + "string": "alice" + } + }, + { + "key": { + "symbol": "holder_count" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 11 + } + }, + { + "key": { + "symbol": "supply" + }, + "val": { + "u32": 0 + } + } + ] + } + } + }, + "ext": "v0" + }, + 4106 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" + } + ] + }, + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" + } + }, + { + "key": { + "symbol": "fee_recipient" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" + } + }, + { + "key": { + "symbol": "handle" + }, + "val": { + "string": "bob" + } + }, + { + "key": { + "symbol": "holder_count" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 22 + } + }, + { + "key": { + "symbol": "supply" + }, + "val": { + "u32": 0 + } + } + ] + } + } + }, + "ext": "v0" + }, + 4117 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": null + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6312010 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6312021 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/creator-keys/test_snapshots/test_batch_preserves_input_order.1.json b/creator-keys/test_snapshots/test_batch_preserves_input_order.1.json new file mode 100644 index 0000000..7922bff --- /dev/null +++ b/creator-keys/test_snapshots/test_batch_preserves_input_order.1.json @@ -0,0 +1,523 @@ +{ + "generators": { + "address": 4, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register_creator", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "string": "alice" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register_creator", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + }, + { + "string": "bob" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register_creator", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" + }, + { + "string": "carol" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 30, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + }, + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "fee_recipient" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "handle" + }, + "val": { + "string": "alice" + } + }, + { + "key": { + "symbol": "holder_count" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 10 + } + }, + { + "key": { + "symbol": "supply" + }, + "val": { + "u32": 0 + } + } + ] + } + } + }, + "ext": "v0" + }, + 4105 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + ] + }, + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + }, + { + "key": { + "symbol": "fee_recipient" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + }, + { + "key": { + "symbol": "handle" + }, + "val": { + "string": "bob" + } + }, + { + "key": { + "symbol": "holder_count" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 20 + } + }, + { + "key": { + "symbol": "supply" + }, + "val": { + "u32": 0 + } + } + ] + } + } + }, + "ext": "v0" + }, + 4115 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" + } + ] + }, + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" + } + }, + { + "key": { + "symbol": "fee_recipient" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" + } + }, + { + "key": { + "symbol": "handle" + }, + "val": { + "string": "carol" + } + }, + { + "key": { + "symbol": "holder_count" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 30 + } + }, + { + "key": { + "symbol": "supply" + }, + "val": { + "u32": 0 + } + } + ] + } + } + }, + "ext": "v0" + }, + 4125 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": null + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6312009 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6312019 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6312029 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/creator-keys/test_snapshots/test_batch_registered_creators_have_correct_fields.1.json b/creator-keys/test_snapshots/test_batch_registered_creators_have_correct_fields.1.json new file mode 100644 index 0000000..b897ab6 --- /dev/null +++ b/creator-keys/test_snapshots/test_batch_registered_creators_have_correct_fields.1.json @@ -0,0 +1,225 @@ +{ + "generators": { + "address": 2, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register_creator", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "string": "alice" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 55, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + }, + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "fee_recipient" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "handle" + }, + "val": { + "string": "alice" + } + }, + { + "key": { + "symbol": "holder_count" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 55 + } + }, + { + "key": { + "symbol": "supply" + }, + "val": { + "u32": 0 + } + } + ] + } + } + }, + "ext": "v0" + }, + 4150 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": null + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6312054 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/creator-keys/test_snapshots/test_batch_returns_empty_vec_for_empty_input.1.json b/creator-keys/test_snapshots/test_batch_returns_empty_vec_for_empty_input.1.json new file mode 100644 index 0000000..a90f00a --- /dev/null +++ b/creator-keys/test_snapshots/test_batch_returns_empty_vec_for_empty_input.1.json @@ -0,0 +1,76 @@ +{ + "generators": { + "address": 1, + "nonce": 0 + }, + "auth": [ + [], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": null + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/creator-keys/test_snapshots/test_batch_unregistered_address_returns_safe_defaults.1.json b/creator-keys/test_snapshots/test_batch_unregistered_address_returns_safe_defaults.1.json new file mode 100644 index 0000000..5655749 --- /dev/null +++ b/creator-keys/test_snapshots/test_batch_unregistered_address_returns_safe_defaults.1.json @@ -0,0 +1,76 @@ +{ + "generators": { + "address": 2, + "nonce": 0 + }, + "auth": [ + [], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": null + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/creator-keys/test_snapshots/test_buy_credits_creator_fee_recipient_balance_by_bps_amount.1.json b/creator-keys/test_snapshots/test_buy_credits_creator_fee_recipient_balance_by_bps_amount.1.json index f0a54e6..1df8640 100644 --- a/creator-keys/test_snapshots/test_buy_credits_creator_fee_recipient_balance_by_bps_amount.1.json +++ b/creator-keys/test_snapshots/test_buy_credits_creator_fee_recipient_balance_by_bps_amount.1.json @@ -189,6 +189,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_event_buyer_address_field_is_non_zero.1.json b/creator-keys/test_snapshots/test_buy_event_buyer_address_field_is_non_zero.1.json index 3beecb0..a5fca9b 100644 --- a/creator-keys/test_snapshots/test_buy_event_buyer_address_field_is_non_zero.1.json +++ b/creator-keys/test_snapshots/test_buy_event_buyer_address_field_is_non_zero.1.json @@ -160,6 +160,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_event_buyer_address_matches_caller.1.json b/creator-keys/test_snapshots/test_buy_event_buyer_address_matches_caller.1.json index 3beecb0..a5fca9b 100644 --- a/creator-keys/test_snapshots/test_buy_event_buyer_address_matches_caller.1.json +++ b/creator-keys/test_snapshots/test_buy_event_buyer_address_matches_caller.1.json @@ -160,6 +160,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_key_event_includes_payment_amount.1.json b/creator-keys/test_snapshots/test_buy_key_event_includes_payment_amount.1.json index 359e55e..4e518e6 100644 --- a/creator-keys/test_snapshots/test_buy_key_event_includes_payment_amount.1.json +++ b/creator-keys/test_snapshots/test_buy_key_event_includes_payment_amount.1.json @@ -160,6 +160,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_key_event_payload_fields_are_validated_from_fixture.1.json b/creator-keys/test_snapshots/test_buy_key_event_payload_fields_are_validated_from_fixture.1.json index 359e55e..4e518e6 100644 --- a/creator-keys/test_snapshots/test_buy_key_event_payload_fields_are_validated_from_fixture.1.json +++ b/creator-keys/test_snapshots/test_buy_key_event_payload_fields_are_validated_from_fixture.1.json @@ -160,6 +160,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_key_event_payload_tracks_new_supply_across_purchases.1.json b/creator-keys/test_snapshots/test_buy_key_event_payload_tracks_new_supply_across_purchases.1.json index 205918d..6ea32ac 100644 --- a/creator-keys/test_snapshots/test_buy_key_event_payload_tracks_new_supply_across_purchases.1.json +++ b/creator-keys/test_snapshots/test_buy_key_event_payload_tracks_new_supply_across_purchases.1.json @@ -188,6 +188,14 @@ "u32": 2 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_key_event_present_after_purchase.1.json b/creator-keys/test_snapshots/test_buy_key_event_present_after_purchase.1.json index 3beecb0..a5fca9b 100644 --- a/creator-keys/test_snapshots/test_buy_key_event_present_after_purchase.1.json +++ b/creator-keys/test_snapshots/test_buy_key_event_present_after_purchase.1.json @@ -160,6 +160,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_key_event_topics_include_creator_and_buyer.1.json b/creator-keys/test_snapshots/test_buy_key_event_topics_include_creator_and_buyer.1.json index b20abf4..ffbb814 100644 --- a/creator-keys/test_snapshots/test_buy_key_event_topics_include_creator_and_buyer.1.json +++ b/creator-keys/test_snapshots/test_buy_key_event_topics_include_creator_and_buyer.1.json @@ -160,6 +160,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_key_insufficient_payment_fails.1.json b/creator-keys/test_snapshots/test_buy_key_insufficient_payment_fails.1.json index 3fbbbf8..929ca35 100644 --- a/creator-keys/test_snapshots/test_buy_key_insufficient_payment_fails.1.json +++ b/creator-keys/test_snapshots/test_buy_key_insufficient_payment_fails.1.json @@ -133,6 +133,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_key_negative_payment_fails.1.json b/creator-keys/test_snapshots/test_buy_key_negative_payment_fails.1.json index 3fbbbf8..929ca35 100644 --- a/creator-keys/test_snapshots/test_buy_key_negative_payment_fails.1.json +++ b/creator-keys/test_snapshots/test_buy_key_negative_payment_fails.1.json @@ -133,6 +133,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_key_positive_payment_succeeds.1.json b/creator-keys/test_snapshots/test_buy_key_positive_payment_succeeds.1.json index 3beecb0..a5fca9b 100644 --- a/creator-keys/test_snapshots/test_buy_key_positive_payment_succeeds.1.json +++ b/creator-keys/test_snapshots/test_buy_key_positive_payment_succeeds.1.json @@ -160,6 +160,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_key_sufficient_payment_succeeds.1.json b/creator-keys/test_snapshots/test_buy_key_sufficient_payment_succeeds.1.json index d79e29e..b94fe4d 100644 --- a/creator-keys/test_snapshots/test_buy_key_sufficient_payment_succeeds.1.json +++ b/creator-keys/test_snapshots/test_buy_key_sufficient_payment_succeeds.1.json @@ -161,6 +161,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_key_with_large_safe_amount_succeeds.1.json b/creator-keys/test_snapshots/test_buy_key_with_large_safe_amount_succeeds.1.json index 751e553..64dd718 100644 --- a/creator-keys/test_snapshots/test_buy_key_with_large_safe_amount_succeeds.1.json +++ b/creator-keys/test_snapshots/test_buy_key_with_large_safe_amount_succeeds.1.json @@ -136,6 +136,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_key_with_maximum_safe_i128_succeeds.1.json b/creator-keys/test_snapshots/test_buy_key_with_maximum_safe_i128_succeeds.1.json index 3f1318b..7a18a04 100644 --- a/creator-keys/test_snapshots/test_buy_key_with_maximum_safe_i128_succeeds.1.json +++ b/creator-keys/test_snapshots/test_buy_key_with_maximum_safe_i128_succeeds.1.json @@ -136,6 +136,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_key_zero_payment_fails.1.json b/creator-keys/test_snapshots/test_buy_key_zero_payment_fails.1.json index 3fbbbf8..929ca35 100644 --- a/creator-keys/test_snapshots/test_buy_key_zero_payment_fails.1.json +++ b/creator-keys/test_snapshots/test_buy_key_zero_payment_fails.1.json @@ -133,6 +133,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_deterministic_across_zero_supply_transition.1.json b/creator-keys/test_snapshots/test_buy_quote_deterministic_across_zero_supply_transition.1.json index ec74efc..36c88cc 100644 --- a/creator-keys/test_snapshots/test_buy_quote_deterministic_across_zero_supply_transition.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_deterministic_across_zero_supply_transition.1.json @@ -210,6 +210,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_fees_sum_to_total_minus_price.1.json b/creator-keys/test_snapshots/test_buy_quote_fees_sum_to_total_minus_price.1.json index 1289e6b..a401362 100644 --- a/creator-keys/test_snapshots/test_buy_quote_fees_sum_to_total_minus_price.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_fees_sum_to_total_minus_price.1.json @@ -214,6 +214,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_is_identical_across_consecutive_calls.1.json b/creator-keys/test_snapshots/test_buy_quote_is_identical_across_consecutive_calls.1.json index ceb50b8..a35fa43 100644 --- a/creator-keys/test_snapshots/test_buy_quote_is_identical_across_consecutive_calls.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_is_identical_across_consecutive_calls.1.json @@ -160,6 +160,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_is_stable_across_multiple_calls.1.json b/creator-keys/test_snapshots/test_buy_quote_is_stable_across_multiple_calls.1.json index f75bdf7..0fa0de9 100644 --- a/creator-keys/test_snapshots/test_buy_quote_is_stable_across_multiple_calls.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_is_stable_across_multiple_calls.1.json @@ -165,6 +165,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_monotonic_with_zero_creator_fee.1.json b/creator-keys/test_snapshots/test_buy_quote_monotonic_with_zero_creator_fee.1.json index 87fcf7e..c2a912e 100644 --- a/creator-keys/test_snapshots/test_buy_quote_monotonic_with_zero_creator_fee.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_monotonic_with_zero_creator_fee.1.json @@ -187,6 +187,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_monotonic_with_zero_protocol_fee.1.json b/creator-keys/test_snapshots/test_buy_quote_monotonic_with_zero_protocol_fee.1.json index 653267e..91ff67d 100644 --- a/creator-keys/test_snapshots/test_buy_quote_monotonic_with_zero_protocol_fee.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_monotonic_with_zero_protocol_fee.1.json @@ -187,6 +187,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_multiple_creators_independent_monotonicity.1.json b/creator-keys/test_snapshots/test_buy_quote_multiple_creators_independent_monotonicity.1.json index b8097e4..0220174 100644 --- a/creator-keys/test_snapshots/test_buy_quote_multiple_creators_independent_monotonicity.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_multiple_creators_independent_monotonicity.1.json @@ -241,6 +241,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -327,6 +335,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_price_point_1_is_stable.1.json b/creator-keys/test_snapshots/test_buy_quote_price_point_1_is_stable.1.json index 8c52780..e15876b 100644 --- a/creator-keys/test_snapshots/test_buy_quote_price_point_1_is_stable.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_price_point_1_is_stable.1.json @@ -187,6 +187,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_price_point_large_is_stable.1.json b/creator-keys/test_snapshots/test_buy_quote_price_point_large_is_stable.1.json index 1793156..7d650f4 100644 --- a/creator-keys/test_snapshots/test_buy_quote_price_point_large_is_stable.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_price_point_large_is_stable.1.json @@ -187,6 +187,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_price_unchanged_across_multiple_buyers_small_range.1.json b/creator-keys/test_snapshots/test_buy_quote_price_unchanged_across_multiple_buyers_small_range.1.json index 889a718..9653a17 100644 --- a/creator-keys/test_snapshots/test_buy_quote_price_unchanged_across_multiple_buyers_small_range.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_price_unchanged_across_multiple_buyers_small_range.1.json @@ -448,6 +448,14 @@ "u32": 10 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_price_unchanged_after_five_buys.1.json b/creator-keys/test_snapshots/test_buy_quote_price_unchanged_after_five_buys.1.json index 149f3d9..a7a42d2 100644 --- a/creator-keys/test_snapshots/test_buy_quote_price_unchanged_after_five_buys.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_price_unchanged_after_five_buys.1.json @@ -299,6 +299,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_price_unchanged_after_one_buy.1.json b/creator-keys/test_snapshots/test_buy_quote_price_unchanged_after_one_buy.1.json index 0a7dccc..30178b1 100644 --- a/creator-keys/test_snapshots/test_buy_quote_price_unchanged_after_one_buy.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_price_unchanged_after_one_buy.1.json @@ -187,6 +187,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_recomputed_after_sell_reduces_supply.1.json b/creator-keys/test_snapshots/test_buy_quote_recomputed_after_sell_reduces_supply.1.json index ef40488..f86e52f 100644 --- a/creator-keys/test_snapshots/test_buy_quote_recomputed_after_sell_reduces_supply.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_recomputed_after_sell_reduces_supply.1.json @@ -240,6 +240,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_stability_with_different_fee_configs.1.json b/creator-keys/test_snapshots/test_buy_quote_stability_with_different_fee_configs.1.json index 9d90f0f..069ee27 100644 --- a/creator-keys/test_snapshots/test_buy_quote_stability_with_different_fee_configs.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_stability_with_different_fee_configs.1.json @@ -272,6 +272,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_stable_across_50_sequential_purchases.1.json b/creator-keys/test_snapshots/test_buy_quote_stable_across_50_sequential_purchases.1.json index abc7e83..499fd23 100644 --- a/creator-keys/test_snapshots/test_buy_quote_stable_across_50_sequential_purchases.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_stable_across_50_sequential_purchases.1.json @@ -1608,6 +1608,14 @@ "u32": 50 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_stable_over_medium_volume_20_buys.1.json b/creator-keys/test_snapshots/test_buy_quote_stable_over_medium_volume_20_buys.1.json index afcc3d1..bf684c6 100644 --- a/creator-keys/test_snapshots/test_buy_quote_stable_over_medium_volume_20_buys.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_stable_over_medium_volume_20_buys.1.json @@ -738,6 +738,14 @@ "u32": 20 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_total_amount_never_below_price.1.json b/creator-keys/test_snapshots/test_buy_quote_total_amount_never_below_price.1.json index f0f5862..3a50c0d 100644 --- a/creator-keys/test_snapshots/test_buy_quote_total_amount_never_below_price.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_total_amount_never_below_price.1.json @@ -438,6 +438,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_total_amount_ordering_is_deterministic_small_range.1.json b/creator-keys/test_snapshots/test_buy_quote_total_amount_ordering_is_deterministic_small_range.1.json index cbe275e..1d3695c 100644 --- a/creator-keys/test_snapshots/test_buy_quote_total_amount_ordering_is_deterministic_small_range.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_total_amount_ordering_is_deterministic_small_range.1.json @@ -243,6 +243,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_unchanged_after_creator_registration.1.json b/creator-keys/test_snapshots/test_buy_quote_unchanged_after_creator_registration.1.json index c123f2c..c0e4059 100644 --- a/creator-keys/test_snapshots/test_buy_quote_unchanged_after_creator_registration.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_unchanged_after_creator_registration.1.json @@ -183,6 +183,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -269,6 +277,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_updates_after_fee_config_mutation.1.json b/creator-keys/test_snapshots/test_buy_quote_updates_after_fee_config_mutation.1.json index fed89d7..90e9c97 100644 --- a/creator-keys/test_snapshots/test_buy_quote_updates_after_fee_config_mutation.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_updates_after_fee_config_mutation.1.json @@ -184,6 +184,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_with_large_amount_succeeds.1.json b/creator-keys/test_snapshots/test_buy_quote_with_large_amount_succeeds.1.json index 3fae247..146ecbd 100644 --- a/creator-keys/test_snapshots/test_buy_quote_with_large_amount_succeeds.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_with_large_amount_succeeds.1.json @@ -134,6 +134,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_with_maximum_safe_amount_50_50_fees_succeeds.1.json b/creator-keys/test_snapshots/test_buy_quote_with_maximum_safe_amount_50_50_fees_succeeds.1.json index 5608678..06e2b9f 100644 --- a/creator-keys/test_snapshots/test_buy_quote_with_maximum_safe_amount_50_50_fees_succeeds.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_with_maximum_safe_amount_50_50_fees_succeeds.1.json @@ -134,6 +134,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_with_maximum_safe_amount_succeeds.1.json b/creator-keys/test_snapshots/test_buy_quote_with_maximum_safe_amount_succeeds.1.json index bee8b3a..9c1c2b2 100644 --- a/creator-keys/test_snapshots/test_buy_quote_with_maximum_safe_amount_succeeds.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_with_maximum_safe_amount_succeeds.1.json @@ -134,6 +134,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_zero_supply_consistent_across_calls.1.json b/creator-keys/test_snapshots/test_buy_quote_zero_supply_consistent_across_calls.1.json index 8eb9254..776d8bd 100644 --- a/creator-keys/test_snapshots/test_buy_quote_zero_supply_consistent_across_calls.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_zero_supply_consistent_across_calls.1.json @@ -160,6 +160,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_zero_supply_returns_first_key_price.1.json b/creator-keys/test_snapshots/test_buy_quote_zero_supply_returns_first_key_price.1.json index d938f48..b0dfb80 100644 --- a/creator-keys/test_snapshots/test_buy_quote_zero_supply_returns_first_key_price.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_zero_supply_returns_first_key_price.1.json @@ -158,6 +158,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_zero_supply_various_prices.1.json b/creator-keys/test_snapshots/test_buy_quote_zero_supply_various_prices.1.json index b44790c..5e233de 100644 --- a/creator-keys/test_snapshots/test_buy_quote_zero_supply_various_prices.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_zero_supply_various_prices.1.json @@ -523,6 +523,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -609,6 +617,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -695,6 +711,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -781,6 +805,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -867,6 +899,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -953,6 +993,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_quote_zero_supply_well_formed.1.json b/creator-keys/test_snapshots/test_buy_quote_zero_supply_well_formed.1.json index 66d689b..61fa4a8 100644 --- a/creator-keys/test_snapshots/test_buy_quote_zero_supply_well_formed.1.json +++ b/creator-keys/test_snapshots/test_buy_quote_zero_supply_well_formed.1.json @@ -158,6 +158,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_buy_then_sell_has_symmetric_price_impact_after_fees.1.json b/creator-keys/test_snapshots/test_buy_then_sell_has_symmetric_price_impact_after_fees.1.json index 2a628ba..d29bcf8 100644 --- a/creator-keys/test_snapshots/test_buy_then_sell_has_symmetric_price_impact_after_fees.1.json +++ b/creator-keys/test_snapshots/test_buy_then_sell_has_symmetric_price_impact_after_fees.1.json @@ -213,6 +213,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_creator_details_consistency_across_ten_reads.1.json b/creator-keys/test_snapshots/test_creator_details_consistency_across_ten_reads.1.json index 71740b5..acbb443 100644 --- a/creator-keys/test_snapshots/test_creator_details_consistency_across_ten_reads.1.json +++ b/creator-keys/test_snapshots/test_creator_details_consistency_across_ten_reads.1.json @@ -117,6 +117,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_creator_details_identical_across_five_consecutive_reads_after_buy.1.json b/creator-keys/test_snapshots/test_creator_details_identical_across_five_consecutive_reads_after_buy.1.json index e3b24d8..d981207 100644 --- a/creator-keys/test_snapshots/test_creator_details_identical_across_five_consecutive_reads_after_buy.1.json +++ b/creator-keys/test_snapshots/test_creator_details_identical_across_five_consecutive_reads_after_buy.1.json @@ -165,6 +165,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_creator_details_identical_across_three_consecutive_reads.1.json b/creator-keys/test_snapshots/test_creator_details_identical_across_three_consecutive_reads.1.json index 15dd524..f38e9f7 100644 --- a/creator-keys/test_snapshots/test_creator_details_identical_across_three_consecutive_reads.1.json +++ b/creator-keys/test_snapshots/test_creator_details_identical_across_three_consecutive_reads.1.json @@ -110,6 +110,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_creator_details_no_storage_writes_during_reads.1.json b/creator-keys/test_snapshots/test_creator_details_no_storage_writes_during_reads.1.json index bb7cbec..d2ace78 100644 --- a/creator-keys/test_snapshots/test_creator_details_no_storage_writes_during_reads.1.json +++ b/creator-keys/test_snapshots/test_creator_details_no_storage_writes_during_reads.1.json @@ -117,6 +117,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_fee_config_update_does_not_affect_other_creator.1.json b/creator-keys/test_snapshots/test_fee_config_update_does_not_affect_other_creator.1.json index de795c8..b5dd837 100644 --- a/creator-keys/test_snapshots/test_fee_config_update_does_not_affect_other_creator.1.json +++ b/creator-keys/test_snapshots/test_fee_config_update_does_not_affect_other_creator.1.json @@ -208,6 +208,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -294,6 +302,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_buy_quote_zero_amount_returns_noop_quote.1.json b/creator-keys/test_snapshots/test_get_buy_quote_zero_amount_returns_noop_quote.1.json index e490cf6..235b2f0 100644 --- a/creator-keys/test_snapshots/test_get_buy_quote_zero_amount_returns_noop_quote.1.json +++ b/creator-keys/test_snapshots/test_get_buy_quote_zero_amount_returns_noop_quote.1.json @@ -109,6 +109,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_creator_details_reflects_latest_state_after_buy_then_sell.1.json b/creator-keys/test_snapshots/test_get_creator_details_reflects_latest_state_after_buy_then_sell.1.json index 55c8b0a..7d85370 100644 --- a/creator-keys/test_snapshots/test_get_creator_details_reflects_latest_state_after_buy_then_sell.1.json +++ b/creator-keys/test_snapshots/test_get_creator_details_reflects_latest_state_after_buy_then_sell.1.json @@ -185,6 +185,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_creator_details_registered_returns_correct_data.1.json b/creator-keys/test_snapshots/test_get_creator_details_registered_returns_correct_data.1.json index 61ac89a..84f8c85 100644 --- a/creator-keys/test_snapshots/test_get_creator_details_registered_returns_correct_data.1.json +++ b/creator-keys/test_snapshots/test_get_creator_details_registered_returns_correct_data.1.json @@ -108,6 +108,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_creator_details_updates_after_buy.1.json b/creator-keys/test_snapshots/test_get_creator_details_updates_after_buy.1.json index 9c6cd4e..f5c206c 100644 --- a/creator-keys/test_snapshots/test_get_creator_details_updates_after_buy.1.json +++ b/creator-keys/test_snapshots/test_get_creator_details_updates_after_buy.1.json @@ -162,6 +162,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_creator_fee_bps_is_read_only.1.json b/creator-keys/test_snapshots/test_get_creator_fee_bps_is_read_only.1.json index 204b74d..115ea81 100644 --- a/creator-keys/test_snapshots/test_get_creator_fee_bps_is_read_only.1.json +++ b/creator-keys/test_snapshots/test_get_creator_fee_bps_is_read_only.1.json @@ -134,6 +134,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_creator_fee_bps_returns_configured_value.1.json b/creator-keys/test_snapshots/test_get_creator_fee_bps_returns_configured_value.1.json index 2ba58ea..d5d506d 100644 --- a/creator-keys/test_snapshots/test_get_creator_fee_bps_returns_configured_value.1.json +++ b/creator-keys/test_snapshots/test_get_creator_fee_bps_returns_configured_value.1.json @@ -133,6 +133,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_creator_fee_bps_tracks_fee_config_updates.1.json b/creator-keys/test_snapshots/test_get_creator_fee_bps_tracks_fee_config_updates.1.json index 5d79d51..2da25e3 100644 --- a/creator-keys/test_snapshots/test_get_creator_fee_bps_tracks_fee_config_updates.1.json +++ b/creator-keys/test_snapshots/test_get_creator_fee_bps_tracks_fee_config_updates.1.json @@ -159,6 +159,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_creator_fee_config_is_read_only.1.json b/creator-keys/test_snapshots/test_get_creator_fee_config_is_read_only.1.json index e6c96e7..9ce4fc8 100644 --- a/creator-keys/test_snapshots/test_get_creator_fee_config_is_read_only.1.json +++ b/creator-keys/test_snapshots/test_get_creator_fee_config_is_read_only.1.json @@ -134,6 +134,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_creator_fee_config_multiple_creators_independent.1.json b/creator-keys/test_snapshots/test_get_creator_fee_config_multiple_creators_independent.1.json index f98e7d4..a17db31 100644 --- a/creator-keys/test_snapshots/test_get_creator_fee_config_multiple_creators_independent.1.json +++ b/creator-keys/test_snapshots/test_get_creator_fee_config_multiple_creators_independent.1.json @@ -156,6 +156,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -242,6 +250,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_creator_fee_config_registered_no_fee_config.1.json b/creator-keys/test_snapshots/test_get_creator_fee_config_registered_no_fee_config.1.json index d2ee2fc..be84845 100644 --- a/creator-keys/test_snapshots/test_get_creator_fee_config_registered_no_fee_config.1.json +++ b/creator-keys/test_snapshots/test_get_creator_fee_config_registered_no_fee_config.1.json @@ -108,6 +108,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_creator_fee_config_registered_with_fee_config.1.json b/creator-keys/test_snapshots/test_get_creator_fee_config_registered_with_fee_config.1.json index c2ac65e..80e9725 100644 --- a/creator-keys/test_snapshots/test_get_creator_fee_config_registered_with_fee_config.1.json +++ b/creator-keys/test_snapshots/test_get_creator_fee_config_registered_with_fee_config.1.json @@ -133,6 +133,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_creator_fee_config_updates_after_fee_reconfiguration.1.json b/creator-keys/test_snapshots/test_get_creator_fee_config_updates_after_fee_reconfiguration.1.json index f89b153..6045e39 100644 --- a/creator-keys/test_snapshots/test_get_creator_fee_config_updates_after_fee_reconfiguration.1.json +++ b/creator-keys/test_snapshots/test_get_creator_fee_config_updates_after_fee_reconfiguration.1.json @@ -159,6 +159,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_creator_fee_recipient_is_read_only.1.json b/creator-keys/test_snapshots/test_get_creator_fee_recipient_is_read_only.1.json index 50bd1dc..2036455 100644 --- a/creator-keys/test_snapshots/test_get_creator_fee_recipient_is_read_only.1.json +++ b/creator-keys/test_snapshots/test_get_creator_fee_recipient_is_read_only.1.json @@ -109,6 +109,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_creator_fee_recipient_returns_creator_address.1.json b/creator-keys/test_snapshots/test_get_creator_fee_recipient_returns_creator_address.1.json index 61ac89a..84f8c85 100644 --- a/creator-keys/test_snapshots/test_get_creator_fee_recipient_returns_creator_address.1.json +++ b/creator-keys/test_snapshots/test_get_creator_fee_recipient_returns_creator_address.1.json @@ -108,6 +108,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_creator_supply_is_read_only.1.json b/creator-keys/test_snapshots/test_get_creator_supply_is_read_only.1.json index 7ad7c86..1a1d5f7 100644 --- a/creator-keys/test_snapshots/test_get_creator_supply_is_read_only.1.json +++ b/creator-keys/test_snapshots/test_get_creator_supply_is_read_only.1.json @@ -162,6 +162,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_creator_supply_returns_current_supply.1.json b/creator-keys/test_snapshots/test_get_creator_supply_returns_current_supply.1.json index f682f6f..4d26401 100644 --- a/creator-keys/test_snapshots/test_get_creator_supply_returns_current_supply.1.json +++ b/creator-keys/test_snapshots/test_get_creator_supply_returns_current_supply.1.json @@ -189,6 +189,14 @@ "u32": 2 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_creator_treasury_share_is_read_only.1.json b/creator-keys/test_snapshots/test_get_creator_treasury_share_is_read_only.1.json index 3cd296c..60e2482 100644 --- a/creator-keys/test_snapshots/test_get_creator_treasury_share_is_read_only.1.json +++ b/creator-keys/test_snapshots/test_get_creator_treasury_share_is_read_only.1.json @@ -134,6 +134,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_creator_treasury_share_returns_configured_value.1.json b/creator-keys/test_snapshots/test_get_creator_treasury_share_returns_configured_value.1.json index 2ba58ea..d5d506d 100644 --- a/creator-keys/test_snapshots/test_get_creator_treasury_share_returns_configured_value.1.json +++ b/creator-keys/test_snapshots/test_get_creator_treasury_share_returns_configured_value.1.json @@ -133,6 +133,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_creators_batch_success.1.json b/creator-keys/test_snapshots/test_get_creators_batch_success.1.json new file mode 100644 index 0000000..f9e64b8 --- /dev/null +++ b/creator-keys/test_snapshots/test_get_creators_batch_success.1.json @@ -0,0 +1,374 @@ +{ + "generators": { + "address": 4, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register_creator", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "string": "alice" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register_creator", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + }, + { + "string": "bob" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 20, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + }, + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "fee_recipient" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "handle" + }, + "val": { + "string": "alice" + } + }, + { + "key": { + "symbol": "holder_count" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 10 + } + }, + { + "key": { + "symbol": "supply" + }, + "val": { + "u32": 0 + } + } + ] + } + } + }, + "ext": "v0" + }, + 4105 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + ] + }, + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + }, + { + "key": { + "symbol": "fee_recipient" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + }, + { + "key": { + "symbol": "handle" + }, + "val": { + "string": "bob" + } + }, + { + "key": { + "symbol": "holder_count" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 20 + } + }, + { + "key": { + "symbol": "supply" + }, + "val": { + "u32": 0 + } + } + ] + } + } + }, + "ext": "v0" + }, + 4115 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": null + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6312009 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6312019 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/creator-keys/test_snapshots/test_get_key_decimals_stable_after_state_changes.1.json b/creator-keys/test_snapshots/test_get_key_decimals_stable_after_state_changes.1.json index 79659c5..e383d93 100644 --- a/creator-keys/test_snapshots/test_get_key_decimals_stable_after_state_changes.1.json +++ b/creator-keys/test_snapshots/test_get_key_decimals_stable_after_state_changes.1.json @@ -186,6 +186,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_key_name_success.1.json b/creator-keys/test_snapshots/test_get_key_name_success.1.json index 61ac89a..84f8c85 100644 --- a/creator-keys/test_snapshots/test_get_key_name_success.1.json +++ b/creator-keys/test_snapshots/test_get_key_name_success.1.json @@ -108,6 +108,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_key_symbol_success.1.json b/creator-keys/test_snapshots/test_get_key_symbol_success.1.json index 61ac89a..84f8c85 100644 --- a/creator-keys/test_snapshots/test_get_key_symbol_success.1.json +++ b/creator-keys/test_snapshots/test_get_key_symbol_success.1.json @@ -108,6 +108,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_protocol_state_version_increments_only_on_config_updates.1.json b/creator-keys/test_snapshots/test_get_protocol_state_version_increments_only_on_config_updates.1.json index 8cdcff0..e9c6a2f 100644 --- a/creator-keys/test_snapshots/test_get_protocol_state_version_increments_only_on_config_updates.1.json +++ b/creator-keys/test_snapshots/test_get_protocol_state_version_increments_only_on_config_updates.1.json @@ -210,6 +210,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_sell_quote_zero_amount_returns_noop_quote.1.json b/creator-keys/test_snapshots/test_get_sell_quote_zero_amount_returns_noop_quote.1.json index c014de0..673957e 100644 --- a/creator-keys/test_snapshots/test_get_sell_quote_zero_amount_returns_noop_quote.1.json +++ b/creator-keys/test_snapshots/test_get_sell_quote_zero_amount_returns_noop_quote.1.json @@ -162,6 +162,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_total_key_supply_increments_after_buy.1.json b/creator-keys/test_snapshots/test_get_total_key_supply_increments_after_buy.1.json index 897483d..58799a3 100644 --- a/creator-keys/test_snapshots/test_get_total_key_supply_increments_after_buy.1.json +++ b/creator-keys/test_snapshots/test_get_total_key_supply_increments_after_buy.1.json @@ -191,6 +191,14 @@ "u32": 2 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_total_key_supply_is_read_only.1.json b/creator-keys/test_snapshots/test_get_total_key_supply_is_read_only.1.json index a95a667..b3bd5d5 100644 --- a/creator-keys/test_snapshots/test_get_total_key_supply_is_read_only.1.json +++ b/creator-keys/test_snapshots/test_get_total_key_supply_is_read_only.1.json @@ -135,6 +135,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_get_total_key_supply_returns_zero_for_new_creator.1.json b/creator-keys/test_snapshots/test_get_total_key_supply_returns_zero_for_new_creator.1.json index fc9f97d..9ffc4fe 100644 --- a/creator-keys/test_snapshots/test_get_total_key_supply_returns_zero_for_new_creator.1.json +++ b/creator-keys/test_snapshots/test_get_total_key_supply_returns_zero_for_new_creator.1.json @@ -133,6 +133,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_holder_count_reflects_mixed_trade_correctly.1.json b/creator-keys/test_snapshots/test_holder_count_reflects_mixed_trade_correctly.1.json index b333912..93903ec 100644 --- a/creator-keys/test_snapshots/test_holder_count_reflects_mixed_trade_correctly.1.json +++ b/creator-keys/test_snapshots/test_holder_count_reflects_mixed_trade_correctly.1.json @@ -236,6 +236,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_holder_count_returns_to_zero_after_last_holder_exit_and_rebuy.1.json b/creator-keys/test_snapshots/test_holder_count_returns_to_zero_after_last_holder_exit_and_rebuy.1.json index 1e73a81..c178c78 100644 --- a/creator-keys/test_snapshots/test_holder_count_returns_to_zero_after_last_holder_exit_and_rebuy.1.json +++ b/creator-keys/test_snapshots/test_holder_count_returns_to_zero_after_last_holder_exit_and_rebuy.1.json @@ -213,6 +213,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_holder_count_unchanged_when_holder_still_has_keys.1.json b/creator-keys/test_snapshots/test_holder_count_unchanged_when_holder_still_has_keys.1.json index d5110ea..de3a6cf 100644 --- a/creator-keys/test_snapshots/test_holder_count_unchanged_when_holder_still_has_keys.1.json +++ b/creator-keys/test_snapshots/test_holder_count_unchanged_when_holder_still_has_keys.1.json @@ -212,6 +212,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_holder_key_count_view_consistency_with_get_key_balance.1.json b/creator-keys/test_snapshots/test_holder_key_count_view_consistency_with_get_key_balance.1.json index 8ae363b..99d377a 100644 --- a/creator-keys/test_snapshots/test_holder_key_count_view_consistency_with_get_key_balance.1.json +++ b/creator-keys/test_snapshots/test_holder_key_count_view_consistency_with_get_key_balance.1.json @@ -218,6 +218,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_holder_key_count_view_increments_on_buy.1.json b/creator-keys/test_snapshots/test_holder_key_count_view_increments_on_buy.1.json index 20b67eb..c418163 100644 --- a/creator-keys/test_snapshots/test_holder_key_count_view_increments_on_buy.1.json +++ b/creator-keys/test_snapshots/test_holder_key_count_view_increments_on_buy.1.json @@ -191,6 +191,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_holder_key_count_view_multiple_holders.1.json b/creator-keys/test_snapshots/test_holder_key_count_view_multiple_holders.1.json index 45ca09f..6f7bf03 100644 --- a/creator-keys/test_snapshots/test_holder_key_count_view_multiple_holders.1.json +++ b/creator-keys/test_snapshots/test_holder_key_count_view_multiple_holders.1.json @@ -246,6 +246,14 @@ "u32": 2 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_holder_key_count_view_no_state_mutation.1.json b/creator-keys/test_snapshots/test_holder_key_count_view_no_state_mutation.1.json index 7fe4f3f..d579ae4 100644 --- a/creator-keys/test_snapshots/test_holder_key_count_view_no_state_mutation.1.json +++ b/creator-keys/test_snapshots/test_holder_key_count_view_no_state_mutation.1.json @@ -191,6 +191,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_holder_key_count_view_registered_creator_unseen_wallet.1.json b/creator-keys/test_snapshots/test_holder_key_count_view_registered_creator_unseen_wallet.1.json index f406606..07a4bb1 100644 --- a/creator-keys/test_snapshots/test_holder_key_count_view_registered_creator_unseen_wallet.1.json +++ b/creator-keys/test_snapshots/test_holder_key_count_view_registered_creator_unseen_wallet.1.json @@ -189,6 +189,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_holder_key_count_view_starts_at_zero.1.json b/creator-keys/test_snapshots/test_holder_key_count_view_starts_at_zero.1.json index 2edeb16..e53bc19 100644 --- a/creator-keys/test_snapshots/test_holder_key_count_view_starts_at_zero.1.json +++ b/creator-keys/test_snapshots/test_holder_key_count_view_starts_at_zero.1.json @@ -133,6 +133,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_holder_key_count_view_structure_fields.1.json b/creator-keys/test_snapshots/test_holder_key_count_view_structure_fields.1.json index b7c6a47..ac67044 100644 --- a/creator-keys/test_snapshots/test_holder_key_count_view_structure_fields.1.json +++ b/creator-keys/test_snapshots/test_holder_key_count_view_structure_fields.1.json @@ -161,6 +161,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_holder_key_count_view_zero_keys_different_creators.1.json b/creator-keys/test_snapshots/test_holder_key_count_view_zero_keys_different_creators.1.json index 28ca0e5..28a7b3f 100644 --- a/creator-keys/test_snapshots/test_holder_key_count_view_zero_keys_different_creators.1.json +++ b/creator-keys/test_snapshots/test_holder_key_count_view_zero_keys_different_creators.1.json @@ -212,6 +212,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -298,6 +306,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_identical_fee_configs_apply_independently.1.json b/creator-keys/test_snapshots/test_identical_fee_configs_apply_independently.1.json index 0022551..77d840c 100644 --- a/creator-keys/test_snapshots/test_identical_fee_configs_apply_independently.1.json +++ b/creator-keys/test_snapshots/test_identical_fee_configs_apply_independently.1.json @@ -241,6 +241,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -327,6 +335,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_is_creator_registered_different_creators_independent.1.json b/creator-keys/test_snapshots/test_is_creator_registered_different_creators_independent.1.json index f683210..97ae791 100644 --- a/creator-keys/test_snapshots/test_is_creator_registered_different_creators_independent.1.json +++ b/creator-keys/test_snapshots/test_is_creator_registered_different_creators_independent.1.json @@ -109,6 +109,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_is_creator_registered_is_read_only.1.json b/creator-keys/test_snapshots/test_is_creator_registered_is_read_only.1.json index 15dd524..f38e9f7 100644 --- a/creator-keys/test_snapshots/test_is_creator_registered_is_read_only.1.json +++ b/creator-keys/test_snapshots/test_is_creator_registered_is_read_only.1.json @@ -110,6 +110,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_is_creator_registered_returns_true_after_registration.1.json b/creator-keys/test_snapshots/test_is_creator_registered_returns_true_after_registration.1.json index 61ac89a..84f8c85 100644 --- a/creator-keys/test_snapshots/test_is_creator_registered_returns_true_after_registration.1.json +++ b/creator-keys/test_snapshots/test_is_creator_registered_returns_true_after_registration.1.json @@ -108,6 +108,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_key_balance_decrements_correctly_after_each_partial_sell.1.json b/creator-keys/test_snapshots/test_key_balance_decrements_correctly_after_each_partial_sell.1.json index 6889c0a..de5b48b 100644 --- a/creator-keys/test_snapshots/test_key_balance_decrements_correctly_after_each_partial_sell.1.json +++ b/creator-keys/test_snapshots/test_key_balance_decrements_correctly_after_each_partial_sell.1.json @@ -343,6 +343,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_key_balance_increments_on_buy.1.json b/creator-keys/test_snapshots/test_key_balance_increments_on_buy.1.json index 5a7f462..7b073fe 100644 --- a/creator-keys/test_snapshots/test_key_balance_increments_on_buy.1.json +++ b/creator-keys/test_snapshots/test_key_balance_increments_on_buy.1.json @@ -191,6 +191,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_key_balance_is_per_buyer.1.json b/creator-keys/test_snapshots/test_key_balance_is_per_buyer.1.json index 02f10f2..9d5c81d 100644 --- a/creator-keys/test_snapshots/test_key_balance_is_per_buyer.1.json +++ b/creator-keys/test_snapshots/test_key_balance_is_per_buyer.1.json @@ -218,6 +218,14 @@ "u32": 2 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_key_balance_is_per_creator.1.json b/creator-keys/test_snapshots/test_key_balance_is_per_creator.1.json index 13bd265..ea7cffa 100644 --- a/creator-keys/test_snapshots/test_key_balance_is_per_creator.1.json +++ b/creator-keys/test_snapshots/test_key_balance_is_per_creator.1.json @@ -184,6 +184,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -270,6 +278,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_key_balance_zero_for_registered_creator_and_unseen_wallet.1.json b/creator-keys/test_snapshots/test_key_balance_zero_for_registered_creator_and_unseen_wallet.1.json index a3f8c6c..33d31b5 100644 --- a/creator-keys/test_snapshots/test_key_balance_zero_for_registered_creator_and_unseen_wallet.1.json +++ b/creator-keys/test_snapshots/test_key_balance_zero_for_registered_creator_and_unseen_wallet.1.json @@ -161,6 +161,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_key_balance_zero_for_unregistered_creator_even_when_other_balances_exist.1.json b/creator-keys/test_snapshots/test_key_balance_zero_for_unregistered_creator_even_when_other_balances_exist.1.json index 2338c0e..c1af06d 100644 --- a/creator-keys/test_snapshots/test_key_balance_zero_for_unregistered_creator_even_when_other_balances_exist.1.json +++ b/creator-keys/test_snapshots/test_key_balance_zero_for_unregistered_creator_even_when_other_balances_exist.1.json @@ -161,6 +161,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_register_creator_accepts_max_handle_length.1.json b/creator-keys/test_snapshots/test_register_creator_accepts_max_handle_length.1.json index a3be84b..86d819a 100644 --- a/creator-keys/test_snapshots/test_register_creator_accepts_max_handle_length.1.json +++ b/creator-keys/test_snapshots/test_register_creator_accepts_max_handle_length.1.json @@ -108,6 +108,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_register_creator_accepts_min_handle_length.1.json b/creator-keys/test_snapshots/test_register_creator_accepts_min_handle_length.1.json index 7c61f82..056afa3 100644 --- a/creator-keys/test_snapshots/test_register_creator_accepts_min_handle_length.1.json +++ b/creator-keys/test_snapshots/test_register_creator_accepts_min_handle_length.1.json @@ -108,6 +108,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_register_creator_different_addresses_succeeds.1.json b/creator-keys/test_snapshots/test_register_creator_different_addresses_succeeds.1.json index 55b2977..276ae84 100644 --- a/creator-keys/test_snapshots/test_register_creator_different_addresses_succeeds.1.json +++ b/creator-keys/test_snapshots/test_register_creator_different_addresses_succeeds.1.json @@ -131,6 +131,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -217,6 +225,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_register_creator_duplicate_different_handle_fails.1.json b/creator-keys/test_snapshots/test_register_creator_duplicate_different_handle_fails.1.json index 61ac89a..84f8c85 100644 --- a/creator-keys/test_snapshots/test_register_creator_duplicate_different_handle_fails.1.json +++ b/creator-keys/test_snapshots/test_register_creator_duplicate_different_handle_fails.1.json @@ -108,6 +108,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_register_creator_duplicate_fails.1.json b/creator-keys/test_snapshots/test_register_creator_duplicate_fails.1.json index 61ac89a..84f8c85 100644 --- a/creator-keys/test_snapshots/test_register_creator_duplicate_fails.1.json +++ b/creator-keys/test_snapshots/test_register_creator_duplicate_fails.1.json @@ -108,6 +108,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_register_creator_emits_event.1.json b/creator-keys/test_snapshots/test_register_creator_emits_event.1.json index 79aa282..807f929 100644 --- a/creator-keys/test_snapshots/test_register_creator_emits_event.1.json +++ b/creator-keys/test_snapshots/test_register_creator_emits_event.1.json @@ -132,6 +132,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_register_creator_event_data_is_indexer_friendly.1.json b/creator-keys/test_snapshots/test_register_creator_event_data_is_indexer_friendly.1.json index 79aa282..807f929 100644 --- a/creator-keys/test_snapshots/test_register_creator_event_data_is_indexer_friendly.1.json +++ b/creator-keys/test_snapshots/test_register_creator_event_data_is_indexer_friendly.1.json @@ -132,6 +132,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_register_creator_event_field_values_match_fixtures.1.json b/creator-keys/test_snapshots/test_register_creator_event_field_values_match_fixtures.1.json index 911e72a..b7c7020 100644 --- a/creator-keys/test_snapshots/test_register_creator_event_field_values_match_fixtures.1.json +++ b/creator-keys/test_snapshots/test_register_creator_event_field_values_match_fixtures.1.json @@ -132,6 +132,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_register_creator_event_fields_update_with_fee_config.1.json b/creator-keys/test_snapshots/test_register_creator_event_fields_update_with_fee_config.1.json index 33515a8..931f1b3 100644 --- a/creator-keys/test_snapshots/test_register_creator_event_fields_update_with_fee_config.1.json +++ b/creator-keys/test_snapshots/test_register_creator_event_fields_update_with_fee_config.1.json @@ -179,6 +179,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -265,6 +273,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_register_creator_event_fires_once.1.json b/creator-keys/test_snapshots/test_register_creator_event_fires_once.1.json index 5976a1a..72c446e 100644 --- a/creator-keys/test_snapshots/test_register_creator_event_fires_once.1.json +++ b/creator-keys/test_snapshots/test_register_creator_event_fires_once.1.json @@ -132,6 +132,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_register_creator_max_length_handle_succeeds.1.json b/creator-keys/test_snapshots/test_register_creator_max_length_handle_succeeds.1.json index a3be84b..86d819a 100644 --- a/creator-keys/test_snapshots/test_register_creator_max_length_handle_succeeds.1.json +++ b/creator-keys/test_snapshots/test_register_creator_max_length_handle_succeeds.1.json @@ -108,6 +108,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_registered_at_enables_chronological_sort.1.json b/creator-keys/test_snapshots/test_registered_at_enables_chronological_sort.1.json new file mode 100644 index 0000000..9105167 --- /dev/null +++ b/creator-keys/test_snapshots/test_registered_at_enables_chronological_sort.1.json @@ -0,0 +1,523 @@ +{ + "generators": { + "address": 4, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register_creator", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "string": "first" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register_creator", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + }, + { + "string": "second" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register_creator", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" + }, + { + "string": "third" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 300, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + }, + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "fee_recipient" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "handle" + }, + "val": { + "string": "first" + } + }, + { + "key": { + "symbol": "holder_count" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 100 + } + }, + { + "key": { + "symbol": "supply" + }, + "val": { + "u32": 0 + } + } + ] + } + } + }, + "ext": "v0" + }, + 4195 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + ] + }, + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + }, + { + "key": { + "symbol": "fee_recipient" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + }, + { + "key": { + "symbol": "handle" + }, + "val": { + "string": "second" + } + }, + { + "key": { + "symbol": "holder_count" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 200 + } + }, + { + "key": { + "symbol": "supply" + }, + "val": { + "u32": 0 + } + } + ] + } + } + }, + "ext": "v0" + }, + 4295 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" + } + ] + }, + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" + } + }, + { + "key": { + "symbol": "fee_recipient" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" + } + }, + { + "key": { + "symbol": "handle" + }, + "val": { + "string": "third" + } + }, + { + "key": { + "symbol": "holder_count" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 300 + } + }, + { + "key": { + "symbol": "supply" + }, + "val": { + "u32": 0 + } + } + ] + } + } + }, + "ext": "v0" + }, + 4395 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": null + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6312099 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6312199 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6312299 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/creator-keys/test_snapshots/test_registered_at_is_captured_at_registration_sequence.1.json b/creator-keys/test_snapshots/test_registered_at_is_captured_at_registration_sequence.1.json new file mode 100644 index 0000000..e6df219 --- /dev/null +++ b/creator-keys/test_snapshots/test_registered_at_is_captured_at_registration_sequence.1.json @@ -0,0 +1,225 @@ +{ + "generators": { + "address": 2, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register_creator", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "string": "alice" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 42, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + }, + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "fee_recipient" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "handle" + }, + "val": { + "string": "alice" + } + }, + { + "key": { + "symbol": "holder_count" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 42 + } + }, + { + "key": { + "symbol": "supply" + }, + "val": { + "u32": 0 + } + } + ] + } + } + }, + "ext": "v0" + }, + 4137 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": null + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6312041 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/creator-keys/test_snapshots/test_registered_at_is_immutable_after_buy_and_sell.1.json b/creator-keys/test_snapshots/test_registered_at_is_immutable_after_buy_and_sell.1.json new file mode 100644 index 0000000..6d7482b --- /dev/null +++ b/creator-keys/test_snapshots/test_registered_at_is_immutable_after_buy_and_sell.1.json @@ -0,0 +1,492 @@ +{ + "generators": { + "address": 4, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register_creator", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "string": "alice" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "set_key_price", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + }, + { + "i128": { + "hi": 0, + "lo": 500 + } + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "buy_key", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" + }, + { + "i128": { + "hi": 0, + "lo": 500 + } + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "sell_key", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 200, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + }, + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "fee_recipient" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "handle" + }, + "val": { + "string": "alice" + } + }, + { + "key": { + "symbol": "holder_count" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 100 + } + }, + { + "key": { + "symbol": "supply" + }, + "val": { + "u32": 0 + } + } + ] + } + } + }, + "ext": "v0" + }, + 4195 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "KeyBalance" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" + } + ] + }, + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "KeyBalance" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" + } + ] + }, + "durability": "persistent", + "val": { + "u32": 0 + } + } + }, + "ext": "v0" + }, + 4295 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "KeyPrice" + } + ] + }, + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "KeyPrice" + } + ] + }, + "durability": "persistent", + "val": { + "i128": { + "hi": 0, + "lo": 500 + } + } + } + }, + "ext": "v0" + }, + 4295 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": null + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6312099 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6312199 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6312199 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + "key": { + "ledger_key_nonce": { + "nonce": 4837995959683129791 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + "key": { + "ledger_key_nonce": { + "nonce": 4837995959683129791 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6312199 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/creator-keys/test_snapshots/test_registered_at_is_read_only.1.json b/creator-keys/test_snapshots/test_registered_at_is_read_only.1.json new file mode 100644 index 0000000..ad7033c --- /dev/null +++ b/creator-keys/test_snapshots/test_registered_at_is_read_only.1.json @@ -0,0 +1,227 @@ +{ + "generators": { + "address": 2, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register_creator", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "string": "alice" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [], + [], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 77, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + }, + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "Creator" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "fee_recipient" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "handle" + }, + "val": { + "string": "alice" + } + }, + { + "key": { + "symbol": "holder_count" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 77 + } + }, + { + "key": { + "symbol": "supply" + }, + "val": { + "u32": 0 + } + } + ] + } + } + }, + "ext": "v0" + }, + 4172 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": null + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6312076 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/creator-keys/test_snapshots/test_registered_at_is_zero_for_unregistered_creator.1.json b/creator-keys/test_snapshots/test_registered_at_is_zero_for_unregistered_creator.1.json new file mode 100644 index 0000000..5655749 --- /dev/null +++ b/creator-keys/test_snapshots/test_registered_at_is_zero_for_unregistered_creator.1.json @@ -0,0 +1,76 @@ +{ + "generators": { + "address": 2, + "nonce": 0 + }, + "auth": [ + [], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": null + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/creator-keys/test_snapshots/test_repeated_zero_amount_quote_calls_no_state_drift.1.json b/creator-keys/test_snapshots/test_repeated_zero_amount_quote_calls_no_state_drift.1.json index 2e7d43c..f7aceff 100644 --- a/creator-keys/test_snapshots/test_repeated_zero_amount_quote_calls_no_state_drift.1.json +++ b/creator-keys/test_snapshots/test_repeated_zero_amount_quote_calls_no_state_drift.1.json @@ -181,6 +181,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_after_buy_succeeds_without_underflow_error.1.json b/creator-keys/test_snapshots/test_sell_after_buy_succeeds_without_underflow_error.1.json index fcae5e2..8f206b9 100644 --- a/creator-keys/test_snapshots/test_sell_after_buy_succeeds_without_underflow_error.1.json +++ b/creator-keys/test_snapshots/test_sell_after_buy_succeeds_without_underflow_error.1.json @@ -182,6 +182,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_event_seller_address_field_is_non_zero.1.json b/creator-keys/test_snapshots/test_sell_event_seller_address_field_is_non_zero.1.json index fcae5e2..8f206b9 100644 --- a/creator-keys/test_snapshots/test_sell_event_seller_address_field_is_non_zero.1.json +++ b/creator-keys/test_snapshots/test_sell_event_seller_address_field_is_non_zero.1.json @@ -182,6 +182,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_event_seller_address_matches_caller.1.json b/creator-keys/test_snapshots/test_sell_event_seller_address_matches_caller.1.json index fcae5e2..8f206b9 100644 --- a/creator-keys/test_snapshots/test_sell_event_seller_address_matches_caller.1.json +++ b/creator-keys/test_snapshots/test_sell_event_seller_address_matches_caller.1.json @@ -182,6 +182,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_execution_applies_updated_protocol_fee.1.json b/creator-keys/test_snapshots/test_sell_execution_applies_updated_protocol_fee.1.json index 3099e31..1e64993 100644 --- a/creator-keys/test_snapshots/test_sell_execution_applies_updated_protocol_fee.1.json +++ b/creator-keys/test_snapshots/test_sell_execution_applies_updated_protocol_fee.1.json @@ -235,6 +235,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_execution_fee_matches_quote_after_fee_config_update.1.json b/creator-keys/test_snapshots/test_sell_execution_fee_matches_quote_after_fee_config_update.1.json index 1a031e4..a9ac344 100644 --- a/creator-keys/test_snapshots/test_sell_execution_fee_matches_quote_after_fee_config_update.1.json +++ b/creator-keys/test_snapshots/test_sell_execution_fee_matches_quote_after_fee_config_update.1.json @@ -236,6 +236,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_full_exit_then_rebuy_updates_state.1.json b/creator-keys/test_snapshots/test_sell_full_exit_then_rebuy_updates_state.1.json index 6d8b844..f3168d7 100644 --- a/creator-keys/test_snapshots/test_sell_full_exit_then_rebuy_updates_state.1.json +++ b/creator-keys/test_snapshots/test_sell_full_exit_then_rebuy_updates_state.1.json @@ -219,6 +219,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_increases_protocol_fee_recipient_balance_by_bps_fee.1.json b/creator-keys/test_snapshots/test_sell_increases_protocol_fee_recipient_balance_by_bps_fee.1.json index 3c2b03e..6eeee89 100644 --- a/creator-keys/test_snapshots/test_sell_increases_protocol_fee_recipient_balance_by_bps_fee.1.json +++ b/creator-keys/test_snapshots/test_sell_increases_protocol_fee_recipient_balance_by_bps_fee.1.json @@ -232,6 +232,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_key_decrements_supply_and_balance.1.json b/creator-keys/test_snapshots/test_sell_key_decrements_supply_and_balance.1.json index d5110ea..de3a6cf 100644 --- a/creator-keys/test_snapshots/test_sell_key_decrements_supply_and_balance.1.json +++ b/creator-keys/test_snapshots/test_sell_key_decrements_supply_and_balance.1.json @@ -212,6 +212,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_key_event_payload_fields_are_validated_from_fixture.1.json b/creator-keys/test_snapshots/test_sell_key_event_payload_fields_are_validated_from_fixture.1.json index 7c70713..9c2081c 100644 --- a/creator-keys/test_snapshots/test_sell_key_event_payload_fields_are_validated_from_fixture.1.json +++ b/creator-keys/test_snapshots/test_sell_key_event_payload_fields_are_validated_from_fixture.1.json @@ -210,6 +210,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_key_event_payload_tracks_zero_supply_after_last_sale.1.json b/creator-keys/test_snapshots/test_sell_key_event_payload_tracks_zero_supply_after_last_sale.1.json index fcae5e2..8f206b9 100644 --- a/creator-keys/test_snapshots/test_sell_key_event_payload_tracks_zero_supply_after_last_sale.1.json +++ b/creator-keys/test_snapshots/test_sell_key_event_payload_tracks_zero_supply_after_last_sale.1.json @@ -182,6 +182,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_key_fails_when_seller_has_no_keys.1.json b/creator-keys/test_snapshots/test_sell_key_fails_when_seller_has_no_keys.1.json index 3fbbbf8..929ca35 100644 --- a/creator-keys/test_snapshots/test_sell_key_fails_when_seller_has_no_keys.1.json +++ b/creator-keys/test_snapshots/test_sell_key_fails_when_seller_has_no_keys.1.json @@ -133,6 +133,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_key_preserves_holder_count_when_seller_still_has_keys.1.json b/creator-keys/test_snapshots/test_sell_key_preserves_holder_count_when_seller_still_has_keys.1.json index 5293b23..4a135ce 100644 --- a/creator-keys/test_snapshots/test_sell_key_preserves_holder_count_when_seller_still_has_keys.1.json +++ b/creator-keys/test_snapshots/test_sell_key_preserves_holder_count_when_seller_still_has_keys.1.json @@ -213,6 +213,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_key_removes_holder_when_last_key_is_sold.1.json b/creator-keys/test_snapshots/test_sell_key_removes_holder_when_last_key_is_sold.1.json index 16ab270..5f1c9de 100644 --- a/creator-keys/test_snapshots/test_sell_key_removes_holder_when_last_key_is_sold.1.json +++ b/creator-keys/test_snapshots/test_sell_key_removes_holder_when_last_key_is_sold.1.json @@ -186,6 +186,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_protocol_fee_recipient_balance_accumulates_across_two_sells.1.json b/creator-keys/test_snapshots/test_sell_protocol_fee_recipient_balance_accumulates_across_two_sells.1.json index 32f0702..8e8984d 100644 --- a/creator-keys/test_snapshots/test_sell_protocol_fee_recipient_balance_accumulates_across_two_sells.1.json +++ b/creator-keys/test_snapshots/test_sell_protocol_fee_recipient_balance_accumulates_across_two_sells.1.json @@ -282,6 +282,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_quote_proceeds_match_execution_at_supply_five.1.json b/creator-keys/test_snapshots/test_sell_quote_proceeds_match_execution_at_supply_five.1.json index 4f39dcb..58f2329 100644 --- a/creator-keys/test_snapshots/test_sell_quote_proceeds_match_execution_at_supply_five.1.json +++ b/creator-keys/test_snapshots/test_sell_quote_proceeds_match_execution_at_supply_five.1.json @@ -325,6 +325,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_quote_proceeds_match_execution_at_supply_one.1.json b/creator-keys/test_snapshots/test_sell_quote_proceeds_match_execution_at_supply_one.1.json index 641709f..85c1fe6 100644 --- a/creator-keys/test_snapshots/test_sell_quote_proceeds_match_execution_at_supply_one.1.json +++ b/creator-keys/test_snapshots/test_sell_quote_proceeds_match_execution_at_supply_one.1.json @@ -213,6 +213,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_quote_with_large_amount_succeeds.1.json b/creator-keys/test_snapshots/test_sell_quote_with_large_amount_succeeds.1.json index d319dba..a49e528 100644 --- a/creator-keys/test_snapshots/test_sell_quote_with_large_amount_succeeds.1.json +++ b/creator-keys/test_snapshots/test_sell_quote_with_large_amount_succeeds.1.json @@ -163,6 +163,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_quote_with_maximum_safe_amount_50_50_fees_succeeds.1.json b/creator-keys/test_snapshots/test_sell_quote_with_maximum_safe_amount_50_50_fees_succeeds.1.json index 5b284b2..a1dddf6 100644 --- a/creator-keys/test_snapshots/test_sell_quote_with_maximum_safe_amount_50_50_fees_succeeds.1.json +++ b/creator-keys/test_snapshots/test_sell_quote_with_maximum_safe_amount_50_50_fees_succeeds.1.json @@ -163,6 +163,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_quote_with_maximum_safe_amount_succeeds.1.json b/creator-keys/test_snapshots/test_sell_quote_with_maximum_safe_amount_succeeds.1.json index c70dcdd..283217e 100644 --- a/creator-keys/test_snapshots/test_sell_quote_with_maximum_safe_amount_succeeds.1.json +++ b/creator-keys/test_snapshots/test_sell_quote_with_maximum_safe_amount_succeeds.1.json @@ -163,6 +163,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_quote_zero_amount_holder_no_keys_returns_zero_quote.1.json b/creator-keys/test_snapshots/test_sell_quote_zero_amount_holder_no_keys_returns_zero_quote.1.json index aaaf3d7..5effdb6 100644 --- a/creator-keys/test_snapshots/test_sell_quote_zero_amount_holder_no_keys_returns_zero_quote.1.json +++ b/creator-keys/test_snapshots/test_sell_quote_zero_amount_holder_no_keys_returns_zero_quote.1.json @@ -159,6 +159,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_quote_zero_amount_no_state_modification.1.json b/creator-keys/test_snapshots/test_sell_quote_zero_amount_no_state_modification.1.json index 4bae2c3..1795723 100644 --- a/creator-keys/test_snapshots/test_sell_quote_zero_amount_no_state_modification.1.json +++ b/creator-keys/test_snapshots/test_sell_quote_zero_amount_no_state_modification.1.json @@ -197,6 +197,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_quote_zero_amount_returns_zero_quote.1.json b/creator-keys/test_snapshots/test_sell_quote_zero_amount_returns_zero_quote.1.json index a13e5d8..2e690e4 100644 --- a/creator-keys/test_snapshots/test_sell_quote_zero_amount_returns_zero_quote.1.json +++ b/creator-keys/test_snapshots/test_sell_quote_zero_amount_returns_zero_quote.1.json @@ -187,6 +187,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_quote_zero_supply_boundary_is_rejected.1.json b/creator-keys/test_snapshots/test_sell_quote_zero_supply_boundary_is_rejected.1.json index 5fffb0e..7a9fdbe 100644 --- a/creator-keys/test_snapshots/test_sell_quote_zero_supply_boundary_is_rejected.1.json +++ b/creator-keys/test_snapshots/test_sell_quote_zero_supply_boundary_is_rejected.1.json @@ -158,6 +158,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_reverts_when_seller_has_insufficient_balance.1.json b/creator-keys/test_snapshots/test_sell_reverts_when_seller_has_insufficient_balance.1.json index bbe8a26..7891c40 100644 --- a/creator-keys/test_snapshots/test_sell_reverts_when_seller_has_insufficient_balance.1.json +++ b/creator-keys/test_snapshots/test_sell_reverts_when_seller_has_insufficient_balance.1.json @@ -191,6 +191,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_second_key_after_selling_last_returns_insufficient_balance.1.json b/creator-keys/test_snapshots/test_sell_second_key_after_selling_last_returns_insufficient_balance.1.json index 277709d..718ad6c 100644 --- a/creator-keys/test_snapshots/test_sell_second_key_after_selling_last_returns_insufficient_balance.1.json +++ b/creator-keys/test_snapshots/test_sell_second_key_after_selling_last_returns_insufficient_balance.1.json @@ -183,6 +183,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_two_keys_succeeds_without_underflow_error.1.json b/creator-keys/test_snapshots/test_sell_two_keys_succeeds_without_underflow_error.1.json index e3652ca..4636cdb 100644 --- a/creator-keys/test_snapshots/test_sell_two_keys_succeeds_without_underflow_error.1.json +++ b/creator-keys/test_snapshots/test_sell_two_keys_succeeds_without_underflow_error.1.json @@ -232,6 +232,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_sell_with_no_keys_returns_insufficient_balance.1.json b/creator-keys/test_snapshots/test_sell_with_no_keys_returns_insufficient_balance.1.json index 3fbbbf8..929ca35 100644 --- a/creator-keys/test_snapshots/test_sell_with_no_keys_returns_insufficient_balance.1.json +++ b/creator-keys/test_snapshots/test_sell_with_no_keys_returns_insufficient_balance.1.json @@ -133,6 +133,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_supply_alternating_buys_and_sells.1.json b/creator-keys/test_snapshots/test_supply_alternating_buys_and_sells.1.json index 78e09ba..7c12b67 100644 --- a/creator-keys/test_snapshots/test_supply_alternating_buys_and_sells.1.json +++ b/creator-keys/test_snapshots/test_supply_alternating_buys_and_sells.1.json @@ -234,6 +234,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_supply_and_balance_decremented_correctly_after_sell.1.json b/creator-keys/test_snapshots/test_supply_and_balance_decremented_correctly_after_sell.1.json index d5110ea..de3a6cf 100644 --- a/creator-keys/test_snapshots/test_supply_and_balance_decremented_correctly_after_sell.1.json +++ b/creator-keys/test_snapshots/test_supply_and_balance_decremented_correctly_after_sell.1.json @@ -212,6 +212,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_supply_buy_then_sell_returns_to_zero.1.json b/creator-keys/test_snapshots/test_supply_buy_then_sell_returns_to_zero.1.json index 29c8e9b..be513b2 100644 --- a/creator-keys/test_snapshots/test_supply_buy_then_sell_returns_to_zero.1.json +++ b/creator-keys/test_snapshots/test_supply_buy_then_sell_returns_to_zero.1.json @@ -185,6 +185,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_supply_buy_two_sell_one_conserves_supply.1.json b/creator-keys/test_snapshots/test_supply_buy_two_sell_one_conserves_supply.1.json index 0c7a900..baf0111 100644 --- a/creator-keys/test_snapshots/test_supply_buy_two_sell_one_conserves_supply.1.json +++ b/creator-keys/test_snapshots/test_supply_buy_two_sell_one_conserves_supply.1.json @@ -212,6 +212,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_supply_changes_for_one_creator_do_not_affect_another.1.json b/creator-keys/test_snapshots/test_supply_changes_for_one_creator_do_not_affect_another.1.json index 866f0de..2182ccb 100644 --- a/creator-keys/test_snapshots/test_supply_changes_for_one_creator_do_not_affect_another.1.json +++ b/creator-keys/test_snapshots/test_supply_changes_for_one_creator_do_not_affect_another.1.json @@ -234,6 +234,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" @@ -320,6 +328,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_supply_mixed_trades_three_participants.1.json b/creator-keys/test_snapshots/test_supply_mixed_trades_three_participants.1.json index fa90841..423679c 100644 --- a/creator-keys/test_snapshots/test_supply_mixed_trades_three_participants.1.json +++ b/creator-keys/test_snapshots/test_supply_mixed_trades_three_participants.1.json @@ -343,6 +343,14 @@ "u32": 2 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_supply_multiple_buys_per_holder_sum_equals_total.1.json b/creator-keys/test_snapshots/test_supply_multiple_buys_per_holder_sum_equals_total.1.json index 41c8335..d0a1293 100644 --- a/creator-keys/test_snapshots/test_supply_multiple_buys_per_holder_sum_equals_total.1.json +++ b/creator-keys/test_snapshots/test_supply_multiple_buys_per_holder_sum_equals_total.1.json @@ -219,6 +219,14 @@ "u32": 2 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_supply_never_goes_below_zero_after_all_sells.1.json b/creator-keys/test_snapshots/test_supply_never_goes_below_zero_after_all_sells.1.json index d5ae7ae..73eafd2 100644 --- a/creator-keys/test_snapshots/test_supply_never_goes_below_zero_after_all_sells.1.json +++ b/creator-keys/test_snapshots/test_supply_never_goes_below_zero_after_all_sells.1.json @@ -283,6 +283,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_supply_three_buyers_sum_equals_total.1.json b/creator-keys/test_snapshots/test_supply_three_buyers_sum_equals_total.1.json index 32820f4..154f8e6 100644 --- a/creator-keys/test_snapshots/test_supply_three_buyers_sum_equals_total.1.json +++ b/creator-keys/test_snapshots/test_supply_three_buyers_sum_equals_total.1.json @@ -220,6 +220,14 @@ "u32": 3 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_total_supply_unchanged_after_failed_sell_insufficient_balance.1.json b/creator-keys/test_snapshots/test_total_supply_unchanged_after_failed_sell_insufficient_balance.1.json index 1c15255..9ae72a8 100644 --- a/creator-keys/test_snapshots/test_total_supply_unchanged_after_failed_sell_insufficient_balance.1.json +++ b/creator-keys/test_snapshots/test_total_supply_unchanged_after_failed_sell_insufficient_balance.1.json @@ -163,6 +163,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_total_supply_unchanged_after_failed_sell_not_registered.1.json b/creator-keys/test_snapshots/test_total_supply_unchanged_after_failed_sell_not_registered.1.json index 4b760c4..2e76898 100644 --- a/creator-keys/test_snapshots/test_total_supply_unchanged_after_failed_sell_not_registered.1.json +++ b/creator-keys/test_snapshots/test_total_supply_unchanged_after_failed_sell_not_registered.1.json @@ -163,6 +163,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_treasury_accumulates_protocol_fees_across_distinct_buyers.1.json b/creator-keys/test_snapshots/test_treasury_accumulates_protocol_fees_across_distinct_buyers.1.json index c7124cd..d1d6c0d 100644 --- a/creator-keys/test_snapshots/test_treasury_accumulates_protocol_fees_across_distinct_buyers.1.json +++ b/creator-keys/test_snapshots/test_treasury_accumulates_protocol_fees_across_distinct_buyers.1.json @@ -273,6 +273,14 @@ "u32": 3 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_treasury_balance_unchanged_after_failed_buy_insufficient_payment.1.json b/creator-keys/test_snapshots/test_treasury_balance_unchanged_after_failed_buy_insufficient_payment.1.json index 9f79a59..92f7e2c 100644 --- a/creator-keys/test_snapshots/test_treasury_balance_unchanged_after_failed_buy_insufficient_payment.1.json +++ b/creator-keys/test_snapshots/test_treasury_balance_unchanged_after_failed_buy_insufficient_payment.1.json @@ -182,6 +182,14 @@ "u32": 0 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_treasury_balance_unchanged_after_failed_buy_unregistered_creator.1.json b/creator-keys/test_snapshots/test_treasury_balance_unchanged_after_failed_buy_unregistered_creator.1.json index 0926134..d345e71 100644 --- a/creator-keys/test_snapshots/test_treasury_balance_unchanged_after_failed_buy_unregistered_creator.1.json +++ b/creator-keys/test_snapshots/test_treasury_balance_unchanged_after_failed_buy_unregistered_creator.1.json @@ -210,6 +210,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_treasury_balance_unchanged_after_failed_sell_insufficient_balance.1.json b/creator-keys/test_snapshots/test_treasury_balance_unchanged_after_failed_sell_insufficient_balance.1.json index 0926134..d345e71 100644 --- a/creator-keys/test_snapshots/test_treasury_balance_unchanged_after_failed_sell_insufficient_balance.1.json +++ b/creator-keys/test_snapshots/test_treasury_balance_unchanged_after_failed_sell_insufficient_balance.1.json @@ -210,6 +210,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_zero_creator_bps_full_payment_to_creator_after_protocol_fee.1.json b/creator-keys/test_snapshots/test_zero_creator_bps_full_payment_to_creator_after_protocol_fee.1.json index 107f7ac..1d67d5b 100644 --- a/creator-keys/test_snapshots/test_zero_creator_bps_full_payment_to_creator_after_protocol_fee.1.json +++ b/creator-keys/test_snapshots/test_zero_creator_bps_full_payment_to_creator_after_protocol_fee.1.json @@ -187,6 +187,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_zero_creator_bps_no_rounding_errors_with_odd_amounts.1.json b/creator-keys/test_snapshots/test_zero_creator_bps_no_rounding_errors_with_odd_amounts.1.json index ab2d5a8..9cd5f7b 100644 --- a/creator-keys/test_snapshots/test_zero_creator_bps_no_rounding_errors_with_odd_amounts.1.json +++ b/creator-keys/test_snapshots/test_zero_creator_bps_no_rounding_errors_with_odd_amounts.1.json @@ -186,6 +186,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_zero_creator_bps_with_partial_protocol_fee.1.json b/creator-keys/test_snapshots/test_zero_creator_bps_with_partial_protocol_fee.1.json index b0c2908..4b4042e 100644 --- a/creator-keys/test_snapshots/test_zero_creator_bps_with_partial_protocol_fee.1.json +++ b/creator-keys/test_snapshots/test_zero_creator_bps_with_partial_protocol_fee.1.json @@ -187,6 +187,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/test_snapshots/test_zero_protocol_bps_full_payment_to_creator.1.json b/creator-keys/test_snapshots/test_zero_protocol_bps_full_payment_to_creator.1.json index 72e2fae..17e474f 100644 --- a/creator-keys/test_snapshots/test_zero_protocol_bps_full_payment_to_creator.1.json +++ b/creator-keys/test_snapshots/test_zero_protocol_bps_full_payment_to_creator.1.json @@ -187,6 +187,14 @@ "u32": 1 } }, + { + "key": { + "symbol": "registered_at" + }, + "val": { + "u32": 0 + } + }, { "key": { "symbol": "supply" diff --git a/creator-keys/tests/contract_test_env/mod.rs b/creator-keys/tests/contract_test_env/mod.rs index 72c4a45..fbe1752 100644 --- a/creator-keys/tests/contract_test_env/mod.rs +++ b/creator-keys/tests/contract_test_env/mod.rs @@ -26,6 +26,16 @@ pub fn set_test_timestamp(env: &Env, timestamp: u64) { env.ledger().set(ledger); } +/// Sets the ledger sequence number to a deterministic value. +/// +/// Use this in tests that assert on `registered_at` so the expected value is +/// known at the call site rather than inferred from the default sequence. +pub fn set_ledger_sequence(env: &Env, sequence: u32) { + let mut ledger = env.ledger().get(); + ledger.sequence_number = sequence; + env.ledger().set(ledger); +} + /// Default [`Env`] for tests: enables mocked authorization for authed entrypoints. pub fn test_env_with_auths() -> Env { let env = Env::default(); diff --git a/creator-keys/tests/creators_batch.rs b/creator-keys/tests/creators_batch.rs new file mode 100644 index 0000000..bd7be09 --- /dev/null +++ b/creator-keys/tests/creators_batch.rs @@ -0,0 +1,403 @@ +//! Integration tests for `get_creators_batch` and the `registered_at` field. +//! +//! Covers: +//! - `registered_at` is captured at registration time and returned by +//! `get_creator_details` and `get_creators_batch`. +//! - Unregistered addresses in a batch return `is_registered: false` and +//! `registered_at: 0` without panicking. +//! - Batch output length and order match the input slice exactly. +//! - Multiple creators registered at different ledger sequences carry +//! independent `registered_at` values, enabling chronological sorting. + +mod contract_test_env; + +use contract_test_env::{ + register_creator_keys, register_test_creator, set_ledger_sequence, test_env_with_auths, +}; +use soroban_sdk::{testutils::Address as _, Address, Vec}; + +// --------------------------------------------------------------------------- +// registered_at — single-creator tests +// --------------------------------------------------------------------------- + +#[test] +fn test_registered_at_is_captured_at_registration_sequence() { + let env = test_env_with_auths(); + let (client, _) = register_creator_keys(&env); + + // Pin the ledger sequence to a known value before registering. + set_ledger_sequence(&env, 42); + let creator = register_test_creator(&env, &client, "alice"); + + let details = client.get_creator_details(&creator); + assert!(details.is_registered); + assert_eq!( + details.registered_at, 42, + "registered_at must equal the ledger sequence at registration time" + ); +} + +#[test] +fn test_registered_at_is_zero_for_unregistered_creator() { + let env = test_env_with_auths(); + let (client, _) = register_creator_keys(&env); + + let unknown = Address::generate(&env); + let details = client.get_creator_details(&unknown); + + assert!(!details.is_registered); + assert_eq!( + details.registered_at, 0, + "unregistered creator must return registered_at: 0" + ); +} + +#[test] +fn test_registered_at_is_immutable_after_buy_and_sell() { + let env = test_env_with_auths(); + let (client, _) = register_creator_keys(&env); + + set_ledger_sequence(&env, 100); + let creator = register_test_creator(&env, &client, "alice"); + + // Advance the ledger sequence and perform state-mutating operations. + set_ledger_sequence(&env, 200); + let admin = Address::generate(&env); + client.set_key_price(&admin, &500_i128); + let buyer = Address::generate(&env); + client.buy_key(&creator, &buyer, &500_i128); + client.sell_key(&creator, &buyer); + + // registered_at must still reflect the original registration sequence. + let details = client.get_creator_details(&creator); + assert_eq!( + details.registered_at, 100, + "registered_at must not change after buy/sell mutations" + ); +} + +#[test] +fn test_registered_at_is_read_only() { + let env = test_env_with_auths(); + let (client, _) = register_creator_keys(&env); + + set_ledger_sequence(&env, 77); + let creator = register_test_creator(&env, &client, "alice"); + + // Multiple reads must return the same value without mutating state. + let r1 = client.get_creator_details(&creator).registered_at; + let r2 = client.get_creator_details(&creator).registered_at; + let r3 = client.get_creator_details(&creator).registered_at; + + assert_eq!(r1, 77); + assert_eq!(r1, r2); + assert_eq!(r2, r3); +} + +// --------------------------------------------------------------------------- +// get_creators_batch — core behaviour +// --------------------------------------------------------------------------- + +#[test] +fn test_batch_returns_empty_vec_for_empty_input() { + let env = test_env_with_auths(); + let (client, _) = register_creator_keys(&env); + + let empty: Vec
= Vec::new(&env); + let results = client.get_creators_batch(&empty); + + assert_eq!(results.len(), 0, "empty input must produce empty output"); +} + +#[test] +fn test_batch_length_matches_input_length() { + let env = test_env_with_auths(); + let (client, _) = register_creator_keys(&env); + + let alice = register_test_creator(&env, &client, "alice"); + let bob = register_test_creator(&env, &client, "bob"); + let unknown = Address::generate(&env); + + let mut input: Vec
= Vec::new(&env); + input.push_back(alice); + input.push_back(bob); + input.push_back(unknown); + + let results = client.get_creators_batch(&input); + assert_eq!( + results.len(), + 3, + "output length must equal input length regardless of registration status" + ); +} + +#[test] +fn test_batch_preserves_input_order() { + let env = test_env_with_auths(); + let (client, _) = register_creator_keys(&env); + + set_ledger_sequence(&env, 10); + let alice = register_test_creator(&env, &client, "alice"); + set_ledger_sequence(&env, 20); + let bob = register_test_creator(&env, &client, "bob"); + set_ledger_sequence(&env, 30); + let carol = register_test_creator(&env, &client, "carol"); + + let mut input: Vec
= Vec::new(&env); + input.push_back(alice.clone()); + input.push_back(bob.clone()); + input.push_back(carol.clone()); + + let results = client.get_creators_batch(&input); + + assert_eq!( + results.get(0).unwrap().creator, + alice, + "index 0 must be alice" + ); + assert_eq!(results.get(1).unwrap().creator, bob, "index 1 must be bob"); + assert_eq!( + results.get(2).unwrap().creator, + carol, + "index 2 must be carol" + ); +} + +#[test] +fn test_batch_registered_creators_have_correct_fields() { + let env = test_env_with_auths(); + let (client, _) = register_creator_keys(&env); + + set_ledger_sequence(&env, 55); + let alice = register_test_creator(&env, &client, "alice"); + + let mut input: Vec
= Vec::new(&env); + input.push_back(alice.clone()); + + let results = client.get_creators_batch(&input); + let view = results.get(0).unwrap(); + + assert!(view.is_registered); + assert_eq!(view.creator, alice); + assert_eq!(view.registered_at, 55); + assert_eq!(view.supply, 0); +} + +#[test] +fn test_batch_unregistered_address_returns_safe_defaults() { + let env = test_env_with_auths(); + let (client, _) = register_creator_keys(&env); + + let unknown = Address::generate(&env); + + let mut input: Vec
= Vec::new(&env); + input.push_back(unknown.clone()); + + let results = client.get_creators_batch(&input); + let view = results.get(0).unwrap(); + + assert!( + !view.is_registered, + "unregistered must have is_registered: false" + ); + assert_eq!(view.creator, unknown, "creator address must be echoed back"); + assert_eq!( + view.registered_at, 0, + "unregistered must have registered_at: 0" + ); + assert_eq!(view.supply, 0, "unregistered must have supply: 0"); +} + +#[test] +fn test_batch_mixed_registered_and_unregistered() { + let env = test_env_with_auths(); + let (client, _) = register_creator_keys(&env); + + set_ledger_sequence(&env, 11); + let alice = register_test_creator(&env, &client, "alice"); + let unknown = Address::generate(&env); + set_ledger_sequence(&env, 22); + let bob = register_test_creator(&env, &client, "bob"); + + let mut input: Vec
= Vec::new(&env); + input.push_back(alice.clone()); + input.push_back(unknown.clone()); + input.push_back(bob.clone()); + + let results = client.get_creators_batch(&input); + + // alice — registered at sequence 11 + let v0 = results.get(0).unwrap(); + assert!(v0.is_registered); + assert_eq!(v0.creator, alice); + assert_eq!(v0.registered_at, 11); + + // unknown — not registered + let v1 = results.get(1).unwrap(); + assert!(!v1.is_registered); + assert_eq!(v1.creator, unknown); + assert_eq!(v1.registered_at, 0); + + // bob — registered at sequence 22 + let v2 = results.get(2).unwrap(); + assert!(v2.is_registered); + assert_eq!(v2.creator, bob); + assert_eq!(v2.registered_at, 22); +} + +// --------------------------------------------------------------------------- +// registered_at — chronological ordering invariant +// --------------------------------------------------------------------------- + +#[test] +fn test_registered_at_enables_chronological_sort() { + let env = test_env_with_auths(); + let (client, _) = register_creator_keys(&env); + + // Register three creators at strictly increasing ledger sequences. + set_ledger_sequence(&env, 100); + let first = register_test_creator(&env, &client, "first"); + set_ledger_sequence(&env, 200); + let second = register_test_creator(&env, &client, "second"); + set_ledger_sequence(&env, 300); + let third = register_test_creator(&env, &client, "third"); + + let mut input: Vec
= Vec::new(&env); + // Deliberately pass in reverse order to prove the client can re-sort by registered_at. + input.push_back(third.clone()); + input.push_back(first.clone()); + input.push_back(second.clone()); + + let results = client.get_creators_batch(&input); + + // Collect registered_at values in the order returned. + let seq_third = results.get(0).unwrap().registered_at; + let seq_first = results.get(1).unwrap().registered_at; + let seq_second = results.get(2).unwrap().registered_at; + + assert_eq!(seq_third, 300); + assert_eq!(seq_first, 100); + assert_eq!(seq_second, 200); + + // A client sorting by registered_at ascending would produce: first, second, third. + assert!(seq_first < seq_second); + assert!(seq_second < seq_third); +} + +#[test] +fn test_batch_matches_individual_get_creator_details_calls() { + let env = test_env_with_auths(); + let (client, _) = register_creator_keys(&env); + + set_ledger_sequence(&env, 15); + let alice = register_test_creator(&env, &client, "alice"); + set_ledger_sequence(&env, 25); + let bob = register_test_creator(&env, &client, "bob"); + + let mut input: Vec
= Vec::new(&env); + input.push_back(alice.clone()); + input.push_back(bob.clone()); + + let batch = client.get_creators_batch(&input); + + // Each batch entry must be identical to the corresponding single-address call. + let alice_single = client.get_creator_details(&alice); + let bob_single = client.get_creator_details(&bob); + + let alice_batch = batch.get(0).unwrap(); + let bob_batch = batch.get(1).unwrap(); + + assert_eq!(alice_batch.creator, alice_single.creator); + assert_eq!(alice_batch.handle, alice_single.handle); + assert_eq!(alice_batch.supply, alice_single.supply); + assert_eq!(alice_batch.is_registered, alice_single.is_registered); + assert_eq!(alice_batch.registered_at, alice_single.registered_at); + + assert_eq!(bob_batch.creator, bob_single.creator); + assert_eq!(bob_batch.handle, bob_single.handle); + assert_eq!(bob_batch.supply, bob_single.supply); + assert_eq!(bob_batch.is_registered, bob_single.is_registered); + assert_eq!(bob_batch.registered_at, bob_single.registered_at); +} + +// --------------------------------------------------------------------------- +// Acceptance-criteria test: multi-profile retrieval + defensive zero-state fallback +// --------------------------------------------------------------------------- + +/// Verifies that `get_creators_batch` returns correct data for registered creators +/// and safe defaults for unregistered addresses in the same call. +/// +/// This is the canonical acceptance-criteria test for the batch endpoint: +/// - Registered creators carry their real `handle`, `supply`, and `registered_at`. +/// - Unregistered addresses return `is_registered: false` and `registered_at: 0` +/// without causing the call to panic or error. +/// - Output length and order match the input slice exactly. +#[test] +fn test_get_creators_batch_success() { + let env = test_env_with_auths(); + let (client, _) = register_creator_keys(&env); + + // Register two creators at known ledger sequences. + set_ledger_sequence(&env, 10); + let alice = register_test_creator(&env, &client, "alice"); + + set_ledger_sequence(&env, 20); + let bob = register_test_creator(&env, &client, "bob"); + + // A third address that is never registered — the defensive fallback case. + let unknown = Address::generate(&env); + + // Build the input batch: registered, unregistered, registered. + let mut input: Vec
= Vec::new(&env); + input.push_back(alice.clone()); + input.push_back(unknown.clone()); + input.push_back(bob.clone()); + + let results = client.get_creators_batch(&input); + + // Output length must equal input length. + assert_eq!( + results.len(), + 3, + "batch output length must match input length" + ); + + // --- alice (index 0): registered at sequence 10 --- + let v_alice = results.get(0).unwrap(); + assert!(v_alice.is_registered, "alice must be registered"); + assert_eq!(v_alice.creator, alice, "alice address must be echoed"); + assert_eq!(v_alice.registered_at, 10, "alice registered_at must be 10"); + assert_eq!(v_alice.supply, 0, "alice supply must start at 0"); + + // --- unknown (index 1): defensive zero-state fallback --- + let v_unknown = results.get(1).unwrap(); + assert!( + !v_unknown.is_registered, + "unregistered address must have is_registered: false" + ); + assert_eq!( + v_unknown.creator, unknown, + "unregistered creator address must be echoed back" + ); + assert_eq!( + v_unknown.registered_at, 0, + "unregistered address must return registered_at: 0" + ); + assert_eq!( + v_unknown.supply, 0, + "unregistered address must return supply: 0" + ); + + // --- bob (index 2): registered at sequence 20 --- + let v_bob = results.get(2).unwrap(); + assert!(v_bob.is_registered, "bob must be registered"); + assert_eq!(v_bob.creator, bob, "bob address must be echoed"); + assert_eq!(v_bob.registered_at, 20, "bob registered_at must be 20"); + assert_eq!(v_bob.supply, 0, "bob supply must start at 0"); + + // Chronological ordering invariant: alice registered before bob. + assert!( + v_alice.registered_at < v_bob.registered_at, + "alice must have a lower registered_at than bob for chronological sorting" + ); +} diff --git a/creator-keys/tests/sell_after_fee_config_update.rs b/creator-keys/tests/sell_after_fee_config_mutation.rs similarity index 100% rename from creator-keys/tests/sell_after_fee_config_update.rs rename to creator-keys/tests/sell_after_fee_config_mutation.rs diff --git a/creator-keys/tests/buy_after_fee_config_update.rs b/creator-keys/tests/tests/buy_after_fee_config_mutation.rs similarity index 100% rename from creator-keys/tests/buy_after_fee_config_update.rs rename to creator-keys/tests/tests/buy_after_fee_config_mutation.rs