diff --git a/.changeset/ten-ladybugs-cover.md b/.changeset/ten-ladybugs-cover.md new file mode 100644 index 0000000..86123ae --- /dev/null +++ b/.changeset/ten-ladybugs-cover.md @@ -0,0 +1,5 @@ +--- +"@mangrovedao/mgv": patch +--- + +Add flag for mgv test tokens diff --git a/src/addresses/tokens/base-sepolia.ts b/src/addresses/tokens/base-sepolia.ts index 947af6f..122a528 100644 --- a/src/addresses/tokens/base-sepolia.ts +++ b/src/addresses/tokens/base-sepolia.ts @@ -19,6 +19,7 @@ export const baseSepoliaWBTC = buildToken({ decimals: 8, displayDecimals: 5, priceDisplayDecimals: 6, + mgvTestToken: true, }) export const baseSepoliaDAI = buildToken({ @@ -26,6 +27,7 @@ export const baseSepoliaDAI = buildToken({ symbol: 'DAI', displayDecimals: 2, priceDisplayDecimals: 2, + mgvTestToken: true, }) export const baseSepoliaTokens = [ diff --git a/src/addresses/tokens/utils.ts b/src/addresses/tokens/utils.ts index 8e4476e..6efb2d4 100644 --- a/src/addresses/tokens/utils.ts +++ b/src/addresses/tokens/utils.ts @@ -10,12 +10,14 @@ export type Token< TDecimals extends number = number, TDisplayDecimals extends number = number, TPriceDisplayDecimals extends number = number, + TMGVTestToken extends boolean = boolean, > = { address: TAddress symbol: TSymbol decimals: TDecimals displayDecimals: TDisplayDecimals priceDisplayDecimals: TPriceDisplayDecimals + mgvTestToken: TMGVTestToken } export type BuildTokenParms< @@ -24,12 +26,14 @@ export type BuildTokenParms< TDecimals extends number | undefined = number | undefined, TDisplayDecimals extends number | undefined = number | undefined, TPriceDisplayDecimals extends number | undefined = number | undefined, + TMGVTestToken extends boolean | undefined = boolean | undefined, > = { address: TAddress symbol: TSymbol decimals?: TDecimals | undefined displayDecimals?: TDisplayDecimals | undefined priceDisplayDecimals?: TPriceDisplayDecimals | undefined + mgvTestToken?: TMGVTestToken | undefined } export function buildToken< @@ -38,18 +42,21 @@ export function buildToken< TDecimals extends number | undefined = undefined, TDisplayDecimals extends number | undefined = undefined, TPriceDisplayDecimals extends number | undefined = undefined, + TMGVTestToken extends boolean | undefined = undefined, >({ address, symbol, decimals = DEFAULT_DECIMALS, displayDecimals = DEFAULT_DISPLAY_DECIMALS, priceDisplayDecimals = DEFAULT_PRICE_DISPLAY_DECIMALS, + mgvTestToken = false, }: BuildTokenParms< TAddress, TSymbol, TDecimals, TDisplayDecimals, - TPriceDisplayDecimals + TPriceDisplayDecimals, + TMGVTestToken >): Token< TAddress, TSymbol, @@ -59,7 +66,8 @@ export function buildToken< : typeof DEFAULT_DISPLAY_DECIMALS, TPriceDisplayDecimals extends number ? TPriceDisplayDecimals - : typeof DEFAULT_PRICE_DISPLAY_DECIMALS + : typeof DEFAULT_PRICE_DISPLAY_DECIMALS, + TMGVTestToken extends boolean ? TMGVTestToken : false > { return { address, @@ -67,6 +75,7 @@ export function buildToken< decimals, displayDecimals, priceDisplayDecimals, + mgvTestToken, } as Token< TAddress, TSymbol, @@ -76,6 +85,7 @@ export function buildToken< : typeof DEFAULT_DISPLAY_DECIMALS, TPriceDisplayDecimals extends number ? TPriceDisplayDecimals - : typeof DEFAULT_PRICE_DISPLAY_DECIMALS + : typeof DEFAULT_PRICE_DISPLAY_DECIMALS, + TMGVTestToken extends boolean ? TMGVTestToken : false > }