Last active
September 19, 2018 19:46
-
-
Save noman-land/64db658bbfa15c1d487ea1544c8e2d88 to your computer and use it in GitHub Desktop.
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.24; | |
contract IdeaRegistry { | |
struct Idea { | |
address owner; | |
uint[] links; | |
} | |
mapping(uint => Idea) registry; | |
function registerIdea(uint ideaHash, uint[] links) public { | |
require(registry[ideaHash].owner == address(0)); | |
registry[ideaHash] = Idea(msg.sender, links); | |
} | |
function getIdea(uint ideaId) public view returns(uint[]) { | |
return registry[ideaId].links; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment