Esempio n. 1
0
def send_domain(name, frm, price):
    resp = rpc_call('tx.ONS_CreateRawSend', {
        "name": name,
        "from": frm,
        "amount": {
            "currency": "OLT",
            "value": converBigInt(price),
        },
        "gasPrice": {
            "currency": "OLT",
            "value": "1000000000",
        },
        "gas": 40000,
    })
    return resp["result"]["rawTx"]
Esempio n. 2
0
def send(frm, to, amt, cur):
    resp = rpc_call('tx.CreateRawSend', {
        "from": frm,
        "to": to,
        "amount": {
            "currency": cur,
            "value": converBigInt(amt),
        },
        "gasPrice": {
            "currency": "OLT",
            "value": "1000000000",
        },
        "gas": 40000,
    })
    return resp["result"]["rawTx"]
Esempio n. 3
0
def buy_domain(name, buyer, price):
    resp = rpc_call('tx.ONS_CreateRawBuy', {
        "name": name,
        "buyer": buyer,
        "account": buyer,
        "offering": {
            "currency": "OLT",
            "value": converBigInt(price),
        },
        "gasPrice": {
            "currency": "OLT",
            "value": "1000000000",
        },
        "gas": 40000,
    })
    return resp["result"]["rawTx"]
Esempio n. 4
0
def cancel_sell_domain(name, owner_hex, price):
    resp = rpc_call('tx.ONS_CreateRawSale', {
        "name": name,
        "owner": owner_hex,
        "price": {
            "currency": "OLT",
            "value": converBigInt(price),
        },
        "cancelSale": True,
        "gasPrice": {
            "currency": "OLT",
            "value": "1000000000",
        },
        "gas": 40000,
    })
    return resp["result"]["rawTx"]
Esempio n. 5
0
def create_domain(name, owner_hex, price):
    req = {
        "name": name,
        "owner": owner_hex,
        "account": owner_hex,
        "buyingPrice": {
            "currency": "OLT",
            "value": converBigInt(price),
        },
        "gasPrice": {
            "currency": "OLT",
            "value": "1000000000",
        },
        "gas": 40000,
    }
    resp = rpc_call('tx.ONS_CreateRawCreate', req)
    return resp["result"]["rawTx"]