From 9cb07937a6e3a482495029479dd1feb062f71975 Mon Sep 17 00:00:00 2001 From: Ilya Date: Tue, 9 Apr 2024 12:10:03 +0300 Subject: [PATCH] support amoy network; refactor envs --- .github/workflows/e2e.yaml | 11 ++++++++--- .github/workflows/push-container.yaml | 16 ++++++++++------ .../e2e/http_nameservice.postman_collection.json | 6 +++--- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 0412a24..acf6878 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -9,7 +9,8 @@ on: jobs: run_e2e: env: - ETHEREUM_CONTRACT_ADDRESS: "0x134B1BE34911E39A8397ec6289782989729807a4" + STATE_CONTRACT_ADDRESS_AMOY: "0x1a4cC30f2aA0377b0c3bc9848766D90cb4404124" + STATE_CONTRACT_ADDRESS_MUMBAI: "0x134B1BE34911E39A8397ec6289782989729807a4" runs-on: ubuntu-20.04 steps: @@ -22,9 +23,13 @@ jobs: - name: Build file with supported networks run: | echo -e "polygon:" > resolvers.settings.yaml + echo -e " amoy:" >> resolvers.settings.yaml + echo -e " contractAddress: ${{ env.STATE_CONTRACT_ADDRESS_AMOY }}" >> resolvers.settings.yaml + echo -e " networkURL: ${{ secrets.POLYGON_AMOY_NODE_URL }}" >> resolvers.settings.yaml echo -e " mumbai:" >> resolvers.settings.yaml - echo -e " contractAddress: ${{ env.ETHEREUM_CONTRACT_ADDRESS }}" >> resolvers.settings.yaml - echo -e " networkURL: ${{ secrets.POLYGON_NODE_URL }}" >> resolvers.settings.yaml + echo -e " contractAddress: ${{ env.STATE_CONTRACT_ADDRESS_MUMBAI }}" >> resolvers.settings.yaml + echo -e " networkURL: ${{ secrets.POLYGON_MUMBAI_NODE_URL }}" >> resolvers.settings.yaml + - name: Docker build driver container uses: docker/build-push-action@v3 diff --git a/.github/workflows/push-container.yaml b/.github/workflows/push-container.yaml index 9975a0e..4369da5 100644 --- a/.github/workflows/push-container.yaml +++ b/.github/workflows/push-container.yaml @@ -5,8 +5,9 @@ on: jobs: build_driver: env: - ETHEREUM_CONTRACT_ADDRESS: "0x134B1BE34911E39A8397ec6289782989729807a4" - ETHEREUM_CONTRACT_MAINNET_ADDRESS: "0x624ce98D2d27b20b8f8d521723Df8fC4db71D79D" + STATE_CONTRACT_ADDRESS_MUMBAI: "0x134B1BE34911E39A8397ec6289782989729807a4" + STATE_CONTRACT_ADDRESS_MAIN: "0x624ce98D2d27b20b8f8d521723Df8fC4db71D79D" + STATE_CONTRACT_ADDRESS_AMOY: "0x1a4cC30f2aA0377b0c3bc9848766D90cb4404124" runs-on: ubuntu-latest steps: - name: Checkout driver-did-polygonid @@ -24,12 +25,15 @@ jobs: run: | cd driver-did-polygonid echo -e "polygon:" > resolvers.settings.yaml + echo -e " amoy:" >> resolvers.settings.yaml + echo -e " contractAddress: ${{ env.STATE_CONTRACT_ADDRESS_AMOY }}" >> resolvers.settings.yaml + echo -e " networkURL: ${{ secrets.POLYGON_AMOY_NODE_URL }}" >> resolvers.settings.yaml echo -e " mumbai:" >> resolvers.settings.yaml - echo -e " contractAddress: ${{ env.ETHEREUM_CONTRACT_ADDRESS }}" >> resolvers.settings.yaml - echo -e " networkURL: ${{ secrets.POLYGON_NODE_URL }}" >> resolvers.settings.yaml + echo -e " contractAddress: ${{ env.STATE_CONTRACT_ADDRESS_MUMBAI }}" >> resolvers.settings.yaml + echo -e " networkURL: ${{ secrets.POLYGON_MUMBAI_NODE_URL }}" >> resolvers.settings.yaml echo -e " main:" >> resolvers.settings.yaml - echo -e " contractAddress: ${{ env.ETHEREUM_CONTRACT_MAINNET_ADDRESS }}" >> resolvers.settings.yaml - echo -e " networkURL: ${{ secrets.POLYGON_MAINET_NODE_URL }}" >> resolvers.settings.yaml + echo -e " contractAddress: ${{ env.STATE_CONTRACT_ADDRESS_MAIN }}" >> resolvers.settings.yaml + echo -e " networkURL: ${{ secrets.POLYGON_MAIN_NODE_URL }}" >> resolvers.settings.yaml - name: Set up Docker Buildx id: buildx diff --git a/tests/e2e/http_nameservice.postman_collection.json b/tests/e2e/http_nameservice.postman_collection.json index bfe929d..3657ba5 100644 --- a/tests/e2e/http_nameservice.postman_collection.json +++ b/tests/e2e/http_nameservice.postman_collection.json @@ -1,6 +1,6 @@ { "info": { - "_postman_id": "a6413be8-0479-433c-800a-d2319abbd6c0", + "_postman_id": "24ebeb02-2f47-46f6-8baa-2e1bf32b7b7f", "name": "Nameservice e2e", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, @@ -36,7 +36,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"did_metadata\":{\n \"method\": \"polygonid\",\n \"blockchain\":\"polygon\",\n \"network\": \"mumbai\"\n }\n}", + "raw": "{\n \"did_metadata\":{\n \"method\": \"polygonid\",\n \"blockchain\":\"polygon\",\n \"network\": \"amoy\"\n }\n}", "options": { "raw": { "language": "json" @@ -87,7 +87,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"did_metadata\":{\n \"method\": \"polygonid\",\n \"blockchain\":\"polygon\",\n \"network\": \"mumbai\"\n }\n}", + "raw": "{\n \"did_metadata\":{\n \"method\": \"polygonid\",\n \"blockchain\":\"polygon\",\n \"network\": \"amoy\"\n }\n}", "options": { "raw": { "language": "json"