• Stars
    star
    2,086
  • Rank 22,140 (Top 0.5 %)
  • Language
    Haskell
  • Created over 6 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Dapp, Seth, Hevm, and more

Dapp tools by DappHub Chat

Hello!

dapptools is a suite of Ethereum focused CLI tools following the Unix design philosophy, favoring composability, configurability and extensibility.

This repository contains the source code for several programs hand-crafted and maintained by DappHub, along with dependency management, courtesy of Nix.

  • dapp - All you need Ethereum development tool. Build, test, fuzz, formally verify, debug & deploy solidity contracts.
  • seth - Ethereum CLI. Query contracts, send transactions, follow logs, slice & dice data.
  • hevm - Testing oriented EVM implementation. Debug, fuzz, or symbolically execute code against local or mainnet state.
  • ethsign - Sign Ethereum transactions from a local keystore or hardware wallet.

Development Status

dapptools is currently in a stage of clandestine development where support for the casual user may be deprived. The software can now be considered free as in free puppy. Users seeking guidance can explore using foundry as an alternative

Installation

Install Nix if you haven't already (instructions). Then install dapptools:

With flakes

nix profile install github:dapphub/dapptools#{dapp,ethsign,hevm,seth}

Nix will offer to use the dapptools binary cache, which will speed up installs, but requires you to trust both us and the Cachix infrastructure.

Legacy

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

This configures the dapphub binary cache and installs the dapp, solc, seth and hevm executables.

NOTE: Arm support in the GHC haskell compiler is still fairly bleeding edge, until this situation stabilises, users of M1 macs must run dapptools (and the installer!) under rosetta 2 (i.e. as an emulated x86 program). Make sure /etc/nix/nix.conf contains system = x86_64-darwin.

You can also install an individual tool with:

