Skip to content
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

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Conversation

0xtaichi
Copy link

@0xtaichi 0xtaichi commented Jan 16, 2022

Updates

  1. Fix bond page staking issues
  2. Add Rinkeby contract address into constants file

Edit (27/1)

  1. Fix runtime errors
  2. Update from wftm to weth in rinkeby
  3. Add brick-frax LP in rinkeby

@@ -0,0 +1,98 @@
{
"address": "0x179C45D4c6F8370c68A53aF068b5Fa20e3fE2Af4",
"abi": [
Copy link
Collaborator

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;
Copy link
Collaborator

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;
Copy link
Collaborator

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";
Copy link
Collaborator

@0xkowloon 0xkowloon Jan 17, 2022

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") {
Copy link
Collaborator

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?

@@ -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(
Copy link
Collaborator

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"
Copy link
Collaborator

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) {
Copy link
Collaborator

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({
Copy link
Collaborator

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:
Copy link
Collaborator

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?

Copy link
Collaborator

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.

@vercel
Copy link

vercel bot commented Sep 10, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gm-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 10, 2023 9:48am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants