diff options
author | RJ Catalano <catalanor0220@gmail.com> | 2017-10-17 19:07:08 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2017-10-17 19:07:08 +0800 |
commit | dec8bba9d4c5fcb3dd7e51f0f794b3e895c7f52d (patch) | |
tree | 7e4713ca276ac1a2cef7cd2dd19dcf8c6fd1f6c4 /accounts/abi/abi_test.go | |
parent | e9295163aa25479e817efee4aac23eaeb7554bba (diff) | |
download | dexon-dec8bba9d4c5fcb3dd7e51f0f794b3e895c7f52d.tar dexon-dec8bba9d4c5fcb3dd7e51f0f794b3e895c7f52d.tar.gz dexon-dec8bba9d4c5fcb3dd7e51f0f794b3e895c7f52d.tar.bz2 dexon-dec8bba9d4c5fcb3dd7e51f0f794b3e895c7f52d.tar.lz dexon-dec8bba9d4c5fcb3dd7e51f0f794b3e895c7f52d.tar.xz dexon-dec8bba9d4c5fcb3dd7e51f0f794b3e895c7f52d.tar.zst dexon-dec8bba9d4c5fcb3dd7e51f0f794b3e895c7f52d.zip |
accounts/abi: improve type handling, add event support (#14743)
Diffstat (limited to 'accounts/abi/abi_test.go')
-rw-r--r-- | accounts/abi/abi_test.go | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/accounts/abi/abi_test.go b/accounts/abi/abi_test.go index a3aa9446e..79c4d4a16 100644 --- a/accounts/abi/abi_test.go +++ b/accounts/abi/abi_test.go @@ -29,25 +29,6 @@ import ( "github.com/ethereum/go-ethereum/crypto" ) -// formatSilceOutput add padding to the value and adds a size -func formatSliceOutput(v ...[]byte) []byte { - off := common.LeftPadBytes(big.NewInt(int64(len(v))).Bytes(), 32) - output := append(off, make([]byte, 0, len(v)*32)...) - - for _, value := range v { - output = append(output, common.LeftPadBytes(value, 32)...) - } - return output -} - -// quick helper padding -func pad(input []byte, size int, left bool) []byte { - if left { - return common.LeftPadBytes(input, size) - } - return common.RightPadBytes(input, size) -} - const jsondata = ` [ { "type" : "function", "name" : "balance", "constant" : true }, @@ -191,7 +172,7 @@ func TestMethodSignature(t *testing.T) { t.Errorf("expected ids to match %x != %x", m.Id(), idexp) } - uintt, _ := NewType("uint") + uintt, _ := NewType("uint256") m = Method{"foo", false, []Argument{{"bar", uintt, false}}, nil} exp = "foo(uint256)" if m.Sig() != exp { |