Skip to content

Commit

Permalink
update auth
Browse files Browse the repository at this point in the history
  • Loading branch information
zsluedem committed Feb 19, 2024
1 parent 56e3c15 commit e43b086
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/default_auth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fi

export WORLD_ADDRESS=$(cat ./target/$TARGET_NAME/manifest.json | jq -r '.world.address')

export ACTIONS_ADDRESS=$(cat ./target/$TARGET_NAME/manifest.json | jq -r '.contracts[] | select(.name == "kingdom_lord::systems::actions::actions" ).address')
export ACTIONS_ADDRESS=$(cat ./target/$TARGET_NAME/manifest.json | jq -r '.contracts[] | select(.name == "kingdom_lord::actions::kingdom_lord_controller" ).address')

echo "---------------------------------------------------------------------------"
echo world : $WORLD_ADDRESS
Expand All @@ -27,7 +27,7 @@ echo actions : $ACTIONS_ADDRESS
echo "---------------------------------------------------------------------------"

# enable system -> component authorizations
COMPONENTS=("ResourceField" "Warehouse" "Barn")
COMPONENTS=("Barn" "OuterCity" "Warehouse", "CityBuilding")

for component in ${COMPONENTS[@]}; do
sozo auth writer $component $ACTIONS_ADDRESS --world $WORLD_ADDRESS --rpc-url $RPC_URL
Expand Down
2 changes: 2 additions & 0 deletions src/components/outer_city.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ mod outer_city_component {
let food = self
.get_food_building()
.mine(outer_city.last_mined_block, current_block_number);
outer_city.last_mined_block = current_block_number;
set!(world, (outer_city));
(wood, brick, steel, food)
}
}
Expand Down

0 comments on commit e43b086

Please sign in to comment.