Skip to content
Smart visualizations for blockchain
Branch: master
Clone or download
Pull request Compare This branch is 5 commits ahead, 21 commits behind smartanvil:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
contracts
src
.gitignore
README.md
build.sh
deployer.sh
deployer.st
html-viewer.st
json-viewer.st
pharo-viewer.st
viewer.sh

README.md

Dependencies

Pharo

  • Version Ubuntu 14.04 or later
 sudo dpkg --add-architecture i386 
 sudo apt-get update 
 sudo apt-get install libx11-6:i386 
 sudo apt-get install libgl1-mesa-glx:i386 
 sudo apt-get install libfontconfig1:i386 
 sudo apt-get install libssl1.0.0:i386 
  • Version Lesser than Ubuntu 14.04
  sudo dpkg --add-architecture i386
  sudo apt-get update
  sudo apt-get install ia32-libs

Solidity

 npm install solc

Installation

Download the code

mkdir myfolder
git clone git@github.com:RMODINRIA-Blockchain/SmartShackle.git
git checkout v0.1

Building the application

After installing all the dependencies proceed to execute the installation script into the cloned folder

cd myfolder
./build.sh

Now you can copy the content of the build folder wherever you want, add it to the path and execute the viewer just by calling it

Tips

  • Known contracts are supposed to be at least linked to the contract folder.
  • To use the testing contracts startup the geth client by using the script at scripts/dev.sh

#Usage

adding contract source codes

This tool works with known contracts developed in solidity. For this subject we have to copy all the contracts we want to inspect into the contract folder located into the build folder.

cd build/contracts
cp /path/to/contracts/*.sol .

configuring the app

You can edit the json-viewer.st and html-viewer.st files.

" Contract folder location. You can chance this value by '/absolute/path' asFileReference " 
contractsLocation :=  FileLocator contractsFolder.
" URL of the local network node geth node. " 
gethURL := 'http://localhost:8545'.

Viewing contract instances

The viewer script returns a Json/Html encoded object with the variable values and the contract name.

viewer.sh json ADDRESS-TO-CONTRACT > output.json
viewer.sh html ADDRESS-TO-CONTRACT > output.html 

The viewer scripts as well allows to open a graphic interface that shows the contract in an interactive fashion

viewer.sh pharo ADDRESS-TO-CONTRACT
You can’t perform that action at this time.