Merge pull request #13 from mars-protocol/v1.3.0

v1.3.0
This commit is contained in:
Linkie Link 2023-02-27 12:26:01 +01:00 committed by GitHub
commit 838c9e8d40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
33 changed files with 483 additions and 297 deletions

4
.env.example Normal file
View File

@ -0,0 +1,4 @@
NEXT_PUBLIC_NETWORK=mainnet
NEXT_PUBLIC_RPC=https://rpc-osmosis.blockapsis.com
NEXT_PUBLIC_GQL=https://osmosis-node.marsprotocol.io/GGSFGSFGFG34/osmosis-hive-front/graphql
NEXT_PUBLIC_REST=https://lcd-osmosis.blockapsis.com

6
.gitignore vendored
View File

@ -33,5 +33,9 @@ yarn-error.log*
# vercel
.vercel
# Sentry
.sentryclirc
# IDE
.idea
.idea
.env

View File

@ -1,7 +1,7 @@
{
"name": "mars",
"homepage": "./",
"version": "1.2.1",
"version": "1.3.0",
"private": false,
"license": "SEE LICENSE IN LICENSE FILE",
"scripts": {
@ -22,7 +22,7 @@
"@cosmjs/launchpad": "^0.27.1",
"@cosmjs/proto-signing": "^0.29.5",
"@cosmjs/stargate": "^0.29.5",
"@marsprotocol/wallet-connector": "^1.4.5",
"@marsprotocol/wallet-connector": "^1.5.2",
"@material-ui/core": "^4.12.4",
"@material-ui/icons": "^4.11.3",
"@ramonak/react-progress-bar": "^5.0.3",

View File

@ -8,6 +8,7 @@ import {
} from '@marsprotocol/wallet-connector'
import { useQueryClient } from '@tanstack/react-query'
import { MARS_SYMBOL, USDC_SYMBOL } from 'constants/appConstants'
import { IS_TESTNET } from 'constants/env'
import {
useBlockHeight,
useDepositAndDebt,
@ -72,7 +73,7 @@ export const CommonContainer = ({ children }: CommonContainerProps) => {
// SETTERS
// ------------------
useEffect(() => {
if (process.env.NEXT_PUBLIC_NETWORK === 'mainnet') {
if (!IS_TESTNET) {
setCurrentNetwork(Network.MAINNET)
}
loadNetworkConfig()

View File

@ -1,5 +1,6 @@
import { WalletID, WalletManagerProvider } from '@marsprotocol/wallet-connector'
import { CircularProgress, SVG } from 'components/common'
import { IS_TESTNET } from 'constants/env'
import { useEffect, useState } from 'react'
import styles from './CosmosWalletConnectProvider.module.scss'
@ -20,11 +21,7 @@ export const CosmosWalletConnectProvider = ({ children }: Props) => {
if (chainInfoOverrides) return
const fetchConfig = async () => {
const file = await import(
`../../../configs/${
process.env.NEXT_PUBLIC_NETWORK === 'mainnet' ? 'osmosis-1' : 'osmo-test-4'
}.ts`
)
const file = await import(`../../../configs/${IS_TESTNET ? 'osmo-test-4' : 'osmosis-1'}.ts`)
const networkConfig: NetworkConfig = file.NETWORK_CONFIG

View File

@ -1,5 +1,7 @@
import { WalletID } from '@marsprotocol/wallet-connector'
import { SVG } from 'components/common'
import { FIELDS_FEATURE } from 'constants/appConstants'
import { getCouncilLink } from 'libs/council'
import { useTranslation } from 'react-i18next'
import useStore from 'store'
import { DocURL } from 'types/enums/docURL'
@ -8,7 +10,8 @@ import styles from './Footer.module.scss'
export const Footer = () => {
const { t } = useTranslation()
const networkConfig = useStore((s) => s.networkConfig)
const client = useStore((s) => s.client)
return (
<footer className={styles.footer}>
@ -38,7 +41,7 @@ export const Footer = () => {
)}
<a
className={styles.item}
href={networkConfig?.councilUrl}
href={getCouncilLink(client?.recentWallet.providerId as WalletID)}
rel='noopener noreferrer'
target='_blank'
title={t('global.council')}

View File

@ -1,6 +1,8 @@
import { WalletID } from '@marsprotocol/wallet-connector'
import classNames from 'classnames'
import { IncentivesButton, Settings, SVG } from 'components/common'
import { FIELDS_FEATURE } from 'constants/appConstants'
import { getCouncilLink } from 'libs/council'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { useTranslation } from 'react-i18next'
@ -12,7 +14,7 @@ import styles from './Header.module.scss'
export const Header = () => {
const { t } = useTranslation()
const router = useRouter()
const networkConfig = useStore((s) => s.networkConfig)
const client = useStore((s) => s.client)
return (
<header className={styles.header}>
@ -44,7 +46,12 @@ export const Header = () => {
{t('global.fields')}
</Link>
)}
<a className={styles.nav} href={networkConfig?.councilUrl} target='_blank' rel='noreferrer'>
<a
className={styles.nav}
href={getCouncilLink(client?.recentWallet.providerId as WalletID)}
target='_blank'
rel='noreferrer'
>
{t('global.council')}
</a>
</div>

View File

@ -0,0 +1,14 @@
@import 'src/styles/master';
.loading {
@include typoM;
display: inline-block;
clip-path: inset(0 1ch 0 0);
animation: l 2.5s steps(4) infinite;
}
@keyframes l {
to {
clip-path: inset(0 -1ch 0 0);
}
}

View File

@ -0,0 +1,15 @@
import React from 'react'
import styles from './Loading.module.scss'
interface Props {
style?: React.CSSProperties
}
export const Loading = (props: Props) => {
return (
<div className={styles.loading} style={props.style}>
...
</div>
)
}

View File

@ -1,6 +1,8 @@
import { WalletID } from '@marsprotocol/wallet-connector'
import classNames from 'classnames'
import { SVG } from 'components/common'
import { FIELDS_FEATURE } from 'constants/appConstants'
import { getCouncilLink } from 'libs/council'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { useTranslation } from 'react-i18next'
@ -11,7 +13,7 @@ import styles from './MobileNav.module.scss'
export const MobileNav = () => {
const { t } = useTranslation()
const router = useRouter()
const networkConfig = useStore((s) => s.networkConfig)
const client = useStore((s) => s.client)
return (
<nav className={styles.mobileNav}>
@ -24,7 +26,12 @@ export const MobileNav = () => {
<span>{t('global.redBank')}</span>
</Link>
<a className={styles.nav} target='_blank' href={networkConfig?.councilUrl} rel='noreferrer'>
<a
className={styles.nav}
target='_blank'
href={getCouncilLink(client?.recentWallet.providerId as WalletID)}
rel='noreferrer'
>
<div className={styles.icon}>
<SVG.CouncilIcon />
</div>

View File

@ -25,6 +25,7 @@ export { Highlight } from './Highlight/Highlight'
export { InputSection } from './InputSection/InputSection'
export { InputSlider } from './InputSlider/InputSlider'
export { Layout } from './Layout/Layout'
export { Loading } from './Loading/Loading'
export { MobileNav } from './MobileNav/MobileNav'
export { Notification } from './Notification/Notification'
export { NumberInput } from './NumberInput/NumberInput'

View File

@ -7,6 +7,7 @@ import {
DisplayCurrency,
TextTooltip,
} from 'components/common'
import { Loading } from 'components/common'
import { VaultLogo, VaultName } from 'components/fields'
import { FIELDS_TUTORIAL_KEY } from 'constants/appConstants'
import Link from 'next/link'
@ -66,27 +67,31 @@ export const ActiveVaultsTableMobile = () => {
<div className='xl' onClick={(e) => e.preventDefault()}>
<span className='faded'>{t('common.apy')} </span>
<span>
<TextTooltip
hideStyling
text={
<span>
<AnimatedNumber
amount={vault.position.apy.net}
className='xl'
suffix='%'
{vault.position.apy.net !== null && vault.position.apy.total !== null ? (
<TextTooltip
hideStyling
text={
<span>
<AnimatedNumber
amount={vault.position.apy.net}
className='xl'
suffix='%'
/>
</span>
}
tooltip={
<Apy
apyData={{
borrow: vault.position.apy.borrow,
total: vault.position.apy.total,
}}
leverage={vault.position.currentLeverage}
/>
</span>
}
tooltip={
<Apy
apyData={{
borrow: vault.position.apy.borrow,
total: vault.position.apy.total,
}}
leverage={vault.position.currentLeverage}
/>
}
/>
}
/>
) : (
<Loading style={{ display: 'inline-block' }} />
)}
</span>
</div>
<div className='s'>

View File

@ -7,6 +7,7 @@ import {
BorrowCapacity,
Button,
DisplayCurrency,
Loading,
SVG,
TextTooltip,
TokenBalance,
@ -237,30 +238,34 @@ export const useActiveVaultsColumns = () => {
</>
)
case 'active':
const apy = new BigNumber(row.original.position.apy.net).toNumber()
if (row.original.position.apy?.net !== null) {
const apy = new BigNumber(row.original.position.apy.net).toNumber()
const apyData = {
total: row.original.apy || 0,
borrow: row.original.position.apy.borrow,
const apyData = {
total: row.original.apy || 0,
borrow: row.original.position.apy.borrow,
}
return (
<>
<TextTooltip
hideStyling
text={
<>
<AnimatedNumber amount={apy} className='m' suffix='%' />
<p className='s faded'>
{convertApyToDailyApy(row.original.position.apy.net)}%/{t('common.day')}
</p>
</>
}
tooltip={
<Apy apyData={apyData} leverage={row.original.position.currentLeverage} />
}
/>
</>
)
} else {
return <Loading />
}
return (
<>
<TextTooltip
hideStyling
text={
<>
<AnimatedNumber amount={apy} className='m' suffix='%' />
<p className='s faded'>
{convertApyToDailyApy(row.original.position.apy.net)}%/{t('common.day')}
</p>
</>
}
tooltip={
<Apy apyData={apyData} leverage={row.original.position.currentLeverage} />
}
/>
</>
)
case 'unlocking':
return (
<>

View File

@ -1,5 +1,5 @@
import BigNumber from 'bignumber.js'
import { AnimatedNumber, Apy, Card, DisplayCurrency, TextTooltip } from 'components/common'
import { AnimatedNumber, Apy, Card, DisplayCurrency, Loading, TextTooltip } from 'components/common'
import { VaultLogo, VaultName } from 'components/fields'
import { getTimeAndUnit, ltvToLeverage } from 'libs/parse'
import Link from 'next/link'
@ -12,7 +12,6 @@ import styles from './AvailableVaultsTableMobile.module.scss'
export const AvailableVaultsTableMobile = () => {
const { t } = useTranslation()
const availableVaults = useStore((s) => s.availableVaults)
const baseCurrency = useStore((s) => s.baseCurrency)
const redBankAssets = useStore((s) => s.redBankAssets)
if (!availableVaults?.length) return null
@ -50,20 +49,24 @@ export const AvailableVaultsTableMobile = () => {
<div className={styles.stats}>
<div onClick={(e) => e.preventDefault()} className='xl'>
<span className='faded'>{t('common.apy')} </span>
<span>
<TextTooltip
hideStyling
text={<AnimatedNumber amount={minAPY} suffix='-' />}
tooltip={<Apy apyData={apyDataNoLev} leverage={1} />}
/>
<TextTooltip
hideStyling
text={<AnimatedNumber amount={maxAPY} suffix='%' />}
tooltip={
<Apy apyData={apyDataLev} leverage={ltvToLeverage(vault.ltv.max)} />
}
/>
</span>
{vault.apy !== null ? (
<span>
<TextTooltip
hideStyling
text={<AnimatedNumber amount={minAPY} suffix='-' />}
tooltip={<Apy apyData={apyDataNoLev} leverage={1} />}
/>
<TextTooltip
hideStyling
text={<AnimatedNumber amount={maxAPY} suffix='%' />}
tooltip={
<Apy apyData={apyDataLev} leverage={ltvToLeverage(vault.ltv.max)} />
}
/>
</span>
) : (
<Loading style={{ display: 'inline-block' }} />
)}
</div>
<div className='s'>
<span className='faded'>{t('fields.leverage')} </span>

View File

@ -6,6 +6,7 @@ import {
Apy,
Button,
DisplayCurrency,
Loading,
SVG,
TextTooltip,
TokenBalance,
@ -82,8 +83,8 @@ export const useAvailableVaultsColumns = () => {
<TextTooltip text={t('common.apy')} tooltip={t('fields.tooltips.apy.available')} />
),
cell: ({ row }) => {
if (!row.original.apy) {
return null
if (row.original.apy === null) {
return <Loading />
}
const maxLeverage = ltvToLeverage(row.original.ltv.max)
@ -144,7 +145,19 @@ export const useAvailableVaultsColumns = () => {
),
cell: ({ row }) => {
if (!row.original.vaultCap) {
return null
return (
<>
<DisplayCurrency
coin={{
denom: 'uosmo',
amount: '0',
}}
/>
<p className='s faded'>
{0}% {t('common.used')}
</p>
</>
)
}
const percent = convertPercentage(
@ -217,7 +230,7 @@ export const useAvailableVaultsColumns = () => {
],
// eslint-disable-next-line react-hooks/exhaustive-deps
[baseCurrency.denom, router, t],
[redBankAssets, baseCurrency.denom, router, t],
)
return {

View File

@ -4,6 +4,7 @@ import {
Apy,
BorrowCapacity,
DisplayCurrency,
Loading,
TextTooltip,
TokenBalance,
} from 'components/common'
@ -225,17 +226,21 @@ export const BreakdownTable = (props: Props) => {
<div className={styles.stats}>
<div className={styles.apy}>
<span className='faded'>{t('common.apy')}: </span>
<TextTooltip
hideStyling
text={
<AnimatedNumber
amount={Number(formatValue(apy, 2, 2, true, false, false, true))}
suffix='%'
abbreviated={false}
/>
}
tooltip={<Apy apyData={apyData} leverage={currentLeverage} />}
/>
{props.vault.apy !== null ? (
<TextTooltip
hideStyling
text={
<AnimatedNumber
amount={Number(formatValue(apy, 2, 2, true, false, false, true))}
suffix='%'
abbreviated={false}
/>
}
tooltip={<Apy apyData={apyData} leverage={currentLeverage} />}
/>
) : (
<Loading />
)}
</div>
<div className={styles.price}>
<span className='faded'>{formatValue(1, 0, 0, false, false, ' OSMO ≈ ')}</span>

View File

@ -1,4 +1,5 @@
import { ChainInfoID, WalletID } from '@marsprotocol/wallet-connector'
import { URL_GQL, URL_REST, URL_RPC } from 'constants/env'
import atom from 'images/atom.svg'
import axlusdc from 'images/axlusdc.svg'
import juno from 'images/juno.svg'
@ -63,21 +64,18 @@ const OTHER_ASSETS: { [denom: string]: OtherAsset } = {
export const NETWORK_CONFIG: NetworkConfig = {
name: ChainInfoID.OsmosisTestnet,
hiveUrl: 'https://testnet-osmosis-node.marsprotocol.io/XF32UOOU55CX/osmosis-hive-front/graphql',
rpcUrl: 'https://rpc-test.osmosis.zone/',
restUrl: 'https://lcd-test.osmosis.zone/',
apolloAprUrl: 'https://stats.apollo.farm/api/apr/v1/all',
hiveUrl:
URL_GQL ??
'https://testnet-osmosis-node.marsprotocol.io/XF32UOOU55CX/osmosis-hive-front/graphql',
rpcUrl: URL_RPC ?? 'https://rpc-test.osmosis.zone/',
restUrl: URL_REST ?? 'https://lcd-test.osmosis.zone/',
apolloAprUrl: 'https://api.apollo.farm/api/vault_infos/v2/osmo-test-4',
contracts: {
addressProvider: 'osmo17dyy6hyzzy6u5khy5lau7afa2y9kwknu0aprwqn8twndw2qhv8ls6msnjr',
redBank: 'osmo1t0dl6r27phqetfu0geaxrng0u9zn8qgrdwztapt5xr32adtwptaq6vwg36',
incentives: 'osmo1zxs8fry3m8j94pqg7h4muunyx86en27cl0xgk76fc839xg2qnn6qtpjs48',
oracle: 'osmo1dqz2u3c8rs5e7w5fnchsr2mpzzsxew69wtdy0aq4jsd76w7upmsstqe0s8',
rewardsCollector: 'osmo14kzsqw5tatdvwlkj383lgkh6gcdetwn7kfqm7488uargyy2lpucqsyv53j',
treasury: 'osmo1qv74pu0gjc9vuvkhayuj5j3q8fzmf4pnl643djqpv7enxr925g5q0wf7p3',
safetyFund: 'osmo1j2mnzs7eqld4umtwky4hyf6f7kqcsg7ragh2l76ev7ucxcjvdjrs3tdezf',
protocolRewardsCollector: 'osmo1xl7jguvkg807ya00s0l722nwcappfzyzrac3ug5tnjassnrmnfrs47wguz',
creditManager: 'osmo169xhpftsee275j3cjudj6qfzdpfp8sdllgeeprud4ynwr4sj6m4qel2ezp',
accountNft: 'osmo1xpgx06z2c6zjk49feq75swgv78m6dvht6wramu2gltzjz5j959nq4hggxz',
creditManager: 'osmo1dzk4y3s9am6773sglhfc60nstz09c3gy978h2jka6wre5z4hlavq4pcwk0',
accountNft: 'osmo16wwckvccarltl4mlnjhw3lcj3v59yglhldgw36ldkknmjavqyaasgcessw',
},
assets: {
base: ASSETS.osmo,
@ -91,13 +89,12 @@ export const NETWORK_CONFIG: NetworkConfig = {
decimals: 2,
},
appUrl: 'https://testnet.osmosis.zone',
councilUrl: 'https://testnet.keplr.app/chains/mars-hub-testnet',
wallets: [WalletID.Keplr, WalletID.Leap, WalletID.Cosmostation],
}
export const VAULT_CONFIGS: Vault[] = [
{
address: 'osmo1v40lnedgvake8p7f49gvqu0q3vc9sx3qpc0jqtyfdyw25d4vg8us38an37',
address: 'osmo1zktjv92f76epswjvyxzzt3yyskpw7k6jsyu0kmq4zzc5fphrjumqlahctp',
name: 'OSMO-ATOM LP (1 day)',
denoms: {
primary: 'uosmo',
@ -118,9 +115,10 @@ export const VAULT_CONFIGS: Vault[] = [
contract: 0.63,
liq: 0.65,
},
apy: 0,
},
{
address: 'osmo1eht92w5dr0vx8dzl6dn9770yq0ycln50zfhzvz8uc6928mp8vvgqwcram9',
address: 'osmo1tp2m6g39h8mvhnu3plqjyen5s63023gj8w873l8wvly0cd77l6hsaa73wt',
name: 'OSMO-ATOM LP (14 day)',
denoms: {
primary: 'uosmo',
@ -141,9 +139,10 @@ export const VAULT_CONFIGS: Vault[] = [
contract: 0.63,
liq: 0.65,
},
apy: 0,
},
{
address: 'osmo1g5hryv0gp9dzlchkp3yxk8fmcf5asjun6cxkvyffetqzkwmvy75qfmeq3f',
address: 'osmo1r6h0pafu3wq0kf6yv09qhc8qvuku2d6fua0rpwwv46h7hd8u586scxspjf',
name: 'OSMO-JUNO LP (1 day)',
denoms: {
primary: 'uosmo',
@ -164,9 +163,10 @@ export const VAULT_CONFIGS: Vault[] = [
contract: 0.4115,
liq: 0.441,
},
apy: 0,
},
{
address: 'osmo1rclt7lsfp0c89ydf9umuhwlg28maw6z87jak3ly7u2lefnyzdz2s8gsepe',
address: 'osmo1d6knwkelyr9eklewnn9htkess4ttpxpf2cze9ec0xfw7e3fj0ggssqzfpp',
name: 'OSMO-JUNO LP (14 day)',
denoms: {
primary: 'uosmo',
@ -187,5 +187,6 @@ export const VAULT_CONFIGS: Vault[] = [
contract: 4.115,
liq: 0.441,
},
apy: 0,
},
]

View File

@ -1,4 +1,5 @@
import { ChainInfoID, WalletID } from '@marsprotocol/wallet-connector'
import { URL_GQL, URL_REST, URL_RPC } from 'constants/env'
import atom from 'images/atom.svg'
import axlusdc from 'images/axlusdc.svg'
import mars from 'images/mars.svg'
@ -51,21 +52,17 @@ const OTHER_ASSETS: { [denom: string]: OtherAsset } = {
export const NETWORK_CONFIG: NetworkConfig = {
name: ChainInfoID.Osmosis1,
hiveUrl: 'https://osmosis-node.marsprotocol.io/GGSFGSFGFG34/osmosis-hive-front/graphql',
rpcUrl: 'https://rpc-osmosis.blockapsis.com/',
restUrl: 'https://lcd-osmosis.blockapsis.com/',
apolloAprUrl: 'https://stats.apollo.farm/api/apr/v1/all',
hiveUrl:
URL_GQL ?? 'https://osmosis-node.marsprotocol.io/GGSFGSFGFG34/osmosis-hive-front/graphql',
rpcUrl: URL_RPC ?? 'https://rpc-osmosis.blockapsis.com/',
restUrl: URL_REST ?? 'https://lcd-osmosis.blockapsis.com/',
apolloAprUrl: 'https://api.apollo.farm/api/vault_infos/v2/osmosis-1',
contracts: {
addressProvider: 'osmo1g677w7mfvn78eeudzwylxzlyz69fsgumqrscj6tekhdvs8fye3asufmvxr',
redBank: 'osmo1c3ljch9dfw5kf52nfwpxd2zmj2ese7agnx0p9tenkrryasrle5sqf3ftpg',
incentives: 'osmo1nkahswfr8shg8rlxqwup0vgahp0dk4x8w6tkv3rra8rratnut36sk22vrm',
oracle: 'osmo1mhznfr60vjdp2gejhyv2gax9nvyyzhd3z0qcwseyetkfustjauzqycsy2g',
rewardsCollector: 'osmo1urvqe5mw00ws25yqdd4c4hlh8kdyf567mpcml7cdve9w08z0ydcqvsrgdy',
treasury: 'osmo1qv74pu0gjc9vuvkhayuj5j3q8fzmf4pnl643djqpv7enxr925g5q0wf7p3',
safetyFund: 'osmo1j2mnzs7eqld4umtwky4hyf6f7kqcsg7ragh2l76ev7ucxcjvdjrs3tdezf',
protocolRewardsCollector: 'osmo1xl7jguvkg807ya00s0l722nwcappfzyzrac3ug5tnjassnrmnfrs47wguz',
creditManager: 'osmo1prwnxn3vlvh0kqmwxn8whqnavk8ze9hrccwpsapysgpa3pj8r2csy84grp',
accountNft: 'osmo1ua5rw84jxg6e7ma4hx7v7yhqcks74cjnx38gpnsvtfzrtxhwcvjqgsxulx',
creditManager: 'osmo1f2m24wktq0sw3c0lexlg7fv4kngwyttvzws3a3r3al9ld2s2pvds87jqvf',
accountNft: 'osmo1450hrg6dv2l58c0rvdwx8ec2a0r6dd50hn4frk370tpvqjhy8khqw7sw09',
},
assets: {
base: ASSETS.osmo,
@ -79,14 +76,63 @@ export const NETWORK_CONFIG: NetworkConfig = {
decimals: 2,
},
appUrl: 'https://app.osmosis.zone',
councilUrl: 'https://council.marsprotocol.io',
wallets: [
WalletID.Keplr,
WalletID.StationWallet,
WalletID.Leap,
WalletID.Cosmostation,
WalletID.KeplrMobile,
WalletID.CosmostationMobile,
],
}
export const VAULT_CONFIGS: Vault[] = []
export const VAULT_CONFIGS: Vault[] = [
{
address: 'osmo1g3kmqpp8608szfp0pdag3r6z85npph7wmccat8lgl3mp407kv73qlj7qwp',
name: 'OSMO-ATOM LP (14 day)',
denoms: {
primary: 'uosmo',
secondary: 'ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2',
lpToken: 'gamm/pool/1',
},
symbols: {
primary: 'OSMO',
secondary: 'ATOM',
},
color: '#6f7390',
lockup: 86400 * 14,
provider: 'Apollo vault',
description:
'Up to 2.67× leveraged yield farming with auto compounding of the OSMO-ATOM LP tokens.',
ltv: {
max: 0.625,
contract: 0.63,
liq: 0.65,
},
apy: 0,
},
{
address: 'osmo1jfmwayj8jqp9tfy4v4eks5c2jpnqdumn8x8xvfllng0wfes770qqp7jl4j',
name: 'OSMO-axlUSDC LP (14 day)',
denoms: {
primary: 'uosmo',
secondary: 'ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858',
lpToken: 'gamm/pool/678',
},
symbols: {
primary: 'OSMO',
secondary: 'axlUSDC',
},
color: '#478edc',
lockup: 86400 * 14,
provider: 'Apollo vault',
description:
'Up to 2.78× leveraged yield farming with auto compounding of the OSMO-axlUSDC LP tokens.',
ltv: {
max: 0.64,
contract: 0.65,
liq: 0.66,
},
apy: 0,
},
]

View File

@ -18,7 +18,7 @@ export const GAS_ADJUSTMENT = 1.3
export const GAS_PRICE = '0.025uosmo'
/* feature flags */
export const FIELDS_FEATURE = false
export const FIELDS_FEATURE = true
export const PROPOSAL_ACTION_BUTTONS_FEATURE = false
/* fields query keys */

5
src/constants/env.ts Normal file
View File

@ -0,0 +1,5 @@
export const NETWORK = process.env.NEXT_PUBLIC_NETWORK
export const IS_TESTNET = NETWORK !== 'mainnet'
export const URL_GQL = process.env.NEXT_PUBLIC_GQL
export const URL_REST = process.env.NEXT_PUBLIC_REST
export const URL_RPC = process.env.NEXT_PUBLIC_RPC

View File

@ -10,7 +10,6 @@ export { useProvideLiquidity } from './useProvideLiquidity'
export { useRedBank } from './useRedBank'
export { useRepayPosition } from './useRepayPosition'
export { useRequestUnlockPosition } from './useRequestUnlockPosition'
export { useSafetyFundBalance } from './useSafetyFundBalance'
export { useSpotPrice } from './useSpotPrice'
export { useUnlockMessages } from './useUnlockMessages'
export { useUserBalance } from './useUserBalance'

View File

@ -1,43 +0,0 @@
import { Coin } from '@cosmjs/stargate'
import { useQuery } from '@tanstack/react-query'
import { gql, request } from 'graphql-request'
import useStore from 'store'
import { QUERY_KEYS } from 'types/enums/queryKeys'
export interface SafetyFundBalanceData {
balance: {
balance: Coin[]
}
}
export const useSafetyFundBalance = () => {
const hiveUrl = useStore((s) => s.networkConfig?.hiveUrl)
const safetyFundAddress = useStore((s) => s.addressProviderConfig?.safety_fund_address)
const processSafetyFundQuery = useStore((s) => s.processSafetyFundQuery)
useQuery<SafetyFundBalanceData>(
[QUERY_KEYS.SAFETY_FUND_BALANCE],
async () => {
return await request(
hiveUrl!,
gql`
query SafetyFundBalanceQuery {
balance: bank {
balance(
address: "${safetyFundAddress}"
) {
amount
denom
}
}
}
`,
)
},
{
enabled: !!hiveUrl && !!safetyFundAddress,
refetchInterval: 30000,
onSuccess: processSafetyFundQuery,
},
)
}

20
src/libs/council.ts Normal file
View File

@ -0,0 +1,20 @@
import { WalletID } from '@marsprotocol/wallet-connector'
import { IS_TESTNET } from 'constants/env'
import { DocURL } from 'types/enums/docURL'
export function getCouncilLink(currentProvider?: WalletID): string {
if (IS_TESTNET) return DocURL.COUNCIL_TESTNET_URL
if (!currentProvider) return DocURL.COUNCIL_URL
switch (currentProvider) {
case WalletID.Leap:
return DocURL.COUNCIL_LEAP_URL
case WalletID.StationWallet || WalletID.StationWalletMobile:
return DocURL.COUNCIL_STATION_URL
default:
return DocURL.COUNCIL_KEPLR_URL
}
}

View File

@ -314,3 +314,6 @@ export const ltvToLeverage = (ltv: number) => {
export const leverageToLtv = (leverage: number) =>
new BigNumber(1).div(leverage).minus(1).times(-1).toNumber()
export const serializeUrl = (url?: string) =>
url ? (url.slice(-1) === '/' ? url : `${url}/`) : '/'

View File

@ -7,7 +7,6 @@ import {
} from '@marsprotocol/wallet-connector'
import { BlockHeightData } from 'hooks/queries/useBlockHeight'
import { DepositAndDebtData } from 'hooks/queries/useDepositAndDebt'
import { SafetyFundBalanceData } from 'hooks/queries/useSafetyFundBalance'
import { UserBalanceData } from 'hooks/queries/useUserBalance'
import { UserIcnsData } from 'hooks/queries/useUserIcns'
import { Network } from 'types/enums/network'
@ -44,7 +43,6 @@ export interface CommonSlice {
otherAssets: Asset[]
queryErrors: string[]
slippage: number
safetyFundBalance?: Coin
tutorialSteps: { redbank: number; fields: number }
userBalances: Coin[]
userUnclaimedRewards: string
@ -89,12 +87,10 @@ export interface CommonSlice {
// QUERY RELATED
// ------------------
previousBlockHeightQueryData?: BlockHeightData
previousSafetyFundBalanceQueryData?: SafetyFundBalanceData
previousUserBalanceQueryData?: UserBalanceData
previousUserIcnsQueryData?: UserIcnsData
previousUserUnclaimedBalanceQueryData?: number
processDepositAndDebtQuery: (data: DepositAndDebtData) => void
processUserBalanceQuery: (data: UserBalanceData) => void
processBlockHeightQuery: (data: BlockHeightData) => void
processSafetyFundQuery: (data: SafetyFundBalanceData) => void
}

View File

@ -5,13 +5,14 @@ export interface VaultsSlice {
availableVaults: Vault[]
activeVaults: ActiveVault[]
creditAccounts?: Positions[]
addAprToVaults: (aprs: AprData[]) => void
getCreditAccounts: (options?: Options) => Promise<Positions[]>
vaultAssets?: VaultCoinsWithAddress[]
getVaultAssets: (options?: Options) => Promise<VaultCoinsWithAddress[]>
unlockTimes?: UnlockTimeWithAddress[]
getUnlockTimes: (options?: Options) => Promise<UnlockTimeWithAddress[]>
aprs?: AprData[] | null
getAprs: (options?: Options) => Promise<AprData[] | null>
getAprs: (options?: Options) => Promise<null>
caps?: VaultCapData[]
getCaps: (options?: Options) => Promise<VaultCapData[]>
lpTokens?: LpTokenWithAddress[]

View File

@ -9,8 +9,8 @@ import {
import BigNumber from 'bignumber.js'
import { BlockHeightData } from 'hooks/queries/useBlockHeight'
import { DepositAndDebtData } from 'hooks/queries/useDepositAndDebt'
import { SafetyFundBalanceData } from 'hooks/queries/useSafetyFundBalance'
import { UserBalanceData } from 'hooks/queries/useUserBalance'
import { serializeUrl } from 'libs/parse'
import isEqual from 'lodash.isequal'
import { isMobile } from 'react-device-detect'
import { CommonSlice } from 'store/interfaces/common.interface'
@ -110,6 +110,11 @@ const commonSlice = (
loadNetworkConfig: async () => {
try {
const config = await import(`../../configs/${get().currentNetwork}.ts`)
config.NETWORK_CONFIG.hiveUrl = serializeUrl(config.NETWORK_CONFIG.hiveUrl)
config.NETWORK_CONFIG.rpcUrl = serializeUrl(config.NETWORK_CONFIG.rpcUrl)
config.NETWORK_CONFIG.restUrl = serializeUrl(config.NETWORK_CONFIG.restUrl)
set({
otherAssets: config.NETWORK_CONFIG.assets.other,
whitelistedAssets: config.NETWORK_CONFIG.assets.whitelist,
@ -144,7 +149,11 @@ const commonSlice = (
lcdClient: new LcdClient(rpc),
})
},
setChainInfo: (chainInfo: SimplifiedChainInfo) => set({ chainInfo }),
setChainInfo: (chainInfo: SimplifiedChainInfo) => {
if (chainInfo?.rpc) chainInfo.rpc = serializeUrl(chainInfo.rpc)
if (chainInfo?.rest) chainInfo.rest = serializeUrl(chainInfo.rest)
set({ chainInfo })
},
setCurrentNetwork: (network: Network) => set({ currentNetwork: network }),
setNetworkError: (isError: boolean) => {
const errors = get().errors
@ -210,14 +219,6 @@ const commonSlice = (
set({ marketDeposits: depositCoins, marketDebts: debtCoins })
},
processSafetyFundQuery: (data: SafetyFundBalanceData) => {
if (isEqual(data, get().previousSafetyFundBalanceQueryData)) return
set({
previousSafetyFundBalanceQueryData: data,
safetyFundBalance: data.balance.balance[0],
})
},
processUserBalanceQuery: (data: UserBalanceData) => {
if (isEqual(data, get().previousUserBalanceQueryData)) return

View File

@ -19,6 +19,29 @@ export const vaultsSlice = (set: NamedSet<Store>, get: GetState<Store>): VaultsS
isLoading: false,
availableVaults: [],
activeVaults: [],
addAprToVaults: (aprs: AprData[]) => {
const updatedAvailableVaults = get().availableVaults.map((availableVault) => {
const apr =
(aprs?.find((apr) => apr.contractAddress === availableVault.address)?.apr || 0) * 100
availableVault.apy = convertAprToApy(apr, 365)
return availableVault
})
const updatedActiveVaults = get().activeVaults.map((activeVault) => {
const apr = (aprs?.find((apr) => apr.contractAddress === activeVault.address)?.apr || 0) * 100
const apy = convertAprToApy(apr, 365)
activeVault.apy = apy
activeVault.position.apy.total = apy
activeVault.position.apy.net =
apy * activeVault.position.currentLeverage - activeVault.position.apy.borrow
return activeVault
})
set({
availableVaults: updatedAvailableVaults,
activeVaults: updatedActiveVaults,
})
},
getCreditAccounts: async (options?: Options) => {
const creditAccounts = get().creditAccounts
if (creditAccounts && !options?.refetch) return creditAccounts
@ -123,7 +146,10 @@ export const vaultsSlice = (set: NamedSet<Store>, get: GetState<Store>): VaultsS
},
getAprs: async (options?: Options) => {
const aprs = get().aprs
if (aprs && !options?.refetch) return aprs
if (aprs && !options?.refetch) {
get().addAprToVaults(aprs)
return null
}
const networkConfig = get().networkConfig
if (!networkConfig) return null
@ -134,17 +160,19 @@ export const vaultsSlice = (set: NamedSet<Store>, get: GetState<Store>): VaultsS
const data: AprResponse[] = await response.json()
const newAprs = data.map((aprData) => {
const aprTotal = aprData.aprs.reduce((prev, curr) => (curr.value += prev), 0)
const feeTotal = aprData.fees.reduce((prev, curr) => (curr.value += prev), 0)
const aprTotal = aprData.apr.reduce((prev, curr) => Number(curr.value) + prev, 0)
const feeTotal = aprData.fees.reduce((prev, curr) => Number(curr.value) + prev, 0)
const finalApr = aprTotal - feeTotal
const finalApr = aprTotal + feeTotal
return { contractAddress: aprData.contract_address, apr: finalApr }
})
set({ aprs: newAprs })
set({
aprs: newAprs,
})
return newAprs
get().addAprToVaults(newAprs)
}
return null
@ -229,11 +257,10 @@ export const vaultsSlice = (set: NamedSet<Store>, get: GetState<Store>): VaultsS
set({ isLoading: true })
const vaultAssets = get().getVaultAssets(options)
const unlockTimes = get().getUnlockTimes(options)
const aprs = get().getAprs(options)
const caps = get().getCaps(options)
return Promise.all([vaultAssets, unlockTimes, aprs, caps]).then(
([vaultAssets, unlockTimes, aprs, caps]) => {
return Promise.all([vaultAssets, unlockTimes, caps]).then(
([vaultAssets, unlockTimes, caps]) => {
const { activeVaults, availableVaults } = get().vaultConfigs.reduce(
(prev, curr) => {
const lpTokens = get().lpTokens
@ -243,29 +270,7 @@ export const vaultsSlice = (set: NamedSet<Store>, get: GetState<Store>): VaultsS
(position) => position.vaults[0].vault.address === curr.address,
)
const apr = (aprs?.find((apr) => apr.contractAddress === curr.address)?.apr || 0) * 100
const fakeAprVaults = [
{
address: 'osmo1eht92w5dr0vx8dzl6dn9770yq0ycln50zfhzvz8uc6928mp8vvgqwcram9',
apy: 13.69,
},
{
address: 'osmo1g5hryv0gp9dzlchkp3yxk8fmcf5asjun6cxkvyffetqzkwmvy75qfmeq3f',
apy: 8.32,
},
{
address: 'osmo1rclt7lsfp0c89ydf9umuhwlg28maw6z87jak3ly7u2lefnyzdz2s8gsepe',
apy: 17.22,
},
]
const fakeVault = fakeAprVaults.find((vault) => vault.address === curr.address)
if (fakeVault) {
curr.apy = fakeVault.apy
} else {
curr.apy = convertAprToApy(apr, 365)
}
curr.apy = null
curr.vaultCap = caps?.find((cap) => cap.address === curr.address)?.vaultCap
@ -356,7 +361,6 @@ export const vaultsSlice = (set: NamedSet<Store>, get: GetState<Store>): VaultsS
redBankAssets.find((asset) => asset.denom === curr.denoms.secondary)?.borrowRate || 0
const trueBorrowRate = (borrowRate / 2) * (leverage - 1)
const apy = curr.apy * leverage - trueBorrowRate
const getPositionStatus = (unlockTime?: number) => {
if (!unlockTime) return 'active'
@ -391,9 +395,9 @@ export const vaultsSlice = (set: NamedSet<Store>, get: GetState<Store>): VaultsS
},
values,
apy: {
total: curr.apy,
total: null,
borrow: trueBorrowRate,
net: apy,
net: null,
},
currentLeverage: leverage,
ltv: leverageToLtv(leverage),
@ -412,6 +416,7 @@ export const vaultsSlice = (set: NamedSet<Store>, get: GetState<Store>): VaultsS
)
set({ activeVaults, availableVaults, isLoading: false })
get().getAprs(options)
},
)
},

View File

@ -1,5 +1,10 @@
export enum DocURL {
COOKIE_POLICY_URL = 'https://docs.marsprotocol.io/docs/overview/legal/cookie-policy',
COUNCIL_URL = 'https://council.marsprotocol.io',
COUNCIL_LEAP_URL = 'https://cosmos.leapwallet.io/chains/mars/governance',
COUNCIL_STATION_URL = 'https://station.terra.money/gov#PROPOSAL_STATUS_VOTING_PERIOD',
COUNCIL_TESTNET_URL = 'https://testnet.keplr.app/chains/mars-hub-testnet',
COUNCIL_KEPLR_URL = 'https://wallet.keplr.app/chains/mars-hub',
FIELDS = 'https://docs.marsprotocol.io/docs/learn/rover/rover-intro',
LANDING = 'https://docs.marsprotocol.io/',
PRIVACY_POLICY_URL = 'https://docs.marsprotocol.io/docs/overview/legal/privacy-policy',

View File

@ -9,7 +9,6 @@ export enum QUERY_KEYS {
USER_DEPOSIT = 'userDeposits',
USER_ICNS = 'userIcns',
ATOM_PRICE = 'atomPrice',
SAFETY_FUND_BALANCE = 'safetyFundBalance',
MARKET_DEPOSITS = 'marketDeposits',
USE_LP_TOKEN = 'useLpToken',
ESTIMATE_FEE = 'estimateFee',

View File

@ -28,7 +28,7 @@ interface Vault {
used: number
max: number
}
apy?: number
apy: number | null
}
interface Position {
@ -54,9 +54,9 @@ interface Position {
net: number
}
apy: {
total: number
total: number | null
borrow: number
net: number
net: number | null
}
ltv: number
currentLeverage: number
@ -102,8 +102,8 @@ interface AprData {
interface AprResponse {
contract_address: string
aprs: { type: string; value: number }[]
fees: { type: string; value: number }[]
apr: { type: string; value: number | string }[]
fees: { type: string; value: number | string }[]
}
interface VaultCapData {

View File

@ -5,14 +5,9 @@ interface NetworkConfig {
restUrl: string
apolloAprUrl: string
contracts: {
addressProvider: string
redBank: string
incentives: string
oracle: string
rewardsCollector: string
treasury: string
safetyFund: string
protocolRewardsCollector: string
accountNft: string
creditManager: string
}
@ -28,6 +23,5 @@ interface NetworkConfig {
decimals: number
}
appUrl: string
councilUrl: string
wallets: import('@marsprotocol/wallet-connector').WalletID[]
}

216
yarn.lock
View File

@ -537,10 +537,10 @@
resolved "https://registry.yarnpkg.com/@cosmjs/utils/-/utils-0.29.5.tgz#3fed1b3528ae8c5f1eb5d29b68755bebfd3294ee"
integrity sha512-m7h+RXDUxOzEOGt4P+3OVPX7PuakZT3GBmaM/Y2u+abN3xZkziykD/NvedYFvvCCdQo714XcGl33bwifS9FZPQ==
"@delphi-labs/shuttle@^2.3.9":
version "2.3.9"
resolved "https://registry.yarnpkg.com/@delphi-labs/shuttle/-/shuttle-2.3.9.tgz#d82c7160c9d297b9b6abfbce3b3e2bd96af99ccc"
integrity sha512-zst45B/nLp52DMCncouGcfrHw8X+FvBGUQnSiqynKDtJikolMRVU7DtE8iNpWXFGqK8hTnkn4srl/qoiL3wNDg==
"@delphi-labs/shuttle@^2.6.1":
version "2.6.3"
resolved "https://registry.yarnpkg.com/@delphi-labs/shuttle/-/shuttle-2.6.3.tgz#6ddc7892757e4577f283b0c69c59fa0b579ddfb3"
integrity sha512-ioEUKrGYFgvC+TITCzhfSgKnud3WGuEP9OY10bxm1srx9KrGZabnz6Ip7p7wqSyNF7VRH6VhaK2vkewhZ4eSjA==
dependencies:
"@cosmjs/amino" "^0.29.5"
"@cosmjs/cosmwasm-stargate" "^0.29.5"
@ -548,9 +548,11 @@
"@cosmjs/launchpad" "^0.27.1"
"@cosmjs/proto-signing" "^0.29.5"
"@cosmjs/stargate" "^0.29.5"
"@injectivelabs/sdk-ts" "^1.0.360"
"@injectivelabs/ts-types" "^1.0.28"
"@injectivelabs/utils" "^1.0.60"
"@improbable-eng/grpc-web" "^0.15.0"
"@injectivelabs/exceptions" "^1.0.56"
"@injectivelabs/sdk-ts" "^1.0.457"
"@injectivelabs/ts-types" "^1.0.29"
"@injectivelabs/utils" "^1.0.81"
"@keplr-wallet/cosmos" "^0.11.38"
"@keplr-wallet/proto-types" "^0.11.38"
"@metamask/eth-sig-util" "^5.0.2"
@ -561,7 +563,6 @@
cosmjs-types "^0.6.1"
ethereumjs-util "^7.1.5"
isomorphic-ws "^5.0.0"
long "^5.2.1"
secp256k1 "^5.0.0"
tslib "^2.4.0"
use-local-storage-state "^18.1.2"
@ -1020,41 +1021,48 @@
dependencies:
browser-headers "^0.4.1"
"@injectivelabs/chain-api@1.9.4":
version "1.9.4"
resolved "https://registry.yarnpkg.com/@injectivelabs/chain-api/-/chain-api-1.9.4.tgz#cb4c1b09d2fb12840514a65637b5ecc504485fc7"
integrity sha512-n74J6kIcvIjAK0JcWmtXwy+9VvKKTPgMPI/oRWoTt5SwtfUyb7GYKFg0xPV34APuhLkCqIX6B5VD2p2YTZqMMA==
"@injectivelabs/chain-api@1.9.6":
version "1.9.6"
resolved "https://registry.yarnpkg.com/@injectivelabs/chain-api/-/chain-api-1.9.6.tgz#30693275c6131ea822b7f4c60bfc582e76573a7f"
integrity sha512-Z17SsI816TEDiRLiswUZE+8n/nCUTyat9WPxsaccB7mmsjFtC7jVzVBgLKE3pTIsON1CkJhhWAO3ApHddyCWlg==
dependencies:
"@improbable-eng/grpc-web" "^0.13.0"
google-protobuf "^3.13.0"
"@injectivelabs/exceptions@^1.0.45":
version "1.0.45"
resolved "https://registry.yarnpkg.com/@injectivelabs/exceptions/-/exceptions-1.0.45.tgz#18b254806efeea4fea11e6d59ab44796d80436f3"
integrity sha512-fzoCxeF8vfpoyajS0sA+qeJy+CL6dUWtpnZS7Nt4bC51EgO6cxwKbMtBD8Pob7plwUlqEWr8FrFWAysfXyOopQ==
"@injectivelabs/exceptions@^1.0.56":
version "1.0.56"
resolved "https://registry.yarnpkg.com/@injectivelabs/exceptions/-/exceptions-1.0.56.tgz#c2c33c90b024fee80b2bec1a6808a6b069088180"
integrity sha512-g8BRgnxcHrJx6t11VARbaTbxONk/ZIs3l+Z9Dbz08s8yukSZr5MUnSW1HjZwHCwjwE4M8XiHHg70durL123vQQ==
dependencies:
"@improbable-eng/grpc-web" "^0.15.0"
"@injectivelabs/ts-types" "^1.0.28"
"@injectivelabs/grpc-web" "^0.0.1"
"@injectivelabs/ts-types" "^1.0.29"
http-status-codes "^2.2.0"
link-module-alias "^1.2.0"
shx "^0.3.2"
"@injectivelabs/indexer-api@1.0.32-rc":
version "1.0.32-rc"
resolved "https://registry.yarnpkg.com/@injectivelabs/indexer-api/-/indexer-api-1.0.32-rc.tgz#67acbf0f456967a817fccda7579f3c458e810c4f"
integrity sha512-LNU4lZMhVXN4b9w72SAcVIesyD9We3Oq466KHDOd2S9asnNjO6EuQ4EtA2l4qiIvIat9Gh9/VZOfSXguTlVp8g==
"@injectivelabs/grpc-web@^0.0.1":
version "0.0.1"
resolved "https://registry.yarnpkg.com/@injectivelabs/grpc-web/-/grpc-web-0.0.1.tgz#24c028f6db50e589e30505efd2077110c8b492ba"
integrity sha512-Pu5YgaZp+OvR5UWfqbrPdHer3+gDf+b5fQoY+t2VZx1IAVHX8bzbN9EreYTvTYtFeDpYRWM8P7app2u4EX5wTw==
dependencies:
browser-headers "^0.4.1"
"@injectivelabs/indexer-api@1.10.0-rc.2.5":
version "1.10.0-rc.2.5"
resolved "https://registry.yarnpkg.com/@injectivelabs/indexer-api/-/indexer-api-1.10.0-rc.2.5.tgz#df9be543c04979cfe277900e199f74fe9b77ac6e"
integrity sha512-QR5I/bw+4PAYcXwdR5OT4Q9yju/uk1Vj5SEtCgQH0GFlR7sGGpDOrSBpbeSQeHk89AAHyyQpAKJYe+0HPr21bA==
dependencies:
"@improbable-eng/grpc-web" "^0.14.0"
google-protobuf "^3.14.0"
"@injectivelabs/networks@^1.0.75":
version "1.0.75"
resolved "https://registry.yarnpkg.com/@injectivelabs/networks/-/networks-1.0.75.tgz#a2f4bc67c18272b6b1ba1d4b398b994d25fbfe85"
integrity sha512-muKhuBA9Xj+llPmec51+ncH7F6Cr0AOmv+U++c+yp/4CYt63aOyZ/j7c4dOo1sUYeI6nm9sBN1s3zsxRy+ViDw==
"@injectivelabs/networks@^1.0.93":
version "1.0.93"
resolved "https://registry.yarnpkg.com/@injectivelabs/networks/-/networks-1.0.93.tgz#5b63a7caca19cbbfaf07675813e5bc994bcfb604"
integrity sha512-7TayU1KD8Qk9MKWOjGJ0/hgeSeO/lb+fvXQxkNdtVq1/apZOZHDiEuz0khOc2e2lkeCOsLRZlTh5VlWY/OpG9A==
dependencies:
"@injectivelabs/exceptions" "^1.0.45"
"@injectivelabs/ts-types" "^1.0.28"
"@injectivelabs/utils" "^1.0.64"
"@injectivelabs/exceptions" "^1.0.56"
"@injectivelabs/ts-types" "^1.0.29"
"@injectivelabs/utils" "^1.0.81"
link-module-alias "^1.2.0"
shx "^0.3.2"
@ -1066,10 +1074,10 @@
"@improbable-eng/grpc-web" "^0.14.0"
google-protobuf "^3.14.0"
"@injectivelabs/sdk-ts@^1.0.360":
version "1.0.372"
resolved "https://registry.yarnpkg.com/@injectivelabs/sdk-ts/-/sdk-ts-1.0.372.tgz#254ea328911a6a1ccc94796b273baa723650125c"
integrity sha512-S8Qg5sRHtQ/ht847g0wmHXAV4tO70YdpBNk2IIHMUfPco0EPQ4hUKWMYtOBIANZmx2k8urnyC38M+J2FBCgc/A==
"@injectivelabs/sdk-ts@^1.0.457":
version "1.0.459"
resolved "https://registry.yarnpkg.com/@injectivelabs/sdk-ts/-/sdk-ts-1.0.459.tgz#c2684496a77c96004b210b444719b66ce3c79e8b"
integrity sha512-2UFFCF4A8xS5F/6l4tUIqBDgKE8XYdmFe+9lbyjrpatf+7vnC5iosKTKxyPjK2Ky2Nyz16IViQMx6gwFS0vb1g==
dependencies:
"@apollo/client" "^3.5.8"
"@cosmjs/amino" "^0.29.5"
@ -1077,17 +1085,17 @@
"@cosmjs/stargate" "^0.29.5"
"@cosmjs/tendermint-rpc" "^0.29.5"
"@ethersproject/bytes" "^5.7.0"
"@improbable-eng/grpc-web" "^0.15.0"
"@improbable-eng/grpc-web-node-http-transport" "^0.15.0"
"@improbable-eng/grpc-web-react-native-transport" "^0.15.0"
"@injectivelabs/chain-api" "1.9.4"
"@injectivelabs/exceptions" "^1.0.45"
"@injectivelabs/indexer-api" "1.0.32-rc"
"@injectivelabs/networks" "^1.0.75"
"@injectivelabs/chain-api" "1.9.6"
"@injectivelabs/exceptions" "^1.0.56"
"@injectivelabs/grpc-web" "^0.0.1"
"@injectivelabs/indexer-api" "1.10.0-rc.2.5"
"@injectivelabs/networks" "^1.0.93"
"@injectivelabs/ninja-api" "^1.0.11"
"@injectivelabs/token-metadata" "^1.0.113"
"@injectivelabs/ts-types" "^1.0.28"
"@injectivelabs/utils" "^1.0.64"
"@injectivelabs/token-metadata" "^1.0.173"
"@injectivelabs/ts-types" "^1.0.29"
"@injectivelabs/utils" "^1.0.81"
"@metamask/eth-sig-util" "^4.0.0"
"@types/google-protobuf" "^3.15.5"
axios "^0.27.2"
@ -1108,13 +1116,15 @@
shx "^0.3.2"
snakecase-keys "^5.4.1"
"@injectivelabs/token-metadata@^1.0.113":
version "1.0.113"
resolved "https://registry.yarnpkg.com/@injectivelabs/token-metadata/-/token-metadata-1.0.113.tgz#04cf8f2fddbbd89b6207c7d0e669fa4ecc163234"
integrity sha512-Fvk05+v3/qsWiYQHwO/0jqR7V/NjlhmgCygPj/Vj6QRGcmK+6BbX6PnqF6Z44TsupVRYEHjJ1T/CxWJCG5MIDA==
"@injectivelabs/token-metadata@^1.0.173":
version "1.0.173"
resolved "https://registry.yarnpkg.com/@injectivelabs/token-metadata/-/token-metadata-1.0.173.tgz#833840a45dbccbc57552f5909d084eac25b8a648"
integrity sha512-htEkkWSSIjfqDXkyRpKRkpqk3byxnbYGYvE504DOGnW2BL/G4YecGCt3WfdLhTrz5UX1khLc4FUddUWmf1gmhA==
dependencies:
"@injectivelabs/networks" "^1.0.75"
"@injectivelabs/ts-types" "^1.0.28"
"@injectivelabs/exceptions" "^1.0.56"
"@injectivelabs/networks" "^1.0.93"
"@injectivelabs/ts-types" "^1.0.29"
"@injectivelabs/utils" "^1.0.81"
"@types/lodash.values" "^4.3.6"
copyfiles "^2.4.1"
jsonschema "^1.4.0"
@ -1123,21 +1133,21 @@
lodash.values "^4.3.0"
shx "^0.3.2"
"@injectivelabs/ts-types@^1.0.28":
version "1.0.28"
resolved "https://registry.yarnpkg.com/@injectivelabs/ts-types/-/ts-types-1.0.28.tgz#67b99a47d85b716afda4fef6de98ab94e3281e9e"
integrity sha512-QnUi6gP/H3Yn51onKl6dVjuokXdkygpj0cpfiyvOfuMXdJ1ScF2uOTwMxmQpjuDScBqZYEIOdkgskuBmoMpTSA==
"@injectivelabs/ts-types@^1.0.29":
version "1.0.29"
resolved "https://registry.yarnpkg.com/@injectivelabs/ts-types/-/ts-types-1.0.29.tgz#c73b3e2f3cacb45fe483a957fefd788fe9922e8c"
integrity sha512-6pfh/KqBA/rFLzBI+hzahj74WnEsqfyOjUSkrRmWLpw7/mIDVGDCVqi9Zbb+2oLrhNafgYFslH4LTOml2s7BEg==
dependencies:
link-module-alias "^1.2.0"
shx "^0.3.2"
"@injectivelabs/utils@^1.0.60", "@injectivelabs/utils@^1.0.64":
version "1.0.64"
resolved "https://registry.yarnpkg.com/@injectivelabs/utils/-/utils-1.0.64.tgz#2c13832d77fdc4020460c7accfc0d4f3c910f2f5"
integrity sha512-wfxuAicKp+pYcrzvK/yL1Jr4tRaTWLtqJumQnJpvRZavqAbowWJh8bRTsuJ7kWjVK2Xhc1CDbFhruA80N14Tug==
"@injectivelabs/utils@^1.0.81":
version "1.0.81"
resolved "https://registry.yarnpkg.com/@injectivelabs/utils/-/utils-1.0.81.tgz#fe5d035835e23f1475dfb495e678a096d9104468"
integrity sha512-Eh3SEXj1E6eTnfxLWRWTax/AuGHJxrB2EkvewnKe0yZTr85x3+yn3+yNQjsKR+BrdyHDQ3KUJB5R+NSQlbK/Sw==
dependencies:
"@injectivelabs/exceptions" "^1.0.45"
"@injectivelabs/ts-types" "^1.0.28"
"@injectivelabs/exceptions" "^1.0.56"
"@injectivelabs/ts-types" "^1.0.29"
axios "^0.21.1"
bignumber.js "^9.0.1"
http-status-codes "^2.2.0"
@ -1437,6 +1447,15 @@
buffer "^6.0.3"
delay "^4.4.0"
"@keplr-wallet/common@0.11.44":
version "0.11.44"
resolved "https://registry.yarnpkg.com/@keplr-wallet/common/-/common-0.11.44.tgz#a861f2791f7ba4e0c79fe43e9dc2b84081184a03"
integrity sha512-GBaan7SHLwlJxL8qDzpYaywPlAMZA8XoY4igNbiXeCDIKjh+up8qsYofVlxv1HxRnLSuKbefkDekdMfU0PnQ+g==
dependencies:
"@keplr-wallet/crypto" "0.11.44"
buffer "^6.0.3"
delay "^4.4.0"
"@keplr-wallet/cosmos@^0.11.38":
version "0.11.38"
resolved "https://registry.yarnpkg.com/@keplr-wallet/cosmos/-/cosmos-0.11.38.tgz#5657e3fed10c9a9f75d29f01a137913403196348"
@ -1454,6 +1473,23 @@
long "^4.0.0"
protobufjs "^6.11.2"
"@keplr-wallet/cosmos@^0.11.44":
version "0.11.44"
resolved "https://registry.yarnpkg.com/@keplr-wallet/cosmos/-/cosmos-0.11.44.tgz#61da6fea8f10985635e9efc7d04c6dc90ce137f8"
integrity sha512-k9nD+eIpupuwu4hpocFEgGDM3aZKfAl6biidpRquSYH+2mL+6on9UDs00Us8B1nZA81p4NTe2xju5ZKC2+/zDw==
dependencies:
"@ethersproject/address" "^5.6.0"
"@keplr-wallet/common" "0.11.44"
"@keplr-wallet/crypto" "0.11.44"
"@keplr-wallet/proto-types" "0.11.44"
"@keplr-wallet/types" "0.11.44"
"@keplr-wallet/unit" "0.11.44"
axios "^0.27.2"
bech32 "^1.1.4"
buffer "^6.0.3"
long "^4.0.0"
protobufjs "^6.11.2"
"@keplr-wallet/crypto@0.11.38":
version "0.11.38"
resolved "https://registry.yarnpkg.com/@keplr-wallet/crypto/-/crypto-0.11.38.tgz#72bf8b621cd0a7e1cac172d18b385ce3bf1d657f"
@ -1468,6 +1504,20 @@
elliptic "^6.5.3"
sha.js "^2.4.11"
"@keplr-wallet/crypto@0.11.44":
version "0.11.44"
resolved "https://registry.yarnpkg.com/@keplr-wallet/crypto/-/crypto-0.11.44.tgz#c2fba59646d48fbef082926139bddb0773faf2ee"
integrity sha512-RNI59Tex/dnuBLC2TdhjkcgYeOqJYoxC3YZQMiM13u7G7OT48h11hJG6eXik/D7AlXxY+Fj/DhDZ75ywS/DOKA==
dependencies:
"@ethersproject/keccak256" "^5.5.0"
bip32 "^2.0.6"
bip39 "^3.0.3"
bs58check "^2.1.2"
buffer "^6.0.3"
crypto-js "^4.0.0"
elliptic "^6.5.3"
sha.js "^2.4.11"
"@keplr-wallet/proto-types@0.11.38", "@keplr-wallet/proto-types@^0.11.38":
version "0.11.38"
resolved "https://registry.yarnpkg.com/@keplr-wallet/proto-types/-/proto-types-0.11.38.tgz#b31152b06e1f7a9d7c5768767a22d79dbf4c9161"
@ -1476,6 +1526,14 @@
long "^4.0.0"
protobufjs "^6.11.2"
"@keplr-wallet/proto-types@0.11.44":
version "0.11.44"
resolved "https://registry.yarnpkg.com/@keplr-wallet/proto-types/-/proto-types-0.11.44.tgz#feca2ee215c957a7391bc66f64d2c36a5f5d3164"
integrity sha512-qwq+VJ0nwU1OCyM70jqebWHvl6XlHB6kXRlBeNnL+FPdyYGzQFgsJeNK9fveY2wFE/gqcPc4oQjHuU0fifvipQ==
dependencies:
long "^4.0.0"
protobufjs "^6.11.2"
"@keplr-wallet/types@0.11.38":
version "0.11.38"
resolved "https://registry.yarnpkg.com/@keplr-wallet/types/-/types-0.11.38.tgz#cfaaa4686d0c5b901ba987e6806ac9a17162f0a0"
@ -1484,6 +1542,14 @@
axios "^0.27.2"
long "^4.0.0"
"@keplr-wallet/types@0.11.44":
version "0.11.44"
resolved "https://registry.yarnpkg.com/@keplr-wallet/types/-/types-0.11.44.tgz#37589ed9c6b20211de8480ecb99edc7b1eaa1e0f"
integrity sha512-QR7oh3r2yFP7vBHVh3MnTt+E+sFV4tATD8b6rnO7ym6B3Novm69TQgo4EM9uqh0LUSnWHPQFN9unyTKtnNvApw==
dependencies:
axios "^0.27.2"
long "^4.0.0"
"@keplr-wallet/unit@0.11.38":
version "0.11.38"
resolved "https://registry.yarnpkg.com/@keplr-wallet/unit/-/unit-0.11.38.tgz#e4f83251d0af34a7fc1a348cf2030f80428af3d2"
@ -1493,22 +1559,31 @@
big-integer "^1.6.48"
utility-types "^3.10.0"
"@keplr-wallet/unit@0.11.44":
version "0.11.44"
resolved "https://registry.yarnpkg.com/@keplr-wallet/unit/-/unit-0.11.44.tgz#2fdf9dde9036e7f988d34eb07be4ea03953c55bf"
integrity sha512-gRUDzg/qXaEhQ+fp45RGOMGLrH+5gNlFvSH/9/vFhqlaKKHAhq4Aj8pEZfeZBocpqbrgNca+nv1XnvPgWtzNHw==
dependencies:
"@keplr-wallet/types" "0.11.44"
big-integer "^1.6.48"
utility-types "^3.10.0"
"@kurkle/color@^0.3.0":
version "0.3.2"
resolved "https://registry.yarnpkg.com/@kurkle/color/-/color-0.3.2.tgz#5acd38242e8bde4f9986e7913c8fdf49d3aa199f"
integrity sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw==
"@marsprotocol/wallet-connector@^1.4.5":
version "1.4.5"
resolved "https://registry.yarnpkg.com/@marsprotocol/wallet-connector/-/wallet-connector-1.4.5.tgz#5d87cc587c9a5458bc02a412b7d5c7fe2c76e62d"
integrity sha512-96LjjqQe4+IYJeQGPftYjDFDSY2TOSkS+j0pP0HhbHdrbR5cT823ClvsrceNSjKAUWQESxNtdpZlf0DRQfKz8Q==
"@marsprotocol/wallet-connector@^1.5.2":
version "1.5.2"
resolved "https://registry.yarnpkg.com/@marsprotocol/wallet-connector/-/wallet-connector-1.5.2.tgz#dd3dacf0d5ffdb2e1d00fb9cd0d8edf2599e01a2"
integrity sha512-3VvTH+F3LmsFYOLRg1KGXTLkaRH3V7ZqACjhSevOPlxh8YmlMx8dmpQAMKfIU3hkirE4wZHQcVuy9uMLPBKi1Q==
dependencies:
"@cosmjs/cosmwasm-stargate" "^0.29.5"
"@cosmjs/encoding" "^0.29.5"
"@cosmjs/stargate" "^0.29.5"
"@delphi-labs/shuttle" "^2.3.9"
"@keplr-wallet/cosmos" "^0.11.38"
axios "^1.3.2"
"@delphi-labs/shuttle" "^2.6.1"
"@keplr-wallet/cosmos" "^0.11.44"
axios "^1.3.4"
react-device-detect "^2.2.3"
react-modal "^3.16.1"
react-qr-code "^2.0.11"
@ -2924,10 +2999,10 @@ axios@^0.27.2:
follow-redirects "^1.14.9"
form-data "^4.0.0"
axios@^1.3.2:
version "1.3.2"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.3.2.tgz#7ac517f0fa3ec46e0e636223fd973713a09c72b3"
integrity sha512-1M3O703bYqYuPhbHeya5bnhpYVsDDRyQSabNja04mZtboLNSuZ4YrltestrLXfHgmzua4TpUqRiVKbiQuo2epw==
axios@^1.3.4:
version "1.3.4"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.3.4.tgz#f5760cefd9cfb51fd2481acf88c05f67c4523024"
integrity sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==
dependencies:
follow-redirects "^1.15.0"
form-data "^4.0.0"
@ -5992,11 +6067,6 @@ long@^4.0.0:
resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28"
integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==
long@^5.2.1:
version "5.2.1"
resolved "https://registry.yarnpkg.com/long/-/long-5.2.1.tgz#e27595d0083d103d2fa2c20c7699f8e0c92b897f"
integrity sha512-GKSNGeNAtw8IryjjkhZxuKB3JzlcLTwjtiQCHKvqQet81I93kXslhDQruGI/QsddO83mcDToBVy7GqGS/zYf/A==
loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"