Skip to content

Commit 6cea6fe

Browse files
committed
Updated ethereum calls in contract parsing after v1.10.1 update
Some field and function names changed between v1.9.10 and v1.10.1 of go-ethereum.
1 parent 8b38819 commit 6cea6fe

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

tools/generators/ethlike/contract_parsing.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ func buildMethodInfo(
163163
if payable {
164164
modifiers = append(modifiers, "payable")
165165
}
166-
if method.Const {
166+
if method.Constant {
167167
modifiers = append(modifiers, "constant")
168168
}
169169
modifierString := strings.Join(modifiers, " ")
@@ -176,7 +176,7 @@ func buildMethodInfo(
176176
paramInfos := make([]paramInfo, 0, 0)
177177

178178
for index, param := range method.Inputs {
179-
goType := param.Type.Type.String()
179+
goType := param.Type.GetType().String()
180180
paramName := param.Name
181181
if paramName == "" {
182182
paramName = fmt.Sprintf("arg%v", index)
@@ -211,7 +211,7 @@ func buildMethodInfo(
211211
returned.Type = strings.Replace(normalizedName, "get", "", 1)
212212

213213
for _, output := range method.Outputs {
214-
goType := output.Type.Type.String()
214+
goType := output.Type.GetType().String()
215215

216216
returned.Declarations += fmt.Sprintf(
217217
"\t%v %v\n",
@@ -224,7 +224,7 @@ func buildMethodInfo(
224224
returned.Multi = false
225225
} else {
226226
returned.Multi = false
227-
returned.Type = method.Outputs[0].Type.Type.String()
227+
returned.Type = method.Outputs[0].Type.GetType().String()
228228
returned.Vars += "ret,"
229229
}
230230

@@ -241,7 +241,7 @@ func buildMethodInfo(
241241
returned,
242242
}
243243

244-
if method.Const {
244+
if method.Constant {
245245
constMethods = append(constMethods, info)
246246
} else {
247247
nonConstMethods = append(nonConstMethods, info)
@@ -281,7 +281,7 @@ func buildEventInfo(
281281
indexedFilters := ""
282282
for _, param := range event.Inputs {
283283
upperParam := uppercaseFirst(param.Name)
284-
goType := param.Type.Type.String()
284+
goType := param.Type.GetType().String()
285285

286286
paramDeclarations += fmt.Sprintf("%v %v,\n", upperParam, goType)
287287
paramExtractors += fmt.Sprintf("event.%v,\n", upperParam)

0 commit comments

Comments
 (0)