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

Add minter and mint #64

Merged
merged 82 commits into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
621eed5
Merge pull request #61 from z-korp/dev
Matth26 Nov 1, 2024
10b369a
Merge branch 'dev'
Matth26 Nov 4, 2024
b57e9c6
add minter
Matth26 Nov 5, 2024
d6cf43e
Add mint
Matth26 Nov 5, 2024
cd325ab
Add mint
Matth26 Nov 5, 2024
dc393da
Add front related to mint/minter
Matth26 Nov 5, 2024
45d658c
add lib
Matth26 Nov 5, 2024
c9eafc3
update store
Matth26 Nov 5, 2024
be4fd74
Remove credits
Matth26 Nov 5, 2024
76deb56
deploy on sepoliadev1
Matth26 Nov 5, 2024
7732a32
Add useFreeMint + fix notify tx + cleanup contract remove credits
Matth26 Nov 5, 2024
b8c4a52
Start migration to rc1
Matth26 Nov 5, 2024
4d78c91
finish upgrade (not tests)
Matth26 Nov 5, 2024
b5b5257
Upgrade tests to rc1
Matth26 Nov 6, 2024
1127e0a
Fix test mint
Matth26 Nov 6, 2024
b295862
Fix minter and add it to tests
Matth26 Nov 6, 2024
4047be4
Update dojojs to alpha.24 + deploy on sepoliadev1
Matth26 Nov 6, 2024
f769882
Slower update for balance
Matth26 Nov 6, 2024
dafe9fe
Add OZ for tests
Matth26 Nov 6, 2024
3c82d53
Add erc721 game credits
Matth26 Nov 6, 2024
dfb5870
Add erc721 in test (not finished)
Matth26 Nov 6, 2024
b969778
Take update from sprint-w44-add-mint-and-minter brancher
Matth26 Nov 6, 2024
55980bb
Fix tests
Matth26 Nov 6, 2024
e5c09ca
Setup tests for erc721
Matth26 Nov 7, 2024
dcbb3f3
Update tests with erc721
Matth26 Nov 7, 2024
b28dbd1
Refactor contractModels.ts and contractSystems.ts
Cheelax Nov 7, 2024
07b0d00
Fix tests
Matth26 Nov 7, 2024
22c5015
Retrive airdrop data
Cheelax Nov 7, 2024
07c195a
Merge branch 'add-minter-and-mint' of https://github.com/z-korp/zkube…
Cheelax Nov 7, 2024
5a36a2f
Update test, chest test are not passing because of multipliers...
Matth26 Nov 7, 2024
368183b
Merge branch 'add-minter-and-mint' of github.com:z-korp/zkube into ad…
Matth26 Nov 7, 2024
13fa0e0
✨ Add trophy and tasks data
bal7hazar Nov 7, 2024
7776ef1
➕ Add bushido dep
bal7hazar Nov 7, 2024
f74b5c5
✨ Add trophy and task management flow
bal7hazar Nov 7, 2024
7d5b5f3
💄 Code format
bal7hazar Nov 7, 2024
f940726
🐛 Improve LS compatibility
bal7hazar Nov 7, 2024
400bddc
Merge branch 'z-korp:main' into feat/trophies
bal7hazar Nov 7, 2024
71e8a20
Merge branch 'add-minter-and-mint' into feat/trophies
bal7hazar Nov 7, 2024
a10a7a4
game_price is now stored in settings + we can change the game_price a…
Matth26 Nov 7, 2024
59af199
Update writer and init calldata on every deployement
Matth26 Nov 7, 2024
138a670
Cleanup + erc721 compile
Matth26 Nov 7, 2024
b82b989
call claim aridrop
Cheelax Nov 8, 2024
caa338c
Merge branch 'add-minter-and-mint' of https://github.com/z-korp/zkube…
Cheelax Nov 8, 2024
0435f60
Deploy on slotdev
Matth26 Nov 8, 2024
c0aee61
Merge branch 'add-minter-and-mint' of github.com:z-korp/zkube into ad…
Matth26 Nov 8, 2024
775e90e
✨ Upgrade controller
bal7hazar Nov 8, 2024
4324904
🐛 Remove package pnpm version
bal7hazar Nov 8, 2024
166d4a5
Merge pull request #65 from bal7hazar/feat/trophies
Matth26 Nov 8, 2024
fd04807
Burn nft after entering the game
Matth26 Nov 8, 2024
d477927
redeploy on slotdev
Matth26 Nov 8, 2024
5c2cc71
Button to open
ClanCo Nov 8, 2024
a487c72
Merge branch 'add-minter-and-mint' of https://github.com/z-korp/zkube…
ClanCo Nov 8, 2024
d5b3293
update policies
Matth26 Nov 8, 2024
b7fb59e
Remove fucking burners
Matth26 Nov 8, 2024
ea4e927
Start a game with mint is working
Matth26 Nov 8, 2024
b6c8ed4
Update all writers
Matth26 Nov 8, 2024
7e6663f
Remove all warnings
Matth26 Nov 9, 2024
f6b67df
Redeploy sepolia
Matth26 Nov 9, 2024
219c8e3
Fix mint + controller not accessible when dialog opened
Matth26 Nov 9, 2024
376e30b
Update airdrop ui
Matth26 Nov 9, 2024
7da66ad
Merge branch 'add-minter-and-mint' of https://github.com/z-korp/zkube…
ClanCo Nov 9, 2024
272cbcd
Fix token stuff + deploy mainnet
Matth26 Nov 10, 2024
671e9c1
Complete erc721 contract + cleanup contract + fix token_id for free g…
Matth26 Nov 10, 2024
4a61033
Deploy sepoliadev1
Matth26 Nov 10, 2024
f149b8b
Merge branch 'add-minter-and-mint' of https://github.com/z-korp/zkube…
ClanCo Nov 10, 2024
260d7ec
ref + state fix
ClanCo Nov 10, 2024
ecbfae7
New deploy mainnet + update rc2
Matth26 Nov 10, 2024
774a4d1
Merge branch 'add-minter-and-mint' of github.com:z-korp/zkube into ad…
Matth26 Nov 10, 2024
17ee690
Clean console
ClanCo Nov 10, 2024
e0b157c
Merge branch 'add-minter-and-mint' of https://github.com/z-korp/zkube…
ClanCo Nov 10, 2024
da909c3
Controller mobile
ClanCo Nov 10, 2024
5b7a291
Controller desktop
ClanCo Nov 10, 2024
a413a9c
Bruta btn
ClanCo Nov 10, 2024
484bc92
shimmer button
ClanCo Nov 10, 2024
b6f7b62
controller connector ts error
ClanCo Nov 10, 2024
f68436e
fix typing Uint 256 conv
ClanCo Nov 10, 2024
c4bcabf
New typage use Connector same as Balthy
ClanCo Nov 10, 2024
ed6ed37
naming to match changes
ClanCo Nov 10, 2024
08ec2d9
remove burner
ClanCo Nov 10, 2024
6b7d7a4
Add upgradable + recover erc20
Matth26 Nov 10, 2024
de7b063
Add pauser for game + unlocker for chest
Matth26 Nov 10, 2024
296feb1
Merge branch 'add-minter-and-mint' of github.com:z-korp/zkube into ad…
Matth26 Nov 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 16 additions & 16 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@
"dependencies": {
"@cartridge/connector": "^0.3.46",
"@cartridge/controller": "^0.3.46",
"@dojoengine/core": "1.0.0-alpha.12",
"@dojoengine/create-burner": "1.0.0-alpha.12",
"@dojoengine/react": "1.0.0-alpha.12",
"@dojoengine/recs": "0.1.35",
"@dojoengine/state": "1.0.0-alpha.12",
"@dojoengine/torii-client": "1.0.0-alpha.12",
"@dojoengine/utils": "1.0.0-alpha.12",
"@dojoengine/core": "1.0.0-alpha.24",
"@dojoengine/create-burner": "1.0.0-alpha.24",
"@dojoengine/react": "1.0.0-alpha.24",
"@dojoengine/recs": "2.0.13",
"@dojoengine/state": "1.0.0-alpha.24",
"@dojoengine/torii-client": "1.0.0-alpha.24",
"@dojoengine/utils": "1.0.0-alpha.24",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@fortawesome/fontawesome-svg-core": "^6.6.0",
"@fortawesome/free-solid-svg-icons": "^6.5.2",
"@fortawesome/react-fontawesome": "^0.2.2",
"@headlessui/react": "^2.1.3",
"@latticexyz/react": "^2.0.12",
"@latticexyz/utils": "^2.0.12",
"@latticexyz/react": "^2.2.8",
"@latticexyz/utils": "^2.2.8",
"@mui/material": "^5.16.7",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.6",
Expand Down Expand Up @@ -69,7 +69,7 @@
"graphql-request": "^6.1.0",
"html-to-image": "^1.11.11",
"lucide-react": "^0.394.0",
"mobx": "^6.12.4",
"mobx": "^6.13.2",
"next-themes": "^0.3.0",
"proxy-deep": "^3.1.1",
"react": "^18.3.1",
Expand All @@ -87,7 +87,7 @@
"use-sound": "^4.0.1",
"vaul": "^0.9.1",
"vite-plugin-pwa": "^0.20.0",
"vite-plugin-top-level-await": "^1.4.1",
"vite-plugin-top-level-await": "^1.4.4",
"vite-plugin-wasm": "^3.3.0",
"zustand": "^4.5.5"
},
Expand All @@ -97,22 +97,22 @@
"@graphql-codegen/typescript-graphql-request": "^5.0.0",
"@graphql-codegen/typescript-operations": "^4.2.1",
"@types/jest": "^29.5.12",
"@types/node": "^20.14.2",
"@types/react": "^18.3.3",
"@types/node": "^20.16.6",
"@types/react": "^18.3.9",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"@vitejs/plugin-react": "^4.3.1",
"autoprefixer": "^10.4.19",
"autoprefixer": "^10.4.20",
"eslint": "^8.57.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.3.5",
"jest": "^29.7.0",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.4",
"ts-jest": "^29.2.5",
"typescript": "^5.4.5",
"vite": "^4.5.3",
"typescript": "^5.6.2",
"vite": "^4.5.5",
"vite-plugin-mkcert": "^1.17.5"
}
}
1,542 changes: 808 additions & 734 deletions client/pnpm-lock.yaml

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions client/src/config/manifest.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import local from "../../../contracts/manifests/dev/deployment/manifest.json";
import slot from "../../../contracts/manifests/slot/deployment/manifest.json";
import slotdev from "../../../contracts/manifests/slotdev/deployment/manifest.json";
import sepolia from "../../../contracts/manifests/sepolia/deployment/manifest.json";
import sepoliadev1 from "../../../contracts/manifests/sepoliadev1/deployment/manifest.json";
import sepoliadev2 from "../../../contracts/manifests/sepoliadev2/deployment/manifest.json";
import local from "../../../contracts/manifest_dev.json";
import slot from "../../../contracts/manifest_slot.json";
import slotdev from "../../../contracts/manifest_slotdev.json";
import sepolia from "../../../contracts/manifest_sepolia.json";
import sepoliadev1 from "../../../contracts/manifest_sepoliadev1.json";
import sepoliadev2 from "../../../contracts/manifest_sepoliadev2.json";

