Tried to create a simple wallet with a fallback function but still
VM error: revert. Note: The constructor should be payable if you send value. Why?
pragma solidity ^0.4.0;
contract MyWallet
{
struct account
{
uint balance;
uint dailyLimit;
}
mapping (address =>account) _accounts;
//created this fallback payable function
function () payable {
_accounts[msg.sender].balance+=msg.value;
}
//to get balance
function getBalance() returns (uint){
return _accounts[msg.sender].balance;
}
}