Sign raw transactions

Example:

1 Generate a raw-tx for test:

$ ./eth-cli transfer \
    --dry-run \
    -f /tmp/a.json \
    -a 0.002eth -t 0x4cD96aC8382362b14FE1f48d4FBa5917Dd5d79e3 \
     --chain-id 11155111 \
     --nonce 11
    
Using wallet file: /tmp/a.json
Please Enter AES Password:
Did you use a BIP39 passphrase for this wallet? (y/n): y
Please Enter BIP39 Passphrase:
WARNING: Using chain ID 11155111 and nonce 11 for dry run.
Transaction Details:
From: 0x990d19d8C4e61D7e56Ab570490ad9caE55e12eb2
To: 0x4cD96aC8382362b14FE1f48d4FBa5917Dd5d79e3
Amount: 0.002000000000000000 ETH
Gas Limit: 21000
Gas Price: 1.000000000 Gwei
Gas Fee: 0.000021000000000000 ETH
Nonce: 11
Chain ID: 11155111

2 Sign a raw-tx without broadcast:

$ ./eth-cli sign-raw-tx \
    -f /tmp/a.json -
    -raw-tx 0x02ed83aa36a70a843b9aca00843b9aca00825208944cd96ac8382362b14fe1f48d4fba5917dd5d79e38080c0808080
    
Using wallet file: /tmp/a.json
Please Enter AES Password:
Did you use a BIP39 passphrase for this wallet? (y/n): y
Please Enter BIP39 Passphrase:
Signed Transaction: 0x02f86d83aa36a70a843b9aca00843b9aca00825208944cd96ac8382362b14fe1......

3 Sign and broadcast

$ ./eth-cli sign-raw-tx \
    -f /tmp/a.json \
    --raw-tx 0x02f483aa36a70b843b9aca00843b9aca00825208944cd96ac8382362b14fe1f48d4fba5917dd5d79e387071afd498d000080c0808080 \
    --broadcast
    
Using wallet file: /tmp/a.json
Please Enter AES Password:
Did you use a BIP39 passphrase for this wallet? (y/n): y
Please Enter BIP39 Passphrase:
Transaction Details:
From: 0x990d19d8C4e61D7e56Ab570490ad9caE55e12eb2
Signed Transaction: 0x02f87483aa36a70b843b9aca00843b9aca00825208944cd96ac8382362b14fe1......
Broadcast this transaction? (y/N): y
Transaction submitted: 0x71bae04f1c255802e8b696a5b3608d658a0ee5a6bbd8c8dd5925d66f2701afc8

4 Check the browser

Last updated