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"]
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"]
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"]
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"]
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"]