diff --git a/README.md b/README.md index 2c65cbd..af5f001 100644 --- a/README.md +++ b/README.md @@ -1,79 +1,151 @@ -![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) +![openzeppelin](https://img.shields.io/badge/built%20with-OpenZeppelin-brightgreen) +![hardhat](https://img.shields.io/badge/built%20with-Hardhat-blueviolet) +![tests](https://github.com/digital-original/contracts/actions/workflows/test.yml/badge.svg) +![license](https://img.shields.io/badge/license-GPLv3-blue) -# Digital Original Smart Contracts +# Digital Original – Smart-Contracts Suite -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. +Digital Original (DO) is a modular on-chain framework for managing primary sales and secondary markets of digital collectibles (NFTs). +This repository hosts all **Solidity smart-contracts, tests and tooling** required to deploy and operate the protocol. -## Project Description +## 📚 Contracts ### ArtToken -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. +The `ArtToken` contract is an upgradeable ERC-721 NFT implementation that serves as the core collectible in the Digital Original ecosystem. Key features: + +- **Primary Sales**: Supports direct minting and purchasing through the `buy()` function with built-in revenue distribution +- **EIP-712 Permits**: All primary sales require cryptographic authorization from designated signers +- **Compliance & Regulation**: Optional transfer restrictions for regulated collections +- **AuctionHouse Integration**: Works seamlessly with the AuctionHouse for auction-based primary sales +- **Revenue Splitting**: Automatic distribution of sale proceeds among multiple participants according to predefined shares ### AuctionHouse -The `AuctionHouse` is an upgradable contract that facilitates the sale of Digital Original NFTs according to auction rules. +The `AuctionHouse` contract manages English-style auctions for primary NFT sales. Key features: -## Setup Instructions +- **Auction Creation**: Authorized creation of time-bound auctions with EIP-712 signatures +- **Bidding System**: Progressive bidding with minimum raise steps and automatic refunds to outbid participants +- **USDC Integration**: All bids and settlements are conducted in USDC for stable pricing -1. **Install Dependencies** - ```bash - npm install - ``` +### Market +The `Market` contract facilitates peer-to-peer secondary trading of NFTs through off-chain order matching. Key features: -2. **Configure Environment** - Fill out the `config.env.yaml` file with the necessary configuration details. +- **Order Types**: Supports both sell-side (ask) and buy-side (bid) orders +- **Off-chain Orders**: Gas-efficient trading through EIP-712 signed orders executed on-chain +- **Multi-Currency**: Configurable support for multiple ERC-20 payment currencies +- **Order Management**: Order invalidation capabilities for makers and admins +- **Fee Structure**: Flexible fee system supporting both maker and taker fees +- **Revenue Sharing**: Built-in mechanism for distributing fees among multiple participants +- **Security**: Time-bound orders with replay protection and signature verification -3. **Compile Contracts** - ```bash - npm run compile - ``` +## 🗂 Repository Layout -## Usage +``` +contracts/ Solidity sources +├─ art-token/ ▸ `ArtToken` and base logic +├─ auction-house/ ▸ `AuctionHouse` contracts +├─ market/ ▸ `Market` and order libs +├─ utils/ ▸ Shared libraries & helpers +tests/ Hardhat unit tests (TypeScript) +scripts/ Re-usable deployment scripts +tasks/ Hardhat CLI tasks (`npx hardhat `) +abis/ Pre-generated ABIs +``` + +## ⚡️ Quick Start -### Run Tests -Execute the test suite to ensure all contracts function as expected. ```bash +# 1. install deps +npm install + +# 2. copy environment templates and adjust values +cp config.env.example.yaml config.env.yaml + +# 3. compile +npm run compile + +# 4. run the tests npm run test ``` -### Run Local Fork -Set up a local fork of the blockchain for testing and development. +### Local fork + +Spin up a mainnet-fork (uses `config.env.yaml` for URL): + ```bash npm run fork +# in another terminal you can deploy the collection +npx hardhat deploy-collection --network fork +``` + +## 🔧 Configuration Files + +* `config.env.yaml` – chain URLs, private keys, API keys (never commit real secrets) +* `config.do.yaml` / `config.dn.yaml` – collection parameters +* `config.market.yaml` – market parameters + +Every Hardhat network entry gets enriched with a `protocolConfig` object at runtime, see `hardhat.config.ts`. + +## 🛠 NPM Scripts + +| Script | Description | +| ------ | ----------- | +| `npm run compile` | Clean & compile contracts | +| `npm run test` | Execute TypeScript test-suite | +| `npm run fork` | Start a local Hardhat node (optionally forking) | +| `npm run slither` | Static analysis using [Slither](https://github.com/crytic/slither) | +| `npm run lint` | Lint Solidity with Solhint | +| `npm run format` | Auto-format using Prettier | + +## 🛡️ Slither Static Analysis + +To run Slither for smart contract security analysis, you need to set up a Python virtual environment first: + +```bash +# 1. Create a virtual environment +python3 -m venv venv + +# 2. Activate the virtual environment +source venv/bin/activate + +# 3. Install Python dependencies (including slither-analyzer) +pip install -r requirements.txt + +# 4. Compile contracts +npm run compile + +# 5. Run Slither analysis +npm run slither ``` -### Run Scripts -Execute scripts using Hardhat. +The Slither configuration is defined in `slither.config.json`. After running, you can deactivate the virtual environment with: + ```bash -npx hardhat run --network fork +deactivate ``` -### Deploy Protocol -Deploy the smart contracts to the specified network. +## 🤖 Hardhat Tasks + ```bash -npx hardhat deploy-protocol --network fork +# Deploy collection (ArtToken + AuctionHouse proxies) +npx hardhat deploy-collection --network + +# Deploy individual implementations +npx hardhat deploy-art-token-impl --network +npx hardhat deploy-auction-house-impl --network +npx hardhat deploy-market-impl --network + +# Deploy Market proxy +npx hardhat deploy-market --network + +# Verify on Etherscan +npx hardhat verify-art-token --network +npx hardhat verify-auction-house --network +npx hardhat verify-market --network ``` -### 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. +Run `npx hardhat --help` to list all available tasks. + +## 📜 License + +Licensed under **GPL-3.0** – see [LICENSE](./LICENSE) for details. diff --git a/abis/ArtToken.json b/abis/ArtToken.json index 4ae3004..fc11b0d 100644 --- a/abis/ArtToken.json +++ b/abis/ArtToken.json @@ -123,22 +123,11 @@ "inputs": [ { "internalType": "uint256", - "name": "shareSum", + "name": "sharesSum", "type": "uint256" } ], - "name": "DistributionSharesSumTooBig", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "shareSum", - "type": "uint256" - } - ], - "name": "DistributionSharesSumTooLow", + "name": "DistributionSharesSumInvalid", "type": "error" }, { @@ -354,6 +343,22 @@ "name": "RoleSystemNotMain", "type": "error" }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "requiredRole", + "type": "bytes32" + } + ], + "name": "RoleSystemUnauthorizedAccount", + "type": "error" + }, { "inputs": [], "name": "RoleSystemZeroAddress", diff --git a/abis/AuctionHouse.json b/abis/AuctionHouse.json index 2e3245f..56a0057 100644 --- a/abis/AuctionHouse.json +++ b/abis/AuctionHouse.json @@ -179,22 +179,11 @@ "inputs": [ { "internalType": "uint256", - "name": "shareSum", + "name": "sharesSum", "type": "uint256" } ], - "name": "DistributionSharesSumTooBig", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "shareSum", - "type": "uint256" - } - ], - "name": "DistributionSharesSumTooLow", + "name": "DistributionSharesSumInvalid", "type": "error" }, { @@ -276,6 +265,22 @@ "name": "RoleSystemNotMain", "type": "error" }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "requiredRole", + "type": "bytes32" + } + ], + "name": "RoleSystemUnauthorizedAccount", + "type": "error" + }, { "inputs": [], "name": "RoleSystemZeroAddress", diff --git a/abis/Market.json b/abis/Market.json new file mode 100644 index 0000000..12ba187 --- /dev/null +++ b/abis/Market.json @@ -0,0 +1,845 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "main", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "AddressInsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "AuthorizationDeadlineExpired", + "type": "error" + }, + { + "inputs": [], + "name": "AuthorizationUnauthorizedAction", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "argIndex", + "type": "uint256" + } + ], + "name": "EIP712DomainMisconfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "EIP712SignatureZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "FailedInnerCall", + "type": "error" + }, + { + "inputs": [], + "name": "MarketCurrencyInvalid", + "type": "error" + }, + { + "inputs": [], + "name": "MarketInvalidAskSideFee", + "type": "error" + }, + { + "inputs": [], + "name": "MarketInvalidOrderHash", + "type": "error" + }, + { + "inputs": [], + "name": "MarketInvalidOrderSide", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "argIndex", + "type": "uint256" + } + ], + "name": "MarketMisconfiguration", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "orderHash", + "type": "bytes32" + } + ], + "name": "MarketOrderInvalidated", + "type": "error" + }, + { + "inputs": [], + "name": "MarketOrderOutsideOfTimeRange", + "type": "error" + }, + { + "inputs": [], + "name": "MarketUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "MarketUnauthorizedOrder", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "argIndex", + "type": "uint256" + } + ], + "name": "RoleSystemMisconfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "RoleSystemNotMain", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "requiredRole", + "type": "bytes32" + } + ], + "name": "RoleSystemUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "RoleSystemZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "SafeERC20BulkTransferIncorrectTotalAmount", + "type": "error" + }, + { + "inputs": [], + "name": "SafeERC20BulkTransferInvalidInputLengths", + "type": "error" + }, + { + "inputs": [], + "name": "SafeERC20BulkTransferZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "SafeERC20BulkTransferZeroValue", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "orderHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "collection", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "currency", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "taker", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "price", + "type": "uint256" + } + ], + "name": "AskOrderExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "orderHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "collection", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "currency", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "taker", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "price", + "type": "uint256" + } + ], + "name": "BidOrderExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "currency", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "name": "CurrencyStatusUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "orderHash", + "type": "bytes32" + } + ], + "name": "OrderInvalidated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "UniqueRoleTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_TYPE_HASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAIN", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "currency", + "type": "address" + } + ], + "name": "currencyAllowed", + "outputs": [ + { + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "enum Order.Side", + "name": "side", + "type": "uint8" + }, + { + "internalType": "address", + "name": "collection", + "type": "address" + }, + { + "internalType": "address", + "name": "currency", + "type": "address" + }, + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "price", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makerFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "startTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "endTime", + "type": "uint256" + } + ], + "internalType": "struct Order.Type", + "name": "order", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "orderHash", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taker", + "type": "address" + }, + { + "internalType": "uint256", + "name": "takerFee", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "participants", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "rewards", + "type": "uint256[]" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "internalType": "struct ExecutionPermit.Type", + "name": "permit", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "orderSignature", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "permitSignature", + "type": "bytes" + } + ], + "name": "executeAsk", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "enum Order.Side", + "name": "side", + "type": "uint8" + }, + { + "internalType": "address", + "name": "collection", + "type": "address" + }, + { + "internalType": "address", + "name": "currency", + "type": "address" + }, + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "price", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makerFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "startTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "endTime", + "type": "uint256" + } + ], + "internalType": "struct Order.Type", + "name": "order", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "orderHash", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taker", + "type": "address" + }, + { + "internalType": "uint256", + "name": "takerFee", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "participants", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "rewards", + "type": "uint256[]" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "internalType": "struct ExecutionPermit.Type", + "name": "permit", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "orderSignature", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "permitSignature", + "type": "bytes" + } + ], + "name": "executeBid", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "orderHash", + "type": "bytes32" + } + ], + "name": "invalidateOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "orderHash", + "type": "bytes32" + } + ], + "name": "orderInvalidated", + "outputs": [ + { + "internalType": "bool", + "name": "invalidated", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "uniqueRole", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferUniqueRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "uniqueRole", + "type": "bytes32" + } + ], + "name": "uniqueRoleOwner", + "outputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "currency", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "name": "updateCurrencyStatus", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/config.dn.yaml b/config.dn.yaml index 92f22ae..a10c0f1 100644 --- a/config.dn.yaml +++ b/config.dn.yaml @@ -28,15 +28,15 @@ sepolia: # admin: '0xDdc680Aa4852dA4a43198e7c1FF3d04bA53f8910' ethereum: - minPriceUsd: 0 - minFeeUsd: 0 + minPriceUsd: 30 + minFeeUsd: 30 regulated: false - minAuctionDurationHours: 0 + minAuctionDurationHours: 12 artToken: - proxy: '' - impl: '' - admin: '' + proxy: '0x9ada5D6A6192eAda21b45268Da4948e69059EA69' + impl: '0x1e6b581F60dd8495900701e50B48BF20630331F7' + admin: '0xc092f522AAdB74FAE51fF38696BfdDd0E017ff0c' auctionHouse: - proxy: '' - impl: '' - admin: '' + proxy: '0x534ecf8fBb28a31851B7137B8dB96592F8E6b22C' + impl: '0x15f22f722E8d923a2fC8F3288Dd2A1BB9fE6563D' + admin: '0x8E73Aa836017bAf87eF6d8feC1a075b98D5Da008' diff --git a/config.market.yaml b/config.market.yaml new file mode 100644 index 0000000..e289068 --- /dev/null +++ b/config.market.yaml @@ -0,0 +1,18 @@ +sepolia: + # dev + market: + proxy: '' + impl: '' + admin: '' + + # local + # market: + # proxy: '' + # impl: '' + # admin: '' + +ethereum: + market: + proxy: '' + impl: '' + admin: '' diff --git a/contracts/art-token/ArtToken.sol b/contracts/art-token/ArtToken.sol index 68bbb4e..8311214 100644 --- a/contracts/art-token/ArtToken.sol +++ b/contracts/art-token/ArtToken.sol @@ -15,13 +15,9 @@ import {IArtToken} from "./IArtToken.sol"; /** * @title ArtToken * - * @notice Upgradeable ERC-721 token used by DigitalOriginal - * protocols. Adds primary-sale logic via `buy`, integrates EIP-712 - * permits and enforces optional transfer restrictions for regulated - * collections. - * - * @dev Implements {IArtToken}. Uses mix-ins for EIP-712 domain - * separation, role management and signature authorization. + * @notice Upgradeable ERC-721 token used by DigitalOriginal protocols. Adds primary-sale + * logic via `buy`, integrates EIP-712 permits and enforces optional transfer + * restrictions for regulated collections. */ contract ArtToken is IArtToken, ArtTokenBase, EIP712Domain, RoleSystem, Authorization { using SafeERC20 for IERC20; @@ -29,6 +25,10 @@ contract ArtToken is IArtToken, ArtTokenBase, EIP712Domain, RoleSystem, Authoriz /** * @notice EIP-712 struct type-hash used to validate `BuyPermit` signatures * supplied to {buy}. + * + * @dev The `sender` field, which is part of the signed data, is implicitly set to + * `msg.sender` during the execution of the {buy} function. This ensures that the permit + * can only be used by the intended buyer. */ // prettier-ignore bytes32 public constant BUY_PERMIT_TYPE_HASH = @@ -72,14 +72,14 @@ contract ArtToken is IArtToken, ArtTokenBase, EIP712Domain, RoleSystem, Authoriz /** * @notice Contract constructor. * - * @param proxy Address of the proxy that will ultimately own the - * implementation (used for EIP-712 domain separator). - * @param main Address that will be set as {RoleSystem.MAIN}. + * @param proxy Address of the proxy that will ultimately own the implementation + * (used for EIP-712 domain separator). + * @param main Address that will be set as {RoleSystem.MAIN}. * @param auctionHouse Address of the AuctionHouse contract. - * @param usdc Address of the USDC token contract. - * @param minPrice Absolute minimum `price` accepted by `buy`. - * @param minFee Absolute minimum `fee` accepted by `buy`. - * @param regulated Whether transfer restrictions are enabled. + * @param usdc Address of the USDC token contract. + * @param minPrice Absolute minimum `price` accepted by `buy`. + * @param minFee Absolute minimum `fee` accepted by `buy`. + * @param regulated Whether transfer restrictions are enabled. */ constructor( address proxy, @@ -105,8 +105,8 @@ contract ArtToken is IArtToken, ArtTokenBase, EIP712Domain, RoleSystem, Authoriz /** * @inheritdoc IArtToken * - * @dev Only the {AUCTION_HOUSE} contract is authorized to call this function. - * The call will revert if `_tokenURI` is empty or if `tokenId` has already been minted. + * @dev Only the {AUCTION_HOUSE} contract is authorized to call this function. The call will + * revert if `_tokenURI` is empty or if `tokenId` has already been minted. */ function mint(address to, uint256 tokenId, string memory _tokenURI) external onlyAuctionHouse { if (bytes(_tokenURI).length == 0) { @@ -120,10 +120,10 @@ contract ArtToken is IArtToken, ArtTokenBase, EIP712Domain, RoleSystem, Authoriz * @inheritdoc IArtToken * * @dev Workflow: - * 1. Recreates the EIP-712 digest for the supplied {BuyParams} and verifies - * the signature via {_requireAuthorizedAction}. - * 2. Performs runtime checks listed below; any failure reverts with a - * contract-specific error. + * 1. Recreates the EIP-712 digest for the supplied {BuyParams} and verifies the + * signature via {_requireAuthorizedAction}. + * 2. Performs runtime checks listed below. Any failure reverts with a contract-specific + * error. * 3. Mints the token directly to `msg.sender` (buyer). * 4. Pulls `price + fee` USDC from the buyer. * 5. Splits `price` among `participants` according to `shares` via @@ -136,8 +136,7 @@ contract ArtToken is IArtToken, ArtTokenBase, EIP712Domain, RoleSystem, Authoriz * - `params.fee` ≥ {MIN_FEE} → {ArtTokenInvalidFee}. * - `AUCTION_HOUSE.tokenReserved(tokenId)` must be false → {ArtTokenTokenReserved}. * - * @param params Packed struct containing all buy parameters - * (see {IArtToken.BuyParams}). + * @param params Packed struct containing all buy parameters (see {IArtToken.BuyParams}). */ function buy(BuyParams calldata params) external { bytes32 structHash = keccak256( @@ -207,8 +206,10 @@ contract ArtToken is IArtToken, ArtTokenBase, EIP712Domain, RoleSystem, Authoriz } /** - * @dev Ensures both recipient and authorizing address are compliant before - * any transfer. + * @inheritdoc ArtTokenBase + * + * @dev Hook that ensures both the recipient and the authorizing address are compliant with + * the collection's rules before any token transfer occurs. */ function _beforeTransfer(address to, uint256 /* tokenId */, address auth) internal view override { _requireAuthorizedRecipient(to); @@ -216,14 +217,20 @@ contract ArtToken is IArtToken, ArtTokenBase, EIP712Domain, RoleSystem, Authoriz } /** - * @dev Ensures the approval recipient is compliant. + * @inheritdoc ArtTokenBase + * + * @dev Hook that ensures the recipient of an approval is compliant with the collection's + * rules. */ function _beforeApprove(address to, uint256 /* tokenId */) internal view override { _requireAuthorizedRecipient(to); } /** - * @dev Ensures the operator is compliant when `approved` is set to true. + * @inheritdoc ArtTokenBase + * + * @dev Hook that ensures a new operator is compliant with the collection's rules before + * being approved. */ function _beforeSetApprovalForAll(address operator, bool approved) internal view override { if (approved) { diff --git a/contracts/art-token/ArtTokenBase.sol b/contracts/art-token/ArtTokenBase.sol index 1a322de..8f95dc6 100644 --- a/contracts/art-token/ArtTokenBase.sol +++ b/contracts/art-token/ArtTokenBase.sol @@ -13,16 +13,15 @@ import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; /** * @title ArtTokenBase * - * @notice Upgradeable, abstract ERC-721 implementation used as a building block - * for the protocol's ArtToken contracts. - * @notice Relies on OpenZeppelin upgradeable libraries and bundles the - * Enumerable and URIStorage extensions in a single inheritance tree. + * @notice Upgradeable, abstract ERC-721 implementation used as a building block for the + * protocol's ArtToken contracts. Relies on OpenZeppelin upgradeable libraries and + * bundles the Enumerable and URIStorage extensions in a single inheritance tree. */ abstract contract ArtTokenBase is ERC721EnumerableUpgradeable, ERC721URIStorageUpgradeable { /** * @notice Initializes the token with a `name` and a `symbol`. * - * @param _name Token collection name. + * @param _name Token collection name. * @param _symbol Token collection symbol. */ function initialize(string memory _name, string memory _symbol) external initializer { @@ -30,8 +29,8 @@ abstract contract ArtTokenBase is ERC721EnumerableUpgradeable, ERC721URIStorageU } /** - * @dev Overrides {ERC721.approve}. Adds the `_beforeApprove` hook so that - * inheriting contracts can introduce custom approval rules. + * @dev Overrides {ERC721.approve}. Adds the `_beforeApprove` hook so that inheriting contracts + * can introduce custom approval rules. */ function approve(address to, uint256 tokenId) public override(ERC721Upgradeable, IERC721) { _beforeApprove(to, tokenId); @@ -40,9 +39,8 @@ abstract contract ArtTokenBase is ERC721EnumerableUpgradeable, ERC721URIStorageU } /** - * @dev Overrides {ERC721.setApprovalForAll}. Adds the - * `_beforeSetApprovalForAll` hook so that inheriting contracts can - * introduce custom operator-approval rules. + * @dev Overrides {ERC721.setApprovalForAll}. Adds the `_beforeSetApprovalForAll` hook so that + * inheriting contracts can introduce custom operator-approval rules. */ function setApprovalForAll(address operator, bool approved) public override(ERC721Upgradeable, IERC721) { _beforeSetApprovalForAll(operator, approved); @@ -69,11 +67,10 @@ abstract contract ArtTokenBase is ERC721EnumerableUpgradeable, ERC721URIStorageU } /** - * @dev Helper that performs a safe mint and assigns a token URI in a single - * call. + * @dev Helper that performs a safe mint and assigns a token URI in a single call. * - * @param to Recipient of the newly minted token. - * @param tokenId Identifier of the token to mint. + * @param to Recipient of the newly minted token. + * @param tokenId Identifier of the token to mint. * @param _tokenURI Metadata URI that will be associated with the token. */ function _safeMintAndSetTokenURI(address to, uint256 tokenId, string memory _tokenURI) internal { @@ -82,13 +79,13 @@ abstract contract ArtTokenBase is ERC721EnumerableUpgradeable, ERC721URIStorageU } /** - * @dev Overrides the OpenZeppelin internal `_update` function in order to - * plug the `_beforeTransfer` hook. + * @dev Overrides the OpenZeppelin internal `_update` function in order to plug the + * `_beforeTransfer` hook. * - * @param to Address receiving the token. + * @param to Address receiving the token. * @param tokenId Identifier of the token being transferred. - * @param auth Address whose approval is being used for the transfer (may - * be the the owner of the token or an operator). + * @param auth Address whose approval is being used for the transfer + * (may be the the owner of the token or an operator). * * @return from Address that previously owned the token. */ @@ -115,16 +112,16 @@ abstract contract ArtTokenBase is ERC721EnumerableUpgradeable, ERC721URIStorageU /** * @dev Hook called before any token transfer or mint. * - * @param to The address receiving the token. + * @param to The address receiving the token. * @param tokenId Identifier of the token being transferred. - * @param auth Address whose approval is being used for the transfer. + * @param auth Address whose approval is being used for the transfer. */ function _beforeTransfer(address to, uint256 tokenId, address auth) internal virtual {} /** * @dev Hook called before an approval is granted for a single token. * - * @param to Address that the approval will be granted to. + * @param to Address that the approval will be granted to. * @param tokenId Identifier of the token for which the approval is set. */ function _beforeApprove(address to, uint256 tokenId) internal virtual {} @@ -133,8 +130,7 @@ abstract contract ArtTokenBase is ERC721EnumerableUpgradeable, ERC721URIStorageU * @dev Hook called before an operator approval is changed for an account. * * @param operator Address whose operator status is being updated. - * @param approved Boolean indicating whether the operator is being approved - * or revoked. + * @param approved Boolean indicating whether the operator is being approved or revoked. */ function _beforeSetApprovalForAll(address operator, bool approved) internal virtual {} } diff --git a/contracts/art-token/IArtToken.sol b/contracts/art-token/IArtToken.sol index 896f194..79b25d8 100644 --- a/contracts/art-token/IArtToken.sol +++ b/contracts/art-token/IArtToken.sol @@ -6,23 +6,22 @@ import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; /** * @title IArtToken * - * @notice Interface of the DigitalOriginal ERC-721 ArtToken contracts. - * @notice Extends the ERC-721 standard with primary-sale logic, EIP-712 permits and - * compliance helpers used by the protocol. + * @notice Interface of the DigitalOriginal ERC-721 ArtToken contracts. Extends the ERC-721 standard + * with primary-sale logic, EIP-712 permits and compliance helpers used by the protocol. */ interface IArtToken is IERC721 { /** * @notice Parameters accepted by {buy}. * - * @param tokenId Identifier of the token to be minted and purchased. - * @param tokenURI Metadata URI that will be permanently associated with the token. - * @param price Total purchase price denominated in the settlement token (USDC). - * @param fee Platform fee that will be additionally charged to the buyer. + * @param tokenId Identifier of the token to be minted and purchased. + * @param tokenURI Metadata URI that will be permanently associated with the token. + * @param price Total purchase price denominated in the settlement token (USDC). + * @param fee Platform fee that will be additionally charged to the buyer. * @param participants Addresses that will receive a portion of `price`. - * @param shares Number of shares assigned to each participant; must sum to - * {Distribution.TOTAL_SHARE} in the implementation. - * @param signature EIP-712 signature issued by the trusted signer authorizing the purchase. - * @param deadline Latest UNIX timestamp at which the signature remains valid. + * @param shares Number of shares assigned to each participant; must sum to + * {Distribution.TOTAL_SHARE} in the implementation. + * @param signature EIP-712 signature issued by the art-token signer authorizing the purchase. + * @param deadline Latest UNIX timestamp at which the signature remains valid. */ struct BuyParams { uint256 tokenId; @@ -38,8 +37,8 @@ interface IArtToken is IERC721 { /** * @notice Mints `tokenId` and transfers it to `to`. * - * @param to Address that will receive the newly minted token. - * @param tokenId Unique identifier of the token to mint. + * @param to Address that will receive the newly minted token. + * @param tokenId Unique identifier of the token to mint. * @param _tokenURI Metadata URI that will be associated with the token. */ function mint(address to, uint256 tokenId, string memory _tokenURI) external; @@ -62,7 +61,9 @@ interface IArtToken is IERC721 { /** * @notice Checks whether `account` passes the collection's compliance rules. + * * @param account Address to query. + * * @return authorized True if the account can receive or manage tokens. */ function recipientAuthorized(address account) external view returns (bool authorized); diff --git a/contracts/auction-house/AuctionHouse.sol b/contracts/auction-house/AuctionHouse.sol index 111774c..1a5666f 100644 --- a/contracts/auction-house/AuctionHouse.sol +++ b/contracts/auction-house/AuctionHouse.sol @@ -15,14 +15,10 @@ import {IAuctionHouse} from "./IAuctionHouse.sol"; /** * @title AuctionHouse * - * @notice Upgradeable English-auction contract that conducts primary sales for - * NFTs minted by {ArtToken}. Users create auctions via an authorized - * EIP-712 permit, place bids in USDC and, after the auction ends, - * the highest bidder receives the token while funds are split between - * participants and the protocol treasury. - * - * @dev Implements {IAuctionHouse}. Uses mix-ins for EIP-712 domain - * separation, role management and signature authorization. + * @notice Upgradeable English-auction contract that conducts primary sales for NFTs minted by + * {ArtToken}. Users create auctions via an authorized EIP-712 permit, place bids in + * USDC and, after the auction ends, the highest bidder receives the token while funds are + * split between participants and the protocol treasury. */ contract AuctionHouse is IAuctionHouse, EIP712Domain, RoleSystem, Authorization { using SafeERC20 for IERC20; @@ -31,19 +27,20 @@ contract AuctionHouse is IAuctionHouse, EIP712Domain, RoleSystem, Authorization * @notice EIP-712 struct type-hash used to validate `CreatePermit` signatures * supplied to {create}. */ + // prettier-ignore bytes32 public constant CREATE_PERMIT_TYPE_HASH = keccak256( "CreatePermit(" - "uint256 auctionId," - "uint256 tokenId," - "string tokenURI," - "uint256 price," - "uint256 fee," - "uint256 step," - "uint256 endTime," - "address[] participants," - "uint256[] shares," - "uint256 deadline" + "uint256 auctionId," + "uint256 tokenId," + "string tokenURI," + "uint256 price," + "uint256 fee," + "uint256 step," + "uint256 endTime," + "address[] participants," + "uint256[] shares," + "uint256 deadline" ")" ); @@ -138,13 +135,13 @@ contract AuctionHouse is IAuctionHouse, EIP712Domain, RoleSystem, Authorization /** * @notice Contract constructor. * - * @param proxy Proxy address used for EIP-712 verifying contract. - * @param main Address that will be set as {RoleSystem.MAIN}. - * @param artToken Address of the {ArtToken} contract. - * @param usdc Address of the USDC ERC-20 token. + * @param proxy Proxy address used for EIP-712 verifying contract. + * @param main Address that will be set as {RoleSystem.MAIN}. + * @param artToken Address of the {ArtToken} contract. + * @param usdc Address of the USDC ERC-20 token. * @param minAuctionDuration Minimum auction duration (seconds). - * @param minPrice Minimum starting price/bid. - * @param minFee Minimum platform fee. + * @param minPrice Minimum starting price/bid. + * @param minFee Minimum platform fee. */ constructor( address proxy, @@ -172,19 +169,19 @@ contract AuctionHouse is IAuctionHouse, EIP712Domain, RoleSystem, Authorization * @inheritdoc IAuctionHouse * * @dev Flow: - * 1. Validates `params` and the EIP-712 permit signed by the protocol signer. - * 2. Writes a new {IAuctionHouse.Auction} struct to storage and maps - * `params.tokenId` to `params.auctionId`. + * 1. Validates `params` and the EIP-712 permit signed by the auction-house signer. + * 2. Writes a new {IAuctionHouse.Auction} struct to storage and maps `params.tokenId` to + * `params.auctionId`. * 3. Emits {Created}. * * Validation details: * - Reverts {AuctionHouseEmptyTokenURI} when `tokenURI` is empty. - * - Reverts {AuctionHouseInvalidPrice}, {AuctionHouseInvalidFee}, - * {AuctionHouseInvalidStep} when monetary params are below minima. - * - Reverts {AuctionHouseInvalidEndTime} if `endTime` is not within the - * `[block.timestamp + MIN_DURATION, block.timestamp + MAX_DURATION]` window. - * - Reverts {AuctionHouseTokenReserved} when the token is already locked - * by another auction or minted. + * - Reverts {AuctionHouseInvalidPrice}, {AuctionHouseInvalidFee}, {AuctionHouseInvalidStep} + * when monetary params are below minima. + * - Reverts {AuctionHouseInvalidEndTime} if `endTime` is not within the `[block.timestamp + + * MIN_DURATION, block.timestamp + MAX_DURATION]` window. + * - Reverts {AuctionHouseTokenReserved} when the token is already locked by another auction + * or minted. * - Reverts {AuctionHouseAuctionExists} if `auctionId` is already used. * * @param params See {IAuctionHouse.CreateParams}. @@ -271,10 +268,10 @@ contract AuctionHouse is IAuctionHouse, EIP712Domain, RoleSystem, Authorization * - Stores the caller as `buyer` and `newPrice` as `price`. * - Emits {Raised}. * - * Reverts with {AuctionHouseRaiseTooLow} if `newPrice < initial price`. + * Reverts with {AuctionHouseRaiseTooLow} if `newPrice < initial price`. * * @param auctionId Identifier of the auction that has no current buyer. - * @param newPrice First bid amount in USDC. + * @param newPrice First bid amount in USDC. */ function raiseInitial( uint256 auctionId, @@ -302,11 +299,11 @@ contract AuctionHouse is IAuctionHouse, EIP712Domain, RoleSystem, Authorization * - Refunds `oldPrice + fee` to the previously highest `buyer`. * - Updates storage and emits {Raised}. * - * Reverts with {AuctionHouseRaiseTooLow} when `newPrice` is less than - * `current price + step`. + * Reverts with {AuctionHouseRaiseTooLow} when `newPrice` is less than + * `current price + step`. * * @param auctionId Identifier of the auction with an existing buyer. - * @param newPrice New highest bid in USDC. + * @param newPrice New highest bid in USDC. */ function raise( uint256 auctionId, @@ -340,12 +337,11 @@ contract AuctionHouse is IAuctionHouse, EIP712Domain, RoleSystem, Authorization * @dev Finalizes the auction after `endTime`: * 1. Marks auction as sold and emits {Sold}. * 2. Mints the NFT to the stored `buyer` via {ArtToken.mint}. - * 3. Transfers the platform `fee` to the treasury (owner of - * {Roles.FINANCIAL_ROLE}). - * 4. Splits the sale `price` among `participants` according to `shares` - * using {Distribution.distribute}. + * 3. Transfers the platform `fee` to the treasury (owner of {Roles.FINANCIAL_ROLE}). + * 4. Splits the sale `price` among `participants` according to `shares` using + * {Distribution.distribute}. * - * Reverts with {AuctionHouseTokenSold} if already settled. + * Reverts with {AuctionHouseTokenSold} if already settled. * * @param auctionId Identifier of the auction to settle. */ @@ -381,8 +377,8 @@ contract AuctionHouse is IAuctionHouse, EIP712Domain, RoleSystem, Authorization /** * @inheritdoc IAuctionHouse * - * @return reserved True if the token is currently locked by an active - * auction or an ended auction with a buyer. + * @return reserved True if the token is currently locked by an active auction or an ended + * auction with a buyer. */ function tokenReserved(uint256 tokenId) public view returns (bool reserved) { AuctionHouseStorage.Layout storage $ = AuctionHouseStorage.layout(); diff --git a/contracts/auction-house/AuctionHouseStorage.sol b/contracts/auction-house/AuctionHouseStorage.sol index d621ac0..66f60d8 100644 --- a/contracts/auction-house/AuctionHouseStorage.sol +++ b/contracts/auction-house/AuctionHouseStorage.sol @@ -6,12 +6,11 @@ import {IAuctionHouse} from "./IAuctionHouse.sol"; /** * @title AuctionHouseStorage * - * @notice Defines the unstructured-storage layout for {AuctionHouse}. Using a - * deterministic slot makes the module safe for use behind proxies and - * alongside other upgradeable components. + * @notice Defines the storage layout for {AuctionHouse}. Using a deterministic slot makes the + * module safe for use behind proxies and alongside other upgradeable components. */ library AuctionHouseStorage { - /// @dev Unique storage slot for the layout, derived via EIP-7201 convention. + /// @dev Unique storage slot for the layout, computed using EIP-7201 convention. bytes32 private constant STORAGE_SLOT = keccak256(abi.encode(uint256(keccak256("digital-original.storage.AuctionHouse")) - 1)) & ~bytes32(uint256(0xff)); @@ -25,9 +24,9 @@ library AuctionHouseStorage { } /** - * @notice Returns a pointer to the pre-allocated storage layout. + * @notice Returns a pointer to the storage layout. * - * @return $ Storage struct containing all auctions and reverse mappings. + * @return $ The pointer to the Layout struct in storage. */ function layout() internal pure returns (Layout storage $) { bytes32 slot = STORAGE_SLOT; diff --git a/contracts/auction-house/IAuctionHouse.sol b/contracts/auction-house/IAuctionHouse.sol index 218becb..4cb6225 100644 --- a/contracts/auction-house/IAuctionHouse.sol +++ b/contracts/auction-house/IAuctionHouse.sol @@ -4,24 +4,24 @@ pragma solidity ^0.8.20; /** * @title IAuctionHouse * - * @notice Interface for the protocol's English-auction module responsible for - * primary NFT sales. Allows creating auctions, placing bids (raises), - * and finalizing sales with revenue distribution. + * @notice Interface for the protocol's English-auction module responsible for primary NFT sales. + * Allows creating auctions, placing bids (raises), and finalizing sales with revenue + * distribution. */ interface IAuctionHouse { /** * @notice In-memory representation of an auction. * - * @param tokenId Identifier of the token being sold. - * @param price Current highest bid (or starting price). - * @param fee Platform fee that will be added to the final payment. - * @param step Minimum raise step expressed in settlement-token units. - * @param endTime UNIX timestamp after which the auction can be finalized. - * @param buyer Current highest bidder. - * @param sold Flag indicating whether `finish` has been called. - * @param tokenURI Metadata URI for lazy-minting upon settlement. + * @param tokenId Identifier of the token being sold. + * @param price Current highest bid (or starting price). + * @param fee Platform fee that will be added to the final payment. + * @param step Minimum raise step expressed in settlement-token units. + * @param endTime UNIX timestamp after which the auction can be finalized. + * @param buyer Current highest bidder. + * @param sold Flag indicating whether `finish` has been called. + * @param tokenURI Metadata URI for lazy-minting upon settlement. * @param participants Revenue-sharing recipients. - * @param shares Number of shares assigned to each participant. + * @param shares Number of shares assigned to each participant. */ struct Auction { uint256 tokenId; @@ -39,17 +39,18 @@ interface IAuctionHouse { /** * @notice Parameters accepted by {create}. * - * @param auctionId Unique identifier chosen by the caller. - * @param tokenId Identifier of the token that will be minted/sold. - * @param tokenURI Metadata URI. - * @param price Starting price. - * @param fee Platform fee. - * @param step Minimum raise increment. - * @param endTime Auction end timestamp. + * @param auctionId Unique identifier chosen by the caller. + * @param tokenId Identifier of the token that will be minted/sold. + * @param tokenURI Metadata URI. + * @param price Starting price. + * @param fee Platform fee. + * @param step Minimum raise increment. + * @param endTime Auction end timestamp. * @param participants Revenue-sharing recipients. - * @param shares Shares for each participant. - * @param signature EIP-712 signature issued by protocol signer authorizing the auction. - * @param deadline Expiration timestamp for the signature. + * @param shares Shares for each participant. + * @param signature EIP-712 signature issued by the auction-house signer authorizing the + * auction. + * @param deadline Expiration timestamp for the signature. */ struct CreateParams { uint256 auctionId; @@ -69,9 +70,9 @@ interface IAuctionHouse { * @notice Emitted after a successful call to {create}. * * @param auctionId Identifier of the newly created auction. - * @param tokenId Token identifier associated with the auction. - * @param price Starting price. - * @param endTime Auction end timestamp. + * @param tokenId Token identifier associated with the auction. + * @param price Starting price. + * @param endTime Auction end timestamp. */ event Created(uint256 indexed auctionId, uint256 indexed tokenId, uint256 price, uint256 endTime); @@ -79,8 +80,8 @@ interface IAuctionHouse { * @notice Emitted each time a new highest bid is placed. * * @param auctionId Identifier of the auction. - * @param buyer Address of the bidder. - * @param price New highest bid. + * @param buyer Address of the bidder. + * @param price New highest bid. */ event Raised(uint256 indexed auctionId, address indexed buyer, uint256 price); @@ -90,7 +91,10 @@ interface IAuctionHouse { event Sold(uint256 indexed auctionId); /** - * @notice Creates a new auction with parameters validated and authorized via an EIP-712 signature. + * @notice Creates a new auction with parameters validated and authorized via + * an EIP-712 signature. + * + * @param params See {CreateParams}. */ function create(CreateParams calldata params) external; @@ -105,7 +109,8 @@ interface IAuctionHouse { function raise(uint256 auctionId, uint256 price) external; /** - * @notice Finalizes the auction, mints the token to the highest bidder and distributes proceeds. + * @notice Finalizes the auction, mints the token to the highest bidder + * and distributes proceeds. */ function finish(uint256 auctionId) external; diff --git a/contracts/market/IMarket.sol b/contracts/market/IMarket.sol new file mode 100644 index 0000000..820f985 --- /dev/null +++ b/contracts/market/IMarket.sol @@ -0,0 +1,148 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity ^0.8.20; + +import {Order} from "./libraries/Order.sol"; +import {ExecutionPermit} from "./libraries/ExecutionPermit.sol"; + +/** + * @title IMarket + * + * @notice Interface for the protocol's secondary market module. It allows users to trade NFTs + * through off-chain orders (asks and bids) that are executed on-chain. + */ +interface IMarket { + /** + * @notice Emitted when a sell-side order (ask) is executed. + * + * @param orderHash The hash of the executed ask order. + * @param collection Address of the ERC-721 collection contract. + * @param currency Address of the settlement currency (ERC-20). + * @param maker Address of the seller. + * @param taker Address of the buyer. + * @param price The price at which the token was sold. + * @param tokenId The identifier of the token that was sold. + */ + event AskOrderExecuted( + bytes32 orderHash, + address collection, + address currency, + address maker, + address taker, + uint256 tokenId, + uint256 price + ); + + /** + * @notice Emitted when a buy-side order (bid) is executed. + * + * @param orderHash The hash of the executed bid order. + * @param collection Address of the ERC-721 collection contract. + * @param currency Address of the settlement currency (ERC-20). + * @param maker Address of the buyer. + * @param taker Address of the seller. + * @param price The price at which the token was bought. + * @param tokenId The identifier of the token that was bought. + */ + event BidOrderExecuted( + bytes32 orderHash, + address collection, + address currency, + address maker, + address taker, + uint256 tokenId, + uint256 price + ); + + /** + * @notice Emitted when an order is invalidated by its maker or a market admin. + * + * @param maker Address of the order's maker. + * @param orderHash The hash of the invalidated order. + */ + event OrderInvalidated(address maker, bytes32 orderHash); + + /** + * @notice Executes a sell-side order (ask). + * + * @dev The `order` must be signed by the `maker` (seller), and the `permit` must be signed by + * the market signer. The `msg.sender` is the `taker` (buyer). + * + * @param order The ask order to execute. See {Order.Type}. + * @param permit The execution permit, containing revenue-sharing information. See + * {ExecutionPermit.Type}. + * @param orderSignature The EIP-712 signature of the `order`, signed by the `maker`. + * @param permitSignature The EIP-712 signature of the `permit`, signed by the market signer. + */ + function executeAsk( + Order.Type calldata order, + ExecutionPermit.Type calldata permit, + bytes calldata orderSignature, + bytes calldata permitSignature + ) external; + + /** + * @notice Executes a buy-side order (bid). + * + * @dev The `order` must be signed by the `maker` (buyer), and the `permit` must be signed by + * the market signer. The `msg.sender` is the `taker` (seller). + * + * @param order The bid order to execute. See {Order.Type}. + * @param permit The execution permit, containing revenue-sharing information. See + * {ExecutionPermit.Type}. + * @param orderSignature The EIP-712 signature of the `order`, signed by the `maker`. + * @param permitSignature The EIP-712 signature of the `permit`, signed by the market signer. + */ + function executeBid( + Order.Type calldata order, + ExecutionPermit.Type calldata permit, + bytes calldata orderSignature, + bytes calldata permitSignature + ) external; + + /** + * @notice Invalidates an order, preventing its future execution. + * + * @dev Can be called by the `maker` of the order or a market admin. + * + * @param maker Address of the order's maker. + * @param orderHash The hash of the order to invalidate. + */ + function invalidateOrder(address maker, bytes32 orderHash) external; + + /** + * @notice Checks if an order has been invalidated. + * + * @param maker Address of the order's maker. + * @param orderHash The hash of the order to check. + * + * @return invalidated True if the order has been invalidated, false otherwise. + */ + function orderInvalidated(address maker, bytes32 orderHash) external view returns (bool invalidated); + + /// @dev Thrown when an order signature is not from the specified `maker`. + error MarketUnauthorizedOrder(); + + /// @dev Thrown when an order is executed with an invalid side. + error MarketInvalidOrderSide(); + + /// @dev Thrown when an order hash is invalid. + error MarketInvalidOrderHash(); + + /// @dev Thrown when an action is attempted by an unauthorized account. + error MarketUnauthorizedAccount(); + + /// @dev Thrown when an order is executed outside of its `startTime` and `endTime`. + error MarketOrderOutsideOfTimeRange(); + + /// @dev Thrown when the specified `currency` is not supported. + error MarketCurrencyInvalid(); + + /// @dev Thrown when an attempt is made to execute an invalidated order. + error MarketOrderInvalidated(bytes32 orderHash); + + /// @dev Thrown when an ask side fee is invalid. + error MarketInvalidAskSideFee(); + + /// @dev Thrown when a constructor argument at `argIndex` is invalid. + error MarketMisconfiguration(uint256 argIndex); +} diff --git a/contracts/market/Market.sol b/contracts/market/Market.sol new file mode 100644 index 0000000..69768b1 --- /dev/null +++ b/contracts/market/Market.sol @@ -0,0 +1,286 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity ^0.8.20; + +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; +import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import {EIP712Domain} from "../utils/EIP712Domain.sol"; +import {EIP712Signature} from "../utils/EIP712Signature.sol"; +import {RoleSystem} from "../utils/role-system/RoleSystem.sol"; +import {CurrencyManager} from "../utils/currency-manager/CurrencyManager.sol"; +import {Roles} from "../utils/Roles.sol"; +import {Authorization} from "../utils/Authorization.sol"; +import {SafeERC20BulkTransfer} from "../utils/SafeERC20BulkTransfer.sol"; +import {MarketStorage} from "./MarketStorage.sol"; +import {IMarket} from "./IMarket.sol"; +import {Order} from "./libraries/Order.sol"; +import {ExecutionPermit} from "./libraries/ExecutionPermit.sol"; + +/** + * @title Market + * + * @notice Upgradeable secondary market contract that facilitates peer-to-peer trading of NFTs + * through off-chain orders. It supports both sell-side (ask) and buy-side (bid) orders, + * which are authorized via EIP-712 signatures. + */ +contract Market is IMarket, EIP712Domain, RoleSystem, CurrencyManager, Authorization { + using Order for Order.Type; + using ExecutionPermit for ExecutionPermit.Type; + + /** + * @notice Contract constructor. + * + * @param proxy Proxy address used for EIP-712 verifying contract. + * @param main Address that will be set as {RoleSystem.MAIN}. + */ + constructor(address proxy, address main) EIP712Domain(proxy, "Market", "1") RoleSystem(main) {} + + /** + * @inheritdoc IMarket + * + * @dev Flow: + * 1. Validates the order side, taker, currency, signatures, and time range. + * 2. Invalidates the order to prevent replay attacks. + * 3. Distributes the payment and fees. + * 4. Transfers the token from the seller to the buyer. + * 5. Emits {AskOrderExecuted}. + */ + function executeAsk( + Order.Type calldata order, + ExecutionPermit.Type calldata permit, + bytes calldata orderSignature, + bytes calldata permitSignature + ) external { + if (order.side != Order.Side.ASK) { + revert MarketInvalidOrderSide(); + } + + if (permit.orderHash != order.hash()) { + revert MarketInvalidOrderHash(); + } + + if (order.makerFee >= order.price) { + revert MarketInvalidAskSideFee(); + } + + if (permit.taker != msg.sender) { + revert MarketUnauthorizedAccount(); + } + + if (!currencyAllowed(order.currency)) { + revert MarketCurrencyInvalid(); + } + + address maker = order.maker; + + _requireAuthorizedOrder(permit.orderHash, maker, order.startTime, order.endTime, orderSignature); + + _requireAuthorizedAction(permit.hash(), permit.deadline, permitSignature); + + _invalidateOrder(maker, permit.orderHash); + + _distribute( + IERC20(order.currency), + maker, // askSide - maker + msg.sender, // bidSide - taker + order.price, + order.makerFee, // askSideFee + permit.takerFee, // bidSideFee + permit.participants, + permit.rewards + ); + + IERC721(order.collection).safeTransferFrom( + maker, // from askSide - maker + msg.sender, // to bidSide - taker + order.tokenId + ); + + emit AskOrderExecuted( + permit.orderHash, + order.collection, + order.currency, + maker, + msg.sender, + order.tokenId, + order.price + ); + } + + /** + * @inheritdoc IMarket + * + * @dev Flow: + * 1. Validates the order side, taker, currency, signatures, and time range. + * 2. Invalidates the order to prevent replay attacks. + * 3. Distributes the payment and fees. + * 4. Transfers the token from the seller to the buyer. + * 5. Emits {BidOrderExecuted}. + */ + function executeBid( + Order.Type calldata order, + ExecutionPermit.Type calldata permit, + bytes calldata orderSignature, + bytes calldata permitSignature + ) external { + if (order.side != Order.Side.BID) { + revert MarketInvalidOrderSide(); + } + + if (permit.orderHash != order.hash()) { + revert MarketInvalidOrderHash(); + } + + if (permit.takerFee >= order.price) { + revert MarketInvalidAskSideFee(); + } + + if (permit.taker != msg.sender) { + revert MarketUnauthorizedAccount(); + } + + if (!currencyAllowed(order.currency)) { + revert MarketCurrencyInvalid(); + } + + address maker = order.maker; + + _requireAuthorizedOrder(permit.orderHash, maker, order.startTime, order.endTime, orderSignature); + + _requireAuthorizedAction(permit.hash(), permit.deadline, permitSignature); + + _invalidateOrder(maker, permit.orderHash); + + _distribute( + IERC20(order.currency), + msg.sender, // askSide - taker + maker, // bidSide - maker + order.price, + permit.takerFee, // askSideFee + order.makerFee, // bidSideFee + permit.participants, + permit.rewards + ); + + IERC721(order.collection).safeTransferFrom( + msg.sender, // from askSide - taker + maker, // to bidSide - maker + order.tokenId + ); + + emit BidOrderExecuted( + permit.orderHash, + order.collection, + order.currency, + maker, + msg.sender, + order.tokenId, + order.price + ); + } + + /** + * @inheritdoc IMarket + */ + function invalidateOrder(address maker, bytes32 orderHash) external { + if (msg.sender == maker || hasRole(Roles.ADMIN_ROLE, msg.sender)) { + _invalidateOrder(maker, orderHash); + + emit OrderInvalidated(maker, orderHash); + } else { + revert MarketUnauthorizedAccount(); + } + } + + /** + * @inheritdoc IMarket + */ + function orderInvalidated(address maker, bytes32 orderHash) external view returns (bool invalidated) { + MarketStorage.Layout storage $ = MarketStorage.layout(); + + invalidated = $.orderInvalidated[maker][orderHash]; + } + + /** + * @notice Internal function to handle the distribution of funds for an order. + * + * @param currency The ERC-20 token used for the payment. + * @param askSide The seller's address. + * @param bidSide The buyer's address. + * @param price The price of the order. + * @param askSideFee The fee for the ask side. + * @param bidSideFee The fee for the bid side. + * @param participants The addresses of the participants in the revenue share. + * @param rewards The corresponding rewards for each participant. + */ + function _distribute( + IERC20 currency, + address askSide, + address bidSide, + uint256 price, + uint256 askSideFee, + uint256 bidSideFee, + address[] calldata participants, + uint256[] calldata rewards + ) internal { + SafeERC20.safeTransferFrom(currency, bidSide, address(this), price + bidSideFee); + + SafeERC20.safeTransfer(currency, askSide, price - askSideFee); + + SafeERC20.safeTransfer(currency, uniqueRoleOwner(Roles.FINANCIAL_ROLE), bidSideFee); + + SafeERC20BulkTransfer.safeTransfer(currency, askSideFee, participants, rewards); + } + + /** + * @notice Internal function to invalidate an order. + * + * @dev Reverts with {MarketOrderInvalidated} if the order is already invalidated. + * + * @param maker The address of the order's maker. + * @param orderHash The hash of the order to invalidate. + */ + function _invalidateOrder(address maker, bytes32 orderHash) internal { + MarketStorage.Layout storage $ = MarketStorage.layout(); + + if ($.orderInvalidated[maker][orderHash]) { + revert MarketOrderInvalidated(orderHash); + } + + $.orderInvalidated[maker][orderHash] = true; + } + + /** + * @notice Internal function to verify an order's authorization. + * + * @dev It checks the time validity of the order and recovers the signer's address from the + * signature to ensure it matches the `maker`. + * + * @param orderHash The hash of the order. + * @param maker The address of the order's maker. + * @param startTime The start time of the order's validity. + * @param endTime The end time of the order's validity. + * @param orderSignature The EIP-712 signature of the order. + */ + function _requireAuthorizedOrder( + bytes32 orderHash, + address maker, + uint256 startTime, + uint256 endTime, + bytes calldata orderSignature + ) internal view { + if (startTime > block.timestamp || endTime < block.timestamp) { + revert MarketOrderOutsideOfTimeRange(); + } + + address signer = EIP712Signature.recover( + DOMAIN_SEPARATOR, + orderHash, + orderSignature // + ); + + if (maker != signer) { + revert MarketUnauthorizedOrder(); + } + } +} diff --git a/contracts/market/MarketStorage.sol b/contracts/market/MarketStorage.sol new file mode 100644 index 0000000..b3afec3 --- /dev/null +++ b/contracts/market/MarketStorage.sol @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity ^0.8.20; + +/** + * @title MarketStorage + * + * @notice Defines the storage layout for {Market}. Using a deterministic slot + * makes the module safe for use behind proxies and alongside other upgradeable components. + */ +library MarketStorage { + /// @dev Unique storage slot for the layout, computed using EIP-7201 convention. + bytes32 private constant STORAGE_SLOT = + keccak256(abi.encode(uint256(keccak256("digital-original.storage.Market")) - 1)) & ~bytes32(uint256(0xff)); + + /** + * @custom:storage-location erc7201:digital-original.storage.Market + */ + struct Layout { + mapping(address maker => mapping(bytes32 orderHash => bool)) orderInvalidated; + } + + /** + * @notice Returns a pointer to the storage layout. + * + * @return $ The pointer to the Layout struct in storage. + */ + function layout() internal pure returns (Layout storage $) { + bytes32 slot = STORAGE_SLOT; + + // solhint-disable-next-line + assembly { + $.slot := slot + } + } +} diff --git a/contracts/market/libraries/ExecutionPermit.sol b/contracts/market/libraries/ExecutionPermit.sol new file mode 100644 index 0000000..cdeb3bd --- /dev/null +++ b/contracts/market/libraries/ExecutionPermit.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity ^0.8.20; + +/** + * @title ExecutionPermit + * + * @notice EIP-712 struct for an order execution permit, which authorizes the execution of a + * market order and specifies the taker fee and revenue-sharing details. + */ +library ExecutionPermit { + /** + * @notice Represents an order execution permit. + * + * @param orderHash The hash of the order to be executed. + * @param taker The address of the account that is executing the order. + * @param takerFee The fee that the `taker` is willing to pay for the execution. + * @param participants The addresses of the participants in the revenue share. + * @param rewards The corresponding rewards for each participant. + * @param deadline The timestamp until which the permit is valid. + */ + struct Type { + bytes32 orderHash; + address taker; + uint256 takerFee; + address[] participants; + uint256[] rewards; + uint256 deadline; + } + + /// @notice EIP-712 type hash for the {ExecutionPermit.Type} struct. + // prettier-ignore + bytes32 internal constant TYPE_HASH = + keccak256( + "ExecutionPermit(" + "bytes32 orderHash," + "address taker," + "uint256 takerFee," + "address[] participants," + "uint256[] rewards," + "uint256 deadline" + ")" + ); + + /** + * @notice Hashes an execution permit using the EIP-712 standard. + * + * @param permit The execution permit to hash. + * + * @return permitHash The EIP-712 hash of the permit. + */ + function hash(Type calldata permit) internal pure returns (bytes32) { + return + keccak256( + abi.encode( + TYPE_HASH, + permit.orderHash, + permit.taker, + permit.takerFee, + keccak256(abi.encodePacked(permit.participants)), + keccak256(abi.encodePacked(permit.rewards)), + permit.deadline + ) + ); + } +} diff --git a/contracts/market/libraries/Order.sol b/contracts/market/libraries/Order.sol new file mode 100644 index 0000000..4efc4f5 --- /dev/null +++ b/contracts/market/libraries/Order.sol @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity ^0.8.20; + +/** + * @title Order + * + * @notice EIP-712 struct for a market order, which can be either a sell-side (ask) or a buy-side + * (bid) order. + */ +library Order { + /** + * @notice Indicates the side of the order. + * + * @param ASK A sell-side order, where the maker is the seller. + * @param BID A buy-side order, where the maker is the buyer. + */ + enum Side { + ASK, + BID + } + + /** + * @notice Represents a market order. + * + * @param side The side of the order (ask or bid). + * @param collection Address of the ERC-721 collection contract. + * @param currency Address of the settlement currency (ERC-20). + * @param maker Address of the order's creator. + * @param tokenId The identifier of the token being traded. + * @param price The price of the order. + * @param makerFee The fee that the `maker` is willing to pay for the execution. + * @param startTime The timestamp from which the order is valid. + * @param endTime The timestamp until which the order is valid. + */ + struct Type { + Side side; + address collection; + address currency; + address maker; + uint256 tokenId; + uint256 price; + uint256 makerFee; + uint256 startTime; + uint256 endTime; + } + + /// @notice EIP-712 type hash for the {Order.Type} struct. + // prettier-ignore + bytes32 internal constant TYPE_HASH = + keccak256( + "Order(" + "uint8 side," + "address collection," + "address currency," + "address maker," + "uint256 tokenId," + "uint256 price," + "uint256 makerFee," + "uint256 startTime," + "uint256 endTime" + ")" + ); + + /** + * @notice Hashes an order using the EIP-712 standard. + * + * @param order The order to hash. + * + * @return orderHash The EIP-712 hash of the order. + */ + function hash(Type calldata order) internal pure returns (bytes32) { + return + keccak256( + abi.encode( + TYPE_HASH, + order.side, + order.collection, + order.currency, + order.maker, + order.tokenId, + order.price, + order.makerFee, + order.startTime, + order.endTime + ) + ); + } +} diff --git a/contracts/tests/DeployerTest.sol b/contracts/tests/AllDeployer.sol similarity index 63% rename from contracts/tests/DeployerTest.sol rename to contracts/tests/AllDeployer.sol index 807048e..a8797ad 100644 --- a/contracts/tests/DeployerTest.sol +++ b/contracts/tests/AllDeployer.sol @@ -4,33 +4,34 @@ pragma solidity ^0.8.20; import {Deployment} from "../utils/Deployment.sol"; import {ArtToken} from "../art-token/ArtToken.sol"; import {AuctionHouse} from "../auction-house/AuctionHouse.sol"; +import {Market} from "../market/Market.sol"; import {Roles} from "../utils/Roles.sol"; -import {MarketMock} from "../tests/MarketMock.sol"; import {USDC} from "../tests/USDC.sol"; -contract DeployerTest { - event Deployed(address artToken, address auctionHouse, address marketMock, address usdc); +contract AllDeployer { + event Deployed(address artToken, address auctionHouse, address market, address usdc); constructor( address signer, address financier, + address admin, uint256 minPrice, uint256 minFee, uint256 minAuctionDuration, bool regulated ) { - address marketMock = address(new MarketMock()); address usdc = address(new USDC()); address calculatedArtTokenProxy = Deployment.calculateContractAddress(address(this), 5); address calculatedAuctionHouseProxy = Deployment.calculateContractAddress(address(this), 6); + address calculatedMarketProxy = Deployment.calculateContractAddress(address(this), 7); { address artTokenImpl = address( new ArtToken( - address(calculatedArtTokenProxy), + calculatedArtTokenProxy, address(this), - address(calculatedAuctionHouseProxy), - address(usdc), + calculatedAuctionHouseProxy, + usdc, minPrice, minFee, regulated @@ -39,32 +40,47 @@ contract DeployerTest { address auctionHouseImpl = address( new AuctionHouse( - address(calculatedAuctionHouseProxy), + calculatedAuctionHouseProxy, address(this), - address(calculatedArtTokenProxy), - address(usdc), + calculatedArtTokenProxy, + usdc, minAuctionDuration, minPrice, minFee ) ); + address marketImpl = address( + new Market( + calculatedMarketProxy, + address(this) // + ) + ); + address artTokenProxy = Deployment.deployUpgradeableContract(artTokenImpl, address(this)); address auctionHouseProxy = Deployment.deployUpgradeableContract(auctionHouseImpl, address(this)); + address marketProxy = Deployment.deployUpgradeableContract(marketImpl, address(this)); if (artTokenProxy != calculatedArtTokenProxy) revert DeployerIncorrectAddress(); if (auctionHouseProxy != calculatedAuctionHouseProxy) revert DeployerIncorrectAddress(); + if (marketProxy != calculatedMarketProxy) revert DeployerIncorrectAddress(); - emit Deployed(artTokenProxy, auctionHouseProxy, marketMock, usdc); + emit Deployed(artTokenProxy, auctionHouseProxy, marketProxy, usdc); } ArtToken(calculatedArtTokenProxy).transferUniqueRole(Roles.SIGNER_ROLE, signer); ArtToken(calculatedArtTokenProxy).transferUniqueRole(Roles.FINANCIAL_ROLE, financier); - ArtToken(calculatedArtTokenProxy).grantRole(Roles.PARTNER_ROLE, address(calculatedAuctionHouseProxy)); - ArtToken(calculatedArtTokenProxy).grantRole(Roles.PARTNER_ROLE, address(marketMock)); + ArtToken(calculatedArtTokenProxy).grantRole(Roles.PARTNER_ROLE, calculatedAuctionHouseProxy); + ArtToken(calculatedArtTokenProxy).grantRole(Roles.PARTNER_ROLE, calculatedMarketProxy); AuctionHouse(calculatedAuctionHouseProxy).transferUniqueRole(Roles.FINANCIAL_ROLE, financier); AuctionHouse(calculatedAuctionHouseProxy).transferUniqueRole(Roles.SIGNER_ROLE, signer); + + Market(calculatedMarketProxy).transferUniqueRole(Roles.SIGNER_ROLE, signer); + Market(calculatedMarketProxy).transferUniqueRole(Roles.FINANCIAL_ROLE, financier); + if (admin != address(0)) Market(calculatedMarketProxy).grantRole(Roles.ADMIN_ROLE, admin); + Market(calculatedMarketProxy).grantRole(Roles.ADMIN_ROLE, address(this)); + Market(calculatedMarketProxy).updateCurrencyStatus(usdc, true); } error DeployerIncorrectAddress(); diff --git a/contracts/tests/MarketMock.sol b/contracts/tests/MarketMock.sol deleted file mode 100644 index 5a80d25..0000000 --- a/contracts/tests/MarketMock.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity ^0.8.20; - -contract MarketMock { - string public constant NAME = "MarketMock"; -} diff --git a/contracts/utils/Authorization.sol b/contracts/utils/Authorization.sol index 493eacd..e22b2fd 100644 --- a/contracts/utils/Authorization.sol +++ b/contracts/utils/Authorization.sol @@ -9,27 +9,27 @@ import {Roles} from "./Roles.sol"; /** * @title Authorization * - * @notice Mixin that provides EIP-712 based action authorization using a - * dedicated `SIGNER_ROLE` account. Intended to be inherited by - * contracts that need off-chain signatures for sensitive operations. + * @notice Mixin that provides EIP-712 based action authorization using a dedicated + * `SIGNER_ROLE` account. Intended to be inherited by contracts that need off-chain + * signatures for sensitive operations. * - * @dev Relies on {EIP712Domain} for the domain separator and on - * {RoleSystem} for role storage. The helper {_requireAuthorizedAction} - * validates both signature freshness and signer authenticity. + * @dev Relies on {EIP712Domain} for the domain separator and on {RoleSystem} for role + * storage. The helper {_requireAuthorizedAction} validates both signature freshness and + * signer authenticity. */ abstract contract Authorization is EIP712Domain, RoleSystem { /** - * @notice Verifies that `signature` is a valid authorization for - * `messageHash` and that it has not expired. + * @notice Verifies that `signature` is a valid authorization for `messageHash` and that it + * has not expired. * - * @dev Reverts with {AuthorizationDeadlineExpired} if `deadline` has passed - * or with {AuthorizationUnauthorizedAction} if the recovered signer - * does not hold the `SIGNER_ROLE`. + * @dev Reverts with {AuthorizationDeadlineExpired} if `deadline` has passed or with + * {AuthorizationUnauthorizedAction} if the recovered signer does not hold the + * `SIGNER_ROLE`. * * @param messageHash EIP-712 struct hash (already `keccak256`-encoded). - * @param deadline UNIX timestamp after which the signature is considered invalid. - * @param signature EIP-712 signature (65/64-byte format accepted by - * {EIP712Signature.recover}). + * @param deadline UNIX timestamp after which the signature is considered invalid. + * @param signature EIP-712 signature (65/64-byte format accepted by + * {EIP712Signature.recover}). */ function _requireAuthorizedAction(bytes32 messageHash, uint256 deadline, bytes calldata signature) internal view { if (deadline < block.timestamp) { diff --git a/contracts/utils/Deployer.sol b/contracts/utils/CollectionDeployer.sol similarity index 66% rename from contracts/utils/Deployer.sol rename to contracts/utils/CollectionDeployer.sol index f2e7f4f..2d0c9c9 100644 --- a/contracts/utils/Deployer.sol +++ b/contracts/utils/CollectionDeployer.sol @@ -6,21 +6,20 @@ import {AuctionHouse} from "../auction-house/AuctionHouse.sol"; import {Deployment} from "./Deployment.sol"; /** - * @title Deployer + * @title CollectionDeployer * - * @notice Helper contract that deploys and wires together fresh instances of - * `ArtToken` and `AuctionHouse` behind transparent upgradeable - * proxies. Intended for deterministic deployments during initial - * protocol setup. + * @notice Helper contract that deploys and wires together fresh instances of `ArtToken` and + * `AuctionHouse` behind transparent upgradeable proxies. Intended for deterministic + * deployments during initial collection setup. * - * @dev The contract self-destructs implicitly after construction (no storage is - * written). It relies on {Deployment.calculateContractAddress} to - * pre-compute the proxy addresses, ensuring that the implementation - * constructors can reference each other before the proxies exist. + * @dev The contract self-destructs implicitly after construction (no storage is written). It + * relies on {Deployment.calculateContractAddress} to pre-compute the proxy addresses, + * ensuring that the implementation constructors can reference each other before the proxies + * exist. */ -contract Deployer { +contract CollectionDeployer { /// @notice Emitted once the proxy contracts are deployed and initialised. - /// @param artToken Address of the newly deployed ArtToken proxy. + /// @param artToken Address of the newly deployed ArtToken proxy. /// @param auctionHouse Address of the newly deployed AuctionHouse proxy. event Deployed(address artToken, address auctionHouse); @@ -28,26 +27,25 @@ contract Deployer { * @notice Deploys upgradeable `ArtToken` and `AuctionHouse` instances. * * @dev The constructor performs the following steps: - * 1. Computes the expected proxy addresses using the current - * contract nonce (deploy order is deterministic). - * 2. Deploys the implementation contracts, passing the computed - * proxy addresses so they can reference each other. + * 1. Computes the expected proxy addresses using the current contract nonce (deploy + * order is deterministic). + * 2. Deploys the implementation contracts, passing the computed proxy addresses so they + * can reference each other. * 3. Deploys the transparent proxies via {Deployment.deployUpgradeableContract}. - * 4. Reverts with {DeployerIncorrectAddress} if the actual proxy - * addresses do not match the pre-computed ones (should never - * happen unless the deployment order changes). - * 5. Calls `initialize` on the ArtToken proxy to set `name` and - * `symbol`. + * 4. Reverts with {DeployerIncorrectAddress} if the actual proxy addresses do not + * match the pre-computed ones (should never happen unless the deployment order + * changes). + * 5. Calls `initialize` on the ArtToken proxy to set `name` and `symbol`. * 6. Emits {Deployed}. * - * @param name ERC-721 collection name. - * @param symbol ERC-721 collection symbol. - * @param main Address that will be set as {RoleSystem.MAIN}. - * @param usdc Address of the USDC token contract. - * @param minPrice Global minimum primary-sale price. - * @param minFee Global minimum platform fee. - * @param minAuctionDuration Minimum auction duration (seconds) enforced by AuctionHouse. - * @param regulated Whether the ArtToken collection is transfer-restricted. + * @param name ERC-721 collection name. + * @param symbol ERC-721 collection symbol. + * @param main Address that will be set as {RoleSystem.MAIN}. + * @param usdc Address of the USDC token contract. + * @param minPrice Global minimum primary-sale price. + * @param minFee Global minimum platform fee. + * @param minAuctionDuration Minimum auction duration (seconds) enforced by AuctionHouse. + * @param regulated Whether the ArtToken collection is transfer-restricted. */ constructor( string memory name, diff --git a/contracts/utils/Deployment.sol b/contracts/utils/Deployment.sol index b86fd9b..e85f397 100644 --- a/contracts/utils/Deployment.sol +++ b/contracts/utils/Deployment.sol @@ -6,25 +6,22 @@ import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transpa /** * @title Deployment * - * @notice Helper library that simplifies contract deployment logic used in the - * protocol scripts. + * @notice Helper library that simplifies contract deployment logic used in the protocol scripts. * * @dev Currently exposes two low-level utilities: - * 1. {deployUpgradeableContract} — deploys an `TransparentUpgradeableProxy` - * pointing to an implementation contract. - * 2. {calculateContractAddress} — deterministic computation of the address - * of a contract that would be deployed by `account` at a given nonce - * (matching the algorithm used by the EVM). + * 1. {deployUpgradeableContract} — deploys an `TransparentUpgradeableProxy` pointing to an + * implementation contract. + * 2. {calculateContractAddress} — deterministic computation of the address of a contract + * that would be deployed by `account` at a given nonce (matching the algorithm used + * by the EVM). */ library Deployment { /** - * @notice Deploys a `TransparentUpgradeableProxy` with the provided - * implementation and admin. + * @notice Deploys a `TransparentUpgradeableProxy` with the provided implementation and + * admin. * - * @param impl Address of the implementation contract that the - * proxy will delegate‐call to. - * @param proxyAdminOwner Address that will become the owner of the proxy's - * admin contract. + * @param impl Address of the implementation contract that the proxy will delegate‐call to. + * @param proxyAdminOwner Address that will become the owner of the proxy's admin contract. * * @return proxy Address of the newly deployed proxy. */ @@ -33,16 +30,13 @@ library Deployment { } /** - * @notice Predicts the address of a future deployment by `account` at the - * specified nonce. + * @notice Predicts the address of a future deployment by `account` at the specified nonce. * - * @dev Mirrors the algorithm used by the `CREATE` opcode. Only supports - * nonces up to `0xffffff` to avoid unnecessary dynamic memory in - * encoding logic. + * @dev Mirrors the algorithm used by the `CREATE` opcode. Only supports nonces up to + * `0xffffff` to avoid unnecessary dynamic memory in encoding logic. * * @param account Deployer address. - * @param nonce Nonce of the deploying account at the time of the future - * deployment. + * @param nonce Nonce of the deploying account at the time of the future deployment. * * @return predicted Address the contract will be deployed to. */ diff --git a/contracts/utils/Distribution.sol b/contracts/utils/Distribution.sol index 6849d90..c5cfe53 100644 --- a/contracts/utils/Distribution.sol +++ b/contracts/utils/Distribution.sol @@ -8,11 +8,10 @@ import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; /** * @title Distribution * - * @notice Library for deterministic ERC-20 reward splitting. + * @notice Library for deterministic ERC-20 amount splitting. * - * @dev Provides helpers to safely distribute `reward` among `participants` - * given a {TOTAL_SHARE}-denominated `shares` array (10,000 — - * i.e. basis points). + * @dev Provides helpers to safely distribute `amount` among `participants` given a + * {TOTAL_SHARE}-denominated `shares` array (10,000 — i.e. basis points). */ library Distribution { using SafeERC20 for IERC20; @@ -23,50 +22,53 @@ library Distribution { uint256 internal constant TOTAL_SHARE = 10_000; /** - * @notice Performs a validation pass and then distributes `reward` between - * `participants` according to `shares`. + * @notice Performs a validation pass and then distributes `amount` between `participants` + * according to `shares`. * - * @dev Reverts with one of the custom errors declared at the bottom of the - * contract if validation fails. Uses {SafeERC20.safeTransfer} to guard - * against non-standard ERC-20s. + * @dev Reverts with one of the custom errors declared at the bottom of the contract if + * validation fails. Uses {SafeERC20.safeTransfer} to guard against non-standard ERC-20s. * - * @param asset ERC20 asset address. - * @param reward Amount to distribute. - * @param participants Addresses that will receive a portion of `reward`. - * @param shares Shares (in basis points) assigned to each participant. + * @param currency ERC20 currency address. + * @param amount Amount to distribute. + * @param participants Addresses that will receive a portion of `amount`. + * @param shares Shares (in basis points) assigned to each participant. */ function safeDistribute( - IERC20 asset, - uint256 reward, + IERC20 currency, + uint256 amount, address[] memory participants, uint256[] memory shares ) internal { requireValidConditions(participants, shares); - distribute(asset, reward, participants, shares); + distribute(currency, amount, participants, shares); } /** - * @notice Distributes `reward` between `participants` according to `shares`. + * @notice Distributes `amount` between `participants` according to `shares`. * - * @dev Performs **no** parameter validation — callers MUST ensure that - * {requireValidConditions} has been invoked prior to calling this - * function. + * @dev Performs **no** parameter validation — callers MUST ensure that {requireValidConditions} + * has been invoked prior to calling this function. * - * @param asset ERC20 asset address. - * @param reward Amount to distribute. - * @param participants Addresses that will receive a portion of `reward`. - * @param shares Shares (in basis points) assigned to each participant. + * @param currency ERC20 currency address. + * @param amount Amount to distribute. + * @param participants An array of participant addresses. + * @param shares An array of shares (in basis points) corresponding to each participant. */ - function distribute(IERC20 asset, uint256 reward, address[] memory participants, uint256[] memory shares) internal { - uint256 lastShareIndex = shares.length - 1; + function distribute( + IERC20 currency, + uint256 amount, + address[] memory participants, + uint256[] memory shares + ) internal { + uint256 lastIndex = participants.length - 1; uint256 distributed = 0; - for (uint256 i = 0; i < lastShareIndex; ) { - uint256 value = Math.mulDiv(reward, shares[i], TOTAL_SHARE); + for (uint256 i = 0; i < lastIndex; ) { + uint256 value = Math.mulDiv(amount, shares[i], TOTAL_SHARE); distributed += value; - asset.safeTransfer(participants[i], value); + currency.safeTransfer(participants[i], value); unchecked { i++; @@ -74,7 +76,7 @@ library Distribution { } // calculates last share out of loop not to lose wei after division - asset.safeTransfer(participants[lastShareIndex], reward - distributed); + currency.safeTransfer(participants[lastIndex], amount - distributed); } /** @@ -83,67 +85,26 @@ library Distribution { * @dev Reverts with a custom error if: * - `participants` and `shares` lengths mismatch; * - Any participant is the zero address; - * - Any share is zero (via {_sumShares}); - * - Sum of shares exceeds {TOTAL_SHARE} or is below it. + * - Any share is zero; + * - The sum of `shares` does not equal {TOTAL_SHARE}. * - * @param participants Array with participants address. - * @param shares Shares (in basis points) corresponding to each participant. + * @param participants An array of participant addresses. + * @param shares An array of shares (in basis points) corresponding to each participant. */ function requireValidConditions(address[] memory participants, uint256[] memory shares) internal pure { - uint256 participantsLen = participants.length; + uint256 participantsCount = participants.length; - if (participantsLen != shares.length) { + if (participantsCount != shares.length) { revert DistributionParticipantsSharesMismatch(); } - for (uint256 i = 0; i < participantsLen; ) { + uint256 sharesSum = 0; + + for (uint256 i = 0; i < participantsCount; ) { if (participants[i] == address(0)) { revert DistributionZeroAddress(); } - unchecked { - i++; - } - } - - uint256 sharesSum = _sumShares(shares); - - if (sharesSum < TOTAL_SHARE) { - revert DistributionSharesSumTooLow(sharesSum); - } - } - - /** - * @notice Calculates the unallocated share given an array of `shares`. - * - * @dev Useful for determining the last participant's share when the - * other shares are known but do not yet sum to {TOTAL_SHARE}. - * - * @param shares Array containing shares expressed in basis points. - * - * @return remaining The difference between {TOTAL_SHARE} and the sum - * of provided `shares`. - */ - function remainingShare(uint256[] memory shares) internal pure returns (uint256 remaining) { - return TOTAL_SHARE - _sumShares(shares); - } - - /** - * @dev Internal helper that sums the `shares` array while enforcing - * invariants. - * - * Requirements: - * - Every share must be non-zero ({DistributionZeroShare}); - * - Running total must not exceed {TOTAL_SHARE} ({DistributionSharesSumTooBig}). - * - * @param shares Array of shares in basis points. - * - * @return sharesSum Cumulative sum of the shares. - */ - function _sumShares(uint256[] memory shares) private pure returns (uint256 sharesSum) { - uint256 sharesLen = shares.length; - - for (uint256 i = 0; i < sharesLen; ) { uint256 share = shares[i]; if (share == 0) { @@ -157,25 +118,20 @@ library Distribution { } } - if (sharesSum > TOTAL_SHARE) { - revert DistributionSharesSumTooBig(sharesSum); + if (sharesSum != TOTAL_SHARE) { + revert DistributionSharesSumInvalid(sharesSum); } } - /** - * @dev Thrown when `participants.length != shares.length`. - */ + /// @dev Thrown when `participants.length != shares.length`. error DistributionParticipantsSharesMismatch(); - /// @dev Thrown when a share value of zero is encountered. + /// @dev Thrown when a share value is zero. error DistributionZeroShare(); - /// @dev Thrown when a participant address is the zero address. + /// @dev Thrown when a participant address is zero. error DistributionZeroAddress(); - /// @dev Thrown when `sum(shares) < TOTAL_SHARE`. - error DistributionSharesSumTooLow(uint256 shareSum); - - /// @dev Thrown when `sum(shares) > TOTAL_SHARE`. - error DistributionSharesSumTooBig(uint256 shareSum); + /// @dev Thrown when `sum(shares) != TOTAL_SHARE`. + error DistributionSharesSumInvalid(uint256 sharesSum); } diff --git a/contracts/utils/EIP712Domain.sol b/contracts/utils/EIP712Domain.sol index aa4779e..f25fe76 100644 --- a/contracts/utils/EIP712Domain.sol +++ b/contracts/utils/EIP712Domain.sol @@ -4,11 +4,11 @@ pragma solidity ^0.8.20; /** * @title EIP712Domain * - * @notice Minimal helper that constructs an EIP-712 domain separator once at - * deployment time and exposes it as an immutable constant. + * @notice Minimal helper that constructs an EIP-712 domain separator once at deployment time and + * exposes it as an immutable constant. * - * @dev Designed to be inherited by contracts that need typed-data signatures. - * Follows the standard domain schema: + * @dev Designed to be inherited by contracts that need typed-data signatures. Follows the standard + * domain schema: * `EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)`. */ contract EIP712Domain { @@ -32,9 +32,11 @@ contract EIP712Domain { bytes32 public immutable DOMAIN_SEPARATOR; /** + * @notice Contract constructor. + * * @param verifyingContract Address of the contract that will verify signatures (usually the proxy). - * @param name Human-readable name of the signing domain. - * @param version Current major version of the signing domain. + * @param name Human-readable name of the signing domain. + * @param version Current major version of the signing domain. */ constructor(address verifyingContract, string memory name, string memory version) { if (verifyingContract == address(0)) revert EIP712DomainMisconfiguration(0); @@ -53,8 +55,8 @@ contract EIP712Domain { } /** - * @dev Thrown when a constructor argument at position `argIndex` is invalid - * (zero address or empty string). + * @dev Thrown when a constructor argument at position `argIndex` is invalid (zero address or + * empty string). */ error EIP712DomainMisconfiguration(uint256 argIndex); } diff --git a/contracts/utils/EIP712Signature.sol b/contracts/utils/EIP712Signature.sol index 39c7e25..50f4340 100644 --- a/contracts/utils/EIP712Signature.sol +++ b/contracts/utils/EIP712Signature.sol @@ -7,20 +7,20 @@ import {MessageHashUtils} from "@openzeppelin/contracts/utils/cryptography/Messa /** * @title EIP712Signature * - * @notice Lightweight helper for recovering the signer of an EIP-712 typed-data - * signature. Combines OpenZeppelin's {ECDSA} and {MessageHashUtils}. + * @notice Lightweight helper for recovering the signer of an EIP-712 typed-data signature. + * Combines OpenZeppelin's {ECDSA} and {MessageHashUtils}. * - * @dev Reverts with {EIP712SignatureZeroAddress} if signature recovery yields - * the zero address (which indicates an invalid signature). + * @dev Reverts with {EIP712SignatureZeroAddress} if signature recovery yields the zero address + * (which indicates an invalid signature). */ library EIP712Signature { /** - * @notice Recovers the signer of an EIP-712 `{structHash}` bound to the - * provided `domainSeparator`. + * @notice Recovers the signer of an EIP-712 `{structHash}` bound to the provided + * `domainSeparator`. * * @param domainSeparator The domain separator used when signing. - * @param structHash Hash of the typed data structure being signed. - * @param signature 65/64-byte ECDSA signature produced by the signer. + * @param structHash Hash of the typed data structure being signed. + * @param signature 65/64-byte ECDSA signature produced by the signer. * * @return signer Address that produced the signature. */ diff --git a/contracts/utils/MarketDeployer.sol b/contracts/utils/MarketDeployer.sol new file mode 100644 index 0000000..13fd908 --- /dev/null +++ b/contracts/utils/MarketDeployer.sol @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity ^0.8.20; + +import {Market} from "../market/Market.sol"; +import {Deployment} from "./Deployment.sol"; + +/** + * @title MarketDeployer + * + * @notice Helper contract that deploys the `Market` contract behind a transparent upgradeable + * proxy. + */ +contract MarketDeployer { + /// @notice Emitted once the proxy contract is deployed. + /// @param market Address of the newly deployed Market proxy. + event Deployed(address market); + + /** + * @notice Deploys upgradeable `Market` instance. + * + * @dev The constructor performs the following steps: + * 1. Computes the expected proxy addresses using the current contract nonce (deploy + * order is deterministic). + * 2. Deploys the implementation contract. + * 3. Deploys the transparent proxy via {Deployment.deployUpgradeableContract}. + * 4. Reverts with {DeployerIncorrectAddress} if the actual proxy addresses do not + * match the pre-computed ones (should never happen unless the deployment order + * changes). + * 5. Emits {Deployed}. + * + * @param main Address that will be set as {RoleSystem.MAIN}. + */ + constructor(address main) { + address calculatedMarketProxy = Deployment.calculateContractAddress(address(this), 2); + + address marketImpl = address(new Market(calculatedMarketProxy, main)); + + address marketProxy = Deployment.deployUpgradeableContract(marketImpl, main); + + if (marketProxy != calculatedMarketProxy) revert DeployerIncorrectAddress(); + + emit Deployed(marketProxy); + } + + /// @dev Thrown when the proxy is not deployed at the expected deterministic address. + error DeployerIncorrectAddress(); +} diff --git a/contracts/utils/Roles.sol b/contracts/utils/Roles.sol index 66e4732..4a265d6 100644 --- a/contracts/utils/Roles.sol +++ b/contracts/utils/Roles.sol @@ -4,17 +4,20 @@ pragma solidity ^0.8.20; /** * @title Roles * - * @notice Defines keccak256 hashed identifiers for role-based access control - * used across the protocol. These identifiers are consumed by the - * {RoleSystem} mix-in and contracts that inherit from it. + * @notice Defines keccak256 hashed identifiers for role-based access control used across the + * protocol. These identifiers are consumed by the {RoleSystem} mix-in and contracts that + * inherit from it. */ library Roles { - /// @notice Role that owns protocol fees and treasury funds. + /// @dev Role that owns protocol fees and treasury funds. bytes32 internal constant FINANCIAL_ROLE = keccak256("FINANCIAL_ROLE"); - /// @notice Whitelist role for regulated ArtToken transfers. + /// @dev Whitelist role for regulated ArtToken transfers. bytes32 internal constant PARTNER_ROLE = keccak256("PARTNER_ROLE"); - /// @notice Role allowed to sign off-chain permits and other authorizations. + /// @dev Role allowed to sign off-chain permits and other authorizations. bytes32 internal constant SIGNER_ROLE = keccak256("SIGNER_ROLE"); + + /// @dev Role allowed to perform admin actions. + bytes32 internal constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); } diff --git a/contracts/utils/SafeERC20BulkTransfer.sol b/contracts/utils/SafeERC20BulkTransfer.sol new file mode 100644 index 0000000..993ea2a --- /dev/null +++ b/contracts/utils/SafeERC20BulkTransfer.sol @@ -0,0 +1,78 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity ^0.8.20; + +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; + +/** + * @title SafeERC20BulkTransfer + * + * @notice A library for performing safe bulk transfers of ERC20 tokens. + * + * @dev This library provides a `safeTransfer` function that iterates over arrays of receivers and + * values to transfer tokens to multiple recipients. It includes validation to ensure the + * input arrays are consistent and that the total transferred amount matches the expected + * amount. + */ +library SafeERC20BulkTransfer { + /** + * @notice Safely transfers ERC20 tokens to multiple receivers. + * + * @dev Reverts if the lengths of the `receivers` and `values` arrays do not match, if a + * receiver is the zero address, if a value is zero, or if the sum of `values` does not + * equal `amount`. + * + * @param currency The ERC20 token to transfer. + * @param amount The total amount of tokens to be transferred. + * @param receivers An array of addresses to receive the tokens. + * @param values An array of amounts to be transferred to each receiver. + */ + function safeTransfer( + IERC20 currency, + uint256 amount, + address[] calldata receivers, + uint256[] calldata values + ) internal { + uint256 receiversCount = receivers.length; + + if (receiversCount != values.length) { + revert SafeERC20BulkTransferInvalidInputLengths(); + } + + uint256 transferred = 0; + + for (uint256 i; i < receiversCount; ) { + address receiver = receivers[i]; + uint256 value = values[i]; + + if (receiver == address(0)) { + revert SafeERC20BulkTransferZeroAddress(); + } + + if (value == 0) { + revert SafeERC20BulkTransferZeroValue(); + } + + SafeERC20.safeTransfer(currency, receiver, value); + + transferred += value; + + unchecked { + i++; + } + } + + if (amount != transferred) { + revert SafeERC20BulkTransferIncorrectTotalAmount(); + } + } + + /// @dev Thrown when the lengths of the `receivers` and `values` arrays do not match. + error SafeERC20BulkTransferInvalidInputLengths(); + /// @dev Thrown when a receiver's address is the zero address. + error SafeERC20BulkTransferZeroAddress(); + /// @dev Thrown when a transfer value is zero. + error SafeERC20BulkTransferZeroValue(); + /// @dev Thrown when the sum of `values` does not equal the total `amount`. + error SafeERC20BulkTransferIncorrectTotalAmount(); +} diff --git a/contracts/utils/currency-manager/CurrencyManager.sol b/contracts/utils/currency-manager/CurrencyManager.sol new file mode 100644 index 0000000..6d4477e --- /dev/null +++ b/contracts/utils/currency-manager/CurrencyManager.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {RoleSystem} from "../role-system/RoleSystem.sol"; +import {Roles} from "../Roles.sol"; +import {CurrencyManagerStorage} from "./CurrencyManagerStorage.sol"; +import {ICurrencyManager} from "./ICurrencyManager.sol"; + +/** + * @title CurrencyManager + * + * @notice Abstract contract that implements the logic for managing allowed currencies. + */ +abstract contract CurrencyManager is ICurrencyManager, RoleSystem { + /** + * @inheritdoc ICurrencyManager + */ + function updateCurrencyStatus(address currency, bool allowed) external onlyRole(Roles.ADMIN_ROLE) { + CurrencyManagerStorage.Layout storage $ = CurrencyManagerStorage.layout(); + + $.allowed[currency] = allowed; + + emit CurrencyStatusUpdated(currency, allowed); + } + + /** + * @inheritdoc ICurrencyManager + */ + function currencyAllowed(address currency) public view returns (bool allowed) { + return CurrencyManagerStorage.layout().allowed[currency]; + } +} diff --git a/contracts/utils/currency-manager/CurrencyManagerStorage.sol b/contracts/utils/currency-manager/CurrencyManagerStorage.sol new file mode 100644 index 0000000..1539a9c --- /dev/null +++ b/contracts/utils/currency-manager/CurrencyManagerStorage.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +/** + * @title CurrencyManagerStorage + * + * @notice Defines the storage layout for {CurrencyManager}. Using a deterministic slot makes the + * module safe for use behind proxies and alongside other upgradeable components. + */ +library CurrencyManagerStorage { + /// @dev Unique storage slot for the layout, computed using EIP-7201 convention. + bytes32 private constant STORAGE_SLOT = + keccak256(abi.encode(uint256(keccak256("digital-original.storage.CurrencyManager")) - 1)) & + ~bytes32(uint256(0xff)); + + /** + * @custom:storage-location erc7201:digital-original.storage.CurrencyManager + */ + struct Layout { + mapping(address => bool) allowed; + } + + /** + * @notice Returns a pointer to the storage layout. + * + * @return $ The pointer to the Layout struct in storage. + */ + function layout() internal pure returns (Layout storage $) { + bytes32 slot = STORAGE_SLOT; + + // solhint-disable-next-line + assembly { + $.slot := slot + } + } +} diff --git a/contracts/utils/currency-manager/ICurrencyManager.sol b/contracts/utils/currency-manager/ICurrencyManager.sol new file mode 100644 index 0000000..a81653d --- /dev/null +++ b/contracts/utils/currency-manager/ICurrencyManager.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +/** + * @title ICurrencyManager + * + * @notice Manages the list of allowed currencies for market transactions. + */ +interface ICurrencyManager { + /** + * @notice Emitted when the status of a currency is updated. + * + * @param currency The address of the currency contract. + * @param allowed True if the currency is allowed, false otherwise. + */ + event CurrencyStatusUpdated(address currency, bool allowed); + + /** + * @notice Updates the status of a currency. + * + * @dev This function can only be called by an account with the ADMIN_ROLE. + * + * @param currency The address of the ERC20 token contract to update. + * @param allowed The new status of the currency. + */ + function updateCurrencyStatus(address currency, bool allowed) external; + + /** + * @notice Checks if a currency is allowed. + * + * @param currency The address of the currency to check. + * + * @return allowed True if the currency is allowed, false otherwise. + */ + function currencyAllowed(address currency) external view returns (bool allowed); +} diff --git a/contracts/utils/role-system/IRoleSystem.sol b/contracts/utils/role-system/IRoleSystem.sol index b8abd6a..21aacbd 100644 --- a/contracts/utils/role-system/IRoleSystem.sol +++ b/contracts/utils/role-system/IRoleSystem.sol @@ -4,15 +4,15 @@ pragma solidity ^0.8.20; /** * @title IRoleSystem * - * @notice Interface describing the on-chain role-based access-control system - * used by the protocol. Provides both multi-owner roles (grant/revoke) - * and unique roles (single owner, transferable). + * @notice Interface describing the on-chain role-based access-control system used by the + * protocol. Provides both multi-owner roles (grant/revoke) and unique roles + * (single owner, transferable). */ interface IRoleSystem { /** * @notice Emitted when `role` is granted to `account`. * - * @param role Identifier of the role granted. + * @param role Identifier of the role granted. * @param account Recipient account that now possesses the role. */ event RoleGranted(bytes32 indexed role, address indexed account); @@ -20,7 +20,7 @@ interface IRoleSystem { /** * @notice Emitted when `role` is revoked from `account`. * - * @param role Identifier of the role revoked. + * @param role Identifier of the role revoked. * @param account Account that lost the role. */ event RoleRevoked(bytes32 indexed role, address indexed account); @@ -28,7 +28,7 @@ interface IRoleSystem { /** * @notice Emitted when ownership of a unique role is transferred. * - * @param role Identifier of the unique role. + * @param role Identifier of the unique role. * @param newOwner Address that becomes the new (sole) owner of the role. */ event UniqueRoleTransferred(bytes32 indexed role, address indexed newOwner); @@ -52,11 +52,11 @@ interface IRoleSystem { /** * @notice Transfers `uniqueRole` from the previous role owner to `newOwner`. * - * @dev Passing the zero address as `newOwner` will effectively revoke the - * role without assigning it to anyone. + * @dev Passing the zero address as `newOwner` will effectively revoke the role without + * assigning it to anyone. * * @param uniqueRole The role to be transferred. - * @param newOwner The new owner of the unique role (may be address(0)). + * @param newOwner The new owner of the unique role (may be address(0)). */ function transferUniqueRole(bytes32 uniqueRole, address newOwner) external; @@ -65,8 +65,9 @@ interface IRoleSystem { * * @dev Reverts with {RoleSystemZeroAddress} when `account` is the zero address. * - * @param role The role to query. + * @param role The role to query. * @param account The account to query. + * * @return true if `account` possesses `role`, false otherwise. */ function hasRole(bytes32 role, address account) external view returns (bool); @@ -74,20 +75,27 @@ interface IRoleSystem { /** * @notice Returns the sole owner of `uniqueRole`. * - * @dev Reverts with {RoleSystemZeroAddress} when the role is currently - * unassigned. + * @dev Reverts with {RoleSystemZeroAddress} when the role is currently unassigned. * * @param uniqueRole The unique role to query. + * * @return owner Address of the current role owner. */ function uniqueRoleOwner(bytes32 uniqueRole) external view returns (address owner); /** - * @dev Thrown when a function restricted to the main role owner is called - * by another account. + * @dev Thrown when a function restricted to the main role owner is called by another account. */ error RoleSystemNotMain(); + /** + * @dev Thrown when an account does not have the required role. + * + * @param account The account that does not have the required role. + * @param requiredRole The required role. + */ + error RoleSystemUnauthorizedAccount(address account, bytes32 requiredRole); + /** * @dev Thrown when the zero address is supplied where a non-zero address is required. */ diff --git a/contracts/utils/role-system/RoleSystem.sol b/contracts/utils/role-system/RoleSystem.sol index 0fea6a4..8be11de 100644 --- a/contracts/utils/role-system/RoleSystem.sol +++ b/contracts/utils/role-system/RoleSystem.sol @@ -8,20 +8,19 @@ import {IRoleSystem} from "./IRoleSystem.sol"; * @title RoleSystem * * @notice Concrete implementation of {IRoleSystem}. Stores role mappings in an - * unstructured-storage slot defined by {RoleSystemStorage} and exposes - * simple grant/revoke/transfer helpers restricted to the immutable - * {MAIN} administrator. + * unstructured-storage slot defined by {RoleSystemStorage} and exposes simple + * grant/revoke/transfer helpers restricted to the immutable {MAIN} administrator. */ contract RoleSystem is IRoleSystem { /** - * @notice Account endowed with full administrative privileges over the - * role system (grant, revoke, transfer unique roles). + * @notice Account endowed with full administrative privileges over the role system (grant, + * revoke, transfer unique roles). */ address public immutable MAIN; /** - * @dev Restricts a function so it can only be executed by {MAIN}. Reverts - * with {RoleSystemNotMain} otherwise. + * @notice Restricts a function so it can only be executed by {MAIN}. Reverts with + * {RoleSystemNotMain} otherwise. */ modifier onlyMain() { if (msg.sender != MAIN) { @@ -32,6 +31,22 @@ contract RoleSystem is IRoleSystem { } /** + * @notice Restricts a function so it can only be executed by an account that has `role`. + * Reverts with {RoleSystemUnauthorizedAccount} otherwise. + * + * @param role The role required to call the function. + */ + modifier onlyRole(bytes32 role) { + if (!hasRole(role, msg.sender)) { + revert RoleSystemUnauthorizedAccount(msg.sender, role); + } + + _; + } + + /** + * @notice Contract constructor. + * * @param main Address that will be set as {MAIN}. Cannot be zero. * * @dev Reverts with {RoleSystemMisconfiguration} if `main` is the zero address. @@ -101,8 +116,14 @@ contract RoleSystem is IRoleSystem { _requireNotZeroAddress(owner); } + /** + * @notice Internal helper that standardises zero-address checks across the contract. + * + * @dev Reverts with {RoleSystemZeroAddress} if `account` is the zero address. + * + * @param account The address to check. + */ function _requireNotZeroAddress(address account) private pure { - // Internal helper that standardises zero-address checks across the contract. if (account == address(0)) { revert RoleSystemZeroAddress(); } diff --git a/contracts/utils/role-system/RoleSystemStorage.sol b/contracts/utils/role-system/RoleSystemStorage.sol index 26249b6..a690d91 100644 --- a/contracts/utils/role-system/RoleSystemStorage.sol +++ b/contracts/utils/role-system/RoleSystemStorage.sol @@ -4,10 +4,8 @@ pragma solidity ^0.8.20; /** * @title RoleSystemStorage * - * @notice Defines the unstructured storage layout for {RoleSystem}. Using a - * dedicated storage slot allows the role system to be used behind - * proxies and composed with other modules without risk of slot - * collisions. + * @notice Defines the storage layout for {RoleSystem}. Using a deterministic slot makes the + * module safe for use behind proxies and alongside other upgradeable components. */ library RoleSystemStorage { /// @dev Unique storage slot for the layout, computed using EIP-7201 convention. @@ -23,9 +21,9 @@ library RoleSystemStorage { } /** - * @notice Returns a pointer to the pre-allocated storage layout. + * @notice Returns a pointer to the storage layout. * - * @return $ Storage struct with role mappings. + * @return $ The pointer to the Layout struct in storage. */ function layout() internal pure returns (Layout storage $) { bytes32 slot = STORAGE_SLOT; diff --git a/hardhat.config.ts b/hardhat.config.ts index 1bdba02..0e73143 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -9,13 +9,16 @@ import './tasks'; import type { HardhatUserConfig } from 'hardhat/config'; import type { NetworksUserConfig } from 'hardhat/types'; -import type { RecordConfigCollection, RecordConfigEnv } from './types/environment'; +import type { + ChainConfigTop, + CollectionConfig, + CollectionConfigTop, + MarketConfig, + MarketConfigTop, + ProtocolConfig, +} from './types/environment'; -dotenv.config(); - -const configEnv = yaml.load(fs.readFileSync('./config.env.yaml', 'utf8')); -const configDo = yaml.load(fs.readFileSync('./config.do.yaml', 'utf8')); -const configDn = yaml.load(fs.readFileSync('./config.dn.yaml', 'utf8')); +dotenv.config(); // TODO: Migrate params from `.env` to `config.env.yaml` const ENV_MODE = String(process.env.ENV_MODE); const COLLECTION = <'do' | 'dn'>String(process.env.COLLECTION); @@ -27,6 +30,24 @@ const REPORT_GAS = Boolean(process.env.REPORT_GAS === 'true'); const ETHERSCAN_API_KEY = String(process.env.ETHERSCAN_API_KEY); const COINMARKETCAP_API_KEY = String(process.env.COINMARKETCAP_API_KEY); +const chainConfigTop = yaml.load(fs.readFileSync('./config.env.yaml', 'utf8')); +const marketConfigTop = yaml.load(fs.readFileSync('./config.market.yaml', 'utf8')); +let collectionConfigTop: CollectionConfigTop; + +if (COLLECTION == 'do') { + collectionConfigTop = ( + yaml.load(fs.readFileSync('./config.do.yaml', 'utf8')) + ); +} else if (COLLECTION == 'dn') { + collectionConfigTop = ( + yaml.load(fs.readFileSync('./config.dn.yaml', 'utf8')) + ); +} else if (ENV_MODE === 'test') { + // skip +} else { + throw new Error(`Invalid 'COLLECTION' value: ${COLLECTION}`); +} + const hardhatBaseConfig: HardhatUserConfig = { solidity: { compilers: [ @@ -57,7 +78,13 @@ const hardhatBaseConfig: HardhatUserConfig = { }, }; -const hardhatTestConfig: HardhatUserConfig = {}; +const hardhatTestConfig: HardhatUserConfig = { + networks: { + hardhat: { + allowUnlimitedContractSize: true, + }, + }, +}; const hardhatEtherscanConfig: HardhatUserConfig = { etherscan: { apiKey: ETHERSCAN_API_KEY }, @@ -68,41 +95,41 @@ function buildHardhatConfig(): HardhatUserConfig { return { ...hardhatBaseConfig, ...hardhatTestConfig }; } - let configCollection: RecordConfigCollection; - - if (COLLECTION == 'do') { - configCollection = configDo; - } else if (COLLECTION == 'dn') { - configCollection = configDn; - } else { - throw new Error(`Invalid 'COLLECTION' value: ${COLLECTION}`); - } - const hardhatNetworksConfig: NetworksUserConfig = {}; - for (const [chainName, _configEnv] of Object.entries(configEnv)) { - const _configCollection = configCollection[chainName]; + for (const [chainName, chainConfig] of Object.entries(chainConfigTop)) { + const collectionConfig = collectionConfigTop[chainName]; + const marketConfig = marketConfigTop[chainName]; + + const { chainId, url, deployerPrivateKey, usdc, main } = chainConfig; + + const collection: CollectionConfig = { + name: collectionConfigTop.name, + symbol: collectionConfigTop.symbol, + minPriceUsd: collectionConfig.minPriceUsd, + minFeeUsd: collectionConfig.minFeeUsd, + regulated: collectionConfig.regulated, + minAuctionDurationHours: collectionConfig.minAuctionDurationHours, + artToken: collectionConfig.artToken, + auctionHouse: collectionConfig.auctionHouse, + }; - const { chainId, url, deployerPrivateKey, usdc, main } = _configEnv; + const market: MarketConfig = { + market: marketConfig.market, + }; - const extra = { - name: configCollection.name, - symbol: configCollection.symbol, - usdc, + const protocolConfig: ProtocolConfig = { main, - minPriceUsd: _configCollection.minPriceUsd, - minFeeUsd: _configCollection.minFeeUsd, - regulated: _configCollection.regulated, - minAuctionDurationHours: _configCollection.minAuctionDurationHours, - artToken: _configCollection.artToken, - auctionHouse: _configCollection.auctionHouse, + usdc, + collection, + market, }; hardhatNetworksConfig[chainName] = { chainId, url, accounts: [deployerPrivateKey], - ...extra, + ...{ protocolConfig }, }; } @@ -116,24 +143,24 @@ function buildHardhatConfig(): HardhatUserConfig { if (CHAIN_TO_FORK) { hardhatNetworksConfig['hardhat'] = { - forking: { url: configEnv[CHAIN_TO_FORK].url }, + forking: { url: chainConfigTop[CHAIN_TO_FORK].url }, accounts: [ { - privateKey: configEnv[CHAIN_TO_FORK].deployerPrivateKey, + privateKey: chainConfigTop[CHAIN_TO_FORK].deployerPrivateKey, balance: parseEther('100').toString(), }, ], }; } - const hardhatConfig: HardhatUserConfig = { + const hardhatUserConfig: HardhatUserConfig = { networks: hardhatNetworksConfig, }; return { ...hardhatBaseConfig, ...hardhatEtherscanConfig, - ...hardhatConfig, + ...hardhatUserConfig, }; } diff --git a/package-lock.json b/package-lock.json index 504b133..6409887 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,17 +9,17 @@ "version": "1.0.0", "license": "UNLICENSED", "dependencies": { - "@nomicfoundation/hardhat-toolbox": "^5.0.0", + "@nomicfoundation/hardhat-toolbox": "^6.0.0", "@openzeppelin/contracts": "^5.0.2", "@openzeppelin/contracts-upgradeable": "^5.0.2", "@types/js-yaml": "^4.0.9", "dotenv": "^16.5.0", - "ethers": "^6.14.3", - "hardhat": "^2.24.1", + "ethers": "^6.14.4", + "hardhat": "^2.25.0", "husky": "^9.1.7", "js-yaml": "^4.1.0", - "lint-staged": "^16.1.0", - "prettier": "^3.5.3", + "lint-staged": "^16.1.2", + "prettier": "^3.6.0", "prettier-plugin-solidity": "^2.0.0", "solhint": "^5.1.0" } @@ -68,6 +68,17 @@ "integrity": "sha512-mNm/lblgES8UkVle8rGImXOz4TtL3eU3inHay/7TVchkKrb/lgcVvTK0+VAw8p5zQ0rgQsXm1j5dOlAAd+MeoA==", "license": "(Apache-2.0 WITH LLVM-exception)" }, + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">=0.1.90" + } + }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -259,27 +270,6 @@ "@ethersproject/bytes": "^5.8.0" } }, - "node_modules/@ethersproject/basex": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.8.0.tgz", - "integrity": "sha512-PIgTszMlDRmNwW9nhS6iqtVfdTAKosA7llYXNmGPw4YAI1PUyMv28988wAb41/gHF/WqGdoLv0erHaRcHRKW2Q==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/properties": "^5.8.0" - } - }, "node_modules/@ethersproject/bignumber": { "version": "5.8.0", "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.8.0.tgz", @@ -339,35 +329,6 @@ "@ethersproject/bignumber": "^5.8.0" } }, - "node_modules/@ethersproject/contracts": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.8.0.tgz", - "integrity": "sha512-0eFjGz9GtuAi6MZwhb4uvUM216F38xiuR0yYCjKJpNfSEy4HUM8hvqqBj9Jmm0IUz8l0xKEhWwLIhPgxNY0yvQ==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "@ethersproject/abi": "^5.8.0", - "@ethersproject/abstract-provider": "^5.8.0", - "@ethersproject/abstract-signer": "^5.8.0", - "@ethersproject/address": "^5.8.0", - "@ethersproject/bignumber": "^5.8.0", - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/constants": "^5.8.0", - "@ethersproject/logger": "^5.8.0", - "@ethersproject/properties": "^5.8.0", - "@ethersproject/transactions": "^5.8.0" - } - }, "node_modules/@ethersproject/hash": { "version": "5.8.0", "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.8.0.tgz", @@ -395,76 +356,6 @@ "@ethersproject/strings": "^5.8.0" } }, - "node_modules/@ethersproject/hdnode": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.8.0.tgz", - "integrity": "sha512-4bK1VF6E83/3/Im0ERnnUeWOY3P1BZml4ZD3wcH8Ys0/d1h1xaFt6Zc+Dh9zXf9TapGro0T4wvO71UTCp3/uoA==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "@ethersproject/abstract-signer": "^5.8.0", - "@ethersproject/basex": "^5.8.0", - "@ethersproject/bignumber": "^5.8.0", - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/logger": "^5.8.0", - "@ethersproject/pbkdf2": "^5.8.0", - "@ethersproject/properties": "^5.8.0", - "@ethersproject/sha2": "^5.8.0", - "@ethersproject/signing-key": "^5.8.0", - "@ethersproject/strings": "^5.8.0", - "@ethersproject/transactions": "^5.8.0", - "@ethersproject/wordlists": "^5.8.0" - } - }, - "node_modules/@ethersproject/json-wallets": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.8.0.tgz", - "integrity": "sha512-HxblNck8FVUtNxS3VTEYJAcwiKYsBIF77W15HufqlBF9gGfhmYOJtYZp8fSDZtn9y5EaXTE87zDwzxRoTFk11w==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "@ethersproject/abstract-signer": "^5.8.0", - "@ethersproject/address": "^5.8.0", - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/hdnode": "^5.8.0", - "@ethersproject/keccak256": "^5.8.0", - "@ethersproject/logger": "^5.8.0", - "@ethersproject/pbkdf2": "^5.8.0", - "@ethersproject/properties": "^5.8.0", - "@ethersproject/random": "^5.8.0", - "@ethersproject/strings": "^5.8.0", - "@ethersproject/transactions": "^5.8.0", - "aes-js": "3.0.0", - "scrypt-js": "3.0.1" - } - }, - "node_modules/@ethersproject/json-wallets/node_modules/aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==", - "license": "MIT", - "peer": true - }, "node_modules/@ethersproject/keccak256": { "version": "5.8.0", "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.8.0.tgz", @@ -520,27 +411,6 @@ "@ethersproject/logger": "^5.8.0" } }, - "node_modules/@ethersproject/pbkdf2": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.8.0.tgz", - "integrity": "sha512-wuHiv97BrzCmfEaPbUFpMjlVg/IDkZThp9Ri88BpjRleg4iePJaj2SW8AIyE8cXn5V1tuAaMj6lzvsGJkGWskg==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/sha2": "^5.8.0" - } - }, "node_modules/@ethersproject/properties": { "version": "5.8.0", "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.8.0.tgz", @@ -560,88 +430,6 @@ "@ethersproject/logger": "^5.8.0" } }, - "node_modules/@ethersproject/providers": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.8.0.tgz", - "integrity": "sha512-3Il3oTzEx3o6kzcg9ZzbE+oCZYyY+3Zh83sKkn4s1DZfTUjIegHnN2Cm0kbn9YFy45FDVcuCLLONhU7ny0SsCw==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "@ethersproject/abstract-provider": "^5.8.0", - "@ethersproject/abstract-signer": "^5.8.0", - "@ethersproject/address": "^5.8.0", - "@ethersproject/base64": "^5.8.0", - "@ethersproject/basex": "^5.8.0", - "@ethersproject/bignumber": "^5.8.0", - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/constants": "^5.8.0", - "@ethersproject/hash": "^5.8.0", - "@ethersproject/logger": "^5.8.0", - "@ethersproject/networks": "^5.8.0", - "@ethersproject/properties": "^5.8.0", - "@ethersproject/random": "^5.8.0", - "@ethersproject/rlp": "^5.8.0", - "@ethersproject/sha2": "^5.8.0", - "@ethersproject/strings": "^5.8.0", - "@ethersproject/transactions": "^5.8.0", - "@ethersproject/web": "^5.8.0", - "bech32": "1.1.4", - "ws": "8.18.0" - } - }, - "node_modules/@ethersproject/providers/node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/@ethersproject/random": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.8.0.tgz", - "integrity": "sha512-E4I5TDl7SVqyg4/kkA/qTfuLWAQGXmSOgYyO01So8hLfwgKvYK5snIlzxJMk72IFdG/7oh8yuSqY2KX7MMwg+A==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/logger": "^5.8.0" - } - }, "node_modules/@ethersproject/rlp": { "version": "5.8.0", "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.8.0.tgz", @@ -662,28 +450,6 @@ "@ethersproject/logger": "^5.8.0" } }, - "node_modules/@ethersproject/sha2": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.8.0.tgz", - "integrity": "sha512-dDOUrXr9wF/YFltgTBYS0tKslPEKr6AekjqDW2dbn1L1xmjGR+9GiKu4ajxovnrDbwxAKdHjW8jNcwfz8PAz4A==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/logger": "^5.8.0", - "hash.js": "1.1.7" - } - }, "node_modules/@ethersproject/signing-key": { "version": "5.8.0", "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.8.0.tgz", @@ -708,31 +474,6 @@ "hash.js": "1.1.7" } }, - "node_modules/@ethersproject/solidity": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.8.0.tgz", - "integrity": "sha512-4CxFeCgmIWamOHwYN9d+QWGxye9qQLilpgTU0XhYs1OahkclF+ewO+3V1U0mvpiuQxm5EHHmv8f7ClVII8EHsA==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "@ethersproject/bignumber": "^5.8.0", - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/keccak256": "^5.8.0", - "@ethersproject/logger": "^5.8.0", - "@ethersproject/sha2": "^5.8.0", - "@ethersproject/strings": "^5.8.0" - } - }, "node_modules/@ethersproject/strings": { "version": "5.8.0", "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.8.0.tgz", @@ -803,40 +544,6 @@ "@ethersproject/logger": "^5.8.0" } }, - "node_modules/@ethersproject/wallet": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.8.0.tgz", - "integrity": "sha512-G+jnzmgg6UxurVKRKvw27h0kvG75YKXZKdlLYmAHeF32TGUzHkOFd7Zn6QHOTYRFWnfjtSSFjBowKo7vfrXzPA==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "@ethersproject/abstract-provider": "^5.8.0", - "@ethersproject/abstract-signer": "^5.8.0", - "@ethersproject/address": "^5.8.0", - "@ethersproject/bignumber": "^5.8.0", - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/hash": "^5.8.0", - "@ethersproject/hdnode": "^5.8.0", - "@ethersproject/json-wallets": "^5.8.0", - "@ethersproject/keccak256": "^5.8.0", - "@ethersproject/logger": "^5.8.0", - "@ethersproject/properties": "^5.8.0", - "@ethersproject/random": "^5.8.0", - "@ethersproject/signing-key": "^5.8.0", - "@ethersproject/transactions": "^5.8.0", - "@ethersproject/wordlists": "^5.8.0" - } - }, "node_modules/@ethersproject/web": { "version": "5.8.0", "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.8.0.tgz", @@ -860,30 +567,6 @@ "@ethersproject/strings": "^5.8.0" } }, - "node_modules/@ethersproject/wordlists": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.8.0.tgz", - "integrity": "sha512-2df9bbXicZws2Sb5S6ET493uJ0Z84Fjr3pC4tu/qlnZERibZCeUVuqdtt+7Tv9xxhUxHoIekIA7avrKUWHrezg==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/hash": "^5.8.0", - "@ethersproject/logger": "^5.8.0", - "@ethersproject/properties": "^5.8.0", - "@ethersproject/strings": "^5.8.0" - } - }, "node_modules/@fastify/busboy": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz", @@ -892,6 +575,109 @@ "node": ">=14" } }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "license": "ISC", + "peer": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "license": "MIT", + "peer": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "license": "MIT", + "peer": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", @@ -917,6 +703,19 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@noble/ciphers": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-1.3.0.tgz", + "integrity": "sha512-2I0gnIVPtfnMw9ee9h1dJG7tp81+8Ob3OJb3Mv37rx5L40/b0i7djjCVvGOVqc9AEIQyvyu1i6ypKdFw8R8gQw==", + "license": "MIT", + "peer": true, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@noble/curves": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", @@ -986,90 +785,90 @@ } }, "node_modules/@nomicfoundation/edr": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr/-/edr-0.11.0.tgz", - "integrity": "sha512-36WERf8ldvyHR6UAbcYsa+vpbW7tCrJGBwF4gXSsb8+STj1n66Hz85Y/O7B9+8AauX3PhglvV5dKl91tk43mWw==", + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr/-/edr-0.11.2.tgz", + "integrity": "sha512-JEFMTs5Tju+YiCsv6EO+657O/fvPaQ7bkUCkWqHFYFFbCKH1yh0PeRIaqj5h4z4O16ckxbVpAM676ZFTmvFUGQ==", "license": "MIT", "dependencies": { - "@nomicfoundation/edr-darwin-arm64": "0.11.0", - "@nomicfoundation/edr-darwin-x64": "0.11.0", - "@nomicfoundation/edr-linux-arm64-gnu": "0.11.0", - "@nomicfoundation/edr-linux-arm64-musl": "0.11.0", - "@nomicfoundation/edr-linux-x64-gnu": "0.11.0", - "@nomicfoundation/edr-linux-x64-musl": "0.11.0", - "@nomicfoundation/edr-win32-x64-msvc": "0.11.0" + "@nomicfoundation/edr-darwin-arm64": "0.11.2", + "@nomicfoundation/edr-darwin-x64": "0.11.2", + "@nomicfoundation/edr-linux-arm64-gnu": "0.11.2", + "@nomicfoundation/edr-linux-arm64-musl": "0.11.2", + "@nomicfoundation/edr-linux-x64-gnu": "0.11.2", + "@nomicfoundation/edr-linux-x64-musl": "0.11.2", + "@nomicfoundation/edr-win32-x64-msvc": "0.11.2" }, "engines": { "node": ">= 18" } }, "node_modules/@nomicfoundation/edr-darwin-arm64": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.11.0.tgz", - "integrity": "sha512-aYTVdcSs27XG7ayTzvZ4Yn9z/ABSaUwicrtrYK2NR8IH0ik4N4bWzo/qH8rax6rewVLbHUkGyGYnsy5ZN4iiMw==", + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.11.2.tgz", + "integrity": "sha512-/QU0GHeoLFOJp28qK46kkTG849NN/5Qgq9ifKzhqBas1MCqwcdjrUI3raGkvE9SWJevljWd1HdW16fFpxUrzbA==", "license": "MIT", "engines": { "node": ">= 18" } }, "node_modules/@nomicfoundation/edr-darwin-x64": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.11.0.tgz", - "integrity": "sha512-RxX7UYgvJrfcyT/uHUn44Nsy1XaoW+Q1khKMdHKxeW7BrgIi+Lz+siz3bX5vhSoAnKilDPhIVLrnC8zxQhjR2A==", + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.11.2.tgz", + "integrity": "sha512-Dam+k00vyYNXCkM7JZGQBm0McNaL6ilbfY8BuIdHU2mpIVO5hpAFk8IQnMnG3FRuXuPJ0JoSTkn1R495T8AKqw==", "license": "MIT", "engines": { "node": ">= 18" } }, "node_modules/@nomicfoundation/edr-linux-arm64-gnu": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.11.0.tgz", - "integrity": "sha512-J0j+rs0s11FuSipt/ymqrFmpJ7c0FSz1/+FohCIlUXDxFv//+1R/8lkGPjEYFmy8DPpk/iO8mcpqHTGckREbqA==", + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.11.2.tgz", + "integrity": "sha512-6Z+hZ61c0v5EPVhCAc/rV36eN20GbPRfcmUeFJ3t+RjdY20EiUQzP85YU0q3AgCuwr410W27pazoBoL73cCPbg==", "license": "MIT", "engines": { "node": ">= 18" } }, "node_modules/@nomicfoundation/edr-linux-arm64-musl": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.11.0.tgz", - "integrity": "sha512-4r32zkGMN7WT/CMEuW0VjbuEdIeCskHNDMW4SSgQSJOE/N9L1KSLJCSsAbPD3aYE+e4WRDTyOwmuLjeUTcLZKQ==", + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.11.2.tgz", + "integrity": "sha512-AqC4AI3pR4vSsEcFyW/6rI1q16wEjIRYIR25IJO/EdBmXdsuVZgxsf/kMUCWQhhTuy89RTgIGTbMAQA0+DfSvA==", "license": "MIT", "engines": { "node": ">= 18" } }, "node_modules/@nomicfoundation/edr-linux-x64-gnu": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.11.0.tgz", - "integrity": "sha512-SmdncQHLYtVNWLIMyGaY6LpAfamzTDe3fxjkirmJv3CWR5tcEyC6LMui/GsIVnJzXeNJBXAzwl8hTUAxHTM6kQ==", + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.11.2.tgz", + "integrity": "sha512-vz1uiof1ZIi6RnXfHZiAXRgkloLciuYGD1rNDrqm1Pp7Nf0pbxw+e4TBQLoMYKzZn0MYS4u4Fa0AV2S7NjfptQ==", "license": "MIT", "engines": { "node": ">= 18" } }, "node_modules/@nomicfoundation/edr-linux-x64-musl": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.11.0.tgz", - "integrity": "sha512-w6hUqpn/trwiH6SRuRGysj37LsQVCX5XDCA3Xi81sbOaLhbHrNvK9TXWyZmcuzbdTKQQW6VNywcSxDdOiChcJg==", + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.11.2.tgz", + "integrity": "sha512-ArAbcrWwn+8Ze8JAaA9349N2E7hfs9PYvxDgfhujEH9iVC9XI6L+OhMATPsS3wkOST/+ykxELAF1KT4YjSxcrA==", "license": "MIT", "engines": { "node": ">= 18" } }, "node_modules/@nomicfoundation/edr-win32-x64-msvc": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.11.0.tgz", - "integrity": "sha512-BLmULjRKoH9BsX+c4Na2ypV7NGeJ+M6Zpqj/faPOwleVscDdSr/IhriyPaXCe8dyfwbge7lWsbekiADtPSnB2Q==", + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.11.2.tgz", + "integrity": "sha512-GDXBhxy5wlmZYQrTXu9Oh9OPTsi4tCdmHy1z8O9XqdH9wsP674Frh6Fb43yjVoS2Ek1F9yX11nexIrFXSuNyJQ==", "license": "MIT", "engines": { "node": ">= 18" } }, "node_modules/@nomicfoundation/hardhat-chai-matchers": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-2.0.8.tgz", - "integrity": "sha512-Z5PiCXH4xhNLASROlSUOADfhfpfhYO6D7Hn9xp8PddmHey0jq704cr6kfU8TRrQ4PUZbpfsZadPj+pCfZdjPIg==", + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-2.0.9.tgz", + "integrity": "sha512-AbCoBuTKMlwlf1lesSmi/4VvJHNG9EP13EmkCJ+MJS1SBdtVtU4YrBbdYmnYPEvRFcAIMFB/cwcQGmuBYeCoVg==", "license": "MIT", "peer": true, "dependencies": { @@ -1079,16 +878,16 @@ "ordinal": "^1.0.3" }, "peerDependencies": { - "@nomicfoundation/hardhat-ethers": "^3.0.0", + "@nomicfoundation/hardhat-ethers": "^3.0.9", "chai": "^4.2.0", - "ethers": "^6.1.0", + "ethers": "^6.14.0", "hardhat": "^2.9.4" } }, "node_modules/@nomicfoundation/hardhat-ethers": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.0.8.tgz", - "integrity": "sha512-zhOZ4hdRORls31DTOqg+GmEZM0ujly8GGIuRY7t7szEk2zW/arY1qDug/py8AEktT00v5K+b6RvbVog+va51IA==", + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.0.9.tgz", + "integrity": "sha512-xBJdRUiCwKpr0OYrOzPwAyNGtsVzoBx32HFPJVv6S+sFA9TmBIBDaqNlFPmBH58ZjgNnGhEr/4oBZvGr4q4TjQ==", "license": "MIT", "peer": true, "dependencies": { @@ -1096,18 +895,18 @@ "lodash.isequal": "^4.5.0" }, "peerDependencies": { - "ethers": "^6.1.0", + "ethers": "^6.14.0", "hardhat": "^2.0.0" } }, "node_modules/@nomicfoundation/hardhat-ignition": { - "version": "0.15.11", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ignition/-/hardhat-ignition-0.15.11.tgz", - "integrity": "sha512-OXebmK9FCMwwbb4mIeHBbVFFicAGgyGKJT2zrONrpixrROxrVs6KEi1gzsiN25qtQhCQePt8BTjjYrgy86Dfxg==", + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ignition/-/hardhat-ignition-0.15.12.tgz", + "integrity": "sha512-T03bSjFy8vWeKGvFsR42vzl4PgmW06i1e/84m2oowZzdO3i9ax3XJhRiH4kC08QXzkdAdUPinx68hQea8Wh6Jw==", "license": "MIT", "peer": true, "dependencies": { - "@nomicfoundation/ignition-core": "^0.15.11", + "@nomicfoundation/ignition-core": "^0.15.12", "@nomicfoundation/ignition-ui": "^0.15.11", "chalk": "^4.0.0", "debug": "^4.3.2", @@ -1121,16 +920,16 @@ } }, "node_modules/@nomicfoundation/hardhat-ignition-ethers": { - "version": "0.15.11", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ignition-ethers/-/hardhat-ignition-ethers-0.15.11.tgz", - "integrity": "sha512-srXzvf7qCDHLrnvQWtpVA9gWpcbp4BcnsOqJt6ISet9OlUnxk4GgRMbdFq4YpM48bHQTX397jS9yk1AtJCjt/g==", + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ignition-ethers/-/hardhat-ignition-ethers-0.15.13.tgz", + "integrity": "sha512-fJuImb0KBbsylTL5M1DdlChIO/GZoms2NUVJhU+AvfhlgB0jzRH+9jSXE9izYPktd8//tdVSC4kJloJPrR+BlA==", "license": "MIT", "peer": true, "peerDependencies": { - "@nomicfoundation/hardhat-ethers": "^3.0.4", - "@nomicfoundation/hardhat-ignition": "^0.15.11", - "@nomicfoundation/ignition-core": "^0.15.11", - "ethers": "^6.7.0", + "@nomicfoundation/hardhat-ethers": "^3.0.9", + "@nomicfoundation/hardhat-ignition": "^0.15.12", + "@nomicfoundation/ignition-core": "^0.15.12", + "ethers": "^6.14.0", "hardhat": "^2.18.0" } }, @@ -1219,9 +1018,9 @@ } }, "node_modules/@nomicfoundation/hardhat-network-helpers": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.12.tgz", - "integrity": "sha512-xTNQNI/9xkHvjmCJnJOTyqDSl8uq1rKb2WOVmixQxFtRd7Oa3ecO8zM0cyC2YmOK+jHB9WPZ+F/ijkHg1CoORA==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.13.tgz", + "integrity": "sha512-ptg0+SH8jnfoYHlR3dKWTNTB43HZSxkuy3OeDk+AufEKQvQ7Ru9LQEbJtLuDTQ4HGRBkhl4oJ9RABsEIbn7Taw==", "license": "MIT", "peer": true, "dependencies": { @@ -1232,9 +1031,9 @@ } }, "node_modules/@nomicfoundation/hardhat-toolbox": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-5.0.0.tgz", - "integrity": "sha512-FnUtUC5PsakCbwiVNsqlXVIWG5JIb5CEZoSXbJUsEBun22Bivx2jhF1/q9iQbzuaGpJKFQyOhemPB2+XlEE6pQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-6.0.0.tgz", + "integrity": "sha512-3qm3VuDp5xD8UyfhYPPfZHnCc0M/V5yfRSTSDdOuI8DTrmYJkMNW7QrTNGalMCigWn3suBghSw9YcMOyGDJ7Lg==", "license": "MIT", "peerDependencies": { "@nomicfoundation/hardhat-chai-matchers": "^2.0.0", @@ -1248,9 +1047,9 @@ "@types/mocha": ">=9.1.0", "@types/node": ">=18.0.0", "chai": "^4.2.0", - "ethers": "^6.4.0", + "ethers": "^6.14.0", "hardhat": "^2.11.0", - "hardhat-gas-reporter": "^1.0.8", + "hardhat-gas-reporter": "^2.3.0", "solidity-coverage": "^0.8.1", "ts-node": ">=8.0.0", "typechain": "^8.3.0", @@ -1279,9 +1078,9 @@ } }, "node_modules/@nomicfoundation/ignition-core": { - "version": "0.15.11", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ignition-core/-/ignition-core-0.15.11.tgz", - "integrity": "sha512-PeYKRlrQ0koT72yRnlyyG66cXMFiv5X/cIB8hBFPl3ekeg5tPXcHAgs/VZhOsgwEox4ejphTtItLESb1IDBw0w==", + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ignition-core/-/ignition-core-0.15.12.tgz", + "integrity": "sha512-JJdyoyfM5RXaUqv4c2V/8xpuui4uqJbMCvVnEhgo6FMOK6bqj8wGP6hM4gNE5TLug6ZUCdjIB8kFpofl21RycQ==", "license": "MIT", "peer": true, "dependencies": { @@ -1289,7 +1088,7 @@ "@nomicfoundation/solidity-analyzer": "^0.1.1", "cbor": "^9.0.0", "debug": "^4.3.2", - "ethers": "^6.7.0", + "ethers": "^6.14.0", "fs-extra": "^10.0.0", "immer": "10.0.2", "lodash": "4.17.21", @@ -1543,6 +1342,17 @@ "@openzeppelin/contracts": "5.0.2" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@pnpm/config.env-replace": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz", @@ -1777,13 +1587,10 @@ } }, "node_modules/@solidity-parser/parser": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.14.5.tgz", - "integrity": "sha512-6dKnHZn7fg/iQATVEzqyUOyEidbn05q7YA2mQ9hC0MMXhhV3/JrsxmFSYZAcr7j1yUP700LLhTruvJ3MiQmjJg==", - "peer": true, - "dependencies": { - "antlr4ts": "^0.5.0-alpha.4" - } + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.20.1.tgz", + "integrity": "sha512-58I2sRpzaQUN+jJmWbHfbWf9AKfzqCI8JAdFB0vbyY+u8tBRcuTt9LxzasvR0LGQpcRv97eyV7l61FQ3Ib7zVw==", + "license": "MIT" }, "node_modules/@szmarczak/http-timer": { "version": "5.0.1", @@ -1873,24 +1680,6 @@ "@types/chai": "*" } }, - "node_modules/@types/concat-stream": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.1.tgz", - "integrity": "sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==", - "peer": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/form-data": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", - "integrity": "sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==", - "peer": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", @@ -1952,12 +1741,6 @@ "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", "peer": true }, - "node_modules/@types/qs": { - "version": "6.9.9", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.9.tgz", - "integrity": "sha512-wYLxw35euwqGvTDx6zfY1vokBFnsK0HNrzc6xNHchxfO2hpuRg74GbkEW7e3sSmPvj0TjCDT1VCa6OtHXnubsg==", - "peer": true - }, "node_modules/@types/secp256k1": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.5.tgz", @@ -1973,6 +1756,28 @@ "integrity": "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==", "peer": true }, + "node_modules/abitype": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/abitype/-/abitype-1.0.8.tgz", + "integrity": "sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg==", + "license": "MIT", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/wevm" + }, + "peerDependencies": { + "typescript": ">=5.0.4", + "zod": "^3 >=3.22.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + }, + "zod": { + "optional": true + } + } + }, "node_modules/acorn": { "version": "8.10.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", @@ -2063,27 +1868,6 @@ "string-width": "^4.1.0" } }, - "node_modules/ansi-align/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-align/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/ansi-colors": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", @@ -2133,12 +1917,6 @@ "node": ">=16" } }, - "node_modules/antlr4ts": { - "version": "0.5.0-alpha.4", - "resolved": "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz", - "integrity": "sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==", - "peer": true - }, "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", @@ -2180,21 +1958,6 @@ "node": ">=8" } }, - "node_modules/array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", - "peer": true - }, "node_modules/assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -2227,6 +1990,7 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT", "peer": true }, "node_modules/at-least-node": { @@ -2238,10 +2002,26 @@ "node": ">= 4.0.0" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/axios": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.9.0.tgz", - "integrity": "sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.10.0.tgz", + "integrity": "sha512-/1xYAC4MP/HEG+3duIhFr4ZQXR4sQXOIe+o6sdqzeykGLx6Upp/1p8MHqhINOvGeP7xyNHe7tsiJByc4SSVUxw==", "license": "MIT", "peer": true, "dependencies": { @@ -2265,13 +2045,6 @@ "safe-buffer": "^5.0.1" } }, - "node_modules/bech32": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", - "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==", - "license": "MIT", - "peer": true - }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -2346,42 +2119,21 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/boxen/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/boxen/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/boxen/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/boxen/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "color-name": "~1.1.4" }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/boxen/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/boxen/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "engines": { "node": ">=8" } @@ -2409,9 +2161,10 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "license": "MIT", "peer": true, "dependencies": { "balanced-match": "^1.0.0", @@ -2434,6 +2187,13 @@ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" }, + "node_modules/brotli-wasm": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brotli-wasm/-/brotli-wasm-2.0.1.tgz", + "integrity": "sha512-+3USgYsC7bzb5yU0/p2HnnynZl0ak0E6uoIm4UW4Aby/8s8HFCq6NCfrrf1E9c3O8OCSzq3oYO1tUVqIi61Nww==", + "license": "Apache-2.0", + "peer": true + }, "node_modules/browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -2529,14 +2289,50 @@ } }, "node_modules/call-bind": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", - "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "license": "MIT", "peer": true, "dependencies": { - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.1", - "set-function-length": "^1.1.1" + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "peer": true, + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2561,12 +2357,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", - "peer": true - }, "node_modules/cbor": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz", @@ -2626,6 +2416,7 @@ "version": "0.0.2", "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", + "license": "BSD-3-Clause", "peer": true, "engines": { "node": "*" @@ -2719,19 +2510,19 @@ } }, "node_modules/cli-table3": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", - "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.5.tgz", + "integrity": "sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==", + "license": "MIT", "peer": true, "dependencies": { - "object-assign": "^4.1.0", - "string-width": "^2.1.1" + "string-width": "^4.2.0" }, "engines": { - "node": ">=6" + "node": "10.* || >= 12.*" }, "optionalDependencies": { - "colors": "^1.1.2" + "@colors/colors": "1.5.0" } }, "node_modules/cli-truncate": { @@ -2850,27 +2641,6 @@ "wrap-ansi": "^7.0.0" } }, - "node_modules/cliui/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -2890,19 +2660,11 @@ "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", "license": "MIT" }, - "node_modules/colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", - "peer": true, - "engines": { - "node": ">=0.1.90" - } - }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", "peer": true, "dependencies": { "delayed-stream": "~1.0.0" @@ -2978,51 +2740,6 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "peer": true }, - "node_modules/concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "engines": [ - "node >= 0.8" - ], - "peer": true, - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "node_modules/concat-stream/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "peer": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/concat-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "peer": true - }, - "node_modules/concat-stream/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "peer": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/config-chain": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", @@ -3040,12 +2757,6 @@ "node": ">= 0.6" } }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "peer": true - }, "node_modules/cosmiconfig": { "version": "8.3.6", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", @@ -3104,10 +2815,42 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "peer": true }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "license": "MIT", + "peer": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cross-spawn/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "license": "ISC", + "peer": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/crypt": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", + "license": "BSD-3-Clause", "peer": true, "engines": { "node": "*" @@ -3207,23 +2950,28 @@ } }, "node_modules/define-data-property": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", - "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", "peer": true, "dependencies": { - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", "peer": true, "engines": { "node": ">=0.4.0" @@ -3282,6 +3030,28 @@ "url": "https://dotenvx.com" } }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "peer": true, + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "license": "MIT", + "peer": true + }, "node_modules/elliptic": { "version": "6.6.1", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", @@ -3348,6 +3118,55 @@ "is-arrayish": "^0.2.1" } }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "peer": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "peer": true, + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -3374,182 +3193,47 @@ "estraverse": "^1.9.1", "esutils": "^2.0.2", "optionator": "^0.8.1" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=0.12.0" - }, - "optionalDependencies": { - "source-map": "~0.2.0" - } - }, - "node_modules/esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", - "peer": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eth-gas-reporter": { - "version": "0.2.27", - "resolved": "https://registry.npmjs.org/eth-gas-reporter/-/eth-gas-reporter-0.2.27.tgz", - "integrity": "sha512-femhvoAM7wL0GcI8ozTdxfuBtBFJ9qsyIAsmKVjlWAHUbdnnXHt+lKzz/kmldM5lA9jLuNHGwuIxorNpLbR1Zw==", - "peer": true, - "dependencies": { - "@solidity-parser/parser": "^0.14.0", - "axios": "^1.5.1", - "cli-table3": "^0.5.0", - "colors": "1.4.0", - "ethereum-cryptography": "^1.0.3", - "ethers": "^5.7.2", - "fs-readdir-recursive": "^1.1.0", - "lodash": "^4.17.14", - "markdown-table": "^1.1.3", - "mocha": "^10.2.0", - "req-cwd": "^2.0.0", - "sha1": "^1.1.1", - "sync-request": "^6.0.0" - }, - "peerDependencies": { - "@codechecks/client": "^0.1.0" - }, - "peerDependenciesMeta": { - "@codechecks/client": { - "optional": true - } - } - }, - "node_modules/eth-gas-reporter/node_modules/@noble/hashes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", - "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "peer": true - }, - "node_modules/eth-gas-reporter/node_modules/@scure/bip32": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", - "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "peer": true, - "dependencies": { - "@noble/hashes": "~1.2.0", - "@noble/secp256k1": "~1.7.0", - "@scure/base": "~1.1.0" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=0.12.0" + }, + "optionalDependencies": { + "source-map": "~0.2.0" } }, - "node_modules/eth-gas-reporter/node_modules/@scure/bip39": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", - "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], + "node_modules/esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", "peer": true, - "dependencies": { - "@noble/hashes": "~1.2.0", - "@scure/base": "~1.1.0" + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/eth-gas-reporter/node_modules/ethereum-cryptography": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", - "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", + "node_modules/estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==", "peer": true, - "dependencies": { - "@noble/hashes": "1.2.0", - "@noble/secp256k1": "1.7.1", - "@scure/bip32": "1.1.5", - "@scure/bip39": "1.1.1" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/eth-gas-reporter/node_modules/ethers": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.8.0.tgz", - "integrity": "sha512-DUq+7fHrCg1aPDFCHx6UIPb3nmt2XMpM7Y/g2gLhsl3lIBqeAfOJIl1qEvRf2uq3BiKxmh6Fh5pfp2ieyek7Kg==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "license": "MIT", + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "peer": true, - "dependencies": { - "@ethersproject/abi": "5.8.0", - "@ethersproject/abstract-provider": "5.8.0", - "@ethersproject/abstract-signer": "5.8.0", - "@ethersproject/address": "5.8.0", - "@ethersproject/base64": "5.8.0", - "@ethersproject/basex": "5.8.0", - "@ethersproject/bignumber": "5.8.0", - "@ethersproject/bytes": "5.8.0", - "@ethersproject/constants": "5.8.0", - "@ethersproject/contracts": "5.8.0", - "@ethersproject/hash": "5.8.0", - "@ethersproject/hdnode": "5.8.0", - "@ethersproject/json-wallets": "5.8.0", - "@ethersproject/keccak256": "5.8.0", - "@ethersproject/logger": "5.8.0", - "@ethersproject/networks": "5.8.0", - "@ethersproject/pbkdf2": "5.8.0", - "@ethersproject/properties": "5.8.0", - "@ethersproject/providers": "5.8.0", - "@ethersproject/random": "5.8.0", - "@ethersproject/rlp": "5.8.0", - "@ethersproject/sha2": "5.8.0", - "@ethersproject/signing-key": "5.8.0", - "@ethersproject/solidity": "5.8.0", - "@ethersproject/strings": "5.8.0", - "@ethersproject/transactions": "5.8.0", - "@ethersproject/units": "5.8.0", - "@ethersproject/wallet": "5.8.0", - "@ethersproject/web": "5.8.0", - "@ethersproject/wordlists": "5.8.0" + "engines": { + "node": ">=0.10.0" } }, "node_modules/ethereum-bloom-filters": { @@ -3601,9 +3285,9 @@ } }, "node_modules/ethers": { - "version": "6.14.3", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.14.3.tgz", - "integrity": "sha512-qq7ft/oCJohoTcsNPFaXSQUm457MA5iWqkf1Mb11ujONdg7jBI6sAOrHaTi3j0CBqIGFSCeR/RMc+qwRRub7IA==", + "version": "6.14.4", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.14.4.tgz", + "integrity": "sha512-Jm/dzRs2Z9iBrT6e9TvGxyb5YVKAPLlpna7hjxH7KH/++DSh2T/JVmQUv7iHI5E55hDbp/gEVvstWYXVxXFzsA==", "funding": [ { "type": "individual", @@ -3776,14 +3460,50 @@ } } }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "license": "MIT", + "peer": true, + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "license": "ISC", + "peer": true, + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.3.tgz", + "integrity": "sha512-qsITQPfmvMOSAdeyZ+12I1c+CKSstAFAwu+97zrnWAbIr5u8wfsExUzCesVLC8NgHuRUqNN4Zy6UPWUTRGslcA==", + "license": "MIT", "peer": true, "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", "mime-types": "^2.1.12" }, "engines": { @@ -3818,12 +3538,6 @@ "node": ">=10" } }, - "node_modules/fs-readdir-recursive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", - "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", - "peer": true - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3846,6 +3560,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", "peer": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3881,27 +3596,42 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", - "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", "peer": true, "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-port": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", - "integrity": "sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==", + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", "peer": true, + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, "engines": { - "node": ">=4" + "node": ">= 0.4" } }, "node_modules/ghost-testrpc": { @@ -3994,12 +3724,13 @@ } }, "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", "peer": true, - "dependencies": { - "get-intrinsic": "^1.1.3" + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4076,14 +3807,14 @@ } }, "node_modules/hardhat": { - "version": "2.24.1", - "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.24.1.tgz", - "integrity": "sha512-3iwrO2liEGCw1rz/l/mlB1rSNexCc4CFcMj0DlvjXGChzmD3sGUgLwWDOZPf+ya8MEm5ZhO1oprRVmb/wVi0YA==", + "version": "2.25.0", + "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.25.0.tgz", + "integrity": "sha512-yBiA74Yj3VnTRj7lhnn8GalvBdvsMOqTKRrRATSy/2v0VIR2hR0Jcnmfn4aQBLtGAnr3Q2c8CxL0g3LYegUp+g==", "license": "MIT", "dependencies": { "@ethereumjs/util": "^9.1.0", "@ethersproject/abi": "^5.1.2", - "@nomicfoundation/edr": "^0.11.0", + "@nomicfoundation/edr": "^0.11.1", "@nomicfoundation/solidity-analyzer": "^0.1.0", "@sentry/node": "^5.18.1", "@types/bn.js": "^5.1.0", @@ -4124,34 +3855,237 @@ "ws": "^7.4.6" }, "bin": { - "hardhat": "internal/cli/bootstrap.js" + "hardhat": "internal/cli/bootstrap.js" + }, + "peerDependencies": { + "ts-node": "*", + "typescript": "*" + }, + "peerDependenciesMeta": { + "ts-node": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/hardhat-gas-reporter": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-2.3.0.tgz", + "integrity": "sha512-ySdA+044xMQv1BlJu5CYXToHzMexKFfIWxlQTBNNoerx1x96+d15IMdN01iQZ/TJ7NH2V5sU73bz77LoS/PEVw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/abi": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/units": "^5.7.0", + "@solidity-parser/parser": "^0.20.1", + "axios": "^1.6.7", + "brotli-wasm": "^2.0.1", + "chalk": "4.1.2", + "cli-table3": "^0.6.3", + "ethereum-cryptography": "^2.1.3", + "glob": "^10.3.10", + "jsonschema": "^1.4.1", + "lodash": "^4.17.21", + "markdown-table": "2.0.0", + "sha1": "^1.1.1", + "viem": "^2.27.0" + }, + "peerDependencies": { + "hardhat": "^2.16.0" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "peer": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT", + "peer": true + }, + "node_modules/hardhat-gas-reporter/node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "license": "ISC", + "peer": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" }, - "peerDependencies": { - "ts-node": "*", - "typescript": "*" + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^2.0.1" }, - "peerDependenciesMeta": { - "ts-node": { - "optional": true - }, - "typescript": { - "optional": true - } + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/hardhat-gas-reporter": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.10.tgz", - "integrity": "sha512-02N4+So/fZrzJ88ci54GqwVA3Zrf0C9duuTyGt0CFRIh/CdNwbnTgkXkRfojOMLBQ+6t+lBIkgbsOtqMvNwikA==", + "node_modules/hardhat-gas-reporter/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "license": "MIT", "peer": true, "dependencies": { - "array-uniq": "1.0.3", - "eth-gas-reporter": "^0.2.25", - "sha1": "^1.1.1" + "has-flag": "^4.0.0" }, - "peerDependencies": { - "hardhat": "^2.0.2" + "engines": { + "node": ">=8" } }, "node_modules/hardhat/node_modules/@ethereumjs/rlp": { @@ -4392,21 +4326,23 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", - "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", "peer": true, "dependencies": { - "get-intrinsic": "^1.2.2" + "es-define-property": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", "peer": true, "engines": { "node": ">= 0.4" @@ -4415,11 +4351,15 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", "peer": true, + "dependencies": { + "has-symbols": "^1.0.3" + }, "engines": { "node": ">= 0.4" }, @@ -4451,9 +4391,10 @@ } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", "peer": true, "dependencies": { "function-bind": "^1.1.2" @@ -4486,21 +4427,6 @@ "minimalistic-crypto-utils": "^1.0.1" } }, - "node_modules/http-basic": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", - "integrity": "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==", - "peer": true, - "dependencies": { - "caseless": "^0.12.0", - "concat-stream": "^1.6.2", - "http-response-object": "^3.0.1", - "parse-cache-control": "^1.0.1" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/http-cache-semantics": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", @@ -4521,21 +4447,6 @@ "node": ">= 0.8" } }, - "node_modules/http-response-object": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", - "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==", - "peer": true, - "dependencies": { - "@types/node": "^10.0.3" - } - }, - "node_modules/http-response-object/node_modules/@types/node": { - "version": "10.17.60", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", - "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==", - "peer": true - }, "node_modules/http2-wrapper": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.0.tgz", @@ -4692,6 +4603,19 @@ "node": ">=8" } }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -4701,12 +4625,12 @@ } }, "node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "peer": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/is-glob": { @@ -4746,6 +4670,22 @@ "node": ">=8" } }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -4758,9 +4698,10 @@ } }, "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "license": "MIT", "peer": true }, "node_modules/isexe": { @@ -4769,6 +4710,38 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "peer": true }, + "node_modules/isows": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/isows/-/isows-1.0.7.tgz", + "integrity": "sha512-I1fSfDCZL5P0v33sVqeTDSpcstAg/N+wF5HS033mogOVIp4B+oHC7oOCsA3axAbBSGTJ8QubbNmnIRN/h8U7hg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wevm" + } + ], + "license": "MIT", + "peer": true, + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "license": "BlueOak-1.0.0", + "peer": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/js-sha3": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", @@ -4938,9 +4911,9 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, "node_modules/lint-staged": { - "version": "16.1.0", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-16.1.0.tgz", - "integrity": "sha512-HkpQh69XHxgCjObjejBT3s2ILwNjFx8M3nw+tJ/ssBauDlIpkx2RpqWSi1fBgkXLSSXnbR3iEq1NkVtpvV+FLQ==", + "version": "16.1.2", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-16.1.2.tgz", + "integrity": "sha512-sQKw2Si2g9KUZNY3XNvRuDq4UJqpHwF0/FQzZR2M7I5MvtpWvibikCjUVJzZdGE0ByurEl3KQNvsGetd1ty1/Q==", "license": "MIT", "dependencies": { "chalk": "^5.4.1", @@ -5370,6 +5343,13 @@ "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==" }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "license": "ISC", + "peer": true + }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -5377,10 +5357,28 @@ "peer": true }, "node_modules/markdown-table": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz", - "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==", - "peer": true + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-2.0.0.tgz", + "integrity": "sha512-Ezda85ToJUBhM6WGaG6veasyym+Tbs3cMAw/ZhOPqXiYsr0jgocBV3j3nx+4lk47plLlIqjwuTm/ywVI+zjJ/A==", + "license": "MIT", + "peer": true, + "dependencies": { + "repeat-string": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + } }, "node_modules/md5.js": { "version": "1.3.5", @@ -5491,6 +5489,7 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", "peer": true, "engines": { "node": ">= 0.6" @@ -5500,6 +5499,7 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", "peer": true, "dependencies": { "mime-db": "1.52.0" @@ -5561,6 +5561,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "license": "ISC", + "peer": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mkdirp": { "version": "0.5.6", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", @@ -5617,9 +5627,9 @@ } }, "node_modules/mocha/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -5817,24 +5827,6 @@ "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", "peer": true }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", - "peer": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/obliterator": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz", @@ -5854,44 +5846,150 @@ "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", "license": "MIT", "dependencies": { - "mimic-function": "^5.0.0" - }, - "engines": { - "node": ">=18" + "mimic-function": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "peer": true, + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ordinal": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ordinal/-/ordinal-1.0.3.tgz", + "integrity": "sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ==", + "peer": true + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ox": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/ox/-/ox-0.8.1.tgz", + "integrity": "sha512-e+z5epnzV+Zuz91YYujecW8cF01mzmrUtWotJ0oEPym/G82uccs7q0WDHTYL3eiONbTUEvcZrptAKLgTBD3u2A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wevm" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@adraffy/ens-normalize": "^1.11.0", + "@noble/ciphers": "^1.3.0", + "@noble/curves": "^1.9.1", + "@noble/hashes": "^1.8.0", + "@scure/bip32": "^1.7.0", + "@scure/bip39": "^1.6.0", + "abitype": "^1.0.8", + "eventemitter3": "5.0.1" + }, + "peerDependencies": { + "typescript": ">=5.4.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/ox/node_modules/@adraffy/ens-normalize": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.11.0.tgz", + "integrity": "sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg==", + "license": "MIT", + "peer": true + }, + "node_modules/ox/node_modules/@noble/curves": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.2.tgz", + "integrity": "sha512-HxngEd2XUcg9xi20JkwlLCtYwfoFw4JGkuZpT+WlsPD4gB/cxkvTD8fSsoAnphGZhFdZYKeQIPCuFlWPm1uE0g==", + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "1.8.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/ox/node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "license": "MIT", + "peer": true, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/ox/node_modules/@scure/base": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.6.tgz", + "integrity": "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==", + "license": "MIT", + "peer": true, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/ox/node_modules/@scure/bip32": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.7.0.tgz", + "integrity": "sha512-E4FFX/N3f4B80AKWp5dP6ow+flD1LQZo/w8UnLGYZO674jS6YnYeepycOOksv+vLPSpgN35wgKgy+ybfTb2SMw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/curves": "~1.9.0", + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://paulmillr.com/funding/" } }, - "node_modules/optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "node_modules/ox/node_modules/@scure/bip39": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.6.0.tgz", + "integrity": "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A==", + "license": "MIT", "peer": true, "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/ordinal": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/ordinal/-/ordinal-1.0.3.tgz", - "integrity": "sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ==", - "peer": true - }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "engines": { - "node": ">=0.10.0" + "funding": { + "url": "https://paulmillr.com/funding/" } }, "node_modules/p-cancelable": { @@ -5961,6 +6059,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "license": "BlueOak-1.0.0", + "peer": true + }, "node_modules/package-json/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -6002,12 +6107,6 @@ "node": ">=6" } }, - "node_modules/parse-cache-control": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", - "integrity": "sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==", - "peer": true - }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -6042,11 +6141,38 @@ "node": ">=0.10.0" } }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "license": "BlueOak-1.0.0", + "peer": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -6065,21 +6191,57 @@ } }, "node_modules/pbkdf2": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", - "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.3.tgz", + "integrity": "sha512-wfRLBZ0feWRhCIkoMB6ete7czJcnNnqRpcoWQBLqatqXXmelSRqfdDK4F3u9T2s2cXas/hQJcryI/4lAL+XTlA==", + "license": "MIT", "peer": true, "dependencies": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" + "create-hash": "~1.1.3", + "create-hmac": "^1.1.7", + "ripemd160": "=2.0.1", + "safe-buffer": "^5.2.1", + "sha.js": "^2.4.11", + "to-buffer": "^1.2.0" }, "engines": { "node": ">=0.12" } }, + "node_modules/pbkdf2/node_modules/create-hash": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", + "integrity": "sha512-snRpch/kwQhcdlnZKYanNF1m0RDlrCdSKQaH87w1FCFPVPNCQ/Il9QJKAX2jVBZddRdaHBMC+zXa9Gw9tmkNUA==", + "license": "MIT", + "peer": true, + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "sha.js": "^2.4.0" + } + }, + "node_modules/pbkdf2/node_modules/hash-base": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", + "integrity": "sha512-0TROgQ1/SxE6KmxWSvXHvRj90/Xo1JvZShofnYF+f6ZsGtR4eES7WfrQzPalmyagfKZCXpVnitiRebZulWsbiw==", + "license": "MIT", + "peer": true, + "dependencies": { + "inherits": "^2.0.1" + } + }, + "node_modules/pbkdf2/node_modules/ripemd160": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", + "integrity": "sha512-J7f4wutN8mdbV08MJnXibYpCOPHR+yzy+iQ/AsjMv2j8cLavQ8VGagDFUwwTAdF8FmRKVeNpbTTEwNHCW1g94w==", + "license": "MIT", + "peer": true, + "dependencies": { + "hash-base": "^2.0.0", + "inherits": "^2.0.1" + } + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -6124,6 +6286,16 @@ "node": ">=4" } }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", @@ -6134,9 +6306,9 @@ } }, "node_modules/prettier": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", - "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.0.tgz", + "integrity": "sha512-ujSB9uXHJKzM/2GBuE0hBOUgC77CN3Bnpqa+g80bkv3T3A93wL/xlzDATHhnhkzifz/UE2SNOvmbTz5hSkDlHw==", "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" @@ -6165,12 +6337,6 @@ "prettier": ">=3.0.0" } }, - "node_modules/prettier-plugin-solidity/node_modules/@solidity-parser/parser": { - "version": "0.20.1", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.20.1.tgz", - "integrity": "sha512-58I2sRpzaQUN+jJmWbHfbWf9AKfzqCI8JAdFB0vbyY+u8tBRcuTt9LxzasvR0LGQpcRv97eyV7l61FQ3Ib7zVw==", - "license": "MIT" - }, "node_modules/prettier-plugin-solidity/node_modules/semver": { "version": "7.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", @@ -6182,21 +6348,6 @@ "node": ">=10" } }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "peer": true - }, - "node_modules/promise": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz", - "integrity": "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==", - "peer": true, - "dependencies": { - "asap": "~2.0.6" - } - }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -6219,6 +6370,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT", "peer": true }, "node_modules/punycode": { @@ -6229,21 +6381,6 @@ "node": ">=6" } }, - "node_modules/qs": { - "version": "6.11.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", - "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", - "peer": true, - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -6401,28 +6538,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/req-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/req-cwd/-/req-cwd-2.0.0.tgz", - "integrity": "sha512-ueoIoLo1OfB6b05COxAA9UpeoscNpYyM+BqYlA7H6LVF4hKGPXQQSSaD2YmvDVJMkk4UDpAHIeU1zG53IqjvlQ==", - "peer": true, - "dependencies": { - "req-from": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/req-from": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/req-from/-/req-from-2.0.0.tgz", - "integrity": "sha512-LzTfEVDVQHBRfjOUMgNBA+V6DWsSnoeKzf42J7l0xa/B4jyPOuuF5MlNSmomLNGemWTnV2TIdjSSLnEn95fOQA==", + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "license": "MIT", "peer": true, - "dependencies": { - "resolve-from": "^3.0.0" - }, "engines": { - "node": ">=4" + "node": ">=0.10" } }, "node_modules/require-directory": { @@ -6457,15 +6580,6 @@ "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==" }, - "node_modules/resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==", - "peer": true, - "engines": { - "node": ">=4" - } - }, "node_modules/responselike": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz", @@ -6731,15 +6845,18 @@ } }, "node_modules/set-function-length": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", - "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", "peer": true, "dependencies": { - "define-data-property": "^1.1.1", - "get-intrinsic": "^1.2.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -6773,6 +6890,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz", "integrity": "sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA==", + "license": "BSD-3-Clause", "peer": true, "dependencies": { "charenc": ">= 0.0.1", @@ -6782,6 +6900,29 @@ "node": "*" } }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "license": "MIT", + "peer": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/shelljs": { "version": "0.8.5", "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", @@ -6799,20 +6940,6 @@ "node": ">=4" } }, - "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "peer": true, - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/signal-exit": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", @@ -6886,14 +7013,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "engines": { - "node": ">=8" - } - }, "node_modules/solc": { "version": "0.8.26", "resolved": "https://registry.npmjs.org/solc/-/solc-0.8.26.tgz", @@ -6954,12 +7073,6 @@ "prettier": "^2.8.3" } }, - "node_modules/solhint/node_modules/@solidity-parser/parser": { - "version": "0.20.1", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.20.1.tgz", - "integrity": "sha512-58I2sRpzaQUN+jJmWbHfbWf9AKfzqCI8JAdFB0vbyY+u8tBRcuTt9LxzasvR0LGQpcRv97eyV7l61FQ3Ib7zVw==", - "license": "MIT" - }, "node_modules/solhint/node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -6990,9 +7103,10 @@ } }, "node_modules/solhint/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -7168,13 +7282,6 @@ "hardhat": "^2.11.0" } }, - "node_modules/solidity-coverage/node_modules/@solidity-parser/parser": { - "version": "0.20.1", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.20.1.tgz", - "integrity": "sha512-58I2sRpzaQUN+jJmWbHfbWf9AKfzqCI8JAdFB0vbyY+u8tBRcuTt9LxzasvR0LGQpcRv97eyV7l61FQ3Ib7zVw==", - "license": "MIT", - "peer": true - }, "node_modules/solidity-coverage/node_modules/fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -7335,43 +7442,53 @@ "peer": true }, "node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "peer": true, + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", "peer": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "peer": true, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dependencies": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/strip-ansi": { + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "peer": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -7399,42 +7516,19 @@ "engines": { "node": ">=8" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/sync-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", - "integrity": "sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==", - "peer": true, - "dependencies": { - "http-response-object": "^3.0.1", - "sync-rpc": "^1.2.1", - "then-request": "^6.0.0" - }, - "engines": { - "node": ">=8.0.0" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/sync-rpc": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.6.tgz", - "integrity": "sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==", - "peer": true, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dependencies": { - "get-port": "^3.1.0" + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" } }, "node_modules/table": { @@ -7485,74 +7579,11 @@ "node": ">=8" } }, - "node_modules/table/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/table/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" }, - "node_modules/then-request": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/then-request/-/then-request-6.0.2.tgz", - "integrity": "sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==", - "peer": true, - "dependencies": { - "@types/concat-stream": "^1.6.0", - "@types/form-data": "0.0.33", - "@types/node": "^8.0.0", - "@types/qs": "^6.2.31", - "caseless": "~0.12.0", - "concat-stream": "^1.6.0", - "form-data": "^2.2.0", - "http-basic": "^8.1.1", - "http-response-object": "^3.0.1", - "promise": "^8.0.0", - "qs": "^6.4.0" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/then-request/node_modules/@types/node": { - "version": "8.10.66", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", - "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==", - "peer": true - }, - "node_modules/then-request/node_modules/form-data": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", - "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", - "peer": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, "node_modules/through2": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", @@ -7612,6 +7643,21 @@ "node": ">=0.6.0" } }, + "node_modules/to-buffer": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.1.tgz", + "integrity": "sha512-tB82LpAIWjhLYbqjx3X4zEeHN6M8CiuOEy2JY8SEQVdYRe3CCHOFaqrBW1doLDrfpWhplcW7BL+bO3/6S3pcDQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "isarray": "^2.0.5", + "safe-buffer": "^5.2.1", + "typed-array-buffer": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -7922,16 +7968,26 @@ "node": ">= 4.0.0" } }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", - "peer": true + "node_modules/typed-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", + "license": "MIT", + "peer": true, + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + } }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "license": "Apache-2.0", "peer": true, "bin": { "tsc": "bin/tsc", @@ -8030,6 +8086,127 @@ "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", "peer": true }, + "node_modules/viem": { + "version": "2.31.4", + "resolved": "https://registry.npmjs.org/viem/-/viem-2.31.4.tgz", + "integrity": "sha512-0UZ/asvzl6p44CIBRDbwEcn3HXIQQurBZcMo5qmLhQ8s27Ockk+RYohgTLlpLvkYs8/t4UUEREAbHLuek1kXcw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wevm" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/curves": "1.9.2", + "@noble/hashes": "1.8.0", + "@scure/bip32": "1.7.0", + "@scure/bip39": "1.6.0", + "abitype": "1.0.8", + "isows": "1.0.7", + "ox": "0.8.1", + "ws": "8.18.2" + }, + "peerDependencies": { + "typescript": ">=5.0.4" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/viem/node_modules/@noble/curves": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.2.tgz", + "integrity": "sha512-HxngEd2XUcg9xi20JkwlLCtYwfoFw4JGkuZpT+WlsPD4gB/cxkvTD8fSsoAnphGZhFdZYKeQIPCuFlWPm1uE0g==", + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "1.8.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/viem/node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "license": "MIT", + "peer": true, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/viem/node_modules/@scure/base": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.6.tgz", + "integrity": "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==", + "license": "MIT", + "peer": true, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/viem/node_modules/@scure/bip32": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.7.0.tgz", + "integrity": "sha512-E4FFX/N3f4B80AKWp5dP6ow+flD1LQZo/w8UnLGYZO674jS6YnYeepycOOksv+vLPSpgN35wgKgy+ybfTb2SMw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/curves": "~1.9.0", + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/viem/node_modules/@scure/bip39": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.6.0.tgz", + "integrity": "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A==", + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/viem/node_modules/ws": { + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.2.tgz", + "integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/web3-utils": { "version": "1.10.3", "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.3.tgz", @@ -8097,33 +8274,34 @@ "which": "bin/which" } }, - "node_modules/widest-line": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", - "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "node_modules/which-typed-array": { + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", + "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", + "license": "MIT", + "peer": true, "dependencies": { - "string-width": "^4.0.0" + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" }, "engines": { - "node": ">=8" - } - }, - "node_modules/widest-line/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/widest-line/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "node_modules/widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "string-width": "^4.0.0" }, "engines": { "node": ">=8" @@ -8188,10 +8366,31 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "peer": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -8202,10 +8401,12 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/color-convert": { + "node_modules/wrap-ansi-cjs/node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "peer": true, "dependencies": { "color-name": "~1.1.4" }, @@ -8213,32 +8414,43 @@ "node": ">=7.0.0" } }, - "node_modules/wrap-ansi/node_modules/color-name": { + "node_modules/wrap-ansi-cjs/node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT", + "peer": true }, - "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "color-name": "~1.1.4" }, "engines": { - "node": ">=8" + "node": ">=7.0.0" } }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -8324,27 +8536,6 @@ "node": ">=10" } }, - "node_modules/yargs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", diff --git a/package.json b/package.json index e3b3ff1..2f41d53 100644 --- a/package.json +++ b/package.json @@ -13,17 +13,17 @@ "slither": "ENV_MODE=test slither ./ --config-file ./slither.config.json" }, "dependencies": { - "@nomicfoundation/hardhat-toolbox": "^5.0.0", + "@nomicfoundation/hardhat-toolbox": "^6.0.0", "@openzeppelin/contracts": "^5.0.2", "@openzeppelin/contracts-upgradeable": "^5.0.2", "@types/js-yaml": "^4.0.9", "dotenv": "^16.5.0", - "ethers": "^6.14.3", - "hardhat": "^2.24.1", + "ethers": "^6.14.4", + "hardhat": "^2.25.0", "husky": "^9.1.7", "js-yaml": "^4.1.0", - "lint-staged": "^16.1.0", - "prettier": "^3.5.3", + "lint-staged": "^16.1.2", + "prettier": "^3.6.0", "prettier-plugin-solidity": "^2.0.0", "solhint": "^5.1.0" } diff --git a/requirements.txt b/requirements.txt index 33117c2..b19225e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,11 @@ aiohappyeyeballs==2.6.1 -aiohttp==3.12.4 +aiohttp==3.12.13 aiosignal==1.3.2 annotated-types==0.7.0 attrs==25.3.0 -bitarray==3.4.2 +bitarray==3.4.3 cbor2==5.6.5 -certifi==2025.4.26 +certifi==2025.6.15 charset-normalizer==3.4.2 ckzg==2.1.1 crytic-compile==0.3.10 @@ -18,29 +18,29 @@ eth-rlp==2.2.0 eth-typing==5.2.1 eth-utils==5.3.0 eth_abi==5.2.0 -frozenlist==1.6.0 +frozenlist==1.7.0 hexbytes==1.3.1 idna==3.10 -multidict==6.4.4 +multidict==6.5.0 packaging==25.0 parsimonious==0.10.0 prettytable==3.16.0 -propcache==0.3.1 +propcache==0.3.2 pycryptodome==3.23.0 -pydantic==2.11.5 +pydantic==2.11.7 pydantic_core==2.33.2 pyunormalize==16.0.0 regex==2024.11.6 -requests==2.32.3 +requests==2.32.4 rlp==4.1.0 slither-analyzer==0.11.3 solc-select==1.1.0 toolz==1.0.0 -types-requests==2.32.0.20250515 +types-requests==2.32.4.20250611 typing-inspection==0.4.1 -typing_extensions==4.13.2 -urllib3==2.4.0 +typing_extensions==4.14.0 +urllib3==2.5.0 wcwidth==0.2.13 web3==7.12.0 websockets==15.0.1 -yarl==1.20.0 +yarl==1.20.1 diff --git a/scripts/deploy-protocol.ts b/scripts/deploy-collection.ts similarity index 87% rename from scripts/deploy-protocol.ts rename to scripts/deploy-collection.ts index 0e3d809..45e711b 100644 --- a/scripts/deploy-protocol.ts +++ b/scripts/deploy-collection.ts @@ -4,7 +4,7 @@ import { AdminChangedEvent, } from '../typechain-types/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy'; import { OwnershipTransferredEvent } from '../typechain-types/@openzeppelin/contracts/proxy/transparent/ProxyAdmin'; -import { DeployedEvent } from '../typechain-types/contracts/utils/Deployer'; +import { DeployedEvent } from '../typechain-types/contracts/utils/CollectionDeployer'; import { deploy } from './deploy'; type Params = { @@ -19,7 +19,9 @@ type Params = { }; // prettier-ignore -export async function deployProtocol(params: Params, deployer?: Signer) { +export async function deployCollection(params: Params, deployer?: Signer) { + const { ethers } = await import('hardhat'); + const { name, symbol, @@ -31,11 +33,9 @@ export async function deployProtocol(params: Params, deployer?: Signer) { minAuctionDuration, } = params; - const { ethers } = await import('hardhat'); - const { receipt } = await deploy( { - name: 'Deployer', + name: 'CollectionDeployer', constructorArgs: [name, symbol, main, usdc, minPrice, minFee, minAuctionDuration, regulated], }, deployer, @@ -43,7 +43,7 @@ export async function deployProtocol(params: Params, deployer?: Signer) { const Proxy = await ethers.getContractFactory('TransparentUpgradeableProxy'); const ProxyAdmin = await ethers.getContractFactory('ProxyAdmin'); - const Deployer = await ethers.getContractFactory('Deployer'); + const Deployer = await ethers.getContractFactory('CollectionDeployer'); const ArtToken_Proxy_UpgradedEvent = < UpgradedEvent.LogDescription @@ -78,12 +78,12 @@ export async function deployProtocol(params: Params, deployer?: Signer) { const artTokenAddr = Deployer_DeployedEvent.args.artToken; const artTokenImplAddr = ArtToken_Proxy_UpgradedEvent.args.implementation; const artTokenProxyAdminAddr = ArtToken_Proxy_AdminChangedEvent.args.newAdmin; - const artTokenProxyAdminOwner = ArtToken_ProxyAdmin_OwnershipTransferredEvent.args.newOwner; + const artTokenProxyAdminOwnerAddr = ArtToken_ProxyAdmin_OwnershipTransferredEvent.args.newOwner; const auctionHouseAddr = Deployer_DeployedEvent.args.auctionHouse; const auctionHouseImplAddr = AuctionHouse_Proxy_UpgradedEvent.args.implementation; const auctionHouseProxyAdminAddr = AuctionHouse_Proxy_AdminChangedEvent.args.newAdmin; - const auctionHouseProxyAdminOwner = AuctionHouse_ProxyAdmin_OwnershipTransferredEvent.args.newOwner; + const auctionHouseProxyAdminOwnerAddr = AuctionHouse_ProxyAdmin_OwnershipTransferredEvent.args.newOwner; const artToken = await ethers.getContractAt('ArtToken', artTokenAddr); const artTokenProxyAdmin = await ethers.getContractAt('ProxyAdmin', artTokenProxyAdminAddr); @@ -98,14 +98,14 @@ export async function deployProtocol(params: Params, deployer?: Signer) { artTokenAddr, artTokenProxyAdmin, artTokenProxyAdminAddr, - artTokenProxyAdminOwner, + artTokenProxyAdminOwnerAddr, artTokenImplAddr, auctionHouse, auctionHouseAddr, auctionHouseProxyAdmin, auctionHouseProxyAdminAddr, - auctionHouseProxyAdminOwner, + auctionHouseProxyAdminOwnerAddr, auctionHouseImplAddr, }; } diff --git a/scripts/deploy-market.ts b/scripts/deploy-market.ts new file mode 100644 index 0000000..d1bca96 --- /dev/null +++ b/scripts/deploy-market.ts @@ -0,0 +1,66 @@ +import { AddressLike, Signer } from 'ethers'; +import { + UpgradedEvent, + AdminChangedEvent, +} from '../typechain-types/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy'; +import { OwnershipTransferredEvent } from '../typechain-types/@openzeppelin/contracts/proxy/transparent/ProxyAdmin'; +import { DeployedEvent } from '../typechain-types/contracts/utils/MarketDeployer'; +import { deploy } from './deploy'; + +type Params = { + main: AddressLike; +}; + +// prettier-ignore +export async function deployMarket(params: Params, deployer?: Signer) { + const { ethers } = await import('hardhat'); + + const { main } = params; + + const { receipt } = await deploy( + { + name: 'MarketDeployer', + constructorArgs: [main], + }, + deployer, + ); + + const Proxy = await ethers.getContractFactory('TransparentUpgradeableProxy'); + const ProxyAdmin = await ethers.getContractFactory('ProxyAdmin'); + const Deployer = await ethers.getContractFactory('MarketDeployer'); + + const Market_Proxy_UpgradedEvent = < + UpgradedEvent.LogDescription + >(Proxy.interface.parseLog(receipt.logs[0])); + + const Market_ProxyAdmin_OwnershipTransferredEvent = < + OwnershipTransferredEvent.LogDescription + >(ProxyAdmin.interface.parseLog(receipt.logs[1])); + + const Market_Proxy_AdminChangedEvent = < + AdminChangedEvent.LogDescription + >(Proxy.interface.parseLog(receipt.logs[2])); + + const Deployer_DeployedEvent = < + DeployedEvent.LogDescription + >(Deployer.interface.parseLog(receipt.logs[3])); + + const marketAddr = Deployer_DeployedEvent.args.market; + const marketImplAddr = Market_Proxy_UpgradedEvent.args.implementation; + const marketProxyAdminAddr = Market_Proxy_AdminChangedEvent.args.newAdmin; + const marketProxyAdminOwnerAddr = Market_ProxyAdmin_OwnershipTransferredEvent.args.newOwner; + + const market = await ethers.getContractAt('Market', marketAddr); + const marketProxyAdmin = await ethers.getContractAt('ProxyAdmin', marketProxyAdminAddr); + + return { + receipt, + + market, + marketAddr, + marketProxyAdmin, + marketProxyAdminAddr, + marketProxyAdminOwnerAddr, + marketImplAddr, + }; +} diff --git a/slither.db.json b/slither.db.json index b353254..005f354 100644 --- a/slither.db.json +++ b/slither.db.json @@ -5,13 +5,13 @@ "type": "function", "name": "auctionExists", "source_mapping": { - "start": 2688, + "start": 2604, "length": 183, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, - "lines": [70, 71, 72, 73, 74, 75, 76], + "lines": [67, 68, 69, 70, 71, 72, 73], "starting_column": 5, "ending_column": 6 }, @@ -20,90 +20,90 @@ "type": "contract", "name": "AuctionHouse", "source_mapping": { - "start": 1203, - "length": 14191, + "start": 1056, + "length": 14168, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, "lines": [ - 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, - 218, 219, 220, 221, 222, - 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, - 238, 239, 240, 241, 242, - 243, 244, 245, 246, 247, - 248, 249, 250, 251, 252, - 253, 254, 255, 256, 257, - 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, - 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, - 278, 279, 280, 281, 282, - 283, 284, 285, 286, 287, - 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, - 298, 299, 300, 301, 302, - 303, 304, 305, 306, 307, - 308, 309, 310, 311, 312, - 313, 314, 315, 316, 317, - 318, 319, 320, 321, 322, - 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, - 333, 334, 335, 336, 337, - 338, 339, 340, 341, 342, - 343, 344, 345, 346, 347, - 348, 349, 350, 351, 352, - 353, 354, 355, 356, 357, - 358, 359, 360, 361, 362, - 363, 364, 365, 366, 367, - 368, 369, 370, 371, 372, - 373, 374, 375, 376, 377, - 378, 379, 380, 381, 382, - 383, 384, 385, 386, 387, - 388, 389, 390, 391, 392, - 393, 394, 395, 396, 397, - 398, 399, 400, 401, 402, - 403, 404, 405, 406, 407, - 408, 409, 410, 411, 412, - 413, 414, 415, 416, 417, - 418, 419, 420, 421, 422, - 423, 424, 425, 426, 427, - 428, 429, 430, 431 + 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, + 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, + 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, + 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, + 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, + 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, + 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, + 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, + 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, + 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, + 420, 421, 422, 423, 424, + 425, 426, 427 ], "starting_column": 1, "ending_column": 2 @@ -113,9 +113,9 @@ } } ], - "description": "Modifier AuctionHouse.auctionExists(uint256) (contracts/auction-house/AuctionHouse.sol#70-76) does not always execute _; or revert\n", - "markdown": "Modifier [AuctionHouse.auctionExists(uint256)](contracts/auction-house/AuctionHouse.sol#L70-L76) does not always execute _; or revert\n", - "first_markdown_element": "contracts/auction-house/AuctionHouse.sol#L70-L76", + "description": "Modifier AuctionHouse.auctionExists(uint256) (contracts/auction-house/AuctionHouse.sol#67-73) does not always execute _; or revert\n", + "markdown": "Modifier [AuctionHouse.auctionExists(uint256)](contracts/auction-house/AuctionHouse.sol#L67-L73) does not always execute _; or revert\n", + "first_markdown_element": "contracts/auction-house/AuctionHouse.sol#L67-L73", "id": "df77d86e81ab2e43df564de9204b5e212fdb053cced7d8363e9cf429b00d05c3", "check": "incorrect-modifier", "impact": "Low", @@ -127,13 +127,13 @@ "type": "function", "name": "auctionEnded", "source_mapping": { - "start": 3334, + "start": 3250, "length": 180, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, - "lines": [90, 91, 92, 93, 94, 95, 96], + "lines": [87, 88, 89, 90, 91, 92, 93], "starting_column": 5, "ending_column": 6 }, @@ -142,90 +142,90 @@ "type": "contract", "name": "AuctionHouse", "source_mapping": { - "start": 1203, - "length": 14191, + "start": 1056, + "length": 14168, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, "lines": [ - 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, - 218, 219, 220, 221, 222, - 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, - 238, 239, 240, 241, 242, - 243, 244, 245, 246, 247, - 248, 249, 250, 251, 252, - 253, 254, 255, 256, 257, - 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, - 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, - 278, 279, 280, 281, 282, - 283, 284, 285, 286, 287, - 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, - 298, 299, 300, 301, 302, - 303, 304, 305, 306, 307, - 308, 309, 310, 311, 312, - 313, 314, 315, 316, 317, - 318, 319, 320, 321, 322, - 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, - 333, 334, 335, 336, 337, - 338, 339, 340, 341, 342, - 343, 344, 345, 346, 347, - 348, 349, 350, 351, 352, - 353, 354, 355, 356, 357, - 358, 359, 360, 361, 362, - 363, 364, 365, 366, 367, - 368, 369, 370, 371, 372, - 373, 374, 375, 376, 377, - 378, 379, 380, 381, 382, - 383, 384, 385, 386, 387, - 388, 389, 390, 391, 392, - 393, 394, 395, 396, 397, - 398, 399, 400, 401, 402, - 403, 404, 405, 406, 407, - 408, 409, 410, 411, 412, - 413, 414, 415, 416, 417, - 418, 419, 420, 421, 422, - 423, 424, 425, 426, 427, - 428, 429, 430, 431 + 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, + 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, + 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, + 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, + 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, + 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, + 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, + 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, + 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, + 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, + 420, 421, 422, 423, 424, + 425, 426, 427 ], "starting_column": 1, "ending_column": 2 @@ -235,9 +235,9 @@ } } ], - "description": "Modifier AuctionHouse.auctionEnded(uint256) (contracts/auction-house/AuctionHouse.sol#90-96) does not always execute _; or revert\n", - "markdown": "Modifier [AuctionHouse.auctionEnded(uint256)](contracts/auction-house/AuctionHouse.sol#L90-L96) does not always execute _; or revert\n", - "first_markdown_element": "contracts/auction-house/AuctionHouse.sol#L90-L96", + "description": "Modifier AuctionHouse.auctionEnded(uint256) (contracts/auction-house/AuctionHouse.sol#87-93) does not always execute _; or revert\n", + "markdown": "Modifier [AuctionHouse.auctionEnded(uint256)](contracts/auction-house/AuctionHouse.sol#L87-L93) does not always execute _; or revert\n", + "first_markdown_element": "contracts/auction-house/AuctionHouse.sol#L87-L93", "id": "231e15bbc53bb317ba18ba7a532fc08f0aeab95b6e8a391e84eefe681b37b13e", "check": "incorrect-modifier", "impact": "Low", @@ -249,14 +249,14 @@ "type": "function", "name": "withBuyer", "source_mapping": { - "start": 3991, + "start": 3907, "length": 180, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, "lines": [ - 110, 111, 112, 113, 114, 115, 116 + 107, 108, 109, 110, 111, 112, 113 ], "starting_column": 5, "ending_column": 6 @@ -266,90 +266,90 @@ "type": "contract", "name": "AuctionHouse", "source_mapping": { - "start": 1203, - "length": 14191, + "start": 1056, + "length": 14168, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, "lines": [ - 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, - 218, 219, 220, 221, 222, - 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, - 238, 239, 240, 241, 242, - 243, 244, 245, 246, 247, - 248, 249, 250, 251, 252, - 253, 254, 255, 256, 257, - 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, - 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, - 278, 279, 280, 281, 282, - 283, 284, 285, 286, 287, - 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, - 298, 299, 300, 301, 302, - 303, 304, 305, 306, 307, - 308, 309, 310, 311, 312, - 313, 314, 315, 316, 317, - 318, 319, 320, 321, 322, - 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, - 333, 334, 335, 336, 337, - 338, 339, 340, 341, 342, - 343, 344, 345, 346, 347, - 348, 349, 350, 351, 352, - 353, 354, 355, 356, 357, - 358, 359, 360, 361, 362, - 363, 364, 365, 366, 367, - 368, 369, 370, 371, 372, - 373, 374, 375, 376, 377, - 378, 379, 380, 381, 382, - 383, 384, 385, 386, 387, - 388, 389, 390, 391, 392, - 393, 394, 395, 396, 397, - 398, 399, 400, 401, 402, - 403, 404, 405, 406, 407, - 408, 409, 410, 411, 412, - 413, 414, 415, 416, 417, - 418, 419, 420, 421, 422, - 423, 424, 425, 426, 427, - 428, 429, 430, 431 + 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, + 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, + 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, + 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, + 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, + 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, + 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, + 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, + 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, + 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, + 420, 421, 422, 423, 424, + 425, 426, 427 ], "starting_column": 1, "ending_column": 2 @@ -359,9 +359,9 @@ } } ], - "description": "Modifier AuctionHouse.withBuyer(uint256) (contracts/auction-house/AuctionHouse.sol#110-116) does not always execute _; or revert\n", - "markdown": "Modifier [AuctionHouse.withBuyer(uint256)](contracts/auction-house/AuctionHouse.sol#L110-L116) does not always execute _; or revert\n", - "first_markdown_element": "contracts/auction-house/AuctionHouse.sol#L110-L116", + "description": "Modifier AuctionHouse.withBuyer(uint256) (contracts/auction-house/AuctionHouse.sol#107-113) does not always execute _; or revert\n", + "markdown": "Modifier [AuctionHouse.withBuyer(uint256)](contracts/auction-house/AuctionHouse.sol#L107-L113) does not always execute _; or revert\n", + "first_markdown_element": "contracts/auction-house/AuctionHouse.sol#L107-L113", "id": "128d5b812b57359a56062cf3a9b43628ab98d0de6b09df9fdaa3697aefe12bc7", "check": "incorrect-modifier", "impact": "Low", @@ -373,14 +373,14 @@ "type": "function", "name": "authorizedBuyer", "source_mapping": { - "start": 4654, + "start": 4570, "length": 206, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, "lines": [ - 130, 131, 132, 133, 134, 135, 136 + 127, 128, 129, 130, 131, 132, 133 ], "starting_column": 5, "ending_column": 6 @@ -390,90 +390,90 @@ "type": "contract", "name": "AuctionHouse", "source_mapping": { - "start": 1203, - "length": 14191, + "start": 1056, + "length": 14168, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, "lines": [ - 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, - 218, 219, 220, 221, 222, - 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, - 238, 239, 240, 241, 242, - 243, 244, 245, 246, 247, - 248, 249, 250, 251, 252, - 253, 254, 255, 256, 257, - 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, - 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, - 278, 279, 280, 281, 282, - 283, 284, 285, 286, 287, - 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, - 298, 299, 300, 301, 302, - 303, 304, 305, 306, 307, - 308, 309, 310, 311, 312, - 313, 314, 315, 316, 317, - 318, 319, 320, 321, 322, - 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, - 333, 334, 335, 336, 337, - 338, 339, 340, 341, 342, - 343, 344, 345, 346, 347, - 348, 349, 350, 351, 352, - 353, 354, 355, 356, 357, - 358, 359, 360, 361, 362, - 363, 364, 365, 366, 367, - 368, 369, 370, 371, 372, - 373, 374, 375, 376, 377, - 378, 379, 380, 381, 382, - 383, 384, 385, 386, 387, - 388, 389, 390, 391, 392, - 393, 394, 395, 396, 397, - 398, 399, 400, 401, 402, - 403, 404, 405, 406, 407, - 408, 409, 410, 411, 412, - 413, 414, 415, 416, 417, - 418, 419, 420, 421, 422, - 423, 424, 425, 426, 427, - 428, 429, 430, 431 + 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, + 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, + 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, + 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, + 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, + 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, + 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, + 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, + 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, + 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, + 420, 421, 422, 423, 424, + 425, 426, 427 ], "starting_column": 1, "ending_column": 2 @@ -483,9 +483,9 @@ } } ], - "description": "Modifier AuctionHouse.authorizedBuyer(address) (contracts/auction-house/AuctionHouse.sol#130-136) does not always execute _; or revert\n", - "markdown": "Modifier [AuctionHouse.authorizedBuyer(address)](contracts/auction-house/AuctionHouse.sol#L130-L136) does not always execute _; or revert\n", - "first_markdown_element": "contracts/auction-house/AuctionHouse.sol#L130-L136", + "description": "Modifier AuctionHouse.authorizedBuyer(address) (contracts/auction-house/AuctionHouse.sol#127-133) does not always execute _; or revert\n", + "markdown": "Modifier [AuctionHouse.authorizedBuyer(address)](contracts/auction-house/AuctionHouse.sol#L127-L133) does not always execute _; or revert\n", + "first_markdown_element": "contracts/auction-house/AuctionHouse.sol#L127-L133", "id": "44596abc779becc714ceca96ccacdc0a13e2cb26cde89bd96cbe5d21e7dc5f1b", "check": "incorrect-modifier", "impact": "Low", @@ -497,24 +497,24 @@ "type": "function", "name": "create", "source_mapping": { - "start": 7202, + "start": 7050, "length": 2267, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, "lines": [ - 192, 193, 194, 195, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 205, - 206, 207, 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, 218, 219, - 220, 221, 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, 232, 233, - 234, 235, 236, 237, 238, 239, 240, - 241, 242, 243, 244, 245, 246, 247, - 248, 249, 250, 251, 252, 253, 254, - 255, 256, 257, 258, 259, 260, 261, - 262, 263 + 189, 190, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, 201, 202, + 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, + 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, + 259, 260 ], "starting_column": 5, "ending_column": 6 @@ -524,90 +524,90 @@ "type": "contract", "name": "AuctionHouse", "source_mapping": { - "start": 1203, - "length": 14191, + "start": 1056, + "length": 14168, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, "lines": [ - 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, - 218, 219, 220, 221, 222, - 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, - 238, 239, 240, 241, 242, - 243, 244, 245, 246, 247, - 248, 249, 250, 251, 252, - 253, 254, 255, 256, 257, - 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, - 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, - 278, 279, 280, 281, 282, - 283, 284, 285, 286, 287, - 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, - 298, 299, 300, 301, 302, - 303, 304, 305, 306, 307, - 308, 309, 310, 311, 312, - 313, 314, 315, 316, 317, - 318, 319, 320, 321, 322, - 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, - 333, 334, 335, 336, 337, - 338, 339, 340, 341, 342, - 343, 344, 345, 346, 347, - 348, 349, 350, 351, 352, - 353, 354, 355, 356, 357, - 358, 359, 360, 361, 362, - 363, 364, 365, 366, 367, - 368, 369, 370, 371, 372, - 373, 374, 375, 376, 377, - 378, 379, 380, 381, 382, - 383, 384, 385, 386, 387, - 388, 389, 390, 391, 392, - 393, 394, 395, 396, 397, - 398, 399, 400, 401, 402, - 403, 404, 405, 406, 407, - 408, 409, 410, 411, 412, - 413, 414, 415, 416, 417, - 418, 419, 420, 421, 422, - 423, 424, 425, 426, 427, - 428, 429, 430, 431 + 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, + 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, + 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, + 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, + 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, + 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, + 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, + 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, + 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, + 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, + 420, 421, 422, 423, 424, + 425, 426, 427 ], "starting_column": 1, "ending_column": 2 @@ -620,13 +620,13 @@ "type": "node", "name": "params.endTime < block.timestamp + MIN_DURATION", "source_mapping": { - "start": 8300, + "start": 8148, "length": 47, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, - "lines": [227], + "lines": [224], "starting_column": 13, "ending_column": 60 }, @@ -635,28 +635,28 @@ "type": "function", "name": "create", "source_mapping": { - "start": 7202, + "start": 7050, "length": 2267, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, "lines": [ - 192, 193, 194, 195, 196, - 197, 198, 199, 200, 201, - 202, 203, 204, 205, 206, - 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, - 217, 218, 219, 220, 221, - 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, - 232, 233, 234, 235, 236, - 237, 238, 239, 240, 241, - 242, 243, 244, 245, 246, - 247, 248, 249, 250, 251, - 252, 253, 254, 255, 256, - 257, 258, 259, 260, 261, - 262, 263 + 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, + 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, + 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, + 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, + 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, + 259, 260 ], "starting_column": 5, "ending_column": 6 @@ -666,111 +666,111 @@ "type": "contract", "name": "AuctionHouse", "source_mapping": { - "start": 1203, - "length": 14191, + "start": 1056, + "length": 14168, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, "lines": [ - 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, - 97, 98, 99, 100, - 101, 102, 103, 104, - 105, 106, 107, 108, - 109, 110, 111, 112, - 113, 114, 115, 116, - 117, 118, 119, 120, - 121, 122, 123, 124, - 125, 126, 127, 128, - 129, 130, 131, 132, - 133, 134, 135, 136, - 137, 138, 139, 140, - 141, 142, 143, 144, - 145, 146, 147, 148, - 149, 150, 151, 152, - 153, 154, 155, 156, - 157, 158, 159, 160, - 161, 162, 163, 164, - 165, 166, 167, 168, - 169, 170, 171, 172, - 173, 174, 175, 176, - 177, 178, 179, 180, - 181, 182, 183, 184, - 185, 186, 187, 188, - 189, 190, 191, 192, - 193, 194, 195, 196, - 197, 198, 199, 200, - 201, 202, 203, 204, - 205, 206, 207, 208, - 209, 210, 211, 212, - 213, 214, 215, 216, - 217, 218, 219, 220, - 221, 222, 223, 224, - 225, 226, 227, 228, - 229, 230, 231, 232, - 233, 234, 235, 236, - 237, 238, 239, 240, - 241, 242, 243, 244, - 245, 246, 247, 248, - 249, 250, 251, 252, - 253, 254, 255, 256, - 257, 258, 259, 260, - 261, 262, 263, 264, - 265, 266, 267, 268, - 269, 270, 271, 272, - 273, 274, 275, 276, - 277, 278, 279, 280, - 281, 282, 283, 284, - 285, 286, 287, 288, - 289, 290, 291, 292, - 293, 294, 295, 296, - 297, 298, 299, 300, - 301, 302, 303, 304, - 305, 306, 307, 308, - 309, 310, 311, 312, - 313, 314, 315, 316, - 317, 318, 319, 320, - 321, 322, 323, 324, - 325, 326, 327, 328, - 329, 330, 331, 332, - 333, 334, 335, 336, - 337, 338, 339, 340, - 341, 342, 343, 344, - 345, 346, 347, 348, - 349, 350, 351, 352, - 353, 354, 355, 356, - 357, 358, 359, 360, - 361, 362, 363, 364, - 365, 366, 367, 368, - 369, 370, 371, 372, - 373, 374, 375, 376, - 377, 378, 379, 380, - 381, 382, 383, 384, - 385, 386, 387, 388, - 389, 390, 391, 392, - 393, 394, 395, 396, - 397, 398, 399, 400, - 401, 402, 403, 404, - 405, 406, 407, 408, - 409, 410, 411, 412, - 413, 414, 415, 416, - 417, 418, 419, 420, - 421, 422, 423, 424, - 425, 426, 427, 428, - 429, 430, 431 + 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, + 98, 99, 100, 101, + 102, 103, 104, 105, + 106, 107, 108, 109, + 110, 111, 112, 113, + 114, 115, 116, 117, + 118, 119, 120, 121, + 122, 123, 124, 125, + 126, 127, 128, 129, + 130, 131, 132, 133, + 134, 135, 136, 137, + 138, 139, 140, 141, + 142, 143, 144, 145, + 146, 147, 148, 149, + 150, 151, 152, 153, + 154, 155, 156, 157, + 158, 159, 160, 161, + 162, 163, 164, 165, + 166, 167, 168, 169, + 170, 171, 172, 173, + 174, 175, 176, 177, + 178, 179, 180, 181, + 182, 183, 184, 185, + 186, 187, 188, 189, + 190, 191, 192, 193, + 194, 195, 196, 197, + 198, 199, 200, 201, + 202, 203, 204, 205, + 206, 207, 208, 209, + 210, 211, 212, 213, + 214, 215, 216, 217, + 218, 219, 220, 221, + 222, 223, 224, 225, + 226, 227, 228, 229, + 230, 231, 232, 233, + 234, 235, 236, 237, + 238, 239, 240, 241, + 242, 243, 244, 245, + 246, 247, 248, 249, + 250, 251, 252, 253, + 254, 255, 256, 257, + 258, 259, 260, 261, + 262, 263, 264, 265, + 266, 267, 268, 269, + 270, 271, 272, 273, + 274, 275, 276, 277, + 278, 279, 280, 281, + 282, 283, 284, 285, + 286, 287, 288, 289, + 290, 291, 292, 293, + 294, 295, 296, 297, + 298, 299, 300, 301, + 302, 303, 304, 305, + 306, 307, 308, 309, + 310, 311, 312, 313, + 314, 315, 316, 317, + 318, 319, 320, 321, + 322, 323, 324, 325, + 326, 327, 328, 329, + 330, 331, 332, 333, + 334, 335, 336, 337, + 338, 339, 340, 341, + 342, 343, 344, 345, + 346, 347, 348, 349, + 350, 351, 352, 353, + 354, 355, 356, 357, + 358, 359, 360, 361, + 362, 363, 364, 365, + 366, 367, 368, 369, + 370, 371, 372, 373, + 374, 375, 376, 377, + 378, 379, 380, 381, + 382, 383, 384, 385, + 386, 387, 388, 389, + 390, 391, 392, 393, + 394, 395, 396, 397, + 398, 399, 400, 401, + 402, 403, 404, 405, + 406, 407, 408, 409, + 410, 411, 412, 413, + 414, 415, 416, 417, + 418, 419, 420, 421, + 422, 423, 424, 425, + 426, 427 ], "starting_column": 1, "ending_column": 2 @@ -785,13 +785,13 @@ "type": "node", "name": "params.endTime > block.timestamp + MAX_DURATION", "source_mapping": { - "start": 8423, + "start": 8271, "length": 47, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, - "lines": [231], + "lines": [228], "starting_column": 13, "ending_column": 60 }, @@ -800,28 +800,28 @@ "type": "function", "name": "create", "source_mapping": { - "start": 7202, + "start": 7050, "length": 2267, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, "lines": [ - 192, 193, 194, 195, 196, - 197, 198, 199, 200, 201, - 202, 203, 204, 205, 206, - 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, - 217, 218, 219, 220, 221, - 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, - 232, 233, 234, 235, 236, - 237, 238, 239, 240, 241, - 242, 243, 244, 245, 246, - 247, 248, 249, 250, 251, - 252, 253, 254, 255, 256, - 257, 258, 259, 260, 261, - 262, 263 + 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, + 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, + 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, + 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, + 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, + 259, 260 ], "starting_column": 5, "ending_column": 6 @@ -831,111 +831,111 @@ "type": "contract", "name": "AuctionHouse", "source_mapping": { - "start": 1203, - "length": 14191, + "start": 1056, + "length": 14168, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, "lines": [ - 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, - 97, 98, 99, 100, - 101, 102, 103, 104, - 105, 106, 107, 108, - 109, 110, 111, 112, - 113, 114, 115, 116, - 117, 118, 119, 120, - 121, 122, 123, 124, - 125, 126, 127, 128, - 129, 130, 131, 132, - 133, 134, 135, 136, - 137, 138, 139, 140, - 141, 142, 143, 144, - 145, 146, 147, 148, - 149, 150, 151, 152, - 153, 154, 155, 156, - 157, 158, 159, 160, - 161, 162, 163, 164, - 165, 166, 167, 168, - 169, 170, 171, 172, - 173, 174, 175, 176, - 177, 178, 179, 180, - 181, 182, 183, 184, - 185, 186, 187, 188, - 189, 190, 191, 192, - 193, 194, 195, 196, - 197, 198, 199, 200, - 201, 202, 203, 204, - 205, 206, 207, 208, - 209, 210, 211, 212, - 213, 214, 215, 216, - 217, 218, 219, 220, - 221, 222, 223, 224, - 225, 226, 227, 228, - 229, 230, 231, 232, - 233, 234, 235, 236, - 237, 238, 239, 240, - 241, 242, 243, 244, - 245, 246, 247, 248, - 249, 250, 251, 252, - 253, 254, 255, 256, - 257, 258, 259, 260, - 261, 262, 263, 264, - 265, 266, 267, 268, - 269, 270, 271, 272, - 273, 274, 275, 276, - 277, 278, 279, 280, - 281, 282, 283, 284, - 285, 286, 287, 288, - 289, 290, 291, 292, - 293, 294, 295, 296, - 297, 298, 299, 300, - 301, 302, 303, 304, - 305, 306, 307, 308, - 309, 310, 311, 312, - 313, 314, 315, 316, - 317, 318, 319, 320, - 321, 322, 323, 324, - 325, 326, 327, 328, - 329, 330, 331, 332, - 333, 334, 335, 336, - 337, 338, 339, 340, - 341, 342, 343, 344, - 345, 346, 347, 348, - 349, 350, 351, 352, - 353, 354, 355, 356, - 357, 358, 359, 360, - 361, 362, 363, 364, - 365, 366, 367, 368, - 369, 370, 371, 372, - 373, 374, 375, 376, - 377, 378, 379, 380, - 381, 382, 383, 384, - 385, 386, 387, 388, - 389, 390, 391, 392, - 393, 394, 395, 396, - 397, 398, 399, 400, - 401, 402, 403, 404, - 405, 406, 407, 408, - 409, 410, 411, 412, - 413, 414, 415, 416, - 417, 418, 419, 420, - 421, 422, 423, 424, - 425, 426, 427, 428, - 429, 430, 431 + 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, + 98, 99, 100, 101, + 102, 103, 104, 105, + 106, 107, 108, 109, + 110, 111, 112, 113, + 114, 115, 116, 117, + 118, 119, 120, 121, + 122, 123, 124, 125, + 126, 127, 128, 129, + 130, 131, 132, 133, + 134, 135, 136, 137, + 138, 139, 140, 141, + 142, 143, 144, 145, + 146, 147, 148, 149, + 150, 151, 152, 153, + 154, 155, 156, 157, + 158, 159, 160, 161, + 162, 163, 164, 165, + 166, 167, 168, 169, + 170, 171, 172, 173, + 174, 175, 176, 177, + 178, 179, 180, 181, + 182, 183, 184, 185, + 186, 187, 188, 189, + 190, 191, 192, 193, + 194, 195, 196, 197, + 198, 199, 200, 201, + 202, 203, 204, 205, + 206, 207, 208, 209, + 210, 211, 212, 213, + 214, 215, 216, 217, + 218, 219, 220, 221, + 222, 223, 224, 225, + 226, 227, 228, 229, + 230, 231, 232, 233, + 234, 235, 236, 237, + 238, 239, 240, 241, + 242, 243, 244, 245, + 246, 247, 248, 249, + 250, 251, 252, 253, + 254, 255, 256, 257, + 258, 259, 260, 261, + 262, 263, 264, 265, + 266, 267, 268, 269, + 270, 271, 272, 273, + 274, 275, 276, 277, + 278, 279, 280, 281, + 282, 283, 284, 285, + 286, 287, 288, 289, + 290, 291, 292, 293, + 294, 295, 296, 297, + 298, 299, 300, 301, + 302, 303, 304, 305, + 306, 307, 308, 309, + 310, 311, 312, 313, + 314, 315, 316, 317, + 318, 319, 320, 321, + 322, 323, 324, 325, + 326, 327, 328, 329, + 330, 331, 332, 333, + 334, 335, 336, 337, + 338, 339, 340, 341, + 342, 343, 344, 345, + 346, 347, 348, 349, + 350, 351, 352, 353, + 354, 355, 356, 357, + 358, 359, 360, 361, + 362, 363, 364, 365, + 366, 367, 368, 369, + 370, 371, 372, 373, + 374, 375, 376, 377, + 378, 379, 380, 381, + 382, 383, 384, 385, + 386, 387, 388, 389, + 390, 391, 392, 393, + 394, 395, 396, 397, + 398, 399, 400, 401, + 402, 403, 404, 405, + 406, 407, 408, 409, + 410, 411, 412, 413, + 414, 415, 416, 417, + 418, 419, 420, 421, + 422, 423, 424, 425, + 426, 427 ], "starting_column": 1, "ending_column": 2 @@ -947,10 +947,10 @@ } } ], - "description": "AuctionHouse.create(IAuctionHouse.CreateParams) (contracts/auction-house/AuctionHouse.sol#192-263) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- params.endTime < block.timestamp + MIN_DURATION (contracts/auction-house/AuctionHouse.sol#227)\n\t- params.endTime > block.timestamp + MAX_DURATION (contracts/auction-house/AuctionHouse.sol#231)\n", - "markdown": "[AuctionHouse.create(IAuctionHouse.CreateParams)](contracts/auction-house/AuctionHouse.sol#L192-L263) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [params.endTime < block.timestamp + MIN_DURATION](contracts/auction-house/AuctionHouse.sol#L227)\n\t- [params.endTime > block.timestamp + MAX_DURATION](contracts/auction-house/AuctionHouse.sol#L231)\n", - "first_markdown_element": "contracts/auction-house/AuctionHouse.sol#L192-L263", - "id": "0ac89c334de63341c678377f56114fff1f81dadfa04803f7f138da0d4aa1822b", + "description": "AuctionHouse.create(IAuctionHouse.CreateParams) (contracts/auction-house/AuctionHouse.sol#189-260) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- params.endTime < block.timestamp + MIN_DURATION (contracts/auction-house/AuctionHouse.sol#224)\n\t- params.endTime > block.timestamp + MAX_DURATION (contracts/auction-house/AuctionHouse.sol#228)\n", + "markdown": "[AuctionHouse.create(IAuctionHouse.CreateParams)](contracts/auction-house/AuctionHouse.sol#L189-L260) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [params.endTime < block.timestamp + MIN_DURATION](contracts/auction-house/AuctionHouse.sol#L224)\n\t- [params.endTime > block.timestamp + MAX_DURATION](contracts/auction-house/AuctionHouse.sol#L228)\n", + "first_markdown_element": "contracts/auction-house/AuctionHouse.sol#L189-L260", + "id": "cf17e8ae7e74a7d4c5c2f3be417b08eb8f0609d3b36e9ecdcae6020d17d276bb", "check": "timestamp", "impact": "Low", "confidence": "Medium" @@ -961,13 +961,13 @@ "type": "function", "name": "_auctionEnded", "source_mapping": { - "start": 14567, + "start": 14397, "length": 219, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, - "lines": [412, 413, 414, 415, 416], + "lines": [408, 409, 410, 411, 412], "starting_column": 5, "ending_column": 6 }, @@ -976,90 +976,90 @@ "type": "contract", "name": "AuctionHouse", "source_mapping": { - "start": 1203, - "length": 14191, + "start": 1056, + "length": 14168, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, "lines": [ - 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, - 218, 219, 220, 221, 222, - 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, - 238, 239, 240, 241, 242, - 243, 244, 245, 246, 247, - 248, 249, 250, 251, 252, - 253, 254, 255, 256, 257, - 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, - 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, - 278, 279, 280, 281, 282, - 283, 284, 285, 286, 287, - 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, - 298, 299, 300, 301, 302, - 303, 304, 305, 306, 307, - 308, 309, 310, 311, 312, - 313, 314, 315, 316, 317, - 318, 319, 320, 321, 322, - 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, - 333, 334, 335, 336, 337, - 338, 339, 340, 341, 342, - 343, 344, 345, 346, 347, - 348, 349, 350, 351, 352, - 353, 354, 355, 356, 357, - 358, 359, 360, 361, 362, - 363, 364, 365, 366, 367, - 368, 369, 370, 371, 372, - 373, 374, 375, 376, 377, - 378, 379, 380, 381, 382, - 383, 384, 385, 386, 387, - 388, 389, 390, 391, 392, - 393, 394, 395, 396, 397, - 398, 399, 400, 401, 402, - 403, 404, 405, 406, 407, - 408, 409, 410, 411, 412, - 413, 414, 415, 416, 417, - 418, 419, 420, 421, 422, - 423, 424, 425, 426, 427, - 428, 429, 430, 431 + 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, + 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, + 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, + 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, + 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, + 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, + 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, + 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, + 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, + 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, + 420, 421, 422, 423, 424, + 425, 426, 427 ], "starting_column": 1, "ending_column": 2 @@ -1072,13 +1072,13 @@ "type": "node", "name": "$.auction[auctionId].endTime <= block.timestamp", "source_mapping": { - "start": 14725, + "start": 14555, "length": 54, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, - "lines": [415], + "lines": [411], "starting_column": 9, "ending_column": 63 }, @@ -1087,14 +1087,14 @@ "type": "function", "name": "_auctionEnded", "source_mapping": { - "start": 14567, + "start": 14397, "length": 219, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, "lines": [ - 412, 413, 414, 415, 416 + 408, 409, 410, 411, 412 ], "starting_column": 5, "ending_column": 6 @@ -1104,28 +1104,279 @@ "type": "contract", "name": "AuctionHouse", "source_mapping": { - "start": 1203, - "length": 14191, + "start": 1056, + "length": 14168, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, "lines": [ - 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, - 97, 98, 99, 100, + 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, + 98, 99, 100, 101, + 102, 103, 104, 105, + 106, 107, 108, 109, + 110, 111, 112, 113, + 114, 115, 116, 117, + 118, 119, 120, 121, + 122, 123, 124, 125, + 126, 127, 128, 129, + 130, 131, 132, 133, + 134, 135, 136, 137, + 138, 139, 140, 141, + 142, 143, 144, 145, + 146, 147, 148, 149, + 150, 151, 152, 153, + 154, 155, 156, 157, + 158, 159, 160, 161, + 162, 163, 164, 165, + 166, 167, 168, 169, + 170, 171, 172, 173, + 174, 175, 176, 177, + 178, 179, 180, 181, + 182, 183, 184, 185, + 186, 187, 188, 189, + 190, 191, 192, 193, + 194, 195, 196, 197, + 198, 199, 200, 201, + 202, 203, 204, 205, + 206, 207, 208, 209, + 210, 211, 212, 213, + 214, 215, 216, 217, + 218, 219, 220, 221, + 222, 223, 224, 225, + 226, 227, 228, 229, + 230, 231, 232, 233, + 234, 235, 236, 237, + 238, 239, 240, 241, + 242, 243, 244, 245, + 246, 247, 248, 249, + 250, 251, 252, 253, + 254, 255, 256, 257, + 258, 259, 260, 261, + 262, 263, 264, 265, + 266, 267, 268, 269, + 270, 271, 272, 273, + 274, 275, 276, 277, + 278, 279, 280, 281, + 282, 283, 284, 285, + 286, 287, 288, 289, + 290, 291, 292, 293, + 294, 295, 296, 297, + 298, 299, 300, 301, + 302, 303, 304, 305, + 306, 307, 308, 309, + 310, 311, 312, 313, + 314, 315, 316, 317, + 318, 319, 320, 321, + 322, 323, 324, 325, + 326, 327, 328, 329, + 330, 331, 332, 333, + 334, 335, 336, 337, + 338, 339, 340, 341, + 342, 343, 344, 345, + 346, 347, 348, 349, + 350, 351, 352, 353, + 354, 355, 356, 357, + 358, 359, 360, 361, + 362, 363, 364, 365, + 366, 367, 368, 369, + 370, 371, 372, 373, + 374, 375, 376, 377, + 378, 379, 380, 381, + 382, 383, 384, 385, + 386, 387, 388, 389, + 390, 391, 392, 393, + 394, 395, 396, 397, + 398, 399, 400, 401, + 402, 403, 404, 405, + 406, 407, 408, 409, + 410, 411, 412, 413, + 414, 415, 416, 417, + 418, 419, 420, 421, + 422, 423, 424, 425, + 426, 427 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "_auctionEnded(uint256)" + } + } + } + } + ], + "description": "AuctionHouse._auctionEnded(uint256) (contracts/auction-house/AuctionHouse.sol#408-412) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- $.auction[auctionId].endTime <= block.timestamp (contracts/auction-house/AuctionHouse.sol#411)\n", + "markdown": "[AuctionHouse._auctionEnded(uint256)](contracts/auction-house/AuctionHouse.sol#L408-L412) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [$.auction[auctionId].endTime <= block.timestamp](contracts/auction-house/AuctionHouse.sol#L411)\n", + "first_markdown_element": "contracts/auction-house/AuctionHouse.sol#L408-L412", + "id": "dfabb66fec388ab5e4c036f0c35a8284263c27542eb2bc1e932f8bfad9990989", + "check": "timestamp", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "_requireAuthorizedOrder", + "source_mapping": { + "start": 8834, + "length": 568, + "filename_relative": "contracts/market/Market.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/market/Market.sol", + "filename_short": "contracts/market/Market.sol", + "is_dependency": false, + "lines": [ + 265, 266, 267, 268, 269, 270, 271, + 272, 273, 274, 275, 276, 277, 278, + 279, 280, 281, 282, 283, 284, 285 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "Market", + "source_mapping": { + "start": 1211, + "length": 8193, + "filename_relative": "contracts/market/Market.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/market/Market.sol", + "filename_short": "contracts/market/Market.sol", + "is_dependency": false, + "lines": [ + 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, + 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, + 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, + 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, + 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "_requireAuthorizedOrder(bytes32,address,uint256,uint256,bytes)" + } + }, + { + "type": "node", + "name": "startTime > block.timestamp || endTime < block.timestamp", + "source_mapping": { + "start": 9042, + "length": 56, + "filename_relative": "contracts/market/Market.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/market/Market.sol", + "filename_short": "contracts/market/Market.sol", + "is_dependency": false, + "lines": [272], + "starting_column": 13, + "ending_column": 69 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_requireAuthorizedOrder", + "source_mapping": { + "start": 8834, + "length": 568, + "filename_relative": "contracts/market/Market.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/market/Market.sol", + "filename_short": "contracts/market/Market.sol", + "is_dependency": false, + "lines": [ + 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, 285 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "Market", + "source_mapping": { + "start": 1211, + "length": 8193, + "filename_relative": "contracts/market/Market.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/market/Market.sol", + "filename_short": "contracts/market/Market.sol", + "is_dependency": false, + "lines": [ + 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, @@ -1172,77 +1423,265 @@ 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, - 289, 290, 291, 292, - 293, 294, 295, 296, - 297, 298, 299, 300, - 301, 302, 303, 304, - 305, 306, 307, 308, - 309, 310, 311, 312, - 313, 314, 315, 316, - 317, 318, 319, 320, - 321, 322, 323, 324, - 325, 326, 327, 328, - 329, 330, 331, 332, - 333, 334, 335, 336, - 337, 338, 339, 340, - 341, 342, 343, 344, - 345, 346, 347, 348, - 349, 350, 351, 352, - 353, 354, 355, 356, - 357, 358, 359, 360, - 361, 362, 363, 364, - 365, 366, 367, 368, - 369, 370, 371, 372, - 373, 374, 375, 376, - 377, 378, 379, 380, - 381, 382, 383, 384, - 385, 386, 387, 388, - 389, 390, 391, 392, - 393, 394, 395, 396, - 397, 398, 399, 400, - 401, 402, 403, 404, - 405, 406, 407, 408, - 409, 410, 411, 412, - 413, 414, 415, 416, - 417, 418, 419, 420, - 421, 422, 423, 424, - 425, 426, 427, 428, - 429, 430, 431 + 285, 286 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "_requireAuthorizedOrder(bytes32,address,uint256,uint256,bytes)" + } + } + } + } + ], + "description": "Market._requireAuthorizedOrder(bytes32,address,uint256,uint256,bytes) (contracts/market/Market.sol#265-285) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- startTime > block.timestamp || endTime < block.timestamp (contracts/market/Market.sol#272)\n", + "markdown": "[Market._requireAuthorizedOrder(bytes32,address,uint256,uint256,bytes)](contracts/market/Market.sol#L265-L285) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [startTime > block.timestamp || endTime < block.timestamp](contracts/market/Market.sol#L272)\n", + "first_markdown_element": "contracts/market/Market.sol#L265-L285", + "id": "3ba883e3a9297c6c21ee47636449a380ba9903c018dcdd7d1176e0c28025d585", + "check": "timestamp", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "_requireAuthorizedAction", + "source_mapping": { + "start": 1457, + "length": 441, + "filename_relative": "contracts/utils/Authorization.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/utils/Authorization.sol", + "filename_short": "contracts/utils/Authorization.sol", + "is_dependency": false, + "lines": [ + 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "Authorization", + "source_mapping": { + "start": 740, + "length": 1386, + "filename_relative": "contracts/utils/Authorization.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/utils/Authorization.sol", + "filename_short": "contracts/utils/Authorization.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "_requireAuthorizedAction(bytes32,uint256,bytes)" + } + }, + { + "type": "node", + "name": "deadline < block.timestamp", + "source_mapping": { + "start": 1584, + "length": 26, + "filename_relative": "contracts/utils/Authorization.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/utils/Authorization.sol", + "filename_short": "contracts/utils/Authorization.sol", + "is_dependency": false, + "lines": [35], + "starting_column": 13, + "ending_column": 39 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_requireAuthorizedAction", + "source_mapping": { + "start": 1457, + "length": 441, + "filename_relative": "contracts/utils/Authorization.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/utils/Authorization.sol", + "filename_short": "contracts/utils/Authorization.sol", + "is_dependency": false, + "lines": [ + 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "Authorization", + "source_mapping": { + "start": 740, + "length": 1386, + "filename_relative": "contracts/utils/Authorization.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/utils/Authorization.sol", + "filename_short": "contracts/utils/Authorization.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, + 50, 51 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "_requireAuthorizedAction(bytes32,uint256,bytes)" + } + } + } + } + ], + "description": "Authorization._requireAuthorizedAction(bytes32,uint256,bytes) (contracts/utils/Authorization.sol#34-44) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- deadline < block.timestamp (contracts/utils/Authorization.sol#35)\n", + "markdown": "[Authorization._requireAuthorizedAction(bytes32,uint256,bytes)](contracts/utils/Authorization.sol#L34-L44) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [deadline < block.timestamp](contracts/utils/Authorization.sol#L35)\n", + "first_markdown_element": "contracts/utils/Authorization.sol#L34-L44", + "id": "0ab54036e1970b1ccef6d1e540f052283408c22e46489be98f5c540b586b5f7f", + "check": "timestamp", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "layout", + "source_mapping": { + "start": 1038, + "length": 197, + "filename_relative": "contracts/auction-house/AuctionHouseStorage.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouseStorage.sol", + "filename_short": "contracts/auction-house/AuctionHouseStorage.sol", + "is_dependency": false, + "lines": [ + 31, 32, 33, 34, 35, 36, 37, 38 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "AuctionHouseStorage", + "source_mapping": { + "start": 349, + "length": 888, + "filename_relative": "contracts/auction-house/AuctionHouseStorage.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouseStorage.sol", + "filename_short": "contracts/auction-house/AuctionHouseStorage.sol", + "is_dependency": false, + "lines": [ + 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "layout()" + } + }, + { + "type": "node", + "name": "", + "source_mapping": { + "start": 1182, + "length": 47, + "filename_relative": "contracts/auction-house/AuctionHouseStorage.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouseStorage.sol", + "filename_short": "contracts/auction-house/AuctionHouseStorage.sol", + "is_dependency": false, + "lines": [35, 36, 37], + "starting_column": 9, + "ending_column": 10 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "layout", + "source_mapping": { + "start": 1038, + "length": 197, + "filename_relative": "contracts/auction-house/AuctionHouseStorage.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouseStorage.sol", + "filename_short": "contracts/auction-house/AuctionHouseStorage.sol", + "is_dependency": false, + "lines": [ + 31, 32, 33, 34, 35, 36, 37, + 38 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "AuctionHouseStorage", + "source_mapping": { + "start": 349, + "length": 888, + "filename_relative": "contracts/auction-house/AuctionHouseStorage.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouseStorage.sol", + "filename_short": "contracts/auction-house/AuctionHouseStorage.sol", + "is_dependency": false, + "lines": [ + 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, + 37, 38, 39 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "_auctionEnded(uint256)" + "signature": "layout()" } } } } ], - "description": "AuctionHouse._auctionEnded(uint256) (contracts/auction-house/AuctionHouse.sol#412-416) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- $.auction[auctionId].endTime <= block.timestamp (contracts/auction-house/AuctionHouse.sol#415)\n", - "markdown": "[AuctionHouse._auctionEnded(uint256)](contracts/auction-house/AuctionHouse.sol#L412-L416) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [$.auction[auctionId].endTime <= block.timestamp](contracts/auction-house/AuctionHouse.sol#L415)\n", - "first_markdown_element": "contracts/auction-house/AuctionHouse.sol#L412-L416", - "id": "9eaae547ddec8db6f10af3058810828a88af986f9782af472a5d58ca21237c57", - "check": "timestamp", - "impact": "Low", - "confidence": "Medium" + "description": "AuctionHouseStorage.layout() (contracts/auction-house/AuctionHouseStorage.sol#31-38) uses assembly\n\t- INLINE ASM (contracts/auction-house/AuctionHouseStorage.sol#35-37)\n", + "markdown": "[AuctionHouseStorage.layout()](contracts/auction-house/AuctionHouseStorage.sol#L31-L38) uses assembly\n\t- [INLINE ASM](contracts/auction-house/AuctionHouseStorage.sol#L35-L37)\n", + "first_markdown_element": "contracts/auction-house/AuctionHouseStorage.sol#L31-L38", + "id": "b2f46b0321988c0910efc8dbda3479e893f7d1198cb5d7d2b4fac5f37372cbe3", + "check": "assembly", + "impact": "Informational", + "confidence": "High" }, { "elements": [ { "type": "function", - "name": "_requireAuthorizedAction", + "name": "layout", "source_mapping": { - "start": 1464, - "length": 441, - "filename_relative": "contracts/utils/Authorization.sol", - "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/utils/Authorization.sol", - "filename_short": "contracts/utils/Authorization.sol", + "start": 894, + "length": 197, + "filename_relative": "contracts/market/MarketStorage.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/market/MarketStorage.sol", + "filename_short": "contracts/market/MarketStorage.sol", "is_dependency": false, "lines": [ - 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44 + 27, 28, 29, 30, 31, 32, 33, 34 ], "starting_column": 5, "ending_column": 6 @@ -1250,56 +1689,55 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Authorization", + "name": "MarketStorage", "source_mapping": { - "start": 740, - "length": 1393, - "filename_relative": "contracts/utils/Authorization.sol", - "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/utils/Authorization.sol", - "filename_short": "contracts/utils/Authorization.sol", + "start": 277, + "length": 816, + "filename_relative": "contracts/market/MarketStorage.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/market/MarketStorage.sol", + "filename_short": "contracts/market/MarketStorage.sol", "is_dependency": false, "lines": [ - 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51 + 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "_requireAuthorizedAction(bytes32,uint256,bytes)" + "signature": "layout()" } }, { "type": "node", - "name": "deadline < block.timestamp", + "name": "", "source_mapping": { - "start": 1591, - "length": 26, - "filename_relative": "contracts/utils/Authorization.sol", - "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/utils/Authorization.sol", - "filename_short": "contracts/utils/Authorization.sol", + "start": 1038, + "length": 47, + "filename_relative": "contracts/market/MarketStorage.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/market/MarketStorage.sol", + "filename_short": "contracts/market/MarketStorage.sol", "is_dependency": false, - "lines": [35], - "starting_column": 13, - "ending_column": 39 + "lines": [31, 32, 33], + "starting_column": 9, + "ending_column": 10 }, "type_specific_fields": { "parent": { "type": "function", - "name": "_requireAuthorizedAction", + "name": "layout", "source_mapping": { - "start": 1464, - "length": 441, - "filename_relative": "contracts/utils/Authorization.sol", - "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/utils/Authorization.sol", - "filename_short": "contracts/utils/Authorization.sol", + "start": 894, + "length": 197, + "filename_relative": "contracts/market/MarketStorage.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/market/MarketStorage.sol", + "filename_short": "contracts/market/MarketStorage.sol", "is_dependency": false, "lines": [ - 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44 + 27, 28, 29, 30, 31, 32, 33, + 34 ], "starting_column": 5, "ending_column": 6 @@ -1307,40 +1745,39 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Authorization", + "name": "MarketStorage", "source_mapping": { - "start": 740, - "length": 1393, - "filename_relative": "contracts/utils/Authorization.sol", - "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/utils/Authorization.sol", - "filename_short": "contracts/utils/Authorization.sol", + "start": 277, + "length": 816, + "filename_relative": "contracts/market/MarketStorage.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/market/MarketStorage.sol", + "filename_short": "contracts/market/MarketStorage.sol", "is_dependency": false, "lines": [ + 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, - 50, 51 + 35 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "_requireAuthorizedAction(bytes32,uint256,bytes)" + "signature": "layout()" } } } } ], - "description": "Authorization._requireAuthorizedAction(bytes32,uint256,bytes) (contracts/utils/Authorization.sol#34-44) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- deadline < block.timestamp (contracts/utils/Authorization.sol#35)\n", - "markdown": "[Authorization._requireAuthorizedAction(bytes32,uint256,bytes)](contracts/utils/Authorization.sol#L34-L44) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [deadline < block.timestamp](contracts/utils/Authorization.sol#L35)\n", - "first_markdown_element": "contracts/utils/Authorization.sol#L34-L44", - "id": "0ab54036e1970b1ccef6d1e540f052283408c22e46489be98f5c540b586b5f7f", - "check": "timestamp", - "impact": "Low", - "confidence": "Medium" + "description": "MarketStorage.layout() (contracts/market/MarketStorage.sol#27-34) uses assembly\n\t- INLINE ASM (contracts/market/MarketStorage.sol#31-33)\n", + "markdown": "[MarketStorage.layout()](contracts/market/MarketStorage.sol#L27-L34) uses assembly\n\t- [INLINE ASM](contracts/market/MarketStorage.sol#L31-L33)\n", + "first_markdown_element": "contracts/market/MarketStorage.sol#L27-L34", + "id": "008eb0f824385ea7000bc3919ff70c6c6f8446f78ad6c1c4e385783554c7c75f", + "check": "assembly", + "impact": "Informational", + "confidence": "High" }, { "elements": [ @@ -1348,14 +1785,14 @@ "type": "function", "name": "layout", "source_mapping": { - "start": 1089, + "start": 901, "length": 197, - "filename_relative": "contracts/auction-house/AuctionHouseStorage.sol", - "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouseStorage.sol", - "filename_short": "contracts/auction-house/AuctionHouseStorage.sol", + "filename_relative": "contracts/utils/currency-manager/CurrencyManagerStorage.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/utils/currency-manager/CurrencyManagerStorage.sol", + "filename_short": "contracts/utils/currency-manager/CurrencyManagerStorage.sol", "is_dependency": false, "lines": [ - 32, 33, 34, 35, 36, 37, 38, 39 + 28, 29, 30, 31, 32, 33, 34, 35 ], "starting_column": 5, "ending_column": 6 @@ -1363,19 +1800,19 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "AuctionHouseStorage", + "name": "CurrencyManagerStorage", "source_mapping": { - "start": 373, - "length": 915, - "filename_relative": "contracts/auction-house/AuctionHouseStorage.sol", - "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouseStorage.sol", - "filename_short": "contracts/auction-house/AuctionHouseStorage.sol", + "start": 290, + "length": 810, + "filename_relative": "contracts/utils/currency-manager/CurrencyManagerStorage.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/utils/currency-manager/CurrencyManagerStorage.sol", + "filename_short": "contracts/utils/currency-manager/CurrencyManagerStorage.sol", "is_dependency": false, "lines": [ - 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40 + 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36 ], "starting_column": 1, "ending_column": 2 @@ -1388,13 +1825,13 @@ "type": "node", "name": "", "source_mapping": { - "start": 1233, + "start": 1045, "length": 47, - "filename_relative": "contracts/auction-house/AuctionHouseStorage.sol", - "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouseStorage.sol", - "filename_short": "contracts/auction-house/AuctionHouseStorage.sol", + "filename_relative": "contracts/utils/currency-manager/CurrencyManagerStorage.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/utils/currency-manager/CurrencyManagerStorage.sol", + "filename_short": "contracts/utils/currency-manager/CurrencyManagerStorage.sol", "is_dependency": false, - "lines": [36, 37, 38], + "lines": [32, 33, 34], "starting_column": 9, "ending_column": 10 }, @@ -1403,15 +1840,15 @@ "type": "function", "name": "layout", "source_mapping": { - "start": 1089, + "start": 901, "length": 197, - "filename_relative": "contracts/auction-house/AuctionHouseStorage.sol", - "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouseStorage.sol", - "filename_short": "contracts/auction-house/AuctionHouseStorage.sol", + "filename_relative": "contracts/utils/currency-manager/CurrencyManagerStorage.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/utils/currency-manager/CurrencyManagerStorage.sol", + "filename_short": "contracts/utils/currency-manager/CurrencyManagerStorage.sol", "is_dependency": false, "lines": [ - 32, 33, 34, 35, 36, 37, 38, - 39 + 28, 29, 30, 31, 32, 33, 34, + 35 ], "starting_column": 5, "ending_column": 6 @@ -1419,21 +1856,21 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "AuctionHouseStorage", + "name": "CurrencyManagerStorage", "source_mapping": { - "start": 373, - "length": 915, - "filename_relative": "contracts/auction-house/AuctionHouseStorage.sol", - "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouseStorage.sol", - "filename_short": "contracts/auction-house/AuctionHouseStorage.sol", + "start": 290, + "length": 810, + "filename_relative": "contracts/utils/currency-manager/CurrencyManagerStorage.sol", + "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/utils/currency-manager/CurrencyManagerStorage.sol", + "filename_short": "contracts/utils/currency-manager/CurrencyManagerStorage.sol", "is_dependency": false, "lines": [ - 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, - 38, 39, 40 + 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, + 35, 36 ], "starting_column": 1, "ending_column": 2 @@ -1445,10 +1882,10 @@ } } ], - "description": "AuctionHouseStorage.layout() (contracts/auction-house/AuctionHouseStorage.sol#32-39) uses assembly\n\t- INLINE ASM (contracts/auction-house/AuctionHouseStorage.sol#36-38)\n", - "markdown": "[AuctionHouseStorage.layout()](contracts/auction-house/AuctionHouseStorage.sol#L32-L39) uses assembly\n\t- [INLINE ASM](contracts/auction-house/AuctionHouseStorage.sol#L36-L38)\n", - "first_markdown_element": "contracts/auction-house/AuctionHouseStorage.sol#L32-L39", - "id": "7c5313869be12a01a9e8b45aeaa345a7ecfb1a70c94b5ba9f2d516064a0d6453", + "description": "CurrencyManagerStorage.layout() (contracts/utils/currency-manager/CurrencyManagerStorage.sol#28-35) uses assembly\n\t- INLINE ASM (contracts/utils/currency-manager/CurrencyManagerStorage.sol#32-34)\n", + "markdown": "[CurrencyManagerStorage.layout()](contracts/utils/currency-manager/CurrencyManagerStorage.sol#L28-L35) uses assembly\n\t- [INLINE ASM](contracts/utils/currency-manager/CurrencyManagerStorage.sol#L32-L34)\n", + "first_markdown_element": "contracts/utils/currency-manager/CurrencyManagerStorage.sol#L28-L35", + "id": "00e1ff2e413045f4c9ae84c01a9f0173f5674e5cbd30ed695e78ed5f4d20ea35", "check": "assembly", "impact": "Informational", "confidence": "High" @@ -1459,14 +1896,14 @@ "type": "function", "name": "layout", "source_mapping": { - "start": 1028, + "start": 960, "length": 197, "filename_relative": "contracts/utils/role-system/RoleSystemStorage.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/utils/role-system/RoleSystemStorage.sol", "filename_short": "contracts/utils/role-system/RoleSystemStorage.sol", "is_dependency": false, "lines": [ - 30, 31, 32, 33, 34, 35, 36, 37 + 28, 29, 30, 31, 32, 33, 34, 35 ], "starting_column": 5, "ending_column": 6 @@ -1476,17 +1913,17 @@ "type": "contract", "name": "RoleSystemStorage", "source_mapping": { - "start": 357, - "length": 870, + "start": 293, + "length": 866, "filename_relative": "contracts/utils/role-system/RoleSystemStorage.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/utils/role-system/RoleSystemStorage.sol", "filename_short": "contracts/utils/role-system/RoleSystemStorage.sol", "is_dependency": false, "lines": [ - 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38 + 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36 ], "starting_column": 1, "ending_column": 2 @@ -1499,13 +1936,13 @@ "type": "node", "name": "", "source_mapping": { - "start": 1172, + "start": 1104, "length": 47, "filename_relative": "contracts/utils/role-system/RoleSystemStorage.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/utils/role-system/RoleSystemStorage.sol", "filename_short": "contracts/utils/role-system/RoleSystemStorage.sol", "is_dependency": false, - "lines": [34, 35, 36], + "lines": [32, 33, 34], "starting_column": 9, "ending_column": 10 }, @@ -1514,15 +1951,15 @@ "type": "function", "name": "layout", "source_mapping": { - "start": 1028, + "start": 960, "length": 197, "filename_relative": "contracts/utils/role-system/RoleSystemStorage.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/utils/role-system/RoleSystemStorage.sol", "filename_short": "contracts/utils/role-system/RoleSystemStorage.sol", "is_dependency": false, "lines": [ - 30, 31, 32, 33, 34, 35, 36, - 37 + 28, 29, 30, 31, 32, 33, 34, + 35 ], "starting_column": 5, "ending_column": 6 @@ -1532,19 +1969,19 @@ "type": "contract", "name": "RoleSystemStorage", "source_mapping": { - "start": 357, - "length": 870, + "start": 293, + "length": 866, "filename_relative": "contracts/utils/role-system/RoleSystemStorage.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/utils/role-system/RoleSystemStorage.sol", "filename_short": "contracts/utils/role-system/RoleSystemStorage.sol", "is_dependency": false, "lines": [ - 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, - 37, 38 + 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, + 35, 36 ], "starting_column": 1, "ending_column": 2 @@ -1556,10 +1993,10 @@ } } ], - "description": "RoleSystemStorage.layout() (contracts/utils/role-system/RoleSystemStorage.sol#30-37) uses assembly\n\t- INLINE ASM (contracts/utils/role-system/RoleSystemStorage.sol#34-36)\n", - "markdown": "[RoleSystemStorage.layout()](contracts/utils/role-system/RoleSystemStorage.sol#L30-L37) uses assembly\n\t- [INLINE ASM](contracts/utils/role-system/RoleSystemStorage.sol#L34-L36)\n", - "first_markdown_element": "contracts/utils/role-system/RoleSystemStorage.sol#L30-L37", - "id": "425f82cf0c54febf3b13a7efb0d1d6908f0fa90dab5121a1b884dd4ce010f315", + "description": "RoleSystemStorage.layout() (contracts/utils/role-system/RoleSystemStorage.sol#28-35) uses assembly\n\t- INLINE ASM (contracts/utils/role-system/RoleSystemStorage.sol#32-34)\n", + "markdown": "[RoleSystemStorage.layout()](contracts/utils/role-system/RoleSystemStorage.sol#L28-L35) uses assembly\n\t- [INLINE ASM](contracts/utils/role-system/RoleSystemStorage.sol#L32-L34)\n", + "first_markdown_element": "contracts/utils/role-system/RoleSystemStorage.sol#L28-L35", + "id": "4a56117d004d366e5830761a960600ec7049cf3320b79080e3f734f694b3ae2f", "check": "assembly", "impact": "Informational", "confidence": "High" @@ -1570,13 +2007,13 @@ "type": "function", "name": "_beforeApprove", "source_mapping": { - "start": 4734, + "start": 4664, "length": 72, "filename_relative": "contracts/art-token/ArtTokenBase.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtTokenBase.sol", "filename_short": "contracts/art-token/ArtTokenBase.sol", "is_dependency": false, - "lines": [130], + "lines": [127], "starting_column": 5, "ending_column": 77 }, @@ -1585,33 +2022,32 @@ "type": "contract", "name": "ArtTokenBase", "source_mapping": { - "start": 853, - "length": 4336, + "start": 842, + "length": 4254, "filename_relative": "contracts/art-token/ArtTokenBase.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtTokenBase.sol", "filename_short": "contracts/art-token/ArtTokenBase.sol", "is_dependency": false, "lines": [ - 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, - 139, 140 + 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, + 133, 134, 135, 136 ], "starting_column": 1, "ending_column": 2 @@ -1621,9 +2057,9 @@ } } ], - "description": "ArtTokenBase._beforeApprove(address,uint256) (contracts/art-token/ArtTokenBase.sol#130) is never used and should be removed\n", - "markdown": "[ArtTokenBase._beforeApprove(address,uint256)](contracts/art-token/ArtTokenBase.sol#L130) is never used and should be removed\n", - "first_markdown_element": "contracts/art-token/ArtTokenBase.sol#L130", + "description": "ArtTokenBase._beforeApprove(address,uint256) (contracts/art-token/ArtTokenBase.sol#127) is never used and should be removed\n", + "markdown": "[ArtTokenBase._beforeApprove(address,uint256)](contracts/art-token/ArtTokenBase.sol#L127) is never used and should be removed\n", + "first_markdown_element": "contracts/art-token/ArtTokenBase.sol#L127", "id": "5f92f43cb8301f0cfb6f065cce61d7ef313093cc529cd8c8fe8f4cd4faf86348", "check": "dead-code", "impact": "Informational", @@ -1635,13 +2071,13 @@ "type": "function", "name": "_beforeSetApprovalForAll", "source_mapping": { - "start": 5101, + "start": 5008, "length": 86, "filename_relative": "contracts/art-token/ArtTokenBase.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtTokenBase.sol", "filename_short": "contracts/art-token/ArtTokenBase.sol", "is_dependency": false, - "lines": [139], + "lines": [135], "starting_column": 5, "ending_column": 91 }, @@ -1650,33 +2086,32 @@ "type": "contract", "name": "ArtTokenBase", "source_mapping": { - "start": 853, - "length": 4336, + "start": 842, + "length": 4254, "filename_relative": "contracts/art-token/ArtTokenBase.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtTokenBase.sol", "filename_short": "contracts/art-token/ArtTokenBase.sol", "is_dependency": false, "lines": [ - 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, - 139, 140 + 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, + 133, 134, 135, 136 ], "starting_column": 1, "ending_column": 2 @@ -1686,9 +2121,9 @@ } } ], - "description": "ArtTokenBase._beforeSetApprovalForAll(address,bool) (contracts/art-token/ArtTokenBase.sol#139) is never used and should be removed\n", - "markdown": "[ArtTokenBase._beforeSetApprovalForAll(address,bool)](contracts/art-token/ArtTokenBase.sol#L139) is never used and should be removed\n", - "first_markdown_element": "contracts/art-token/ArtTokenBase.sol#L139", + "description": "ArtTokenBase._beforeSetApprovalForAll(address,bool) (contracts/art-token/ArtTokenBase.sol#135) is never used and should be removed\n", + "markdown": "[ArtTokenBase._beforeSetApprovalForAll(address,bool)](contracts/art-token/ArtTokenBase.sol#L135) is never used and should be removed\n", + "first_markdown_element": "contracts/art-token/ArtTokenBase.sol#L135", "id": "a420cad121b9863c5420ce936be50fdafcc2fed508ef19dcffff8371fe270809", "check": "dead-code", "impact": "Informational", @@ -1700,13 +2135,13 @@ "type": "function", "name": "_beforeTransfer", "source_mapping": { - "start": 4399, + "start": 4334, "length": 87, "filename_relative": "contracts/art-token/ArtTokenBase.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtTokenBase.sol", "filename_short": "contracts/art-token/ArtTokenBase.sol", "is_dependency": false, - "lines": [122], + "lines": [119], "starting_column": 5, "ending_column": 92 }, @@ -1715,33 +2150,32 @@ "type": "contract", "name": "ArtTokenBase", "source_mapping": { - "start": 853, - "length": 4336, + "start": 842, + "length": 4254, "filename_relative": "contracts/art-token/ArtTokenBase.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtTokenBase.sol", "filename_short": "contracts/art-token/ArtTokenBase.sol", "is_dependency": false, "lines": [ - 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, - 139, 140 + 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, + 133, 134, 135, 136 ], "starting_column": 1, "ending_column": 2 @@ -1751,9 +2185,9 @@ } } ], - "description": "ArtTokenBase._beforeTransfer(address,uint256,address) (contracts/art-token/ArtTokenBase.sol#122) is never used and should be removed\n", - "markdown": "[ArtTokenBase._beforeTransfer(address,uint256,address)](contracts/art-token/ArtTokenBase.sol#L122) is never used and should be removed\n", - "first_markdown_element": "contracts/art-token/ArtTokenBase.sol#L122", + "description": "ArtTokenBase._beforeTransfer(address,uint256,address) (contracts/art-token/ArtTokenBase.sol#119) is never used and should be removed\n", + "markdown": "[ArtTokenBase._beforeTransfer(address,uint256,address)](contracts/art-token/ArtTokenBase.sol#L119) is never used and should be removed\n", + "first_markdown_element": "contracts/art-token/ArtTokenBase.sol#L119", "id": "ad65513af2c3915ae9fabe63dd9779aed68f1f812699652736ac1b68a790ddd6", "check": "dead-code", "impact": "Informational", @@ -1765,13 +2199,13 @@ "type": "function", "name": "_increaseBalance", "source_mapping": { - "start": 3911, + "start": 3854, "length": 203, "filename_relative": "contracts/art-token/ArtTokenBase.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtTokenBase.sol", "filename_short": "contracts/art-token/ArtTokenBase.sol", "is_dependency": false, - "lines": [108, 109, 110, 111, 112, 113], + "lines": [105, 106, 107, 108, 109, 110], "starting_column": 5, "ending_column": 6 }, @@ -1780,33 +2214,32 @@ "type": "contract", "name": "ArtTokenBase", "source_mapping": { - "start": 853, - "length": 4336, + "start": 842, + "length": 4254, "filename_relative": "contracts/art-token/ArtTokenBase.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtTokenBase.sol", "filename_short": "contracts/art-token/ArtTokenBase.sol", "is_dependency": false, "lines": [ - 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, - 139, 140 + 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, + 133, 134, 135, 136 ], "starting_column": 1, "ending_column": 2 @@ -1816,9 +2249,9 @@ } } ], - "description": "ArtTokenBase._increaseBalance(address,uint128) (contracts/art-token/ArtTokenBase.sol#108-113) is never used and should be removed\n", - "markdown": "[ArtTokenBase._increaseBalance(address,uint128)](contracts/art-token/ArtTokenBase.sol#L108-L113) is never used and should be removed\n", - "first_markdown_element": "contracts/art-token/ArtTokenBase.sol#L108-L113", + "description": "ArtTokenBase._increaseBalance(address,uint128) (contracts/art-token/ArtTokenBase.sol#105-110) is never used and should be removed\n", + "markdown": "[ArtTokenBase._increaseBalance(address,uint128)](contracts/art-token/ArtTokenBase.sol#L105-L110) is never used and should be removed\n", + "first_markdown_element": "contracts/art-token/ArtTokenBase.sol#L105-L110", "id": "a548e9dd0856e89fbbade6fefa791dda22cc4edc39e8e8cbd15b1a088281bdf8", "check": "dead-code", "impact": "Informational", @@ -1830,7 +2263,7 @@ "type": "variable", "name": "_tokenURI", "source_mapping": { - "start": 4165, + "start": 4209, "length": 23, "filename_relative": "contracts/art-token/ArtToken.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtToken.sol", @@ -1845,7 +2278,7 @@ "type": "function", "name": "mint", "source_mapping": { - "start": 4122, + "start": 4166, "length": 257, "filename_relative": "contracts/art-token/ArtToken.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtToken.sol", @@ -1863,28 +2296,29 @@ "type": "contract", "name": "ArtToken", "source_mapping": { - "start": 1074, - "length": 7301, + "start": 917, + "length": 7756, "filename_relative": "contracts/art-token/ArtToken.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtToken.sol", "filename_short": "contracts/art-token/ArtToken.sol", "is_dependency": false, "lines": [ - 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, + 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, @@ -1918,7 +2352,8 @@ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, - 233 + 233, 234, 235, 236, + 237, 238, 239, 240 ], "starting_column": 1, "ending_column": 2 @@ -1948,7 +2383,7 @@ "type": "variable", "name": "AUCTION_HOUSE", "source_mapping": { - "start": 1823, + "start": 1910, "length": 44, "filename_relative": "contracts/art-token/ArtToken.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtToken.sol", @@ -1963,51 +2398,52 @@ "type": "contract", "name": "ArtToken", "source_mapping": { - "start": 1074, - "length": 7301, + "start": 917, + "length": 7756, "filename_relative": "contracts/art-token/ArtToken.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtToken.sol", "filename_short": "contracts/art-token/ArtToken.sol", "is_dependency": false, "lines": [ - 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, - 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, - 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, - 147, 148, 149, 150, 151, - 152, 153, 154, 155, 156, - 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, - 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, - 177, 178, 179, 180, 181, - 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, - 197, 198, 199, 200, 201, - 202, 203, 204, 205, 206, - 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, - 217, 218, 219, 220, 221, - 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, - 232, 233 + 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240 ], "starting_column": 1, "ending_column": 2 @@ -2034,7 +2470,7 @@ "type": "variable", "name": "USDC", "source_mapping": { - "start": 1933, + "start": 2020, "length": 28, "filename_relative": "contracts/art-token/ArtToken.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtToken.sol", @@ -2049,51 +2485,52 @@ "type": "contract", "name": "ArtToken", "source_mapping": { - "start": 1074, - "length": 7301, + "start": 917, + "length": 7756, "filename_relative": "contracts/art-token/ArtToken.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtToken.sol", "filename_short": "contracts/art-token/ArtToken.sol", "is_dependency": false, "lines": [ - 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, - 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, - 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, - 147, 148, 149, 150, 151, - 152, 153, 154, 155, 156, - 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, - 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, - 177, 178, 179, 180, 181, - 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, - 197, 198, 199, 200, 201, - 202, 203, 204, 205, 206, - 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, - 217, 218, 219, 220, 221, - 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, - 232, 233 + 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240 ], "starting_column": 1, "ending_column": 2 @@ -2120,7 +2557,7 @@ "type": "variable", "name": "MIN_PRICE", "source_mapping": { - "start": 2046, + "start": 2133, "length": 34, "filename_relative": "contracts/art-token/ArtToken.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtToken.sol", @@ -2135,51 +2572,52 @@ "type": "contract", "name": "ArtToken", "source_mapping": { - "start": 1074, - "length": 7301, + "start": 917, + "length": 7756, "filename_relative": "contracts/art-token/ArtToken.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtToken.sol", "filename_short": "contracts/art-token/ArtToken.sol", "is_dependency": false, "lines": [ - 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, - 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, - 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, - 147, 148, 149, 150, 151, - 152, 153, 154, 155, 156, - 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, - 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, - 177, 178, 179, 180, 181, - 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, - 197, 198, 199, 200, 201, - 202, 203, 204, 205, 206, - 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, - 217, 218, 219, 220, 221, - 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, - 232, 233 + 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240 ], "starting_column": 1, "ending_column": 2 @@ -2206,7 +2644,7 @@ "type": "variable", "name": "MIN_FEE", "source_mapping": { - "start": 2159, + "start": 2246, "length": 32, "filename_relative": "contracts/art-token/ArtToken.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtToken.sol", @@ -2221,51 +2659,52 @@ "type": "contract", "name": "ArtToken", "source_mapping": { - "start": 1074, - "length": 7301, + "start": 917, + "length": 7756, "filename_relative": "contracts/art-token/ArtToken.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtToken.sol", - "filename_short": "contracts/art-token/ArtToken.sol", - "is_dependency": false, - "lines": [ - 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, - 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, - 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, - 147, 148, 149, 150, 151, - 152, 153, 154, 155, 156, - 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, - 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, - 177, 178, 179, 180, 181, - 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, - 197, 198, 199, 200, 201, - 202, 203, 204, 205, 206, - 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, - 217, 218, 219, 220, 221, - 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, - 232, 233 + "filename_short": "contracts/art-token/ArtToken.sol", + "is_dependency": false, + "lines": [ + 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240 ], "starting_column": 1, "ending_column": 2 @@ -2292,7 +2731,7 @@ "type": "variable", "name": "REGULATED", "source_mapping": { - "start": 2272, + "start": 2359, "length": 31, "filename_relative": "contracts/art-token/ArtToken.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtToken.sol", @@ -2307,51 +2746,52 @@ "type": "contract", "name": "ArtToken", "source_mapping": { - "start": 1074, - "length": 7301, + "start": 917, + "length": 7756, "filename_relative": "contracts/art-token/ArtToken.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtToken.sol", "filename_short": "contracts/art-token/ArtToken.sol", "is_dependency": false, "lines": [ - 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, - 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, - 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, - 147, 148, 149, 150, 151, - 152, 153, 154, 155, 156, - 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, - 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, - 177, 178, 179, 180, 181, - 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, - 197, 198, 199, 200, 201, - 202, 203, 204, 205, 206, - 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, - 217, 218, 219, 220, 221, - 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, - 232, 233 + 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240 ], "starting_column": 1, "ending_column": 2 @@ -2378,13 +2818,13 @@ "type": "variable", "name": "_name", "source_mapping": { - "start": 1152, + "start": 1139, "length": 19, "filename_relative": "contracts/art-token/ArtTokenBase.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtTokenBase.sol", "filename_short": "contracts/art-token/ArtTokenBase.sol", "is_dependency": false, - "lines": [28], + "lines": [27], "starting_column": 25, "ending_column": 44 }, @@ -2393,13 +2833,13 @@ "type": "function", "name": "initialize", "source_mapping": { - "start": 1132, + "start": 1119, "length": 131, "filename_relative": "contracts/art-token/ArtTokenBase.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtTokenBase.sol", "filename_short": "contracts/art-token/ArtTokenBase.sol", "is_dependency": false, - "lines": [28, 29, 30], + "lines": [27, 28, 29], "starting_column": 5, "ending_column": 6 }, @@ -2408,39 +2848,39 @@ "type": "contract", "name": "ArtTokenBase", "source_mapping": { - "start": 853, - "length": 4336, + "start": 842, + "length": 4254, "filename_relative": "contracts/art-token/ArtTokenBase.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtTokenBase.sol", "filename_short": "contracts/art-token/ArtTokenBase.sol", "is_dependency": false, "lines": [ - 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, - 101, 102, 103, 104, - 105, 106, 107, 108, - 109, 110, 111, 112, - 113, 114, 115, 116, - 117, 118, 119, 120, - 121, 122, 123, 124, - 125, 126, 127, 128, - 129, 130, 131, 132, - 133, 134, 135, 136, - 137, 138, 139, 140 + 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, + 100, 101, 102, 103, + 104, 105, 106, 107, + 108, 109, 110, 111, + 112, 113, 114, 115, + 116, 117, 118, 119, + 120, 121, 122, 123, + 124, 125, 126, 127, + 128, 129, 130, 131, + 132, 133, 134, 135, + 136 ], "starting_column": 1, "ending_column": 2 @@ -2456,9 +2896,9 @@ } } ], - "description": "Parameter ArtTokenBase.initialize(string,string)._name (contracts/art-token/ArtTokenBase.sol#28) is not in mixedCase\n", - "markdown": "Parameter [ArtTokenBase.initialize(string,string)._name](contracts/art-token/ArtTokenBase.sol#L28) is not in mixedCase\n", - "first_markdown_element": "contracts/art-token/ArtTokenBase.sol#L28", + "description": "Parameter ArtTokenBase.initialize(string,string)._name (contracts/art-token/ArtTokenBase.sol#27) is not in mixedCase\n", + "markdown": "Parameter [ArtTokenBase.initialize(string,string)._name](contracts/art-token/ArtTokenBase.sol#L27) is not in mixedCase\n", + "first_markdown_element": "contracts/art-token/ArtTokenBase.sol#L27", "id": "0d6536aff27f992204afb08494fd56ce453268a0d6d7f76954870ce15454efdd", "check": "naming-convention", "impact": "Informational", @@ -2470,13 +2910,13 @@ "type": "variable", "name": "_symbol", "source_mapping": { - "start": 1173, + "start": 1160, "length": 21, "filename_relative": "contracts/art-token/ArtTokenBase.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtTokenBase.sol", "filename_short": "contracts/art-token/ArtTokenBase.sol", "is_dependency": false, - "lines": [28], + "lines": [27], "starting_column": 46, "ending_column": 67 }, @@ -2485,13 +2925,13 @@ "type": "function", "name": "initialize", "source_mapping": { - "start": 1132, + "start": 1119, "length": 131, "filename_relative": "contracts/art-token/ArtTokenBase.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtTokenBase.sol", "filename_short": "contracts/art-token/ArtTokenBase.sol", "is_dependency": false, - "lines": [28, 29, 30], + "lines": [27, 28, 29], "starting_column": 5, "ending_column": 6 }, @@ -2500,39 +2940,39 @@ "type": "contract", "name": "ArtTokenBase", "source_mapping": { - "start": 853, - "length": 4336, + "start": 842, + "length": 4254, "filename_relative": "contracts/art-token/ArtTokenBase.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/art-token/ArtTokenBase.sol", "filename_short": "contracts/art-token/ArtTokenBase.sol", "is_dependency": false, "lines": [ - 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, - 101, 102, 103, 104, - 105, 106, 107, 108, - 109, 110, 111, 112, - 113, 114, 115, 116, - 117, 118, 119, 120, - 121, 122, 123, 124, - 125, 126, 127, 128, - 129, 130, 131, 132, - 133, 134, 135, 136, - 137, 138, 139, 140 + 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, + 100, 101, 102, 103, + 104, 105, 106, 107, + 108, 109, 110, 111, + 112, 113, 114, 115, + 116, 117, 118, 119, + 120, 121, 122, 123, + 124, 125, 126, 127, + 128, 129, 130, 131, + 132, 133, 134, 135, + 136 ], "starting_column": 1, "ending_column": 2 @@ -2548,9 +2988,9 @@ } } ], - "description": "Parameter ArtTokenBase.initialize(string,string)._symbol (contracts/art-token/ArtTokenBase.sol#28) is not in mixedCase\n", - "markdown": "Parameter [ArtTokenBase.initialize(string,string)._symbol](contracts/art-token/ArtTokenBase.sol#L28) is not in mixedCase\n", - "first_markdown_element": "contracts/art-token/ArtTokenBase.sol#L28", + "description": "Parameter ArtTokenBase.initialize(string,string)._symbol (contracts/art-token/ArtTokenBase.sol#27) is not in mixedCase\n", + "markdown": "Parameter [ArtTokenBase.initialize(string,string)._symbol](contracts/art-token/ArtTokenBase.sol#L27) is not in mixedCase\n", + "first_markdown_element": "contracts/art-token/ArtTokenBase.sol#L27", "id": "7bcea9354c9ddc3dbe1466bf8c094194d3838858b9a7057b8a6ff3e4d9e1c359", "check": "naming-convention", "impact": "Informational", @@ -2562,13 +3002,13 @@ "type": "variable", "name": "ART_TOKEN", "source_mapping": { - "start": 1961, + "start": 1877, "length": 36, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, - "lines": [51], + "lines": [48], "starting_column": 5, "ending_column": 41 }, @@ -2577,90 +3017,90 @@ "type": "contract", "name": "AuctionHouse", "source_mapping": { - "start": 1203, - "length": 14191, + "start": 1056, + "length": 14168, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, "lines": [ - 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, - 218, 219, 220, 221, 222, - 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, - 238, 239, 240, 241, 242, - 243, 244, 245, 246, 247, - 248, 249, 250, 251, 252, - 253, 254, 255, 256, 257, - 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, - 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, - 278, 279, 280, 281, 282, - 283, 284, 285, 286, 287, - 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, - 298, 299, 300, 301, 302, - 303, 304, 305, 306, 307, - 308, 309, 310, 311, 312, - 313, 314, 315, 316, 317, - 318, 319, 320, 321, 322, - 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, - 333, 334, 335, 336, 337, - 338, 339, 340, 341, 342, - 343, 344, 345, 346, 347, - 348, 349, 350, 351, 352, - 353, 354, 355, 356, 357, - 358, 359, 360, 361, 362, - 363, 364, 365, 366, 367, - 368, 369, 370, 371, 372, - 373, 374, 375, 376, 377, - 378, 379, 380, 381, 382, - 383, 384, 385, 386, 387, - 388, 389, 390, 391, 392, - 393, 394, 395, 396, 397, - 398, 399, 400, 401, 402, - 403, 404, 405, 406, 407, - 408, 409, 410, 411, 412, - 413, 414, 415, 416, 417, - 418, 419, 420, 421, 422, - 423, 424, 425, 426, 427, - 428, 429, 430, 431 + 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, + 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, + 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, + 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, + 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, + 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, + 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, + 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, + 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, + 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, + 420, 421, 422, 423, 424, + 425, 426, 427 ], "starting_column": 1, "ending_column": 2 @@ -2673,9 +3113,9 @@ } } ], - "description": "Variable AuctionHouse.ART_TOKEN (contracts/auction-house/AuctionHouse.sol#51) is not in mixedCase\n", - "markdown": "Variable [AuctionHouse.ART_TOKEN](contracts/auction-house/AuctionHouse.sol#L51) is not in mixedCase\n", - "first_markdown_element": "contracts/auction-house/AuctionHouse.sol#L51", + "description": "Variable AuctionHouse.ART_TOKEN (contracts/auction-house/AuctionHouse.sol#48) is not in mixedCase\n", + "markdown": "Variable [AuctionHouse.ART_TOKEN](contracts/auction-house/AuctionHouse.sol#L48) is not in mixedCase\n", + "first_markdown_element": "contracts/auction-house/AuctionHouse.sol#L48", "id": "f7dd52429a9f100298e6e21b03630cde50306045be3c0e11376ab20f5034c1df", "check": "naming-convention", "impact": "Informational", @@ -2687,13 +3127,13 @@ "type": "variable", "name": "USDC", "source_mapping": { - "start": 2074, + "start": 1990, "length": 28, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, - "lines": [54], + "lines": [51], "starting_column": 5, "ending_column": 33 }, @@ -2702,90 +3142,90 @@ "type": "contract", "name": "AuctionHouse", "source_mapping": { - "start": 1203, - "length": 14191, + "start": 1056, + "length": 14168, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, "lines": [ - 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, - 218, 219, 220, 221, 222, - 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, - 238, 239, 240, 241, 242, - 243, 244, 245, 246, 247, - 248, 249, 250, 251, 252, - 253, 254, 255, 256, 257, - 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, - 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, - 278, 279, 280, 281, 282, - 283, 284, 285, 286, 287, - 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, - 298, 299, 300, 301, 302, - 303, 304, 305, 306, 307, - 308, 309, 310, 311, 312, - 313, 314, 315, 316, 317, - 318, 319, 320, 321, 322, - 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, - 333, 334, 335, 336, 337, - 338, 339, 340, 341, 342, - 343, 344, 345, 346, 347, - 348, 349, 350, 351, 352, - 353, 354, 355, 356, 357, - 358, 359, 360, 361, 362, - 363, 364, 365, 366, 367, - 368, 369, 370, 371, 372, - 373, 374, 375, 376, 377, - 378, 379, 380, 381, 382, - 383, 384, 385, 386, 387, - 388, 389, 390, 391, 392, - 393, 394, 395, 396, 397, - 398, 399, 400, 401, 402, - 403, 404, 405, 406, 407, - 408, 409, 410, 411, 412, - 413, 414, 415, 416, 417, - 418, 419, 420, 421, 422, - 423, 424, 425, 426, 427, - 428, 429, 430, 431 + 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, + 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, + 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, + 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, + 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, + 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, + 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, + 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, + 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, + 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, + 420, 421, 422, 423, 424, + 425, 426, 427 ], "starting_column": 1, "ending_column": 2 @@ -2798,9 +3238,9 @@ } } ], - "description": "Variable AuctionHouse.USDC (contracts/auction-house/AuctionHouse.sol#54) is not in mixedCase\n", - "markdown": "Variable [AuctionHouse.USDC](contracts/auction-house/AuctionHouse.sol#L54) is not in mixedCase\n", - "first_markdown_element": "contracts/auction-house/AuctionHouse.sol#L54", + "description": "Variable AuctionHouse.USDC (contracts/auction-house/AuctionHouse.sol#51) is not in mixedCase\n", + "markdown": "Variable [AuctionHouse.USDC](contracts/auction-house/AuctionHouse.sol#L51) is not in mixedCase\n", + "first_markdown_element": "contracts/auction-house/AuctionHouse.sol#L51", "id": "07d5bd6994cd32404289642e73b3c469146a00de74c2bd91fb3dcec2d6102074", "check": "naming-convention", "impact": "Informational", @@ -2812,13 +3252,13 @@ "type": "variable", "name": "MIN_DURATION", "source_mapping": { - "start": 2176, + "start": 2092, "length": 37, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, - "lines": [57], + "lines": [54], "starting_column": 5, "ending_column": 42 }, @@ -2827,90 +3267,90 @@ "type": "contract", "name": "AuctionHouse", "source_mapping": { - "start": 1203, - "length": 14191, + "start": 1056, + "length": 14168, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, "lines": [ - 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, - 218, 219, 220, 221, 222, - 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, - 238, 239, 240, 241, 242, - 243, 244, 245, 246, 247, - 248, 249, 250, 251, 252, - 253, 254, 255, 256, 257, - 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, - 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, - 278, 279, 280, 281, 282, - 283, 284, 285, 286, 287, - 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, - 298, 299, 300, 301, 302, - 303, 304, 305, 306, 307, - 308, 309, 310, 311, 312, - 313, 314, 315, 316, 317, - 318, 319, 320, 321, 322, - 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, - 333, 334, 335, 336, 337, - 338, 339, 340, 341, 342, - 343, 344, 345, 346, 347, - 348, 349, 350, 351, 352, - 353, 354, 355, 356, 357, - 358, 359, 360, 361, 362, - 363, 364, 365, 366, 367, - 368, 369, 370, 371, 372, - 373, 374, 375, 376, 377, - 378, 379, 380, 381, 382, - 383, 384, 385, 386, 387, - 388, 389, 390, 391, 392, - 393, 394, 395, 396, 397, - 398, 399, 400, 401, 402, - 403, 404, 405, 406, 407, - 408, 409, 410, 411, 412, - 413, 414, 415, 416, 417, - 418, 419, 420, 421, 422, - 423, 424, 425, 426, 427, - 428, 429, 430, 431 + 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, + 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, + 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, + 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, + 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, + 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, + 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, + 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, + 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, + 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, + 420, 421, 422, 423, 424, + 425, 426, 427 ], "starting_column": 1, "ending_column": 2 @@ -2923,9 +3363,9 @@ } } ], - "description": "Variable AuctionHouse.MIN_DURATION (contracts/auction-house/AuctionHouse.sol#57) is not in mixedCase\n", - "markdown": "Variable [AuctionHouse.MIN_DURATION](contracts/auction-house/AuctionHouse.sol#L57) is not in mixedCase\n", - "first_markdown_element": "contracts/auction-house/AuctionHouse.sol#L57", + "description": "Variable AuctionHouse.MIN_DURATION (contracts/auction-house/AuctionHouse.sol#54) is not in mixedCase\n", + "markdown": "Variable [AuctionHouse.MIN_DURATION](contracts/auction-house/AuctionHouse.sol#L54) is not in mixedCase\n", + "first_markdown_element": "contracts/auction-house/AuctionHouse.sol#L54", "id": "98b4ffaf5185ecfde6761fb768baf7f6cc537e760d8419d5663fed6cfca136ba", "check": "naming-convention", "impact": "Informational", @@ -2937,13 +3377,13 @@ "type": "variable", "name": "MIN_PRICE", "source_mapping": { - "start": 2404, + "start": 2320, "length": 34, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, - "lines": [63], + "lines": [60], "starting_column": 5, "ending_column": 39 }, @@ -2952,90 +3392,90 @@ "type": "contract", "name": "AuctionHouse", "source_mapping": { - "start": 1203, - "length": 14191, + "start": 1056, + "length": 14168, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, "lines": [ - 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, - 218, 219, 220, 221, 222, - 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, - 238, 239, 240, 241, 242, - 243, 244, 245, 246, 247, - 248, 249, 250, 251, 252, - 253, 254, 255, 256, 257, - 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, - 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, - 278, 279, 280, 281, 282, - 283, 284, 285, 286, 287, - 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, - 298, 299, 300, 301, 302, - 303, 304, 305, 306, 307, - 308, 309, 310, 311, 312, - 313, 314, 315, 316, 317, - 318, 319, 320, 321, 322, - 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, - 333, 334, 335, 336, 337, - 338, 339, 340, 341, 342, - 343, 344, 345, 346, 347, - 348, 349, 350, 351, 352, - 353, 354, 355, 356, 357, - 358, 359, 360, 361, 362, - 363, 364, 365, 366, 367, - 368, 369, 370, 371, 372, - 373, 374, 375, 376, 377, - 378, 379, 380, 381, 382, - 383, 384, 385, 386, 387, - 388, 389, 390, 391, 392, - 393, 394, 395, 396, 397, - 398, 399, 400, 401, 402, - 403, 404, 405, 406, 407, - 408, 409, 410, 411, 412, - 413, 414, 415, 416, 417, - 418, 419, 420, 421, 422, - 423, 424, 425, 426, 427, - 428, 429, 430, 431 + 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, + 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, + 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, + 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, + 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, + 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, + 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, + 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, + 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, + 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, + 420, 421, 422, 423, 424, + 425, 426, 427 ], "starting_column": 1, "ending_column": 2 @@ -3048,9 +3488,9 @@ } } ], - "description": "Variable AuctionHouse.MIN_PRICE (contracts/auction-house/AuctionHouse.sol#63) is not in mixedCase\n", - "markdown": "Variable [AuctionHouse.MIN_PRICE](contracts/auction-house/AuctionHouse.sol#L63) is not in mixedCase\n", - "first_markdown_element": "contracts/auction-house/AuctionHouse.sol#L63", + "description": "Variable AuctionHouse.MIN_PRICE (contracts/auction-house/AuctionHouse.sol#60) is not in mixedCase\n", + "markdown": "Variable [AuctionHouse.MIN_PRICE](contracts/auction-house/AuctionHouse.sol#L60) is not in mixedCase\n", + "first_markdown_element": "contracts/auction-house/AuctionHouse.sol#L60", "id": "0104d361e1ea8e3bc4ed2d89bddc062717bbd6745526d41219b06ace53334a7f", "check": "naming-convention", "impact": "Informational", @@ -3062,13 +3502,13 @@ "type": "variable", "name": "MIN_FEE", "source_mapping": { - "start": 2516, + "start": 2432, "length": 32, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, - "lines": [66], + "lines": [63], "starting_column": 5, "ending_column": 37 }, @@ -3077,90 +3517,90 @@ "type": "contract", "name": "AuctionHouse", "source_mapping": { - "start": 1203, - "length": 14191, + "start": 1056, + "length": 14168, "filename_relative": "contracts/auction-house/AuctionHouse.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/auction-house/AuctionHouse.sol", "filename_short": "contracts/auction-house/AuctionHouse.sol", "is_dependency": false, "lines": [ - 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, - 218, 219, 220, 221, 222, - 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, - 238, 239, 240, 241, 242, - 243, 244, 245, 246, 247, - 248, 249, 250, 251, 252, - 253, 254, 255, 256, 257, - 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, - 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, - 278, 279, 280, 281, 282, - 283, 284, 285, 286, 287, - 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, - 298, 299, 300, 301, 302, - 303, 304, 305, 306, 307, - 308, 309, 310, 311, 312, - 313, 314, 315, 316, 317, - 318, 319, 320, 321, 322, - 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, - 333, 334, 335, 336, 337, - 338, 339, 340, 341, 342, - 343, 344, 345, 346, 347, - 348, 349, 350, 351, 352, - 353, 354, 355, 356, 357, - 358, 359, 360, 361, 362, - 363, 364, 365, 366, 367, - 368, 369, 370, 371, 372, - 373, 374, 375, 376, 377, - 378, 379, 380, 381, 382, - 383, 384, 385, 386, 387, - 388, 389, 390, 391, 392, - 393, 394, 395, 396, 397, - 398, 399, 400, 401, 402, - 403, 404, 405, 406, 407, - 408, 409, 410, 411, 412, - 413, 414, 415, 416, 417, - 418, 419, 420, 421, 422, - 423, 424, 425, 426, 427, - 428, 429, 430, 431 + 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, + 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, + 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, + 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, + 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, + 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, + 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, + 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, + 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, + 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, + 420, 421, 422, 423, 424, + 425, 426, 427 ], "starting_column": 1, "ending_column": 2 @@ -3173,9 +3613,9 @@ } } ], - "description": "Variable AuctionHouse.MIN_FEE (contracts/auction-house/AuctionHouse.sol#66) is not in mixedCase\n", - "markdown": "Variable [AuctionHouse.MIN_FEE](contracts/auction-house/AuctionHouse.sol#L66) is not in mixedCase\n", - "first_markdown_element": "contracts/auction-house/AuctionHouse.sol#L66", + "description": "Variable AuctionHouse.MIN_FEE (contracts/auction-house/AuctionHouse.sol#63) is not in mixedCase\n", + "markdown": "Variable [AuctionHouse.MIN_FEE](contracts/auction-house/AuctionHouse.sol#L63) is not in mixedCase\n", + "first_markdown_element": "contracts/auction-house/AuctionHouse.sol#L63", "id": "b3634a21e75f1f2401b777ffb2232054c168c111d1f6db43ca86c47fef59c89e", "check": "naming-convention", "impact": "Informational", @@ -3203,7 +3643,7 @@ "name": "EIP712Domain", "source_mapping": { "start": 471, - "length": 1603, + "length": 1624, "filename_relative": "contracts/utils/EIP712Domain.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/utils/EIP712Domain.sol", "filename_short": "contracts/utils/EIP712Domain.sol", @@ -3215,7 +3655,7 @@ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60 + 56, 57, 58, 59, 60, 61, 62 ], "starting_column": 1, "ending_column": 2 @@ -3242,13 +3682,13 @@ "type": "variable", "name": "MAIN", "source_mapping": { - "start": 679, + "start": 668, "length": 29, "filename_relative": "contracts/utils/role-system/RoleSystem.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/utils/role-system/RoleSystem.sol", "filename_short": "contracts/utils/role-system/RoleSystem.sol", "is_dependency": false, - "lines": [20], + "lines": [19], "starting_column": 5, "ending_column": 34 }, @@ -3257,27 +3697,32 @@ "type": "contract", "name": "RoleSystem", "source_mapping": { - "start": 479, - "length": 2643, + "start": 468, + "length": 3272, "filename_relative": "contracts/utils/role-system/RoleSystem.sol", "filename_absolute": "/Users/v.biliy/Documents/work/do/do-contracts/contracts/utils/role-system/RoleSystem.sol", "filename_short": "contracts/utils/role-system/RoleSystem.sol", "is_dependency": false, "lines": [ - 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110 + 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, + 129, 130, 131 ], "starting_column": 1, "ending_column": 2 @@ -3290,9 +3735,9 @@ } } ], - "description": "Variable RoleSystem.MAIN (contracts/utils/role-system/RoleSystem.sol#20) is not in mixedCase\n", - "markdown": "Variable [RoleSystem.MAIN](contracts/utils/role-system/RoleSystem.sol#L20) is not in mixedCase\n", - "first_markdown_element": "contracts/utils/role-system/RoleSystem.sol#L20", + "description": "Variable RoleSystem.MAIN (contracts/utils/role-system/RoleSystem.sol#19) is not in mixedCase\n", + "markdown": "Variable [RoleSystem.MAIN](contracts/utils/role-system/RoleSystem.sol#L19) is not in mixedCase\n", + "first_markdown_element": "contracts/utils/role-system/RoleSystem.sol#L19", "id": "982f659317f43fe0bfb7378ac84558b3324e377aa7bb10bb095243377cb00a53", "check": "naming-convention", "impact": "Informational", diff --git a/tasks/deploy-art-token-impl.ts b/tasks/deploy-art-token-impl.ts index 307afa8..8782478 100644 --- a/tasks/deploy-art-token-impl.ts +++ b/tasks/deploy-art-token-impl.ts @@ -1,5 +1,5 @@ import { task } from 'hardhat/config'; -import { ChainConfig } from '../types/environment'; +import { ProtocolConfig } from '../types/environment'; import { deploy } from '../scripts/deploy'; import { etherToWeiForErc20 } from './utils/ether-to-wei-for-erc20'; @@ -10,7 +10,7 @@ npx hardhat deploy-art-token-impl --network fork task('deploy-art-token-impl').setAction(async (taskArgs: Record, hardhat) => { const chain = hardhat.network; const chainId = chain.config.chainId; - const config = (chain.config); + const config = (chain.config).protocolConfig; if (!chainId) throw new Error(`Chain ID is not defined`); @@ -18,11 +18,12 @@ task('deploy-art-token-impl').setAction(async (taskArgs: Record, console.group('Conditions:'); console.log(`Chain - ${chain.name}`); console.log(`Chain ID - ${chainId}`); - console.log(`Collection - ${config.name}`); + console.log(`Collection - ${config.collection.name}`); console.groupEnd(); console.log('-'.repeat(process.stdout.columns)); - const { usdc, main, minPriceUsd, minFeeUsd, regulated, artToken, auctionHouse } = config; + const { usdc, main } = config; + const { minPriceUsd, minFeeUsd, regulated, artToken, auctionHouse } = config.collection; const minPrice = await etherToWeiForErc20(usdc, minPriceUsd); const minFee = await etherToWeiForErc20(usdc, minFeeUsd); diff --git a/tasks/deploy-auction-house-impl.ts b/tasks/deploy-auction-house-impl.ts index 3f6fa11..835eb78 100644 --- a/tasks/deploy-auction-house-impl.ts +++ b/tasks/deploy-auction-house-impl.ts @@ -1,5 +1,5 @@ import { task } from 'hardhat/config'; -import { ChainConfig } from '../types/environment'; +import { ProtocolConfig } from '../types/environment'; import { deploy } from '../scripts/deploy'; import { etherToWeiForErc20 } from './utils/ether-to-wei-for-erc20'; import { hoursToSeconds } from './utils/hours-to-seconds'; @@ -11,7 +11,7 @@ npx hardhat deploy-auction-house-impl --network fork task('deploy-auction-house-impl').setAction(async (taskArgs: Record, hardhat) => { const chain = hardhat.network; const chainId = chain.config.chainId; - const config = (chain.config); + const config = (chain.config).protocolConfig; if (!chainId) throw new Error(`Chain ID is not defined`); @@ -22,8 +22,9 @@ task('deploy-auction-house-impl').setAction(async (taskArgs: Record, hardhat) => { +task('deploy-collection').setAction(async (taskArgs: Record, hardhat) => { const chain = hardhat.network; const chainId = chain.config.chainId; - const config = (chain.config); + const config = (chain.config).protocolConfig; if (!chainId) throw new Error(`Chain ID is not defined`); @@ -19,18 +19,19 @@ task('deploy-protocol').setAction(async (taskArgs: Record, hardh console.group('Conditions:'); console.log(`Chain - ${chain.name}`); console.log(`Chain ID - ${chainId}`); - console.log(`Collection - ${config.name}`); + console.log(`Collection - ${config.collection.name}`); console.groupEnd(); console.log('-'.repeat(process.stdout.columns)); - const { usdc, main, name, symbol, minPriceUsd, minFeeUsd, regulated, minAuctionDurationHours } = - config; + const { usdc, main } = config; + const { name, symbol, minPriceUsd, minFeeUsd, regulated, minAuctionDurationHours } = + config.collection; const minPrice = await etherToWeiForErc20(usdc, minPriceUsd); const minFee = await etherToWeiForErc20(usdc, minFeeUsd); const minAuctionDuration = hoursToSeconds(minAuctionDurationHours); - console.log(`Deploying protocol...`); + console.log(`Deploying collection...`); console.log(`\n`); console.group('Params:'); console.log(`name: ${name}`); @@ -54,13 +55,13 @@ task('deploy-protocol').setAction(async (taskArgs: Record, hardh artTokenAddr, artTokenImplAddr, artTokenProxyAdminAddr, - artTokenProxyAdminOwner, + artTokenProxyAdminOwnerAddr, auctionHouseAddr, auctionHouseImplAddr, auctionHouseProxyAdminAddr, - auctionHouseProxyAdminOwner, - } = await deployProtocol({ + auctionHouseProxyAdminOwnerAddr, + } = await deployCollection({ usdc, main, name, @@ -79,13 +80,13 @@ task('deploy-protocol').setAction(async (taskArgs: Record, hardh console.log(`ArtToken Proxy - ${artTokenAddr}`); console.log(`ArtToken Impl - ${artTokenImplAddr}`); console.log(`ArtToken Proxy Admin - ${artTokenProxyAdminAddr}`); - console.log(`ArtToken Proxy Admin Owner - ${artTokenProxyAdminOwner}`); + console.log(`ArtToken Proxy Admin Owner - ${artTokenProxyAdminOwnerAddr}`); console.log('\n'); console.log(`AuctionHouse Proxy - ${auctionHouseAddr}`); console.log(`AuctionHouse Impl - ${auctionHouseImplAddr}`); console.log(`AuctionHouse Proxy Admin - ${auctionHouseProxyAdminAddr}`); - console.log(`AuctionHouse Proxy Admin Owner - ${auctionHouseProxyAdminOwner}`); + console.log(`AuctionHouse Proxy Admin Owner - ${auctionHouseProxyAdminOwnerAddr}`); console.groupEnd(); console.log('-'.repeat(process.stdout.columns)); diff --git a/tasks/deploy-market-impl.ts b/tasks/deploy-market-impl.ts new file mode 100644 index 0000000..97ab162 --- /dev/null +++ b/tasks/deploy-market-impl.ts @@ -0,0 +1,49 @@ +import { task } from 'hardhat/config'; +import { ProtocolConfig } from '../types/environment'; +import { deploy } from '../scripts/deploy'; + +/* +npx hardhat deploy-market-impl--network fork +*/ + +task('deploy-market-impl').setAction(async (taskArgs: Record, hardhat) => { + const chain = hardhat.network; + const chainId = chain.config.chainId; + const config = (chain.config).protocolConfig; + + if (!chainId) throw new Error(`Chain ID is not defined`); + + console.log('-'.repeat(process.stdout.columns)); + console.group('Conditions:'); + console.log(`Chain - ${chain.name}`); + console.log(`Chain ID - ${chainId}`); + console.log(`Market`); + console.groupEnd(); + console.log('-'.repeat(process.stdout.columns)); + + const proxyAddr = config.market.market.proxy; + const mainAddr = config.main; + + console.log(`Deploying Market Impl...`); + console.log(`\n`); + console.group('Params:'); + console.log(`proxy: ${proxyAddr}`); + console.log(`main: ${mainAddr}`); + console.groupEnd(); + console.log(`\n`); + console.log(`Transaction broadcasting...`); + + const { receipt, contractAddr: marketImplAddr } = await deploy({ + name: 'Market', + constructorArgs: [proxyAddr, mainAddr], + }); + + console.log(`Transaction broadcasted`); + console.log(`Transaction hash - ${receipt.hash}`); + console.log('-'.repeat(process.stdout.columns)); + + console.group('Result:'); + console.log(`Market Impl - ${marketImplAddr}`); + console.groupEnd(); + console.log('-'.repeat(process.stdout.columns)); +}); diff --git a/tasks/deploy-market.ts b/tasks/deploy-market.ts new file mode 100644 index 0000000..5f5b9de --- /dev/null +++ b/tasks/deploy-market.ts @@ -0,0 +1,49 @@ +import { task } from 'hardhat/config'; +import { ProtocolConfig } from '../types/environment'; +import { deployMarket } from '../scripts/deploy-market'; + +/* +npx hardhat deploy-market --network fork +*/ + +task('deploy-market').setAction(async (taskArgs: Record, hardhat) => { + const chain = hardhat.network; + const chainId = chain.config.chainId; + const config = (chain.config).protocolConfig; + + if (!chainId) throw new Error(`Chain ID is not defined`); + + console.log('-'.repeat(process.stdout.columns)); + console.group('Conditions:'); + console.log(`Chain - ${chain.name}`); + console.log(`Chain ID - ${chainId}`); + console.log(`Market`); + console.groupEnd(); + console.log('-'.repeat(process.stdout.columns)); + + const { main } = config; + + console.log(`Deploying Market...`); + console.log(`\n`); + console.group('Params:'); + console.log(`main: ${main}`); + console.groupEnd(); + console.log(`\n`); + console.log(`Transaction broadcasting...`); + + const { receipt, marketAddr, marketProxyAdminAddr, marketProxyAdminOwnerAddr, marketImplAddr } = + await deployMarket({ main }); + + console.log(`Transaction broadcasted`); + console.log(`Transaction hash - ${receipt.hash}`); + console.log('-'.repeat(process.stdout.columns)); + + console.group('Result:'); + console.log(`Market Proxy - ${marketAddr}`); + console.log(`Market Impl - ${marketImplAddr}`); + console.log(`Market Proxy Admin - ${marketProxyAdminAddr}`); + console.log(`Market Proxy Admin Owner - ${marketProxyAdminOwnerAddr}`); + + console.groupEnd(); + console.log('-'.repeat(process.stdout.columns)); +}); diff --git a/tasks/index.ts b/tasks/index.ts index 32ab1af..367a74a 100644 --- a/tasks/index.ts +++ b/tasks/index.ts @@ -1,5 +1,8 @@ -export * from './deploy-protocol'; +export * from './deploy-collection'; +export * from './deploy-market'; export * from './deploy-art-token-impl'; export * from './deploy-auction-house-impl'; +export * from './deploy-market-impl'; export * from './verify-art-token'; export * from './verify-auction-house'; +export * from './verify-market'; diff --git a/tasks/verify-art-token.ts b/tasks/verify-art-token.ts index 7896d61..a7186b2 100644 --- a/tasks/verify-art-token.ts +++ b/tasks/verify-art-token.ts @@ -1,5 +1,5 @@ import { task } from 'hardhat/config'; -import { ChainConfig } from '../types/environment'; +import { ProtocolConfig } from '../types/environment'; import { etherToWeiForErc20 } from './utils/ether-to-wei-for-erc20'; /* @@ -9,7 +9,7 @@ npx hardhat verify-art-token --network fork task('verify-art-token').setAction(async (taskArgs: Record, hardhat) => { const chain = hardhat.network; const chainId = chain.config.chainId; - const config = (chain.config); + const config = (chain.config).protocolConfig; if (!chainId) throw new Error(`Chain ID is not defined`); @@ -17,25 +17,25 @@ task('verify-art-token').setAction(async (taskArgs: Record, hard console.group('Conditions:'); console.log(`Chain - ${chain.name}`); console.log(`Chain ID - ${chainId}`); - console.log(`Collection - ${config.name}`); + console.log(`Collection - ${config.collection.name}`); console.groupEnd(); console.log('-'.repeat(process.stdout.columns)); // TransparentUpgradeableProxy - const proxy = config.artToken.proxy; - const impl = config.artToken.impl; + const proxy = config.collection.artToken.proxy; + const impl = config.collection.artToken.impl; const proxyAdminOwner = config.main; // ProxyAdmin - const proxyAdmin = config.artToken.admin; + const proxyAdmin = config.collection.artToken.admin; // ArtToken const main = config.main; - const auctionHouse = config.auctionHouse.proxy; + const auctionHouse = config.collection.auctionHouse.proxy; const usdc = config.usdc; - const minPrice = await etherToWeiForErc20(usdc, config.minPriceUsd); - const minFee = await etherToWeiForErc20(usdc, config.minFeeUsd); - const regulated = config.regulated; + const minPrice = await etherToWeiForErc20(usdc, config.collection.minPriceUsd); + const minFee = await etherToWeiForErc20(usdc, config.collection.minFeeUsd); + const regulated = config.collection.regulated; console.log(`Verify ArtToken...`); console.log(`\n`); diff --git a/tasks/verify-auction-house.ts b/tasks/verify-auction-house.ts index 3141ebe..1e397dc 100644 --- a/tasks/verify-auction-house.ts +++ b/tasks/verify-auction-house.ts @@ -1,5 +1,5 @@ import { task } from 'hardhat/config'; -import { ChainConfig } from '../types/environment'; +import { ProtocolConfig } from '../types/environment'; import { etherToWeiForErc20 } from './utils/ether-to-wei-for-erc20'; import { hoursToSeconds } from './utils/hours-to-seconds'; @@ -10,7 +10,7 @@ npx hardhat verify-auction-house --network fork task('verify-auction-house').setAction(async (taskArgs: Record, hardhat) => { const chain = hardhat.network; const chainId = chain.config.chainId; - const config = (chain.config); + const config = (chain.config).protocolConfig; if (!chainId) throw new Error(`Chain ID is not defined`); @@ -18,25 +18,25 @@ task('verify-auction-house').setAction(async (taskArgs: Record, console.group('Conditions:'); console.log(`Chain - ${chain.name}`); console.log(`Chain ID - ${chainId}`); - console.log(`Collection - ${config.name}`); + console.log(`Collection - ${config.collection.name}`); console.groupEnd(); console.log('-'.repeat(process.stdout.columns)); // TransparentUpgradeableProxy - const proxy = config.auctionHouse.proxy; - const impl = config.auctionHouse.impl; + const proxy = config.collection.auctionHouse.proxy; + const impl = config.collection.auctionHouse.impl; const proxyAdminOwner = config.main; // ProxyAdmin - const proxyAdmin = config.auctionHouse.admin; + const proxyAdmin = config.collection.auctionHouse.admin; // AuctionHouse const main = config.main; - const artToken = config.artToken.proxy; + const artToken = config.collection.artToken.proxy; const usdc = config.usdc; - const minPrice = await etherToWeiForErc20(usdc, config.minPriceUsd); - const minFee = await etherToWeiForErc20(usdc, config.minFeeUsd); - const minAuctionDuration = hoursToSeconds(config.minAuctionDurationHours); + const minPrice = await etherToWeiForErc20(usdc, config.collection.minPriceUsd); + const minFee = await etherToWeiForErc20(usdc, config.collection.minFeeUsd); + const minAuctionDuration = hoursToSeconds(config.collection.minAuctionDurationHours); console.log(`Verify AuctionHouse...`); console.log(`\n`); diff --git a/tasks/verify-market.ts b/tasks/verify-market.ts new file mode 100644 index 0000000..bd41989 --- /dev/null +++ b/tasks/verify-market.ts @@ -0,0 +1,77 @@ +import { task } from 'hardhat/config'; +import { ProtocolConfig } from '../types/environment'; + +/* +npx hardhat verify-market --network fork +*/ + +task('verify-market').setAction(async (taskArgs: Record, hardhat) => { + const chain = hardhat.network; + const chainId = chain.config.chainId; + const config = (chain.config).protocolConfig; + + if (!chainId) throw new Error(`Chain ID is not defined`); + + console.log('-'.repeat(process.stdout.columns)); + console.group('Conditions:'); + console.log(`Chain - ${chain.name}`); + console.log(`Chain ID - ${chainId}`); + console.log(`Market`); + console.groupEnd(); + console.log('-'.repeat(process.stdout.columns)); + + // TransparentUpgradeableProxy + const proxyAddr = config.market.market.proxy; + const implAddr = config.market.market.impl; + const proxyAdminOwnerAddr = config.main; + + // ProxyAdmin + const proxyAdminAddr = config.market.market.admin; + + // Market + const mainAddr = config.main; + + console.log(`Verify Market...`); + console.log(`\n`); + console.group('Params:'); + + console.group(`TransparentUpgradeableProxy:`); + console.log(`proxy: ${proxyAddr}`); + console.log(`impl: ${implAddr}`); + console.log(`proxyAdminOwner: ${proxyAdminOwnerAddr}`); + console.groupEnd(); + + console.group(`ProxyAdmin:`); + console.log(`proxyAdmin: ${proxyAdminAddr}`); + console.log(`proxyAdminOwner: ${proxyAdminOwnerAddr}`); + console.groupEnd(); + + console.group(`Market:`); + console.log(`main: ${mainAddr}`); + console.groupEnd(); + + console.groupEnd(); + console.log(`\n`); + + await hardhat.run('verify:verify', { + contract: + '@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol:TransparentUpgradeableProxy', + address: proxyAddr, + constructorArguments: [implAddr, proxyAdminOwnerAddr, new Uint8Array(0)], + }); + console.log(`\n`); + + await hardhat.run('verify:verify', { + contract: '@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol:ProxyAdmin', + address: proxyAdminAddr, + constructorArguments: [proxyAdminOwnerAddr], + }); + console.log(`\n`); + + await hardhat.run('verify:verify', { + contract: 'contracts/market/Market.sol:Market', + address: implAddr, + constructorArguments: [proxyAddr, mainAddr], + }); + console.log('-'.repeat(process.stdout.columns)); +}); diff --git a/tests/ArtToken.ts b/tests/ArtToken.ts index ae35916..3d47340 100644 --- a/tests/ArtToken.ts +++ b/tests/ArtToken.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; import { Signer, MaxInt256, ZeroAddress } from 'ethers'; -import { ArtToken, AuctionHouse, USDC, MarketMock } from '../typechain-types'; +import { ArtToken, AuctionHouse, USDC, Market } from '../typechain-types'; import { BuyPermitStruct } from '../types/art-token'; import { CreatePermitStruct } from '../types/auction-house'; import { MIN_FEE, MIN_PRICE } from './constants/min-price-and-fee'; @@ -10,14 +10,14 @@ import { HOUR } from './constants/time'; import { AUCTION_ID, AUCTION_STEP } from './constants/auction-house'; import { getSigners } from './utils/get-signers'; import { getLatestBlockTimestamp } from './utils/get-latest-block-timestamp'; -import { deployProtocolTest } from './utils/deploy-protocol-test'; +import { deployAll } from './utils/deploy-all'; import { ArtTokenUtils } from './utils/art-token-utils'; import { AuctionHouseUtils } from './utils/auction-house-utils'; describe('ArtToken', function () { let artToken: ArtToken, artTokenAddr: string; let auctionHouse: AuctionHouse, auctionHouseAddr: string; - let market: MarketMock, marketAddr: string; + let market: Market, marketAddr: string; let usdc: USDC, usdcAddr: string; let artTokenSigner: Signer, artTokenSignerAddr: string; @@ -34,16 +34,16 @@ describe('ArtToken', function () { }); beforeEach(async () => { - const protocol = await deployProtocolTest({ signer: artTokenSigner, financier }); - - artToken = protocol.artToken; - artTokenAddr = protocol.artTokenAddr; - auctionHouse = protocol.auctionHouse; - auctionHouseAddr = protocol.auctionHouseAddr; - market = protocol.marketMock; - marketAddr = protocol.marketMockAddr; - usdc = protocol.usdc; - usdcAddr = protocol.usdcAddr; + const all = await deployAll({ signer: artTokenSigner, financier }); + + artToken = all.artToken; + artTokenAddr = all.artTokenAddr; + auctionHouse = all.auctionHouse; + auctionHouseAddr = all.auctionHouseAddr; + market = all.market; + marketAddr = all.marketAddr; + usdc = all.usdc; + usdcAddr = all.usdcAddr; }); describe(`method 'buy'`, () => { @@ -51,7 +51,7 @@ describe('ArtToken', function () { await usdc.connect(buyer).mintAndApprove(artToken, MaxInt256); }); - it(`should mint the token, distribute reward, and charge fee`, async () => { + it(`should mint the token, distribute price, and charge a fee`, async () => { const latestBlockTimestamp = await getLatestBlockTimestamp(); const institutionShare = (TOTAL_SHARE / 5n) * 4n; // 80% @@ -99,7 +99,7 @@ describe('ArtToken', function () { .withArgs(ZeroAddress, buyerAddr, TOKEN_ID); }); - it(`should fail if the token is reserved by the auction`, async () => { + it(`should fail if the token is reserved by an auction`, async () => { const latestBlockTimestamp = await getLatestBlockTimestamp(); const createPermit: CreatePermitStruct = { @@ -215,7 +215,7 @@ describe('ArtToken', function () { .withArgs(buyerAddr, marketAddr, TOKEN_ID); }); - it(`should fail if a token is attempted to be transferred to a non-partner contract`, async () => { + it(`should fail if a token is transferred to a non-partner contract`, async () => { const tx = artToken.connect(buyer).transferFrom(buyer, usdc, TOKEN_ID); await expect(tx).to.eventually.rejectedWith('ArtTokenUnauthorizedAccount'); @@ -263,7 +263,7 @@ describe('ArtToken', function () { .withArgs(buyerAddr, marketAddr, TOKEN_ID); }); - it(`should fail if the approval is attempted to be provided to a non-partner contract`, async () => { + it(`should fail if approval is provided to a non-partner contract`, async () => { const tx = artToken.connect(buyer).approve(usdc, TOKEN_ID); await expect(tx).to.eventually.rejectedWith('ArtTokenUnauthorizedAccount'); @@ -311,7 +311,7 @@ describe('ArtToken', function () { .withArgs(buyerAddr, marketAddr, true); }); - it(`should fail if the approval is attempted to be provided to a non-partner contract`, async () => { + it(`should fail if approval is provided to a non-partner contract`, async () => { const tx = artToken.connect(buyer).setApprovalForAll(usdc, true); await expect(tx).to.eventually.rejectedWith('ArtTokenUnauthorizedAccount'); diff --git a/tests/AuctionHouse.ts b/tests/AuctionHouse.ts index bb5998f..c8de1bd 100644 --- a/tests/AuctionHouse.ts +++ b/tests/AuctionHouse.ts @@ -12,7 +12,7 @@ import { TOKEN_ID, TOKEN_URI } from './constants/art-token'; import { HOUR } from './constants/time'; import { getSigners } from './utils/get-signers'; import { getLatestBlockTimestamp } from './utils/get-latest-block-timestamp'; -import { deployProtocolTest } from './utils/deploy-protocol-test'; +import { deployAll } from './utils/deploy-all'; import { ArtTokenUtils } from './utils/art-token-utils'; import { AuctionHouseUtils } from './utils/auction-house-utils'; @@ -35,17 +35,17 @@ describe('AuctionHouse', function () { }); beforeEach(async () => { - const protocol = await deployProtocolTest({ + const all = await deployAll({ signer: auctionHouseSigner, financier, }); - auctionHouse = protocol.auctionHouse; - auctionHouseAddr = protocol.auctionHouseAddr; - artToken = protocol.artToken; - artTokenAddr = protocol.artTokenAddr; - usdc = protocol.usdc; - usdcAddr = protocol.usdcAddr; + auctionHouse = all.auctionHouse; + auctionHouseAddr = all.auctionHouseAddr; + artToken = all.artToken; + artTokenAddr = all.artTokenAddr; + usdc = all.usdc; + usdcAddr = all.usdcAddr; }); describe(`method 'create'`, () => { @@ -97,7 +97,7 @@ describe('AuctionHouse', function () { expect(auction.shares).to.deep.equal(shares); }); - it(`should create the new auction for token that was not sold at the previous auction`, async () => { + it(`should create a new auction for a token that was not sold in the previous auction`, async () => { const latestBlockTimestamp = await getLatestBlockTimestamp(); const firstPermit: CreatePermitStruct = { diff --git a/tests/Authorization.ts b/tests/Authorization.ts index e2f1e71..a86005b 100644 --- a/tests/Authorization.ts +++ b/tests/Authorization.ts @@ -8,7 +8,7 @@ import { TOKEN_ID, TOKEN_URI } from './constants/art-token'; import { HOUR } from './constants/time'; import { getSigners } from './utils/get-signers'; import { getLatestBlockTimestamp } from './utils/get-latest-block-timestamp'; -import { deployProtocolTest } from './utils/deploy-protocol-test'; +import { deployAll } from './utils/deploy-all'; import { ArtTokenUtils } from './utils/art-token-utils'; describe('Authorization', function () { @@ -29,15 +29,15 @@ describe('Authorization', function () { }); beforeEach(async () => { - const protocol = await deployProtocolTest({ + const all = await deployAll({ signer: artTokenSigner, financier, }); - artToken = protocol.artToken; - artTokenAddr = protocol.artTokenAddr; - usdc = protocol.usdc; - usdcAddr = protocol.usdcAddr; + artToken = all.artToken; + artTokenAddr = all.artTokenAddr; + usdc = all.usdc; + usdcAddr = all.usdcAddr; }); describe(`method '_requireAuthorizedAction'`, () => { diff --git a/tests/CurrencyManager.ts b/tests/CurrencyManager.ts new file mode 100644 index 0000000..12764e7 --- /dev/null +++ b/tests/CurrencyManager.ts @@ -0,0 +1,69 @@ +import { expect } from 'chai'; +import { Signer, ZeroAddress } from 'ethers'; +import { CurrencyManager, USDC } from '../typechain-types'; +import { getSigners } from './utils/get-signers'; +import { deployAll } from './utils/deploy-all'; + +describe('CurrencyManager', function () { + let currencyManager: CurrencyManager, currencyManagerAddr: string; + let usdc: USDC, usdcAddr: string; + + let admin: Signer, adminAddr: string; + let signer: Signer, signerAddr: string; + let financier: Signer, financierAddr: string; + let randomAccount: Signer, randomAccountAddr: string; + + before(async () => { + [ + [signer, financier, admin, randomAccount], + [signerAddr, financierAddr, adminAddr, randomAccountAddr], + ] = await getSigners(); + }); + + beforeEach(async () => { + const all = await deployAll({ + signer, + financier, + admin, + }); + + currencyManager = all.market; + currencyManagerAddr = all.marketAddr; + usdc = all.usdc; + usdcAddr = all.usdcAddr; + }); + + describe(`method 'currencyAllowed'`, () => { + it(`should return true if the currency is allowed`, async () => { + expect(await currencyManager.currencyAllowed(usdcAddr)).to.be.true; + }); + + it(`should return false if the currency is not allowed`, async () => { + expect(await currencyManager.currencyAllowed(ZeroAddress)).to.be.false; + }); + }); + + describe(`method 'updateCurrencyStatus'`, () => { + it(`should update the currency status if the caller is an admin`, async () => { + expect(await currencyManager.currencyAllowed(usdcAddr)).to.be.true; + + await expect(currencyManager.connect(admin).updateCurrencyStatus(usdcAddr, false)) + .to.emit(currencyManager, 'CurrencyStatusUpdated') + .withArgs(usdcAddr, false); + + expect(await currencyManager.currencyAllowed(usdcAddr)).to.be.false; + + await expect(currencyManager.connect(admin).updateCurrencyStatus(usdcAddr, true)) + .to.emit(currencyManager, 'CurrencyStatusUpdated') + .withArgs(usdcAddr, true); + + expect(await currencyManager.currencyAllowed(usdcAddr)).to.be.true; + }); + + it(`should fail if the caller is not an admin`, async () => { + await expect( + currencyManager.connect(randomAccount).updateCurrencyStatus(usdcAddr, false), + ).to.be.revertedWithCustomError(currencyManager, 'RoleSystemUnauthorizedAccount'); + }); + }); +}); diff --git a/tests/Distribution.ts b/tests/Distribution.ts index 04e9c98..6abe503 100644 --- a/tests/Distribution.ts +++ b/tests/Distribution.ts @@ -8,7 +8,7 @@ import { TOKEN_ID, TOKEN_URI } from './constants/art-token'; import { HOUR } from './constants/time'; import { getSigners } from './utils/get-signers'; import { getLatestBlockTimestamp } from './utils/get-latest-block-timestamp'; -import { deployProtocolTest } from './utils/deploy-protocol-test'; +import { deployAll } from './utils/deploy-all'; import { ArtTokenUtils } from './utils/art-token-utils'; describe('Distribution', function () { @@ -28,15 +28,15 @@ describe('Distribution', function () { }); beforeEach(async () => { - const protocol = await deployProtocolTest({ + const all = await deployAll({ signer: artTokenSigner, financier, }); - artToken = protocol.artToken; - artTokenAddr = protocol.artTokenAddr; - usdc = protocol.usdc; - usdcAddr = protocol.usdcAddr; + artToken = all.artToken; + artTokenAddr = all.artTokenAddr; + usdc = all.usdc; + usdcAddr = all.usdcAddr; }); describe(`method 'safeDistribute'`, () => { @@ -44,7 +44,7 @@ describe('Distribution', function () { await usdc.connect(buyer).mintAndApprove(artToken, MaxInt256); }); - it(`should distribute rewards between participants according to shares`, async () => { + it(`should distribute the price among participants according to shares`, async () => { const latestBlockTimestamp = await getLatestBlockTimestamp(); const institutionShare = (TOTAL_SHARE / 5n) * 4n; // 80% @@ -173,7 +173,7 @@ describe('Distribution', function () { sender: buyer, }); - await expect(tx).to.be.rejectedWith('DistributionSharesSumTooBig(10500)'); + await expect(tx).to.be.rejectedWith('DistributionSharesSumInvalid(10500)'); }); it(`should fail if the total share is less than 100%`, async () => { @@ -202,7 +202,7 @@ describe('Distribution', function () { sender: buyer, }); - await expect(tx).to.be.rejectedWith('DistributionSharesSumTooLow(8000)'); + await expect(tx).to.be.rejectedWith('DistributionSharesSumInvalid(8000)'); }); it(`should fail if shares and participants are missing`, async () => { @@ -228,7 +228,7 @@ describe('Distribution', function () { sender: buyer, }); - await expect(tx).to.be.rejectedWith('DistributionSharesSumTooLow(0)'); + await expect(tx).to.be.rejectedWith('DistributionSharesSumInvalid(0)'); }); }); }); diff --git a/tests/Market.ts b/tests/Market.ts new file mode 100644 index 0000000..513b617 --- /dev/null +++ b/tests/Market.ts @@ -0,0 +1,1289 @@ +import { expect } from 'chai'; +import { Signer, MaxInt256, randomBytes } from 'ethers'; +import { ArtToken, Market, USDC } from '../typechain-types'; +import { Order, ExecutionPermit } from '../typechain-types/contracts/market/Market'; +import { BuyPermitStruct } from '../types/art-token'; +import { TOTAL_SHARE } from './constants/distribution'; +import { TOKEN_ID, TOKEN_URI } from './constants/art-token'; +import { MIN_FEE, MIN_PRICE } from './constants/min-price-and-fee'; +import { PRICE, ASK_SIDE_FEE, BID_SIDE_FEE, ASK_SIDE, BID_SIDE } from './constants/market'; +import { HOUR } from './constants/time'; +import { getSigners } from './utils/get-signers'; +import { getLatestBlockTimestamp } from './utils/get-latest-block-timestamp'; +import { deployAll } from './utils/deploy-all'; +import { MarketUtils } from './utils/market-utils'; +import { ArtTokenUtils } from './utils/art-token-utils'; + +describe('Market', function () { + let market: Market, marketAddr: string; + let artToken: ArtToken, artTokenAddr: string; + let usdc: USDC, usdcAddr: string; + + let marketSigner: Signer, marketSignerAddr: string; + let financier: Signer, financierAddr: string; + let marketAdmin: Signer, marketAdminAddr: string; + let institution: Signer, institutionAddr: string; + let maker: Signer, makerAddr: string; + let taker: Signer, takerAddr: string; + let randomAccount: Signer, randomAccountAddr: string; + + before(async () => { + [ + [marketSigner, financier, marketAdmin, institution, maker, taker, randomAccount], + [ + marketSignerAddr, + financierAddr, + marketAdminAddr, + institutionAddr, + makerAddr, + takerAddr, + randomAccountAddr, + ], + ] = await getSigners(); + }); + + beforeEach(async () => { + const all = await deployAll({ + signer: marketSigner, + financier, + admin: marketAdmin, + }); + + market = all.market; + marketAddr = all.marketAddr; + artToken = all.artToken; + artTokenAddr = all.artTokenAddr; + usdc = all.usdc; + usdcAddr = all.usdcAddr; + }); + + describe(`method 'executeAsk'`, () => { + /** + * MAKER is ASK_SIDE + * TAKER is BID_SIDE + */ + beforeEach(async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const buyPermit: BuyPermitStruct = { + tokenId: TOKEN_ID, + tokenURI: TOKEN_URI, + sender: makerAddr, + price: MIN_PRICE, + fee: MIN_FEE, + participants: [institutionAddr], + shares: [TOTAL_SHARE], + deadline: latestBlockTimestamp + HOUR, + }; + + await usdc.connect(maker).mintAndApprove(artToken, MaxInt256); + + await ArtTokenUtils.buy({ + artToken, + permit: buyPermit, + permitSigner: marketSigner, + sender: maker, + }); + + await artToken.connect(maker).approve(marketAddr, TOKEN_ID); + + await usdc.connect(taker).mintAndApprove(marketAddr, MaxInt256); + }); + + it(`should execute the order`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const askSideReward = PRICE - ASK_SIDE_FEE; + const institutionReward = PRICE - askSideReward - 100n; + const platformReward = PRICE - askSideReward - institutionReward; + + const order: Order.TypeStruct = { + side: ASK_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: ASK_SIDE_FEE, + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const orderHash = MarketUtils.hashOrder(order); + + const permit: ExecutionPermit.TypeStruct = { + orderHash, + taker: takerAddr, + takerFee: BID_SIDE_FEE, + participants: [institutionAddr, financierAddr], + rewards: [institutionReward, platformReward], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = await MarketUtils.executeAsk({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx) + .to.be.emit(usdc, 'Transfer') + .withArgs(takerAddr, marketAddr, PRICE + BID_SIDE_FEE); + + await expect(tx) + .to.be.emit(usdc, 'Transfer') // + .withArgs(marketAddr, financierAddr, BID_SIDE_FEE); + + await expect(tx) + .to.be.emit(usdc, 'Transfer') + .withArgs(marketAddr, makerAddr, askSideReward); + + await expect(tx) + .to.be.emit(usdc, 'Transfer') + .withArgs(marketAddr, institutionAddr, institutionReward); + + await expect(tx) + .to.be.emit(usdc, 'Transfer') + .withArgs(marketAddr, financierAddr, platformReward); + + await expect(tx) + .to.be.emit(artToken, 'Transfer') // + .withArgs(makerAddr, takerAddr, TOKEN_ID); + + await expect(tx) + .to.be.emit(market, 'AskOrderExecuted') + .withArgs(orderHash, artTokenAddr, usdcAddr, makerAddr, takerAddr, TOKEN_ID, PRICE); + + await expect(market.orderInvalidated(maker, orderHash)).to.eventually.equal(true); + }); + + it(`should execute the order with zero maker fee`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const order: Order.TypeStruct = { + side: ASK_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: 0n, // Zero fee + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const orderHash = MarketUtils.hashOrder(order); + + const permit: ExecutionPermit.TypeStruct = { + orderHash, + taker: takerAddr, + takerFee: BID_SIDE_FEE, + participants: [], + rewards: [], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = await MarketUtils.executeAsk({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.be.emit(usdc, 'Transfer').withArgs(marketAddr, makerAddr, PRICE); // Full price to maker + }); + + it(`should execute the order with zero taker fee`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const order: Order.TypeStruct = { + side: ASK_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: ASK_SIDE_FEE, + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const orderHash = MarketUtils.hashOrder(order); + + const permit: ExecutionPermit.TypeStruct = { + orderHash, + taker: takerAddr, + takerFee: 0n, // Zero taker fee + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = await MarketUtils.executeAsk({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.be.emit(usdc, 'Transfer').withArgs(takerAddr, marketAddr, PRICE); // Only price, no fee + }); + + it(`should fail if the order start time is greater than the current time`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const startTime = latestBlockTimestamp + HOUR * 2; + const endTime = latestBlockTimestamp + HOUR * 10; + + const order: Order.TypeStruct = { + side: ASK_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: ASK_SIDE_FEE, + startTime, + endTime, + }; + + const permit: ExecutionPermit.TypeStruct = { + orderHash: MarketUtils.hashOrder(order), + taker: takerAddr, + takerFee: BID_SIDE_FEE, + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = MarketUtils.executeAsk({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.eventually.rejectedWith('MarketOrderOutsideOfTimeRange'); + }); + + it(`should fail if the order end time is less than the current time`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const startTime = latestBlockTimestamp - HOUR * 3; + const endTime = latestBlockTimestamp - HOUR; + + const order: Order.TypeStruct = { + side: ASK_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: ASK_SIDE_FEE, + startTime, + endTime, + }; + + const permit: ExecutionPermit.TypeStruct = { + orderHash: MarketUtils.hashOrder(order), + taker: takerAddr, + takerFee: BID_SIDE_FEE, + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = MarketUtils.executeAsk({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.eventually.rejectedWith('MarketOrderOutsideOfTimeRange'); + }); + + it(`should fail if the order signer is not the maker`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const order: Order.TypeStruct = { + side: ASK_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: ASK_SIDE_FEE, + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const permit: ExecutionPermit.TypeStruct = { + orderHash: MarketUtils.hashOrder(order), + taker: takerAddr, + takerFee: BID_SIDE_FEE, + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = MarketUtils.executeAsk({ + market, + order, + permit, + orderSigner: randomAccount, // Wrong order signer + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.eventually.rejectedWith('MarketUnauthorizedOrder'); + }); + + it(`should fail if the permit order hash and the order hash do not match`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const order: Order.TypeStruct = { + side: ASK_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: ASK_SIDE_FEE, + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const permit: ExecutionPermit.TypeStruct = { + orderHash: randomBytes(32), // Wrong order hash + taker: takerAddr, + takerFee: BID_SIDE_FEE, + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = MarketUtils.executeAsk({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.eventually.rejectedWith('MarketInvalidOrderHash'); + }); + + it(`should fail if the permit signer is not the market signer`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const order: Order.TypeStruct = { + side: ASK_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: ASK_SIDE_FEE, + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const permit: ExecutionPermit.TypeStruct = { + orderHash: MarketUtils.hashOrder(order), + taker: takerAddr, + takerFee: BID_SIDE_FEE, + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = MarketUtils.executeAsk({ + market, + order, + permit, + orderSigner: maker, + permitSigner: randomAccount, // Wrong permit signer + sender: taker, + }); + + await expect(tx).to.eventually.rejectedWith('AuthorizationUnauthorizedAction'); + }); + + it(`should fail if the order is invalidated`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const order: Order.TypeStruct = { + side: ASK_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: ASK_SIDE_FEE, + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const orderHash = MarketUtils.hashOrder(order); + + const permit: ExecutionPermit.TypeStruct = { + orderHash, + taker: takerAddr, + takerFee: BID_SIDE_FEE, + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp + HOUR, + }; + + await market.connect(maker).invalidateOrder(makerAddr, orderHash); + + const tx = MarketUtils.executeAsk({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.eventually.rejectedWith('MarketOrderInvalidated'); + }); + + it(`should fail if the order side is not ASK`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const order: Order.TypeStruct = { + side: BID_SIDE, // Wrong side + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: ASK_SIDE_FEE, + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const permit: ExecutionPermit.TypeStruct = { + orderHash: MarketUtils.hashOrder(order), + taker: takerAddr, + takerFee: BID_SIDE_FEE, + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = MarketUtils.executeAsk({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.eventually.rejectedWith('MarketInvalidOrderSide'); + }); + + it(`should fail if the ask side fee is greater than or equal to the price`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const order: Order.TypeStruct = { + side: ASK_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: PRICE, // Fee equals price + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const permit: ExecutionPermit.TypeStruct = { + orderHash: MarketUtils.hashOrder(order), + taker: takerAddr, + takerFee: BID_SIDE_FEE, + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = MarketUtils.executeAsk({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.eventually.rejectedWith('MarketInvalidAskSideFee'); + }); + + it(`should fail if the currency is not allowed`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const order: Order.TypeStruct = { + side: ASK_SIDE, + collection: artTokenAddr, + currency: randomAccountAddr, // Invalid currency + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: ASK_SIDE_FEE, + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const permit: ExecutionPermit.TypeStruct = { + orderHash: MarketUtils.hashOrder(order), + taker: takerAddr, + takerFee: BID_SIDE_FEE, + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = MarketUtils.executeAsk({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.eventually.rejectedWith('MarketCurrencyInvalid'); + }); + + it(`should fail if the permit taker is not the sender`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const order: Order.TypeStruct = { + side: ASK_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: ASK_SIDE_FEE, + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const permit: ExecutionPermit.TypeStruct = { + orderHash: MarketUtils.hashOrder(order), + taker: randomAccountAddr, // Different taker + takerFee: BID_SIDE_FEE, + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = MarketUtils.executeAsk({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.eventually.rejectedWith('MarketUnauthorizedAccount'); + }); + + it(`should fail if the permit deadline has expired`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const order: Order.TypeStruct = { + side: ASK_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: ASK_SIDE_FEE, + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const permit: ExecutionPermit.TypeStruct = { + orderHash: MarketUtils.hashOrder(order), + taker: takerAddr, + takerFee: BID_SIDE_FEE, + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp - HOUR, // Expired deadline + }; + + const tx = MarketUtils.executeAsk({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.eventually.rejectedWith('AuthorizationDeadlineExpired'); + }); + }); + + describe(`method 'executeBid'`, () => { + /** + * MAKER is BID_SIDE + * TAKER is ASK_SIDE + */ + beforeEach(async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const buyPermit: BuyPermitStruct = { + tokenId: TOKEN_ID, + tokenURI: TOKEN_URI, + sender: takerAddr, + price: MIN_PRICE, + fee: MIN_FEE, + participants: [institutionAddr], + shares: [TOTAL_SHARE], + deadline: latestBlockTimestamp + HOUR, + }; + + await usdc.connect(taker).mintAndApprove(artToken, MaxInt256); + + await ArtTokenUtils.buy({ + artToken, + permit: buyPermit, + permitSigner: marketSigner, + sender: taker, + }); + + await artToken.connect(taker).approve(marketAddr, TOKEN_ID); + + await usdc.connect(maker).mintAndApprove(marketAddr, MaxInt256); + }); + + it(`should execute the order`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const askSideReward = PRICE - ASK_SIDE_FEE; + const institutionReward = PRICE - askSideReward - 100n; + const platformReward = PRICE - askSideReward - institutionReward; + + const order: Order.TypeStruct = { + side: BID_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: BID_SIDE_FEE, + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const orderHash = MarketUtils.hashOrder(order); + + const permit: ExecutionPermit.TypeStruct = { + orderHash, + taker: takerAddr, + takerFee: ASK_SIDE_FEE, + participants: [institutionAddr, financierAddr], + rewards: [institutionReward, platformReward], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = await MarketUtils.executeBid({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx) + .to.be.emit(usdc, 'Transfer') + .withArgs(makerAddr, marketAddr, PRICE + BID_SIDE_FEE); + + await expect(tx) + .to.be.emit(usdc, 'Transfer') // + .withArgs(marketAddr, financierAddr, BID_SIDE_FEE); + + await expect(tx) + .to.be.emit(usdc, 'Transfer') + .withArgs(marketAddr, takerAddr, askSideReward); + + await expect(tx) + .to.be.emit(usdc, 'Transfer') + .withArgs(marketAddr, institutionAddr, institutionReward); + + await expect(tx) + .to.be.emit(usdc, 'Transfer') + .withArgs(marketAddr, financierAddr, platformReward); + + await expect(tx) + .to.be.emit(artToken, 'Transfer') // + .withArgs(takerAddr, makerAddr, TOKEN_ID); + + await expect(tx) + .to.be.emit(market, 'BidOrderExecuted') + .withArgs(orderHash, artTokenAddr, usdcAddr, makerAddr, takerAddr, TOKEN_ID, PRICE); + + await expect(market.orderInvalidated(maker, orderHash)).to.eventually.equal(true); + }); + + it(`should execute the order with zero maker fee`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const order: Order.TypeStruct = { + side: BID_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: 0n, // Zero fee + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const orderHash = MarketUtils.hashOrder(order); + + const permit: ExecutionPermit.TypeStruct = { + orderHash, + taker: takerAddr, + takerFee: ASK_SIDE_FEE, + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = await MarketUtils.executeBid({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.be.emit(usdc, 'Transfer').withArgs(makerAddr, marketAddr, PRICE); // Only price, no fee from maker + }); + + it(`should execute the order with zero taker fee`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const order: Order.TypeStruct = { + side: BID_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: BID_SIDE_FEE, + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const orderHash = MarketUtils.hashOrder(order); + + const permit: ExecutionPermit.TypeStruct = { + orderHash, + taker: takerAddr, + takerFee: 0n, // Zero taker fee + participants: [], + rewards: [], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = await MarketUtils.executeBid({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.be.emit(usdc, 'Transfer').withArgs(marketAddr, takerAddr, PRICE); // Full price to taker + }); + + it(`should fail if the order start time is greater than the current time`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const startTime = latestBlockTimestamp + HOUR * 2; + const endTime = latestBlockTimestamp + HOUR * 10; + + const order: Order.TypeStruct = { + side: BID_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: BID_SIDE_FEE, + startTime, + endTime, + }; + + const permit: ExecutionPermit.TypeStruct = { + orderHash: MarketUtils.hashOrder(order), + taker: takerAddr, + takerFee: ASK_SIDE_FEE, + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = MarketUtils.executeBid({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.eventually.rejectedWith('MarketOrderOutsideOfTimeRange'); + }); + + it(`should fail if the order end time is less than the current time`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const startTime = latestBlockTimestamp - HOUR * 3; + const endTime = latestBlockTimestamp - HOUR; + + const order: Order.TypeStruct = { + side: BID_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: BID_SIDE_FEE, + startTime, + endTime, + }; + + const permit: ExecutionPermit.TypeStruct = { + orderHash: MarketUtils.hashOrder(order), + taker: takerAddr, + takerFee: ASK_SIDE_FEE, + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = MarketUtils.executeBid({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.eventually.rejectedWith('MarketOrderOutsideOfTimeRange'); + }); + + it(`should fail if the order signer is not the maker`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const order: Order.TypeStruct = { + side: BID_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: BID_SIDE_FEE, + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const permit: ExecutionPermit.TypeStruct = { + orderHash: MarketUtils.hashOrder(order), + taker: takerAddr, + takerFee: ASK_SIDE_FEE, + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = MarketUtils.executeBid({ + market, + order, + permit, + orderSigner: randomAccount, // Wrong order signer + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.eventually.rejectedWith('MarketUnauthorizedOrder'); + }); + + it(`should fail if the permit order hash and the order hash do not match`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const order: Order.TypeStruct = { + side: BID_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: BID_SIDE_FEE, + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const permit: ExecutionPermit.TypeStruct = { + orderHash: randomBytes(32), // Wrong order hash + taker: takerAddr, + takerFee: ASK_SIDE_FEE, + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = MarketUtils.executeBid({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.eventually.rejectedWith('MarketInvalidOrderHash'); + }); + + it(`should fail if the permit signer is not the market signer`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const order: Order.TypeStruct = { + side: BID_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: BID_SIDE_FEE, + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const permit: ExecutionPermit.TypeStruct = { + orderHash: MarketUtils.hashOrder(order), + taker: takerAddr, + takerFee: ASK_SIDE_FEE, + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = MarketUtils.executeBid({ + market, + order, + permit, + orderSigner: maker, + permitSigner: randomAccount, // Wrong permit signer + sender: taker, + }); + + await expect(tx).to.eventually.rejectedWith('AuthorizationUnauthorizedAction'); + }); + + it(`should fail if the order is invalidated`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const order: Order.TypeStruct = { + side: BID_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: BID_SIDE_FEE, + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const orderHash = MarketUtils.hashOrder(order); + + const permit: ExecutionPermit.TypeStruct = { + orderHash, + taker: takerAddr, + takerFee: ASK_SIDE_FEE, + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp + HOUR, + }; + + await market.connect(maker).invalidateOrder(makerAddr, orderHash); + + const tx = MarketUtils.executeBid({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.eventually.rejectedWith('MarketOrderInvalidated'); + }); + + it(`should fail if the order side is not BID`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const order: Order.TypeStruct = { + side: ASK_SIDE, // Wrong side + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: BID_SIDE_FEE, + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const permit: ExecutionPermit.TypeStruct = { + orderHash: MarketUtils.hashOrder(order), + taker: takerAddr, + takerFee: ASK_SIDE_FEE, + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = MarketUtils.executeBid({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.eventually.rejectedWith('MarketInvalidOrderSide'); + }); + + it(`should fail if the ask side fee is greater than or equal to the price`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const order: Order.TypeStruct = { + side: BID_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: BID_SIDE_FEE, + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const permit: ExecutionPermit.TypeStruct = { + orderHash: MarketUtils.hashOrder(order), + taker: takerAddr, + takerFee: PRICE, // Fee equals price + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = MarketUtils.executeBid({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.eventually.rejectedWith('MarketInvalidAskSideFee'); + }); + + it(`should fail if the currency is not allowed`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const order: Order.TypeStruct = { + side: BID_SIDE, + collection: artTokenAddr, + currency: randomAccountAddr, // Invalid currency + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: BID_SIDE_FEE, + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const permit: ExecutionPermit.TypeStruct = { + orderHash: MarketUtils.hashOrder(order), + taker: takerAddr, + takerFee: ASK_SIDE_FEE, + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = MarketUtils.executeBid({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.eventually.rejectedWith('MarketCurrencyInvalid'); + }); + + it(`should fail if the permit taker is not the sender`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const order: Order.TypeStruct = { + side: BID_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: BID_SIDE_FEE, + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const permit: ExecutionPermit.TypeStruct = { + orderHash: MarketUtils.hashOrder(order), + taker: randomAccountAddr, // Different taker + takerFee: ASK_SIDE_FEE, + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp + HOUR, + }; + + const tx = MarketUtils.executeBid({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.eventually.rejectedWith('MarketUnauthorizedAccount'); + }); + + it(`should fail if the permit deadline has expired`, async () => { + const latestBlockTimestamp = await getLatestBlockTimestamp(); + + const order: Order.TypeStruct = { + side: BID_SIDE, + collection: artTokenAddr, + currency: usdcAddr, + maker: makerAddr, + tokenId: TOKEN_ID, + price: PRICE, + makerFee: BID_SIDE_FEE, + startTime: latestBlockTimestamp, + endTime: latestBlockTimestamp + HOUR, + }; + + const permit: ExecutionPermit.TypeStruct = { + orderHash: MarketUtils.hashOrder(order), + taker: takerAddr, + takerFee: ASK_SIDE_FEE, + participants: [institutionAddr], + rewards: [ASK_SIDE_FEE], + deadline: latestBlockTimestamp - HOUR, // Expired deadline + }; + + const tx = MarketUtils.executeBid({ + market, + order, + permit, + orderSigner: maker, + permitSigner: marketSigner, + sender: taker, + }); + + await expect(tx).to.eventually.rejectedWith('AuthorizationDeadlineExpired'); + }); + }); + + describe(`method 'orderInvalidated'`, () => { + it(`should return the correct value`, async () => { + const orderHash = randomBytes(32); + + await expect(market.orderInvalidated(maker, orderHash)).to.eventually.equal(false); + + await market.connect(maker).invalidateOrder(maker, orderHash); + + await expect(market.orderInvalidated(maker, orderHash)).to.eventually.equal(true); + }); + }); + + describe(`method 'invalidateOrder'`, () => { + it(`should invalidate the order if the sender is the maker`, async () => { + const orderHash = randomBytes(32); + + const tx = await market.connect(maker).invalidateOrder(maker, orderHash); + + const invalidated = await market.orderInvalidated(maker, orderHash); + + expect(invalidated).equal(true); + + await expect(tx).to.be.emit(market, 'OrderInvalidated').withArgs(makerAddr, orderHash); + }); + + it(`should invalidate the order if the sender is the market admin`, async () => { + const orderHash = randomBytes(32); + + const tx = await market.connect(marketAdmin).invalidateOrder(maker, orderHash); + + const invalidated = await market.orderInvalidated(maker, orderHash); + + expect(invalidated).equal(true); + + await expect(tx).to.be.emit(market, 'OrderInvalidated').withArgs(makerAddr, orderHash); + }); + + it(`should fail when trying to invalidate an already invalidated order`, async () => { + const orderHash = randomBytes(32); + + // First invalidation + await market.connect(maker).invalidateOrder(maker, orderHash); + + // Second invalidation attempt + const tx = market.connect(maker).invalidateOrder(maker, orderHash); + + await expect(tx).to.eventually.rejectedWith('MarketOrderInvalidated'); + }); + + it(`should fail if the sender is not the maker or the market admin`, async () => { + const orderHash = randomBytes(32); + + const tx = market.connect(randomAccount).invalidateOrder(maker, orderHash); + + await expect(tx).to.eventually.rejectedWith('MarketUnauthorizedAccount'); + }); + }); +}); diff --git a/tests/RoleSystem.ts b/tests/RoleSystem.ts index 9463064..89bbc45 100644 --- a/tests/RoleSystem.ts +++ b/tests/RoleSystem.ts @@ -28,7 +28,7 @@ describe('RoleSystem', function () { describe(`roles`, () => { describe(`method 'grantRole'`, () => { - it(`should grant`, async () => { + it(`should grant a role`, async () => { const transaction = await roleSystem.grantRole(ADMIN_ROLE, account); await expect(transaction) @@ -38,7 +38,7 @@ describe('RoleSystem', function () { await expect(roleSystem.hasRole(ADMIN_ROLE, account)).to.eventually.equal(true); }); - it(`should fail if a sender is not the main account`, async () => { + it(`should fail if the sender is not the main account`, async () => { await expect( roleSystem.connect(account).grantRole(ADMIN_ROLE, account), ).to.eventually.rejectedWith('RoleSystemNotMain'); @@ -50,7 +50,7 @@ describe('RoleSystem', function () { await roleSystem.grantRole(ADMIN_ROLE, account); }); - it(`should revoke`, async () => { + it(`should revoke a role`, async () => { const transaction = await roleSystem.revokeRole(ADMIN_ROLE, account); await expect(transaction) @@ -60,7 +60,7 @@ describe('RoleSystem', function () { await expect(roleSystem.hasRole(ADMIN_ROLE, account)).to.eventually.equal(false); }); - it(`should fail if a sender is not the main account`, async () => { + it(`should fail if the sender is not the main account`, async () => { await expect( roleSystem.connect(account).revokeRole(ADMIN_ROLE, account), ).to.eventually.rejectedWith('RoleSystemNotMain'); @@ -68,7 +68,7 @@ describe('RoleSystem', function () { }); describe(`method 'hasRole'`, () => { - it(`should return correct value`, async () => { + it(`should return the correct value`, async () => { await roleSystem.grantRole(ADMIN_ROLE, account); await expect(roleSystem.hasRole(ADMIN_ROLE, account)).to.eventually.equal(true); @@ -78,7 +78,7 @@ describe('RoleSystem', function () { await expect(roleSystem.hasRole(ADMIN_ROLE, account)).to.eventually.equal(false); }); - it(`should fail if the account is zero`, async () => { + it(`should fail if the account is the zero address`, async () => { await expect(roleSystem.hasRole(ADMIN_ROLE, ZeroAddress)) // .to.eventually.rejectedWith('RoleSystemZeroAddress'); }); @@ -87,7 +87,7 @@ describe('RoleSystem', function () { describe(`unique roles`, () => { describe(`method 'transferUniqueRole'`, () => { - it(`should transfer`, async () => { + it(`should transfer a unique role`, async () => { const tx1 = await roleSystem.transferUniqueRole(ADMIN_ROLE, account); await expect(tx1) @@ -101,7 +101,7 @@ describe('RoleSystem', function () { .withArgs(ADMIN_ROLE, ZeroAddress); }); - it(`should fail if a sender is not the main account`, async () => { + it(`should fail if the sender is not the main account`, async () => { const tx = roleSystem.connect(account).transferUniqueRole(ADMIN_ROLE, account); await expect(tx).to.eventually.rejectedWith('RoleSystemNotMain'); diff --git a/tests/SafeERC20BulkTransfer.ts b/tests/SafeERC20BulkTransfer.ts new file mode 100644 index 0000000..fcd4290 --- /dev/null +++ b/tests/SafeERC20BulkTransfer.ts @@ -0,0 +1,3 @@ +describe('SafeERC20BulkTransfer', function () { + // TODO +}); diff --git a/tests/constants/market.ts b/tests/constants/market.ts new file mode 100644 index 0000000..f441814 --- /dev/null +++ b/tests/constants/market.ts @@ -0,0 +1,34 @@ +export const MARKET_DOMAIN_NAME = 'Market'; +export const MARKET_DOMAIN_VERSION = '1'; + +export const ORDER_TYPE = { + Order: [ + { name: 'side', type: 'uint8' }, + { name: 'collection', type: 'address' }, + { name: 'currency', type: 'address' }, + { name: 'maker', type: 'address' }, + { name: 'tokenId', type: 'uint256' }, + { name: 'price', type: 'uint256' }, + { name: 'makerFee', type: 'uint256' }, + { name: 'startTime', type: 'uint256' }, + { name: 'endTime', type: 'uint256' }, + ], +}; + +export const EXECUTION_PERMIT_TYPE = { + ExecutionPermit: [ + { name: 'orderHash', type: 'bytes32' }, + { name: 'taker', type: 'address' }, + { name: 'takerFee', type: 'uint256' }, + { name: 'participants', type: 'address[]' }, + { name: 'rewards', type: 'uint256[]' }, + { name: 'deadline', type: 'uint256' }, + ], +}; + +export const ASK_SIDE = 0; +export const BID_SIDE = 1; + +export const PRICE = 10_000_000_000n; +export const ASK_SIDE_FEE = 100_000_000n; +export const BID_SIDE_FEE = 100_000_000n; diff --git a/tests/utils/deploy-protocol-test.ts b/tests/utils/deploy-all.ts similarity index 65% rename from tests/utils/deploy-protocol-test.ts rename to tests/utils/deploy-all.ts index 0151fee..ad07161 100644 --- a/tests/utils/deploy-protocol-test.ts +++ b/tests/utils/deploy-all.ts @@ -1,11 +1,11 @@ import { ethers } from 'hardhat'; -import { AddressLike, Signer } from 'ethers'; +import { AddressLike, Signer, ZeroAddress } from 'ethers'; import { UpgradedEvent, AdminChangedEvent, } from '../../typechain-types/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy'; import { OwnershipTransferredEvent } from '../../typechain-types/@openzeppelin/contracts/proxy/transparent/ProxyAdmin'; -import { DeployedEvent } from '../../typechain-types/contracts/tests/DeployerTest'; +import { DeployedEvent } from '../../typechain-types/contracts/tests/AllDeployer'; import { deploy } from '../../scripts/deploy'; import { MIN_AUCTION_DURATION } from '../constants/auction-house'; import { MIN_FEE, MIN_PRICE } from '../constants/min-price-and-fee'; @@ -14,26 +14,28 @@ import { REGULATED } from '../constants/art-token'; type Params = { signer: AddressLike; financier: AddressLike; + admin?: AddressLike; }; // prettier-ignore -export async function deployProtocolTest(params: Params, deployer?: Signer) { +export async function deployAll(params: Params, deployer?: Signer) { const { signer, financier, + admin = ZeroAddress, } = params; const { receipt } = await deploy( { - name: 'DeployerTest', - constructorArgs: [signer, financier, MIN_PRICE, MIN_FEE, MIN_AUCTION_DURATION, REGULATED], + name: 'AllDeployer', + constructorArgs: [signer, financier, admin, MIN_PRICE, MIN_FEE, MIN_AUCTION_DURATION, REGULATED], }, deployer, ); const Proxy = await ethers.getContractFactory('TransparentUpgradeableProxy'); const ProxyAdmin = await ethers.getContractFactory('ProxyAdmin'); - const Deployer = await ethers.getContractFactory('DeployerTest'); + const Deployer = await ethers.getContractFactory('AllDeployer'); const ArtToken_Proxy_UpgradedEvent = < UpgradedEvent.LogDescription @@ -59,21 +61,36 @@ export async function deployProtocolTest(params: Params, deployer?: Signer) { AdminChangedEvent.LogDescription >(Proxy.interface.parseLog(receipt.logs[5])); + const Market_Proxy_UpgradedEvent = < + UpgradedEvent.LogDescription + >(Proxy.interface.parseLog(receipt.logs[6])); + + const Market_ProxyAdmin_OwnershipTransferredEvent = < + OwnershipTransferredEvent.LogDescription + >(ProxyAdmin.interface.parseLog(receipt.logs[7])); + + const Market_Proxy_AdminChangedEvent = < + AdminChangedEvent.LogDescription + >(Proxy.interface.parseLog(receipt.logs[8])); + const Deployer_DeployedEvent = < DeployedEvent.LogDescription - >(Deployer.interface.parseLog(receipt.logs[6])); + >(Deployer.interface.parseLog(receipt.logs[9])); const artTokenAddr = Deployer_DeployedEvent.args.artToken; const artTokenImplAddr = ArtToken_Proxy_UpgradedEvent.args.implementation; const artTokenProxyAdminAddr = ArtToken_Proxy_AdminChangedEvent.args.newAdmin; - const artTokenProxyAdminOwner = ArtToken_ProxyAdmin_OwnershipTransferredEvent.args.newOwner; + const artTokenProxyAdminOwnerAddr = ArtToken_ProxyAdmin_OwnershipTransferredEvent.args.newOwner; const auctionHouseAddr = Deployer_DeployedEvent.args.auctionHouse; const auctionHouseImplAddr = AuctionHouse_Proxy_UpgradedEvent.args.implementation; const auctionHouseProxyAdminAddr = AuctionHouse_Proxy_AdminChangedEvent.args.newAdmin; - const auctionHouseProxyAdminOwner = AuctionHouse_ProxyAdmin_OwnershipTransferredEvent.args.newOwner; + const auctionHouseProxyAdminOwnerAddr = AuctionHouse_ProxyAdmin_OwnershipTransferredEvent.args.newOwner; - const marketMockAddr = Deployer_DeployedEvent.args.marketMock; + const marketAddr = Deployer_DeployedEvent.args.market; + const marketImplAddr = Market_Proxy_UpgradedEvent.args.implementation; + const marketProxyAdminAddr = Market_Proxy_AdminChangedEvent.args.newAdmin; + const marketProxyAdminOwnerAddr = Market_ProxyAdmin_OwnershipTransferredEvent.args.newOwner; const usdcAddr = Deployer_DeployedEvent.args.usdc; @@ -83,7 +100,8 @@ export async function deployProtocolTest(params: Params, deployer?: Signer) { const auctionHouse = await ethers.getContractAt('AuctionHouse', auctionHouseAddr); const auctionHouseProxyAdmin = await ethers.getContractAt('ProxyAdmin', auctionHouseProxyAdminAddr); - const marketMock = await ethers.getContractAt('MarketMock', marketMockAddr); + const market = await ethers.getContractAt('Market', marketAddr); + const marketProxyAdmin = await ethers.getContractAt('ProxyAdmin', marketProxyAdminAddr); const usdc = await ethers.getContractAt('USDC', usdcAddr); @@ -94,18 +112,22 @@ export async function deployProtocolTest(params: Params, deployer?: Signer) { artTokenAddr, artTokenProxyAdmin, artTokenProxyAdminAddr, - artTokenProxyAdminOwner, + artTokenProxyAdminOwnerAddr, artTokenImplAddr, auctionHouse, auctionHouseAddr, auctionHouseProxyAdmin, auctionHouseProxyAdminAddr, - auctionHouseProxyAdminOwner, + auctionHouseProxyAdminOwnerAddr, auctionHouseImplAddr, - marketMock, - marketMockAddr, + market, + marketAddr, + marketProxyAdmin, + marketProxyAdminAddr, + marketProxyAdminOwnerAddr, + marketImplAddr, usdcAddr, usdc, diff --git a/tests/utils/get-signers.ts b/tests/utils/get-signers.ts index c9e7745..e6c8464 100644 --- a/tests/utils/get-signers.ts +++ b/tests/utils/get-signers.ts @@ -2,8 +2,9 @@ import { ethers } from 'hardhat'; import { Signer } from 'ethers'; export async function getSigners(): Promise { - const [deployer, signer1, signer2, signer3, signer4, signer5, signer6, signer7, signer8] = - await ethers.getSigners(); + const [deployer, signer1, signer2, signer3, signer4, signer5, signer6, signer7, signer8] = < + Signer[] + >(await ethers.getSigners()); const [ signer1Addr, diff --git a/tests/utils/market-utils.ts b/tests/utils/market-utils.ts new file mode 100644 index 0000000..5039122 --- /dev/null +++ b/tests/utils/market-utils.ts @@ -0,0 +1,77 @@ +import { Signer, TypedDataDomain, TypedDataEncoder } from 'ethers'; +import { + MARKET_DOMAIN_NAME, + MARKET_DOMAIN_VERSION, + ORDER_TYPE, + EXECUTION_PERMIT_TYPE, +} from '../constants/market'; +import { Market } from '../../typechain-types'; +import { Order, ExecutionPermit } from '../../typechain-types/contracts/market/Market'; +import { getChainId } from './get-chain-id'; + +type ExecuteAskArgs = { + market: Market; + order: Order.TypeStruct; + permit: ExecutionPermit.TypeStruct; + orderSigner: Signer; + permitSigner: Signer; + sender: Signer; +}; + +type ExecuteBidArgs = { + market: Market; + order: Order.TypeStruct; + permit: ExecutionPermit.TypeStruct; + orderSigner: Signer; + permitSigner: Signer; + sender: Signer; +}; + +export class MarketUtils { + static async executeAsk(args: ExecuteAskArgs) { + const { market, order, permit, orderSigner, permitSigner, sender } = args; + + const domain = await this.buildDomain(market); + + const orderSignature = await orderSigner.signTypedData(domain, ORDER_TYPE, order); + + const permitSignature = await permitSigner.signTypedData( + domain, + EXECUTION_PERMIT_TYPE, + permit, + ); + + return market.connect(sender).executeAsk(order, permit, orderSignature, permitSignature); + } + + static async executeBid(args: ExecuteBidArgs) { + const { market, order, permit, orderSigner, permitSigner, sender } = args; + + const domain = await this.buildDomain(market); + + const orderSignature = await orderSigner.signTypedData(domain, ORDER_TYPE, order); + + const permitSignature = await permitSigner.signTypedData( + domain, + EXECUTION_PERMIT_TYPE, + permit, + ); + + return market.connect(sender).executeBid(order, permit, orderSignature, permitSignature); + } + + static async buildDomain(market: Market): Promise { + const [chainId, verifyingContract] = await Promise.all([getChainId(), market.getAddress()]); + + return { + name: MARKET_DOMAIN_NAME, + version: MARKET_DOMAIN_VERSION, + chainId, + verifyingContract, + }; + } + + static hashOrder(order: Order.TypeStruct) { + return TypedDataEncoder.from(ORDER_TYPE).hash(order); + } +} diff --git a/types/environment.ts b/types/environment.ts index 62d8418..fca16d3 100644 --- a/types/environment.ts +++ b/types/environment.ts @@ -1,10 +1,4 @@ -type UpgradeableContractConfig = { - proxy: string; - impl: string; - admin: string; -}; - -export type ConfigEnv = { +export type ChainConfig = { chainId: number; url: string; deployerPrivateKey: string; @@ -12,14 +6,7 @@ export type ConfigEnv = { main: string; }; -export type RecordConfigEnv = Record; - -export type CollectionData = { - name: string; - symbol: string; -}; - -export type ConfigCollection = CollectionData & { +export type CollectionConfig = CollectionData & { minPriceUsd: number; minFeeUsd: number; regulated: boolean; @@ -28,7 +15,34 @@ export type ConfigCollection = CollectionData & { auctionHouse: UpgradeableContractConfig; }; -export type RecordConfigCollection = CollectionData & - Record>; +export type MarketConfig = { + market: UpgradeableContractConfig; +}; -export type ChainConfig = ConfigEnv & ConfigCollection; +export type ProtocolConfig = Pick & { + collection: CollectionConfig; + market: MarketConfig; +}; + +export type ChainConfigTop = { + [chainName: string]: ChainConfig; +}; + +export type CollectionConfigTop = CollectionData & { + [chainName: string]: Omit; +}; + +export type MarketConfigTop = { + [chainName: string]: MarketConfig; +}; + +type UpgradeableContractConfig = { + proxy: string; + impl: string; + admin: string; +}; + +type CollectionData = { + name: string; + symbol: string; +};