From 28af80873ab4359533d87e4584af8e2fcb744217 Mon Sep 17 00:00:00 2001 From: nahuhh <50635951+nahuhh@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:38:46 +0000 Subject: [PATCH] chainparams: increase min and max order sizes --- basicswap/chainparams.py | 144 ++++++++++++++++++------------------ basicswap/ui/page_offers.py | 2 +- scripts/createoffers.py | 4 +- 3 files changed, 75 insertions(+), 75 deletions(-) diff --git a/basicswap/chainparams.py b/basicswap/chainparams.py index e7a561f..c1ce0ef 100644 --- a/basicswap/chainparams.py +++ b/basicswap/chainparams.py @@ -48,8 +48,8 @@ chainparams = { "stealth_key_prefix": 0x14, "hrp": "pw", "bip44": 44, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, "testnet": { "rpcport": 51935, @@ -59,8 +59,8 @@ chainparams = { "stealth_key_prefix": 0x15, "hrp": "tpw", "bip44": 1, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, "regtest": { "rpcport": 51936, @@ -70,8 +70,8 @@ chainparams = { "stealth_key_prefix": 0x15, "hrp": "rtpw", "bip44": 1, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, }, Coins.BTC: { @@ -87,8 +87,8 @@ chainparams = { "key_prefix": 128, "hrp": "bc", "bip44": 0, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, "testnet": { "rpcport": 18332, @@ -97,8 +97,8 @@ chainparams = { "key_prefix": 239, "hrp": "tb", "bip44": 1, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, "name": "testnet3", }, "regtest": { @@ -108,8 +108,8 @@ chainparams = { "key_prefix": 239, "hrp": "bcrt", "bip44": 1, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, }, Coins.LTC: { @@ -126,8 +126,8 @@ chainparams = { "key_prefix": 176, "hrp": "ltc", "bip44": 2, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, "testnet": { "rpcport": 19332, @@ -137,8 +137,8 @@ chainparams = { "key_prefix": 239, "hrp": "tltc", "bip44": 1, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, "name": "testnet4", }, "regtest": { @@ -149,8 +149,8 @@ chainparams = { "key_prefix": 239, "hrp": "rltc", "bip44": 1, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, }, Coins.DCR: { @@ -165,8 +165,8 @@ chainparams = { "script_address": 0x071A, "key_prefix": 0x22DE, "bip44": 42, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, "testnet": { "rpcport": 19109, @@ -174,8 +174,8 @@ chainparams = { "script_address": 0x0EFC, "key_prefix": 0x230E, "bip44": 1, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, "name": "testnet3", }, "regtest": { # simnet @@ -184,8 +184,8 @@ chainparams = { "script_address": 0x0E6C, "key_prefix": 0x2307, "bip44": 1, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, }, Coins.NMC: { @@ -200,8 +200,8 @@ chainparams = { "script_address": 13, "hrp": "nc", "bip44": 7, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, "testnet": { "rpcport": 18336, @@ -209,8 +209,8 @@ chainparams = { "script_address": 196, "hrp": "tn", "bip44": 1, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, "name": "testnet3", }, "regtest": { @@ -219,8 +219,8 @@ chainparams = { "script_address": 196, "hrp": "ncrt", "bip44": 1, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, }, Coins.XMR: { @@ -231,22 +231,22 @@ chainparams = { "mainnet": { "rpcport": 18081, "walletrpcport": 18082, - "min_amount": 100000, - "max_amount": 10000 * XMR_COIN, + "min_amount": 1000000000, + "max_amount": 10000000 * XMR_COIN, "address_prefix": 18, }, "testnet": { "rpcport": 28081, "walletrpcport": 28082, - "min_amount": 100000, - "max_amount": 10000 * XMR_COIN, + "min_amount": 1000000000, + "max_amount": 10000000 * XMR_COIN, "address_prefix": 18, }, "regtest": { "rpcport": 18081, "walletrpcport": 18082, - "min_amount": 100000, - "max_amount": 10000 * XMR_COIN, + "min_amount": 1000000000, + "max_amount": 10000000 * XMR_COIN, "address_prefix": 18, }, }, @@ -258,22 +258,22 @@ chainparams = { "mainnet": { "rpcport": 34568, "walletrpcport": 34572, # todo - "min_amount": 100000, - "max_amount": 10000 * WOW_COIN, + "min_amount": 100000000, + "max_amount": 10000000 * WOW_COIN, "address_prefix": 4146, }, "testnet": { "rpcport": 44568, "walletrpcport": 44572, - "min_amount": 100000, - "max_amount": 10000 * WOW_COIN, + "min_amount": 100000000, + "max_amount": 10000000 * WOW_COIN, "address_prefix": 4146, }, "regtest": { "rpcport": 54568, "walletrpcport": 54572, - "min_amount": 100000, - "max_amount": 10000 * WOW_COIN, + "min_amount": 100000000, + "max_amount": 10000000 * WOW_COIN, "address_prefix": 4146, }, }, @@ -293,8 +293,8 @@ chainparams = { "script_address": 13, "key_prefix": 212, "bip44": 119, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, "testnet": { "rpcport": 51475, @@ -302,8 +302,8 @@ chainparams = { "script_address": 19, "key_prefix": 239, "bip44": 1, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, "name": "testnet4", }, "regtest": { @@ -312,8 +312,8 @@ chainparams = { "script_address": 19, "key_prefix": 239, "bip44": 1, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, }, Coins.DASH: { @@ -331,8 +331,8 @@ chainparams = { "key_prefix": 204, "hrp": "", "bip44": 5, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, "testnet": { "rpcport": 19998, @@ -341,8 +341,8 @@ chainparams = { "key_prefix": 239, "hrp": "", "bip44": 1, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, "regtest": { "rpcport": 18332, @@ -351,8 +351,8 @@ chainparams = { "key_prefix": 239, "hrp": "", "bip44": 1, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, }, Coins.FIRO: { @@ -371,8 +371,8 @@ chainparams = { "key_prefix": 210, "hrp": "", "bip44": 136, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, "testnet": { "rpcport": 18888, @@ -381,8 +381,8 @@ chainparams = { "key_prefix": 185, "hrp": "", "bip44": 1, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, "regtest": { "rpcport": 28888, @@ -391,8 +391,8 @@ chainparams = { "key_prefix": 239, "hrp": "", "bip44": 1, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, }, Coins.NAV: { @@ -410,8 +410,8 @@ chainparams = { "key_prefix": 150, "hrp": "", "bip44": 130, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, "testnet": { "rpcport": 44445, @@ -420,8 +420,8 @@ chainparams = { "key_prefix": 239, "hrp": "", "bip44": 1, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, "regtest": { "rpcport": 44446, @@ -430,8 +430,8 @@ chainparams = { "key_prefix": 239, "hrp": "", "bip44": 1, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, }, Coins.BCH: { @@ -453,8 +453,8 @@ chainparams = { "key_prefix": 128, "hrp": "bitcoincash", "bip44": 0, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, "testnet": { "rpcport": 18332, @@ -463,8 +463,8 @@ chainparams = { "key_prefix": 239, "hrp": "bchtest", "bip44": 1, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, "name": "testnet3", }, "regtest": { @@ -474,8 +474,8 @@ chainparams = { "key_prefix": 239, "hrp": "bchreg", "bip44": 1, - "min_amount": 1000, - "max_amount": 100000 * COIN, + "min_amount": 100000, + "max_amount": 10000000 * COIN, }, }, } diff --git a/basicswap/ui/page_offers.py b/basicswap/ui/page_offers.py index 95ab258..9119cfc 100644 --- a/basicswap/ui/page_offers.py +++ b/basicswap/ui/page_offers.py @@ -472,7 +472,7 @@ def page_newoffer(self, url_split, post_string): "lockmins": 30, # used in debug mode "debug_ui": swap_client.debug_ui, "automation_strat_id": -1, - "amt_bid_min": format_amount(1000, 8), + "amt_bid_min": format_amount(1, 3), "swap_type": strSwapType(SwapTypes.SELLER_FIRST), } diff --git a/scripts/createoffers.py b/scripts/createoffers.py index 1d94538..8026eff 100755 --- a/scripts/createoffers.py +++ b/scripts/createoffers.py @@ -222,9 +222,9 @@ def readConfig(args, known_coins): num_changes += 1 bid_templates_map[bid_template["name"]] = bid_template - if bid_template.get("min_swap_amount", 0.0) < 0.00001: + if bid_template.get("min_swap_amount", 0.0) < 0.001: print("Setting min_swap_amount for bid template", bid_template["name"]) - bid_template["min_swap_amount"] = 0.00001 + bid_template["min_swap_amount"] = 0.001 if "address" not in bid_template: print("Setting address to auto for bid", bid_template["name"])