diff --git a/packages/app/package.json b/packages/app/package.json index f6d90d81..e7f8fca6 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -82,6 +82,7 @@ "@tsconfig/react-native": "^2.0.2", "@types/fast-text-encoding": "^1", "@types/jest": "^29.2.1", + "@types/lodash": "^4.17.7", "@types/moment-duration-format": "^2", "@types/qs": "^6", "@types/react": "^18.2.12", diff --git a/packages/app/src/App.tsx b/packages/app/src/App.tsx index 3f1e4b05..f7379b6a 100644 --- a/packages/app/src/App.tsx +++ b/packages/app/src/App.tsx @@ -25,18 +25,23 @@ import { Colors } from './utils/colors'; import { useCreateSubgraphApolloClient, useCreateMongoDbApolloClient } from './hooks/apollo'; import { MongoDbApolloProvider } from './components/providers/MongoDbApolloProvider'; -const celoProvider = jsonRpcProvider({ - rpc: (chain) => { - if (chain.id === 42220) { - return { - http: 'https://rpc.ankr.com/celo', - }; - } - return null; - }, -}); function App(): JSX.Element { - const { publicClient, webSocketPublicClient } = configureChains([celo, mainnet], [publicProvider(), celoProvider]); + const { publicClient, webSocketPublicClient } = configureChains( + [celo, mainnet], + [ + publicProvider(), + jsonRpcProvider({ + rpc: (chain) => { + if (chain.id === 42220) { + return { + http: 'https://rpc.ankr.com/celo', + }; + } + return null; + }, + }), + ] + ); const connectors = [ new MetaMaskConnector({ diff --git a/packages/app/src/components/DonateComponent.tsx b/packages/app/src/components/DonateComponent.tsx index 37fd0482..a2367a4c 100644 --- a/packages/app/src/components/DonateComponent.tsx +++ b/packages/app/src/components/DonateComponent.tsx @@ -9,9 +9,9 @@ import Dropdown from './Dropdown'; import { getDonateStyles, getFrequencyPlural } from '../utils'; import { useContractCalls, useGetTokenPrice } from '../hooks'; import { useAccount, useNetwork } from 'wagmi'; -import { IpfsCollective } from '../models/models'; +import { Collective } from '../models/models'; import { useGetTokenBalance } from '../hooks/useGetTokenBalance'; -import { acceptablePriceImpact, Frequency, frequencyOptions, SupportedNetwork } from '../models/constants'; +import { acceptablePriceImpact, Frequency, frequencyOptions, GDEnvTokens, SupportedNetwork } from '../models/constants'; import { InfoIconOrange } from '../assets'; import { useParams } from 'react-router-native'; import Decimal from 'decimal.js'; @@ -28,7 +28,7 @@ import ThankYouModal from './modals/ThankYouModal'; import useCrossNavigate from '../routes/useCrossNavigate'; interface DonateComponentProps { - collective: IpfsCollective; + collective: Collective; } function DonateComponent({ collective }: DonateComponentProps) { @@ -51,26 +51,39 @@ function DonateComponent({ collective }: DonateComponentProps) { navigate(`/profile/${address}`); } - const [currency, setCurrency] = useState('G$'); const [frequency, setFrequency] = useState(Frequency.Monthly); const [duration, setDuration] = useState(12); const [decimalDonationAmount, setDecimalDonationAmount] = useState(0); const tokenList = useTokenList(); + const gdEnvSymbol = + Object.keys(tokenList).find((key) => { + if (key.startsWith('G$')) { + return tokenList[key].address.toLowerCase() === collective.rewardToken.toLowerCase(); + } else return false; + }) || 'G$'; + + const GDToken = GDEnvTokens[gdEnvSymbol]; + const currencyOptions: { value: string; label: string }[] = useMemo(() => { - let options = Object.keys(tokenList).map((key) => ({ - value: key, - label: key, - })); + let options = Object.keys(tokenList) + .filter((key) => key.startsWith('G$') === false || key === gdEnvSymbol) + .map((key) => ({ + value: key, + label: key, + })); + return options; - }, [tokenList]); + }, [tokenList, gdEnvSymbol]); + + const [currency, setCurrency] = useState(gdEnvSymbol || 'G$'); const { path: swapPath, rawMinimumAmountOut, priceImpact, status: swapRouteStatus, - } = useSwapRoute(currency, decimalDonationAmount, duration); + } = useSwapRoute(currency, GDToken, decimalDonationAmount, duration); const { handleApproveToken, isRequireApprove } = useApproveSwapTokenCallback( currency, @@ -79,7 +92,7 @@ function DonateComponent({ collective }: DonateComponentProps) { (value: boolean) => setApproveSwapModalVisible(value), collectiveId as `0x${string}` ); - const approvalNotReady = handleApproveToken === undefined && currency !== 'G$'; + const approvalNotReady = handleApproveToken === undefined && currency.startsWith('G$') === false; const { supportFlowWithSwap, supportFlow, supportSingleTransferAndCall, supportSingleWithSwap } = useContractCalls( collectiveId, @@ -97,12 +110,12 @@ function DonateComponent({ collective }: DonateComponentProps) { const handleDonate = useCallback(async () => { if (frequency === Frequency.OneTime) { - if (currency === 'G$') { + if (currency.startsWith('G$')) { return await supportSingleTransferAndCall(); } else { return await supportSingleWithSwap(); } - } else if (currency === 'G$') { + } else if (currency.startsWith('G$')) { return await supportFlow(); } @@ -143,8 +156,9 @@ function DonateComponent({ collective }: DonateComponentProps) { supportSingleWithSwap, ]); - const currencyDecimals = useToken(currency).decimals; - const donorCurrencyBalance = useGetTokenBalance(currency, address, chain?.id, true); + const token = useToken(currency); + const currencyDecimals = token.decimals; + const donorCurrencyBalance = useGetTokenBalance(token.address, address, chain?.id, true); const totalDecimalDonation = new Decimal(duration * decimalDonationAmount); const totalDonationFormatted = totalDecimalDonation.toDecimalPlaces(currencyDecimals, Decimal.ROUND_DOWN).toString(); @@ -152,9 +166,12 @@ function DonateComponent({ collective }: DonateComponentProps) { const isNonZeroDonation = totalDecimalDonation.gt(0); const isInsufficientBalance = isNonZeroDonation && (!donorCurrencyBalance || totalDecimalDonation.gt(donorCurrencyBalance)); - const isInsufficientLiquidity = isNonZeroDonation && currency !== 'G$' && swapRouteStatus === SwapRouteState.NO_ROUTE; + const isInsufficientLiquidity = + isNonZeroDonation && currency.startsWith('G$') === false && swapRouteStatus === SwapRouteState.NO_ROUTE; const isUnacceptablePriceImpact = - isNonZeroDonation && currency !== 'G$' && priceImpact ? priceImpact > acceptablePriceImpact : false; + isNonZeroDonation && currency.startsWith('G$') === false && priceImpact + ? priceImpact > acceptablePriceImpact + : false; const { price } = useGetTokenPrice(currency); const donationAmountUsdValue = price ? formatFiatCurrency(decimalDonationAmount * price) : undefined; @@ -199,7 +216,7 @@ function DonateComponent({ collective }: DonateComponentProps) { Donate - Support {collective.name}{' '} + Support {collective.ipfs.name}{' '} {isDesktopResolution && ( <>
@@ -487,7 +504,7 @@ function DonateComponent({ collective }: DonateComponentProps) { onPress={handleDonate} isLoading={swapRouteStatus === SwapRouteState.LOADING} disabled={ - (currency !== 'G$' && swapRouteStatus !== SwapRouteState.READY) || + (currency.startsWith('G$') === false && swapRouteStatus !== SwapRouteState.READY) || address === undefined || chain?.id === undefined || !(chain.id in SupportedNetwork) || @@ -502,7 +519,7 @@ function DonateComponent({ collective }: DonateComponentProps) {
diff --git a/packages/app/src/components/FlowingCurrentPoolRowItem.tsx b/packages/app/src/components/FlowingDonationsRowItem.old.tsx similarity index 69% rename from packages/app/src/components/FlowingCurrentPoolRowItem.tsx rename to packages/app/src/components/FlowingDonationsRowItem.old.tsx index 4468acb5..9adf2f61 100644 --- a/packages/app/src/components/FlowingCurrentPoolRowItem.tsx +++ b/packages/app/src/components/FlowingDonationsRowItem.old.tsx @@ -2,41 +2,32 @@ import { Image, Text, View, StyleSheet } from 'react-native'; import { InterRegular, InterSemiBold } from '../utils/webFonts'; import { Colors } from '../utils/colors'; import { useMediaQuery } from 'native-base'; -import { useDonorCollectivesFlowingBalancesWithAltStaticBalance } from '../hooks/useFlowingBalance'; +import { useDonorCollectivesFlowingBalances } from '../hooks/useFlowingBalance'; import { DonorCollective } from '../models/models'; -import { useGetTokenBalance } from '../hooks/useGetTokenBalance'; -import { SupportedNetwork } from '../models/constants'; -import Decimal from 'decimal.js'; interface FlowingDonationsRowItemProps { rowInfo: string; - collective: `0x${string}`; donorCollectives: DonorCollective[]; tokenPrice: number | undefined; currency?: string; imageUrl: string; - additionalBalance?: string; } function FlowingDonationsRowItem({ rowInfo, - collective, donorCollectives, tokenPrice, currency, imageUrl, - additionalBalance, }: FlowingDonationsRowItemProps) { const [isDesktopResolution] = useMediaQuery({ minWidth: 920, }); - const currentBalance = useGetTokenBalance('G$', collective, SupportedNetwork.CELO); - const balanceUsed = additionalBalance - ? new Decimal(currentBalance).add(additionalBalance).toFixed(0, Decimal.ROUND_DOWN) - : currentBalance; - const { formatted: formattedCurrentPool, usdValue: usdValueCurrentPool } = - useDonorCollectivesFlowingBalancesWithAltStaticBalance(balanceUsed, donorCollectives, tokenPrice); + const { formatted: formattedDonations, usdValue: donationsUsdValue } = useDonorCollectivesFlowingBalances( + donorCollectives, + tokenPrice + ); return ( @@ -47,10 +38,10 @@ function FlowingDonationsRowItem({ - {currency} {formattedCurrentPool} - {isDesktopResolution && currency && = {usdValueCurrentPool} USD} + {currency} {formattedDonations} + {isDesktopResolution && currency && = {donationsUsdValue} USD} - {!isDesktopResolution && currency && = {usdValueCurrentPool} USD} + {!isDesktopResolution && currency && = {donationsUsdValue} USD} diff --git a/packages/app/src/components/FlowingDonationsRowItem.tsx b/packages/app/src/components/FlowingDonationsRowItem.tsx index 9adf2f61..25626efa 100644 --- a/packages/app/src/components/FlowingDonationsRowItem.tsx +++ b/packages/app/src/components/FlowingDonationsRowItem.tsx @@ -2,32 +2,43 @@ import { Image, Text, View, StyleSheet } from 'react-native'; import { InterRegular, InterSemiBold } from '../utils/webFonts'; import { Colors } from '../utils/colors'; import { useMediaQuery } from 'native-base'; -import { useDonorCollectivesFlowingBalances } from '../hooks/useFlowingBalance'; +import { useDonorCollectivesFlowingBalancesWithAltStaticBalance } from '../hooks/useFlowingBalance'; import { DonorCollective } from '../models/models'; +import { useGetTokenBalance } from '../hooks/useGetTokenBalance'; +import { SupportedNetwork } from '../models/constants'; +import Decimal from 'decimal.js'; +import { useTokenByAddress } from '../hooks/useTokenList'; interface FlowingDonationsRowItemProps { rowInfo: string; + collective: `0x${string}`; donorCollectives: DonorCollective[]; tokenPrice: number | undefined; - currency?: string; + currency: string; imageUrl: string; + additionalBalance?: string; } function FlowingDonationsRowItem({ rowInfo, + collective, donorCollectives, tokenPrice, currency, imageUrl, + additionalBalance, }: FlowingDonationsRowItemProps) { + const token = useTokenByAddress(currency); const [isDesktopResolution] = useMediaQuery({ minWidth: 920, }); - const { formatted: formattedDonations, usdValue: donationsUsdValue } = useDonorCollectivesFlowingBalances( - donorCollectives, - tokenPrice - ); + const currentBalance = useGetTokenBalance(currency, collective, SupportedNetwork.CELO); + const balanceUsed = additionalBalance + ? new Decimal(currentBalance).add(additionalBalance).toFixed(0, Decimal.ROUND_DOWN) + : currentBalance; + const { formatted: formattedCurrentPool, usdValue: usdValueCurrentPool } = + useDonorCollectivesFlowingBalancesWithAltStaticBalance(balanceUsed, donorCollectives, tokenPrice); return ( @@ -38,10 +49,10 @@ function FlowingDonationsRowItem({ - {currency} {formattedDonations} - {isDesktopResolution && currency && = {donationsUsdValue} USD} + {token.symbol} {formattedCurrentPool} + {isDesktopResolution && currency && = {usdValueCurrentPool} USD} - {!isDesktopResolution && currency && = {donationsUsdValue} USD} + {!isDesktopResolution && currency && = {usdValueCurrentPool} USD} diff --git a/packages/app/src/components/RoundedButton.tsx b/packages/app/src/components/RoundedButton.tsx index 1baa8f55..01246799 100644 --- a/packages/app/src/components/RoundedButton.tsx +++ b/packages/app/src/components/RoundedButton.tsx @@ -37,7 +37,11 @@ function RoundedButton({ disabled={disabled} style={[styles.button, { backgroundColor, maxWidth: maxWidth ?? 'auto' }]} onPress={onPress}> - {isLoading ? () : ({title})} + {isLoading ? ( + + ) : ( + {title} + )} ); } diff --git a/packages/app/src/components/ViewCollective.tsx b/packages/app/src/components/ViewCollective.tsx index 6fbf493e..5fbb3ea0 100644 --- a/packages/app/src/components/ViewCollective.tsx +++ b/packages/app/src/components/ViewCollective.tsx @@ -32,7 +32,7 @@ import { import { calculateGoodDollarAmounts } from '../lib/calculateGoodDollarAmounts'; import { useDeleteFlow } from '../hooks/useContractCalls/useDeleteFlow'; import ErrorModal from './modals/ErrorModal'; -import FlowingCurrentPoolRowItem from './FlowingCurrentPoolRowItem'; +import FlowingDonationsRowItem from './FlowingDonationsRowItem'; import { defaultInfoLabel, SUBGRAPH_POLL_INTERVAL } from '../models/constants'; import env from '../lib/env'; @@ -189,13 +189,13 @@ function ViewCollective({ collective }: ViewCollectiveProps) { - - @@ -284,13 +284,13 @@ function ViewCollective({ collective }: ViewCollectiveProps) { - - diff --git a/packages/app/src/components/WalletProfile.tsx b/packages/app/src/components/WalletProfile.tsx index 68e18f35..457b7144 100644 --- a/packages/app/src/components/WalletProfile.tsx +++ b/packages/app/src/components/WalletProfile.tsx @@ -115,7 +115,7 @@ const styles = StyleSheet.create({ borderBottomEndRadius: 16, }, desktopContainer: { - maxHeight: 485, + maxHeight: 550, maxWidth: 420, borderRadius: 16, }, diff --git a/packages/app/src/hooks/useGetTokenBalance.ts b/packages/app/src/hooks/useGetTokenBalance.ts index 26a3fc74..73a408d2 100644 --- a/packages/app/src/hooks/useGetTokenBalance.ts +++ b/packages/app/src/hooks/useGetTokenBalance.ts @@ -4,21 +4,19 @@ import { fetchBalance } from 'wagmi/actions'; import { useToken } from './useTokenList'; export const useGetTokenBalance = ( - currencySymbol: string, + currencyAddress: string, accountAddress: `0x${string}` | undefined, chainId: number = SupportedNetwork.CELO, formatted?: boolean ): string => { const [tokenBalance, setTokenBalance] = useState('0'); - const token = useToken(currencySymbol); - useEffect(() => { - if (!token || !accountAddress || chainId !== SupportedNetwork.CELO) return; + if (!currencyAddress || !accountAddress || chainId !== SupportedNetwork.CELO) return; fetchBalance({ address: accountAddress, chainId: chainId, - token: token.address as `0x${string}`, + token: currencyAddress as `0x${string}`, }) .then((res) => { const balance = formatted ? res.formatted : res.value.toString(); @@ -27,7 +25,7 @@ export const useGetTokenBalance = ( .catch((e) => { console.error(e); }); - }, [currencySymbol, token, accountAddress, chainId, formatted]); + }, [currencyAddress, accountAddress, chainId, formatted]); return tokenBalance; }; diff --git a/packages/app/src/hooks/useSwapRoute.tsx b/packages/app/src/hooks/useSwapRoute.tsx index 482c1593..928539a0 100644 --- a/packages/app/src/hooks/useSwapRoute.tsx +++ b/packages/app/src/hooks/useSwapRoute.tsx @@ -6,9 +6,9 @@ import { UniswapMulticallProvider, V3Route, } from '@uniswap/smart-order-router'; -import { CurrencyAmount, Percent, TradeType } from '@uniswap/sdk-core'; +import { CurrencyAmount, Percent, Token, TradeType } from '@uniswap/sdk-core'; import { useAccount, useNetwork } from 'wagmi'; -import { GDToken, SupportedNetwork } from '../models/constants'; +import { SupportedNetwork } from '../models/constants'; import { useEthersProvider } from './useEthers'; import { calculateRawTotalDonation } from '../lib/calculateRawTotalDonation'; import Decimal from 'decimal.js'; @@ -27,6 +27,7 @@ const DEFAULT_SLIPPAGE_TOLERANCE = new Percent(100, 10_000); export function useSwapRoute( currencyIn: string, + GDToken: Token, decimalAmountIn: number, duration: number, slippageTolerance: Percent = DEFAULT_SLIPPAGE_TOLERANCE @@ -51,7 +52,7 @@ export function useSwapRoute( !chain?.id || chain.id !== SupportedNetwork.CELO || !provider || - tokenIn.symbol === 'G$' + tokenIn.symbol?.startsWith('G$') ) { return; } @@ -69,12 +70,8 @@ export function useSwapRoute( minTimeout: 100, maxTimeout: 1000, }, + undefined, // this settings are required to solve multicall gas issue with forno - { - multicallChunk: 10, - gasLimitPerCall: 2_000_000, - quoteMinSuccessRate: 0.1, - }, { gasLimitOverride: 2_000_000, multicallChunk: 5, @@ -111,7 +108,7 @@ export function useSwapRoute( console.error('failed to get route:', e, { inputAmount, tokenIn, GDToken }); setRoute(undefined); }); - }, [address, chain?.id, provider, tokenIn, decimalAmountIn, duration, slippageTolerance]); + }, [address, chain?.id, provider, tokenIn, decimalAmountIn, duration, slippageTolerance, GDToken]); if (route === 'loading') { return { status: SwapRouteState.LOADING }; diff --git a/packages/app/src/hooks/useTokenList.ts b/packages/app/src/hooks/useTokenList.ts index 96c0d59f..bf4a4503 100644 --- a/packages/app/src/hooks/useTokenList.ts +++ b/packages/app/src/hooks/useTokenList.ts @@ -4,7 +4,10 @@ import { Token } from '@uniswap/sdk-core'; import CeloTokenList from '../models/CeloTokenList.json'; import { SupportedNetwork } from '../models/constants'; -const populatedTokenList: Record = {}; +const populatedTokenList: Record = { + 'G$-Dev': new Token(42220, '0xFa51eFDc0910CCdA91732e6806912Fa12e2FD475', 18, 'G$-Dev'), + 'G$-QA': new Token(42220, '0x61FA0fB802fd8345C06da558240E0651886fec69', 18, 'G$-QA'), +}; populateTokenList(); async function populateTokenList() { @@ -35,6 +38,12 @@ export function useToken(symbol: string): Token { return populatedTokenList[symbol] || {}; } +export function useTokenByAddress(address: string): Token { + return ( + Object.values(populatedTokenList).find((_) => _.address.toLowerCase() === address.toLowerCase()) || ({} as Token) + ); +} + export function useTokenList(): Record { return populatedTokenList; } diff --git a/packages/app/src/lib/defaults.ts b/packages/app/src/lib/defaults.ts index 1982cbc3..c8b34b7e 100644 --- a/packages/app/src/lib/defaults.ts +++ b/packages/app/src/lib/defaults.ts @@ -1,6 +1,6 @@ export const defaults = { REACT_APP_CELO_EXPLORER: 'https://celoscan.io', - REACT_APP_SUPERFLUID_EXPLORER: 'https://console.superfluid.finance/celo', + REACT_APP_SUPERFLUID_EXPLORER: 'https://app.superfluid.finance/stream/celo', REACT_APP_NETWORK: 'celo', - REACT_APP_SUBGRAPH: 'https://api.studio.thegraph.com/query/59211/goodcollective/dev-v1.0.4', + REACT_APP_SUBGRAPH: 'https://api.studio.thegraph.com/query/59211/goodcollective/version/latest', }; diff --git a/packages/app/src/models/constants.ts b/packages/app/src/models/constants.ts index 14312fa5..ded429f6 100644 --- a/packages/app/src/models/constants.ts +++ b/packages/app/src/models/constants.ts @@ -17,7 +17,19 @@ export const SupportedNetworkNames: Record = { export const UNISWAP_V3_ROUTER_ADDRESS = '0x5615CDAb10dc425a742d643d949a7F474C01abc4'; export const GDToken: Token = new Token(SupportedNetwork.CELO, GdContracts['production-celo'].GoodDollar, 18, 'G$'); - +export const GDDevToken: Token = new Token( + SupportedNetwork.CELO, + GdContracts['development-celo'].GoodDollar, + 18, + 'G$-Dev' +); +export const GDQAToken: Token = new Token(SupportedNetwork.CELO, GdContracts['staging-celo'].GoodDollar, 18, 'G$-QA'); + +export const GDEnvTokens: { [key: string]: Token } = { + 'G$-Dev': GDDevToken, + 'G$-QA': GDQAToken, + G$: GDToken, +}; // if a token is not in this list, the address from the Celo Token List is used export const coingeckoTokenMapping: Record = { WBTC: '0xD629eb00dEced2a080B7EC630eF6aC117e614f1b', diff --git a/packages/app/src/models/models.ts b/packages/app/src/models/models.ts index 6da8ab7a..3fbda226 100644 --- a/packages/app/src/models/models.ts +++ b/packages/app/src/models/models.ts @@ -37,6 +37,7 @@ export interface Collective { paymentsMade: number; totalDonations: string; totalRewards: string; + rewardToken: string; } export interface IpfsCollective { diff --git a/packages/app/src/models/transforms.ts b/packages/app/src/models/transforms.ts index d51f013f..dfb5a6b9 100644 --- a/packages/app/src/models/transforms.ts +++ b/packages/app/src/models/transforms.ts @@ -71,6 +71,7 @@ export function subgraphCollectiveToModel(subgraphCollective: SubgraphCollective paymentsMade: subgraphCollective.paymentsMade, totalDonations: subgraphCollective.totalDonations, totalRewards: subgraphCollective.totalRewards, + rewardToken: subgraphCollective.settings?.rewardToken || '', }; } diff --git a/packages/app/src/pages/DonatePage.tsx b/packages/app/src/pages/DonatePage.tsx index a8eac45b..2e9acccb 100644 --- a/packages/app/src/pages/DonatePage.tsx +++ b/packages/app/src/pages/DonatePage.tsx @@ -1,22 +1,21 @@ import Layout from '../components/Layout/Layout'; import DonateComponent from '../components/DonateComponent'; import React from 'react'; -import { useCollectivesMetadataById } from '../hooks'; +import { useCollectiveById } from '../hooks'; import { useParams } from 'react-router-native'; import { Text } from 'react-native'; function DonatePage() { const { id: collectiveId = '' } = useParams(); - const ipfsCollectives = useCollectivesMetadataById([collectiveId]); - const ipfsCollective = ipfsCollectives.length > 0 ? ipfsCollectives[0] : undefined; + const collective = useCollectiveById(collectiveId); return ( - {!ipfsCollective ? Loading... : } + {!collective ? Loading... : } ); } diff --git a/packages/app/src/subgraph/useSubgraphCollective.ts b/packages/app/src/subgraph/useSubgraphCollective.ts index dbf75b28..4182a7d3 100644 --- a/packages/app/src/subgraph/useSubgraphCollective.ts +++ b/packages/app/src/subgraph/useSubgraphCollective.ts @@ -45,6 +45,9 @@ export const collectivesById = gql` paymentsMade totalDonations totalRewards + settings { + rewardToken + } } } `; diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 288ba2e8..487a816a 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -6,6 +6,7 @@ "types": "./typechain-types/index.ts", "files": [ "contracts", + "artifacts/contracts", "typechain-types", "releases" ], diff --git a/yarn.lock b/yarn.lock index 0fb3a9ce..3dec912f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4526,6 +4526,7 @@ __metadata: "@tsconfig/react-native": ^2.0.2 "@types/fast-text-encoding": ^1 "@types/jest": ^29.2.1 + "@types/lodash": ^4.17.7 "@types/moment-duration-format": ^2 "@types/qs": ^6 "@types/react": ^18.2.12 @@ -10836,6 +10837,13 @@ __metadata: languageName: node linkType: hard +"@types/lodash@npm:^4.17.7": + version: 4.17.7 + resolution: "@types/lodash@npm:4.17.7" + checksum: 09e58a119cd8a70acfb33f8623dc2fc54f74cdce3b3429b879fc2daac4807fe376190a04b9e024dd300f9a3ee1876d6623979cefe619f70654ca0fe0c47679a7 + languageName: node + linkType: hard + "@types/long@npm:^4.0.1": version: 4.0.2 resolution: "@types/long@npm:4.0.2"