nix-env -iA <tool> -f $(curl -sS https://api.github.com/repos/dapphub/dapptools/releases/latest | jq -r .tarball_url)

If you instead want to build from master, change the url to https://github.com/dapphub/dapptools/archive/master.tar.gz.

Prebuilt hevm binary

Static binaries for linux and macos of hevm are available for each release at https://github.com/dapphub/dapptools/releases.

Most functionality is available out of the box, but for symbolic execution you will need solc and (z3 or cvc4 (or both)).

Getting started

For more information about the tools, consult the individual README pages:

or use the --help flag for any tool.

We're also happy to answer any questions at https://dapphub.chat/.

Examples

Deploy a 'Hello World' contract and call it:

export ETH_RPC_URL=https://mainnet.infura.io/v3/$YOUR_API_KEY
export ETH_FROM=$YOUR_ADDRESS
echo 'contract Hello { function hi() public pure returns(string memory) {return "Hello, World!";}}' | solc --bin -o . --overwrite -
HELLO=$(seth send --create $(<Hello.bin))
seth call $HELLO "hi()(string)"

Debug the first transaction of the latest block in the interactive debugger:

export ETH_RPC_URL=https://mainnet.infura.io/v3/$YOUR_API_KEY
seth run-tx $(seth block latest transactions | jq .'[0]' -r) --debug

If Vitalik's next transaction were a contract deployment, calculate the address it would be deployed at:

export ETH_RPC_URL=https://mainnet.infura.io/v3/$YOUR_API_KEY
dapp address 0xab5801a7d398351b8be11c439e05c5b3259aec9b $(seth nonce 0xab5801a7d398351b8be11c439e05c5b3259aec9b)

Symbolically explore the possible execution paths of a call to dai.transfer(address,uint):

seth bundle-source 0x6b175474e89094c44da98b954eedeac495271d0f > daisrc.json && \
hevm symbolic --address 0x6b175474e89094c44da98b954eedeac495271d0f --rpc $ETH_RPC_URL  --debug --sig "transfer(address,uint256)" --json-file daisrc.json

Contributing

Contributions are always welcome! You may be interested in the architecture of this repository.

built with nix

More Repositories

1

dappsys

Composable building blocks for Ethereum contracts
Nix
580
star
2

ds-proxy

a proxy object that can compose transactions on owner's behalf
Solidity
311
star
3

dapple

EVM contract system developer multitool
JavaScript
298
star
4

ds-math

Safe arithmetic
Solidity
268
star
5

dapp

This repository has been moved to dapphub/dapptools
249
star
6

ds-token

A simple and sufficient ERC20 implementation
Solidity
225
star
7

ds-test

Assertions, equality checks and other test helpers
Solidity
208
star
8

chai

ERC20 wrapper over the Dai Savings Rate
Solidity
147
star
9

seth

(OLD REPO) The command-line Ethereum army knife by DappHub
147
star
10

ds-auth

Updatable, unobtrusive Solidity authorization pattern
Solidity
138
star
11

klab

K framework proof explorer & smart contract specification format
JavaScript
124
star
12

hevm

(OLD REPO) A debug-oriented Ethereum VM (EVM)
114
star
13

dmap

registry contract with no time to argue
JavaScript
58
star
14

ds-dach

Dai Automated Clearing House
Shell
52
star
15

dpack

simple lockfile for your dapp's addresses and artifacts
TypeScript
46
star
16

k-dss

formal verification of multicollateral dai in the K framework
GCC Machine Description
45
star
17

ds-feeds

Simple data access pattern for dumb, durable software objects
Makefile
32
star
18

ds-chief

approval voting to select who wears the hat by consensus
Solidity
29
star
19

ds-weth

ETH->ERC20 with extra opinions
Solidity
27
star
20

ds-pause

Schedule function calls that can only be executed once some delay has elapsed
Solidity
26
star
21

ethrun

Directly run EVM bytecode (using Parity technology)
Rust
24
star
22

ds-vault

DSAuth-protected ERC20 token vault
Solidity
24
star
23

erc20

erc20 interface definition container package
Solidity
24
star
24

ds-guard

Whitelist DSAuthority for use with DSAuth
Solidity
22
star
25

ds-group

Multisig with a command-line interface
Shell
22
star
26

dapp-tools

Code for the dapp.tools website
Nix
21
star
27

dappsys-monolithic

Dappsys for all
Solidity
21
star
28

ds-cabal

Simple m-of-n multisig proxy written in handcrafted EVM bytcode
Makefile
21
star
29

keeper

Admin toolkit for incentive-following software daemons
Shell
19
star
30

ds-roles

A DSAuthority for up to 256 roles
Solidity
17
star
31

ds-note

Log function calls as events
Solidity
17
star
32

ds-value

Set and get a value
Solidity
14
star
33

fv-tutorial

Materials for the devcon4 workshop
GCC Machine Description
14
star
34

ds-eth-token

ERC20 ETH token wrapper. No more special case logic for Ether.
Makefile
13
star
35

ds-exec

Better exception handling
Solidity
9
star
36

ll

Linear Logic references
HTML
8
star
37

awesome-dmap

awesome dmap links
7
star
38

nixpkgs-dapphub

Dapp development overlay for Nix
Nix
7
star
39

locktopus

sqlite file of locked values in the dmap
JavaScript
6
star
40

ds-warp

Time travel for Ethereum
Nix
6
star
41

token

(OLD REPO) Command-line utility for ERC20 tokens
6
star
42

ACS

Applied Computer Science Working Group
6
star
43

ds-pain

Shell
5
star
44

erc20-golf

GCC Machine Description
5
star
45

chronobank-contracts

audit branch of chronobank contracts
JavaScript
5
star
46

ds-items

Ownable, transferrable, non-fungible unsigned integers
Makefile
4
star
47

dapphub.com

HTML
4
star
48

dapphub-registry

JavaScript
4
star
49

ds-forkable

Forkable Datastore Service
4
star
50

ds-cache

DSValue with expiry
Solidity
3
star
51

dapple-script

DappleScript - A simple ethereum interaction language.
JavaScript
3
star
52

ds-thing

Your things should be DSThings
Solidity
3
star
53

dapp-wizard

Racket
3
star
54

remappings-test

dummy project for testing dapp remappings
Solidity
2
star
55

kyo

know-your-origin, don't use this terrible anti-pattern you fool
2
star
56

k

k-fork
Java
2
star
57

ethsign

(OLD REPO) Simple Ethereum transaction signer using Geth as a library
2
star
58

ds-spell

An object that does one thing once.
Makefile
2
star
59

dappsys-graphics

dappsys visualizations
JavaScript
2
star
60

ethkey

Create Ethereum accounts using Geth as a library
Go
2
star
61

ds-store

Dappsys data management components
Makefile
2
star
62

qrtx

JavaScript
2
star
63

dapple-quicktest

Blazingly fast EVM test runner
JavaScript
2
star
64

cage

Nix
2
star
65

maker-docs

Reference documentation for Maker and the Dai Credit System
HTML
2
star
66

libethjet-haskell

2
star
67

tr-base

dummy repo for testing some dapp-remappings stuff
Solidity
1
star
68

lockpack

1
star
69

LLPoster

TeX
1
star
70

dapp.org-old

HTML
1
star
71

guts

1
star
72

ds-delay

Makefile
1
star
73

dapp.tools

Unused - obsolete github pages site for dapp.tools.
HTML
1
star
74

fv-tutorial-solutions

GCC Machine Description
1
star
75

celf-evm

EVM written in celf
JavaScript
1
star
76

llmotivation

Motivational Paper on Linear Logic as a blockchain programming language
TeX
1
star
77

ds-read

Makefile
1
star
78

dapp.org

1
star
79

dapp.coop

HTML
1
star
80

exp-squaring-percise-dapp

Makefile
1
star
81

mod-blockchain

JavaScript
1
star
82

wiki.dapp.coop

JavaScript
1
star
83

klab-explorer.github.io

klab explorer webpage
1
star
84

ds-rpow

Makefile
1
star
85

k-gas-analyser

Haskell
1
star
86

chronobank-review

review of chronobank contracts
HTML
1
star
87

ds-base

building up a reasonable base class
Makefile
1
star
88

ds-stop

DSAuth-protected stop and start
Solidity
1
star
89

dappsys-docs

Python
1
star
90

klab-multipleCalls

proving that one contract can call another one, wow
GCC Machine Description
1
star
91

tr0

dummy repo for testing dapp-remappings
Solidity
1
star
92

k-ds-rpow

SMT
1
star
93

manny

Manny O'Malley, Malicious Oracle
1
star
94

bat-rewrite

Makefile
1
star
95

hubot-channel-welcome

JavaScript
1
star
96

dappsys-nix

Shell
1
star
97

dapple-wevm

Wallet side ethereum virtual machine
JavaScript
1
star
98

dpath

dpath syntax and semantics
1
star
99

dai-semantics

K specification of the dai stablecoin system
Lua
1
star
100

dapple-pkg

Dapple packages module
JavaScript
1
star