Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
r4881t authored Feb 27, 2024
2 parents 0cccc7b + 71c677a commit 72b400e
Show file tree
Hide file tree
Showing 11 changed files with 1,111 additions and 63 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/addWhitelistedRetoolDapps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Whitelist Retool Dapps

on:
schedule:
- cron: '0 1,13 * * *'

jobs:
run-script:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 18.12.0

- name: Install dependencies with yarn
run: yarn install

- name: Set environment variables from secrets
run: |
touch .env
echo GOOGLE_CLIENT_EMAIL=${{ secrets.GOOGLE_CLIENT_EMAIL }} >> .env
echo RETOOL_DAPPS_SHEET_ID=${{ secrets.RETOOL_DAPPS_SHEET_ID }} >> .env
echo GOOGLE_PRIVATE_KEY=${{ secrets.GOOGLE_PRIVATE_KEY }} >> .env
cat .env
working-directory: ./scripts

- name: Run the script with environment variable
run: node whitelistDapps.js
working-directory: ./scripts

- name: Check for changes in reservedDappsName.json
run: |
git diff --quiet || {
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub Actions"
git add reservedDappNames.json
git commit -m "Update reservedDappNames.json"
git push origin HEAD
}
working-directory: ./scripts
47 changes: 47 additions & 0 deletions .github/workflows/whitelist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Call Function on App Name Change

on:
push:
paths:
- 'scripts/reservedAppStoreNames.json'
- 'scripts/reservedDappNames.json'
- 'scripts/reservedDevNames.json'

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]

steps:
- name: Check out code
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci

- run: npm run build --if-present
env:
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
POLYGONSCAN_API_KEY: ${{ secrets.POLYGONSCAN_API_KEY }}
COINMARKETCAP_API_KEY: ${{ secrets.COINMARKETCAP_API_KEY }}
TRUSTED_FORWARDER_ADDRESS: ${{ vars.TRUSTED_FORWARDER_ADDRESS }}
TRUSTED_FORWARDER_ADDRESS_POLYGON_MAINNET: ${{ vars.TRUSTED_FORWARDER_ADDRESS_POLYGON_MAINNET }}

- name: Process Newly Added Names
run: npm run whitelist polygon
env:
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
POLYGONSCAN_API_KEY: ${{ secrets.POLYGONSCAN_API_KEY }}
COINMARKETCAP_API_KEY: ${{ secrets.COINMARKETCAP_API_KEY }}
TRUSTED_FORWARDER_ADDRESS: ${{ vars.TRUSTED_FORWARDER_ADDRESS }}
TRUSTED_FORWARDER_ADDRESS_POLYGON_MAINNET: ${{ vars.TRUSTED_FORWARDER_ADDRESS_POLYGON_MAINNET }}

2 changes: 1 addition & 1 deletion hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module.exports = {
live: true,
saveDeployments: true,
tags: ["staging"],
gasPrice: 30000000000,
gasPrice: 3000000000,
gasMultiplier: 2,
timeout: 100000
},
Expand Down
Loading

0 comments on commit 72b400e

Please sign in to comment.