Hi @Jason_Purcell,
Have you managed to resolve this now?
If your code has compiled successfully, then if when you try to deploy Bank it gets “stuck” on creation of Helloworld pending...
but you never actually get the transaction receipt with the green tick confirming successful deployment, then you may just need to close Remix in your browser and then reopen it (perhaps also completely closing your browser and reopening that as well). Sometimes Remix just gets tired and sluggish, and needs fresh start
I’m assuming this contract you’ve posted is before you’ve actually done the Inheritance assignment, right? I’m only asking because you’ll need a third contract in your inheritance structure for the assignment solution… but I imagine you’re just posting this here because you got stuck with this issue before even starting the assignment …
Anyway, just let us know if you’re still experiencing any problems and need some more help.
By the way, you also need to remove the onlyOwner modifier from your withdraw() function header. Adding this means that only the contract owner will be able to withdraw funds while the Bank contract is deployed and operating normally. The contract allows multiple addresses to deposit funds (we are simulating a bank with bank account holders) and so, while the contract is still deployed, it only seems fair that all users should be able to withdraw their funds as well, don’t you think? Earlier on in the course, our withdraw() function header didn’t include the onlyOwner modifier, but it looks like you’ve missed out the assignment where we focus on this function in particular, so maybe you haven’t realised this. I think during the course we’ve been adding and removing onlyOwner from various functions to demonstrate different scenarios, and I think it might have ended up being left in the withdraw() function in the code for this later part of the course by mistake!
I think you may have also missed out the Events Assignment, because you are missing a Transfer event, and a corresponding emit statement, in your contract. This is the assignment from the Events video lecture, which is near the end of the Additional Solidity Concepts section of the course. I would encourage you to have a go and post your solution code for all the course assignments, because this is a good opportunity to practise, and to get some helpful feedback on your progress and some suggestions