'How to add custom data in blockchain during chaincode deployment?
I know that we can invoke smart contract function during chaincode deployment for initial data. But is there any other way around by which we can do the same thing ? Like calling some external function or external service to do the same thing ?
Solution 1:[1]
You only update the ledger by submitted endorsed transactions to the orderer, and you got those endorsed transactions by invoking smart contract transaction functions. So I don't think you really have an alternative to invoking a smart contract transaction function to populate the ledger with some initial state after chaincode deployment, but you could provide a function or service that wraps that transactions submission so your client (or deployment process) doesn't need to deal with Fabric directly.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | bestbeforetoday |
