diff --git a/pdr_backend/models/test/test_predictoor_contract.py b/pdr_backend/models/test/test_predictoor_contract.py index f009927ac..5e670ddc2 100644 --- a/pdr_backend/models/test/test_predictoor_contract.py +++ b/pdr_backend/models/test/test_predictoor_contract.py @@ -104,7 +104,7 @@ def test_soonest_timestamp_to_predict(predictoor_contract): @enforce_types def test_get_trueValSubmitTimeout(predictoor_contract): trueValSubmitTimeout = predictoor_contract.get_trueValSubmitTimeout() - assert trueValSubmitTimeout == 4 * 12 * SECONDS_PER_EPOCH + assert trueValSubmitTimeout == 3 * 24 * 60 * 60 @enforce_types diff --git a/pdr_backend/publisher/main.py b/pdr_backend/publisher/main.py index a57defbbf..48e1727b7 100644 --- a/pdr_backend/publisher/main.py +++ b/pdr_backend/publisher/main.py @@ -25,45 +25,67 @@ if web3_config.w3.eth.chain_id == 8996: fund_dev_accounts(accounts_to_fund, web3_config.owner, OCEAN) + publish( + s_per_epoch=300, + s_per_subscription=60 * 60 * 24, + base="ETH", + quote="USDT", + source="binance", + timeframe="5m", + trueval_submitter_addr="0xe2DD09d719Da89e5a3D0F2549c7E24566e947260", # on arge + feeCollector_addr="0xe2DD09d719Da89e5a3D0F2549c7E24566e947260", + rate=3, + cut=0.2, + web3_config=web3_config, + ) -publish( - s_per_epoch=300, - s_per_subscription=60 * 60 * 24, - base="ETH", - quote="USDT", - source="kraken", - timeframe="5m", - trueval_submitter_addr="0xe2DD09d719Da89e5a3D0F2549c7E24566e947260", # on arge - feeCollector_addr="0xe2DD09d719Da89e5a3D0F2549c7E24566e947260", - rate=3, - cut=0.2, - web3_config=web3_config, -) + publish( + s_per_epoch=300, + s_per_subscription=60 * 60 * 24, + base="BTC", + quote="TUSD", + source="binance", + timeframe="5m", + trueval_submitter_addr="0xe2DD09d719Da89e5a3D0F2549c7E24566e947260", + feeCollector_addr="0xe2DD09d719Da89e5a3D0F2549c7E24566e947260", + rate=3, + cut=0.2, + web3_config=web3_config, + ) -publish( - s_per_epoch=300, - s_per_subscription=60 * 60 * 24, - base="BTC", - quote="TUSD", - source="binance", - timeframe="5m", - trueval_submitter_addr="0xe2DD09d719Da89e5a3D0F2549c7E24566e947260", - feeCollector_addr="0xe2DD09d719Da89e5a3D0F2549c7E24566e947260", - rate=3, - cut=0.2, - web3_config=web3_config, -) + publish( + s_per_epoch=300, + s_per_subscription=60 * 60 * 24, + base="XRP", + quote="USDT", + source="binance", + timeframe="5m", + trueval_submitter_addr="0xe2DD09d719Da89e5a3D0F2549c7E24566e947260", + feeCollector_addr="0xe2DD09d719Da89e5a3D0F2549c7E24566e947260", + rate=3, + cut=0.2, + web3_config=web3_config, + ) -publish( - s_per_epoch=300, - s_per_subscription=60 * 60 * 24, - base="XRP", - quote="USDT", - source="binance", - timeframe="5m", - trueval_submitter_addr="0xe2DD09d719Da89e5a3D0F2549c7E24566e947260", - feeCollector_addr="0xe2DD09d719Da89e5a3D0F2549c7E24566e947260", - rate=3, - cut=0.2, - web3_config=web3_config, -) +if web3_config.w3.eth.chain_id == 23295: + rate = 3 / (1 + 0.2 + 0.001) + pair_list = ["BTC", "ETH", "BNB", "XRP", "ADA", "DOGE", "SOL", "LTC", "TRX", "DOT"] + helper_contract = get_address(web3_config.w3.eth.chain_id, "PredictoorHelper") + + for pair in pair_list: + publish( + s_per_epoch=300, + s_per_subscription=60 * 60 * 24, + base=pair, + quote="USDT", + source="binance", + timeframe="5m", + trueval_submitter_addr=helper_contract, + feeCollector_addr="0xe2DD09d719Da89e5a3D0F2549c7E24566e947260", + rate=rate, + cut=0.2, + web3_config=web3_config, + ) + +if web3_config.w3.eth.chain_id == 23294: + raise NotImplementedError("Mainnet deployment configuration is missing") diff --git a/pdr_backend/publisher/publish.py b/pdr_backend/publisher/publish.py index 7a6747569..7374f006e 100644 --- a/pdr_backend/publisher/publish.py +++ b/pdr_backend/publisher/publish.py @@ -42,7 +42,7 @@ def publish( web3_config, ): pair = base + "/" + quote - trueval_timeout = 4 * 12 * s_per_epoch + trueval_timeout = 60 * 60 * 24 * 3 owner = web3_config.owner ocean_address = get_address(web3_config.w3.eth.chain_id, "Ocean") fre_address = get_address(web3_config.w3.eth.chain_id, "FixedPrice")