Skip to content
This repository was archived by the owner on Aug 8, 2018. It is now read-only.

Commit 6ee6ea7

Browse files
corbinbsRomanZacharia
authored andcommitted
Add support for the JSON RPC sendRawTransaction method
1 parent 2f086d2 commit 6ee6ea7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pyethapp/jsonrpc.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,16 @@ def get_data_default(key, decoder, default=None):
10861086
log.debug('decoded tx', tx=tx.log_dict())
10871087
return data_encoder(tx.hash)
10881088

1089+
@public
1090+
@decode_arg('data', data_decoder)
1091+
def sendRawTransaction(self, data):
1092+
"""
1093+
decode sendRawTransaction request data and relay along to the sendTransaction method
1094+
to ensure the same validations and processing rules are applied
1095+
"""
1096+
tx_data = rlp.codec.decode(data, ethereum.transactions.Transaction)
1097+
return self.sendTransaction(tx_data.to_dict())
1098+
10891099
@public
10901100
@decode_arg('block_id', block_id_decoder)
10911101
@encode_res(data_encoder)

0 commit comments

Comments
 (0)