-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (56 loc) · 1.85 KB
/
abi-gen.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Generate ABIs
on:
pull_request:
branches: [ main ]
jobs:
gen-abi:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Setup Go
uses: actions/setup-go@v4
- name: Install Truffle globally
run: npm install -g truffle sol-merger
- name: Install abigen
run: |
go install github.com/ethereum/go-ethereum/cmd/abigen@latest
- name: Write secret.json file
env:
MNEMONIC: ${{ secrets.MNEMONIC }}
MAINNET_ENDPOINT: ${{ secrets.MAINNET_ENDPOINT }}
GOERLI_ENDPOINT: ${{ secrets.GOERLI_ENDPOINT }}
BSCTEST_ENDPOINT: ${{ secrets.BSCTEST_ENDPOINT }}
BSC_ENDPOINT: ${{ secrets.BSC_ENDPOINT }}
ETHERSCAN_API: ${{ secrets.ETHERSCAN_API }}
BSC_API: ${{ secrets.BSC_API }}
run: |
cat <<EOF > .secret.json
{
"mnemonic": "${MNEMONIC}",
"mainnet_endpoint": "${MAINNET_ENDPOINT}",
"goerli_endpoint": "${GOERLI_ENDPOINT}",
"bsctest_endpoint": "${BSCTEST_ENDPOINT}",
"bsc_endpoint": "${BSC_ENDPOINT}",
"etherscan_api": "${ETHERSCAN_API}",
"bsc_api": "${BSC_API}"
}
EOF
- name: Generate ABI files
run: |
make build
- name: Commit and push the generated ABI files
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Generate ABIs for PR #${{github.event.pull_request.number}}"
file_pattern: '*.go'
commit_user_name: Bitmark Bot
commit_user_email: [email protected]