Skip to content

Commit

Permalink
feat: add tokenMap to schema (#420)
Browse files Browse the repository at this point in the history
* init

* add more detail to tokenMap schema

* bump pkg version
  • Loading branch information
lynnshaoyu authored Jul 5, 2023
1 parent abe195a commit 395b5d6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"url": "https://uniswap.org"
},
"description": "📚 The Token Lists specification",
"version": "1.0.0-beta.31",
"version": "1.0.0-beta.32",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
24 changes: 24 additions & 0 deletions src/tokenlist.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,30 @@
"minItems": 1,
"maxItems": 10000
},
"tokenMap": {
"type": "object",
"description": "A mapping of key 'chainId_tokenAddress' to its corresponding token object",
"minProperties": 1,
"maxProperties": 10000,
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/definitions/TokenInfo"
},
"examples": [
{
"4_0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984": {
"name": "Uniswap",
"address": "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",
"symbol": "UNI",
"decimals": 18,
"chainId": 4,
"logoURI": "ipfs://QmXttGpZrECX5qCyXbBQiqgQNytVGeZW5Anewvh2jc4psg"
}
}
]
},
"keywords": {
"type": "array",
"description": "Keywords associated with the contents of the list; may be used in list discoverability",
Expand Down

6 comments on commit 395b5d6

@OSMANDOGAM
Copy link

Choose a reason for hiding this comment

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

osmandogam

@Maggio2019
Copy link

Choose a reason for hiding this comment

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

Thanks

@Keith2312
Copy link

Choose a reason for hiding this comment

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

@Keith2312
Copy link

Choose a reason for hiding this comment

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

@Keith2312
Copy link

Choose a reason for hiding this comment

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

Keith Lexington Jenkins , blockcha
Screenshot_2024-04-07-12-23-21-451

@Keith2312
Copy link

Choose a reason for hiding this comment

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

Keith Lexington Jenkins , blockcha Screenshot_2024-04-07-12-23-21-451

P

Please sign in to comment.