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
|
2023-03-31 22:41:11 +00:00
|
|
|
genesis_validator_addresses:
|
|
|
|
required: true
|
|
|
|
type: string
|
2023-04-06 20:51:42 +00:00
|
|
|
kava_version_filepath:
|
|
|
|
required: true
|
|
|
|
type: string
|
2022-12-08 18:35:20 +00:00
|
|
|
secrets:
|
|
|
|
DEV_WALLET_MNEMONIC:
|
|
|
|
required: true
|
2023-04-14 01:29:25 +00:00
|
|
|
KAVA_TESTNET_GOD_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:
|
2023-04-06 20:51:42 +00:00
|
|
|
- name: checkout repo from master
|
2023-11-08 22:06:03 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-04-06 20:51:42 +00:00
|
|
|
with:
|
2023-11-08 22:06:03 +00:00
|
|
|
ref: master
|
2023-04-06 20:51:42 +00:00
|
|
|
- name: checkout version of kava used by network
|
|
|
|
run: |
|
|
|
|
git pull -p
|
|
|
|
git checkout $(cat ${KAVA_VERSION_FILEPATH})
|
2023-04-06 20:59:32 +00:00
|
|
|
env:
|
2023-11-08 22:06:03 +00:00
|
|
|
KAVA_VERSION_FILEPATH: ${{ inputs.kava_version_filepath }}
|
2022-12-08 18:35:20 +00:00
|
|
|
- name: Set up Go
|
2023-11-08 22:06:03 +00:00
|
|
|
uses: actions/setup-go@v4
|
2022-12-08 18:35:20 +00:00
|
|
|
with:
|
2023-11-08 22:06:03 +00:00
|
|
|
go-version-file: go.mod
|
2022-12-08 18:35:20 +00:00
|
|
|
- name: build kava binary
|
|
|
|
run: make install
|
|
|
|
- name: checkout go evm tools repo
|
2023-11-08 22:06:03 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-12-08 18:35:20 +00:00
|
|
|
with:
|
|
|
|
repository: ethereum/go-ethereum
|
|
|
|
path: go-ethereum
|
2023-02-13 19:12:30 +00:00
|
|
|
ref: v1.10.26
|
2022-12-08 18:35:20 +00:00
|
|
|
- name: install go evm tools
|
|
|
|
run: |
|
|
|
|
make
|
|
|
|
make devtools
|
|
|
|
working-directory: go-ethereum
|
|
|
|
- name: checkout kava bridge repo for deploying evm contracts
|
2023-11-08 22:06:03 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-12-08 18:35:20 +00:00
|
|
|
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
|
2024-02-08 23:32:44 +00:00
|
|
|
- name: download seed script from current commit
|
|
|
|
run: wget https://raw.githubusercontent.com/Kava-Labs/kava/${GITHUB_SHA}/.github/scripts/${SEED_SCRIPT_FILENAME} && chmod +x ${SEED_SCRIPT_FILENAME}
|
2023-04-12 20:01:28 +00:00
|
|
|
working-directory: kava-bridge/contract
|
|
|
|
env:
|
2023-11-08 22:06:03 +00:00
|
|
|
SEED_SCRIPT_FILENAME: ${{ inputs.seed-script-filename }}
|
2022-12-08 18:35:20 +00:00
|
|
|
- name: run seed scripts
|
2023-04-12 20:01:28 +00:00
|
|
|
run: bash ./${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 }}
|
2023-04-14 01:29:25 +00:00
|
|
|
KAVA_TESTNET_GOD_MNEMONIC: ${{ secrets.KAVA_TESTNET_GOD_MNEMONIC }}
|
2022-12-08 18:35:20 +00:00
|
|
|
SEED_SCRIPT_FILENAME: ${{ inputs.seed-script-filename }}
|
2022-12-14 20:41:53 +00:00
|
|
|
ERC20_DEPLOYER_NETWORK_NAME: ${{ inputs.erc20-deployer-network-name }}
|
2023-03-31 22:41:11 +00:00
|
|
|
GENESIS_VALIDATOR_ADDRESSES: ${{ inputs.genesis_validator_addresses }}
|