Skip to content

Commit

Permalink
V1 (#1125)
Browse files Browse the repository at this point in the history
* contract: limit armies and enable deletion

* contracts: delete army if merging kills troop

* upgrade to dojov1.0.0-alpha.1

* upgrade to dojov1.0.0-alpha.1

* scarb fmt

* update tests

* update tests && scarb fmt

* update test utils

* update test utils

* update test utils

* update test utils

* fix inaccurate winner invariant error

* add tool-versions

* contracts: basic army create tests

* contracts: basic army buy tests

* fix reward calculation bug

* more combat tests

* combat: reward bug fix

* scarb fmt

* Merge branch 'v1' of https://github.com/BibliothecaDAO/eternum into combat-tests

* update workflow

* update lockfile

* update workflow

* update workflow

* update lockfile

* update lock file

* bump to alpha 2

* update to cairo 2.7.0

* contracts: update workflow to print resource usage

* update workflow

* contracts: use u32 as primary id

* contracts: use u32 as primary id in tests

* update config and manifests

* contracts: optimization: use IntrospectPacked

* - remove introspectpacked from models with enum
- use id alias more

* Clean/legacy (#1146)

* Clean legacy code + remove unused exports

* add knip command

* more cleaning

* prettier

* Cleanup + add knip CI

* fix build

* fix knip

* rebase main

* prettier

* fix knip ci

* resolve comments

* feat: Change to V1 + add type aliases for entity ids (#1148)

* Change to V1 + add type aliases for entity ids

* Make elements clickable under right and left navigation modules buttons + fix z-index of quests, guilds and leaderboard

* scarb fmt

* Change bonus_percent to u32 instead of u128

* Address minor PR comments

* prettier

* knip

---------

Co-authored-by: ponderingdemocritus <[email protected]>
Co-authored-by: tedison <[email protected]>
Co-authored-by: Constantin Wastchenko <[email protected]>
Co-authored-by: tedison <[email protected]>
  • Loading branch information
5 people committed Aug 1, 2024
1 parent 371b02f commit 47e99b2
Show file tree
Hide file tree
Showing 523 changed files with 67,793 additions and 31,613 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/knip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: knip

on:
push:
branches: [main]
pull_request: {}

jobs:
knip:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- uses: pnpm/action-setup@v3
with:
version: 9

- name: Install dependencies
run: pnpm i

- name: Run knip
run: pnpm knip
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- uses: pnpm/action-setup@v3
with:
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/test-contracts.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: test-contracts

on:
push:
branches:
- main
pull_request: {}
on: [pull_request]

jobs:
setup-environment:
Expand Down Expand Up @@ -39,7 +35,7 @@ jobs:
steps:
- name: Download Dojo release artifact
run: |
curl -L -o dojo-linux-x86_64.tar.gz https://github.com/dojoengine/dojo/releases/download/v0.7.1/dojo_v0.7.1_linux_amd64.tar.gz
curl -L -o dojo-linux-x86_64.tar.gz https://github.com/dojoengine/dojo/releases/download/v1.0.0-alpha.3/dojo_v1.0.0-alpha.3_linux_amd64.tar.gz
tar -xzf dojo-linux-x86_64.tar.gz
sudo mv sozo /usr/local/bin/
- name: Checkout repository
Expand All @@ -49,7 +45,7 @@ jobs:
cd contracts && sozo build
- name: Run Dojo Test for ${{ matrix.test }}
run: |
cd contracts && sozo test -f ${{ matrix.test }}
cd contracts && sozo test -f ${{ matrix.test }} --print-resource-usage
test-scarb-fmt:
needs: [setup-environment]
Expand All @@ -58,5 +54,5 @@ jobs:
- uses: actions/checkout@v3
- uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.6.4"
scarb-version: "2.7.0-rc.4"
- run: cd contracts && scarb fmt --check
20 changes: 20 additions & 0 deletions .knip.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"ignore": [
".trunk/**",
"**/*.js",
"bot/**",
"**/vitest**",
"eternum-docs/package.json",
"eternum-docs/vocs.config.ts",
"sdk/packages/eternum/global.d.ts",

"**/**__test__**/**",
"**/**__tests__**/**",

"client/src/dojo/events/bankEventQueries.ts",
"client/src/hooks/store/useBankStore.tsx",
"client/src/ui/components/bank/BankEntityList.tsx",
"client/src/ui/components/bank/BankStats.tsx",
"config/bank/index.ts"
]
}
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
scarb 2.6.4
scarb 2.7.0-rc.4
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
4 changes: 2 additions & 2 deletions client/dojoConfig.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import devManifest from "../contracts/manifests/dev/manifest.json";
import productionManifest from "../contracts/manifests/prod/manifest.json";
import { createDojoConfig } from "@dojoengine/core";
import devManifest from "../contracts/manifests/dev/deployment/manifest.json";
import productionManifest from "../contracts/manifests/prod/deployment/manifest.json";

const {
VITE_PUBLIC_NODE_URL,
Expand Down
30 changes: 7 additions & 23 deletions 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 All @@ -17,65 +17,49 @@
},
"dependencies": {
"@bibliothecadao/eternum": "workspace:^",
"@dojoengine/core": "^0.7.9",
"@dojoengine/create-burner": "^0.7.3",
"@dojoengine/react": "^0.7.9",
"@dojoengine/core": "^v1.0.0-alpha.0",
"@dojoengine/create-burner": "^v1.0.0-alpha.0",
"@dojoengine/react": "^v1.0.0-alpha.0",
"@dojoengine/recs": "^2.0.13",
"@dojoengine/state": "^0.7.9",
"@dojoengine/torii-client": "^0.7.9",
"@dojoengine/utils": "^0.7.9",
"@formkit/auto-animate": "^0.8.1",
"@dojoengine/state": "^v1.0.0-alpha.0",
"@dojoengine/torii-client": "^v1.0.0-alpha.0",
"@dojoengine/utils": "^v1.0.0-alpha.0",
"@headlessui/react": "^1.7.18",
"@langchain/anthropic": "^0.1.14",
"@latticexyz/utils": "^2.0.0-next.12",
"@radix-ui/react-select": "^2.0.0",
"@react-spring/three": "^9.7.3",
"@react-three/drei": "^9.101.0",
"@react-three/fiber": "^8.16.1",
"@react-three/postprocessing": "2.16.2",
"@reactour/tour": "^3.6.1",
"@testing-library/react-hooks": "^8.0.1",
"@vercel/analytics": "^1.2.2",
"@web3mq/client": "^1.0.25",
"buffer": "^6.0.3",
"clsx": "^1.2.1",
"events": "^3.3.0",
"framer-motion": "^11.0.24",
"graphql": "16.6.0",
"graphql-request": "6.0.0",
"graphql-tag": "^2.12.6",
"graphql-ws": "^5.15.0",
"gsap": "^3.12.5",
"lodash": "^4.17.21",
"lucide-react": "^0.365.0",
"postprocessing": "^6.35.2",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-blurhash": "^0.3.0",
"react-dom": "^18.2.0",
"react-draggable": "^4.4.6",
"react-resizable": "^3.0.5",
"react-toastify": "^10.0.5",
"rxjs": "^7.8.1",
"tailwind-merge": "^2.2.2",
"three": "^0.163.0",
"three-csg": "^1.0.0",
"three-csg-ts": "^3.1.14",
"three-stdlib": "^2.29.5",
"use-sound": "^4.0.1",
"wouter": "^2.12.1",
"ws": "^8.16.0",
"zustand": "^4.5.2"
},
"devDependencies": {
"@svgr/rollup": "^8.1.0",
"@tailwindcss/typography": "^0.5.13",
"@testing-library/react": "^16.0.0",
"@types/lodash": "^4.14.202",
"@types/node": "^20.11.10",
"@types/react": "^18.2.74",
"@types/react-dom": "^18.2.21",
"@types/react-resizable": "^3.0.7",
"@types/three": "^0.163.0",
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@vitejs/plugin-react": "^4.2.1",
Expand Down
35 changes: 0 additions & 35 deletions client/src/assets/icons/orders/index.tsx

This file was deleted.

Loading

0 comments on commit 47e99b2

Please sign in to comment.