Skip to content

Commit

Permalink
Merge branch 'staging' into ingress_update
Browse files Browse the repository at this point in the history
Signed-off-by: Sonmezturk <[email protected]>
  • Loading branch information
Sonmezturk authored Aug 2, 2023
2 parents 68aa687 + 02cd845 commit 18d129f
Show file tree
Hide file tree
Showing 31 changed files with 4,439 additions and 124 deletions.
1 change: 1 addition & 0 deletions .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ STACKS_NODE_URL=https://stacks-node-api.mainnet.stacks.co
TEZOS_NODE_URL=https://rpc.tzstats.com
CRONOS_NODE_URL=https://cronos.blockpi.network/v1/rpc/public
ARBITRUM_NODE_URL=https://arb-mainnet-public.unifra.io
ZKSYNC-ERA_NODE_URL=https://mainnet.era.zksync.io
##======================== LOGSTASH ========================
LOGSTASH_PORT=
LOGSTASH_HOST=
Expand Down
102 changes: 51 additions & 51 deletions .github/workflows/build-push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,62 +26,62 @@ jobs:
runs-on: dappradar-runner

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: ${{ env.AWS_DEFAULT_REGION }}
role-to-assume: ${{ env.AWS_IAM_ROLE_GITHUB }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: ${{ env.AWS_DEFAULT_REGION }}
role-to-assume: ${{ env.AWS_IAM_ROLE_GITHUB }}

- name: Authenticate to Amazon ECR
uses: aws-actions/amazon-ecr-login@v1
- name: Authenticate to Amazon ECR
uses: aws-actions/amazon-ecr-login@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver: docker
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver: docker

- name: Build Docker image
uses: docker/build-push-action@v4
with:
context: .
tags: "${{ env.ECR_REPOSITORY_URL_APP }}:${{ env.IMAGE_TAG }}"
push: false
- name: Build Docker image
uses: docker/build-push-action@v4
with:
context: .
tags: "${{ env.ECR_REPOSITORY_URL_APP }}:${{ env.IMAGE_TAG }}"
push: false

- name: Scan image - High and Critical Severity
uses: aquasecurity/trivy-action@master
with:
image-ref: "${{ env.ECR_REPOSITORY_URL_APP }}:${{ env.IMAGE_TAG }}"
format: sarif
output: trivy-results.sarif
hide-progress: false
exit-code: 1
- name: Scan image - High and Critical Severity
uses: aquasecurity/trivy-action@master
with:
image-ref: "${{ env.ECR_REPOSITORY_URL_APP }}:${{ env.IMAGE_TAG }}"
format: sarif
output: trivy-results.sarif
hide-progress: false
exit-code: 1

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
if: always()
with:
sarif_file: trivy-results.sarif
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
if: always()
with:
sarif_file: trivy-results.sarif

- name: Push Docker image
uses: docker/build-push-action@v4
with:
context: .
tags: "${{ env.ECR_REPOSITORY_URL_APP }}:${{ env.IMAGE_TAG }}"
push: true
- name: Push Docker image
uses: docker/build-push-action@v4
with:
context: .
tags: "${{ env.ECR_REPOSITORY_URL_APP }}:${{ env.IMAGE_TAG }}"
push: true

- name: Bake and push manifests
run: |
kubectl kustomize $MANIFESTS_PATH | \
envsubst '$CONTAINER_IMAGE' | \
flux push artifact oci://$OCI_IMAGE_URL_INFRA -f - \
--source="$(git config --get remote.origin.url)" \
--revision="$(git branch --show-current)@sha1:$(git rev-parse HEAD)" \
--provider=aws && \
flux tag artifact oci://$OCI_IMAGE_URL_INFRA \
--tag $GITHUB_REF_NAME \
--provider aws
env:
OCI_IMAGE_URL_INFRA: "${{ env.ECR_REPOSITORY_URL_INFRA }}:${{ env.IMAGE_TAG }}"
CONTAINER_IMAGE: "${{ env.ECR_REPOSITORY_URL_APP }}:${{ env.IMAGE_TAG }}"
- name: Bake and push manifests
run: |
kubectl kustomize $MANIFESTS_PATH | \
envsubst '$CONTAINER_IMAGE' | \
flux push artifact oci://$OCI_IMAGE_URL_INFRA -f - \
--source="$(git config --get remote.origin.url)" \
--revision="$(git branch --show-current)@sha1:$(git rev-parse HEAD)" \
--provider=aws && \
flux tag artifact oci://$OCI_IMAGE_URL_INFRA \
--tag $GITHUB_REF_NAME \
--provider aws
env:
OCI_IMAGE_URL_INFRA: "${{ env.ECR_REPOSITORY_URL_INFRA }}:${{ env.IMAGE_TAG }}"
CONTAINER_IMAGE: "${{ env.ECR_REPOSITORY_URL_APP }}:${{ env.IMAGE_TAG }}"
2 changes: 1 addition & 1 deletion kubernetes/base/kustomization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ resources:
- service.yml
- ingress.yml
- secrets.yml
# - redis.yml
- redis.yml
2 changes: 1 addition & 1 deletion kubernetes/base/redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: defi-providers-redis
image: redis:7.0.11
image: redis:7
imagePullPolicy: Always
args: ["--requirepass", "$(REDIS_PASS)"]
resources:
Expand Down
62 changes: 22 additions & 40 deletions src/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,6 @@ const {
LOGSTASH_PORT,
LOGSTASH_HOST,
LOGSTASH_INDEX,
OPTIMISM_NODE_URL,
ETHEREUM_NODE_URL,
BSC_NODE_URL,
AURORA_NODE_URL,
AVALANCHE_NODE_URL,
CELO_NODE_URL,
EVERSCALE_NODE_URL,
FANTOM_NODE_URL,
HEDERA_NODE_URL,
MOONBEAM_NODE_URL,
MOONRIVER_NODE_URL,
NEAR_NODE_URL,
POLYGON_NODE_URL,
RONIN_NODE_URL,
SOLANA_NODE_URL,
STACKS_NODE_URL,
TEZOS_NODE_URL,
CRONOS_NODE_URL,
ARBITRUM_NODE_URL,
BASE_URL = './blockchainCache/',
REDIS_URL,
} = process.env;
Expand All @@ -48,26 +29,27 @@ const config = {
REDIS_URL,
};

const nodeUrls = {
OPTIMISM_NODE_URL,
ETHEREUM_NODE_URL,
BSC_NODE_URL,
AURORA_NODE_URL,
AVALANCHE_NODE_URL,
CELO_NODE_URL,
EVERSCALE_NODE_URL,
FANTOM_NODE_URL,
HEDERA_NODE_URL,
MOONBEAM_NODE_URL,
MOONRIVER_NODE_URL,
NEAR_NODE_URL,
POLYGON_NODE_URL,
RONIN_NODE_URL,
SOLANA_NODE_URL,
STACKS_NODE_URL,
TEZOS_NODE_URL,
CRONOS_NODE_URL,
ARBITRUM_NODE_URL,
};
const nodeUrls: { [key: string]: string } = {};

nodeUrls['OPTIMISM_NODE_URL'] = process.env['OPTIMISM_NODE_URL'];
nodeUrls['ETHEREUM_NODE_URL'] = process.env['ETHEREUM_NODE_URL'];
nodeUrls['BSC_NODE_URL'] = process.env['BSC_NODE_URL'];
nodeUrls['AURORA_NODE_URL'] = process.env['AURORA_NODE_URL'];
nodeUrls['AVALANCHE_NODE_URL'] = process.env['AVALANCHE_NODE_URL'];
nodeUrls['CELO_NODE_URL'] = process.env['CELO_NODE_URL'];
nodeUrls['EVERSCALE_NODE_URL'] = process.env['EVERSCALE_NODE_URL'];
nodeUrls['FANTOM_NODE_URL'] = process.env['FANTOM_NODE_URL'];
nodeUrls['HEDERA_NODE_URL'] = process.env['HEDERA_NODE_URL'];
nodeUrls['MOONBEAM_NODE_URL'] = process.env['MOONBEAM_NODE_URL'];
nodeUrls['MOONRIVER_NODE_URL'] = process.env['MOONRIVER_NODE_URL'];
nodeUrls['NEAR_NODE_URL'] = process.env['NEAR_NODE_URL'];
nodeUrls['POLYGON_NODE_URL'] = process.env['POLYGON_NODE_URL'];
nodeUrls['RONIN_NODE_URL'] = process.env['RONIN_NODE_URL'];
nodeUrls['SOLANA_NODE_URL'] = process.env['SOLANA_NODE_URL'];
nodeUrls['STACKS_NODE_URL'] = process.env['STACKS_NODE_URL'];
nodeUrls['TEZOS_NODE_URL'] = process.env['TEZOS_NODE_URL'];
nodeUrls['CRONOS_NODE_URL'] = process.env['CRONOS_NODE_URL'];
nodeUrls['ARBITRUM_NODE_URL'] = process.env['ARBITRUM_NODE_URL'];
nodeUrls['ZKSYNC-ERA_NODE_URL'] = process.env['ZKSYNC-ERA_NODE_URL'];

export { config, nodeUrls };
33 changes: 22 additions & 11 deletions src/constants/contracts.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"optimism": "0x4200000000000000000000000000000000000006",
"polygon": "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
"cronos": "0x5C7F8A570d578ED84E63fdFA7b1eE72dEae1AE23",
"arbitrum": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1"
"arbitrum": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1",
"zksync-era": "0x5aea5775959fbc2557cc8789bc1bf90a239d9a91"
},
"BULK_BALANCE_ADDRESSES": {
"ethereum": "0xb173393e08496209ad1cd9d57c769de76bdcea5a",
Expand All @@ -25,7 +26,8 @@
"optimism": "0x63aCCa16a1fcfD406d3EA8Ec5137884861863828",
"polygon": "0xb81bB004BD9ccc0EEd7a1A60D3D8eD8DC52D11d8",
"cronos": "0x63aCCa16a1fcfD406d3EA8Ec5137884861863828",
"arbitrum": "0x63acca16a1fcfd406d3ea8ec5137884861863828"
"arbitrum": "0x63acca16a1fcfd406d3ea8ec5137884861863828",
"zksync-era": "0x19b86d343394427ccc6c82c921b68305feaee833"
},
"BULK_BALANCE_DEPOLYED": {
"ethereum": 11439603,
Expand All @@ -39,7 +41,8 @@
"optimism": 20246974,
"polygon": 16836227,
"cronos": 7617073,
"arbitrum": 86897490
"arbitrum": 86897490,
"zksync-era": 6397812
},
"BULK_RESERVES_ADDRESSES": {
"ethereum": "0x4261b012f3d0d752ee9d738a4664df7117a148ab",
Expand All @@ -53,7 +56,8 @@
"optimism": "0x47012c5a5A20893f342d279DdC6Fd0847f196898",
"polygon": "0x92E144b73abb3b1aA4BEA18d4dbc142F95a3E56a",
"cronos": "0xBb90C1A84F51d57c2046741B15156810D20f3592",
"arbitrum": "0xbb90c1a84f51d57c2046741b15156810d20f3592"
"arbitrum": "0xbb90c1a84f51d57c2046741b15156810d20f3592",
"zksync-era": "0xe7b54a13e456532675b4edc360a1c2818ef9f707"
},
"BULK_RESERVES_DEPOLYED": {
"ethereum": 11438212,
Expand All @@ -67,7 +71,8 @@
"optimism": 20249129,
"polygon": 15823447,
"cronos": 7617098,
"arbitrum": 86898048
"arbitrum": 86898048,
"zksync-era": 6398730
},
"MULTIBALANCES_ADDRESSES": {
"ethereum": "0x09b6fd79f8c6bdaba4d94731f0fc90edd15742af",
Expand All @@ -81,7 +86,8 @@
"optimism": "0x5a3CF2C199bBB28cD0A2f380d1f96B8d73D74B78",
"polygon": "0x3e9E7c58dc5f5b25DA878790bed0E17Ea4290278",
"cronos": "0x5a3CF2C199bBB28cD0A2f380d1f96B8d73D74B78",
"arbitrum": "0x47012c5a5a20893f342d279ddc6fd0847f196898"
"arbitrum": "0x47012c5a5a20893f342d279ddc6fd0847f196898",
"zksync-era": "0x7d1f4f2bc62bd7e7d1208ae4d8f3ad1b35467244"
},
"MULTIBALANCES_DEPOLYED": {
"ethereum": 11606340,
Expand All @@ -95,7 +101,8 @@
"optimism": 20250087,
"polygon": 16354960,
"cronos": 7617273,
"arbitrum": 86899235
"arbitrum": 86899235,
"zksync-era": 6399985
},
"BULK_METADATA_ADDRESSES": {
"ethereum": "0x570B73444cC1077398f83777f34Bd672a50235cD",
Expand All @@ -109,7 +116,8 @@
"optimism": "0x7d9965AeE6b51C944b20beb8954Fe5018781fb19",
"polygon": "0x06A9b1F8f87968137D57D53eA40fF1Bfa7Be6dcA",
"cronos": "0x7d9965AeE6b51C944b20beb8954Fe5018781fb19",
"arbitrum": "0x7d9965aee6b51c944b20beb8954fe5018781fb19"
"arbitrum": "0x7d9965aee6b51c944b20beb8954fe5018781fb19",
"zksync-era": "0x9ccc6685b99cc682e432441f704775550d8c5664"
},
"BULK_METADATA_DEPOLYED": {
"ethereum": 12825801,
Expand All @@ -123,7 +131,8 @@
"optimism": 20249542,
"polygon": 16851733,
"cronos": 7617255,
"arbitrum": 86899489
"arbitrum": 86899489,
"zksync-era": 6399344
},
"MULTICALL_ADDRESSES": {
"ethereum": "0x092C637b120Ad6C5DF6CFc2b2A9b284ed2E5b11F",
Expand All @@ -137,7 +146,8 @@
"optimism": "0xD3C43fb98512E5965034087b891F4460223F8940",
"polygon": "0x5b0a546efac0ce2914f3ce163b6379bceef9b50a",
"cronos": "0xD3C43fb98512E5965034087b891F4460223F8940",
"arbitrum": "0x5a3cf2c199bbb28cd0a2f380d1f96b8d73d74b78"
"arbitrum": "0x5a3cf2c199bbb28cd0a2f380d1f96b8d73d74b78",
"zksync-era": "0x9ce596f561ca117591bfb0f6f9a20f721290976b"
},
"MULTICALL_DEPOLYED": {
"ethereum": 12949381,
Expand All @@ -151,6 +161,7 @@
"optimism": 20250330,
"polygon": 17554810,
"cronos": 7617284,
"arbitrum": 86899646
"arbitrum": 86899646,
"zksync-era": 6400154
}
}
Loading

0 comments on commit 18d129f

Please sign in to comment.