Skip to content

Commit 33db500

Browse files
committed
fix e2e test
1 parent dfeee66 commit 33db500

File tree

6 files changed

+176
-216
lines changed

6 files changed

+176
-216
lines changed

examples/ethereum-basic-event-handlers/build/Gravity/artifacts/contracts/Gravity.sol/GravatarRegistry.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,4 +196,4 @@
196196
"name": "UpdatedGravatar",
197197
"type": "event"
198198
}
199-
]
199+
]

examples/ethereum-basic-event-handlers/build/subgraph.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dataSources:
88
name: Gravity
99
network: test
1010
source:
11-
address: "0x5FbDB2315678afecb367f032d93F642f64180aa3"
11+
address: '0x5FbDB2315678afecb367f032d93F642f64180aa3'
1212
abi: Gravity
1313
mapping:
1414
kind: ethereum/events

examples/ethereum-basic-event-handlers/generated/Gravity/Gravity.ts

Lines changed: 40 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
22

33
import {
4+
Address,
5+
BigInt,
6+
Bytes,
7+
Entity,
48
ethereum,
59
JSONValue,
610
TypedMap,
7-
Entity,
8-
Bytes,
9-
Address,
10-
BigInt
11-
} from "@graphprotocol/graph-ts";
11+
} from '@graphprotocol/graph-ts';
1212

