Skip to content

Commit

Permalink
feat: add acala evm transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
qwer951123 committed Oct 15, 2024
1 parent df8d921 commit 8b07cfc
Show file tree
Hide file tree
Showing 56 changed files with 13,904 additions and 84 deletions.
Empty file removed .123trigger
Empty file.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

5 changes: 0 additions & 5 deletions .eslintrc.json

This file was deleted.

2 changes: 0 additions & 2 deletions .prettierignore

This file was deleted.

7 changes: 0 additions & 7 deletions .prettierrc.json

This file was deleted.

15 changes: 0 additions & 15 deletions .yarnrc.yml

This file was deleted.

18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,21 @@ a collection of acala/karura sub-query services.
| ---------- | ----------------------------------------------------------------------------- |
| balances | DustLost、Transfer、Reserved、Unreserved、ReserveRepatriated、Deposit、Withdraw |
| tokens | Transfer、 Reserved、 Unreserved、ReserveRepatriated、Deposited、Withdrawn、Slashed |

## 6. EVM Transfer

- 6.1 Github page: https://github.com/AcalaNetwork/acala-subql-services/tree/master/packages/evm-transfer-subql

- 6.2 Graphql workground:

| Chain | Link |
| ------ | -------------------------------------------------- |
| Acala | https://api.polkawallet.io/acala-evm-transfer-subql |
| Karura | https://api.polkawallet.io/karura-evm-transfer-subql |

- 6.3 includes:

| Extrinsic | events |
| ---------- | ----------------------------------------------------------------------------- |
| evm | Transfer |
| evm | Approve |
34 changes: 0 additions & 34 deletions _package.json

This file was deleted.

1 change: 0 additions & 1 deletion babel.config.js

This file was deleted.

6 changes: 0 additions & 6 deletions init.sh

This file was deleted.

11 changes: 0 additions & 11 deletions jest.config.js

This file was deleted.

2 changes: 2 additions & 0 deletions packages/acala-evm-transfer/.env.develop
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ENDPOINT=https://eth-rpc-acala.aca-api.network
CHAIN_ID=787
33 changes: 33 additions & 0 deletions packages/acala-evm-transfer/.github/workflows/cli-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "CLI deploy"

on:
workflow_dispatch:
inputs:
projectName:
description: "Project name"
required: true
type: string
jobs:
deploy:
name: CLI Deploy
runs-on: ubuntu-latest
environment:
name: DEPLOYMENT
env:
SUBQL_ACCESS_TOKEN: ${{ secrets.SUBQL_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 16
- run: yarn
- name: Codegen
run: yarn codegen
- name: Version
run: npx subql --version
- name: repo
run: echo ${{github.repository}}
- name: Publish and Deploy
run: |
sh .github/workflows/scripts/publish-deploy.sh -o ${{github.repository}} -p ${{github.event.inputs.projectName}}
24 changes: 24 additions & 0 deletions packages/acala-evm-transfer/.github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: PR
on:
pull_request:
paths-ignore:
- ".github/workflows/**"
jobs:
pr:
name: pr
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 16
- run: yarn
- name: Codegen
run: yarn codegen
- name: Build
run: yarn build
- name: Install subql-node-ethereum
run: yarn global add @subql/node-ethereum
- name: Run tests with Subquery Node
run: subql-node-ethereum test -f ${{ github.workspace }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

while getopts p:o: flag
do
case "${flag}" in
p) PROJECTNAME=${OPTARG};;
o) ORG=${OPTARG};;
*) echo "Usage: $0 [-p projectname] [-o org]" && exit 1;;
esac
done

IPFSCID=$(npx subql publish -o -f .)

npx subql deployment:deploy -d --ipfsCID="$IPFSCID" --projectName="${PROJECTNAME}" --org="${ORG%/*}"
64 changes: 64 additions & 0 deletions packages/acala-evm-transfer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# These are some examples of commonly ignored file patterns.
# You should customize this list as applicable to your project.
# Learn more about .gitignore:
# https://www.atlassian.com/git/tutorials/saving-changes/gitignore

# Node artifact files
node_modules/
dist/

# lock files
yarn.lock
package-lock.json

# Compiled Java class files
*.class

# Compiled Python bytecode
*.py[cod]

# Log files
*.log

# Package files
*.jar

# Generated files
target/
dist/
src/types
project.yaml

# JetBrains IDE
.idea/

# Unit test reports
TEST*.xml

# Generated by MacOS
.DS_Store

# Generated by Windows
Thumbs.db

# Applications
*.app
*.exe
*.war

# Large media files
*.mp4
*.tiff
*.avi
*.flv
*.mov
*.wmv

.data
.yarn

.DS_Store

# ENV local files
.env.local
.env.develop.local
21 changes: 21 additions & 0 deletions packages/acala-evm-transfer/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT LICENSE

Copyright 2020-2024 SubQuery Pte Ltd authors & contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
7 changes: 7 additions & 0 deletions packages/acala-evm-transfer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Acala EVM Transfer

| Supported | Entity | Description |
| --------- | -------- | -------- |
|| Transfer | Record the transfer history of a token. |
|| Approve | Record the approve history of a token. |
|| TransferEvent | Record all transfer events of a token. |
Loading

0 comments on commit 8b07cfc

Please sign in to comment.