In last posts we discussed the overall theory on how smart contracts work at IOTA, in this and next post(s) we are going to explain the technical set up.

Install goshimmer and wasp

To install a IOTA node (goshimmer node) that is connected to the test network (pollen network):

git clone https://github.com/iotaledger/goshimmer.git
cd goshimmer
go build -ldflags="-s -w -X github.com/iotaledger/goshimmer/plugins/banner.AppVersion=v0.7.5" -tags rocksdb,netgo 
./goshimmer -v

Install Wasp

Wasp is a node software developed by the IOTA Foundation to run the IOTA Smart Contract Protocol (ISCP in short) on top of the IOTA Tangle

git clone https://github.com/iotaledger/wasp.git
cd wasp
go build -ldflags="-s -w -X github.com/iotaledger/goshimmer/plugins/banner.AppVersion=v0.7.5" -tags rocksdb,netgo 

Run goshimmer node connected to the pollen network

mkdir goshimmer-pollen
cd goshimmer-pollen
curl 'https://dbfiles-goshimmer.s3.eu-central-1.amazonaws.com/snapshots/nectar/snapshot-latest.bin' -O
mv snapshot-latest.bin snapshot.bin

Run goshimmer inside the snapshot-bin directory with f.e:

        --skip-config=true 
        --analysis.client.serverAddress=ressims.iota.cafe:21888 
        --autopeering.port=14626 
        --dashboard.bindAddress=0.0.0.0:8081 
        --gossip.port=14666 
        --webapi.bindAddress=0.0.0.0:8080 
        --profiling.bindAddress=0.0.0.0:6061 
        --networkdelay.originPublicKey=9DB3j9cWYSuEEtkvanrzqkzCQMdH1FGv3TawJdVbDxkd 
        --fpc.bindAddress=0.0.0.0:10895 
        --prometheus.bindAddress=0.0.0.0:9311 
        --autopeering.entryNodes=2PV5487xMw5rasGBXXWeqSi4hLz7r19YBt8Y1TGAsQbj@ressims.iota.cafe:15626,5EDH4uY78EA6wrBkHHAVBWBMDt7EcksRq6pjzipoW15B@entryshimmer.tanglebay.com:14646 
        --node.disablePlugins= 
        --node.enablePlugins=remotelog,networkdelay,spammer,prometheus,faucet,txstream 
        --faucet.seed=7R1itJx5hVuo9w9hjg5cwKFmek4HMSoBDgJZN8hKGxih 
        --logger.level=info 
        --logger.disableEvents=false 
        --logger.remotelog.serverAddress=ressims.iota.cafe:5213 
        --drng.pollen.instanceId=1 
        --drng.pollen.threshold=3 
        --drng.pollen.committeeMembers=AheLpbhRs1XZsRF8t8VBwuyQh9mqPHXQvthV5rsHytDG,FZ28bSTidszUBn8TTCAT9X1nVMwFNnoYBmZ1xfafez2z,GT3UxryW4rA9RN9ojnMGmZgE2wP7psagQxgVdA4B9L1P,4pB5boPvvk2o5MbMySDhqsmC2CtUdXyotPPEpb7YQPD7,64wCsTZpmKjRVHtBKXiFojw7uw3GszumfvC4kHdWsHga 
        --drng.xteam.instanceId=1339 
        --drng.xteam.threshold=4 
        --drng.xteam.committeeMembers=GUdTwLDb6t6vZ7X5XzEnjFNDEVPteU7tVQ9nzKLfPjdo,68vNzBFE9HpmWLb2x4599AUUQNuimuhwn3XahTZZYUHt,Dc9n3JxYecaX3gpxVnWb4jS3KVz1K1SgSK1KpV1dzqT1,75g6r4tqGZhrgpDYZyZxVje1Qo54ezFYkCw94ELTLhPs,CN1XLXLHT9hv7fy3qNhpgNMD6uoHFkHtaNNKyNVCKybf,7SmttyqrKMkLo5NPYaiFoHs8LE6s7oCoWCQaZhui8m16,CypSmrHpTe3WQmCw54KP91F5gTmrQEL7EmTX38YStFXx

Run wasp node

Copy config.json from:

mkdir wasp-node
cp config.json wasp-node
<edit wasp-node/config.json>

And run the wasp node

cd wasp-node
../wasp/./wasp
  • You can see then that wasp is exposed then on localhost:7000

Conclusion and going forward

  • With the aforementioned steps you will have a minimal set up to begin developing your smart contracts for Iota, using a committee of (1) more steps and changes are needed to develop more complex examples and setups for different kinds of SC’s
  • In next post we are going to deploy an example Smart Contract for this minimal setup using wasp-cli

References