Seth

Ethereum from the command line. Slice and dice transactons, query the blockchain, convert between data formats, peform remote calls, estimate gas usage and more...

COMMANDS

abi        convert an ABI from Solidity to JSON
age        show the age of the current block
balance    show the balance of an account
block      print a table of information about a specific block
call       call a contract without updating the blockchain
calldata   pack a signature and a list of arguments into calldata
code       print the bytecode of an object on the blockchain
estimate   estimate how much gas a transaction is likely to use
help       print help about seth or one of its subcommands
keccak     print the Keccak hash of an arbitrary piece of data
logs       print the transaction logs of some contract
ls         display a list of your local accounts and balances
nonce      show the number of transactions sent from an address
publish    publish an already-signed transaction to the blockchain
receipt    wait for a transaction receipt to appear and print it
send       sign and publish a transaction to the blockchain
sign       sign arbitrary data with one of your account keys
storage    show the value of a storage slot on the blockchain
tx         print a table of information about a transaction

OPTIONS

-B, --block=<number>       block number (default: `latest')

-F, --from=<sender>        account to send transaction from
-G, --gas=<number>         number of units of gas to provide
-P, --gas-price=<amount>   price of each gas unit (in wei)
-N, --nonce=<number>       nonce value to use for the transaction
-V, --value=<amount>       amount of ether to send (in wei)

--rpc-host=<host>          RPC endpoint host (default: `localhost')
--rpc-port=<port>          RPC endpoint port (default: `8545')

-j, --json                 print raw JSON to standard output

SPECIAL COMMANDS

--from-ascii               convert text data into hexdata
--from-bin                 convert binary data into hexdata
--to-bytes32               convert hexdata into bytes32 form
--to-uint256               convert a number into uint256 form

Examples

TODO

Installing

Setting up the DappHub toolkit

If you are running GNU/Linux or macOS you can take advantage of our all in one installer.

$ curl https://dapp.tools/install | sh

This script downloads the Nix package manager, setups binary cache with Cachix and installs our most used tools.

Manual installation

We recommend using the Nix package manager. It works on Linux and OS X and is self-contained and unobtrusive.

$ curl https://nixos.org/nix/install | sh
$ . "$HOME/.nix-profile/etc/profile.d/nix.sh"
$ nix-env -if https://github.com/cachix/cachix/tarball/master --substituters https://cachix.cachix.org --trusted-public-keys cachix.cachix.org-1:eWNHQldwUO7G2VkjpnjDbWwy4KQ/HNxht7H4SSoMckM=
$ cachix use dapp
$ git clone --recursive https://github.com/dapphub/dapptools $HOME/.dapp/dapptools
$ nix-env -f $HOME/.dapp/dapptools -iA dapp seth solc hevm ethsign

Contributing

Tools for dapps

We believe that the free software movement is the most important cultural predecessor to the modern-day renaissance in decentralized technologies.

To catalyze the growth of this ecosystem, and to empower hackers to participate, we’re building a comprehensive suite of blockchain-oriented developer tools in the spirit of the Unix philosophy.

Dapp is all you need to start developing for Ethereum. It creates new dapps, runs Solidity unit tests, debugs, deploys, launches testnets, and more.

Seth is a handy tool for slicing and dicing transactions, querying the blockchain, converting between data formats, performing remote calls, and other everyday tasks.

Hevm is our own EVM implementation with a nimble terminal-based Solidity debugger. It’s used for dapp test and dapp debug.

Evmdis is an EVM disassembler written and maintained by Nick Johnson. It’s useful to make sense of EVM bytecode, especially when developing contracts at the assembly or raw bytecode level.

Dappsys - smart contract building blocks

We also maintain Dappsys, an audited collection of smart contract building blocks designed to complement each other. They include;

Using these proven parts lets us focus on the novel features of the systems we develop. We share Dappsys to benefit the smart contract ecosystem.