- create .env file
- add ALCHEMY_API_KEY to .env
- add RINKEBY_PRIVATE_KEY to .env
Account1(Owner): 0x8658eba532306C137fAAa31ec0b1d2a16D03B5a8
hardhat run --network rinkeby scripts/deploy.ts
Deploying contracts with the account: 0x8658eba532306C137fAAa31ec0b1d2a16D03B5a8
Account balance: 200000000000000000
Donations deployed to: 0x033aBd77e0CA9484699F43Fc9c14378f46191Bd6
npx hardhat donate --network rinkeby --contract 0x033aBd77e0CA9484699F43Fc9c14378f46191Bd6 --amount 50 --unit wei
Successfully donated 50 Wei to address 0x033aBd77e0CA9484699F43Fc9c14378f46191Bd6
npx hardhat getAllDonaters --network rinkeby --contract 0x033aBd77e0CA9484699F43Fc9c14378f46191Bd6
All donated addresses:
[ '0x8658eba532306C137fAAa31ec0b1d2a16D03B5a8' ]
npx hardhat getDonatedAmountByAddress --network rinkeby --contract 0x033aBd77e0CA9484699F43Fc9c14378f46191Bd6 --donater 0x8658eba532306C137fAAa31ec0b1d2a16D03B5a8
Address: 0x8658eba532306C137fAAa31ec0b1d2a16D03B5a8 donated: 50 Wei to contract: 0x033aBd77e0CA9484699F43Fc9c14378f46191Bd6
npx hardhat withdraw --network rinkeby --contract 0x033aBd77e0CA9484699F43Fc9c14378f46191Bd6 --toaddress 0x65a376d42efE83eAE122Da52B652539d078206c8 --amount 30 --unit wei
Successfully withdrew 30 Wei from: 0x033aBd77e0CA9484699F43Fc9c14378f46191Bd6 to address 0x65a376d42efE83eAE122Da52B652539d078206c8
npx hardhat donate --network rinkeby --contract 0x033aBd77e0CA9484699F43Fc9c14378f46191Bd6 --amount 77 --unit gwei
Successfully donated 77000000000 Wei to address 0x033aBd77e0CA9484699F43Fc9c14378f46191Bd6
npx hardhat withdraw --network rinkeby --contract 0x033aBd77e0CA9484699F43Fc9c14378f46191Bd6 --toaddress 0x65a376d42efE83eAE122Da52B652539d078206c8 --amount 33 --unit gwei
Successfully withdrew 33000000000 Wei from: 0x033aBd77e0CA9484699F43Fc9c14378f46191Bd6 to address 0x65a376d42efE83eAE122Da52B652539d078206c8