Created
January 18, 2019 15:23
-
-
Save Juan-cc/00f7046a268ddf6cf1b128a829c39bfd 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.5.2+commit.1df8f40c.js&optimize=false&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.5.2; | |
contract Kreaan{ | |
struct Something { | |
string greeting; | |
string name; | |
} | |
mapping ( uint8 => Something) internal aMap; | |
function testAccess() external returns (string memory) { | |
Something memory aSomething = Something("Hello", "Kreaan Singh"); | |
aMap[1] = aSomething; | |
return aMap[1].name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment