Skip to content

Commit

Permalink
remove useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
notV4l committed Jun 20, 2024
1 parent d4a87b7 commit b3e00cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions examples/hex_map/src/actions.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,11 @@ mod actions {
#[abi(embed_v0)]
impl ActionsImpl of IActions<ContractState> {
// ContractState is defined by system decorator expansion
fn spawn(ref world: IWorldDispatcher) { // Access the world dispatcher for reading.
let world = self.world_dispatcher.read();

fn spawn(ref world: IWorldDispatcher) {
set!(world, (Position { player: get_caller_address(), vec: Vec2 { x: 10, y: 10 } }));
}
// Moves player in the provided direction.
fn move(ref world: IWorldDispatcher, direction: Direction) {
// Access the world dispatcher for reading.
let world = self.world_dispatcher.read();

// Get the address of the current caller, possibly the player's address.
let player = get_caller_address();

Expand Down
2 changes: 1 addition & 1 deletion governance/src/systems/timelock/contract.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ mod timelock {
assert!(
delay <= MAXIMUM_DELAY, "Timelock::initialize: Delay must not exceed maximum delay."
);
let world = self.world_dispatcher.read();

let contract = get_contract_address();
let curr_params = get!(world, contract, TimelockParams);
assert!(
Expand Down

0 comments on commit b3e00cb

Please sign in to comment.