Giter Site home page Giter Site logo

contract-metadata's Introduction

@metamask/contract-metadata

A mapping of checksummed Ethereum contract addresses to metadata, like names, and images of their logos.

All address keys follow the EIP 55 address checksum format.

This repository is effectively frozen. We recommend that developers of new tokens use EIP 747 to ask the user's permission to display your tokens in their wallet. This reduces the dangers of airdrop-based phishing, and reduces administrative overhead from managing this list.

Usage

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

import contractMap from '@metamask/contract-metadata'
import ethJSUtil from 'ethereumjs-util'
const { toChecksumAddress } = ethJSUtil

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

imageElFor ("0x06012c8cf97BEaD5deAe237070F9587f8E7A266d")

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.
  • The address should be in checksum format or it will not be accepted.
  • 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.

Release & Publishing

The project follows the same release process as the other libraries in the MetaMask organization. The GitHub Actions action-create-release-pr and action-publish-release are used to automate the release process; see those repositories for more information about how they work.

  1. Choose a release version.

    • The release version should be chosen according to SemVer. Analyze the changes to see whether they include any breaking changes, new features, or deprecations, then choose the appropriate SemVer version. See the SemVer specification for more information.
  2. If this release is backporting changes onto a previous release, then ensure there is a major version branch for that version (e.g. 1.x for a v1 backport release).

    • The major version branch should be set to the most recent release with that major version. For example, when backporting a v1.0.2 release, you'd want to ensure there was a 1.x branch that was set to the v1.0.1 tag.
  3. Trigger the workflow_dispatch event manually for the Create Release Pull Request action to create the release PR.

    • For a backport release, the base branch should be the major version branch that you ensured existed in step 2. For a normal release, the base branch should be the main branch for that repository (which should be the default value).
    • This should trigger the action-create-release-pr workflow to create the release PR.
  4. Update the changelog to move each change entry into the appropriate change category (See here for the full list of change categories, and the correct ordering), and edit them to be more easily understood by users of the package.

    • Generally any changes that don't affect consumers of the package (e.g. lockfile changes or development environment changes) are omitted. Exceptions may be made for changes that might be of interest despite not having an effect upon the published package (e.g. major test improvements, security improvements, improved documentation, etc.).
    • Try to explain each change in terms that users of the package would understand (e.g. avoid referencing internal variables/concepts).
    • Consolidate related changes into one change entry if it makes it easier to explain.
    • Run yarn auto-changelog validate --rc to check that the changelog is correctly formatted.
  5. Review and QA the release.

    • If changes are made to the base branch, the release branch will need to be updated with these changes and review/QA will need to restart again. As such, it's probably best to avoid merging other PRs into the base branch while review is underway.
  6. Squash & Merge the release.

    • This should trigger the action-publish-release workflow to tag the final release commit and publish the release on GitHub.
  7. Publish the release on npm.

    • Wait for the publish-release GitHub Action workflow to finish. This should trigger a second job (publish-npm), which will wait for a run approval by the npm publishers team.
    • Approve the publish-npm job (or ask somebody on the npm publishers team to approve it for you).
    • Once the publish-npm job has finished, check npm to verify that it has been published.

contract-metadata's People

Contributors

ankit5902 avatar antimatter-finance avatar cameronbedford avatar canya-io avatar crowdstartcapital avatar danfinlay avatar daveappleton avatar epiqueras avatar estebanmino avatar flyswatter avatar frankiebee avatar geogeo1 avatar github-actions[bot] avatar gudahtt avatar jennypollack avatar jflatow avatar joshfraser avatar kumavis avatar lrgeoemtry avatar lukezhangstudio avatar markshw avatar mintheredonethat avatar mrabenda avatar nuke-web3 avatar rekmarks avatar rickycodes avatar sjazzz avatar strategicreserve avatar trashertravis avatar xrn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

contract-metadata's Issues

Sending eth to other address in private network returns error

I am using Metamask for my project, and have added ChainId something like 201429310. After a while, Sending transaction gets rejected by rpc with some error message. I've changed chainId to 12345 and it sent transaction successfully. Do I have too long Id or?

Add special fields for tokens

When we add tokens, it would be nice to include some metadata related to them:

{ erc20: true, symbol: 'ETH', decimals: 18 }

This data could make this repo more easily consumable by eth-token-tracker.

When will the CAMP Token image be updated? Can I know the schedule?

When will the CAMP Token image be updated? The token icon is not yet displayed yet. 11 days have passed since I registered. Can I know the schedule?

Thanks.

=======================
Hi,

First, we have to release a new version of this repo and then MetaMask has to include it in the extension release. It can take a few days

Originally posted by @xrn in #676 (comment)

Support ENS names instead of fixed addresses

Would ENS resolution be in the scope of what this metadata repository intends to support?

