-
Notifications
You must be signed in to change notification settings - Fork 2
WIP new rates arch template #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| // USDT from solana to ethereum | ||
| Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB: { | ||
| sourceChain: 'solana', // Only used for easy visual reference | ||
| destChain: 'ethereum', // Only used for easy visual reference |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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: { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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: { |
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
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 = { |
There was a problem hiding this comment.
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
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneDescription
none