Project made to create simple subscriptions solution in web3. Made with Solidity, Hardhat and Typescript
- createPlan: create a new plan using the sender address
- subscribe: subscribe sender address to a plan
- cancel: cancel plan for sender address
- pay: receive the eth for plans
npm install
npm run compile
npm run test
- Copy .env.example to .env
- Edit .env file adding:
- alchemy api key to RINKEBY_URL
- PRIVATE_KEY
After compile and test execute the following command:
npm run deploy-rinkeby
Address: 0x72280e0A0C1C1c98F1965219B0342082b7B3f5B5
Verified in Etherscan: https://rinkeby.etherscan.io/address/0x72280e0A0C1C1c98F1965219B0342082b7B3f5B5#code
To verify deployed contract update .env file with etherscan api key in variable ETHERSCAN_KEY, then run the following command:
npx hardhat verify CONTRACT_ADDRESS --network rinkeby