Skip to content

Commit 026359b

Browse files
committed
Added event fields needed for subgraph
1 parent b182bb2 commit 026359b

File tree

5 files changed

+26
-8
lines changed

5 files changed

+26
-8
lines changed

contracts/GNS.sol

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ contract GNS is Governed, BancorFormula {
114114
uint256 subgraphNumber,
115115
address nameCurator,
116116
uint256 nSignalCreated,
117-
uint256 vSignalCreated
117+
uint256 vSignalCreated,
118+
uint256 tokensDeposited
118119
);
119120

120121
/**
@@ -139,7 +140,7 @@ contract GNS is Governed, BancorFormula {
139140
address graphAccount,
140141
uint256 subgraphNumber,
141142
uint256 newVSignalCreated,
142-
uint256 tokensExchanged,
143+
uint256 tokensSignalled,
143144
bytes32 subgraphDeploymentID
144145
);
145146

@@ -514,7 +515,7 @@ contract GNS is Governed, BancorFormula {
514515
namePool.vSignal = namePool.vSignal.add(vSignal);
515516
namePool.nSignal = namePool.nSignal.add(nSignal);
516517
namePool.curatorNSignal[msg.sender] = namePool.curatorNSignal[msg.sender].add(nSignal);
517-
emit NSignalMinted(_graphAccount, _subgraphNumber, msg.sender, nSignal, vSignal);
518+
emit NSignalMinted(_graphAccount, _subgraphNumber, msg.sender, nSignal, vSignal, _tokens);
518519
return (vSignal, nSignal);
519520
}
520521

contracts/staking/Staking.sol

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ contract Staking is StakingV1Storage, GraphUpgradeable, IStaking, Governed {
110110
uint256 tokens,
111111
address channelID,
112112
bytes channelPubKey,
113-
uint256 price
113+
uint256 price,
114+
address proxy
114115
);
115116

116117
/**
@@ -140,7 +141,8 @@ contract Staking is StakingV1Storage, GraphUpgradeable, IStaking, Governed {
140141
uint256 epoch,
141142
uint256 tokens,
142143
address channelID,
143-
uint256 effectiveAllocation
144+
uint256 effectiveAllocation,
145+
address sender
144146
);
145147

146148
/**
@@ -152,6 +154,7 @@ contract Staking is StakingV1Storage, GraphUpgradeable, IStaking, Governed {
152154
event RebateClaimed(
153155
address indexed indexer,
154156
bytes32 indexed subgraphDeploymentID,
157+
address channelID,
155158
uint256 epoch,
156159
uint256 forEpoch,
157160
uint256 tokens,
@@ -795,7 +798,8 @@ contract Staking is StakingV1Storage, GraphUpgradeable, IStaking, Governed {
795798
alloc.settledAtEpoch,
796799
alloc.tokens,
797800
_channelID,
798-
alloc.effectiveAllocation
801+
alloc.effectiveAllocation,
802+
msg.sender
799803
);
800804
}
801805

@@ -889,6 +893,7 @@ contract Staking is StakingV1Storage, GraphUpgradeable, IStaking, Governed {
889893
emit RebateClaimed(
890894
alloc.indexer,
891895
alloc.subgraphDeploymentID,
896+
_channelID,
892897
epochManager.currentEpoch(),
893898
settledAtEpoch,
894899
tokensToClaim,
@@ -989,7 +994,8 @@ contract Staking is StakingV1Storage, GraphUpgradeable, IStaking, Governed {
989994
allocations[channelID].tokens,
990995
channelID,
991996
_channelPubKey,
992-
_price
997+
_price,
998+
_channelProxy
993999
);
9941000
}
9951001

test/gns.test.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,14 @@ describe('GNS', () => {
319319
const tx = gns.connect(account.signer).mintNSignal(graphAccount, subgraphNumber0, graphTokens)
320320
await expect(tx)
321321
.emit(gns, 'NSignalMinted')
322-
.withArgs(graphAccount, subgraphNumber0, account.address, nSigEstimate, vSigEstimate)
322+
.withArgs(
323+
graphAccount,
324+
subgraphNumber0,
325+
account.address,
326+
nSigEstimate,
327+
vSigEstimate,
328+
graphTokens,
329+
)
323330

324331
const tokensVSig = await getTokensAndVSig(subgraph0.subgraphDeploymentID)
325332
const tokensAfter = tokensVSig[0]

test/staking/allocation.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ describe('Staking:Allocation', () => {
150150
channelID,
151151
channelPubKey,
152152
price,
153+
channelProxy.address,
153154
)
154155

155156
// After state
@@ -469,6 +470,7 @@ describe('Staking:Allocation', () => {
469470
beforeAlloc.tokens,
470471
channelID,
471472
effectiveAllocation,
473+
indexer.address,
472474
)
473475

474476
// After state
@@ -526,6 +528,7 @@ describe('Staking:Allocation', () => {
526528
.withArgs(
527529
indexer.address,
528530
subgraphDeploymentID,
531+
channelID,
529532
currentEpoch,
530533
beforeAlloc.settledAtEpoch,
531534
tokensToClaim,

test/staking/delegation.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@ describe('Staking::Delegation', () => {
498498
.withArgs(
499499
indexer.address,
500500
subgraphDeploymentID,
501+
channelID,
501502
currentEpoch,
502503
beforeAlloc.settledAtEpoch,
503504
tokensToClaim,

0 commit comments

Comments
 (0)