Skip to content
This repository was archived by the owner on Jan 5, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
a5330fe
accounts/abi: include fixed array size in offset for dynamic type
yondonfu Oct 12, 2017
62dc530
cmd/utils: bootstrap nodes in config file were not respected
MaximilianMeister Nov 26, 2017
0f7fbb8
trie: make fullnode children hash calculation concurrently (#15131)
rjl493456442 Nov 27, 2017
6bb61ee
build: improve ci.go synopsis (#15565)
zramsay Nov 28, 2017
e323ed5
Merge pull request #15557 from MaximilianMeister/bootnodes-toml
karalabe Nov 28, 2017
8f35e30
cmd/geth: fix geth attach --datadir=... (#15517)
MaximilianMeister Nov 28, 2017
be12392
core/vm: track 63/64 call gas off stack (#15563)
fjl Nov 28, 2017
b33a529
common: fix hex utils to handle 1 byte address conversions
karalabe Nov 29, 2017
e37f7be
Merge pull request #15577 from karalabe/common-hexconvert-singlebyte
karalabe Nov 29, 2017
73067fd
buld: enable goconst linter (#15566)
zramsay Nov 30, 2017
54aeb8e
p2p/simulations: various stability fixes (#15198)
lmars Dec 1, 2017
20fe928
whisper: rename EnvNonce to Nonce in the v6 Envelope (#15579)
gballet Dec 1, 2017
d927c67
eth/downloader: update tests for reliability (#15337)
rojotek Dec 1, 2017
80c6dfc
crypto/bn256: fix generator on G1 (#15591)
mattdf Dec 1, 2017
43dd8e6
build: enable gosimple linter (#15593)
ferhatelmas Dec 1, 2017
1d06e41
p2p, swarm/network/kademlia: use IsZero to check for zero time (#15603)
ferhatelmas Dec 4, 2017
afb8154
common: improve IsHexAddress and add tests (#15551)
stevenroose Dec 4, 2017
6e613cf
cmd/geth: add support for geth attach --testnet (#15597)
sorin Dec 5, 2017
e85b68e
crypto: add DecompressPubkey, VerifySignature (#15615)
fjl Dec 6, 2017
eab2201
eth: return rlp-decoded values from debug_storageRangeAt (#15476)
mexskican Dec 6, 2017
8092106
core/types: fix typo in comment (#15619)
Airead Dec 7, 2017
b587427
travis.yml: avoid submodules on builders without tests (#15620)
fjl Dec 7, 2017
79d5e55
consensus/ethash: relax requirements when determining future-blocks
holiman Dec 8, 2017
d95962c
whisper/whisperv6: remove aesnonce (#15578)
gballet Dec 8, 2017
586198c
console: add admin.clearHistory command (#15614)
sorin Dec 8, 2017
bf62acf
whisper/whisperv6: remove Version from the envelope (#15621)
gballet Dec 8, 2017
46e5583
cmd/utils, eth: init etherbase from within eth (#15528)
karalabe Dec 9, 2017
bbfe0b8
mobile: Add GetSign to BigInt (#15558)
alejandro-isaza Dec 9, 2017
732f546
eth: make tracing API errors more user friendly (#15589)
Dec 9, 2017
e7610ea
whisper: sym encryption message padding includes salt (#15631)
gballet Dec 11, 2017
2499b1b
rlp: fix string size check in readKind (#15625)
fjl Dec 11, 2017
1a32bdf
crypto: fix error check in toECDSA (#15632)
fjl Dec 11, 2017
32516c7
cmd/swarm: add config file (#15548)
holisticode Dec 11, 2017
bbea4b2
internal/ethapi: fix typo in comment (#15659)
y0za Dec 12, 2017
3da1bf8
all: use gometalinter.v2, fix new gosimple issues (#15650)
zramsay Dec 12, 2017
fd777bb
p2p/simulations: add mocker functionality (#15207)
holisticode Dec 12, 2017
f258a21
rpc: use method constants instead of literal strings (#15652)
vvelikodny Dec 12, 2017
3654aea
p2p/simulations: fix gosimple nit (#15661)
fjl Dec 13, 2017
5129ef2
Merge pull request #15629 from holiman/relax_futuretime
karalabe Dec 14, 2017
e9971d3
internal/ethapi: don't crash for missing receipts
rhaps107 Dec 14, 2017
7bb2a48
crypto: Fix comment typo
shapeshed Dec 14, 2017
1f2176d
Merge pull request #15679 from shapeshed/patch-1
karalabe Dec 14, 2017
c6069a6
crypto, crypto/secp256k1: add CompressPubkey (#15626)
fjl Dec 15, 2017
fb5f25e
core/vm: Remove snapshot param from Interpreter.Run()
chfast Dec 14, 2017
1d7d7f5
cmd/geth: add support for geth --rinkeby attach
sorin Dec 15, 2017
afa3c72
p2p/discover: fix leaked goroutine in data expiration
ferhatelmas Dec 18, 2017
64ee3e9
Merge pull request #15686 from sorin/sorin-geth-attach-rinkeby
karalabe Dec 18, 2017
13db4af
Merge pull request #15696 from ferhatelmas/p2p-goroutine-leak
karalabe Dec 18, 2017
afc2039
accounts/keystore: Improved error message
original-brownbear Dec 18, 2017
3b79bac
Merge pull request #15698 from original-brownbear/15668
karalabe Dec 18, 2017
8c33ac1
internal/ethapi: support "input" in transaction args (#15640)
fjl Dec 18, 2017
fe070ab
Merge pull request #15674 from chfast/vm-no-snapshot-param
karalabe Dec 18, 2017
48648bc
contracts/release: do not print error log if les backend has no peers
zsfelfoldi Dec 17, 2017
3857cdc
Merge branch 'master' into abi-offset-fixed-arrays
yondonfu Dec 18, 2017
cf7aba3
accounts/abi: update array type check in method.go. Add more packing …
yondonfu Dec 19, 2017
7f9d94f
Merge pull request #15693 from zsfelfoldi/wait_nopeers
karalabe Dec 19, 2017
c786f75
swarm: bzz-list, bzz-raw and bzz-immutable schemes (#15667)
janos Dec 19, 2017
50df2b7
console: create datadir at startup (#15700)
original-brownbear Dec 19, 2017
5e1581c
core: fix panic when stat-ing a tx from a queue-only account (#15714)
karalabe Dec 20, 2017
ce823c9
crypto: ensure that VerifySignature rejects malleable signatures (#15…
fjl Dec 20, 2017
da58afc
accounts/abi: update array length after parsing array (#15618)
dshulyak Dec 20, 2017
b4cf57a
core: fix typos (#15720)
kurkomisi Dec 20, 2017
7138de7
core: silence txpool reorg warning (annoying on import) (#15725)
karalabe Dec 21, 2017
4b939c2
appveyor: bump Go to 1.9.2 (#15726)
karalabe Dec 21, 2017
9f1007e
whisper/whisperv6: message bundling (#15666)
gluk256 Dec 21, 2017
e21aa0f
accounts/abi: remove check for len%32==0 when unpacking events (#15670)
bobg Dec 21, 2017
eeb53bc
cmd/ethkey: new command line tool for keys (#15438)
stevenroose Dec 21, 2017
a283905
params: add Rinkeby bootnode from Akasha
karalabe Dec 21, 2017
1a54257
Merge pull request #15727 from karalabe/rinkeby-akasha-bootnode
karalabe Dec 21, 2017
5258785
cmd, core, eth/tracers: support fancier js tracing (#15516)
karalabe Dec 21, 2017
68651a2
cmd/faucet: fix removal of Twitter zlib compression
karalabe Dec 21, 2017
542d518
swarm/api: url scheme bzz-hash to get hashes of swarm content (#15238…
janos Dec 21, 2017
1485281
cmd/utils: add check on fd hard limit, skip test if below target (#15…
nolash Dec 21, 2017
91c3362
Merge pull request #15729 from karalabe/faucet-fix-twitter
karalabe Dec 21, 2017
b0d41e3
Merge pull request #15285 from yondonfu/abi-offset-fixed-arrays
holiman Dec 21, 2017
3511904
accounts/abi: adding event unpacker tests
robert-zaremba Nov 10, 2017
9becba5
accounts/abi: fix event tupleUnpack
robert-zaremba Nov 9, 2017
0ed8b83
accounts/abi: fix event unpack into slice
robert-zaremba Nov 10, 2017
95461e8
accounts/abi: satisfy most of the linter warnings
robert-zaremba Nov 10, 2017
1afca33
accounts/abi: add Method Unpack tests
robert-zaremba Nov 23, 2017
81d4caf
accounts/abi: add unpack into array test
robert-zaremba Dec 1, 2017
38b1e8e
whisper/whisperv6: PoW requirement (#15701)
gluk256 Dec 21, 2017
e4aa882
cmd/puppeth: fix faucet 502 error due to non-exposed HTTP port
karalabe Dec 21, 2017
52f4d6d
Merge pull request #15730 from karalabe/puppeth-expose-faucet-http
karalabe Dec 21, 2017
9dbb8ef
dashboard: integrate Flow, sketch message API (#15713)
kurkomisi Dec 21, 2017
5f8888e
accounts, consensus, core, eth: make chain maker consensus agnostic (…
rjl493456442 Dec 22, 2017
73d4a57
acounts/abi: refactor abi, generalize abi pack/unpack to Arguments
holiman Dec 21, 2017
c095c87
accounts/abi: merging of https://github.com/ethereum/go-ethereum/pull…
holiman Dec 21, 2017
9d187f0
Merge pull request #15731 from holiman/revamp_abi
holiman Dec 22, 2017
5369a5c
rpc: allow OPTIONS requests without Content-Type (#15759)
sorin Dec 28, 2017
c15d76a
p2p/discv5: fix reg lookup, polish code, use logger (#15737)
karalabe Dec 28, 2017
f7ca03a
eth, les, light: expose chain config in les node info too (#15732)
karalabe Dec 28, 2017
36a1087
p2p/enr: initial implementation (#15585)
nonsense Dec 29, 2017
b973176
accounts/abi: handle named ouputs prefixed with underscores (#15766)
karalabe Dec 29, 2017
908faf8
consensus/ethash: fix overdue link (#15786)
Dec 31, 2017
6cd6b92
crypto: ensure private keys are < N (#15745)
dindinw Jan 2, 2018
b98aa3b
whisper/whisper2: fix Go 1.10 vet issues on type mismatches (#15783)
karalabe Jan 2, 2018
6882943
containers/docker: change docker images to go1.9 (#15789)
sadysnaat Jan 2, 2018
2fe07c2
build: fix version comparison for go1.10 and beyond (#15781)
karalabe Jan 2, 2018
9c42a41
eth/downloader: avoid hidden reference to finished statesync request …
karalabe Jan 2, 2018
3e0113f
build: set CC through a command-line flag (#15784)
karalabe Jan 2, 2018
d2533d0
vendor: update github.com/rjeczalik/notify for go1.10 (#15785)
karalabe Jan 2, 2018
413cc5b
cmd/geth: remove trailing newline in license command (#15782)
karalabe Jan 2, 2018
c495bca
eth: enable preimage recording when tracing (#15787)
cdetrio Jan 2, 2018
5866626
core, p2p/discv5: use time.NewTicker instead of time.Tick (#15747)
ferhatelmas Jan 2, 2018
72e70bc
console: remove comment about 'invalid' input (#15735)
RichardH92 Jan 2, 2018
85a1eda
eth: uncaptialize tracer preimage error message (#15792)
fjl Jan 3, 2018
9d48dbf
eth: revert tracer preimage recording (#15800)
fjl Jan 3, 2018
b8caba9
various: remove redundant parentheses (#15793)
kamaci Jan 3, 2018
6f69cdd
all: switch gas limits from big.Int to uint64
karalabe Nov 13, 2017
b47285f
vendor: update github.com/rjeczalik/notify (#15801)
fjl Jan 3, 2018
762f3a4
Merge pull request #15466 from karalabe/uint64-gas-limit
karalabe Jan 3, 2018
7a59a93
cmd/utils: handle git commit a bit safer for user specified strings (…
epappas Jan 3, 2018
ae71da1
eth: fix tracer panic when running without configs + reexec (#15799)
karalabe Jan 4, 2018
1c2378b
tests: update to upstream commit 2bb0c3da3b (#15806)
fjl Jan 4, 2018
a139041
dashboard: use balanced trees to include binary data (#15813)
rsc Jan 5, 2018
5c2f1e0
all: update generated code (#15808)
fjl Jan 8, 2018
9d06026
all: regenerate codecs with gencodec commit 90983d99de (#15830)
fjl Jan 8, 2018
83d1657
les: fix les/1 CHT compatibility issue (#15692)
zsfelfoldi Jan 9, 2018
3a5a559
consensus/ethash: fix byzantium difficulty comment typo (#15842)
rjl493456442 Jan 10, 2018
b06e20b
eth/gasprice: set default percentile to 60%, count blocks instead of …
Arachnid Jan 10, 2018
023769d
travis.yml: remove alias for 'cd' to avoid hang on macOS (#15849)
kivutar Jan 11, 2018
56152b3
common/fdlimit: Move fdlimit files to separate package (#15850)
ricardohsd Jan 11, 2018
bd0dbfa
cmd/geth: user friendly light miner error
karalabe Jan 12, 2018
fd869dc
whisper/whisperv6: implement pow/bloom exchange protocol (#15802)
gluk256 Jan 12, 2018
3f40b22
Merge pull request #15863 from karalabe/light-miner-error
karalabe Jan 12, 2018
90e5744
ethstats: Fix ethstats reporting while syncing
Magicking Jan 12, 2018
81ad8f6
Merge pull request #15869 from Magicking/ethstats-reporting-fix
karalabe Jan 15, 2018
938cf45
dashboard: deep state update, version in footer (#15837)
kurkomisi Jan 15, 2018
18a7d31
miner: avoid unnecessary work (#15883)
mcdee Jan 15, 2018
216e584
Revert "trie: make fullnode children hash calculation concurrently (#…
karalabe Jan 15, 2018
f08cd94
cmd/ethkey: fix formatting, review nits (#15807)
fjl Jan 16, 2018
370dca4
core/vm: Fix comment typo
shapeshed Jan 16, 2018
02aeb3d
Merge pull request #15902 from shapeshed/patch-2
karalabe Jan 16, 2018
84be009
core: sorted reorg insertion order for proper head header updating
karalabe Jan 22, 2018
92580d6
p2p, p2p/discover, p2p/discv5: implement UDP port sharing (#15200)
zsfelfoldi Jan 22, 2018
5d42679
Merge pull request #15941 from karalabe/fix-header-reorg-order
karalabe Jan 22, 2018
48641d7
p2p/discv5: logs info about discv5 node info at bind time
holiman Jan 23, 2018
924065e
consensus/ethash: improve cache/dataset handling (#15864)
fjl Jan 23, 2018
302c17c
Merge pull request #15948 from holiman/addr_v5_bootnode
karalabe Jan 23, 2018
397c6cd
p2p/discv5: fix topic register panic at shutdown (#15946)
zsfelfoldi Jan 23, 2018
ec96216
Chain indexer fix + new CHT (#15934)
zsfelfoldi Jan 23, 2018
05ade19
dashboard: CPU, memory, diskIO and traffic on the footer (#15950)
kurkomisi Jan 23, 2018
1bf508b
accounts/abi/bind: support event filtering in abigen
karalabe Jan 5, 2018
5c83a4e
Merge pull request #15832 from karalabe/abigen-events
karalabe Jan 24, 2018
952482d
rpc: Support specifying HTTP client in RPC dialing (#15836)
stevenroose Jan 24, 2018
c335821
cmd, params: update discovery v5 bootnodes (#15954)
zsfelfoldi Jan 25, 2018
8f6990d
accounts/abi/bind/backends: fix comment typo (#15914)
Jan 25, 2018
4dd0727
accounts: fix comment typo (#15977)
miguelmota Jan 26, 2018
2ef3815
whisper: fix empty topic (#15811)
b00ris Jan 26, 2018
367c329
whisper: remove linter warnings (#15972)
gballet Jan 26, 2018
23bca0f
les: fix TxStatusMsg RLP coding (#15974)
zsfelfoldi Jan 26, 2018
722bac8
ethapi: add personal.signTransaction (#15971)
holiman Jan 26, 2018
dd7a715
internal: fix a typo that caused a lint error on travis (#15987)
gballet Jan 29, 2018
59a852e
vendor: update leveldb to 211f780 (poolfix) (#15988)
holiman Jan 29, 2018
bc42acb
Merge go-ethereum upstream into 2.5.4
5chdn Jan 30, 2018
7430b92
Bump version to 2.5.4
5chdn Jan 30, 2018
5739425
Fix build
5chdn Jan 30, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ profile.cov
.idea

# dashboard
/dashboard/assets/flow-typed
/dashboard/assets/node_modules
/dashboard/assets/stats.json
/dashboard/assets/public/bundle.js
/dashboard/assets/bundle.js

# git merge
*.orig
21 changes: 17 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ matrix:
go: 1.9.x
sudo: required
script:
- unset -f cd # workaround for https://github.com/travis-ci/travis-ci/issues/8703
- brew update
- brew install caskroom/cask/brew-cask
- brew cask install osxfuse
Expand All @@ -57,6 +58,8 @@ matrix:
go: 1.9.x
env:
- lint
git:
submodules: false # avoid cloning ethereum/tests
script:
- sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install fuse
- sudo modprobe fuse
Expand All @@ -72,6 +75,8 @@ matrix:
env:
- ubuntu-ppa
- azure-linux
git:
submodules: false # avoid cloning ethereum/tests
addons:
apt:
packages:
Expand All @@ -92,13 +97,13 @@ matrix:
- sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install gcc-arm-linux-gnueabi libc6-dev-armel-cross gcc-arm-linux-gnueabihf libc6-dev-armhf-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross
- sudo ln -s /usr/include/asm-generic /usr/include/asm

- GOARM=5 CC=arm-linux-gnueabi-gcc go run build/ci.go install -arch arm
- GOARM=5 go run build/ci.go install -arch arm -cc arm-linux-gnueabi-gcc
- GOARM=5 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -upload gmcstore/builds
- GOARM=6 CC=arm-linux-gnueabi-gcc go run build/ci.go install -arch arm
- GOARM=6 go run build/ci.go install -arch arm -cc arm-linux-gnueabi-gcc
- GOARM=6 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -upload gmcstore/builds
- GOARM=7 CC=arm-linux-gnueabihf-gcc go run build/ci.go install -arch arm
- GOARM=7 go run build/ci.go install -arch arm -cc arm-linux-gnueabihf-gcc
- GOARM=7 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -upload gmcstore/builds
- CC=aarch64-linux-gnu-gcc go run build/ci.go install -arch arm64
- go run build/ci.go install -arch arm64 -cc aarch64-linux-gnu-gcc
- go run build/ci.go archive -arch arm64 -type tar -signer LINUX_SIGNING_KEY -upload gmcstore/builds

# This builder does the Linux Azure MIPS xgo uploads
Expand All @@ -110,6 +115,8 @@ matrix:
go: 1.9.x
env:
- azure-linux-mips
git:
submodules: false # avoid cloning ethereum/tests
script:
- go run build/ci.go xgo --alltools -- --targets=linux/mips --ldflags '-extldflags "-static"' -v
- for bin in build/bin/*-linux-mips; do mv -f "${bin}" "${bin/-linux-mips/}"; done
Expand Down Expand Up @@ -146,6 +153,8 @@ matrix:
env:
- azure-android
- maven-android
git:
submodules: false # avoid cloning ethereum/tests
before_install:
- curl https://storage.googleapis.com/golang/go1.9.2.linux-amd64.tar.gz | tar -xz
- export PATH=`pwd`/go/bin:$PATH
Expand All @@ -169,6 +178,8 @@ matrix:
- azure-osx
- azure-ios
- cocoapods-ios
git:
submodules: false # avoid cloning ethereum/tests
script:
- go run build/ci.go install
- go run build/ci.go archive -type tar -signer OSX_SIGNING_KEY -upload gmcstore/builds
Expand All @@ -193,6 +204,8 @@ matrix:
go: 1.9.x
env:
- azure-purge
git:
submodules: false # avoid cloning ethereum/tests
script:
- go run build/ci.go purge -store gmcstore/builds -days 14

Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,13 @@ clean:

devtools:
env GOBIN= go get -u golang.org/x/tools/cmd/stringer
env GOBIN= go get -u github.com/jteeuwen/go-bindata/go-bindata
env GOBIN= go get -u github.com/kevinburke/go-bindata/go-bindata
env GOBIN= go get -u github.com/fjl/gencodec
env GOBIN= go get -u github.com/golang/protobuf/protoc-gen-go
env GOBIN= go install ./cmd/abigen
@type "npm" 2> /dev/null || echo 'Please install node.js and npm'
@type "solc" 2> /dev/null || echo 'Please install solc'
@type "protoc" 2> /dev/null || echo 'Please install protoc'

# Cross Compilation Targets (xgo)

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.3
2.5.4
59 changes: 33 additions & 26 deletions accounts/abi/abi.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package abi

import (
"bytes"
"encoding/json"
"fmt"
"io"
Expand Down Expand Up @@ -50,57 +51,52 @@ func JSON(reader io.Reader) (ABI, error) {
// methods string signature. (signature = baz(uint32,string32))
func (abi ABI) Pack(name string, args ...interface{}) ([]byte, error) {
// Fetch the ABI of the requested method
var method Method

if name == "" {
method = abi.Constructor
} else {
m, exist := abi.Methods[name]
if !exist {
return nil, fmt.Errorf("method '%s' not found", name)
// constructor
arguments, err := abi.Constructor.Inputs.Pack(args...)
if err != nil {
return nil, err
}
method = m
return arguments, nil

}
arguments, err := method.pack(args...)
method, exist := abi.Methods[name]
if !exist {
return nil, fmt.Errorf("method '%s' not found", name)
}

arguments, err := method.Inputs.Pack(args...)
if err != nil {
return nil, err
}
// Pack up the method ID too if not a constructor and return
if name == "" {
return arguments, nil
}
return append(method.Id(), arguments...), nil
}

// Unpack output in v according to the abi specification
func (abi ABI) Unpack(v interface{}, name string, output []byte) (err error) {
if err = bytesAreProper(output); err != nil {
return err
if len(output) == 0 {
return fmt.Errorf("abi: unmarshalling empty output")
}
// since there can't be naming collisions with contracts and events,
// we need to decide whether we're calling a method or an event
var unpack unpacker
if method, ok := abi.Methods[name]; ok {
unpack = method
if len(output)%32 != 0 {
return fmt.Errorf("abi: improperly formatted output")
}
return method.Outputs.Unpack(v, output)
} else if event, ok := abi.Events[name]; ok {
unpack = event
} else {
return fmt.Errorf("abi: could not locate named method or event.")
}

// requires a struct to unpack into for a tuple return...
if unpack.isTupleReturn() {
return unpack.tupleUnpack(v, output)
return event.Inputs.Unpack(v, output)
}
return unpack.singleUnpack(v, output)
return fmt.Errorf("abi: could not locate named method or event")
}

// UnmarshalJSON implements json.Unmarshaler interface
func (abi *ABI) UnmarshalJSON(data []byte) error {
var fields []struct {
Type string
Name string
Constant bool
Indexed bool
Anonymous bool
Inputs []Argument
Outputs []Argument
Expand Down Expand Up @@ -137,3 +133,14 @@ func (abi *ABI) UnmarshalJSON(data []byte) error {

return nil
}

// MethodById looks up a method by the 4-byte id
// returns nil if none found
func (abi *ABI) MethodById(sigdata []byte) *Method {
for _, method := range abi.Methods {
if bytes.Equal(method.Id(), sigdata[:4]) {
return &method
}
}
return nil
}
Loading