mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-25 07:45:18 +00:00
8023be0067
* chore(nodejs): Use active LTS v20 for nodejs This updates nodejs to use the active LTS v20 from the maintenance LTS v18. This expands compatibility with packages, adds native support for more features, etc. In addition, the ci-seed-chain workflow was updated to use the .tool-version file instead of hardcoded version. * chore(hardhat): Update hardhat for nodejs 20 support
99 lines
3.2 KiB
YAML
99 lines
3.2 KiB
YAML
name: Seed Chain
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
chain-api-url:
|
|
required: true
|
|
type: string
|
|
chain-id:
|
|
required: true
|
|
type: string
|
|
seed-script-filename:
|
|
required: true
|
|
type: string
|
|
erc20-deployer-network-name:
|
|
required: true
|
|
type: string
|
|
genesis_validator_addresses:
|
|
required: true
|
|
type: string
|
|
kava_version_filepath:
|
|
required: true
|
|
type: string
|
|
secrets:
|
|
DEV_WALLET_MNEMONIC:
|
|
required: true
|
|
KAVA_TESTNET_GOD_MNEMONIC:
|
|
required: true
|
|
|
|
jobs:
|
|
seed-chain-state:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout repo from master
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: master
|
|
- name: get desired version of network
|
|
id: kava-version
|
|
run: |
|
|
echo "KAVA_VERSION=$(cat ./ci/env/kava-internal-testnet/KAVA.VERSION)" >> $GITHUB_OUTPUT
|
|
env:
|
|
KAVA_VERSION_FILEPATH: ${{ inputs.kava_version_filepath }}
|
|
- name: checkout version of kava used by network
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ steps.kava-version.outputs.KAVA_VERSION }}
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version-file: go.mod
|
|
- name: build kava binary
|
|
run: make install
|
|
- name: checkout go evm tools repo
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: ethereum/go-ethereum
|
|
path: go-ethereum
|
|
ref: v1.10.26
|
|
- 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@v4
|
|
with:
|
|
repository: Kava-Labs/kava-bridge
|
|
path: kava-bridge
|
|
ref: main
|
|
- name: install nodeJS
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
cache: npm
|
|
node-version-file: .tool-versions
|
|
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: 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}
|
|
working-directory: kava-bridge/contract
|
|
env:
|
|
SEED_SCRIPT_FILENAME: ${{ inputs.seed-script-filename }}
|
|
- name: run seed scripts
|
|
run: bash ./${SEED_SCRIPT_FILENAME}
|
|
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 }}
|
|
KAVA_TESTNET_GOD_MNEMONIC: ${{ secrets.KAVA_TESTNET_GOD_MNEMONIC }}
|
|
SEED_SCRIPT_FILENAME: ${{ inputs.seed-script-filename }}
|
|
ERC20_DEPLOYER_NETWORK_NAME: ${{ inputs.erc20-deployer-network-name }}
|
|
GENESIS_VALIDATOR_ADDRESSES: ${{ inputs.genesis_validator_addresses }}
|