Go to file
Victor Baranov 68f4fe118c Update address 2018-09-11 16:32:21 +03:00
.circleci fix circleci working directory 2018-08-31 14:34:54 -03:00
images POA20 token 2018-09-11 16:21:06 +03:00
test update symbol length test 2018-08-20 18:23:19 -03:00
.gitignore gitignore - ignore standard os tmp files 2018-02-28 11:52:01 -08:00
CONTRIBUTING.md update Criteria 2018-04-16 17:02:13 -07:00
README.md update readme 2018-08-14 13:24:26 -03:00
contract-map.json Update address 2018-09-11 16:32:21 +03:00
index.js Refactored to be generic contract metadata map 2017-05-26 09:55:23 -07:00
package.json Version 1.8.0 2018-06-22 19:45:09 -04:00
permitted-fields.json Add permitted fields test enforcement 2017-06-07 16:57:37 -07:00

README.md

Ethereum Contract Metadata CircleCI

Greenkeeper badge

A mapping of checksummed ethereum addresses to metadata, like names, and images of those addresses' logos.

All address keys follow the EIP 55 address checksum format.

Submit PRs to add valid logos, and obviously valid logos will be merged.

Usage

You can install from npm with npm install eth-contract-metadata and use it in your code like this:

const contractMap = require('eth-contract-metadata')
const toChecksumAddress = require('ethereumjs-util').toChecksumAddress

function imageElFor (address) {
  const metadata = iconMap[toChecksumAddress(address)]
  if (!('logo' in metadata)) {
    return false
  }
  const fileName = metadata.logo
  const path = `images/contract/${fileName}`
  const img = document.createElement('img')
  img.src = path
  img.style.width = '100%'
  return img
}

Submission Process

Maintaining this list is a considerable chore, and it is not our highest priority. We do not guarantee inclusion in this list on any urgent timeline. We are actively looking for fair and safe ways to maintain a list like this in a decentralized way, because maintaining it is a large and security-delicate task.

  1. Fork this repository.
  2. Add your logo image in a web-safe format to the images folder.
  3. Add an entry to the contract-map.json file with the specified address as the key, and the image file's name as the value.

Criteria:

  • The icon should be small, square, but high resolution, ideally a vector/svg.
  • Do not add your entry to the end of the JSON map, messing with the trailing comma. Your pull request should only be an addition of lines, and any line removals should be deliberate deprecations of those logos.
  • PR should include link to official project website referencing the suggested address.
  • Project website should include explanation of project.
  • Project should have clear signs of activity, either traffic on the network, activity on GitHub, or community buzz.
  • Nice to have a verified source code on a block explorer like Etherscan.
  • Must have a 'NEUTRAL' reputation or 'OK' reputation on Etherscan.

A sample submission:

{
  "0x6090A6e47849629b7245Dfa1Ca21D94cd15878Ef": {
    "name": "ENS Registrar",
    "logo": "ens.svg"
  }
}

Tokens should include a field "erc20": true, and can include additional fields:

  • symbol (a five-character or less ticker symbol)
  • decimals (precision of the tokens stored)

A full list of permitted fields can be found in the permitted-fields.json file.