Skip to content

Commit

Permalink
minor fix for scarb format
Browse files Browse the repository at this point in the history
  • Loading branch information
lana-shanghai committed Aug 21, 2024
1 parent e312378 commit 89a5954
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion contracts/src/components/registry/registry.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub mod RegistryComponent {
self.Registry_registrations.write((caller, offchain_id.clone()), true);

// emit registration event
self.emit(RegistrationEvent { caller : caller, offchain_id : offchain_id });
self.emit(RegistrationEvent { caller: caller, offchain_id: offchain_id });
}
}
}
3 changes: 1 addition & 2 deletions contracts/src/components/registry/registry_mock.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ pub mod RegistryMock {
//

#[constructor]
fn constructor(ref self: ContractState) {
// Nothing to be done
fn constructor(ref self: ContractState) {// Nothing to be done
}
}

Expand Down
6 changes: 4 additions & 2 deletions contracts/src/components/registry/registry_test.cairo
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
use zkramp::components::registry::interface::{IRegistryDispatcher, IRegistryDispatcherTrait};
use zkramp::components::registry::registry_mock::RegistryMock;
use zkramp::tests::utils;
use zkramp::tests::constants;
use zkramp::tests::utils;

/// Deploys the registry mock contract.
fn setup_contracts() -> IRegistryDispatcher {
// deploy registry
let registry_contract_address = utils::deploy(RegistryMock::TEST_CLASS_HASH, calldata: array![]);
let registry_contract_address = utils::deploy(
RegistryMock::TEST_CLASS_HASH, calldata: array![]
);

IRegistryDispatcher { contract_address: registry_contract_address }
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/lib.cairo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pub mod components;
pub mod contracts;
pub mod utils;

#[cfg(test)]
pub mod tests;
pub mod utils;

0 comments on commit 89a5954

Please sign in to comment.