2022-12-08 17:30:12 +00:00
|
|
|
name: Seed Chain
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_call:
|
2022-12-08 18:35:20 +00:00
|
|
|
inputs:
|
|
|
|
chain-api-url:
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
chain-id:
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
seed-script-filename:
|
|
|
|
required: true
|
|
|
|
type: string
|
2022-12-14 20:41:53 +00:00
|
|
|
erc20-deployer-network-name:
|
|
|
|
required: true
|
|
|
|
type: string
|
2022-12-08 18:35:20 +00:00
|
|
|
secrets:
|
|
|
|
DEV_WALLET_MNEMONIC:
|
|
|
|
required: true
|
2022-12-08 17:30:12 +00:00
|
|
|
|
|
|
|
jobs:
|
2022-12-08 18:35:20 +00:00
|
|
|
seed-chain-state:
|
2022-12-08 17:30:12 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-12-08 18:35:20 +00:00
|
|
|
- name: checkout repo from current commit
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v3
|
|
|
|
with:
|
2022-12-21 19:51:14 +00:00
|
|
|
go-version: "1.18"
|
2022-12-08 18:35:20 +00:00
|
|
|
check-latest: true
|
|
|
|
cache: true
|
|
|
|
- name: build kava binary
|
|
|
|
run: make install
|
|
|
|
- name: checkout go evm tools repo
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
repository: ethereum/go-ethereum
|
|
|
|
path: go-ethereum
|
|
|
|
- name: install go evm tools
|
|
|
|
run: |
|
|
|
|
make
|
|
|
|
make devtools
|
|
|
|
working-directory: go-ethereum
|
|
|
|
- name: checkout kava bridge repo for deploying evm contracts
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
repository: Kava-Labs/kava-bridge
|
|
|
|
path: kava-bridge
|
2022-12-13 00:14:48 +00:00
|
|
|
ref: main
|
2022-12-08 18:35:20 +00:00
|
|
|
- name: install nodeJS
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
cache: npm
|
|
|
|
node-version: 18
|
|
|
|
cache-dependency-path: kava-bridge/contract/package.json
|
|
|
|
- name: "install ERC20 contract deployment dependencies"
|
|
|
|
run: "npm install"
|
|
|
|
working-directory: kava-bridge/contract
|
|
|
|
- name: compile default erc20 contracts
|
|
|
|
run: make compile-contracts
|
|
|
|
working-directory: kava-bridge
|
|
|
|
- name: run seed scripts
|
2022-12-21 19:51:14 +00:00
|
|
|
run: bash ${GITHUB_WORKSPACE}/.github/scripts/${SEED_SCRIPT_FILENAME}
|
2022-12-08 18:35:20 +00:00
|
|
|
working-directory: kava-bridge/contract
|
|
|
|
env:
|
|
|
|
CHAIN_API_URL: ${{ inputs.chain-api-url }}
|
|
|
|
CHAIN_ID: ${{ inputs.chain-id }}
|
|
|
|
DEV_WALLET_MNEMONIC: ${{ secrets.DEV_WALLET_MNEMONIC }}
|
|
|
|
SEED_SCRIPT_FILENAME: ${{ inputs.seed-script-filename }}
|
2022-12-14 20:41:53 +00:00
|
|
|
ERC20_DEPLOYER_NETWORK_NAME: ${{ inputs.erc20-deployer-network-name }}
|