mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-19 16:15:09 +00:00
Signed-off-by: Matias Salimbene <matias.saimbene@gmail.com> Co-authored-by: Matias Salimbene <matias.saimbene@gmail.com>
34 lines
912 B
Go
34 lines
912 B
Go
/*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
package main
|
|
|
|
import (
|
|
"github.com/hyperledger/fabric-contract-api-go/contractapi"
|
|
"github.com/hyperledger/fabric-contract-api-go/metadata"
|
|
)
|
|
|
|
func main() {
|
|
hlpNftContract := new(TokenERC721Contract)
|
|
hlpNftContract.Info.Version = "0.0.1"
|
|
hlpNftContract.Info.Description = "ERC-721 fabric port"
|
|
hlpNftContract.Info.License = new(metadata.LicenseMetadata)
|
|
hlpNftContract.Info.License.Name = "Apache-2.0"
|
|
hlpNftContract.Info.Contact = new(metadata.ContactMetadata)
|
|
hlpNftContract.Info.Contact.Name = "Matias Salimbene"
|
|
|
|
chaincode, err := contractapi.NewChaincode(hlpNftContract)
|
|
chaincode.Info.Title = "ERC-721 chaincode"
|
|
chaincode.Info.Version = "0.0.1"
|
|
|
|
if err != nil {
|
|
panic("Could not create chaincode from TokenERC721Contract." + err.Error())
|
|
}
|
|
|
|
err = chaincode.Start()
|
|
|
|
if err != nil {
|
|
panic("Failed to start chaincode. " + err.Error())
|
|
}
|
|
}
|