def do_POST(self): content_len = int(self.headers.get('content-length')) post_body = self.rfile.read(content_len) data = json.loads(post_body) datapayments = data["payments"] oracle = pw.Oracle(oracleAddress='3PNikM6yp4NqcSU8guxQtmR5onr2D4e8yTJ') configs = oracle.getData(regex='stakingconfig_current_.*') fconfigs = filterConfigs( map(lambda x: parseConfig(x["value"]), configs)) result = refferalWizard(datapayments, fconfigs) self.send_response(200) self.send_header("Content-type", "application/json") self.end_headers() self.wfile.write(json.dumps(result).encode()) return
import pywaves as py import pandas as pd import json py.setNode('https://privatenode.blackturtle.eu', 'TN', 'L') py.setMatcher('https://privatematcher.blackturtle.eu') py.DEFAULT_BASE_FEE = 2000000 address = py.Address(seed='putyourseedhere') oracle = py.Oracle(seed='putyourseedhere') ##Black liating scams SCAM_URL = "https://raw.githubusercontent.com/BlackTurtle123/TN-community/master/scam-v2.csv" wine_csv_url = SCAM_URL wine_data = pd.read_csv(wine_csv_url, header=None, nrows=None) for value in wine_data.values: print(value[0]) oracle.storeData('scam_<' + value[0] + '>', 'boolean', True, minimalFee=2000000) ##Add basic data provider info oracle.storeData('data_provider_version', 'integer', 0, minimalFee=2000000) oracle.storeData('data_provider_name', 'string', 'Turtle Network', minimalFee=2000000) oracle.storeData('data_provider_email', 'string',
import pywaves as pw from time import sleep import requests as req import json as jsn oraclesSC = "" oracle = pw.Oracle(oracleAddress=oraclesSC) oraclePrice = pw.Oracle(oracleAddress="") address = pw.Address(privateKey='') #production_prk def main(): while True: try: bh = pw.height() r = req.get(url="https://api.binance.com/api/v3/avgPrice", params={'symbol': 'WAVESUSDT'}) if r.status_code == 200: refPrice = float(jsn.loads(r.text)['price']) scPrice = float( (oraclePrice.getData(regex='price')[0])['value']) / 100 diff = 100 * ((refPrice - scPrice) / refPrice) is_blocked_status = (oracle.getData( regex='is_blocked')[0])['value'] if not is_blocked_status and (diff >= 7 or diff <= -10): tx = address.invokeScript( oraclesSC, 'callEmergencyShutdown', [{ "type": "string", "value": "more_7-10prc_price_deviation_from_ref"
import os import pywaves as py import pandas as pd import json py.setNode('https://privatenode.blackturtle.eu', 'TN', 'L') py.setMatcher('https://privatematcher.blackturtle.eu') py.DEFAULT_BASE_FEE = 2000000 address = py.Address(seed=os.getenv("SEED")) oracle = py.Oracle(seed=os.getenv("SEED")) ##Black liating scams SCAM_URL = "https://raw.githubusercontent.com/BlackTurtle123/TN-community/master/scam-v2.csv" wine_csv_url = SCAM_URL wine_data = pd.read_csv(wine_csv_url, header=None, nrows=None) for value in wine_data.values: print(value[0]) oracle.storeData('scam_<' + value[0] + '>', 'boolean', True, minimalFee=2000000) ##Add basic data provider info oracle.storeData('data_provider_version', 'integer', 0, minimalFee=2000000) oracle.storeData('data_provider_name', 'string', 'Turtle Network', minimalFee=2000000)
import pywaves as py import pandas as pd py.setNode('https://privatenode.blackturtle.eu', 'TN', 'L') py.setMatcher('https://privatematcher.blackturtle.eu') py.DEFAULT_BASE_FEE = 2000000 address = py.Address( seed="inputyourseedhere") oracle = py.Oracle( seed="inputyourseedhere") ##Black liating scams SCAM_URL = "https://raw.githubusercontent.com/BlackTurtle123/TN-community/master/scam-v2.csv" wine_csv_url = SCAM_URL wine_data = pd.read_csv(wine_csv_url, header=None, nrows=None) for value in wine_data.values: print(value[0]) oracle.storeData('scam_<'+value[0]+'>','boolean',True,minimalFee=2000000) ##Add basic data provider info oracle.storeData('data_provider_version', 'integer', 0, minimalFee=2000000) oracle.storeData('data_provider_name', 'string', 'Turtle Network', minimalFee=2000000) oracle.storeData('data_provider_email', 'string', '*****@*****.**', minimalFee=2000000) oracle.storeData('data_provider_lang_list', 'string', 'en', minimalFee=2000000) oracle.storeData('data_provider_link', 'string', 'https://turtlenetwork.eu', minimalFee=2000000) oracle.storeData('data_provider_description_<en>', 'string', 'Description https://turtlenetwork.eu', minimalFee=2000000) oracle.storeData('data_provider_logo_meta', 'string', 'data:image/svg+xml;base64', minimalFee=2000000)
import pywaves as py import pandas as pd import json py.setNode('https://privatenode.blackturtle.eu', 'TN', 'L') py.setMatcher('https://privatematcher.blackturtle.eu') py.DEFAULT_BASE_FEE = 2000000 address = py.Address(seed='no no') oracle = py.Oracle(seed='no no') ##Black liating scams SCAM_URL = "https://raw.githubusercontent.com/BlackTurtle123/TN-community/master/scam-v2.csv" wine_csv_url = SCAM_URL wine_data = pd.read_csv(wine_csv_url, header=None, nrows=None) for value in wine_data.values: print(value[0]) oracle.storeData('scam_<' + value[0] + '>', 'boolean', True, minimalFee=2000000) ##Add basic data provider info oracle.storeData('data_provider_version', 'integer', 0, minimalFee=2000000) oracle.storeData('data_provider_name', 'string', 'CryptoBrokers', minimalFee=2000000) oracle.storeData('data_provider_email', 'string',