For example, the Wyvern Protocol is self-upgrading and may change contracts later, so it would be convenient to register the smart contract under an ENS name instead of a fixed address. Other projects with proxy contracts or upgrade mechanisms may share this preference.

Wibson logo sometimes blank

Hello!

We just got our token approved and merged in Metamask (🎉), but for some reason we see that the logo is blank. The format is the right one, it's an .svg image (same as the Ether one), and the weird thing is that if we open the image in a new tab, we can see it, and it automatically appears on metamask extension. Is something cache-related going on here? Because if we refresh the browser a couple of times it fades away again.
We want to advertise this integration but we cannot do it if this happens.

issue

Outdated npm package

A number of new contracts have been added to the list since the npm package was last updated (6 months ago), which results in outdated lists being used for all the software that depends on that npm module.
If automating the package updating process is not a viable option, a possibility could be to tell people to add this git repository as a submodule to their project, so the list will be kept updated.

Images for recently added tokens not appearing in MetaMask

While the latest contract-map.json file is being fetched by the MetaMask Chrome extension (in background.js), the images for all the recently added tokens are not being included. The last one that worked was STAR, but all the recent additions to this list are missing their associated images and are not showing up in MetaMask.

Here are the tokens that are not showing up in MetaMask despite being included in contract-map.json:
GROO, SAN, LPT, HOT, ENJ, ELF, WAX, POWR, XBP, KODA, OGN, REQ, BETHER

GET Protocol logo is missing

Hi guys, Is is possible to add the GET Protocol logo to Metamask? Because another company (Themis) is trying to hijack the ticker, it would be great if the logo could be added to provide recognizably --> security for the users.

Fixed #442

MKR precision is incorrect

MKR has 18 decimals, not 0.

Apparently 18 is pretty common & standard, which makes me nervous about the number of tokens we have listed as 0 decimals.

Any guesses of how many of the other 0 decimal tokens might be incorrectly marked, @mintheredonethat?

Add WETH support

Wrapped-ether is used in many projects, we should represent it. Needs a special logo.

Requesting review and integration of PR for DYNP token

Hi,
I think I've done my part in following the prescribed process to properly implement changes to add our token. I've made sure that the tests pass, etc. However, I'm unsure as to how to get attention to my changes from the MetaMask team. Because only people with white access can approve the review and integrate the changes, that creates somewhat of a bottleneck with the token addition process. I'm asking for your help to get the code review completed so our changes can be integrated.
Thanks,

  • DJ

Check metadata entries

We should check entries for each token on contract-map.json.
This is needed since DGD token had an incorrect decimals entry causing problems on the UI, so maybe there are more tokens with the same issue.

Remove EOS

Now EOS has mainnet, and after tokenswap ERC20-version not using.

Adding BEP20 Contract Meta-Data

Dear all,

Any plans to make adding BEP20 Token metadata possible through github?
Currently this isn't possible as non ERC20 contracts fail address checks.

EIP 747 method works fine, Except for two issues:

  1. users must click a link in order to add it, as opposed to adding the custom token and getting the logo to appear automatically.
  2. EIP747 does not allow Symbols > 6 chars which does not allow for our coin to be added that way either..

Finally, and on the verge of topic, does Binance Chain Wallet pull the metadata from here?

Should there be a listing fee similar to TrustWallet, please get in touch.

Thank you for the time and help!

When will logos be shown in Metamask?

Sorry if you've repeated the answer to this question. My PR got merged a couple of weeks ago but it's still not shown in Metamask. I'm assuming it will be shown in the next update?

Add EOS

0x86fa049857e0209aa7d9e616f7eb3b3b78ecfdb0

Bug: no CI test for overlapping symbols

  • no CI test for overlapping token symbols. For this curated list, we should require unique symbols
  • assuming CI doesn't run against master, so two open PRs against master could be passing CI and merged that violate the above constraint

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

Once you have installed CI on this repository, you’ll need to re-trigger Greenkeeper’s initial Pull Request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper integration’s white list on Github. You'll find this list on your repo or organiszation’s settings page, under Installed GitHub Apps.

Migrating MLN token

Hi there,

I just wanted to check if you are aware that we migrated MLN to a new token contract a couple of months ago. I am unable to see my MLN balance in my Metamask wallet and I assume that is because you are still reading the old contract balance. The announcement of the Migration event is here https://medium.com/melonprotocol/mln-token-migration-event-96b1c8003876 and the instructions were written up here https://medium.com/melonprotocol/mln-token-migration-instructions-196a645fc3ac

Also, I noticed that the logo you are using for the token is actually the company logo (Melonport) and it would be great to update the logo to the protocol logo which can be downloaded here https://github.com/melonproject/branding/blob/master/melon/12_Melon_logo_transparent.png.

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.