Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* @param {Context} ctx the transaction context
*/
async instantiate(ctx) {
console.log('Instantiate the contract');
const mgt = new commoditymgt_1.CommodityManagementContract();
await mgt.setCommodityDescription(ctx, 'au', 'GOLD');
await mgt.setCommodityDescription(ctx, 'ag', 'SILVER');
await mgt.setCommodityDescription(ctx, 'fe', 'IRON');
await mgt.setCommodityDescription(ctx, 'al', 'ALUMINIUM');
// need to call the commodity management to establish the trading symbol description mapping
}
}
__decorate([
fabric_contract_api_1.Transaction(),
__metadata("design:type", Function),
__metadata("design:paramtypes", [fabric_contract_api_1.Context]),
__metadata("design:returntype", Promise)
], LifecycleContract.prototype, "instantiate", null);
exports.LifecycleContract = LifecycleContract;