Creating Smart Contracts with Smart Contract

Jackson Ng
Coinmonks
6 min readJul 24, 2018

--

Photo by chuttersnap on Unsplash

This article explores the technique of getting one Smart Contract to call another Smart Contract and is a follow-up to the Escrow Service article that I wrote in May 2018. The Safe Remote Purchase Smart Contract is, in my opinion, the clearest example to explain Smart Contracts to anyone who needs to understand what it does. Safe Remote Purchase has several quirky characteristics. In this article, I will address one of them.

The Safe Remote Purchase Smart Contract can only be used once and is a hassle to monitor especially if a frequent seller has several of these contracts running at any one time. A frequent seller will need something to:

  1. spawn new “Safe Remote Purchase” contracts on every new sale.
  2. tell him where the “Safe Remote Purchase” contracts that he has initiated are.
  3. allow him to monitor each of them, their state, and who the buyers are.

This article will do point 1 and 2. Point 3 can be done by pasting the ABI of “Safe Remote Purchase” contract in an Ethereum Wallet like Mist. I could build a DApp to do this too! But this article will focus on just point 1 and 2.

Discover and review best Blockchain api and node products

--

--