diff --git a/messaging/erc20/package.json b/messaging/erc20/package.json index 01eff927..533af220 100644 --- a/messaging/erc20/package.json +++ b/messaging/erc20/package.json @@ -26,7 +26,7 @@ "@types/node": ">=12.0.0", "@typescript-eslint/eslint-plugin": "^5.59.9", "@typescript-eslint/parser": "^5.59.9", - "@zetachain/toolkit": "7.0.0", + "@zetachain/toolkit": "8.0.0", "axios": "^1.3.6", "chai": "^4.2.0", "dotenv": "^16.0.3", diff --git a/messaging/erc20/yarn.lock b/messaging/erc20/yarn.lock index 5adafe6f..62383860 100644 --- a/messaging/erc20/yarn.lock +++ b/messaging/erc20/yarn.lock @@ -1711,10 +1711,10 @@ resolved "https://registry.yarnpkg.com/@zetachain/protocol-contracts/-/protocol-contracts-7.0.0-rc1.tgz#588483d1ec70e572b7e40e84ef5b34282b0ab375" integrity sha512-vgS+Pjh4MysOyw8WbqTQVBsHJYqKvMcdV7cNVqxaTJd/dl2ak7NNvsIeaeUnxQrp8XfQol2B8GXJpVLM6MK/dg== -"@zetachain/toolkit@7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@zetachain/toolkit/-/toolkit-7.0.0.tgz#7301ccab40c37d3fd8fcc347f99c831ec31b1bd3" - integrity sha512-5cOJVBIEcosF2A2TJbNGFfh4Bob8UcodQII1RdHRstqvV3toZ18r1gVWpLGQ8w2N6T2FCPE8ueN4Q5zH68q20Q== +"@zetachain/toolkit@8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@zetachain/toolkit/-/toolkit-8.0.0.tgz#e8a582104a84b649b54a9e230d9be44aebc1399f" + integrity sha512-PZ6emUAvypDuU0gCFMFh7UfsBeSwTi2E0zt2is2ezjdQ00OyMWDE2T5pMTvib6EDV5bquONfmJG4rExdx8+gEg== dependencies: "@inquirer/prompts" "^2.1.1" "@inquirer/select" "1.1.3" diff --git a/messaging/message/package.json b/messaging/message/package.json index 01eff927..533af220 100644 --- a/messaging/message/package.json +++ b/messaging/message/package.json @@ -26,7 +26,7 @@ "@types/node": ">=12.0.0", "@typescript-eslint/eslint-plugin": "^5.59.9", "@typescript-eslint/parser": "^5.59.9", - "@zetachain/toolkit": "7.0.0", + "@zetachain/toolkit": "8.0.0", "axios": "^1.3.6", "chai": "^4.2.0", "dotenv": "^16.0.3", diff --git a/messaging/message/yarn.lock b/messaging/message/yarn.lock index 5adafe6f..62383860 100644 --- a/messaging/message/yarn.lock +++ b/messaging/message/yarn.lock @@ -1711,10 +1711,10 @@ resolved "https://registry.yarnpkg.com/@zetachain/protocol-contracts/-/protocol-contracts-7.0.0-rc1.tgz#588483d1ec70e572b7e40e84ef5b34282b0ab375" integrity sha512-vgS+Pjh4MysOyw8WbqTQVBsHJYqKvMcdV7cNVqxaTJd/dl2ak7NNvsIeaeUnxQrp8XfQol2B8GXJpVLM6MK/dg== -"@zetachain/toolkit@7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@zetachain/toolkit/-/toolkit-7.0.0.tgz#7301ccab40c37d3fd8fcc347f99c831ec31b1bd3" - integrity sha512-5cOJVBIEcosF2A2TJbNGFfh4Bob8UcodQII1RdHRstqvV3toZ18r1gVWpLGQ8w2N6T2FCPE8ueN4Q5zH68q20Q== +"@zetachain/toolkit@8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@zetachain/toolkit/-/toolkit-8.0.0.tgz#e8a582104a84b649b54a9e230d9be44aebc1399f" + integrity sha512-PZ6emUAvypDuU0gCFMFh7UfsBeSwTi2E0zt2is2ezjdQ00OyMWDE2T5pMTvib6EDV5bquONfmJG4rExdx8+gEg== dependencies: "@inquirer/prompts" "^2.1.1" "@inquirer/select" "1.1.3" diff --git a/messaging/nft/package.json b/messaging/nft/package.json index 01eff927..533af220 100644 --- a/messaging/nft/package.json +++ b/messaging/nft/package.json @@ -26,7 +26,7 @@ "@types/node": ">=12.0.0", "@typescript-eslint/eslint-plugin": "^5.59.9", "@typescript-eslint/parser": "^5.59.9", - "@zetachain/toolkit": "7.0.0", + "@zetachain/toolkit": "8.0.0", "axios": "^1.3.6", "chai": "^4.2.0", "dotenv": "^16.0.3", diff --git a/messaging/nft/yarn.lock b/messaging/nft/yarn.lock index 5adafe6f..62383860 100644 --- a/messaging/nft/yarn.lock +++ b/messaging/nft/yarn.lock @@ -1711,10 +1711,10 @@ resolved "https://registry.yarnpkg.com/@zetachain/protocol-contracts/-/protocol-contracts-7.0.0-rc1.tgz#588483d1ec70e572b7e40e84ef5b34282b0ab375" integrity sha512-vgS+Pjh4MysOyw8WbqTQVBsHJYqKvMcdV7cNVqxaTJd/dl2ak7NNvsIeaeUnxQrp8XfQol2B8GXJpVLM6MK/dg== -"@zetachain/toolkit@7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@zetachain/toolkit/-/toolkit-7.0.0.tgz#7301ccab40c37d3fd8fcc347f99c831ec31b1bd3" - integrity sha512-5cOJVBIEcosF2A2TJbNGFfh4Bob8UcodQII1RdHRstqvV3toZ18r1gVWpLGQ8w2N6T2FCPE8ueN4Q5zH68q20Q== +"@zetachain/toolkit@8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@zetachain/toolkit/-/toolkit-8.0.0.tgz#e8a582104a84b649b54a9e230d9be44aebc1399f" + integrity sha512-PZ6emUAvypDuU0gCFMFh7UfsBeSwTi2E0zt2is2ezjdQ00OyMWDE2T5pMTvib6EDV5bquONfmJG4rExdx8+gEg== dependencies: "@inquirer/prompts" "^2.1.1" "@inquirer/select" "1.1.3" diff --git a/messaging/zeta/package.json b/messaging/zeta/package.json index 01eff927..533af220 100644 --- a/messaging/zeta/package.json +++ b/messaging/zeta/package.json @@ -26,7 +26,7 @@ "@types/node": ">=12.0.0", "@typescript-eslint/eslint-plugin": "^5.59.9", "@typescript-eslint/parser": "^5.59.9", - "@zetachain/toolkit": "7.0.0", + "@zetachain/toolkit": "8.0.0", "axios": "^1.3.6", "chai": "^4.2.0", "dotenv": "^16.0.3", diff --git a/messaging/zeta/yarn.lock b/messaging/zeta/yarn.lock index 5adafe6f..62383860 100644 --- a/messaging/zeta/yarn.lock +++ b/messaging/zeta/yarn.lock @@ -1711,10 +1711,10 @@ resolved "https://registry.yarnpkg.com/@zetachain/protocol-contracts/-/protocol-contracts-7.0.0-rc1.tgz#588483d1ec70e572b7e40e84ef5b34282b0ab375" integrity sha512-vgS+Pjh4MysOyw8WbqTQVBsHJYqKvMcdV7cNVqxaTJd/dl2ak7NNvsIeaeUnxQrp8XfQol2B8GXJpVLM6MK/dg== -"@zetachain/toolkit@7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@zetachain/toolkit/-/toolkit-7.0.0.tgz#7301ccab40c37d3fd8fcc347f99c831ec31b1bd3" - integrity sha512-5cOJVBIEcosF2A2TJbNGFfh4Bob8UcodQII1RdHRstqvV3toZ18r1gVWpLGQ8w2N6T2FCPE8ueN4Q5zH68q20Q== +"@zetachain/toolkit@8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@zetachain/toolkit/-/toolkit-8.0.0.tgz#e8a582104a84b649b54a9e230d9be44aebc1399f" + integrity sha512-PZ6emUAvypDuU0gCFMFh7UfsBeSwTi2E0zt2is2ezjdQ00OyMWDE2T5pMTvib6EDV5bquONfmJG4rExdx8+gEg== dependencies: "@inquirer/prompts" "^2.1.1" "@inquirer/select" "1.1.3" diff --git a/omnichain/multioutput/contracts/Multioutput.sol b/omnichain/multioutput/contracts/Multioutput.sol index eb9ccdec..6ff9b145 100644 --- a/omnichain/multioutput/contracts/Multioutput.sol +++ b/omnichain/multioutput/contracts/Multioutput.sol @@ -6,15 +6,16 @@ import "@zetachain/protocol-contracts/contracts/zevm/interfaces/zContract.sol"; import "@zetachain/toolkit/contracts/BytesHelperLib.sol"; import "@zetachain/toolkit/contracts/SwapHelperLib.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; +import "@zetachain/toolkit/contracts/OnlySystem.sol"; -contract Multioutput is zContract, Ownable { +contract Multioutput is zContract, Ownable, OnlySystem { error NoAvailableTransfers(); error InvalidRecipient(); error FetchingBTCZRC20Failed(); event Withdrawal(address, uint256, bytes); - SystemContract public immutable systemContract; + SystemContract public systemContract; uint256 constant BITCOIN = 18332; @@ -22,22 +23,14 @@ contract Multioutput is zContract, Ownable { systemContract = SystemContract(systemContractAddress); } - modifier onlySystem() { - require( - msg.sender == address(systemContract), - "Only system contract can call this function" - ); - _; - } - function onCrossChainCall( zContext calldata context, address zrc20, uint256 amount, bytes calldata message - ) external virtual override onlySystem { - address btcToken = systemContract.gasCoinZRC20ByChainId(BITCOIN); - if (btcToken == address(0)) revert FetchingBTCZRC20Failed(); + ) external virtual override onlySystem(systemContract) { + if (systemContract.gasCoinZRC20ByChainId(BITCOIN) == address(0)) + revert FetchingBTCZRC20Failed(); ( address evmRecipient, @@ -69,7 +62,7 @@ contract Multioutput is zContract, Ownable { BytesHelperLib.addressToBytes(evmRecipient) ); - if (targetZRC20 == btcToken) { + if (targetZRC20 == systemContract.gasCoinZRC20ByChainId(BITCOIN)) { if (btcRecipient.length == 0) revert InvalidRecipient(); recipient = abi.encodePacked(btcRecipient); } @@ -88,19 +81,15 @@ contract Multioutput is zContract, Ownable { .withdrawGasFee(); uint256 inputForGas = SwapHelperLib.swapTokensForExactTokens( - systemContract.wZetaContractAddress(), - systemContract.uniswapv2FactoryAddress(), - systemContract.uniswapv2Router02Address(), + systemContract, zrc20, gasFee, gasZRC20, amountToTransfer ); - uint256 outputAmount = SwapHelperLib._doSwap( - systemContract.wZetaContractAddress(), - systemContract.uniswapv2FactoryAddress(), - systemContract.uniswapv2Router02Address(), + uint256 outputAmount = SwapHelperLib.swapExactTokensForTokens( + systemContract, zrc20, amountToTransfer - inputForGas, targetZRC20, diff --git a/omnichain/multioutput/package.json b/omnichain/multioutput/package.json index de6eff39..6a65ce83 100644 --- a/omnichain/multioutput/package.json +++ b/omnichain/multioutput/package.json @@ -27,7 +27,7 @@ "@types/node": ">=12.0.0", "@typescript-eslint/eslint-plugin": "^5.59.9", "@typescript-eslint/parser": "^5.59.9", - "@zetachain/toolkit": "7.0.0", + "@zetachain/toolkit": "8.0.0", "axios": "^1.3.6", "chai": "^4.2.0", "dotenv": "^16.0.3", @@ -41,7 +41,7 @@ "eslint-plugin-sort-keys-fix": "^1.1.2", "eslint-plugin-typescript-sort-keys": "^2.3.0", "ethers": "^5.4.7", - "hardhat": "^2.14.0", + "hardhat": "^2.17.2", "hardhat-gas-reporter": "^1.0.8", "prettier": "^2.8.8", "solidity-coverage": "^0.8.0", diff --git a/omnichain/multioutput/yarn.lock b/omnichain/multioutput/yarn.lock index 1ca227c8..d9f57722 100644 --- a/omnichain/multioutput/yarn.lock +++ b/omnichain/multioutput/yarn.lock @@ -1039,6 +1039,54 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@nomicfoundation/edr-darwin-arm64@0.3.7": + version "0.3.7" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.3.7.tgz#c204edc79643624dbd431b489b254778817d8244" + integrity sha512-6tK9Lv/lSfyBvpEQ4nsTfgxyDT1y1Uv/x8Wa+aB+E8qGo3ToexQ1BMVjxJk6PChXCDOWxB3B4KhqaZFjdhl3Ow== + +"@nomicfoundation/edr-darwin-x64@0.3.7": + version "0.3.7" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.3.7.tgz#c3b394445084270cc5250d6c1869b0574e7ef810" + integrity sha512-1RrQ/1JPwxrYO69e0tglFv5H+ggour5Ii3bb727+yBpBShrxtOTQ7fZyfxA5h62LCN+0Z9wYOPeQ7XFcVurMaQ== + +"@nomicfoundation/edr-linux-arm64-gnu@0.3.7": + version "0.3.7" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.3.7.tgz#6d65545a44d1323bb7ab08c3306947165d2071de" + integrity sha512-ds/CKlBoVXIihjhflhgPn13EdKWed6r5bgvMs/YwRqT5wldQAQJZWAfA2+nYm0Yi2gMGh1RUpBcfkyl4pq7G+g== + +"@nomicfoundation/edr-linux-arm64-musl@0.3.7": + version "0.3.7" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.3.7.tgz#5368534bceac1a8c18b1be6b908caca5d39b0c03" + integrity sha512-e29udiRaPujhLkM3+R6ju7QISrcyOqpcaxb2FsDWBkuD7H8uU9JPZEyyUIpEp5uIY0Jh1eEJPKZKIXQmQAEAuw== + +"@nomicfoundation/edr-linux-x64-gnu@0.3.7": + version "0.3.7" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.3.7.tgz#42349bf5941dbb54a5719942924c6e4e8cde348e" + integrity sha512-/xkjmTyv+bbJ4akBCW0qzFKxPOV4AqLOmqurov+s9umHb16oOv72osSa3SdzJED2gHDaKmpMITT4crxbar4Axg== + +"@nomicfoundation/edr-linux-x64-musl@0.3.7": + version "0.3.7" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.3.7.tgz#e6babe11c9a8012f1284e6e48c3551861f2a7cd4" + integrity sha512-QwBP9xlmsbf/ldZDGLcE4QiAb8Zt46E/+WLpxHBATFhGa7MrpJh6Zse+h2VlrT/SYLPbh2cpHgSmoSlqVxWG9g== + +"@nomicfoundation/edr-win32-x64-msvc@0.3.7": + version "0.3.7" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.3.7.tgz#1504b98f305f03be153b0220a546985660de9dc6" + integrity sha512-j/80DEnkxrF2ewdbk/gQ2EOPvgF0XSsg8D0o4+6cKhUVAW6XwtWKzIphNL6dyD2YaWEPgIrNvqiJK/aln0ww4Q== + +"@nomicfoundation/edr@^0.3.5": + version "0.3.7" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr/-/edr-0.3.7.tgz#9c75edf1fcf601617905b2c89acf103f4786d017" + integrity sha512-v2JFWnFKRsnOa6PDUrD+sr8amcdhxnG/YbL7LzmgRGU1odWEyOF4/EwNeUajQr4ZNKVWrYnJ6XjydXtUge5OBQ== + optionalDependencies: + "@nomicfoundation/edr-darwin-arm64" "0.3.7" + "@nomicfoundation/edr-darwin-x64" "0.3.7" + "@nomicfoundation/edr-linux-arm64-gnu" "0.3.7" + "@nomicfoundation/edr-linux-arm64-musl" "0.3.7" + "@nomicfoundation/edr-linux-x64-gnu" "0.3.7" + "@nomicfoundation/edr-linux-x64-musl" "0.3.7" + "@nomicfoundation/edr-win32-x64-msvc" "0.3.7" + "@nomicfoundation/ethereumjs-block@5.0.1": version "5.0.1" resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.1.tgz#6f89664f55febbd723195b6d0974773d29ee133d" @@ -1079,6 +1127,13 @@ "@nomicfoundation/ethereumjs-util" "9.0.1" crc-32 "^1.2.0" +"@nomicfoundation/ethereumjs-common@4.0.4": + version "4.0.4" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.4.tgz#9901f513af2d4802da87c66d6f255b510bef5acb" + integrity sha512-9Rgb658lcWsjiicr5GzNCjI1llow/7r0k50dLL95OJ+6iZJcVbi15r3Y0xh2cIO+zgX0WIHcbzIu6FeQf9KPrg== + dependencies: + "@nomicfoundation/ethereumjs-util" "9.0.4" + "@nomicfoundation/ethereumjs-ethash@3.0.1": version "3.0.1" resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.1.tgz#65ca494d53e71e8415c9a49ef48bc921c538fc41" @@ -1110,6 +1165,11 @@ resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.1.tgz#0b30c1cf77d125d390408e391c4bb5291ef43c28" integrity sha512-xtxrMGa8kP4zF5ApBQBtjlSbN5E2HI8m8FYgVSYAnO6ssUoY5pVPGy2H8+xdf/bmMa22Ce8nWMH3aEW8CcqMeQ== +"@nomicfoundation/ethereumjs-rlp@5.0.4": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.4.tgz#66c95256fc3c909f6fb18f6a586475fc9762fa30" + integrity sha512-8H1S3s8F6QueOc/X92SdrA4RDenpiAEqMg5vJH99kcQaCy/a3Q6fgseo75mgWlbanGJXSlAPtnCeG9jvfTYXlw== + "@nomicfoundation/ethereumjs-statemanager@2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.1.tgz#8824a97938db4471911e2d2f140f79195def5935" @@ -1145,6 +1205,16 @@ "@nomicfoundation/ethereumjs-util" "9.0.1" ethereum-cryptography "0.1.3" +"@nomicfoundation/ethereumjs-tx@5.0.4": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.4.tgz#b0ceb58c98cc34367d40a30d255d6315b2f456da" + integrity sha512-Xjv8wAKJGMrP1f0n2PeyfFCCojHd7iS3s/Ab7qzF1S64kxZ8Z22LCMynArYsVqiFx6rzYy548HNVEyI+AYN/kw== + dependencies: + "@nomicfoundation/ethereumjs-common" "4.0.4" + "@nomicfoundation/ethereumjs-rlp" "5.0.4" + "@nomicfoundation/ethereumjs-util" "9.0.4" + ethereum-cryptography "0.1.3" + "@nomicfoundation/ethereumjs-util@9.0.1": version "9.0.1" resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.1.tgz#530cda8bae33f8b5020a8f199ed1d0a2ce48ec89" @@ -1154,6 +1224,14 @@ "@nomicfoundation/ethereumjs-rlp" "5.0.1" ethereum-cryptography "0.1.3" +"@nomicfoundation/ethereumjs-util@9.0.4": + version "9.0.4" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.4.tgz#84c5274e82018b154244c877b76bc049a4ed7b38" + integrity sha512-sLOzjnSrlx9Bb9EFNtHzK/FJFsfg2re6bsGqinFinH1gCqVfz9YYlXiMWwDM4C/L4ywuHFCYwfKTVr/QHQcU0Q== + dependencies: + "@nomicfoundation/ethereumjs-rlp" "5.0.4" + ethereum-cryptography "0.1.3" + "@nomicfoundation/ethereumjs-vm@7.0.1": version "7.0.1" resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.1.tgz#7d035e0993bcad10716c8b36e61dfb87fa3ca05f" @@ -1721,10 +1799,10 @@ resolved "https://registry.yarnpkg.com/@zetachain/protocol-contracts/-/protocol-contracts-7.0.0-rc1.tgz#588483d1ec70e572b7e40e84ef5b34282b0ab375" integrity sha512-vgS+Pjh4MysOyw8WbqTQVBsHJYqKvMcdV7cNVqxaTJd/dl2ak7NNvsIeaeUnxQrp8XfQol2B8GXJpVLM6MK/dg== -"@zetachain/toolkit@7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@zetachain/toolkit/-/toolkit-7.0.0.tgz#7301ccab40c37d3fd8fcc347f99c831ec31b1bd3" - integrity sha512-5cOJVBIEcosF2A2TJbNGFfh4Bob8UcodQII1RdHRstqvV3toZ18r1gVWpLGQ8w2N6T2FCPE8ueN4Q5zH68q20Q== +"@zetachain/toolkit@8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@zetachain/toolkit/-/toolkit-8.0.0.tgz#e8a582104a84b649b54a9e230d9be44aebc1399f" + integrity sha512-PZ6emUAvypDuU0gCFMFh7UfsBeSwTi2E0zt2is2ezjdQ00OyMWDE2T5pMTvib6EDV5bquONfmJG4rExdx8+gEg== dependencies: "@inquirer/prompts" "^2.1.1" "@inquirer/select" "1.1.3" @@ -1847,6 +1925,13 @@ amdefine@>=0.0.4: resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" integrity sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg== +ansi-align@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.1.tgz#0cdf12e111ace773a86e9a1fad1225c43cb19a59" + integrity sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w== + dependencies: + string-width "^4.1.0" + ansi-colors@3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" @@ -2198,6 +2283,20 @@ bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== +boxen@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/boxen/-/boxen-5.1.2.tgz#788cb686fc83c1f486dfa8a40c68fc2b831d2b50" + integrity sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ== + dependencies: + ansi-align "^3.0.0" + camelcase "^6.2.0" + chalk "^4.1.0" + cli-boxes "^2.2.1" + string-width "^4.2.2" + type-fest "^0.20.2" + widest-line "^3.1.0" + wrap-ansi "^7.0.0" + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -2332,7 +2431,7 @@ camelcase@^5.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -camelcase@^6.0.0: +camelcase@^6.0.0, camelcase@^6.2.0: version "6.3.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== @@ -2470,6 +2569,11 @@ clean-stack@^2.0.0: resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== +cli-boxes@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f" + integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== + cli-cursor@^3.0.0, cli-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" @@ -3964,7 +4068,7 @@ hardhat-gas-reporter@^1.0.8: eth-gas-reporter "^0.2.25" sha1 "^1.1.1" -hardhat@^2.14.0, hardhat@^2.15.0: +hardhat@^2.15.0: version "2.17.1" resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.17.1.tgz#4b6c8c8f624fd23d9f40185a4af24815d05a486a" integrity sha512-1PxRkfjhEzXs/wDxI5YgzYBxNmvzifBTjYzuopwel+vXpAhCudplusJthN5eig0FTs4qbi828DBIITEDh8x9LA== @@ -4018,6 +4122,55 @@ hardhat@^2.14.0, hardhat@^2.15.0: uuid "^8.3.2" ws "^7.4.6" +hardhat@^2.17.2: + version "2.22.3" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.22.3.tgz#50605daca6b29862397e446c42ec14c89430bec3" + integrity sha512-k8JV2ECWNchD6ahkg2BR5wKVxY0OiKot7fuxiIpRK0frRqyOljcR2vKwgWSLw6YIeDcNNA4xybj7Og7NSxr2hA== + dependencies: + "@ethersproject/abi" "^5.1.2" + "@metamask/eth-sig-util" "^4.0.0" + "@nomicfoundation/edr" "^0.3.5" + "@nomicfoundation/ethereumjs-common" "4.0.4" + "@nomicfoundation/ethereumjs-tx" "5.0.4" + "@nomicfoundation/ethereumjs-util" "9.0.4" + "@nomicfoundation/solidity-analyzer" "^0.1.0" + "@sentry/node" "^5.18.1" + "@types/bn.js" "^5.1.0" + "@types/lru-cache" "^5.1.0" + adm-zip "^0.4.16" + aggregate-error "^3.0.0" + ansi-escapes "^4.3.0" + boxen "^5.1.2" + chalk "^2.4.2" + chokidar "^3.4.0" + ci-info "^2.0.0" + debug "^4.1.1" + enquirer "^2.3.0" + env-paths "^2.2.0" + ethereum-cryptography "^1.0.3" + ethereumjs-abi "^0.6.8" + find-up "^2.1.0" + fp-ts "1.19.3" + fs-extra "^7.0.1" + glob "7.2.0" + immutable "^4.0.0-rc.12" + io-ts "1.10.4" + keccak "^3.0.2" + lodash "^4.17.11" + mnemonist "^0.38.0" + mocha "^10.0.0" + p-map "^4.0.0" + raw-body "^2.4.1" + resolve "1.17.0" + semver "^6.3.0" + solc "0.7.3" + source-map-support "^0.5.13" + stacktrace-parser "^0.1.10" + tsort "0.0.1" + undici "^5.14.0" + uuid "^8.3.2" + ws "^7.4.6" + has-bigints@^1.0.1, has-bigints@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" @@ -5960,7 +6113,7 @@ string-width@^3.0.0, string-width@^3.1.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +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== @@ -6588,6 +6741,13 @@ wide-align@1.1.3: dependencies: string-width "^1.0.2 || 2" +widest-line@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca" + integrity sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg== + dependencies: + string-width "^4.0.0" + wif@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/wif/-/wif-2.0.6.tgz#08d3f52056c66679299726fade0d432ae74b4704" diff --git a/omnichain/nft/contracts/NFT.sol b/omnichain/nft/contracts/NFT.sol index 4659b2ff..46d5820f 100644 --- a/omnichain/nft/contracts/NFT.sol +++ b/omnichain/nft/contracts/NFT.sol @@ -5,11 +5,13 @@ import "@zetachain/protocol-contracts/contracts/zevm/SystemContract.sol"; import "@zetachain/protocol-contracts/contracts/zevm/interfaces/zContract.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@zetachain/toolkit/contracts/BytesHelperLib.sol"; +import "@zetachain/toolkit/contracts/OnlySystem.sol"; -contract NFT is zContract, ERC721 { +contract NFT is zContract, ERC721, OnlySystem { + SystemContract public systemContract; + error CallerNotOwnerNotApproved(); uint256 constant BITCOIN = 18332; - SystemContract public immutable systemContract; mapping(uint256 => uint256) public tokenAmounts; mapping(uint256 => uint256) public tokenChains; @@ -20,20 +22,12 @@ contract NFT is zContract, ERC721 { _nextTokenId = 0; } - modifier onlySystem() { - require( - msg.sender == address(systemContract), - "Only system contract can call this function" - ); - _; - } - function onCrossChainCall( zContext calldata context, address zrc20, uint256 amount, bytes calldata message - ) external override onlySystem { + ) external override onlySystem(systemContract) { address recipient; if (context.chainID == BITCOIN) { @@ -58,10 +52,9 @@ contract NFT is zContract, ERC721 { } function burnNFT(uint256 tokenId, bytes memory recipient) public { - require( - _isApprovedOrOwner(_msgSender(), tokenId), - "Caller is not owner nor approved" - ); + if (!_isApprovedOrOwner(_msgSender(), tokenId)) { + revert CallerNotOwnerNotApproved(); + } address zrc20 = systemContract.gasCoinZRC20ByChainId( tokenChains[tokenId] ); diff --git a/omnichain/nft/package.json b/omnichain/nft/package.json index 01eff927..533af220 100644 --- a/omnichain/nft/package.json +++ b/omnichain/nft/package.json @@ -26,7 +26,7 @@ "@types/node": ">=12.0.0", "@typescript-eslint/eslint-plugin": "^5.59.9", "@typescript-eslint/parser": "^5.59.9", - "@zetachain/toolkit": "7.0.0", + "@zetachain/toolkit": "8.0.0", "axios": "^1.3.6", "chai": "^4.2.0", "dotenv": "^16.0.3", diff --git a/omnichain/nft/yarn.lock b/omnichain/nft/yarn.lock index 91d25e6c..e24efda9 100644 --- a/omnichain/nft/yarn.lock +++ b/omnichain/nft/yarn.lock @@ -1716,10 +1716,10 @@ resolved "https://registry.yarnpkg.com/@zetachain/protocol-contracts/-/protocol-contracts-7.0.0-rc1.tgz#588483d1ec70e572b7e40e84ef5b34282b0ab375" integrity sha512-vgS+Pjh4MysOyw8WbqTQVBsHJYqKvMcdV7cNVqxaTJd/dl2ak7NNvsIeaeUnxQrp8XfQol2B8GXJpVLM6MK/dg== -"@zetachain/toolkit@7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@zetachain/toolkit/-/toolkit-7.0.0.tgz#7301ccab40c37d3fd8fcc347f99c831ec31b1bd3" - integrity sha512-5cOJVBIEcosF2A2TJbNGFfh4Bob8UcodQII1RdHRstqvV3toZ18r1gVWpLGQ8w2N6T2FCPE8ueN4Q5zH68q20Q== +"@zetachain/toolkit@8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@zetachain/toolkit/-/toolkit-8.0.0.tgz#e8a582104a84b649b54a9e230d9be44aebc1399f" + integrity sha512-PZ6emUAvypDuU0gCFMFh7UfsBeSwTi2E0zt2is2ezjdQ00OyMWDE2T5pMTvib6EDV5bquONfmJG4rExdx8+gEg== dependencies: "@inquirer/prompts" "^2.1.1" "@inquirer/select" "1.1.3" diff --git a/omnichain/staking/contracts/Staking.sol b/omnichain/staking/contracts/Staking.sol index 5ec2fce3..95b3b6ff 100644 --- a/omnichain/staking/contracts/Staking.sol +++ b/omnichain/staking/contracts/Staking.sol @@ -5,9 +5,10 @@ import "@zetachain/protocol-contracts/contracts/zevm/SystemContract.sol"; import "@zetachain/protocol-contracts/contracts/zevm/interfaces/zContract.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@zetachain/toolkit/contracts/BytesHelperLib.sol"; +import "@zetachain/toolkit/contracts/OnlySystem.sol"; -contract Staking is ERC20, zContract { - SystemContract public immutable systemContract; +contract Staking is ERC20, zContract, OnlySystem { + SystemContract public systemContract; uint256 public immutable chainID; uint256 constant BITCOIN = 18332; @@ -35,20 +36,12 @@ contract Staking is ERC20, zContract { chainID = chainID_; } - modifier onlySystem() { - require( - msg.sender == address(systemContract), - "Only system contract can call this function" - ); - _; - } - function onCrossChainCall( zContext calldata context, address zrc20, uint256 amount, bytes calldata message - ) external virtual override onlySystem { + ) external virtual override onlySystem(systemContract) { if (chainID != context.chainID) { revert WrongChain(context.chainID); } diff --git a/omnichain/staking/package.json b/omnichain/staking/package.json index 01eff927..533af220 100644 --- a/omnichain/staking/package.json +++ b/omnichain/staking/package.json @@ -26,7 +26,7 @@ "@types/node": ">=12.0.0", "@typescript-eslint/eslint-plugin": "^5.59.9", "@typescript-eslint/parser": "^5.59.9", - "@zetachain/toolkit": "7.0.0", + "@zetachain/toolkit": "8.0.0", "axios": "^1.3.6", "chai": "^4.2.0", "dotenv": "^16.0.3", diff --git a/omnichain/staking/yarn.lock b/omnichain/staking/yarn.lock index 91d25e6c..e24efda9 100644 --- a/omnichain/staking/yarn.lock +++ b/omnichain/staking/yarn.lock @@ -1716,10 +1716,10 @@ resolved "https://registry.yarnpkg.com/@zetachain/protocol-contracts/-/protocol-contracts-7.0.0-rc1.tgz#588483d1ec70e572b7e40e84ef5b34282b0ab375" integrity sha512-vgS+Pjh4MysOyw8WbqTQVBsHJYqKvMcdV7cNVqxaTJd/dl2ak7NNvsIeaeUnxQrp8XfQol2B8GXJpVLM6MK/dg== -"@zetachain/toolkit@7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@zetachain/toolkit/-/toolkit-7.0.0.tgz#7301ccab40c37d3fd8fcc347f99c831ec31b1bd3" - integrity sha512-5cOJVBIEcosF2A2TJbNGFfh4Bob8UcodQII1RdHRstqvV3toZ18r1gVWpLGQ8w2N6T2FCPE8ueN4Q5zH68q20Q== +"@zetachain/toolkit@8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@zetachain/toolkit/-/toolkit-8.0.0.tgz#e8a582104a84b649b54a9e230d9be44aebc1399f" + integrity sha512-PZ6emUAvypDuU0gCFMFh7UfsBeSwTi2E0zt2is2ezjdQ00OyMWDE2T5pMTvib6EDV5bquONfmJG4rExdx8+gEg== dependencies: "@inquirer/prompts" "^2.1.1" "@inquirer/select" "1.1.3" diff --git a/omnichain/swap/contracts/Swap.sol b/omnichain/swap/contracts/Swap.sol index 4e2152c8..ade9faf8 100644 --- a/omnichain/swap/contracts/Swap.sol +++ b/omnichain/swap/contracts/Swap.sol @@ -5,29 +5,22 @@ import "@zetachain/protocol-contracts/contracts/zevm/SystemContract.sol"; import "@zetachain/protocol-contracts/contracts/zevm/interfaces/zContract.sol"; import "@zetachain/toolkit/contracts/SwapHelperLib.sol"; import "@zetachain/toolkit/contracts/BytesHelperLib.sol"; +import "@zetachain/toolkit/contracts/OnlySystem.sol"; -contract Swap is zContract { - SystemContract public immutable systemContract; +contract Swap is zContract, OnlySystem { + SystemContract public systemContract; uint256 constant BITCOIN = 18332; constructor(address systemContractAddress) { systemContract = SystemContract(systemContractAddress); } - modifier onlySystem() { - require( - msg.sender == address(systemContract), - "Only system contract can call this function" - ); - _; - } - function onCrossChainCall( zContext calldata context, address zrc20, uint256 amount, bytes calldata message - ) external virtual override onlySystem { + ) external virtual override onlySystem(systemContract) { address targetTokenAddress; bytes memory recipientAddress; @@ -49,19 +42,15 @@ contract Swap is zContract { .withdrawGasFee(); uint256 inputForGas = SwapHelperLib.swapTokensForExactTokens( - systemContract.wZetaContractAddress(), - systemContract.uniswapv2FactoryAddress(), - systemContract.uniswapv2Router02Address(), + systemContract, zrc20, gasFee, gasZRC20, amount ); - uint256 outputAmount = SwapHelperLib._doSwap( - systemContract.wZetaContractAddress(), - systemContract.uniswapv2FactoryAddress(), - systemContract.uniswapv2Router02Address(), + uint256 outputAmount = SwapHelperLib.swapExactTokensForTokens( + systemContract, zrc20, amount - inputForGas, targetTokenAddress, diff --git a/omnichain/swap/contracts/SwapToZeta.sol b/omnichain/swap/contracts/SwapToZeta.sol new file mode 100644 index 00000000..f7a5513f --- /dev/null +++ b/omnichain/swap/contracts/SwapToZeta.sol @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@zetachain/protocol-contracts/contracts/zevm/SystemContract.sol"; +import "@zetachain/protocol-contracts/contracts/zevm/interfaces/zContract.sol"; +import "@zetachain/toolkit/contracts/SwapHelperLib.sol"; +import "@zetachain/toolkit/contracts/BytesHelperLib.sol"; +import "@zetachain/protocol-contracts/contracts/zevm/interfaces/IWZETA.sol"; +import "@zetachain/toolkit/contracts/OnlySystem.sol"; + +contract SwapToZeta is zContract, OnlySystem { + SystemContract public systemContract; + + uint256 constant BITCOIN = 18332; + + constructor(address systemContractAddress) { + systemContract = SystemContract(systemContractAddress); + } + + function onCrossChainCall( + zContext calldata context, + address zrc20, + uint256 amount, + bytes calldata message + ) external virtual override onlySystem(systemContract) { + address target; + bytes memory to; + + if (context.chainID == BITCOIN) { + target = BytesHelperLib.bytesToAddress(message, 0); + to = abi.encodePacked(BytesHelperLib.bytesToAddress(message, 20)); + } else { + (address targetToken, bytes memory recipient) = abi.decode( + message, + (address, bytes) + ); + target = targetToken; + to = recipient; + } + + address wzeta = systemContract.wZetaContractAddress(); + bool isTargetZeta = target == wzeta; + uint256 inputForGas; + address gasZRC20; + uint256 gasFee; + + if (!isTargetZeta) { + (gasZRC20, gasFee) = IZRC20(target).withdrawGasFee(); + + inputForGas = SwapHelperLib.swapTokensForExactTokens( + systemContract, + zrc20, + gasFee, + gasZRC20, + amount + ); + } + + uint256 outputAmount = SwapHelperLib.swapExactTokensForTokens( + systemContract, + zrc20, + isTargetZeta ? amount : amount - inputForGas, + target, + 0 + ); + + if (isTargetZeta) { + IWETH9(wzeta).transfer(address(uint160(bytes20(to))), outputAmount); + } else { + IZRC20(gasZRC20).approve(target, gasFee); + IZRC20(target).withdraw(to, outputAmount); + } + } +} diff --git a/omnichain/swap/package.json b/omnichain/swap/package.json index 01eff927..533af220 100644 --- a/omnichain/swap/package.json +++ b/omnichain/swap/package.json @@ -26,7 +26,7 @@ "@types/node": ">=12.0.0", "@typescript-eslint/eslint-plugin": "^5.59.9", "@typescript-eslint/parser": "^5.59.9", - "@zetachain/toolkit": "7.0.0", + "@zetachain/toolkit": "8.0.0", "axios": "^1.3.6", "chai": "^4.2.0", "dotenv": "^16.0.3", diff --git a/omnichain/swap/tasks/deploy.ts b/omnichain/swap/tasks/deploy.ts index bdb943b4..91901182 100644 --- a/omnichain/swap/tasks/deploy.ts +++ b/omnichain/swap/tasks/deploy.ts @@ -1,11 +1,13 @@ -import { getAddress } from "@zetachain/protocol-contracts"; +import { getAddress, ParamChainName } from "@zetachain/protocol-contracts"; import { task } from "hardhat/config"; import { HardhatRuntimeEnvironment } from "hardhat/types"; const main = async (args: any, hre: HardhatRuntimeEnvironment) => { - if (hre.network.name !== "zeta_testnet") { + const network = hre.network.name as ParamChainName; + + if (!/zeta_(testnet|mainnet)/.test(network)) { throw new Error( - '🚨 Please use the "zeta_testnet" network to deploy to ZetaChain.' + '🚨 Please use either "zeta_testnet" or "zeta_mainnet" network to deploy to ZetaChain.' ); } @@ -16,25 +18,29 @@ const main = async (args: any, hre: HardhatRuntimeEnvironment) => { ); } - const systemContract = getAddress("systemContract", "zeta_testnet"); + const systemContract = getAddress("systemContract", network); - const factory = await hre.ethers.getContractFactory("Swap"); + const factory = await hre.ethers.getContractFactory(args.name); const contract = await factory.deploy(systemContract); await contract.deployed(); + const isTestnet = network === "zeta_testnet"; + const zetascan = isTestnet ? "athens.explorer" : "explorer"; + const blockscout = isTestnet ? "zetachain-athens-3" : "zetachain"; + if (args.json) { console.log(JSON.stringify(contract)); } else { console.log(`🔑 Using account: ${signer.address} -🚀 Successfully deployed contract on ZetaChain. +🚀 Successfully deployed contract on ${network}. 📜 Contract address: ${contract.address} -🌍 Explorer: https://athens3.explorer.zetachain.com/address/${contract.address} +🌍 ZetaScan: https://${zetascan}.zetachain.com/address/${contract.address} +🌍 Blockcsout: https://${blockscout}.blockscout.com/address/${contract.address} `); } }; -task("deploy", "Deploy the contract", main).addFlag( - "json", - "Output in JSON" -); \ No newline at end of file +task("deploy", "Deploy the contract", main) + .addFlag("json", "Output in JSON") + .addOptionalParam("name", "Contract to deploy", "Swap"); diff --git a/omnichain/swap/yarn.lock b/omnichain/swap/yarn.lock index 474b5ff3..0cddf9e0 100644 --- a/omnichain/swap/yarn.lock +++ b/omnichain/swap/yarn.lock @@ -1736,10 +1736,10 @@ resolved "https://registry.yarnpkg.com/@zetachain/protocol-contracts/-/protocol-contracts-7.0.0-rc1.tgz#588483d1ec70e572b7e40e84ef5b34282b0ab375" integrity sha512-vgS+Pjh4MysOyw8WbqTQVBsHJYqKvMcdV7cNVqxaTJd/dl2ak7NNvsIeaeUnxQrp8XfQol2B8GXJpVLM6MK/dg== -"@zetachain/toolkit@7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@zetachain/toolkit/-/toolkit-7.0.0.tgz#7301ccab40c37d3fd8fcc347f99c831ec31b1bd3" - integrity sha512-5cOJVBIEcosF2A2TJbNGFfh4Bob8UcodQII1RdHRstqvV3toZ18r1gVWpLGQ8w2N6T2FCPE8ueN4Q5zH68q20Q== +"@zetachain/toolkit@8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@zetachain/toolkit/-/toolkit-8.0.0.tgz#e8a582104a84b649b54a9e230d9be44aebc1399f" + integrity sha512-PZ6emUAvypDuU0gCFMFh7UfsBeSwTi2E0zt2is2ezjdQ00OyMWDE2T5pMTvib6EDV5bquONfmJG4rExdx8+gEg== dependencies: "@inquirer/prompts" "^2.1.1" "@inquirer/select" "1.1.3" diff --git a/package.json b/package.json index 2ae266d9..5dbb89b4 100644 --- a/package.json +++ b/package.json @@ -8,5 +8,6 @@ ], "scripts": { "build": "sh scripts/build.sh" - } -} \ No newline at end of file + }, + "packageManager": "yarn@1.22.21+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72" +}