How to setup & test NFT sample using fabric-token-sdk

How to setup & test NFT sample using fabric-token-sdk

OS version Ubuntu-18.04

#update libraries

sudo apt update
apt upgrade -y

#install make and build-essential

apt install make
apt-get install build-essential

#install go

wget -L https://go.dev/dl/go1.17.11.linux-amd64.tar.gz
tar -xvf go1.17.11.linux-amd64.tar.gz
sudo chown -R root:root ./go
sudo mv -v go /usr/local

vim ~/.bash_profile
source ~/.bash_profile

echo $GOPATH
echo $GOROOT
go version

#install docker

curl -fsSL https://download.docker.com/linux/ubuntu/gpg  | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu  $(lsb_release -cs) stable"
sudo apt-get update
apt-cache policy docker-ce
sudo apt-get install -y docker-ce  --assume-yes
docker version

#install docker-compose

DOCKER_COMPOSE_VERSION=${1:-1.26.2}
sudo curl -o /usr/local/bin/docker-compose -L "https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m)"
sudo chmod +x /usr/local/bin/docker-compose
docker-compose -v
sudo usermod -aG docker $USER

#setup fabric-token-sdk

export FTS_PATH=$GOPATH/src/github.com/hyperledger-labs/fabric-token-sdk
git clone https://github.com/hyperledger-labs/fabric-token-sdk.git $FTS_PATH
cd $GOPATH/src/github.com/hyperledger-labs/fabric-token-sdk
make docker-images

#working with nft in samples for fabric-token-sdk

cd samples/nft/
go build -o nft

#start your sample on screen

screen
./nft network start --path ./testdata

Leave a Reply

Your email address will not be published.