3 Using the Digital Assets Hardhat Command-Line Interface
You can use the command-line interface (CLI) to install, compile, deploy, and run smart contracts.
The digital assets Hardhat CLI is available as part of any digital assets project generated by using Blockchain App Builder with Oracle Blockchain Platform Enterprise Edition for Besu. The CLI is also included in the supplied reference projects for wholesale CBDC, stablecoins, loyalty tokens, tokenized deposits, bond marketplaces and art loyalty tokens. You can use the command-line interface with digital assets projects to compile, deploy, upgrade, and upload contracts to the registry. You can also generate wrapper API specifications and Postman collections. You can run and test digital assets projects on a local Besu network, an in-memory evm node for development testing, or a provisioned Oracle Blockchain Platform Besu network.
Table 3-1 Workflow When Using the Visual Studio Code Extension
| Task | Description | More Information |
|---|---|---|
| Install and configure | Download a packaged sample smart contract from your Oracle Blockchain Platform console and install it and any prerequisite software. | Install the Digital Assets Hardhat Command-Line Interface |
| Compile the smart contract | Compile the digital assets contract so that the bytecode and application binary interface (ABI) are available for deployment. | Compile a Contract with the CLI |
| Deploy the smart contract | Deploy the digital assets project locally to the included preconfigured Besu network, local evm node, or remotely to Oracle Blockchain Platform Enterprise Edition for Besu.
|
Deploy a Contract with the Command Line |
| Upgrade the smart contract | Upgrade the contract to a new version and test it in any of the deployment environments. | Upgrade a Contract |
| Upload the contract manifest to the registry | Upload the generated Besu contract manifest to the Oracle Blockchain Platform registry service to capture the ABI, bytecode, and storage layout. | Upload a Contract Manifest to the Registry with the Command Line |
| Generate a wrapper API specification and Postman collection | Generate the wrapper API specification and Postman collection, which contain API endpoints for each contract method. You can also generate a Postman collection for the RPC proxy calls. | Generate a Wrapper API Specification and Postman Collection with the Command Line |
| Generate an RPC proxy API Postman collection | Generate the Postman collection for RPC proxy calls | Generate an RPC Proxy Postman Collection with the Command Line |