Skip to content

Instantly share code, notes, and snippets.

@agoiabel
Created April 1, 2020 03:04
Show Gist options
  • Save agoiabel/ea9cb60cae460c43ca6d6a257b1d5107 to your computer and use it in GitHub Desktop.
Save agoiabel/ea9cb60cae460c43ca6d6a257b1d5107 to your computer and use it in GitHub Desktop.
pragma solidity ^0.5.3;
contract Mapping {
mapping(address => uint) balances;
mapping(address => mapping(address => bool)) approved;
function manipulateMapOfMap(spender) external {
approved[msg.sender][spender] = true //assign a value to the approved map
approved[msg.sender][spender]; //get the value of the map
delete approved[msg.sender][spender] //delete the reference
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment