This repository has been archived by the owner on Nov 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Ref/update claim rewards interface #77
Draft
fede-rodes
wants to merge
21
commits into
master
Choose a base branch
from
ref/update-claim-rewards-interface
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 14 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
9e49c1d
updating claimRewards interface
fede-rodes 641538b
Merge branch 'master' of github.com:Ethernautas/renpool into ref/upda…
fede-rodes 8291786
updating claim rewards addr on kovan
fede-rodes 9da7c97
updating claimDarknodeRewards plus introducion GatewayRegistryV1 inte…
fede-rodes 154e793
adding contract check
fede-rodes 3c0c0fa
orc programming
fede-rodes 8cb1bec
claim rewards refactoring
fede-rodes 53509df
adding RewardsClaimed event
fede-rodes 2c197b8
adding RewardsMinted event
fede-rodes 64d24e6
fix test
fede-rodes 8f5ca50
Merge branch 'master' of github.com:Ethernautas/renpool into ref/upda…
fede-rodes e704eb6
using renproject gateway-sol instead of interface files
fede-rodes 4045f21
adding getDarknodeBalance fn
fede-rodes ebe399d
updating FE addresses and hh config
fede-rodes ef08e8f
improving IClaimRewards description
fede-rodes 8bb068d
adding nonces mapping plus fix for claim rewards test
fede-rodes e4eee81
removing unnecessary configs
fede-rodes cdd82cc
cleaning
fede-rodes c8bed93
more cleaning
fede-rodes ec4e1f4
update deploy config to use private key
fede-rodes 2a985c0
Export contract artifacts to be used by client (#88)
acuarica File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ | |
/.netlify/ | ||
/node_modules/ | ||
/cache/ | ||
/artifacts/ | ||
/coverage/ | ||
/.env | ||
/coverage.json |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ yarn-debug.log* | |
yarn-error.log* | ||
|
||
/.netlify | ||
/src/artifacts/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,8 @@ import React, { FC, useState, useEffect, createContext } from 'react' | |
import { Contract } from '@ethersproject/contracts' | ||
import { BigNumber } from '@ethersproject/bignumber' | ||
import { ContractNames, CONTRACT_ADDRESSES } from '../constants' | ||
import artifact from'../artifacts/contracts/dependencies/OpenZeppelin/[email protected]/IERC20.json' | ||
import map from '../artifacts/deployments/map.json' | ||
import artifact from'../artifacts/@renproject/gateway-sol/contracts/Gateway/interfaces/IERC20Standard.sol/IERC20Standard.json' | ||
// import map from '../artifacts/deployments/map.json' | ||
import { useActiveWeb3React } from '../hooks/useActiveWeb3React' | ||
import { useContract } from '../hooks/useContract' | ||
|
||
|
@@ -32,11 +32,11 @@ export const RenTokenProvider: FC = ({ | |
}) => { | ||
const { library, account } = useActiveWeb3React() | ||
|
||
const address: string = CHAIN_ID === '1337' | ||
? map[CHAIN_ID][ContractNames.RenToken][0] | ||
: CONTRACT_ADDRESSES[CHAIN_ID].REN_TOKEN | ||
// const address: string = CHAIN_ID === '1337' | ||
// ? map[CHAIN_ID][ContractNames.RenToken][0] | ||
// : CONTRACT_ADDRESSES[CHAIN_ID].REN_TOKEN | ||
|
||
const renToken = useContract(address, artifact.abi) | ||
const renToken = useContract(CONTRACT_ADDRESSES[CHAIN_ID].REN_TOKEN, artifact.abi) | ||
|
||
const [balance, setBalance] = useState<BigNumber>(BigNumber.from(0)) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Here I see we repeating ourselves with addresses configuration. We already have that configuration in Hardhat, we need to undertand the best way to reuse from both projects.
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.
Agree. I'll give it some thought. The only address that changes (but still we should be able to store it somewhere at deploy time) is the RenPool address.
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.
In PR #88 I tried to reuse contract address from
client
.