1
1
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2
2
3
3
import {
4
+ Address ,
5
+ BigInt ,
6
+ Bytes ,
7
+ Entity ,
4
8
ethereum ,
5
9
JSONValue ,
6
10
TypedMap ,
7
- Entity ,
8
- Bytes ,
9
- Address ,
10
- BigInt
11
- } from "@graphprotocol/graph-ts" ;
11
+ } from '@graphprotocol/graph-ts' ;
12
12
13
13
export class NewGravatar extends ethereum . Event {
14
14
get params ( ) : NewGravatar__Params {
@@ -81,8 +81,8 @@ export class Gravity__getGravatarResult {
81
81
82
82
toMap ( ) : TypedMap < string , ethereum . Value > {
83
83
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 ) ) ;
86
86
return map ;
87
87
}
88
88
@@ -108,9 +108,9 @@ export class Gravity__gravatarsResult {
108
108
109
109
toMap ( ) : TypedMap < string , ethereum . Value > {
110
110
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 ) ) ;
114
114
return map ;
115
115
}
116
116
@@ -129,55 +129,42 @@ export class Gravity__gravatarsResult {
129
129
130
130
export class Gravity extends ethereum . SmartContract {
131
131
static bind ( address : Address ) : Gravity {
132
- return new Gravity ( " Gravity" , address ) ;
132
+ return new Gravity ( ' Gravity' , address ) ;
133
133
}
134
134
135
135
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
+ ] ) ;
141
139
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 ( ) ) ;
146
141
}
147
142
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
+ ] ) ;
156
147
if ( result . reverted ) {
157
148
return new ethereum . CallResult ( ) ;
158
149
}
159
150
let value = result . value ;
160
151
return ethereum . CallResult . fromValue (
161
- new Gravity__getGravatarResult ( value [ 0 ] . toString ( ) , value [ 1 ] . toString ( ) )
152
+ new Gravity__getGravatarResult ( value [ 0 ] . toString ( ) , value [ 1 ] . toString ( ) ) ,
162
153
) ;
163
154
}
164
155
165
156
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
+ ] ) ;
171
160
172
161
return result [ 0 ] . toAddress ( ) ;
173
162
}
174
163
175
164
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
+ ] ) ;
181
168
if ( result . reverted ) {
182
169
return new ethereum . CallResult ( ) ;
183
170
}
@@ -186,21 +173,17 @@ export class Gravity extends ethereum.SmartContract {
186
173
}
187
174
188
175
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
+ ] ) ;
194
179
195
180
return result [ 0 ] . toBigInt ( ) ;
196
181
}
197
182
198
183
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
+ ] ) ;
204
187
if ( result . reverted ) {
205
188
return new ethereum . CallResult ( ) ;
206
189
}
@@ -209,35 +192,27 @@ export class Gravity extends ethereum.SmartContract {
209
192
}
210
193
211
194
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
+ ] ) ;
217
198
218
199
return new Gravity__gravatarsResult (
219
200
result [ 0 ] . toAddress ( ) ,
220
201
result [ 1 ] . toString ( ) ,
221
- result [ 2 ] . toString ( )
202
+ result [ 2 ] . toString ( ) ,
222
203
) ;
223
204
}
224
205
225
206
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
+ ] ) ;
231
210
if ( result . reverted ) {
232
211
return new ethereum . CallResult ( ) ;
233
212
}
234
213
let value = result . value ;
235
214
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 ( ) ) ,
241
216
) ;
242
217
}
243
218
}
0 commit comments