From 63b207fa19f02d062d5534edc530fd8551c9ed7c Mon Sep 17 00:00:00 2001 From: CCP Red Dragon <181853434+CCP-Red-Dragon@users.noreply.github.com> Date: Mon, 18 Nov 2024 11:11:48 +0000 Subject: [PATCH 1/7] SSU Client --- smart-storage-unit/packages/client/.env | 14 + smart-storage-unit/packages/client/index.html | 23 +- .../packages/client/package.json | 32 +- .../packages/client/postcss.config.js | 6 + .../packages/client/src/App.tsx | 89 +- .../client/src/components/buyItem.tsx | 70 + .../src/components/manageErc20Token.tsx | 107 + .../client/src/components/setRatio.tsx | 108 + .../packages/client/src/index.tsx | 3 +- .../client/src/mud/createClientComponents.ts | 21 + .../client/src/mud/createSystemCalls.ts | 148 +- .../client/src/mud/getNetworkConfig.ts | 19 +- .../packages/client/src/mud/setup.ts | 5 +- .../packages/client/src/mud/setupNetwork.ts | 14 +- .../client/src/mud/supportedChains.ts | 10 +- .../packages/client/src/mud/world.ts | 3 + .../packages/client/src/styles.css | 4 + .../packages/client/tailwind.config.js | 11 + .../packages/client/vite-env.d.ts | 13 + .../packages/client/vite.config.ts | 6 +- smart-storage-unit/pnpm-lock.yaml | 20045 +++++++--------- 21 files changed, 9453 insertions(+), 11298 deletions(-) create mode 100644 smart-storage-unit/packages/client/postcss.config.js create mode 100644 smart-storage-unit/packages/client/src/components/buyItem.tsx create mode 100644 smart-storage-unit/packages/client/src/components/manageErc20Token.tsx create mode 100644 smart-storage-unit/packages/client/src/components/setRatio.tsx create mode 100644 smart-storage-unit/packages/client/src/mud/createClientComponents.ts create mode 100644 smart-storage-unit/packages/client/src/mud/world.ts create mode 100644 smart-storage-unit/packages/client/src/styles.css create mode 100644 smart-storage-unit/packages/client/tailwind.config.js create mode 100644 smart-storage-unit/packages/client/vite-env.d.ts diff --git a/smart-storage-unit/packages/client/.env b/smart-storage-unit/packages/client/.env index 3528db8..b9748b6 100644 --- a/smart-storage-unit/packages/client/.env +++ b/smart-storage-unit/packages/client/.env @@ -1 +1,15 @@ VITE_CHAIN_ID=31337 + +# Anvil default private key: +VITE_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 +# Player private key: +# VITE_PRIVATE_KEY=0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d + +#ITEM OUT FOR SELLING : LENS +VITE_ITEM_OUT_ID=999 +#ITEM IN FOR BUYING : SALT +VITE_ITEM_IN_ID=888 + +#SMART ASSEMBLY ID +VITE_SMARTASSEMBLY_ID=11196282436511424955311689125460433858625928370621647559384988961918634545666 +VITE_ERC20_TOKEN_ADDRESS=0xC2bbBEA3CFF4b942b5B66E95CA4A80A817e7d29e \ No newline at end of file diff --git a/smart-storage-unit/packages/client/index.html b/smart-storage-unit/packages/client/index.html index a6348c0..c3f06eb 100644 --- a/smart-storage-unit/packages/client/index.html +++ b/smart-storage-unit/packages/client/index.html @@ -1,15 +1,12 @@ - -
- - -