diff --git a/smart-contracts-hardhat/README.md b/smart-contracts-hardhat/README.md index 3cae824..ab1527b 100644 --- a/smart-contracts-hardhat/README.md +++ b/smart-contracts-hardhat/README.md @@ -1,14 +1,6 @@ -# Basic Sample Hardhat Project +# LSP HardHat Integration -This project is used as a guide to show how to setup HardHat to work with the **[LUKSO networks](https://docs.lukso.tech/networks/mainnet/parameters)** and **[LSPs](https://docs.lukso.tech/contracts/introduction)**. - -[HardHat](https://hardhat.org/docs) is a development environment to: - -- **create** and **edit** -- **compile** and **debug** -- **deploy** and **verify** - -smart contracts on EVM based blockchains. +This project is used as a guide to show how to setup HardHat to interact with **[LSPs](https://docs.lukso.tech/contracts/introduction)** smart contracts on **[LUKSO networks](https://docs.lukso.tech/networks/mainnet/parameters)**. ## Guides @@ -35,13 +27,7 @@ cp .env.example .env ### Compile Contracts -Enforce the compilation of contracts and display the stack traces: - -```bash -npm run build -``` - -Regular compilation of your smart contracts: +Compile all smart contracts within `/contracts`: ```bash npx hardhat compile diff --git a/smart-contracts-hardhat/bun.lockb b/smart-contracts-hardhat/bun.lockb index bb2d8f5..7214fab 100755 Binary files a/smart-contracts-hardhat/bun.lockb and b/smart-contracts-hardhat/bun.lockb differ diff --git a/smart-contracts-hardhat/contracts/NFT-Dynamics/DynamicNFTMetadataContract.sol b/smart-contracts-hardhat/contracts/NFT-Dynamics/DynamicNFTMetadataContract.sol index c9bf096..68bb1be 100644 --- a/smart-contracts-hardhat/contracts/NFT-Dynamics/DynamicNFTMetadataContract.sol +++ b/smart-contracts-hardhat/contracts/NFT-Dynamics/DynamicNFTMetadataContract.sol @@ -3,11 +3,11 @@ pragma solidity ^0.8.4; // modules import {ERC725Y} from "@erc725/smart-contracts/contracts/ERC725Y.sol"; +import { + _LSP8_REFERENCE_CONTRACT_KEY +} from "@lukso/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8Constants.sol"; contract DynamicNFT is ERC725Y { - bytes32 constant _LSP8_REFERENCE_CONTRACT = - 0x708e7b881795f2e6b6c2752108c177ec89248458de3bf69d0d43480b3e5034e6; - constructor(address nftOwner, address nftCollection) ERC725Y(nftOwner) { /** * @dev set the reference to the NFT collection that this metadata contract belongs to diff --git a/smart-contracts-hardhat/hardhat.config.ts b/smart-contracts-hardhat/hardhat.config.ts index a267590..1fa63d1 100644 --- a/smart-contracts-hardhat/hardhat.config.ts +++ b/smart-contracts-hardhat/hardhat.config.ts @@ -5,8 +5,8 @@ import '@nomicfoundation/hardhat-toolbox'; LoadEnv(); const config: HardhatUserConfig = { - // Default compiler version for all contracts solidity: { + // Default compiler version for all contracts version: '0.8.19', settings: { optimizer: { diff --git a/smart-contracts-hardhat/package.json b/smart-contracts-hardhat/package.json index 2f677d5..1707687 100644 --- a/smart-contracts-hardhat/package.json +++ b/smart-contracts-hardhat/package.json @@ -1,11 +1,10 @@ { "name": "hardhat-project", "scripts": { - "build": "hardhat compile --force --show-stack-traces" + "build": "hardhat compile --show-stack-traces" }, "devDependencies": { "@nomicfoundation/hardhat-toolbox": "^3.0.0", - "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@^0.4.1", "dotenv": "^16.3.1", "ethers": "^6.10.0", "hardhat": "^2.19.5",