Implementing contract functions
At this point, we now have the basic building blocks of Java and Node.js contracts. We have the init
method, which initiates the contract, and the beforeTransaction
method, which performs the access control verifications. Now, we need to define the functionality of the contract.
Scenario contracts' functions
Based on our scenario, the following tables summarize the list of functions that record and retrieve data to and from the ledger to provide the business logic of the contracts. The tables also define the access control definitions of organization members, which are needed in order to invoke the respective functions. The access control definitions are listed with the MSP name and role separated by "." (period).
The following tables illustrate the contract modification functions, that is, how to record transactions on the ledger.
The following table illustrated the contract functions of the ExportLicenseContract
: