Skip to content

Commit fc270fb

Browse files
committed
chore: squashed entire repo history into one commit
1 parent 9b25f75 commit fc270fb

File tree

730 files changed

+2032321
-47
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

730 files changed

+2032321
-47
lines changed

.github/workflows/deploy.yaml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Injective list - Deploy UI
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
deploy:
8+
# if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.commits[0].message, 'generate json files') && !contains(github.event.commits[0].message, 'skip deploy') }}
9+
name: "Trigger deployments"
10+
runs-on: blacksmith-8vcpu-ubuntu-2204
11+
permissions: write-all
12+
env:
13+
## Github Actions
14+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
15+
SKIP_DEPLOYMENTS: ${{ secrets.SKIP_DEPLOYMENTS }}
16+
17+
steps:
18+
- name: Sleep for 60s
19+
if: ${{ env.SKIP_DEPLOYMENTS != 'true' }}
20+
uses: juliangruber/[email protected]
21+
with:
22+
time: 60s
23+
24+
- name: Deploy mito
25+
if: ${{ env.SKIP_DEPLOYMENTS != 'true' }}
26+
uses: benc-uk/[email protected]
27+
with:
28+
workflow: mainnet.yml
29+
ref: master
30+
repo: mitoFinance/mito-ui
31+
token: "${{ secrets.GH_TOKEN }}"
32+
33+
- name: Deploy bridge (mainnet)
34+
if: ${{ env.SKIP_DEPLOYMENTS != 'true' }}
35+
uses: benc-uk/[email protected]
36+
with:
37+
workflow: mainnet.yml
38+
ref: master
39+
repo: injectiveLabs/injective-bridge
40+
token: "${{ secrets.GH_TOKEN }}"
41+
42+
- name: Rebuild helix
43+
if: ${{ env.SKIP_DEPLOYMENTS != 'true' }}
44+
uses: benc-uk/[email protected]
45+
with:
46+
workflow: mainnet.yml
47+
ref: master
48+
repo: injectiveLabs/injective-helix
49+
token: "${{ secrets.GH_TOKEN }}"
50+
51+
- name: Deploy explorer
52+
if: ${{ env.SKIP_DEPLOYMENTS != 'true' }}
53+
uses: benc-uk/[email protected]
54+
with:
55+
workflow: mainnet.yaml
56+
ref: master
57+
repo: injectiveLabs/injective-explorer
58+
token: "${{ secrets.GH_TOKEN }}"
59+
60+
- name: Rebuild Hub
61+
if: ${{ env.SKIP_DEPLOYMENTS != 'true' }}
62+
uses: benc-uk/[email protected]
63+
with:
64+
workflow: mainnet.yml
65+
ref: master
66+
repo: injectiveLabs/injective-hub
67+
token: "${{ secrets.GH_TOKEN }}"
68+
69+
- name: Deploy OLP (mainnet)
70+
if: ${{ env.SKIP_DEPLOYMENTS != 'true' }}
71+
uses: benc-uk/[email protected]
72+
with:
73+
workflow: mainnet.yml
74+
ref: master
75+
repo: injectiveLabs/injective-dmm-v2
76+
token: "${{ secrets.GH_TOKEN }}"
77+
78+
- name: Deploy Admin UI (mainnet)
79+
if: ${{ env.SKIP_DEPLOYMENTS != 'true' }}
80+
uses: benc-uk/[email protected]
81+
with:
82+
workflow: mainnet.yml
83+
ref: master
84+
repo: injectiveLabs/injective-admin-ui
85+
token: "${{ secrets.GH_TOKEN }}"

.github/workflows/master.yaml

