Setting Up The Venom Smart Contract Development Environment
The first thing to do before starting the smart contracts development
To improve your development experience, you may need some tools and utils to compile, deploy and test your Venom contracts. Locklift is a development environment like Hardhat or Truffle.
Let's install it
npm install -g locklift
locklift --version
> 2.1.10Initialize your first project
locklift init --path sample-project
> New Locklift project initialized in sample-project
> Installing required dependencies...
> ...
> LockLift initialized in setup-env happy hacking!This command initializes a new Locklift project, filled with samples:
├── locklift.config.js
├── tsconfig.json
├── package.json
├── package-lock.json
│
├── contracts
│ └── Sample.sol
├── scripts
│ └── 1-deploy-sample.js
└── giverSettings
│ └── index.ts
└── test
└── sample-test.jsConfiguration
The configuration file is called locklift.config.js. Here's the basic layout for Venom blockchain networks:
Let's go through each parameter
compiler.version The version of the solidity compiler binary
linker.version The version of the TVM-linker binary
networks Specifies which networks are available for deployment and testing
networks.[NETWORK_NAME].keys.phrase If you leave this field value empty - a new random seed will be generated each time you're running locklift. Or specify it explicitly - fill the phrase field with a mnemonic phrase.
Run The Local Node
If Locklift is like a Hardhat development environment tool, then local-node is Ganache-like a local blockchain that is designed for dapp debugging and testing.
To run local-node you need to follow a command
The container exposes the specified 80 port with Nginx which proxies requests to /graphql to GraphQL API.
Check out GraphQL playground at http://localhost/graphql
That's all! You can run tests and start to develop your amazing projects
The next step in your learning is here
Last updated