aboutsummaryrefslogtreecommitdiffstats
path: root/signer
diff options
context:
space:
mode:
authorgary rong <garyrong0905@gmail.com>2019-08-02 15:20:46 +0800
committerMartin Holst Swende <martin@swende.se>2019-08-02 15:20:46 +0800
commit947f5f2b152e18dfab2bec72c99ef76e1d851764 (patch)
tree7656fcf2546bf6955003472af4dc9c60949ae7ff /signer
parente46a01d56c190badd6b71a4fba6c886fcee1059b (diff)
downloadgo-tangerine-947f5f2b152e18dfab2bec72c99ef76e1d851764.tar
go-tangerine-947f5f2b152e18dfab2bec72c99ef76e1d851764.tar.gz
go-tangerine-947f5f2b152e18dfab2bec72c99ef76e1d851764.tar.bz2
go-tangerine-947f5f2b152e18dfab2bec72c99ef76e1d851764.tar.lz
go-tangerine-947f5f2b152e18dfab2bec72c99ef76e1d851764.tar.xz
go-tangerine-947f5f2b152e18dfab2bec72c99ef76e1d851764.tar.zst
go-tangerine-947f5f2b152e18dfab2bec72c99ef76e1d851764.zip
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.
Diffstat (limited to 'signer')
-rw-r--r--signer/fourbyte/abi.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/signer/fourbyte/abi.go b/signer/fourbyte/abi.go
index ba3af6225..585eae1cd 100644
--- a/signer/fourbyte/abi.go
+++ b/signer/fourbyte/abi.go
@@ -140,7 +140,7 @@ func parseCallData(calldata []byte, abidata string) (*decodedCallData, error) {
return nil, err
}
// Everything valid, assemble the call infos for the signer
- decoded := decodedCallData{signature: method.Sig(), name: method.Name}
+ decoded := decodedCallData{signature: method.Sig(), name: method.RawName}
for i := 0; i < len(method.Inputs); i++ {
decoded.inputs = append(decoded.inputs, decodedArgument{
soltype: method.Inputs[i],