I see lots of word "shim" in Hyperledger fabric chaincode samples like
func (t *SimpleChaincode) Init(stub shim.ChaincodeStubInterface, function string, args []string) ([]byte, error) {
which is imported from
import (
"errors"
"fmt"
"github.com/hyperledger/fabric/core/chaincode/shim"
)
What is shim the abbreviation of?
Shim in computing is used when referring to adapting software layers between different interfaces/components. In the context of Hyperledger Fabric, Shim provides APIs for the chaincode to access its state variables, transaction context and call other chaincodes. Shim contains the generic means for chaincode and validating peer to communicate with each other.
For more information, you can check Chaincode Protocol specification
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With