Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)
To deploy using a local Anvil node, set the RUN_ANVIL environment variable to true. This will automatically start a local Anvil node and use its private key for deployment.
Required environment variables:
RUN_ANVIL=trueMANAGER_TAG(tag for the SKALE Manager version)
Example:
MANAGER_TAG=<manager_tag> RUN_ANVIL=true bash deploy_manager.shTo deploy to a custom network, provide the following environment variables:
Required environment variables:
ETH_PRIVATE_KEY(Ethereum private key without the0xprefix)ENDPOINT(Ethereum RPC endpoint)MANAGER_TAG(tag for the SKALE Manager version)GAS_PRICE(optional, default:10000000000)NETWORK(optional, default:custom)ETHERSCAN(optional, default:1234)
Example:
ETH_PRIVATE_KEY=<your_private_key> MANAGER_TAG=<manager_tag> ENDPOINT=<rpc_endpoint> GAS_PRICE=<gas_price> NETWORK=<network_name> ETHERSCAN=<etherscan_api_key> bash deploy_manager.shTo deploy using a local Anvil node, set the RUN_ANVIL environment variable to true. This will automatically start a local Anvil node and use its private key for deployment.
Required environment variables:
RUN_ANVIL=trueIMA_TAG(tag for the IMA version)
Example:
IMA_TAG=<ima_tag> RUN_ANVIL=true bash deploy_ima.shTo deploy to a custom network, provide the following environment variables:
Required environment variables:
ETH_PRIVATE_KEY(Ethereum private key without the0xprefix)ENDPOINT(Ethereum RPC endpoint)IMA_TAG(tag for the IMA version)GAS_PRICE(optional, default:10000000000)NETWORK(optional, default:custom)ETHERSCAN(optional, default:1234)
Example:
ETH_PRIVATE_KEY=<your_private_key> IMA_TAG=<ima_tag> ENDPOINT=<rpc_endpoint> GAS_PRICE=<gas_price> NETWORK=<network_name> ETHERSCAN=<etherscan_api_key> bash deploy_ima.shRun a local Anvil instance and deploy fair-manager contracts on it:
Required environment variables:
RUN_ANVIL=trueFAIR_TAG(tag for the Fair-Manager version)CHAIN_NAME(name of the chain)TARGET(skale-manager alias or address)MAINNET_ENDPOINT(mainnet RPC endpoint)
Example:
RUN_ANVIL=true FAIR_TAG=0.0.1-develop.6 CHAIN_NAME=<chain_name> TARGET=<skale_manager_alias_or_address> MAINNET_ENDPOINT=<mainnet_endpoint> bash deploy_fair.shDeploy fair-manager contracts to a custom network:
Required environment variables:
ETH_PRIVATE_KEY(Ethereum private key without the0xprefix)ENDPOINT(Fair Chain RPC endpoint)FAIR_TAG(tag for the Fair-Manager version)CHAIN_NAME(name of the chain)TARGET(skale-manager alias or address)MAINNET_ENDPOINT(mainnet RPC endpoint)GAS_PRICE(optional, default:10000000000)NETWORK(optional, default:custom)ETHERSCAN(optional, default:1234)
Example:
ETH_PRIVATE_KEY=<your_private_key> ENDPOINT=<fair_chain_endpoint> FAIR_TAG=0.0.1-develop.6 CHAIN_NAME=<chain_name> TARGET=<skale_manager_alias_or_address> MAINNET_ENDPOINT=<mainnet_endpoint> bash deploy_fair.shABI and address of the deployed contracts will be saved in contracts_data/fair.json file.
To deploy using a local Anvil node, set the RUN_ANVIL environment variable to true. This will automatically start a local Anvil node and use its private key for deployment.
Required environment variables:
RUN_ANVIL=trueALLOCATOR_TAG(tag for the Allocator version)
Example:
ALLOCATOR_TAG=<allocator_tag> RUN_ANVIL=true bash deploy_allocator.shTo deploy to a custom network, provide the following environment variables:
Required environment variables:
ETH_PRIVATE_KEY(Ethereum private key without the0xprefix)ENDPOINT(Ethereum RPC endpoint)ALLOCATOR_TAG(tag for the Allocator version)GAS_PRICE(optional, default:10000000000)NETWORK(optional, default:custom)
Example:
ETH_PRIVATE_KEY=<your_private_key> ALLOCATOR_TAG=<allocator_tag> ENDPOINT=<rpc_endpoint> GAS_PRICE=<gas_price> NETWORK=<network_name> bash deploy_allocator.shTo calculate the version, use the following script:
Required environment variables:
BRANCH(branch name)VERSION(base version)
Example:
BRANCH=<branch_name> VERSION=<base_version> ./helper-scripts/calculate_version.sh- Add git submodule to your repo
git submodule add -b develop https://github.com/skalenetwork/helper-scripts.git
git submodule init- Update submodule later on
git submodule update --remoteYou can use this package: https://github.com/marketplace/actions/checkout-submodules
Just add those lines to the pipeline:
steps:
- name: Checkout submodules
uses: textbook/git-checkout-submodule-action@master
with:
remote: true