Skip to content

Commit

Permalink
apply code review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
fhildeb committed Feb 7, 2024
1 parent 58a397e commit da7ad5e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 23 deletions.
20 changes: 3 additions & 17 deletions smart-contracts-hardhat/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down
Binary file modified smart-contracts-hardhat/bun.lockb
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion smart-contracts-hardhat/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
3 changes: 1 addition & 2 deletions smart-contracts-hardhat/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit da7ad5e

Please sign in to comment.