From a27387375c353bf3dcfcba04ef24f2c51dc59a74 Mon Sep 17 00:00:00 2001 From: lynn <41491154+lynnshaoyu@users.noreply.github.com> Date: Wed, 5 Jul 2023 18:04:42 -0400 Subject: [PATCH] prettier (#421) --- package.json | 2 +- src/types.ts | 3 +++ test/schema/example.tokenlist.json | 24 ++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index a0042a13..9ac5b0be 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "url": "https://uniswap.org" }, "description": "📚 The Token Lists specification", - "version": "1.0.0-beta.32", + "version": "1.0.0-beta.33", "license": "MIT", "main": "dist/index.js", "typings": "dist/index.d.ts", diff --git a/src/types.ts b/src/types.ts index 335c7d57..9bbeb89f 100644 --- a/src/types.ts +++ b/src/types.ts @@ -39,6 +39,9 @@ export interface TokenList { readonly timestamp: string; readonly version: Version; readonly tokens: TokenInfo[]; + readonly tokenMap?: { + readonly [key: string]: TokenInfo; + }; readonly keywords?: string[]; readonly tags?: Tags; readonly logoURI?: string; diff --git a/test/schema/example.tokenlist.json b/test/schema/example.tokenlist.json index 11cb901f..6c1ec5cf 100644 --- a/test/schema/example.tokenlist.json +++ b/test/schema/example.tokenlist.json @@ -41,6 +41,30 @@ ] } ], + "tokenMap": { + "1_0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48": { + "chainId": 1, + "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + "symbol": "USDC", + "name": "USD Coin", + "decimals": 6, + "logoURI": "ipfs://QmXfzKRvjZz3u5JRgC4v5mGVbm9ahrUiB4DgzHBsnWbTMM", + "tags": [ + "stablecoin" + ] + }, + "1_0x39AA39c021dfbaE8faC545936693aC917d5E7563": { + "chainId": 1, + "address": "0x39AA39c021dfbaE8faC545936693aC917d5E7563", + "symbol": "cUSDC", + "name": "Compound USD Coin", + "decimals": 8, + "logoURI": "ipfs://QmUSNbwUxUYNMvMksKypkgWs8unSm8dX2GjCPBVGZ7GGMr", + "tags": [ + "compound" + ] + } + }, "version": { "major": 1, "minor": 0,