From f24835438e3cca5b403638d1af7a9b079811c155 Mon Sep 17 00:00:00 2001 From: Trevor Porter Date: Fri, 8 Nov 2024 12:30:50 +0000 Subject: [PATCH] feat: Added coinGeckoId as an optional property of the TokenConfigSchema (#4842) ### Description - Ripped out of https://github.com/hyperlane-xyz/hyperlane-monorepo/pull/4835, which is necessary so I can merge and release https://github.com/hyperlane-xyz/hyperlane-registry/pull/370 before 4835 ### Drive-by changes ### Related issues ### Backward compatibility ### Testing --- .changeset/thirty-actors-wonder.md | 5 +++++ typescript/sdk/src/token/IToken.ts | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 .changeset/thirty-actors-wonder.md diff --git a/.changeset/thirty-actors-wonder.md b/.changeset/thirty-actors-wonder.md new file mode 100644 index 000000000..6b098fe78 --- /dev/null +++ b/.changeset/thirty-actors-wonder.md @@ -0,0 +1,5 @@ +--- +'@hyperlane-xyz/sdk': minor +--- + +Added coinGeckoId as an optional property of the TokenConfigSchema diff --git a/typescript/sdk/src/token/IToken.ts b/typescript/sdk/src/token/IToken.ts index 28321597c..d903e21e9 100644 --- a/typescript/sdk/src/token/IToken.ts +++ b/typescript/sdk/src/token/IToken.ts @@ -47,6 +47,10 @@ export const TokenConfigSchema = z.object({ .array(TokenConnectionConfigSchema) .optional() .describe('The list of token connections (e.g. warp or IBC)'), + coinGeckoId: z + .string() + .optional() + .describe('The CoinGecko id of the token, used for price lookups'), }); export type TokenArgs = Omit<