truffle
truffle copied to clipboard
Add --url option to the `truffle exec` command
PR description
This PR adds --url
option to the truffle exec
command that connects to a specified url. See #5701.
Testing instructions
To test this option, you can clone this Test Project with a simple storage contract and a test script.
- Run a ganache instance in a terminal.
- Run
truffle compile
inside a truffle project in a separate terminal. - Run
truffle exec test-script.js --url http://127.0.0.1:8545
. It should execute the script and deploys a new instance of the contract and returns the value of the state variable that is set with a constructor.

Documentation
- [x] I thought about documentation and added the
doc-change-required
label to this PR if documentation updates are required.