I am trying to convert my solidity code into vyper but I can't find a way to declare a storage variable.
My solidity function was this:
struct Account {
uint256 balance; // Account's balance
uint256 timeLocked; // If not 0, then account will be allowed to withdraw
}
mapping (address => Account) public accounts;
function addBalance() public payable {
Account storage a = accounts[msg.sender];
a.balance = a.balance + msg.value;
}
How can I make a
to become a storage variable ?
I have another question, how can I make a require statement like this ?
require(_operator != address(0));
Seems that address(0) doesn't exist in vyper as it throws me errors.