Building with SettleMint/SettleMint CLI/Commands/Smart contract set
Hardhat
Usage: settlemint smart-contract-set hardhat|h [options] [command]
Hardhat commands for building, testing and deploying smart contracts
Options:
-h, --help display help for command
Commands:
build [options] Build the smart contracts using Hardhat
deploy Deploy the smart contracts using Hardhat
network [options] Start a development network using Hardhat
script Run a script using Hardhat
test [options] Test the smart contracts using Hardhat
help [command] display help for command
Build
Usage: settlemint smart-contract-set hardhat build
Examples:
# Build the smart contracts using Hardhat
$ settlemint scs hardhat build
# Get list of possible Hardhat compile options
$ settlemint scs hardhat build --help
# Build the smart contracts using additional options to the Hardhat compile command
$ settlemint scs hardhat build --concurrency 2
Build the smart contracts using Hardhat
Options:
-h, --help Get list of possible hardhat compile options
Deploy
Usage: settlemint smart-contract-set hardhat deploy [options] [command]
Deploy the smart contracts using Hardhat
Options:
-h, --help display help for command
Commands:
local [options] Deploy the smart contracts using Hardhat/ignition to the
local development network
remote [options] Deploy the smart contracts using Hardhat/ignition to the
remote network on the platform
help [command] display help for command
Local
Usage: settlemint smart-contract-set hardhat deploy local
Examples:
# Deploy smart contracts to local network using Hardhat/Ignition
$ settlemint scs hardhat deploy local
# Deploy a specific Ignition module
$ settlemint scs hardhat deploy local --module ignition/modules/custom.ts
# Deploy with a clean deployment state
$ settlemint scs hardhat deploy local --reset
# Deploy and verify contracts on Etherscan
$ settlemint scs hardhat deploy local --verify
Deploy the smart contracts using Hardhat/ignition to the local development
network
Options:
-m, --module <ignitionmodule> The module to deploy with Ignition, defaults
to "ignition/modules/main.ts"
--deployment-id <deploymentId> Set the id of the deployment
-r, --reset Wipes the existing deployment state before
deploying
-v, --verify Verify the deployment on Etherscan
-h, --help display help for command
Remote
Usage: settlemint smart-contract-set hardhat deploy remote
Examples:
# Deploy smart contracts to remote network using Hardhat/Ignition
$ settlemint scs hardhat deploy remote
# Deploy a specific Ignition module to remote network
$ settlemint scs hardhat deploy remote --module ignition/modules/custom.ts
# Deploy with a clean deployment state to remote network
$ settlemint scs hardhat deploy remote --reset
# Deploy and verify contracts on remote network
$ settlemint scs hardhat deploy remote --verify
# Deploy to remote network with specific blockchain node
$ settlemint scs hardhat deploy remote --blockchain-node my-node
# Deploy to production environment
$ settlemint scs hardhat deploy remote --prod
Deploy the smart contracts using Hardhat/ignition to the remote network on the
platform
Options:
-m, --module <ignitionmodule> The module to deploy with Ignition,
defaults to "ignition/modules/main.ts"
--deployment-id <deploymentId> Set the id of the deployment
-r, --reset Wipes the existing deployment state
before deploying
-v, --verify Verify the deployment on Etherscan
--default-sender <defaultSender> Set the default sender for the deployment
--parameters <parameters> A relative path to a JSON file to use for
the module parameters
--strategy <strategy> Set the deployment strategy to use
(default: "basic")
--blockchain-node <blockchainNode> Blockchain Node unique name (optional,
defaults to the blockchain node in the
environment)
--prod Connect to your production environment
-a, --accept-defaults Accept the default and previously set
values
-h, --help display help for command
Network
Usage: settlemint smart-contract-set hardhat network
Examples:
# Start a development network using Hardhat
$ settlemint scs hardhat network
# Get list of possible Hardhat node options
$ settlemint scs hardhat network --help
# Start a development network using Hardhat with a specific port
$ settlemint scs hardhat network --port 3000
Start a development network using Hardhat
Options:
-h, --help Get list of possible hardhat node options
Script
Usage: settlemint smart-contract-set hardhat script [options] [command]
Run a script using Hardhat
Options:
-h, --help display help for command
Commands:
remote [options] Run a Hardhat script on a remote network on the platform.
local [options] Run a Hardhat script on a local development network.
help [command] display help for command
Remote
Usage: settlemint smart-contract-set hardhat script remote
Examples:
# Run a Hardhat script on a remote network
$ settlemint settlemint hardhat script remote --script scripts/deploy.ts
# Run a Hardhat script on a remote network with a specific blockchain node
$ settlemint settlemint hardhat script remote --script scripts/deploy.ts --blockchain-node my-blockchain-node
# Run a Hardhat script on a remote network without compiling
$ settlemint settlemint hardhat script remote --script scripts/deploy.ts --no-compile
Run a Hardhat script on a remote network on the platform.
Options:
-s, --script <script> The script to run with Hardhat , e.g.
"scripts/deploy.ts"
--blockchain-node <blockchainNode> Blockchain Node unique name (optional,
defaults to the blockchain node in the
environment)
--prod Connect to your production environment
-a, --accept-defaults Accept the default and previously set
values
--no-compile Don't compile before running this task
-h, --help display help for command
Local
Usage: settlemint smart-contract-set hardhat script local
Examples:
# Run a Hardhat script on a local network
$ settlemint settlemint hardhat script local --script scripts/deploy.ts
Run a Hardhat script on a local development network.
Options:
-s, --script <script> The script to run with Hardhat , e.g.
"scripts/deploy.ts"
--no-compile Don't compile before running this task
-h, --help display help for command
Test
Usage: settlemint smart-contract-set hardhat test
Examples:
# Run tests using Hardhat
$ settlemint scs hardhat test
# Get list of possible Hardhat test options
$ settlemint scs hardhat test --help
# Run tests and stop on the first test that fails
$ settlemint scs hardhat test --bail
# Run a specific test file
$ settlemint scs hardhat test test/token.test.ts
Test the smart contracts using Hardhat
Options:
-h, --help Get list of possible hardhat test options