Run bun install to obtain dependencies. Then, run forge build to make sure contracts are able to be built successfuly. Finally, copy .env.sample to .env and fill it with your Etherscan API key and Ethereum private key (can be copied from Metamask, for example). Optionally, switch from Publicnode node to something else, at your preference.
Then, run source .env.
This contract will store vault source code and act behind a proxy, hence it is easy to deploy it. Simply run forge script script/DeployMaxBTCERC20Implementation.script.sol --rpc-url "$ETHEREUM_RPC_URL" --private-key "$ETHEREUM_PRIVATE_KEY" --broadcast --verify -vvvv and write down the final contract address, you will need it in the next step.
Run OWNER="" IMPLEMENTATION="" ICS20="" TOKEN_NAME="" TOKEN_SYMBOL="" forge script script/DeployMaxBTCERC20.script.sol --rpc-url "$ETHEREUM_RPC_URL" --private-key "$ETHEREUM_PRIVATE_KEY" --broadcast --verify -vvvv, where:
OWNERmust be set to account address, which will become aMaxBTCERC20admin;IMPLEMENTATIONmust be set to the contract address, obtained in step 2;ICS20must be set to theICS20Transfercontract address (0xa348CfE719B63151F228e3C30EB424BA5a983012on Ethereum Mainnet);TOKEN_NAMEis an ERC20 token name;TOKEN_SYMBOLis an ERC20 token symbol.