aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/message.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-02-20 01:41:50 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-02-20 01:41:50 +0800
commit605dd3a9820bb74be883afe3cb0e462aca40b32d (patch)
tree7a77f0f41ad1582b32080f5623fa4d7b5dce3020 /rpc/message.go
parentdba4f3122e83a66edc1fa089c5d69f789b07a6b3 (diff)
downloaddexon-605dd3a9820bb74be883afe3cb0e462aca40b32d.tar
dexon-605dd3a9820bb74be883afe3cb0e462aca40b32d.tar.gz
dexon-605dd3a9820bb74be883afe3cb0e462aca40b32d.tar.bz2
dexon-605dd3a9820bb74be883afe3cb0e462aca40b32d.tar.lz
dexon-605dd3a9820bb74be883afe3cb0e462aca40b32d.tar.xz
dexon-605dd3a9820bb74be883afe3cb0e462aca40b32d.tar.zst
dexon-605dd3a9820bb74be883afe3cb0e462aca40b32d.zip
Add serpent compilation to RPC
Diffstat (limited to 'rpc/message.go')
-rw-r--r--rpc/message.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/rpc/message.go b/rpc/message.go
index 524d7fc84..1935bf1e2 100644
--- a/rpc/message.go
+++ b/rpc/message.go
@@ -201,6 +201,21 @@ func (req *RpcRequest) ToGetCodeAtArgs() (*GetCodeAtArgs, error) {
return args, nil
}
+func (req *RpcRequest) ToCompileArgs() (string, error) {
+ if len(req.Params) < 1 {
+ return "", NewErrorResponse(ErrorArguments)
+ }
+
+ var args string
+ err := json.Unmarshal(req.Params[0], &args)
+ if err != nil {
+ return "", NewErrorResponse(ErrorDecodeArgs)
+ }
+
+ rpclogger.DebugDetailf("%T %v", args, args)
+ return args, nil
+}
+
func (req *RpcRequest) ToFilterArgs() (*FilterOptions, error) {
if len(req.Params) < 1 {
return nil, NewErrorResponse(ErrorArguments)