-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: read erc20 token contract (#79)
* chore: sync * chore: wip * refactor: yarn to npm * chore: wip * chore: read symbol * chore: read symbol * chore: read symbol * chore: read symbol * chore: rpc mapping * chore: wip * chore: try matic * chore: try matic * chore: try matic * chore: sync matic * Update readSymbolAndNameFromContract.ts * chore: sync other chain * chore: done * chore: read decimal also * chore: sync each time * chore: sync * chore: update package version * chore: done
- Loading branch information
1 parent
3dd1c41
commit c07d190
Showing
14 changed files
with
14,062 additions
and
3,063 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
name: Read contract | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'sync-token-list-from-contract' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
read-contract: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use node_modules cache | ||
uses: actions/cache@v2 | ||
id: npm-cache | ||
with: | ||
path: | | ||
node_modules | ||
key: npm-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: npm install | ||
run: npm install | ||
if: steps.npm-cache.outputs.cache-hit != 'true' | ||
|
||
- name: Sync ETH Token List | ||
id: sync-token-list-eth | ||
run: | | ||
node node_modules/puppeteer/install.js && npm run cli read-contract -- --include=1 && npm run lint-fix | ||
- name: Sync BSC Token List | ||
id: sync-token-list-bsc | ||
run: | | ||
node node_modules/puppeteer/install.js && npm run cli read-contract -- --include=56 && npm run lint-fix | ||
- name: Sync Polygon Token List | ||
id: sync-token-list-polygon | ||
run: | | ||
node node_modules/puppeteer/install.js && npm run cli read-contract -- --include=137 && npm run lint-fix | ||
- name: Sync OP Token List | ||
id: sync-token-list-op | ||
run: | | ||
node node_modules/puppeteer/install.js && npm run cli read-contract -- --include=10 && npm run lint-fix | ||
- name: Sync Aurora Token List | ||
id: sync-token-list-aurora | ||
run: | | ||
node node_modules/puppeteer/install.js && npm run cli read-contract -- --include=1313161554 && npm run lint-fix | ||
- name: Sync Gnosis Token List | ||
id: sync-token-list-gnosis | ||
run: | | ||
node node_modules/puppeteer/install.js && npm run cli read-contract -- --include=100 && npm run lint-fix | ||
- name: Sync Fantom Token List | ||
id: sync-token-list-fantom | ||
run: | | ||
node node_modules/puppeteer/install.js && npm run cli read-contract -- --include=250 && npm run lint-fix | ||
- name: Sync Avalanche Token List | ||
id: sync-token-list-avalanche | ||
run: | | ||
node node_modules/puppeteer/install.js && npm run cli read-contract -- --include=43114 && npm run lint-fix | ||
- name: Sync Arbitrum Token List | ||
id: sync-token-list-arbitrum | ||
run: | | ||
node node_modules/puppeteer/install.js && npm run cli read-contract -- --include=42161 && npm run lint-fix | ||
- name: Prettier Check | ||
run: npm run prettier | ||
|
||
- name: Get Package Version | ||
id: package-version | ||
uses: martinbeentjes/npm-get-version-action@master | ||
|
||
- name: Tag Package Version | ||
run: git tag v${{ steps.package-version.outputs.current-version }} | ||
|
||
- name: Create Release Package | ||
uses: montudor/action-zip@v1 | ||
with: | ||
args: | ||
zip -qq -r v${{ steps.package-version.outputs.current-version }}.zip dist/v${{ | ||
steps.package-version.outputs.current-version }} | ||
|
||
- name: Upload Latest Release | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: v${{ steps.package-version.outputs.current-version }}.zip | ||
path: v${{ steps.package-version.outputs.current-version }}.zip | ||
|
||
- name: Upload binaries to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: v${{ steps.package-version.outputs.current-version }}.zip | ||
asset_name: v${{ steps.package-version.outputs.current-version }}.zip | ||
tag: v${{ steps.package-version.outputs.current-version }} | ||
overwrite: true | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./dist | ||
keep_files: true | ||
cname: tokens.r2d2.to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.