This project is used as a guide to show how to setup HardHat to interact with LSPs smart contracts on LUKSO networks.
This Hardhat repository uses the bun package manager. Make sure to install it first.
Install the dependencies
bun install
Set the private environment variables
cp .env.example .env
INFO Make sure to add the private key of an EOA for deployment. Optionally, you can provide a private key of a controller and a Universal Profile address to deploy contracts using your smart contract account.
Compile all smart contracts within /contracts
:
npx hardhat compile
INFO Add the
--verbose
and--show-stack-traces
flags for further information.
Deploy a sample LSP7 contract with an Externally Owned Account:
npx hardhat --network luksoTestnet run scripts/deployEOA.ts
Deploy a sample LSP7 contract with a Universal Profile:
npx hardhat --network luksoTestnet run scripts/deployUP.ts
INFO Adjust the network and token name within the command and script.
Verify your contracts with the blockscout API and their constructor parameters:
npx hardhat verify <myContractAddress> --constructor-args ./verify/myCustomToken.ts --network luksoTestnet
hardhat
: Smart contract development environment@nomiclabs/hardhat-toolbox
: Test, deploy, and verify contracts@lukso/lsp-smart-contracts
: LUKSO smart contract collectiondotenv
: Manage private deployer informationprettier
: Code Formatting