August 2018
Beginner to intermediate
153 pages
2h 15m
English
In part 4 of this tutorial series on building DApps with Ethereum, we started building and testing our DAO contract. Now let’s go one step further and handle adding content and tokens to the story, as per our introduction.
For a contract to be able to interact with another contract, it needs to be aware of that other contract’s interface — the functions available to it. Since our TNS token has a fairly straightforward interface, we can include it as such in the contract of our DAO, above the contract StoryDao declaration and under our import statements:
contract LockableToken is Ownable { function totalSupply() public view returns (uint256); function balanceOf(address who) ...Read now
Unlock full access