From a5d86ce66271e3ac09afa3828f2b54db2a8853fa Mon Sep 17 00:00:00 2001 From: Dima Stebaev Date: Thu, 14 Sep 2023 16:11:18 +0300 Subject: [PATCH 01/13] Revert "Revert "Prepare infrastructure for skale-contracts"" --- .github/workflows/main.yml | 10 ++- .github/workflows/publish.yml | 56 +++++++------ proxy/migrations/deployMainnet.ts | 7 ++ proxy/migrations/deploySchain.ts | 2 - proxy/migrations/upgradeMainnet.ts | 68 +++++++++++++++- proxy/package.json | 8 +- proxy/scripts/generateAbi.ts | 26 ++++++ proxy/scripts/test_upgrade.sh | 3 +- proxy/yarn.lock | 123 +---------------------------- 9 files changed, 144 insertions(+), 159 deletions(-) create mode 100644 proxy/scripts/generateAbi.ts diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 76548c7d8..7b4ebc403 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,8 +41,7 @@ jobs: cache: 'yarn' - name: Install project - run: | - yarn install + run: yarn install - name: Install slither run: pip3 install -r scripts/requirements.txt @@ -59,6 +58,11 @@ jobs: - name: Slither checks run: yarn slither + - name: Test ABI generation + env: + VERSION: "0.0.0" + run: npx hardhat run scripts/generateAbi.ts + - name: Gas calculation test run: npx hardhat test gas/calculateGas.ts @@ -66,7 +70,7 @@ jobs: run: bash ./scripts/test_deploy.sh - name: Test upgrade - run: bash ./scripts/test_upgrade.sh + run: bash scripts/test_upgrade.sh - name: Run tests run: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9b08804ed..b6b606e43 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,6 +12,10 @@ on: tags: - 'custom-release-*' +env: + NODE_VERSION: 18 + PYTHON_VERSION: 3.8 + jobs: build: runs-on: ubuntu-latest @@ -19,9 +23,11 @@ jobs: env: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - PROXY_DIR: "proxy" + defaults: + run: + working-directory: proxy steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive @@ -47,12 +53,12 @@ jobs: - name: Install NODE JS uses: actions/setup-node@v2 with: - node-version: '18' + node-version: ${{ env.NODE_VERSION }} - - name: Install Python 3.8 + - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: ${{ env.PYTHON_VERSION }} - name: Prepare for pip package building run: | @@ -60,9 +66,7 @@ jobs: python3 -m pip install --user --upgrade twine - name: Install project - working-directory: ${{env.PROXY_DIR}} - run: | - yarn install + run: yarn install - name: Calculate version run: | @@ -75,30 +79,28 @@ jobs: echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV - name: Generate Manifest - working-directory: ${{env.PROXY_DIR}} - run: | - npx hardhat run migrations/generateManifest.ts + run: npx hardhat run migrations/generateManifest.ts - name: Install python testing staff - working-directory: ${{env.PROXY_DIR}} run: pip3 install -r predeployed/test/requirements.txt - name: Build predeployed pip package - working-directory: ${{env.PROXY_DIR}} env: VERSION: ${{ env.VERSION }} - run: | - ./predeployed/scripts/build_package.sh + run: ./predeployed/scripts/build_package.sh - name: Publish predeployed pip package - working-directory: ${{env.PROXY_DIR}} env: PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - run: | - ./predeployed/scripts/publish_package.sh + run: ./predeployed/scripts/publish_package.sh + + - name: Generate mainnet ABIs + env: + VERSION: ${{ env.VERSION }} + run: npx hardhat run scripts/generateAbi.ts - - name: Generate ABIs - working-directory: ${{env.PROXY_DIR}}/predeployed + - name: Generate predeployed ABIs + working-directory: proxy/predeployed env: VERSION: ${{ env.VERSION }} run: | @@ -126,7 +128,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: release_id: ${{ steps.create_release.outputs.id }} - assets_path: proxy/predeployed/dist/ + assets_path: predeployed/dist/ - name: Upload Release Assets id: upload-static-data @@ -135,7 +137,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: release_id: ${{ steps.create_release.outputs.id }} - assets_path: proxy/predeployed/data/ + assets_path: predeployed/data/ - name: Upload Release Assets id: upload-manifest-data @@ -144,7 +146,15 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: release_id: ${{ steps.create_release.outputs.id }} - assets_path: proxy/data/ima-schain-*-manifest.json + assets_path: data/ima-schain-*-manifest.json + + - name: Upload Release Assets + uses: dwenegar/upload-release-assets@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + release_id: ${{ steps.create_release.outputs.id }} + assets_path: data/*-abi.json - name: Build and publish image env: diff --git a/proxy/migrations/deployMainnet.ts b/proxy/migrations/deployMainnet.ts index 668506f2c..db2fe6b45 100644 --- a/proxy/migrations/deployMainnet.ts +++ b/proxy/migrations/deployMainnet.ts @@ -219,6 +219,13 @@ async function main() { try { await contractManagerInst.setContractsAddress( "MessageProxyForMainnet", deployed.get( "MessageProxyForMainnet" )?.address); await contractManagerInst.setContractsAddress( "CommunityPool", deployed.get( "CommunityPool" )?.address); + for (const contractName of contractsToDeploy) { + const contractAddress = deployed.get(contractName); + if (contractAddress === undefined) { + throw new Error(`${contractName} was not found`); + } + await contractManagerInst.setContractsAddress( contractName, contractAddress); + } console.log( "Successfully registered MessageProxy in ContractManager" ); } catch ( error ) { console.log( "Registration of MessageProxy is failed on ContractManager. Please redo it by yourself!\nError:", error ); diff --git a/proxy/migrations/deploySchain.ts b/proxy/migrations/deploySchain.ts index ed4863d9e..dcf726a16 100644 --- a/proxy/migrations/deploySchain.ts +++ b/proxy/migrations/deploySchain.ts @@ -194,8 +194,6 @@ async function main() { deployed.set( "TokenManagerERC20", { address: tokenManagerERC20.address, interface: tokenManagerERC20.interface } ); console.log("Contract TokenManagerERC20 deployed to", tokenManagerERC20.address); - // The end of TODO: - console.log("Deploy TokenManagerERC721"); const tokenManagerERC721Factory = await ethers.getContractFactory("TokenManagerERC721"); const tokenManagerERC721 = await upgrades.deployProxy(tokenManagerERC721Factory, [ diff --git a/proxy/migrations/upgradeMainnet.ts b/proxy/migrations/upgradeMainnet.ts index 7797df38d..8970c37ad 100644 --- a/proxy/migrations/upgradeMainnet.ts +++ b/proxy/migrations/upgradeMainnet.ts @@ -3,8 +3,10 @@ import { ethers } from "hardhat"; import { promises as fs } from "fs"; import { AutoSubmitter, Upgrader } from "@skalenetwork/upgrade-tools"; import { SkaleABIFile } from "@skalenetwork/upgrade-tools/dist/src/types/SkaleABIFile"; -import { contracts } from "./deployMainnet"; +import { contracts, contractsToDeploy, getContractKeyInAbiFile } from "./deployMainnet"; import { MessageProxyForMainnet } from "../typechain"; +import { Interface } from "@ethersproject/abi"; + class ImaMainnetUpgrader extends Upgrader { @@ -44,7 +46,69 @@ class ImaMainnetUpgrader extends Upgrader { // deployNewContracts = () => { }; - // initialize = async () => { }; + initialize = async () => { + const contractManagerAddress = await (await this.getMessageProxyForMainnet()).contractManagerOfSkaleManager(); + const contractManagerInterface = new Interface([{ + "type": "function", + "name": "getContract", + "constant": true, + "stateMutability": "view", + "payable": false, + "inputs": [ + { + "type": "string", + "name": "name" + } + ], + "outputs": [ + { + "type": "address", + "name": "contractAddress" + } + ] + }, + { + "type": "function", + "name": "setContractsAddress", + "constant": false, + "payable": false, + "inputs": [ + { + "type": "string", + "name": "contractsName" + }, + { + "type": "address", + "name": "newContractsAddress" + } + ], + "outputs": [] + }]); + const contractManager = new ethers.Contract( + contractManagerAddress, + contractManagerInterface, + ethers.provider + ) + for (const contractName of contractsToDeploy) { + try { + const contractAddress = await contractManager.getContract(contractName); + console.log(`Address of ${contractName} is set to ${contractAddress}`); + } catch { + // getContract failed because the contract is not set + const contractAddress = this.abi[`${getContractKeyInAbiFile(contractName)}_address`] as string; + this.transactions.push( + { + to: contractManager.address, + data: contractManager.interface.encodeFunctionData( + "setContractsAddress", + [contractAddress] + ) + } + ) + console.log(`Set ${contractName} address to ${contractAddress}`); + } + } + }; _getContractKeyInAbiFile(contract: string) { if (contract === "MessageProxyForMainnet") { diff --git a/proxy/package.json b/proxy/package.json index a78711f25..45dd74230 100644 --- a/proxy/package.json +++ b/proxy/package.json @@ -30,12 +30,8 @@ "@skalenetwork/upgrade-tools": "^2.0.2", "axios": "^0.21.4", "dotenv": "^16.0.0", - "ethereumjs-tx": "2.1.2", - "ethereumjs-util": "^7.1.5", "ethers": "^5.7.2", - "ethers-eip712": "^0.2.0", - "hardhat": "2.11.0 - 2.16.1", - "path": "^0.12.7" + "hardhat": "2.11.0 - 2.16.1" }, "devDependencies": { "@nomiclabs/hardhat-etherscan": "^3.1.0", @@ -51,11 +47,9 @@ "@types/sinon-chai": "^3.2.5", "@typescript-eslint/eslint-plugin": "^6.2.1", "@typescript-eslint/parser": "^6.2.1", - "bignumber.js": "^9.0.0", "chai": "^4.2.0", "chai-almost": "^1.0.1", "chai-as-promised": "^7.1.1", - "codecov": "^3.7.1", "eslint": "^8.46.0", "ethereum-waffle": "^4.0.10", "ganache": "7.9.2", diff --git a/proxy/scripts/generateAbi.ts b/proxy/scripts/generateAbi.ts new file mode 100644 index 000000000..ae8d5e4cc --- /dev/null +++ b/proxy/scripts/generateAbi.ts @@ -0,0 +1,26 @@ +import { promises as fs } from 'fs'; +import { contracts } from "../migrations/deployMainnet"; +import { ethers } from "hardhat"; +import { getAbi, getVersion } from '@skalenetwork/upgrade-tools'; + +async function main() { + const abi: {[name: string]: []} = {}; + for (const contractName of contracts) { + console.log(`Load ABI of ${contractName}`); + const factory = await ethers.getContractFactory(contractName); + abi[contractName] = getAbi(factory.interface); + } + const version = await getVersion(); + const filename = `data/mainnet-ima-${version}-abi.json`; + console.log(`Save to ${filename}`) + await fs.writeFile(filename, JSON.stringify(abi, null, 4)); +} + +if (require.main === module) { + main() + .then(() => process.exit(0)) + .catch(error => { + console.error(error); + process.exit(1); + }); +} diff --git a/proxy/scripts/test_upgrade.sh b/proxy/scripts/test_upgrade.sh index 68aec7329..8730fef3d 100755 --- a/proxy/scripts/test_upgrade.sh +++ b/proxy/scripts/test_upgrade.sh @@ -30,9 +30,8 @@ GANACHE=$(npx ganache \ --wallet.accountKeysPath "$ACCOUNTS_FILENAME" \ ) -cd "$DEPLOYED_DIR" +cd "$DEPLOYED_DIR/proxy" yarn install -cd proxy PRIVATE_KEY_FOR_ETHEREUM=$(cat "$ACCOUNTS_FILENAME" | jq -r '.private_keys | to_entries | .[8].value') PRIVATE_KEY_FOR_SCHAIN=$(cat "$ACCOUNTS_FILENAME" | jq -r '.private_keys | to_entries | .[9].value') CHAIN_NAME_SCHAIN="Test" VERSION="$DEPLOYED_VERSION" PRIVATE_KEY_FOR_ETHEREUM="$PRIVATE_KEY_FOR_ETHEREUM" PRIVATE_KEY_FOR_SCHAIN="$PRIVATE_KEY_FOR_SCHAIN" npx hardhat run migrations/deploySkaleManagerComponents.ts --network localhost diff --git a/proxy/yarn.lock b/proxy/yarn.lock index 19b5c35c8..73b7af7b1 100644 --- a/proxy/yarn.lock +++ b/proxy/yarn.lock @@ -1436,11 +1436,6 @@ dependencies: antlr4ts "^0.5.0-alpha.4" -"@tootallnate/once@1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" - integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== - "@trufflesuite/bigint-buffer@1.1.10": version "1.1.10" resolved "https://registry.yarnpkg.com/@trufflesuite/bigint-buffer/-/bigint-buffer-1.1.10.tgz#a1d9ca22d3cad1a138b78baaf15543637a3e1692" @@ -2006,11 +2001,6 @@ argparse@^2.0.1: resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -argv@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/argv/-/argv-0.0.2.tgz#ecbd16f8949b157183711b1bda334f37840185ab" - integrity sha1-7L0W+JSbFXGDcRsb2jNPN4QBhas= - array-back@^3.0.1, array-back@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/array-back/-/array-back-3.1.0.tgz#b8859d7a508871c9a7b2cf42f99428f65e96bfb0" @@ -2612,17 +2602,6 @@ cliui@^7.0.2: strip-ansi "^6.0.0" wrap-ansi "^7.0.0" -codecov@^3.7.1: - version "3.8.3" - resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.8.3.tgz#9c3e364b8a700c597346ae98418d09880a3fdbe7" - integrity sha512-Y8Hw+V3HgR7V71xWH2vQ9lyS358CbGCldWlJFR0JirqoGtOoas3R3/OclRTvgUYFK29mmJICDPauVKmpqbwhOA== - dependencies: - argv "0.0.2" - ignore-walk "3.0.4" - js-yaml "3.14.1" - teeny-request "7.1.1" - urlgrey "1.0.0" - color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -3425,19 +3404,6 @@ ethereumjs-abi@0.6.8, ethereumjs-abi@^0.6.8: bn.js "^4.11.8" ethereumjs-util "^6.0.0" -ethereumjs-common@^1.5.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz#2065dbe9214e850f2e955a80e650cb6999066979" - integrity sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA== - -ethereumjs-tx@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz#5dfe7688bf177b45c9a23f86cf9104d47ea35fed" - integrity sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw== - dependencies: - ethereumjs-common "^1.5.0" - ethereumjs-util "^6.0.0" - ethereumjs-util@7.1.3: version "7.1.3" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.3.tgz#b55d7b64dde3e3e45749e4c41288238edec32d23" @@ -3496,11 +3462,6 @@ ethereumjs-util@^7.1.4: ethereum-cryptography "^0.1.3" rlp "^2.2.4" -ethers-eip712@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/ethers-eip712/-/ethers-eip712-0.2.0.tgz#52973b3a9a22638f7357283bf66624994c6e91ed" - integrity sha512-fgS196gCIXeiLwhsWycJJuxI9nL/AoUPGSQ+yvd+8wdWR+43G+J1n69LmWVWvAON0M6qNaf2BF4/M159U8fujQ== - ethers@5.7.2, ethers@^5.7.1, ethers@^5.7.2: version "5.7.2" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" @@ -3654,13 +3615,6 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= -fast-url-parser@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/fast-url-parser/-/fast-url-parser-1.1.3.tgz#f4af3ea9f34d8a271cf58ad2b3759f431f0b318d" - integrity sha1-9K8+qfNNiicc9YrSs3WfQx8LMY0= - dependencies: - punycode "^1.3.2" - fastq@^1.6.0: version "1.13.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" @@ -4339,15 +4293,6 @@ http-https@^1.0.0: resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b" integrity sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs= -http-proxy-agent@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" - integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== - dependencies: - "@tootallnate/once" "1" - agent-base "6" - debug "4" - http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -4377,13 +4322,6 @@ ieee754@^1.1.13, ieee754@^1.1.4, ieee754@^1.2.1: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== -ignore-walk@3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.4.tgz#c9a09f69b7c7b479a5d74ac1a3c0d4236d2a6335" - integrity sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ== - dependencies: - minimatch "^3.0.4" - ignore@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" @@ -4453,11 +4391,6 @@ inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, i resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - ini@^1.3.5: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" @@ -4793,7 +4726,7 @@ js-yaml@3.13.1: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@3.14.1, js-yaml@3.x, js-yaml@^3.12.0, js-yaml@^3.13.0, js-yaml@^3.13.1: +js-yaml@3.x, js-yaml@^3.12.0, js-yaml@^3.13.0, js-yaml@^3.13.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -5745,14 +5678,6 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -path@^0.12.7: - version "0.12.7" - resolved "https://registry.yarnpkg.com/path/-/path-0.12.7.tgz#d4dc2a506c4ce2197eb481ebfcd5b36c0140b10f" - integrity sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8= - dependencies: - process "^0.11.1" - util "^0.10.3" - pathval@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" @@ -5814,11 +5739,6 @@ printj@~1.1.0: resolved "https://registry.yarnpkg.com/printj/-/printj-1.1.2.tgz#d90deb2975a8b9f600fb3a1c94e3f4c53c78a222" integrity sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ== -process@^0.11.1: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= - progress@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" @@ -5848,7 +5768,7 @@ psl@^1.1.28: resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== -punycode@^1.3.2, punycode@^1.4.1: +punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= @@ -6461,13 +6381,6 @@ stacktrace-parser@^0.1.10: resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= -stream-events@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/stream-events/-/stream-events-1.0.5.tgz#bbc898ec4df33a4902d892333d47da9bf1c406d5" - integrity sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg== - dependencies: - stubs "^3.0.0" - streamsearch@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" @@ -6592,11 +6505,6 @@ strip-json-comments@3.1.1, strip-json-comments@^3.1.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -stubs@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/stubs/-/stubs-3.0.0.tgz#e8d2ba1fa9c90570303c030b6900f7d5f89abe5b" - integrity sha1-6NK6H6nJBXAwPAMLaQD31fiavls= - supports-color@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" @@ -6663,17 +6571,6 @@ table@^6.8.0: string-width "^4.2.3" strip-ansi "^6.0.1" -teeny-request@7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/teeny-request/-/teeny-request-7.1.1.tgz#2b0d156f4a8ad81de44303302ba8d7f1f05e20e6" - integrity sha512-iwY6rkW5DDGq8hE2YgNQlKbptYpY5Nn2xecjQiNjOXWbKzPGUfmeUBCSQbbr306d7Z7U2N0TPl+/SwYRfua1Dg== - dependencies: - http-proxy-agent "^4.0.0" - https-proxy-agent "^5.0.0" - node-fetch "^2.6.1" - stream-events "^1.0.5" - uuid "^8.0.0" - text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" @@ -6997,13 +6894,6 @@ url@^0.11.0: punycode "^1.4.1" qs "^6.11.0" -urlgrey@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/urlgrey/-/urlgrey-1.0.0.tgz#72d2f904482d0b602e3c7fa599343d699bbe1017" - integrity sha512-hJfIzMPJmI9IlLkby8QrsCykQ+SXDeO2W5Q9QTW3QpqZVTx4a/K7p8/5q+/isD8vsbVaFgql/gvAoQCRQ2Cb5w== - dependencies: - fast-url-parser "^1.1.3" - utf-8-validate@5.0.7: version "5.0.7" resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.7.tgz#c15a19a6af1f7ad9ec7ddc425747ca28c3644922" @@ -7035,13 +6925,6 @@ util-deprecate@^1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== -util@^0.10.3: - version "0.10.4" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" - integrity sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A== - dependencies: - inherits "2.0.3" - util@^0.12.5: version "0.12.5" resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" @@ -7058,7 +6941,7 @@ uuid@^3.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -uuid@^8.0.0, uuid@^8.3.2: +uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== From f187c282f49250cdd12376ea83c02f47eac19336 Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Wed, 6 Mar 2024 17:05:25 +0200 Subject: [PATCH 02/13] Bump version --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 7ec1d6db4..ccbccc3dc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.1.0 +2.2.0 From 049879ee907335d3acb8a0177d3d140ce998e3d6 Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Wed, 6 Mar 2024 17:15:17 +0200 Subject: [PATCH 03/13] Add schain ABI --- proxy/scripts/generateAbi.ts | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/proxy/scripts/generateAbi.ts b/proxy/scripts/generateAbi.ts index ae8d5e4cc..45de5c5ec 100644 --- a/proxy/scripts/generateAbi.ts +++ b/proxy/scripts/generateAbi.ts @@ -1,21 +1,37 @@ import { promises as fs } from 'fs'; -import { contracts } from "../migrations/deployMainnet"; +import { contracts as mainnetContracts } from "../migrations/deployMainnet"; +import { contracts as schainContracts } from "../migrations/deploySchain"; import { ethers } from "hardhat"; import { getAbi, getVersion } from '@skalenetwork/upgrade-tools'; -async function main() { +async function writeAbiToFile(contracts: string[], filename: string) { const abi: {[name: string]: []} = {}; for (const contractName of contracts) { console.log(`Load ABI of ${contractName}`); const factory = await ethers.getContractFactory(contractName); abi[contractName] = getAbi(factory.interface); } - const version = await getVersion(); - const filename = `data/mainnet-ima-${version}-abi.json`; console.log(`Save to ${filename}`) await fs.writeFile(filename, JSON.stringify(abi, null, 4)); } +async function main() { + const version = await getVersion(); + const mainnetFilename = `data/mainnet-ima-${version}-abi.json`; + const schainFilename = `data/schain-ima-${version}-abi.json`; + await writeAbiToFile( + mainnetContracts, + mainnetFilename + ); + await writeAbiToFile( + [ + ...schainContracts, + "TokenManagerERC721WithMetadata" + ], + schainFilename + ); +} + if (require.main === module) { main() .then(() => process.exit(0)) From 4ef96fa57d584b71445ca19fda262733b370951c Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Wed, 6 Mar 2024 18:02:02 +0200 Subject: [PATCH 04/13] Commit ABI to the repository --- .github/workflows/publish.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b6b606e43..9a44b8c9b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -58,7 +58,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: ${{ env.PYTHON_VERSION }} + python-version: ${{ env.PYTHON_VERSION }} - name: Prepare for pip package building run: | @@ -156,6 +156,13 @@ jobs: release_id: ${{ steps.create_release.outputs.id }} assets_path: data/*-abi.json + - name: Commit ABI + uses: EndBug/add-and-commit@v9 + with: + default_author: github_actions + message: "Add ABI for version ${{ env.VERSION }}" + add: "data/*-abi.json" + - name: Build and publish image env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 5c4cd634f585bd1766c727851ad2fa097a6fe361 Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Fri, 15 Mar 2024 18:10:22 +0200 Subject: [PATCH 05/13] Add a job to commit ABIs --- .github/workflows/publish.yml | 117 ++++++++++++++-------------------- 1 file changed, 47 insertions(+), 70 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9a44b8c9b..df8677a83 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,46 +19,36 @@ env: jobs: build: runs-on: ubuntu-latest + if: github.event.pull_request.merged == true + env: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + defaults: run: working-directory: proxy - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 - id: yarn-cache - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + outputs: + version: ${{ steps.version.outputs.version }} - - uses: actions/cache@v2 + steps: + - uses: actions/checkout@v4 with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- + submodules: recursive - name: Install NODE JS - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ env.NODE_VERSION }} + cache: 'yarn' - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ env.PYTHON_VERSION }} + cache: 'pip' - name: Prepare for pip package building run: | @@ -69,11 +59,13 @@ jobs: run: yarn install - name: Calculate version + id: version run: | export BRANCH=${GITHUB_REF##*/} echo "Branch $BRANCH" export VERSION=$(bash ./scripts/calculate_version.sh) echo "VERSION=$VERSION" >> $GITHUB_ENV + echo "version=$VERSION" >> "$GITHUB_OUTPUT" echo "Version $VERSION" ( test $BRANCH = "stable" && export PRERELEASE=false ) || export PRERELEASE=true echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV @@ -110,62 +102,47 @@ jobs: mkdir data python scripts/generate_abi.py > data/ima-$VERSION-predeployed-abi.json + - uses: actions/upload-artifact@v4 + with: + path: data + - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: ncipollo/release-action@v1 with: - tag_name: ${{ env.VERSION }} - release_name: ${{ env.VERSION }} - draft: false + tag: ${{ env.VERSION }} prerelease: ${{ env.PRERELEASE }} + artifacts: "predeployed/dist/,predeployed/data/,data/ima-schain-*-manifest.json,data/*-abi.json" - - name: Upload Release Assets - id: upload-release-assets - uses: dwenegar/upload-release-assets@v1 + - name: Build and publish image env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - release_id: ${{ steps.create_release.outputs.id }} - assets_path: predeployed/dist/ + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + run: scripts/build_and_publish_image.sh - - name: Upload Release Assets - id: upload-static-data - uses: dwenegar/upload-release-assets@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - release_id: ${{ steps.create_release.outputs.id }} - assets_path: predeployed/data/ + abi: + runs-on: ubuntu-latest - - name: Upload Release Assets - id: upload-manifest-data - uses: dwenegar/upload-release-assets@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - release_id: ${{ steps.create_release.outputs.id }} - assets_path: data/ima-schain-*-manifest.json + needs: + build - - name: Upload Release Assets - uses: dwenegar/upload-release-assets@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - release_id: ${{ steps.create_release.outputs.id }} - assets_path: data/*-abi.json + defaults: + run: + working-directory: typescript/ethers-v5 - - name: Commit ABI - uses: EndBug/add-and-commit@v9 - with: - default_author: github_actions - message: "Add ABI for version ${{ env.VERSION }}" - add: "data/*-abi.json" + env: + VERSION: ${{ needs.build.outputs.version }} - - name: Build and publish image - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - run: scripts/build_and_publish_image.sh + steps: + - uses: actions/checkout@v4 + with: + ref: abi + + - uses: actions/download-artifact@v4 + + - name: Commit ABI + uses: EndBug/add-and-commit@v9 + with: + default_author: github_actions + message: "Add ABI for version ${{ env.VERSION }}" + add: "*-abi.json" From 9e9a0ee0bfee03480de1cb6684e378fb2f6d06a6 Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Fri, 15 Mar 2024 18:13:48 +0200 Subject: [PATCH 06/13] Remove PR merged condition --- .github/workflows/publish.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index df8677a83..7668d46b9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,8 +20,6 @@ jobs: build: runs-on: ubuntu-latest - if: github.event.pull_request.merged == true - env: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} From 57169d7236ea415dd159ec24697daa3e20714437 Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Fri, 15 Mar 2024 18:18:22 +0200 Subject: [PATCH 07/13] Fix calculate version script path --- .github/workflows/publish.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7668d46b9..53bbb7f52 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -61,7 +61,7 @@ jobs: run: | export BRANCH=${GITHUB_REF##*/} echo "Branch $BRANCH" - export VERSION=$(bash ./scripts/calculate_version.sh) + export VERSION=$(bash ../scripts/calculate_version.sh) echo "VERSION=$VERSION" >> $GITHUB_ENV echo "version=$VERSION" >> "$GITHUB_OUTPUT" echo "Version $VERSION" @@ -100,7 +100,8 @@ jobs: mkdir data python scripts/generate_abi.py > data/ima-$VERSION-predeployed-abi.json - - uses: actions/upload-artifact@v4 + - name: Store artifacts + uses: actions/upload-artifact@v4 with: path: data @@ -124,10 +125,6 @@ jobs: needs: build - defaults: - run: - working-directory: typescript/ethers-v5 - env: VERSION: ${{ needs.build.outputs.version }} @@ -136,7 +133,8 @@ jobs: with: ref: abi - - uses: actions/download-artifact@v4 + - name: Load artifacts + uses: actions/download-artifact@v4 - name: Commit ABI uses: EndBug/add-and-commit@v9 From 55202e795f9ef7776d210bfc8cb05452069be0ec Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Fri, 15 Mar 2024 18:23:37 +0200 Subject: [PATCH 08/13] Change path to calculate version script --- .github/workflows/publish.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 53bbb7f52..dfb29530c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -58,10 +58,11 @@ jobs: - name: Calculate version id: version + working-directory: / run: | export BRANCH=${GITHUB_REF##*/} echo "Branch $BRANCH" - export VERSION=$(bash ../scripts/calculate_version.sh) + export VERSION=$(bash ./scripts/calculate_version.sh) echo "VERSION=$VERSION" >> $GITHUB_ENV echo "version=$VERSION" >> "$GITHUB_OUTPUT" echo "Version $VERSION" From 4fecb8b5fdeeb90a1aea536c76a7ba6beee1fe21 Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Fri, 15 Mar 2024 18:33:07 +0200 Subject: [PATCH 09/13] Fix working directory --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index dfb29530c..9e685f267 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -58,7 +58,7 @@ jobs: - name: Calculate version id: version - working-directory: / + working-directory: ./ run: | export BRANCH=${GITHUB_REF##*/} echo "Branch $BRANCH" From 7d1132710a0cbdee82111f829a598034f27b6f6a Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Fri, 15 Mar 2024 18:36:48 +0200 Subject: [PATCH 10/13] Fix path to artifacts --- .github/workflows/publish.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9e685f267..090cb7ba0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -104,7 +104,7 @@ jobs: - name: Store artifacts uses: actions/upload-artifact@v4 with: - path: data + path: proxy/data - name: Create Release uses: ncipollo/release-action@v1 @@ -114,6 +114,7 @@ jobs: artifacts: "predeployed/dist/,predeployed/data/,data/ima-schain-*-manifest.json,data/*-abi.json" - name: Build and publish image + working-directory: ./ env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} From ce420aebd284f3528366a81489f3cf1666ac832f Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Fri, 15 Mar 2024 18:49:00 +0200 Subject: [PATCH 11/13] Update artifacts name --- .github/workflows/publish.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 090cb7ba0..2dc3469a0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -104,6 +104,7 @@ jobs: - name: Store artifacts uses: actions/upload-artifact@v4 with: + name: data path: proxy/data - name: Create Release @@ -111,7 +112,10 @@ jobs: with: tag: ${{ env.VERSION }} prerelease: ${{ env.PRERELEASE }} - artifacts: "predeployed/dist/,predeployed/data/,data/ima-schain-*-manifest.json,data/*-abi.json" + artifacts: "proxy/predeployed/dist/,\ + proxy/predeployed/data/,\ + proxy/data/ima-schain-*-manifest.json,\ + proxy/data/*-abi.json" - name: Build and publish image working-directory: ./ @@ -137,6 +141,8 @@ jobs: - name: Load artifacts uses: actions/download-artifact@v4 + with: + name: data - name: Commit ABI uses: EndBug/add-and-commit@v9 From 1e1fd78bc042db7c9c77d13fc53d7c17248ee5e3 Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Tue, 19 Mar 2024 17:48:31 +0200 Subject: [PATCH 12/13] Add wildcard to artifacts path --- .github/workflows/publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2dc3469a0..e3f9a6d36 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -112,8 +112,8 @@ jobs: with: tag: ${{ env.VERSION }} prerelease: ${{ env.PRERELEASE }} - artifacts: "proxy/predeployed/dist/,\ - proxy/predeployed/data/,\ + artifacts: "proxy/predeployed/dist/*,\ + proxy/predeployed/data/*,\ proxy/data/ima-schain-*-manifest.json,\ proxy/data/*-abi.json" From e52dd9c8f6a832a91e70a9178f06006cc487e955 Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Wed, 20 Mar 2024 18:16:00 +0200 Subject: [PATCH 13/13] Update publish condition --- .github/workflows/publish.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e3f9a6d36..b57976aaf 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,6 +20,8 @@ jobs: build: runs-on: ubuntu-latest + if: github.event_name != 'pull_request' || github.event.pull_request.merged == true + env: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}