Skip to content

Commit

Permalink
Leaving attributes when rewriting Storage struct. (#6106)
Browse files Browse the repository at this point in the history
  • Loading branch information
orizi authored Aug 1, 2024
1 parent f239a24 commit 3d383d0
Show file tree
Hide file tree
Showing 10 changed files with 87 additions and 70 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -828,9 +828,9 @@ component:

#[phantom]
pub struct Storage {
pub data: u32,
pub map: LegacyMap<u32, u32>,
pub my_type_var: super::MyType,
pub data: u32,
pub map: LegacyMap<u32, u32>,
pub my_type_var: super::MyType,
}

#[derive(Drop, Copy)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2071,7 +2071,7 @@ pub enum Event {}

#[phantom]
pub struct Storage {
pub same_name: felt252,
pub same_name: felt252,
}

#[derive(Drop, Copy)]
Expand Down Expand Up @@ -7943,7 +7943,8 @@ contract:

#[phantom]
pub struct Storage {
pub component_storage: super::component::Storage,
#[substorage(v0)]
pub component_storage: super::component::Storage,
}

#[derive(Drop, Copy)]
Expand Down Expand Up @@ -11437,7 +11438,7 @@ pub enum Event {}

#[phantom]
pub struct Storage {
pub a_member: felt252,
pub a_member: felt252,
}

#[derive(Drop, Copy)]
Expand Down Expand Up @@ -12250,7 +12251,7 @@ pub enum Event {}

#[phantom]
pub struct Storage {
pub data: u32,
pub data: u32,
}

#[derive(Drop, Copy)]
Expand Down Expand Up @@ -12381,7 +12382,8 @@ contract:

#[phantom]
pub struct Storage {
pub component_member: super::test_component::Storage,
#[substorage(v0)]
pub component_member: super::test_component::Storage,
}

#[derive(Drop, Copy)]
Expand Down Expand Up @@ -13299,7 +13301,7 @@ pub enum Event {}

#[phantom]
pub struct Storage {
pub u256_pair: super::u256Pair,
pub u256_pair: super::u256Pair,
}

#[derive(Drop, Copy)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ pub enum Event {}

#[phantom]
pub struct Storage {
pub value: felt252,
pub value: felt252,
}

#[derive(Drop, Copy)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,8 @@ contract:

#[phantom]
pub struct Storage {
pub comp_storage: super::comp::Storage,
#[substorage(v0)]
pub comp_storage: super::comp::Storage,
}

#[derive(Drop, Copy)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2459,15 +2459,15 @@ pub enum Event {}

#[phantom]
pub struct Storage {
pub balance: usize,
pub user_balance: Map<usize, usize>,
pub user_balance_subbalance: Map<usize, Map<usize, usize>>,
pub legacy_map_balace: LegacyMap<usize, usize>,
pub balance_pair: BalancePair,
pub sliced_balance_trio: SlicedBalanceTrio,
pub linked_list: LinkedList,
pub arr: Vec<usize>,
pub queryable_enum: QueryableEnum,
pub balance: usize,
pub user_balance: Map<usize, usize>,
pub user_balance_subbalance: Map<usize, Map<usize, usize>>,
pub legacy_map_balace: LegacyMap<usize, usize>,
pub balance_pair: BalancePair,
pub sliced_balance_trio: SlicedBalanceTrio,
pub linked_list: LinkedList,
pub arr: Vec<usize>,
pub queryable_enum: QueryableEnum,
}

#[derive(Drop, Copy)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,20 +199,20 @@ pub enum Event {}

#[phantom]
pub struct Storage {
pub var_felt252: felt252,
pub var_u8: u8,
pub var_u16: u16,
pub var_u32: u32,
pub var_u64: u64,
pub var_u128: u128,
pub var_bool: bool,
pub felt252_to_u128: LegacyMap::<felt252, u128>,
pub u128_to_bool: LegacyMap::<u128, bool>,
pub bool_to_felt252: LegacyMap::<bool, felt252>,
pub outer_type_var: super::OuterType,
pub outer_type_to_outer_type: LegacyMap::<super::OuterType, super::OuterType>,
pub inner_type_var: inner::InnerType,
pub inner_type_to_inner_type: LegacyMap::<inner::InnerType, inner::InnerType>,
pub var_felt252: felt252,
pub var_u8: u8,
pub var_u16: u16,
pub var_u32: u32,
pub var_u64: u64,
pub var_u128: u128,
pub var_bool: bool,
pub felt252_to_u128: LegacyMap::<felt252, u128>,
pub u128_to_bool: LegacyMap::<u128, bool>,
pub bool_to_felt252: LegacyMap::<bool, felt252>,
pub outer_type_var: super::OuterType,
pub outer_type_to_outer_type: LegacyMap::<super::OuterType, super::OuterType>,
pub inner_type_var: inner::InnerType,
pub inner_type_to_inner_type: LegacyMap::<inner::InnerType, inner::InnerType>,
}

#[derive(Drop, Copy)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ pub enum Event {}

#[phantom]
pub struct Storage {
pub var: WrappedFelt252,
pub zero_size: ZeroSize,
pub mapping: LegacyMap::<WrappedFelt252, WrappedFelt252>,
pub zero_size_mapping: LegacyMap::<ZeroSize, ZeroSize>,
pub var: WrappedFelt252,
pub zero_size: ZeroSize,
pub mapping: LegacyMap::<WrappedFelt252, WrappedFelt252>,
pub zero_size_mapping: LegacyMap::<ZeroSize, ZeroSize>,
}

#[derive(Drop, Copy)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pub enum Event {}

#[phantom]
pub struct Storage {
pub data: u32,
pub data: u32,
}

#[derive(Drop, Copy)]
Expand Down Expand Up @@ -212,9 +212,10 @@ contract:

#[phantom]
pub struct Storage {
pub test_component_storage: super::test_component::Storage,
pub normal_member1: usize,
pub normal_member2: usize,
#[substorage(v0)]
pub test_component_storage: super::test_component::Storage,
pub normal_member1: usize,
pub normal_member2: usize,
}

#[derive(Drop, Copy)]
Expand Down Expand Up @@ -532,7 +533,7 @@ pub enum Event {}

#[phantom]
pub struct Storage {
pub data: u32,
pub data: u32,
}

#[derive(Drop, Copy)]
Expand Down Expand Up @@ -666,7 +667,7 @@ pub enum Event {}

#[phantom]
pub struct Storage {
pub data: u32,
pub data: u32,
}

#[derive(Drop, Copy)]
Expand Down Expand Up @@ -797,8 +798,10 @@ contract:

#[phantom]
pub struct Storage {
pub component1_storage: super::component1::Storage,
pub component2_storage: super::component2::Storage,
#[substorage(v0)]
pub component1_storage: super::component1::Storage,
#[substorage(v0)]
pub component2_storage: super::component2::Storage,
}

#[derive(Drop, Copy)]
Expand Down Expand Up @@ -1150,7 +1153,7 @@ pub enum Event {}

#[phantom]
pub struct Storage {
pub data: u32,
pub data: u32,
}

#[derive(Drop, Copy)]
Expand Down Expand Up @@ -1284,7 +1287,7 @@ pub enum Event {}

#[phantom]
pub struct Storage {
pub data: u32,
pub data: u32,
}

#[derive(Drop, Copy)]
Expand Down Expand Up @@ -1415,8 +1418,10 @@ contract:

#[phantom]
pub struct Storage {
pub component1_storage: super::component1::Storage,
pub component2_storage: super::component2::Storage,
#[substorage(v0)]
pub component1_storage: super::component1::Storage,
#[substorage(v0)]
pub component2_storage: super::component2::Storage,
}

#[derive(Drop, Copy)]
Expand Down
Loading

0 comments on commit 3d383d0

Please sign in to comment.