Skip to content

Commit 0fe70b8

Browse files
committed
Rename storage_proofs -> satellite
1 parent a28e096 commit 0fe70b8

File tree

8 files changed

+26
-26
lines changed

8 files changed

+26
-26
lines changed

cairo/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ url = "https://starknet-sepolia.g.alchemy.com/starknet/version/rpc/v0_7/*your ap
1313
Before deploying or upgrading the contract, make sure you have the latest class hash:
1414

1515
```
16-
sncast declare --contract-name StorageProofs
16+
sncast declare --contract-name Satellite
1717
```
1818

1919
Then copy the class hash and update it in `deploy.toml:3` and `upgrade.toml:5`

cairo/src/receiver.cairo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pub trait IReceiver<TContractState> {
44
}
55

66
#[starknet::contract]
7-
pub mod StorageProofs {
7+
pub mod Satellite {
88
use openzeppelin::{
99
access::ownable::OwnableComponent,
1010
upgrades::{UpgradeableComponent, interface::IUpgradeable},

cairo/tests/_utils.cairo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ use storage_proofs::{
66
mmr_core::{
77
mmr_core_component::MmrCoreInternalImpl, RootForHashingFunction, POSEIDON_HASHING_FUNCTION,
88
},
9-
receiver::StorageProofs,
9+
receiver::Satellite,
1010
};
1111
use cairo_lib::{hashing::poseidon::hash_words64, data_structures::mmr::utils::compute_root};
1212

1313
pub fn create_mmr_with_block(
14-
ref contract: StorageProofs::ContractState, header_rlp: Span<u64>, chain_id: u256, mmr_id: u256,
14+
ref contract: Satellite::ContractState, header_rlp: Span<u64>, chain_id: u256, mmr_id: u256,
1515
) -> BlockHeaderProof {
1616
let mmr_size = 1;
1717
let leaf_hash = hash_words64(header_rlp);

cairo/tests/evm_fact_registry/curtis.cairo

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use storage_proofs::{
33
evm_fact_registry_component::{EvmFactRegistryInternalImpl, EvmFactRegistryImpl},
44
BlockHeaderField, AccountField,
55
},
6-
mmr_core::{mmr_core_component::MmrCoreInternalImpl}, receiver::StorageProofs,
6+
mmr_core::{mmr_core_component::MmrCoreInternalImpl}, receiver::Satellite,
77
};
88
use starknet::EthAddress;
99
use crate::_utils::create_mmr_with_block;
@@ -257,7 +257,7 @@ fn get_slot_non_inclusion_curtis() -> (Span<Span<u64>>, u256) {
257257
fn read_header_fields() {
258258
// https://rs-indexer.api.herodotus.cloud/blocks/?chain_id=33111&from_block_number_inclusive=18179561&to_block_number_inclusive=18179561&hashing_function=keccak
259259

260-
let mut contract = StorageProofs::contract_state_for_testing();
260+
let mut contract = Satellite::contract_state_for_testing();
261261
let (header_rlp, _) = get_header_curtis();
262262
let result = contract._readBlockHeaderFields(header_rlp);
263263

@@ -285,7 +285,7 @@ fn read_header_fields() {
285285

286286
#[test]
287287
fn prove_header() {
288-
let mut contract = StorageProofs::contract_state_for_testing();
288+
let mut contract = Satellite::contract_state_for_testing();
289289

290290
let chain_id = 33111;
291291
let (header_rlp, block_number) = get_header_curtis();
@@ -412,7 +412,7 @@ fn prove_header() {
412412

413413
#[test]
414414
fn prove_account() {
415-
let mut contract = StorageProofs::contract_state_for_testing();
415+
let mut contract = Satellite::contract_state_for_testing();
416416

417417
let chain_id = 33111;
418418
let (header_rlp, block_number) = get_header_curtis();
@@ -462,7 +462,7 @@ fn prove_account() {
462462

463463
#[test]
464464
fn prove_slot_inclusion() {
465-
let mut contract = StorageProofs::contract_state_for_testing();
465+
let mut contract = Satellite::contract_state_for_testing();
466466

467467
let chain_id = 33111;
468468
let (header_rlp, block_number) = get_header_curtis();
@@ -483,7 +483,7 @@ fn prove_slot_inclusion() {
483483

484484
#[test]
485485
fn prove_slot_non_inclusion() {
486-
let mut contract = StorageProofs::contract_state_for_testing();
486+
let mut contract = Satellite::contract_state_for_testing();
487487

488488
let chain_id = 33111;
489489
let (header_rlp, block_number) = get_header_curtis();

cairo/tests/evm_fact_registry/eth_mainnet.cairo

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use storage_proofs::{
33
evm_fact_registry_component::{EvmFactRegistryInternalImpl, EvmFactRegistryImpl},
44
BlockHeaderField, AccountField,
55
},
6-
mmr_core::{mmr_core_component::MmrCoreInternalImpl}, receiver::StorageProofs,
6+
mmr_core::{mmr_core_component::MmrCoreInternalImpl}, receiver::Satellite,
77
};
88
use starknet::EthAddress;
99
use crate::_utils::create_mmr_with_block;
@@ -215,7 +215,7 @@ fn get_account_mainnet() -> (Span<Span<u64>>, EthAddress) {
215215
fn read_header_fields() {
216216
// https://rs-indexer.api.herodotus.cloud/blocks/?chain_id=1&from_block_number_inclusive=22578043&to_block_number_inclusive=22578043&hashing_function=keccak
217217

218-
let mut contract = StorageProofs::contract_state_for_testing();
218+
let mut contract = Satellite::contract_state_for_testing();
219219
let (header_rlp, _) = get_header_mainnet();
220220
let result = contract._readBlockHeaderFields(header_rlp);
221221

@@ -243,7 +243,7 @@ fn read_header_fields() {
243243

244244
#[test]
245245
fn prove_header() {
246-
let mut contract = StorageProofs::contract_state_for_testing();
246+
let mut contract = Satellite::contract_state_for_testing();
247247

248248
let chain_id = 1;
249249
let (header_rlp, block_number) = get_header_mainnet();
@@ -370,7 +370,7 @@ fn prove_header() {
370370

371371
#[test]
372372
fn prove_account() {
373-
let mut contract = StorageProofs::contract_state_for_testing();
373+
let mut contract = Satellite::contract_state_for_testing();
374374

375375
let chain_id = 1;
376376
let (header_rlp, block_number) = get_header_mainnet();

cairo/tests/evm_fact_registry/eth_sepolia.cairo

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use storage_proofs::{
33
evm_fact_registry_component::{EvmFactRegistryInternalImpl, EvmFactRegistryImpl},
44
BlockHeaderField, AccountField,
55
},
6-
mmr_core::{mmr_core_component::MmrCoreInternalImpl}, receiver::StorageProofs,
6+
mmr_core::{mmr_core_component::MmrCoreInternalImpl}, receiver::Satellite,
77
};
88
use starknet::EthAddress;
99
use crate::_utils::create_mmr_with_block;
@@ -189,7 +189,7 @@ fn get_account_sepolia() -> (Span<Span<u64>>, EthAddress) {
189189

190190
#[test]
191191
fn read_header_fields() {
192-
let mut contract = StorageProofs::contract_state_for_testing();
192+
let mut contract = Satellite::contract_state_for_testing();
193193
let (header_rlp, _) = get_header_sepolia();
194194
let result = contract._readBlockHeaderFields(header_rlp);
195195

@@ -217,7 +217,7 @@ fn read_header_fields() {
217217

218218
#[test]
219219
fn prove_header() {
220-
let mut contract = StorageProofs::contract_state_for_testing();
220+
let mut contract = Satellite::contract_state_for_testing();
221221

222222
let chain_id = 11155111;
223223
let (header_rlp, block_number) = get_header_sepolia();
@@ -344,7 +344,7 @@ fn prove_header() {
344344

345345
#[test]
346346
fn prove_account() {
347-
let mut contract = StorageProofs::contract_state_for_testing();
347+
let mut contract = Satellite::contract_state_for_testing();
348348

349349
let chain_id = 11155111;
350350
let (header_rlp, block_number) = get_header_sepolia();

cairo/tests/mmr_core/createMmrFromDomestic.cairo

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ use storage_proofs::{
66
mmr_core_component::{MmrCoreInternalImpl, MmrCoreExternalImpl}, RootForHashingFunction,
77
POSEIDON_HASHING_FUNCTION, KECCAK_HASHING_FUNCTION,
88
},
9-
receiver::StorageProofs,
9+
receiver::Satellite,
1010
};
1111

1212

1313
fn setup_mmr_multiple_hashing_functions() -> (
14-
StorageProofs::ContractState, u256, u256, u256, u256, u256,
14+
Satellite::ContractState, u256, u256, u256, u256, u256,
1515
) {
16-
let mut contract = StorageProofs::contract_state_for_testing();
16+
let mut contract = Satellite::contract_state_for_testing();
1717

1818
// Set up some MMR for testing
1919
let chain_id = 11155111;
@@ -57,8 +57,8 @@ fn setup_mmr_multiple_hashing_functions() -> (
5757

5858
fn setup_mmr_single_hashing_functions(
5959
original_is_offchain_grown: bool,
60-
) -> (StorageProofs::ContractState, u256, u256, u256, u256) {
61-
let mut contract = StorageProofs::contract_state_for_testing();
60+
) -> (Satellite::ContractState, u256, u256, u256, u256) {
61+
let mut contract = Satellite::contract_state_for_testing();
6262

6363
// Set up some MMR for testing
6464
let chain_id = 11155111;

cairo/tests/translate_parent_hash.cairo

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use storage_proofs::{
22
mmr_core::{ICoreMmrExternal, KECCAK_HASHING_FUNCTION, POSEIDON_HASHING_FUNCTION},
3-
receiver::StorageProofs,
3+
receiver::Satellite,
44
};
55
use core::starknet::storage::{
66
StoragePointerReadAccess, StoragePointerWriteAccess, StoragePathEntry,
@@ -74,7 +74,7 @@ fn test_translate_parent_hash_1() {
7474
let chain_id: u256 = 11155111;
7575
let (header_rlp, block_number, hash_keccak, hash_poseidon) = get_example_1();
7676

77-
let mut contract = StorageProofs::contract_state_for_testing();
77+
let mut contract = Satellite::contract_state_for_testing();
7878

7979
contract
8080
.state
@@ -101,7 +101,7 @@ fn test_translate_parent_hash_2() {
101101
let chain_id: u256 = 11155111;
102102
let (header_rlp, block_number, hash_keccak, hash_poseidon) = get_example_2();
103103

104-
let mut contract = StorageProofs::contract_state_for_testing();
104+
let mut contract = Satellite::contract_state_for_testing();
105105

106106
contract
107107
.state

0 commit comments

Comments
 (0)