@@ -52,7 +52,7 @@ func Bind(types []string, abis []string, bytecodes []string, fsigs []map[string]
52
52
// contracts is the map of each individual contract requested binding
53
53
contracts = make (map [string ]* tmplContract )
54
54
55
- // structs is the map of all reclared structs shared by passed contracts.
55
+ // structs is the map of all redeclared structs shared by passed contracts.
56
56
structs = make (map [string ]* tmplStruct )
57
57
58
58
// isLib is the map used to flag each encountered library as such
@@ -80,10 +80,10 @@ func Bind(types []string, abis []string, bytecodes []string, fsigs []map[string]
80
80
fallback * tmplMethod
81
81
receive * tmplMethod
82
82
83
- // identifiers are used to detect duplicated identifier of function
84
- // and event . For all calls, transacts and events, abigen will generate
83
+ // identifiers are used to detect duplicated identifiers of functions
84
+ // and events . For all calls, transacts and events, abigen will generate
85
85
// corresponding bindings. However we have to ensure there is no
86
- // identifier coliision in the bindings of these categories.
86
+ // identifier collisions in the bindings of these categories.
87
87
callIdentifiers = make (map [string ]bool )
88
88
transactIdentifiers = make (map [string ]bool )
89
89
eventIdentifiers = make (map [string ]bool )
@@ -246,7 +246,7 @@ var bindType = map[Lang]func(kind abi.Type, structs map[string]*tmplStruct) stri
246
246
LangJava : bindTypeJava ,
247
247
}
248
248
249
- // bindBasicTypeGo converts basic solidity types(except array, slice and tuple) to Go one .
249
+ // bindBasicTypeGo converts basic solidity types(except array, slice and tuple) to Go ones .
250
250
func bindBasicTypeGo (kind abi.Type ) string {
251
251
switch kind .T {
252
252
case abi .AddressTy :
@@ -286,7 +286,7 @@ func bindTypeGo(kind abi.Type, structs map[string]*tmplStruct) string {
286
286
}
287
287
}
288
288
289
- // bindBasicTypeJava converts basic solidity types(except array, slice and tuple) to Java one .
289
+ // bindBasicTypeJava converts basic solidity types(except array, slice and tuple) to Java ones .
290
290
func bindBasicTypeJava (kind abi.Type ) string {
291
291
switch kind .T {
292
292
case abi .AddressTy :
@@ -330,7 +330,7 @@ func bindBasicTypeJava(kind abi.Type) string {
330
330
}
331
331
332
332
// pluralizeJavaType explicitly converts multidimensional types to predefined
333
- // type in go side.
333
+ // types in go side.
334
334
func pluralizeJavaType (typ string ) string {
335
335
switch typ {
336
336
case "boolean" :
@@ -369,7 +369,7 @@ var bindTopicType = map[Lang]func(kind abi.Type, structs map[string]*tmplStruct)
369
369
}
370
370
371
371
// bindTopicTypeGo converts a Solidity topic type to a Go one. It is almost the same
372
- // funcionality as for simple types, but dynamic types get converted to hashes.
372
+ // functionality as for simple types, but dynamic types get converted to hashes.
373
373
func bindTopicTypeGo (kind abi.Type , structs map [string ]* tmplStruct ) string {
374
374
bound := bindTypeGo (kind , structs )
375
375
@@ -386,15 +386,15 @@ func bindTopicTypeGo(kind abi.Type, structs map[string]*tmplStruct) string {
386
386
}
387
387
388
388
// bindTopicTypeJava converts a Solidity topic type to a Java one. It is almost the same
389
- // funcionality as for simple types, but dynamic types get converted to hashes.
389
+ // functionality as for simple types, but dynamic types get converted to hashes.
390
390
func bindTopicTypeJava (kind abi.Type , structs map [string ]* tmplStruct ) string {
391
391
bound := bindTypeJava (kind , structs )
392
392
393
393
// todo(rjl493456442) according solidity documentation, indexed event
394
394
// parameters that are not value types i.e. arrays and structs are not
395
395
// stored directly but instead a keccak256-hash of an encoding is stored.
396
396
//
397
- // We only convert stringS and bytes to hash, still need to deal with
397
+ // We only convert strings and bytes to hash, still need to deal with
398
398
// array(both fixed-size and dynamic-size) and struct.
399
399
if bound == "String" || bound == "byte[]" {
400
400
bound = "Hash"
@@ -415,7 +415,7 @@ var bindStructType = map[Lang]func(kind abi.Type, structs map[string]*tmplStruct
415
415
func bindStructTypeGo (kind abi.Type , structs map [string ]* tmplStruct ) string {
416
416
switch kind .T {
417
417
case abi .TupleTy :
418
- // We compose raw struct name and canonical parameter expression
418
+ // We compose a raw struct name and a canonical parameter expression
419
419
// together here. The reason is before solidity v0.5.11, kind.TupleRawName
420
420
// is empty, so we use canonical parameter expression to distinguish
421
421
// different struct definition. From the consideration of backward
@@ -454,7 +454,7 @@ func bindStructTypeGo(kind abi.Type, structs map[string]*tmplStruct) string {
454
454
func bindStructTypeJava (kind abi.Type , structs map [string ]* tmplStruct ) string {
455
455
switch kind .T {
456
456
case abi .TupleTy :
457
- // We compose raw struct name and canonical parameter expression
457
+ // We compose a raw struct name and a canonical parameter expression
458
458
// together here. The reason is before solidity v0.5.11, kind.TupleRawName
459
459
// is empty, so we use canonical parameter expression to distinguish
460
460
// different struct definition. From the consideration of backward
@@ -486,7 +486,7 @@ func bindStructTypeJava(kind abi.Type, structs map[string]*tmplStruct) string {
486
486
}
487
487
488
488
// namedType is a set of functions that transform language specific types to
489
- // named versions that my be used inside method names.
489
+ // named versions that may be used inside method names.
490
490
var namedType = map [Lang ]func (string , abi.Type ) string {
491
491
LangGo : func (string , abi.Type ) string { panic ("this shouldn't be needed" ) },
492
492
LangJava : namedTypeJava ,
@@ -528,7 +528,7 @@ func alias(aliases map[string]string, n string) string {
528
528
}
529
529
530
530
// methodNormalizer is a name transformer that modifies Solidity method names to
531
- // conform to target language naming concentions .
531
+ // conform to target language naming conventions .
532
532
var methodNormalizer = map [Lang ]func (string ) string {
533
533
LangGo : abi .ToCamelCase ,
534
534
LangJava : decapitalise ,
0 commit comments