Skip to content

Commit 0c2eb14

Browse files
authored
Merge pull request #845 from graphprotocol/pcv/l2gns-add-event
fix: emit SignalMinted when a subgraph transfer is finished
2 parents 92d4921 + dec7a20 commit 0c2eb14

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

contracts/l2/discovery/L2GNS.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ contract L2GNS is GNS, L2GNSV1Storage, IL2GNS {
143143
_subgraphDeploymentID
144144
);
145145
emit SubgraphVersionUpdated(_l2SubgraphID, _subgraphDeploymentID, _versionMetadata);
146+
emit SignalMinted(_l2SubgraphID, msg.sender, nSignal, vSignal, transferData.tokens);
146147
emit SubgraphL2TransferFinalized(_l2SubgraphID);
147148
}
148149

test/l2/l2GNS.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,9 @@ describe('L2GNS', () => {
391391
expect(subgraphAfter.subgraphDeploymentID).eq(newSubgraph0.subgraphDeploymentID)
392392
const expectedNSignal = await gns.vSignalToNSignal(l2SubgraphId, expectedSignal)
393393
expect(await gns.getCuratorSignal(l2SubgraphId, me.address)).eq(expectedNSignal)
394+
await expect(tx)
395+
.emit(gns, 'SignalMinted')
396+
.withArgs(l2SubgraphId, me.address, expectedNSignal, expectedSignal, curatedTokens)
394397
})
395398
it('cannot be called by someone other than the subgraph owner', async function () {
396399
const { l1SubgraphId, curatedTokens, subgraphMetadata, versionMetadata } =

0 commit comments

Comments
 (0)