ethsign

module
v0.0.0-...-924208b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2022 License: MIT

README

Ethereum Signed Transaction Generator

Utility to generate raw/signed Ethereum transactions offline.

Install
% go install github.com/juztin/ethersign/cmd/ethersign
Usage
Sending Ethereum
ethsign ether --to 0x1111111111111111111111111111111111111111 --key keyfile.json --value 0.05
Send a message to a contract (ERC-20 transfer)

without ABI

ethsign call "transfer(address,uint256)" 0xffffffffffffffffffffffffffffffffffffffff 42 --key keyfile.json

with ABI

ethsign call funcName arg1 arg2 --to 0x1111111111111111111111111111111111111111 --abi contract.abi --key keyfile.txt
Contract Deployment

without ABI

ethsign deploy --abi contract.abi --bin contract.bin --key keyfile.json
ethsign deploy arg1 arg2 --abi contract.abi --bin contract.bin --key keyfile.json

with ABI

ethsign deploy --bin contract.bin --key keyfile.json
ethsign deploy "constructor(string,uint256)" arg1 arg2 --bin contract.bin --key keyfile.json
Generating a QR Code

Install qr-code (or use any other qr-code generator)

go get github.com/juztin/qr-code

Create a QR Code for submission directly to etherscan

qrcode echo "https://etherscan.io/pushTx?hex=0x$(ethsign ether --to 0xffffffffffffffffffffffffffffffffffffffff --value 0.25 --key keyfile.key --nonce 42 -gasPrice 2 -gasLimit 21000)" > transaction.png
TODO
  • Support non-ABI calls
  • Support arrays
  • Support multi-dimensional arrays
  • Tests

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL