Skip to content

Commit

Permalink
fix: add token to rewards in StakingPoolCreated
Browse files Browse the repository at this point in the history
  • Loading branch information
grezle committed Oct 5, 2022
1 parent 38c98b5 commit 69fa215
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
13 changes: 13 additions & 0 deletions abis/StakingPool.json
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,19 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "hasTotalMinimumStake",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
Expand Down
5 changes: 5 additions & 0 deletions abis/StakingPoolMediator.json
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,11 @@
"internalType": "address",
"name": "erc20CapableTreasury",
"type": "address"
},
{
"internalType": "string",
"name": "metadata",
"type": "string"
}
],
"name": "createDao",
Expand Down
8 changes: 4 additions & 4 deletions config/local.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
"network": "local",
"contracts": {
"bondMediator": {
"address": "0x68B1D87F95878fE05B998F19b66F4baba5De1aed",
"address": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9",
"startBlock": 0
},
"bondFactory": {
"address": "0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE",
"address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",
"startBlock": 0
},
"stakingPoolMediator": {
"address": "0x59b670e9fA9D0A427751Af201D676719a970857b",
"address": "0x0165878A594ca255338adfa4d48449f69242Eb8F",
"startBlock": 0
},
"stakingPoolFactory": {
"address": "0x3Aa5ebB10DC797CAC828524e59A333d0A371443c",
"address": "0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9",
"startBlock": 0
}
}
Expand Down
1 change: 1 addition & 0 deletions src/stakingPoolFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export function handleStakingPoolCreated(event: StakingPoolCreated): void {
poolReward.amount = BigInt.fromI32(0);
poolReward.maxAmount = reward.maxAmount;
poolReward.ratio = reward.ratio;
poolReward.token = reward.tokens;

poolReward.createdAtTimestamp = poolReward.createdAtTimestamp.gt(BigInt.fromI32(0))
? poolReward.createdAtTimestamp
Expand Down

0 comments on commit 69fa215

Please sign in to comment.