From 36dec15f6e41978872c20e5f1ca0e4bf30a81328 Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Tue, 14 Jan 2025 11:43:23 +0300 Subject: [PATCH 1/4] chore: update deps protocol-contracts-solana and networks --- package.json | 6 +++--- yarn.lock | 39 ++++++++++++++++++++++++++++++++------- 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index c953c48..e33808d 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,6 @@ "@typescript-eslint/eslint-plugin": "^5.59.9", "@typescript-eslint/parser": "^5.59.9", "@uniswap/v2-core": "^1.0.1", - "@zetachain/protocol-contracts-solana": "2.0.0-rc1", "chai": "^4.2.0", "cpx": "^1.5.0", "eslint": "^8.42.0", @@ -101,8 +100,9 @@ "@solana/web3.js": "^1.95.3", "@uniswap/v2-periphery": "^1.1.0-beta.0", "@zetachain/faucet-cli": "^4.1.1", - "@zetachain/networks": "10.0.0-rc3", + "@zetachain/networks": "10.0.0-rc4", "@zetachain/protocol-contracts": "11.0.0-rc4", + "@zetachain/protocol-contracts-solana": "2.0.0-rc1", "axios": "^1.4.0", "bech32": "^2.0.0", "bip39": "^3.1.0", @@ -126,4 +126,4 @@ "ws": "^8.17.1" }, "packageManager": "yarn@1.22.21+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72" -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index d82f9f8..3925e96 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2781,10 +2781,10 @@ typescript "5.5.4" zod "3.22.4" -"@zetachain/networks@10.0.0-rc3": - version "10.0.0-rc3" - resolved "https://registry.yarnpkg.com/@zetachain/networks/-/networks-10.0.0-rc3.tgz#5c36ce182606ead7f39c42d0588427b366b13301" - integrity sha512-7rsNUXvtmLZ8f5VSfGaihYVHkGNEw3hlCj3WPh3PD985RYHTtNXvhfb9blqcW4ltGAeg6J6iPhnPxNCrU1nUwQ== +"@zetachain/networks@10.0.0-rc4": + version "10.0.0-rc4" + resolved "https://registry.yarnpkg.com/@zetachain/networks/-/networks-10.0.0-rc4.tgz#9af65c87aac0811b420ecb71eb9adc9da3d0865f" + integrity sha512-QFa6TrUO3RkkOE/qGnvtNBEywCqTUgF/z2XGWsRSG6+f8QwDM49A1591KyJ72JBQENYQUheLHAwSjMMWd5LlRg== dependencies: dotenv "^16.1.4" @@ -8966,7 +8966,7 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -8983,6 +8983,15 @@ string-width@^2.1.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" +string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string-width@^5.0.1, string-width@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" @@ -9034,7 +9043,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -9055,6 +9064,13 @@ strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -10064,7 +10080,7 @@ workerpool@^6.5.1: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544" integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -10082,6 +10098,15 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From 8c0b8463e93c1d12f968a7f899dbac6ff973fd5c Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Tue, 14 Jan 2025 15:42:15 +0300 Subject: [PATCH 2/4] update solidity version --- packages/client/src/getHardhatConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/getHardhatConfig.ts b/packages/client/src/getHardhatConfig.ts index 4b0679b..a3b7222 100644 --- a/packages/client/src/getHardhatConfig.ts +++ b/packages/client/src/getHardhatConfig.ts @@ -67,6 +67,6 @@ export const getHardhatConfig = function ({ accounts }: any) { return { etherscan, networks: { ...config, hardhat }, - solidity: "0.8.7", + solidity: "0.8.26", }; }; From 8d8d3303b97980445c9fff789fb80aa0ed1d2c37 Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Tue, 14 Jan 2025 15:48:21 +0300 Subject: [PATCH 3/4] blockscout API --- packages/client/src/getHardhatConfig.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/client/src/getHardhatConfig.ts b/packages/client/src/getHardhatConfig.ts index a3b7222..7c66ba9 100644 --- a/packages/client/src/getHardhatConfig.ts +++ b/packages/client/src/getHardhatConfig.ts @@ -49,8 +49,8 @@ export const getHardhatConfig = function ({ accounts }: any) { chainId: 7001, network: "zeta_testnet", urls: { - apiURL: "https://zetachain-athens-3.blockscout.com/api", - browserURL: "https://zetachain-athens-3.blockscout.com", + apiURL: "https://zetachain-testnet.blockscout.com/api", + browserURL: "https://zetachain-testnet.blockscout.com", }, }, { From b2d61475c83791b6247e82131e8d6906d57d2333 Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Fri, 17 Jan 2025 13:20:21 +0300 Subject: [PATCH 4/4] remove localnet contract check --- packages/client/src/client.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/client/src/client.ts b/packages/client/src/client.ts index fadace0..a2b5b26 100644 --- a/packages/client/src/client.ts +++ b/packages/client/src/client.ts @@ -157,8 +157,6 @@ export class ZetaChainClient { if (params.contracts) { this.contracts = params.contracts; - } else if (this.network === "localnet" || this.network === "localhost") { - throw new Error("Localnet contracts are required"); } else { this.contracts = this.network.includes("test") ? testnetAddresses