Skip to content

Commit

Permalink
support amoy network; refactor envs
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-korotya committed Apr 9, 2024
1 parent 7c86218 commit 9cb0793
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/push-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/http_nameservice.postman_collection.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 9cb0793

Please sign in to comment.