Created
December 5, 2018 04:39
-
-
Save crazyrabbitLTC/19eba18bb25588dbb20d444e6de5a086 to your computer and use it in GitHub Desktop.
A contract to demonstrate linking to our Linked List Contract
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; | |
import "dennison-linkedlist/contracts/LinkedList.sol"; | |
contract QuickContract { | |
LinkedList private _linkedlist; | |
function setLinkedList(LinkedList linkedlist) external { | |
require(linkedlist != address(0), "You must provide a non-0x0 address"); | |
_linkedlist = linkedlist; | |
} | |
function getHead() public view returns (bytes32) { | |
bytes32 _node = _linkedlist.head(); | |
return _node; | |
} | |
function addNode(string _data) public { | |
_linkedlist.addNode(_data); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment