Skip to content

hadv/ethereal

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ethereal is a command line tool for managing common tasks in Ethereum. It is designed to allow integration in to batch scripts and to be called from other programs by providing concise information and through use of the quiet mode where results are translated in to exit codes.

Installing Ethereal

Ethereal requires Go. With Go installed you can install Ethereal by running go get github.com/wealdtech/ethereal

Using Ethereal

Access to local wallets

Ethereal works with Geth, MIST and Parity wallets in the standard locations. A simple way to check the addresses that can be seen by Ethereal is to run ethereal account list which will list all accounts that Ethereal can see. If you expect an address to show up and it doesn't then please raise an issue with the relevant details.

If you use Parity and want to import a private key or a wallet from another system please see https://github.com/paritytech/parity/wiki/Backing-up-&-Restoring#restoring-options

If you use Geth and want to import a private key or a wallet from another system please see https://github.com/ethereum/go-ethereum/wiki/Managing-your-accounts

Access to Ethereum networks

Ethereal supports all main Ethereum networks It auto-detects the network by querying the connected node for the network ID. The connection should be geth-compatible, so either geth itself or parity with the --geth flag to enable geth compatibility mode. The connection could be a local node or a network service such as Infura.

Examples

Increase the gas price for transaction

You have submitted a transaction to the network but it's taking a long time to process because the gas price is too low.

ethereal transaction up --transaction=0x5219b09d629158c2759035c97b11b604f57d0c733515738aaae0d2dafb41ab98 --gasprice=20GWei --passphrase=secret

where transaction is the hash of the pending transactions, gasprice is the price you want to set for gas, and passphrase is the passphrase for the account that sent the transaction.

Cancel a transaction

You have submitted a transaction to the network by mistake and want to cancel it.

ethereal transaction cancel --transaction=0x5219b09d629158c2759035c97b11b604f57d0c733515738aaae0d2dafb41ab98 --passphrase=secret

where transaction is the hash of the pending transactions and passphrase is the passphrase for the account that sent the transaction.

Sweep Ether

You want to transfer all Ether in one account to another.

ethereal ether sweep --from=0x5FfC014343cd971B7eb70732021E26C35B744cc4 --to=0x52f1A3027d3aA514F17E454C93ae1F79b3B12d5d --passphrase=secret

where from is the address from which the Ether will be transferred, to is the address to which the Ether will be transferred, and passphrase is the passphrase for the from account.

Transfer a token

You want to transfer a token to another account.

ethereal token transfer --token=omg --from=0x5FfC014343cd971B7eb70732021E26C35B744cc4 --to=0x52f1A3027d3aA514F17E454C93ae1F79b3B12d5d --amount=10.2 --passphrase=secret

where token is the token to transfer, from is the address from which the token will be transferred, to is the address to which the token will be transferred, amount is the amount of the token to transfer, gasprice is the price you want to set for gas, and passphrase is the passphrase for the from account.

Please note that before using a token name such as 'omg' you should confirm that the contract address matches the expected contract address by using ethereal info --token=omg or similar.

Call a contract

You want to obtain information directly from a contract using its ABI, for example call the balanceOf() call of an ERC-20 token.

ethereal contract call --abi='./erc20.abi' --contract=0xd26114cd6EE289AccF82350c8d8487fedB8A0C07 --from=0x5FfC014343cd971B7eb70732021E26C35B744cc4 --call='balanceOf(0x5FfC014343cd971B7eb70732021E26C35B744cc4)'

where abi is the path to the contract's ABI, contract is the address of the contract to call, and call is the ABI method to call.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%