Skip to content

Conversation

@paullinator
Copy link
Member

@paullinator paullinator commented Jul 3, 2025

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Description

none

// USDT from solana to ethereum
Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB: {
sourceChain: 'solana', // Only used for easy visual reference
destChain: 'ethereum', // Only used for easy visual reference
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we determine a pluginId ranking to determine which chain is considered the source or trust the coingecko api to remain constant and use the first platform in the array?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What Paul, William, Matt said. mapping keep growing but always look up main db first, mapping 2nd.

_id: 'coinmarketcapTokenIdMap',
data: {
// Maps the contract address to the CMC id
dac17f958d2ee523a2206206994597c13d831ec7: {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chains with numbered tokenIds may have collisions

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use pluginId_tokenId as doc key instead

}
},
tokens: {
dac17f958d2ee523a2206206994597c13d831ec7: {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to pluginId_tokenId as key

_id: '2025-06-23T15:55:00.000Z',
chains: {
bitcoin: {
currencyCode: 'BTC',
Copy link
Member Author

@paullinator paullinator Jul 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to:

{
  bitcoin: {
   '': {
      cc: 'BTC',
      USD: 104124
    },
    '0xasdlkfj': {
    }
}

* get translated by the tokenMappings doc above.
*/

const coinmarketcapPluginIdMap = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both cmc and coingecko utilize platform ids which (in 99% of cases) don't match mainnet asset ids. This map should be platform ID and then we can add the mainnet assets to the tokenId mapping below

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants