diff --git a/client/src/ui/components/bank/LiquidityTable.tsx b/client/src/ui/components/bank/LiquidityTable.tsx index c01646c43..dcd781e36 100644 --- a/client/src/ui/components/bank/LiquidityTable.tsx +++ b/client/src/ui/components/bank/LiquidityTable.tsx @@ -27,11 +27,12 @@ export const LiquidityTable = ({ bankEntityId, entity_id }: LiquidityTableProps) const filteredResources = Object.entries(RESOURCE_TIERS).flatMap(([tier, resourceIds]) => { if (tier === "lords") return []; - return resourceIds.filter((resourceId) => - resources - .find((r) => r.id === resourceId) - ?.trait.toLowerCase() - .includes(searchTerm.toLowerCase()), + return resourceIds.filter( + (resourceId) => + resources + .find((r) => r.id === resourceId) + ?.trait.toLowerCase() + .includes(searchTerm.toLowerCase()), ); }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f2705f2be..0c294386a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -348,6 +348,22 @@ importers: specifier: ^5.4.4 version: 5.6.2 + season_pass/scripts/deployment: + dependencies: + colors: + specifier: ^1.4.0 + version: 1.4.0 + dotenv: + specifier: ^16.3.1 + version: 16.4.5 + starknet: + specifier: ^6.8.0 + version: 6.11.0(encoding@0.1.13) + devDependencies: + prettier: + specifier: 3.1.1 + version: 3.1.1 + packages: '@adraffy/ens-normalize@1.10.0': @@ -2297,6 +2313,9 @@ packages: '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + '@starknet-io/types-js@0.7.7': + resolution: {integrity: sha512-WLrpK7LIaIb8Ymxu6KF/6JkGW1sso988DweWu7p5QY/3y7waBIiPvzh27D9bX5KIJNRDyOoOVoHVEKYUYWZ/RQ==} + '@starknet-react/chains@0.1.7': resolution: {integrity: sha512-UNh97I1SvuJKaAhKOmpEk8JcWuZWMlPG/ba2HcvFYL9x/47BKndJ+Da9V+iJFtkHUjreVnajT1snsaz1XMG+UQ==} @@ -3248,6 +3267,10 @@ packages: colord@2.9.3: resolution: {integrity: sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==} + colors@1.4.0: + resolution: {integrity: sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==} + engines: {node: '>=0.1.90'} + combined-stream@1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} @@ -3504,6 +3527,10 @@ packages: dot-case@3.0.4: resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} + dotenv@16.4.5: + resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} + engines: {node: '>=12'} + draco3d@1.5.7: resolution: {integrity: sha512-m6WCKt/erDXcw+70IJXnG7M3awwQPAsZvJGX5zY7beBqpELw6RDGkYVU0W43AFxye4pDZ5i2Lbyc/NNGqwjUVQ==} @@ -3988,6 +4015,9 @@ packages: peerDependencies: starknet: ^5.18.0 + get-starknet-core@4.0.0: + resolution: {integrity: sha512-6pLmidQZkC3wZsrHY99grQHoGpuuXqkbSP65F8ov1/JsEI8DDLkhsAuLCKFzNOK56cJp+f1bWWfTJ57e9r5eqQ==} + get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} @@ -5224,6 +5254,11 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} + prettier@3.1.1: + resolution: {integrity: sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==} + engines: {node: '>=14'} + hasBin: true + pretty-format@29.7.0: resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -5671,6 +5706,9 @@ packages: resolution: {integrity: sha512-PklqFeSp9gMqbzW5IbO8l1s3xsNZYkNG/x/gsytgYCIl6H/cqiwCZolVTneyTibvrdHOQ8kP3PXwfdsypudYqw==} deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. + starknet@6.11.0: + resolution: {integrity: sha512-u50KrGDi9fbu1Ogu7ynwF/tSeFlp3mzOg1/Y5x50tYFICImo3OfY4lOz9OtYDk404HK4eUujKkhov9tG7GAKlg==} + starknet@6.7.0: resolution: {integrity: sha512-8NMedKBfkg/oZUgTYNw9lKeNoNYakL/Roah2HwKzrVyvDxBs0arrNrR8No8+tTq0wQg0HGu1w+JIObynjHAK3w==} @@ -8620,6 +8658,8 @@ snapshots: '@sinclair/typebox@0.27.8': {} + '@starknet-io/types-js@0.7.7': {} + '@starknet-react/chains@0.1.7': {} '@starknet-react/core@2.3.0(get-starknet-core@3.3.3(starknet@6.7.0(encoding@0.1.13)))(react@18.3.1)(starknet@6.7.0(encoding@0.1.13))': @@ -9774,6 +9814,8 @@ snapshots: colord@2.9.3: {} + colors@1.4.0: {} + combined-stream@1.0.8: dependencies: delayed-stream: 1.0.0 @@ -10011,6 +10053,8 @@ snapshots: no-case: 3.0.4 tslib: 2.7.0 + dotenv@16.4.5: {} + draco3d@1.5.7: {} eastasianwidth@0.2.0: {} @@ -10709,6 +10753,10 @@ snapshots: '@module-federation/runtime': 0.1.21 starknet: 6.7.0(encoding@0.1.13) + get-starknet-core@4.0.0: + dependencies: + '@starknet-io/types-js': 0.7.7 + get-stream@6.0.1: {} get-stream@8.0.1: {} @@ -12281,6 +12329,8 @@ snapshots: prelude-ls@1.2.1: {} + prettier@3.1.1: {} + pretty-format@29.7.0: dependencies: '@jest/schemas': 29.6.3 @@ -12824,6 +12874,24 @@ snapshots: starknet-types@0.0.4: {} + starknet@6.11.0(encoding@0.1.13): + dependencies: + '@noble/curves': 1.4.2 + '@noble/hashes': 1.5.0 + '@scure/base': 1.1.8 + '@scure/starknet': 1.0.0 + abi-wan-kanabi: 2.2.3 + fetch-cookie: 3.0.1 + get-starknet-core: 4.0.0 + isomorphic-fetch: 3.0.0(encoding@0.1.13) + lossless-json: 4.0.1 + pako: 2.1.0 + starknet-types-07: '@starknet-io/types-js@0.7.7' + ts-mixer: 6.0.4 + url-join: 4.0.1 + transitivePeerDependencies: + - encoding + starknet@6.7.0(encoding@0.1.13): dependencies: '@noble/curves': 1.4.2 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 972e13dfd..d0a9b9e44 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -5,3 +5,4 @@ packages: - "config" - "bot" - "balancing" + - "season_pass/scripts/deployment" diff --git a/scripts/indexer.sh b/scripts/indexer.sh index 497b0ffa4..4222785dd 100755 --- a/scripts/indexer.sh +++ b/scripts/indexer.sh @@ -21,6 +21,9 @@ if [[ "$setConfig" == "true" ]]; then echo "----- Building Eternum Season Pass Contract ----- " printf "\n\n" + # source .env file in deployment + source ./season_pass/scripts/deployment/.env + # build and deploy season pass contract cd season_pass/contracts && scarb --release build cd ../scripts/deployment && npm run deploy diff --git a/season_pass/scripts/deployment/.gitignore b/season_pass/scripts/deployment/.gitignore index 2eea525d8..8beb1c110 100644 --- a/season_pass/scripts/deployment/.gitignore +++ b/season_pass/scripts/deployment/.gitignore @@ -1 +1,2 @@ -.env \ No newline at end of file +.env +addresses/* \ No newline at end of file diff --git a/season_pass/scripts/deployment/addresses/dev/season_pass.json b/season_pass/scripts/deployment/addresses/dev/season_pass.json deleted file mode 100644 index 0821fb4b8..000000000 --- a/season_pass/scripts/deployment/addresses/dev/season_pass.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "address": "0x69094dae62b02e63ddb0e52986db1175608de6944ff0ef37c736b4cd94762d3", - "calldata": [ - "0x1a3e37c77be7de91a9177c6b57956faa6da25607e567b10a25cf64fea5e533b", - "0x5eda62b7df3205bcf19a302a6628431876c2459877369df927e47ae396acb14", - "0x3d5dd2d7f4a672c15c879e0298fe1efae6f5c462e2328600c9a785270f571ea" - ], - "deployed_at": 1729253392316, - "deployed_at_readable": "Fri, 18 Oct 2024 12:09:52 GMT" -} diff --git a/season_pass/scripts/deployment/addresses/dev/test_lords.json b/season_pass/scripts/deployment/addresses/dev/test_lords.json deleted file mode 100644 index af04ba9e5..000000000 --- a/season_pass/scripts/deployment/addresses/dev/test_lords.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "address": "0x3d5dd2d7f4a672c15c879e0298fe1efae6f5c462e2328600c9a785270f571ea", - "calldata": [], - "deployed_at": 1729253357617, - "deployed_at_readable": "Fri, 18 Oct 2024 12:09:17 GMT" -} diff --git a/season_pass/scripts/deployment/addresses/dev/test_realms.json b/season_pass/scripts/deployment/addresses/dev/test_realms.json deleted file mode 100644 index 0efbb4e24..000000000 --- a/season_pass/scripts/deployment/addresses/dev/test_realms.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "address": "0x5eda62b7df3205bcf19a302a6628431876c2459877369df927e47ae396acb14", - "calldata": ["0x1a3e37c77be7de91a9177c6b57956faa6da25607e567b10a25cf64fea5e533b"], - "deployed_at": 1729253324782, - "deployed_at_readable": "Fri, 18 Oct 2024 12:08:44 GMT" -}