-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8992201
commit d6a3c6c
Showing
14 changed files
with
163 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,39 @@ | ||
import { optimism } from "viem/chains"; | ||
|
||
export const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000"; | ||
import { Address } from "./hooks/types"; | ||
|
||
export const ZERO_ADDRESS: Address = | ||
"0x0000000000000000000000000000000000000000"; | ||
export const TOKEN_ICON = "/svg/coin.svg"; | ||
export const RPC_URI = import.meta.env.VITE_RPC_URI; | ||
export const TOKEN_ADDRESSES = String( | ||
import.meta.env.VITE_TOKEN_ADDRESSES, | ||
).split(","); | ||
export const TOKEN_ADDRESSES: Address[] = | ||
import.meta.env.VITE_TOKEN_ADDRESSES.split(","); | ||
export const TOKEN_ASSETS_CDN = String( | ||
import.meta.env.VITE_TOKEN_ASSETS_CDN, | ||
).split(","); | ||
export const DEFAULT_CHAIN = optimism; | ||
export const NATIVE_TOKEN_LOGO = import.meta.env.VITE_NATIVE_TOKEN_LOGO; | ||
export const NATIVE_TOKEN = { | ||
...DEFAULT_CHAIN.nativeCurrency, | ||
wrappedAddress: import.meta.env.VITE_WRAPPED_NATIVE_TOKEN.toLowerCase(), | ||
address: DEFAULT_CHAIN.nativeCurrency.symbol.toLowerCase(), | ||
wrappedAddress: | ||
import.meta.env.VITE_WRAPPED_NATIVE_TOKEN.toLowerCase() as Address, | ||
/** | ||
* TODO: This is an exception for the native token where "address" is "ETH" | ||
* - Change this later so it's type-safe | ||
* Discussion: https://github.com/velodrome-finance/app/pull/347#discussion_r1380073009 | ||
*/ | ||
|
||
address: DEFAULT_CHAIN.nativeCurrency.symbol.toLowerCase() as Address, | ||
}; | ||
|
||
export const WALLETCONNECT_PROJECT_ID = import.meta.env | ||
.VITE_WALLETCONNECT_PROJECT_ID; | ||
|
||
// prettier-ignore | ||
export const FEATURE_FLAGS = String( | ||
import.meta.env.VITE_FEATURE_FLAGS | ||
).split(","); | ||
|
||
export const CURRENCY_MAXIMUM_FRACTION_DIGITS = parseInt( | ||
import.meta.env.VITE_CURRENCY_MAXIMUM_FRACTION_DIGITS || "5", | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Address } from "viem"; | ||
|
||
export type { Address }; | ||
|
||
export type Token = { | ||
address: Address; | ||
decimals: number; | ||
formatted: string; | ||
symbol: string; | ||
value: bigint; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.