Giter Site home page Giter Site logo

conditional-token-sale's Introduction

Conditional token sale bot

This chatbot sells one asset for another via conditional payment smart contracts. It is unidirectional sale only, the bot doesn't offer the reverse exchange.

By default, it sells blackbytes for bytes but you can customize it to sell your token by editing the conf.

The exchange rate is fixed and set in the conf.

Install

Install node.js, clone the repository, then run:

npm install
node db_import.js

Testnet

Set testnet environment variable to 1, you can do it by copying the .env.testnet example file:

cp .env.testnet .env

Run

node sale.js 2>errlog

Control

Since the bot includes a headless wallet, you can chat with it, see its balance, and withdraw funds.

Customize

See the settings conf.js. The ones you would probably want to change are exchangeRate, assetToSell*, and assetToReceive*. To override them, add the corresponding keys in your conf.json (see core documentation about conf).

TOR is recommended since you are keeping your private keys online and don't want your IP address to be known. See core documentation about TOR.

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.