示例#1
0
文件: ens.py 项目: xiaojay/ens.py
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)
示例#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)
示例#3
0
文件: ens.py 项目: xiaojay/ens.py
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)
示例#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)
示例#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)
示例#6
0
文件: ens.py 项目: xiaojay/ens.py
def get_ttl(name):
    return ens.call().ttl(get_name_node(name))
示例#7
0
文件: ens.py 项目: xiaojay/ens.py
def get_resolver(name):
    return ens.call().resolver(get_name_node(name))
示例#8
0
文件: ens.py 项目: xiaojay/ens.py
def get_owner(name):
    return ens.call().owner(get_name_node(name))
示例#9
0
def get_text(name, key):
    return resolver.call().text(get_name_node(name), key)
示例#10
0
def get_name(name):
    return resolver.call().name(get_name_node(name))
示例#11
0
def get_content(name):
    return resolver.call().content(get_name_node(name))
示例#12
0
def get_address(name):
    return resolver.call().addr(get_name_node(name))