mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
Move coin specs to a separate module, and make a monero module
This commit is contained in:
parent
39b2e64516
commit
2dda53240c
3 changed files with 37 additions and 7 deletions
5
README
5
README
|
@ -12,6 +12,11 @@ for these in tipbot.py.
|
|||
Before starting, read the configuration parameters at the top of tipbot.py and change
|
||||
as appropriate.
|
||||
|
||||
Start the bot with the coin name as parameter (eg, python tipbot.py monero). Coin specs
|
||||
are defined in a file called tipbot_<coin-name>.py. If you want to add a coin that the
|
||||
tipbot does not support yet, simply copy an existing spec module and adapt to that coin's
|
||||
particular specs.
|
||||
|
||||
The tipbot will need a wallet. Any wallet can do, but it is recommended to use a separate
|
||||
wallet. This wallet should be loaded in the simplewallet the tipbot connects to.
|
||||
|
||||
|
|
21
tipbot.py
21
tipbot.py
|
@ -10,6 +10,7 @@
|
|||
# any later version.
|
||||
#
|
||||
|
||||
import sys
|
||||
import socket
|
||||
import select
|
||||
import sys
|
||||
|
@ -22,6 +23,18 @@ import httplib
|
|||
import time
|
||||
import string
|
||||
|
||||
try:
|
||||
setup = sys.argv[1]
|
||||
except Exception,e:
|
||||
print 'Usage: tipbot.py <coinname>'
|
||||
exit(1)
|
||||
try:
|
||||
print('Importing %s module' % setup)
|
||||
exec "from tipbot_%s import coin_name, coin, coin_denominations, address_length, address_prefix, min_withdrawal_fee, web_wallet_url" % setup
|
||||
except Exception,e:
|
||||
print 'Failed to load setup for %s: %s' % (setup, str(e))
|
||||
exit(1)
|
||||
|
||||
tipbot_name = "monero-testnet-tipbot"
|
||||
irc_network = 'irc.freenode.net'
|
||||
irc_port = 6667
|
||||
|
@ -36,16 +49,10 @@ bitmonerod_port = 28081 # 6060
|
|||
wallet_host = '127.0.0.1'
|
||||
wallet_port = 6061
|
||||
wallet_update_time = 30 # seconds
|
||||
coin=1e12
|
||||
coin_name = "Monero"
|
||||
coin_denominations = [[1000000, 1, "piconero"], [1000000000, 1e6, "micronero"], [1000000000000, 1e9, "millinero"]]
|
||||
address_length = [95, 95] # min/max size of addresses
|
||||
address_prefix = ['4', '9'] # allowed prefixes of addresses
|
||||
withdrawal_fee = 10000000000
|
||||
withdrawal_fee=min_withdrawal_fee
|
||||
min_withdraw_amount = 2*withdrawal_fee
|
||||
withdraw_disabled = False
|
||||
disable_withdraw_on_error = True
|
||||
web_wallet_url = "https://mymonero.com/" # None is there's none
|
||||
|
||||
admins = ["moneromooo", "moneromoo"]
|
||||
|
||||
|
|
18
tipbot_monero.py
Normal file
18
tipbot_monero.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/python
|
||||
#
|
||||
# Cryptonote tipbot - monero setup
|
||||
# Copyright 2014 moneromooo
|
||||
#
|
||||
# The Cryptonote tipbot is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as published
|
||||
# by the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
|
||||
coin_name="Monero"
|
||||
coin=1e12
|
||||
coin_denominations = [[1000000, 1, "piconero"], [1000000000, 1e6, "micronero"], [1000000000000, 1e9, "millinero"]]
|
||||
address_length = [95, 95] # min/max size of addresses
|
||||
address_prefix = ['4', '9'] # allowed prefixes of addresses
|
||||
min_withdrawal_fee = 10000000000
|
||||
web_wallet_url = "https://mymonero.com/" # None is there's none
|
Loading…
Reference in a new issue