Skip to content

Commit

Permalink
Merge pull request #22 from persistenceOne/rohit/stketh_exchange_rate
Browse files Browse the repository at this point in the history
Rohit/stketh exchange rate
  • Loading branch information
RohitAudit authored May 27, 2022
2 parents 8395d1b + d8bb4b8 commit 18b392d
Show file tree
Hide file tree
Showing 7 changed files with 37,208 additions and 2,697 deletions.
2 changes: 1 addition & 1 deletion contracts/Oracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ contract Oracle is IOracle, CoreRef {
_getFrameFirstEpochId(currentFrameEpochId, beaconData)
);
require(
currentFrameEpochId <=
currentFrameEpochId <
_getFrameFirstEpochId(currentFrameEpochId, beaconData) +
beaconData.epochsPerTimePeriod
);
Expand Down
4 changes: 2 additions & 2 deletions contracts/StakingPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ contract StakingPool is IStakingPool, OwnableUpgradeable{

uint256 public DEVIATION; // 5% deviation is acceptable
uint256 public constant BASIS_POINT = 10000;
event RewardRedeemed(uint256 amount, uint256 time, address node_operator);
event RewardRedeemed(uint256 amount, address node_operator);

mapping(address => UserInfo) public userInfos;

Expand Down Expand Up @@ -79,7 +79,7 @@ contract StakingPool is IStakingPool, OwnableUpgradeable{

if(pending > 0){
stkEth.transfer(usr, pending);
emit RewardRedeemed(pending,block.timestamp,usr);
emit RewardRedeemed(pending,usr);
}

user.rewardDebt = accRewardPerValidator*userValidators/1e12;
Expand Down
22 changes: 17 additions & 5 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,30 @@ module.exports = {
// allowUnlimitedContractSize: true,
// },
local: {
url: "http://localhost:8545",
url: process.env.RPC_URL,
accounts: {
mnemonic: process.env.MNEMONIC
}
},
rinkeby: {
url: "https://eth-rinkeby.alchemyapi.io/v2/RYejb4WXXjHmxxscJB4qNpIZkXMOXskn",
accounts: ["0a0ddf30ecb569d0133c6108d6223a8d793a57e954443864ea8cce6ac25af30a"],
},
goerli: {
url: "http://127.0.0.1:8545",
chainId: 5,
gasMultiplier: 2,
accounts: {
mnemonic: process.env.MNEMONIC
}
},
mainnet: {
url: process.env.RPC_URL,
accounts: [process.env.PRIVATE_KEY],
gas: 500000,
gasPrice: 2000000009,
gasMultiplier: 2
chainId: 1,
gasMultiplier: 2,
accounts: {
mnemonic: process.env.MNEMONIC
}
}
},
// gasReporter: {
Expand Down
Loading

0 comments on commit 18b392d

Please sign in to comment.