GetDataArgs
This commit is contained in:
11
rpc/args.go
11
rpc/args.go
@ -281,7 +281,7 @@ func (args *GetBalanceArgs) UnmarshalJSON(b []byte) (err error) {
|
||||
}
|
||||
|
||||
type GetDataArgs struct {
|
||||
Address string
|
||||
Address common.Address
|
||||
BlockNumber int64
|
||||
}
|
||||
|
||||
@ -299,7 +299,7 @@ func (args *GetDataArgs) UnmarshalJSON(b []byte) (err error) {
|
||||
if !ok {
|
||||
return NewInvalidTypeError("address", "not a string")
|
||||
}
|
||||
args.Address = addstr
|
||||
args.Address = common.HexToAddress(addstr)
|
||||
|
||||
if len(obj) > 1 {
|
||||
if err := blockHeight(obj[1], &args.BlockNumber); err != nil {
|
||||
@ -310,13 +310,6 @@ func (args *GetDataArgs) UnmarshalJSON(b []byte) (err error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (args *GetDataArgs) requirements() error {
|
||||
if len(args.Address) == 0 {
|
||||
return NewValidationError("Address", "cannot be blank")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type BlockNumIndexArgs struct {
|
||||
BlockNumber int64
|
||||
Index int64
|
||||
|
Reference in New Issue
Block a user