1313
export class NewGravatar extends ethereum.Event {
1414
get params(): NewGravatar__Params {
@@ -81,8 +81,8 @@ export class Gravity__getGravatarResult {
8181

8282
toMap(): TypedMap<string, ethereum.Value> {
8383
let map = new TypedMap<string, ethereum.Value>();
84-
map.set("value0", ethereum.Value.fromString(this.value0));
85-
map.set("value1", ethereum.Value.fromString(this.value1));
84+
map.set('value0', ethereum.Value.fromString(this.value0));
85+
map.set('value1', ethereum.Value.fromString(this.value1));
8686
return map;
8787
}
8888

@@ -108,9 +108,9 @@ export class Gravity__gravatarsResult {
108108

109109
toMap(): TypedMap<string, ethereum.Value> {
110110
let map = new TypedMap<string, ethereum.Value>();
111-
map.set("value0", ethereum.Value.fromAddress(this.value0));
112-
map.set("value1", ethereum.Value.fromString(this.value1));
113-
map.set("value2", ethereum.Value.fromString(this.value2));
111+
map.set('value0', ethereum.Value.fromAddress(this.value0));
112+
map.set('value1', ethereum.Value.fromString(this.value1));
113+
map.set('value2', ethereum.Value.fromString(this.value2));
114114
return map;
115115
}
116116

@@ -129,55 +129,42 @@ export class Gravity__gravatarsResult {
129129

130130
export class Gravity extends ethereum.SmartContract {
131131
static bind(address: Address): Gravity {
132-
return new Gravity("Gravity", address);
132+
return new Gravity('Gravity', address);
133133
}
134134

135135
getGravatar(owner: Address): Gravity__getGravatarResult {
136-
let result = super.call(
137-
"getGravatar",
138-
"getGravatar(address):(string,string)",
139-
[ethereum.Value.fromAddress(owner)]
140-
);
136+
let result = super.call('getGravatar', 'getGravatar(address):(string,string)', [
137+
ethereum.Value.fromAddress(owner),
138+
]);
141139

142-
return new Gravity__getGravatarResult(
143-
result[0].toString(),
144-
result[1].toString()
145-
);
140+
return new Gravity__getGravatarResult(result[0].toString(), result[1].toString());
146141
}
147142

148-
try_getGravatar(
149-
owner: Address
150-
): ethereum.CallResult<Gravity__getGravatarResult> {
151-
let result = super.tryCall(
152-
"getGravatar",
153-
"getGravatar(address):(string,string)",
154-
[ethereum.Value.fromAddress(owner)]
155-
);
143+
try_getGravatar(owner: Address): ethereum.CallResult<Gravity__getGravatarResult> {
144+
let result = super.tryCall('getGravatar', 'getGravatar(address):(string,string)', [
145+
ethereum.Value.fromAddress(owner),
146+
]);
156147
if (result.reverted) {
157148
return new ethereum.CallResult();
158149
}
159150
let value = result.value;
160151
return ethereum.CallResult.fromValue(
161-
new Gravity__getGravatarResult(value[0].toString(), value[1].toString())
152+
new Gravity__getGravatarResult(value[0].toString(), value[1].toString()),
162153
);
163154
}
164155

165156
gravatarToOwner(param0: BigInt): Address {
166-
let result = super.call(
167-
"gravatarToOwner",
168-
"gravatarToOwner(uint256):(address)",
169-
[ethereum.Value.fromUnsignedBigInt(param0)]
170-
);
157+
let result = super.call('gravatarToOwner', 'gravatarToOwner(uint256):(address)', [
158+
ethereum.Value.fromUnsignedBigInt(param0),
159+
]);
171160

172161
return result[0].toAddress();
173162
}
174163

175164
try_gravatarToOwner(param0: BigInt): ethereum.CallResult<Address> {
176-
let result = super.tryCall(
177-
"gravatarToOwner",
178-
"gravatarToOwner(uint256):(address)",
179-
[ethereum.Value.fromUnsignedBigInt(param0)]
180-
);
165+
let result = super.tryCall('gravatarToOwner', 'gravatarToOwner(uint256):(address)', [
166+
ethereum.Value.fromUnsignedBigInt(param0),
167+
]);
181168
if (result.reverted) {
182169
return new ethereum.CallResult();
183170
}
@@ -186,21 +173,17 @@ export class Gravity extends ethereum.SmartContract {
186173
}
187174

188175
ownerToGravatar(param0: Address): BigInt {
189-
let result = super.call(
190-
"ownerToGravatar",
191-
"ownerToGravatar(address):(uint256)",
192-
[ethereum.Value.fromAddress(param0)]
193-
);
176+
let result = super.call('ownerToGravatar', 'ownerToGravatar(address):(uint256)', [
177+
ethereum.Value.fromAddress(param0),
178+
]);
194179

195180
return result[0].toBigInt();
196181
}
197182

198183
try_ownerToGravatar(param0: Address): ethereum.CallResult<BigInt> {
199-
let result = super.tryCall(
200-
"ownerToGravatar",
201-
"ownerToGravatar(address):(uint256)",
202-
[ethereum.Value.fromAddress(param0)]
203-
);
184+
let result = super.tryCall('ownerToGravatar', 'ownerToGravatar(address):(uint256)', [
185+
ethereum.Value.fromAddress(param0),
186+
]);
204187
if (result.reverted) {
205188
return new ethereum.CallResult();
206189
}
@@ -209,35 +192,27 @@ export class Gravity extends ethereum.SmartContract {
209192
}
210193

211194
gravatars(param0: BigInt): Gravity__gravatarsResult {
212-
let result = super.call(
213-
"gravatars",
214-
"gravatars(uint256):(address,string,string)",
215-
[ethereum.Value.fromUnsignedBigInt(param0)]
216-
);
195+
let result = super.call('gravatars', 'gravatars(uint256):(address,string,string)', [
196+
ethereum.Value.fromUnsignedBigInt(param0),
197+
]);
217198

218199
return new Gravity__gravatarsResult(
219200
result[0].toAddress(),
220201
result[1].toString(),
221-
result[2].toString()
202+
result[2].toString(),
222203
);
223204
}
224205

225206
try_gravatars(param0: BigInt): ethereum.CallResult<Gravity__gravatarsResult> {
226-
let result = super.tryCall(
227-
"gravatars",
228-
"gravatars(uint256):(address,string,string)",
229-
[ethereum.Value.fromUnsignedBigInt(param0)]
230-
);
207+
let result = super.tryCall('gravatars', 'gravatars(uint256):(address,string,string)', [
208+
ethereum.Value.fromUnsignedBigInt(param0),
209+
]);
231210
if (result.reverted) {
232211
return new ethereum.CallResult();
233212
}
234213
let value = result.value;
235214
return ethereum.CallResult.fromValue(
236-
new Gravity__gravatarsResult(
237-
value[0].toAddress(),
238-
value[1].toString(),
239-
value[2].toString()
240-
)
215+
new Gravity__gravatarsResult(value[0].toAddress(), value[1].toString(), value[2].toString()),
241216
);
242217
}
243218
}

0 commit comments

Comments
 (0)