Closed DeRain closed 6 years ago
@cypherhat By the way. Maybe adding send(true|false)
parameter in debit
,contract deploy
, and erc20 transfer
methods a bit against UNIX philosophy - do the one thing and do it well. And from this angle - one single signTx
endpoint for signing transactions can be only one API in the application for doing only one thing - signing transactions 🤓
Oooh... you stab my heart re: the Unix philosophy. But, I do have to say, there are exceptions... but, I hear you. Let me think on it for a bit.
@cypherhat Hello, Jeff. Did you have a chance to think about this MR? :)
I have thought about it. Since the capability you are asking for - signing transactions without sending them - exists, this is more a debate about design. I think that adding a send=false
flag to each of the 3 transaction types that are supported reduces the sprawl of the interface. So, I am going to close this. Cheers!
Description
I'm sorry for the duplicate, but previous MR could not be reopened because HEAD was updated.
@cypherhat Answering your previous questions:
Answers:
account_to
field optional - it will work for contracts deployment too.Motivation and Context
I'm tried common sign method, but it seems it's working only for custom data signatures. Anyway - I think we need a more developer's friendly way to sign the transaction.
The developer only needs to provide all
json
properties of the transaction and then he gets signed transaction in HEX format that ready to be broadcasted to Ethereum network by any convenient way. For example: Etherscan tool How to broadcast transaction via web3How Has This Been Tested?
This is a brand new API and does not impact any existing code. I've created signed transactions and broadcasted them on
Ropsten
network via Etherscan publishing toolTypes of changes
Checklist: