idle_moloch/deploy_contract.sh
Mitja Belak 8c8ca58607
Some checks failed
CI / Foundry project (push) Waiting to run
CI / Foundry project (pull_request) Has been cancelled
Enables registrations with RGCVII and ETH
2024-10-28 18:31:41 +01:00

24 lines
1019 B
Bash
Executable File

#!/bin/bash
# YOUR WALLET, change to you account below:
DEV_WALLET="0x3295CCA2d922c637d35b258fc6c9C7e471803b45"
DAO_OWNER="0x4d5A5B4a679b10038e1677C84Cb675d10d29fFFD"
DAO_CONTRACT="0x11dC980faf34A1D082Ae8A6a883db3A950a3c6E8"
# Set balance for the dev wallet (1eth)
cast rpc anvil_setBalance $DEV_WALLET 0xDE0B6B3A7640000 --rpc-url http://127.0.0.1:8545
cast rpc anvil_setBalance $DAO_OWNER 0xDE0B6B3A7640000 --rpc-url http://127.0.0.1:8545
# Deploy RaidGeld
forge script script/RaidGeld.s.sol:RaidGeldScript --rpc-url http://127.0.0.1:8545 --broadcast --private-key $DEV_PRIVATE_KEY
# Impersonate the DAO owner account
cast rpc anvil_impersonateAccount $DAO_OWNER
# Send the mint transaction as the impersonated owner
cast send $DAO_CONTRACT "mint(address,uint256)" $DEV_WALLET 0x00000000000000000000000000000000000000000000003635c9adc5dea00000 --from $DAO_OWNER --rpc-url http://127.0.0.1:8545 --unlocked --gas-limit 300000
# Stop impersonating the DAO owner
cast rpc anvil_stopImpersonatingAccount $DAO_OWNER