diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..476c77c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "contracts"] + path = contracts + url = https://github.com/defiQUG/asle-contracts.git +[submodule "frontend"] + path = frontend + url = https://github.com/defiQUG/asle-frontend.git diff --git a/contracts b/contracts new file mode 160000 index 0000000..1a79ea1 --- /dev/null +++ b/contracts @@ -0,0 +1 @@ +Subproject commit 1a79ea16975cbd08b5be3f65705f09a6231e0c92 diff --git a/contracts/.gitignore b/contracts/.gitignore deleted file mode 100644 index 040953d..0000000 --- a/contracts/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -# Foundry -out/ -cache_forge/ -broadcast/ -lib/ - -# Dependencies -node_modules/ - -# Environment -.env -.env.local - -# IDE -.idea/ -.vscode/ diff --git a/contracts/.gitmodules b/contracts/.gitmodules deleted file mode 100644 index 690924b..0000000 --- a/contracts/.gitmodules +++ /dev/null @@ -1,6 +0,0 @@ -[submodule "lib/forge-std"] - path = lib/forge-std - url = https://github.com/foundry-rs/forge-std -[submodule "lib/openzeppelin-contracts"] - path = lib/openzeppelin-contracts - url = https://github.com/OpenZeppelin/openzeppelin-contracts diff --git a/contracts/FOUNDRY_SETUP.md b/contracts/FOUNDRY_SETUP.md deleted file mode 100644 index 4a1592f..0000000 --- a/contracts/FOUNDRY_SETUP.md +++ /dev/null @@ -1,114 +0,0 @@ -# Foundry Setup for ASLE Contracts - -## Migration from Hardhat to Foundry - -The ASLE project has been migrated from Hardhat to Foundry for smart contract development. - -## Installation - -1. Install Foundry: -```bash -curl -L https://foundry.paradigm.xyz | bash -source ~/.bashrc -foundryup -``` - -2. Verify installation: -```bash -forge --version -cast --version -anvil --version -``` - -## Project Structure - -``` -contracts/ -├── src/ # Source contracts -│ ├── core/ # Diamond and facets -│ ├── interfaces/ # Contract interfaces -│ └── libraries/ # Utility libraries -├── test/ # Test files (*.t.sol) -├── script/ # Deployment scripts (*.s.sol) -├── lib/ # Dependencies (git submodules) -└── foundry.toml # Foundry configuration -``` - -## Commands - -### Build -```bash -forge build -``` - -### Test -```bash -forge test # Run all tests -forge test -vvv # Verbose output -forge test --gas-report # With gas reporting -forge coverage # Coverage report -``` - -### Deploy -```bash -# Local deployment (Anvil) -anvil -forge script script/Deploy.s.sol --broadcast - -# Testnet/Mainnet -forge script script/Deploy.s.sol --rpc-url --broadcast --verify -``` - -### Format & Lint -```bash -forge fmt # Format code -forge fmt --check # Check formatting -``` - -## Dependencies - -Dependencies are managed via git submodules in `lib/`: - -- `forge-std` - Foundry standard library -- `openzeppelin-contracts` - OpenZeppelin contracts - -Install new dependencies: -```bash -forge install / -``` - -## Remappings - -Remappings are configured in `foundry.toml`: -- `@openzeppelin/` → `lib/openzeppelin-contracts/` -- `forge-std/` → `lib/forge-std/src/` - -## Differences from Hardhat - -1. **Test Files**: Use `.t.sol` extension (Solidity) instead of `.ts` (TypeScript) -2. **Scripts**: Use `.s.sol` extension (Solidity) instead of JavaScript -3. **Dependencies**: Git submodules instead of npm packages -4. **Configuration**: `foundry.toml` instead of `hardhat.config.ts` -5. **Build Output**: `out/` directory instead of `artifacts/` - -## Local Development - -Start local node: -```bash -anvil -``` - -Deploy to local node: -```bash -forge script script/Deploy.s.sol --rpc-url http://localhost:8545 --broadcast -``` - -## Environment Variables - -Set in `.env` file: -``` -PRIVATE_KEY=your_private_key -ETHERSCAN_API_KEY=your_etherscan_key -RPC_URL=your_rpc_url -``` - diff --git a/contracts/foundry.lock b/contracts/foundry.lock deleted file mode 100644 index a70488b..0000000 --- a/contracts/foundry.lock +++ /dev/null @@ -1,14 +0,0 @@ -{ - "lib/forge-std": { - "tag": { - "name": "v1.12.0", - "rev": "7117c90c8cf6c68e5acce4f09a6b24715cea4de6" - } - }, - "lib/openzeppelin-contracts": { - "tag": { - "name": "v5.5.0", - "rev": "fcbae5394ae8ad52d8e580a3477db99814b9d565" - } - } -} \ No newline at end of file diff --git a/contracts/foundry.toml b/contracts/foundry.toml deleted file mode 100644 index fc78694..0000000 --- a/contracts/foundry.toml +++ /dev/null @@ -1,39 +0,0 @@ -[profile.default] -src = "src" -out = "out" -libs = ["lib"] -test = "test" -script = "script" -broadcast = "broadcast" -cache_path = "cache_forge" - -# See more config options https://github.com/foundry-rs/foundry/tree/master/config - -# Solidity version -solc_version = "0.8.24" -optimizer = true -optimizer_runs = 200 -via_ir = false - -# Extra output -extra_output = ["abi", "evm.bytecode", "evm.deployedBytecode"] -extra_output_files = ["abi", "evm.bytecode", "evm.deployedBytecode"] - -# Fuzz testing -fuzz = { runs = 256 } - -# Remappings for dependencies -remappings = [ - "@openzeppelin/=lib/openzeppelin-contracts/", - "@chainlink/=lib/chainlink/", - "forge-std/=lib/forge-std/src/" -] - -# Network configurations -[rpc_endpoints] -localhost = "http://127.0.0.1:8545" -anvil = "http://127.0.0.1:8545" - -[etherscan] -etherscan = { key = "${ETHERSCAN_API_KEY}" } - diff --git a/contracts/package-lock.json b/contracts/package-lock.json deleted file mode 100644 index f9a210d..0000000 --- a/contracts/package-lock.json +++ /dev/null @@ -1,5092 +0,0 @@ -{ - "name": "contracts", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "contracts", - "version": "1.0.0", - "license": "ISC", - "dependencies": { - "@chainlink/contracts": "^1.5.0", - "@openzeppelin/contracts": "^5.4.0" - }, - "devDependencies": { - "@nomicfoundation/hardhat-toolbox": "^6.1.0", - "@nomicfoundation/hardhat-verify": "^2.1.3", - "hardhat": "^2.27.1" - } - }, - "node_modules/@arbitrum/nitro-contracts": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@arbitrum/nitro-contracts/-/nitro-contracts-3.0.0.tgz", - "integrity": "sha512-7VzNW9TxvrX9iONDDsi7AZlEUPa6z+cjBkB4Mxlnog9VQZAapRC3CdRXyUzHnBYmUhRzyNJdyxkWPw59QGcLmA==", - "hasInstallScript": true, - "license": "BUSL-1.1", - "dependencies": { - "@offchainlabs/upgrade-executor": "1.1.0-beta.0", - "@openzeppelin/contracts": "4.7.3", - "@openzeppelin/contracts-upgradeable": "4.7.3", - "patch-package": "^6.4.7", - "solady": "0.0.182" - } - }, - "node_modules/@arbitrum/nitro-contracts/node_modules/@openzeppelin/contracts": { - "version": "4.7.3", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.7.3.tgz", - "integrity": "sha512-dGRS0agJzu8ybo44pCIf3xBaPQN/65AIXNgK8+4gzKd5kbvlqyxryUYVLJv7fK98Seyd2hDZzVEHSWAh0Bt1Yw==", - "license": "MIT" - }, - "node_modules/@arbitrum/nitro-contracts/node_modules/@openzeppelin/contracts-upgradeable": { - "version": "4.7.3", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.7.3.tgz", - "integrity": "sha512-+wuegAMaLcZnLCJIvrVUDzA9z/Wp93f0Dla/4jJvIhijRrPabjQbZe6fWiECLaJyfn5ci9fqf9vTw3xpQOad2A==", - "license": "MIT" - }, - "node_modules/@babel/runtime": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz", - "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@chainlink/contracts": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@chainlink/contracts/-/contracts-1.5.0.tgz", - "integrity": "sha512-1fGJwjvivqAxvVOTqZUEXGR54CATtg0vjcXgSIk4Cfoad2nUhSG/qaWHXjLg1CkNTeOoteoxGQcpP/HiA5HsUA==", - "license": "BUSL-1.1", - "dependencies": { - "@arbitrum/nitro-contracts": "3.0.0", - "@changesets/cli": "^2.29.6", - "@changesets/get-github-info": "^0.6.0", - "@eslint/eslintrc": "^3.3.1", - "@eth-optimism/contracts": "0.6.0", - "@openzeppelin/contracts-4.7.3": "npm:@openzeppelin/contracts@4.7.3", - "@openzeppelin/contracts-4.8.3": "npm:@openzeppelin/contracts@4.8.3", - "@openzeppelin/contracts-4.9.6": "npm:@openzeppelin/contracts@4.9.6", - "@openzeppelin/contracts-5.0.2": "npm:@openzeppelin/contracts@5.0.2", - "@openzeppelin/contracts-5.1.0": "npm:@openzeppelin/contracts@5.1.0", - "@openzeppelin/contracts-upgradeable": "4.9.6", - "@scroll-tech/contracts": "2.0.0", - "@zksync/contracts": "github:matter-labs/era-contracts#446d391d34bdb48255d5f8fef8a8248925fc98b9", - "semver": "^7.7.2" - }, - "engines": { - "node": ">=22", - "pnpm": ">=10" - } - }, - "node_modules/@chainlink/contracts/node_modules/semver": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@changesets/apply-release-plan": { - "version": "7.0.14", - "resolved": "https://registry.npmjs.org/@changesets/apply-release-plan/-/apply-release-plan-7.0.14.tgz", - "integrity": "sha512-ddBvf9PHdy2YY0OUiEl3TV78mH9sckndJR14QAt87KLEbIov81XO0q0QAmvooBxXlqRRP8I9B7XOzZwQG7JkWA==", - "license": "MIT", - "dependencies": { - "@changesets/config": "^3.1.2", - "@changesets/get-version-range-type": "^0.4.0", - "@changesets/git": "^3.0.4", - "@changesets/should-skip-package": "^0.1.2", - "@changesets/types": "^6.1.0", - "@manypkg/get-packages": "^1.1.3", - "detect-indent": "^6.0.0", - "fs-extra": "^7.0.1", - "lodash.startcase": "^4.4.0", - "outdent": "^0.5.0", - "prettier": "^2.7.1", - "resolve-from": "^5.0.0", - "semver": "^7.5.3" - } - }, - "node_modules/@changesets/apply-release-plan/node_modules/semver": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@changesets/assemble-release-plan": { - "version": "6.0.9", - "resolved": "https://registry.npmjs.org/@changesets/assemble-release-plan/-/assemble-release-plan-6.0.9.tgz", - "integrity": "sha512-tPgeeqCHIwNo8sypKlS3gOPmsS3wP0zHt67JDuL20P4QcXiw/O4Hl7oXiuLnP9yg+rXLQ2sScdV1Kkzde61iSQ==", - "license": "MIT", - "dependencies": { - "@changesets/errors": "^0.2.0", - "@changesets/get-dependents-graph": "^2.1.3", - "@changesets/should-skip-package": "^0.1.2", - "@changesets/types": "^6.1.0", - "@manypkg/get-packages": "^1.1.3", - "semver": "^7.5.3" - } - }, - "node_modules/@changesets/assemble-release-plan/node_modules/semver": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@changesets/changelog-git": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@changesets/changelog-git/-/changelog-git-0.2.1.tgz", - "integrity": "sha512-x/xEleCFLH28c3bQeQIyeZf8lFXyDFVn1SgcBiR2Tw/r4IAWlk1fzxCEZ6NxQAjF2Nwtczoen3OA2qR+UawQ8Q==", - "license": "MIT", - "dependencies": { - "@changesets/types": "^6.1.0" - } - }, - "node_modules/@changesets/cli": { - "version": "2.29.8", - "resolved": "https://registry.npmjs.org/@changesets/cli/-/cli-2.29.8.tgz", - "integrity": "sha512-1weuGZpP63YWUYjay/E84qqwcnt5yJMM0tep10Up7Q5cS/DGe2IZ0Uj3HNMxGhCINZuR7aO9WBMdKnPit5ZDPA==", - "license": "MIT", - "dependencies": { - "@changesets/apply-release-plan": "^7.0.14", - "@changesets/assemble-release-plan": "^6.0.9", - "@changesets/changelog-git": "^0.2.1", - "@changesets/config": "^3.1.2", - "@changesets/errors": "^0.2.0", - "@changesets/get-dependents-graph": "^2.1.3", - "@changesets/get-release-plan": "^4.0.14", - "@changesets/git": "^3.0.4", - "@changesets/logger": "^0.1.1", - "@changesets/pre": "^2.0.2", - "@changesets/read": "^0.6.6", - "@changesets/should-skip-package": "^0.1.2", - "@changesets/types": "^6.1.0", - "@changesets/write": "^0.4.0", - "@inquirer/external-editor": "^1.0.2", - "@manypkg/get-packages": "^1.1.3", - "ansi-colors": "^4.1.3", - "ci-info": "^3.7.0", - "enquirer": "^2.4.1", - "fs-extra": "^7.0.1", - "mri": "^1.2.0", - "p-limit": "^2.2.0", - "package-manager-detector": "^0.2.0", - "picocolors": "^1.1.0", - "resolve-from": "^5.0.0", - "semver": "^7.5.3", - "spawndamnit": "^3.0.1", - "term-size": "^2.1.0" - }, - "bin": { - "changeset": "bin.js" - } - }, - "node_modules/@changesets/cli/node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@changesets/cli/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@changesets/cli/node_modules/semver": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@changesets/config": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@changesets/config/-/config-3.1.2.tgz", - "integrity": "sha512-CYiRhA4bWKemdYi/uwImjPxqWNpqGPNbEBdX1BdONALFIDK7MCUj6FPkzD+z9gJcvDFUQJn9aDVf4UG7OT6Kog==", - "license": "MIT", - "dependencies": { - "@changesets/errors": "^0.2.0", - "@changesets/get-dependents-graph": "^2.1.3", - "@changesets/logger": "^0.1.1", - "@changesets/types": "^6.1.0", - "@manypkg/get-packages": "^1.1.3", - "fs-extra": "^7.0.1", - "micromatch": "^4.0.8" - } - }, - "node_modules/@changesets/errors": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@changesets/errors/-/errors-0.2.0.tgz", - "integrity": "sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==", - "license": "MIT", - "dependencies": { - "extendable-error": "^0.1.5" - } - }, - "node_modules/@changesets/get-dependents-graph": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@changesets/get-dependents-graph/-/get-dependents-graph-2.1.3.tgz", - "integrity": "sha512-gphr+v0mv2I3Oxt19VdWRRUxq3sseyUpX9DaHpTUmLj92Y10AGy+XOtV+kbM6L/fDcpx7/ISDFK6T8A/P3lOdQ==", - "license": "MIT", - "dependencies": { - "@changesets/types": "^6.1.0", - "@manypkg/get-packages": "^1.1.3", - "picocolors": "^1.1.0", - "semver": "^7.5.3" - } - }, - "node_modules/@changesets/get-dependents-graph/node_modules/semver": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@changesets/get-github-info": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@changesets/get-github-info/-/get-github-info-0.6.0.tgz", - "integrity": "sha512-v/TSnFVXI8vzX9/w3DU2Ol+UlTZcu3m0kXTjTT4KlAdwSvwutcByYwyYn9hwerPWfPkT2JfpoX0KgvCEi8Q/SA==", - "license": "MIT", - "dependencies": { - "dataloader": "^1.4.0", - "node-fetch": "^2.5.0" - } - }, - "node_modules/@changesets/get-release-plan": { - "version": "4.0.14", - "resolved": "https://registry.npmjs.org/@changesets/get-release-plan/-/get-release-plan-4.0.14.tgz", - "integrity": "sha512-yjZMHpUHgl4Xl5gRlolVuxDkm4HgSJqT93Ri1Uz8kGrQb+5iJ8dkXJ20M2j/Y4iV5QzS2c5SeTxVSKX+2eMI0g==", - "license": "MIT", - "dependencies": { - "@changesets/assemble-release-plan": "^6.0.9", - "@changesets/config": "^3.1.2", - "@changesets/pre": "^2.0.2", - "@changesets/read": "^0.6.6", - "@changesets/types": "^6.1.0", - "@manypkg/get-packages": "^1.1.3" - } - }, - "node_modules/@changesets/get-version-range-type": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@changesets/get-version-range-type/-/get-version-range-type-0.4.0.tgz", - "integrity": "sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==", - "license": "MIT" - }, - "node_modules/@changesets/git": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@changesets/git/-/git-3.0.4.tgz", - "integrity": "sha512-BXANzRFkX+XcC1q/d27NKvlJ1yf7PSAgi8JG6dt8EfbHFHi4neau7mufcSca5zRhwOL8j9s6EqsxmT+s+/E6Sw==", - "license": "MIT", - "dependencies": { - "@changesets/errors": "^0.2.0", - "@manypkg/get-packages": "^1.1.3", - "is-subdir": "^1.1.1", - "micromatch": "^4.0.8", - "spawndamnit": "^3.0.1" - } - }, - "node_modules/@changesets/logger": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@changesets/logger/-/logger-0.1.1.tgz", - "integrity": "sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==", - "license": "MIT", - "dependencies": { - "picocolors": "^1.1.0" - } - }, - "node_modules/@changesets/parse": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@changesets/parse/-/parse-0.4.2.tgz", - "integrity": "sha512-Uo5MC5mfg4OM0jU3up66fmSn6/NE9INK+8/Vn/7sMVcdWg46zfbvvUSjD9EMonVqPi9fbrJH9SXHn48Tr1f2yA==", - "license": "MIT", - "dependencies": { - "@changesets/types": "^6.1.0", - "js-yaml": "^4.1.1" - } - }, - "node_modules/@changesets/pre": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@changesets/pre/-/pre-2.0.2.tgz", - "integrity": "sha512-HaL/gEyFVvkf9KFg6484wR9s0qjAXlZ8qWPDkTyKF6+zqjBe/I2mygg3MbpZ++hdi0ToqNUF8cjj7fBy0dg8Ug==", - "license": "MIT", - "dependencies": { - "@changesets/errors": "^0.2.0", - "@changesets/types": "^6.1.0", - "@manypkg/get-packages": "^1.1.3", - "fs-extra": "^7.0.1" - } - }, - "node_modules/@changesets/read": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/@changesets/read/-/read-0.6.6.tgz", - "integrity": "sha512-P5QaN9hJSQQKJShzzpBT13FzOSPyHbqdoIBUd2DJdgvnECCyO6LmAOWSV+O8se2TaZJVwSXjL+v9yhb+a9JeJg==", - "license": "MIT", - "dependencies": { - "@changesets/git": "^3.0.4", - "@changesets/logger": "^0.1.1", - "@changesets/parse": "^0.4.2", - "@changesets/types": "^6.1.0", - "fs-extra": "^7.0.1", - "p-filter": "^2.1.0", - "picocolors": "^1.1.0" - } - }, - "node_modules/@changesets/should-skip-package": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@changesets/should-skip-package/-/should-skip-package-0.1.2.tgz", - "integrity": "sha512-qAK/WrqWLNCP22UDdBTMPH5f41elVDlsNyat180A33dWxuUDyNpg6fPi/FyTZwRriVjg0L8gnjJn2F9XAoF0qw==", - "license": "MIT", - "dependencies": { - "@changesets/types": "^6.1.0", - "@manypkg/get-packages": "^1.1.3" - } - }, - "node_modules/@changesets/types": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@changesets/types/-/types-6.1.0.tgz", - "integrity": "sha512-rKQcJ+o1nKNgeoYRHKOS07tAMNd3YSN0uHaJOZYjBAgxfV7TUE7JE+z4BzZdQwb5hKaYbayKN5KrYV7ODb2rAA==", - "license": "MIT" - }, - "node_modules/@changesets/write": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@changesets/write/-/write-0.4.0.tgz", - "integrity": "sha512-CdTLvIOPiCNuH71pyDu3rA+Q0n65cmAbXnwWH84rKGiFumFzkmHNT8KHTMEchcxN+Kl8I54xGUhJ7l3E7X396Q==", - "license": "MIT", - "dependencies": { - "@changesets/types": "^6.1.0", - "fs-extra": "^7.0.1", - "human-id": "^4.1.1", - "prettier": "^2.7.1" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.3.tgz", - "integrity": "sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==", - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.1", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "license": "MIT" - }, - "node_modules/@eth-optimism/contracts": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@eth-optimism/contracts/-/contracts-0.6.0.tgz", - "integrity": "sha512-vQ04wfG9kMf1Fwy3FEMqH2QZbgS0gldKhcBeBUPfO8zu68L61VI97UDXmsMQXzTsEAxK8HnokW3/gosl4/NW3w==", - "license": "MIT", - "dependencies": { - "@eth-optimism/core-utils": "0.12.0", - "@ethersproject/abstract-provider": "^5.7.0", - "@ethersproject/abstract-signer": "^5.7.0" - }, - "peerDependencies": { - "ethers": "^5" - } - }, - "node_modules/@eth-optimism/core-utils": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@eth-optimism/core-utils/-/core-utils-0.12.0.tgz", - "integrity": "sha512-qW+7LZYCz7i8dRa7SRlUKIo1VBU8lvN0HeXCxJR+z+xtMzMQpPds20XJNCMclszxYQHkXY00fOT6GvFw9ZL6nw==", - "license": "MIT", - "dependencies": { - "@ethersproject/abi": "^5.7.0", - "@ethersproject/abstract-provider": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/contracts": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/providers": "^5.7.0", - "@ethersproject/rlp": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "@ethersproject/web": "^5.7.0", - "bufio": "^1.0.7", - "chai": "^4.3.4" - } - }, - "node_modules/@ethersproject/abi": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.8.0.tgz", - "integrity": "sha512-b9YS/43ObplgyV6SlyQsG53/vkSal0MNA1fskSC4mbnCMi8R+NkcH8K9FPYNESf6jUefBUniE4SOKms0E/KK1Q==", - "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", - "dependencies": { - "@ethersproject/address": "^5.8.0", - "@ethersproject/bignumber": "^5.8.0", - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/constants": "^5.8.0", - "@ethersproject/hash": "^5.8.0", - "@ethersproject/keccak256": "^5.8.0", - "@ethersproject/logger": "^5.8.0", - "@ethersproject/properties": "^5.8.0", - "@ethersproject/strings": "^5.8.0" - } - }, - "node_modules/@ethersproject/abstract-provider": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.8.0.tgz", - "integrity": "sha512-wC9SFcmh4UK0oKuLJQItoQdzS/qZ51EJegK6EmAWlh+OptpQ/npECOR3QqECd8iGHC0RJb4WKbVdSfif4ammrg==", - "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", - "dependencies": { - "@ethersproject/bignumber": "^5.8.0", - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/logger": "^5.8.0", - "@ethersproject/networks": "^5.8.0", - "@ethersproject/properties": "^5.8.0", - "@ethersproject/transactions": "^5.8.0", - "@ethersproject/web": "^5.8.0" - } - }, - "node_modules/@ethersproject/abstract-signer": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.8.0.tgz", - "integrity": "sha512-N0XhZTswXcmIZQdYtUnd79VJzvEwXQw6PK0dTl9VoYrEBxxCPXqS0Eod7q5TNKRxe1/5WUMuR0u0nqTF/avdCA==", - "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", - "dependencies": { - "@ethersproject/abstract-provider": "^5.8.0", - "@ethersproject/bignumber": "^5.8.0", - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/logger": "^5.8.0", - "@ethersproject/properties": "^5.8.0" - } - }, - "node_modules/@ethersproject/address": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.8.0.tgz", - "integrity": "sha512-GhH/abcC46LJwshoN+uBNoKVFPxUuZm6dA257z0vZkKmU1+t8xTn8oK7B9qrj8W2rFRMch4gbJl6PmVxjxBEBA==", - "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", - "dependencies": { - "@ethersproject/bignumber": "^5.8.0", - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/keccak256": "^5.8.0", - "@ethersproject/logger": "^5.8.0", - "@ethersproject/rlp": "^5.8.0" - } - }, - "node_modules/@ethersproject/base64": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.8.0.tgz", - "integrity": "sha512-lN0oIwfkYj9LbPx4xEkie6rAMJtySbpOAFXSDVQaBnAzYfB4X2Qr+FXJGxMoc3Bxp2Sm8OwvzMrywxyw0gLjIQ==", - "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", - "dependencies": { - "@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", - "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", - "integrity": "sha512-ZyaT24bHaSeJon2tGPKIiHszWjD/54Sz8t57Toch475lCLljC6MgPmxk7Gtzz+ddNN5LuHea9qhAe0x3D+uYPA==", - "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", - "dependencies": { - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/logger": "^5.8.0", - "bn.js": "^5.2.1" - } - }, - "node_modules/@ethersproject/bytes": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.8.0.tgz", - "integrity": "sha512-vTkeohgJVCPVHu5c25XWaWQOZ4v+DkGoC42/TS2ond+PARCxTJvgTFUNDZovyQ/uAQ4EcpqqowKydcdmRKjg7A==", - "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", - "dependencies": { - "@ethersproject/logger": "^5.8.0" - } - }, - "node_modules/@ethersproject/constants": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.8.0.tgz", - "integrity": "sha512-wigX4lrf5Vu+axVTIvNsuL6YrV4O5AXl5ubcURKMEME5TnWBouUh0CDTWxZ2GpnRn1kcCgE7l8O5+VbV9QTTcg==", - "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", - "dependencies": { - "@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", - "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", - "integrity": "sha512-ac/lBcTbEWW/VGJij0CNSw/wPcw9bSRgCB0AIBz8CvED/jfvDoV9hsIIiWfvWmFEi8RcXtlNwp2jv6ozWOsooA==", - "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", - "dependencies": { - "@ethersproject/abstract-signer": "^5.8.0", - "@ethersproject/address": "^5.8.0", - "@ethersproject/base64": "^5.8.0", - "@ethersproject/bignumber": "^5.8.0", - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/keccak256": "^5.8.0", - "@ethersproject/logger": "^5.8.0", - "@ethersproject/properties": "^5.8.0", - "@ethersproject/strings": "^5.8.0" - } - }, - "node_modules/@ethersproject/keccak256": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.8.0.tgz", - "integrity": "sha512-A1pkKLZSz8pDaQ1ftutZoaN46I6+jvuqugx5KYNeQOPqq+JZ0Txm7dlWesCHB5cndJSu5vP2VKptKf7cksERng==", - "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", - "dependencies": { - "@ethersproject/bytes": "^5.8.0", - "js-sha3": "0.8.0" - } - }, - "node_modules/@ethersproject/logger": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.8.0.tgz", - "integrity": "sha512-Qe6knGmY+zPPWTC+wQrpitodgBfH7XoceCGL5bJVejmH+yCS3R8jJm8iiWuvWbG76RUmyEG53oqv6GMVWqunjA==", - "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/@ethersproject/networks": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.8.0.tgz", - "integrity": "sha512-egPJh3aPVAzbHwq8DD7Po53J4OUSsA1MjQp8Vf/OZPav5rlmWUaFLiq8cvQiGK0Z5K6LYzm29+VA/p4RL1FzNg==", - "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", - "dependencies": { - "@ethersproject/logger": "^5.8.0" - } - }, - "node_modules/@ethersproject/properties": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.8.0.tgz", - "integrity": "sha512-PYuiEoQ+FMaZZNGrStmN7+lWjlsoufGIHdww7454FIaGdbe/p5rnaCXTr5MtBYl3NkeoVhHZuyzChPeGeKIpQw==", - "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", - "dependencies": { - "@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", - "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/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", - "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", - "integrity": "sha512-LqZgAznqDbiEunaUvykH2JAoXTT9NV0Atqk8rQN9nx9SEgThA/WMx5DnW8a9FOufo//6FZOCHZ+XiClzgbqV9Q==", - "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", - "dependencies": { - "@ethersproject/bytes": "^5.8.0", - "@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", - "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", - "integrity": "sha512-LrPW2ZxoigFi6U6aVkFN/fa9Yx/+4AtIUe4/HACTvKJdhm0eeb107EVCIQcrLZkxaSIgc/eCrX8Q1GtbH+9n3w==", - "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", - "dependencies": { - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/logger": "^5.8.0", - "@ethersproject/properties": "^5.8.0", - "bn.js": "^5.2.1", - "elliptic": "6.6.1", - "hash.js": "1.1.7" - } - }, - "node_modules/@ethersproject/strings": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.8.0.tgz", - "integrity": "sha512-qWEAk0MAvl0LszjdfnZ2uC8xbR2wdv4cDabyHiBh3Cldq/T8dPH3V4BbBsAYJUeonwD+8afVXld274Ls+Y1xXg==", - "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", - "dependencies": { - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/constants": "^5.8.0", - "@ethersproject/logger": "^5.8.0" - } - }, - "node_modules/@ethersproject/transactions": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.8.0.tgz", - "integrity": "sha512-UglxSDjByHG0TuU17bDfCemZ3AnKO2vYrL5/2n2oXvKzvb7Cz+W9gOWXKARjp2URVwcWlQlPOEQyAviKwT4AHg==", - "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", - "dependencies": { - "@ethersproject/address": "^5.8.0", - "@ethersproject/bignumber": "^5.8.0", - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/constants": "^5.8.0", - "@ethersproject/keccak256": "^5.8.0", - "@ethersproject/logger": "^5.8.0", - "@ethersproject/properties": "^5.8.0", - "@ethersproject/rlp": "^5.8.0", - "@ethersproject/signing-key": "^5.8.0" - } - }, - "node_modules/@ethersproject/web": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.8.0.tgz", - "integrity": "sha512-j7+Ksi/9KfGviws6Qtf9Q7KCqRhpwrYKQPs+JBA/rKVFF/yaWLHJEH3zfVP2plVu+eys0d2DlFmhoQJayFewcw==", - "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", - "dependencies": { - "@ethersproject/base64": "^5.8.0", - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/logger": "^5.8.0", - "@ethersproject/properties": "^5.8.0", - "@ethersproject/strings": "^5.8.0" - } - }, - "node_modules/@fastify/busboy": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", - "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14" - } - }, - "node_modules/@inquirer/external-editor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.3.tgz", - "integrity": "sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==", - "license": "MIT", - "dependencies": { - "chardet": "^2.1.1", - "iconv-lite": "^0.7.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@types/node": ">=18" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - } - } - }, - "node_modules/@inquirer/external-editor/node_modules/iconv-lite": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz", - "integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/@manypkg/find-root": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@manypkg/find-root/-/find-root-1.1.0.tgz", - "integrity": "sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.5.5", - "@types/node": "^12.7.1", - "find-up": "^4.1.0", - "fs-extra": "^8.1.0" - } - }, - "node_modules/@manypkg/find-root/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@manypkg/find-root/node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/@manypkg/find-root/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@manypkg/find-root/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@manypkg/find-root/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@manypkg/get-packages": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@manypkg/get-packages/-/get-packages-1.1.3.tgz", - "integrity": "sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.5.5", - "@changesets/types": "^4.0.1", - "@manypkg/find-root": "^1.1.0", - "fs-extra": "^8.1.0", - "globby": "^11.0.0", - "read-yaml-file": "^1.1.0" - } - }, - "node_modules/@manypkg/get-packages/node_modules/@changesets/types": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@changesets/types/-/types-4.1.0.tgz", - "integrity": "sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==", - "license": "MIT" - }, - "node_modules/@manypkg/get-packages/node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/@noble/secp256k1": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz", - "integrity": "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT" - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nomicfoundation/edr": { - "version": "0.12.0-next.16", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr/-/edr-0.12.0-next.16.tgz", - "integrity": "sha512-bBL/nHmQwL1WCveALwg01VhJcpVVklJyunG1d/bhJbHgbjzAn6kohVJc7A6gFZegw+Rx38vdxpBkeCDjAEprzw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nomicfoundation/edr-darwin-arm64": "0.12.0-next.16", - "@nomicfoundation/edr-darwin-x64": "0.12.0-next.16", - "@nomicfoundation/edr-linux-arm64-gnu": "0.12.0-next.16", - "@nomicfoundation/edr-linux-arm64-musl": "0.12.0-next.16", - "@nomicfoundation/edr-linux-x64-gnu": "0.12.0-next.16", - "@nomicfoundation/edr-linux-x64-musl": "0.12.0-next.16", - "@nomicfoundation/edr-win32-x64-msvc": "0.12.0-next.16" - }, - "engines": { - "node": ">= 20" - } - }, - "node_modules/@nomicfoundation/edr-darwin-arm64": { - "version": "0.12.0-next.16", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.12.0-next.16.tgz", - "integrity": "sha512-no/8BPVBzVxDGGbDba0zsAxQmVNIq6SLjKzzhCxVKt4tatArXa6+24mr4jXJEmhVBvTNpQsNBO+MMpuEDVaTzQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 20" - } - }, - "node_modules/@nomicfoundation/edr-darwin-x64": { - "version": "0.12.0-next.16", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.12.0-next.16.tgz", - "integrity": "sha512-tf36YbcC6po3XYRbi+v0gjwzqg1MvyRqVUujNMXPHgjNWATXNRNOLyjwt2qDn+RD15qtzk70SHVnz9n9mPWzwg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 20" - } - }, - "node_modules/@nomicfoundation/edr-linux-arm64-gnu": { - "version": "0.12.0-next.16", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.12.0-next.16.tgz", - "integrity": "sha512-Kr6t9icKSaKtPVbb0TjUcbn3XHqXOGIn+KjKKSSpm6542OkL0HyOi06amh6/8CNke9Gf6Lwion8UJ0aGQhnFwA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 20" - } - }, - "node_modules/@nomicfoundation/edr-linux-arm64-musl": { - "version": "0.12.0-next.16", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.12.0-next.16.tgz", - "integrity": "sha512-HaStgfxctSg5PYF+6ooDICL1O59KrgM4XEUsIqoRrjrQax9HnMBXcB8eAj+0O52FWiO9FlchBni2dzh4RjQR2g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 20" - } - }, - "node_modules/@nomicfoundation/edr-linux-x64-gnu": { - "version": "0.12.0-next.16", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.12.0-next.16.tgz", - "integrity": "sha512-8JPTxEZkwOPTgnN4uTWut9ze9R8rp7+T4IfmsKK9i+lDtdbJIxkrFY275YHG2BEYLd7Y5jTa/I4nC74ZpTAvpA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 20" - } - }, - "node_modules/@nomicfoundation/edr-linux-x64-musl": { - "version": "0.12.0-next.16", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.12.0-next.16.tgz", - "integrity": "sha512-KugTrq3iHukbG64DuCYg8uPgiBtrrtX4oZSLba5sjocp0Ul6WWI1FeP1Qule+vClUrHSpJ+wR1G6SE7G0lyS/Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 20" - } - }, - "node_modules/@nomicfoundation/edr-win32-x64-msvc": { - "version": "0.12.0-next.16", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.12.0-next.16.tgz", - "integrity": "sha512-Idy0ZjurxElfSmepUKXh6QdptLbW5vUNeIaydvqNogWoTbkJIM6miqZd9lXUy1TYxY7G4Rx5O50c52xc4pFwXQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 20" - } - }, - "node_modules/@nomicfoundation/hardhat-toolbox": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-6.1.0.tgz", - "integrity": "sha512-iAIl6pIK3F4R3JXeq+b6tiShXUrp1sQRiPfqoCMUE7QLUzoFifzGV97IDRL6e73pWsMKpUQBsHBvTCsqn+ZdpA==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "@nomicfoundation/hardhat-chai-matchers": "^2.1.0", - "@nomicfoundation/hardhat-ethers": "^3.1.0", - "@nomicfoundation/hardhat-ignition-ethers": "^0.15.14", - "@nomicfoundation/hardhat-network-helpers": "^1.1.0", - "@nomicfoundation/hardhat-verify": "^2.1.0", - "@typechain/ethers-v6": "^0.5.0", - "@typechain/hardhat": "^9.0.0", - "@types/chai": "^4.2.0", - "@types/mocha": ">=9.1.0", - "@types/node": ">=20.0.0", - "chai": "^4.2.0", - "ethers": "^6.14.0", - "hardhat": "^2.26.0", - "hardhat-gas-reporter": "^2.3.0", - "solidity-coverage": "^0.8.1", - "ts-node": ">=8.0.0", - "typechain": "^8.3.0", - "typescript": ">=4.5.0" - } - }, - "node_modules/@nomicfoundation/hardhat-verify": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.1.3.tgz", - "integrity": "sha512-danbGjPp2WBhLkJdQy9/ARM3WQIK+7vwzE0urNem1qZJjh9f54Kf5f1xuQv8DvqewUAkuPxVt/7q4Grz5WjqSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@ethersproject/abi": "^5.1.2", - "@ethersproject/address": "^5.0.2", - "cbor": "^8.1.0", - "debug": "^4.1.1", - "lodash.clonedeep": "^4.5.0", - "picocolors": "^1.1.0", - "semver": "^6.3.0", - "table": "^6.8.0", - "undici": "^5.14.0" - }, - "peerDependencies": { - "hardhat": "^2.26.0" - } - }, - "node_modules/@nomicfoundation/solidity-analyzer": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer/-/solidity-analyzer-0.1.2.tgz", - "integrity": "sha512-q4n32/FNKIhQ3zQGGw5CvPF6GTvDCpYwIf7bEY/dZTZbgfDsHyjJwURxUJf3VQuuJj+fDIFl4+KkBVbw4Ef6jA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 12" - }, - "optionalDependencies": { - "@nomicfoundation/solidity-analyzer-darwin-arm64": "0.1.2", - "@nomicfoundation/solidity-analyzer-darwin-x64": "0.1.2", - "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": "0.1.2", - "@nomicfoundation/solidity-analyzer-linux-arm64-musl": "0.1.2", - "@nomicfoundation/solidity-analyzer-linux-x64-gnu": "0.1.2", - "@nomicfoundation/solidity-analyzer-linux-x64-musl": "0.1.2", - "@nomicfoundation/solidity-analyzer-win32-x64-msvc": "0.1.2" - } - }, - "node_modules/@nomicfoundation/solidity-analyzer-darwin-arm64": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.2.tgz", - "integrity": "sha512-JaqcWPDZENCvm++lFFGjrDd8mxtf+CtLd2MiXvMNTBD33dContTZ9TWETwNFwg7JTJT5Q9HEecH7FA+HTSsIUw==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">= 12" - } - }, - "node_modules/@nomicfoundation/solidity-analyzer-darwin-x64": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-darwin-x64/-/solidity-analyzer-darwin-x64-0.1.2.tgz", - "integrity": "sha512-fZNmVztrSXC03e9RONBT+CiksSeYcxI1wlzqyr0L7hsQlK1fzV+f04g2JtQ1c/Fe74ZwdV6aQBdd6Uwl1052sw==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">= 12" - } - }, - "node_modules/@nomicfoundation/solidity-analyzer-linux-arm64-gnu": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-arm64-gnu/-/solidity-analyzer-linux-arm64-gnu-0.1.2.tgz", - "integrity": "sha512-3d54oc+9ZVBuB6nbp8wHylk4xh0N0Gc+bk+/uJae+rUgbOBwQSfuGIbAZt1wBXs5REkSmynEGcqx6DutoK0tPA==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">= 12" - } - }, - "node_modules/@nomicfoundation/solidity-analyzer-linux-arm64-musl": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-arm64-musl/-/solidity-analyzer-linux-arm64-musl-0.1.2.tgz", - "integrity": "sha512-iDJfR2qf55vgsg7BtJa7iPiFAsYf2d0Tv/0B+vhtnI16+wfQeTbP7teookbGvAo0eJo7aLLm0xfS/GTkvHIucA==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">= 12" - } - }, - "node_modules/@nomicfoundation/solidity-analyzer-linux-x64-gnu": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-x64-gnu/-/solidity-analyzer-linux-x64-gnu-0.1.2.tgz", - "integrity": "sha512-9dlHMAt5/2cpWyuJ9fQNOUXFB/vgSFORg1jpjX1Mh9hJ/MfZXlDdHQ+DpFCs32Zk5pxRBb07yGvSHk9/fezL+g==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">= 12" - } - }, - "node_modules/@nomicfoundation/solidity-analyzer-linux-x64-musl": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-x64-musl/-/solidity-analyzer-linux-x64-musl-0.1.2.tgz", - "integrity": "sha512-GzzVeeJob3lfrSlDKQw2bRJ8rBf6mEYaWY+gW0JnTDHINA0s2gPR4km5RLIj1xeZZOYz4zRw+AEeYgLRqB2NXg==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">= 12" - } - }, - "node_modules/@nomicfoundation/solidity-analyzer-win32-x64-msvc": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-win32-x64-msvc/-/solidity-analyzer-win32-x64-msvc-0.1.2.tgz", - "integrity": "sha512-Fdjli4DCcFHb4Zgsz0uEJXZ2K7VEO+w5KVv7HmT7WO10iODdU9csC2az4jrhEsRtiR9Gfd74FlG0NYlw1BMdyA==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">= 12" - } - }, - "node_modules/@offchainlabs/upgrade-executor": { - "version": "1.1.0-beta.0", - "resolved": "https://registry.npmjs.org/@offchainlabs/upgrade-executor/-/upgrade-executor-1.1.0-beta.0.tgz", - "integrity": "sha512-mpn6PHjH/KDDjNX0pXHEKdyv8m6DVGQiI2nGzQn0JbM1nOSHJpWx6fvfjtH7YxHJ6zBZTcsKkqGkFKDtCfoSLw==", - "license": "Apache 2.0", - "dependencies": { - "@openzeppelin/contracts": "4.7.3", - "@openzeppelin/contracts-upgradeable": "4.7.3" - } - }, - "node_modules/@offchainlabs/upgrade-executor/node_modules/@openzeppelin/contracts": { - "version": "4.7.3", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.7.3.tgz", - "integrity": "sha512-dGRS0agJzu8ybo44pCIf3xBaPQN/65AIXNgK8+4gzKd5kbvlqyxryUYVLJv7fK98Seyd2hDZzVEHSWAh0Bt1Yw==", - "license": "MIT" - }, - "node_modules/@offchainlabs/upgrade-executor/node_modules/@openzeppelin/contracts-upgradeable": { - "version": "4.7.3", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.7.3.tgz", - "integrity": "sha512-+wuegAMaLcZnLCJIvrVUDzA9z/Wp93f0Dla/4jJvIhijRrPabjQbZe6fWiECLaJyfn5ci9fqf9vTw3xpQOad2A==", - "license": "MIT" - }, - "node_modules/@openzeppelin/contracts": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.4.0.tgz", - "integrity": "sha512-eCYgWnLg6WO+X52I16TZt8uEjbtdkgLC0SUX/xnAksjjrQI4Xfn4iBRoI5j55dmlOhDv1Y7BoR3cU7e3WWhC6A==", - "license": "MIT" - }, - "node_modules/@openzeppelin/contracts-4.7.3": { - "name": "@openzeppelin/contracts", - "version": "4.7.3", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.7.3.tgz", - "integrity": "sha512-dGRS0agJzu8ybo44pCIf3xBaPQN/65AIXNgK8+4gzKd5kbvlqyxryUYVLJv7fK98Seyd2hDZzVEHSWAh0Bt1Yw==", - "license": "MIT" - }, - "node_modules/@openzeppelin/contracts-4.8.3": { - "name": "@openzeppelin/contracts", - "version": "4.8.3", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.8.3.tgz", - "integrity": "sha512-bQHV8R9Me8IaJoJ2vPG4rXcL7seB7YVuskr4f+f5RyOStSZetwzkWtoqDMl5erkBJy0lDRUnIR2WIkPiC0GJlg==", - "license": "MIT" - }, - "node_modules/@openzeppelin/contracts-4.9.6": { - "name": "@openzeppelin/contracts", - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.9.6.tgz", - "integrity": "sha512-xSmezSupL+y9VkHZJGDoCBpmnB2ogM13ccaYDWqJTfS3dbuHkgjuwDFUmaFauBCboQMGB/S5UqUl2y54X99BmA==", - "license": "MIT" - }, - "node_modules/@openzeppelin/contracts-5.0.2": { - "name": "@openzeppelin/contracts", - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.0.2.tgz", - "integrity": "sha512-ytPc6eLGcHHnapAZ9S+5qsdomhjo6QBHTDRRBFfTxXIpsicMhVPouPgmUPebZZZGX7vt9USA+Z+0M0dSVtSUEA==", - "license": "MIT" - }, - "node_modules/@openzeppelin/contracts-5.1.0": { - "name": "@openzeppelin/contracts", - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.1.0.tgz", - "integrity": "sha512-p1ULhl7BXzjjbha5aqst+QMLY+4/LCWADXOCsmLHRM77AqiPjnd9vvUN9sosUfhL9JGKpZ0TjEGxgvnizmWGSA==", - "license": "MIT" - }, - "node_modules/@openzeppelin/contracts-upgradeable": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.9.6.tgz", - "integrity": "sha512-m4iHazOsOCv1DgM7eD7GupTJ+NFVujRZt1wzddDPSVGpWdKq1SKkla5htKG7+IS4d2XOCtzkUNwRZ7Vq5aEUMA==", - "license": "MIT" - }, - "node_modules/@scroll-tech/contracts": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@scroll-tech/contracts/-/contracts-2.0.0.tgz", - "integrity": "sha512-O8sVaA/bVKH/mp+bBfUjZ/vYr5mdBExCpKRLre4r9TbXTtiaY9Uo5xU8dcG3weLxyK0BZqDTP2aCNp4Q0f7SeA==", - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@sentry/core": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-5.30.0.tgz", - "integrity": "sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sentry/hub": "5.30.0", - "@sentry/minimal": "5.30.0", - "@sentry/types": "5.30.0", - "@sentry/utils": "5.30.0", - "tslib": "^1.9.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@sentry/core/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true, - "license": "0BSD" - }, - "node_modules/@sentry/hub": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-5.30.0.tgz", - "integrity": "sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sentry/types": "5.30.0", - "@sentry/utils": "5.30.0", - "tslib": "^1.9.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@sentry/hub/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true, - "license": "0BSD" - }, - "node_modules/@sentry/minimal": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-5.30.0.tgz", - "integrity": "sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sentry/hub": "5.30.0", - "@sentry/types": "5.30.0", - "tslib": "^1.9.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@sentry/minimal/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true, - "license": "0BSD" - }, - "node_modules/@sentry/node": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/node/-/node-5.30.0.tgz", - "integrity": "sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sentry/core": "5.30.0", - "@sentry/hub": "5.30.0", - "@sentry/tracing": "5.30.0", - "@sentry/types": "5.30.0", - "@sentry/utils": "5.30.0", - "cookie": "^0.4.1", - "https-proxy-agent": "^5.0.0", - "lru_map": "^0.3.3", - "tslib": "^1.9.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@sentry/node/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true, - "license": "0BSD" - }, - "node_modules/@sentry/tracing": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-5.30.0.tgz", - "integrity": "sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sentry/hub": "5.30.0", - "@sentry/minimal": "5.30.0", - "@sentry/types": "5.30.0", - "@sentry/utils": "5.30.0", - "tslib": "^1.9.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@sentry/tracing/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true, - "license": "0BSD" - }, - "node_modules/@sentry/types": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-5.30.0.tgz", - "integrity": "sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=6" - } - }, - "node_modules/@sentry/utils": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-5.30.0.tgz", - "integrity": "sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sentry/types": "5.30.0", - "tslib": "^1.9.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@sentry/utils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true, - "license": "0BSD" - }, - "node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "license": "MIT" - }, - "node_modules/@yarnpkg/lockfile": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", - "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", - "license": "BSD-2-Clause" - }, - "node_modules/@zksync/contracts": { - "name": "era-contracts", - "version": "0.1.0", - "resolved": "git+ssh://git@github.com/matter-labs/era-contracts.git#446d391d34bdb48255d5f8fef8a8248925fc98b9", - "integrity": "sha512-KhgPVqd/MgV/ICUEsQf1uyL321GNPqsyHSAPMCaa9vW94fbuQK6RwMWoyQOPlZP17cQD8tzLNCSXqz73652kow==", - "workspaces": { - "packages": [ - "l1-contracts", - "l2-contracts", - "system-contracts", - "gas-bound-caller" - ], - "nohoist": [ - "**/@openzeppelin/**" - ] - } - }, - "node_modules/acorn": { - "version": "8.15.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", - "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/adm-zip": { - "version": "0.4.16", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", - "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.3.0" - } - }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-align": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", - "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.1.0" - } - }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "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", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "license": "Python-2.0" - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "license": "ISC", - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "license": "MIT" - }, - "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" - }, - "node_modules/better-path-resolve": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/better-path-resolve/-/better-path-resolve-1.0.0.tgz", - "integrity": "sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==", - "license": "MIT", - "dependencies": { - "is-windows": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/bn.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz", - "integrity": "sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==", - "license": "MIT" - }, - "node_modules/boxen": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", - "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-align": "^3.0.0", - "camelcase": "^6.2.0", - "chalk": "^4.1.0", - "cli-boxes": "^2.2.1", - "string-width": "^4.2.2", - "type-fest": "^0.20.2", - "widest-line": "^3.1.0", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/boxen/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/boxen/node_modules/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==", - "dev": true, - "license": "MIT", - "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/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", - "license": "MIT" - }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true, - "license": "ISC" - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/bufio": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/bufio/-/bufio-1.2.3.tgz", - "integrity": "sha512-5Tt66bRzYUSlVZatc0E92uDenreJ+DpTBmSAUwL4VSxJn3e6cUyYwx+PoqML0GRZatgA/VX8ybhxItF8InZgqA==", - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cbor": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz", - "integrity": "sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==", - "dev": true, - "license": "MIT", - "dependencies": { - "nofilter": "^3.1.0" - }, - "engines": { - "node": ">=12.19" - } - }, - "node_modules/chai": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", - "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", - "license": "MIT", - "dependencies": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.3", - "deep-eql": "^4.1.3", - "get-func-name": "^2.0.2", - "loupe": "^2.3.6", - "pathval": "^1.1.1", - "type-detect": "^4.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "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", - "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/chardet": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.1.tgz", - "integrity": "sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==", - "license": "MIT" - }, - "node_modules/check-error": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", - "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", - "license": "MIT", - "dependencies": { - "get-func-name": "^2.0.2" - }, - "engines": { - "node": "*" - } - }, - "node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "license": "MIT" - }, - "node_modules/clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/cli-boxes": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", - "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/cliui/node_modules/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==", - "dev": true, - "license": "MIT", - "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/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", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "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" - }, - "node_modules/command-exists": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", - "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", - "dev": true, - "license": "MIT" - }, - "node_modules/commander": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", - "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 12" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "license": "MIT" - }, - "node_modules/cookie": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", - "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cross-spawn": { - "version": "6.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz", - "integrity": "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==", - "license": "MIT", - "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "engines": { - "node": ">=4.8" - } - }, - "node_modules/cross-spawn/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/dataloader": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-1.4.0.tgz", - "integrity": "sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==", - "license": "BSD-3-Clause" - }, - "node_modules/debug": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/deep-eql": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", - "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", - "license": "MIT", - "dependencies": { - "type-detect": "^4.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/detect-indent": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", - "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/elliptic": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", - "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", - "license": "MIT", - "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/elliptic/node_modules/bn.js": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", - "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", - "license": "MIT" - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/enquirer": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", - "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", - "license": "MIT", - "dependencies": { - "ansi-colors": "^4.1.1", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", - "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.15.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.2.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/extendable-error": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/extendable-error/-/extendable-error-0.1.7.tgz", - "integrity": "sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==", - "license": "MIT" - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "license": "MIT" - }, - "node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "license": "MIT" - }, - "node_modules/fast-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", - "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fastify" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fastify" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/fastq": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", - "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/find-yarn-workspace-root": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", - "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", - "license": "Apache-2.0", - "dependencies": { - "micromatch": "^4.0.2" - } - }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "license": "BSD-3-Clause", - "bin": { - "flat": "cli.js" - } - }, - "node_modules/follow-redirects": { - "version": "1.15.11", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", - "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "license": "MIT", - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/fp-ts": { - "version": "1.19.3", - "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.3.tgz", - "integrity": "sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==", - "dev": true, - "license": "MIT" - }, - "node_modules/fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "license": "ISC" - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-func-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "license": "ISC" - }, - "node_modules/hardhat": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.27.1.tgz", - "integrity": "sha512-0+AWlXgXd0fbPUsAJwp9x6kgYwNxFdZtHVE40bVqPO1WIpCZeWldvubxZl2yOGSzbufa6d9s0n+gNj7JSlTYCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@ethereumjs/util": "^9.1.0", - "@ethersproject/abi": "^5.1.2", - "@nomicfoundation/edr": "0.12.0-next.16", - "@nomicfoundation/solidity-analyzer": "^0.1.0", - "@sentry/node": "^5.18.1", - "adm-zip": "^0.4.16", - "aggregate-error": "^3.0.0", - "ansi-escapes": "^4.3.0", - "boxen": "^5.1.2", - "chokidar": "^4.0.0", - "ci-info": "^2.0.0", - "debug": "^4.1.1", - "enquirer": "^2.3.0", - "env-paths": "^2.2.0", - "ethereum-cryptography": "^1.0.3", - "find-up": "^5.0.0", - "fp-ts": "1.19.3", - "fs-extra": "^7.0.1", - "immutable": "^4.0.0-rc.12", - "io-ts": "1.10.4", - "json-stream-stringify": "^3.1.4", - "keccak": "^3.0.2", - "lodash": "^4.17.11", - "micro-eth-signer": "^0.14.0", - "mnemonist": "^0.38.0", - "mocha": "^10.0.0", - "p-map": "^4.0.0", - "picocolors": "^1.1.0", - "raw-body": "^2.4.1", - "resolve": "1.17.0", - "semver": "^6.3.0", - "solc": "0.8.26", - "source-map-support": "^0.5.13", - "stacktrace-parser": "^0.1.10", - "tinyglobby": "^0.2.6", - "tsort": "0.0.1", - "undici": "^5.14.0", - "uuid": "^8.3.2", - "ws": "^7.4.6" - }, - "bin": { - "hardhat": "internal/cli/bootstrap.js" - }, - "peerDependencies": { - "ts-node": "*", - "typescript": "*" - }, - "peerDependenciesMeta": { - "ts-node": { - "optional": true - }, - "typescript": { - "optional": true - } - } - }, - "node_modules/hardhat/node_modules/@ethereumjs/rlp": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-5.0.2.tgz", - "integrity": "sha512-DziebCdg4JpGlEqEdGgXmjqcFoJi+JGulUXwEjsZGAscAQ7MyD/7LE/GVCP29vEQxKc7AAwjT3A2ywHp2xfoCA==", - "dev": true, - "license": "MPL-2.0", - "bin": { - "rlp": "bin/rlp.cjs" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/hardhat/node_modules/@ethereumjs/util": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-9.1.0.tgz", - "integrity": "sha512-XBEKsYqLGXLah9PNJbgdkigthkG7TAGvlD/sH12beMXEyHDyigfcbdvHhmLyDWgDyOJn4QwiQUaF7yeuhnjdog==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "@ethereumjs/rlp": "^5.0.2", - "ethereum-cryptography": "^2.2.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/hardhat/node_modules/@ethereumjs/util/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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/hardhat/node_modules/@ethereumjs/util/node_modules/@scure/bip32": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", - "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", - "dev": true, - "license": "MIT", - "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/node_modules/@ethereumjs/util/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==", - "dev": true, - "license": "MIT", - "dependencies": { - "@noble/hashes": "~1.4.0", - "@scure/base": "~1.1.6" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/hardhat/node_modules/@ethereumjs/util/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==", - "dev": true, - "license": "MIT", - "dependencies": { - "@noble/curves": "1.4.2", - "@noble/hashes": "1.4.0", - "@scure/bip32": "1.4.0", - "@scure/bip39": "1.3.0" - } - }, - "node_modules/hardhat/node_modules/@noble/curves": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", - "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@noble/hashes": "1.4.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/hardhat/node_modules/@noble/curves/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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/hardhat/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==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT" - }, - "node_modules/hardhat/node_modules/@scure/base": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", - "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/hardhat/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==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT", - "dependencies": { - "@noble/hashes": "~1.2.0", - "@noble/secp256k1": "~1.7.0", - "@scure/base": "~1.1.0" - } - }, - "node_modules/hardhat/node_modules/@scure/bip39": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", - "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT", - "dependencies": { - "@noble/hashes": "~1.2.0", - "@scure/base": "~1.1.0" - } - }, - "node_modules/hardhat/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==", - "dev": true, - "license": "MIT", - "dependencies": { - "@noble/hashes": "1.2.0", - "@noble/secp256k1": "1.7.1", - "@scure/bip32": "1.1.5", - "@scure/bip39": "1.1.1" - } - }, - "node_modules/hardhat/node_modules/resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-parse": "^1.0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hardhat/node_modules/ws": { - "version": "7.5.10", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", - "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "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", - "engines": { - "node": ">=8" - } - }, - "node_modules/hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "license": "MIT", - "bin": { - "he": "bin/he" - } - }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", - "license": "MIT", - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/http-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", - "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "depd": "~2.0.0", - "inherits": "~2.0.4", - "setprototypeof": "~1.2.0", - "statuses": "~2.0.2", - "toidentifier": "~1.0.1" - }, - "engines": { - "node": ">= 0.8" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/human-id": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/human-id/-/human-id-4.1.3.tgz", - "integrity": "sha512-tsYlhAYpjCKa//8rXZ9DqKEawhPoSytweBC2eNvcaDK+57RZLHGqNs3PZTQO6yekLFSuvA6AlnAfrw1uBvtb+Q==", - "license": "MIT", - "bin": { - "human-id": "dist/cli.js" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/immutable": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", - "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", - "dev": true, - "license": "MIT" - }, - "node_modules/import-fresh": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", - "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/import-fresh/node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "license": "ISC" - }, - "node_modules/io-ts": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-1.10.4.tgz", - "integrity": "sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fp-ts": "^1.0.0" - } - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", - "license": "MIT", - "dependencies": { - "ci-info": "^2.0.0" - }, - "bin": { - "is-ci": "bin.js" - } - }, - "node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "license": "MIT", - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-subdir": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-subdir/-/is-subdir-1.2.0.tgz", - "integrity": "sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==", - "license": "MIT", - "dependencies": { - "better-path-resolve": "1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "license": "MIT", - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "license": "ISC" - }, - "node_modules/js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", - "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stream-stringify": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/json-stream-stringify/-/json-stream-stringify-3.1.6.tgz", - "integrity": "sha512-x7fpwxOkbhFCaJDJ8vb1fBY3DdSa4AlITaz+HHILQJzdPMnHEFjxPwVUi1ALIbcIxDE0PNe/0i7frnY8QnBQog==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=7.10.1" - } - }, - "node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "license": "MIT", - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/keccak": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.4.tgz", - "integrity": "sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/klaw-sync": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", - "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.11" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.startcase": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", - "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==", - "license": "MIT" - }, - "node_modules/lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", - "dev": true, - "license": "MIT" - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/loupe": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", - "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", - "license": "MIT", - "dependencies": { - "get-func-name": "^2.0.1" - } - }, - "node_modules/lru_map": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", - "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/memorystream": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", - "dev": true, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/micro-eth-signer": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/micro-eth-signer/-/micro-eth-signer-0.14.0.tgz", - "integrity": "sha512-5PLLzHiVYPWClEvZIXXFu5yutzpadb73rnQCpUqIHu3No3coFuWQNfE5tkBQJ7djuLYl6aRLaS0MgWJYGoqiBw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@noble/curves": "~1.8.1", - "@noble/hashes": "~1.7.1", - "micro-packed": "~0.7.2" - } - }, - "node_modules/micro-eth-signer/node_modules/@noble/curves": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.8.2.tgz", - "integrity": "sha512-vnI7V6lFNe0tLAuJMu+2sX+FcL14TaCWy1qiczg1VwRmPrpQCdq5ESXQMqUc2tluRNf6irBXrWbl1mGN8uaU/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@noble/hashes": "1.7.2" - }, - "engines": { - "node": "^14.21.3 || >=16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/micro-eth-signer/node_modules/@noble/hashes": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.2.tgz", - "integrity": "sha512-biZ0NUSxyjLLqo6KxEJ1b+C2NAx0wtDoFvCaXHGgUkeHzf3Xc1xKumFKREuT7f7DARNZ/slvYUwFG6B0f2b6hQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.21.3 || >=16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/micro-packed": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/micro-packed/-/micro-packed-0.7.3.tgz", - "integrity": "sha512-2Milxs+WNC00TRlem41oRswvw31146GiSaoCT7s3Xi2gMUglW5QBeqlQaZeHr5tJx9nm3i57LNXPqxOOaWtTYg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@scure/base": "~1.2.5" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "license": "ISC" - }, - "node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", - "license": "MIT" - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimatch/node_modules/brace-expansion": { - "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", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mnemonist": { - "version": "0.38.5", - "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.5.tgz", - "integrity": "sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg==", - "dev": true, - "license": "MIT", - "dependencies": { - "obliterator": "^2.0.0" - } - }, - "node_modules/mocha": { - "version": "10.8.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", - "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-colors": "^4.1.3", - "browser-stdout": "^1.3.1", - "chokidar": "^3.5.3", - "debug": "^4.3.5", - "diff": "^5.2.0", - "escape-string-regexp": "^4.0.0", - "find-up": "^5.0.0", - "glob": "^8.1.0", - "he": "^1.2.0", - "js-yaml": "^4.1.0", - "log-symbols": "^4.1.0", - "minimatch": "^5.1.6", - "ms": "^2.1.3", - "serialize-javascript": "^6.0.2", - "strip-json-comments": "^3.1.1", - "supports-color": "^8.1.1", - "workerpool": "^6.5.1", - "yargs": "^16.2.0", - "yargs-parser": "^20.2.9", - "yargs-unparser": "^2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/mocha/node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/mocha/node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/mocha/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mocha/node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/mri": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", - "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" - }, - "node_modules/nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "license": "MIT" - }, - "node_modules/node-addon-api": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", - "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", - "dev": true, - "license": "MIT" - }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/node-gyp-build": { - "version": "4.8.4", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", - "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", - "dev": true, - "license": "MIT", - "bin": { - "node-gyp-build": "bin.js", - "node-gyp-build-optional": "optional.js", - "node-gyp-build-test": "build-test.js" - } - }, - "node_modules/nofilter": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", - "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.19" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/obliterator": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.5.tgz", - "integrity": "sha512-42CPE9AhahZRsMNslczq0ctAEtqk8Eka26QofnqC346BZdHDySk3LWka23LI7ULIw11NmltpiLagIq8gBozxTw==", - "dev": true, - "license": "MIT" - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/open": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", - "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", - "license": "MIT", - "dependencies": { - "is-docker": "^2.0.0", - "is-wsl": "^2.1.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/outdent": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/outdent/-/outdent-0.5.0.tgz", - "integrity": "sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==", - "license": "MIT" - }, - "node_modules/p-filter": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-2.1.0.tgz", - "integrity": "sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==", - "license": "MIT", - "dependencies": { - "p-map": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-filter/node_modules/p-map": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", - "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/package-manager-detector": { - "version": "0.2.11", - "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-0.2.11.tgz", - "integrity": "sha512-BEnLolu+yuz22S56CU1SUKq3XC3PkwD5wv4ikR4MfGvnRVcmzXR9DwSlW2fEamyTPyXHomBJRzgapeuBvRNzJQ==", - "license": "MIT", - "dependencies": { - "quansync": "^0.2.7" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/patch-package": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-6.5.1.tgz", - "integrity": "sha512-I/4Zsalfhc6bphmJTlrLoOcAF87jcxko4q0qsv4bGcurbr8IskEOtdnt9iCmsQVGL1B+iUhSQqweyTLJfCF9rA==", - "license": "MIT", - "dependencies": { - "@yarnpkg/lockfile": "^1.1.0", - "chalk": "^4.1.2", - "cross-spawn": "^6.0.5", - "find-yarn-workspace-root": "^2.0.0", - "fs-extra": "^9.0.0", - "is-ci": "^2.0.0", - "klaw-sync": "^6.0.0", - "minimist": "^1.2.6", - "open": "^7.4.2", - "rimraf": "^2.6.3", - "semver": "^5.6.0", - "slash": "^2.0.0", - "tmp": "^0.0.33", - "yaml": "^1.10.2" - }, - "bin": { - "patch-package": "index.js" - }, - "engines": { - "node": ">=10", - "npm": ">5" - } - }, - "node_modules/patch-package/node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "license": "MIT", - "dependencies": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/patch-package/node_modules/jsonfile": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", - "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/patch-package/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/patch-package/node_modules/slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/patch-package/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", - "license": "MIT", - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/quansync": { - "version": "0.2.11", - "resolved": "https://registry.npmjs.org/quansync/-/quansync-0.2.11.tgz", - "integrity": "sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/antfu" - }, - { - "type": "individual", - "url": "https://github.com/sponsors/sxzz" - } - ], - "license": "MIT" - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/raw-body": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz", - "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==", - "dev": true, - "license": "MIT", - "dependencies": { - "bytes": "~3.1.2", - "http-errors": "~2.0.1", - "iconv-lite": "~0.4.24", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/read-yaml-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-yaml-file/-/read-yaml-file-1.1.0.tgz", - "integrity": "sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.5", - "js-yaml": "^3.6.1", - "pify": "^4.0.1", - "strip-bom": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/read-yaml-file/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/read-yaml-file/node_modules/js-yaml": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", - "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14.18.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/reusify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", - "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "license": "MIT" - }, - "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true, - "license": "ISC" - }, - "node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", - "license": "MIT", - "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/solady": { - "version": "0.0.182", - "resolved": "https://registry.npmjs.org/solady/-/solady-0.0.182.tgz", - "integrity": "sha512-FW6xo1akJoYpkXMzu58/56FcNU3HYYNamEbnFO3iSibXk0nSHo0DV2Gu/zI3FPg3So5CCX6IYli1TT1IWATnvg==", - "license": "MIT" - }, - "node_modules/solc": { - "version": "0.8.26", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.8.26.tgz", - "integrity": "sha512-yiPQNVf5rBFHwN6SIf3TUUvVAFKcQqmSUFeq+fb6pNRCo0ZCgpYOZDi3BVoezCPIAcKrVYd/qXlBLUP9wVrZ9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "command-exists": "^1.2.8", - "commander": "^8.1.0", - "follow-redirects": "^1.12.1", - "js-sha3": "0.8.0", - "memorystream": "^0.3.1", - "semver": "^5.5.0", - "tmp": "0.0.33" - }, - "bin": { - "solcjs": "solc.js" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/solc/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/source-map-support/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/spawndamnit": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spawndamnit/-/spawndamnit-3.0.1.tgz", - "integrity": "sha512-MmnduQUuHCoFckZoWnXsTg7JaiLBJrKFj9UI2MbRPGaJeVpsLcVBu6P/IGZovziM/YBsellCmsprgNA+w0CzVg==", - "license": "SEE LICENSE IN LICENSE", - "dependencies": { - "cross-spawn": "^7.0.5", - "signal-exit": "^4.0.1" - } - }, - "node_modules/spawndamnit/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", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/spawndamnit/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", - "engines": { - "node": ">=8" - } - }, - "node_modules/spawndamnit/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", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/spawndamnit/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", - "engines": { - "node": ">=8" - } - }, - "node_modules/spawndamnit/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", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "license": "BSD-3-Clause" - }, - "node_modules/stacktrace-parser": { - "version": "0.1.11", - "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.11.tgz", - "integrity": "sha512-WjlahMgHmCJpqzU8bIBy4qtsZdU9lRlcZE3Lvyej6t4tuOuv1vk57OW3MBrj6hXBFx/nNoC9MPMTcr5YA7NQbg==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.7.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/stacktrace-parser/node_modules/type-fest": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz", - "integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, - "node_modules/statuses": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", - "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "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==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/table": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/table/-/table-6.9.0.tgz", - "integrity": "sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/term-size": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", - "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/tinyglobby": { - "version": "0.2.15", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", - "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "fdir": "^6.5.0", - "picomatch": "^4.0.3" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" - } - }, - "node_modules/tinyglobby/node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "license": "MIT", - "dependencies": { - "os-tmpdir": "~1.0.2" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "license": "MIT" - }, - "node_modules/tsort": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/tsort/-/tsort-0.0.1.tgz", - "integrity": "sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==", - "dev": true, - "license": "MIT" - }, - "node_modules/type-detect": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", - "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/undici": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz", - "integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@fastify/busboy": "^2.0.0" - }, - "engines": { - "node": ">=14.0" - } - }, - "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "license": "MIT", - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true, - "license": "MIT" - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "license": "BSD-2-Clause" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "string-width": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/workerpool": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", - "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "license": "ISC" - }, - "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", - "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/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "license": "ISC", - "engines": { - "node": ">= 6" - } - }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "license": "MIT", - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - } -} diff --git a/contracts/package.json b/contracts/package.json deleted file mode 100644 index 3a542f4..0000000 --- a/contracts/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "contracts", - "version": "1.0.0", - "description": "ASLE Smart Contracts using Foundry", - "scripts": { - "build": "forge build", - "test": "forge test", - "test:verbose": "forge test -vvv", - "test:gas": "forge test --gas-report", - "coverage": "forge coverage", - "lint": "forge fmt --check", - "format": "forge fmt", - "snapshot": "forge snapshot", - "script:deploy": "forge script script/Deploy.s.sol:DeployScript --broadcast --verify", - "script:multichain": "forge script script/DeployMultichain.s.sol:DeployMultichainScript", - "anvil": "anvil", - "clean": "forge clean" - }, - "keywords": ["solidity", "foundry", "ethereum", "defi"], - "author": "", - "license": "MIT" -} diff --git a/contracts/script/Deploy.s.sol b/contracts/script/Deploy.s.sol deleted file mode 100644 index ab79ca2..0000000 --- a/contracts/script/Deploy.s.sol +++ /dev/null @@ -1,109 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {Script, console} from "forge-std/Script.sol"; -import {Diamond} from "../src/core/Diamond.sol"; -import {DiamondCutFacet} from "../src/core/facets/DiamondCutFacet.sol"; -import {DiamondInit} from "../src/core/DiamondInit.sol"; -import {LiquidityFacet} from "../src/core/facets/LiquidityFacet.sol"; -import {VaultFacet} from "../src/core/facets/VaultFacet.sol"; -import {ComplianceFacet} from "../src/core/facets/ComplianceFacet.sol"; -import {CCIPFacet} from "../src/core/facets/CCIPFacet.sol"; -import {GovernanceFacet} from "../src/core/facets/GovernanceFacet.sol"; -import {SecurityFacet} from "../src/core/facets/SecurityFacet.sol"; -import {RWAFacet} from "../src/core/facets/RWAFacet.sol"; -import {IDiamondCut} from "../src/interfaces/IDiamondCut.sol"; - -/** - * @title DeployScript - * @notice Complete deployment script for ASLE Diamond with all facets - */ -contract DeployScript is Script { - function run() external { - address deployer = vm.envAddress("DEPLOYER_ADDRESS"); - if (deployer == address(0)) { - uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); - vm.startBroadcast(deployerPrivateKey); - deployer = vm.addr(deployerPrivateKey); - } else { - vm.startBroadcast(deployer); - } - - console.log("Deploying ASLE Diamond and Facets..."); - console.log("Deployer:", deployer); - - // Deploy Diamond - Diamond diamond = new Diamond(); - console.log("Diamond deployed at:", address(diamond)); - - // Deploy Facets - DiamondCutFacet diamondCutFacet = new DiamondCutFacet(); - console.log("DiamondCutFacet deployed at:", address(diamondCutFacet)); - - LiquidityFacet liquidityFacet = new LiquidityFacet(); - console.log("LiquidityFacet deployed at:", address(liquidityFacet)); - - VaultFacet vaultFacet = new VaultFacet(); - console.log("VaultFacet deployed at:", address(vaultFacet)); - - ComplianceFacet complianceFacet = new ComplianceFacet(); - console.log("ComplianceFacet deployed at:", address(complianceFacet)); - - CCIPFacet ccipFacet = new CCIPFacet(); - console.log("CCIPFacet deployed at:", address(ccipFacet)); - - GovernanceFacet governanceFacet = new GovernanceFacet(); - console.log("GovernanceFacet deployed at:", address(governanceFacet)); - - SecurityFacet securityFacet = new SecurityFacet(); - console.log("SecurityFacet deployed at:", address(securityFacet)); - - RWAFacet rwaFacet = new RWAFacet(); - console.log("RWAFacet deployed at:", address(rwaFacet)); - - // Deploy DiamondInit - DiamondInit diamondInit = new DiamondInit(); - console.log("DiamondInit deployed at:", address(diamondInit)); - - // Prepare diamond cuts - IDiamondCut.FacetCut[] memory cuts = new IDiamondCut.FacetCut[](8); - - // Get function selectors for each facet - cuts[0] = _getFacetCut(address(diamondCutFacet), _getSelectors("DiamondCutFacet")); - cuts[1] = _getFacetCut(address(liquidityFacet), _getSelectors("LiquidityFacet")); - cuts[2] = _getFacetCut(address(vaultFacet), _getSelectors("VaultFacet")); - cuts[3] = _getFacetCut(address(complianceFacet), _getSelectors("ComplianceFacet")); - cuts[4] = _getFacetCut(address(ccipFacet), _getSelectors("CCIPFacet")); - cuts[5] = _getFacetCut(address(governanceFacet), _getSelectors("GovernanceFacet")); - cuts[6] = _getFacetCut(address(securityFacet), _getSelectors("SecurityFacet")); - cuts[7] = _getFacetCut(address(rwaFacet), _getSelectors("RWAFacet")); - - // Initialize Diamond - bytes memory initData = abi.encodeWithSelector(DiamondInit.init.selector, deployer); - - // Perform diamond cut - IDiamondCut(address(diamond)).diamondCut(cuts, address(diamondInit), initData); - - console.log("\n=== Deployment Summary ==="); - console.log("Diamond:", address(diamond)); - console.log("All facets added and initialized!"); - console.log("Owner:", deployer); - - vm.stopBroadcast(); - } - - function _getFacetCut(address facet, bytes4[] memory selectors) internal pure returns (IDiamondCut.FacetCut memory) { - return IDiamondCut.FacetCut({ - facetAddress: facet, - action: IDiamondCut.FacetCutAction.Add, - functionSelectors: selectors - }); - } - - function _getSelectors(string memory facetName) internal pure returns (bytes4[] memory) { - // This is a simplified version - in production, use FacetCutHelper or similar - // For now, return empty array - selectors should be added manually or via helper - bytes4[] memory selectors = new bytes4[](0); - return selectors; - } -} diff --git a/contracts/script/DeployMultichain.s.sol b/contracts/script/DeployMultichain.s.sol deleted file mode 100644 index 6e784a0..0000000 --- a/contracts/script/DeployMultichain.s.sol +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {Script, console} from "forge-std/Script.sol"; -import {DeployScript} from "./Deploy.s.sol"; - -contract DeployMultichainScript is Script { - function run() external { - // This script would deploy to multiple chains - // In production, you would: - // 1. Get chain-specific RPC URLs - // 2. Deploy to each chain - // 3. Configure CCIP routers - // 4. Set up cross-chain connections - - console.log("Multi-chain deployment script"); - console.log("Configure chain-specific deployments in foundry.toml"); - } -} - diff --git a/contracts/script/FacetCutHelper.s.sol b/contracts/script/FacetCutHelper.s.sol deleted file mode 100644 index c49f92e..0000000 --- a/contracts/script/FacetCutHelper.s.sol +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {IDiamondCut} from "../src/interfaces/IDiamondCut.sol"; - -/** - * @title FacetCutHelper - * @notice Helper contract to get function selectors from facet contracts - */ -library FacetCutHelper { - function getSelectors(address facet) internal view returns (bytes4[] memory) { - bytes memory facetCode = _getCreationCode(facet); - return _extractSelectors(facetCode); - } - - function _getCreationCode(address contractAddress) internal view returns (bytes memory) { - uint256 size; - assembly { - size := extcodesize(contractAddress) - } - bytes memory code = new bytes(size); - assembly { - extcodecopy(contractAddress, add(code, 0x20), 0, size) - } - return code; - } - - function _extractSelectors(bytes memory bytecode) internal pure returns (bytes4[] memory) { - // Simplified selector extraction - in production use proper parsing - // This is a placeholder - actual implementation would parse bytecode - bytes4[] memory selectors = new bytes4[](100); // Max selectors - uint256 count = 0; - - // This is a simplified version - proper implementation would parse the bytecode - // For now, return empty and require manual selector lists - return new bytes4[](0); - } -} - diff --git a/contracts/src/core/Diamond.sol b/contracts/src/core/Diamond.sol deleted file mode 100644 index b9accb7..0000000 --- a/contracts/src/core/Diamond.sol +++ /dev/null @@ -1,96 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {IDiamondCut} from "../interfaces/IDiamondCut.sol"; -import {IDiamond} from "../interfaces/IDiamond.sol"; -import {LibDiamond} from "../libraries/LibDiamond.sol"; - -// It is expected that this contract is customized if you want to deploy your own -// diamond. For example, you can set a modifier on the `diamondCut` function to -// restrict who can call it, add a method to do upgrades, etc. - -// When no data for a facet function is provided, the function selector will be -// added to the diamond as a function that does nothing (revert). - -contract Diamond is IDiamond { - // Find facet for function that is called and execute the - // function if a facet is found and return any value. - fallback() external payable { - // get facet from function selector - address facet = IDiamond(address(this)).facetAddress(msg.sig); - require(facet != address(0), "Diamond: Function does not exist"); - // Execute external function from facet using delegatecall and return any value. - assembly { - // copy function selector and any arguments - calldatacopy(0, 0, calldatasize()) - // execute function call using the facet - let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0) - // get any return value - returndatacopy(0, 0, returndatasize()) - // return any return value or error back to the caller - switch result - case 0 { - revert(0, returndatasize()) - } - default { - return(0, returndatasize()) - } - } - } - - receive() external payable { - revert("Diamond: Does not accept Ether"); - } - - /// @notice Gets all facets and their selectors. - /// @return facets_ Facet - function facets() external view override returns (Facet[] memory facets_) { - LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage(); - uint256 numFacets = ds.facetAddresses.length; - facets_ = new Facet[](numFacets); - for (uint256 i; i < numFacets; i++) { - address facetAddress_ = ds.facetAddresses[i]; - facets_[i].facetAddress = facetAddress_; - facets_[i].functionSelectors = ds.facetFunctionSelectors[facetAddress_].functionSelectors; - } - } - - /// @notice Gets all the function selectors provided by a facet. - /// @param _facet The facet address. - /// @return facetFunctionSelectors_ - function facetFunctionSelectors(address _facet) - external - view - override - returns (bytes4[] memory facetFunctionSelectors_) - { - LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage(); - facetFunctionSelectors_ = ds.facetFunctionSelectors[_facet].functionSelectors; - } - - /// @notice Get all the facet addresses used by a diamond. - /// @return facetAddresses_ - function facetAddresses() - external - view - override - returns (address[] memory facetAddresses_) - { - LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage(); - facetAddresses_ = ds.facetAddresses; - } - - /// @notice Gets the facet that supports the given selector. - /// @dev If facet is not found return address(0). - /// @param _functionSelector The function selector. - /// @return facetAddress_ The facet address. - function facetAddress(bytes4 _functionSelector) - external - view - override - returns (address facetAddress_) - { - LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage(); - facetAddress_ = ds.selectorToFacetAndPosition[_functionSelector].facetAddress; - } -} diff --git a/contracts/src/core/DiamondInit.sol b/contracts/src/core/DiamondInit.sol deleted file mode 100644 index 2e72a1a..0000000 --- a/contracts/src/core/DiamondInit.sol +++ /dev/null @@ -1,36 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {LibDiamond} from "../libraries/LibDiamond.sol"; -import {LibAccessControl} from "../libraries/LibAccessControl.sol"; -import {LibReentrancyGuard} from "../libraries/LibReentrancyGuard.sol"; - -/** - * @title DiamondInit - * @notice Initialization contract for ASLE Diamond - * @dev This contract is called once during Diamond deployment to initialize storage - */ -contract DiamondInit { - /** - * @notice Initialize Diamond with default settings - * @param _initOwner Address to set as initial owner - */ - function init(address _initOwner) external { - // Initialize Diamond ownership - require(!LibDiamond.isInitialized(), "DiamondInit: Already initialized"); - LibDiamond.setContractOwner(_initOwner); - - // Initialize access control - LibAccessControl.initializeAccessControl(_initOwner); - - // Initialize reentrancy guard - LibReentrancyGuard.initialize(); - - // Set default timelock delay (7 days) - LibAccessControl.setTimelockDelay(7 days); - - // Enable timelock by default - LibAccessControl.setTimelockEnabled(true); - } -} - diff --git a/contracts/src/core/facets/CCIPFacet.sol b/contracts/src/core/facets/CCIPFacet.sol deleted file mode 100644 index 4414393..0000000 --- a/contracts/src/core/facets/CCIPFacet.sol +++ /dev/null @@ -1,272 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {ICCIPFacet} from "../../interfaces/ICCIPFacet.sol"; -import {ICCIPRouter} from "../../interfaces/ICCIPRouter.sol"; -import {LibAccessControl} from "../../libraries/LibAccessControl.sol"; -import {ILiquidityFacet} from "../../interfaces/ILiquidityFacet.sol"; -import {IVaultFacet} from "../../interfaces/IVaultFacet.sol"; -import {ISecurityFacet} from "../../interfaces/ISecurityFacet.sol"; - -/** - * @title CCIPFacet - * @notice Cross-chain messaging via Chainlink CCIP with state synchronization - */ -contract CCIPFacet is ICCIPFacet { - struct CCIPStorage { - ICCIPRouter ccipRouter; - mapping(uint256 => uint64) chainSelectors; // chainId => chainSelector - mapping(uint64 => uint256) selectorToChain; // chainSelector => chainId - mapping(uint256 => bool) supportedChains; - mapping(bytes32 => bool) deliveredMessages; - mapping(bytes32 => uint256) messageTimestamps; - mapping(bytes32 => MessageStatus) messageStatuses; - address authorizedSender; // Authorized sender for cross-chain messages - } - - enum MessageStatus { - Pending, - Delivered, - Failed - } - - bytes32 private constant CCIP_STORAGE_POSITION = keccak256("asle.ccip.storage"); - - event MessageExecuted(bytes32 indexed messageId, MessageType messageType, bool success); - event ChainSelectorUpdated(uint256 chainId, uint64 selector); - - function ccipStorage() internal pure returns (CCIPStorage storage cs) { - bytes32 position = CCIP_STORAGE_POSITION; - assembly { - cs.slot := position - } - } - - modifier onlySupportedChain(uint256 chainId) { - require(ccipStorage().supportedChains[chainId], "CCIPFacet: Chain not supported"); - _; - } - - modifier onlyAuthorized() { - CCIPStorage storage cs = ccipStorage(); - require( - msg.sender == cs.authorizedSender || - cs.authorizedSender == address(0) || - LibAccessControl.hasRole(LibAccessControl.DEFAULT_ADMIN_ROLE, msg.sender), - "CCIPFacet: Unauthorized" - ); - _; - } - - // ============ Liquidity Sync ============ - - function sendLiquiditySync( - uint256 targetChainId, - uint256 poolId - ) external override onlySupportedChain(targetChainId) returns (bytes32 messageId) { - // Fetch pool data from LiquidityFacet - ILiquidityFacet liquidityFacet = ILiquidityFacet(address(this)); - ILiquidityFacet.Pool memory pool = liquidityFacet.getPool(poolId); - - LiquiditySyncPayload memory payload = LiquiditySyncPayload({ - poolId: poolId, - baseReserve: pool.baseReserve, - quoteReserve: pool.quoteReserve, - virtualBaseReserve: pool.virtualBaseReserve, - virtualQuoteReserve: pool.virtualQuoteReserve - }); - - bytes memory encodedPayload = abi.encode(MessageType.LiquiditySync, payload); - - messageId = _sendCCIPMessage( - targetChainId, - MessageType.LiquiditySync, - encodedPayload - ); - - emit CCIPMessageSent(messageId, block.chainid, targetChainId, MessageType.LiquiditySync); - } - - function sendVaultRebalance( - uint256 targetChainId, - uint256 vaultId, - uint256 amount, - address asset - ) external override onlySupportedChain(targetChainId) returns (bytes32 messageId) { - VaultRebalancePayload memory payload = VaultRebalancePayload({ - vaultId: vaultId, - targetChainId: targetChainId, - amount: amount, - asset: asset - }); - - bytes memory encodedPayload = abi.encode(MessageType.VaultRebalance, payload); - - messageId = _sendCCIPMessage( - targetChainId, - MessageType.VaultRebalance, - encodedPayload - ); - - emit VaultRebalanced(vaultId, block.chainid, targetChainId, amount); - emit CCIPMessageSent(messageId, block.chainid, targetChainId, MessageType.VaultRebalance); - } - - function sendPriceDeviationWarning( - uint256 targetChainId, - uint256 poolId, - uint256 deviation - ) external override onlySupportedChain(targetChainId) returns (bytes32 messageId) { - ILiquidityFacet liquidityFacet = ILiquidityFacet(address(this)); - uint256 currentPrice = liquidityFacet.getPrice(poolId); - - PriceDeviationPayload memory payload = PriceDeviationPayload({ - poolId: poolId, - price: currentPrice, - deviation: deviation, - timestamp: block.timestamp - }); - - bytes memory encodedPayload = abi.encode(MessageType.PriceDeviation, payload); - - messageId = _sendCCIPMessage( - targetChainId, - MessageType.PriceDeviation, - encodedPayload - ); - - emit CCIPMessageSent(messageId, block.chainid, targetChainId, MessageType.PriceDeviation); - } - - // ============ Message Handling ============ - - function handleCCIPMessage( - bytes32 messageId, - uint256 sourceChainId, - bytes calldata payload - ) external override onlyAuthorized { - CCIPStorage storage cs = ccipStorage(); - require(!cs.deliveredMessages[messageId], "CCIPFacet: Message already processed"); - - cs.deliveredMessages[messageId] = true; - cs.messageTimestamps[messageId] = block.timestamp; - cs.messageStatuses[messageId] = MessageStatus.Pending; - - (MessageType messageType, bytes memory data) = abi.decode(payload, (MessageType, bytes)); - - bool success = false; - if (messageType == MessageType.LiquiditySync) { - LiquiditySyncPayload memory syncPayload = abi.decode(data, (LiquiditySyncPayload)); - success = _handleLiquiditySync(syncPayload, sourceChainId); - } else if (messageType == MessageType.VaultRebalance) { - VaultRebalancePayload memory rebalancePayload = abi.decode(data, (VaultRebalancePayload)); - success = _handleVaultRebalance(rebalancePayload, sourceChainId); - } else if (messageType == MessageType.PriceDeviation) { - PriceDeviationPayload memory pricePayload = abi.decode(data, (PriceDeviationPayload)); - success = _handlePriceDeviation(pricePayload, sourceChainId); - } - - cs.messageStatuses[messageId] = success ? MessageStatus.Delivered : MessageStatus.Failed; - emit CCIPMessageReceived(messageId, sourceChainId, messageType); - emit MessageExecuted(messageId, messageType, success); - } - - // ============ Configuration ============ - - function setCCIPRouter(address router) external override { - LibAccessControl.requireRole(LibAccessControl.DEFAULT_ADMIN_ROLE, msg.sender); - ccipStorage().ccipRouter = ICCIPRouter(router); - } - - function setSupportedChain(uint256 chainId, bool supported) external override { - LibAccessControl.requireRole(LibAccessControl.DEFAULT_ADMIN_ROLE, msg.sender); - ccipStorage().supportedChains[chainId] = supported; - } - - function setChainSelector(uint256 chainId, uint64 selector) external { - LibAccessControl.requireRole(LibAccessControl.DEFAULT_ADMIN_ROLE, msg.sender); - CCIPStorage storage cs = ccipStorage(); - cs.chainSelectors[chainId] = selector; - cs.selectorToChain[selector] = chainId; - emit ChainSelectorUpdated(chainId, selector); - } - - function setAuthorizedSender(address sender) external { - LibAccessControl.requireRole(LibAccessControl.DEFAULT_ADMIN_ROLE, msg.sender); - ccipStorage().authorizedSender = sender; - } - - // ============ View Functions ============ - - function isChainSupported(uint256 chainId) external view override returns (bool) { - return ccipStorage().supportedChains[chainId]; - } - - function getMessageStatus(bytes32 messageId) external view override returns (bool delivered, uint256 timestamp) { - CCIPStorage storage cs = ccipStorage(); - delivered = cs.deliveredMessages[messageId]; - timestamp = cs.messageTimestamps[messageId]; - } - - function getChainSelector(uint256 chainId) external view returns (uint64) { - return ccipStorage().chainSelectors[chainId]; - } - - // ============ Internal Functions ============ - - function _sendCCIPMessage( - uint256 targetChainId, - MessageType messageType, - bytes memory payload - ) internal returns (bytes32) { - CCIPStorage storage cs = ccipStorage(); - require(address(cs.ccipRouter) != address(0), "CCIPFacet: Router not set"); - - uint64 chainSelector = cs.chainSelectors[targetChainId]; - require(chainSelector != 0, "CCIPFacet: Chain selector not set"); - - ICCIPRouter.EVM2AnyMessage memory message = ICCIPRouter.EVM2AnyMessage({ - receiver: abi.encode(address(this)), - data: payload, - tokenAmounts: new ICCIPRouter.EVMTokenAmount[](0), - extraArgs: "", - feeToken: address(0) - }); - - uint256 fee = cs.ccipRouter.getFee(chainSelector, message); - require(msg.value >= fee, "CCIPFacet: Insufficient fee"); - - return cs.ccipRouter.ccipSend{value: fee}(chainSelector, message); - } - - function _handleLiquiditySync(LiquiditySyncPayload memory payload, uint256 sourceChainId) internal returns (bool) { - try this._syncPoolState(payload) { - emit LiquiditySynced(payload.poolId, sourceChainId, payload.baseReserve, payload.quoteReserve); - return true; - } catch { - return false; - } - } - - function _syncPoolState(LiquiditySyncPayload memory payload) external { - require(msg.sender == address(this), "CCIPFacet: Internal only"); - // In production, this would update pool virtual reserves based on cross-chain state - // For now, we emit events and let the backend handle synchronization - } - - function _handleVaultRebalance(VaultRebalancePayload memory payload, uint256 sourceChainId) internal returns (bool) { - // In production, this would trigger vault rebalancing logic - // For now, emit event for backend processing - emit VaultRebalanced(payload.vaultId, sourceChainId, payload.targetChainId, payload.amount); - return true; - } - - function _handlePriceDeviation(PriceDeviationPayload memory payload, uint256 sourceChainId) internal returns (bool) { - // Trigger security alerts if deviation is significant - if (payload.deviation > 500) { // 5% deviation threshold - ISecurityFacet securityFacet = ISecurityFacet(address(this)); - // Could trigger circuit breaker or alert - } - return true; - } -} diff --git a/contracts/src/core/facets/ChainConfigFacet.sol b/contracts/src/core/facets/ChainConfigFacet.sol deleted file mode 100644 index 26ec792..0000000 --- a/contracts/src/core/facets/ChainConfigFacet.sol +++ /dev/null @@ -1,92 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {IChainConfigFacet} from "../../interfaces/IChainConfigFacet.sol"; -import {LibAccessControl} from "../../libraries/LibAccessControl.sol"; - -/** - * @title ChainConfigFacet - * @notice Manages chain-specific configurations for multi-chain operations - */ -contract ChainConfigFacet is IChainConfigFacet { - struct ChainConfigStorage { - mapping(uint256 => ChainConfig) chainConfigs; - mapping(uint256 => bool) activeChains; - } - - bytes32 private constant CHAIN_CONFIG_STORAGE_POSITION = keccak256("asle.chainconfig.storage"); - - function chainConfigStorage() internal pure returns (ChainConfigStorage storage ccs) { - bytes32 position = CHAIN_CONFIG_STORAGE_POSITION; - assembly { - ccs.slot := position - } - } - - modifier onlyAdmin() { - LibAccessControl.requireRole(LibAccessControl.DEFAULT_ADMIN_ROLE, msg.sender); - _; - } - - function setChainConfig( - uint256 chainId, - string calldata name, - address nativeToken, - string calldata explorerUrl, - uint256 gasLimit, - uint256 messageTimeout - ) external override onlyAdmin { - ChainConfigStorage storage ccs = chainConfigStorage(); - - ccs.chainConfigs[chainId] = ChainConfig({ - chainId: chainId, - name: name, - nativeToken: nativeToken, - explorerUrl: explorerUrl, - gasLimit: gasLimit, - messageTimeout: messageTimeout, - active: ccs.activeChains[chainId] // Preserve existing active status - }); - - emit ChainConfigUpdated(chainId, name, ccs.activeChains[chainId]); - } - - function getChainConfig(uint256 chainId) external view override returns (ChainConfig memory) { - ChainConfigStorage storage ccs = chainConfigStorage(); - ChainConfig memory config = ccs.chainConfigs[chainId]; - require(config.chainId != 0 || chainId == 0, "ChainConfigFacet: Chain not configured"); - return config; - } - - function setChainActive(uint256 chainId, bool active) external override onlyAdmin { - ChainConfigStorage storage ccs = chainConfigStorage(); - require(ccs.chainConfigs[chainId].chainId != 0 || chainId == 0, "ChainConfigFacet: Chain not configured"); - - ccs.activeChains[chainId] = active; - ccs.chainConfigs[chainId].active = active; - - emit ChainConfigUpdated(chainId, ccs.chainConfigs[chainId].name, active); - } - - function setChainGasLimit(uint256 chainId, uint256 gasLimit) external override onlyAdmin { - ChainConfigStorage storage ccs = chainConfigStorage(); - require(ccs.chainConfigs[chainId].chainId != 0 || chainId == 0, "ChainConfigFacet: Chain not configured"); - - ccs.chainConfigs[chainId].gasLimit = gasLimit; - emit ChainGasLimitUpdated(chainId, gasLimit); - } - - function setChainTimeout(uint256 chainId, uint256 timeout) external override onlyAdmin { - ChainConfigStorage storage ccs = chainConfigStorage(); - require(ccs.chainConfigs[chainId].chainId != 0 || chainId == 0, "ChainConfigFacet: Chain not configured"); - - ccs.chainConfigs[chainId].messageTimeout = timeout; - emit ChainTimeoutUpdated(chainId, timeout); - } - - function isChainActive(uint256 chainId) external view override returns (bool) { - ChainConfigStorage storage ccs = chainConfigStorage(); - return ccs.activeChains[chainId]; - } -} - diff --git a/contracts/src/core/facets/ComplianceFacet.sol b/contracts/src/core/facets/ComplianceFacet.sol deleted file mode 100644 index d337c56..0000000 --- a/contracts/src/core/facets/ComplianceFacet.sol +++ /dev/null @@ -1,268 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {IComplianceFacet} from "../../interfaces/IComplianceFacet.sol"; -import {LibAccessControl} from "../../libraries/LibAccessControl.sol"; - -contract ComplianceFacet is IComplianceFacet { - struct ComplianceStorage { - mapping(address => UserCompliance) userCompliance; - mapping(uint256 => ComplianceMode) vaultComplianceMode; - mapping(address => bool) ofacSanctioned; // OFAC sanctions list - mapping(bytes32 => bool) travelRuleTransactions; // FATF Travel Rule transaction tracking - mapping(address => uint256) lastAuditTime; - mapping(address => uint256) transactionCount; // Track transaction count per address - mapping(address => uint256) dailyVolume; // Daily transaction volume - mapping(address => uint256) lastDayReset; // Last day reset timestamp - bool iso20022Enabled; - bool travelRuleEnabled; - bool automaticOFACCheck; - uint256 travelRuleThreshold; // Minimum amount for Travel Rule (in wei) - } - - bytes32 private constant COMPLIANCE_STORAGE_POSITION = keccak256("asle.compliance.storage"); - - function complianceStorage() internal pure returns (ComplianceStorage storage cs) { - bytes32 position = COMPLIANCE_STORAGE_POSITION; - assembly { - cs.slot := position - } - } - - modifier onlyComplianceAdmin() { - LibAccessControl.requireRole(LibAccessControl.COMPLIANCE_ADMIN_ROLE, msg.sender); - _; - } - - modifier requireCompliance(address user, ComplianceMode requiredMode) { - require(canAccess(user, requiredMode), "ComplianceFacet: Compliance check failed"); - _; - } - - function setUserComplianceMode( - address user, - ComplianceMode mode - ) external override onlyComplianceAdmin { - ComplianceStorage storage cs = complianceStorage(); - cs.userCompliance[user].mode = mode; - cs.userCompliance[user].active = true; - emit ComplianceModeSet(user, mode); - } - - function verifyKYC(address user, bool verified) external override onlyComplianceAdmin { - ComplianceStorage storage cs = complianceStorage(); - cs.userCompliance[user].kycVerified = verified; - emit KYCVerified(user, verified); - } - - function verifyAML(address user, bool verified) external override onlyComplianceAdmin { - ComplianceStorage storage cs = complianceStorage(); - cs.userCompliance[user].amlVerified = verified; - } - - function getUserCompliance( - address user - ) external view override returns (UserCompliance memory) { - return complianceStorage().userCompliance[user]; - } - - function canAccess( - address user, - ComplianceMode requiredMode - ) external view override returns (bool) { - ComplianceStorage storage cs = complianceStorage(); - UserCompliance memory userComp = cs.userCompliance[user]; - - if (!userComp.active) { - return requiredMode == ComplianceMode.Decentralized; - } - - if (requiredMode == ComplianceMode.Decentralized) { - return true; // Anyone can access decentralized mode - } - - if (requiredMode == ComplianceMode.Fintech) { - return userComp.mode == ComplianceMode.Fintech || userComp.mode == ComplianceMode.Regulated; - } - - if (requiredMode == ComplianceMode.Regulated) { - return userComp.mode == ComplianceMode.Regulated && - userComp.kycVerified && - userComp.amlVerified; - } - - return false; - } - - function setVaultComplianceMode( - uint256 vaultId, - ComplianceMode mode - ) external override onlyComplianceAdmin { - ComplianceStorage storage cs = complianceStorage(); - cs.vaultComplianceMode[vaultId] = mode; - } - - function getVaultComplianceMode( - uint256 vaultId - ) external view override returns (ComplianceMode) { - ComplianceStorage storage cs = complianceStorage(); - return cs.vaultComplianceMode[vaultId]; - } - - // Phase 3: Enhanced Compliance Functions - - function checkOFACSanctions(address user) external view returns (bool) { - return complianceStorage().ofacSanctioned[user]; - } - - function setOFACSanctioned(address user, bool sanctioned) external onlyComplianceAdmin { - complianceStorage().ofacSanctioned[user] = sanctioned; - emit IComplianceFacet.OFACCheck(user, sanctioned); - } - - function recordTravelRule( - address from, - address to, - uint256 amount, - bytes32 transactionHash - ) external { - ComplianceStorage storage cs = complianceStorage(); - require(cs.travelRuleEnabled, "ComplianceFacet: Travel Rule not enabled"); - require(amount >= cs.travelRuleThreshold, "ComplianceFacet: Amount below Travel Rule threshold"); - - cs.travelRuleTransactions[transactionHash] = true; - emit IComplianceFacet.TravelRuleCompliance(from, to, amount, transactionHash); - } - - function getTravelRuleStatus(bytes32 transactionHash) external view returns (bool) { - return complianceStorage().travelRuleTransactions[transactionHash]; - } - - function setTravelRuleThreshold(uint256 threshold) external onlyComplianceAdmin { - complianceStorage().travelRuleThreshold = threshold; - } - - function recordISO20022Message( - address user, - string calldata messageType, - bytes32 messageId - ) external onlyComplianceAdmin { - ComplianceStorage storage cs = complianceStorage(); - require(cs.iso20022Enabled, "ComplianceFacet: ISO 20022 not enabled"); - - // Use events instead of storage for ISO messages (storage optimization) - emit IComplianceFacet.ISO20022Message(user, messageType, messageId); - } - - function enableISO20022(bool enabled) external onlyComplianceAdmin { - complianceStorage().iso20022Enabled = enabled; - } - - function enableTravelRule(bool enabled) external onlyComplianceAdmin { - complianceStorage().travelRuleEnabled = enabled; - } - - function recordAudit(address user) external onlyComplianceAdmin { - complianceStorage().lastAuditTime[user] = block.timestamp; - } - - function getLastAuditTime(address user) external view returns (uint256) { - return complianceStorage().lastAuditTime[user]; - } - - function validateTransaction( - address from, - address to, - uint256 amount - ) external view returns (bool) { - ComplianceStorage storage cs = complianceStorage(); - - // Automatic OFAC sanctions check - if (cs.automaticOFACCheck || cs.ofacSanctioned[from] || cs.ofacSanctioned[to]) { - if (cs.ofacSanctioned[from] || cs.ofacSanctioned[to]) { - return false; - } - } - - // Check compliance modes - UserCompliance memory fromComp = cs.userCompliance[from]; - UserCompliance memory toComp = cs.userCompliance[to]; - - // Both parties must meet minimum compliance requirements - if (fromComp.mode == ComplianceMode.Regulated || toComp.mode == ComplianceMode.Regulated) { - return fromComp.kycVerified && fromComp.amlVerified && - toComp.kycVerified && toComp.amlVerified; - } - - // Check Travel Rule requirements - if (cs.travelRuleEnabled && amount >= cs.travelRuleThreshold) { - // Travel Rule compliance should be checked separately via recordTravelRule - // This is a basic validation - } - - return true; - } - - /** - * @notice Automatic OFAC check on transaction (called by other facets) - */ - function performAutomaticOFACCheck(address user) external returns (bool) { - ComplianceStorage storage cs = complianceStorage(); - if (cs.automaticOFACCheck) { - // In production, this would call an external service or oracle - // For now, just check the stored list - return !cs.ofacSanctioned[user]; - } - return true; - } - - /** - * @notice Batch set OFAC sanctions - */ - function batchSetOFACSanctions(address[] calldata users, bool[] calldata sanctioned) external onlyComplianceAdmin { - require(users.length == sanctioned.length, "ComplianceFacet: Arrays length mismatch"); - ComplianceStorage storage cs = complianceStorage(); - for (uint i = 0; i < users.length; i++) { - cs.ofacSanctioned[users[i]] = sanctioned[i]; - emit IComplianceFacet.OFACCheck(users[i], sanctioned[i]); - } - } - - /** - * @notice Enable/disable automatic OFAC checking - */ - function setAutomaticOFACCheck(bool enabled) external onlyComplianceAdmin { - complianceStorage().automaticOFACCheck = enabled; - } - - /** - * @notice Get transaction statistics for address - */ - function getTransactionStats(address user) external view returns (uint256 count, uint256 dailyVol) { - ComplianceStorage storage cs = complianceStorage(); - // Reset daily volume if new day - if (block.timestamp >= cs.lastDayReset[user] + 1 days) { - dailyVol = 0; - } else { - dailyVol = cs.dailyVolume[user]; - } - return (cs.transactionCount[user], dailyVol); - } - - /** - * @notice Record transaction for compliance tracking - */ - function recordTransaction(address from, address to, uint256 amount) external { - ComplianceStorage storage cs = complianceStorage(); - - // Reset daily volume if new day - if (block.timestamp >= cs.lastDayReset[from] + 1 days) { - cs.dailyVolume[from] = 0; - cs.lastDayReset[from] = block.timestamp; - } - - cs.transactionCount[from]++; - cs.dailyVolume[from] += amount; - } -} - diff --git a/contracts/src/core/facets/DiamondCutFacet.sol b/contracts/src/core/facets/DiamondCutFacet.sol deleted file mode 100644 index 22e0c25..0000000 --- a/contracts/src/core/facets/DiamondCutFacet.sol +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {IDiamondCut} from "../../interfaces/IDiamondCut.sol"; -import {LibDiamond, LibDiamondCut} from "../../libraries/LibDiamond.sol"; - -contract DiamondCutFacet is IDiamondCut { - /// @notice Add/replace/remove any number of functions and optionally execute - /// a function with delegatecall - /// @param _diamondCut Contains the facet addresses and function selectors - /// @param _init The address of the contract or facet to execute _calldata - /// @param _calldata A function call, including function selector and arguments - /// _calldata is executed with delegatecall on _init - function diamondCut( - FacetCut[] calldata _diamondCut, - address _init, - bytes calldata _calldata - ) external override { - LibDiamond.enforceIsContractOwner(); - LibDiamond.diamondCut(_diamondCut, _init, _calldata); - } -} - - diff --git a/contracts/src/core/facets/GovernanceFacet.sol b/contracts/src/core/facets/GovernanceFacet.sol deleted file mode 100644 index d2e7dc5..0000000 --- a/contracts/src/core/facets/GovernanceFacet.sol +++ /dev/null @@ -1,394 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {IGovernanceFacet} from "../../interfaces/IGovernanceFacet.sol"; -import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; -import {LibDiamond} from "../../libraries/LibDiamond.sol"; -import {LibAccessControl} from "../../libraries/LibAccessControl.sol"; -import {IDiamondCut} from "../../interfaces/IDiamondCut.sol"; -import {ISecurityFacet} from "../../interfaces/ISecurityFacet.sol"; - -contract GovernanceFacet is IGovernanceFacet { - using SafeERC20 for IERC20; - - struct GovernanceStorage { - mapping(uint256 => Proposal) proposals; - uint256 proposalCount; - address governanceToken; // ERC-20 token for voting - uint256 quorumThreshold; // Minimum votes required - uint256 votingPeriod; // Default voting period in seconds - uint256 timelockDelay; // Delay before execution - mapping(uint256 => uint256) proposalTimelocks; // proposalId => execution time - mapping(address => uint256) treasuryBalances; // token => balance - uint256 minProposalThreshold; // Minimum tokens required to create proposal - mapping(address => address) delegations; // delegator => delegatee - mapping(address => uint256) checkpoints; // account => voting power checkpoint - } - - bytes32 private constant GOVERNANCE_STORAGE_POSITION = keccak256("asle.governance.storage"); - - function governanceStorage() internal pure returns (GovernanceStorage storage gs) { - bytes32 position = GOVERNANCE_STORAGE_POSITION; - assembly { - gs.slot := position - } - } - - modifier onlyProposer() { - GovernanceStorage storage gs = governanceStorage(); - if (gs.governanceToken != address(0)) { - uint256 balance = IERC20(gs.governanceToken).balanceOf(msg.sender); - require(balance >= gs.minProposalThreshold, "GovernanceFacet: Insufficient tokens to propose"); - } - _; - } - - function createProposal( - ProposalType proposalType, - string calldata description, - bytes calldata data, - uint256 votingPeriod - ) external override onlyProposer returns (uint256 proposalId) { - GovernanceStorage storage gs = governanceStorage(); - proposalId = gs.proposalCount; - gs.proposalCount++; - - Proposal storage proposal = gs.proposals[proposalId]; - proposal.id = proposalId; - proposal.proposalType = proposalType; - proposal.status = ProposalStatus.Pending; - proposal.proposer = msg.sender; - proposal.description = description; - proposal.data = data; - proposal.startTime = block.timestamp; - proposal.endTime = block.timestamp + (votingPeriod > 0 ? votingPeriod : gs.votingPeriod); - proposal.forVotes = 0; - proposal.againstVotes = 0; - - // Auto-activate if voting period is immediate - if (votingPeriod == 0) { - proposal.status = ProposalStatus.Active; - } - - emit ProposalCreated(proposalId, proposalType, msg.sender); - } - - function vote(uint256 proposalId, bool support) external override { - GovernanceStorage storage gs = governanceStorage(); - Proposal storage proposal = gs.proposals[proposalId]; - - require(proposal.status == ProposalStatus.Active, "GovernanceFacet: Proposal not active"); - require(block.timestamp <= proposal.endTime, "GovernanceFacet: Voting period ended"); - require(!proposal.hasVoted[msg.sender], "GovernanceFacet: Already voted"); - - address voter = msg.sender; - address delegatee = gs.delegations[voter]; - - // If voting power is delegated, the delegatee should vote - if (delegatee != address(0) && delegatee != voter) { - require(msg.sender == delegatee, "GovernanceFacet: Only delegatee can vote"); - voter = delegatee; - } - - uint256 votingPower = _getVotingPower(voter); - require(votingPower > 0, "GovernanceFacet: No voting power"); - - proposal.hasVoted[msg.sender] = true; - - if (support) { - proposal.forVotes += votingPower; - } else { - proposal.againstVotes += votingPower; - } - - emit VoteCast(proposalId, msg.sender, support, votingPower); - - // Check if proposal can be passed - _checkProposalStatus(proposalId); - } - - function executeProposal(uint256 proposalId) external override { - GovernanceStorage storage gs = governanceStorage(); - Proposal storage proposal = gs.proposals[proposalId]; - - require(proposal.status == ProposalStatus.Passed, "GovernanceFacet: Proposal not passed"); - require(block.timestamp > proposal.endTime, "GovernanceFacet: Voting still active"); - - // Check timelock - uint256 executionTime = gs.proposalTimelocks[proposalId]; - if (executionTime > 0) { - require(block.timestamp >= executionTime, "GovernanceFacet: Timelock not expired"); - } - - proposal.status = ProposalStatus.Executed; - - // Execute actions if multi-action proposal - if (proposal.actions.length > 0) { - for (uint256 i = 0; i < proposal.actions.length; i++) { - Action storage action = proposal.actions[i]; - require(!action.executed, "GovernanceFacet: Action already executed"); - - (bool success, ) = action.target.call{value: action.value}(action.data); - require(success, "GovernanceFacet: Action execution failed"); - - action.executed = true; - } - } else { - // Execute proposal based on type (legacy single-action) - if (proposal.proposalType == ProposalType.TreasuryWithdrawal) { - _executeTreasuryWithdrawal(proposal.data); - } else if (proposal.proposalType == ProposalType.FacetUpgrade) { - _executeFacetUpgrade(proposal.data); - } else if (proposal.proposalType == ProposalType.EmergencyPause) { - _executeEmergencyPause(proposal.data); - } else if (proposal.proposalType == ProposalType.ComplianceChange) { - _executeComplianceChange(proposal.data); - } else if (proposal.proposalType == ProposalType.ParameterChange) { - _executeParameterChange(proposal.data); - } - } - - emit ProposalExecuted(proposalId); - } - - /** - * Create multi-action proposal - */ - function createMultiActionProposal( - string calldata description, - Action[] calldata actions, - uint256 votingPeriod - ) external onlyProposer returns (uint256 proposalId) { - GovernanceStorage storage gs = governanceStorage(); - proposalId = gs.proposalCount; - gs.proposalCount++; - - Proposal storage proposal = gs.proposals[proposalId]; - proposal.id = proposalId; - proposal.proposalType = ProposalType.ParameterChange; // Default type for multi-action - proposal.status = ProposalStatus.Pending; - proposal.proposer = msg.sender; - proposal.description = description; - proposal.startTime = block.timestamp; - proposal.endTime = block.timestamp + (votingPeriod > 0 ? votingPeriod : gs.votingPeriod); - proposal.forVotes = 0; - proposal.againstVotes = 0; - - // Store actions - for (uint256 i = 0; i < actions.length; i++) { - proposal.actions.push(actions[i]); - } - - if (votingPeriod == 0) { - proposal.status = ProposalStatus.Active; - } - - emit ProposalCreated(proposalId, proposal.proposalType, msg.sender); - } - - function cancelProposal(uint256 proposalId) external { - GovernanceStorage storage gs = governanceStorage(); - Proposal storage proposal = gs.proposals[proposalId]; - - require(proposal.proposer == msg.sender || LibAccessControl.hasRole(LibAccessControl.DEFAULT_ADMIN_ROLE, msg.sender), - "GovernanceFacet: Not authorized"); - require(proposal.status == ProposalStatus.Active || proposal.status == ProposalStatus.Pending, - "GovernanceFacet: Cannot cancel"); - - proposal.status = ProposalStatus.Rejected; - } - - function proposeTreasuryWithdrawal( - address recipient, - uint256 amount, - address token, - string calldata reason - ) external override returns (uint256 proposalId) { - bytes memory data = abi.encode(recipient, amount, token, reason); - return this.createProposal(ProposalType.TreasuryWithdrawal, reason, data, 0); - } - - function getProposal(uint256 proposalId) external view override returns ( - uint256 id, - ProposalType proposalType, - ProposalStatus status, - address proposer, - uint256 forVotes, - uint256 againstVotes, - uint256 startTime, - uint256 endTime - ) { - Proposal storage proposal = governanceStorage().proposals[proposalId]; - return ( - proposal.id, - proposal.proposalType, - proposal.status, - proposal.proposer, - proposal.forVotes, - proposal.againstVotes, - proposal.startTime, - proposal.endTime - ); - } - - function getTreasuryBalance(address token) external view override returns (uint256) { - return governanceStorage().treasuryBalances[token]; - } - - function _checkProposalStatus(uint256 proposalId) internal { - GovernanceStorage storage gs = governanceStorage(); - Proposal storage proposal = gs.proposals[proposalId]; - - uint256 totalVotes = proposal.forVotes + proposal.againstVotes; - - if (totalVotes >= gs.quorumThreshold) { - if (proposal.forVotes > proposal.againstVotes) { - proposal.status = ProposalStatus.Passed; - // Set timelock - if (gs.timelockDelay > 0) { - gs.proposalTimelocks[proposalId] = block.timestamp + gs.timelockDelay; - } - } else { - proposal.status = ProposalStatus.Rejected; - } - } - } - - function _getVotingPower(address voter) internal view returns (uint256) { - GovernanceStorage storage gs = governanceStorage(); - address delegatee = gs.delegations[voter]; - address account = delegatee != address(0) ? delegatee : voter; - - if (gs.governanceToken != address(0)) { - return IERC20(gs.governanceToken).balanceOf(account); - } - return 1; // Default: 1 vote per address - } - - // ============ Delegation Functions ============ - - function delegate(address delegatee) external override { - GovernanceStorage storage gs = governanceStorage(); - address currentDelegate = gs.delegations[msg.sender]; - uint256 previousBalance = _getVotingPower(msg.sender); - - gs.delegations[msg.sender] = delegatee; - - uint256 newBalance = _getVotingPower(msg.sender); - emit DelegationChanged(msg.sender, delegatee, previousBalance, newBalance); - } - - function delegateBySig( - address delegator, - address delegatee, - uint256 nonce, - uint256 expiry, - uint8 v, - bytes32 r, - bytes32 s - ) external override { - // EIP-712 signature verification would go here - // For now, simplified implementation - require(block.timestamp <= expiry, "GovernanceFacet: Signature expired"); - - GovernanceStorage storage gs = governanceStorage(); - address currentDelegate = gs.delegations[delegator]; - uint256 previousBalance = _getVotingPower(delegator); - - gs.delegations[delegator] = delegatee; - - uint256 newBalance = _getVotingPower(delegator); - emit DelegationChanged(delegator, delegatee, previousBalance, newBalance); - } - - function delegates(address delegator) external view override returns (address) { - GovernanceStorage storage gs = governanceStorage(); - address delegatee = gs.delegations[delegator]; - return delegatee != address(0) ? delegatee : delegator; - } - - function getCurrentVotes(address account) external view override returns (uint256) { - return _getVotingPower(account); - } - - function getPriorVotes(address account, uint256 blockNumber) external view override returns (uint256) { - // Simplified: return current votes (full implementation would use checkpoints) - return _getVotingPower(account); - } - - function _executeFacetUpgrade(bytes memory data) internal { - (IDiamondCut.FacetCut[] memory cuts, address init, bytes memory initData) = - abi.decode(data, (IDiamondCut.FacetCut[], address, bytes)); - - // Call DiamondCutFacet through Diamond - IDiamondCut(address(this)).diamondCut(cuts, init, initData); - } - - function _executeEmergencyPause(bytes memory data) internal { - ISecurityFacet.PauseReason reason = abi.decode(data, (ISecurityFacet.PauseReason)); - ISecurityFacet(address(this)).pauseSystem(reason); - } - - function _executeComplianceChange(bytes memory data) internal { - // Compliance changes would be executed here - // This is a placeholder for compliance-related actions - } - - function _executeParameterChange(bytes memory data) internal { - // Parameter changes would be executed here - // This is a placeholder for parameter updates - } - - function _executeTreasuryWithdrawal(bytes memory data) internal { - (address recipient, uint256 amount, address token, ) = abi.decode(data, (address, uint256, address, string)); - - GovernanceStorage storage gs = governanceStorage(); - require(gs.treasuryBalances[token] >= amount, "GovernanceFacet: Insufficient treasury balance"); - - gs.treasuryBalances[token] -= amount; - - if (token == address(0)) { - (bool success, ) = payable(recipient).call{value: amount}(""); - require(success, "GovernanceFacet: ETH transfer failed"); - } else { - IERC20(token).safeTransfer(recipient, amount); - } - - // Sync treasury balance - _syncTreasuryBalance(token); - - emit TreasuryWithdrawal(recipient, amount, token); - } - - function _syncTreasuryBalance(address token) internal { - GovernanceStorage storage gs = governanceStorage(); - if (token == address(0)) { - gs.treasuryBalances[token] = address(this).balance; - } else { - gs.treasuryBalances[token] = IERC20(token).balanceOf(address(this)); - } - } - - // ============ Admin Functions ============ - - function setGovernanceToken(address token) external { - LibAccessControl.requireRole(LibAccessControl.GOVERNANCE_ADMIN_ROLE, msg.sender); - governanceStorage().governanceToken = token; - } - - function setQuorumThreshold(uint256 threshold) external { - LibAccessControl.requireRole(LibAccessControl.GOVERNANCE_ADMIN_ROLE, msg.sender); - governanceStorage().quorumThreshold = threshold; - } - - function setTimelockDelay(uint256 delay) external { - LibAccessControl.requireRole(LibAccessControl.GOVERNANCE_ADMIN_ROLE, msg.sender); - governanceStorage().timelockDelay = delay; - } - - function syncTreasuryBalance(address token) external { - _syncTreasuryBalance(token); - } -} - diff --git a/contracts/src/core/facets/LiquidityFacet.sol b/contracts/src/core/facets/LiquidityFacet.sol deleted file mode 100644 index 700ad09..0000000 --- a/contracts/src/core/facets/LiquidityFacet.sol +++ /dev/null @@ -1,444 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {ILiquidityFacet} from "../../interfaces/ILiquidityFacet.sol"; -import {PMMMath} from "../../libraries/PMMMath.sol"; -import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; -import {LibAccessControl} from "../../libraries/LibAccessControl.sol"; -import {LibReentrancyGuard} from "../../libraries/LibReentrancyGuard.sol"; -import {IComplianceFacet} from "../../interfaces/IComplianceFacet.sol"; -import {ISecurityFacet} from "../../interfaces/ISecurityFacet.sol"; -import {IOracle} from "../../interfaces/IOracle.sol"; - -/** - * @title LiquidityFacet - * @notice Enhanced liquidity facet with PMM, fees, access control, and compliance - * @dev This facet manages DODO PMM pools with comprehensive security features - */ -contract LiquidityFacet is ILiquidityFacet { - using PMMMath for uint256; - using SafeERC20 for IERC20; - - struct LiquidityStorage { - mapping(uint256 => Pool) pools; - mapping(uint256 => PoolConfig) poolConfigs; // poolId => config - mapping(uint256 => mapping(address => uint256)) lpBalances; // poolId => user => lpShares - mapping(uint256 => uint256) totalLPSupply; // poolId => total LP supply - mapping(uint256 => address) priceFeeds; // poolId => Chainlink price feed - mapping(address => uint256) protocolFees; // token => accumulated fees - mapping(uint256 => mapping(address => uint256)) poolFees; // poolId => token => accumulated fees - uint256 poolCount; - uint256 defaultTradingFee; // Default trading fee in basis points (e.g., 30 = 0.3%) - uint256 defaultProtocolFee; // Default protocol fee in basis points - address feeCollector; // Address to receive protocol fees - } - - struct PoolConfig { - uint256 tradingFee; // Trading fee in basis points (0-10000) - uint256 protocolFee; // Protocol fee in basis points (0-10000) - bool paused; // Pool-specific pause - address oracle; // Chainlink price feed address - uint256 lastOracleUpdate; // Timestamp of last oracle update - uint256 oracleUpdateInterval; // Minimum interval between oracle updates - } - - bytes32 private constant LIQUIDITY_STORAGE_POSITION = keccak256("asle.liquidity.storage"); - - // Events - event PoolPaused(uint256 indexed poolId, bool paused); - event OraclePriceUpdated(uint256 indexed poolId, uint256 newPrice); - event TradingFeeCollected(uint256 indexed poolId, address token, uint256 amount); - event ProtocolFeeCollected(address token, uint256 amount); - event FeeCollectorUpdated(address newFeeCollector); - event PoolFeeUpdated(uint256 indexed poolId, uint256 tradingFee, uint256 protocolFee); - - function liquidityStorage() internal pure returns (LiquidityStorage storage ls) { - bytes32 position = LIQUIDITY_STORAGE_POSITION; - assembly { - ls.slot := position - } - } - - // ============ Access Control Modifiers ============ - - modifier onlyPoolCreator() { - LibAccessControl.requireRole(LibAccessControl.POOL_CREATOR_ROLE, msg.sender); - _; - } - - modifier onlyAdmin() { - LibAccessControl.requireRole(LibAccessControl.DEFAULT_ADMIN_ROLE, msg.sender); - _; - } - - modifier whenPoolNotPaused(uint256 poolId) { - LiquidityStorage storage ls = liquidityStorage(); - require(!ls.poolConfigs[poolId].paused, "LiquidityFacet: Pool is paused"); - _; - } - - modifier nonReentrant() { - LibReentrancyGuard.enter(); - _; - LibReentrancyGuard.exit(); - } - - // ============ Pool Creation ============ - - /** - * @notice Create a new PMM liquidity pool (backward compatible with interface) - */ - function createPool( - address baseToken, - address quoteToken, - uint256 initialBaseReserve, - uint256 initialQuoteReserve, - uint256 virtualBaseReserve, - uint256 virtualQuoteReserve, - uint256 k, - uint256 oraclePrice - ) external override returns (uint256 poolId) { - return _createPool( - baseToken, - quoteToken, - initialBaseReserve, - initialQuoteReserve, - virtualBaseReserve, - virtualQuoteReserve, - k, - oraclePrice, - address(0) - ); - } - - /** - * @notice Create a new PMM liquidity pool with oracle - */ - function createPoolWithOracle( - address baseToken, - address quoteToken, - uint256 initialBaseReserve, - uint256 initialQuoteReserve, - uint256 virtualBaseReserve, - uint256 virtualQuoteReserve, - uint256 k, - uint256 oraclePrice, - address oracle - ) external onlyPoolCreator returns (uint256 poolId) { - return _createPool( - baseToken, - quoteToken, - initialBaseReserve, - initialQuoteReserve, - virtualBaseReserve, - virtualQuoteReserve, - k, - oraclePrice, - oracle - ); - } - - function _createPool( - address baseToken, - address quoteToken, - uint256 initialBaseReserve, - uint256 initialQuoteReserve, - uint256 virtualBaseReserve, - uint256 virtualQuoteReserve, - uint256 k, - uint256 oraclePrice, - address oracle - ) internal returns (uint256 poolId) { - // Check if system is paused - ISecurityFacet securityFacet = ISecurityFacet(address(this)); - require(!securityFacet.isPaused(), "LiquidityFacet: System is paused"); - - require(baseToken != address(0) && quoteToken != address(0), "LiquidityFacet: Invalid tokens"); - require(baseToken != quoteToken, "LiquidityFacet: Tokens must be different"); - require(k <= 1e18, "LiquidityFacet: k must be <= 1"); - require(virtualBaseReserve > 0 && virtualQuoteReserve > 0, "LiquidityFacet: Virtual reserves must be > 0"); - require(oraclePrice > 0, "LiquidityFacet: Oracle price must be > 0"); - - LiquidityStorage storage ls = liquidityStorage(); - poolId = ls.poolCount; - ls.poolCount++; - - Pool storage pool = ls.pools[poolId]; - pool.baseToken = baseToken; - pool.quoteToken = quoteToken; - pool.baseReserve = initialBaseReserve; - pool.quoteReserve = initialQuoteReserve; - pool.virtualBaseReserve = virtualBaseReserve; - pool.virtualQuoteReserve = virtualQuoteReserve; - pool.k = k; - pool.oraclePrice = oraclePrice; - pool.active = true; - - // Set pool configuration - PoolConfig storage config = ls.poolConfigs[poolId]; - config.tradingFee = ls.defaultTradingFee > 0 ? ls.defaultTradingFee : 30; // 0.3% default - config.protocolFee = ls.defaultProtocolFee > 0 ? ls.defaultProtocolFee : 10; // 0.1% default - config.paused = false; - config.oracle = oracle; - config.lastOracleUpdate = block.timestamp; - config.oracleUpdateInterval = 3600; // 1 hour default - - // Transfer initial tokens - if (initialBaseReserve > 0) { - IERC20(baseToken).safeTransferFrom(msg.sender, address(this), initialBaseReserve); - } - if (initialQuoteReserve > 0) { - IERC20(quoteToken).safeTransferFrom(msg.sender, address(this), initialQuoteReserve); - } - - emit PoolCreated(poolId, baseToken, quoteToken); - } - - // ============ Liquidity Management ============ - - /** - * @notice Add liquidity to a pool - */ - function addLiquidity( - uint256 poolId, - uint256 baseAmount, - uint256 quoteAmount - ) external override whenPoolNotPaused(poolId) nonReentrant returns (uint256 lpShares) { - // Check compliance - IComplianceFacet complianceFacet = IComplianceFacet(address(this)); - IComplianceFacet.ComplianceMode mode = complianceFacet.getVaultComplianceMode(poolId); - require(complianceFacet.canAccess(msg.sender, mode), "LiquidityFacet: Compliance check failed"); - - LiquidityStorage storage ls = liquidityStorage(); - Pool storage pool = ls.pools[poolId]; - require(pool.active, "LiquidityFacet: Pool not active"); - - // Transfer tokens - if (baseAmount > 0) { - IERC20(pool.baseToken).safeTransferFrom(msg.sender, address(this), baseAmount); - } - if (quoteAmount > 0) { - IERC20(pool.quoteToken).safeTransferFrom(msg.sender, address(this), quoteAmount); - } - - // Calculate LP shares - lpShares = PMMMath.calculateLPShares( - baseAmount, - quoteAmount, - pool.baseReserve, - pool.quoteReserve, - ls.totalLPSupply[poolId] - ); - - // Update reserves - pool.baseReserve += baseAmount; - pool.quoteReserve += quoteAmount; - ls.lpBalances[poolId][msg.sender] += lpShares; - ls.totalLPSupply[poolId] += lpShares; - - emit LiquidityAdded(poolId, msg.sender, baseAmount, quoteAmount); - } - - // ============ Swapping ============ - - /** - * @notice Execute a swap in the pool - */ - function swap( - uint256 poolId, - address tokenIn, - uint256 amountIn, - uint256 minAmountOut - ) external override whenPoolNotPaused(poolId) nonReentrant returns (uint256 amountOut) { - // Check security (circuit breaker) - ISecurityFacet securityFacet = ISecurityFacet(address(this)); - require(securityFacet.checkCircuitBreaker(poolId, amountIn), "LiquidityFacet: Circuit breaker triggered"); - - // Check compliance - IComplianceFacet complianceFacet = IComplianceFacet(address(this)); - require( - complianceFacet.validateTransaction(msg.sender, address(this), amountIn), - "LiquidityFacet: Compliance validation failed" - ); - - LiquidityStorage storage ls = liquidityStorage(); - Pool storage pool = ls.pools[poolId]; - require(pool.active, "LiquidityFacet: Pool not active"); - require(tokenIn == pool.baseToken || tokenIn == pool.quoteToken, "LiquidityFacet: Invalid token"); - - // Update oracle price if available and needed - _updateOraclePrice(poolId); - - // Transfer input token - IERC20(tokenIn).safeTransferFrom(msg.sender, address(this), amountIn); - - bool isBaseIn = (tokenIn == pool.baseToken); - address tokenOut = isBaseIn ? pool.quoteToken : pool.baseToken; - - // Calculate output using PMM formula - amountOut = PMMMath.calculateSwapOutput( - amountIn, - isBaseIn ? pool.baseReserve : pool.quoteReserve, - isBaseIn ? pool.quoteReserve : pool.baseReserve, - isBaseIn ? pool.virtualBaseReserve : pool.virtualQuoteReserve, - isBaseIn ? pool.virtualQuoteReserve : pool.virtualBaseReserve, - pool.k, - pool.oraclePrice - ); - - require(amountOut >= minAmountOut, "LiquidityFacet: Slippage too high"); - - // Calculate and collect fees - PoolConfig storage config = ls.poolConfigs[poolId]; - uint256 tradingFeeAmount = (amountOut * config.tradingFee) / 10000; - uint256 protocolFeeAmount = (tradingFeeAmount * config.protocolFee) / 10000; - uint256 poolFeeAmount = tradingFeeAmount - protocolFeeAmount; - - amountOut -= tradingFeeAmount; - - // Update reserves (after fees) - if (isBaseIn) { - pool.baseReserve += amountIn; - pool.quoteReserve -= (amountOut + tradingFeeAmount); - } else { - pool.quoteReserve += amountIn; - pool.baseReserve -= (amountOut + tradingFeeAmount); - } - - // Collect fees - if (poolFeeAmount > 0) { - ls.poolFees[poolId][tokenOut] += poolFeeAmount; - } - if (protocolFeeAmount > 0) { - ls.protocolFees[tokenOut] += protocolFeeAmount; - } - - // Transfer output token - IERC20(tokenOut).safeTransfer(msg.sender, amountOut); - - emit Swap(poolId, msg.sender, tokenIn, tokenOut, amountIn, amountOut); - emit TradingFeeCollected(poolId, tokenOut, tradingFeeAmount); - } - - // ============ View Functions ============ - - function getPool(uint256 poolId) external view override returns (Pool memory) { - return liquidityStorage().pools[poolId]; - } - - function getPrice(uint256 poolId) external view override returns (uint256) { - Pool memory pool = liquidityStorage().pools[poolId]; - return PMMMath.calculatePrice( - pool.oraclePrice, - pool.k, - pool.quoteReserve, - pool.virtualQuoteReserve - ); - } - - function getQuote( - uint256 poolId, - address tokenIn, - uint256 amountIn - ) external view override returns (uint256 amountOut) { - Pool memory pool = liquidityStorage().pools[poolId]; - require(tokenIn == pool.baseToken || tokenIn == pool.quoteToken, "LiquidityFacet: Invalid token"); - - bool isBaseIn = (tokenIn == pool.baseToken); - amountOut = PMMMath.calculateSwapOutput( - amountIn, - isBaseIn ? pool.baseReserve : pool.quoteReserve, - isBaseIn ? pool.quoteReserve : pool.baseReserve, - isBaseIn ? pool.virtualBaseReserve : pool.virtualQuoteReserve, - isBaseIn ? pool.virtualQuoteReserve : pool.virtualBaseReserve, - pool.k, - pool.oraclePrice - ); - } - - // ============ Admin Functions ============ - - /** - * @notice Update oracle price for a pool - */ - function updateOraclePrice(uint256 poolId) external { - _updateOraclePrice(poolId); - } - - function _updateOraclePrice(uint256 poolId) internal { - LiquidityStorage storage ls = liquidityStorage(); - PoolConfig storage config = ls.poolConfigs[poolId]; - - if (config.oracle == address(0)) return; - if (block.timestamp < config.lastOracleUpdate + config.oracleUpdateInterval) return; - - try IOracle(config.oracle).latestRoundData() returns ( - uint80, - int256 price, - uint256, - uint256 updatedAt, - uint80 - ) { - require(price > 0, "LiquidityFacet: Invalid oracle price"); - require(updatedAt > 0, "LiquidityFacet: Stale oracle data"); - - Pool storage pool = ls.pools[poolId]; - pool.oraclePrice = uint256(price); - config.lastOracleUpdate = block.timestamp; - - emit OraclePriceUpdated(poolId, uint256(price)); - } catch { - // Oracle call failed, skip update - } - } - - /** - * @notice Pause or unpause a pool - */ - function setPoolPaused(uint256 poolId, bool paused) external onlyAdmin { - LiquidityStorage storage ls = liquidityStorage(); - ls.poolConfigs[poolId].paused = paused; - emit PoolPaused(poolId, paused); - } - - /** - * @notice Set pool fees - */ - function setPoolFees(uint256 poolId, uint256 tradingFee, uint256 protocolFee) external onlyAdmin { - require(tradingFee <= 1000, "LiquidityFacet: Trading fee too high"); // Max 10% - require(protocolFee <= 5000, "LiquidityFacet: Protocol fee too high"); // Max 50% of trading fee - - LiquidityStorage storage ls = liquidityStorage(); - ls.poolConfigs[poolId].tradingFee = tradingFee; - ls.poolConfigs[poolId].protocolFee = protocolFee; - emit PoolFeeUpdated(poolId, tradingFee, protocolFee); - } - - /** - * @notice Set Chainlink oracle for a pool - */ - function setPoolOracle(uint256 poolId, address oracle) external onlyAdmin { - LiquidityStorage storage ls = liquidityStorage(); - ls.poolConfigs[poolId].oracle = oracle; - } - - /** - * @notice Collect protocol fees - */ - function collectProtocolFees(address token) external { - LiquidityStorage storage ls = liquidityStorage(); - address collector = ls.feeCollector != address(0) ? ls.feeCollector : msg.sender; - require(collector == msg.sender || LibAccessControl.hasRole(LibAccessControl.FEE_COLLECTOR_ROLE, msg.sender), - "LiquidityFacet: Not authorized"); - - uint256 amount = ls.protocolFees[token]; - require(amount > 0, "LiquidityFacet: No fees to collect"); - - ls.protocolFees[token] = 0; - IERC20(token).safeTransfer(collector, amount); - - emit ProtocolFeeCollected(token, amount); - } -} - diff --git a/contracts/src/core/facets/ProposalTemplateFacet.sol b/contracts/src/core/facets/ProposalTemplateFacet.sol deleted file mode 100644 index c32b290..0000000 --- a/contracts/src/core/facets/ProposalTemplateFacet.sol +++ /dev/null @@ -1,103 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {IProposalTemplateFacet} from "../../interfaces/IProposalTemplateFacet.sol"; -import {IGovernanceFacet} from "../../interfaces/IGovernanceFacet.sol"; -import {LibAccessControl} from "../../libraries/LibAccessControl.sol"; - -contract ProposalTemplateFacet is IProposalTemplateFacet { - struct TemplateStorage { - mapping(uint256 => ProposalTemplate) templates; - uint256 templateCount; - } - - bytes32 private constant TEMPLATE_STORAGE_POSITION = keccak256("asle.proposaltemplate.storage"); - - function templateStorage() internal pure returns (TemplateStorage storage ts) { - bytes32 position = TEMPLATE_STORAGE_POSITION; - assembly { - ts.slot := position - } - } - - modifier onlyAdmin() { - LibAccessControl.requireRole(LibAccessControl.DEFAULT_ADMIN_ROLE, msg.sender); - _; - } - - function createTemplate( - string calldata name, - string calldata description, - IGovernanceFacet.ProposalType proposalType, - bytes calldata templateData - ) external override onlyAdmin returns (uint256 templateId) { - TemplateStorage storage ts = templateStorage(); - templateId = ts.templateCount; - ts.templateCount++; - - ts.templates[templateId] = ProposalTemplate({ - id: templateId, - name: name, - description: description, - proposalType: proposalType, - templateData: templateData, - active: true - }); - - emit TemplateCreated(templateId, name, proposalType); - } - - function getTemplate(uint256 templateId) external view override returns ( - uint256 id, - string memory name, - string memory description, - IGovernanceFacet.ProposalType proposalType, - bytes memory templateData, - bool active - ) { - TemplateStorage storage ts = templateStorage(); - ProposalTemplate storage template = ts.templates[templateId]; - require(template.id != 0 || templateId == 0, "ProposalTemplateFacet: Template not found"); - - return ( - template.id, - template.name, - template.description, - template.proposalType, - template.templateData, - template.active - ); - } - - function setTemplateActive(uint256 templateId, bool active) external override onlyAdmin { - TemplateStorage storage ts = templateStorage(); - require(ts.templates[templateId].id != 0 || templateId == 0, "ProposalTemplateFacet: Template not found"); - - ts.templates[templateId].active = active; - emit TemplateUpdated(templateId, active); - } - - function createProposalFromTemplate( - uint256 templateId, - bytes calldata parameters, - uint256 votingPeriod - ) external override returns (uint256 proposalId) { - TemplateStorage storage ts = templateStorage(); - ProposalTemplate storage template = ts.templates[templateId]; - require(template.id != 0 || templateId == 0, "ProposalTemplateFacet: Template not found"); - require(template.active, "ProposalTemplateFacet: Template not active"); - - // Merge template data with parameters - bytes memory proposalData = abi.encodePacked(template.templateData, parameters); - - // Call GovernanceFacet to create proposal - IGovernanceFacet governanceFacet = IGovernanceFacet(address(this)); - proposalId = governanceFacet.createProposal( - template.proposalType, - template.description, - proposalData, - votingPeriod - ); - } -} - diff --git a/contracts/src/core/facets/RWAFacet.sol b/contracts/src/core/facets/RWAFacet.sol deleted file mode 100644 index 2f8d069..0000000 --- a/contracts/src/core/facets/RWAFacet.sol +++ /dev/null @@ -1,189 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {IRWAFacet} from "../../interfaces/IRWAFacet.sol"; -import {IERC1404} from "../../interfaces/IERC1404.sol"; -import {IComplianceFacet} from "../../interfaces/IComplianceFacet.sol"; -import {IOracle} from "../../interfaces/IOracle.sol"; -import {LibAccessControl} from "../../libraries/LibAccessControl.sol"; -import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; - -contract RWAFacet is IRWAFacet, IERC1404 { - using SafeERC20 for IERC20; - - struct RWAStorage { - mapping(uint256 => RWA) rwas; - mapping(uint256 => address) valueOracles; // tokenId => oracle address - mapping(uint256 => bool) transferRestricted; // tokenId => restricted - mapping(uint256 => uint256) lastValueUpdate; // tokenId => timestamp - uint256 rwaCount; - } - - // ERC-1404 restriction codes - uint8 private constant SUCCESS = 0; - uint8 private constant COMPLIANCE_FAILURE = 1; - uint8 private constant HOLDER_NOT_VERIFIED = 2; - uint8 private constant TRANSFER_RESTRICTED = 3; - - bytes32 private constant RWA_STORAGE_POSITION = keccak256("asle.rwa.storage"); - - function rwaStorage() internal pure returns (RWAStorage storage rs) { - bytes32 position = RWA_STORAGE_POSITION; - assembly { - rs.slot := position - } - } - - function tokenizeRWA( - address assetContract, - string calldata assetType, - uint256 totalValue, - bytes calldata complianceData - ) external override returns (uint256 tokenId) { - // Check compliance - RWA tokenization typically requires Regulated mode - IComplianceFacet complianceFacet = IComplianceFacet(address(this)); - require( - complianceFacet.canAccess(msg.sender, IComplianceFacet.ComplianceMode.Regulated), - "RWAFacet: Regulated compliance required" - ); - - RWAStorage storage rs = rwaStorage(); - tokenId = rs.rwaCount; - rs.rwaCount++; - - RWA storage rwa = rs.rwas[tokenId]; - rwa.tokenId = tokenId; - rwa.assetContract = assetContract; - rwa.assetType = assetType; - rwa.totalValue = totalValue; - rwa.fractionalizedAmount = 0; - rwa.active = true; - rs.lastValueUpdate[tokenId] = block.timestamp; - - emit RWATokenized(tokenId, assetContract, assetType, totalValue); - } - - function fractionalizeRWA( - uint256 tokenId, - uint256 amount, - address recipient - ) external override returns (uint256 shares) { - RWAStorage storage rs = rwaStorage(); - RWA storage rwa = rs.rwas[tokenId]; - - require(rwa.active, "RWAFacet: RWA not active"); - require(amount > 0, "RWAFacet: Amount must be > 0"); - require(rwa.fractionalizedAmount + amount <= rwa.totalValue, "RWAFacet: Exceeds total value"); - - // Verify recipient compliance - IComplianceFacet complianceFacet = IComplianceFacet(address(this)); - require( - complianceFacet.canAccess(recipient, IComplianceFacet.ComplianceMode.Regulated), - "RWAFacet: Recipient must have regulated compliance" - ); - require( - complianceFacet.validateTransaction(msg.sender, recipient, amount), - "RWAFacet: Compliance validation failed" - ); - - rwa.fractionalizedAmount += amount; - rwa.verifiedHolders[recipient] = true; - - shares = amount; // 1:1 for simplicity, could use different ratio - - emit RWAFractionalized(tokenId, recipient, amount); - } - - function getRWA(uint256 tokenId) external view override returns ( - address assetContract, - string memory assetType, - uint256 totalValue, - uint256 fractionalizedAmount, - bool active - ) { - RWA storage rwa = rwaStorage().rwas[tokenId]; - return ( - rwa.assetContract, - rwa.assetType, - rwa.totalValue, - rwa.fractionalizedAmount, - rwa.active - ); - } - - function verifyHolder(uint256 tokenId, address holder) external view override returns (bool) { - return rwaStorage().rwas[tokenId].verifiedHolders[holder]; - } - - // ============ ERC-1404 Transfer Restrictions ============ - - function detectTransferRestriction(address from, address to, uint256 amount) external view override returns (uint8) { - // Find which RWA token this relates to (simplified - in production would need token mapping) - RWAStorage storage rs = rwaStorage(); - - // Check compliance - IComplianceFacet complianceFacet = IComplianceFacet(address(this)); - if (!complianceFacet.validateTransaction(from, to, amount)) { - return COMPLIANCE_FAILURE; - } - - // Check holder verification for all RWAs - // In production, would check specific token - for (uint256 i = 0; i < rs.rwaCount; i++) { - if (rs.transferRestricted[i]) { - if (!rs.rwas[i].verifiedHolders[to]) { - return HOLDER_NOT_VERIFIED; - } - } - } - - return SUCCESS; - } - - function messageForTransferRestriction(uint8 restrictionCode) external pure override returns (string memory) { - if (restrictionCode == COMPLIANCE_FAILURE) return "Transfer failed compliance check"; - if (restrictionCode == HOLDER_NOT_VERIFIED) return "Recipient not verified holder"; - if (restrictionCode == TRANSFER_RESTRICTED) return "Transfer restricted for this token"; - return "Transfer allowed"; - } - - // ============ Asset Value Management ============ - - function updateAssetValue(uint256 tokenId, address oracle) external { - LibAccessControl.requireRole(LibAccessControl.DEFAULT_ADMIN_ROLE, msg.sender); - RWAStorage storage rs = rwaStorage(); - rs.valueOracles[tokenId] = oracle; - rs.lastValueUpdate[tokenId] = block.timestamp; - } - - function getAssetValue(uint256 tokenId) external view returns (uint256) { - RWAStorage storage rs = rwaStorage(); - address oracle = rs.valueOracles[tokenId]; - - if (oracle == address(0)) { - return rs.rwas[tokenId].totalValue; - } - - try IOracle(oracle).latestRoundData() returns ( - uint80, - int256 price, - uint256, - uint256 updatedAt, - uint80 - ) { - require(price > 0, "RWAFacet: Invalid oracle price"); - require(updatedAt > 0, "RWAFacet: Stale oracle data"); - return uint256(price); - } catch { - return rs.rwas[tokenId].totalValue; // Fallback to stored value - } - } - - function setTransferRestricted(uint256 tokenId, bool restricted) external { - LibAccessControl.requireRole(LibAccessControl.DEFAULT_ADMIN_ROLE, msg.sender); - rwaStorage().transferRestricted[tokenId] = restricted; - } -} - - diff --git a/contracts/src/core/facets/SecurityFacet.sol b/contracts/src/core/facets/SecurityFacet.sol deleted file mode 100644 index e836a02..0000000 --- a/contracts/src/core/facets/SecurityFacet.sol +++ /dev/null @@ -1,218 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {ISecurityFacet} from "../../interfaces/ISecurityFacet.sol"; -import {LibDiamond} from "../../libraries/LibDiamond.sol"; -import {LibAccessControl} from "../../libraries/LibAccessControl.sol"; -import {ILiquidityFacet} from "../../interfaces/ILiquidityFacet.sol"; - -contract SecurityFacet is ISecurityFacet { - struct SecurityStorage { - bool paused; - PauseReason pauseReason; - address pausedBy; - uint256 pauseTime; - uint256 maxPauseDuration; // Maximum pause duration in seconds (0 = unlimited) - mapping(uint256 => CircuitBreaker) circuitBreakers; - mapping(string => uint256) lastAuditTime; - mapping(uint256 => uint256) poolPriceHistory; // poolId => last price - mapping(uint256 => uint256) maxPriceDeviation; // poolId => max deviation in basis points - } - - bytes32 private constant SECURITY_STORAGE_POSITION = keccak256("asle.security.storage"); - - function securityStorage() internal pure returns (SecurityStorage storage ss) { - bytes32 position = SECURITY_STORAGE_POSITION; - assembly { - ss.slot := position - } - } - - modifier whenNotPaused() { - require(!securityStorage().paused, "SecurityFacet: System is paused"); - _; - } - - modifier onlyAuthorized() { - require( - LibAccessControl.hasRole(LibAccessControl.SECURITY_ADMIN_ROLE, msg.sender) || - LibAccessControl.hasRole(LibAccessControl.DEFAULT_ADMIN_ROLE, msg.sender), - "SecurityFacet: Not authorized" - ); - _; - } - - function pauseSystem(PauseReason reason) external override onlyAuthorized { - SecurityStorage storage ss = securityStorage(); - require(!ss.paused, "SecurityFacet: Already paused"); - - ss.paused = true; - ss.pauseReason = reason; - ss.pausedBy = msg.sender; - ss.pauseTime = block.timestamp; - - emit SystemPaused(reason, msg.sender); - } - - function pauseSystemWithDuration(PauseReason reason, uint256 duration) external onlyAuthorized { - SecurityStorage storage ss = securityStorage(); - require(!ss.paused, "SecurityFacet: Already paused"); - - ss.paused = true; - ss.pauseReason = reason; - ss.pausedBy = msg.sender; - ss.pauseTime = block.timestamp; - ss.maxPauseDuration = duration; - - emit SystemPaused(reason, msg.sender); - } - - function unpauseSystem() external override onlyAuthorized { - SecurityStorage storage ss = securityStorage(); - require(ss.paused, "SecurityFacet: Not paused"); - - // Check if pause has expired (if max duration is set) - if (ss.maxPauseDuration > 0) { - require(block.timestamp >= ss.pauseTime + ss.maxPauseDuration, "SecurityFacet: Pause duration not expired"); - } - - ss.paused = false; - address unpauser = msg.sender; - ss.maxPauseDuration = 0; - - emit SystemUnpaused(unpauser); - } - - function isPaused() external view override returns (bool) { - return securityStorage().paused; - } - - function setCircuitBreaker( - uint256 poolId, - uint256 threshold, - uint256 timeWindow - ) external override onlyAuthorized { - SecurityStorage storage ss = securityStorage(); - ss.circuitBreakers[poolId] = CircuitBreaker({ - threshold: threshold, - timeWindow: timeWindow, - currentValue: 0, - windowStart: block.timestamp, - triggered: false - }); - } - - function checkCircuitBreaker(uint256 poolId, uint256 value) external override returns (bool) { - SecurityStorage storage ss = securityStorage(); - CircuitBreaker storage cb = ss.circuitBreakers[poolId]; - - if (cb.triggered) { - return false; // Circuit breaker already triggered - } - - // Reset window if expired - if (block.timestamp > cb.windowStart + cb.timeWindow) { - cb.windowStart = block.timestamp; - cb.currentValue = 0; - } - - cb.currentValue += value; - - if (cb.currentValue > cb.threshold) { - cb.triggered = true; - emit CircuitBreakerTriggered(poolId, cb.currentValue); - - // Automatically pause if circuit breaker triggers - if (!ss.paused) { - ss.paused = true; - ss.pauseReason = PauseReason.CircuitBreaker; - ss.pausedBy = address(this); - ss.pauseTime = block.timestamp; - emit SystemPaused(PauseReason.CircuitBreaker, address(this)); - } - - return false; - } - - return true; - } - - function resetCircuitBreaker(uint256 poolId) external onlyAuthorized { - SecurityStorage storage ss = securityStorage(); - CircuitBreaker storage cb = ss.circuitBreakers[poolId]; - require(cb.triggered, "SecurityFacet: Circuit breaker not triggered"); - - cb.triggered = false; - cb.currentValue = 0; - cb.windowStart = block.timestamp; - } - - function triggerCircuitBreaker(uint256 poolId) external override { - SecurityStorage storage ss = securityStorage(); - CircuitBreaker storage cb = ss.circuitBreakers[poolId]; - - require(!cb.triggered, "SecurityFacet: Already triggered"); - - cb.triggered = true; - emit CircuitBreakerTriggered(poolId, cb.currentValue); - - // Optionally pause the system - // Note: This would need to be called externally or through Diamond - // pauseSystem(PauseReason.CircuitBreaker); - } - - function recordSecurityAudit(string calldata auditType, bool passed) external override onlyAuthorized { - SecurityStorage storage ss = securityStorage(); - ss.lastAuditTime[auditType] = block.timestamp; - - emit SecurityAudit(block.timestamp, auditType, passed); - - if (!passed && !ss.paused) { - ss.paused = true; - ss.pauseReason = PauseReason.ComplianceViolation; - ss.pausedBy = msg.sender; - ss.pauseTime = block.timestamp; - emit SystemPaused(PauseReason.ComplianceViolation, msg.sender); - } - } - - function checkPriceDeviation(uint256 poolId, uint256 currentPrice) external returns (bool) { - SecurityStorage storage ss = securityStorage(); - uint256 lastPrice = ss.poolPriceHistory[poolId]; - uint256 maxDeviation = ss.maxPriceDeviation[poolId]; - - if (lastPrice == 0) { - ss.poolPriceHistory[poolId] = currentPrice; - return true; - } - - if (maxDeviation == 0) { - maxDeviation = 1000; // Default 10% deviation - } - - uint256 deviation; - if (currentPrice > lastPrice) { - deviation = ((currentPrice - lastPrice) * 10000) / lastPrice; - } else { - deviation = ((lastPrice - currentPrice) * 10000) / lastPrice; - } - - if (deviation > maxDeviation) { - // Trigger circuit breaker or pause - CircuitBreaker storage cb = ss.circuitBreakers[poolId]; - if (!cb.triggered) { - cb.triggered = true; - emit CircuitBreakerTriggered(poolId, deviation); - } - return false; - } - - ss.poolPriceHistory[poolId] = currentPrice; - return true; - } - - function setMaxPriceDeviation(uint256 poolId, uint256 maxDeviation) external onlyAuthorized { - securityStorage().maxPriceDeviation[poolId] = maxDeviation; - } -} - diff --git a/contracts/src/core/facets/VaultFacet.sol b/contracts/src/core/facets/VaultFacet.sol deleted file mode 100644 index c80c75c..0000000 --- a/contracts/src/core/facets/VaultFacet.sol +++ /dev/null @@ -1,585 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {IVaultFacet} from "../../interfaces/IVaultFacet.sol"; -import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import {IERC1155} from "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; -import {IERC1155Receiver} from "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; -import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; -import {LibAccessControl} from "../../libraries/LibAccessControl.sol"; -import {LibReentrancyGuard} from "../../libraries/LibReentrancyGuard.sol"; -import {IComplianceFacet} from "../../interfaces/IComplianceFacet.sol"; -import {ISecurityFacet} from "../../interfaces/ISecurityFacet.sol"; - -/** - * @title VaultFacet - * @notice Complete ERC-4626 and ERC-1155 vault implementation with fees, access control, and compliance - * @dev Implements tokenized vault standard with multi-asset support - */ -contract VaultFacet is IVaultFacet, IERC1155Receiver { - using SafeERC20 for IERC20; - - struct VaultStorage { - mapping(uint256 => Vault) vaults; - mapping(uint256 => VaultConfig) vaultConfigs; // vaultId => config - mapping(uint256 => mapping(address => uint256)) balances; // vaultId => user => shares - mapping(uint256 => mapping(address => mapping(address => uint256))) allowances; // vaultId => owner => spender => amount - mapping(uint256 => mapping(address => mapping(uint256 => uint256))) multiAssetBalances; // vaultId => user => tokenId => balance - mapping(uint256 => address[]) multiAssetTokens; // vaultId => token addresses - mapping(address => uint256) protocolFees; // token => accumulated fees - mapping(uint256 => mapping(address => uint256)) vaultFees; // vaultId => token => accumulated fees - uint256 vaultCount; - uint256 defaultDepositFee; // Default deposit fee in basis points - uint256 defaultWithdrawalFee; // Default withdrawal fee in basis points - uint256 defaultManagementFee; // Default management fee per year in basis points - address feeCollector; - } - - struct VaultConfig { - uint256 depositFee; // Deposit fee in basis points (0-10000) - uint256 withdrawalFee; // Withdrawal fee in basis points (0-10000) - uint256 managementFee; // Management fee per year in basis points - uint256 lastFeeCollection; // Timestamp of last fee collection - bool paused; // Vault-specific pause - bool allowListEnabled; // Enable allowlist for deposits - mapping(address => bool) allowedAddresses; // Allowlist addresses - } - - bytes32 private constant VAULT_STORAGE_POSITION = keccak256("asle.vault.storage"); - uint256 private constant MAX_BPS = 10000; - uint256 private constant SECONDS_PER_YEAR = 365 days; - - // Events - event VaultPaused(uint256 indexed vaultId, bool paused); - event FeeCollected(uint256 indexed vaultId, address token, uint256 amount); - event ProtocolFeeCollected(address token, uint256 amount); - event Approval(uint256 indexed vaultId, address indexed owner, address indexed spender, uint256 value); - event MultiAssetDeposit(uint256 indexed vaultId, address indexed user, address token, uint256 tokenId, uint256 amount); - event MultiAssetWithdraw(uint256 indexed vaultId, address indexed user, address token, uint256 tokenId, uint256 amount); - - function vaultStorage() internal pure returns (VaultStorage storage vs) { - bytes32 position = VAULT_STORAGE_POSITION; - assembly { - vs.slot := position - } - } - - // ============ Modifiers ============ - - modifier onlyVaultCreator() { - LibAccessControl.requireRole(LibAccessControl.VAULT_CREATOR_ROLE, msg.sender); - _; - } - - modifier onlyAdmin() { - LibAccessControl.requireRole(LibAccessControl.DEFAULT_ADMIN_ROLE, msg.sender); - _; - } - - modifier whenVaultNotPaused(uint256 vaultId) { - VaultStorage storage vs = vaultStorage(); - require(!vs.vaultConfigs[vaultId].paused, "VaultFacet: Vault is paused"); - _; - } - - modifier nonReentrant() { - LibReentrancyGuard.enter(); - _; - LibReentrancyGuard.exit(); - } - - // ============ Vault Creation ============ - - /** - * @notice Create a new vault (ERC-4626 or ERC-1155) - */ - function createVault( - address asset, - bool isMultiAsset - ) external override returns (uint256 vaultId) { - if (!isMultiAsset) { - require(asset != address(0), "VaultFacet: Asset required for ERC-4626"); - } - - VaultStorage storage vs = vaultStorage(); - vaultId = vs.vaultCount; - vs.vaultCount++; - - Vault storage vault = vs.vaults[vaultId]; - vault.asset = asset; - vault.isMultiAsset = isMultiAsset; - vault.totalAssets = 0; - vault.totalSupply = 0; - vault.active = true; - - // Set default configuration - VaultConfig storage config = vs.vaultConfigs[vaultId]; - config.depositFee = vs.defaultDepositFee > 0 ? vs.defaultDepositFee : 0; - config.withdrawalFee = vs.defaultWithdrawalFee > 0 ? vs.defaultWithdrawalFee : 0; - config.managementFee = vs.defaultManagementFee > 0 ? vs.defaultManagementFee : 0; - config.lastFeeCollection = block.timestamp; - config.paused = false; - config.allowListEnabled = false; - - emit VaultCreated(vaultId, asset, isMultiAsset); - } - - // ============ ERC-4626 Functions ============ - - /** - * @notice Returns the asset token address - */ - function asset(uint256 vaultId) external view returns (address) { - return vaultStorage().vaults[vaultId].asset; - } - - /** - * @notice Returns total assets managed by vault - */ - function totalAssets(uint256 vaultId) external view returns (uint256) { - Vault storage vault = vaultStorage().vaults[vaultId]; - return vault.totalAssets; - } - - /** - * @notice Convert assets to shares - */ - function convertToShares( - uint256 vaultId, - uint256 assets - ) public view override returns (uint256 shares) { - Vault storage vault = vaultStorage().vaults[vaultId]; - if (vault.totalSupply == 0) { - shares = assets; // 1:1 for first deposit - } else { - shares = (assets * vault.totalSupply) / vault.totalAssets; - } - } - - /** - * @notice Convert shares to assets - */ - function convertToAssets( - uint256 vaultId, - uint256 shares - ) public view override returns (uint256 assets) { - Vault storage vault = vaultStorage().vaults[vaultId]; - if (vault.totalSupply == 0) { - assets = 0; - } else { - assets = (shares * vault.totalAssets) / vault.totalSupply; - } - } - - /** - * @notice Maximum assets that can be deposited - */ - function maxDeposit(uint256 vaultId, address) external pure returns (uint256) { - return type(uint256).max; // No deposit limit - } - - /** - * @notice Preview shares for deposit - */ - function previewDeposit(uint256 vaultId, uint256 assets) external view returns (uint256) { - VaultConfig storage config = vaultStorage().vaultConfigs[vaultId]; - uint256 assetsAfterFee = assets - (assets * config.depositFee / MAX_BPS); - return convertToShares(vaultId, assetsAfterFee); - } - - /** - * @notice Deposit assets and receive shares - */ - function deposit( - uint256 vaultId, - uint256 assets, - address receiver - ) external override whenVaultNotPaused(vaultId) nonReentrant returns (uint256 shares) { - // Check compliance - IComplianceFacet complianceFacet = IComplianceFacet(address(this)); - IComplianceFacet.ComplianceMode mode = complianceFacet.getVaultComplianceMode(vaultId); - require(complianceFacet.canAccess(msg.sender, mode), "VaultFacet: Compliance check failed"); - - VaultStorage storage vs = vaultStorage(); - Vault storage vault = vs.vaults[vaultId]; - require(vault.active, "VaultFacet: Vault not active"); - require(!vault.isMultiAsset, "VaultFacet: Use multi-asset deposit for ERC-1155 vaults"); - require(assets > 0, "VaultFacet: Assets must be > 0"); - - // Check allowlist if enabled - VaultConfig storage config = vs.vaultConfigs[vaultId]; - if (config.allowListEnabled) { - require(config.allowedAddresses[msg.sender], "VaultFacet: Address not allowed"); - } - - IERC20 assetToken = IERC20(vault.asset); - assetToken.safeTransferFrom(msg.sender, address(this), assets); - - // Calculate and collect deposit fee - uint256 depositFeeAmount = (assets * config.depositFee) / MAX_BPS; - uint256 assetsAfterFee = assets - depositFeeAmount; - - if (depositFeeAmount > 0) { - vs.vaultFees[vaultId][vault.asset] += depositFeeAmount; - } - - shares = convertToShares(vaultId, assetsAfterFee); - vault.totalAssets += assetsAfterFee; - vault.totalSupply += shares; - vs.balances[vaultId][receiver] += shares; - - emit Deposit(vaultId, receiver, assets, shares); - } - - /** - * @notice Maximum shares that can be minted - */ - function maxMint(uint256 vaultId, address) external pure returns (uint256) { - return type(uint256).max; // No mint limit - } - - /** - * @notice Preview assets needed to mint shares - */ - function previewMint(uint256 vaultId, uint256 shares) external view returns (uint256) { - VaultConfig storage config = vaultStorage().vaultConfigs[vaultId]; - uint256 assetsNeeded = convertToAssets(vaultId, shares); - // Add deposit fee - return assetsNeeded + (assetsNeeded * config.depositFee / (MAX_BPS - config.depositFee)); - } - - /** - * @notice Mint shares for assets - */ - function mint(uint256 vaultId, uint256 shares, address receiver) external whenVaultNotPaused(vaultId) nonReentrant returns (uint256 assets) { - // Check compliance - IComplianceFacet complianceFacet = IComplianceFacet(address(this)); - IComplianceFacet.ComplianceMode mode = complianceFacet.getVaultComplianceMode(vaultId); - require(complianceFacet.canAccess(msg.sender, mode), "VaultFacet: Compliance check failed"); - - VaultStorage storage vs = vaultStorage(); - Vault storage vault = vs.vaults[vaultId]; - require(vault.active, "VaultFacet: Vault not active"); - require(!vault.isMultiAsset, "VaultFacet: Use multi-asset mint for ERC-1155 vaults"); - - assets = previewMint(vaultId, shares); - IERC20 assetToken = IERC20(vault.asset); - assetToken.safeTransferFrom(msg.sender, address(this), assets); - - // Calculate and collect deposit fee - VaultConfig storage config = vs.vaultConfigs[vaultId]; - uint256 depositFeeAmount = (assets * config.depositFee) / MAX_BPS; - uint256 assetsAfterFee = assets - depositFeeAmount; - - if (depositFeeAmount > 0) { - vs.vaultFees[vaultId][vault.asset] += depositFeeAmount; - } - - vault.totalAssets += assetsAfterFee; - vault.totalSupply += shares; - vs.balances[vaultId][receiver] += shares; - - emit Deposit(vaultId, receiver, assets, shares); - } - - /** - * @notice Maximum assets that can be withdrawn - */ - function maxWithdraw(uint256 vaultId, address owner) external view returns (uint256) { - VaultStorage storage vs = vaultStorage(); - return convertToAssets(vaultId, vs.balances[vaultId][owner]); - } - - /** - * @notice Preview shares needed to withdraw assets - */ - function previewWithdraw(uint256 vaultId, uint256 assets) external view returns (uint256) { - VaultConfig storage config = vaultStorage().vaultConfigs[vaultId]; - uint256 assetsAfterFee = assets - (assets * config.withdrawalFee / MAX_BPS); - return convertToShares(vaultId, assetsAfterFee); - } - - /** - * @notice Withdraw assets by burning shares - */ - function withdraw( - uint256 vaultId, - uint256 shares, - address receiver, - address owner - ) external override whenVaultNotPaused(vaultId) nonReentrant returns (uint256 assets) { - // Check authorization - if (msg.sender != owner) { - VaultStorage storage vs = vaultStorage(); - uint256 allowed = vs.allowances[vaultId][owner][msg.sender]; - require(allowed >= shares, "VaultFacet: Insufficient allowance"); - vs.allowances[vaultId][owner][msg.sender] -= shares; - } - - VaultStorage storage vs = vaultStorage(); - Vault storage vault = vs.vaults[vaultId]; - require(vault.active, "VaultFacet: Vault not active"); - require(!vault.isMultiAsset, "VaultFacet: Use multi-asset withdraw for ERC-1155 vaults"); - require(shares > 0, "VaultFacet: Shares must be > 0"); - require(vs.balances[vaultId][owner] >= shares, "VaultFacet: Insufficient shares"); - - assets = convertToAssets(vaultId, shares); - require(assets <= vault.totalAssets, "VaultFacet: Insufficient assets"); - - // Calculate and collect withdrawal fee - VaultConfig storage config = vs.vaultConfigs[vaultId]; - uint256 withdrawalFeeAmount = (assets * config.withdrawalFee) / MAX_BPS; - uint256 assetsAfterFee = assets - withdrawalFeeAmount; - - if (withdrawalFeeAmount > 0) { - vs.vaultFees[vaultId][vault.asset] += withdrawalFeeAmount; - } - - // Update state - vault.totalAssets -= assets; - vault.totalSupply -= shares; - vs.balances[vaultId][owner] -= shares; - - IERC20(vault.asset).safeTransfer(receiver, assetsAfterFee); - - emit Withdraw(vaultId, receiver, assets, shares); - } - - /** - * @notice Maximum shares that can be redeemed - */ - function maxRedeem(uint256 vaultId, address owner) external view returns (uint256) { - return vaultStorage().balances[vaultId][owner]; - } - - /** - * @notice Preview assets for redeeming shares - */ - function previewRedeem(uint256 vaultId, uint256 shares) external view returns (uint256) { - VaultConfig storage config = vaultStorage().vaultConfigs[vaultId]; - uint256 assets = convertToAssets(vaultId, shares); - uint256 withdrawalFeeAmount = (assets * config.withdrawalFee) / MAX_BPS; - return assets - withdrawalFeeAmount; - } - - /** - * @notice Redeem shares for assets - */ - function redeem(uint256 vaultId, uint256 shares, address receiver, address owner) external whenVaultNotPaused(vaultId) nonReentrant returns (uint256 assets) { - // Check authorization - if (msg.sender != owner) { - VaultStorage storage vs = vaultStorage(); - uint256 allowed = vs.allowances[vaultId][owner][msg.sender]; - require(allowed >= shares, "VaultFacet: Insufficient allowance"); - vs.allowances[vaultId][owner][msg.sender] -= shares; - } - - VaultStorage storage vs = vaultStorage(); - Vault storage vault = vs.vaults[vaultId]; - require(vault.active, "VaultFacet: Vault not active"); - require(!vault.isMultiAsset, "VaultFacet: Use multi-asset redeem for ERC-1155 vaults"); - require(vs.balances[vaultId][owner] >= shares, "VaultFacet: Insufficient shares"); - - assets = convertToAssets(vaultId, shares); - - // Calculate and collect withdrawal fee - VaultConfig storage config = vs.vaultConfigs[vaultId]; - uint256 withdrawalFeeAmount = (assets * config.withdrawalFee) / MAX_BPS; - uint256 assetsAfterFee = assets - withdrawalFeeAmount; - - if (withdrawalFeeAmount > 0) { - vs.vaultFees[vaultId][vault.asset] += withdrawalFeeAmount; - } - - // Update state - vault.totalAssets -= assets; - vault.totalSupply -= shares; - vs.balances[vaultId][owner] -= shares; - - IERC20(vault.asset).safeTransfer(receiver, assetsAfterFee); - - emit Withdraw(vaultId, receiver, assets, shares); - } - - // ============ Approval Mechanism ============ - - /** - * @notice Approve spender to withdraw shares - */ - function approve(uint256 vaultId, address spender, uint256 amount) external returns (bool) { - VaultStorage storage vs = vaultStorage(); - vs.allowances[vaultId][msg.sender][spender] = amount; - emit Approval(vaultId, msg.sender, spender, amount); - return true; - } - - /** - * @notice Get approval amount - */ - function allowance(uint256 vaultId, address owner, address spender) external view returns (uint256) { - return vaultStorage().allowances[vaultId][owner][spender]; - } - - /** - * @notice Get balance of shares - */ - function balanceOf(uint256 vaultId, address account) external view returns (uint256) { - return vaultStorage().balances[vaultId][account]; - } - - // ============ ERC-1155 Multi-Asset Functions ============ - - /** - * @notice Deposit multiple assets into ERC-1155 vault - */ - function depositMultiAsset( - uint256 vaultId, - address token, - uint256 tokenId, - uint256 amount - ) external whenVaultNotPaused(vaultId) nonReentrant { - // Check compliance - IComplianceFacet complianceFacet = IComplianceFacet(address(this)); - IComplianceFacet.ComplianceMode mode = complianceFacet.getVaultComplianceMode(vaultId); - require(complianceFacet.canAccess(msg.sender, mode), "VaultFacet: Compliance check failed"); - - VaultStorage storage vs = vaultStorage(); - Vault storage vault = vs.vaults[vaultId]; - require(vault.active, "VaultFacet: Vault not active"); - require(vault.isMultiAsset, "VaultFacet: Not a multi-asset vault"); - - IERC1155(token).safeTransferFrom(msg.sender, address(this), tokenId, amount, ""); - vs.multiAssetBalances[vaultId][msg.sender][tokenId] += amount; - - // Track token addresses - bool tokenExists = false; - for (uint i = 0; i < vs.multiAssetTokens[vaultId].length; i++) { - if (vs.multiAssetTokens[vaultId][i] == token) { - tokenExists = true; - break; - } - } - if (!tokenExists) { - vs.multiAssetTokens[vaultId].push(token); - } - - emit MultiAssetDeposit(vaultId, msg.sender, token, tokenId, amount); - } - - /** - * @notice Withdraw multiple assets from ERC-1155 vault - */ - function withdrawMultiAsset( - uint256 vaultId, - address token, - uint256 tokenId, - uint256 amount - ) external whenVaultNotPaused(vaultId) nonReentrant { - VaultStorage storage vs = vaultStorage(); - Vault storage vault = vs.vaults[vaultId]; - require(vault.active, "VaultFacet: Vault not active"); - require(vault.isMultiAsset, "VaultFacet: Not a multi-asset vault"); - require(vs.multiAssetBalances[vaultId][msg.sender][tokenId] >= amount, "VaultFacet: Insufficient balance"); - - vs.multiAssetBalances[vaultId][msg.sender][tokenId] -= amount; - IERC1155(token).safeTransferFrom(address(this), msg.sender, tokenId, amount, ""); - - emit MultiAssetWithdraw(vaultId, msg.sender, token, tokenId, amount); - } - - /** - * @notice Get multi-asset balance - */ - function getMultiAssetBalance(uint256 vaultId, address user, address token, uint256 tokenId) external view returns (uint256) { - return vaultStorage().multiAssetBalances[vaultId][user][tokenId]; - } - - // ============ ERC-1155 Receiver ============ - - function onERC1155Received( - address, - address, - uint256, - uint256, - bytes calldata - ) external pure returns (bytes4) { - return IERC1155Receiver.onERC1155Received.selector; - } - - function onERC1155BatchReceived( - address, - address, - uint256[] calldata, - uint256[] calldata, - bytes calldata - ) external pure returns (bytes4) { - return IERC1155Receiver.onERC1155BatchReceived.selector; - } - - function supportsInterface(bytes4 interfaceId) external pure returns (bool) { - return interfaceId == type(IERC1155Receiver).interfaceId; - } - - // ============ View Functions ============ - - function getVault(uint256 vaultId) external view override returns (Vault memory) { - return vaultStorage().vaults[vaultId]; - } - - // ============ Admin Functions ============ - - /** - * @notice Pause or unpause a vault - */ - function setVaultPaused(uint256 vaultId, bool paused) external onlyAdmin { - vaultStorage().vaultConfigs[vaultId].paused = paused; - emit VaultPaused(vaultId, paused); - } - - /** - * @notice Set vault fees - */ - function setVaultFees(uint256 vaultId, uint256 depositFee, uint256 withdrawalFee, uint256 managementFee) external onlyAdmin { - require(depositFee <= 1000, "VaultFacet: Deposit fee too high"); - require(withdrawalFee <= 1000, "VaultFacet: Withdrawal fee too high"); - require(managementFee <= 2000, "VaultFacet: Management fee too high"); - - VaultConfig storage config = vaultStorage().vaultConfigs[vaultId]; - config.depositFee = depositFee; - config.withdrawalFee = withdrawalFee; - config.managementFee = managementFee; - } - - /** - * @notice Collect management fees - */ - function collectManagementFees(uint256 vaultId) external { - VaultStorage storage vs = vaultStorage(); - Vault storage vault = vs.vaults[vaultId]; - VaultConfig storage config = vs.vaultConfigs[vaultId]; - - uint256 timeElapsed = block.timestamp - config.lastFeeCollection; - uint256 feeAmount = (vault.totalAssets * config.managementFee * timeElapsed) / (MAX_BPS * SECONDS_PER_YEAR); - - if (feeAmount > 0 && feeAmount < vault.totalAssets) { - vs.vaultFees[vaultId][vault.asset] += feeAmount; - vault.totalAssets -= feeAmount; - } - - config.lastFeeCollection = block.timestamp; - } - - /** - * @notice Collect vault fees - */ - function collectVaultFees(uint256 vaultId, address token) external onlyAdmin { - VaultStorage storage vs = vaultStorage(); - uint256 amount = vs.vaultFees[vaultId][token]; - require(amount > 0, "VaultFacet: No fees to collect"); - - vs.vaultFees[vaultId][token] = 0; - IERC20(token).safeTransfer(vs.feeCollector != address(0) ? vs.feeCollector : msg.sender, amount); - - emit FeeCollected(vaultId, token, amount); - } -} diff --git a/contracts/src/interfaces/ICCIPFacet.sol b/contracts/src/interfaces/ICCIPFacet.sol deleted file mode 100644 index a352825..0000000 --- a/contracts/src/interfaces/ICCIPFacet.sol +++ /dev/null @@ -1,101 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -interface ICCIPFacet { - enum MessageType { - LiquiditySync, - VaultRebalance, - PriceDeviation, - TokenBridge - } - - struct CCIPMessage { - MessageType messageType; - uint256 sourceChainId; - uint256 targetChainId; - bytes payload; - uint256 timestamp; - } - - struct LiquiditySyncPayload { - uint256 poolId; - uint256 baseReserve; - uint256 quoteReserve; - uint256 virtualBaseReserve; - uint256 virtualQuoteReserve; - } - - struct VaultRebalancePayload { - uint256 vaultId; - uint256 targetChainId; - uint256 amount; - address asset; - } - - struct PriceDeviationPayload { - uint256 poolId; - uint256 price; - uint256 deviation; - uint256 timestamp; - } - - event CCIPMessageSent( - bytes32 indexed messageId, - uint256 indexed sourceChainId, - uint256 indexed targetChainId, - MessageType messageType - ); - - event CCIPMessageReceived( - bytes32 indexed messageId, - uint256 indexed sourceChainId, - MessageType messageType - ); - - event LiquiditySynced( - uint256 indexed poolId, - uint256 indexed chainId, - uint256 baseReserve, - uint256 quoteReserve - ); - - event VaultRebalanced( - uint256 indexed vaultId, - uint256 indexed sourceChainId, - uint256 indexed targetChainId, - uint256 amount - ); - - function sendLiquiditySync( - uint256 targetChainId, - uint256 poolId - ) external returns (bytes32 messageId); - - function sendVaultRebalance( - uint256 targetChainId, - uint256 vaultId, - uint256 amount, - address asset - ) external returns (bytes32 messageId); - - function sendPriceDeviationWarning( - uint256 targetChainId, - uint256 poolId, - uint256 deviation - ) external returns (bytes32 messageId); - - function handleCCIPMessage( - bytes32 messageId, - uint256 sourceChainId, - bytes calldata payload - ) external; - - function setCCIPRouter(address router) external; - - function setSupportedChain(uint256 chainId, bool supported) external; - - function isChainSupported(uint256 chainId) external view returns (bool); - - function getMessageStatus(bytes32 messageId) external view returns (bool delivered, uint256 timestamp); -} - diff --git a/contracts/src/interfaces/ICCIPRouter.sol b/contracts/src/interfaces/ICCIPRouter.sol deleted file mode 100644 index 340d41a..0000000 --- a/contracts/src/interfaces/ICCIPRouter.sol +++ /dev/null @@ -1,32 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -/** - * @title ICCIPRouter - * @notice Interface for Chainlink CCIP Router (compatible with official CCIP interface) - */ -interface ICCIPRouter { - struct EVM2AnyMessage { - bytes receiver; - bytes data; - EVMTokenAmount[] tokenAmounts; - bytes extraArgs; - address feeToken; - } - - struct EVMTokenAmount { - address token; - uint256 amount; - } - - function ccipSend( - uint64 destinationChainSelector, - EVM2AnyMessage memory message - ) external payable returns (bytes32 messageId); - - function getFee( - uint64 destinationChainSelector, - EVM2AnyMessage memory message - ) external view returns (uint256 fee); -} - diff --git a/contracts/src/interfaces/IChainConfigFacet.sol b/contracts/src/interfaces/IChainConfigFacet.sol deleted file mode 100644 index ebd185e..0000000 --- a/contracts/src/interfaces/IChainConfigFacet.sol +++ /dev/null @@ -1,38 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -interface IChainConfigFacet { - struct ChainConfig { - uint256 chainId; - string name; - address nativeToken; // Address(0) for native ETH - string explorerUrl; - uint256 gasLimit; - uint256 messageTimeout; - bool active; - } - - event ChainConfigUpdated(uint256 indexed chainId, string name, bool active); - event ChainGasLimitUpdated(uint256 indexed chainId, uint256 gasLimit); - event ChainTimeoutUpdated(uint256 indexed chainId, uint256 timeout); - - function setChainConfig( - uint256 chainId, - string calldata name, - address nativeToken, - string calldata explorerUrl, - uint256 gasLimit, - uint256 messageTimeout - ) external; - - function getChainConfig(uint256 chainId) external view returns (ChainConfig memory); - - function setChainActive(uint256 chainId, bool active) external; - - function setChainGasLimit(uint256 chainId, uint256 gasLimit) external; - - function setChainTimeout(uint256 chainId, uint256 timeout) external; - - function isChainActive(uint256 chainId) external view returns (bool); -} - diff --git a/contracts/src/interfaces/IComplianceFacet.sol b/contracts/src/interfaces/IComplianceFacet.sol deleted file mode 100644 index caf7aac..0000000 --- a/contracts/src/interfaces/IComplianceFacet.sol +++ /dev/null @@ -1,74 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -interface IComplianceFacet { - enum ComplianceMode { - Regulated, // Mode A: Full KYC/AML - Fintech, // Mode B: Tiered KYC - Decentralized // Mode C: No KYC - } - - struct UserCompliance { - ComplianceMode mode; - bool kycVerified; - bool amlVerified; - uint256 tier; - bool active; - } - - event ComplianceModeSet( - address indexed user, - ComplianceMode mode - ); - - event KYCVerified( - address indexed user, - bool verified - ); - - event OFACCheck( - address indexed user, - bool sanctioned - ); - - event TravelRuleCompliance( - address indexed from, - address indexed to, - uint256 amount, - bytes32 transactionHash - ); - - event ISO20022Message( - address indexed user, - string messageType, - bytes32 messageId - ); - - function setUserComplianceMode( - address user, - ComplianceMode mode - ) external; - - function verifyKYC(address user, bool verified) external; - - function verifyAML(address user, bool verified) external; - - function getUserCompliance( - address user - ) external view returns (UserCompliance memory); - - function canAccess( - address user, - ComplianceMode requiredMode - ) external view returns (bool); - - function setVaultComplianceMode( - uint256 vaultId, - ComplianceMode mode - ) external; - - function getVaultComplianceMode( - uint256 vaultId - ) external view returns (ComplianceMode); -} - diff --git a/contracts/src/interfaces/IDiamond.sol b/contracts/src/interfaces/IDiamond.sol deleted file mode 100644 index bd3a95d..0000000 --- a/contracts/src/interfaces/IDiamond.sol +++ /dev/null @@ -1,38 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -interface IDiamond { - /// @notice Gets all facets and their selectors. - /// @return facets_ Facet - function facets() external view returns (Facet[] memory facets_); - - /// @notice Gets all the function selectors provided by a facet. - /// @param _facet The facet address. - /// @return facetFunctionSelectors_ - function facetFunctionSelectors(address _facet) - external - view - returns (bytes4[] memory facetFunctionSelectors_); - - /// @notice Get all the facet addresses used by a diamond. - /// @return facetAddresses_ - function facetAddresses() - external - view - returns (address[] memory facetAddresses_); - - /// @notice Gets the facet that supports the given selector. - /// @dev If facet is not found return address(0). - /// @param _functionSelector The function selector. - /// @return facetAddress_ The facet address. - function facetAddress(bytes4 _functionSelector) - external - view - returns (address facetAddress_); - - struct Facet { - address facetAddress; - bytes4[] functionSelectors; - } -} - diff --git a/contracts/src/interfaces/IDiamondCut.sol b/contracts/src/interfaces/IDiamondCut.sol deleted file mode 100644 index bdbaecc..0000000 --- a/contracts/src/interfaces/IDiamondCut.sol +++ /dev/null @@ -1,23 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -interface IDiamondCut { - enum FacetCutAction { - Add, - Replace, - Remove - } - - struct FacetCut { - address facetAddress; - FacetCutAction action; - bytes4[] functionSelectors; - } - - function diamondCut( - FacetCut[] calldata _diamondCut, - address _init, - bytes calldata _calldata - ) external; -} - diff --git a/contracts/src/interfaces/IERC1404.sol b/contracts/src/interfaces/IERC1404.sol deleted file mode 100644 index 7d2f1ed..0000000 --- a/contracts/src/interfaces/IERC1404.sol +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -// ERC-1404: Simple Restricted Token Standard -interface IERC1404 { - function detectTransferRestriction(address from, address to, uint256 amount) external view returns (uint8); - function messageForTransferRestriction(uint8 restrictionCode) external view returns (string memory); -} - diff --git a/contracts/src/interfaces/IGovernanceFacet.sol b/contracts/src/interfaces/IGovernanceFacet.sol deleted file mode 100644 index 5ba29f7..0000000 --- a/contracts/src/interfaces/IGovernanceFacet.sol +++ /dev/null @@ -1,133 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -interface IGovernanceFacet { - enum ProposalType { - ParameterChange, - FacetUpgrade, - TreasuryWithdrawal, - ComplianceChange, - EmergencyPause - } - - enum ProposalStatus { - Pending, - Active, - Passed, - Rejected, - Executed - } - - struct Proposal { - uint256 id; - ProposalType proposalType; - ProposalStatus status; - address proposer; - string description; - bytes data; - uint256 startTime; - uint256 endTime; - uint256 forVotes; - uint256 againstVotes; - mapping(address => bool) hasVoted; - } - - struct TreasuryAction { - address recipient; - uint256 amount; - address token; - string reason; - bool executed; - } - - event ProposalCreated( - uint256 indexed proposalId, - ProposalType proposalType, - address indexed proposer - ); - - event VoteCast( - uint256 indexed proposalId, - address indexed voter, - bool support, - uint256 weight - ); - - event ProposalExecuted(uint256 indexed proposalId); - - event TreasuryWithdrawal( - address indexed recipient, - uint256 amount, - address token - ); - - event DelegationChanged( - address indexed delegator, - address indexed delegate, - uint256 previousBalance, - uint256 newBalance - ); - - function createProposal( - ProposalType proposalType, - string calldata description, - bytes calldata data, - uint256 votingPeriod - ) external returns (uint256 proposalId); - - function vote(uint256 proposalId, bool support) external; - - function executeProposal(uint256 proposalId) external; - - function getProposal(uint256 proposalId) external view returns ( - uint256 id, - ProposalType proposalType, - ProposalStatus status, - address proposer, - uint256 forVotes, - uint256 againstVotes, - uint256 startTime, - uint256 endTime - ); - - function proposeTreasuryWithdrawal( - address recipient, - uint256 amount, - address token, - string calldata reason - ) external returns (uint256 proposalId); - - function getTreasuryBalance(address token) external view returns (uint256); - - function delegate(address delegatee) external; - - function delegateBySig( - address delegator, - address delegatee, - uint256 nonce, - uint256 expiry, - uint8 v, - bytes32 r, - bytes32 s - ) external; - - function delegates(address delegator) external view returns (address); - - function getCurrentVotes(address account) external view returns (uint256); - - function getPriorVotes(address account, uint256 blockNumber) external view returns (uint256); - - struct Action { - address target; - uint256 value; - bytes data; - bool executed; - } - - function createMultiActionProposal( - string calldata description, - Action[] calldata actions, - uint256 votingPeriod - ) external returns (uint256 proposalId); -} - diff --git a/contracts/src/interfaces/ILiquidityFacet.sol b/contracts/src/interfaces/ILiquidityFacet.sol deleted file mode 100644 index 29bec21..0000000 --- a/contracts/src/interfaces/ILiquidityFacet.sol +++ /dev/null @@ -1,73 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -interface ILiquidityFacet { - struct Pool { - address baseToken; - address quoteToken; - uint256 baseReserve; - uint256 quoteReserve; - uint256 virtualBaseReserve; - uint256 virtualQuoteReserve; - uint256 k; // Slippage control coefficient - uint256 oraclePrice; // Market oracle price (i) - bool active; - } - - event PoolCreated( - uint256 indexed poolId, - address indexed baseToken, - address indexed quoteToken - ); - - event LiquidityAdded( - uint256 indexed poolId, - address indexed provider, - uint256 baseAmount, - uint256 quoteAmount - ); - - event Swap( - uint256 indexed poolId, - address indexed trader, - address tokenIn, - address tokenOut, - uint256 amountIn, - uint256 amountOut - ); - - function createPool( - address baseToken, - address quoteToken, - uint256 initialBaseReserve, - uint256 initialQuoteReserve, - uint256 virtualBaseReserve, - uint256 virtualQuoteReserve, - uint256 k, - uint256 oraclePrice - ) external returns (uint256 poolId); - - function addLiquidity( - uint256 poolId, - uint256 baseAmount, - uint256 quoteAmount - ) external returns (uint256 lpShares); - - function swap( - uint256 poolId, - address tokenIn, - uint256 amountIn, - uint256 minAmountOut - ) external returns (uint256 amountOut); - - function getPool(uint256 poolId) external view returns (Pool memory); - - function getPrice(uint256 poolId) external view returns (uint256); - - function getQuote( - uint256 poolId, - address tokenIn, - uint256 amountIn - ) external view returns (uint256 amountOut); -} - diff --git a/contracts/src/interfaces/IOracle.sol b/contracts/src/interfaces/IOracle.sol deleted file mode 100644 index 26186ec..0000000 --- a/contracts/src/interfaces/IOracle.sol +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -/** - * @title IOracle - * @notice Interface for price oracles (compatible with Chainlink) - */ -interface IOracle { - function latestRoundData() - external - view - returns ( - uint80 roundId, - int256 price, - uint256 startedAt, - uint256 updatedAt, - uint80 answeredInRound - ); -} diff --git a/contracts/src/interfaces/IProposalTemplateFacet.sol b/contracts/src/interfaces/IProposalTemplateFacet.sol deleted file mode 100644 index ef0bf36..0000000 --- a/contracts/src/interfaces/IProposalTemplateFacet.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -interface IProposalTemplateFacet { - struct ProposalTemplate { - uint256 id; - string name; - string description; - IGovernanceFacet.ProposalType proposalType; - bytes templateData; - bool active; - } - - event TemplateCreated(uint256 indexed templateId, string name, IGovernanceFacet.ProposalType proposalType); - event TemplateUpdated(uint256 indexed templateId, bool active); - - function createTemplate( - string calldata name, - string calldata description, - IGovernanceFacet.ProposalType proposalType, - bytes calldata templateData - ) external returns (uint256 templateId); - - function getTemplate(uint256 templateId) external view returns ( - uint256 id, - string memory name, - string memory description, - IGovernanceFacet.ProposalType proposalType, - bytes memory templateData, - bool active - ); - - function setTemplateActive(uint256 templateId, bool active) external; - - function createProposalFromTemplate( - uint256 templateId, - bytes calldata parameters, - uint256 votingPeriod - ) external returns (uint256 proposalId); -} - diff --git a/contracts/src/interfaces/IRWAFacet.sol b/contracts/src/interfaces/IRWAFacet.sol deleted file mode 100644 index c5015ef..0000000 --- a/contracts/src/interfaces/IRWAFacet.sol +++ /dev/null @@ -1,51 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -interface IRWAFacet { - struct RWA { - uint256 tokenId; - address assetContract; - string assetType; // "real_estate", "commodity", "security", etc. - uint256 totalValue; - uint256 fractionalizedAmount; - bool active; - mapping(address => bool) verifiedHolders; - } - - event RWATokenized( - uint256 indexed tokenId, - address indexed assetContract, - string assetType, - uint256 totalValue - ); - - event RWAFractionalized( - uint256 indexed tokenId, - address indexed holder, - uint256 amount - ); - - function tokenizeRWA( - address assetContract, - string calldata assetType, - uint256 totalValue, - bytes calldata complianceData - ) external returns (uint256 tokenId); - - function fractionalizeRWA( - uint256 tokenId, - uint256 amount, - address recipient - ) external returns (uint256 shares); - - function getRWA(uint256 tokenId) external view returns ( - address assetContract, - string memory assetType, - uint256 totalValue, - uint256 fractionalizedAmount, - bool active - ); - - function verifyHolder(uint256 tokenId, address holder) external view returns (bool); -} - diff --git a/contracts/src/interfaces/ISecurityFacet.sol b/contracts/src/interfaces/ISecurityFacet.sol deleted file mode 100644 index 052befc..0000000 --- a/contracts/src/interfaces/ISecurityFacet.sol +++ /dev/null @@ -1,44 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -interface ISecurityFacet { - enum PauseReason { - Emergency, - CircuitBreaker, - OracleDeviation, - ComplianceViolation, - GovernanceDecision - } - - struct CircuitBreaker { - uint256 threshold; - uint256 timeWindow; - uint256 currentValue; - uint256 windowStart; - bool triggered; - } - - event SystemPaused(PauseReason reason, address indexed pausedBy); - event SystemUnpaused(address indexed unpausedBy); - event CircuitBreakerTriggered(uint256 indexed poolId, uint256 deviation); - event SecurityAudit(uint256 timestamp, string auditType, bool passed); - - function pauseSystem(PauseReason reason) external; - - function unpauseSystem() external; - - function isPaused() external view returns (bool); - - function setCircuitBreaker( - uint256 poolId, - uint256 threshold, - uint256 timeWindow - ) external; - - function checkCircuitBreaker(uint256 poolId, uint256 value) external returns (bool); - - function triggerCircuitBreaker(uint256 poolId) external; - - function recordSecurityAudit(string calldata auditType, bool passed) external; -} - diff --git a/contracts/src/interfaces/IVaultFacet.sol b/contracts/src/interfaces/IVaultFacet.sol deleted file mode 100644 index daf1a5a..0000000 --- a/contracts/src/interfaces/IVaultFacet.sol +++ /dev/null @@ -1,63 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -interface IVaultFacet { - struct Vault { - address asset; // ERC-20 asset for ERC-4626, or address(0) for ERC-1155 - uint256 totalAssets; - uint256 totalSupply; - bool isMultiAsset; // true for ERC-1155, false for ERC-4626 - bool active; - } - - event VaultCreated( - uint256 indexed vaultId, - address indexed asset, - bool isMultiAsset - ); - - event Deposit( - uint256 indexed vaultId, - address indexed depositor, - uint256 assets, - uint256 shares - ); - - event Withdraw( - uint256 indexed vaultId, - address indexed withdrawer, - uint256 assets, - uint256 shares - ); - - function createVault( - address asset, - bool isMultiAsset - ) external returns (uint256 vaultId); - - function deposit( - uint256 vaultId, - uint256 assets, - address receiver - ) external returns (uint256 shares); - - function withdraw( - uint256 vaultId, - uint256 shares, - address receiver, - address owner - ) external returns (uint256 assets); - - function getVault(uint256 vaultId) external view returns (Vault memory); - - function convertToShares( - uint256 vaultId, - uint256 assets - ) external view returns (uint256); - - function convertToAssets( - uint256 vaultId, - uint256 shares - ) external view returns (uint256); -} - diff --git a/contracts/src/libraries/LibAccessControl.sol b/contracts/src/libraries/LibAccessControl.sol deleted file mode 100644 index 12ae926..0000000 --- a/contracts/src/libraries/LibAccessControl.sol +++ /dev/null @@ -1,218 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -/** - * @title LibAccessControl - * @notice Diamond-compatible access control library using Diamond storage pattern - * @dev Provides role-based access control for Diamond facets - */ -library LibAccessControl { - bytes32 constant ACCESS_CONTROL_STORAGE_POSITION = keccak256("asle.accesscontrol.storage"); - bytes32 constant TIMELOCK_STORAGE_POSITION = keccak256("asle.timelock.storage"); - - // Role definitions - bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; - bytes32 public constant POOL_CREATOR_ROLE = keccak256("POOL_CREATOR_ROLE"); - bytes32 public constant VAULT_CREATOR_ROLE = keccak256("VAULT_CREATOR_ROLE"); - bytes32 public constant COMPLIANCE_ADMIN_ROLE = keccak256("COMPLIANCE_ADMIN_ROLE"); - bytes32 public constant GOVERNANCE_ADMIN_ROLE = keccak256("GOVERNANCE_ADMIN_ROLE"); - bytes32 public constant SECURITY_ADMIN_ROLE = keccak256("SECURITY_ADMIN_ROLE"); - bytes32 public constant FEE_COLLECTOR_ROLE = keccak256("FEE_COLLECTOR_ROLE"); - - struct RoleData { - mapping(address => bool) members; - bytes32 adminRole; - } - - struct AccessControlStorage { - mapping(bytes32 => RoleData) roles; - address[] roleMembers; // For enumeration support - } - - struct TimelockStorage { - mapping(bytes32 => uint256) scheduledOperations; // operationId => executionTime - uint256 defaultDelay; // Default timelock delay in seconds - bool timelockEnabled; - } - - event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); - event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); - event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); - event OperationScheduled(bytes32 indexed operationId, uint256 executionTime); - event OperationExecuted(bytes32 indexed operationId); - - function accessControlStorage() internal pure returns (AccessControlStorage storage acs) { - bytes32 position = ACCESS_CONTROL_STORAGE_POSITION; - assembly { - acs.slot := position - } - } - - function timelockStorage() internal pure returns (TimelockStorage storage ts) { - bytes32 position = TIMELOCK_STORAGE_POSITION; - assembly { - ts.slot := position - } - } - - /** - * @notice Check if an account has a specific role - */ - function hasRole(bytes32 role, address account) internal view returns (bool) { - return accessControlStorage().roles[role].members[account]; - } - - /** - * @notice Check if account has role or is admin of role - */ - function hasRoleOrAdmin(bytes32 role, address account) internal view returns (bool) { - AccessControlStorage storage acs = accessControlStorage(); - return acs.roles[role].members[account] || hasRole(getRoleAdmin(role), account); - } - - /** - * @notice Get the admin role for a given role - */ - function getRoleAdmin(bytes32 role) internal view returns (bytes32) { - AccessControlStorage storage acs = accessControlStorage(); - bytes32 adminRole = acs.roles[role].adminRole; - return adminRole == bytes32(0) ? DEFAULT_ADMIN_ROLE : adminRole; - } - - /** - * @notice Grant a role to an account - * @dev Can only be called by accounts with admin role - */ - function grantRole(bytes32 role, address account) internal { - AccessControlStorage storage acs = accessControlStorage(); - bytes32 adminRole = getRoleAdmin(role); - require(hasRole(adminRole, msg.sender), "LibAccessControl: account is missing admin role"); - - if (!acs.roles[role].members[account]) { - acs.roles[role].members[account] = true; - emit RoleGranted(role, account, msg.sender); - } - } - - /** - * @notice Revoke a role from an account - * @dev Can only be called by accounts with admin role - */ - function revokeRole(bytes32 role, address account) internal { - AccessControlStorage storage acs = accessControlStorage(); - bytes32 adminRole = getRoleAdmin(role); - require(hasRole(adminRole, msg.sender), "LibAccessControl: account is missing admin role"); - - if (acs.roles[role].members[account]) { - acs.roles[role].members[account] = false; - emit RoleRevoked(role, account, msg.sender); - } - } - - /** - * @notice Set the admin role for a role - */ - function setRoleAdmin(bytes32 role, bytes32 adminRole) internal { - AccessControlStorage storage acs = accessControlStorage(); - bytes32 previousAdminRole = getRoleAdmin(role); - require(hasRole(previousAdminRole, msg.sender), "LibAccessControl: account is missing admin role"); - - acs.roles[role].adminRole = adminRole; - emit RoleAdminChanged(role, previousAdminRole, adminRole); - } - - /** - * @notice Require that account has role, revert if not - */ - function requireRole(bytes32 role, address account) internal view { - require(hasRole(role, account), "LibAccessControl: account is missing role"); - } - - /** - * @notice Initialize access control with default admin - */ - function initializeAccessControl(address defaultAdmin) internal { - AccessControlStorage storage acs = accessControlStorage(); - require(!acs.roles[DEFAULT_ADMIN_ROLE].members[defaultAdmin], "LibAccessControl: already initialized"); - - acs.roles[DEFAULT_ADMIN_ROLE].members[defaultAdmin] = true; - - // Set role hierarchies - acs.roles[POOL_CREATOR_ROLE].adminRole = DEFAULT_ADMIN_ROLE; - acs.roles[VAULT_CREATOR_ROLE].adminRole = DEFAULT_ADMIN_ROLE; - acs.roles[COMPLIANCE_ADMIN_ROLE].adminRole = DEFAULT_ADMIN_ROLE; - acs.roles[GOVERNANCE_ADMIN_ROLE].adminRole = DEFAULT_ADMIN_ROLE; - acs.roles[SECURITY_ADMIN_ROLE].adminRole = DEFAULT_ADMIN_ROLE; - acs.roles[FEE_COLLECTOR_ROLE].adminRole = DEFAULT_ADMIN_ROLE; - - emit RoleGranted(DEFAULT_ADMIN_ROLE, defaultAdmin, address(0)); - } - - // ============ Timelock Functions ============ - - /** - * @notice Schedule an operation with timelock - */ - function scheduleOperation(bytes32 operationId, bytes32 operationHash) internal { - TimelockStorage storage ts = timelockStorage(); - require(ts.timelockEnabled, "LibAccessControl: timelock not enabled"); - require(ts.scheduledOperations[operationId] == 0, "LibAccessControl: operation already scheduled"); - - uint256 executionTime = block.timestamp + ts.defaultDelay; - ts.scheduledOperations[operationId] = executionTime; - - emit OperationScheduled(operationId, executionTime); - } - - /** - * @notice Check if operation is ready to execute - */ - function isOperationReady(bytes32 operationId) internal view returns (bool) { - TimelockStorage storage ts = timelockStorage(); - if (!ts.timelockEnabled) return true; - - uint256 executionTime = ts.scheduledOperations[operationId]; - return executionTime > 0 && block.timestamp >= executionTime; - } - - /** - * @notice Execute a scheduled operation - */ - function executeOperation(bytes32 operationId) internal { - TimelockStorage storage ts = timelockStorage(); - require(isOperationReady(operationId), "LibAccessControl: operation not ready"); - - delete ts.scheduledOperations[operationId]; - emit OperationExecuted(operationId); - } - - /** - * @notice Cancel a scheduled operation - */ - function cancelOperation(bytes32 operationId) internal { - TimelockStorage storage ts = timelockStorage(); - require(ts.scheduledOperations[operationId] > 0, "LibAccessControl: operation not scheduled"); - require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "LibAccessControl: must be admin"); - - delete ts.scheduledOperations[operationId]; - } - - /** - * @notice Set timelock delay - */ - function setTimelockDelay(uint256 delay) internal { - TimelockStorage storage ts = timelockStorage(); - require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "LibAccessControl: must be admin"); - ts.defaultDelay = delay; - } - - /** - * @notice Enable/disable timelock - */ - function setTimelockEnabled(bool enabled) internal { - TimelockStorage storage ts = timelockStorage(); - require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "LibAccessControl: must be admin"); - ts.timelockEnabled = enabled; - } -} - diff --git a/contracts/src/libraries/LibDiamond.sol b/contracts/src/libraries/LibDiamond.sol deleted file mode 100644 index 1d4fcb5..0000000 --- a/contracts/src/libraries/LibDiamond.sol +++ /dev/null @@ -1,228 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {IDiamondCut} from "../interfaces/IDiamondCut.sol"; - -library LibDiamond { - bytes32 constant DIAMOND_STORAGE_POSITION = keccak256("diamond.standard.diamond.storage"); - bytes32 constant DIAMOND_OWNER_STORAGE_POSITION = keccak256("diamond.standard.owner.storage"); - - struct FacetAddressAndPosition { - address facetAddress; - uint16 functionSelectorPosition; - } - - struct FacetFunctionSelectors { - bytes4[] functionSelectors; - uint16 facetAddressPosition; - } - - struct DiamondStorage { - mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition; - mapping(address => FacetFunctionSelectors) facetFunctionSelectors; - address[] facetAddresses; - mapping(bytes4 => bool) supportedInterfaces; - } - - struct DiamondOwnerStorage { - address contractOwner; - bool initialized; - } - - struct TimelockStorage { - mapping(bytes32 => uint256) scheduledCuts; // cutHash => executionTime - uint256 defaultDelay; // Default timelock delay in seconds - bool timelockEnabled; - } - - bytes32 constant DIAMOND_TIMELOCK_STORAGE_POSITION = keccak256("diamond.standard.timelock.storage"); - - function diamondStorage() internal pure returns (DiamondStorage storage ds) { - bytes32 position = DIAMOND_STORAGE_POSITION; - assembly { - ds.slot := position - } - } - - function diamondOwnerStorage() internal pure returns (DiamondOwnerStorage storage dos) { - bytes32 position = DIAMOND_OWNER_STORAGE_POSITION; - assembly { - dos.slot := position - } - } - - function diamondTimelockStorage() internal pure returns (TimelockStorage storage ts) { - bytes32 position = DIAMOND_TIMELOCK_STORAGE_POSITION; - assembly { - ts.slot := position - } - } - - event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); - event DiamondCutScheduled(bytes32 indexed cutHash, uint256 executionTime); - event DiamondCutExecuted(bytes32 indexed cutHash); - - function setContractOwner(address _newOwner) internal { - DiamondOwnerStorage storage dos = diamondOwnerStorage(); - address oldOwner = dos.contractOwner; - dos.contractOwner = _newOwner; - if (!dos.initialized) { - dos.initialized = true; - } - emit OwnershipTransferred(oldOwner, _newOwner); - } - - function isInitialized() internal view returns (bool) { - return diamondOwnerStorage().initialized; - } - - function contractOwner() internal view returns (address contractOwner_) { - contractOwner_ = diamondOwnerStorage().contractOwner; - } - - function enforceIsContractOwner() internal view { - require(msg.sender == contractOwner(), "LibDiamond: Must be contract owner"); - } - - function diamondCut( - IDiamondCut.FacetCut[] memory _diamondCut, - address _init, - bytes memory _calldata - ) internal { - LibDiamondCut.diamondCut(_diamondCut, _init, _calldata); - } -} - -library LibDiamondCut { - event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata); - - function diamondCut( - IDiamondCut.FacetCut[] memory _diamondCut, - address _init, - bytes memory _calldata - ) internal { - for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) { - IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action; - if (action == IDiamondCut.FacetCutAction.Add) { - addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors); - } else if (action == IDiamondCut.FacetCutAction.Replace) { - replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors); - } else if (action == IDiamondCut.FacetCutAction.Remove) { - removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors); - } else { - revert("LibDiamondCut: Incorrect FacetCutAction"); - } - } - emit DiamondCut(_diamondCut, _init, _calldata); - initializeDiamondCut(_init, _calldata); - } - - function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal { - require(_facetAddress != address(0), "LibDiamondCut: Add facet can't be address(0)"); - LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage(); - uint16 selectorPosition = uint16(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length); - if (selectorPosition == 0) { - enforceHasContractCode(_facetAddress, "LibDiamondCut: New facet has no code"); - ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = uint16(ds.facetAddresses.length); - ds.facetAddresses.push(_facetAddress); - } - for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) { - bytes4 selector = _functionSelectors[selectorIndex]; - address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress; - require(oldFacetAddress == address(0), "LibDiamondCut: Can't add function that already exists"); - ds.selectorToFacetAndPosition[selector] = LibDiamond.FacetAddressAndPosition(_facetAddress, selectorPosition); - ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(selector); - selectorPosition++; - } - } - - function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal { - require(_facetAddress != address(0), "LibDiamondCut: Replace facet can't be address(0)"); - LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage(); - uint16 selectorPosition = uint16(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length); - if (selectorPosition == 0) { - enforceHasContractCode(_facetAddress, "LibDiamondCut: New facet has no code"); - ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = uint16(ds.facetAddresses.length); - ds.facetAddresses.push(_facetAddress); - } - for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) { - bytes4 selector = _functionSelectors[selectorIndex]; - address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress; - require(oldFacetAddress != _facetAddress, "LibDiamondCut: Can't replace function with same function"); - removeFunction(oldFacetAddress, selector); - addFunction(_facetAddress, selector, selectorPosition); - selectorPosition++; - } - } - - function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal { - require(_facetAddress == address(0), "LibDiamondCut: Remove facet address must be address(0)"); - LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage(); - for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) { - bytes4 selector = _functionSelectors[selectorIndex]; - address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress; - removeFunction(oldFacetAddress, selector); - } - } - - function addFunction(address _facetAddress, bytes4 _selector, uint16 _selectorPosition) internal { - LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage(); - ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition; - ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector); - ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress; - } - - function removeFunction(address _facetAddress, bytes4 _selector) internal { - LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage(); - require(_facetAddress != address(0), "LibDiamondCut: Can't remove function that doesn't exist"); - require(_facetAddress != address(this), "LibDiamondCut: Can't remove immutable function"); - uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition; - uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1; - if (selectorPosition != lastSelectorPosition) { - bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition]; - ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector; - ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint16(selectorPosition); - } - ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop(); - delete ds.selectorToFacetAndPosition[_selector]; - if (lastSelectorPosition == 0) { - uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1; - uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition; - if (facetAddressPosition != lastFacetAddressPosition) { - address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition]; - ds.facetAddresses[facetAddressPosition] = lastFacetAddress; - ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = uint16(facetAddressPosition); - } - ds.facetAddresses.pop(); - delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition; - } - } - - function initializeDiamondCut(address _init, bytes memory _calldata) internal { - if (_init == address(0)) { - require(_calldata.length == 0, "LibDiamondCut: _init is address(0) but _calldata is not empty"); - } else { - require(_calldata.length > 0, "LibDiamondCut: _calldata is empty but _init is not address(0)"); - if (_init != address(this)) { - enforceHasContractCode(_init, "LibDiamondCut: _init has no code"); - } - (bool success, bytes memory error) = _init.delegatecall(_calldata); - if (!success) { - if (error.length > 0) { - revert(string(error)); - } else { - revert("LibDiamondCut: _init function reverted"); - } - } - } - } - - function enforceHasContractCode(address _contract, string memory _errorMessage) internal view { - uint256 contractSize; - assembly { - contractSize := extcodesize(_contract) - } - require(contractSize > 0, _errorMessage); - } -} - diff --git a/contracts/src/libraries/LibReentrancyGuard.sol b/contracts/src/libraries/LibReentrancyGuard.sol deleted file mode 100644 index 57027a2..0000000 --- a/contracts/src/libraries/LibReentrancyGuard.sol +++ /dev/null @@ -1,58 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -/** - * @title LibReentrancyGuard - * @notice Diamond-compatible reentrancy guard using Diamond storage pattern - * @dev Provides reentrancy protection for Diamond facets - */ -library LibReentrancyGuard { - bytes32 constant REENTRANCY_GUARD_STORAGE_POSITION = keccak256("asle.reentrancyguard.storage"); - - struct ReentrancyGuardStorage { - uint256 status; // 1 = locked, 2 = unlocked - } - - uint256 private constant _NOT_ENTERED = 1; - uint256 private constant _ENTERED = 2; - - function reentrancyGuardStorage() internal pure returns (ReentrancyGuardStorage storage rgs) { - bytes32 position = REENTRANCY_GUARD_STORAGE_POSITION; - assembly { - rgs.slot := position - } - } - - /** - * @notice Initialize reentrancy guard - */ - function initialize() internal { - ReentrancyGuardStorage storage rgs = reentrancyGuardStorage(); - require(rgs.status == 0, "LibReentrancyGuard: already initialized"); - rgs.status = _NOT_ENTERED; - } - - /** - * @notice Enter a non-reentrant function - */ - function enter() internal { - ReentrancyGuardStorage storage rgs = reentrancyGuardStorage(); - - // Initialize if not already done - if (rgs.status == 0) { - rgs.status = _NOT_ENTERED; - } - - require(rgs.status != _ENTERED, "LibReentrancyGuard: reentrant call"); - rgs.status = _ENTERED; - } - - /** - * @notice Exit a non-reentrant function - */ - function exit() internal { - ReentrancyGuardStorage storage rgs = reentrancyGuardStorage(); - rgs.status = _NOT_ENTERED; - } -} - diff --git a/contracts/src/libraries/PMMMath.sol b/contracts/src/libraries/PMMMath.sol deleted file mode 100644 index fdc913f..0000000 --- a/contracts/src/libraries/PMMMath.sol +++ /dev/null @@ -1,161 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -library PMMMath { - /** - * @dev Calculate price using DODO PMM formula - * @param i Oracle price - * @param k Slippage control coefficient (0-1, typically 0.1-0.3) - * @param Q Current quote token reserve - * @param vQ Virtual quote token reserve - * @return price Calculated price - */ - function calculatePrice( - uint256 i, - uint256 k, - uint256 Q, - uint256 vQ - ) internal pure returns (uint256 price) { - require(vQ > 0, "PMMMath: vQ must be > 0"); - require(k <= 1e18, "PMMMath: k must be <= 1"); - - // p = i * (1 + k * (Q - vQ) / vQ) - // Using fixed-point arithmetic with 1e18 precision - uint256 priceAdjustment = (Q > vQ) - ? (k * (Q - vQ) * 1e18) / vQ - : (k * (vQ - Q) * 1e18) / vQ; - - if (Q > vQ) { - price = (i * (1e18 + priceAdjustment)) / 1e18; - } else { - price = (i * (1e18 - priceAdjustment)) / 1e18; - } - } - - /** - * @dev Calculate output amount for a swap using DODO PMM formula - * PMM Formula: R = i - (i * k * (B - B0) / B0) - * Where: i = oracle price, k = slippage coefficient, B = current balance, B0 = target balance - * @param amountIn Input amount - * @param reserveIn Input token reserve - * @param reserveOut Output token reserve - * @param virtualReserveIn Virtual input reserve (target balance) - * @param virtualReserveOut Virtual output reserve (target balance) - * @param k Slippage coefficient (0-1e18, typically 0.1e18-0.3e18) - * @param oraclePrice Oracle price (i) - price of quote/base in 1e18 precision - * @return amountOut Output amount - */ - function calculateSwapOutput( - uint256 amountIn, - uint256 reserveIn, - uint256 reserveOut, - uint256 virtualReserveIn, - uint256 virtualReserveOut, - uint256 k, - uint256 oraclePrice - ) internal pure returns (uint256 amountOut) { - require(amountIn > 0, "PMMMath: amountIn must be > 0"); - require(virtualReserveIn > 0 && virtualReserveOut > 0, "PMMMath: virtual reserves must be > 0"); - require(k <= 1e18, "PMMMath: k must be <= 1"); - require(oraclePrice > 0, "PMMMath: oraclePrice must be > 0"); - - // Use virtual reserves for PMM calculation - uint256 newReserveIn = reserveIn + amountIn; - - // Calculate new price after input - // Price formula: P = i * (1 + k * (Q - Q0) / Q0) - // Where Q is current quote reserve, Q0 is virtual quote reserve - // For base token: we calculate how much quote we get - - // Calculate effective reserves (use virtual if larger) - uint256 effectiveBase = virtualReserveIn > reserveIn ? virtualReserveIn : reserveIn; - uint256 effectiveQuote = virtualReserveOut > reserveOut ? virtualReserveOut : reserveOut; - - // DODO PMM: when buying quote with base - // New quote reserve = Q0 - (i * (B1 - B0) / (1 + k * (B1 - B0) / B0)) - // Simplified: use constant product with virtual reserves adjusted by k - - // Calculate price impact using PMM curve - // The curve ensures that as reserves move away from target, price adjusts - uint256 baseDiff = newReserveIn > virtualReserveIn - ? newReserveIn - virtualReserveIn - : virtualReserveIn - newReserveIn; - - // Calculate price adjustment factor - uint256 priceAdjustment = (baseDiff * k) / virtualReserveIn; - - // Calculate output using PMM formula - // AmountOut = (amountIn * oraclePrice) / (1 + k * deviation) - uint256 baseAmountIn = newReserveIn - reserveIn; - - // Convert to quote using oracle price with slippage - uint256 quoteValue = (baseAmountIn * oraclePrice) / 1e18; - - // Apply PMM curve: reduce output as reserves deviate from target - if (newReserveIn > virtualReserveIn) { - // Price goes up (sell premium) - uint256 adjustedPrice = (oraclePrice * (1e18 + priceAdjustment)) / 1e18; - quoteValue = (baseAmountIn * adjustedPrice) / 1e18; - } else { - // Price goes down (buy discount) - uint256 adjustedPrice = (oraclePrice * (1e18 - priceAdjustment)) / 1e18; - quoteValue = (baseAmountIn * adjustedPrice) / 1e18; - } - - // Ensure output doesn't exceed available reserves - amountOut = quoteValue < reserveOut ? quoteValue : reserveOut; - - // Apply constant product as fallback for edge cases - if (amountOut == 0 || amountOut >= reserveOut) { - uint256 constantProduct = effectiveBase * effectiveQuote; - uint256 newEffectiveBase = effectiveBase + amountIn; - uint256 newEffectiveQuote = constantProduct / newEffectiveBase; - amountOut = effectiveQuote > newEffectiveQuote ? effectiveQuote - newEffectiveQuote : 0; - } - - require(amountOut > 0, "PMMMath: insufficient liquidity"); - require(amountOut <= reserveOut, "PMMMath: output exceeds reserves"); - } - - /** - * @dev Calculate LP shares for liquidity addition - * @param baseAmount Base token amount - * @param quoteAmount Quote token amount - * @param totalBaseReserve Total base reserve - * @param totalQuoteReserve Total quote reserve - * @param totalSupply Current total LP supply - * @return shares LP shares to mint - */ - function calculateLPShares( - uint256 baseAmount, - uint256 quoteAmount, - uint256 totalBaseReserve, - uint256 totalQuoteReserve, - uint256 totalSupply - ) internal pure returns (uint256 shares) { - if (totalSupply == 0) { - // First liquidity provider - shares = sqrt(baseAmount * quoteAmount); - } else { - // Calculate shares proportionally - uint256 baseShares = (baseAmount * totalSupply) / totalBaseReserve; - uint256 quoteShares = (quoteAmount * totalSupply) / totalQuoteReserve; - shares = baseShares < quoteShares ? baseShares : quoteShares; - } - } - - /** - * @dev Calculate square root using Babylonian method - */ - function sqrt(uint256 x) internal pure returns (uint256) { - if (x == 0) return 0; - uint256 z = (x + 1) / 2; - uint256 y = x; - while (z < y) { - y = z; - z = (x / z + z) / 2; - } - return y; - } -} - diff --git a/contracts/test/Diamond.t.sol b/contracts/test/Diamond.t.sol deleted file mode 100644 index dd36242..0000000 --- a/contracts/test/Diamond.t.sol +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {Test, console} from "forge-std/Test.sol"; -import {Diamond} from "../src/core/Diamond.sol"; -import {DiamondCutFacet} from "../src/core/facets/DiamondCutFacet.sol"; - -contract DiamondTest is Test { - Diamond public diamond; - DiamondCutFacet public diamondCutFacet; - - function setUp() public { - diamond = new Diamond(); - diamondCutFacet = new DiamondCutFacet(); - } - - function testDiamondDeployment() public { - assertTrue(address(diamond) != address(0)); - } - - function testFacetManagement() public { - // Test facet addition - assertTrue(true); - } -} - diff --git a/contracts/test/Diamond.test.ts b/contracts/test/Diamond.test.ts deleted file mode 100644 index 2b2ddbe..0000000 --- a/contracts/test/Diamond.test.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { expect } from "chai"; -import { ethers } from "hardhat"; - -describe("Diamond", function () { - it("Should deploy Diamond", async function () { - // Test Diamond deployment - expect(true).to.be.true; - }); - - it("Should add facets", async function () { - // Test facet addition - expect(true).to.be.true; - }); - - it("Should route function calls to correct facet", async function () { - // Test function routing - expect(true).to.be.true; - }); -}); - diff --git a/contracts/test/LiquidityFacet.t.sol b/contracts/test/LiquidityFacet.t.sol deleted file mode 100644 index 23e65cb..0000000 --- a/contracts/test/LiquidityFacet.t.sol +++ /dev/null @@ -1,153 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {Test, console} from "forge-std/Test.sol"; -import {Diamond} from "../src/core/Diamond.sol"; -import {DiamondCutFacet} from "../src/core/facets/DiamondCutFacet.sol"; -import {DiamondInit} from "../src/core/DiamondInit.sol"; -import {LiquidityFacet} from "../src/core/facets/LiquidityFacet.sol"; -import {IDiamondCut} from "../src/interfaces/IDiamondCut.sol"; -import {ILiquidityFacet} from "../src/interfaces/ILiquidityFacet.sol"; - -contract LiquidityFacetTest is Test { - Diamond public diamond; - DiamondCutFacet public diamondCutFacet; - DiamondInit public diamondInit; - LiquidityFacet public liquidityFacet; - address public owner; - address public user; - - function setUp() public { - owner = address(this); - user = address(0x1); - - // Deploy facets - diamondCutFacet = new DiamondCutFacet(); - liquidityFacet = new LiquidityFacet(); - diamondInit = new DiamondInit(); - - // Deploy diamond - diamond = new Diamond(); - - // Prepare cuts - IDiamondCut.FacetCut[] memory cuts = new IDiamondCut.FacetCut[](2); - - // Add DiamondCutFacet - bytes4[] memory diamondCutSelectors = new bytes4[](1); - diamondCutSelectors[0] = IDiamondCut.diamondCut.selector; - cuts[0] = IDiamondCut.FacetCut({ - facetAddress: address(diamondCutFacet), - action: IDiamondCut.FacetCutAction.Add, - functionSelectors: diamondCutSelectors - }); - - // Add LiquidityFacet (simplified selector list) - bytes4[] memory liquiditySelectors = new bytes4[](6); - liquiditySelectors[0] = ILiquidityFacet.createPool.selector; - liquiditySelectors[1] = ILiquidityFacet.getPool.selector; - liquiditySelectors[2] = ILiquidityFacet.getPrice.selector; - liquiditySelectors[3] = ILiquidityFacet.addLiquidity.selector; - liquiditySelectors[4] = ILiquidityFacet.swap.selector; - liquiditySelectors[5] = ILiquidityFacet.getQuote.selector; - - cuts[1] = IDiamondCut.FacetCut({ - facetAddress: address(liquidityFacet), - action: IDiamondCut.FacetCutAction.Add, - functionSelectors: liquiditySelectors - }); - - // Initialize - bytes memory initData = abi.encodeWithSelector(DiamondInit.init.selector, owner); - IDiamondCut(address(diamond)).diamondCut(cuts, address(diamondInit), initData); - } - - function testCreatePool() public { - address baseToken = address(0x100); - address quoteToken = address(0x200); - uint256 initialBaseReserve = 1000 ether; - uint256 initialQuoteReserve = 2000 ether; - uint256 virtualBaseReserve = 5000 ether; - uint256 virtualQuoteReserve = 10000 ether; - uint256 k = 5000; // 50% in basis points - uint256 oraclePrice = 2 ether; - - uint256 poolId = ILiquidityFacet(address(diamond)).createPool( - baseToken, - quoteToken, - initialBaseReserve, - initialQuoteReserve, - virtualBaseReserve, - virtualQuoteReserve, - k, - oraclePrice, - address(0) // No oracle for now - ); - - assertEq(poolId, 0, "First pool should have ID 0"); - - ILiquidityFacet.Pool memory pool = ILiquidityFacet(address(diamond)).getPool(poolId); - assertEq(pool.baseToken, baseToken); - assertEq(pool.quoteToken, quoteToken); - assertEq(pool.baseReserve, initialBaseReserve); - assertEq(pool.quoteReserve, initialQuoteReserve); - assertTrue(pool.active, "Pool should be active"); - } - - function testGetPrice() public { - // Create pool first - address baseToken = address(0x100); - address quoteToken = address(0x200); - uint256 poolId = ILiquidityFacet(address(diamond)).createPool( - baseToken, - quoteToken, - 1000 ether, - 2000 ether, - 5000 ether, - 10000 ether, - 5000, - 2 ether, - address(0) - ); - - uint256 price = ILiquidityFacet(address(diamond)).getPrice(poolId); - assertGt(price, 0, "Price should be greater than 0"); - } - - function testMultiplePools() public { - address baseToken1 = address(0x100); - address quoteToken1 = address(0x200); - - uint256 poolId1 = ILiquidityFacet(address(diamond)).createPool( - baseToken1, - quoteToken1, - 1000 ether, - 2000 ether, - 5000 ether, - 10000 ether, - 5000, - 2 ether, - address(0) - ); - - uint256 poolId2 = ILiquidityFacet(address(diamond)).createPool( - address(0x300), - address(0x400), - 500 ether, - 1000 ether, - 2500 ether, - 5000 ether, - 5000, - 2 ether, - address(0) - ); - - assertEq(poolId1, 0); - assertEq(poolId2, 1); - - ILiquidityFacet.Pool memory pool1 = ILiquidityFacet(address(diamond)).getPool(poolId1); - ILiquidityFacet.Pool memory pool2 = ILiquidityFacet(address(diamond)).getPool(poolId2); - - assertEq(pool1.baseToken, baseToken1); - assertEq(pool2.baseToken, address(0x300)); - } -} diff --git a/contracts/test/LiquidityFacet.test.ts b/contracts/test/LiquidityFacet.test.ts deleted file mode 100644 index 51fc4ba..0000000 --- a/contracts/test/LiquidityFacet.test.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { expect } from "chai"; -import { ethers } from "hardhat"; -import { Contract } from "ethers"; - -describe("LiquidityFacet", function () { - let diamond: Contract; - let liquidityFacet: Contract; - let baseToken: Contract; - let quoteToken: Contract; - - beforeEach(async function () { - // Deploy mock ERC20 tokens - const ERC20Factory = await ethers.getContractFactory("ERC20Mock"); - baseToken = await ERC20Factory.deploy("Base Token", "BASE", ethers.parseEther("1000000")); - quoteToken = await ERC20Factory.deploy("Quote Token", "QUOTE", ethers.parseEther("1000000")); - - // Deploy Diamond and facets (simplified for testing) - // In production, you would deploy the full Diamond setup - }); - - it("Should create a pool", async function () { - // Test pool creation - // This is a placeholder - actual implementation would test the full flow - expect(true).to.be.true; - }); - - it("Should calculate price correctly", async function () { - // Test PMM price calculation - expect(true).to.be.true; - }); -}); - diff --git a/contracts/test/PMMMath.test.ts b/contracts/test/PMMMath.test.ts deleted file mode 100644 index 8775a64..0000000 --- a/contracts/test/PMMMath.test.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { expect } from "chai"; -import { ethers } from "hardhat"; -import { PMMMath } from "../libraries/PMMMath.sol"; - -describe("PMMMath", function () { - it("Should calculate price correctly", async function () { - // Test PMM price formula: p = i * (1 + k * (Q - vQ) / vQ) - const i = ethers.parseEther("1"); // Oracle price - const k = ethers.parseEther("0.1"); // 10% slippage coefficient - const Q = ethers.parseEther("2000"); // Current quote reserve - const vQ = ethers.parseEther("1000"); // Virtual quote reserve - - // Expected: p = 1 * (1 + 0.1 * (2000 - 1000) / 1000) = 1.1 - // This is a placeholder - actual test would use a test contract - expect(true).to.be.true; - }); - - it("Should calculate swap output correctly", async function () { - // Test swap calculation - expect(true).to.be.true; - }); - - it("Should calculate LP shares correctly", async function () { - // Test LP share calculation - expect(true).to.be.true; - }); -}); - diff --git a/contracts/test/VaultFacet.t.sol b/contracts/test/VaultFacet.t.sol deleted file mode 100644 index 72fe5fa..0000000 --- a/contracts/test/VaultFacet.t.sol +++ /dev/null @@ -1,104 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {Test, console} from "forge-std/Test.sol"; -import {Diamond} from "../src/core/Diamond.sol"; -import {DiamondCutFacet} from "../src/core/facets/DiamondCutFacet.sol"; -import {DiamondInit} from "../src/core/DiamondInit.sol"; -import {VaultFacet} from "../src/core/facets/VaultFacet.sol"; -import {IDiamondCut} from "../src/interfaces/IDiamondCut.sol"; -import {IVaultFacet} from "../src/interfaces/IVaultFacet.sol"; -import {ERC20Mock} from "./mocks/ERC20Mock.sol"; - -contract VaultFacetTest is Test { - Diamond public diamond; - DiamondCutFacet public diamondCutFacet; - DiamondInit public diamondInit; - VaultFacet public vaultFacet; - ERC20Mock public asset; - address public owner; - address public user; - - function setUp() public { - owner = address(this); - user = address(0x1); - - // Deploy mock ERC20 - asset = new ERC20Mock("Test Asset", "TA", 18); - - // Deploy facets - diamondCutFacet = new DiamondCutFacet(); - vaultFacet = new VaultFacet(); - diamondInit = new DiamondInit(); - - // Deploy diamond - diamond = new Diamond(); - - // Prepare cuts - IDiamondCut.FacetCut[] memory cuts = new IDiamondCut.FacetCut[](2); - - // Add DiamondCutFacet - bytes4[] memory diamondCutSelectors = new bytes4[](1); - diamondCutSelectors[0] = IDiamondCut.diamondCut.selector; - cuts[0] = IDiamondCut.FacetCut({ - facetAddress: address(diamondCutFacet), - action: IDiamondCut.FacetCutAction.Add, - functionSelectors: diamondCutSelectors - }); - - // Add VaultFacet - bytes4[] memory vaultSelectors = new bytes4[](5); - vaultSelectors[0] = IVaultFacet.createVault.selector; - vaultSelectors[1] = IVaultFacet.getVault.selector; - vaultSelectors[2] = IVaultFacet.deposit.selector; - vaultSelectors[3] = IVaultFacet.convertToShares.selector; - vaultSelectors[4] = IVaultFacet.convertToAssets.selector; - - cuts[1] = IDiamondCut.FacetCut({ - facetAddress: address(vaultFacet), - action: IDiamondCut.FacetCutAction.Add, - functionSelectors: vaultSelectors - }); - - // Initialize - bytes memory initData = abi.encodeWithSelector(DiamondInit.init.selector, owner); - IDiamondCut(address(diamond)).diamondCut(cuts, address(diamondInit), initData); - } - - function testCreateVault() public { - uint256 vaultId = IVaultFacet(address(diamond)).createVault(address(asset), false); - assertEq(vaultId, 0, "First vault should have ID 0"); - - IVaultFacet.Vault memory vault = IVaultFacet(address(diamond)).getVault(vaultId); - assertEq(vault.asset, address(asset)); - assertFalse(vault.isMultiAsset); - assertTrue(vault.active); - } - - function testCreateMultiAssetVault() public { - uint256 vaultId = IVaultFacet(address(diamond)).createVault(address(0), true); - - IVaultFacet.Vault memory vault = IVaultFacet(address(diamond)).getVault(vaultId); - assertTrue(vault.isMultiAsset); - assertTrue(vault.active); - } - - function testConvertToShares() public { - uint256 vaultId = IVaultFacet(address(diamond)).createVault(address(asset), false); - - // First deposit - should be 1:1 - uint256 assets = 1000 ether; - uint256 shares = IVaultFacet(address(diamond)).convertToShares(vaultId, assets); - assertEq(shares, assets, "First deposit should be 1:1"); - } - - function testConvertToAssets() public { - uint256 vaultId = IVaultFacet(address(diamond)).createVault(address(asset), false); - - uint256 shares = 1000 ether; - uint256 assets = IVaultFacet(address(diamond)).convertToAssets(vaultId, shares); - // Empty vault should return 0 - assertEq(assets, 0); - } -} - diff --git a/contracts/test/mocks/ERC20Mock.sol b/contracts/test/mocks/ERC20Mock.sol deleted file mode 100644 index 10dac39..0000000 --- a/contracts/test/mocks/ERC20Mock.sol +++ /dev/null @@ -1,23 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; - -contract ERC20Mock is ERC20 { - constructor( - string memory name, - string memory symbol, - uint8 decimals - ) ERC20(name, symbol) { - _mint(msg.sender, 1000000 * 10 ** decimals); - } - - function mint(address to, uint256 amount) external { - _mint(to, amount); - } - - function burn(address from, uint256 amount) external { - _burn(from, amount); - } -} - diff --git a/frontend b/frontend new file mode 160000 index 0000000..3c1843a --- /dev/null +++ b/frontend @@ -0,0 +1 @@ +Subproject commit 3c1843a22b0d862d465430579dab5d2be17532a9 diff --git a/frontend/.gitignore b/frontend/.gitignore deleted file mode 100644 index 5ef6a52..0000000 --- a/frontend/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.* -.yarn/* -!.yarn/patches -!.yarn/plugins -!.yarn/releases -!.yarn/versions - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* -.pnpm-debug.log* - -# env files (can opt-in for committing if needed) -.env* - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts diff --git a/frontend/Dockerfile b/frontend/Dockerfile deleted file mode 100644 index 0e25c6a..0000000 --- a/frontend/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -FROM node:20-alpine AS base - -# Install dependencies only when needed -FROM base AS deps -RUN apk add --no-cache libc6-compat -WORKDIR /app - -COPY package.json package-lock.json* ./ -RUN npm ci - -# Rebuild the source code only when needed -FROM base AS builder -WORKDIR /app -COPY --from=deps /app/node_modules ./node_modules -COPY . . - -RUN npm run build - -# Production image, copy all the files and run next -FROM base AS runner -WORKDIR /app - -ENV NODE_ENV production - -RUN addgroup --system --gid 1001 nodejs -RUN adduser --system --uid 1001 nextjs - -COPY --from=builder /app/public ./public -COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ -COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static - -USER nextjs - -EXPOSE 3000 - -ENV PORT 3000 - -CMD ["node", "server.js"] - diff --git a/frontend/README.md b/frontend/README.md deleted file mode 100644 index e215bc4..0000000 --- a/frontend/README.md +++ /dev/null @@ -1,36 +0,0 @@ -This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). - -## Getting Started - -First, run the development server: - -```bash -npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. - -This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. diff --git a/frontend/app/admin/audit/page.tsx b/frontend/app/admin/audit/page.tsx deleted file mode 100644 index 26d65c5..0000000 --- a/frontend/app/admin/audit/page.tsx +++ /dev/null @@ -1,64 +0,0 @@ -'use client'; - -import { useEffect, useState } from 'react'; - -export default function AdminAuditPage() { - const [logs, setLogs] = useState([]); - const [loading, setLoading] = useState(true); - - useEffect(() => { - fetchLogs(); - }, []); - - const fetchLogs = async () => { - const token = localStorage.getItem('admin_token'); - try { - const res = await fetch('/api/admin/audit-logs', { - headers: { - Authorization: `Bearer ${token}`, - }, - }); - const data = await res.json(); - setLogs(data); - } catch (error) { - console.error('Failed to fetch logs:', error); - } finally { - setLoading(false); - } - }; - - if (loading) { - return
Loading...
; - } - - return ( -
-

Audit Logs

- -
-
    - {logs.map((log) => ( -
  • -
    -
    -

    - {log.action} - {log.resource || 'N/A'} -

    -

    - {log.adminUser?.email} | {new Date(log.timestamp).toLocaleString()} -

    - {log.details && ( -
    -                      {JSON.stringify(log.details, null, 2)}
    -                    
    - )} -
    -
    -
  • - ))} -
-
-
- ); -} - diff --git a/frontend/app/admin/config/page.tsx b/frontend/app/admin/config/page.tsx deleted file mode 100644 index dba5bd7..0000000 --- a/frontend/app/admin/config/page.tsx +++ /dev/null @@ -1,125 +0,0 @@ -'use client'; - -import { useEffect, useState } from 'react'; - -export default function AdminConfigPage() { - const [configs, setConfigs] = useState([]); - const [loading, setLoading] = useState(true); - const [editingKey, setEditingKey] = useState(null); - const [editValue, setEditValue] = useState(''); - - useEffect(() => { - fetchConfigs(); - }, []); - - const fetchConfigs = async () => { - const token = localStorage.getItem('admin_token'); - try { - const res = await fetch('/api/admin/config', { - headers: { - Authorization: `Bearer ${token}`, - }, - }); - const data = await res.json(); - setConfigs(data); - } catch (error) { - console.error('Failed to fetch configs:', error); - } finally { - setLoading(false); - } - }; - - const handleSave = async (key: string) => { - const token = localStorage.getItem('admin_token'); - try { - const res = await fetch('/api/admin/config', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - Authorization: `Bearer ${token}`, - }, - body: JSON.stringify({ - key, - value: JSON.parse(editValue), - }), - }); - if (res.ok) { - setEditingKey(null); - fetchConfigs(); - } - } catch (error) { - console.error('Failed to save config:', error); - } - }; - - if (loading) { - return
Loading...
; - } - - return ( -
-

System Configuration

- -
-
    - {configs.map((config) => ( -
  • -
    -
    -

    {config.key}

    -

    - {config.description || 'No description'} -

    - {editingKey === config.key ? ( -