GithubHelp home page GithubHelp logo

isabella232 / addresstourl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from consensysmesh/addresstourl

0.0 0.0 0.0 16 KB

Ethereum contract for mapping Ethereum addresses to URLs

Python 100.00%

addresstourl's Introduction

About

The AddressToUrl contract is an Ethereum contract that maps Ethereum addresses to URLs. The transaction sender can set and clear his, and only his, URL entry. The data is public, so that anyone can obtain a URL for an Ethereum address (assuming the mapping exists).

The contract is at address 0xf94e9f9657dcbbe991b175d8a0433cd20704093e .

Features

  • generic string implementation allows for all types of URLs
  • immortal (no one can delete the contract)
  • written in Solidity

API and gas estimate

get_url(address addr) returns (string) (no gas)

  • Gets a URL for an Ethereum address. If the entry does not exist, returns an empty string.

set_url(string url) (gas usage depends on URL size)

  • Sets the sender's URL to url

Source code

contract AddressToUrl {

    mapping (address => string) urls;

    function AddressToUrl() {
    }

    function set_url(string url) {
        urls[msg.sender] = url;
    }

    function get_url(address addr) returns (string) {
        return urls[addr];
    }
}

Compiler version

v0.2.0-2016-01-24-194679f via https://chriseth.github.io/browser-solidity/

See also

  • AddressToIP - mapping Ethereum addresses to IP addresses

addresstourl's People

Contributors

maurycyp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.