const deployType = import.meta.env.VITE_PUBLIC_DEPLOY_TYPE;

Expand Down
33 changes: 3 additions & 30 deletions client/src/dojo/context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,42 +38,15 @@ export const DojoProvider = ({
[rpcProvider, masterAddress, masterPrivateKey],
);

const {
create,
list,
get,
account,
select,
deselect,
remove,
isDeploying,
clear,
count,
copyToClipboard,
applyFromClipboard,
checkIsDeployed,
} = useBurnerManager({
burnerManager,
});
const burnerManagerData = useBurnerManager({ burnerManager });

return (
<DojoContext.Provider
value={{
...value,
account: {
create,
list,
get,
select,
deselect,
remove,
clear,
count,
account: account ? account : masterAccount,
isDeploying,
copyToClipboard,
applyFromClipboard,
checkIsDeployed,
...burnerManagerData,
account: burnerManagerData.account || masterAccount,
},
master: masterAccount,
}}
Expand Down
37 changes: 18 additions & 19 deletions client/src/dojo/contractModels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,30 +87,11 @@ export function defineContractComponents(world: World) {
},
);
})(),
Credits: (() => {
return defineComponent(
world,
{
id: RecsType.BigInt, // player_id (address)
day_id: RecsType.Number,
remaining: RecsType.Number,
},
{
metadata: {
namespace: "zkube",
name: "Credits",
types: ["felt252", "u64", "u8"],
customTypes: [],
},
},
);
})(),
Settings: (() => {
return defineComponent(
world,
{
id: RecsType.Number,
free_daily_credits: RecsType.Number,
daily_mode_price: RecsType.BigInt,
normal_mode_price: RecsType.BigInt,
},
Expand Down Expand Up @@ -170,6 +151,24 @@ export function defineContractComponents(world: World) {
},
);
})(),
Mint: (() => {
return defineComponent(
world,
{
id: RecsType.BigInt,
is_set: RecsType.Boolean,
amount: RecsType.Number,
},
{
metadata: {
namespace: "zkube",
name: "Mint",
types: ["felt252", "bool", "u64"],
customTypes: [],
},
},
);
})(),
Chest: (() => {
return defineComponent(
world,
Expand Down
Loading
Loading