Skip to content

Commit

Permalink
Merge pull request #1144 from BibliothecaDAO/u32-id
Browse files Browse the repository at this point in the history
use u32 as primary entity type
  • Loading branch information
credence0x authored Jul 30, 2024
2 parents 40b5a8f + 5fd4644 commit 260cd21
Show file tree
Hide file tree
Showing 174 changed files with 6,547 additions and 6,593 deletions.
2 changes: 1 addition & 1 deletion client/.env.production
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VITE_PUBLIC_MASTER_ADDRESS="0x7d7d5498052763f3358e429f8044f1f80ef0bbe790f7c7dcb98ef35d83ed6a8"
VITE_PUBLIC_MASTER_PRIVATE_KEY="0x57556ee557df0571d59c05e767f65ec8c9378b7768f77ca1c1246f7c1c68cd1"
VITE_PUBLIC_WORLD_ADDRESS="0x161b08e252b353008665e85ab5dcb0044a61186eb14b999657d14c04c94c824"
VITE_PUBLIC_WORLD_ADDRESS="0x72bea8ba4bc0f95fb3313cc6b8b4228bbd38c329f53e972df7fe38fa055f357"
VITE_PUBLIC_ACCOUNT_CLASS_HASH="0x05400e90f7e0ae78bd02c77cd75527280470e2fe19c54970dd79dc37a9d3645c"
# VITE_NETWORK_FEE_TOKEN="0x51205c5e6ac3ad5691c28c0c5ffcdd62c70bddb63612f75a4bac9b2a85b9449"
VITE_EVENT_KEY="0x1a2f334228cee715f1f0f54053bb6b5eac54fa336e0bc1aacf7516decb0471d"
Expand Down
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dev": "vite --host 0.0.0.0",
"build": "tsc && vite build",
"preview": "vite preview",
"components": "npx @dojoengine/core ../contracts/manifests/dev/manifest.json src/dojo/contractComponents.ts http://localhost:5050 0x161b08e252b353008665e85ab5dcb0044a61186eb14b999657d14c04c94c824",
"components": "npx @dojoengine/core ../contracts/manifests/dev/deployment/manifest.json src/dojo/contractComponents.ts http://localhost:5050 0x72bea8ba4bc0f95fb3313cc6b8b4228bbd38c329f53e972df7fe38fa055f357",
"test": "vitest run",
"test:watch": "vitest",
"test:ui": "vitest --ui",
Expand Down
2 changes: 0 additions & 2 deletions client/src/dojo/contractComponents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -919,8 +919,6 @@ export function defineContractComponents(world: World) {
return defineComponent(
world,
{
_col: RecsType.BigInt,
_row: RecsType.BigInt,
col: RecsType.BigInt,
row: RecsType.BigInt,
explored_by_id: RecsType.BigInt,
Expand Down
2 changes: 1 addition & 1 deletion client/src/dojo/events/bankEventQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Event, client, getEventsQuery } from "./graphqlClient";
import { SWAP_EVENT } from "@bibliothecadao/eternum";

export const MAX_EVENTS = 5000;
export const ADMIN_BANK_ENTITY_ID = "0xde0b6b3a763fffe"; //999999999999999998n;
export const ADMIN_BANK_ENTITY_ID = "0x3b9ac9fe"; //999999998n;

export interface BankStatsInterface {
ownerTotalLordsFees: number;
Expand Down
2 changes: 1 addition & 1 deletion config/bank/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const provider = new EternumProvider(manifest, nodeUrl);
const account = new Account(provider.provider, VITE_PUBLIC_MASTER_ADDRESS, VITE_PUBLIC_MASTER_PRIVATE_KEY);

// entity ids
const ADMIN_BANK_ENTITY_ID = 999999999999999998n;
const ADMIN_BANK_ENTITY_ID = 999999998n;
const RESOURCE_LIQUIDITY = 250000;
const LORDS_LIQUIDITY_PER_RESOURCE = 250000;

Expand Down
2 changes: 1 addition & 1 deletion contracts/Scarb.lock
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ source = "git+https://github.com/dojoengine/dojo?rev=71b1f1a4#71b1f1a467534cbeeb

[[package]]
name = "eternum"
version = "0.6.8"
version = "1.0.0"
dependencies = [
"alexandria_data_structures",
"alexandria_math",
Expand Down
4 changes: 2 additions & 2 deletions contracts/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "eternum"
version = "0.6.8"
version = "1.0.0"

[cairo]
sierra-replace-ids = true
Expand All @@ -25,7 +25,7 @@ default = "eternum"
rpc_url = "https://api.cartridge.gg/x/eternum-24/katana"
account_address = "0x7d7d5498052763f3358e429f8044f1f80ef0bbe790f7c7dcb98ef35d83ed6a8"
private_key = "0x57556ee557df0571d59c05e767f65ec8c9378b7768f77ca1c1246f7c1c68cd1"
world_address = "0x161b08e252b353008665e85ab5dcb0044a61186eb14b999657d14c04c94c824"
world_address = "0x72bea8ba4bc0f95fb3313cc6b8b4228bbd38c329f53e972df7fe38fa055f357"

[[target.dojo]]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"type": "impl",
"name": "ContractImpl",
"interface_name": "dojo::contract::IContract"
"interface_name": "dojo::contract::contract::IContract"
},
{
"type": "struct",
Expand All @@ -24,7 +24,7 @@
},
{
"type": "interface",
"name": "dojo::contract::IContract",
"name": "dojo::contract::contract::IContract",
"items": [
{
"type": "function",
Expand Down Expand Up @@ -97,11 +97,11 @@
{
"type": "impl",
"name": "WorldProviderImpl",
"interface_name": "dojo::world::IWorldProvider"
"interface_name": "dojo::world::world_contract::IWorldProvider"
},
{
"type": "struct",
"name": "dojo::world::IWorldDispatcher",
"name": "dojo::world::world_contract::IWorldDispatcher",
"members": [
{
"name": "contract_address",
Expand All @@ -111,15 +111,15 @@
},
{
"type": "interface",
"name": "dojo::world::IWorldProvider",
"name": "dojo::world::world_contract::IWorldProvider",
"items": [
{
"type": "function",
"name": "world",
"inputs": [],
"outputs": [
{
"type": "dojo::world::IWorldDispatcher"
"type": "dojo::world::world_contract::IWorldDispatcher"
}
],
"state_mutability": "view"
Expand All @@ -137,11 +137,11 @@
"members": [
{
"name": "x",
"type": "core::integer::u128"
"type": "core::integer::u32"
},
{
"name": "y",
"type": "core::integer::u128"
"type": "core::integer::u32"
}
]
},
Expand All @@ -155,7 +155,7 @@
"inputs": [
{
"name": "realm_entity_id",
"type": "core::integer::u128"
"type": "core::integer::u32"
},
{
"name": "coord",
Expand All @@ -172,7 +172,7 @@
],
"outputs": [
{
"type": "core::integer::u128"
"type": "core::integer::u32"
}
],
"state_mutability": "external"
Expand All @@ -183,7 +183,7 @@
"inputs": [
{
"name": "bank_entity_id",
"type": "core::integer::u128"
"type": "core::integer::u32"
},
{
"name": "new_owner_fee_num",
Expand Down Expand Up @@ -220,11 +220,11 @@
{
"type": "impl",
"name": "UpgradableImpl",
"interface_name": "dojo::components::upgradeable::IUpgradeable"
"interface_name": "dojo::contract::upgradeable::IUpgradeable"
},
{
"type": "interface",
"name": "dojo::components::upgradeable::IUpgradeable",
"name": "dojo::contract::upgradeable::IUpgradeable",
"items": [
{
"type": "function",
Expand All @@ -242,7 +242,7 @@
},
{
"type": "event",
"name": "dojo::components::upgradeable::upgradeable::Upgraded",
"name": "dojo::contract::upgradeable::upgradeable::Upgraded",
"kind": "struct",
"members": [
{
Expand All @@ -254,12 +254,12 @@
},
{
"type": "event",
"name": "dojo::components::upgradeable::upgradeable::Event",
"name": "dojo::contract::upgradeable::upgradeable::Event",
"kind": "enum",
"variants": [
{
"name": "Upgraded",
"type": "dojo::components::upgradeable::upgradeable::Upgraded",
"type": "dojo::contract::upgradeable::upgradeable::Upgraded",
"kind": "nested"
}
]
Expand All @@ -271,7 +271,7 @@
"variants": [
{
"name": "UpgradeableEvent",
"type": "dojo::components::upgradeable::upgradeable::Event",
"type": "dojo::contract::upgradeable::upgradeable::Event",
"kind": "nested"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"type": "impl",
"name": "ContractImpl",
"interface_name": "dojo::contract::IContract"
"interface_name": "dojo::contract::contract::IContract"
},
{
"type": "struct",
Expand All @@ -24,7 +24,7 @@
},
{
"type": "interface",
"name": "dojo::contract::IContract",
"name": "dojo::contract::contract::IContract",
"items": [
{
"type": "function",
Expand Down Expand Up @@ -97,11 +97,11 @@
{
"type": "impl",
"name": "WorldProviderImpl",
"interface_name": "dojo::world::IWorldProvider"
"interface_name": "dojo::world::world_contract::IWorldProvider"
},
{
"type": "struct",
"name": "dojo::world::IWorldDispatcher",
"name": "dojo::world::world_contract::IWorldDispatcher",
"members": [
{
"name": "contract_address",
Expand All @@ -111,15 +111,15 @@
},
{
"type": "interface",
"name": "dojo::world::IWorldProvider",
"name": "dojo::world::world_contract::IWorldProvider",
"items": [
{
"type": "function",
"name": "world",
"inputs": [],
"outputs": [
{
"type": "dojo::world::IWorldDispatcher"
"type": "dojo::world::world_contract::IWorldDispatcher"
}
],
"state_mutability": "view"
Expand All @@ -137,11 +137,11 @@
"members": [
{
"name": "x",
"type": "core::integer::u128"
"type": "core::integer::u32"
},
{
"name": "y",
"type": "core::integer::u128"
"type": "core::integer::u32"
}
]
},
Expand Down Expand Up @@ -231,7 +231,7 @@
"inputs": [
{
"name": "entity_id",
"type": "core::integer::u128"
"type": "core::integer::u32"
},
{
"name": "building_coord",
Expand All @@ -255,7 +255,7 @@
"inputs": [
{
"name": "entity_id",
"type": "core::integer::u128"
"type": "core::integer::u32"
},
{
"name": "building_coord",
Expand Down Expand Up @@ -288,11 +288,11 @@
{
"type": "impl",
"name": "UpgradableImpl",
"interface_name": "dojo::components::upgradeable::IUpgradeable"
"interface_name": "dojo::contract::upgradeable::IUpgradeable"
},
{
"type": "interface",
"name": "dojo::components::upgradeable::IUpgradeable",
"name": "dojo::contract::upgradeable::IUpgradeable",
"items": [
{
"type": "function",
Expand All @@ -310,7 +310,7 @@
},
{
"type": "event",
"name": "dojo::components::upgradeable::upgradeable::Upgraded",
"name": "dojo::contract::upgradeable::upgradeable::Upgraded",
"kind": "struct",
"members": [
{
Expand All @@ -322,12 +322,12 @@
},
{
"type": "event",
"name": "dojo::components::upgradeable::upgradeable::Event",
"name": "dojo::contract::upgradeable::upgradeable::Event",
"kind": "enum",
"variants": [
{
"name": "Upgraded",
"type": "dojo::components::upgradeable::upgradeable::Upgraded",
"type": "dojo::contract::upgradeable::upgradeable::Upgraded",
"kind": "nested"
}
]
Expand All @@ -339,7 +339,7 @@
"variants": [
{
"name": "UpgradeableEvent",
"type": "dojo::components::upgradeable::upgradeable::Event",
"type": "dojo::contract::upgradeable::upgradeable::Event",
"kind": "nested"
}
]
Expand Down
Loading

0 comments on commit 260cd21

Please sign in to comment.