Skip to content

Latest commit

 

History

History

smart-contracts-hardhat

LSP HardHat Integration

This project is used as a guide to show how to setup HardHat to interact with LSPs smart contracts on LUKSO networks.

Guides

Setup

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.

Development

Compile Contracts

Compile all smart contracts within /contracts:

npx hardhat compile

INFO Add the --verbose and --show-stack-traces flags for further information.

Deploy Contracts

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 Contracts

Verify your contracts with the blockscout API and their constructor parameters:

npx hardhat verify <myContractAddress> --constructor-args ./verify/myCustomToken.ts --network luksoTestnet

Packages