SignTransaction in Offline with python

iFAiFA Member Posts: 7
Feel free to use:

def signTransaction(to, value, privkey, nonce=0, gasPrice=20000000000, gas=21000, data=""): from ethereum import transactions import rlp try: return { 'error':False, 'sign':rlp.encode(transactions.Transaction(nonce, gasPrice, gas, to, value, data).sign(privkey)).encode('hex') } except Exception as msg: return { 'error':True, 'message':msg }
Sign In or Register to comment.