Building the corporate remittance contract

To successfully carry out remittances on our blockchain network, we need to write and deploy a smart contract. The smart contract will define the transaction object, including the transaction parameters that will be captured in the channel ledger. The smart contract will allow authorized users to write transactions to the ledger and read transactions that have been written to the ledger. 

We'll be creating a chaincode (smart contract) called corprem.js. It will have the following methods:

  • createTx: This will submit a new corporate remittance transaction.
  • queryTx: This will allow authorized users to fetch transactions already written to the blockchain.

OK. Let's start writing our contract.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.228.88