Exemplo n.º 1
0
def set_owner(name, address, account, gas=100000, gas_price=''):
    name = get_name_node(name)
    if not gas_price:
        return ens.transact({
            'from': account,
            'gas': gas
        }).setOwner(name, address)
    return ens.transact({
        'from': account,
        'gas': gas,
        'gasPrice': gas_price
    }).setOwner(name, address)
Exemplo n.º 2
0
def set_text(name, key, value, account, gas=100000, gas_price=''):
    name = get_name_node(name)
    if not gas_price:
        return resolver.transact({
            'from': account,
            'gas': gas
        }).setText(name, key, value)
    return resolver.transact({
        'from': account,
        'gas': gas,
        'gasPrice': gas_price
    }).setText(name, key, value)
Exemplo n.º 3
0
def set_resolver(name, resolver, account, gas=100000, gas_price=''):
    name = get_name_node(name)
    if not gas_price:
        return ens.transact({
            'from': account,
            'gas': gas
        }).setResolver(name, resolver)
    return ens.transact({
        'from': account,
        'gas': gas,
        'gasPrice': gas_price
    }).setResolver(name, resolver)
Exemplo n.º 4
0
def set_name(name, name2, account, gas=100000, gas_price=''):
    name = get_name_node(name)
    if not gas_price:
        return resolver.transact({
            'from': account,
            'gas': gas
        }).setName(name, name2)
    return resolver.transact({
        'from': account,
        'gas': gas,
        'gasPrice': gas_price
    }).setName(name, name2)
Exemplo n.º 5
0
def set_content(name, address, account, gas=100000, gas_price=''):
    name = get_name_node(name)
    if not gas_price:
        return resolver.transact({
            'from': account,
            'gas': gas
        }).setContent(name, content)
    return resolver.transact({
        'from': account,
        'gas': gas,
        'gasPrice': gas_price
    }).setContent(name, content)
Exemplo n.º 6
0
def get_ttl(name):
    return ens.call().ttl(get_name_node(name))
Exemplo n.º 7
0
def get_resolver(name):
    return ens.call().resolver(get_name_node(name))
Exemplo n.º 8
0
def get_owner(name):
    return ens.call().owner(get_name_node(name))
Exemplo n.º 9
0
def get_text(name, key):
    return resolver.call().text(get_name_node(name), key)
Exemplo n.º 10
0
def get_name(name):
    return resolver.call().name(get_name_node(name))
Exemplo n.º 11
0
def get_content(name):
    return resolver.call().content(get_name_node(name))
Exemplo n.º 12
0
def get_address(name):
    return resolver.call().addr(get_name_node(name))