![Forrest logo](/images/logo.png)
minifab:tldr:87e3f
The command minifab invoke
is used to interact with a Hyperledger Fabric network and invoke a transaction on a specified chaincode.
Here's the breakdown of the given command:
-n ${chaincode_name}
: Specifies the name of the chaincode to be invoked.${chaincode_name}
is a placeholder for the actual name.-p '"${method_name}", "${arg0}", "${arg1}", ...'
: This flag is used to specify the parameters for the transaction.
The parameters should be enclosed in single quotes ('
) and double quotes ("
) to correctly pass the arguments. Each argument is separated by a comma (,
). ${method_name}
is the name of the method to be invoked on the chaincode, and ${arg0}
, ${arg1}
, and so on, are placeholders for the actual arguments to be passed to the method.
For example, if you have a chaincode named mychaincode
and want to invoke a method called transfer
with arguments "Alice"
and "Bob"
, the command would be:
minifab invoke -n mychaincode -p '"transfer", "Alice", "Bob"'
The actual values for ${chaincode_name}
, ${method_name}
, ${arg0}
, ${arg1}
, etc., depend on your specific chaincode implementation and desired transaction.