FIBOS - extend EOS with JavaScript smart contract.

in #eos6 years ago

FIBOS Quick start

enter image description here

FIBOS is a fork of EOS blockchain. It allows writing smart contract in JavaScript.

Setup FIBOS development environment

Quick install via curl

curl -s https://fibos.io/download/installer.sh |sh

Verify installation

$ which fibos
/usr/local/bin/fibos 

$ fibos --version
v0.27.0-dev

FIBOS provide a CLI console

$ fibos 
Welcome to FIBOS. Based on fibjs 0.27.0-dev.
Type ".help" for more information.
> .info
{
  "fibjs": "0.27.0-dev",
  "git": "v0.26.0-5-gec9b7e6",
  "gcc": "5.4.0",
  "date": "Aug 27 2018 23:12:00",
  "vender": {
    "ev": "4.24",
    "expat": "2.2.5",
    "gd": "2.2.4",
    "jpeg": "8.3",
    "leveldb": "1.17",
    "mongo": "0.7",
    "pcre": "8.21",
    "png": "1.5.4",
    "mbedtls": "2.6.1",
    "snappy": "1.1.2",
    "sqlite": "3.23.0",
    "tiff": "3.9.5",
    "uuid": "1.6.2",
    "v8": "6.8.275.14",
    "v8-snapshot": true,
    "zlib": "1.2.7",
    "zmq": "3.1"
  },
  "modules": [
    "softfloat",
    "fibos",
    "zmq",
    "zlib",
    "zip",
    "xml",
    "ws",
    "vm",
    "uuid",
    "util",
    "url",
    "tty",
    "timers",
    "test",
    "string_decoder",
    "tls",
    "ssl",
    "querystring",
    "punycode",
    "profiler",
    "process",
    "path",
    "os",
    "net",
    "mq",
    "json",
    "io",
    "iconv",
    "https",
    "http",
    "hex",
    "hash",
    "gd",
    "fs",
    "events",
    "encoding",
    "dns",
    "dgram",
    "db",
    "crypto",
    "coroutine",
    "buffer",
    "bson",
    "base64vlq",
    "base64",
    "base32",
    "assert"
  ]
}
> 

FIBOS commands

  1. Initial packag.json like npm init
    fibos --init
  1. Install package
fibos --install fibos.js

Build from source

They don't provide source yet, will update this section in the future

Run your FIBOS node

The source code of this section can be clone from:
https://github.com/FIBOSIO/samples

├── basic
│   └── hello_fibos
│       └── start_fibos
│           └── node.js

You can put the following code into node.js

var fibos = require('fibos');  

fibos.load("http");  
fibos.load("chain");  
fibos.load("net");  
fibos.load("chain_api");  
fibos.load("history_api");  
fibos.load("producer", {  
'producer-name': 'eosio',  
'enable-stale-production': true  
});  
fibos.config_dir = "fibos_config_dir/";  
fibos.data_dir = "fibos_data_dir/";  
  
fibos.start();

Let's run the node now

fibos node.js

Here is the log. Does it look similar to EOS? :D

2018-08-29T22:02:10.501 thread-1   producer_plugin.cpp:1302      produce_block        ] Produced block 0000001dc03ad783... #29 @ 2018-08-29T22:02:10.500 signed by eosio [trxs: 0, lib: 28, confirmed: 0]

Now, you have a running FIBOS. Here is some info links.

Sort:  

Congratulations @joelone! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You made more than 4000 upvotes. Your next target is to reach 5000 upvotes.

Click here to view your Board
If you no longer want to receive notifications, reply to this comment with the word STOP

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @joelone! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

Click here to view your Board

Do not miss the last post from @steemitboard:

Carnival Challenge - Collect badge and win 5 STEEM
Vote for @Steemitboard as a witness and get one more award and increased upvotes!

Congratulations @joelone! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Do not miss the last post from @steemitboard:

Use your witness votes and get the Community Badge
Vote for @Steemitboard as a witness to get one more award and increased upvotes!