Skip to content

A bot that sells a token via conditional payment smart contracts

License

Notifications You must be signed in to change notification settings

byteball/conditional-token-sale

Repository files navigation

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.

About

A bot that sells a token via conditional payment smart contracts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published