-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/contract integration #12
base: master
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,98 @@ | |||
{ | |||
"address": "0x179C45D4c6F8370c68A53aF068b5Fa20e3fE2Af4", | |||
"abi": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0xtaichi For every contract, we should have one ABI only instead of having the same ABI under each network folder right? Then the contract addresses should live in the constants files?
export const THE_GRAPH_URL = "https://api.thegraph.com/subgraphs/name/drondin/olympus-graph" | ||
export const EPOCH_INTERVAL = 2200 | ||
export const THE_GRAPH_URL = "https://api.thegraph.com/subgraphs/name/drondin/olympus-graph"; | ||
export const EPOCH_INTERVAL = 2200; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0xtaichi we are going to use block timestamp to measure an epoch's duration instead of block numbers because Fantom's block time is not regular like Ethereum
|
||
// NOTE could get this from an outside source since it changes slightly over time | ||
export const BLOCK_RATE_SECONDS = 13.14 | ||
export const BLOCK_RATE_SECONDS = 13.14; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0xtaichi following up on my last comment, Fantom's block time will not be a constant. What does the frontend use these 2 variables for? We will have to work around them.
// import { ReactComponent as OhmEthImg } from "src/assets/tokens/OHM-WETH.svg"; | ||
|
||
import { abi as FraxBondContract } from "src/abi/ftmTestnet/FRAX.json" | ||
import { abi as wFTMBondContract } from "src/abi/ftmTestnet/WrappedToken.json" | ||
import { abi as FraxBondContract } from "src/abi/ftmTestnet/FraxBondDepository.json"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0xtaichi
Yes we definitely should only have one ABI per contract for all networks
const maxBondPrice = await bondContract.maxPayout(); | ||
let debtRatio: BigNumberish; | ||
// TODO (appleseed): improve this logic | ||
if (bond.name === "cvx") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0xtaichi there is no CVX bond, so this line will be removed ya?
…AO/gm-frontend into feat/contract-integration
@@ -141,6 +141,13 @@ function App() { | |||
dispatch(getMigrationAllowances({ address, provider: loadProvider, networkID: networkId })); | |||
bonds.map(bond => { | |||
// NOTE: get any Claimable bonds, they may not be bondable | |||
console.log( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0xtaichi remove this?
@@ -551,7 +551,7 @@ | |||
"notice": "set warmup period for new stakers" | |||
}, | |||
"stake(uint256,address)": { | |||
"notice": "stake BRICK to enter warmup" | |||
"notice": "stake OHM to enter warmup" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0xtaichi OHM?
provider = NodeHelper.getMainnetStaticProvider(); | ||
networkID = 4002; | ||
} | ||
// if (networkID !== 4002) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0xtaichi remove this?
@@ -105,6 +160,48 @@ export const ftm = new CustomBond({ | |||
}, | |||
}); | |||
|
|||
export const brick_frax = new LPBond({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0xtaichi should this be camelcase?
reserveAddress: "0x0Ae825CD631d5b59D56ACc635f1599ebb3390A6d", | ||
}, | ||
}, | ||
lpUrl: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0xtaichi which URL is this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might refer to the link where one can buy LP tokens.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Updates
Edit (27/1)