Development Tutorial
Last updated
Last updated
Joltify provides a simple hardhat project for Solidity smart contract deployment and interaction on Joltify EVM co-chain.
To access the Joltify local chain and Joltify Testnet chain, configure the corresponding networks in joltevm/hardhat.config.js
as follows:
Alternatively, you can also set up accounts
with seed phrases as follows:
joltevm
directory contains an integrated Hardhat project for smart contract deployment and interaction.
A sample Solidity smart contract located at joltevm/contracts/token/Token.sol
can be easily deployed with:
Under the hood yarn token-deploy
is running cmd npx hardhat run --network testnet scripts/deploy/token.js
to deploy the token on Joltify testnet. You can also use the npx hardhat ...
syntax to interact with the contracts from the CLI.
Basic contract interaction is possible through additional scripts with the full list available in evm/package.json
. Each yarn cmd is aliased to one of the Hardhat tasks found in hardhat.config.js
.
You can get information about any cmd including param options by using the --help
flag, for example:
Using the available scripts, we can transfer tokens:
You can easily deploy your own contracts:
Add your Solidity smart contract to joltevm/contracts
.
Add a deployment script to joltevm/scripts/deploy/[YOUR_SCRIPT].js
.
Add Hardhat tasks corresponding to your contract's public methods to the existing tasks in hardhat.config.js
.
Done! Now you can deploy and interact with your contract:
If you want a cleaner CLI experience, you can add some script aliases to joltevm/package.json
as seen in the scripts
section.
To verify the deployed contract on joltify EVM explorer, you are required to set up etherscan
in hardhat.config.js
file as follows:
Once the configuration is set up, you can run the following command to verify the deployed contract on Joltify EVM explorer:
or