diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b43d61bc..be5399741 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,8 +14,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 20 cache: "npm" @@ -30,8 +30,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 20 cache: "npm" @@ -55,24 +55,34 @@ jobs: check-token-list: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + tokens: + - 'wormhole-connect/src/config/mainnet/wrappedTokens.ts' + - 'wormhole-connect/src/config/testnet/wrappedTokens.ts' + - uses: actions/setup-node@v4 + if: steps.filter.outputs.tokens == 'true' || github.ref == 'refs/heads/development' with: node-version: 20 cache: "npm" cache-dependency-path: "wormhole-connect/package-lock.json" - run: npm ci + if: steps.filter.outputs.tokens == 'true' || github.ref == 'refs/heads/development' working-directory: wormhole-connect - run: npm run checkForeignAssets + if: steps.filter.outputs.tokens == 'true' || github.ref == 'refs/heads/development' working-directory: wormhole-connect + build-hosted: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 20 cache: "npm" @@ -85,8 +95,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 20 cache: "npm" diff --git a/README.md b/README.md index e517bc765..2050b7f06 100644 --- a/README.md +++ b/README.md @@ -253,4 +253,3 @@ This SDK is an open source software SDK that leverages the Wormhole protocol, a Wormhole Connect is an NPM package that interacts with the Wormhole protocol. You assume all risks associated with using the SDK, the Wormhole Connect NPM package, the Wormhole protocol, and digital assets and decentralized systems generally, including but not limited to, that: (a) digital assets are highly volatile; (b) using digital assets is inherently risky due to both features of such assets and the potential unauthorized acts of third parties; (c) you may not have ready access to assets; and (d) you may lose some or all of your tokens or other assets. You agree that you will have no recourse against anyone else for any losses due to the use of the SDK or Wormhole. For example, these losses may arise from or relate to: (i) incorrect information; (ii) software or network failures; (iii) corrupted cryptocurrency wallet files; (iv) unauthorized access; (v) errors, mistakes, or inaccuracies; or (vi) third-party activities. - diff --git a/wormhole-connect/scripts/checkForeignAssetsConfig.ts b/wormhole-connect/scripts/checkForeignAssetsConfig.ts index b9d9ca955..d4b14ec7f 100644 --- a/wormhole-connect/scripts/checkForeignAssetsConfig.ts +++ b/wormhole-connect/scripts/checkForeignAssetsConfig.ts @@ -86,6 +86,13 @@ const checkEnvConfig = async ( const configForeignAddress = wrappedTokens[tokenId.chain]?.[tokenId.address]?.[chain]; + + if (!configForeignAddress) { + // Skip chain for which there is no foreign asset configured + // Connect can fetch them dynamically at runtime anyway + return; + } + if (chain === tokenId.chain) { if (configForeignAddress) { throw new Error( @@ -120,7 +127,9 @@ const checkEnvConfig = async ( `❌ Invalid foreign address detected! Env: ${env}, Token ${tokenId.chain} ${tokenId.address}, Chain: ${chain}, Expected: ${foreignAddress}, Received: ${configForeignAddress}`, ); } else { - console.log('✅ Config matches'); + console.log( + `✅ ${tokenId.chain} ${tokenId.address} on ${chain} is correctly set to ${foreignAddress}`, + ); } } else { if (!recommendedUpdates[tokenId.chain]) {