This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity 0.8.1; | |
contract Bank { | |
mapping(address => uint) balance; | |
function addBalance(uint _toAdd) public returns (uint) { | |
balance[msg.sender] += _toAdd; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity 0.7.5; | |
contract MemoryAndStorage { | |
mapping(uint => User) users; | |
struct User{ | |
uint id; | |
uint balance; | |
} |