Skip to content

Commit

Permalink
using new tick reader contract (#1216)
Browse files Browse the repository at this point in the history
* using new tick reader contract

* feat: add new farm contract on polygon
  • Loading branch information
viet-nv authored Aug 8, 2022
1 parent d3f7033 commit a6685c4
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 14 deletions.
8 changes: 6 additions & 2 deletions src/components/YieldPools/ProMMFarmGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ const Row = ({

const canHarvest = farm.userDepositedNFTs.some(pos => !!pos.rewardPendings.length)
const canUnstake = farm.userDepositedNFTs.some(pos => pos.stakedLiquidity.gt(0))
const canStake = farm.startTime <= currentTimestamp

useEffect(() => {
if (position)
Expand Down Expand Up @@ -482,8 +483,11 @@ const Row = ({
))}
</Flex>
<Flex justifyContent="flex-end" sx={{ gap: '4px' }}>
<ActionButton onClick={() => onOpenModal('stake', farm.pid)} disabled={!isApprovedForAll || tab === 'ended'}>
<MouseoverTooltip text={t`Stake`} placement="top" width="fit-content">
<ActionButton
onClick={() => onOpenModal('stake', farm.pid)}
disabled={!isApprovedForAll || tab === 'ended' || !canStake}
>
<MouseoverTooltip text={!canStake ? t`Farm has not started` : t`Stake`} placement="top" width="fit-content">
<Plus color={isApprovedForAll && tab !== 'ended' ? theme.primary : theme.subText} size={16} />
</MouseoverTooltip>
</ActionButton>
Expand Down
2 changes: 1 addition & 1 deletion src/constants/networks/arbitrum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const arbitrumInfo: NetworkInfo = {
elastic: {
coreFactory: '0x5F1dddbf348aC2fbe22a163e30F99F9ECE3DD50a',
nonfungiblePositionManager: '0x2B1c7b41f6A8F2b2bc45C3233a5d5FB3cD6dC9A8',
tickReader: '0xdC4382353A007fCefADF0609920C256173F7d210',
tickReader: '0x165c68077ac06c83800d19200e6E2B08D02dE75D',
initCodeHash: '0xc597aba1bb02db42ba24a8878837965718c032f8b46be94a6e46452a9f89ca01',
quoter: '0x0D125c15D54cA1F8a813C74A81aEe34ebB508C1f',
routers: '0xC1e7dFE73E1598E3910EF4C7845B68A9Ab6F4c83',
Expand Down
2 changes: 1 addition & 1 deletion src/constants/networks/aurora.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const auroraInfo: NetworkInfo = {
elastic: {
coreFactory: '0x5F1dddbf348aC2fbe22a163e30F99F9ECE3DD50a',
nonfungiblePositionManager: '0x2B1c7b41f6A8F2b2bc45C3233a5d5FB3cD6dC9A8',
tickReader: '0xdC4382353A007fCefADF0609920C256173F7d210',
tickReader: '0x165c68077ac06c83800d19200e6E2B08D02dE75D',
initCodeHash: '0xc597aba1bb02db42ba24a8878837965718c032f8b46be94a6e46452a9f89ca01',
quoter: '0x0D125c15D54cA1F8a813C74A81aEe34ebB508C1f',
routers: '0xC1e7dFE73E1598E3910EF4C7845B68A9Ab6F4c83',
Expand Down
2 changes: 1 addition & 1 deletion src/constants/networks/avax.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const avaxInfo: NetworkInfo = {
elastic: {
coreFactory: '0x5F1dddbf348aC2fbe22a163e30F99F9ECE3DD50a',
nonfungiblePositionManager: '0x2B1c7b41f6A8F2b2bc45C3233a5d5FB3cD6dC9A8',
tickReader: '0xdC4382353A007fCefADF0609920C256173F7d210',
tickReader: '0x165c68077ac06c83800d19200e6E2B08D02dE75D',
initCodeHash: '0xc597aba1bb02db42ba24a8878837965718c032f8b46be94a6e46452a9f89ca01',
quoter: '0x0D125c15D54cA1F8a813C74A81aEe34ebB508C1f',
routers: '0xC1e7dFE73E1598E3910EF4C7845B68A9Ab6F4c83',
Expand Down
2 changes: 1 addition & 1 deletion src/constants/networks/bnb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const bnbInfo: NetworkInfo = {
elastic: {
coreFactory: '0x5F1dddbf348aC2fbe22a163e30F99F9ECE3DD50a',
nonfungiblePositionManager: '0x2B1c7b41f6A8F2b2bc45C3233a5d5FB3cD6dC9A8',
tickReader: '0xdC4382353A007fCefADF0609920C256173F7d210',
tickReader: '0x165c68077ac06c83800d19200e6E2B08D02dE75D',
initCodeHash: '0xc597aba1bb02db42ba24a8878837965718c032f8b46be94a6e46452a9f89ca01',
quoter: '0x0D125c15D54cA1F8a813C74A81aEe34ebB508C1f',
routers: '0xC1e7dFE73E1598E3910EF4C7845B68A9Ab6F4c83',
Expand Down
2 changes: 1 addition & 1 deletion src/constants/networks/bttc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const bttcInfo: NetworkInfo = {
elastic: {
coreFactory: '0x5F1dddbf348aC2fbe22a163e30F99F9ECE3DD50a',
nonfungiblePositionManager: '0x2B1c7b41f6A8F2b2bc45C3233a5d5FB3cD6dC9A8',
tickReader: '0xdC4382353A007fCefADF0609920C256173F7d210',
tickReader: '0x165c68077ac06c83800d19200e6E2B08D02dE75D',
initCodeHash: '0xc597aba1bb02db42ba24a8878837965718c032f8b46be94a6e46452a9f89ca01',
quoter: '0x0D125c15D54cA1F8a813C74A81aEe34ebB508C1f',
routers: '0xC1e7dFE73E1598E3910EF4C7845B68A9Ab6F4c83',
Expand Down
2 changes: 1 addition & 1 deletion src/constants/networks/cronos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const cronosInfo: NetworkInfo = {
elastic: {
coreFactory: '0x5F1dddbf348aC2fbe22a163e30F99F9ECE3DD50a',
nonfungiblePositionManager: '0x2B1c7b41f6A8F2b2bc45C3233a5d5FB3cD6dC9A8',
tickReader: '0xdC4382353A007fCefADF0609920C256173F7d210',
tickReader: '0x165c68077ac06c83800d19200e6E2B08D02dE75D',
initCodeHash: '0xc597aba1bb02db42ba24a8878837965718c032f8b46be94a6e46452a9f89ca01',
quoter: '0x0D125c15D54cA1F8a813C74A81aEe34ebB508C1f',
routers: '0xC1e7dFE73E1598E3910EF4C7845B68A9Ab6F4c83',
Expand Down
2 changes: 1 addition & 1 deletion src/constants/networks/ethereum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const ethereumInfo: NetworkInfo = {
elastic: {
coreFactory: '0x5F1dddbf348aC2fbe22a163e30F99F9ECE3DD50a',
nonfungiblePositionManager: '0x2B1c7b41f6A8F2b2bc45C3233a5d5FB3cD6dC9A8',
tickReader: '0xdC4382353A007fCefADF0609920C256173F7d210',
tickReader: '0x165c68077ac06c83800d19200e6E2B08D02dE75D',
initCodeHash: '0xc597aba1bb02db42ba24a8878837965718c032f8b46be94a6e46452a9f89ca01',
quoter: '0x0D125c15D54cA1F8a813C74A81aEe34ebB508C1f',
routers: '0xC1e7dFE73E1598E3910EF4C7845B68A9Ab6F4c83',
Expand Down
2 changes: 1 addition & 1 deletion src/constants/networks/fantom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const fantomInfo: NetworkInfo = {
elastic: {
coreFactory: '0x5F1dddbf348aC2fbe22a163e30F99F9ECE3DD50a',
nonfungiblePositionManager: '0x2B1c7b41f6A8F2b2bc45C3233a5d5FB3cD6dC9A8',
tickReader: '0xdC4382353A007fCefADF0609920C256173F7d210',
tickReader: '0x165c68077ac06c83800d19200e6E2B08D02dE75D',
initCodeHash: '0xc597aba1bb02db42ba24a8878837965718c032f8b46be94a6e46452a9f89ca01',
quoter: '0x0D125c15D54cA1F8a813C74A81aEe34ebB508C1f',
routers: '0xC1e7dFE73E1598E3910EF4C7845B68A9Ab6F4c83',
Expand Down
2 changes: 1 addition & 1 deletion src/constants/networks/matic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const maticInfo: NetworkInfo = {
elastic: {
coreFactory: '0x5F1dddbf348aC2fbe22a163e30F99F9ECE3DD50a',
nonfungiblePositionManager: '0x2B1c7b41f6A8F2b2bc45C3233a5d5FB3cD6dC9A8',
tickReader: '0xdC4382353A007fCefADF0609920C256173F7d210',
tickReader: '0x165c68077ac06c83800d19200e6E2B08D02dE75D',
initCodeHash: '0xc597aba1bb02db42ba24a8878837965718c032f8b46be94a6e46452a9f89ca01',
quoter: '0x0D125c15D54cA1F8a813C74A81aEe34ebB508C1f',
routers: '0xC1e7dFE73E1598E3910EF4C7845B68A9Ab6F4c83',
Expand Down
2 changes: 1 addition & 1 deletion src/constants/networks/oasis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const oasisInfo: NetworkInfo = {
elastic: {
coreFactory: '0x5F1dddbf348aC2fbe22a163e30F99F9ECE3DD50a',
nonfungiblePositionManager: '0x2B1c7b41f6A8F2b2bc45C3233a5d5FB3cD6dC9A8',
tickReader: '0xdC4382353A007fCefADF0609920C256173F7d210',
tickReader: '0x165c68077ac06c83800d19200e6E2B08D02dE75D',
initCodeHash: '0xc597aba1bb02db42ba24a8878837965718c032f8b46be94a6e46452a9f89ca01',
quoter: '0x0D125c15D54cA1F8a813C74A81aEe34ebB508C1f',
routers: '0xC1e7dFE73E1598E3910EF4C7845B68A9Ab6F4c83',
Expand Down
2 changes: 1 addition & 1 deletion src/constants/networks/optimism.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const optimismInfo: NetworkInfo = {
elastic: {
coreFactory: '0x5F1dddbf348aC2fbe22a163e30F99F9ECE3DD50a',
nonfungiblePositionManager: '0x2B1c7b41f6A8F2b2bc45C3233a5d5FB3cD6dC9A8',
tickReader: '0xdC4382353A007fCefADF0609920C256173F7d210',
tickReader: '0x165c68077ac06c83800d19200e6E2B08D02dE75D',
initCodeHash: '0xc597aba1bb02db42ba24a8878837965718c032f8b46be94a6e46452a9f89ca01',
quoter: '0x0D125c15D54cA1F8a813C74A81aEe34ebB508C1f',
routers: '0xC1e7dFE73E1598E3910EF4C7845B68A9Ab6F4c83',
Expand Down
2 changes: 1 addition & 1 deletion src/constants/networks/velas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const velasInfo: NetworkInfo = {
elastic: {
coreFactory: '0x5F1dddbf348aC2fbe22a163e30F99F9ECE3DD50a',
nonfungiblePositionManager: '0x2B1c7b41f6A8F2b2bc45C3233a5d5FB3cD6dC9A8',
tickReader: '0xdC4382353A007fCefADF0609920C256173F7d210',
tickReader: '0x165c68077ac06c83800d19200e6E2B08D02dE75D',
initCodeHash: '0xc597aba1bb02db42ba24a8878837965718c032f8b46be94a6e46452a9f89ca01',
quoter: '0x0D125c15D54cA1F8a813C74A81aEe34ebB508C1f',
routers: '0xC1e7dFE73E1598E3910EF4C7845B68A9Ab6F4c83',
Expand Down
1 change: 1 addition & 0 deletions src/constants/v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const FARM_CONTRACTS: { readonly [chainId in ChainId]?: Array<string> } =
[ChainId.BSCTESTNET]: [],
[ChainId.RINKEBY]: ['0x13c8F670d3bbd4456870a2C49Bb927F166A977Bd'],
[ChainId.ROPSTEN]: [],
[ChainId.MATIC]: ['0x5C503D4b7DE0633f031229bbAA6A5e4A31cc35d8'],
}

export const ELASTIC_NOT_SUPPORTED: { [key: string]: string } = {
Expand Down

0 comments on commit a6685c4

Please sign in to comment.