Create a Bank contract where users create their accounts and can store BLX token
The bank should store information about the number of user accounts and global BLX balance.
It should be possible to get public information about any user account - date of creation, balance, and number of transactions (deposits and withdrawals).
The bank should have the owner account that is able to pause and unpause deposits
Please, read the following user stories to implement:
- As a user I want to get a global bank balance of
BLXtoken - As a user I want to get the address of the owner of the bank
- As a user I want to be able to deposit any number of
BLXtokens to my bank account - As a user I want to be able to withdraw any number of
BLXtokens that is available in my account - As a user I want to be able to check that the global bank balance of
BLXtoken changes after the deposit or withdrawal - As a user I want to get information about my account - date of creation, balance, number of transaction if account is active
- As a user I want to be able to deactivate my account
- As a user I want to be able to transfer funds from my bank account to another existing bank account
- As a user I want to be unable to transfer funds from my bank account to an inactive bank account
- As an owner I want to be able to pause and unpause deposits to the bank
- As a user I want to be unable to deposit tokens when deposits are paused
- User can only withdraw tokens from his bank account
- User can only transfer tokens from his bank account
- For Owner and Pausable features use Ownable and Pausable contracts from OpenZeppelin (more in materials above)