Skip to content

Commit 947f5f2

Browse files
rjl493456442holiman
authored andcommitted
accounts/abi, signer/fourbyte: fix incorrect signature (#19881)
The abi package already supports function overload by adding a suffix to the overloaded function name, but it uses the function name with suffix to calculate signature(both for the event and method). This PR fixes it by adding a new field named RawName, which can be used to calcuate all signatures but use Name to distinguish different overloaded function.
1 parent e46a01d commit 947f5f2

File tree

11 files changed

+204
-57
lines changed

11 files changed

+204
-57
lines changed

accounts/abi/abi.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func (abi ABI) Pack(name string, args ...interface{}) ([]byte, error) {
7070
return nil, err
7171
}
7272
// Pack up the method ID too if not a constructor and return
73-
return append(method.Id(), arguments...), nil
73+
return append(method.ID(), arguments...), nil
7474
}
7575

7676
// Unpack output in v according to the abi specification
@@ -121,11 +121,9 @@ func (abi *ABI) UnmarshalJSON(data []byte) error {
121121
Inputs []Argument
122122
Outputs []Argument
123123
}
124-
125124
if err := json.Unmarshal(data, &fields); err != nil {
126125
return err
127126
}
128-
129127
abi.Methods = make(map[string]Method)
130128
abi.Events = make(map[string]Event)
131129
for _, field := range fields {
@@ -144,6 +142,7 @@ func (abi *ABI) UnmarshalJSON(data []byte) error {
144142
}
145143
abi.Methods[name] = Method{
146144
Name: name,
145+
RawName: field.Name,
147146
Const: field.Constant,
148147
Inputs: field.Inputs,
149148
Outputs: field.Outputs,
@@ -157,6 +156,7 @@ func (abi *ABI) UnmarshalJSON(data []byte) error {
157156
}
158157
abi.Events[name] = Event{
159158
Name: name,
159+
RawName: field.Name,
160160
Anonymous: field.Anonymous,
161161
Inputs: field.Inputs,
162162
}
@@ -173,7 +173,7 @@ func (abi *ABI) MethodById(sigdata []byte) (*Method, error) {
173173
return nil, fmt.Errorf("data too short (%d bytes) for abi method lookup", len(sigdata))
174174
}
175175
for _, method := range abi.Methods {
176-
if bytes.Equal(method.Id(), sigdata[:4]) {
176+
if bytes.Equal(method.ID(), sigdata[:4]) {
177177
return &method, nil
178178
}
179179
}
@@ -184,7 +184,7 @@ func (abi *ABI) MethodById(sigdata []byte) (*Method, error) {
184184
// ABI and returns nil if none found.
185185
func (abi *ABI) EventByID(topic common.Hash) (*Event, error) {
186186
for _, event := range abi.Events {
187-
if bytes.Equal(event.Id().Bytes(), topic.Bytes()) {
187+
if bytes.Equal(event.ID().Bytes(), topic.Bytes()) {
188188
return &event, nil
189189
}
190190
}

accounts/abi/abi_test.go

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ func TestReader(t *testing.T) {
6161
exp := ABI{
6262
Methods: map[string]Method{
6363
"balance": {
64-
"balance", true, nil, nil,
64+
"balance", "balance", true, nil, nil,
6565
},
6666
"send": {
67-
"send", false, []Argument{
67+
"send", "send", false, []Argument{
6868
{"amount", Uint256, false},
6969
}, nil,
7070
},
@@ -162,32 +162,30 @@ func TestTestSlice(t *testing.T) {
162162
if err != nil {
163163
t.Fatal(err)
164164
}
165-
166165
slice := make([]uint64, 2)
167166
if _, err := abi.Pack("uint64[2]", slice); err != nil {
168167
t.Error(err)
169168
}
170-
171169
if _, err := abi.Pack("uint64[]", slice); err != nil {
172170
t.Error(err)
173171
}
174172
}
175173

176174
func TestMethodSignature(t *testing.T) {
177175
String, _ := NewType("string", nil)
178-
m := Method{"foo", false, []Argument{{"bar", String, false}, {"baz", String, false}}, nil}
176+
m := Method{"foo", "foo", false, []Argument{{"bar", String, false}, {"baz", String, false}}, nil}
179177
exp := "foo(string,string)"
180178
if m.Sig() != exp {
181179
t.Error("signature mismatch", exp, "!=", m.Sig())
182180
}
183181

184182
idexp := crypto.Keccak256([]byte(exp))[:4]
185-
if !bytes.Equal(m.Id(), idexp) {
186-
t.Errorf("expected ids to match %x != %x", m.Id(), idexp)
183+
if !bytes.Equal(m.ID(), idexp) {
184+
t.Errorf("expected ids to match %x != %x", m.ID(), idexp)
187185
}
188186

189187
uintt, _ := NewType("uint256", nil)
190-
m = Method{"foo", false, []Argument{{"bar", uintt, false}}, nil}
188+
m = Method{"foo", "foo", false, []Argument{{"bar", uintt, false}}, nil}
191189
exp = "foo(uint256)"
192190
if m.Sig() != exp {
193191
t.Error("signature mismatch", exp, "!=", m.Sig())
@@ -206,13 +204,36 @@ func TestMethodSignature(t *testing.T) {
206204
{Name: "y", Type: "int256"},
207205
}},
208206
})
209-
m = Method{"foo", false, []Argument{{"s", s, false}, {"bar", String, false}}, nil}
207+
m = Method{"foo", "foo", false, []Argument{{"s", s, false}, {"bar", String, false}}, nil}
210208
exp = "foo((int256,int256[],(int256,int256)[],(int256,int256)[2]),string)"
211209
if m.Sig() != exp {
212210
t.Error("signature mismatch", exp, "!=", m.Sig())
213211
}
214212
}
215213

214+
func TestOverloadedMethodSignature(t *testing.T) {
215+
json := `[{"constant":true,"inputs":[{"name":"i","type":"uint256"},{"name":"j","type":"uint256"}],"name":"foo","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"i","type":"uint256"}],"name":"foo","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"i","type":"uint256"}],"name":"bar","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"i","type":"uint256"},{"indexed":false,"name":"j","type":"uint256"}],"name":"bar","type":"event"}]`
216+
abi, err := JSON(strings.NewReader(json))
217+
if err != nil {
218+
t.Fatal(err)
219+
}
220+
check := func(name string, expect string, method bool) {
221+
if method {
222+
if abi.Methods[name].Sig() != expect {
223+
t.Fatalf("The signature of overloaded method mismatch, want %s, have %s", expect, abi.Methods[name].Sig())
224+
}
225+
} else {
226+
if abi.Events[name].Sig() != expect {
227+
t.Fatalf("The signature of overloaded event mismatch, want %s, have %s", expect, abi.Events[name].Sig())
228+
}
229+
}
230+
}
231+
check("foo", "foo(uint256,uint256)", true)
232+
check("foo0", "foo(uint256)", true)
233+
check("bar", "bar(uint256)", false)
234+
check("bar0", "bar(uint256,uint256)", false)
235+
}
236+
216237
func TestMultiPack(t *testing.T) {
217238
abi, err := JSON(strings.NewReader(jsondata2))
218239
if err != nil {
@@ -900,13 +921,13 @@ func TestABI_MethodById(t *testing.T) {
900921
}
901922
for name, m := range abi.Methods {
902923
a := fmt.Sprintf("%v", m)
903-
m2, err := abi.MethodById(m.Id())
924+
m2, err := abi.MethodById(m.ID())
904925
if err != nil {
905926
t.Fatalf("Failed to look up ABI method: %v", err)
906927
}
907928
b := fmt.Sprintf("%v", m2)
908929
if a != b {
909-
t.Errorf("Method %v (id %v) not 'findable' by id in ABI", name, common.ToHex(m.Id()))
930+
t.Errorf("Method %v (id %v) not 'findable' by id in ABI", name, common.ToHex(m.ID()))
910931
}
911932
}
912933
// Also test empty
@@ -974,8 +995,8 @@ func TestABI_EventById(t *testing.T) {
974995
t.Errorf("We should find a event for topic %s, test #%d", topicID.Hex(), testnum)
975996
}
976997

977-
if event.Id() != topicID {
978-
t.Errorf("Event id %s does not match topic %s, test #%d", event.Id().Hex(), topicID.Hex(), testnum)
998+
if event.ID() != topicID {
999+
t.Errorf("Event id %s does not match topic %s, test #%d", event.ID().Hex(), topicID.Hex(), testnum)
9791000
}
9801001

9811002
unknowntopicID := crypto.Keccak256Hash([]byte("unknownEvent"))

accounts/abi/bind/base.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ func (c *BoundContract) FilterLogs(opts *FilterOpts, name string, query ...[]int
252252
opts = new(FilterOpts)
253253
}
254254
// Append the event selector to the query parameters and construct the topic set
255-
query = append([][]interface{}{{c.abi.Events[name].Id()}}, query...)
255+
query = append([][]interface{}{{c.abi.Events[name].ID()}}, query...)
256256

257257
topics, err := makeTopics(query...)
258258
if err != nil {
@@ -301,7 +301,7 @@ func (c *BoundContract) WatchLogs(opts *WatchOpts, name string, query ...[]inter
301301
opts = new(WatchOpts)
302302
}
303303
// Append the event selector to the query parameters and construct the topic set
304-
query = append([][]interface{}{{c.abi.Events[name].Id()}}, query...)
304+
query = append([][]interface{}{{c.abi.Events[name].ID()}}, query...)
305305

306306
topics, err := makeTopics(query...)
307307
if err != nil {

accounts/abi/bind/bind.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ func formatMethod(method abi.Method, structs map[string]*tmplStruct) string {
541541
if method.Const {
542542
constant = "constant "
543543
}
544-
return fmt.Sprintf("function %v(%v) %sreturns(%v)", method.Name, strings.Join(inputs, ", "), constant, strings.Join(outputs, ", "))
544+
return fmt.Sprintf("function %v(%v) %sreturns(%v)", method.RawName, strings.Join(inputs, ", "), constant, strings.Join(outputs, ", "))
545545
}
546546

547547
// formatEvent transforms raw event representation into a user friendly one.
@@ -554,5 +554,5 @@ func formatEvent(event abi.Event, structs map[string]*tmplStruct) string {
554554
inputs[i] = fmt.Sprintf("%v %v", resolveArgName(input, structs), input.Name)
555555
}
556556
}
557-
return fmt.Sprintf("event %v(%v)", event.Name, strings.Join(inputs, ", "))
557+
return fmt.Sprintf("event %v(%v)", event.RawName, strings.Join(inputs, ", "))
558558
}

accounts/abi/bind/bind_test.go

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,6 +1280,99 @@ var bindTests = []struct {
12801280
"b98c933f0a6ececcd167bd4f9d3299b1a0": "Math",
12811281
},
12821282
[]string{"UseLibrary", "Math"},
1283+
}, {
1284+
"Overload",
1285+
`
1286+
pragma solidity ^0.5.10;
1287+
1288+
contract overload {
1289+
mapping(address => uint256) balances;
1290+
1291+
event bar(uint256 i);
1292+
event bar(uint256 i, uint256 j);
1293+
1294+
function foo(uint256 i) public {
1295+
emit bar(i);
1296+
}
1297+
function foo(uint256 i, uint256 j) public {
1298+
emit bar(i, j);
1299+
}
1300+
}
1301+
`,
1302+
[]string{`608060405234801561001057600080fd5b50610153806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806304bc52f81461003b5780632fbebd3814610073575b600080fd5b6100716004803603604081101561005157600080fd5b8101908080359060200190929190803590602001909291905050506100a1565b005b61009f6004803603602081101561008957600080fd5b81019080803590602001909291905050506100e4565b005b7fae42e9514233792a47a1e4554624e83fe852228e1503f63cd383e8a431f4f46d8282604051808381526020018281526020019250505060405180910390a15050565b7f0423a1321222a0a8716c22b92fac42d85a45a612b696a461784d9fa537c81e5c816040518082815260200191505060405180910390a15056fea265627a7a72305820e22b049858b33291cbe67eeaece0c5f64333e439d27032ea8337d08b1de18fe864736f6c634300050a0032`},
1303+
[]string{`[{"constant":false,"inputs":[{"name":"i","type":"uint256"},{"name":"j","type":"uint256"}],"name":"foo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"i","type":"uint256"}],"name":"foo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"i","type":"uint256"}],"name":"bar","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"i","type":"uint256"},{"indexed":false,"name":"j","type":"uint256"}],"name":"bar","type":"event"}]`},
1304+
`
1305+
"math/big"
1306+
"time"
1307+
1308+
"github.com/ethereum/go-ethereum/accounts/abi/bind"
1309+
"github.com/ethereum/go-ethereum/accounts/abi/bind/backends"
1310+
"github.com/ethereum/go-ethereum/core"
1311+
"github.com/ethereum/go-ethereum/crypto"
1312+
`,
1313+
`
1314+
// Initialize test accounts
1315+
key, _ := crypto.GenerateKey()
1316+
auth := bind.NewKeyedTransactor(key)
1317+
sim := backends.NewSimulatedBackend(core.GenesisAlloc{auth.From: {Balance: big.NewInt(10000000000)}}, 10000000)
1318+
defer sim.Close()
1319+
1320+
// deploy the test contract
1321+
_, _, contract, err := DeployOverload(auth, sim)
1322+
if err != nil {
1323+
t.Fatalf("Failed to deploy contract: %v", err)
1324+
}
1325+
// Finish deploy.
1326+
sim.Commit()
1327+
1328+
resCh, stopCh := make(chan uint64), make(chan struct{})
1329+
1330+
go func() {
1331+
barSink := make(chan *OverloadBar)
1332+
sub, _ := contract.WatchBar(nil, barSink)
1333+
defer sub.Unsubscribe()
1334+
1335+
bar0Sink := make(chan *OverloadBar0)
1336+
sub0, _ := contract.WatchBar0(nil, bar0Sink)
1337+
defer sub0.Unsubscribe()
1338+
1339+
for {
1340+
select {
1341+
case ev := <-barSink:
1342+
resCh <- ev.I.Uint64()
1343+
case ev := <-bar0Sink:
1344+
resCh <- ev.I.Uint64() + ev.J.Uint64()
1345+
case <-stopCh:
1346+
return
1347+
}
1348+
}
1349+
}()
1350+
contract.Foo(auth, big.NewInt(1), big.NewInt(2))
1351+
sim.Commit()
1352+
select {
1353+
case n := <-resCh:
1354+
if n != 3 {
1355+
t.Fatalf("Invalid bar0 event")
1356+
}
1357+
case <-time.NewTimer(100 * time.Millisecond).C:
1358+
t.Fatalf("Wait bar0 event timeout")
1359+
}
1360+
1361+
contract.Foo0(auth, big.NewInt(1))
1362+
sim.Commit()
1363+
select {
1364+
case n := <-resCh:
1365+
if n != 1 {
1366+
t.Fatalf("Invalid bar event")
1367+
}
1368+
case <-time.NewTimer(100 * time.Millisecond).C:
1369+
t.Fatalf("Wait bar event timeout")
1370+
}
1371+
close(stopCh)
1372+
`,
1373+
nil,
1374+
nil,
1375+
nil,
12831376
},
12841377
}
12851378

accounts/abi/bind/template.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ var (
294294
{{end}}
295295
296296
{{range .Calls}}
297-
// {{.Normalized.Name}} is a free data retrieval call binding the contract method 0x{{printf "%x" .Original.Id}}.
297+
// {{.Normalized.Name}} is a free data retrieval call binding the contract method 0x{{printf "%x" .Original.ID}}.
298298
//
299299
// Solidity: {{formatmethod .Original $structs}}
300300
func (_{{$contract.Type}} *{{$contract.Type}}Caller) {{.Normalized.Name}}(opts *bind.CallOpts {{range .Normalized.Inputs}}, {{.Name}} {{bindtype .Type $structs}} {{end}}) ({{if .Structured}}struct{ {{range .Normalized.Outputs}}{{.Name}} {{bindtype .Type $structs}};{{end}} },{{else}}{{range .Normalized.Outputs}}{{bindtype .Type $structs}},{{end}}{{end}} error) {
@@ -313,14 +313,14 @@ var (
313313
return {{if .Structured}}*ret,{{else}}{{range $i, $_ := .Normalized.Outputs}}*ret{{$i}},{{end}}{{end}} err
314314
}
315315
316-
// {{.Normalized.Name}} is a free data retrieval call binding the contract method 0x{{printf "%x" .Original.Id}}.
316+
// {{.Normalized.Name}} is a free data retrieval call binding the contract method 0x{{printf "%x" .Original.ID}}.
317317
//
318318
// Solidity: {{formatmethod .Original $structs}}
319319
func (_{{$contract.Type}} *{{$contract.Type}}Session) {{.Normalized.Name}}({{range $i, $_ := .Normalized.Inputs}}{{if ne $i 0}},{{end}} {{.Name}} {{bindtype .Type $structs}} {{end}}) ({{if .Structured}}struct{ {{range .Normalized.Outputs}}{{.Name}} {{bindtype .Type $structs}};{{end}} }, {{else}} {{range .Normalized.Outputs}}{{bindtype .Type $structs}},{{end}} {{end}} error) {
320320
return _{{$contract.Type}}.Contract.{{.Normalized.Name}}(&_{{$contract.Type}}.CallOpts {{range .Normalized.Inputs}}, {{.Name}}{{end}})
321321
}
322322
323-
// {{.Normalized.Name}} is a free data retrieval call binding the contract method 0x{{printf "%x" .Original.Id}}.
323+
// {{.Normalized.Name}} is a free data retrieval call binding the contract method 0x{{printf "%x" .Original.ID}}.
324324
//
325325
// Solidity: {{formatmethod .Original $structs}}
326326
func (_{{$contract.Type}} *{{$contract.Type}}CallerSession) {{.Normalized.Name}}({{range $i, $_ := .Normalized.Inputs}}{{if ne $i 0}},{{end}} {{.Name}} {{bindtype .Type $structs}} {{end}}) ({{if .Structured}}struct{ {{range .Normalized.Outputs}}{{.Name}} {{bindtype .Type $structs}};{{end}} }, {{else}} {{range .Normalized.Outputs}}{{bindtype .Type $structs}},{{end}} {{end}} error) {
@@ -329,21 +329,21 @@ var (
329329
{{end}}
330330
331331
{{range .Transacts}}
332-
// {{.Normalized.Name}} is a paid mutator transaction binding the contract method 0x{{printf "%x" .Original.Id}}.
332+
// {{.Normalized.Name}} is a paid mutator transaction binding the contract method 0x{{printf "%x" .Original.ID}}.
333333
//
334334
// Solidity: {{formatmethod .Original $structs}}
335335
func (_{{$contract.Type}} *{{$contract.Type}}Transactor) {{.Normalized.Name}}(opts *bind.TransactOpts {{range .Normalized.Inputs}}, {{.Name}} {{bindtype .Type $structs}} {{end}}) (*types.Transaction, error) {
336336
return _{{$contract.Type}}.contract.Transact(opts, "{{.Original.Name}}" {{range .Normalized.Inputs}}, {{.Name}}{{end}})
337337
}
338338
339-
// {{.Normalized.Name}} is a paid mutator transaction binding the contract method 0x{{printf "%x" .Original.Id}}.
339+
// {{.Normalized.Name}} is a paid mutator transaction binding the contract method 0x{{printf "%x" .Original.ID}}.
340340
//
341341
// Solidity: {{formatmethod .Original $structs}}
342342
func (_{{$contract.Type}} *{{$contract.Type}}Session) {{.Normalized.Name}}({{range $i, $_ := .Normalized.Inputs}}{{if ne $i 0}},{{end}} {{.Name}} {{bindtype .Type $structs}} {{end}}) (*types.Transaction, error) {
343343
return _{{$contract.Type}}.Contract.{{.Normalized.Name}}(&_{{$contract.Type}}.TransactOpts {{range $i, $_ := .Normalized.Inputs}}, {{.Name}}{{end}})
344344
}
345345
346-
// {{.Normalized.Name}} is a paid mutator transaction binding the contract method 0x{{printf "%x" .Original.Id}}.
346+
// {{.Normalized.Name}} is a paid mutator transaction binding the contract method 0x{{printf "%x" .Original.ID}}.
347347
//
348348
// Solidity: {{formatmethod .Original $structs}}
349349
func (_{{$contract.Type}} *{{$contract.Type}}TransactorSession) {{.Normalized.Name}}({{range $i, $_ := .Normalized.Inputs}}{{if ne $i 0}},{{end}} {{.Name}} {{bindtype .Type $structs}} {{end}}) (*types.Transaction, error) {
@@ -422,7 +422,7 @@ var (
422422
Raw types.Log // Blockchain specific contextual infos
423423
}
424424
425-
// Filter{{.Normalized.Name}} is a free log retrieval operation binding the contract event 0x{{printf "%x" .Original.Id}}.
425+
// Filter{{.Normalized.Name}} is a free log retrieval operation binding the contract event 0x{{printf "%x" .Original.ID}}.
426426
//
427427
// Solidity: {{formatevent .Original $structs}}
428428
func (_{{$contract.Type}} *{{$contract.Type}}Filterer) Filter{{.Normalized.Name}}(opts *bind.FilterOpts{{range .Normalized.Inputs}}{{if .Indexed}}, {{.Name}} []{{bindtype .Type $structs}}{{end}}{{end}}) (*{{$contract.Type}}{{.Normalized.Name}}Iterator, error) {
@@ -439,7 +439,7 @@ var (
439439
return &{{$contract.Type}}{{.Normalized.Name}}Iterator{contract: _{{$contract.Type}}.contract, event: "{{.Original.Name}}", logs: logs, sub: sub}, nil
440440
}
441441
442-
// Watch{{.Normalized.Name}} is a free log subscription operation binding the contract event 0x{{printf "%x" .Original.Id}}.
442+
// Watch{{.Normalized.Name}} is a free log subscription operation binding the contract event 0x{{printf "%x" .Original.ID}}.
443443
//
444444
// Solidity: {{formatevent .Original $structs}}
445445
func (_{{$contract.Type}} *{{$contract.Type}}Filterer) Watch{{.Normalized.Name}}(opts *bind.WatchOpts, sink chan<- *{{$contract.Type}}{{.Normalized.Name}}{{range .Normalized.Inputs}}{{if .Indexed}}, {{.Name}} []{{bindtype .Type $structs}}{{end}}{{end}}) (event.Subscription, error) {
@@ -481,7 +481,7 @@ var (
481481
}), nil
482482
}
483483
484-
// Parse{{.Normalized.Name}} is a log parse operation binding the contract event 0x{{printf "%x" .Original.Id}}.
484+
// Parse{{.Normalized.Name}} is a log parse operation binding the contract event 0x{{printf "%x" .Original.ID}}.
485485
//
486486
// Solidity: {{.Original.String}}
487487
func (_{{$contract.Type}} *{{$contract.Type}}Filterer) Parse{{.Normalized.Name}}(log types.Log) (*{{$contract.Type}}{{.Normalized.Name}}, error) {
@@ -574,7 +574,7 @@ import java.util.*;
574574
}
575575
{{end}}
576576
577-
// {{.Normalized.Name}} is a free data retrieval call binding the contract method 0x{{printf "%x" .Original.Id}}.
577+
// {{.Normalized.Name}} is a free data retrieval call binding the contract method 0x{{printf "%x" .Original.ID}}.
578578
//
579579
// Solidity: {{.Original.String}}
580580
public {{if gt (len .Normalized.Outputs) 1}}{{capitalise .Normalized.Name}}Results{{else}}{{range .Normalized.Outputs}}{{bindtype .Type $structs}}{{end}}{{end}} {{.Normalized.Name}}(CallOpts opts{{range .Normalized.Inputs}}, {{bindtype .Type $structs}} {{.Name}}{{end}}) throws Exception {
@@ -601,7 +601,7 @@ import java.util.*;
601601
{{end}}
602602
603603
{{range .Transacts}}
604-
// {{.Normalized.Name}} is a paid mutator transaction binding the contract method 0x{{printf "%x" .Original.Id}}.
604+
// {{.Normalized.Name}} is a paid mutator transaction binding the contract method 0x{{printf "%x" .Original.ID}}.
605605
//
606606
// Solidity: {{.Original.String}}
607607
public Transaction {{.Normalized.Name}}(TransactOpts opts{{range .Normalized.Inputs}}, {{bindtype .Type $structs}} {{.Name}}{{end}}) throws Exception {

0 commit comments

Comments
 (0)