You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in page 106, I do $ peer chaincode invoke -n tw -c '{"Args":["requestTrade","50000","Wood for Toys"]}' -C tradechannel.
I get the following error: Incorrect number of arguments. Expecting 3: {ID, Amount, Description of Goods}. Found 2)
It seems logical to me as the in the go code of func requestTrade() (in tradeWorkflow.go), the args is only 2 elements long as the name of the function is not included.
But then also, I do not understand what you expect in line 206 in args[0] when you do tradeKey, err = getTradeKey(stub, args[0])
I use trade-finance-logistics master, fabric 1.1, trade_workflow_v1.
Thank you for your support.
The text was updated successfully, but these errors were encountered:
Please check the errata I mentioned on the other thread. We noticed a few errors as well as the version number omission and submitted them to the publishers.
If you can't find the errata on the Packt site, I'll post it here.
Put a new trade agreement on the ledger with the following command:
$ peer chaincode invoke -n tw -c '{"Args":["requestTrade", "50000",
"Wood for Toys"]}' -C tradechannel
Retrieve the trade agreement from the ledger with the following command:
$ peer chaincode invoke -n tw -c '{"Args":["getTradeStatus",
"50000"]}' -C tradechannel
Should be:
Put a new trade agreement with a unique ID trade-12 on the ledger with the following command:
$ peer chaincode invoke -n tw -c '{"Args":["requestTrade", "trade-12", "50000", "Wood for Toys"]}' -C tradechannel
Retrieve the trade agreement with the ID trade-12 from the ledger with the following command:
$ peer chaincode invoke -n tw -c '{"Args":["getTradeStatus", "trade-12"]}' -C tradechannel
in page 106, I do
$ peer chaincode invoke -n tw -c '{"Args":["requestTrade","50000","Wood for Toys"]}' -C tradechannel
.I get the following error:
Incorrect number of arguments. Expecting 3: {ID, Amount, Description of Goods}. Found 2)
It seems logical to me as the in the go code of func requestTrade() (in tradeWorkflow.go), the args is only 2 elements long as the name of the function is not included.
But then also, I do not understand what you expect in line 206 in args[0] when you do
tradeKey, err = getTradeKey(stub, args[0])
I use trade-finance-logistics master, fabric 1.1, trade_workflow_v1.
Thank you for your support.
The text was updated successfully, but these errors were encountered: