Giter VIP home page Giter VIP logo

telos-ipfs-validator's Introduction

telos-ipfs-validator

Install NodeJS

curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -
sudo apt install nodejs

Clone repo

git clone https://github.com/jhexperiment/telos-ipfs-validator.git
cd telos-ipfs-validator
npm install

Edit config.json

{
  "server": {
    "port": 7001
  },
  "ipfs": {
    "address": "localhost",
    "port": 6001,
    "protocol": "http"
  },
  "nodeos": {
    "address": "stage.api.telosvoyager.io",
    "port": 2888,
    "protocol": "http"
  },
  "ipfs.pay": {
    "code": "ipfspay11111",
    "table": "storage"
  }
}

Start/Restart server

./start.sh

Stop server

./stop.sh

Log

tail -f validator.log

ipfs.pay contract example

teclos set contract ipfspay11111 ../telos/contracts/ipfs.pay ipfspay.wasm ipfspay.abi -p ipfspay11111

teclos set account permission testipfs1111 active '{"threshold":1, "keys":[{"key":"EOS797uA9ifydG3Ag56aKndFVhku7QJ9EhXDytxfufHiHdtV2AS8R", "weight":1}], "accounts": [{"permission":{"actor":"ipfspay11111","permission":"eosio.code"},"weight":1}]}' owner -p testipfs1111

teclos push action ipfspay11111 buystorage '["testipfs1111"]' -p testipfs1111

teclos push action ipfspay11111 savedoc '["testipfs1111", 0, "Qmc3ugzJVGZKbZMYwPj3a9pTTcJaibrYzA4GzZ2M7TJxWk"]' -p testipfs1111

teclos get table ipfspay11111 testipfs1111 storage

telos-ipfs-validator's People

Contributors

jhexperiment avatar

Watchers

Maurice Stephens avatar  avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.