Skip to content

Commit

Permalink
Add visibility modifiers to storage code.
Browse files Browse the repository at this point in the history
commit-id:d2c9f9bd
  • Loading branch information
gilbens-starkware committed Jul 1, 2024
1 parent 0eac98c commit 8803d4f
Show file tree
Hide file tree
Showing 27 changed files with 843 additions and 503 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
mod circuit_contract {
use core::circuit::{
CircuitElement, CircuitInput, circuit_add, circuit_inverse, CircuitOutputsTrait,
CircuitModulus, AddInputResultTrait, CircuitInputs, EvalCircuitTrait, EvalCircuitResult
CircuitModulus, AddInputResultTrait, CircuitInputs, EvalCircuitTrait,
};


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -561,17 +561,23 @@ component:



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

#[derive(Drop, Copy)]
struct ComponentStorageBase {
data: starknet::storage::StorageBase<u32>,
map: starknet::storage::StorageBase<LegacyMap<u32, u32>>,
my_type_var: starknet::storage::StorageBase<super::MyType>,
pub struct ComponentStorageBase {
pub data: starknet::storage::StorageBase<u32>,
pub map: starknet::storage::StorageBase<LegacyMap<u32, u32>>,
pub my_type_var: starknet::storage::StorageBase<super::MyType>,
}
#[derive(Drop, Copy)]
struct ComponentStorageBaseMut {
data: starknet::storage::StorageBase<starknet::storage::Mutable<u32>>,
map: starknet::storage::StorageBase<starknet::storage::Mutable<LegacyMap<u32, u32>>>,
my_type_var: starknet::storage::StorageBase<starknet::storage::Mutable<super::MyType>>,
pub struct ComponentStorageBaseMut {
pub data: starknet::storage::StorageBase<starknet::storage::Mutable<u32>>,
pub map: starknet::storage::StorageBase<starknet::storage::Mutable<LegacyMap<u32, u32>>>,
pub my_type_var: starknet::storage::StorageBase<starknet::storage::Mutable<super::MyType>>,
}
impl StorageBaseImpl<TContractState> of starknet::storage::StorageBaseTrait<ComponentState<TContractState>> {
type BaseType = ComponentStorageBase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,14 @@ component:
pub enum Event {}


pub struct Storage {
}

#[derive(Drop, Copy)]
struct ComponentStorageBase {
pub struct ComponentStorageBase {
}
#[derive(Drop, Copy)]
struct ComponentStorageBaseMut {
pub struct ComponentStorageBaseMut {
}
impl StorageBaseImpl<TContractState> of starknet::storage::StorageBaseTrait<ComponentState<TContractState>> {
type BaseType = ComponentStorageBase;
Expand Down Expand Up @@ -229,11 +232,14 @@ component:
pub enum Event {}


pub struct Storage {
}

#[derive(Drop, Copy)]
struct ComponentStorageBase {
pub struct ComponentStorageBase {
}
#[derive(Drop, Copy)]
struct ComponentStorageBaseMut {
pub struct ComponentStorageBaseMut {
}
impl StorageBaseImpl<TContractState> of starknet::storage::StorageBaseTrait<ComponentState<TContractState>> {
type BaseType = ComponentStorageBase;
Expand Down Expand Up @@ -405,11 +411,14 @@ component:
pub enum Event {}


pub struct Storage {
}

#[derive(Drop, Copy)]
struct ComponentStorageBase {
pub struct ComponentStorageBase {
}
#[derive(Drop, Copy)]
struct ComponentStorageBaseMut {
pub struct ComponentStorageBaseMut {
}
impl StorageBaseImpl<TContractState> of starknet::storage::StorageBaseTrait<ComponentState<TContractState>> {
type BaseType = ComponentStorageBase;
Expand Down Expand Up @@ -577,11 +586,14 @@ component:
pub enum Event {}


pub struct Storage {
}

#[derive(Drop, Copy)]
struct ComponentStorageBase {
pub struct ComponentStorageBase {
}
#[derive(Drop, Copy)]
struct ComponentStorageBaseMut {
pub struct ComponentStorageBaseMut {
}
impl StorageBaseImpl<TContractState> of starknet::storage::StorageBaseTrait<ComponentState<TContractState>> {
type BaseType = ComponentStorageBase;
Expand Down Expand Up @@ -749,11 +761,14 @@ component:
pub enum Event {}


pub struct Storage {
}

#[derive(Drop, Copy)]
struct ComponentStorageBase {
pub struct ComponentStorageBase {
}
#[derive(Drop, Copy)]
struct ComponentStorageBaseMut {
pub struct ComponentStorageBaseMut {
}
impl StorageBaseImpl<TContractState> of starknet::storage::StorageBaseTrait<ComponentState<TContractState>> {
type BaseType = ComponentStorageBase;
Expand Down Expand Up @@ -925,11 +940,14 @@ component:
pub enum Event {}


pub struct Storage {
}

#[derive(Drop, Copy)]
struct ComponentStorageBase {
pub struct ComponentStorageBase {
}
#[derive(Drop, Copy)]
struct ComponentStorageBaseMut {
pub struct ComponentStorageBaseMut {
}
impl StorageBaseImpl<TContractState> of starknet::storage::StorageBaseTrait<ComponentState<TContractState>> {
type BaseType = ComponentStorageBase;
Expand Down Expand Up @@ -1097,11 +1115,14 @@ component:
pub enum Event {}


pub struct Storage {
}

#[derive(Drop, Copy)]
struct ComponentStorageBase {
pub struct ComponentStorageBase {
}
#[derive(Drop, Copy)]
struct ComponentStorageBaseMut {
pub struct ComponentStorageBaseMut {
}
impl StorageBaseImpl<TContractState> of starknet::storage::StorageBaseTrait<ComponentState<TContractState>> {
type BaseType = ComponentStorageBase;
Expand Down Expand Up @@ -1265,11 +1286,14 @@ component:
pub enum Event {}


pub struct Storage {
}

#[derive(Drop, Copy)]
struct ComponentStorageBase {
pub struct ComponentStorageBase {
}
#[derive(Drop, Copy)]
struct ComponentStorageBaseMut {
pub struct ComponentStorageBaseMut {
}
impl StorageBaseImpl<TContractState> of starknet::storage::StorageBaseTrait<ComponentState<TContractState>> {
type BaseType = ComponentStorageBase;
Expand Down Expand Up @@ -1445,11 +1469,14 @@ component:
pub enum Event {}


pub struct Storage {
}

#[derive(Drop, Copy)]
struct ComponentStorageBase {
pub struct ComponentStorageBase {
}
#[derive(Drop, Copy)]
struct ComponentStorageBaseMut {
pub struct ComponentStorageBaseMut {
}
impl StorageBaseImpl<TContractState> of starknet::storage::StorageBaseTrait<ComponentState<TContractState>> {
type BaseType = ComponentStorageBase;
Expand Down Expand Up @@ -1670,11 +1697,14 @@ component:
pub enum Event {}


pub struct Storage {
}

#[derive(Drop, Copy)]
struct ComponentStorageBase {
pub struct ComponentStorageBase {
}
#[derive(Drop, Copy)]
struct ComponentStorageBaseMut {
pub struct ComponentStorageBaseMut {
}
impl StorageBaseImpl<TContractState> of starknet::storage::StorageBaseTrait<ComponentState<TContractState>> {
type BaseType = ComponentStorageBase;
Expand Down Expand Up @@ -1846,11 +1876,14 @@ component:
pub enum Event {}


pub struct Storage {
}

#[derive(Drop, Copy)]
struct ComponentStorageBase {
pub struct ComponentStorageBase {
}
#[derive(Drop, Copy)]
struct ComponentStorageBaseMut {
pub struct ComponentStorageBaseMut {
}
impl StorageBaseImpl<TContractState> of starknet::storage::StorageBaseTrait<ComponentState<TContractState>> {
type BaseType = ComponentStorageBase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,14 @@ component:
pub enum Event {}


pub struct Storage {
}

#[derive(Drop, Copy)]
struct ComponentStorageBase {
pub struct ComponentStorageBase {
}
#[derive(Drop, Copy)]
struct ComponentStorageBaseMut {
pub struct ComponentStorageBaseMut {
}
impl StorageBaseImpl<TContractState> of starknet::storage::StorageBaseTrait<ComponentState<TContractState>> {
type BaseType = ComponentStorageBase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,14 @@ contract:



pub struct Storage {
}

#[derive(Drop, Copy)]
struct ContractStorageBase {
pub struct ContractStorageBase {
}
#[derive(Drop, Copy)]
struct ContractStorageBaseMut {
pub struct ContractStorageBaseMut {
}
impl StorageBaseImpl of starknet::storage::StorageBaseTrait<ContractState> {
type BaseType = ContractStorageBase;
Expand Down
Loading

0 comments on commit 8803d4f

Please sign in to comment.