Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mastering Ethereum

You're reading from  Mastering Ethereum

Product type Book
Published in Apr 2019
Publisher Packt
ISBN-13 9781789531374
Pages 490 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Merunas Grincalaitis Merunas Grincalaitis
Profile icon Merunas Grincalaitis

Table of Contents (17) Chapters

Preface Section 1: Blockchain - Ethereum Refresher
Blockchain Architecture Ethereum Ecosystems Ethereum Assets Section 2: Decentralized Application Development Workflow
Mastering Smart Contracts Mastering dApps Tools, Frameworks, Components, and Services Deployment on Testnet Various dApps Integrations Decentralized Exchanges Workflow Section 3: Ethereum Implementations
Machine Learning on the Ethereum Blockchain Creating a Blockchain-based Social Media Platform Creating a Blockchain-Based E-Commerce Marketplace Other Books You May Enjoy

Building the Ethereum backend

The backend for our project will take care of generating trades that can be filled by anyone as long as they have enough funds to pay the established price. When the user gets registered, they'll deploy an Escrow contract which will be used by our main DAX contract. So let's start by setting up the requirements and the contract structure before starting to fill all the functions to practice the system to improve, developer's efficiency that we studied in Chapter 4, Mastering Smart Contracts.

Start by defining the functions that we'll need in a big comment at the beginning of the file:

// Functions that we need:
/*
1. Constructor to setup the owner
2. Fallback non-payable function to reject ETH from direct transfers since we only want people to use the functions designed to trade a specific pair
3. Function to extract tokens...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}