Skip to content

Commit fa44165

Browse files
committed
Remove event.blockHash and comments
1 parent ae030a2 commit fa44165

File tree

3 files changed

+0
-15
lines changed

3 files changed

+0
-15
lines changed

src/scaffold/ethereum.test.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,6 @@ type ExampleEntity @entity {
133133
expect(scaffoldWithIndexEvents.generateSchema()).toEqual(`\
134134
type ExampleEvent @entity(immutable: true) {
135135
id: Bytes!
136-
137-
# Event params
138136
a: BigInt! # uint256
139137
b: [Bytes]! # bytes[4]
140138
param2: String! # string
@@ -145,22 +143,16 @@ type ExampleEvent @entity(immutable: true) {
145143
c_c3_value1: String! # string
146144
c_c3_value2: Bytes! # bytes32
147145
d: String! # string
148-
# Block & transaction info
149146
blockNumber: BigInt!
150-
blockHash: Bytes!
151147
blockTimestamp: BigInt!
152148
transactionHash: Bytes!
153149
logIndex: BigInt!
154150
}
155151
156152
type ExampleEvent1 @entity(immutable: true) {
157153
id: Bytes!
158-
159-
# Event params
160154
a: Bytes! # bytes32
161-
# Block & transaction info
162155
blockNumber: BigInt!
163-
blockHash: Bytes!
164156
blockTimestamp: BigInt!
165157
transactionHash: Bytes!
166158
logIndex: BigInt!
@@ -249,7 +241,6 @@ export function handleExampleEvent(event: ExampleEventEvent): void {
249241
entity.d = event.params.d
250242
251243
entity.blockNumber = event.block.number
252-
entity.blockHash = event.block.hash
253244
entity.blockTimestamp = event.block.timestamp
254245
entity.transactionHash = event.transaction.hash
255246
entity.logIndex = event.logIndex
@@ -264,7 +255,6 @@ export function handleExampleEvent1(event: ExampleEvent1Event): void {
264255
entity.a = event.params.a
265256
266257
entity.blockNumber = event.block.number
267-
entity.blockHash = event.block.hash
268258
entity.blockTimestamp = event.block.timestamp
269259
entity.transactionHash = event.transaction.hash
270260
entity.logIndex = event.logIndex

src/scaffold/mapping.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ const generateEventIndexingHandlers = (events, contractName) =>
3636
${generateEventFieldAssignments(event).join('\n')}
3737
3838
entity.blockNumber = event.block.number
39-
entity.blockHash = event.block.hash
4039
entity.blockTimestamp = event.block.timestamp
4140
entity.transactionHash = event.transaction.hash
4241
entity.logIndex = event.logIndex

src/scaffold/schema.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,14 @@ const generateEventType = (event, protocolName) => `type ${
3535
event._alias
3636
} @entity(immutable: true) {
3737
id: Bytes!
38-
39-
# Event params
4038
${event.inputs
4139
.reduce(
4240
(acc, input, index) =>
4341
acc.concat(generateEventFields({ input, index, protocolName })),
4442
[],
4543
)
4644
.join('\n')}
47-
# Block & transaction info
4845
blockNumber: BigInt!
49-
blockHash: Bytes!
5046
blockTimestamp: BigInt!
5147
transactionHash: Bytes!
5248
logIndex: BigInt!

0 commit comments

Comments
 (0)