I have two contracts.
Contract A is an ERC20 token with initial_supply all owned by the contract itself.
And Contract B which exposes a deposit method.
When a user sends a transaction to ContractB.deposit() I want it to:
- Send Contract A coins to contract B (from contract B i.e, contract B needs to request the coins from contract A to B)<- not sure how to do
- Send Contract A coins which are now stored in contract B to msg.sender <- not sure how to do
How can I achieve this? My own attempts have largely failed.