Skip to content

Commit c4b2cfe

Browse files
committed
chore: more subgraph changes
1 parent e9263a1 commit c4b2cfe

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

subgraph/core-neo/subgraph.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,6 @@ dataSources:
161161
handler: handleStakeDelayedNotTransferred
162162
- event: StakeLocked(indexed address,uint256,bool)
163163
handler: handleStakeLocked
164-
- event: StakeSet(indexed address,uint256,uint256)
164+
- event: StakeSet(indexed address,uint256,uint256,uint256)
165165
handler: handleStakeSet
166166
file: ./src/SortitionModule.ts

subgraph/core-university/subgraph.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,6 @@ dataSources:
155155
eventHandlers:
156156
- event: StakeLocked(indexed address,uint256,bool)
157157
handler: handleStakeLocked
158-
- event: StakeSet(indexed address,uint256,uint256)
158+
- event: StakeSet(indexed address,uint256,uint256,uint256)
159159
handler: handleStakeSet
160160
file: ./src/SortitionModule.ts

subgraph/core/subgraph.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,6 @@ dataSources:
161161
handler: handleStakeDelayedNotTransferred
162162
- event: StakeLocked(indexed address,uint256,bool)
163163
handler: handleStakeLocked
164-
- event: StakeSet(indexed address,uint256,uint256)
164+
- event: StakeSet(indexed address,uint256,uint256,uint256)
165165
handler: handleStakeSet
166166
file: ./src/SortitionModule.ts

subgraph/core/tests/sortition-module-utils.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,22 @@ export function createStakeLockedEvent(_address: Address, _relativeAmount: BigIn
8888
return stakeLockedEvent;
8989
}
9090

91-
export function createStakeSetEvent(_address: Address, _courtID: BigInt, _amount: BigInt): StakeSet {
91+
export function createStakeSetEvent(
92+
_address: Address,
93+
_courtID: BigInt,
94+
_amount: BigInt,
95+
_amountAllCourts: BigInt
96+
): StakeSet {
9297
let stakeSetEvent = newMockEvent();
9398

9499
stakeSetEvent.parameters = new Array();
95100

96101
stakeSetEvent.parameters.push(new ethereum.EventParam("_address", ethereum.Value.fromAddress(_address)));
97102
stakeSetEvent.parameters.push(new ethereum.EventParam("_courtID", ethereum.Value.fromUnsignedBigInt(_courtID)));
98103
stakeSetEvent.parameters.push(new ethereum.EventParam("_amount", ethereum.Value.fromUnsignedBigInt(_amount)));
104+
stakeSetEvent.parameters.push(
105+
new ethereum.EventParam("_amountAllCourts", ethereum.Value.fromUnsignedBigInt(_amountAllCourts))
106+
);
99107

100108
return stakeSetEvent;
101109
}

subgraph/core/tests/sortition-module.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ describe("Describe event", () => {
1010
beforeAll(() => {
1111
let courtId = BigInt.fromI32(1);
1212
let amount = BigInt.fromI32(1000);
13+
let amountAllCourts = BigInt.fromI32(1000);
1314
let jurorAddress = Address.fromString("0x922911F4f80a569a4425fa083456239838F7F003");
14-
let newStakeSetEvent = createStakeSetEvent(jurorAddress, courtId, amount);
15+
let newStakeSetEvent = createStakeSetEvent(jurorAddress, courtId, amount, amountAllCourts);
1516
handleStakeSet(newStakeSetEvent);
1617
});
1718

0 commit comments

Comments
 (0)