Skip to content

Commit

Permalink
chore: fmt contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
Darlington02 committed Jun 3, 2024
1 parent 1f20f0a commit b5298f0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/interfaces/IHandleRegistry.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ pub trait IHandleRegistry<TState> {
// *************************************************************************
fn resolve(self: @TState, handle_id: u256) -> ContractAddress;
fn get_handle(self: @TState, profile_address: ContractAddress) -> u256;
}
}
18 changes: 7 additions & 11 deletions src/namespaces/handle_registry.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ mod HandleRegistry {

#[derive(Drop, starknet::Event)]
struct HandleLinked {
handle_id: u256,
handle_id: u256,
profile_address: ContractAddress,
caller: ContractAddress,
timestamp: u64
}

#[derive(Drop, starknet::Event)]
struct HandleUnlinked {
handle_id: u256,
handle_id: u256,
profile_address: ContractAddress,
caller: ContractAddress,
timestamp: u64
Expand Down Expand Up @@ -70,25 +70,21 @@ mod HandleRegistry {
// *************************************************************************
// GETTERS
// *************************************************************************
fn resolve(self: @ContractState, handle_id: u256) -> ContractAddress {
// TODO
fn resolve(self: @ContractState, handle_id: u256) -> ContractAddress {// TODO
}

fn get_handle(self: @ContractState, profile_address: ContractAddress) -> u256 {
// TODO
fn get_handle(self: @ContractState, profile_address: ContractAddress) -> u256 {// TODO
}
}

// *************************************************************************
// PRIVATE FUNCTIONS
// *************************************************************************
impl Private of PrivateTrait {
fn _link(ref self: ContractState, handle_id: u256, profile_address: ContractAddress) {
// TODO
fn _link(ref self: ContractState, handle_id: u256, profile_address: ContractAddress) {// TODO
}

fn _unlink(ref self: ContractState, handle_id: u256, profile_address: ContractAddress) {
// TODO
fn _unlink(ref self: ContractState, handle_id: u256, profile_address: ContractAddress) {// TODO
}
}
}
}
4 changes: 3 additions & 1 deletion src/namespaces/handles.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ mod Handles {
// *************************************************************************
#[generate_trait]
impl Private of PrivateTrait {
fn _mint_handle(ref self: ContractState, address: ContractAddress, local_name: felt252) -> u256 {
fn _mint_handle(
ref self: ContractState, address: ContractAddress, local_name: felt252
) -> u256 {
// TODO
return 123;
}
Expand Down

0 comments on commit b5298f0

Please sign in to comment.