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)
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)
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)
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)
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)
def get_ttl(name): return ens.call().ttl(get_name_node(name))
def get_resolver(name): return ens.call().resolver(get_name_node(name))
def get_owner(name): return ens.call().owner(get_name_node(name))
def get_text(name, key): return resolver.call().text(get_name_node(name), key)
def get_name(name): return resolver.call().name(get_name_node(name))
def get_content(name): return resolver.call().content(get_name_node(name))
def get_address(name): return resolver.call().addr(get_name_node(name))