Closed DeRain closed 6 years ago
Thinking about this... 2 things:
chain_id
shouldn't be an input parameter. The mount point is configured for a particular chain_id
.So, if you change:
_, err := b.configured(ctx, req)
to
config, err := b.configured(ctx, req)
...
chainID := ValidNumber(config.ChainID)
if chainID == nil {
return nil, fmt.Errorf("invalid chain ID")
}
Then I think we've got something.
Actually, upon second thought, I am gonna do something a little different. We already have a method that signs a transaction - debit
. The only thing we need to accommodate your ask is to:
I am gonna try this.
I believe that this https://github.com/immutability-io/vault-ethereum/pull/24 addresses your request. Please feel free to comment here or there. But I will close this PR for now.
@cypherhat I think that send(true|false)
options to existing methods is fine, but in my opinion, we still need a more flexible method for signing transactions. For example, we might need a bunch of transaction with different smart contracts iteration, that causes custom tx_data in each case.
I've updated fork according to latest master and created a merge request with config
updates. What do you think?
https://github.com/immutability-io/vault-ethereum/pull/26
Description
Brand new API endpoint for making signing transaction easy!
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: