aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/abi.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2015-11-24 20:48:47 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-11-24 20:48:47 +0800
commit5490437942967638bcc6198035315f6811febaa8 (patch)
treeec4fbee454bacbf2b80b5a7ff402fb48dd2c10cf /accounts/abi/abi.go
parente5532154a50114d5ffb1ffd850b746cab00cb899 (diff)
parentb0fb48c389460193d9fc0a5118d79ff6dec48ce0 (diff)
downloadgo-tangerine-1.3.2.tar
go-tangerine-1.3.2.tar.gz
go-tangerine-1.3.2.tar.bz2
go-tangerine-1.3.2.tar.lz
go-tangerine-1.3.2.tar.xz
go-tangerine-1.3.2.tar.zst
go-tangerine-1.3.2.zip
Merge branch 'develop' into release/1.3.2v1.3.2
Conflicts: VERSION cmd/geth/main.go
Diffstat (limited to 'accounts/abi/abi.go')
-rw-r--r--accounts/abi/abi.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/accounts/abi/abi.go b/accounts/abi/abi.go
index de3128902..3f05bfe2d 100644
--- a/accounts/abi/abi.go
+++ b/accounts/abi/abi.go
@@ -36,7 +36,7 @@ import (
type Method struct {
Name string
Const bool
- Input []Argument
+ Inputs []Argument
Return Type // not yet implemented
}
@@ -49,9 +49,9 @@ type Method struct {
// Please note that "int" is substitute for its canonical representation "int256"
func (m Method) String() (out string) {
out += m.Name
- types := make([]string, len(m.Input))
+ types := make([]string, len(m.Inputs))
i := 0
- for _, input := range m.Input {
+ for _, input := range m.Inputs {
types[i] = input.Type.String()
i++
}
@@ -104,7 +104,7 @@ func (abi ABI) pack(name string, args ...interface{}) ([]byte, error) {
var ret []byte
for i, a := range args {
- input := method.Input[i]
+ input := method.Inputs[i]
packed, err := input.Type.pack(a)
if err != nil {
@@ -129,8 +129,8 @@ func (abi ABI) Pack(name string, args ...interface{}) ([]byte, error) {
}
// start with argument count match
- if len(args) != len(method.Input) {
- return nil, fmt.Errorf("argument count mismatch: %d for %d", len(args), len(method.Input))
+ if len(args) != len(method.Inputs) {
+ return nil, fmt.Errorf("argument count mismatch: %d for %d", len(args), len(method.Inputs))
}
arguments, err := abi.pack(name, args...)