Smart Contracts
Development
The most popular Browser-Based IDE for Solidity development is Remix. It is easy to install and use, and it also offers a feature to connect your MetaMask wallet to a contract in the development phase and test it in a real-life-like environment.
Most local IDEs have Solidity plugins or extensions with syntax highlighting. For example, many Solidity developers use Visual Studio Code with additional Solidity plugins.
Truffle and Ganache provide a more comprehensive environment with automated testing, private virtual EVM network deployment, and dummy accounts to interact with.
Hardhat is another popular environment for developing, testing, and deploying smart contracts written in Solidity for EVM chains.
Testing
Ganache is a tool to spin up a private EVM blockchain to test smart contract behavior in a simulated environment.
Solhint is a tool for spotting common mistakes and security flaws and suggesting best practices and style.
Deployment
Smart contracts must be deployed on the blockchain to become accessible.
We recommend using Hardhat as it is one of the most used tools, and there are plenty of tutorials on using it. First, configure Hardhat to use the LightLink Pegasus network. To do this, install Hardhat, create the project, find the hardhat.config.ts file, and change the network parameters:
To deploy the contract, put the network argument in the final command:
Please read the official documentation for more examples of installing and using Hardhat.
Verification
The contracts can be manually verified using Blockscout Explorer (Mainnet, Testnet). Verification ensures that the deployed bytecode matches the human-readable Solidity code, confirming that the developers are not attempting to deceive users.
Additionally, developers can verify the code using IDE plugins. An example is the Hardhat Verifier plugin, which can be used with the following code:
Last updated