GithubHelp home page GithubHelp logo

isabella232 / setzer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from makerdao/setzer

0.0 0.0 0.0 201 KB

manipulate feeds

License: GNU General Public License v3.0

Shell 95.05% Nix 3.15% Makefile 1.80%

setzer's Introduction

NAME

setzer -- manipulate feeds and update data

SYNOPSIS

setzer <command> [<args>]
setzer <command> --help

COMMANDS

command description
average get average price of 2 or more price <source>
bot really cool bot
compute get what the medianizer value would be if updated
expires get expiration in seconds (< 0 means expired)
help print help about setzer(1) or one of its subcommands
peek peek a dsvalue, dscache or medianizer
poke poke a medianizer
post update a ds-price
price show ETH/USD price from <source>
read read a dsvalue, dscache or medianizer
set set next feed of a medianizer
spread variance of 2 values in %
valid check if a dsvalue, dscache or medianizer has a value
void invalidate a feed
volume show ETH/USD volume from <source>

INSTALLATION

setzer depends on seth and jshon.

Install dependencies with Nix:

nix-channel --add https://nix.dapphub.com/pkgs/dapphub
nix-channel --update
nix-env -iA dapphub.{seth,jshon}

Or follow installation process from Dapp tools Installing

make link install setzer(1) into /usr/local
make uninstall uninstall setzer(1) from /usr/local

RUNNING SETZER BOT

setzer bot expects a config file located at /etc/setzer.conf or passed via --config path/to/config.conf

The bot will run with sensible defaults and only needs three things:

  export ETH_FROM="YOUR ACCOUNT"
  export SETZER_FEED="YOUR PRICE-FEED ADDRESS"
  export SETZER_MEDIANIZER="0x729D19f657BD0614b4985Cf1D82531c67569197B"

There are several extra options but you generally will not modify them.

  #The list of price sources. Execute `setzer price` to get list of valid values!
  export SETZER_SOURCES="LIST OF PRICE SOURCES"
  
  #setzer tries to create a price update transaction with increasing gas price to 
  #make sure it gets mined. Starts from $SETZER_INITIAL_GAS_PRICE with $SETZER_GAS_PRICE_INCREMENT 
  #until $SETZER_MAX_GAS_PRICE. 
 
  #initial gas price in Wei
  export SETZER_INITIAL_GAS_PRICE=`seth --to-wei 1 gwei`
  
  #gas price increment in Wei
  export SETZER_GAS_PRICE_INCREMENT=`seth --to-wei 5 gwei`
  
  #max gas price in Wei
  export SETZER_MAX_GAS_PRICE=`seth --to-wei 26 gwei`
  
  #spread between current price and last update price in percentage
  export SETZER_SPREAD=2

  #Seconds to wait between two price fetches
  export SETZER_INTERVAL_SECONDS=120

  #Seconds to wait for price update transaction to execute on blockchain
  # before retrying with higher gas price
  export SETZER_WAIT_FOR_RESEND=240
  
  #automatically update price if needed
  # if set to 1 price will be auto updated if needed on the blockchain
  # if set to '' (empty) price feed will update only if user enters 'y' 
  export SETZER_AUTO=1
  
  #Time to wait for a node to respond
  #default 15s
  export RPC_TIMEOUT=15s

OPTIONS

You can provide any seth option to commands that send transactions.
For example setzer void <feed> -F <account> --gas=100000 -P 1000000000

Report bugs to https://github.com/makerdao/setzer/issues.

Thanks to @dbrock for paving the way with seth and dapp

setzer's People

Contributors

gbalabasquer avatar iamchrissmith avatar konstantinzolotarev avatar mbrock avatar nanexcool avatar r001 avatar zdumitru 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.