diff --git a/.yarn/patches/@gnolang-tm2-js-client-npm-1.0.1-9e54bafbb3.patch b/.yarn/patches/@gnolang-tm2-js-client-npm-1.2.1-1ea3bc3862.patch similarity index 79% rename from .yarn/patches/@gnolang-tm2-js-client-npm-1.0.1-9e54bafbb3.patch rename to .yarn/patches/@gnolang-tm2-js-client-npm-1.2.1-1ea3bc3862.patch index 48f83a26fd..4c612edef7 100644 --- a/.yarn/patches/@gnolang-tm2-js-client-npm-1.0.1-9e54bafbb3.patch +++ b/.yarn/patches/@gnolang-tm2-js-client-npm-1.2.1-1ea3bc3862.patch @@ -1,19 +1,19 @@ diff --git a/bin/provider/jsonrpc/jsonrpc.d.ts b/bin/provider/jsonrpc/jsonrpc.d.ts -index 434273193c4f38a5eefaa9d43b3114bc44e5fd0e..69f2922f8fd30cd56021db887619fab0f012935c 100644 +index 3b50e8ec390e5e344ef81d928aea8976c4020cb6..759408444a434f801c540c2f95923ab7aff46c35 100644 --- a/bin/provider/jsonrpc/jsonrpc.d.ts +++ b/bin/provider/jsonrpc/jsonrpc.d.ts -@@ -23,5 +23,5 @@ export declare class JSONRPCProvider implements Provider { - getAccountNumber(address: string, height?: number): Promise; - getStatus(): Promise; - sendTransaction(tx: string): Promise; +@@ -25,5 +25,5 @@ export declare class JSONRPCProvider implements Provider { + sendTransaction(tx: string, endpoint: K): Promise; + private broadcastTxSync; + private broadcastTxCommit; - waitForTransaction(hash: string, fromHeight?: number, timeout?: number): Promise; + waitForTransaction(hash: string, fromHeight?: number, timeout?: number): Promise<{tx: Tx, height: number, index: number}>; } diff --git a/bin/provider/provider.d.ts b/bin/provider/provider.d.ts -index a5b37aacb3b9c47bec2a4bc6fe1bb7f653656ee5..d9aa2d8a703c9c40d58695643e3718b2c82aaf5a 100644 +index 4fcb051ea4dd924bfbdfcf3ca697982a3504d88f..4908d25744a3b06194263e2bdd54c7bee058a6df 100644 --- a/bin/provider/provider.d.ts +++ b/bin/provider/provider.d.ts -@@ -82,5 +82,5 @@ export interface Provider { +@@ -84,5 +84,5 @@ export interface Provider { * @param {number} [fromHeight=latest] The block height used to begin the search * @param {number} [timeout=15000] Optional wait timeout in MS */ @@ -44,13 +44,13 @@ index 82a13a73ec49ed3970dc0567bac5b4bfc4fa8c41..b860d1d4d4d45dd24073a3a3aba665be } _b.label = 4; diff --git a/bin/provider/websocket/ws.d.ts b/bin/provider/websocket/ws.d.ts -index a373b6af1d5cb158d4c129199e565b9fe16f5548..05e8cc7c9a7fd7d89154a1f4a0441f1133ff742f 100644 +index 1a41dcc96ba11d576d8a56c84ccd826764299a12..6e7c65aac957ab7f95ffcee66ffd70b5fd15507a 100644 --- a/bin/provider/websocket/ws.d.ts +++ b/bin/provider/websocket/ws.d.ts -@@ -51,5 +51,5 @@ export declare class WSProvider implements Provider { - getAccountNumber(address: string, height?: number): Promise; - getStatus(): Promise; - sendTransaction(tx: string): Promise; +@@ -53,5 +53,5 @@ export declare class WSProvider implements Provider { + sendTransaction(tx: string, endpoint: K): Promise; + private broadcastTxSync; + private broadcastTxCommit; - waitForTransaction(hash: string, fromHeight?: number, timeout?: number): Promise; + waitForTransaction(hash: string, fromHeight?: number, timeout?: number): Promise<{tx: Tx, height: number, index: number}>; } diff --git a/package.json b/package.json index e046446a68..e12cfd01ea 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@ethersproject/providers": "^5.7.2", "@expo-google-fonts/exo": "^0.2.2", "@expo/metro-runtime": "~3.1.3", - "@gnolang/gno-js-client": "1.3.0", + "@gnolang/gno-js-client": "^1.3.0", "@improbable-eng/grpc-web": "^0.15.0", "@improbable-eng/grpc-web-node-http-transport": "^0.15.0", "@improbable-eng/grpc-web-react-native-transport": "^0.15.0", @@ -204,7 +204,7 @@ "typescript": "^5.3.0" }, "resolutions": { - "@gnolang/tm2-js-client@^1.0.0": "patch:@gnolang/tm2-js-client@npm%3A1.0.1#./.yarn/patches/@gnolang-tm2-js-client-npm-1.0.1-9e54bafbb3.patch", + "@gnolang/tm2-js-client@^1.2.1": "patch:@gnolang/tm2-js-client@npm%3A1.2.1#./.yarn/patches/@gnolang-tm2-js-client-npm-1.2.1-1ea3bc3862.patch", "chain-registry@^1.20.0": "patch:chain-registry@npm%3A1.20.0#./.yarn/patches/chain-registry-npm-1.20.0-e290300d1b.patch", "multiformats@^12.1.3": "patch:multiformats@npm%3A12.1.3#./.yarn/patches/multiformats-npm-12.1.3-dbaa26037a.patch", "@axelar-network/axelarjs-types@^0.33.0": "patch:@axelar-network/axelarjs-types@npm%3A0.33.0#./.yarn/patches/@axelar-network-axelarjs-types-npm-0.33.0-5d36465d11.patch", diff --git a/packages/hooks/riotGame/useSquadStakingConfig.ts b/packages/hooks/riotGame/useSquadStakingConfig.ts index 9f673fbcd5..d71d0d7d95 100644 --- a/packages/hooks/riotGame/useSquadStakingConfig.ts +++ b/packages/hooks/riotGame/useSquadStakingConfig.ts @@ -30,13 +30,14 @@ const getEthereumSquadStakingConfig = async (networkId: string | undefined) => { const owner = await ethereumClient.owner(); const squadCountLimit = await ethereumClient.maxSquadCount(); - // TODO: Hardcode several values because it will not be changed and it take too much requests to get them + // NOTE: the current contract does not allow to retrieve the array of multiplier but individual value + // so we hardcode several values because it will not be changed and it take too much requests to get them const squadConfig: SquadConfig = { owner, cooldownPeriod: cooldownPeriod.toNumber(), squadCountLimit: squadCountLimit.toNumber(), // Hardcode - bonusMultiplier: [100, 101, 102, 103, 104, 105], + bonusMultiplier: [100, 105, 125, 131, 139, 161], maxSquadSize: 6, minSquadSize: 1, }; diff --git a/yarn.lock b/yarn.lock index 6a62c68331..299fa27f09 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4220,7 +4220,7 @@ __metadata: languageName: node linkType: hard -"@gnolang/gno-js-client@npm:1.3.0": +"@gnolang/gno-js-client@npm:^1.3.0": version: 1.3.0 resolution: "@gnolang/gno-js-client@npm:1.3.0" dependencies: @@ -4232,7 +4232,7 @@ __metadata: languageName: node linkType: hard -"@gnolang/tm2-js-client@npm:^1.2.1": +"@gnolang/tm2-js-client@npm:1.2.1": version: 1.2.1 resolution: "@gnolang/tm2-js-client@npm:1.2.1" dependencies: @@ -4249,6 +4249,23 @@ __metadata: languageName: node linkType: hard +"@gnolang/tm2-js-client@patch:@gnolang/tm2-js-client@npm%3A1.2.1#./.yarn/patches/@gnolang-tm2-js-client-npm-1.2.1-1ea3bc3862.patch::locator=teritori-dapp%40workspace%3A.": + version: 1.2.1 + resolution: "@gnolang/tm2-js-client@patch:@gnolang/tm2-js-client@npm%3A1.2.1#./.yarn/patches/@gnolang-tm2-js-client-npm-1.2.1-1ea3bc3862.patch::version=1.2.1&hash=3c7277&locator=teritori-dapp%40workspace%3A." + dependencies: + "@cosmjs/amino": ^0.32.4 + "@cosmjs/crypto": ^0.32.4 + "@cosmjs/ledger-amino": ^0.32.4 + "@types/uuid": ^9.0.4 + axios: ^1.4.0 + long: ^5.2.3 + protobufjs: ^7.2.3 + uuid: ^9.0.1 + ws: ^8.16.0 + checksum: a8853be7c0a52d4f4f38f2381cc671e8b4d7f62512cf00a2dee779039d70772f3ca62c583f7f93a50a79b6f2d44a2bc1c83abbe8c6f46751b2b071ccab6b96f9 + languageName: node + linkType: hard + "@graphql-typed-document-node/core@npm:^3.1.0, @graphql-typed-document-node/core@npm:^3.1.1": version: 3.2.0 resolution: "@graphql-typed-document-node/core@npm:3.2.0" @@ -19314,7 +19331,7 @@ __metadata: "@ethersproject/providers": ^5.7.2 "@expo-google-fonts/exo": ^0.2.2 "@expo/metro-runtime": ~3.1.3 - "@gnolang/gno-js-client": 1.3.0 + "@gnolang/gno-js-client": ^1.3.0 "@improbable-eng/grpc-web": ^0.15.0 "@improbable-eng/grpc-web-node-http-transport": ^0.15.0 "@improbable-eng/grpc-web-react-native-transport": ^0.15.0 @@ -21193,8 +21210,8 @@ __metadata: linkType: hard "ws@npm:^8.16.0": - version: 8.17.1 - resolution: "ws@npm:8.17.1" + version: 8.18.0 + resolution: "ws@npm:8.18.0" peerDependencies: bufferutil: ^4.0.1 utf-8-validate: ">=5.0.2" @@ -21203,7 +21220,7 @@ __metadata: optional: true utf-8-validate: optional: true - checksum: 442badcce1f1178ec87a0b5372ae2e9771e07c4929a3180321901f226127f252441e8689d765aa5cfba5f50ac60dd830954afc5aeae81609aefa11d3ddf5cecf + checksum: 91d4d35bc99ff6df483bdf029b9ea4bfd7af1f16fc91231a96777a63d263e1eabf486e13a2353970efc534f9faa43bdbf9ee76525af22f4752cbc5ebda333975 languageName: node linkType: hard