aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/args.go
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/args.go')
-rw-r--r--rpc/args.go31
1 files changed, 27 insertions, 4 deletions
diff --git a/rpc/args.go b/rpc/args.go
index ff4974792..79519e7d2 100644
--- a/rpc/args.go
+++ b/rpc/args.go
@@ -1,6 +1,7 @@
package rpc
import "encoding/json"
+import "github.com/ethereum/go-ethereum/core"
type GetBlockArgs struct {
BlockNumber int32
@@ -36,10 +37,6 @@ type NewTxArgs struct {
Data string `json:"data"`
}
-// type TxResponse struct {
-// Hash string
-// }
-
func (a *NewTxArgs) requirements() error {
if a.Gas == "" {
return NewErrorResponse("Transact requires a 'gas' value as argument")
@@ -195,3 +192,29 @@ func (obj *Sha3Args) UnmarshalJSON(b []byte) (err error) {
}
return
}
+
+type FilterOptions struct {
+ Earliest int64
+ Latest int64
+ Address string
+ Topics []string
+ Skip int
+ Max int
+}
+
+func toFilterOptions(options *FilterOptions) core.FilterOptions {
+ var opts core.FilterOptions
+ opts.Earliest = options.Earliest
+ opts.Latest = options.Latest
+ opts.Address = fromHex(options.Address)
+ opts.Topics = make([][]byte, len(options.Topics))
+ for i, topic := range options.Topics {
+ opts.Topics[i] = fromHex(topic)
+ }
+
+ return opts
+}
+
+type FilterChangedArgs struct {
+ n int
+}