Skip to content
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

Rc 1 #1851

Open
wants to merge 100 commits into
base: main
Choose a base branch
from
Open

Rc 1 #1851

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
1cc8ae7
configManager: travelStaminaCostConfig
bob0005 Oct 14, 2024
2a9d74f
explore reward
bob0005 Oct 14, 2024
2de3144
move consts into config type, update func, cleanups
ponderingdemocritus Oct 15, 2024
643adfe
fix config issue
ponderingdemocritus Oct 15, 2024
7071408
improve config
ponderingdemocritus Oct 15, 2024
bb455dc
pretteir
ponderingdemocritus Oct 15, 2024
8bf1719
fix build
ponderingdemocritus Oct 15, 2024
6801555
prettier
ponderingdemocritus Oct 15, 2024
0863069
types
ponderingdemocritus Oct 15, 2024
3114173
types
ponderingdemocritus Oct 15, 2024
81dcb2f
fix config
ponderingdemocritus Oct 15, 2024
b1399f5
fix issue with buildings enum'
ponderingdemocritus Oct 15, 2024
ac53635
remove console.log
aymericdelab Oct 15, 2024
4df7593
tick config
bob0005 Oct 15, 2024
9caaa22
fix config manager
aymericdelab Oct 15, 2024
98ca85a
Merge branch 'feat/config-work' into enh/client-config-manager
bob0005 Oct 15, 2024
18c265b
Merge branch 'feat/config-work' into enh/client-config-manager
bob0005 Oct 15, 2024
1216d97
Merge remote-tracking branch 'origin/main' into enh/client-config-man…
bob0005 Oct 15, 2024
6cdd454
Fix claim on structures + selected army
edisontim Oct 15, 2024
95c1ffe
fix add chat icon + hide chat icon
aymericdelab Oct 15, 2024
44189da
change values from sdk to onchain
bob0005 Oct 15, 2024
da9095c
prettier
bob0005 Oct 15, 2024
906b7ae
add guild chat
aymericdelab Oct 15, 2024
aa2e6b8
Fix tests
bob0005 Oct 15, 2024
7b8a269
Merge pull request #1850 from BibliothecaDAO/feat-chat
ponderingdemocritus Oct 15, 2024
cff9d59
Merge pull request #1847 from BibliothecaDAO/fix/battle-actions
ponderingdemocritus Oct 15, 2024
a4259e4
conflict
ponderingdemocritus Oct 16, 2024
32b2ce0
remove console log
ponderingdemocritus Oct 16, 2024
616a06f
Improve chat (#1854)
aymericdelab Oct 16, 2024
ef1e3fe
add destination for resource arrivals
bob0005 Oct 16, 2024
cbc538d
Fix max army buy + amm swap client crash
bob0005 Oct 16, 2024
963dd7d
Revert "Fix max army buy + amm swap client crash"
bob0005 Oct 16, 2024
8d05f50
Revert "add destination for resource arrivals"
bob0005 Oct 16, 2024
4f571d5
Add destination name for resource arrivals
bob0005 Oct 16, 2024
4dc6fe3
Fix army buy max + amm swap client crash
bob0005 Oct 16, 2024
4b1634f
Address rabbit comments
bob0005 Oct 16, 2024
3d22735
Fix fragment mine resource production + armies production
edisontim Oct 16, 2024
b216174
prettier
edisontim Oct 16, 2024
ad9b156
Fix bug with bigints
edisontim Oct 16, 2024
abe2e34
remove dupe hook
ponderingdemocritus Oct 16, 2024
734981b
removes unused zustand
ponderingdemocritus Oct 16, 2024
94ba145
prettier
ponderingdemocritus Oct 17, 2024
44c2368
Merge pull request #1860 from BibliothecaDAO/chore/clean-hook
ponderingdemocritus Oct 17, 2024
0a2fab3
update market
ponderingdemocritus Oct 17, 2024
841da49
Fetch onchain config
bob0005 Oct 17, 2024
c99cbdc
classes
ponderingdemocritus Oct 17, 2024
ca54d5e
Cleanup sdk usage in client
bob0005 Oct 17, 2024
fc32c71
Merge branch 'rc-1' into enh/client-config-manager
bob0005 Oct 17, 2024
07e63ac
prettier
ponderingdemocritus Oct 17, 2024
96bf29a
battle screen
ponderingdemocritus Oct 17, 2024
6538de4
prettier?
ponderingdemocritus Oct 17, 2024
f26eaa8
fix issue
ponderingdemocritus Oct 17, 2024
364e7aa
Merge pull request #1856 from BibliothecaDAO/fix/market-crash
ponderingdemocritus Oct 17, 2024
d3bd7cb
Merge pull request #1863 from BibliothecaDAO/styles/ui-work
ponderingdemocritus Oct 17, 2024
43456ea
feat: randomize mercenaries number (#1861)
edisontim Oct 17, 2024
5c0bf58
Address comments
bob0005 Oct 17, 2024
0e25f47
Merge pull request #1848 from BibliothecaDAO/enh/client-config-manager
ponderingdemocritus Oct 17, 2024
29f4920
optimize re-renders on balance
edisontim Oct 17, 2024
bc98bc6
Merge branch 'rc-1' of github.com:BibliothecaDAO/eternum into fix/res…
edisontim Oct 17, 2024
51fddb3
Merge pull request #1857 from BibliothecaDAO/fix/resource-prod-fragme…
ponderingdemocritus Oct 17, 2024
78a9a12
bump (#1871)
ponderingdemocritus Oct 18, 2024
34a4a72
feat: private or guild only hyperstructure contribs (#1869)
edisontim Oct 18, 2024
e2c3420
fix: hyperstructure final stage progress bug (#1867)
r0man1337 Oct 18, 2024
3566285
Fix tooltip for recently built buildings
bob0005 Oct 18, 2024
f6db602
[contracts + client] season pass (#1862)
credence0x Oct 18, 2024
1ffcf80
new army movement (#1872)
aymericdelab Oct 19, 2024
d25fe44
[client] armies animation and positions bug fix (#1868)
r0man1337 Oct 19, 2024
d8c4cbf
Merge pull request #1876 from BibliothecaDAO/fix/optimistic-build-too…
ponderingdemocritus Oct 19, 2024
ee5a764
dojo-alpha17
credence0x Oct 19, 2024
d4b228f
dojo-alpha17
credence0x Oct 19, 2024
56833b8
update dojo.js
credence0x Oct 19, 2024
7dbed41
update account class hash
credence0x Oct 19, 2024
a7bd7df
Add view info for quests (#1874)
bob0005 Oct 19, 2024
5f93294
update setup.ys
credence0x Oct 20, 2024
2b864cb
Merge branch 'rc-1' of https://github.com/BibliothecaDAO/eternum into…
credence0x Oct 20, 2024
e7e5e41
Fix building panel client crash (#1878)
bob0005 Oct 20, 2024
42b99f1
Merge branch 'rc-1' of https://github.com/BibliothecaDAO/eternum into…
credence0x Oct 20, 2024
5eab7af
minor config fixes
ponderingdemocritus Oct 20, 2024
61a925b
contracts: allow entity ownership transfer
credence0x Oct 21, 2024
4b17f05
clean
ponderingdemocritus Oct 21, 2024
8b04beb
contracts: ownership transfer: add tests
credence0x Oct 21, 2024
20b6995
++Fix deployment script and update dependencies (#1882)
aymericdelab Oct 21, 2024
fcbf3a6
update tests
credence0x Oct 21, 2024
0d4ec5f
Merge branch 'dojo-alpha17' of https://github.com/BibliothecaDAO/eter…
credence0x Oct 21, 2024
27fc729
Merge pull request #1881 from BibliothecaDAO/ownership-transfer
ponderingdemocritus Oct 21, 2024
a43f706
fix syncing and bump js
ponderingdemocritus Oct 21, 2024
08be027
conflict
ponderingdemocritus Oct 21, 2024
511efe9
fix lock
ponderingdemocritus Oct 21, 2024
8165175
Merge pull request #1877 from BibliothecaDAO/dojo-alpha17
ponderingdemocritus Oct 21, 2024
21f96e8
contracts: move quests to contracts
credence0x Oct 21, 2024
855b708
Merge branch 'rc-1' of https://github.com/BibliothecaDAO/eternum into…
credence0x Oct 21, 2024
b05e444
contracts: move quests to contracts
credence0x Oct 21, 2024
c1c025f
contracts: move quests to contracts
credence0x Oct 21, 2024
f568ab5
format
credence0x Oct 22, 2024
c2195d1
contracts: remove lords from quest
credence0x Oct 22, 2024
995bd5a
banks go brr
credence0x Oct 22, 2024
115f47a
fix tests
credence0x Oct 22, 2024
dcc3c60
Show battle info on hover (#1885)
aymericdelab Oct 22, 2024
e61c2dd
Fix block time (#1894)
edisontim Oct 22, 2024
9eb0e77
Merge pull request #1883 from BibliothecaDAO/mint-resources
ponderingdemocritus Oct 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/test-contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@ jobs:
realm_test,
guild_test,
transport_test,
test_ownership_systems,
]
fail-fast: false
steps:
- name: Download Dojo release artifact
run: |
curl -L -o dojo-linux-x86_64.tar.gz https://github.com/dojoengine/dojo/releases/download/v1.0.0-alpha.12/dojo_v1.0.0-alpha.12_linux_amd64.tar.gz
curl -L -o dojo-linux-x86_64.tar.gz https://github.com/dojoengine/dojo/releases/download/v1.0.0-alpha.17/dojo_v1.0.0-alpha.17_linux_amd64.tar.gz
tar -xzf dojo-linux-x86_64.tar.gz
sudo mv sozo /usr/local/bin/
- name: Checkout repository
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/test-season-pass.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: test season pass

on:
pull_request:
paths-ignore:
- "contracts/**"
- "client/**"
- "**/manifest.json"
- "discord-bot/**"
- "config/**"
- ".github/**"
- "pnpm-lock.yaml"

env:
SCARB_VERSION: v2.8.2
Comment on lines +14 to +15
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider using the SCARB_VERSION environment variable.

The SCARB_VERSION environment variable is defined but not explicitly used in the workflow steps. To ensure consistency and make version updates easier, consider using this variable in the setup steps.

Update the Scarb setup step to use the environment variable:

 - uses: software-mansion/setup-scarb@v1
   with:
+    scarb-version: ${{ env.SCARB_VERSION }}
     tool-versions: season_pass/contracts/.tool-versions
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
env:
SCARB_VERSION: v2.8.2
env:
SCARB_VERSION: v2.8.2
- uses: software-mansion/setup-scarb@v1
with:
scarb-version: ${{ env.SCARB_VERSION }}
tool-versions: season_pass/contracts/.tool-versions


jobs:
test-season-pass:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: software-mansion/setup-scarb@v1
with:
tool-versions: season_pass/contracts/.tool-versions
- uses: foundry-rs/setup-snfoundry@v3
with:
tool-versions: season_pass/contracts/.tool-versions
Comment on lines +17 to +27
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

🛠️ Refactor suggestion

Update actions and pin the Ubuntu version.

The current workflow uses actions/checkout@v3 and runs on ubuntu-latest. To ensure compatibility and consistency, consider the following improvements:

  1. Update actions/checkout to the latest version:

    - uses: actions/checkout@v3
    + uses: actions/checkout@v4
  2. Pin the Ubuntu version to ensure build consistency:

    - runs-on: ubuntu-latest
    + runs-on: ubuntu-22.04
🔗 Analysis chain

Consider updating actions and pinning the Ubuntu version.

The job setup looks good overall, but there are a few suggestions for improvement:

  1. Update the checkout action to the latest version:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
  1. Consider pinning the Ubuntu version to ensure consistency:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-22.04
  1. Verify that the .tool-versions file exists and contains the correct versions:
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence and content of the .tool-versions file

# Test: Check if the file exists and display its content
if [ -f "season_pass/contracts/.tool-versions" ]; then
    echo "Content of .tool-versions file:"
    cat "season_pass/contracts/.tool-versions"
else
    echo "Error: .tool-versions file not found"
    exit 1
fi

Length of output: 201


Script:

#!/bin/bash
# Description: Check the version of actions/checkout in the workflow file

# Use grep to find the actions/checkout version
echo "Checking actions/checkout version:"
grep 'uses: actions/checkout@' .github/workflows/test-season-pass.yml || { echo "actions/checkout not found"; exit 1; }

Length of output: 184


Script:

#!/bin/bash
# Description: Verify if the Ubuntu version is pinned in the workflow file

# Check if runs-on is set to ubuntu-latest
echo "Checking runs-on configuration:"
if grep -q 'runs-on: ubuntu-latest' .github/workflows/test-season-pass.yml; then
    echo "runs-on is set to ubuntu-latest. Consider pinning to a specific version like ubuntu-22.04."
    exit 1
else
    echo "runs-on is pinned to a specific Ubuntu version."
fi

Length of output: 346

- run: scarb build
working-directory: season_pass/contracts
- run: snforge test
working-directory: season_pass/contracts
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules
node_modules
target
.snfoundry_cache
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
scarb 2.7.0
dojo 1.0.0-alpha.12
dojo 1.0.0-alpha.17
2 changes: 1 addition & 1 deletion balancing/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ResourceTable } from "./components/modules/resource-table";
function App() {
return (
<>
<div className="bg-black text-white">
<div className="bg-brown text-white">
<Tabs defaultValue="account">
<TabsList>
<TabsTrigger value="resources">Production</TabsTrigger>
Expand Down
4 changes: 2 additions & 2 deletions client/.env.preview
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VITE_PUBLIC_MASTER_ADDRESS="0x1a3e37c77be7de91a9177c6b57956faa6da25607e567b10a25cf64fea5e533b"
VITE_PUBLIC_MASTER_PRIVATE_KEY="0x4ab5a607d92f0870cfd82ef9cecb2fe903830441180fd432b831a8863c08097"
VITE_PUBLIC_WORLD_ADDRESS="0x76ca3dfc3e96843716f882546f0db96b7da0cf988bdba284b469d0defb2f48f"
VITE_PUBLIC_ACCOUNT_CLASS_HASH="0x05400e90f7e0ae78bd02c77cd75527280470e2fe19c54970dd79dc37a9d3645c"
VITE_PUBLIC_WORLD_ADDRESS="0x320b2713e324fe3125bbc42d85ff69cb3c0908b436fa38a35746dbc45deeb11"
VITE_PUBLIC_ACCOUNT_CLASS_HASH="0x07dc7899aa655b0aae51eadff6d801a58e97dd99cf4666ee59e704249e51adf2"
VITE_EVENT_KEY="0x1a2f334228cee715f1f0f54053bb6b5eac54fa336e0bc1aacf7516decb0471d"
VITE_PUBLIC_TORII="https://api.cartridge.gg/x/eternum-42/torii"
VITE_PUBLIC_NODE_URL="https://api.cartridge.gg/x/eternum-42/katana/"
Expand Down
8 changes: 6 additions & 2 deletions client/.env.production
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VITE_PUBLIC_MASTER_ADDRESS="0x779c2c098f066ddde5850ec8426511e46e6499adf0b5c77e8961917413b57db"
VITE_PUBLIC_MASTER_PRIVATE_KEY="0x189765c7b9daa2efdd3025d3236a929ce5e510834b8cba4f002a0d5c1accb5a"
VITE_PUBLIC_WORLD_ADDRESS="0x76ca3dfc3e96843716f882546f0db96b7da0cf988bdba284b469d0defb2f48f"
VITE_PUBLIC_ACCOUNT_CLASS_HASH="0x05400e90f7e0ae78bd02c77cd75527280470e2fe19c54970dd79dc37a9d3645c"
VITE_PUBLIC_WORLD_ADDRESS="0x320b2713e324fe3125bbc42d85ff69cb3c0908b436fa38a35746dbc45deeb11"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Old VITE_PUBLIC_WORLD_ADDRESS still present in deployment manifests

The old VITE_PUBLIC_WORLD_ADDRESS is still found in the following files:

  • contracts/manifests/prod/deployment/manifest.toml
  • contracts/manifests/prod/deployment/manifest.json

Please verify if these instances need to be updated to the new address to ensure consistency across your deployment configurations.

🔗 Analysis chain

Verify the new VITE_PUBLIC_WORLD_ADDRESS value

The VITE_PUBLIC_WORLD_ADDRESS has been updated to a new value. This change could have significant implications for the entire system in the production environment.

Please confirm that this new address is correct and has been thoroughly tested. Run the following script to check for any other occurrences of the old address in the codebase:

If any occurrences are found, they may need to be updated as well.


Please run the following script to search for any remaining instances of the old VITE_PUBLIC_WORLD_ADDRESS:


Please run the following script to search for any remaining instances of the old VITE_PUBLIC_WORLD_ADDRESS:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for any remaining instances of the old VITE_PUBLIC_WORLD_ADDRESS

OLD_ADDRESS="0x76ca3dfc3e96843716f882546f0db96b7da0cf988bdba284b469d0defb2f48f"

echo "Searching for occurrences of the old address:"
rg "$OLD_ADDRESS" --type-not env

Length of output: 294


Script:

#!/bin/bash
# Description: Search for any remaining instances of the old VITE_PUBLIC_WORLD_ADDRESS

OLD_ADDRESS="0x76ca3dfc3e96843716f882546f0db96b7da0cf988bdba284b469d0defb2f48f"

echo "Searching for occurrences of the old address:"
rg "$OLD_ADDRESS" --type-not dotenv

Length of output: 300


Script:

#!/bin/bash
# Description: Search for any remaining instances of the old VITE_PUBLIC_WORLD_ADDRESS

OLD_ADDRESS="0x76ca3dfc3e96843716f882546f0db96b7da0cf988bdba284b469d0defb2f48f"

echo "Searching for occurrences of the old address:"
rg "$OLD_ADDRESS" --glob '!*.env*'

Length of output: 530

VITE_PUBLIC_ACCOUNT_CLASS_HASH="0x07dc7899aa655b0aae51eadff6d801a58e97dd99cf4666ee59e704249e51adf2"
VITE_EVENT_KEY="0x1a2f334228cee715f1f0f54053bb6b5eac54fa336e0bc1aacf7516decb0471d"
VITE_PUBLIC_TORII="https://api.cartridge.gg/x/eternum-42/torii"
VITE_PUBLIC_NODE_URL="https://api.cartridge.gg/x/eternum-42/katana/"
Expand All @@ -10,3 +10,7 @@ VITE_PUBLIC_GAME_VERSION="v0.9.0"
VITE_PUBLIC_SHOW_FPS=false
VITE_PUBLIC_GRAPHICS_DEV=false
VITE_PUBLIC_TORII_RELAY="/dns4/api.cartridge.gg/tcp/443/x-parity-wss/%2Fx%2Feternum-42%2Ftorii%2Fwss"

VITE_SEASON_PASS_ADDRESS="0x0"
VITE_REALMS_ADDRESS="0x0"
VITE_LORDS_ADDRESS="0x0"
Comment on lines +14 to +16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Reconsider using placeholder addresses in production

The newly added variables VITE_SEASON_PASS_ADDRESS, VITE_REALMS_ADDRESS, and VITE_LORDS_ADDRESS are all set to "0x0". This is unusual for a production environment and could potentially lead to issues or security risks.

Consider the following actions:

  1. If these addresses are not yet available, it might be better to leave them undefined or use a more descriptive placeholder (e.g., "NOT_YET_DEPLOYED").
  2. If these addresses should be defined, ensure that the correct production addresses are used instead of "0x0".
  3. Add comments explaining the purpose of these addresses and when they are expected to be populated with real values.

Example:

-VITE_SEASON_PASS_ADDRESS="0x0"
-VITE_REALMS_ADDRESS="0x0"
-VITE_LORDS_ADDRESS="0x0"
+# TODO: Update with actual addresses before deployment
+VITE_SEASON_PASS_ADDRESS="NOT_YET_DEPLOYED"
+VITE_REALMS_ADDRESS="NOT_YET_DEPLOYED"
+VITE_LORDS_ADDRESS="NOT_YET_DEPLOYED"

Additionally, consider adding checks in the application code to ensure these addresses are properly set before using them.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
VITE_SEASON_PASS_ADDRESS="0x0"
VITE_REALMS_ADDRESS="0x0"
VITE_LORDS_ADDRESS="0x0"
# TODO: Update with actual addresses before deployment
VITE_SEASON_PASS_ADDRESS="NOT_YET_DEPLOYED"
VITE_REALMS_ADDRESS="NOT_YET_DEPLOYED"
VITE_LORDS_ADDRESS="NOT_YET_DEPLOYED"

12 changes: 8 additions & 4 deletions client/.env.sample
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VITE_PUBLIC_MASTER_ADDRESS="0xb3ff441a68610b30fd5e2abbf3a1548eb6ba6f3559f2862bf2dc757e5828ca"
VITE_PUBLIC_MASTER_PRIVATE_KEY="0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a"
VITE_PUBLIC_WORLD_ADDRESS="0x177a3f3d912cf4b55f0f74eccf3b7def7c6144efeba033e9f21d9cdb0230c64"
VITE_PUBLIC_ACCOUNT_CLASS_HASH="0x05400e90f7e0ae78bd02c77cd75527280470e2fe19c54970dd79dc37a9d3645c"
VITE_PUBLIC_MASTER_ADDRESS="0x127fd5f1fe78a71f8bcd1fec63e3fe2f0486b6ecd5c86a0466c3a21fa5cfcec"
VITE_PUBLIC_MASTER_PRIVATE_KEY="0xc5b2fcab997346f3ea1c00b002ecf6f382c5f9c9659a3894eb783c5320f912"
VITE_PUBLIC_WORLD_ADDRESS="0x320b2713e324fe3125bbc42d85ff69cb3c0908b436fa38a35746dbc45deeb11"
VITE_PUBLIC_ACCOUNT_CLASS_HASH="0x07dc7899aa655b0aae51eadff6d801a58e97dd99cf4666ee59e704249e51adf2"
VITE_NETWORK_FEE_TOKEN="0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"
Comment on lines +1 to +4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

⚠️ Potential issue

Security Concern Confirmed: .env.sample is Tracked by Git

The .env.sample file contains sensitive information and is currently tracked by git, posing a security risk.

Action Items:

  • Remove the VITE_PUBLIC_MASTER_PRIVATE_KEY from .env.sample.
  • Update .gitignore to exclude .env.sample and other environment files to prevent future accidental commits.
  • Implement a secure secrets management system to handle sensitive information.
🔗 Analysis chain

Security concern: Sensitive information in environment file

The VITE_PUBLIC_MASTER_PRIVATE_KEY variable contains a private key, which is a security risk if this file is committed to version control or shared.

Consider the following recommendations:

  1. Remove the private key from this sample file.
  2. Use a secure method to manage sensitive information, such as environment-specific files that are not committed to the repository or a secrets management system.

To verify if this file is being tracked by git, run the following command:

If the file is tracked, consider adding it to .gitignore to prevent accidental commits of sensitive information.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if .env.sample is tracked by git
git ls-files --error-unmatch client/.env.sample && echo "File is tracked" || echo "File is not tracked"

Length of output: 109

🧰 Tools
🪛 Gitleaks

2-2: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

VITE_EVENT_KEY="0x1a2f334228cee715f1f0f54053bb6b5eac54fa336e0bc1aacf7516decb0471d"
VITE_PUBLIC_TORII="http://localhost:8080"
Expand All @@ -12,5 +12,9 @@ VITE_PUBLIC_DEV=false
VITE_PUBLIC_SHOW_FPS=true
VITE_PUBLIC_GRAPHICS_DEV=false

VITE_SEASON_PASS_ADDRESS="0x18cd31a545b13597adeafa40979a7456aae9d12bd0b9a9879089ed051402c6c"
VITE_REALMS_ADDRESS="0x57e1cb22f5688a833ceff37d8569297877dd8fc1896e36f1a0c8b2d30b7de85"
VITE_LORDS_ADDRESS="0x5839f41cadbe12678b2e7b67bd6daa5bd54b7b19bdc835c87fe4662dbf7a93c"

# You will have to change this to your local torii. It will be in the printout.
VITE_PUBLIC_TORII_RELAY="/ip4/0.0.0.0/udp/9091/webrtc-direct/certhash/uEiAN3-ttwg-yphp9ZgqhSCGNsWLXIo0eHEsrLRUzp4SpKg"
2 changes: 1 addition & 1 deletion client/dojoConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const dojoConfig = createDojoConfig({
masterAddress: VITE_PUBLIC_MASTER_ADDRESS,
masterPrivateKey: VITE_PUBLIC_MASTER_PRIVATE_KEY,
accountClassHash:
VITE_PUBLIC_ACCOUNT_CLASS_HASH || "0x05400e90f7e0ae78bd02c77cd75527280470e2fe19c54970dd79dc37a9d3645c",
VITE_PUBLIC_ACCOUNT_CLASS_HASH || "0x07dc7899aa655b0aae51eadff6d801a58e97dd99cf4666ee59e704249e51adf2",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Inconsistent VITE_PUBLIC_ACCOUNT_CLASS_HASH value found in .github/workflows/test-client.yml.

  • The VITE_PUBLIC_ACCOUNT_CLASS_HASH is set to "0x0" in .github/workflows/test-client.yml, which does not match the updated hash used in other .env files and client/dojoConfig.ts.
🔗 Analysis chain

Verify the new account class hash across the codebase.

The accountClassHash default value has been updated. This change appears to be part of a broader update across the codebase, including modifications to .env.preview and .env.production files.

To ensure consistency and correctness, please run the following script:

Ensure that:

  1. The new hash is present in the relevant .env files.
  2. There are no remaining instances of the old hash.
  3. The VITE_PUBLIC_ACCOUNT_CLASS_HASH values in .env files match the new hash.

If any inconsistencies are found, please update the relevant files to maintain consistency across the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new account class hash across the codebase

# Test 1: Check for the new hash in .env files
echo "Checking .env files for the new hash:"
rg "0x07dc7899aa655b0aae51eadff6d801a58e97dd99cf4666ee59e704249e51adf2" .env*

# Test 2: Check for any remaining instances of the old hash
echo "Checking for any remaining instances of the old hash:"
rg "0x05400e90f7e0ae78bd02c77cd75527280470e2fe19c54970dd79dc37a9d3645c"

# Test 3: Verify VITE_PUBLIC_ACCOUNT_CLASS_HASH in .env files
echo "Verifying VITE_PUBLIC_ACCOUNT_CLASS_HASH in .env files:"
rg "VITE_PUBLIC_ACCOUNT_CLASS_HASH" .env*

Length of output: 610


Script:

#!/bin/bash
# Description: Comprehensive verification of the account class hash across the entire codebase

# Test 1: Check for the new hash in all files
echo "Checking for the new account class hash in the codebase:"
rg "0x07dc7899aa655b0aae51eadff6d801a58e97dd99cf4666ee59e704249e51adf2" --hidden --ignore-dir={node_modules,dist,build}

# Test 2: Check for any remaining instances of the old hash in all files
echo "Checking for any remaining instances of the old account class hash in the codebase:"
rg "0x05400e90f7e0ae78bd02c77cd75527280470e2fe19c54970dd79dc37a9d3645c" --hidden --ignore-dir={node_modules,dist,build}

# Test 3: Verify all instances of VITE_PUBLIC_ACCOUNT_CLASS_HASH are updated
echo "Verifying all occurrences of VITE_PUBLIC_ACCOUNT_CLASS_HASH in the codebase:"
rg "VITE_PUBLIC_ACCOUNT_CLASS_HASH" --hidden --ignore-dir={node_modules,dist,build}

Length of output: 2187


Script:

#!/bin/bash
# Description: Comprehensive verification of the account class hash across the entire codebase with corrected rg commands

# Test 1: Check for the new hash in all files
echo "Checking for the new account class hash in the codebase:"
rg "0x07dc7899aa655b0aae51eadff6d801a58e97dd99cf4666ee59e704249e51adf2" --hidden --ignore-dir node_modules --ignore-dir dist --ignore-dir build

# Test 2: Check for any remaining instances of the old account class hash in all files
echo "Checking for any remaining instances of the old account class hash in the codebase:"
rg "0x05400e90f7e0ae78bd02c77cd75527280470e2fe19c54970dd79dc37a9d3645c" --hidden --ignore-dir node_modules --ignore-dir dist --ignore-dir build

# Test 3: Verify all instances of VITE_PUBLIC_ACCOUNT_CLASS_HASH are updated
echo "Verifying all occurrences of VITE_PUBLIC_ACCOUNT_CLASS_HASH in the codebase:"
rg "VITE_PUBLIC_ACCOUNT_CLASS_HASH" --hidden --ignore-dir node_modules --ignore-dir dist --ignore-dir build

Length of output: 2187


Script:

#!/bin/bash
# Description: Comprehensive verification of the account class hash across the entire codebase using --glob to exclude directories

# Test 1: Check for the new account class hash in all files except excluded directories
echo "Checking for the new account class hash in the codebase:"
rg "0x07dc7899aa655b0aae51eadff6d801a58e97dd99cf4666ee59e704249e51adf2" --hidden --glob '!node_modules/**' --glob '!dist/**' --glob '!build/**'

# Test 2: Check for any remaining instances of the old account class hash in all files except excluded directories
echo "Checking for any remaining instances of the old account class hash in the codebase:"
rg "0x05400e90f7e0ae78bd02c77cd75527280470e2fe19c54970dd79dc37a9d3645c" --hidden --glob '!node_modules/**' --glob '!dist/**' --glob '!build/**'

# Test 3: Verify all instances of VITE_PUBLIC_ACCOUNT_CLASS_HASH are updated in all files except excluded directories
echo "Verifying all occurrences of VITE_PUBLIC_ACCOUNT_CLASS_HASH in the codebase:"
rg "VITE_PUBLIC_ACCOUNT_CLASS_HASH" --hidden --glob '!node_modules/**' --glob '!dist/**' --glob '!build/**'

Length of output: 2251

feeTokenAddress: VITE_PUBLIC_FEE_TOKEN_ADDRESS || "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
manifest,
});
14 changes: 7 additions & 7 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
"coverage": "vitest run --coverage"
},
"peerDependencies": {
"starknet": "6.7.0"
"starknet": "6.11.0"
},
"dependencies": {
"@bibliothecadao/eternum": "workspace:^",
"@dojoengine/core": "1.0.0-alpha.14",
"@dojoengine/create-burner": "1.0.0-alpha.14",
"@dojoengine/react": "1.0.0-alpha.14",
"@dojoengine/core": "1.0.0-alpha.22",
"@dojoengine/create-burner": "1.0.0-alpha.22",
"@dojoengine/react": "1.0.0-alpha.22",
"@dojoengine/recs": "^2.0.13",
"@dojoengine/state": "1.0.0-alpha.14",
"@dojoengine/torii-client": "1.0.0-alpha.14",
"@dojoengine/utils": "1.0.0-alpha.14",
"@dojoengine/state": "1.0.0-alpha.22",
"@dojoengine/torii-client": "1.0.0-alpha.22",
"@dojoengine/utils": "1.0.0-alpha.22",
"@headlessui/react": "^1.7.18",
"@latticexyz/utils": "^2.0.0-next.12",
"@radix-ui/react-select": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion client/src/assets/icons/Coins.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion client/src/assets/icons/Crown.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion client/src/assets/icons/Scroll.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion client/src/assets/icons/Sparkles.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading