- You can buy Harkirat's course using the given testnet tokens. The course price is 2 tokens.
- The application asks user to
approve
2 tokens. The user gives a contractPayment.sol
permission to transfer 2 tokens. - Then
moveFunds
function inPayment.sol
is called by the user. Here the 2 tokens are transfered by thePayment.sol
contract to a EOA, which is owned by me.
- Faucet is provided, faucet.
- EOA:
0x93104E260cb74E94038F4325098d31EE426C6F85
- MyToken.sol:
0xA27612ea3e47750DD1Ff27223cfBAEE99BC9a401
- Payment.sol:
0x21A14df46428681954AcEB96C7F39BD26D283d75
- Faucet.sol:
0xb910de2349eb28985f2140ff286f70046beba916
- I can use The Graph to index events and make the the
moveFunds
function emit event with email address of the user. And handle all the login in the backend rather than in frontend. - Also I can implement it in such a way, so that user just have to make one transaction, rather than 2 in the current scenario.