Last active
October 8, 2018 21:25
-
-
Save DanteAlabastro/8de239745cee271b97c352d555a6aaab to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=true&gist=
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.4.25; | |
contract Mapping{ | |
mapping (string => address) _Address; | |
mapping (string => uint256) _Balance; | |
mapping (string => bool) _Lock; | |
event broadcast( string ); | |
function set(string Name, address Address) public { | |
_Address[Name] = Address; | |
_Balance[Name] = 0; | |
_Lock[Name] = false; | |
emit broadcast(Name); | |
} | |
function get(string Name) public view returns(address, uint256, bool){ | |
return(_Address[Name], _Balance[Name], _Lock[Name]); | |
} | |
function lock(string Name, bool Toggle) public { | |
_Lock[Name] = Toggle; | |
} | |
function changeAddress(string Name, address Address) public{ | |
require(_Lock[Name] == true); | |
_Address[Name] = Address; | |
} | |
//Delete User | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment