11   Deploying the Sample Application: Blockchain and Betting

Deploying Full Contract

In Chapter 10, we introduced the development steps for writing a smart contract. Now that the contract is fully written, let’s deploy it to our test chain, and interact with it.

node deploy.js ethereum && node debug.js ethereum

Fix any errors that pop up during compilation, then run the deployment again if necessary. If everything worked properly, you should see the interactive prompt pop up. Let’s run a couple of test functions to make sure our contract is working.

Images

The first line creates a UNIX timestamp 1 hour (3600s) in the future. The JavaScript Date type ...

Get Blockchain: A Practical Guide to Developing Business, Law, and Technology Solutions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.