-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use u32 as primary entity type #1144
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
outer_col: u32, | ||
#[key] | ||
outer_row: u128, | ||
outer_row: u32, | ||
#[key] | ||
inner_col: u128, | ||
inner_col: u32, | ||
#[key] | ||
inner_row: u128, | ||
inner_row: u32, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could use a type alias for these too: Coordinate
?
#[dojo::model] | ||
pub struct Progress { | ||
#[key] | ||
hyperstructure_entity_id: u128, | ||
hyperstructure_entity_id: ID, | ||
#[key] | ||
resource_type: u8, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alias for this as well? It's used in a bunch of different places
- use id alias more
PR Type
enhancement, configuration changes
Description
ADMIN_BANK_ENTITY_ID
andWORLD_CONFIG_ID
values across multiple files.ID
type fromu128
tou32
in Cairo and manifest files.Changes walkthrough 📝
4 files
bankEventQueries.ts
Update `ADMIN_BANK_ENTITY_ID` value
client/src/dojo/events/bankEventQueries.ts
ADMIN_BANK_ENTITY_ID
to a new value.index.ts
Update `ADMIN_BANK_ENTITY_ID` value
config/bank/index.ts
ADMIN_BANK_ENTITY_ID
to a new value.global.ts
Update `WORLD_CONFIG_ID` value
sdk/packages/eternum/src/constants/global.ts
WORLD_CONFIG_ID
to a new value.alias.cairo
Change `ID` type from `u128` to `u32`
contracts/src/alias.cairo
ID
type fromu128
tou32
.5 files
env_variables.sh
Update environment variables for deployment paths
contracts/scripts/env_variables.sh
KATANA_TOML_PATH
for both dev and prod environments.SOZO_WORLD
for prod environment.deploy.sh
Update `SOZO_WORLD` address in deployment script
scripts/deploy.sh
SOZO_WORLD
address in deployment script.indexer.sh
Update `SOZO_WORLD` address in indexer script
scripts/indexer.sh
SOZO_WORLD
address in indexer script.manifest.toml
Update deployment manifest with new class hashes and addresses
contracts/manifests/dev/deployment/manifest.toml
class_hash
,address
, andbase_class_hash
values.type
fromu128
toID
in multiple model definitions.eternum-dev_resource_systems-9f04ac8a.json
Update ABI definitions with new interface names and types
contracts/manifests/dev/deployment/abis/contracts/eternum-dev_resource_systems-9f04ac8a.json
160 files
dojo-world.json
...
contracts/manifests/dev/deployment/abis/dojo-world.json
...
contracts.cairo
...
contracts/src/systems/combat/contracts.cairo
...
eternum-Battle-20295758.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Battle-20295758.json
...
eternum-Building-a3631d0a.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Building-a3631d0a.json
...
eternum-BuildingConfig-2050f944.json
...
contracts/manifests/dev/deployment/abis/models/eternum-BuildingConfig-2050f944.json
...
eternum-CapacityConfig-620df1a7.json
...
contracts/manifests/dev/deployment/abis/models/eternum-CapacityConfig-620df1a7.json
...
eternum-Army-5434a98b.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Army-5434a98b.json
...
eternum-LevelingConfig-1c0257fd.json
...
contracts/manifests/dev/deployment/abis/models/eternum-LevelingConfig-1c0257fd.json
...
eternum-Trade-73cd5d50.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Trade-73cd5d50.json
...
eternum-EntityOwner-23cb1be3.json
...
contracts/manifests/dev/deployment/abis/models/eternum-EntityOwner-23cb1be3.json
...
eternum-EntityMetadata-72b04193.json
...
contracts/manifests/dev/deployment/abis/models/eternum-EntityMetadata-72b04193.json
...
eternum-Movable-68de8765.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Movable-68de8765.json
...
eternum-BuildingCategoryPopConfig-5804f847.json
...
contracts/manifests/dev/deployment/abis/models/eternum-BuildingCategoryPopConfig-5804f847.json
...
eternum-BuildingQuantityv2-31cdaf07.json
...
contracts/manifests/dev/deployment/abis/models/eternum-BuildingQuantityv2-31cdaf07.json
...
eternum-Contribution-5402ccc4.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Contribution-5402ccc4.json
...
eternum-ArrivalTime-4dedc6c3.json
...
contracts/manifests/dev/deployment/abis/models/eternum-ArrivalTime-4dedc6c3.json
...
eternum-BattleConfig-60902e8b.json
...
contracts/manifests/dev/deployment/abis/models/eternum-BattleConfig-60902e8b.json
...
eternum-DetachedResource-5ed63b97.json
...
contracts/manifests/dev/deployment/abis/models/eternum-DetachedResource-5ed63b97.json
...
eternum-GuildWhitelist-54f9b15d.json
...
contracts/manifests/dev/deployment/abis/models/eternum-GuildWhitelist-54f9b15d.json
...
eternum-Bank-522579aa.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Bank-522579aa.json
...
eternum-BankConfig-667de14b.json
...
contracts/manifests/dev/deployment/abis/models/eternum-BankConfig-667de14b.json
...
eternum-Capacity-27d77858.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Capacity-27d77858.json
...
eternum-EntityName-8c850fbe.json
...
contracts/manifests/dev/deployment/abis/models/eternum-EntityName-8c850fbe.json
...
eternum-Guild-22d294a4.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Guild-22d294a4.json
...
eternum-Tile-5dfdf226.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Tile-5dfdf226.json
...
eternum-GuildMember-20ae0ece.json
...
contracts/manifests/dev/deployment/abis/models/eternum-GuildMember-20ae0ece.json
...
eternum-ForeignKey-42013ea4.json
...
contracts/manifests/dev/deployment/abis/models/eternum-ForeignKey-42013ea4.json
...
eternum-Road-426df582.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Road-426df582.json
...
eternum-SpeedConfig-1e31ed6d.json
...
contracts/manifests/dev/deployment/abis/models/eternum-SpeedConfig-1e31ed6d.json
...
eternum-WeightConfig-4762f37e.json
...
contracts/manifests/dev/deployment/abis/models/eternum-WeightConfig-4762f37e.json
...
eternum-Position-421d605b.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Position-421d605b.json
...
eternum-AddressName-48fbe026.json
...
contracts/manifests/dev/deployment/abis/models/eternum-AddressName-48fbe026.json
...
eternum-RealmFreeMintConfig-767aa72c.json
...
contracts/manifests/dev/deployment/abis/models/eternum-RealmFreeMintConfig-767aa72c.json
...
eternum-ResourceAllowance-18a7f402.json
...
contracts/manifests/dev/deployment/abis/models/eternum-ResourceAllowance-18a7f402.json
...
eternum-Realm-68a0f35d.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Realm-68a0f35d.json
...
eternum-RoadConfig-424e8ddc.json
...
contracts/manifests/dev/deployment/abis/models/eternum-RoadConfig-424e8ddc.json
...
eternum-Protectee-6e671952.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Protectee-6e671952.json
...
eternum-Protector-177334e3.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Protector-177334e3.json
...
eternum-StructureCount-754e52f0.json
...
contracts/manifests/dev/deployment/abis/models/eternum-StructureCount-754e52f0.json
...
eternum-combat_systems-27f37676.json
...
contracts/manifests/dev/deployment/abis/contracts/eternum-combat_systems-27f37676.json
...
eternum-MapExploreConfig-58fbbfce.json
...
contracts/manifests/dev/deployment/abis/models/eternum-MapExploreConfig-58fbbfce.json
...
eternum-HasClaimedStartingResources-636eaec7.json
...
contracts/manifests/dev/deployment/abis/models/eternum-HasClaimedStartingResources-636eaec7.json
...
eternum-MercenariesConfig-4c7248d4.json
...
contracts/manifests/dev/deployment/abis/models/eternum-MercenariesConfig-4c7248d4.json
...
eternum-ResourceTransferLock-6a7c4096.json
...
contracts/manifests/dev/deployment/abis/models/eternum-ResourceTransferLock-6a7c4096.json
...
eternum-Liquidity-6c6683f5.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Liquidity-6c6683f5.json
...
eternum-PopulationConfig-8cead3bb.json
...
contracts/manifests/dev/deployment/abis/models/eternum-PopulationConfig-8cead3bb.json
...
eternum-WorldConfig-7b79ae7c.json
...
contracts/manifests/dev/deployment/abis/models/eternum-WorldConfig-7b79ae7c.json
...
eternum-HyperstructureResourceConfig-34106fab.json
...
contracts/manifests/dev/deployment/abis/models/eternum-HyperstructureResourceConfig-34106fab.json
...
eternum-Orders-4423b5ef.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Orders-4423b5ef.json
...
eternum-Progress-87eb8002.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Progress-87eb8002.json
...
eternum-StaminaConfig-b6eb17a7.json
...
contracts/manifests/dev/deployment/abis/models/eternum-StaminaConfig-b6eb17a7.json
...
eternum-TroopConfig-5b63d326.json
...
contracts/manifests/dev/deployment/abis/models/eternum-TroopConfig-5b63d326.json
...
eternum-Market-6dd46062.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Market-6dd46062.json
...
eternum-OwnedResourcesTracker-660391c3.json
...
contracts/manifests/dev/deployment/abis/models/eternum-OwnedResourcesTracker-660391c3.json
...
eternum-Population-28c60ba8.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Population-28c60ba8.json
...
eternum-Resource-6aa2c384.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Resource-6aa2c384.json
...
eternum-ResourceCost-11ae7f37.json
...
contracts/manifests/dev/deployment/abis/models/eternum-ResourceCost-11ae7f37.json
...
eternum-TickConfig-611cf60f.json
...
contracts/manifests/dev/deployment/abis/models/eternum-TickConfig-611cf60f.json
...
eternum-Health-3bf465a5.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Health-3bf465a5.json
...
eternum-Structure-1ccc0e57.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Structure-1ccc0e57.json
...
eternum-Weight-24cf9d66.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Weight-24cf9d66.json
...
eternum-Owner-7395b328.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Owner-7395b328.json
...
eternum-Production-30841685.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Production-30841685.json
...
eternum-Quantity-3adcab42.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Quantity-3adcab42.json
...
eternum-Stamina-64093ed8.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Stamina-64093ed8.json
...
eternum-Status-508b6172.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Status-508b6172.json
...
eternum-Level-12edd20f.json
...
contracts/manifests/dev/deployment/abis/models/eternum-Level-12edd20f.json
...
eternum-ProductionInput-4aa7f2e2.json
...
contracts/manifests/dev/deployment/abis/models/eternum-ProductionInput-4aa7f2e2.json
...
eternum-ProductionOutput-3fcdac94.json
...
contracts/manifests/dev/deployment/abis/models/eternum-ProductionOutput-3fcdac94.json
...
eternum-QuantityTracker-1889ed7d.json
...
contracts/manifests/dev/deployment/abis/models/eternum-QuantityTracker-1889ed7d.json
...
eternum-ProductionConfig-58cf51ed.json
...
contracts/manifests/dev/deployment/abis/models/eternum-ProductionConfig-58cf51ed.json
...
config.cairo
...
contracts/src/models/config.cairo
...
eternum-trade_systems-7f6765dd.json
...
contracts/manifests/dev/deployment/abis/contracts/eternum-trade_systems-7f6765dd.json
...
resources.cairo
...
contracts/src/models/resources.cairo
...
eternum-config_systems-5f8c7cdc.json
...
contracts/manifests/dev/deployment/abis/contracts/eternum-config_systems-5f8c7cdc.json
...
eternum-realm_systems-2b08f0da.json
...
contracts/manifests/dev/deployment/abis/contracts/eternum-realm_systems-2b08f0da.json
...
eternum-resource_systems-59b73d5a.json
...
contracts/manifests/dev/deployment/abis/contracts/eternum-resource_systems-59b73d5a.json
...
eternum-guild_systems-38e127d4.json
...
contracts/manifests/dev/deployment/abis/contracts/eternum-guild_systems-38e127d4.json
...
eternum-hyperstructure_systems-3660009a.json
...
contracts/manifests/dev/deployment/abis/contracts/eternum-hyperstructure_systems-3660009a.json
...
contracts.cairo
...
contracts/src/systems/hyperstructure/contracts.cairo
...
eternum-swap_systems-216e8d44.json
...
contracts/manifests/dev/deployment/abis/contracts/eternum-swap_systems-216e8d44.json
...
eternum-bank_systems-85030190.json
...
contracts/manifests/dev/deployment/abis/contracts/eternum-bank_systems-85030190.json
...
eternum-liquidity_systems-337d668f.json
...
contracts/manifests/dev/deployment/abis/contracts/eternum-liquidity_systems-337d668f.json
...
eternum-travel_systems-4ec72d4c.json
...
contracts/manifests/dev/deployment/abis/contracts/eternum-travel_systems-4ec72d4c.json
...
eternum-building_systems-4b0f3026.json
...
contracts/manifests/dev/deployment/abis/contracts/eternum-building_systems-4b0f3026.json
...
eternum-road_systems-61d8f9c9.json
...
contracts/manifests/dev/deployment/abis/contracts/eternum-road_systems-61d8f9c9.json
...
eternum-dev_bank_systems-7a630ec9.json
...
contracts/manifests/dev/deployment/abis/contracts/eternum-dev_bank_systems-7a630ec9.json
...
contracts.cairo
...
contracts/src/systems/guild/contracts.cairo
...
eternum-map_systems-5431b122.json
...
contracts/manifests/dev/deployment/abis/contracts/eternum-map_systems-5431b122.json
...
eternum-leveling_systems-5606a1c3.json
...
contracts/manifests/dev/deployment/abis/contracts/eternum-leveling_systems-5606a1c3.json
...
eternum-name_systems-bbb2e543.json
...
contracts/manifests/dev/deployment/abis/contracts/eternum-name_systems-bbb2e543.json
...
contracts.cairo
...
contracts/src/systems/map/contracts.cairo
...
eternum-donkey_systems-4851519d.json
...
contracts/manifests/dev/deployment/abis/contracts/eternum-donkey_systems-4851519d.json
...
trade_systems.cairo
...
contracts/src/systems/trade/contracts/trade_systems.cairo
...
contracts.cairo
...
contracts/src/systems/config/contracts.cairo
...
combat.cairo
...
contracts/src/models/combat.cairo
...
dojo-base.json
...
contracts/manifests/dev/deployment/abis/dojo-base.json
...
resource_transfer_system_tests.cairo
...
contracts/src/systems/resources/tests/resource_transfer_system_tests.cairo
...
general.cairo
...
contracts/src/utils/testing/general.cairo
...
liquidity.cairo
...
contracts/src/systems/bank/contracts/liquidity.cairo
...
swap.cairo
...
contracts/src/systems/bank/contracts/swap.cairo
...
buildings.cairo
...
contracts/src/models/buildings.cairo
...
battle_leave_test.cairo
...
contracts/src/systems/combat/tests/battle_leave_test.cairo
...
position.cairo
...
contracts/src/models/position.cairo
...
resource_approval_system_tests.cairo
...
contracts/src/systems/resources/tests/resource_approval_system_tests.cairo
...
battle_start_test.cairo
...
contracts/src/systems/combat/tests/battle_start_test.cairo
...
constants.cairo
...
contracts/src/constants.cairo
...
travel_systems_tests.cairo
...
contracts/src/systems/transport/tests/travel_systems_tests.cairo
...
accept_order.cairo
...
contracts/src/systems/trade/tests/trade_systems_tests/accept_order.cairo
...
tests.cairo
...
contracts/src/systems/map/tests.cairo
...
cancel_order.cairo
...
contracts/src/systems/trade/tests/trade_systems_tests/cancel_order.cairo
...
army_buy_test.cairo
...
contracts/src/systems/combat/tests/army_buy_test.cairo
...
contracts.cairo
...
contracts/src/systems/realm/contracts.cairo
...
road_systems_tests.cairo
...
contracts/src/systems/transport/tests/road_systems_tests.cairo
...
contracts.cairo
...
contracts/src/systems/buildings/contracts.cairo
...
owner.cairo
...
contracts/src/models/owner.cairo
...
movable.cairo
...
contracts/src/models/movable.cairo
...
.env.production
...
client/.env.production
...
bank.cairo
...
contracts/src/systems/bank/contracts/bank.cairo
...
liquidity.cairo
...
contracts/src/systems/bank/tests/liquidity.cairo
...
army_create_test.cairo
...
contracts/src/systems/combat/tests/army_create_test.cairo
...
swap.cairo
...
contracts/src/systems/bank/tests/swap.cairo
...
contracts.cairo
...
contracts/src/systems/name/contracts.cairo
...
create_order.cairo
...
contracts/src/systems/trade/tests/trade_systems_tests/create_order.cairo
...
Scarb.toml
...
contracts/Scarb.toml
...
level.cairo
...
contracts/src/models/level.cairo
...
stamina.cairo
...
contracts/src/models/stamina.cairo
...
tests.cairo
...
contracts/src/systems/realm/tests.cairo
...
package.json
...
client/package.json
...
bank.cairo
...
contracts/src/systems/dev/contracts/bank.cairo
...
resource.cairo
...
contracts/src/systems/dev/contracts/resource.cairo
...
internal_leveling_tests.cairo
...
contracts/src/systems/leveling/tests/internal_leveling_tests.cairo
...
trade.cairo
...
contracts/src/models/trade.cairo
...
market.cairo
...
contracts/src/models/bank/market.cairo
...
road_systems.cairo
...
contracts/src/systems/transport/contracts/road_systems.cairo
...
road.cairo
...
contracts/src/models/road.cairo
...
config.cairo
...
contracts/src/utils/testing/config.cairo
...
guild.cairo
...
contracts/src/models/guild.cairo
...
realm_leveling_tests.cairo
...
contracts/src/systems/leveling/tests/realm_leveling_tests.cairo
...
tests.cairo
...
contracts/src/systems/hyperstructure/tests.cairo
...
contracts.mdx
...
eternum-docs/docs/pages/development/contracts.mdx
...
production.cairo
...
contracts/src/models/production.cairo
...
bank.cairo
...
contracts/src/systems/bank/tests/bank.cairo
...
hyperstructure.cairo
...
contracts/src/models/hyperstructure.cairo
...
map.cairo
...
contracts/src/models/map.cairo
...
liquidity.cairo
...
contracts/src/models/bank/liquidity.cairo
...
travel_systems.cairo
...
contracts/src/systems/transport/contracts/travel_systems.cairo
...
bank.cairo
...
contracts/src/models/bank/bank.cairo
...
metadata.cairo
...
contracts/src/models/metadata.cairo
...
constants.cairo
...
contracts/src/utils/testing/constants.cairo
...
capacity.cairo
...
contracts/src/models/capacity.cairo
...
contracts.cairo
...
contracts/src/systems/resources/contracts.cairo
...
population.cairo
...
contracts/src/models/population.cairo
...
weight.cairo
...
contracts/src/models/weight.cairo
...
name.cairo
...
contracts/src/models/name.cairo
...
contracts.cairo
...
contracts/src/systems/leveling/contracts.cairo
...
realm.cairo
...
contracts/src/models/realm.cairo
...
order.cairo
...
contracts/src/models/order.cairo
...
quantity.cairo
...
contracts/src/models/quantity.cairo
...
structure.cairo
...
contracts/src/models/structure.cairo
...