Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CHAIN_TO_FORK=sepolia

COLLECTION=DO
# do | dn - Digital(Original | Native)
COLLECTION=do

FORKED_CHAIN=sepolia
FORKED_CHAIN_URL=http://localhost:8545/
Expand Down
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ artifacts
cache
coverage*
gasReporterOutput.json
package.json
img
.env
.*
Expand Down
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
"singleQuote": false,
"bracketSpacing": false
}
},
{
"files": "*.json",
"options": {
"printWidth": 60
}
}
]
}
107 changes: 62 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,79 @@
![license](https://img.shields.io/badge/license-GPLv3-blue)
![hardhat](https://img.shields.io/badge/built%20with-Hardhat-blueviolet)
![solidity](https://img.shields.io/badge/solidity-0.8.20-363636)

# Digital Original Smart Contracts

The repository contains two core smart contracts: [`ArtToken`](https://github.com/digital-original/contracts/blob/master/contracts/art-token/ArtToken.sol) and [`AuctionHouse`](https://github.com/digital-original/contracts/blob/master/contracts/auction-house/AuctionHouse.sol). Development takes place in the [Hardhat](https://hardhat.org/) environment, utilizing [OpenZeppelin](https://www.openzeppelin.com/) as the main smart contract library.

## Project Description

### ArtToken
Upgradable contract. The contract provides functionality to track, transfer and sell Digital Original NFTs.
The `ArtToken` is an upgradable contract that provides functionality to track, transfer, and sell Digital Original NFTs. It ensures secure and efficient management of digital assets.

### AuctionHouse
Upgradable contract. The contract provides functionality to sell Digital Original NFTs according to auction rules.
The `AuctionHouse` is an upgradable contract that facilitates the sale of Digital Original NFTs according to auction rules.

## Get Started
1. Install dependencies
```
$ npm install
```
2. Fill out `config.env.yaml`
3. Compile contracts
```
$ npm run compile
```
## Setup Instructions

## Run test
```
$ npm run test
```
1. **Install Dependencies**
```bash
npm install
```

## Run local fork
```
$ npm run fork
```
2. **Configure Environment**
Fill out the `config.env.yaml` file with the necessary configuration details.

## Run scripts
```
$ npx hardhat run <path-to-script> --network fork
```
3. **Compile Contracts**
```bash
npm run compile
```

## Deploy protocol
```
$ npx hardhat deploy-protocol --network fork
```
## Usage

## Run slither
1. Create Python virtual environment
```
$ python3 -m venv venv
```
2. Run Python virtual environment
```
$ source ./venv/bin/activate
```
3. Instal Python packages
```
$ pip install -r requirements.txt
### Run Tests
Execute the test suite to ensure all contracts function as expected.
```bash
npm run test
```
4. Run Slither
```
$ npm run slither

### Run Local Fork
Set up a local fork of the blockchain for testing and development.
```bash
npm run fork
```

## Generate Documentation
### Run Scripts
Execute scripts using Hardhat.
```bash
npx hardhat run <path-to-script> --network fork
```
$ forge doc -b

### Deploy Protocol
Deploy the smart contracts to the specified network.
```bash
npx hardhat deploy-protocol --network fork
```

### Run Slither
Perform static analysis using Slither.
1. Create a Python virtual environment:
```bash
python3 -m venv venv
```
2. Activate the virtual environment:
```bash
source ./venv/bin/activate
```
3. Install Python packages:
```bash
pip install -r requirements.txt
```
4. Run Slither:
```bash
npm run slither
```

## License

This project is licensed under the GNU General Public License v3.0. See the [LICENSE](./LICENSE) file for details.
Loading