Skip to content
CLI tool for Smart Contract error tracking, monitoring and alerting.
Go Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
commands Fixed an issue where the log level wasn't correctly parsed. Jan 10, 2020
config Added option to push to shared projects. Nov 12, 2019
demo Updated demo project package dependencies Sep 10, 2019
ethereum Adds missing fields in getTransactionReceipt rpc response. May 9, 2019
jsonrpc2 Removed unused vendor. Jul 12, 2019
model Added option to push to shared projects. Nov 12, 2019
rest Added option to push to shared projects. Nov 12, 2019
scripts Switched echo statements with printf. Sep 24, 2019
stacktrace Removed unused code. Jul 4, 2019
truffle Fixed circular reference json serialization error. Nov 13, 2019
userError User friendly errors for the proxy command. Dec 3, 2018
.gitignore
.goreleaser.yml
LICENSE
README.md Updated readme for the proxy debugging migration requirement Dec 12, 2019
go.mod Added truffle config debug statements and updated go version. Sep 6, 2019
go.sum Added truffle config debug statements and updated go version. Sep 6, 2019
main.go Added parsing of truffle configs that have console.log statements. Sep 2, 2019

README.md

Tenderly CLI

GitHub tag (latest SemVer)

Tenderly CLI is a suite of development tools that allows you to debug, monitor and track the execution of your smart contracts.

Table of Contents

Installation

macOS

You can install the Tenderly CLI via the Homebrew package manager:

brew tap tenderly/tenderly
brew install tenderly

Or if your prefer you can also install by using cURL and running our installation script:

curl https://raw.githubusercontent.com/Tenderly/tenderly-cli/master/scripts/install-macos.sh | sh

Linux

You can install the Tenderly CLI by using cURL and running our installation script:

curl https://raw.githubusercontent.com/Tenderly/tenderly-cli/master/scripts/install-linux.sh | sh

Windows

Go to the release page, download the latest version and put it somewhere in your $PATH.

Updating

You can check the current version of the CLI by running:

tenderly version

To upgrade it via Homebrew:

brew upgrade tenderly

Usage

Login

The login command is used to authenticate the Tenderly CLI with your Tenderly Dashboard.

tenderly login

Command Flags

Flag Default Description
--authentication-method / Pick the authentication method. Possible values are email or token
--email / The email used when authentication method is email
--password / The password used when authentication method is email
--token / The token used when authentication method is token
--force false Don't check if you are already logged in
--help / Help for login command

Init

The init command is used to connect your local project directory with a project in the Tenderly Dashboard.

tenderly init

Command Flags

Flag Default Description
--project / The project name used for generating the configuration file
--create-project false Creates the project provided by the --project flag if it doesn't exist
--re-init false Force initializes the project if it was already initialized
--help / Help for init command

Push

The push command is used to add your contracts to the Tenderly Dashboard.

tenderly push

Command Flags

Flag Default Description
--networks / A comma separated list of network ids to push
--tag / Optional tag used for filtering and referencing pushed contracts
--help / Help for push command

Advanced usage

It is possible to push to multiple projects by editing the tenderly.yaml file and providing a map of projects and their networks. To do this remove the already provided project_slug property and replace it with the projects property like the example below;

projects: # running tenderly push will push the smart contracts to all of the provided projects
  my-cool-project:
    networks:
    - "1" # mainnet
    - "42" # kovan
  my-other-project:
    # if the networks property is not provided or is empty the project will be pushed to all of the migrated networks
  company-account/my-other-project:
    # if you want to push to a shared project provide the full project identifier
    # the identifier can be found in you Tenderly dashboard under the projects name

Verify

The verify command uploads your smart contracts and verifies them on Tenderly.

tenderly verify

Command Flags

Flag Default Description
--networks / A comma separated list of network ids to verify
--help / Help for verify command

Proxy Debugging

The proxy server is currently made to work with the Truffle framework and requires the proxy to be run from the root of your Smart Contract project where the Truffle configuration is located.

// Example using Ganache defaults
tenderly proxy --target-port 7545

In your Truffle configuration, configure your local network config to point to the running proxy or create a new network for proxy debugging.

module.exports = {
    networks: {
        //...
        proxy: {
            host: "127.0.0.1",
            port: 9545,
            network_id: "*",
            gasPrice: 0
        },
        ganache: {
            host: "127.0.0.1",
            port: 7545,
            network_id: "*",
            gasPrice: 0
        },
        //...
    }
};

After setting up the network you can now call your Truffle commands just as before by changing the --network to the appropriate one.

$user > truffle exec ./scripts/test-scripts.js --network proxy
Using network 'proxy'.


Error: 0x0 Error: REVERT, execution stopped
	at require(square == original)
		in FailContract:5

...

Now when your transactions fail you can see the exact line of code in which the error occurred and the whole stacktrace by using our proxy command.

Note

You must run truffle migrate --network proxy first, so the contract information (address to source mapping) can be picked up by the proxy command from the build folder.

Command Flags

Flag Default Description
--path "./" Path to the project build folder where your Truffle configuration is located
--proxy-host "127.0.0.1" Host on which the proxy will be listening
--proxy-port "9545" Port on which the proxy will be listening
--target-host "127.0.0.1" Target host of your Blockchain RPC
--target-port "8545" Target port of your Blockchain RPC
--target-schema "http" Blockchain RPC protocol
--write-config / Write proxy settings to the project configuration file
--help / Help for proxy command

Check for updates

The update-check command checks if there is a new version of the Tenderly CLI and gives update instructions and changelog information.

Version

The version command prints out the current version of the Tenderly CLI.

tenderly version

Who am I?

The whomai command prints out basic information about the currently logged in account

tenderly whoami

Logout

The logout command disconnects your local Tenderly CLI from your Tenderly Dashboard

tenderly logout

Global Flags

In addition to command specific flags, the following flags can be passed to any command

Flag Default Description
--debug false Turn on debug level logging
--global-config config Global configuration file name (without the extension)
--project-config tenderly Project configuration file name (without the extension)
--project-dir "./" The directory in which your Truffle project resides

Report Bugs / Feedback

We look forward to any feedback you want to share with us or if you're stuck with a problem you can contact us at support@tenderly.app.

You can also join our Discord server or create an Issue in the Github repository.


Made with ♥ by Tenderly

You can’t perform that action at this time.