In part 2 of this tutorial series on building DApps with Ethereum, we wrote the TNS token’s code. But we haven’t yet compiled it, deployed it, tested it or verified it.
Let’s do all that in this part so that we’re ready for what comes next. At this point we have a file containing some Solidity code.
But to make the Ethereum Virtual Machine understand it, we need to turn it into machine code. Additionally, in order to communicate with it from a web application, we need an ABI (application binary interface), which is a universally readable description of the functions that exist in a certain smart contract — be it a token or something more complex.
We can create machine code for the EVM and the ABI all at once by using Truffle’s compiler. This command will look inside the contracts subfolder, compile them all and place their compiled version into the build subfolder.
Note that if you used the alternative development flow from the last part, all the parent contracts from which our TNSToken contract is inheriting functionality will also be compiled one by one each in its own file. Feel free to inspect the contents of the generated JSON files. Read more from sitepoint.com…
thumbnail courtesy of sitepoint.com