ResContract
ResContract CLI is a command-line tool for creating, deploying, and managing smart contracts within the ResilientDB ecosystem. It provides a streamlined interface for developers and students to interact with smart contracts efficiently.
Interactive Tools
Under Development!
Features
- Create Smart Contracts: Generate new smart contract templates
- Compile Contracts: Compile Solidity contracts to JSON
- Deploy Smart Contracts: Deploy contracts to the blockchain
- Execute Functions: Interact with and manage deployed contracts
Prerequisites
Before installing and using the ResContract CLI, ensure you have the following prerequisites installed on your system:
- Node.js (version >= 14): Download and install Node.js
- npm: Comes with Node.js. Ensure it’s up-to-date.
- Solidity Compiler (
solc
): Required to compile smart contracts.
Installing solc
sudo add-apt-repository ppa:ethereum/ethereum sudo apt-get update sudo apt-get install -y solc
Installation
Install the ResContract CLI globally using npm:
npm install -g rescontract-cli
Configuration
Set the ResDB_Home environment variable to point to the directory where ResilientDB is installed.
export ResDB_Home=/path/to/resilientdb
Add the above line to your .bashrc
or .zshrc
file to make it persistent.
Usage
After installation, you can use the rescontract
command in your terminal.
rescontract <command> [options]
The create
command initializes a new account using ResilientDB’s smart contract tools.
rescontract create --config <path_to_config>
Parameters:
--config, -c
: Path to the configuration file.
Example:
rescontract create --config ~/resilientdb/config/service.config
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Questions or Feedback about ResContract?