tenderly-wizard-v6
v6.0.10
Published
A tool for managing virtual testnets using Tenderly
Maintainers
Readme
tenderly-wizard-v6 (Roles v2 / Ethers v6)
Overview
The tenderly-wizard-v6 is a CLI tool that streamlines the management of Tenderly virtual testnets. Key features include:
• Deploy Safe addresses that remain consistent across chains • Deploy and configure role management contracts • Execute whitelisting • Create, fork, manage and preserve virtual testnet states through snapshots
tenderly-wizard-v6: Local Development and Testing
This guide covers how to develop, pack, and test the tenderly-wizard-v6 package locally.
Prerequisites
- Node.js (version 14 or later)
- npm (usually comes with Node.js)
- NPM_TOKEN with read access to the
@thirdguardnpm organization - .env file in the root of the project by using the
@thirdguard/configpackage.
Local Installation and Testing
Add the NPM_TOKEN to your shell environment variables by running:
export NPM_TOKEN=<your-npm-token>or
# using NPM_TOKEN as an input argument source ./set-npm-token.sh <your-npm-token>Install the package globally:
./build-and-install.shRun the CLI:
tenderly-wizard-v6To uninstall:
npm uninstall -g tenderly-wizard-v6
Basic Usage
- Once The Tenderly Wizard is installed globally, in terminal navigate to directory of the repo you would like to use for testing.
NOTE FOR WHITELISTING:
- The access-control-safes-v2 folder needs to be in the same folder structure as the directory you would like to use this in:
- folder --- access-control-safes-v2 --- repo-you-want-to-run-this-wizard-in- The reason for this is that the tenderly-wizard-v6 will use that repo to access the whitelisting scripts
- To start the tenderly wizard run:
tenderly-wizard-v6The wizard will display a list of options, to get started select any of the 2 options:
+CREATE TESTNET & SETUP+- Creates a new testnet, sets up Safes and Roles contracts and executes whitelisting+CREATE TESTNET+- Creates a new testnet
Select an existing testnet to manage or activate it. Activating a testnet will update the .env file with the testnet's RPC URL, chain ID, Testnet UUID and current snapshot ID.
Development
Follow the steps in the Local Installation and Testing section to set up the environment.
Ensure you have the
IS_DEVenvironment variable set totruein the .env file.Make your changes to the source code in the
srcdirectory.Run
yarn startto start the wizard.
Publishing to npm
To publish a new version of the package to npm:
Ensure your git working directory is clean (no uncommitted changes).
Make the publish script executable (first time only):
chmod +x publish.shRun the publish script:
./publish.shThe script will:
- Verify your working directory is clean
- Display current package version and ethers dependency version
- Prompt you to select version bump type (patch or minor)
- Build the project
- Update the version in package.json
- Create a git commit and tag
- Publish to npm with the appropriate tag (v5-latest or v6-latest)
Important notes:
- The script enforces version alignment with ethers.js:
- For ethers v5.x.x, package version must start with "5."
- For ethers v6.x.x, package version must start with "6."
- The npm tag is automatically set based on the ethers version:
- v5.x.x uses "v5-latest"
- v6.x.x uses "v6-latest"
- To install globally after publishing:
- For Roles V1 (ethers v5):
npm i -g tenderly-wizard - For Roles V2 (ethers v6):
npm i -g tenderly-wizard-v6
- For Roles V1 (ethers v5):
- The script enforces version alignment with ethers.js:
Troubleshooting
If you encounter issues, try clearing npm's cache:
npm cache clean --forceFor verbose logging, run:
NODE_DEBUG=module tenderly-wizard-v6
Gotchas
- Creating or Forking a new testnet will activate it by default.
- The
Apply Whitelistoption will only work if the Safe and Role contracts have been deployed and configured. - The
Deploy Safesoption fails when run in isolation onBasetestnets with a an unknown call2 error, use the+CREATE TESTNET & SETUP+option instead.
Notes
- Always test thoroughly before publishing to npm.
- Remember to gitignore the
.tgzfiles created bynpm pack.
