Skip to content
This repository was archived by the owner on Nov 30, 2021. It is now read-only.

Conversation

@austinabell
Copy link

@austinabell austinabell commented Sep 11, 2019

  • Allows Ethereum tx to be sent through daemon
  • Two tx generation options, Ethereum tx wrapped in Cosmos StdTx (to be completed), and sending ethereum tx through the node
  • Adds amino encoding functionality for Ethereum transaction data
  • Updates key output for Ethermint keys to output Ethereum and Cosmos address/pubkeys
  • Updated Key encoding and decoding and references to correct keystore

How this works is the Ethereum compatible key is generated through emintkeys but the key generated with emintcli keys still needs to be used to allocate this account and generate the genesis tx because emintkeys are not compatible with these modules.

Will open for PR when I look into the Cosmos StdTx route to generating tx and cleaning that up as well as double checking some parameters and refactoring.

To run this some parameters changed:

make install 
rm -rf ~/.emint*
emintd init moniker --chain-id 3
emintcli config chain-id 3
emintcli config output json
emintcli config indent true
emintcli config trust-node true
emintcli keys add austin
testpass
testpass
emintcli emintkeys add austineth
testpass
testpass
emintd add-genesis-account $(emintcli keys show austin -a) 1000photon,100000000stake
emintd add-genesis-account $(emintcli emintkeys show austineth -a) 100000000photon,100000000stake
emintd gentx --name austin
testpass
emintd collect-gentxs
emintd validate-genesis
emintd start --pruning=nothing --rpc.unsafe

and then to send the tx:

emintcli tx ethermint generate-eth-tx 0 756F45E3FA69347A9A973A725E3C98bC4db0b5a0 5photon 22000 3 test --from austineth

@austinabell austinabell marked this pull request as ready for review September 11, 2019 22:11
Copy link

@ansermino ansermino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome stuff. Perhaps encoding_test.go should be amino_test.go?

You should also make sure sources are included for any borrowed code. What you have in x/evm/client/utils/tx.go is 🔥

@austinabell
Copy link
Author

Awesome stuff. Perhaps encoding_test.go should be amino_test.go?

I had left it ambiguous in case we included another decoding type in that decoding, but I will change the name since it's unlikely we'd extend the encoding and decoding of keys since it is irrelevant to the chain.

You should also make sure sources are included for any borrowed code. What you have in x/evm/client/utils/tx.go is 🔥

Good idea, I will also pinpoint the exact parts of the function that required me to override and change, so it will be easier to refactor/ offer alternatives.

@austinabell austinabell merged commit 72fc3ca into development Sep 15, 2019
@austinabell austinabell deleted the austin/evmtxsigning branch September 15, 2019 16:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants