diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-26 17:52:32 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-26 17:52:32 +0800 |
commit | bd1a54f076935d8d42c1f6df2c54fdd4e7f978ac (patch) | |
tree | 47158073bb63a5aade110467d462b1191036850d /rpc/args.go | |
parent | 966cfa4bddb0fbe355dadb83541325a3b5c132f8 (diff) | |
download | go-tangerine-bd1a54f076935d8d42c1f6df2c54fdd4e7f978ac.tar go-tangerine-bd1a54f076935d8d42c1f6df2c54fdd4e7f978ac.tar.gz go-tangerine-bd1a54f076935d8d42c1f6df2c54fdd4e7f978ac.tar.bz2 go-tangerine-bd1a54f076935d8d42c1f6df2c54fdd4e7f978ac.tar.lz go-tangerine-bd1a54f076935d8d42c1f6df2c54fdd4e7f978ac.tar.xz go-tangerine-bd1a54f076935d8d42c1f6df2c54fdd4e7f978ac.tar.zst go-tangerine-bd1a54f076935d8d42c1f6df2c54fdd4e7f978ac.zip |
GetStorageArgs
Diffstat (limited to 'rpc/args.go')
-rw-r--r-- | rpc/args.go | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/rpc/args.go b/rpc/args.go index 2446e778f..8d7427f6f 100644 --- a/rpc/args.go +++ b/rpc/args.go @@ -149,7 +149,7 @@ func (args *NewTxArgs) UnmarshalJSON(b []byte) (err error) { } type GetStorageArgs struct { - Address string + Address common.Address BlockNumber int64 } @@ -165,9 +165,9 @@ func (args *GetStorageArgs) UnmarshalJSON(b []byte) (err error) { addstr, ok := obj[0].(string) if !ok { - return NewDecodeParamError("Address is not a string") + return NewDecodeParamError("address is not a string") } - args.Address = addstr + args.Address = common.HexToAddress(addstr) if len(obj) > 1 { if err := blockHeight(obj[1], &args.BlockNumber); err != nil { @@ -178,13 +178,6 @@ func (args *GetStorageArgs) UnmarshalJSON(b []byte) (err error) { return nil } -func (args *GetStorageArgs) requirements() error { - if len(args.Address) == 0 { - return NewValidationError("Address", "cannot be blank") - } - return nil -} - type GetStorageAtArgs struct { Address string Key string |