diff --git a/deployer.sh b/deployer.sh index 87efe72..aabef9f 100644 --- a/deployer.sh +++ b/deployer.sh @@ -6,6 +6,20 @@ START=1 END=4 VERIFY_NEEDED="--verify" +usage() { + echo "Correct deployer script usage:" + echo -e "\t-s, --start - from which contract deployment should start." + echo -e "\t-e, --end - last contract deployment to be done." + echo -e "\t-n, --network - network name to be deployed on." + echo -e "\t-b, --blockscout - should try to use blockscout as verifier." + echo -e "\nAvailable network names: ${AVAILIABLE_NETWORKS[@]}" + echo -e "\nContract enumeration:" + echo "0) WETH9" + echo "1) UniswapV2Factory" + echo "2) UniswapV2Router" + exit 1 +} + while [[ $# -gt 0 ]]; do case "${1}" in @@ -24,6 +38,17 @@ do shift shift ;; + -b|--blockscout) + VERIFY_NEEDED+=" --verifier blockscout" + shift + ;; + -h|--help) + usage + ;; + *) + echo -e "\nERROR: Unknown option provided\n" + usage + ;; esac done