Name: addresstoip
Owner: ConsenSys
Description: Ethereum contracts for mapping Ethereum addresses to IP addresses
Created: 2015-12-07 06:37:42.0
Updated: 2016-12-03 01:53:16.0
Pushed: 2016-01-30 01:21:11.0
Homepage: null
Size: 19
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
The AddressToIP contracts are a pair of Ethereum contracts that map Ethereum addresses to IP addresses. The transaction sender can set and delete his, and only his, IP address entry. The data is public, so that anyone can obtain an IP for an Ethereum address (assuming the mapping exists).
The IPv4 contract is at address 0xd21e907c322c69a9932135eeb1d52fe5b661179a .
The IPv6 contract is at address 0x93a2863108236d86b3b02f851e0620af16d59568 .
get_ip(address addr) returns (uint32)
(no gas)
set_ip(uint32 ip)
(20,318 gas)
ip
delete_ip()
(20,295 gas)
get_ip(address addr) returns (uint128)
(no gas)
set_ip(uint128 ip)
(20,362 gas)
ip
delete_ip()
(20,273 gas)
ract AddressToIPv4 {
mapping (address => uint32) ips;
function AddressToIPv4() {
}
function set_ip(uint32 ip) {
ips[msg.sender] = ip;
}
function delete_ip() {
delete ips[msg.sender];
}
function get_ip(address addr) returns (uint32) {
return ips[addr];
}
ract AddressToIPv6 {
mapping (address => uint128) ips;
function AddressToIPv6() {
}
function set_ip(uint128 ip) {
ips[msg.sender] = ip;
}
function delete_ip() {
delete ips[msg.sender];
}
function get_ip(address addr) returns (uint128) {
return ips[addr];
}
0.1.6-0/Release-Linux/g++/int linked to libethereum-0.9.93-0/Release-Linux/g++/int