Lines changed: 238 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,238 @@
1+
name: Injective list - Generate data
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "*/15 * * * *"
7+
push:
8+
branches:
9+
- master
10+
11+
jobs:
12+
generate:
13+
if: ${{ !contains(github.event.commits[0].message, 'generate json files') }}
14+
name: "Regenerate JSON files"
15+
runs-on: blacksmith-8vcpu-ubuntu-2204
16+
permissions: write-all
17+
env:
18+
## Github Actions
19+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
20+
CLOUD_FLARE_API_KEY: ${{ secrets.CLOUD_FLARE_API_KEY }}
21+
CLOUD_FLARE_ACCOUNT_ID: ${{ secrets.CLOUD_FLARE_ACCOUNT_ID }}
22+
CLOUD_FLARE_ACCOUNT_HASH: ${{ secrets.CLOUD_FLARE_ACCOUNT_HASH }}
23+
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }}
24+
ALCHEMY_GOERLI_KEY: ${{ secrets.ALCHEMY_GOERLI_KEY }}
25+
ALCHEMY_SEPOLIA_KEY: ${{ secrets.ALCHEMY_SEPOLIA_KEY }}
26+
MAINNET_FEE_PAYER: ${{ secrets.MAINNET_FEE_PAYER }}
27+
TESTNET_FEE_PAYER: ${{ secrets.TESTNET_FEE_PAYER }}
28+
DEVNET_FEE_PAYER: ${{ secrets.DEVNET_FEE_PAYER }}
29+
30+
steps:
31+
- uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 1
34+
token: "${{ secrets.GH_TOKEN }}"
35+
- run: |
36+
git reset --hard origin/master
37+
38+
- name: Install dependencies
39+
run: cd src && yarn
40+
41+
- name: Generate tokens
42+
uses: borales/actions-yarn@v4
43+
with:
44+
cmd: generate:tokens
45+
dir: "src"
46+
47+
- name: Generate validators
48+
uses: borales/actions-yarn@v4
49+
with:
50+
cmd: generate:validators
51+
dir: "src"
52+
53+
- name: Generate market slugs
54+
uses: borales/actions-yarn@v4
55+
with:
56+
cmd: generate:slugs
57+
dir: "src"
58+
59+
- name: Generate wasm messages
60+
uses: borales/actions-yarn@v4
61+
with:
62+
cmd: generate:wasm
63+
dir: "src"
64+
65+
- name: Generate verified denoms
66+
uses: borales/actions-yarn@v4
67+
with:
68+
cmd: generate:verifiedDenoms
69+
dir: "src"
70+
71+
- name: Generate restriction list
72+
uses: borales/actions-yarn@v4
73+
with:
74+
cmd: generate:restriction
75+
dir: "src"
76+
77+
- name: Generate swap routes
78+
uses: borales/actions-yarn@v4
79+
with:
80+
cmd: generate:swap:routes
81+
dir: "src"
82+
83+
- name: Generate configs
84+
uses: borales/actions-yarn@v4
85+
with:
86+
cmd: generate:configs
87+
dir: "src"
88+
89+
- name: Commit generated files
90+
run: |
91+
[ -z "$(git config user.name)" ] && git config --global user.name "GitHub Actions"
92+
[ -z "$(git config user.email)" ] && git config --global user.email "[email protected]"
93+
94+
git add .
95+
96+
# Check if there are any changes to commit
97+
if [ -z "$(git status --porcelain)" ]; then
98+
echo "No changes to commit"
99+
exit 0
100+
fi
101+
102+
if [[ "${{ contains(github.event.commits[0].message, 'skip deploy') }}" == "true" || "${{ github.event_name != 'push' }}" == "true" ]]; then
103+
git commit -m "chore: generate json files - skip deploy" --no-verify
104+
else
105+
git commit -m "chore: generate json files" --no-verify
106+
fi
107+
108+
git push origin HEAD:master
109+
env:
110+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
111+
112+
# - name: Commit changes
113+
# uses: EndBug/add-and-commit@v9
114+
# if: ${{ github.event_name == 'push' && !contains(github.event.commits[0].message, 'skip deploy') }}
115+
# with:
116+
# message: "chore: generate json files"
117+
118+
# - name: Commit changes
119+
# uses: EndBug/add-and-commit@v9
120+
# if: ${{ github.event_name != 'push' || contains(github.event.commits[0].message, 'skip deploy') }}
121+
# with:
122+
# message: "chore: generate json files - skip deploy"
123+
124+
deployAws:
125+
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'push' && !contains(github.event.commits[0].message, 'skip deploy') }}
126+
name: "Deploy AWS"
127+
runs-on: ubuntu-latest
128+
needs: generate
129+
130+
steps:
131+
- name: Sleep for 30s
132+
if: ${{ env.SKIP_DEPLOYMENTS != 'true' }}
133+
uses: juliangruber/[email protected]
134+
with:
135+
time: 30s
136+
# This is here solely for testing and running this action locally with ACT - it shouldn't be needed for running on github as the images in gh actions should already have the AWS CLI installed
137+
- name: Install Act dependencies
138+
if: ${{ env.ACT }}
139+
run: |
140+
apt-get update && apt-get install sudo -y && apt-get install wget -y && apt-get install unzip -y
141+
142+
- name: Install AWS if running locally
143+
if: ${{ env.ACT }}
144+
uses: unfor19/install-aws-cli-action@v1
145+
with:
146+
version: 2 # default
147+
verbose: true # default
148+
arch: amd64 # allowed values: amd64, arm64
149+
150+
- name: Checkout with retry
151+
uses: actions/checkout@v4
152+
with:
153+
ref: ${{ github.ref }}
154+
fetch-depth: 2
155+
token: ${{ secrets.GH_TOKEN }}
156+
157+
- name: Setup AWS CLI
158+
uses: aws-actions/configure-aws-credentials@v4
159+
with:
160+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
161+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
162+
aws-region: us-east-1
163+
164+
- name: Sync files to S3 bucket
165+
run: |
166+
aws s3 sync json s3://injective-lists/json --delete \
167+
--cache-control "public, max-age=31536000, s-maxage=31536000"
168+
169+
- name: Invalidate CloudFront cache
170+
run: |
171+
aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"
172+
173+
- name: Sleep for 60s
174+
if: ${{ env.SKIP_DEPLOYMENTS != 'true' }}
175+
uses: juliangruber/[email protected]
176+
with:
177+
time: 60s
178+
179+
- name: Invalidate CloudFront cache
180+
run: |
181+
aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"
182+
183+
deployAwsStaging:
184+
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'push' && !contains(github.event.commits[0].message, 'skip deploy') }}
185+
name: "Deploy AWS Staging"
186+
runs-on: ubuntu-latest
187+
needs: generate
188+
189+
steps:
190+
- name: Sleep for 30s
191+
uses: juliangruber/[email protected]
192+
with:
193+
time: 30s
194+
195+
- name: Install Act dependencies
196+
if: ${{ env.ACT }}
197+
run: |
198+
apt-get update && apt-get install sudo -y && apt-get install wget -y && apt-get install unzip -y
199+
200+
- name: Install AWS if running locally
201+
if: ${{ env.ACT }}
202+
uses: unfor19/install-aws-cli-action@v1
203+
with:
204+
version: 2 # default
205+
verbose: true # default
206+
arch: amd64 # allowed values: amd64, arm64
207+
208+
- name: Checkout with retry
209+
uses: actions/checkout@v4
210+
with:
211+
ref: ${{ github.ref }}
212+
fetch-depth: 2
213+
token: ${{ secrets.GH_TOKEN }}
214+
215+
- name: Setup AWS CLI
216+
uses: aws-actions/configure-aws-credentials@v4
217+
with:
218+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
219+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
220+
aws-region: us-east-2
221+
222+
- name: Sync files to S3 bucket
223+
run: |
224+
aws s3 sync json s3://injective-lists/json --delete \
225+
--cache-control "public, max-age=31536000, s-maxage=31536000"
226+
227+
- name: Invalidate CloudFront cache
228+
run: |
229+
aws cloudfront create-invalidation --distribution-id ${{ secrets.STAGING_CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"
230+
231+
- name: Sleep for 60s
232+
uses: juliangruber/[email protected]
233+
with:
234+
time: 60s
235+
236+
- name: Invalidate CloudFront cache
237+
run: |
238+
aws cloudfront create-invalidation --distribution-id ${{ secrets.STAGING_CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"

.github/workflows/ofac.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Injective list - Fetch OFAC wallets
2+
3+
on:
4+
schedule:
5+
- cron: "40 2 * * *" # Every day at 02:30 PM
6+
7+
jobs:
8+
generate:
9+
name: "Refetch OFAC wallets"
10+
runs-on: blacksmith-8vcpu-ubuntu-2204
11+
permissions: write-all
12+
env:
13+
## Github Actions
14+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
15+
CLOUD_FLARE_API_KEY: ${{ secrets.CLOUD_FLARE_API_KEY }}
16+
CLOUD_FLARE_ACCOUNT_ID: ${{ secrets.CLOUD_FLARE_ACCOUNT_ID }}
17+
CLOUD_FLARE_ACCOUNT_HASH: ${{ secrets.CLOUD_FLARE_ACCOUNT_HASH }}
18+
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }}
19+
ALCHEMY_GOERLI_KEY: ${{ secrets.ALCHEMY_GOERLI_KEY }}
20+
ALCHEMY_SEPOLIA_KEY: ${{ secrets.ALCHEMY_SEPOLIA_KEY }}
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
token: "${{ secrets.GH_TOKEN }}"
26+
- run: |
27+
git reset --hard origin/master
28+
29+
- name: Install dependencies
30+
run: cd src && yarn
31+
32+
- name: Refetch OFAC lists
33+
uses: borales/actions-yarn@v4
34+
with:
35+
cmd: fetch:wallets:ofac
36+
dir: "src"
37+
38+
- name: Commit changes
39+
uses: EndBug/add-and-commit@v9
40+
with:
41+
message: "chore: fetch ofac addresses"

0 commit comments

Comments
 (0)