Skip to content

Instantly share code, notes, and snippets.

@brynbellomy
Last active July 11, 2017 20:56
Show Gist options
  • Save brynbellomy/03f9e536d033f81fe2a2df7a74a17ddf to your computer and use it in GitHub Desktop.
Save brynbellomy/03f9e536d033f81fe2a2df7a74a17ddf to your computer and use it in GitHub Desktop.
medium-return-struct-public-func-1.sol
pragma solidity 0.4.13;
contract Project
{
struct Person {
string name;
uint funds;
}
mapping(address => Person) people;
function getBryn()
public
returns (Person)
{
return Person({ name: "Bryn", funds: 123 });
}
function getPerson(address id)
public
returns (Person)
{
return people[id];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment