Skip to content

Instantly share code, notes, and snippets.

@Juan-cc
Created January 18, 2019 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Juan-cc/00f7046a268ddf6cf1b128a829c39bfd to your computer and use it in GitHub Desktop.
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=
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