From 2ab8206d43af571f0f732f91c5b4111af64e47f6 Mon Sep 17 00:00:00 2001 From: Didi Date: Fri, 31 May 2024 13:09:12 +0200 Subject: [PATCH 01/42] Add base-sepolia (#1947) * added base-sepolia * fix a bug in packages/sdk-core/tasks/testSchemasAndQueries.sh --------- Co-authored-by: Miao, ZhiCheng --- packages/ethereum-contracts/package.json | 2 +- packages/ethereum-contracts/truffle-config.js | 5 +++ packages/metadata/main/networks/list.cjs | 32 ++++++++++++++++ packages/metadata/module/networks/list.js | 32 ++++++++++++++++ packages/metadata/networks.json | 32 ++++++++++++++++ packages/metadata/package.json | 2 +- .../sdk-core/tasks/testSchemasAndQueries.sh | 2 +- packages/subgraph/tasks/deploy.sh | 2 +- yarn.lock | 37 ++++++++++++++++--- 9 files changed, 137 insertions(+), 9 deletions(-) diff --git a/packages/ethereum-contracts/package.json b/packages/ethereum-contracts/package.json index 0a26e992c8..186554ba62 100644 --- a/packages/ethereum-contracts/package.json +++ b/packages/ethereum-contracts/package.json @@ -86,7 +86,7 @@ "hardhat": "^2.19.5" }, "devDependencies": { - "@d10r/truffle-plugin-verify": "0.6.9", + "@d10r/truffle-plugin-verify": "^0.6.10", "@nomiclabs/hardhat-truffle5": "^2.0.7", "@safe-global/safe-core-sdk": "^3.3.5", "@safe-global/safe-service-client": "^2.0.3", diff --git a/packages/ethereum-contracts/truffle-config.js b/packages/ethereum-contracts/truffle-config.js index d1f6e93fab..359f1aa42d 100644 --- a/packages/ethereum-contracts/truffle-config.js +++ b/packages/ethereum-contracts/truffle-config.js @@ -74,6 +74,7 @@ const ALIASES = { "celo-mainnet": ["celo"], "base-mainnet": ["base"], + "base-sepolia": ["bsepolia"], "scroll-sepolia": ["scrsepolia"], "scroll-mainnet": ["scroll"], @@ -266,6 +267,10 @@ const E = (module.exports = { maxPriorityFeePerGas: 1e6, // 0.001 gwei - even 0 may do maxFeePerGas: 1e9, // 1 gwei }, + "base-sepolia": { + ...createNetworkDefaultConfiguration("base-sepolia"), + network_id: 84532, + }, // // Scroll: https://docs.scroll.xyz/en/getting-started/overview/ diff --git a/packages/metadata/main/networks/list.cjs b/packages/metadata/main/networks/list.cjs index 10c53e5fd6..9ac7fb3a35 100644 --- a/packages/metadata/main/networks/list.cjs +++ b/packages/metadata/main/networks/list.cjs @@ -174,6 +174,38 @@ module.exports = }, "publicRPCs": ["https://sepolia-rpc.scroll.io"] }, + { + "name": "base-sepolia", + "isTestnet": true, + "networkId": 84532, + "chainId": 84532, + "sfId": 111, + "shortName": "bsepolia", + "uppercaseName": "BASE_SEPOLIA", + "humanReadableName": "Base Sepolia", + "nativeTokenSymbol": "ETH", + "nativeTokenWrapper": "", + "contractsV1": { + "resolver": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", + "host": "0x109412E3C84f0539b43d39dB691B08c90f58dC7c", + "cfaV1": "0x6836F23d6171D74Ef62FcF776655aBcD2bcd62Ef", + "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", + "idaV1": "0x9358C7dCCc6B8CA6F526311e8ac266F8C861B7ea", + "gdaV1": "0x53F4f44C813Dc380182d0b2b67fe5832A12B97f8", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", + "superTokenFactory": "0x7447E94Dfe3d804a9f46Bf12838d467c912C8F6C", + "superfluidLoader": "0x777Be25F9fdcA87e8a0E06Ad4be93d65429FCb9f" + }, + "startBlockV1": 10604500, + "logsQueryRange": 50000, + "explorer": "https://sepolia.basescan.org", + "subgraphV1": { + "cliName": "base-sepolia" + }, + "publicRPCs": [ + "https://sepolia.base.org" + ] + }, { "name": "xdai-mainnet", "isTestnet": false, diff --git a/packages/metadata/module/networks/list.js b/packages/metadata/module/networks/list.js index a67ffd741c..2fc78c4906 100644 --- a/packages/metadata/module/networks/list.js +++ b/packages/metadata/module/networks/list.js @@ -174,6 +174,38 @@ export default }, "publicRPCs": ["https://sepolia-rpc.scroll.io"] }, + { + "name": "base-sepolia", + "isTestnet": true, + "networkId": 84532, + "chainId": 84532, + "sfId": 111, + "shortName": "bsepolia", + "uppercaseName": "BASE_SEPOLIA", + "humanReadableName": "Base Sepolia", + "nativeTokenSymbol": "ETH", + "nativeTokenWrapper": "", + "contractsV1": { + "resolver": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", + "host": "0x109412E3C84f0539b43d39dB691B08c90f58dC7c", + "cfaV1": "0x6836F23d6171D74Ef62FcF776655aBcD2bcd62Ef", + "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", + "idaV1": "0x9358C7dCCc6B8CA6F526311e8ac266F8C861B7ea", + "gdaV1": "0x53F4f44C813Dc380182d0b2b67fe5832A12B97f8", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", + "superTokenFactory": "0x7447E94Dfe3d804a9f46Bf12838d467c912C8F6C", + "superfluidLoader": "0x777Be25F9fdcA87e8a0E06Ad4be93d65429FCb9f" + }, + "startBlockV1": 10604500, + "logsQueryRange": 50000, + "explorer": "https://sepolia.basescan.org", + "subgraphV1": { + "cliName": "base-sepolia" + }, + "publicRPCs": [ + "https://sepolia.base.org" + ] + }, { "name": "xdai-mainnet", "isTestnet": false, diff --git a/packages/metadata/networks.json b/packages/metadata/networks.json index 090df19389..311f4080ca 100644 --- a/packages/metadata/networks.json +++ b/packages/metadata/networks.json @@ -172,6 +172,38 @@ }, "publicRPCs": ["https://sepolia-rpc.scroll.io"] }, + { + "name": "base-sepolia", + "isTestnet": true, + "networkId": 84532, + "chainId": 84532, + "sfId": 111, + "shortName": "bsepolia", + "uppercaseName": "BASE_SEPOLIA", + "humanReadableName": "Base Sepolia", + "nativeTokenSymbol": "ETH", + "nativeTokenWrapper": "", + "contractsV1": { + "resolver": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", + "host": "0x109412E3C84f0539b43d39dB691B08c90f58dC7c", + "cfaV1": "0x6836F23d6171D74Ef62FcF776655aBcD2bcd62Ef", + "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", + "idaV1": "0x9358C7dCCc6B8CA6F526311e8ac266F8C861B7ea", + "gdaV1": "0x53F4f44C813Dc380182d0b2b67fe5832A12B97f8", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", + "superTokenFactory": "0x7447E94Dfe3d804a9f46Bf12838d467c912C8F6C", + "superfluidLoader": "0x777Be25F9fdcA87e8a0E06Ad4be93d65429FCb9f" + }, + "startBlockV1": 10604500, + "logsQueryRange": 50000, + "explorer": "https://sepolia.basescan.org", + "subgraphV1": { + "cliName": "base-sepolia" + }, + "publicRPCs": [ + "https://sepolia.base.org" + ] + }, { "name": "xdai-mainnet", "isTestnet": false, diff --git a/packages/metadata/package.json b/packages/metadata/package.json index 60c969a359..c6c1d5ab51 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -1,6 +1,6 @@ { "name": "@superfluid-finance/metadata", - "version": "1.2.3", + "version": "1.2.4", "description": "Superfluid Metadata", "main": "main/index.cjs", "module": "module/index.js", diff --git a/packages/sdk-core/tasks/testSchemasAndQueries.sh b/packages/sdk-core/tasks/testSchemasAndQueries.sh index 2b8c64cc6f..ba0519fac0 100755 --- a/packages/sdk-core/tasks/testSchemasAndQueries.sh +++ b/packages/sdk-core/tasks/testSchemasAndQueries.sh @@ -35,7 +35,7 @@ for i in "${NETWORKS[@]}";do if [ "$SUBGRAPH_RELEASE_TAG" == "v1" ]; then # No need for the legacy name here - SUBGRAPH_ENDPOINT="https://${NETWORKS[$i]}.subgraph.x.superfluid.dev" + SUBGRAPH_ENDPOINT="https://$i.subgraph.x.superfluid.dev" else SUBGRAPH_ENDPOINT="https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-$SUBGRAPH_RELEASE_TAG-$GRAPH_NETWORK" fi diff --git a/packages/subgraph/tasks/deploy.sh b/packages/subgraph/tasks/deploy.sh index 71f96e37d7..06486d7c2a 100755 --- a/packages/subgraph/tasks/deploy.sh +++ b/packages/subgraph/tasks/deploy.sh @@ -17,7 +17,7 @@ GRAPH_NETWORKS=( $($JQ -r .[] ./hosted-service-networks.json) ) || exit 1 # shellcheck disable=SC2034 SATSUMA_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "eth-mainnet" "eth-sepolia" "optimism-mainnet" "base-mainnet") # shellcheck disable=SC2034 -SUPERFLUID_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "base-mainnet" "optimism-mainnet" "arbitrum-one" "celo-mainnet" "bsc-mainnet" "avalanche-c" "optimism-sepolia" "scroll-sepolia" "scroll-mainnet" "degenchain") +SUPERFLUID_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "base-mainnet" "optimism-mainnet" "arbitrum-one" "celo-mainnet" "bsc-mainnet" "avalanche-c" "optimism-sepolia" "scroll-sepolia" "scroll-mainnet" "degenchain" "base-sepolia") # shellcheck disable=SC2034 GOLDSKY_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "eth-mainnet" "base-mainnet" "optimism-mainnet" "arbitrum-one" "bsc-mainnet" "avalanche-c" "optimism-sepolia" "scroll-sepolia" "scroll-mainnet" "eth-sepolia") # shellcheck disable=SC2034 diff --git a/yarn.lock b/yarn.lock index 121b372b9b..a91339e0bc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -893,10 +893,10 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" -"@d10r/truffle-plugin-verify@0.6.9": - version "0.6.9" - resolved "https://registry.yarnpkg.com/@d10r/truffle-plugin-verify/-/truffle-plugin-verify-0.6.9.tgz#fc826ada251f82a7f276d80e1d572eaf573d1555" - integrity sha512-E5YG+YYrbDSJlRK5590xdV6g8855pztzAKUSUZqtidq/DUXOdcbt8VjFli+H7zsFru0cywM38G7z+rWoPdolGA== +"@d10r/truffle-plugin-verify@^0.6.10": + version "0.6.10" + resolved "https://registry.yarnpkg.com/@d10r/truffle-plugin-verify/-/truffle-plugin-verify-0.6.10.tgz#f37d0b50ea3ec3e9ce5e8beed4bdb6df59404fd6" + integrity sha512-aCqotcE3usTImVRM9DW9z1nyR6LA+0t5GSlgivTnHYonWpBChkz5rFHAoHwyKsZU9BeJbPwLYwpB9K2ldWojdg== dependencies: "@truffle/resolver" "^9.0.35" axios "^0.26.1" @@ -13668,7 +13668,34 @@ mnemonist@^0.38.0: dependencies: obliterator "^2.0.0" -mocha@10.1.0, mocha@^10.0.0, mocha@^10.2.0: +mocha@10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.1.0.tgz#dbf1114b7c3f9d0ca5de3133906aea3dfc89ef7a" + integrity sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg== + dependencies: + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.5.3" + debug "4.3.4" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.2.0" + he "1.2.0" + js-yaml "4.1.0" + log-symbols "4.1.0" + minimatch "5.0.1" + ms "2.1.3" + nanoid "3.3.3" + serialize-javascript "6.0.0" + strip-json-comments "3.1.1" + supports-color "8.1.1" + workerpool "6.2.1" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" + +mocha@^10.0.0, mocha@^10.2.0: version "10.2.0" resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== From f8b4fe623333c17a46e7d14c9cb4390447504420 Mon Sep 17 00:00:00 2001 From: Kaspar Kallas Date: Tue, 11 Jun 2024 21:25:19 +0300 Subject: [PATCH 02/42] [subgraph] configurable history pruning (#1954) * chore: update subgraph deps - limit the schema deps by what is available on goldsky currently * add pruning * bump version and changelog * remove unnecessary code * try latest graph node --- packages/subgraph/CHANGELOG.md | 5 ++ packages/subgraph/docker-compose.yml | 2 +- packages/subgraph/package.json | 6 +-- .../subgraph/scripts/buildNetworkConfig.ts | 20 ++++++-- packages/subgraph/subgraph.template.yaml | 30 ++++++------ packages/subgraph/tasks/deploy.sh | 14 ++---- yarn.lock | 48 +++++-------------- 7 files changed, 56 insertions(+), 69 deletions(-) diff --git a/packages/subgraph/CHANGELOG.md b/packages/subgraph/CHANGELOG.md index 38d023a6b5..b9d7348e2e 100644 --- a/packages/subgraph/CHANGELOG.md +++ b/packages/subgraph/CHANGELOG.md @@ -6,6 +6,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +## [2.0.0] + +### Changed +- Enabled history pruning which disables perfect time-travel queries. + ## [1.7.1] - 2024-04-22 ### Added diff --git a/packages/subgraph/docker-compose.yml b/packages/subgraph/docker-compose.yml index 60f65f18cd..7848978088 100644 --- a/packages/subgraph/docker-compose.yml +++ b/packages/subgraph/docker-compose.yml @@ -1,7 +1,7 @@ version: "3" services: graph-node: - image: graphprotocol/graph-node:v0.27.0 + image: graphprotocol/graph-node:v0.35.0 ports: - "8000:8000" - "8001:8001" diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 04892a3577..73a969a3a3 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -1,6 +1,6 @@ { "name": "@superfluid-finance/subgraph", - "version": "1.7.1", + "version": "2.0.0", "description": "Subgraph for the Superfluid Ethereum contracts.", "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/subgraph", "repository": { @@ -50,8 +50,8 @@ "cloc": "cloc src" }, "dependencies": { - "@graphprotocol/graph-cli": "0.69.1", - "@graphprotocol/graph-ts": "0.34.0", + "@graphprotocol/graph-cli": "0.73.0", + "@graphprotocol/graph-ts": "0.35.1", "@superfluid-finance/sdk-core": "^0.7.0", "mustache": "^4.2.0" }, diff --git a/packages/subgraph/scripts/buildNetworkConfig.ts b/packages/subgraph/scripts/buildNetworkConfig.ts index d9e0a0cd76..a2a7dcee10 100644 --- a/packages/subgraph/scripts/buildNetworkConfig.ts +++ b/packages/subgraph/scripts/buildNetworkConfig.ts @@ -14,23 +14,34 @@ interface SubgraphConfig { readonly nativeAssetSuperTokenAddress: string; readonly constantOutflowNFTAddress: string; readonly constantInflowNFTAddress: string; + readonly indexerHints_prune: string; } const ADDRESS_ZERO = "0x0000000000000000000000000000000000000000"; -// script usage: npx ts-node ./scripts/buildNetworkConfig.ts +const vendorCliNameExceptions: Record> = { + "goldsky": { + "xdai-mainnet": "xdai" + } +} + +const vendorHistoryPruning: Record = { + "goldsky": "auto" +}; + +// script usage: npx ts-node ./scripts/buildNetworkConfig.ts function main() { const networkName = process.argv[2]; + const vendorName = process.argv[3]; - const networkMetadata = metadata.getNetworkByName(networkName); + const networkMetadata = metadata.getNetworkByName(networkName); if (!networkMetadata) { throw new Error("No metadata found"); } const subgraphConfig: SubgraphConfig = { - // cliName exists for networks supported by the hosted service - network: networkMetadata.subgraphV1.cliName || networkMetadata.shortName, + network: vendorCliNameExceptions[vendorName]?.[networkMetadata.name] || networkMetadata.subgraphV1.cliName || networkMetadata.shortName, hostStartBlock: networkMetadata.startBlockV1, hostAddress: networkMetadata.contractsV1.host, cfaAddress: networkMetadata.contractsV1.cfaV1, @@ -41,6 +52,7 @@ function main() { nativeAssetSuperTokenAddress: networkMetadata.nativeTokenWrapper, constantOutflowNFTAddress: networkMetadata.contractsV1.constantOutflowNFT || ADDRESS_ZERO, constantInflowNFTAddress: networkMetadata.contractsV1.constantInflowNFT || ADDRESS_ZERO, + indexerHints_prune: vendorHistoryPruning[vendorName] || "never", }; const writeToDir = join(__dirname, '..', `config/${networkName}.json`); diff --git a/packages/subgraph/subgraph.template.yaml b/packages/subgraph/subgraph.template.yaml index 3a103018aa..5c0226f970 100644 --- a/packages/subgraph/subgraph.template.yaml +++ b/packages/subgraph/subgraph.template.yaml @@ -1,8 +1,10 @@ -specVersion: 0.0.5 -description: Subgraph for the Superfluid Ethereum contracts. +specVersion: 1.0.0 +description: Subgraph for the Superfluid Protocol V1 contracts. repository: https://github.com/superfluid-finance/protocol-monorepo schema: file: ./schema.graphql +indexerHints: + prune: {{#indexerHints_prune}}{{ indexerHints_prune }}{{/indexerHints_prune}}{{^indexerHints_prune}}never{{/indexerHints_prune}} dataSources: - kind: ethereum/contract name: SuperTokenFactory @@ -13,7 +15,7 @@ dataSources: startBlock: {{ hostStartBlock }} mapping: kind: ethereum/events - apiVersion: 0.0.7 + apiVersion: 0.0.8 language: wasm/assemblyscript file: ./src/mappings/superTokenFactory.ts entities: @@ -50,7 +52,7 @@ dataSources: startBlock: {{ hostStartBlock }} mapping: kind: ethereum/events - apiVersion: 0.0.7 + apiVersion: 0.0.8 language: wasm/assemblyscript file: ./src/mappings/host.ts entities: @@ -96,7 +98,7 @@ dataSources: startBlock: {{ hostStartBlock }} mapping: kind: ethereum/events - apiVersion: 0.0.7 + apiVersion: 0.0.8 language: wasm/assemblyscript file: ./src/mappings/cfav1.ts entities: @@ -139,7 +141,7 @@ dataSources: startBlock: {{ hostStartBlock }} mapping: kind: ethereum/events - apiVersion: 0.0.7 + apiVersion: 0.0.8 language: wasm/assemblyscript file: ./src/mappings/idav1.ts entities: @@ -210,7 +212,7 @@ dataSources: startBlock: {{ hostStartBlock }} mapping: kind: ethereum/events - apiVersion: 0.0.7 + apiVersion: 0.0.8 language: wasm/assemblyscript file: ./src/mappings/gdav1.ts entities: @@ -263,7 +265,7 @@ dataSources: startBlock: {{ hostStartBlock }} mapping: kind: ethereum/events - apiVersion: 0.0.7 + apiVersion: 0.0.8 language: wasm/assemblyscript file: ./src/mappings/resolver.ts entities: @@ -298,7 +300,7 @@ dataSources: startBlock: {{ hostStartBlock }} mapping: kind: ethereum/events - apiVersion: 0.0.7 + apiVersion: 0.0.8 language: wasm/assemblyscript file: ./src/mappings/flowNFT.ts entities: @@ -333,7 +335,7 @@ dataSources: startBlock: {{ hostStartBlock }} mapping: kind: ethereum/events - apiVersion: 0.0.7 + apiVersion: 0.0.8 language: wasm/assemblyscript file: ./src/mappings/flowNFT.ts entities: @@ -367,7 +369,7 @@ templates: abi: ISuperToken mapping: kind: ethereum/events - apiVersion: 0.0.7 + apiVersion: 0.0.8 language: wasm/assemblyscript file: ./src/mappings/superToken.ts entities: @@ -426,7 +428,7 @@ templates: abi: SuperfluidGovernanceBase mapping: kind: ethereum/events - apiVersion: 0.0.7 + apiVersion: 0.0.8 language: wasm/assemblyscript file: ./src/mappings/superfluidGovernance.ts entities: @@ -466,7 +468,7 @@ templates: abi: TOGA mapping: kind: ethereum/events - apiVersion: 0.0.7 + apiVersion: 0.0.8 language: wasm/assemblyscript file: ./src/mappings/toga.ts entities: @@ -493,7 +495,7 @@ templates: abi: ISuperfluidPool mapping: kind: ethereum/events - apiVersion: 0.0.7 + apiVersion: 0.0.8 language: wasm/assemblyscript file: ./src/mappings/superfluidPool.ts entities: diff --git a/packages/subgraph/tasks/deploy.sh b/packages/subgraph/tasks/deploy.sh index 06486d7c2a..a6e4c938c9 100755 --- a/packages/subgraph/tasks/deploy.sh +++ b/packages/subgraph/tasks/deploy.sh @@ -126,18 +126,12 @@ deploy_to_goldsky() { local network="$1" # TODO: use tagging? - # name mapping for godldsky legacy networks not using our cliNames - local -A legacyNetworkNames=( - ["xdai-mainnet"]="xdai" - ) - - local goldskyNetwork="${legacyNetworkNames[$network]:-$network}" - local subgraphName="protocol-$DEPLOYMENT_ENV-$goldskyNetwork/$VERSION_LABEL" + local subgraphName="protocol-$DEPLOYMENT_ENV-$network/$VERSION_LABEL" + # Note: when using Graph CLI to deploy, it implicitly triggers build too, but Goldsky CLI doesn't, so we do it explicitly. $GRAPH_CLI build - # Note: when using Graph CLI to deploy, it implicitly triggers build too, but Goldsky CLI doesn't. - echo "********* Deploying $goldskyNetwork subgraph $subgraphName to Goldsky. **********" + echo "********* Deploying $network subgraph $subgraphName to Goldsky. **********" $GOLDSKY_CLI subgraph deploy \ "$subgraphName" \ --path . \ @@ -177,7 +171,7 @@ deploy_to() { exit 1 fi - npx ts-node ./scripts/buildNetworkConfig.ts "$network" + npx ts-node ./scripts/buildNetworkConfig.ts "$network" "$vendor" # prepare the manifest prior to deployment # this generates the subgraph.yaml and diff --git a/yarn.lock b/yarn.lock index a91339e0bc..94da50a4e1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1499,10 +1499,10 @@ optionalDependencies: "@trufflesuite/bigint-buffer" "1.1.9" -"@graphprotocol/graph-cli@0.69.1": - version "0.69.1" - resolved "https://registry.yarnpkg.com/@graphprotocol/graph-cli/-/graph-cli-0.69.1.tgz#2ea248fb1636b46afb6101236e3f387e9d2f3275" - integrity sha512-PekTli4hsBkF48y2NA2ufNjtdG/VL4N+E7GAavNXxFmSHM9VoCWbR4OBeJ93dAOpgHRGyx8yO1NE9DDT7yEZsg== +"@graphprotocol/graph-cli@0.73.0": + version "0.73.0" + resolved "https://registry.yarnpkg.com/@graphprotocol/graph-cli/-/graph-cli-0.73.0.tgz#ff4ab0a153b9fedad4ade3cddb52caf68f519c1b" + integrity sha512-g+EapDRvxhRjMccnUJE8gBRGDIF6mXqtv8g0tzzixVClw/BezBni8QXtXMHs4Gg0G2UnerJJLp5ZQgZqtHWnmg== dependencies: "@float-capital/float-subgraph-uncrashable" "^0.0.0-alpha.4" "@oclif/core" "2.8.6" @@ -1524,6 +1524,7 @@ ipfs-http-client "55.0.0" jayson "4.0.0" js-yaml "3.14.1" + open "8.4.2" prettier "3.0.3" semver "7.4.0" sync-request "6.1.0" @@ -1532,10 +1533,10 @@ which "2.0.2" yaml "1.10.2" -"@graphprotocol/graph-ts@0.34.0": - version "0.34.0" - resolved "https://registry.yarnpkg.com/@graphprotocol/graph-ts/-/graph-ts-0.34.0.tgz#ca47398295b114f25b412faa364b98af31fa2bb7" - integrity sha512-gnhjai65AV4YMYe9QHGz+HP/jdzI54z/nOfEXZFfh6m987EP2iy3ycLXrTi+ahcogHH7vtoWFdXbUzZbE8bCAg== +"@graphprotocol/graph-ts@0.35.1": + version "0.35.1" + resolved "https://registry.yarnpkg.com/@graphprotocol/graph-ts/-/graph-ts-0.35.1.tgz#1e1ecc36d8f7a727ef3a6f1fed4c5ce16de378c2" + integrity sha512-74CfuQmf7JI76/XCC34FTkMMKeaf+3Pn0FIV3m9KNeaOJ+OI3CvjMIVRhOZdKcJxsFCBGaCCl0eQjh47xTjxKA== dependencies: assemblyscript "0.19.10" @@ -13668,34 +13669,7 @@ mnemonist@^0.38.0: dependencies: obliterator "^2.0.0" -mocha@10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.1.0.tgz#dbf1114b7c3f9d0ca5de3133906aea3dfc89ef7a" - integrity sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg== - dependencies: - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.5.3" - debug "4.3.4" - diff "5.0.0" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "7.2.0" - he "1.2.0" - js-yaml "4.1.0" - log-symbols "4.1.0" - minimatch "5.0.1" - ms "2.1.3" - nanoid "3.3.3" - serialize-javascript "6.0.0" - strip-json-comments "3.1.1" - supports-color "8.1.1" - workerpool "6.2.1" - yargs "16.2.0" - yargs-parser "20.2.4" - yargs-unparser "2.0.0" - -mocha@^10.0.0, mocha@^10.2.0: +mocha@10.1.0, mocha@^10.0.0, mocha@^10.2.0: version "10.2.0" resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== @@ -14603,7 +14577,7 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -open@^8.4.0: +open@8.4.2, open@^8.4.0: version "8.4.2" resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== From 8a3424d0f209f5d803fca4d8769b0619181a4bcb Mon Sep 17 00:00:00 2001 From: Kaspar Kallas Date: Wed, 12 Jun 2024 11:15:24 +0300 Subject: [PATCH 03/42] [subgraph] fix: use `resolutions` to force a later version of metadata in a test (#1957) * fix: use resolutions to force a later version of metadata * downgrade sdk-core --- .../previous-versions-testing/package.json | 3 + .../previous-versions-testing/yarn.lock | 741 +++++++++--------- 2 files changed, 377 insertions(+), 367 deletions(-) diff --git a/packages/sdk-core/previous-versions-testing/package.json b/packages/sdk-core/previous-versions-testing/package.json index 4bf0329c11..9cf28c6ae9 100644 --- a/packages/sdk-core/previous-versions-testing/package.json +++ b/packages/sdk-core/previous-versions-testing/package.json @@ -7,5 +7,8 @@ }, "devDependencies": { "@superfluid-finance/sdk-core": "0.4.3" + }, + "resolutions": { + "@superfluid-finance/metadata": ">1.2.0" } } diff --git a/packages/sdk-core/previous-versions-testing/yarn.lock b/packages/sdk-core/previous-versions-testing/yarn.lock index b927199b2a..4c650c964e 100644 --- a/packages/sdk-core/previous-versions-testing/yarn.lock +++ b/packages/sdk-core/previous-versions-testing/yarn.lock @@ -2,345 +2,352 @@ # yarn lockfile v1 -"@ethersproject/abi@5.6.2", "@ethersproject/abi@^5.6.0": - version "5.6.2" - resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.6.2.tgz#f2956f2ac724cd720e581759d9e3840cd9744818" - integrity sha512-40Ixjhy+YzFtnvzIqFU13FW9hd1gMoLa3cJfSDnfnL4o8EnEG1qLiV8sNJo3sHYi9UYMfFeRuZ7kv5+vhzU7gQ== - dependencies: - "@ethersproject/address" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/constants" "^5.6.0" - "@ethersproject/hash" "^5.6.0" - "@ethersproject/keccak256" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/strings" "^5.6.0" - -"@ethersproject/abstract-provider@5.6.0", "@ethersproject/abstract-provider@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.6.0.tgz#0c4ac7054650dbd9c476cf5907f588bbb6ef3061" - integrity sha512-oPMFlKLN+g+y7a79cLK3WiLcjWFnZQtXWgnLAbHZcN3s7L4v90UHpTOrLk+m3yr0gt+/h9STTM6zrr7PM8uoRw== - dependencies: - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/networks" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/transactions" "^5.6.0" - "@ethersproject/web" "^5.6.0" - -"@ethersproject/abstract-signer@5.6.1", "@ethersproject/abstract-signer@^5.6.0": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.6.1.tgz#54df786bdf1aabe20d0ed508ec05e0aa2d06674f" - integrity sha512-xhSLo6y0nGJS7NxfvOSzCaWKvWb1TLT7dQ0nnpHZrDnC67xfnWm9NXflTMFPUXXMtjr33CdV0kWDEmnbrQZ74Q== - dependencies: - "@ethersproject/abstract-provider" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - -"@ethersproject/address@5.6.0", "@ethersproject/address@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.6.0.tgz#13c49836d73e7885fc148ad633afad729da25012" - integrity sha512-6nvhYXjbXsHPS+30sHZ+U4VMagFC/9zAk6Gd/h3S21YW4+yfb0WfRtaAIZ4kfM4rrVwqiy284LP0GtL5HXGLxQ== - dependencies: - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/keccak256" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/rlp" "^5.6.0" - -"@ethersproject/base64@5.6.0", "@ethersproject/base64@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.6.0.tgz#a12c4da2a6fb86d88563216b0282308fc15907c9" - integrity sha512-2Neq8wxJ9xHxCF9TUgmKeSh9BXJ6OAxWfeGWvbauPh8FuHEjamgHilllx8KkSd5ErxyHIX7Xv3Fkcud2kY9ezw== - dependencies: - "@ethersproject/bytes" "^5.6.0" - -"@ethersproject/basex@5.6.0", "@ethersproject/basex@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.6.0.tgz#9ea7209bf0a1c3ddc2a90f180c3a7f0d7d2e8a69" - integrity sha512-qN4T+hQd/Md32MoJpc69rOwLYRUXwjTlhHDIeUkUmiN/JyWkkLLMoG0TqvSQKNqZOMgN5stbUYN6ILC+eD7MEQ== - dependencies: - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - -"@ethersproject/bignumber@5.6.1", "@ethersproject/bignumber@^5.6.0": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.6.1.tgz#d5e0da518eb82ab8d08ca9db501888bbf5f0c8fb" - integrity sha512-UtMeZ3GaUuF9sx2u9nPZiPP3ULcAFmXyvynR7oHl/tPrM+vldZh7ocMsoa1PqKYGnQnqUZJoqxZnGN6J0qdipA== - dependencies: - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - bn.js "^4.11.9" +"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" + integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/abstract-provider@5.7.0", "@ethersproject/abstract-provider@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" + integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" + +"@ethersproject/abstract-signer@5.7.0", "@ethersproject/abstract-signer@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2" + integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + +"@ethersproject/address@5.7.0", "@ethersproject/address@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" + integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + +"@ethersproject/base64@5.7.0", "@ethersproject/base64@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c" + integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== + dependencies: + "@ethersproject/bytes" "^5.7.0" + +"@ethersproject/basex@5.7.0", "@ethersproject/basex@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.7.0.tgz#97034dc7e8938a8ca943ab20f8a5e492ece4020b" + integrity sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + +"@ethersproject/bignumber@5.7.0", "@ethersproject/bignumber@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" + integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + bn.js "^5.2.1" -"@ethersproject/bytes@5.6.1", "@ethersproject/bytes@^5.6.0": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.6.1.tgz#24f916e411f82a8a60412344bf4a813b917eefe7" - integrity sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g== - dependencies: - "@ethersproject/logger" "^5.6.0" - -"@ethersproject/constants@5.6.0", "@ethersproject/constants@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.6.0.tgz#55e3eb0918584d3acc0688e9958b0cedef297088" - integrity sha512-SrdaJx2bK0WQl23nSpV/b1aq293Lh0sUaZT/yYKPDKn4tlAbkH96SPJwIhwSwTsoQQZxuh1jnqsKwyymoiBdWA== - dependencies: - "@ethersproject/bignumber" "^5.6.0" - -"@ethersproject/contracts@5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.6.1.tgz#c0eba3f8a2226456f92251a547344fd0593281d2" - integrity sha512-0fpBBDoPqJMsutE6sNjg6pvCJaIcl7tliMQTMRcoUWDACfjO68CpKOJBlsEhEhmzdnu/41KbrfAeg+sB3y35MQ== - dependencies: - "@ethersproject/abi" "^5.6.0" - "@ethersproject/abstract-provider" "^5.6.0" - "@ethersproject/abstract-signer" "^5.6.0" - "@ethersproject/address" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/constants" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/transactions" "^5.6.0" - -"@ethersproject/hash@5.6.0", "@ethersproject/hash@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.6.0.tgz#d24446a5263e02492f9808baa99b6e2b4c3429a2" - integrity sha512-fFd+k9gtczqlr0/BruWLAu7UAOas1uRRJvOR84uDf4lNZ+bTkGl366qvniUZHKtlqxBRU65MkOobkmvmpHU+jA== - dependencies: - "@ethersproject/abstract-signer" "^5.6.0" - "@ethersproject/address" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/keccak256" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/strings" "^5.6.0" - -"@ethersproject/hdnode@5.6.1", "@ethersproject/hdnode@^5.6.0": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.6.1.tgz#37fa1eb91f6e20ca39cc5fcb7acd3da263d85dab" - integrity sha512-6IuYDmbH5Bv/WH/A2cUd0FjNr4qTLAvyHAECiFZhNZp69pPvU7qIDwJ7CU7VAkwm4IVBzqdYy9mpMAGhQdwCDA== - dependencies: - "@ethersproject/abstract-signer" "^5.6.0" - "@ethersproject/basex" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/pbkdf2" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/sha2" "^5.6.0" - "@ethersproject/signing-key" "^5.6.0" - "@ethersproject/strings" "^5.6.0" - "@ethersproject/transactions" "^5.6.0" - "@ethersproject/wordlists" "^5.6.0" - -"@ethersproject/json-wallets@5.6.0", "@ethersproject/json-wallets@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.6.0.tgz#4c2fc27f17e36c583e7a252fb938bc46f98891e5" - integrity sha512-fmh86jViB9r0ibWXTQipxpAGMiuxoqUf78oqJDlCAJXgnJF024hOOX7qVgqsjtbeoxmcLwpPsXNU0WEe/16qPQ== - dependencies: - "@ethersproject/abstract-signer" "^5.6.0" - "@ethersproject/address" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/hdnode" "^5.6.0" - "@ethersproject/keccak256" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/pbkdf2" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/random" "^5.6.0" - "@ethersproject/strings" "^5.6.0" - "@ethersproject/transactions" "^5.6.0" +"@ethersproject/bytes@5.7.0", "@ethersproject/bytes@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" + integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/constants@5.7.0", "@ethersproject/constants@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" + integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + +"@ethersproject/contracts@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" + integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== + dependencies: + "@ethersproject/abi" "^5.7.0" + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + +"@ethersproject/hash@5.7.0", "@ethersproject/hash@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" + integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/hdnode@5.7.0", "@ethersproject/hdnode@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.7.0.tgz#e627ddc6b466bc77aebf1a6b9e47405ca5aef9cf" + integrity sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/pbkdf2" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wordlists" "^5.7.0" + +"@ethersproject/json-wallets@5.7.0", "@ethersproject/json-wallets@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz#5e3355287b548c32b368d91014919ebebddd5360" + integrity sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hdnode" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/pbkdf2" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" aes-js "3.0.0" scrypt-js "3.0.1" -"@ethersproject/keccak256@5.6.0", "@ethersproject/keccak256@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.6.0.tgz#fea4bb47dbf8f131c2e1774a1cecbfeb9d606459" - integrity sha512-tk56BJ96mdj/ksi7HWZVWGjCq0WVl/QvfhFQNeL8fxhBlGoP+L80uDCiQcpJPd+2XxkivS3lwRm3E0CXTfol0w== +"@ethersproject/keccak256@5.7.0", "@ethersproject/keccak256@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" + integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== dependencies: - "@ethersproject/bytes" "^5.6.0" + "@ethersproject/bytes" "^5.7.0" js-sha3 "0.8.0" -"@ethersproject/logger@5.6.0", "@ethersproject/logger@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.6.0.tgz#d7db1bfcc22fd2e4ab574cba0bb6ad779a9a3e7a" - integrity sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg== - -"@ethersproject/networks@5.6.2", "@ethersproject/networks@^5.6.0": - version "5.6.2" - resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.6.2.tgz#2bacda62102c0b1fcee408315f2bed4f6fbdf336" - integrity sha512-9uEzaJY7j5wpYGTojGp8U89mSsgQLc40PCMJLMCnFXTs7nhBveZ0t7dbqWUNrepWTszDbFkYD6WlL8DKx5huHA== - dependencies: - "@ethersproject/logger" "^5.6.0" - -"@ethersproject/pbkdf2@5.6.0", "@ethersproject/pbkdf2@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.6.0.tgz#04fcc2d7c6bff88393f5b4237d906a192426685a" - integrity sha512-Wu1AxTgJo3T3H6MIu/eejLFok9TYoSdgwRr5oGY1LTLfmGesDoSx05pemsbrPT2gG4cQME+baTSCp5sEo2erZQ== - dependencies: - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/sha2" "^5.6.0" - -"@ethersproject/properties@5.6.0", "@ethersproject/properties@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.6.0.tgz#38904651713bc6bdd5bdd1b0a4287ecda920fa04" - integrity sha512-szoOkHskajKePTJSZ46uHUWWkbv7TzP2ypdEK6jGMqJaEt2sb0jCgfBo0gH0m2HBpRixMuJ6TBRaQCF7a9DoCg== - dependencies: - "@ethersproject/logger" "^5.6.0" - -"@ethersproject/providers@5.6.6": - version "5.6.6" - resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.6.6.tgz#1967149cb4557d253f8c176a44aabda155f228cd" - integrity sha512-6X6agj3NeQ4tgnvBMCjHK+CjQbz+Qmn20JTxCYZ/uymrgCEOpJtY9zeRxJIDsSi0DPw8xNAxypj95JMCsapUfA== - dependencies: - "@ethersproject/abstract-provider" "^5.6.0" - "@ethersproject/abstract-signer" "^5.6.0" - "@ethersproject/address" "^5.6.0" - "@ethersproject/basex" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/constants" "^5.6.0" - "@ethersproject/hash" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/networks" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/random" "^5.6.0" - "@ethersproject/rlp" "^5.6.0" - "@ethersproject/sha2" "^5.6.0" - "@ethersproject/strings" "^5.6.0" - "@ethersproject/transactions" "^5.6.0" - "@ethersproject/web" "^5.6.0" +"@ethersproject/logger@5.7.0", "@ethersproject/logger@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" + integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== + +"@ethersproject/networks@5.7.1", "@ethersproject/networks@^5.7.0": + version "5.7.1" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.1.tgz#118e1a981d757d45ccea6bb58d9fd3d9db14ead6" + integrity sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/pbkdf2@5.7.0", "@ethersproject/pbkdf2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz#d2267d0a1f6e123f3771007338c47cccd83d3102" + integrity sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + +"@ethersproject/properties@5.7.0", "@ethersproject/properties@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" + integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/providers@5.7.2": + version "5.7.2" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" + integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" bech32 "1.1.4" ws "7.4.6" -"@ethersproject/random@5.6.0", "@ethersproject/random@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.6.0.tgz#1505d1ab6a250e0ee92f436850fa3314b2cb5ae6" - integrity sha512-si0PLcLjq+NG/XHSZz90asNf+YfKEqJGVdxoEkSukzbnBgC8rydbgbUgBbBGLeHN4kAJwUFEKsu3sCXT93YMsw== +"@ethersproject/random@5.7.0", "@ethersproject/random@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.7.0.tgz#af19dcbc2484aae078bb03656ec05df66253280c" + integrity sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ== dependencies: - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/logger" "^5.6.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" -"@ethersproject/rlp@5.6.0", "@ethersproject/rlp@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.6.0.tgz#55a7be01c6f5e64d6e6e7edb6061aa120962a717" - integrity sha512-dz9WR1xpcTL+9DtOT/aDO+YyxSSdO8YIS0jyZwHHSlAmnxA6cKU3TrTd4Xc/bHayctxTgGLYNuVVoiXE4tTq1g== +"@ethersproject/rlp@5.7.0", "@ethersproject/rlp@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" + integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== dependencies: - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/logger" "^5.6.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" -"@ethersproject/sha2@5.6.0", "@ethersproject/sha2@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.6.0.tgz#364c4c11cc753bda36f31f001628706ebadb64d9" - integrity sha512-1tNWCPFLu1n3JM9t4/kytz35DkuF9MxqkGGEHNauEbaARdm2fafnOyw1s0tIQDPKF/7bkP1u3dbrmjpn5CelyA== +"@ethersproject/sha2@5.7.0", "@ethersproject/sha2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.7.0.tgz#9a5f7a7824ef784f7f7680984e593a800480c9fb" + integrity sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw== dependencies: - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/logger" "^5.6.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" hash.js "1.1.7" -"@ethersproject/signing-key@5.6.1", "@ethersproject/signing-key@^5.6.0": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.6.1.tgz#31b0a531520616254eb0465b9443e49515c4d457" - integrity sha512-XvqQ20DH0D+bS3qlrrgh+axRMth5kD1xuvqUQUTeezxUTXBOeR6hWz2/C6FBEu39FRytyybIWrYf7YLSAKr1LQ== +"@ethersproject/signing-key@5.7.0", "@ethersproject/signing-key@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3" + integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== dependencies: - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - bn.js "^4.11.9" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + bn.js "^5.2.1" elliptic "6.5.4" hash.js "1.1.7" -"@ethersproject/solidity@5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.6.0.tgz#64657362a596bf7f5630bdc921c07dd78df06dc3" - integrity sha512-YwF52vTNd50kjDzqKaoNNbC/r9kMDPq3YzDWmsjFTRBcIF1y4JCQJ8gB30wsTfHbaxgxelI5BfxQSxD/PbJOww== - dependencies: - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/keccak256" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/sha2" "^5.6.0" - "@ethersproject/strings" "^5.6.0" - -"@ethersproject/strings@5.6.0", "@ethersproject/strings@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.6.0.tgz#9891b26709153d996bf1303d39a7f4bc047878fd" - integrity sha512-uv10vTtLTZqrJuqBZR862ZQjTIa724wGPWQqZrofaPI/kUsf53TBG0I0D+hQ1qyNtllbNzaW+PDPHHUI6/65Mg== - dependencies: - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/constants" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - -"@ethersproject/transactions@5.6.0", "@ethersproject/transactions@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.6.0.tgz#4b594d73a868ef6e1529a2f8f94a785e6791ae4e" - integrity sha512-4HX+VOhNjXHZyGzER6E/LVI2i6lf9ejYeWD6l4g50AdmimyuStKc39kvKf1bXWQMg7QNVh+uC7dYwtaZ02IXeg== - dependencies: - "@ethersproject/address" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/constants" "^5.6.0" - "@ethersproject/keccak256" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/rlp" "^5.6.0" - "@ethersproject/signing-key" "^5.6.0" - -"@ethersproject/units@5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.6.0.tgz#e5cbb1906988f5740254a21b9ded6bd51e826d9c" - integrity sha512-tig9x0Qmh8qbo1w8/6tmtyrm/QQRviBh389EQ+d8fP4wDsBrJBf08oZfoiz1/uenKK9M78yAP4PoR7SsVoTjsw== - dependencies: - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/constants" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - -"@ethersproject/wallet@5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.6.1.tgz#5df4f75f848ed84ca30fd6ca75d2c66b19c5552b" - integrity sha512-oXWoOslEWtwZiViIMlGVjeKDQz/tI7JF9UkyzN9jaGj8z7sXt2SyFMb0Ev6vSAqjIzrCrNrJ/+MkAhtKnGOfZw== - dependencies: - "@ethersproject/abstract-provider" "^5.6.0" - "@ethersproject/abstract-signer" "^5.6.0" - "@ethersproject/address" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/hash" "^5.6.0" - "@ethersproject/hdnode" "^5.6.0" - "@ethersproject/json-wallets" "^5.6.0" - "@ethersproject/keccak256" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/random" "^5.6.0" - "@ethersproject/signing-key" "^5.6.0" - "@ethersproject/transactions" "^5.6.0" - "@ethersproject/wordlists" "^5.6.0" - -"@ethersproject/web@5.6.0", "@ethersproject/web@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.6.0.tgz#4bf8b3cbc17055027e1a5dd3c357e37474eaaeb8" - integrity sha512-G/XHj0hV1FxI2teHRfCGvfBUHFmU+YOSbCxlAMqJklxSa7QMiHFQfAxvwY2PFqgvdkxEKwRNr/eCjfAPEm2Ctg== - dependencies: - "@ethersproject/base64" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/strings" "^5.6.0" - -"@ethersproject/wordlists@5.6.0", "@ethersproject/wordlists@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.6.0.tgz#79e62c5276e091d8575f6930ba01a29218ded032" - integrity sha512-q0bxNBfIX3fUuAo9OmjlEYxP40IB8ABgb7HjEZCL5IKubzV3j30CWi2rqQbjTS2HfoyQbfINoKcTVWP4ejwR7Q== - dependencies: - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/hash" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/strings" "^5.6.0" +"@ethersproject/solidity@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.7.0.tgz#5e9c911d8a2acce2a5ebb48a5e2e0af20b631cb8" + integrity sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/strings@5.7.0", "@ethersproject/strings@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" + integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/transactions@5.7.0", "@ethersproject/transactions@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.7.0.tgz#91318fc24063e057885a6af13fdb703e1f993d3b" + integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + +"@ethersproject/units@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.7.0.tgz#637b563d7e14f42deeee39245275d477aae1d8b1" + integrity sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/wallet@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.7.0.tgz#4e5d0790d96fe21d61d38fb40324e6c7ef350b2d" + integrity sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/hdnode" "^5.7.0" + "@ethersproject/json-wallets" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wordlists" "^5.7.0" + +"@ethersproject/web@5.7.1", "@ethersproject/web@^5.7.0": + version "5.7.1" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.1.tgz#de1f285b373149bee5928f4eb7bcb87ee5fbb4ae" + integrity sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w== + dependencies: + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/wordlists@5.7.0", "@ethersproject/wordlists@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.7.0.tgz#8fb2c07185d68c3e09eb3bfd6e779ba2774627f5" + integrity sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@superfluid-finance/metadata@>1.2.0": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@superfluid-finance/metadata/-/metadata-1.2.4.tgz#b9d55c6bc80c78b8e76215d01196759b889f891d" + integrity sha512-M0OxHuDjwCE0kfHMr0CfXzKvOH7TXCoL8ZaDamVdU6Y1LZzVkwb7UyDNZw+VNG7r8NBlmpDVLYhuKFBBHL6d9w== "@superfluid-finance/sdk-core@0.4.3": version "0.4.3" @@ -387,14 +394,14 @@ aes-js@3.0.0: integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== ajv@^8.11.0: - version "8.11.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.11.0.tgz#977e91dd96ca669f54a11e23e378e33b884a565f" - integrity sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg== + version "8.16.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.16.0.tgz#22e2a92b94f005f7e0f9c9d39652ef0b8f6f0cb4" + integrity sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw== dependencies: - fast-deep-equal "^3.1.1" + fast-deep-equal "^3.1.3" json-schema-traverse "^1.0.0" require-from-string "^2.0.2" - uri-js "^4.2.2" + uri-js "^4.4.1" any-promise@^1.3.0: version "1.3.0" @@ -741,11 +748,11 @@ create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: sha.js "^2.4.8" cross-fetch@^3.0.6: - version "3.1.5" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" - integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== + version "3.1.8" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.8.tgz#0327eba65fd68a7d119f8fb2bf9334a1a7956f82" + integrity sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg== dependencies: - node-fetch "2.6.7" + node-fetch "^2.6.12" crypto-browserify@^3.0.0: version "3.12.0" @@ -894,40 +901,40 @@ es-to-primitive@^1.2.1: is-symbol "^1.0.2" ethers@^5.6.2: - version "5.6.6" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.6.6.tgz#a37aa7e265a484a1b4d2ef91d4d89d6b43808a57" - integrity sha512-2B2ZmSGvRcJpHnFMBk58mkXP50njFipUBCgLK8jUTFbomhVs501cLzyMU6+Vx8YnUDQxywC3qkZvd33xWS+2FA== - dependencies: - "@ethersproject/abi" "5.6.2" - "@ethersproject/abstract-provider" "5.6.0" - "@ethersproject/abstract-signer" "5.6.1" - "@ethersproject/address" "5.6.0" - "@ethersproject/base64" "5.6.0" - "@ethersproject/basex" "5.6.0" - "@ethersproject/bignumber" "5.6.1" - "@ethersproject/bytes" "5.6.1" - "@ethersproject/constants" "5.6.0" - "@ethersproject/contracts" "5.6.1" - "@ethersproject/hash" "5.6.0" - "@ethersproject/hdnode" "5.6.1" - "@ethersproject/json-wallets" "5.6.0" - "@ethersproject/keccak256" "5.6.0" - "@ethersproject/logger" "5.6.0" - "@ethersproject/networks" "5.6.2" - "@ethersproject/pbkdf2" "5.6.0" - "@ethersproject/properties" "5.6.0" - "@ethersproject/providers" "5.6.6" - "@ethersproject/random" "5.6.0" - "@ethersproject/rlp" "5.6.0" - "@ethersproject/sha2" "5.6.0" - "@ethersproject/signing-key" "5.6.1" - "@ethersproject/solidity" "5.6.0" - "@ethersproject/strings" "5.6.0" - "@ethersproject/transactions" "5.6.0" - "@ethersproject/units" "5.6.0" - "@ethersproject/wallet" "5.6.1" - "@ethersproject/web" "5.6.0" - "@ethersproject/wordlists" "5.6.0" + version "5.7.2" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" + integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== + dependencies: + "@ethersproject/abi" "5.7.0" + "@ethersproject/abstract-provider" "5.7.0" + "@ethersproject/abstract-signer" "5.7.0" + "@ethersproject/address" "5.7.0" + "@ethersproject/base64" "5.7.0" + "@ethersproject/basex" "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/hdnode" "5.7.0" + "@ethersproject/json-wallets" "5.7.0" + "@ethersproject/keccak256" "5.7.0" + "@ethersproject/logger" "5.7.0" + "@ethersproject/networks" "5.7.1" + "@ethersproject/pbkdf2" "5.7.0" + "@ethersproject/properties" "5.7.0" + "@ethersproject/providers" "5.7.2" + "@ethersproject/random" "5.7.0" + "@ethersproject/rlp" "5.7.0" + "@ethersproject/sha2" "5.7.0" + "@ethersproject/signing-key" "5.7.0" + "@ethersproject/solidity" "5.7.0" + "@ethersproject/strings" "5.7.0" + "@ethersproject/transactions" "5.7.0" + "@ethersproject/units" "5.7.0" + "@ethersproject/wallet" "5.7.0" + "@ethersproject/web" "5.7.1" + "@ethersproject/wordlists" "5.7.0" events@^3.0.0: version "3.3.0" @@ -947,7 +954,7 @@ extract-files@^9.0.0: resolved "https://registry.yarnpkg.com/extract-files/-/extract-files-9.0.0.tgz#8a7744f2437f81f5ed3250ed9f1550de902fe54a" integrity sha512-CvdFfHkC95B4bBBk36hcEmvdR2awOdhhVUYH6S/zrVj3477zven/fJMYg7121h4T1xHZC+tetUpubpAhxwI7hQ== -fast-deep-equal@^3.1.1: +fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== @@ -1401,10 +1408,10 @@ module-deps@^6.2.3: through2 "^2.0.0" xtend "^4.0.0" -node-fetch@2.6.7: - version "2.6.7" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" - integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== +node-fetch@^2.6.12: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== dependencies: whatwg-url "^5.0.0" @@ -1881,7 +1888,7 @@ undeclared-identifiers@^1.1.2: simple-concat "^1.0.0" xtend "^4.0.1" -uri-js@^4.2.2: +uri-js@^4.4.1: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== From 8b4f68323908a4b329689c436979b90adf8a0815 Mon Sep 17 00:00:00 2001 From: Momodu Afegbua Date: Wed, 12 Jun 2024 12:07:39 -0500 Subject: [PATCH 04/42] [METADATA] Subgraph V1 Endpoints (#1951) * changed hostedendpoint to canonicalendpoint * lint error fix * added api-gateway subgraph endpoints * update metadata readme * removed canonical endpoints * metadata readme update * try to fix docker-compose * try to fix by updating docker-compose version * get docker-compose from the graph's repo * revert some changes to avoid flaky ci/cd test... * revert docker-compose whitespace change --------- Co-authored-by: Kaspar Kallas --- packages/metadata/CHANGELOG.md | 4 + packages/metadata/README.md | 2 +- packages/metadata/main/networks/list.cjs | 91 ++++++++++++----------- packages/metadata/module/networks/list.js | 91 ++++++++++++----------- packages/metadata/networks.json | 91 ++++++++++++----------- packages/metadata/package.json | 2 +- 6 files changed, 144 insertions(+), 137 deletions(-) diff --git a/packages/metadata/CHANGELOG.md b/packages/metadata/CHANGELOG.md index 35926d6133..16e533cce0 100644 --- a/packages/metadata/CHANGELOG.md +++ b/packages/metadata/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to the metadata will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.2.5] +### Changed +- Use superfluid public subgraph endpoints + ## [v1.2.3] ### Changed - Use Goldsky automation subgraphs over The Graph's hosted service ones diff --git a/packages/metadata/README.md b/packages/metadata/README.md index d8d72aae7f..804ec0c1de 100644 --- a/packages/metadata/README.md +++ b/packages/metadata/README.md @@ -90,7 +90,7 @@ const network = sfMeta.getNetworkByName("eth-sepolia"); explorer: 'https://optimistic.etherscan.io', subgraphV1: { name: 'protocol-v1-optimism-mainnet', - hostedEndpoint: 'https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-mainnet' + hostedEndpoint: 'https://subgraph-endpoints.superfluid.dev/optimism-mainnet/protocol-v1' }, publicRPCs: [ 'https://mainnet.optimism.io', 'https://rpc.ankr.com/optimism' ], coinGeckoId: 'optimistic-ethereum' diff --git a/packages/metadata/main/networks/list.cjs b/packages/metadata/main/networks/list.cjs index 9ac7fb3a35..7ce21f9274 100644 --- a/packages/metadata/main/networks/list.cjs +++ b/packages/metadata/main/networks/list.cjs @@ -36,7 +36,7 @@ module.exports = "subgraphV1": { "cliName": "fuji", "name": "protocol-v1-avalanche-fuji", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-avalanche-fuji" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-fuji/protocol-v1" }, "publicRPCs": [ "https://api.avax-test.network/ext/bc/C/rpc", @@ -79,7 +79,7 @@ module.exports = "subgraphV1": { "cliName": "sepolia", "name": "protocol-v1-eth-sepolia", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/eth-sepolia/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-sepolia/protocol-v1" }, "publicRPCs": [ "https://rpc.sepolia.org", @@ -122,19 +122,19 @@ module.exports = "subgraphV1": { "cliName": "optimism-sepolia", "name": "protocol-v1-optimism-sepolia", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-sepolia" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-optimism-sepolia", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-optimism-sepolia/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-optimism-sepolia", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-optimism-sepolia/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-optimism-sepolia", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-optimism-sepolia/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/auto-wrap" }, "publicRPCs": [ "https://sepolia.optimism.io" @@ -170,7 +170,8 @@ module.exports = "explorer": "https://sepolia.scrollscan.com/", "subgraphV1": { "cliName": "scroll-sepolia", - "name": "protocol-v1-scroll-sepolia" + "name": "protocol-v1-scroll-sepolia", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/scroll-sepolia/protocol-v1" }, "publicRPCs": ["https://sepolia-rpc.scroll.io"] }, @@ -249,20 +250,19 @@ module.exports = "subgraphV1": { "cliName": "gnosis", "name": "protocol-v1-xdai", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-xdai", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/xdai/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-xdai-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-xdai-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-xdai-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-xdai-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-xdai-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-xdai-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/auto-wrap" }, "publicRPCs": [ "https://rpc.gnosischain.com", @@ -311,20 +311,19 @@ module.exports = "subgraphV1": { "cliName": "matic", "name": "protocol-v1-matic", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-matic", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/matic/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-polygon-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-polygon-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-polygon-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-polygon-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-polygon-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-polygon-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/auto-wrap" }, "publicRPCs": [ "https://polygon-rpc.com", @@ -373,19 +372,19 @@ module.exports = "subgraphV1": { "cliName": "optimism", "name": "protocol-v1-optimism-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-optimism-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-optimism-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-optimism-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-optimism-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-optimism-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-optimism-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/auto-wrap" }, "publicRPCs": [ "https://mainnet.optimism.io", @@ -434,19 +433,19 @@ module.exports = "subgraphV1": { "cliName": "arbitrum-one", "name": "protocol-v1-arbitrum-one", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-arbitrum-one" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-arbitrum-one", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-arbitrum-one/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-arbitrum-one", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-arbitrum-one/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-arbitrum-one", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-arbitrum-one/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/auto-wrap" }, "publicRPCs": [ "https://arb1.arbitrum.io/rpc", @@ -495,19 +494,19 @@ module.exports = "subgraphV1": { "cliName": "avalanche", "name": "protocol-v1-avalanche-c", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-avalanche-c" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-avalanche-c", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-avalanche-c/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-avalanche-c", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-avalanche-c/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-avalanche-c", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-avalanche-c/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/auto-wrap" }, "publicRPCs": [ "https://api.avax.network/ext/bc/C/rpc", @@ -556,19 +555,19 @@ module.exports = "subgraphV1": { "cliName": "bsc", "name": "protocol-v1-bsc-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-bsc-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-bsc-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-bsc-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-bsc-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-bsc-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-bsc-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-bsc-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/auto-wrap" }, "publicRPCs": [ "https://bscrpc.com", @@ -612,20 +611,19 @@ module.exports = "subgraphV1": { "cliName": "mainnet", "name": "protocol-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-eth-mainnet", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/eth-mainnet/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-eth-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-eth-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-eth-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/auto-wrap" }, "publicRPCs": [ "https://cloudflare-eth.com", @@ -668,7 +666,7 @@ module.exports = "subgraphV1": { "cliName": "celo", "name": "protocol-v1-celo-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-celo-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/celo-mainnet/protocol-v1" }, "publicRPCs": ["https://forno.celo.org", "https://rpc.ankr.com/celo"], "coinGeckoId": "celo" @@ -714,19 +712,19 @@ module.exports = "subgraphV1": { "cliName": "base", "name": "protocol-v1-base-mainnet", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/base-mainnet/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-base-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-base-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-base-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-base-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-base-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-base-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/auto-wrap" }, "publicRPCs": ["https://developer-access-mainnet.base.org"], "coinGeckoId": "base" @@ -764,7 +762,8 @@ module.exports = "explorer": "https://scrollscan.com/", "subgraphV1": { "cliName": "scroll", - "name": "protocol-v1-scroll-mainnet" + "name": "protocol-v1-scroll-mainnet", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/scroll-mainnet/protocol-v1" }, "publicRPCs": ["https://rpc.scroll.io"] }, @@ -799,7 +798,9 @@ module.exports = "logsQueryRange": 50000, "explorer": "https://explorer.degen.tips/", "subgraphV1": { - "cliName": "degen" + "cliName": "degen", + "name": "protocol-v1-degenchain", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/degenchain/protocol-v1" }, "publicRPCs": ["https://rpc.degen.tips"] } diff --git a/packages/metadata/module/networks/list.js b/packages/metadata/module/networks/list.js index 2fc78c4906..286cdd3c6f 100644 --- a/packages/metadata/module/networks/list.js +++ b/packages/metadata/module/networks/list.js @@ -36,7 +36,7 @@ export default "subgraphV1": { "cliName": "fuji", "name": "protocol-v1-avalanche-fuji", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-avalanche-fuji" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-fuji/protocol-v1" }, "publicRPCs": [ "https://api.avax-test.network/ext/bc/C/rpc", @@ -79,7 +79,7 @@ export default "subgraphV1": { "cliName": "sepolia", "name": "protocol-v1-eth-sepolia", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/eth-sepolia/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-sepolia/protocol-v1" }, "publicRPCs": [ "https://rpc.sepolia.org", @@ -122,19 +122,19 @@ export default "subgraphV1": { "cliName": "optimism-sepolia", "name": "protocol-v1-optimism-sepolia", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-sepolia" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-optimism-sepolia", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-optimism-sepolia/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-optimism-sepolia", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-optimism-sepolia/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-optimism-sepolia", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-optimism-sepolia/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/auto-wrap" }, "publicRPCs": [ "https://sepolia.optimism.io" @@ -170,7 +170,8 @@ export default "explorer": "https://sepolia.scrollscan.com/", "subgraphV1": { "cliName": "scroll-sepolia", - "name": "protocol-v1-scroll-sepolia" + "name": "protocol-v1-scroll-sepolia", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/scroll-sepolia/protocol-v1" }, "publicRPCs": ["https://sepolia-rpc.scroll.io"] }, @@ -249,20 +250,19 @@ export default "subgraphV1": { "cliName": "gnosis", "name": "protocol-v1-xdai", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-xdai", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/xdai/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-xdai-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-xdai-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-xdai-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-xdai-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-xdai-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-xdai-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/auto-wrap" }, "publicRPCs": [ "https://rpc.gnosischain.com", @@ -311,20 +311,19 @@ export default "subgraphV1": { "cliName": "matic", "name": "protocol-v1-matic", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-matic", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/matic/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-polygon-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-polygon-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-polygon-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-polygon-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-polygon-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-polygon-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/auto-wrap" }, "publicRPCs": [ "https://polygon-rpc.com", @@ -373,19 +372,19 @@ export default "subgraphV1": { "cliName": "optimism", "name": "protocol-v1-optimism-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-optimism-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-optimism-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-optimism-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-optimism-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-optimism-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-optimism-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/auto-wrap" }, "publicRPCs": [ "https://mainnet.optimism.io", @@ -434,19 +433,19 @@ export default "subgraphV1": { "cliName": "arbitrum-one", "name": "protocol-v1-arbitrum-one", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-arbitrum-one" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-arbitrum-one", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-arbitrum-one/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-arbitrum-one", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-arbitrum-one/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-arbitrum-one", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-arbitrum-one/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/auto-wrap" }, "publicRPCs": [ "https://arb1.arbitrum.io/rpc", @@ -495,19 +494,19 @@ export default "subgraphV1": { "cliName": "avalanche", "name": "protocol-v1-avalanche-c", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-avalanche-c" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-avalanche-c", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-avalanche-c/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-avalanche-c", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-avalanche-c/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-avalanche-c", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-avalanche-c/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/auto-wrap" }, "publicRPCs": [ "https://api.avax.network/ext/bc/C/rpc", @@ -556,19 +555,19 @@ export default "subgraphV1": { "cliName": "bsc", "name": "protocol-v1-bsc-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-bsc-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-bsc-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-bsc-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-bsc-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-bsc-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-bsc-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-bsc-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/auto-wrap" }, "publicRPCs": [ "https://bscrpc.com", @@ -612,20 +611,19 @@ export default "subgraphV1": { "cliName": "mainnet", "name": "protocol-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-eth-mainnet", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/eth-mainnet/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-eth-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-eth-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-eth-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/auto-wrap" }, "publicRPCs": [ "https://cloudflare-eth.com", @@ -668,7 +666,7 @@ export default "subgraphV1": { "cliName": "celo", "name": "protocol-v1-celo-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-celo-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/celo-mainnet/protocol-v1" }, "publicRPCs": ["https://forno.celo.org", "https://rpc.ankr.com/celo"], "coinGeckoId": "celo" @@ -714,19 +712,19 @@ export default "subgraphV1": { "cliName": "base", "name": "protocol-v1-base-mainnet", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/base-mainnet/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-base-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-base-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-base-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-base-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-base-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-base-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/auto-wrap" }, "publicRPCs": ["https://developer-access-mainnet.base.org"], "coinGeckoId": "base" @@ -764,7 +762,8 @@ export default "explorer": "https://scrollscan.com/", "subgraphV1": { "cliName": "scroll", - "name": "protocol-v1-scroll-mainnet" + "name": "protocol-v1-scroll-mainnet", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/scroll-mainnet/protocol-v1" }, "publicRPCs": ["https://rpc.scroll.io"] }, @@ -799,7 +798,9 @@ export default "logsQueryRange": 50000, "explorer": "https://explorer.degen.tips/", "subgraphV1": { - "cliName": "degen" + "cliName": "degen", + "name": "protocol-v1-degenchain", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/degenchain/protocol-v1" }, "publicRPCs": ["https://rpc.degen.tips"] } diff --git a/packages/metadata/networks.json b/packages/metadata/networks.json index 311f4080ca..b78245a5e9 100644 --- a/packages/metadata/networks.json +++ b/packages/metadata/networks.json @@ -34,7 +34,7 @@ "subgraphV1": { "cliName": "fuji", "name": "protocol-v1-avalanche-fuji", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-avalanche-fuji" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-fuji/protocol-v1" }, "publicRPCs": [ "https://api.avax-test.network/ext/bc/C/rpc", @@ -77,7 +77,7 @@ "subgraphV1": { "cliName": "sepolia", "name": "protocol-v1-eth-sepolia", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/eth-sepolia/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-sepolia/protocol-v1" }, "publicRPCs": [ "https://rpc.sepolia.org", @@ -120,19 +120,19 @@ "subgraphV1": { "cliName": "optimism-sepolia", "name": "protocol-v1-optimism-sepolia", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-sepolia" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-optimism-sepolia", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-optimism-sepolia/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-optimism-sepolia", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-optimism-sepolia/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-optimism-sepolia", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-optimism-sepolia/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/auto-wrap" }, "publicRPCs": [ "https://sepolia.optimism.io" @@ -168,7 +168,8 @@ "explorer": "https://sepolia.scrollscan.com/", "subgraphV1": { "cliName": "scroll-sepolia", - "name": "protocol-v1-scroll-sepolia" + "name": "protocol-v1-scroll-sepolia", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/scroll-sepolia/protocol-v1" }, "publicRPCs": ["https://sepolia-rpc.scroll.io"] }, @@ -247,20 +248,19 @@ "subgraphV1": { "cliName": "gnosis", "name": "protocol-v1-xdai", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-xdai", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/xdai/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-xdai-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-xdai-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-xdai-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-xdai-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-xdai-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-xdai-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/auto-wrap" }, "publicRPCs": [ "https://rpc.gnosischain.com", @@ -309,20 +309,19 @@ "subgraphV1": { "cliName": "matic", "name": "protocol-v1-matic", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-matic", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/matic/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-polygon-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-polygon-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-polygon-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-polygon-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-polygon-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-polygon-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/auto-wrap" }, "publicRPCs": [ "https://polygon-rpc.com", @@ -371,19 +370,19 @@ "subgraphV1": { "cliName": "optimism", "name": "protocol-v1-optimism-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-optimism-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-optimism-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-optimism-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-optimism-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-optimism-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-optimism-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/auto-wrap" }, "publicRPCs": [ "https://mainnet.optimism.io", @@ -432,19 +431,19 @@ "subgraphV1": { "cliName": "arbitrum-one", "name": "protocol-v1-arbitrum-one", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-arbitrum-one" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-arbitrum-one", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-arbitrum-one/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-arbitrum-one", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-arbitrum-one/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-arbitrum-one", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-arbitrum-one/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/auto-wrap" }, "publicRPCs": [ "https://arb1.arbitrum.io/rpc", @@ -493,19 +492,19 @@ "subgraphV1": { "cliName": "avalanche", "name": "protocol-v1-avalanche-c", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-avalanche-c" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-avalanche-c", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-avalanche-c/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-avalanche-c", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-avalanche-c/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-avalanche-c", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-avalanche-c/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/auto-wrap" }, "publicRPCs": [ "https://api.avax.network/ext/bc/C/rpc", @@ -554,19 +553,19 @@ "subgraphV1": { "cliName": "bsc", "name": "protocol-v1-bsc-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-bsc-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-bsc-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-bsc-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-bsc-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-bsc-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-bsc-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-bsc-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/auto-wrap" }, "publicRPCs": [ "https://bscrpc.com", @@ -610,20 +609,19 @@ "subgraphV1": { "cliName": "mainnet", "name": "protocol-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-eth-mainnet", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/eth-mainnet/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-eth-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-eth-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-eth-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/auto-wrap" }, "publicRPCs": [ "https://cloudflare-eth.com", @@ -666,7 +664,7 @@ "subgraphV1": { "cliName": "celo", "name": "protocol-v1-celo-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-celo-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/celo-mainnet/protocol-v1" }, "publicRPCs": ["https://forno.celo.org", "https://rpc.ankr.com/celo"], "coinGeckoId": "celo" @@ -712,19 +710,19 @@ "subgraphV1": { "cliName": "base", "name": "protocol-v1-base-mainnet", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/base-mainnet/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-base-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/vesting-v1-base-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-base-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/scheduling-v1-base-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-base-mainnet", - "hostedEndpoint": "https://api.goldsky.com/api/public/project_clsnd6xsoma5j012qepvucfpp/subgraphs/auto-wrap-v1-base-mainnet/prod/gn" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/auto-wrap" }, "publicRPCs": ["https://developer-access-mainnet.base.org"], "coinGeckoId": "base" @@ -762,7 +760,8 @@ "explorer": "https://scrollscan.com/", "subgraphV1": { "cliName": "scroll", - "name": "protocol-v1-scroll-mainnet" + "name": "protocol-v1-scroll-mainnet", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/scroll-mainnet/protocol-v1" }, "publicRPCs": ["https://rpc.scroll.io"] }, @@ -797,7 +796,9 @@ "logsQueryRange": 50000, "explorer": "https://explorer.degen.tips/", "subgraphV1": { - "cliName": "degen" + "cliName": "degen", + "name": "protocol-v1-degenchain", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/degenchain/protocol-v1" }, "publicRPCs": ["https://rpc.degen.tips"] } diff --git a/packages/metadata/package.json b/packages/metadata/package.json index c6c1d5ab51..f17ea443d6 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -1,6 +1,6 @@ { "name": "@superfluid-finance/metadata", - "version": "1.2.4", + "version": "1.2.5", "description": "Superfluid Metadata", "main": "main/index.cjs", "module": "module/index.js", From 6bfc3672372ada70f9f5e6fd261703f599d63b19 Mon Sep 17 00:00:00 2001 From: Momodu Afegbua Date: Thu, 13 Jun 2024 07:23:47 -0500 Subject: [PATCH 05/42] [SUBGRAPH] Subgraph Deploy CI tests (#1950) * debug querytests * use avalanche fuji for query tests * change goldsky version label * test annotated errors * annotated errors for deploy stage * removed stderr annotations * codecov upgrade * added avalanche-fuji to goldsky networks * removed old local subgraph before starting another * remove only subgraph_graph_node_1 * replicate in sdk-core tests --- .github/workflows/call.deploy-subgraph.yml | 2 +- .../workflows/call.test-local-subgraph.yml | 4 +++- .github/workflows/call.test-sdk-core.yml | 4 +++- ...subgraph-on-previous-sdk-core-versions.yml | 4 +++- .../call.upload-coverage-reports.yml | 7 +++++-- .github/workflows/ci.canary.yml | 2 ++ .github/workflows/ci.feature.yml | 2 ++ .../handler.deploy-production-subgraphs.yml | 20 ++++++++++++++----- .../previous-versions-testing/queryTests.ts | 4 ++-- packages/subgraph/tasks/deploy.sh | 4 ++-- 10 files changed, 38 insertions(+), 15 deletions(-) diff --git a/.github/workflows/call.deploy-subgraph.yml b/.github/workflows/call.deploy-subgraph.yml index 289d3c4e86..2c2e51709d 100644 --- a/.github/workflows/call.deploy-subgraph.yml +++ b/.github/workflows/call.deploy-subgraph.yml @@ -5,7 +5,7 @@ on: inputs: vendor: required: true - description: "Where to deploy subgraph to; superfluid, graph, satsuma, goldsky or airstack" + description: "Where to deploy subgraph to; superfluid, graph, goldsky or airstack" type: string deployment_env: required: true diff --git a/.github/workflows/call.test-local-subgraph.yml b/.github/workflows/call.test-local-subgraph.yml index 91231ac824..e9ea700da2 100644 --- a/.github/workflows/call.test-local-subgraph.yml +++ b/.github/workflows/call.test-local-subgraph.yml @@ -100,7 +100,9 @@ jobs: working-directory: ${{ env.subgraph-working-directory }} - name: "Docker compose" - run: docker-compose up & + run: | + docker rm subgraph_graph-node_1 || true + docker-compose up & working-directory: ${{ env.subgraph-working-directory }} - name: "Run subgraph integration test suite" diff --git a/.github/workflows/call.test-sdk-core.yml b/.github/workflows/call.test-sdk-core.yml index 985399b550..e29125f446 100644 --- a/.github/workflows/call.test-sdk-core.yml +++ b/.github/workflows/call.test-sdk-core.yml @@ -71,7 +71,9 @@ jobs: working-directory: ${{ env.subgraph-working-directory }} - name: "Docker compose" - run: docker-compose up & + run: | + docker rm subgraph_graph-node_1 || true + docker-compose up & working-directory: ${{ env.subgraph-working-directory }} - name: "Build and deploy local subgraph" diff --git a/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml b/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml index 15867e32f7..61abf9c0f5 100644 --- a/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml +++ b/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml @@ -71,7 +71,9 @@ jobs: working-directory: ./packages/subgraph - name: "Docker compose" - run: docker-compose up & + run: | + docker rm subgraph_graph-node_1 || true + docker-compose up & working-directory: ./packages/subgraph - name: "Prepare and Deploy Local Subgraph" diff --git a/.github/workflows/call.upload-coverage-reports.yml b/.github/workflows/call.upload-coverage-reports.yml index 1be4bac3be..a6a6d14e2a 100644 --- a/.github/workflows/call.upload-coverage-reports.yml +++ b/.github/workflows/call.upload-coverage-reports.yml @@ -2,6 +2,9 @@ name: Reusable Workflow | Upload Coverage Reports on: workflow_call: + secrets: + codecov_token: + required: true jobs: upload-coverage-reports: @@ -20,7 +23,7 @@ jobs: - name: Upload ethereum-contracts-coverage to codecov uses: codecov/codecov-action@v4.2.0 with: - token: ${{ secrets.CODECOV_TOKEN }} + token: ${{ secrets.codecov_token }} files: packages/ethereum-contracts/coverage/lcov.info name: ethereum-contracts-coverage flags: ethereum-contracts @@ -34,7 +37,7 @@ jobs: - name: Upload sdk-core-coverage to codecov uses: codecov/codecov-action@v4.2.0 with: - token: ${{ secrets.CODECOV_TOKEN }} + token: ${{ secrets.codecov_token }} files: packages/sdk-core/coverage/lcov.info name: sdk-core-coverage flags: sdk-core diff --git a/.github/workflows/ci.canary.yml b/.github/workflows/ci.canary.yml index 9f825b7bb1..bf34fd0b38 100644 --- a/.github/workflows/ci.canary.yml +++ b/.github/workflows/ci.canary.yml @@ -132,6 +132,8 @@ jobs: name: Upload Coverage Reports (Feature Branch) uses: ./.github/workflows/call.upload-coverage-reports.yml needs: [coverage-ethereum-contracts, coverage-sdk-core] + secrets: + codecov_token: ${{ secrets.CODECOV_TOKEN }} all-packages-tested: name: All packages tested (Dev Branch) diff --git a/.github/workflows/ci.feature.yml b/.github/workflows/ci.feature.yml index 91c45e49fc..22dbc09560 100644 --- a/.github/workflows/ci.feature.yml +++ b/.github/workflows/ci.feature.yml @@ -118,6 +118,8 @@ jobs: name: Upload Coverage Reports (Feature Branch) uses: ./.github/workflows/call.upload-coverage-reports.yml needs: [coverage-ethereum-contracts, coverage-sdk-core] + secrets: + codecov_token: ${{ secrets.CODECOV_TOKEN }} # Note: # diff --git a/.github/workflows/handler.deploy-production-subgraphs.yml b/.github/workflows/handler.deploy-production-subgraphs.yml index 969dfb6877..4b2d6603de 100644 --- a/.github/workflows/handler.deploy-production-subgraphs.yml +++ b/.github/workflows/handler.deploy-production-subgraphs.yml @@ -12,13 +12,23 @@ on: inputs: vendor: required: true - description: "Where to deploy subgraph to; one of `superfluid`, `graph`, `satsuma` or `goldsky`" - type: string + description: "Where to deploy subgraph to; one of `superfluid`, `graph`, `goldsky` or `airstack`" + default: "superfluid" + type: choice + options: + - superfluid + - graph + - goldsky + - airstack deployment_env: required: true - type: string - default: v1 description: 'The subgraph deployment env: v1, dev, feature.' + type: choice + default: v1 + options: + - v1 + - dev + - feature network: required: true type: string @@ -42,7 +52,7 @@ jobs: build-and-test-local-subgraph , build-and-test-local-subgraph-against-previous-sdk-core-releases ] - name: Deploy The Graph + name: Deploy graph to ${{ github.event.inputs.vendor }} vendor with: deployment_env: ${{ github.event.inputs.deployment_env }} network: ${{ github.event.inputs.network }} diff --git a/packages/sdk-core/previous-versions-testing/queryTests.ts b/packages/sdk-core/previous-versions-testing/queryTests.ts index 9d2a43a3e2..fe1d1e07a2 100644 --- a/packages/sdk-core/previous-versions-testing/queryTests.ts +++ b/packages/sdk-core/previous-versions-testing/queryTests.ts @@ -5,14 +5,14 @@ import metadata from "@superfluid-finance/metadata"; /** * We only use matic network endpoints for v1 release tests - * otherwise, we use OP Sepolia + * otherwise, we use avalanche fuji * @returns chainId */ export const getChainId = () => { // null coalesce, but this should NEVER return null for either return process.env.SUBGRAPH_RELEASE_TAG == "v1" ? metadata.getNetworkByShortName("matic")?.chainId ?? 0 - : metadata.getNetworkByShortName("opsepolia")?.chainId ?? 0; + : metadata.getNetworkByShortName("fuji")?.chainId ?? 0; }; export const testQueryClassFunctions = async (query: Query) => { diff --git a/packages/subgraph/tasks/deploy.sh b/packages/subgraph/tasks/deploy.sh index a6e4c938c9..c6011dd757 100755 --- a/packages/subgraph/tasks/deploy.sh +++ b/packages/subgraph/tasks/deploy.sh @@ -19,7 +19,7 @@ SATSUMA_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "eth-mainnet" "eth-sepolia" # shellcheck disable=SC2034 SUPERFLUID_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "base-mainnet" "optimism-mainnet" "arbitrum-one" "celo-mainnet" "bsc-mainnet" "avalanche-c" "optimism-sepolia" "scroll-sepolia" "scroll-mainnet" "degenchain" "base-sepolia") # shellcheck disable=SC2034 -GOLDSKY_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "eth-mainnet" "base-mainnet" "optimism-mainnet" "arbitrum-one" "bsc-mainnet" "avalanche-c" "optimism-sepolia" "scroll-sepolia" "scroll-mainnet" "eth-sepolia") +GOLDSKY_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "eth-mainnet" "base-mainnet" "optimism-mainnet" "arbitrum-one" "bsc-mainnet" "avalanche-c" "optimism-sepolia" "scroll-sepolia" "scroll-mainnet" "eth-sepolia" "avalanche-fuji") # shellcheck disable=SC2034 AIRSTACK_NETWORKS=( "degenchain") @@ -126,7 +126,7 @@ deploy_to_goldsky() { local network="$1" # TODO: use tagging? - local subgraphName="protocol-$DEPLOYMENT_ENV-$network/$VERSION_LABEL" + local subgraphName="protocol-$DEPLOYMENT_ENV-$network/1.0.0" # Note: when using Graph CLI to deploy, it implicitly triggers build too, but Goldsky CLI doesn't, so we do it explicitly. $GRAPH_CLI build From ff19f4d939992760ae4508053f25c2ebcfd106af Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 Jun 2024 19:50:19 +0300 Subject: [PATCH 06/42] Bump braces from 3.0.2 to 3.0.3 (#1956) Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Miao ZhiCheng --- yarn.lock | 47 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/yarn.lock b/yarn.lock index 94da50a4e1..0a44468047 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6147,11 +6147,11 @@ brace-expansion@^2.0.1: balanced-match "^1.0.0" braces@^3.0.2, braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== dependencies: - fill-range "^7.0.1" + fill-range "^7.1.1" brorand@^1.0.1, brorand@^1.1.0: version "1.1.0" @@ -9704,10 +9704,10 @@ filenamify@^2.0.0: strip-outer "^1.0.0" trim-repeated "^1.0.0" -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== dependencies: to-regex-range "^5.0.1" @@ -17264,7 +17264,7 @@ string-format@^2.0.0: resolved "https://registry.yarnpkg.com/string-format/-/string-format-2.0.0.tgz#f2df2e7097440d3b65de31b6d40d54c96eaffb9b" integrity sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA== -"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -17282,6 +17282,15 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string-width@^5.0.1, string-width@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" @@ -17373,7 +17382,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -17401,6 +17410,13 @@ strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -20068,7 +20084,7 @@ workerpool@6.2.1: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -20094,6 +20110,15 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From 58f231081f7777c0088e4ef661399119a5442ac5 Mon Sep 17 00:00:00 2001 From: Momodu Afegbua Date: Tue, 18 Jun 2024 13:33:53 -0500 Subject: [PATCH 07/42] [SUBGRAPH] Goldsky version label (#1959) * goldsky versioning * removed thegraph from vendor list * removed thegraph from pipeline description --- .github/workflows/call.deploy-subgraph.yml | 2 +- .github/workflows/handler.deploy-production-subgraphs.yml | 3 +-- packages/subgraph/tasks/deploy.sh | 6 +++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/call.deploy-subgraph.yml b/.github/workflows/call.deploy-subgraph.yml index 2c2e51709d..e997fddb17 100644 --- a/.github/workflows/call.deploy-subgraph.yml +++ b/.github/workflows/call.deploy-subgraph.yml @@ -5,7 +5,7 @@ on: inputs: vendor: required: true - description: "Where to deploy subgraph to; superfluid, graph, goldsky or airstack" + description: "Where to deploy subgraph to; superfluid, goldsky or airstack" type: string deployment_env: required: true diff --git a/.github/workflows/handler.deploy-production-subgraphs.yml b/.github/workflows/handler.deploy-production-subgraphs.yml index 4b2d6603de..c2e43093c3 100644 --- a/.github/workflows/handler.deploy-production-subgraphs.yml +++ b/.github/workflows/handler.deploy-production-subgraphs.yml @@ -12,12 +12,11 @@ on: inputs: vendor: required: true - description: "Where to deploy subgraph to; one of `superfluid`, `graph`, `goldsky` or `airstack`" + description: "Where to deploy subgraph to; one of `superfluid`, `goldsky` or `airstack`" default: "superfluid" type: choice options: - superfluid - - graph - goldsky - airstack deployment_env: diff --git a/packages/subgraph/tasks/deploy.sh b/packages/subgraph/tasks/deploy.sh index c6011dd757..2bd385f20b 100755 --- a/packages/subgraph/tasks/deploy.sh +++ b/packages/subgraph/tasks/deploy.sh @@ -126,7 +126,11 @@ deploy_to_goldsky() { local network="$1" # TODO: use tagging? - local subgraphName="protocol-$DEPLOYMENT_ENV-$network/1.0.0" + #Get subgraph version from package.json + PACKAGE_JSON_PATH="package.json" + SUBGRAPH_VERSION=$($JQ -r '.version' $PACKAGE_JSON_PATH) + + local subgraphName="protocol-$DEPLOYMENT_ENV-$network/$SUBGRAPH_VERSION" # Note: when using Graph CLI to deploy, it implicitly triggers build too, but Goldsky CLI doesn't, so we do it explicitly. $GRAPH_CLI build From d420211b1859d4c3ccca0f4279d6824ee17fbbf5 Mon Sep 17 00:00:00 2001 From: Didi Date: Wed, 19 Jun 2024 12:39:33 +0200 Subject: [PATCH 08/42] added native token wrapper address (#1960) --- packages/metadata/main/networks/list.cjs | 2 +- packages/metadata/module/networks/list.js | 2 +- packages/metadata/networks.json | 2 +- packages/metadata/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/metadata/main/networks/list.cjs b/packages/metadata/main/networks/list.cjs index 7ce21f9274..a5bb3684e8 100644 --- a/packages/metadata/main/networks/list.cjs +++ b/packages/metadata/main/networks/list.cjs @@ -185,7 +185,7 @@ module.exports = "uppercaseName": "BASE_SEPOLIA", "humanReadableName": "Base Sepolia", "nativeTokenSymbol": "ETH", - "nativeTokenWrapper": "", + "nativeTokenWrapper": "0x143ea239159155B408e71CDbE836e8CFD6766732", "contractsV1": { "resolver": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", "host": "0x109412E3C84f0539b43d39dB691B08c90f58dC7c", diff --git a/packages/metadata/module/networks/list.js b/packages/metadata/module/networks/list.js index 286cdd3c6f..56dee7ac60 100644 --- a/packages/metadata/module/networks/list.js +++ b/packages/metadata/module/networks/list.js @@ -185,7 +185,7 @@ export default "uppercaseName": "BASE_SEPOLIA", "humanReadableName": "Base Sepolia", "nativeTokenSymbol": "ETH", - "nativeTokenWrapper": "", + "nativeTokenWrapper": "0x143ea239159155B408e71CDbE836e8CFD6766732", "contractsV1": { "resolver": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", "host": "0x109412E3C84f0539b43d39dB691B08c90f58dC7c", diff --git a/packages/metadata/networks.json b/packages/metadata/networks.json index b78245a5e9..632685565e 100644 --- a/packages/metadata/networks.json +++ b/packages/metadata/networks.json @@ -183,7 +183,7 @@ "uppercaseName": "BASE_SEPOLIA", "humanReadableName": "Base Sepolia", "nativeTokenSymbol": "ETH", - "nativeTokenWrapper": "", + "nativeTokenWrapper": "0x143ea239159155B408e71CDbE836e8CFD6766732", "contractsV1": { "resolver": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", "host": "0x109412E3C84f0539b43d39dB691B08c90f58dC7c", diff --git a/packages/metadata/package.json b/packages/metadata/package.json index f17ea443d6..2a78659f52 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -1,6 +1,6 @@ { "name": "@superfluid-finance/metadata", - "version": "1.2.5", + "version": "1.2.6", "description": "Superfluid Metadata", "main": "main/index.cjs", "module": "module/index.js", From 60de1835b00a89453c2affe065fa043db48ed366 Mon Sep 17 00:00:00 2001 From: Momodu Afegbua Date: Wed, 19 Jun 2024 06:30:17 -0500 Subject: [PATCH 09/42] added avalanche-testnet cli name (#1961) --- packages/subgraph/scripts/buildNetworkConfig.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/subgraph/scripts/buildNetworkConfig.ts b/packages/subgraph/scripts/buildNetworkConfig.ts index a2a7dcee10..b73edf3c99 100644 --- a/packages/subgraph/scripts/buildNetworkConfig.ts +++ b/packages/subgraph/scripts/buildNetworkConfig.ts @@ -21,7 +21,8 @@ const ADDRESS_ZERO = "0x0000000000000000000000000000000000000000"; const vendorCliNameExceptions: Record> = { "goldsky": { - "xdai-mainnet": "xdai" + "xdai-mainnet": "xdai", + "avalanche-fuji": "avalanche-testnet" } } From 4c86d26f8382663c217c3ccadec535479ba5299c Mon Sep 17 00:00:00 2001 From: Didi Date: Thu, 20 Jun 2024 09:29:38 +0200 Subject: [PATCH 10/42] [SDK-CORE] new release with base-sepolia support (#1962) * added base-sepolia as goldsky network, updated metadata CHANGELOG * new sdk-core release --- packages/automation-contracts/autowrap/package.json | 2 +- packages/automation-contracts/scheduler/package.json | 2 +- packages/ethereum-contracts/package.json | 2 +- packages/js-sdk/package.json | 2 +- packages/metadata/CHANGELOG.md | 4 ++++ packages/sdk-core/CHANGELOG.md | 6 ++++++ packages/sdk-core/package.json | 4 ++-- packages/subgraph/package.json | 4 ++-- packages/subgraph/tasks/deploy.sh | 2 +- 9 files changed, 19 insertions(+), 9 deletions(-) diff --git a/packages/automation-contracts/autowrap/package.json b/packages/automation-contracts/autowrap/package.json index 9696343209..405107484a 100644 --- a/packages/automation-contracts/autowrap/package.json +++ b/packages/automation-contracts/autowrap/package.json @@ -15,6 +15,6 @@ "devDependencies": { "@openzeppelin/contracts": "4.9.6", "@superfluid-finance/ethereum-contracts": "^1.9.1", - "@superfluid-finance/metadata": "^1.1.30" + "@superfluid-finance/metadata": "^1.2.6" } } diff --git a/packages/automation-contracts/scheduler/package.json b/packages/automation-contracts/scheduler/package.json index f2bd2e15e4..6c2dbe0d9a 100644 --- a/packages/automation-contracts/scheduler/package.json +++ b/packages/automation-contracts/scheduler/package.json @@ -15,6 +15,6 @@ "devDependencies": { "@openzeppelin/contracts": "4.9.6", "@superfluid-finance/ethereum-contracts": "^1.9.1", - "@superfluid-finance/metadata": "^1.1.30" + "@superfluid-finance/metadata": "^1.2.6" } } diff --git a/packages/ethereum-contracts/package.json b/packages/ethereum-contracts/package.json index 186554ba62..63dd9f3dfe 100644 --- a/packages/ethereum-contracts/package.json +++ b/packages/ethereum-contracts/package.json @@ -92,7 +92,7 @@ "@safe-global/safe-service-client": "^2.0.3", "@safe-global/safe-web3-lib": "^1.9.4", "@superfluid-finance/js-sdk": "^0.6.3", - "@superfluid-finance/metadata": "^1.1.30", + "@superfluid-finance/metadata": "^1.2.6", "async": "^3.2.5", "csv-writer": "^1.6.0", "ethers": "^5.7.2", diff --git a/packages/js-sdk/package.json b/packages/js-sdk/package.json index f9f04d02d9..ceb3cd53a7 100644 --- a/packages/js-sdk/package.json +++ b/packages/js-sdk/package.json @@ -43,7 +43,7 @@ "cloc": "sh tasks/cloc.sh" }, "dependencies": { - "@superfluid-finance/metadata": "^1.1.30", + "@superfluid-finance/metadata": "^1.2.6", "@truffle/contract": "4.6.31", "auto-bind": "4.0.0", "node-fetch": "2.7.0" diff --git a/packages/metadata/CHANGELOG.md b/packages/metadata/CHANGELOG.md index 16e533cce0..5082807fa4 100644 --- a/packages/metadata/CHANGELOG.md +++ b/packages/metadata/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to the metadata will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.2.6] +### Changed +- Added native token wrapper address for base-sepolia + ## [v1.2.5] ### Changed - Use superfluid public subgraph endpoints diff --git a/packages/sdk-core/CHANGELOG.md b/packages/sdk-core/CHANGELOG.md index 355c13d20d..ed3a55597f 100644 --- a/packages/sdk-core/CHANGELOG.md +++ b/packages/sdk-core/CHANGELOG.md @@ -10,6 +10,12 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Changed ### Fixed +## [0.7.1] - 2024-06-19 + +### Updated + +- Metadata changes for recently added networks + ## [0.7.0] - 2023-05-01 ### Added diff --git a/packages/sdk-core/package.json b/packages/sdk-core/package.json index 477107b9a7..476b0ddca7 100644 --- a/packages/sdk-core/package.json +++ b/packages/sdk-core/package.json @@ -1,6 +1,6 @@ { "name": "@superfluid-finance/sdk-core", - "version": "0.7.0", + "version": "0.7.1", "description": "SDK Core for building with Superfluid Protocol", "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/sdk-core#readme", "repository": { @@ -58,7 +58,7 @@ }, "dependencies": { "@superfluid-finance/ethereum-contracts": "^1.9.1", - "@superfluid-finance/metadata": "^1.1.30", + "@superfluid-finance/metadata": "^1.2.6", "browserify": "^17.0.0", "graphql-request": "^6.1.0", "lodash": "^4.17.21", diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 73a969a3a3..44a15d206a 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -52,11 +52,11 @@ "dependencies": { "@graphprotocol/graph-cli": "0.73.0", "@graphprotocol/graph-ts": "0.35.1", - "@superfluid-finance/sdk-core": "^0.7.0", + "@superfluid-finance/sdk-core": "^0.7.1", "mustache": "^4.2.0" }, "devDependencies": { - "@superfluid-finance/metadata": "^1.1.30", + "@superfluid-finance/metadata": "^1.2.6", "coingecko-api": "^1.0.10", "graphql": "^16.8.1", "graphql-request": "^6.1.0", diff --git a/packages/subgraph/tasks/deploy.sh b/packages/subgraph/tasks/deploy.sh index 2bd385f20b..698b2fcbd0 100755 --- a/packages/subgraph/tasks/deploy.sh +++ b/packages/subgraph/tasks/deploy.sh @@ -19,7 +19,7 @@ SATSUMA_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "eth-mainnet" "eth-sepolia" # shellcheck disable=SC2034 SUPERFLUID_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "base-mainnet" "optimism-mainnet" "arbitrum-one" "celo-mainnet" "bsc-mainnet" "avalanche-c" "optimism-sepolia" "scroll-sepolia" "scroll-mainnet" "degenchain" "base-sepolia") # shellcheck disable=SC2034 -GOLDSKY_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "eth-mainnet" "base-mainnet" "optimism-mainnet" "arbitrum-one" "bsc-mainnet" "avalanche-c" "optimism-sepolia" "scroll-sepolia" "scroll-mainnet" "eth-sepolia" "avalanche-fuji") +GOLDSKY_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "eth-mainnet" "base-mainnet" "optimism-mainnet" "arbitrum-one" "bsc-mainnet" "avalanche-c" "optimism-sepolia" "scroll-sepolia" "scroll-mainnet" "eth-sepolia" "avalanche-fuji" "base-sepolia") # shellcheck disable=SC2034 AIRSTACK_NETWORKS=( "degenchain") From f113f5ec732544e22ffbb2f97e306b026442e35a Mon Sep 17 00:00:00 2001 From: Miao ZhiCheng Date: Tue, 2 Jul 2024 04:05:22 +0800 Subject: [PATCH 11/42] Assorted test improvements 20240701 (#1971) * update foundry version * [ETHEREUM-CONTRACTS]: typo fixes * [ETHEREUM-CONTRACTS] rename prop.sol to prop.t.sol * fix build warning * ignore mocks from hardhat build * use assembly selfdestruct for now * fix build warning * update CHANGELOG --- flake.lock | 6 +++--- packages/ethereum-contracts/CHANGELOG.md | 8 ++++++++ .../contracts/apps/SuperTokenV1Library.sol | 7 ++++--- .../contracts/mocks/SuperfluidDestructorMock.sol | 2 +- packages/ethereum-contracts/foundry.toml | 8 +++++--- packages/ethereum-contracts/package.json | 3 ++- .../test/foundry/FoundrySuperfluidTester.sol | 1 - ...mentV1.prop.sol => ConstantFlowAgreementV1.prop.t.sol} | 0 .../agreements/gdav1/GeneralDistributionAgreement.t.sol | 8 ++++---- ...prop.sol => GeneralDistributionAgreementV1.prop.t.sol} | 0 ...eementLibrary.prop.sol => AgreementLibrary.prop.t.sol} | 0 ...tmapLibrary.prop.sol => SlotsBitmapLibrary.prop.t.sol} | 0 .../{FlowNFTBase.prop.sol => FlowNFTBase.prop.t.sol} | 0 ...{SuperfluidPool.prop.sol => SuperfluidPool.prop.t.sol} | 0 ...mentV1.prop.sol => ConstantFlowAgreementV1.prop.t.sol} | 0 15 files changed, 27 insertions(+), 16 deletions(-) rename packages/ethereum-contracts/test/foundry/agreements/{ConstantFlowAgreementV1.prop.sol => ConstantFlowAgreementV1.prop.t.sol} (100%) rename packages/ethereum-contracts/test/foundry/agreements/gdav1/{GeneralDistributionAgreementV1.prop.sol => GeneralDistributionAgreementV1.prop.t.sol} (100%) rename packages/ethereum-contracts/test/foundry/libs/{AgreementLibrary.prop.sol => AgreementLibrary.prop.t.sol} (100%) rename packages/ethereum-contracts/test/foundry/libs/{SlotsBitmapLibrary.prop.sol => SlotsBitmapLibrary.prop.t.sol} (100%) rename packages/ethereum-contracts/test/foundry/superfluid/{FlowNFTBase.prop.sol => FlowNFTBase.prop.t.sol} (100%) rename packages/ethereum-contracts/test/foundry/superfluid/{SuperfluidPool.prop.sol => SuperfluidPool.prop.t.sol} (100%) rename packages/hot-fuzz/contracts/superfluid-tests/{ConstantFlowAgreementV1.prop.sol => ConstantFlowAgreementV1.prop.t.sol} (100%) diff --git a/flake.lock b/flake.lock index e01a8e212a..83f4a97425 100644 --- a/flake.lock +++ b/flake.lock @@ -28,11 +28,11 @@ ] }, "locked": { - "lastModified": 1707037862, - "narHash": "sha256-jCNrmFDx+neh7Uz0Q2kmqz19Yyz8OxnGoZpzd2w3SME=", + "lastModified": 1717405880, + "narHash": "sha256-qcXXOnRSl0sGKm7JknntBU4su8/342YKZvjklHsIl+Q=", "owner": "shazow", "repo": "foundry.nix", - "rev": "03b8af1efb00c51dceaac92462dc77b1b57683e0", + "rev": "708c0df1e36b5185a727a3c517a5100e46392792", "type": "github" }, "original": { diff --git a/packages/ethereum-contracts/CHANGELOG.md b/packages/ethereum-contracts/CHANGELOG.md index 76bd6f606e..d1b5f4420c 100644 --- a/packages/ethereum-contracts/CHANGELOG.md +++ b/packages/ethereum-contracts/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to the ethereum-contracts will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [unreleased] + +### Changed + +- fix a few types and build warnings +- rename '.prop.sol' to '.prop.t.sol' +- upgrade flake lock input: foundry + ## [v1.9.1] - 2024-03-19 ### Breaking diff --git a/packages/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol b/packages/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol index 286a65e093..b389f658f6 100644 --- a/packages/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol +++ b/packages/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol @@ -837,7 +837,7 @@ library SuperTokenV1Library { * @dev get flow info of a distributor to a pool for given token * @param token The token used in flow * @param distributor The sitributor of the flow - * @param pool The GDA pool + * @param pool The GDA pool * @return lastUpdated Timestamp of flow creation or last flowrate change * @return flowRate The flow rate * @return deposit The amount of deposit the flow @@ -922,7 +922,7 @@ library SuperTokenV1Library { deposit += cfaDeposit; owedDeposit += cfaOwedDeposit; } - + { (uint256 lastUpdatedGDA, int96 gdaNetFlowRate, uint256 gdaDeposit) = gda.getAccountFlowInfo(token, account); @@ -964,10 +964,11 @@ library SuperTokenV1Library { function getGDANetFlowInfo(ISuperToken token, address account) internal view - returns (uint256 lastUpdated, int96 flowRate, uint256 deposit, uint256 /* owedDeposit unused */) + returns (uint256 lastUpdated, int96 flowRate, uint256 deposit, uint256 owedDeposit) { (, IGeneralDistributionAgreementV1 gda) = _getHostAndGDA(token); (lastUpdated, flowRate, deposit) = gda.getAccountFlowInfo(token, account); + owedDeposit = 0; // unused in GDA } /** diff --git a/packages/ethereum-contracts/contracts/mocks/SuperfluidDestructorMock.sol b/packages/ethereum-contracts/contracts/mocks/SuperfluidDestructorMock.sol index f9a1f97109..fb2f3dbe8f 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperfluidDestructorMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/SuperfluidDestructorMock.sol @@ -8,7 +8,7 @@ contract SuperfluidDestructorMock { fallback() external { // this == impl in this call - selfdestruct(payable(0)); + assembly { selfdestruct(0) } } } diff --git a/packages/ethereum-contracts/foundry.toml b/packages/ethereum-contracts/foundry.toml index 55b6f5502f..052a997e02 100644 --- a/packages/ethereum-contracts/foundry.toml +++ b/packages/ethereum-contracts/foundry.toml @@ -1,10 +1,12 @@ [profile.default] root = '../..' src = 'packages/ethereum-contracts/contracts' -test = 'packages/ethereum-contracts/test/foundry/' +test = 'packages/ethereum-contracts/test/foundry' solc_version = "0.8.23" -ignored_error_codes = [5159] # selfdestruct in contracts/mocks/SuperfluidDestructorMock.sol -# deny_warnings = true +#deny_warnings = true +ignored_error_codes = [ + 1699 # assembly { selfdestruct } in contracts/mocks/SuperfluidDestructorMock.sol +] # keep in sync with truffle-config.js evm_version = 'paris' remappings = [ diff --git a/packages/ethereum-contracts/package.json b/packages/ethereum-contracts/package.json index 63dd9f3dfe..52e4ece8e2 100644 --- a/packages/ethereum-contracts/package.json +++ b/packages/ethereum-contracts/package.json @@ -13,11 +13,12 @@ "/contracts/**/*", "!/contracts/mocks/*", "/build/truffle/*.json", - "/build/hardhat/**/*", "!/build/truffle/*Mock*.json", "!/build/truffle/*Tester*.json", "!/build/truffle/*Anvil.json", "!/build/truffle/*Properties.json", + "/build/hardhat/**/*", + "!/build/hardhat/contracts/mocks/**/*", "/build/contracts-sizes.txt", "/build/bundled-abi.js", "/build/bundled-abi.json", diff --git a/packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol b/packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol index ce0477ddea..9dd1946818 100644 --- a/packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol +++ b/packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol @@ -1606,7 +1606,6 @@ contract FoundrySuperfluidTester is Test { PoolUnitData memory poolUnitDataBefore = _helperGetPoolUnitsData(pool_); - (int256 claimableBalance,) = pool_.getClaimableNow(member_); (int256 balanceBefore,,,) = poolSuperToken.realtimeBalanceOfNow(member_); { _updateMemberUnits(pool_, poolSuperToken, caller_, member_, newUnits_, useBools_); diff --git a/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.prop.sol b/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.prop.t.sol similarity index 100% rename from packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.prop.sol rename to packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.prop.t.sol diff --git a/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol b/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol index 12e2ff9aee..c95b0c52ec 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol @@ -559,9 +559,9 @@ contract GeneralDistributionAgreementV1IntegrationTest is FoundrySuperfluidTeste for (uint256 i = 0; i < members.length; ++i) { if (sf.gda.isPool(superToken, members[i]) || members[i] == address(0)) continue; - uint128 memberUnits = pool.getUnits(members[i]); + uint128 memberIUnits = pool.getUnits(members[i]); - assertEq(perUnitDistributionAmount * memberUnits, pool.getTotalAmountReceivedByMember(members[i])); + assertEq(perUnitDistributionAmount * memberIUnits, pool.getTotalAmountReceivedByMember(members[i])); } } @@ -594,9 +594,9 @@ contract GeneralDistributionAgreementV1IntegrationTest is FoundrySuperfluidTeste for (uint256 i = 0; i < members.length; ++i) { if (sf.gda.isPool(superToken, members[i]) || members[i] == address(0)) continue; - uint128 memberUnits = pool.getUnits(members[i]); + uint128 memberIUnits = pool.getUnits(members[i]); - assertEq(perUnitDistributionAmount * memberUnits, pool.getTotalAmountReceivedByMember(members[i])); + assertEq(perUnitDistributionAmount * memberIUnits, pool.getTotalAmountReceivedByMember(members[i])); } } diff --git a/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreementV1.prop.sol b/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreementV1.prop.t.sol similarity index 100% rename from packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreementV1.prop.sol rename to packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreementV1.prop.t.sol diff --git a/packages/ethereum-contracts/test/foundry/libs/AgreementLibrary.prop.sol b/packages/ethereum-contracts/test/foundry/libs/AgreementLibrary.prop.t.sol similarity index 100% rename from packages/ethereum-contracts/test/foundry/libs/AgreementLibrary.prop.sol rename to packages/ethereum-contracts/test/foundry/libs/AgreementLibrary.prop.t.sol diff --git a/packages/ethereum-contracts/test/foundry/libs/SlotsBitmapLibrary.prop.sol b/packages/ethereum-contracts/test/foundry/libs/SlotsBitmapLibrary.prop.t.sol similarity index 100% rename from packages/ethereum-contracts/test/foundry/libs/SlotsBitmapLibrary.prop.sol rename to packages/ethereum-contracts/test/foundry/libs/SlotsBitmapLibrary.prop.t.sol diff --git a/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.prop.sol b/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.prop.t.sol similarity index 100% rename from packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.prop.sol rename to packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.prop.t.sol diff --git a/packages/ethereum-contracts/test/foundry/superfluid/SuperfluidPool.prop.sol b/packages/ethereum-contracts/test/foundry/superfluid/SuperfluidPool.prop.t.sol similarity index 100% rename from packages/ethereum-contracts/test/foundry/superfluid/SuperfluidPool.prop.sol rename to packages/ethereum-contracts/test/foundry/superfluid/SuperfluidPool.prop.t.sol diff --git a/packages/hot-fuzz/contracts/superfluid-tests/ConstantFlowAgreementV1.prop.sol b/packages/hot-fuzz/contracts/superfluid-tests/ConstantFlowAgreementV1.prop.t.sol similarity index 100% rename from packages/hot-fuzz/contracts/superfluid-tests/ConstantFlowAgreementV1.prop.sol rename to packages/hot-fuzz/contracts/superfluid-tests/ConstantFlowAgreementV1.prop.t.sol From 31453f8362d63bc1c7f69351e6c48209a769b3b7 Mon Sep 17 00:00:00 2001 From: Miao ZhiCheng Date: Tue, 2 Jul 2024 17:41:42 +0800 Subject: [PATCH 12/42] GDA Units Self Transfer (#1972) * [ETHEREUM-CONTRACTS] use bound in CrossStreamSuperAppTest * flake.nix: set FOUNDRY_SOLC_VERSION * [ETHEREUM-CONTRACTS] superfluid pool to prevent self-transfer * [ETHEREUM-CONTRACTS] additional fix to GeneralDistributionAgreement.t.sol * [ETHEREUM-CONTRACTS] update changelog * use actions/checkout@v4 * fix typo --- ...ll.check-query-schema-against-subgraph.yml | 2 +- .github/workflows/call.deploy-dry-run.yml | 2 +- .github/workflows/call.deploy-subgraph.yml | 2 +- .../call.test-automation-contracts.yml | 2 +- .../call.test-ethereum-contracts.yml | 4 +- .github/workflows/call.test-hot-fuzz.yml | 2 +- .../workflows/call.test-local-subgraph.yml | 4 +- .github/workflows/call.test-sdk-core.yml | 2 +- .../call.test-solidity-semantic-money.yml | 2 +- .github/workflows/call.test-spec-haskell.yml | 2 +- ...subgraph-on-previous-sdk-core-versions.yml | 2 +- .../call.upload-coverage-reports.yml | 2 +- .../cd.feature.create-pr-artifact.yml | 2 +- ....packages-stable.create-release-drafts.yml | 12 +++--- .github/workflows/ci.canary.yml | 12 +++--- .github/workflows/ci.feature.yml | 2 +- .github/workflows/daily-slack-message.yml | 2 +- .../workflows/handler.changelog-reminder.yml | 2 +- .../workflows/handler.deploy-to-mainnet.yml | 4 +- .../workflows/handler.deploy-to-testnets.yml | 2 +- .../workflows/handler.list-super-token.yml | 2 +- .../workflows/handler.publish-pr-packages.yml | 2 +- .../handler.publish-release-packages.yml | 4 +- .../handler.run-ethereum-contracts-script.yml | 2 +- .../handler.update-evm-contracts-docs.yml | 4 +- .../workflows/handler.verify-contracts.yml | 2 +- flake.nix | 2 + packages/ethereum-contracts/CHANGELOG.md | 4 ++ .../agreements/gdav1/SuperfluidPool.sol | 1 + .../agreements/gdav1/ISuperfluidPool.sol | 1 + .../test/foundry/FoundrySuperfluidTester.sol | 1 - .../gdav1/GeneralDistributionAgreement.t.sol | 42 +++++++++++-------- .../foundry/apps/CrossStreamSuperApp.t.sol | 5 +-- 33 files changed, 76 insertions(+), 62 deletions(-) diff --git a/.github/workflows/call.check-query-schema-against-subgraph.yml b/.github/workflows/call.check-query-schema-against-subgraph.yml index 333fa48455..11961641a5 100644 --- a/.github/workflows/call.check-query-schema-against-subgraph.yml +++ b/.github/workflows/call.check-query-schema-against-subgraph.yml @@ -21,7 +21,7 @@ jobs: shell: nix develop -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v19 with: diff --git a/.github/workflows/call.deploy-dry-run.yml b/.github/workflows/call.deploy-dry-run.yml index 0ec83e44b7..0d497cfb3f 100644 --- a/.github/workflows/call.deploy-dry-run.yml +++ b/.github/workflows/call.deploy-dry-run.yml @@ -21,7 +21,7 @@ jobs: ethereum-contracts-working-directory: ./packages/ethereum-contracts steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install and Build run: | diff --git a/.github/workflows/call.deploy-subgraph.yml b/.github/workflows/call.deploy-subgraph.yml index e997fddb17..c4f57b3e85 100644 --- a/.github/workflows/call.deploy-subgraph.yml +++ b/.github/workflows/call.deploy-subgraph.yml @@ -67,7 +67,7 @@ jobs: shell: nix develop -c bash {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v19 with: diff --git a/.github/workflows/call.test-automation-contracts.yml b/.github/workflows/call.test-automation-contracts.yml index 48f7912927..beac3f49cd 100644 --- a/.github/workflows/call.test-automation-contracts.yml +++ b/.github/workflows/call.test-automation-contracts.yml @@ -18,7 +18,7 @@ jobs: shell: nix develop .#ci-node${{ matrix.node-version }} -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v19 with: diff --git a/.github/workflows/call.test-ethereum-contracts.yml b/.github/workflows/call.test-ethereum-contracts.yml index 1b1d593f1d..cb67fb35c0 100644 --- a/.github/workflows/call.test-ethereum-contracts.yml +++ b/.github/workflows/call.test-ethereum-contracts.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Check out code into the Go module directory - uses: actions/checkout@v3 + uses: actions/checkout@v4 - id: set-matrix run: | @@ -45,7 +45,7 @@ jobs: shell: nix develop .#ci-node${{ matrix.node-version }} -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive diff --git a/.github/workflows/call.test-hot-fuzz.yml b/.github/workflows/call.test-hot-fuzz.yml index 34cda68e48..1b3058696c 100644 --- a/.github/workflows/call.test-hot-fuzz.yml +++ b/.github/workflows/call.test-hot-fuzz.yml @@ -14,7 +14,7 @@ jobs: shell: nix develop .#ci-hot-fuzz -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v19 with: diff --git a/.github/workflows/call.test-local-subgraph.yml b/.github/workflows/call.test-local-subgraph.yml index e9ea700da2..cf6c30a5c9 100644 --- a/.github/workflows/call.test-local-subgraph.yml +++ b/.github/workflows/call.test-local-subgraph.yml @@ -16,7 +16,7 @@ jobs: shell: nix develop -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v19 with: @@ -62,7 +62,7 @@ jobs: shell: nix develop -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v19 with: diff --git a/.github/workflows/call.test-sdk-core.yml b/.github/workflows/call.test-sdk-core.yml index e29125f446..c8a965f12e 100644 --- a/.github/workflows/call.test-sdk-core.yml +++ b/.github/workflows/call.test-sdk-core.yml @@ -29,7 +29,7 @@ jobs: shell: nix develop -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v19 with: diff --git a/.github/workflows/call.test-solidity-semantic-money.yml b/.github/workflows/call.test-solidity-semantic-money.yml index 145ea81ce2..6b48ed99ae 100644 --- a/.github/workflows/call.test-solidity-semantic-money.yml +++ b/.github/workflows/call.test-solidity-semantic-money.yml @@ -14,7 +14,7 @@ jobs: shell: nix develop . -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v19 with: diff --git a/.github/workflows/call.test-spec-haskell.yml b/.github/workflows/call.test-spec-haskell.yml index 375f8a2663..b4a89792b9 100644 --- a/.github/workflows/call.test-spec-haskell.yml +++ b/.github/workflows/call.test-spec-haskell.yml @@ -23,7 +23,7 @@ jobs: shell: nix develop .#${{ matrix.dev-shell-type }} -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v19 with: diff --git a/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml b/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml index 61abf9c0f5..05f4c83c4d 100644 --- a/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml +++ b/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml @@ -33,7 +33,7 @@ jobs: shell: nix develop -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v19 with: diff --git a/.github/workflows/call.upload-coverage-reports.yml b/.github/workflows/call.upload-coverage-reports.yml index a6a6d14e2a..cdcc951048 100644 --- a/.github/workflows/call.upload-coverage-reports.yml +++ b/.github/workflows/call.upload-coverage-reports.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Download ethereum-contracts-coverage uses: actions/download-artifact@v3 diff --git a/.github/workflows/cd.feature.create-pr-artifact.yml b/.github/workflows/cd.feature.create-pr-artifact.yml index 079f490e1f..20e3b0ff58 100644 --- a/.github/workflows/cd.feature.create-pr-artifact.yml +++ b/.github/workflows/cd.feature.create-pr-artifact.yml @@ -17,7 +17,7 @@ jobs: if: ${{ !github.event.pull_request.draft }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v19 with: diff --git a/.github/workflows/cd.packages-stable.create-release-drafts.yml b/.github/workflows/cd.packages-stable.create-release-drafts.yml index a5cef1878d..b5be582ee9 100644 --- a/.github/workflows/cd.packages-stable.create-release-drafts.yml +++ b/.github/workflows/cd.packages-stable.create-release-drafts.yml @@ -22,7 +22,7 @@ jobs: permissions: write-all steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js 18.x uses: actions/setup-node@v3 @@ -52,7 +52,7 @@ jobs: permissions: write-all steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js 18.x uses: actions/setup-node@v3 @@ -92,7 +92,7 @@ jobs: permissions: write-all steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js 18.x uses: actions/setup-node@v3 @@ -132,7 +132,7 @@ jobs: publish_sdk_core: ${{ env.SHOULD_PUBLISH_SDK_CORE }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Check package versions run: ./tasks/check-package-version.sh sdk-core SHOULD_PUBLISH_SDK_CORE SDK_CORE_NEW_VERSION >> "$GITHUB_ENV" @@ -168,7 +168,7 @@ jobs: permissions: write-all steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js 18.x uses: actions/setup-node@v3 @@ -195,7 +195,7 @@ jobs: permissions: write-all steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js 18.x uses: actions/setup-node@v3 diff --git a/.github/workflows/ci.canary.yml b/.github/workflows/ci.canary.yml index bf34fd0b38..79d64a17b1 100644 --- a/.github/workflows/ci.canary.yml +++ b/.github/workflows/ci.canary.yml @@ -21,7 +21,7 @@ jobs: build_subgraph: ${{ env.BUILD_SUBGRAPH }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Check changeset run: tasks/check-changeset.sh ${{ github.sha }} dev @@ -40,7 +40,7 @@ jobs: shell: nix develop .#ci-node${{ matrix.node-version }} -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive @@ -183,7 +183,7 @@ jobs: shell: nix develop -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v19 with: @@ -227,9 +227,9 @@ jobs: shell: nix develop -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: repository: superfluid-finance/build-scripts path: build-scripts @@ -290,7 +290,7 @@ jobs: shell: nix develop -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v19 with: diff --git a/.github/workflows/ci.feature.yml b/.github/workflows/ci.feature.yml index 22dbc09560..93fafaabed 100644 --- a/.github/workflows/ci.feature.yml +++ b/.github/workflows/ci.feature.yml @@ -40,7 +40,7 @@ jobs: echo github.head_ref: "$HEAD_REF" echo github.base_ref: ${{ github.base_ref }} - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Check changeset run: tasks/check-changeset.sh ${{ github.sha }} dev diff --git a/.github/workflows/daily-slack-message.yml b/.github/workflows/daily-slack-message.yml index ce0282817f..74edb93e1d 100644 --- a/.github/workflows/daily-slack-message.yml +++ b/.github/workflows/daily-slack-message.yml @@ -9,7 +9,7 @@ jobs: send-slack-message: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js 18.x uses: actions/setup-node@v3 diff --git a/.github/workflows/handler.changelog-reminder.yml b/.github/workflows/handler.changelog-reminder.yml index 05e86527a9..a5c64cf89e 100644 --- a/.github/workflows/handler.changelog-reminder.yml +++ b/.github/workflows/handler.changelog-reminder.yml @@ -17,7 +17,7 @@ jobs: build_spec_haskell: ${{ env.BUILD_SPEC_HASKELL }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Check changeset run: tasks/check-changeset.sh ${{ github.sha }} dev diff --git a/.github/workflows/handler.deploy-to-mainnet.yml b/.github/workflows/handler.deploy-to-mainnet.yml index 8c55838d25..617d3b359f 100644 --- a/.github/workflows/handler.deploy-to-mainnet.yml +++ b/.github/workflows/handler.deploy-to-mainnet.yml @@ -31,9 +31,9 @@ jobs: shell: nix develop -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: repository: superfluid-finance/build-scripts path: build-scripts diff --git a/.github/workflows/handler.deploy-to-testnets.yml b/.github/workflows/handler.deploy-to-testnets.yml index 322a511769..a355181252 100644 --- a/.github/workflows/handler.deploy-to-testnets.yml +++ b/.github/workflows/handler.deploy-to-testnets.yml @@ -36,7 +36,7 @@ jobs: network: [eth-sepolia, optimism-sepolia, avalanche-fuji, scroll-sepolia] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # if only_network is set, skip all steps until the value matches one of the entries in matrix.network - name: Check only_network diff --git a/.github/workflows/handler.list-super-token.yml b/.github/workflows/handler.list-super-token.yml index 8e78551abf..faa9d35e93 100644 --- a/.github/workflows/handler.list-super-token.yml +++ b/.github/workflows/handler.list-super-token.yml @@ -38,7 +38,7 @@ jobs: shell: nix develop -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v19 with: diff --git a/.github/workflows/handler.publish-pr-packages.yml b/.github/workflows/handler.publish-pr-packages.yml index 5027e5c9a8..dddc3b4691 100644 --- a/.github/workflows/handler.publish-pr-packages.yml +++ b/.github/workflows/handler.publish-pr-packages.yml @@ -17,7 +17,7 @@ jobs: if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js 18.x uses: actions/setup-node@v3 diff --git a/.github/workflows/handler.publish-release-packages.yml b/.github/workflows/handler.publish-release-packages.yml index 2c63a1cf97..556a241dc7 100644 --- a/.github/workflows/handler.publish-release-packages.yml +++ b/.github/workflows/handler.publish-release-packages.yml @@ -17,9 +17,9 @@ jobs: shell: nix develop -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: repository: superfluid-finance/build-scripts path: build-scripts diff --git a/.github/workflows/handler.run-ethereum-contracts-script.yml b/.github/workflows/handler.run-ethereum-contracts-script.yml index b6571f914a..774b3a81cb 100644 --- a/.github/workflows/handler.run-ethereum-contracts-script.yml +++ b/.github/workflows/handler.run-ethereum-contracts-script.yml @@ -38,7 +38,7 @@ jobs: GOVERNANCE_ADMIN_TYPE: ${{ github.event.inputs.admin_type }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v19 with: diff --git a/.github/workflows/handler.update-evm-contracts-docs.yml b/.github/workflows/handler.update-evm-contracts-docs.yml index 478cc4de4b..cadcb3bbad 100644 --- a/.github/workflows/handler.update-evm-contracts-docs.yml +++ b/.github/workflows/handler.update-evm-contracts-docs.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Show contexts env: @@ -33,7 +33,7 @@ jobs: run: | yarn install --frozen-lockfile - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: repository: superfluid-finance/build-scripts path: build-scripts diff --git a/.github/workflows/handler.verify-contracts.yml b/.github/workflows/handler.verify-contracts.yml index 7aa764cae7..321cea196b 100644 --- a/.github/workflows/handler.verify-contracts.yml +++ b/.github/workflows/handler.verify-contracts.yml @@ -31,7 +31,7 @@ jobs: shell: nix develop -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Check only_network if: ${{ github.event.inputs.only_network != '' && github.event.inputs.only_network != matrix.network }} diff --git a/flake.nix b/flake.nix index 24cbb6488c..f552a7eb89 100644 --- a/flake.nix +++ b/flake.nix @@ -110,6 +110,8 @@ # mkShell wrapper, to expose additional environment variables mkShell = o : pkgs.mkShell ({ SOLC = pkgs.lib.getExe pkgs.${solcVer}; + FOUNDRY_OFFLINE = "true"; + FOUNDRY_SOLC_VERSION = pkgs.lib.getExe pkgs.${solcVer}; } // o); # ci-spec-with-ghc diff --git a/packages/ethereum-contracts/CHANGELOG.md b/packages/ethereum-contracts/CHANGELOG.md index d1b5f4420c..adabe798ef 100644 --- a/packages/ethereum-contracts/CHANGELOG.md +++ b/packages/ethereum-contracts/CHANGELOG.md @@ -5,6 +5,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [unreleased] +### Breaking + +- ISuperfuidPool self-transfer is not allowed + ### Changed - fix a few types and build warnings diff --git a/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPool.sol b/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPool.sol index e40bc51aa9..d0b7e912b7 100644 --- a/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPool.sol +++ b/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPool.sol @@ -185,6 +185,7 @@ contract SuperfluidPool is ISuperfluidPool, BeaconProxiable { } function _transfer(address from, address to, uint256 amount) internal { + if (from == to) revert SUPERFLUID_POOL_SELF_TRANSFER_NOT_ALLOWED(); if (!transferabilityForUnitsOwner) revert SUPERFLUID_POOL_TRANSFER_UNITS_NOT_ALLOWED(); uint128 fromUnitsBefore = _getUnits(from); diff --git a/packages/ethereum-contracts/contracts/interfaces/agreements/gdav1/ISuperfluidPool.sol b/packages/ethereum-contracts/contracts/interfaces/agreements/gdav1/ISuperfluidPool.sol index 510736278e..b09524f561 100644 --- a/packages/ethereum-contracts/contracts/interfaces/agreements/gdav1/ISuperfluidPool.sol +++ b/packages/ethereum-contracts/contracts/interfaces/agreements/gdav1/ISuperfluidPool.sol @@ -16,6 +16,7 @@ interface ISuperfluidPool is IERC20 { error SUPERFLUID_POOL_NOT_POOL_ADMIN_OR_GDA(); // 0x1c5fbdcb error SUPERFLUID_POOL_NOT_GDA(); // 0xfcbe3f9e error SUPERFLUID_POOL_TRANSFER_UNITS_NOT_ALLOWED(); // 0x2285efba + error SUPERFLUID_POOL_SELF_TRANSFER_NOT_ALLOWED(); // 0xceddc0be // Events event MemberUnitsUpdated( diff --git a/packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol b/packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol index 9dd1946818..fdfc60332a 100644 --- a/packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol +++ b/packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol @@ -1600,7 +1600,6 @@ contract FoundrySuperfluidTester is Test { // there is a hard restriction in which total units must never exceed type(int96).max vm.assume(newUnits_ < type(uint72).max); ISuperToken poolSuperToken = ISuperToken(address(pool_.superToken())); - if (caller_ == address(0) || member_ == address(0) || sf.gda.isPool(poolSuperToken, member_)) return; (bool isConnected, int256 oldUnits,) = _helperGetMemberPoolState(pool_, member_); diff --git a/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol b/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol index c95b0c52ec..9c3a48a0a5 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol @@ -742,15 +742,13 @@ contract GeneralDistributionAgreementV1IntegrationTest is FoundrySuperfluidTeste _helperSuperfluidPoolDecreaseAllowance(pool, owner, spender, subtractedValue); } - function testRevertIfUnitsTransferReceiverIsPool(address from, address to, int96 unitsAmount, int128 transferAmount) + function testRevertIfUnitsTransferReceiverIsPool(address from, int96 unitsAmount, int128 transferAmount) public { // @note we use int96 because overflow will happen otherwise vm.assume(unitsAmount >= 0); vm.assume(transferAmount > 0); vm.assume(from != address(0)); - vm.assume(to != address(0)); - vm.assume(from != to); vm.assume(transferAmount <= unitsAmount); _helperUpdateMemberUnits(freePool, alice, from, uint128(int128(unitsAmount))); @@ -789,22 +787,32 @@ contract GeneralDistributionAgreementV1IntegrationTest is FoundrySuperfluidTeste } function testBasicTransfer( - address from, - address to, - int96 unitsAmount, - int128 transferAmount, - FoundrySuperfluidTester._StackVars_UseBools memory useBools_ + FoundrySuperfluidTester._StackVars_UseBools memory useBools_, + uint8 a, uint8 b, // One must use small sized data type to find equality cases + uint128 unitsAmount, + uint128 transferAmount ) public { - // @note we use int96 because overflow will happen otherwise - vm.assume(unitsAmount >= 0); - vm.assume(transferAmount > 0); - vm.assume(from != address(0)); - vm.assume(to != address(0)); - vm.assume(from != to); - vm.assume(transferAmount <= unitsAmount); - _helperUpdateMemberUnits(freePool, alice, from, uint128(int128(unitsAmount)), useBools_); + address from = address(uint160(a)); + address to = address(uint160(b)); + + transferAmount = uint96(bound(transferAmount, 0, unitsAmount)); - _helperSuperfluidPoolUnitsTransfer(freePool, from, to, uint256(uint128(transferAmount))); + vm.assume(from != address(0)); + _helperUpdateMemberUnits(freePool, alice, from, unitsAmount, useBools_); + + if (from == to) { + vm.startPrank(from); + vm.expectRevert(ISuperfluidPool.SUPERFLUID_POOL_SELF_TRANSFER_NOT_ALLOWED.selector); + freePool.transfer(to, transferAmount); + vm.stopPrank(); + } else if (to == address(0)) { + vm.startPrank(from); + vm.expectRevert(ISuperfluidPool.SUPERFLUID_POOL_NO_ZERO_ADDRESS.selector); + freePool.transfer(to, transferAmount); + vm.stopPrank(); + } else { + _helperSuperfluidPoolUnitsTransfer(freePool, from, to, uint256(uint128(transferAmount))); + } } function testApproveAndTransferFrom( diff --git a/packages/ethereum-contracts/test/foundry/apps/CrossStreamSuperApp.t.sol b/packages/ethereum-contracts/test/foundry/apps/CrossStreamSuperApp.t.sol index 1c6630e469..e502bd120b 100644 --- a/packages/ethereum-contracts/test/foundry/apps/CrossStreamSuperApp.t.sol +++ b/packages/ethereum-contracts/test/foundry/apps/CrossStreamSuperApp.t.sol @@ -24,13 +24,12 @@ contract CrossStreamSuperAppTest is FoundrySuperfluidTester { } function testNoTokensMintedOrBurnedInCrossStreamSuperApp(int96 flowRate, uint64 blockTimestamp) public { - vm.assume(flowRate < 1e14); // @note due to clipping, there is precision loss, therefore if the flow rate is too low // tokens will be unrecoverable - vm.assume(flowRate > 2 ** 32 - 1); + flowRate = int96(bound(flowRate, 2 ** 31 - 1, 1e14)); int96 initialFlowRate = flowRate; - // @note transfer tokens from alice to carol so that + // @note transfer tokens from alice to carol so that // alice has type(uint64).max balance to start uint256 diff = type(uint88).max - type(uint64).max; vm.startPrank(alice); From 5875f1a49be3947df04475ce6c2b3ac8759d3fbb Mon Sep 17 00:00:00 2001 From: Kaspar Kallas Date: Tue, 2 Jul 2024 13:10:35 +0300 Subject: [PATCH 13/42] feat: add vesting scheduler v2 placeholder (#1974) --- packages/metadata/main/networks/list.cjs | 1 + packages/metadata/module/networks/list.d.ts | 1 + packages/metadata/module/networks/list.js | 1 + packages/metadata/networks.json | 1 + packages/metadata/package.json | 2 +- 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/metadata/main/networks/list.cjs b/packages/metadata/main/networks/list.cjs index a5bb3684e8..336c23b748 100644 --- a/packages/metadata/main/networks/list.cjs +++ b/packages/metadata/main/networks/list.cjs @@ -110,6 +110,7 @@ module.exports = "constantInflowNFT": "0x87E00Dced5670e01BEe33a9a724B1dac790937eF", "flowScheduler": "0x73B1Ce21d03ad389C2A291B1d1dc4DAFE7B5Dc68", "vestingScheduler": "0x27444c0235a4D921F3106475faeba0B5e7ABDD7a", + "vestingSchedulerV2": "0xBeB02560Fd1608716ca27704E5191D6937EC244B", "autowrap": { "manager": "0xe567b32C10B0dB72d9490eB1B9A409C5ADed192C", "wrapStrategy": "0xf232f1fd34CE12e24F4391865c2D6E374D2C34d9" diff --git a/packages/metadata/module/networks/list.d.ts b/packages/metadata/module/networks/list.d.ts index 9763ac2831..89c1ab04ed 100644 --- a/packages/metadata/module/networks/list.d.ts +++ b/packages/metadata/module/networks/list.d.ts @@ -17,6 +17,7 @@ interface ContractAddresses { readonly superfluidLoader: string; readonly toga?: string; readonly vestingScheduler?: string; + readonly vestingSchedulerV2?: string; readonly flowScheduler?: string; readonly batchLiquidator?: string; readonly superSpreader?: string; diff --git a/packages/metadata/module/networks/list.js b/packages/metadata/module/networks/list.js index 56dee7ac60..93886cb601 100644 --- a/packages/metadata/module/networks/list.js +++ b/packages/metadata/module/networks/list.js @@ -110,6 +110,7 @@ export default "constantInflowNFT": "0x87E00Dced5670e01BEe33a9a724B1dac790937eF", "flowScheduler": "0x73B1Ce21d03ad389C2A291B1d1dc4DAFE7B5Dc68", "vestingScheduler": "0x27444c0235a4D921F3106475faeba0B5e7ABDD7a", + "vestingSchedulerV2": "0xBeB02560Fd1608716ca27704E5191D6937EC244B", "autowrap": { "manager": "0xe567b32C10B0dB72d9490eB1B9A409C5ADed192C", "wrapStrategy": "0xf232f1fd34CE12e24F4391865c2D6E374D2C34d9" diff --git a/packages/metadata/networks.json b/packages/metadata/networks.json index 632685565e..9ddc44f238 100644 --- a/packages/metadata/networks.json +++ b/packages/metadata/networks.json @@ -108,6 +108,7 @@ "constantInflowNFT": "0x87E00Dced5670e01BEe33a9a724B1dac790937eF", "flowScheduler": "0x73B1Ce21d03ad389C2A291B1d1dc4DAFE7B5Dc68", "vestingScheduler": "0x27444c0235a4D921F3106475faeba0B5e7ABDD7a", + "vestingSchedulerV2": "0xBeB02560Fd1608716ca27704E5191D6937EC244B", "autowrap": { "manager": "0xe567b32C10B0dB72d9490eB1B9A409C5ADed192C", "wrapStrategy": "0xf232f1fd34CE12e24F4391865c2D6E374D2C34d9" diff --git a/packages/metadata/package.json b/packages/metadata/package.json index 2a78659f52..af265c9d34 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -1,6 +1,6 @@ { "name": "@superfluid-finance/metadata", - "version": "1.2.6", + "version": "1.3.0", "description": "Superfluid Metadata", "main": "main/index.cjs", "module": "module/index.js", From 7e943b74df15d70670921874f31bde63270bcf3f Mon Sep 17 00:00:00 2001 From: Didi Date: Tue, 2 Jul 2024 13:49:23 +0200 Subject: [PATCH 14/42] [ETHEREUM-CONTRACTS] add missing batch call operations (#1967) * added batch call operations for upgradeTo and downgradeTo * added test case for connecting a pool via batch call * added OPERATION_TYPE_SIMPLE_FORWARD_CALL * added OPERATION_TYPE_ERC2771_FORWARD_CALL * forward native tokens with the first generic external call * fix contract size * appease linter * more comments, fixed value forwarding via 2771 * more verbose documentation * fix hotfuzz init * add dmzfwd to deploy script * adjust mock constructor * disable code to stay inside contract size limit * this is insanity * fix test * fix deployment test * disable only part of the replacePlaceholderCtx test * revert unrelated change * try failing test only * fixed the flakiness source and undid the undo * updated CHANGELOG * allow to withdraw native tokens stuck in DMZForwarder * made host.forwardBatchCall payable too * rename to GeneralDistributionAgreementV1.prop.t.sol * update foundry * use assembly destructor to have different error code * uncomment out test code * update foundry version * [ETHEREUM-CONTRACTS]: typo fixes * [ETHEREUM-CONTRACTS] rename prop.sol to prop.t.sol * fix build warning * ignore mocks from hardhat build * use assembly selfdestruct for now * fix build warning * update CHANGELOG --------- Co-authored-by: Miao, ZhiCheng --- packages/ethereum-contracts/CHANGELOG.md | 10 + .../interfaces/superfluid/Definitions.sol | 53 +++ .../interfaces/superfluid/ISuperToken.sol | 22 + .../interfaces/superfluid/ISuperfluid.sol | 21 +- .../contracts/mocks/SuperfluidMock.sol | 8 +- .../contracts/superfluid/SuperToken.sol | 14 + .../contracts/superfluid/Superfluid.sol | 63 ++- .../contracts/utils/DMZForwarder.sol | 50 +++ .../SuperfluidFrameworkDeploymentSteps.sol | 19 +- .../dev-scripts/deploy-test-framework.js | 10 + packages/ethereum-contracts/hardhat.config.ts | 5 +- .../ops-scripts/deploy-framework.js | 37 +- .../apps/SuperTokenV1Library.GDA.test.ts | 7 +- .../contracts/superfluid/Superfluid.test.ts | 19 +- .../superfluid/Superfluid.BatchCall.t.sol | 424 +++++++++++++++++- .../test/ops-scripts/deployment.test.js | 3 +- packages/hot-fuzz/hot-fuzz | 3 +- 17 files changed, 725 insertions(+), 43 deletions(-) create mode 100644 packages/ethereum-contracts/contracts/utils/DMZForwarder.sol diff --git a/packages/ethereum-contracts/CHANGELOG.md b/packages/ethereum-contracts/CHANGELOG.md index adabe798ef..14538d950f 100644 --- a/packages/ethereum-contracts/CHANGELOG.md +++ b/packages/ethereum-contracts/CHANGELOG.md @@ -9,6 +9,16 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - ISuperfuidPool self-transfer is not allowed +### Added + +- `batchCall` now supports 4 additional operation types: + - `OPERATION_TYPE_SUPERTOKEN_UPGRADE_TO` + - `OPERATION_TYPE_SUPERTOKEN_DOWNGRADE_TO` + - `OPERATION_TYPE_SIMPLE_FORWARD_CALL` + - `OPERATION_TYPE_ERC2771_FORWARD_CALL` + + The latter 2 allow to add arbitrary contract calls to batch call. + ### Changed - fix a few types and build warnings diff --git a/packages/ethereum-contracts/contracts/interfaces/superfluid/Definitions.sol b/packages/ethereum-contracts/contracts/interfaces/superfluid/Definitions.sol index f9687901a1..7a29d7e775 100644 --- a/packages/ethereum-contracts/contracts/interfaces/superfluid/Definitions.sol +++ b/packages/ethereum-contracts/contracts/interfaces/superfluid/Definitions.sol @@ -192,6 +192,24 @@ library BatchOperation { * ) */ uint32 constant internal OPERATION_TYPE_SUPERTOKEN_DOWNGRADE = 2 + 100; + /** + * @dev SuperToken.upgradeTo batch operation type + * + * Call spec: + * ISuperToken(target).operationUpgradeTo( + * abi.decode(data, (address to, uint256 amount) + * ) + */ + uint32 constant internal OPERATION_TYPE_SUPERTOKEN_UPGRADE_TO = 3 + 100; + /** + * @dev SuperToken.downgradeTo batch operation type + * + * Call spec: + * ISuperToken(target).operationDowngradeTo( + * abi.decode(data, (address to, uint256 amount) + * ) + */ + uint32 constant internal OPERATION_TYPE_SUPERTOKEN_DOWNGRADE_TO = 4 + 100; /** * @dev Superfluid.callAgreement batch operation type * @@ -212,6 +230,41 @@ library BatchOperation { * ) */ uint32 constant internal OPERATION_TYPE_SUPERFLUID_CALL_APP_ACTION = 2 + 200; + /** + * @dev DMZForwarder.forwardCall batch operation type + * + * Call spec: + * forwardCall( + * target, + * data + * ) + */ + uint32 constant internal OPERATION_TYPE_SIMPLE_FORWARD_CALL = 1 + 300; + /** + * @dev DMZForwarder.forward2771Call batch operation type + * + * Call spec: + * forward2771Call( + * target, + * msgSender, + * data + * ) + * + * NOTE: In the context of this operation, the `DZMForwarder` contract acts as the + * _trusted forwarder_ which must be trusted by the _recipient contract_ (operation target). + * It shall do so by dynamically looking up the DMZForwarder used by the host, like this: + * + * function isTrustedForwarder(address forwarder) public view returns(bool) { + * return forwarder == address(host.DMZ_FORWARDER()); + * } + * + * If used in the context of a `forwardBatchCall`, we effectively have a chaining/nesting + * of ERC-2771 calls where the host acts as _recipient contract_ of the enveloping 2771 call + * and the DMZForwarder acts as the _trusted forwarder_ of the nested 2771 call(s). + * That's why `msgSender` could be either the actual `msg.sender` (if using `batchCall`) + * or the relayed sender address (if using `forwardBatchCall`). + */ + uint32 constant internal OPERATION_TYPE_ERC2771_FORWARD_CALL = 2 + 300; } /** diff --git a/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol b/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol index ef62a0e93c..30d7e95084 100644 --- a/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol +++ b/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol @@ -578,6 +578,28 @@ interface ISuperToken is ISuperfluidToken, IERC20Metadata, IERC777 { */ function operationDowngrade(address account, uint256 amount) external; + /** + * @dev Upgrade ERC20 to SuperToken by host contract and transfer immediately. + * @param account The account to be changed. + * @param to The account to receive upgraded tokens + * @param amount Number of tokens to be upgraded (in 18 decimals) + * + * @custom:modifiers + * - onlyHost + */ + function operationUpgradeTo(address account, address to, uint256 amount) external; + + /** + * @dev Downgrade ERC20 to SuperToken by host contract and transfer immediately. + * @param account The account to be changed. + * @param to The account to receive downgraded tokens + * @param amount Number of tokens to be downgraded (in 18 decimals) + * + * @custom:modifiers + * - onlyHost + */ + function operationDowngradeTo(address account, address to, uint256 amount) external; + // Flow NFT events /** * @dev Constant Outflow NFT proxy created event diff --git a/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol b/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol index b6abefb953..cf660e9a10 100644 --- a/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol +++ b/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol @@ -622,14 +622,31 @@ interface ISuperfluid { /** * @dev Batch call function * @param operations Array of batch operations + * + * NOTE: `batchCall` is `payable, because there's limited support for sending + * native tokens to batch operation targets. + * If value is > 0, the whole amount is sent to the first operation matching any of: + * - OPERATION_TYPE_SUPERFLUID_CALL_APP_ACTION + * - OPERATION_TYPE_SIMPLE_FORWARD_CALL + * - OPERATION_TYPE_ERC2771_FORWARD_CALL + * If the first such operation does not allow receiving native tokens, + * the transaction will revert. + * It's currently not possible to send native tokens to multiple operations, or to + * any but the first operation of one of the above mentioned types. + * If no such operation is included, the native tokens will be sent back to the sender. */ function batchCall(Operation[] calldata operations) external payable; /** - * @dev Batch call function for trusted forwarders (EIP-2771) + * @dev Batch call function with EIP-2771 encoded msgSender * @param operations Array of batch operations + * + * NOTE: This can be called only by contracts recognized as _trusted forwarder_ + * by the host contract (see `Superfluid.isTrustedForwarder`). + * If native tokens are passed along, the same rules as for `batchCall` apply, + * with an optional refund going to the encoded msgSender. */ - function forwardBatchCall(Operation[] calldata operations) external; + function forwardBatchCall(Operation[] calldata operations) external payable; /************************************************************************** * Function modifiers for access control and parameter validations diff --git a/packages/ethereum-contracts/contracts/mocks/SuperfluidMock.sol b/packages/ethereum-contracts/contracts/mocks/SuperfluidMock.sol index 12d68d7bf9..d516c7c338 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperfluidMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/SuperfluidMock.sol @@ -11,7 +11,7 @@ import { CallUtils } from "../libs/CallUtils.sol"; contract SuperfluidUpgradabilityTester is Superfluid { - constructor() Superfluid(false, false) + constructor() Superfluid(false, false, address(0)) // solhint-disable-next-line no-empty-blocks { } @@ -129,9 +129,8 @@ contract SuperfluidUpgradabilityTester is Superfluid { contract SuperfluidMock is Superfluid { - - constructor(bool nonUpgradable, bool appWhiteListingEnabled) - Superfluid(nonUpgradable, appWhiteListingEnabled) + constructor(bool nonUpgradable, bool appWhiteListingEnabled, address dmzForwarder) + Superfluid(nonUpgradable, appWhiteListingEnabled, dmzForwarder) // solhint-disable-next-line no-empty-blocks { } @@ -173,5 +172,4 @@ contract SuperfluidMock is Superfluid { { _jailApp(app, 6942); } - } diff --git a/packages/ethereum-contracts/contracts/superfluid/SuperToken.sol b/packages/ethereum-contracts/contracts/superfluid/SuperToken.sol index d1aaee5b55..b2eeee0717 100644 --- a/packages/ethereum-contracts/contracts/superfluid/SuperToken.sol +++ b/packages/ethereum-contracts/contracts/superfluid/SuperToken.sol @@ -882,6 +882,20 @@ contract SuperToken is _downgrade(msg.sender, account, account, amount, "", ""); } + function operationUpgradeTo(address account, address to, uint256 amount) + external virtual override + onlyHost + { + _upgrade(msg.sender, account, to, amount, "", ""); + } + + function operationDowngradeTo(address account, address to, uint256 amount) + external virtual override + onlyHost + { + _downgrade(msg.sender, account, to, amount, "", ""); + } + /************************************************************************** * Modifiers *************************************************************************/ diff --git a/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol b/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol index 29ef49be95..a4fbedf23d 100644 --- a/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol +++ b/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol @@ -23,6 +23,7 @@ import { GeneralDistributionAgreementV1 } from "../agreements/gdav1/GeneralDistr import { SuperfluidUpgradeableBeacon } from "../upgradability/SuperfluidUpgradeableBeacon.sol"; import { CallUtils } from "../libs/CallUtils.sol"; import { BaseRelayRecipient } from "../libs/BaseRelayRecipient.sol"; +import { DMZForwarder } from "../utils/DMZForwarder.sol"; /** * @dev The Superfluid host implementation. @@ -51,6 +52,8 @@ contract Superfluid is // solhint-disable-next-line var-name-mixedcase bool immutable public APP_WHITE_LISTING_ENABLED; + DMZForwarder immutable public DMZ_FORWARDER; + /** * @dev Maximum number of level of apps can be composed together * @@ -95,9 +98,10 @@ contract Superfluid is /// function in its respective mock contract to ensure that it doesn't break anything or lead to unexpected /// behaviors/layout when upgrading - constructor(bool nonUpgradable, bool appWhiteListingEnabled) { + constructor(bool nonUpgradable, bool appWhiteListingEnabled, address dmzForwarderAddress) { NON_UPGRADABLE_DEPLOYMENT = nonUpgradable; APP_WHITE_LISTING_ENABLED = appWhiteListingEnabled; + DMZ_FORWARDER = DMZForwarder(dmzForwarderAddress); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -312,7 +316,7 @@ contract Superfluid is //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Superfluid Upgradeable Beacon //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - + /// @inheritdoc ISuperfluid function updatePoolBeaconLogic(address newLogic) external override onlyGovernance { GeneralDistributionAgreementV1 gda = GeneralDistributionAgreementV1( @@ -794,12 +798,11 @@ contract Superfluid is **************************************************************************/ function _batchCall( - address msgSender, + address payable msgSender, Operation[] calldata operations ) internal { - bool valueForwarded = false; for (uint256 i = 0; i < operations.length; ++i) { uint32 operationType = operations[i].operationType; if (operationType == BatchOperation.OPERATION_TYPE_ERC20_APPROVE) { @@ -847,6 +850,18 @@ contract Superfluid is ISuperToken(operations[i].target).operationDowngrade( msgSender, abi.decode(operations[i].data, (uint256))); // amount + } else if (operationType == BatchOperation.OPERATION_TYPE_SUPERTOKEN_UPGRADE_TO) { + (address to, uint256 amount) = abi.decode(operations[i].data, (address, uint256)); + ISuperToken(operations[i].target).operationUpgradeTo( + msgSender, + to, + amount); + } else if (operationType == BatchOperation.OPERATION_TYPE_SUPERTOKEN_DOWNGRADE_TO) { + (address to, uint256 amount) = abi.decode(operations[i].data, (address, uint256)); + ISuperToken(operations[i].target).operationDowngradeTo( + msgSender, + to, + amount); } else if (operationType == BatchOperation.OPERATION_TYPE_SUPERFLUID_CALL_AGREEMENT) { (bytes memory callData, bytes memory userData) = abi.decode(operations[i].data, (bytes, bytes)); _callAgreement( @@ -854,20 +869,42 @@ contract Superfluid is ISuperAgreement(operations[i].target), callData, userData); - } else if (operationType == BatchOperation.OPERATION_TYPE_SUPERFLUID_CALL_APP_ACTION) { + } + // The following operations for call proxies allow forwarding of native tokens. + // we use `address(this).balance` instead of `msg.value`, because the latter ist not + // updated after forwarding to the first operation, while `balance` is. + // The initial balance is equal to `msg.value` because there's no other path + // for the contract to receive native tokens. + else if (operationType == BatchOperation.OPERATION_TYPE_SUPERFLUID_CALL_APP_ACTION) { _callAppAction( msgSender, ISuperApp(operations[i].target), - valueForwarded ? 0 : msg.value, + address(this).balance, operations[i].data); - valueForwarded = true; + } else if (operationType == BatchOperation.OPERATION_TYPE_SIMPLE_FORWARD_CALL) { + (bool success, bytes memory returnData) = + DMZ_FORWARDER.forwardCall{value: address(this).balance}( + operations[i].target, + operations[i].data); + if (!success) { + CallUtils.revertFromReturnedData(returnData); + } + } else if (operationType == BatchOperation.OPERATION_TYPE_ERC2771_FORWARD_CALL) { + (bool success, bytes memory returnData) = + DMZ_FORWARDER.forward2771Call{value: address(this).balance}( + operations[i].target, + msgSender, + operations[i].data); + if (!success) { + CallUtils.revertFromReturnedData(returnData); + } } else { revert HOST_UNKNOWN_BATCH_CALL_OPERATION_TYPE(); } } - if (msg.value != 0 && !valueForwarded) { - // return ETH provided if not forwarded - payable(msg.sender).transfer(msg.value); + if (address(this).balance != 0) { + // return any native tokens left to the sender. + msgSender.transfer(address(this).balance); } } @@ -877,12 +914,12 @@ contract Superfluid is ) external override payable { - _batchCall(msg.sender, operations); + _batchCall(payable(msg.sender), operations); } /// @dev ISuperfluid.forwardBatchCall implementation function forwardBatchCall(Operation[] calldata operations) - external override + external override payable { _batchCall(_getTransactionSigner(), operations); } @@ -899,7 +936,7 @@ contract Superfluid is ) != 0; } - /// @dev IRelayRecipient.isTrustedForwarder implementation + /// @dev IRelayRecipient.versionRecipient implementation function versionRecipient() external override pure returns (string memory) diff --git a/packages/ethereum-contracts/contracts/utils/DMZForwarder.sol b/packages/ethereum-contracts/contracts/utils/DMZForwarder.sol new file mode 100644 index 0000000000..5c36c8ea7e --- /dev/null +++ b/packages/ethereum-contracts/contracts/utils/DMZForwarder.sol @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: AGPLv3 +pragma solidity 0.8.23; + +import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; + +/** + * @title DMZForwarder + * @dev The purpose of this contract is to make arbitrary contract calls batchable + * alongside Superfluid specific batch operations. + * We route the calls through this dedicated contract in order to not have msg.sender set + * to the host contract, for security reasons. + * Forwarded calls can optionally use ERC-2771 to preserve the original msg.sender. + * If native tokens (msg.value) are provided, they are forwarded as well. + */ +contract DMZForwarder is Ownable { + /** + * @dev Forwards a call for which msg.sender doesn't matter + * @param target The target contract to call + * @param data The call data + */ + function forwardCall(address target, bytes memory data) + external payable + returns(bool success, bytes memory returnData) + { + // solhint-disable-next-line avoid-low-level-calls + (success, returnData) = target.call{value: msg.value}(data); + } + + /** + * @dev Forwards a call passing along the original msg.sender encoded as specified in ERC-2771. + * @param target The target contract to call + * @param msgSender The original msg.sender passed along by the trusted contract owner + * @param data The call data + */ + function forward2771Call(address target, address msgSender, bytes memory data) + external payable onlyOwner + returns(bool success, bytes memory returnData) + { + // solhint-disable-next-line avoid-low-level-calls + (success, returnData) = target.call{value: msg.value}(abi.encodePacked(data, msgSender)); + } + + /** + * @dev Allows to withdraw native tokens (ETH) which got stuck in this contract. + * This could happen if a call fails, but the caller doesn't revert the tx. + */ + function withdrawLostNativeTokens(address payable receiver) external onlyOwner { + receiver.transfer(address(this).balance); + } +} \ No newline at end of file diff --git a/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol b/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol index 1843a22e7b..943e1f0e45 100644 --- a/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol +++ b/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol @@ -34,6 +34,7 @@ import { TOGA } from "./TOGA.sol"; import { CFAv1Library } from "../apps/CFAv1Library.sol"; import { IDAv1Library } from "../apps/IDAv1Library.sol"; import { IResolver } from "../interfaces/utils/IResolver.sol"; +import { DMZForwarder } from "../utils/DMZForwarder.sol"; /// @title Superfluid Framework Deployment Steps /// @author Superfluid @@ -151,11 +152,12 @@ contract SuperfluidFrameworkDeploymentSteps { if (step == 0) { // CORE CONTRACT: TestGovernance // Deploy TestGovernance, a Superfluid Governance for testing purpose. It needs initialization later. testGovernance = SuperfluidGovDeployerLibrary.deployTestGovernance(); - SuperfluidGovDeployerLibrary.transferOwnership(testGovernance, address(this)); } else if (step == 1) { // CORE CONTRACT: Superfluid (Host) + DMZForwarder dmzForwarder = SuperfluidDMZForwarderDeployerLibrary.deploy(); // Deploy Host and initialize the test governance. - host = SuperfluidHostDeployerLibrary.deploy(true, false); + host = SuperfluidHostDeployerLibrary.deploy(true, false, address(dmzForwarder)); + dmzForwarder.transferOwnership(address(host)); host.initialize(testGovernance); @@ -347,9 +349,18 @@ library SuperfluidGovDeployerLibrary { } } +library SuperfluidDMZForwarderDeployerLibrary { + // After deploying, you may want to transfer ownership to the host + function deploy() external returns (DMZForwarder) { + return new DMZForwarder(); + } +} + library SuperfluidHostDeployerLibrary { - function deploy(bool _nonUpgradable, bool _appWhiteListingEnabled) external returns (Superfluid) { - return new Superfluid(_nonUpgradable, _appWhiteListingEnabled); + function deploy(bool _nonUpgradable, bool _appWhiteListingEnabled, address dmzForwarderAddress) + external returns (Superfluid) + { + return new Superfluid(_nonUpgradable, _appWhiteListingEnabled, dmzForwarderAddress); } } diff --git a/packages/ethereum-contracts/dev-scripts/deploy-test-framework.js b/packages/ethereum-contracts/dev-scripts/deploy-test-framework.js index 5e60f6ace9..41d12ae832 100644 --- a/packages/ethereum-contracts/dev-scripts/deploy-test-framework.js +++ b/packages/ethereum-contracts/dev-scripts/deploy-test-framework.js @@ -20,6 +20,7 @@ const SuperTokenFactoryDeployerLibraryArtifact = require("@superfluid-finance/et const SuperfluidFrameworkDeployerArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeployer.sol/SuperfluidFrameworkDeployer.json"); const SlotsBitmapLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/libs/SlotsBitmapLibrary.sol/SlotsBitmapLibrary.json"); const TokenDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/TokenDeployerLibrary.json"); +const SuperfluidDMZForwarderDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperfluidDMZForwarderDeployerLibrary.json"); const ERC1820Registry = require("../dev-scripts/artifacts/ERC1820Registry.json"); @@ -238,6 +239,12 @@ const _deployTestFramework = async (provider, signer) => { TokenDeployerLibraryArtifact, signer ); + const SuperfluidDMZForwarderDeployerLibrary = + await _getFactoryAndReturnDeployedContract( + "SuperfluidDMZForwarderDeployerLibrary", + SuperfluidDMZForwarderDeployerLibraryArtifact, + signer + ); const sfDeployer = await _getFactoryAndReturnDeployedContract( "SuperfluidFrameworkDeployer", @@ -289,6 +296,9 @@ const _deployTestFramework = async (provider, signer) => { SuperTokenFactoryDeployerLibrary ), TokenDeployerLibrary: getContractAddress(TokenDeployerLibrary), + SuperfluidDMZForwarderDeployerLibrary: getContractAddress( + SuperfluidDMZForwarderDeployerLibrary + ), }, } ); diff --git a/packages/ethereum-contracts/hardhat.config.ts b/packages/ethereum-contracts/hardhat.config.ts index 6dcb708c69..d1453421b5 100644 --- a/packages/ethereum-contracts/hardhat.config.ts +++ b/packages/ethereum-contracts/hardhat.config.ts @@ -151,9 +151,8 @@ const config: HardhatUserConfig = { url: process.env.SCROLL_MAINNET_PROVIDER_URL || "", }, hardhat: { - // Fixing an issue that parallel coverage test is not working for unkown reason. - // Ref: https://github.com/NomicFoundation/hardhat/issues/4310 - allowUnlimitedContractSize: process.env.IS_COVERAGE_TEST ? true : undefined, + // We defer the contract size limit test to foundry. + allowUnlimitedContractSize: true, }, }, mocha: { diff --git a/packages/ethereum-contracts/ops-scripts/deploy-framework.js b/packages/ethereum-contracts/ops-scripts/deploy-framework.js index 6da6a6aedf..fe2b89e681 100644 --- a/packages/ethereum-contracts/ops-scripts/deploy-framework.js +++ b/packages/ethereum-contracts/ops-scripts/deploy-framework.js @@ -228,6 +228,7 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( "PoolAdminNFT", "PoolMemberNFT", "IAccessControlEnumerable", + "DMZForwarder", ]; const mockContracts = [ "SuperfluidMock", @@ -268,6 +269,7 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( PoolAdminNFT, PoolMemberNFT, IAccessControlEnumerable, + DMZForwarder, } = await SuperfluidSDK.loadContracts({ ...extractWeb3Options(options), additionalContracts: contracts.concat(useMocks ? mockContracts : []), @@ -348,11 +350,14 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( `Superfluid.${protocolReleaseVersion}`, async (contractAddress) => !(await hasCode(web3, contractAddress)), async () => { + const dmzForwarder = await web3tx(DMZForwarder.new, "DMZForwarder.new")(); + output += `DMZ_FORWARDER=${dmzForwarder.address}\n`; + let superfluidAddress; const superfluidLogic = await web3tx( SuperfluidLogic.new, "SuperfluidLogic.new" - )(nonUpgradable, appWhiteListing); + )(nonUpgradable, appWhiteListing, dmzForwarder.address); console.log( `Superfluid new code address ${superfluidLogic.address}` ); @@ -372,6 +377,10 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( superfluidAddress = superfluidLogic.address; } const superfluid = await Superfluid.at(superfluidAddress); + await web3tx( + dmzForwarder.transferOwnership, + "dmzForwarder.transferOwnership" + )(superfluid.address); await web3tx( superfluid.initialize, "Superfluid.initialize" @@ -796,6 +805,30 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( throw new Error("Superfluid is not upgradable"); } + async function getPrevDMZForwarderAddr() { + console.log("Getting DMZForwarder address..."); + try { + return await superfluid.DMZ_FORWARDER(); + } catch (err) { + return ZERO_ADDRESS; // fallback + } + } + + const dmzForwarderAddress = await deployContractIfCodeChanged( + web3, + DMZForwarder, + await getPrevDMZForwarderAddr(), + async () => { + const dmzForwarder = await web3tx(DMZForwarder.new, "DMZForwarder.new")(); + await web3tx( + dmzForwarder.transferOwnership, + "dmzForwarder.transferOwnership" + )(superfluid.address); + output += `DMZ_FORWARDER=${dmzForwarder.address}\n`; + return dmzForwarder.address; + } + ); + // deploy new superfluid host logic superfluidNewLogicAddress = await deployContractIfCodeChanged( web3, @@ -808,7 +841,7 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( const superfluidLogic = await web3tx( SuperfluidLogic.new, "SuperfluidLogic.new" - )(nonUpgradable, appWhiteListing); + )(nonUpgradable, appWhiteListing, dmzForwarderAddress); output += `SUPERFLUID_HOST_LOGIC=${superfluidLogic.address}\n`; return superfluidLogic.address; } diff --git a/packages/ethereum-contracts/test/contracts/apps/SuperTokenV1Library.GDA.test.ts b/packages/ethereum-contracts/test/contracts/apps/SuperTokenV1Library.GDA.test.ts index 68ddfff3e3..122fcd5b89 100644 --- a/packages/ethereum-contracts/test/contracts/apps/SuperTokenV1Library.GDA.test.ts +++ b/packages/ethereum-contracts/test/contracts/apps/SuperTokenV1Library.GDA.test.ts @@ -73,9 +73,9 @@ describe("SuperTokenV1Library.GDA", function () { const event = receipt.events?.find((x) => x.topics.includes(POOL_CREATED_TOPIC) ); - return ethers.utils.hexStripZeros( - event ? event.data : ethers.constants.AddressZero - ); + return event + ? `0x${event.data.substring(event.data.length - 40)}` + : ethers.constants.AddressZero; }; let alice: string, bob: string; @@ -120,6 +120,7 @@ describe("SuperTokenV1Library.GDA", function () { ); const receipt = await createPoolTxn.wait(); const poolAddress = getPoolAddressFromReceipt(receipt); + const poolContract = await ethers.getContractAt( "SuperfluidPool", poolAddress diff --git a/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts b/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts index 98fe04baf7..4711f77427 100644 --- a/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts +++ b/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts @@ -112,11 +112,13 @@ describe("Superfluid Host Contract", function () { await ethers.getContractFactory("SuperfluidMock"); const mock1 = await sfMockFactory.deploy( false /* nonUpgradable */, - false /* appWhiteListingEnabled */ + false /* appWhiteListingEnabled */, + ZERO_ADDRESS /* dmzForwader */ ); const mock2 = await sfMockFactory.deploy( true /* nonUpgradable */, - false /* appWhiteListingEnabled */ + false /* appWhiteListingEnabled */, + ZERO_ADDRESS /* dmzForwader */ ); await governance.updateContracts( superfluid.address, @@ -662,6 +664,7 @@ describe("Superfluid Host Contract", function () { }); }); + // disabled due to contract size limit describe("#5 Context Utilities", () => { it("#5.1 test replacePlaceholderCtx with testCtxFuncX", async () => { const testCtxFunc = async ( @@ -694,6 +697,7 @@ describe("Superfluid Host Contract", function () { ); } + // disabled code because contract size limit hit // more complicated ABI await testCtxFunc( "ctxFunc2", @@ -701,8 +705,8 @@ describe("Superfluid Host Contract", function () { governance.address, t.contracts.ida.address, ethers.utils.hexZeroPad("0x2020", 32), - "0x" /* agreementData */, - "0x" /* cbdata */, + "0x", // agreementData + "0x", // cbdata ], "0x" + "dead".repeat(20) ); @@ -712,8 +716,8 @@ describe("Superfluid Host Contract", function () { governance.address, t.contracts.ida.address, ethers.utils.hexZeroPad("0x2020", 32), - "0xdead" /* agreementData */, - "0xbeef" /* cbdata */, + "0xdead", // agreementData + "0xbeef", // cbdata ], "0x" + "faec".repeat(20) ); @@ -2697,7 +2701,8 @@ describe("Superfluid Host Contract", function () { await ethers.getContractFactory("SuperfluidMock"); const mock1 = await mock1Factory.deploy( false /* nonUpgradable */, - false /* appWhiteListingEnabled */ + false /* appWhiteListingEnabled */, + ZERO_ADDRESS /* dmzForwader */ ); await expectCustomError( governance.updateContracts( diff --git a/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.BatchCall.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.BatchCall.t.sol index 3c1a17fa71..6571cf6814 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.BatchCall.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.BatchCall.t.sol @@ -5,17 +5,99 @@ import { stdError } from "forge-std/Test.sol"; import { BatchOperation, ISuperfluid, Superfluid } from "../../../contracts/superfluid/Superfluid.sol"; import { SuperToken } from "../../../contracts/superfluid/SuperToken.sol"; -import { IConstantFlowAgreementV1 } from "../../../contracts/interfaces/agreements/IConstantFlowAgreementV1.sol"; -import { ISuperfluidToken } from "../../../contracts/interfaces/superfluid/ISuperfluidToken.sol"; +import { IGeneralDistributionAgreementV1, ISuperfluidPool, PoolConfig } from "../../../contracts/interfaces/agreements/gdav1/IGeneralDistributionAgreementV1.sol"; +import { IConstantFlowAgreementV1, ISuperToken, ISuperfluidToken } from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; import { SuperAppMock } from "../../../contracts/mocks/SuperAppMocks.sol"; +import { DMZForwarder } from "../../../contracts/utils/DMZForwarder.sol"; +import { Ownable } from '@openzeppelin/contracts/access/Ownable.sol'; +import { BaseRelayRecipient } from "../../../contracts/libs/BaseRelayRecipient.sol"; + +// A mock for an arbitrary external contract +contract TestContract { + error SomeError(); + error IncorrectPayment(); + + bool public stateChanged; + + function permissionlessFn() public returns (bool) { + stateChanged = true; + return true; + } + + // accept native coins + receive() external payable {} + + function pay(uint256 expectedAmount) external payable { + if (msg.value != expectedAmount) revert IncorrectPayment(); + } + + function doRevert() external pure { + revert SomeError(); + } +} + +// A mock for an external contract that uses ERC-2771 +contract TestContract2771 is TestContract, Ownable, BaseRelayRecipient { + error NotOwner(); + + // Expects the msgSender to be encoded in calldata as specified by ERC-2771. + // Will revert if relayed for anybody but the contract owner. + function privilegedFn() public returns (bool) { + if (_getTransactionSigner() != owner()) revert NotOwner(); + stateChanged = true; + return true; + } + + // this can be used to check correct association of the payment + function privilegedPay(uint256 expectedAmount) external payable { + if (_getTransactionSigner() != owner()) revert NotOwner(); + if (msg.value != expectedAmount) revert IncorrectPayment(); + } + + /// @dev BaseRelayRecipient.isTrustedForwarder implementation + function isTrustedForwarder(address /*forwarder*/) public view virtual override returns(bool) { + // we don't enforce any restrictions for this test + return true; + } + + /// @dev IRelayRecipient.versionRecipient implementation + function versionRecipient() external override pure returns (string memory) { + return "v1"; + } +} + +// Same as TestContract2771, but only trusts the host's DMZForwarder +contract TestContract2771Checked is TestContract2771 { + Superfluid internal _host; + + constructor(Superfluid host) { + _host = host; + } + + /// @dev BaseRelayRecipient.isTrustedForwarder implementation + function isTrustedForwarder(address forwarder) public view override returns(bool) { + // TODO: shall we add this to ISuperfluid and recommend as general pattern? + return forwarder == address(_host.DMZ_FORWARDER()); + } +} + contract SuperfluidBatchCallTest is FoundrySuperfluidTester { using SuperTokenV1Library for SuperToken; + address someTrustedForwarder = address(0x1a1c); + constructor() FoundrySuperfluidTester(3) { } + function setUp() public override { + super.setUp(); + vm.startPrank(address(sf.governance.owner())); + sf.governance.enableTrustedForwarder(sf.host, ISuperToken(address(0)), someTrustedForwarder); + vm.stopPrank(); + } + function testRevertIfOperationIncreaseAllowanceIsNotCalledByHost(address notHost) public { vm.assume(notHost != address(sf.host)); @@ -208,4 +290,342 @@ contract SuperfluidBatchCallTest is FoundrySuperfluidTester { vm.expectRevert("CallUtils: target revert()"); sf.host.batchCall{value: 42}(ops); } + + function testRevertIfOperationUpgradeToIsNotCalledByHost(address notHost) public { + vm.assume(notHost != address(sf.host)); + + vm.expectRevert(ISuperfluidToken.SF_TOKEN_ONLY_HOST.selector); + vm.prank(notHost); + superToken.operationUpgradeTo(alice, bob, 100); + } + + function testUpgradeTo(uint256 amount) public { + vm.assume(amount < type(uint64).max); + + vm.prank(alice); + token.approve(address(superToken), amount); + + uint256 bobBalanceBefore = superToken.balanceOf(bob); + vm.prank(address(sf.host)); + superToken.operationUpgradeTo(alice, bob, amount); + uint256 bobBalanceAfter = superToken.balanceOf(bob); + assertEq(bobBalanceAfter, bobBalanceBefore + amount, "Bob has unexpected final balance"); + } + + function testUpgradeToBatchCall(uint256 amount) public { + vm.assume(amount < type(uint64).max); + + vm.prank(alice); + token.approve(address(superToken), amount); + + ISuperfluid.Operation[] memory ops = new ISuperfluid.Operation[](1); + uint256 bobBalanceBefore = superToken.balanceOf(bob); + ops[0] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_SUPERTOKEN_UPGRADE_TO, + target: address(superToken), + data: abi.encode(bob, amount) + }); + vm.prank(alice); + sf.host.batchCall(ops); + uint256 bobBalanceAfter = superToken.balanceOf(bob); + assertEq(bobBalanceAfter, bobBalanceBefore + amount, "Bob has unexpected final balance"); + } + + function testRevertIfOperationDowngradeToIsNotCalledByHost(address notHost) public { + vm.assume(notHost != address(sf.host)); + + vm.expectRevert(ISuperfluidToken.SF_TOKEN_ONLY_HOST.selector); + vm.prank(notHost); + superToken.operationDowngradeTo(alice, bob, 100); + } + + function testDowngradeTo(uint256 amount) public { + vm.assume(amount < type(uint64).max); + + uint256 bobBalanceBefore = token.balanceOf(bob); + vm.prank(address(sf.host)); + superToken.operationDowngradeTo(alice, bob, amount); + uint256 bobBalanceAfter = token.balanceOf(bob); + assertEq(bobBalanceAfter, bobBalanceBefore + amount, "Bob has unexpected final balance"); + } + + function testDowngradeToBatchCall(uint256 amount) public { + vm.assume(amount < type(uint64).max); + + ISuperfluid.Operation[] memory ops = new ISuperfluid.Operation[](1); + uint256 bobBalanceBefore = token.balanceOf(bob); + ops[0] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_SUPERTOKEN_DOWNGRADE_TO, + target: address(superToken), + data: abi.encode(bob, amount) + }); + vm.prank(alice); + sf.host.batchCall(ops); + uint256 bobBalanceAfter = token.balanceOf(bob); + assertEq(bobBalanceAfter, bobBalanceBefore + amount, "Bob has unexpected final balance"); + } + + function testCallAgreementConnectPoolBatchCall() public { + PoolConfig memory config = PoolConfig({ transferabilityForUnitsOwner: true, distributionFromAnyAddress: false }); + ISuperfluidPool pool = _helperCreatePool(superToken, alice, alice, false, config); + + ISuperfluid.Operation[] memory ops = new ISuperfluid.Operation[](1); + bytes memory connectPoolCallData = + abi.encodeCall(IGeneralDistributionAgreementV1.connectPool, (pool, new bytes(0))); + ops[0] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_SUPERFLUID_CALL_AGREEMENT, + target: address(sf.gda), + data: abi.encode(connectPoolCallData, new bytes(0)) + }); + + vm.prank(alice); + sf.host.batchCall(ops); + + assertTrue(sf.gda.isMemberConnected(pool, alice), "Alice: Pool is not connected"); + } + + function testSimpleForwardCall() public { + DMZForwarder forwarder = new DMZForwarder(); + TestContract testContract = new TestContract(); + + (bool success, bytes memory returnValue) = forwarder.forwardCall( + address(testContract), + abi.encodeCall(testContract.permissionlessFn, ()) + ); + // decoded return value + bool retVal = abi.decode(returnValue, (bool)); + assertTrue(success, "DMZForwarder: call failed"); + assertEq(retVal, true, "DMZForwarder: unexpected return value"); + } + + function testSimpleForwardCallBatchCall() public { + TestContract testContract = new TestContract(); + + ISuperfluid.Operation[] memory ops = new ISuperfluid.Operation[](1); + ops[0] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_SIMPLE_FORWARD_CALL, + target: address(testContract), + data: abi.encodeCall(testContract.permissionlessFn, ()) + }); + sf.host.batchCall(ops); + assertEq(testContract.stateChanged(), true, "TestContract: unexpected state"); + } + + function testSimpleForwardCallBatchCallRevert() public { + TestContract testContract = new TestContract(); + + ISuperfluid.Operation[] memory ops = new ISuperfluid.Operation[](1); + ops[0] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_SIMPLE_FORWARD_CALL, + target: address(testContract), + data: abi.encodeCall(testContract.doRevert, ()) + }); + + vm.expectRevert(TestContract.SomeError.selector); + sf.host.batchCall(ops); + } + + function test2771ForwardCall() public { + DMZForwarder forwarder = new DMZForwarder(); + + TestContract2771 testContract = new TestContract2771(); + // alice has privileged access to the testContract + testContract.transferOwnership(alice); + + // we relay a call for alice + (bool success, bytes memory returnValue) = forwarder.forward2771Call( + address(testContract), + alice, + abi.encodeCall(testContract.privilegedFn, ()) + ); + // decoded return value + bool retVal = abi.decode(returnValue, (bool)); + assertTrue(success, "DMZForwarder: call failed"); + assertEq(testContract.stateChanged(), true, "TestContract: unexpected state"); + assertEq(retVal, true, "DMZForwarder: unexpected return value"); + + // if relaying for bob, it should fail + (success,) = forwarder.forward2771Call( + address(testContract), + bob, + abi.encodeCall(testContract.privilegedFn, ()) + ); + assertFalse(success, "DMZForwarder: call should have failed"); + + // only the owner of the forwarder shall be allowed to relay + vm.startPrank(eve); + vm.expectRevert("Ownable: caller is not the owner"); + forwarder.forward2771Call( + address(testContract), + alice, + abi.encodeCall(testContract.privilegedFn, ()) + ); + vm.stopPrank(); + } + + function test2771ForwardCallBatchCall() public { + TestContract2771Checked testContract = new TestContract2771Checked(sf.host); + testContract.transferOwnership(alice); + + ISuperfluid.Operation[] memory ops = new ISuperfluid.Operation[](1); + ops[0] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_ERC2771_FORWARD_CALL, + target: address(testContract), + data: abi.encodeCall(testContract.privilegedFn, ()) + }); + + // should fail if called by bob (not the owner of testContract) + vm.startPrank(bob); + vm.expectRevert(TestContract2771.NotOwner.selector); + sf.host.batchCall(ops); + vm.stopPrank(); + + // should succeed if called by alice + vm.startPrank(alice); + sf.host.batchCall(ops); + assertEq(testContract.stateChanged(), true, "TestContract: unexpected state"); + vm.stopPrank(); + } + + function testSimpleForwardCallBatchCallWithValue() public { + TestContract testContract = new TestContract(); + + uint256 amount = 42; + ISuperfluid.Operation[] memory ops = new ISuperfluid.Operation[](2); + ops[0] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_SIMPLE_FORWARD_CALL, + target: address(testContract), + data: abi.encodeCall(testContract.pay, (amount)) + }); + ops[1] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_SIMPLE_FORWARD_CALL, + target: address(testContract), + data: abi.encodeCall(testContract.permissionlessFn, ()) + }); + + // This shall work because we first forward native tokens to the contract, + // then call the non-payable function + sf.host.batchCall{value: amount}(ops); + assertEq(address(testContract).balance, amount, "TestContract: unexpected balance"); + } + + function testSimpleForwardCallBatchCallWithValueUsingReceiveFn() public { + TestContract testContract = new TestContract(); + + uint256 amount = 42; + ISuperfluid.Operation[] memory ops = new ISuperfluid.Operation[](2); + ops[0] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_SIMPLE_FORWARD_CALL, + target: address(testContract), + data: "" + }); + ops[1] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_SIMPLE_FORWARD_CALL, + target: address(testContract), + data: abi.encodeCall(testContract.permissionlessFn, ()) + }); + + // the first operation shall forward the value, the second shall not (and thus succeed) + sf.host.batchCall{value: amount}(ops); + assertEq(address(testContract).balance, amount, "TestContract: unexpected balance"); + } + + function testSimpleForwardCallBatchCallWithValueUnsupportedOpsOrder() public { + TestContract testContract = new TestContract(); + + uint256 amount = 42; + ISuperfluid.Operation[] memory ops = new ISuperfluid.Operation[](2); + ops[0] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_SIMPLE_FORWARD_CALL, + target: address(testContract), + data: abi.encodeCall(testContract.permissionlessFn, ()) + }); + ops[1] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_SIMPLE_FORWARD_CALL, + target: address(testContract), + data: abi.encodeCall(testContract.pay, (amount)) + }); + + // This fails because the native tokens are forwarded to the first operation, + // which calls a non-payable function and thus reverts + vm.expectRevert(); + sf.host.batchCall{value: amount}(ops); + } + + function test2771ForwardCallBatchCallWithValue() public { + TestContract2771Checked testContract = new TestContract2771Checked(sf.host); + testContract.transferOwnership(alice); + + uint256 amount = 42; + ISuperfluid.Operation[] memory ops = new ISuperfluid.Operation[](2); + ops[0] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_ERC2771_FORWARD_CALL, + target: address(testContract), + data: abi.encodeCall(testContract.privilegedPay, (amount)) + }); + ops[1] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_ERC2771_FORWARD_CALL, + target: address(testContract), + data: abi.encodeCall(testContract.permissionlessFn, ()) + }); + + vm.deal(alice, 1 ether); + vm.startPrank(alice); + sf.host.batchCall{value: amount}(ops); + assertEq(address(testContract).balance, amount, "TestContract: unexpected test contract balance"); + vm.stopPrank(); + } + + function testRefundFromBatchCall() public { + uint256 amount = 42; + address sender = alice; + + vm.deal(sender, 1 ether); + uint256 senderBalanceBefore = sender.balance; + vm.startPrank(sender); + sf.host.batchCall{value: amount}(new ISuperfluid.Operation[](0)); + vm.stopPrank(); + // no operation "consumed" the native tokens: we expect full refund + assertEq(sender.balance, senderBalanceBefore, "batchCall sender: unexpected balance"); + assertEq(address(sf.host).balance, 0, "batchCall host: native tokens left"); + } + + function testRefundFromForwardBatchCall() public { + uint256 amount = 42; + + vm.deal(someTrustedForwarder, 1 ether); + vm.startPrank(someTrustedForwarder); + bytes memory data = abi.encodeCall(sf.host.forwardBatchCall, (new ISuperfluid.Operation[](0))); + // bob is 2771-encoded as msgSender + (bool success, ) = address(sf.host).call{value: amount}(abi.encodePacked(data, bob)); + vm.stopPrank(); + // no operation "consumed" the native tokens: we expect full refund to bob + assertTrue(success, "forwardBatchCall: call failed"); + assertEq(bob.balance, amount, "batchCall msgSender: unexpected balance"); + assertEq(address(sf.host).balance, 0, "batchCall host: native tokens left"); + } + + function testWithdrawLostNativeTokensFromDMZForwarder() public { + uint256 amount = 42; + + DMZForwarder forwarder = new DMZForwarder(); + + // failing call which causes `amount` to get stuck in the forwarder contract + (bool success, ) = forwarder.forwardCall{value: amount}( + address(sf.host), new bytes(0x1)); + + assertFalse(success, "DMZForwarder: call should have failed"); + assertEq(address(forwarder).balance, amount, "DMZForwarder: unexpected balance"); + + // eve isn't allowed to withdraw + vm.startPrank(eve); + vm.expectRevert("Ownable: caller is not the owner"); + forwarder.withdrawLostNativeTokens(payable(bob)); + vm.stopPrank(); + + // but we can withdraw + forwarder.withdrawLostNativeTokens(payable(bob)); + assertEq(address(forwarder).balance, 0, "DMZForwarder: balance still not 0"); + assertEq(bob.balance, amount, "DMZForwarder: where did the money go?"); + } } diff --git a/packages/ethereum-contracts/test/ops-scripts/deployment.test.js b/packages/ethereum-contracts/test/ops-scripts/deployment.test.js index f718d5a168..9bbb62b166 100644 --- a/packages/ethereum-contracts/test/ops-scripts/deployment.test.js +++ b/packages/ethereum-contracts/test/ops-scripts/deployment.test.js @@ -124,7 +124,8 @@ contract("Embedded deployment scripts", (accounts) => { // with constructor param const a1 = await web3tx(Superfluid.new, "Superfluid.new 1")( true, // nonUpgradable - false // appWhiteListingEnabled + false, // appWhiteListingEnabled + ZERO_ADDRESS // dmzForwader ); assert.isFalse(await codeChanged(web3, Superfluid, a1.address)); } diff --git a/packages/hot-fuzz/hot-fuzz b/packages/hot-fuzz/hot-fuzz index 922e2a33d6..2aafee1a4d 100755 --- a/packages/hot-fuzz/hot-fuzz +++ b/packages/hot-fuzz/hot-fuzz @@ -43,7 +43,7 @@ cryticArgs: [ "--compile-force-framework=${CRYTIC_COMPILE_FRAMEWORK}", "--foundry-out-directory=${FOUNDRY_ROOT}/${FOUNDRY_OUT:-out}", # "--export-dir=${PROJECT_DIR}/crytic-export", TODO unfortunately this doesn't work - "--compile-libraries=(CFAv1ForwarderDeployerLibrary,0xf01),(GDAv1ForwarderDeployerLibrary,0xf02),(IDAv1ForwarderDeployerLibrary,0xf03),(ProxyDeployerLibrary,0xf04),(SlotsBitmapLibrary,0xf05),(SuperfluidCFAv1DeployerLibrary,0xf06),(SuperfluidFlowNFTLogicDeployerLibrary,0xf07),(SuperfluidGDAv1DeployerLibrary,0xf08),(SuperfluidGovDeployerLibrary,0xf09),(SuperfluidHostDeployerLibrary,0xf0a),(SuperfluidIDAv1DeployerLibrary,0xf0b),(SuperfluidPeripheryDeployerLibrary,0xf0c),(SuperfluidPoolDeployerLibrary,0xf0d),(SuperfluidPoolLogicDeployerLibrary,0xf0e),(SuperfluidPoolNFTLogicDeployerLibrary,0xf0f),(SuperTokenDeployerLibrary,0xf10),(SuperTokenFactoryDeployerLibrary,0xf11),(TokenDeployerLibrary,0xf12)" + "--compile-libraries=(CFAv1ForwarderDeployerLibrary,0xf01),(GDAv1ForwarderDeployerLibrary,0xf02),(IDAv1ForwarderDeployerLibrary,0xf03),(ProxyDeployerLibrary,0xf04),(SlotsBitmapLibrary,0xf05),(SuperfluidCFAv1DeployerLibrary,0xf06),(SuperfluidFlowNFTLogicDeployerLibrary,0xf07),(SuperfluidGDAv1DeployerLibrary,0xf08),(SuperfluidGovDeployerLibrary,0xf09),(SuperfluidHostDeployerLibrary,0xf0a),(SuperfluidIDAv1DeployerLibrary,0xf0b),(SuperfluidPeripheryDeployerLibrary,0xf0c),(SuperfluidPoolDeployerLibrary,0xf0d),(SuperfluidPoolLogicDeployerLibrary,0xf0e),(SuperfluidPoolNFTLogicDeployerLibrary,0xf0f),(SuperTokenDeployerLibrary,0xf10),(SuperTokenFactoryDeployerLibrary,0xf11),(TokenDeployerLibrary,0xf12),(SuperfluidDMZForwarderDeployerLibrary,0xf13)" ] deployContracts: [ ["0xf01", "CFAv1ForwarderDeployerLibrary"], @@ -64,6 +64,7 @@ deployContracts: [ ["0xf10", "SuperTokenDeployerLibrary"], ["0xf11", "SuperTokenFactoryDeployerLibrary"], ["0xf12", "TokenDeployerLibrary"], +["0xf13", "SuperfluidDMZForwarderDeployerLibrary"], ] deployBytecodes: [ ["0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24", "608060405234801561001057600080fd5b506109c5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a5576000357c010000000000000000000000000000000000000000000000000000000090048063a41e7d5111610078578063a41e7d51146101d4578063aabbb8ca1461020a578063b705676514610236578063f712f3e814610280576100a5565b806329965a1d146100aa5780633d584063146100e25780635df8122f1461012457806365ba36c114610152575b600080fd5b6100e0600480360360608110156100c057600080fd5b50600160a060020a038135811691602081013591604090910135166102b6565b005b610108600480360360208110156100f857600080fd5b5035600160a060020a0316610570565b60408051600160a060020a039092168252519081900360200190f35b6100e06004803603604081101561013a57600080fd5b50600160a060020a03813581169160200135166105bc565b6101c26004803603602081101561016857600080fd5b81019060208101813564010000000081111561018357600080fd5b82018360208201111561019557600080fd5b803590602001918460018302840111640100000000831117156101b757600080fd5b5090925090506106b3565b60408051918252519081900360200190f35b6100e0600480360360408110156101ea57600080fd5b508035600160a060020a03169060200135600160e060020a0319166106ee565b6101086004803603604081101561022057600080fd5b50600160a060020a038135169060200135610778565b61026c6004803603604081101561024c57600080fd5b508035600160a060020a03169060200135600160e060020a0319166107ef565b604080519115158252519081900360200190f35b61026c6004803603604081101561029657600080fd5b508035600160a060020a03169060200135600160e060020a0319166108aa565b6000600160a060020a038416156102cd57836102cf565b335b9050336102db82610570565b600160a060020a031614610339576040805160e560020a62461bcd02815260206004820152600f60248201527f4e6f7420746865206d616e616765720000000000000000000000000000000000604482015290519081900360640190fd5b6103428361092a565b15610397576040805160e560020a62461bcd02815260206004820152601a60248201527f4d757374206e6f7420626520616e204552433136352068617368000000000000604482015290519081900360640190fd5b600160a060020a038216158015906103b85750600160a060020a0382163314155b156104ff5760405160200180807f455243313832305f4143434550545f4d4147494300000000000000000000000081525060140190506040516020818303038152906040528051906020012082600160a060020a031663249cb3fa85846040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182600160a060020a0316600160a060020a031681526020019250505060206040518083038186803b15801561047e57600080fd5b505afa158015610492573d6000803e3d6000fd5b505050506040513d60208110156104a857600080fd5b5051146104ff576040805160e560020a62461bcd02815260206004820181905260248201527f446f6573206e6f7420696d706c656d656e742074686520696e74657266616365604482015290519081900360640190fd5b600160a060020a03818116600081815260208181526040808320888452909152808220805473ffffffffffffffffffffffffffffffffffffffff19169487169485179055518692917f93baa6efbd2244243bfee6ce4cfdd1d04fc4c0e9a786abd3a41313bd352db15391a450505050565b600160a060020a03818116600090815260016020526040812054909116151561059a5750806105b7565b50600160a060020a03808216600090815260016020526040902054165b919050565b336105c683610570565b600160a060020a031614610624576040805160e560020a62461bcd02815260206004820152600f60248201527f4e6f7420746865206d616e616765720000000000000000000000000000000000604482015290519081900360640190fd5b81600160a060020a031681600160a060020a0316146106435780610646565b60005b600160a060020a03838116600081815260016020526040808220805473ffffffffffffffffffffffffffffffffffffffff19169585169590951790945592519184169290917f605c2dbf762e5f7d60a546d42e7205dcb1b011ebc62a61736a57c9089d3a43509190a35050565b600082826040516020018083838082843780830192505050925050506040516020818303038152906040528051906020012090505b92915050565b6106f882826107ef565b610703576000610705565b815b600160a060020a03928316600081815260208181526040808320600160e060020a031996909616808452958252808320805473ffffffffffffffffffffffffffffffffffffffff19169590971694909417909555908152600284528181209281529190925220805460ff19166001179055565b600080600160a060020a038416156107905783610792565b335b905061079d8361092a565b156107c357826107ad82826108aa565b6107b85760006107ba565b815b925050506106e8565b600160a060020a0390811660009081526020818152604080832086845290915290205416905092915050565b6000808061081d857f01ffc9a70000000000000000000000000000000000000000000000000000000061094c565b909250905081158061082d575080155b1561083d576000925050506106e8565b61084f85600160e060020a031961094c565b909250905081158061086057508015155b15610870576000925050506106e8565b61087a858561094c565b909250905060018214801561088f5750806001145b1561089f576001925050506106e8565b506000949350505050565b600160a060020a0382166000908152600260209081526040808320600160e060020a03198516845290915281205460ff1615156108f2576108eb83836107ef565b90506106e8565b50600160a060020a03808316600081815260208181526040808320600160e060020a0319871684529091529020549091161492915050565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff161590565b6040517f01ffc9a7000000000000000000000000000000000000000000000000000000008082526004820183905260009182919060208160248189617530fa90519096909550935050505056fea165627a7a72305820377f4a2d4301ede9949f163f319021a6e9c687c292a5e2b2c4734c126b524e6c0029"], From 4f3345a426c1d5f60d1277a3f8e7185b5169bbd0 Mon Sep 17 00:00:00 2001 From: Kaspar Kallas Date: Tue, 2 Jul 2024 16:06:49 +0300 Subject: [PATCH 15/42] [metadata] feat: update vesting scheduler v2 addresses (#1978) * feat: update vesting scheduler v2 addresses * re-deploy op sepolia contract with speed-up timeframes --- packages/metadata/main/networks/list.cjs | 3 ++- packages/metadata/module/networks/list.js | 3 ++- packages/metadata/networks.json | 3 ++- packages/metadata/package.json | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/metadata/main/networks/list.cjs b/packages/metadata/main/networks/list.cjs index 336c23b748..660750ca0b 100644 --- a/packages/metadata/main/networks/list.cjs +++ b/packages/metadata/main/networks/list.cjs @@ -110,7 +110,7 @@ module.exports = "constantInflowNFT": "0x87E00Dced5670e01BEe33a9a724B1dac790937eF", "flowScheduler": "0x73B1Ce21d03ad389C2A291B1d1dc4DAFE7B5Dc68", "vestingScheduler": "0x27444c0235a4D921F3106475faeba0B5e7ABDD7a", - "vestingSchedulerV2": "0xBeB02560Fd1608716ca27704E5191D6937EC244B", + "vestingSchedulerV2": "0x3aa62b96f44D0f8892BeBBC819DE8e02E9DE69A8", "autowrap": { "manager": "0xe567b32C10B0dB72d9490eB1B9A409C5ADed192C", "wrapStrategy": "0xf232f1fd34CE12e24F4391865c2D6E374D2C34d9" @@ -361,6 +361,7 @@ module.exports = "batchLiquidator": "0x36Df169DBf5CE3c6f58D46f0addeF58F01381232", "flowScheduler": "0x55c8fc400833eEa791087cF343Ff2409A39DeBcC", "vestingScheduler": "0x65377d4dfE9c01639A41952B5083D58964782892", + "vestingSchedulerV2": "0xe567b32C10B0dB72d9490eB1B9A409C5ADed192C", "autowrap": { "manager": "0x1fA76f2Cd0C3fe6c399A80111408d9C42C0CAC23", "wrapStrategy": "0x0Cf060a501c0040e9CCC708eFE94079F501c6Bb4" diff --git a/packages/metadata/module/networks/list.js b/packages/metadata/module/networks/list.js index 93886cb601..203b64c1b6 100644 --- a/packages/metadata/module/networks/list.js +++ b/packages/metadata/module/networks/list.js @@ -110,7 +110,7 @@ export default "constantInflowNFT": "0x87E00Dced5670e01BEe33a9a724B1dac790937eF", "flowScheduler": "0x73B1Ce21d03ad389C2A291B1d1dc4DAFE7B5Dc68", "vestingScheduler": "0x27444c0235a4D921F3106475faeba0B5e7ABDD7a", - "vestingSchedulerV2": "0xBeB02560Fd1608716ca27704E5191D6937EC244B", + "vestingSchedulerV2": "0x3aa62b96f44D0f8892BeBBC819DE8e02E9DE69A8", "autowrap": { "manager": "0xe567b32C10B0dB72d9490eB1B9A409C5ADed192C", "wrapStrategy": "0xf232f1fd34CE12e24F4391865c2D6E374D2C34d9" @@ -361,6 +361,7 @@ export default "batchLiquidator": "0x36Df169DBf5CE3c6f58D46f0addeF58F01381232", "flowScheduler": "0x55c8fc400833eEa791087cF343Ff2409A39DeBcC", "vestingScheduler": "0x65377d4dfE9c01639A41952B5083D58964782892", + "vestingSchedulerV2": "0xe567b32C10B0dB72d9490eB1B9A409C5ADed192C", "autowrap": { "manager": "0x1fA76f2Cd0C3fe6c399A80111408d9C42C0CAC23", "wrapStrategy": "0x0Cf060a501c0040e9CCC708eFE94079F501c6Bb4" diff --git a/packages/metadata/networks.json b/packages/metadata/networks.json index 9ddc44f238..4afe442ba2 100644 --- a/packages/metadata/networks.json +++ b/packages/metadata/networks.json @@ -108,7 +108,7 @@ "constantInflowNFT": "0x87E00Dced5670e01BEe33a9a724B1dac790937eF", "flowScheduler": "0x73B1Ce21d03ad389C2A291B1d1dc4DAFE7B5Dc68", "vestingScheduler": "0x27444c0235a4D921F3106475faeba0B5e7ABDD7a", - "vestingSchedulerV2": "0xBeB02560Fd1608716ca27704E5191D6937EC244B", + "vestingSchedulerV2": "0x3aa62b96f44D0f8892BeBBC819DE8e02E9DE69A8", "autowrap": { "manager": "0xe567b32C10B0dB72d9490eB1B9A409C5ADed192C", "wrapStrategy": "0xf232f1fd34CE12e24F4391865c2D6E374D2C34d9" @@ -359,6 +359,7 @@ "batchLiquidator": "0x36Df169DBf5CE3c6f58D46f0addeF58F01381232", "flowScheduler": "0x55c8fc400833eEa791087cF343Ff2409A39DeBcC", "vestingScheduler": "0x65377d4dfE9c01639A41952B5083D58964782892", + "vestingSchedulerV2": "0xe567b32C10B0dB72d9490eB1B9A409C5ADed192C", "autowrap": { "manager": "0x1fA76f2Cd0C3fe6c399A80111408d9C42C0CAC23", "wrapStrategy": "0x0Cf060a501c0040e9CCC708eFE94079F501c6Bb4" diff --git a/packages/metadata/package.json b/packages/metadata/package.json index af265c9d34..d3de958985 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -1,6 +1,6 @@ { "name": "@superfluid-finance/metadata", - "version": "1.3.0", + "version": "1.3.1", "description": "Superfluid Metadata", "main": "main/index.cjs", "module": "module/index.js", From 668d4758351f2d5b25446adc1ed0d785ceedae7e Mon Sep 17 00:00:00 2001 From: Miao ZhiCheng Date: Wed, 3 Jul 2024 02:13:59 +0800 Subject: [PATCH 16/42] Update forge-std to v1.9.1 (#1980) * update forge-std to v1.8.2 * [ETHEREUM-CONTRACTS] fix compiler warnings * [ETHEREUM-CONTRACTS] update changelog * update forge-std to v1.9.1 --- lib/forge-std | 2 +- packages/ethereum-contracts/CHANGELOG.md | 1 + .../test/foundry/FoundrySuperfluidTester.sol | 28 ++++++++++--------- .../foundry/SuperfluidFrameworkDeployer.t.sol | 10 +++---- .../ConstantFlowAgreementV1.ACL.t.sol | 2 +- .../ConstantFlowAgreementV1.prop.t.sol | 12 ++++---- .../gdav1/GeneralDistributionAgreement.t.sol | 2 +- .../GeneralDistributionAgreementV1.prop.t.sol | 10 +++---- .../test/foundry/apps/CFASuperAppBase.t.sol | 2 +- .../apps/SuperAppTester/SuperAppTest.t.sol | 4 +-- .../foundry/libs/AgreementLibrary.prop.t.sol | 2 +- .../test/foundry/libs/CallUtils.t.sol | 4 +-- .../superfluid/ConstantInflowNFT.t.sol | 4 +-- .../superfluid/ConstantOutflowNFT.t.sol | 4 +-- .../test/foundry/superfluid/ERC721.t.sol | 8 +++--- .../foundry/superfluid/FlowNFTBase.prop.t.sol | 4 +-- .../test/foundry/superfluid/FlowNFTBase.t.sol | 18 ++++++------ .../foundry/superfluid/PoolAdminNFT.t.sol | 4 +-- .../foundry/superfluid/PoolMemberNFT.t.sol | 4 +-- .../test/foundry/superfluid/PoolNFTBase.t.sol | 16 +++++------ .../test/foundry/superfluid/SuperToken.t.sol | 2 +- .../superfluid/SuperfluidPool.prop.t.sol | 14 ++++++---- .../test/foundry/utils/BatchLiquidator.t.sol | 6 ++-- .../test/foundry/utils/IDAv1Forwarder.t.sol | 2 +- .../test/foundry/utils/TOGA.t.sol | 12 ++++---- 25 files changed, 91 insertions(+), 86 deletions(-) diff --git a/lib/forge-std b/lib/forge-std index f73c73d201..07263d193d 160000 --- a/lib/forge-std +++ b/lib/forge-std @@ -1 +1 @@ -Subproject commit f73c73d2018eb6a111f35e4dae7b4f27401e9421 +Subproject commit 07263d193d621c4b2b0ce8b4d54af58f6957d97d diff --git a/packages/ethereum-contracts/CHANGELOG.md b/packages/ethereum-contracts/CHANGELOG.md index 14538d950f..3865b17a62 100644 --- a/packages/ethereum-contracts/CHANGELOG.md +++ b/packages/ethereum-contracts/CHANGELOG.md @@ -8,6 +8,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Breaking - ISuperfuidPool self-transfer is not allowed +- FoundrySuperfluidTester is test with forge-std@v1.8.2, which may break with older forge-std lib ### Added diff --git a/packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol b/packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol index fdfc60332a..b626f85a62 100644 --- a/packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol +++ b/packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol @@ -371,19 +371,19 @@ contract FoundrySuperfluidTester is Test { _assertInvariantAumGtEqSuperTokenTotalSupply(); } - function _assertInvariantLiquiditySum() internal { + function _assertInvariantLiquiditySum() internal view { assertTrue(_definitionLiquiditySumInvariant(), "Invariant: Liquidity Sum Invariant"); } - function _assertInvariantNetFlowRateSum() internal { + function _assertInvariantNetFlowRateSum() internal view { assertTrue(_definitionNetFlowRateSumInvariant(), "Invariant: Net Flow Rate Sum Invariant"); } - function _assertInvariantAumGtEqRtbSum() internal { + function _assertInvariantAumGtEqRtbSum() internal view { assertTrue(_definitionAumGtEqRtbSumInvariant(), "Invariant: AUM > RTB Sum"); } - function _assertInvariantAumGtEqSuperTokenTotalSupply() internal { + function _assertInvariantAumGtEqSuperTokenTotalSupply() internal view { assertTrue(_defintionAumGtEqSuperTokenTotalSupplyInvariant(), "Invariant: AUM > SuperToken Total Supply"); } @@ -1069,7 +1069,7 @@ contract FoundrySuperfluidTester is Test { _assertGlobalInvariants(); } - function _helperAssertCreateIndex(ISuperToken superToken_, address publisher, uint32 indexId) internal { + function _helperAssertCreateIndex(ISuperToken superToken_, address publisher, uint32 indexId) internal view { _assertIndexData(superToken_, publisher, indexId, true, 0, 0, 0); } @@ -2120,7 +2120,7 @@ contract FoundrySuperfluidTester is Test { int96 expectedFlowRate, uint256 expectedLastUpdated, uint256 expectedOwedDeposit - ) internal { + ) internal view { (uint256 lastUpdated, int96 flowRate, uint256 deposit, uint256 owedDeposit) = superToken_.getFlowInfo(sender, receiver); @@ -2133,7 +2133,7 @@ contract FoundrySuperfluidTester is Test { } /// @dev Asserts that a single flow has been removed on deletion - function _assertFlowDataIsEmpty(ISuperToken superToken_, address sender, address receiver) internal { + function _assertFlowDataIsEmpty(ISuperToken superToken_, address sender, address receiver) internal view { _assertFlowData(superToken_, sender, receiver, 0, 0, 0); } @@ -2143,7 +2143,7 @@ contract FoundrySuperfluidTester is Test { address flowOperator, int96 expectedFlowRateAllowance, uint8 expectedPermissionsBitmask - ) internal { + ) internal view { (bool canCreate, bool canUpdate, bool canDelete, int96 allowance) = superToken_.getFlowPermissions(sender, flowOperator); @@ -2157,7 +2157,9 @@ contract FoundrySuperfluidTester is Test { assertEq(allowance, expectedFlowRateAllowance, "FlowOperatorData: flow rate allowance"); } - function _assertFlowOperatorDataIsEmpty(ISuperToken superToken_, address sender, address flowOperator) internal { + function _assertFlowOperatorDataIsEmpty(ISuperToken superToken_, address sender, address flowOperator) + internal view + { _assertFlowOperatorData(superToken_, sender, flowOperator, 0, 0); } @@ -2171,7 +2173,7 @@ contract FoundrySuperfluidTester is Test { int96 flowRateDelta, ConstantFlowAgreementV1.FlowData memory flowInfoBefore, bool isSender - ) internal { + ) internal view { (uint256 lastUpdated, int96 netFlowRate, uint256 deposit, uint256 owedDeposit) = sf.cfa.getAccountFlowInfo(superToken, account); int96 expectedNetFlowRate = flowInfoBefore.flowRate + (isSender ? -flowRateDelta : flowRateDelta); @@ -2206,7 +2208,7 @@ contract FoundrySuperfluidTester is Test { uint128 expectedIndexValue, uint128 expectedTotalUnitsApproved, uint128 expectedTotalUnitsPending - ) internal { + ) internal view { (bool exist, uint128 indexValue, uint128 totalUnitsApproved, uint128 totalUnitsPending) = superToken_.getIndex(publisher, indexId); @@ -2228,7 +2230,7 @@ contract FoundrySuperfluidTester is Test { bool expectedApproved, uint128 expectedUnits, uint256 expectedPending - ) internal { + ) internal view { (,, bool approved, uint128 units, uint256 pending) = superToken_.getSubscriptionByID(subscriptionId); assertEq(approved, expectedApproved, "SubscriptionData: approved"); assertEq(units, expectedUnits, "SubscriptionData: units"); @@ -2266,7 +2268,7 @@ contract FoundrySuperfluidTester is Test { // GeneralDistributionAgreement Assertions function _assertPoolAllowance(ISuperfluidPool _pool, address owner, address spender, uint256 expectedAllowance) - internal + internal view { assertEq(_pool.allowance(owner, spender), expectedAllowance, "_assertPoolAllowance: allowance mismatch"); } diff --git a/packages/ethereum-contracts/test/foundry/SuperfluidFrameworkDeployer.t.sol b/packages/ethereum-contracts/test/foundry/SuperfluidFrameworkDeployer.t.sol index 2a484c602c..fe5ebf060f 100644 --- a/packages/ethereum-contracts/test/foundry/SuperfluidFrameworkDeployer.t.sol +++ b/packages/ethereum-contracts/test/foundry/SuperfluidFrameworkDeployer.t.sol @@ -8,7 +8,7 @@ import { SuperfluidLoader } from "../../contracts/utils/SuperfluidLoader.sol"; contract SuperfluidFrameworkDeployerTest is FoundrySuperfluidTester { constructor() FoundrySuperfluidTester(1) { } - function testAllContractsDeployed() public { + function testAllContractsDeployed() public view { assertTrue(address(sf.governance) != address(0), "SFDeployer: governance not deployed"); assertTrue(address(sf.host) != address(0), "SFDeployer: host not deployed"); assertTrue(address(sf.cfa) != address(0), "SFDeployer: cfa not deployed"); @@ -26,17 +26,17 @@ contract SuperfluidFrameworkDeployerTest is FoundrySuperfluidTester { assertTrue(address(sf.batchLiquidator) != address(0), "SFDeployer: batchLiquidator not deployed"); } - function testResolverGetsGovernance() public { + function testResolverGetsGovernance() public view { assertEq( sf.resolver.get("TestGovernance.test"), address(sf.governance), "SFDeployer: governance not registered" ); } - function testResolverGetsHost() public { + function testResolverGetsHost() public view { assertEq(sf.resolver.get("Superfluid.test"), address(sf.host), "SFDeployer: host not registered"); } - function testResolverGetsLoader() public { + function testResolverGetsLoader() public view { assertEq( sf.resolver.get("SuperfluidLoader-v1"), address(sf.superfluidLoader), @@ -44,7 +44,7 @@ contract SuperfluidFrameworkDeployerTest is FoundrySuperfluidTester { ); } - function testLoaderGetsFramework() public { + function testLoaderGetsFramework() public view { SuperfluidLoader.Framework memory loadedSf = sf.superfluidLoader.loadFramework("test"); assertEq(address(loadedSf.superfluid), address(sf.host), "SFDeployer: host not loaded"); diff --git a/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.ACL.t.sol b/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.ACL.t.sol index 723eae5b19..5f7cc18f68 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.ACL.t.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.ACL.t.sol @@ -297,7 +297,7 @@ contract ConstantFlowAgreementV1ACLTest is FoundrySuperfluidTester { ); } - function _assertFlowOperatorData(AssertFlowOperator memory data) internal { + function _assertFlowOperatorData(AssertFlowOperator memory data) internal view { (uint8 newPermissions, int96 newFlowRateAllowance) = sf.cfa.getFlowOperatorDataByID(data.superToken, data.flowOperatorId); diff --git a/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.prop.t.sol b/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.prop.t.sol index 3839fc5865..50a77dd90d 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.prop.t.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.prop.t.sol @@ -56,7 +56,7 @@ contract ConstantFlowAgreementV1PropertyTest is Test { cfa = new ConstantFlowAgreementV1Mock(); } - function testMaximumFlowRateAllowedForDeposit(uint32 liquidationPeriod, uint96 depositAllowed) public { + function testMaximumFlowRateAllowedForDeposit(uint32 liquidationPeriod, uint96 depositAllowed) public view { depositAllowed = uint96(bound(uint256(depositAllowed), cfa.DEFAULT_MINIMUM_DEPOSIT(), cfa.MAXIMUM_DEPOSIT())); vm.assume(liquidationPeriod > 0); @@ -68,7 +68,7 @@ contract ConstantFlowAgreementV1PropertyTest is Test { assertTrue(uint256(depositAllowed) >= deposit, "CFAv1.prop: depositAllowed < deposit"); } - function testMinimumDeposit(uint64 minimumDeposit, uint32 liquidationPeriod, int96 flowRate) public { + function testMinimumDeposit(uint64 minimumDeposit, uint32 liquidationPeriod, int96 flowRate) public view { minimumDeposit = uint32(bound(uint256(minimumDeposit), cfa.DEFAULT_MINIMUM_DEPOSIT(), type(uint64).max)); vm.assume(liquidationPeriod > 0); vm.assume(flowRate > 0); @@ -87,7 +87,7 @@ contract ConstantFlowAgreementV1PropertyTest is Test { * This test was added because we deleted the extra clipping in the _changeFlowToApp function * export FOUNDRY_FUZZ_RUNS=10000 && forge test --match testMinimumDepositClippingSumInvariant */ - function testMinimumDepositClippingSumInvariant(uint256 depositA, uint256 depositB) public { + function testMinimumDepositClippingSumInvariant(uint256 depositA, uint256 depositB) public view { vm.assume(type(uint256).max - depositA < depositB); vm.assume(type(uint256).max - depositB < depositA); uint256 clippedDepositA = cfa.clipDepositNumberRoundingUp(depositA); @@ -104,14 +104,14 @@ contract ConstantFlowAgreementV1PropertyTest is Test { * @dev This test was added to provide additional assurances that applying the minimum deposit clipping * multiple times on a value doesn't change it. */ - function testReapplyMinimumDepositClippingInvariant(uint256 deposit) public { + function testReapplyMinimumDepositClippingInvariant(uint256 deposit) public view { uint256 initialClipped = cfa.clipDepositNumberRoundingUp(deposit); uint256 reclipped = cfa.clipDepositNumberRoundingUp(initialClipped); assertTrue(initialClipped == reclipped, "CFAv1.prop: clipped sum != sum"); } function testFlowDataEncoding(uint32 timestamp, int96 flowRate, uint64 depositClipped, uint64 owedDepositClipped) - public + public view { ConstantFlowAgreementV1.FlowData memory a = ConstantFlowAgreementV1.FlowData({ timestamp: uint256(timestamp), @@ -129,7 +129,7 @@ contract ConstantFlowAgreementV1PropertyTest is Test { assertEq(a.owedDeposit, b.owedDeposit, "CFAv1Prop: owedDeposit !="); } - function testFlowOperatorDataEncoding(uint8 permissions, int96 flowRateAllowance) public { + function testFlowOperatorDataEncoding(uint8 permissions, int96 flowRateAllowance) public view { vm.assume(flowRateAllowance >= 0); ConstantFlowAgreementV1.FlowOperatorData memory a = ConstantFlowAgreementV1.FlowOperatorData({ permissions: permissions, flowRateAllowance: flowRateAllowance }); diff --git a/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol b/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol index 9c3a48a0a5..6a91b1e0b4 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol @@ -93,7 +93,7 @@ contract GeneralDistributionAgreementV1IntegrationTest is FoundrySuperfluidTeste ); } - function testPositiveBalanceIsPatricianPeriodNow(address account) public { + function testPositiveBalanceIsPatricianPeriodNow(address account) public view { (bool isPatricianPeriod,) = sf.gda.isPatricianPeriodNow(superToken, account); assertEq(isPatricianPeriod, true); } diff --git a/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreementV1.prop.t.sol b/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreementV1.prop.t.sol index a1901cbba0..d3d750f4cb 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreementV1.prop.t.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreementV1.prop.t.sol @@ -277,7 +277,7 @@ contract GeneralDistributionAgreementV1Properties is GeneralDistributionAgreemen int256 settledValue, uint96 totalBuffer, bool isPool_ - ) public { + ) public pure { BasicParticle memory particle = BasicParticle({ _flow_rate: FlowRate.wrap(flowRate), _settled_at: Time.wrap(settledAt), @@ -299,7 +299,7 @@ contract GeneralDistributionAgreementV1Properties is GeneralDistributionAgreemen int256 settledValue, uint96 totalBuffer, bool isPool_ - ) public { + ) public pure { UniversalIndexData memory data = UniversalIndexData({ flowRate: flowRate, settledAt: settledAt, @@ -318,14 +318,14 @@ contract GeneralDistributionAgreementV1Properties is GeneralDistributionAgreemen assertEq(isPool_, decoded.isPool, "isPool not equal"); } - function testGetBasicParticleFromUIndex(UniversalIndexData memory data) public { + function testGetBasicParticleFromUIndex(UniversalIndexData memory data) public pure { BasicParticle memory particle = _getBasicParticleFromUIndex(data); assertEq(data.flowRate, int96(FlowRate.unwrap(particle._flow_rate)), "flowRate not equal"); assertEq(data.settledAt, Time.unwrap(particle._settled_at), "settledAt not equal"); assertEq(data.settledValue, Value.unwrap(particle._settled_value), "settledValue not equal"); } - function testEncodeDecodeFlowDistributionData(int96 flowRate, uint96 buffer) public { + function testEncodeDecodeFlowDistributionData(int96 flowRate, uint96 buffer) public view { vm.assume(flowRate >= 0); vm.assume(buffer >= 0); FlowDistributionData memory original = @@ -338,7 +338,7 @@ contract GeneralDistributionAgreementV1Properties is GeneralDistributionAgreemen assertEq(original.lastUpdated, decoded.lastUpdated, "lastUpdated not equal"); } - function testEncodeDecodePoolMemberData(address pool, uint32 poolID) public { + function testEncodeDecodePoolMemberData(address pool, uint32 poolID) public pure { vm.assume(pool != address(0)); PoolMemberData memory original = PoolMemberData({ pool: pool, poolID: poolID }); bytes32[] memory encoded = _encodePoolMemberData(original); diff --git a/packages/ethereum-contracts/test/foundry/apps/CFASuperAppBase.t.sol b/packages/ethereum-contracts/test/foundry/apps/CFASuperAppBase.t.sol index 7a51ed27a5..6c3c621dcc 100644 --- a/packages/ethereum-contracts/test/foundry/apps/CFASuperAppBase.t.sol +++ b/packages/ethereum-contracts/test/foundry/apps/CFASuperAppBase.t.sol @@ -90,7 +90,7 @@ contract CFASuperAppBaseTest is FoundrySuperfluidTester { assertTrue(isSuperApp, "SuperAppBase: is superApp incorrect"); } - function testAllowAllSuperTokensByDefault() public { + function testAllowAllSuperTokensByDefault() public view { assertTrue( superApp.isAcceptedSuperToken(superToken), "SuperAppBase: unrestricted | primary SuperToken accepted" ); diff --git a/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/SuperAppTest.t.sol b/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/SuperAppTest.t.sol index 2076a8e217..93d253799c 100644 --- a/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/SuperAppTest.t.sol +++ b/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/SuperAppTest.t.sol @@ -16,11 +16,11 @@ abstract contract SuperAppInvariants is Test { ISuperApp public superApp; Handler public handler; // Focus test to a set of operations - function invariant_AppNeverJailed() public InitializeTests { + function invariant_AppNeverJailed() external view InitializeTests { assertTrue(!host.isAppJailed(superApp)); } - function invariant_AppRegistered() external InitializeTests { + function invariant_AppRegistered() external view InitializeTests { assertTrue(host.isApp(superApp)); } diff --git a/packages/ethereum-contracts/test/foundry/libs/AgreementLibrary.prop.t.sol b/packages/ethereum-contracts/test/foundry/libs/AgreementLibrary.prop.t.sol index 73c378476a..697a9b6497 100644 --- a/packages/ethereum-contracts/test/foundry/libs/AgreementLibrary.prop.t.sol +++ b/packages/ethereum-contracts/test/foundry/libs/AgreementLibrary.prop.t.sol @@ -6,7 +6,7 @@ import { AgreementLibrary } from "../../../contracts/agreements/AgreementLibrary import "forge-std/Test.sol"; contract AgreementLibraryPropertyTest is Test { - function testAdjustNewAppCreditUsed(uint256 appCreditGranted, int256 appCreditUsed) public { + function testAdjustNewAppCreditUsed(uint256 appCreditGranted, int256 appCreditUsed) public pure { vm.assume(appCreditGranted <= uint256(type(int256).max)); vm.assume(appCreditUsed <= type(int256).max); int256 adjustedAppCreditUsed = AgreementLibrary._adjustNewAppCreditUsed(appCreditGranted, appCreditUsed); diff --git a/packages/ethereum-contracts/test/foundry/libs/CallUtils.t.sol b/packages/ethereum-contracts/test/foundry/libs/CallUtils.t.sol index 0dde68c35f..fd8187fe35 100644 --- a/packages/ethereum-contracts/test/foundry/libs/CallUtils.t.sol +++ b/packages/ethereum-contracts/test/foundry/libs/CallUtils.t.sol @@ -6,13 +6,13 @@ import "forge-std/Test.sol"; import { CallUtils } from "../../../contracts/libs/CallUtils.sol"; contract CallUtilsAnvil is Test { - function testPadLength32(uint256 len) public { + function testPadLength32(uint256 len) public pure { // rounding up the maximum value will overflow the function, so we skip these values vm.assume(len <= type(uint256).max - 32); assertTrue(CallUtils.padLength32(len) % 32 == 0); } - function testIsValidAbiEncodedBytes(bytes memory data) public { + function testIsValidAbiEncodedBytes(bytes memory data) public pure { assertTrue(CallUtils.isValidAbiEncodedBytes(abi.encode(data))); } diff --git a/packages/ethereum-contracts/test/foundry/superfluid/ConstantInflowNFT.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/ConstantInflowNFT.t.sol index 4fafacc33e..c883a5acd8 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/ConstantInflowNFT.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/ConstantInflowNFT.t.sol @@ -40,14 +40,14 @@ contract ConstantInflowNFTTest is FlowNFTBaseTest { Passing Tests //////////////////////////////////////////////////////////////////////////*/ - function testProxiableUUIDIsExpectedValue() public { + function testProxiableUUIDIsExpectedValue() public view { assertEq( constantInflowNFT.proxiableUUID(), keccak256("org.superfluid-finance.contracts.ConstantInflowNFT.implementation") ); } - function testConstantInflowNFTIsProperlyInitialized() public { + function testConstantInflowNFTIsProperlyInitialized() public view { assertEq(constantInflowNFT.name(), INFLOW_NFT_NAME_TEMPLATE); assertEq(constantInflowNFT.symbol(), INFLOW_NFT_SYMBOL_TEMPLATE); } diff --git a/packages/ethereum-contracts/test/foundry/superfluid/ConstantOutflowNFT.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/ConstantOutflowNFT.t.sol index 1084df2638..5026c047c5 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/ConstantOutflowNFT.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/ConstantOutflowNFT.t.sol @@ -104,14 +104,14 @@ contract ConstantOutflowNFTTest is FlowNFTBaseTest { Passing Tests //////////////////////////////////////////////////////////////////////////*/ - function testProxiableUUIDIsExpectedValue() public { + function testProxiableUUIDIsExpectedValue() public view { assertEq( constantOutflowNFT.proxiableUUID(), keccak256("org.superfluid-finance.contracts.ConstantOutflowNFT.implementation") ); } - function testConstantOutflowNFTIsProperlyInitialized() public { + function testConstantOutflowNFTIsProperlyInitialized() public view { assertEq(constantOutflowNFT.name(), OUTFLOW_NFT_NAME_TEMPLATE); assertEq(constantOutflowNFT.symbol(), OUTFLOW_NFT_SYMBOL_TEMPLATE); } diff --git a/packages/ethereum-contracts/test/foundry/superfluid/ERC721.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/ERC721.t.sol index 87436fb530..86daa2eaaa 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/ERC721.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/ERC721.t.sol @@ -201,8 +201,8 @@ contract ERC721IntegrationTest is FoundrySuperfluidTester { IERC721Metadata _nftContract, uint256 _tokenId, address _expectedOwner, - string memory _message - ) public { + string memory _message) public view + { // we use mockOwnerOf to overcome the CFA_NFT_INVALID_TOKEN_ID error address owner = PoolAdminNFTMock(address(_nftContract)).mockOwnerOf(_tokenId); @@ -210,7 +210,7 @@ contract ERC721IntegrationTest is FoundrySuperfluidTester { } function _assertApprovalIsExpected(IERC721Metadata _nftContract, uint256 _tokenId, address _expectedApproved) - public + public view { address approved = _nftContract.getApproved(_tokenId); @@ -222,7 +222,7 @@ contract ERC721IntegrationTest is FoundrySuperfluidTester { address _expectedOwner, address _expectedOperator, bool _expectedOperatorApproval - ) public { + ) public view { bool operatorApproval = _nftContract.isApprovedForAll(_expectedOwner, _expectedOperator); assertEq(operatorApproval, _expectedOperatorApproval); diff --git a/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.prop.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.prop.t.sol index 1f7ab8f300..b1b2e12488 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.prop.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.prop.t.sol @@ -10,14 +10,14 @@ contract FlowNFTBasePropertyTest is FoundrySuperfluidTester { super.setUp(); } - function testNoTokenIdCollisionDifferentTokenSameSenderReceiver(address tokenA, address tokenB) public { + function testNoTokenIdCollisionDifferentTokenSameSenderReceiver(address tokenA, address tokenB) public view { vm.assume(tokenA != tokenB); uint256 tokenIdA = superToken.CONSTANT_OUTFLOW_NFT().getTokenId(tokenA, alice, bob); uint256 tokenIdB = superToken.CONSTANT_OUTFLOW_NFT().getTokenId(tokenB, alice, bob); assertNotEq(tokenIdA, tokenIdB, "FlowNFTBaseProperties: Token Ids should differ"); } - function testBalanceOfIsAlwaysEqualToOne(address account) public { + function testBalanceOfIsAlwaysEqualToOne(address account) public view { uint256 balance = superToken.CONSTANT_OUTFLOW_NFT().balanceOf(account); assertEq(balance, 1, "FlowNFTBaseProperties: Balance of should always be equal to one"); } diff --git a/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.t.sol index ac3a83e2d0..c118c1072e 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.t.sol @@ -196,29 +196,29 @@ abstract contract FlowNFTBaseTest is ERC721IntegrationTest { /*////////////////////////////////////////////////////////////////////////// Passing Tests //////////////////////////////////////////////////////////////////////////*/ - function testContractSupportsExpectedInterfaces() public { + function testContractSupportsExpectedInterfaces() public view { assertEq(flowNFTBaseMock.supportsInterface(type(IERC165).interfaceId), true); assertEq(flowNFTBaseMock.supportsInterface(type(IERC721).interfaceId), true); assertEq(flowNFTBaseMock.supportsInterface(type(IERC721Metadata).interfaceId), true); } - function testNFTBalanceOfIsAlwaysOne(address _owner) public { + function testNFTBalanceOfIsAlwaysOne(address _owner) public view { assertEq(flowNFTBaseMock.balanceOf(_owner), 1); } - function testHostIsProperlySetInConstructor() public { + function testHostIsProperlySetInConstructor() public view { assertEq(address(flowNFTBaseMock.HOST()), address(sf.host)); } - function testCFAv1IsProperlySetInConstructor() public { + function testCFAv1IsProperlySetInConstructor() public view { assertEq(address(flowNFTBaseMock.CONSTANT_FLOW_AGREEMENT_V1()), address(sf.cfa)); } - function testGDAv1IsProperlySetInConstructor() public { + function testGDAv1IsProperlySetInConstructor() public view { assertEq(address(flowNFTBaseMock.GENERAL_DISTRIBUTION_AGREEMENT_V1()), address(sf.gda)); } - function testNFTMetadataIsProperlyInitialized() public { + function testNFTMetadataIsProperlyInitialized() public view { assertEq(flowNFTBaseMock.name(), NAME); assertEq(flowNFTBaseMock.symbol(), SYMBOL); } @@ -228,7 +228,7 @@ abstract contract FlowNFTBaseTest is ERC721IntegrationTest { flowNFTBaseMock.triggerMetadataUpdate(tokenId); } - function testTokenURI(uint256 tokenId) public { + function testTokenURI(uint256 tokenId) public view { assertEq(flowNFTBaseMock.tokenURI(tokenId), string(abi.encodePacked("tokenId=", tokenId.toString()))); } @@ -261,7 +261,7 @@ abstract contract FlowNFTBaseTest is ERC721IntegrationTest { address _expectedFlowSender, uint32 _expectedFlowStartDate, address _expectedFlowReceiver - ) public { + ) public view { FlowNFTBase.FlowNFTData memory flowData = constantOutflowNFT.flowDataByTokenId(_tokenId); assertEq(flowData.superToken, _expectedSuperToken); @@ -286,7 +286,7 @@ abstract contract FlowNFTBaseTest is ERC721IntegrationTest { ); } - function _assertNFTFlowDataStateIsEmpty(uint256 _tokenId) public { + function _assertNFTFlowDataStateIsEmpty(uint256 _tokenId) public view { _assertNFTFlowDataStateIsExpected(_tokenId, address(0), address(0), 0, address(0)); } diff --git a/packages/ethereum-contracts/test/foundry/superfluid/PoolAdminNFT.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/PoolAdminNFT.t.sol index 6b17949143..a272f17ca0 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/PoolAdminNFT.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/PoolAdminNFT.t.sol @@ -42,13 +42,13 @@ contract PoolAdminNFTIntegrationTest is PoolNFTBaseIntegrationTest { Passing Tests //////////////////////////////////////////////////////////////////////////*/ - function testProxiableUUIDIsExpectedValue() public { + function testProxiableUUIDIsExpectedValue() public view { assertEq( poolAdminNFT.proxiableUUID(), keccak256("org.superfluid-finance.contracts.PoolAdminNFT.implementation") ); } - function testTokenURIForPoolAdminNFT(uint256 tokenId) public { + function testTokenURIForPoolAdminNFT(uint256 tokenId) public view { assertEq(poolAdminNFT.tokenURI(tokenId), string(abi.encodePacked(poolAdminNFT.baseURI()))); } } diff --git a/packages/ethereum-contracts/test/foundry/superfluid/PoolMemberNFT.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/PoolMemberNFT.t.sol index d49ffd06fe..0915899611 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/PoolMemberNFT.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/PoolMemberNFT.t.sol @@ -70,13 +70,13 @@ contract PoolMemberNFTIntegrationTest is PoolNFTBaseIntegrationTest { Passing Tests //////////////////////////////////////////////////////////////////////////*/ - function testProxiableUUIDIsExpectedValue() public { + function testProxiableUUIDIsExpectedValue() public view { assertEq( poolMemberNFT.proxiableUUID(), keccak256("org.superfluid-finance.contracts.PoolMemberNFT.implementation") ); } - function testTokenURIForPoolMemberNFT(uint256 tokenId) public { + function testTokenURIForPoolMemberNFT(uint256 tokenId) public view { assertEq(poolMemberNFT.tokenURI(tokenId), string(abi.encodePacked(poolMemberNFT.baseURI()))); } } diff --git a/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTBase.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTBase.t.sol index eed8a6dde5..3f35801cf1 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTBase.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTBase.t.sol @@ -211,30 +211,30 @@ abstract contract PoolNFTBaseIntegrationTest is ERC721IntegrationTest { Passing Tests //////////////////////////////////////////////////////////////////////////*/ - function testContractSupportsExpectedInterfaces() public { + function testContractSupportsExpectedInterfaces() public view { assertEq(poolNFTBaseMock.supportsInterface(type(IERC165).interfaceId), true); assertEq(poolNFTBaseMock.supportsInterface(type(IERC721).interfaceId), true); assertEq(poolNFTBaseMock.supportsInterface(type(IERC721Metadata).interfaceId), true); } - function testBalanceOfIsAlwaysOne(address owner) public { + function testBalanceOfIsAlwaysOne(address owner) public view { assertEq(poolNFTBaseMock.balanceOf(owner), 1, "PoolNFTBase: balanceOf is not always one"); } - function testHostIsProperlySetInConstructor() public { + function testHostIsProperlySetInConstructor() public view { assertEq(address(poolNFTBaseMock.HOST()), address(sf.host)); } - function testGDAv1IsProperlySetInConstructor() public { + function testGDAv1IsProperlySetInConstructor() public view { assertEq(address(poolNFTBaseMock.GENERAL_DISTRIBUTION_AGREEMENT_V1()), address(sf.gda)); } - function testNFTMetadataIsProperlyInitialized() public { + function testNFTMetadataIsProperlyInitialized() public view { assertEq(poolNFTBaseMock.name(), NAME); assertEq(poolNFTBaseMock.symbol(), SYMBOL); } - function testTokenURI(uint256 tokenId) public { + function testTokenURI(uint256 tokenId) public view { assertEq(poolNFTBaseMock.tokenURI(tokenId), string(abi.encodePacked("tokenId=", tokenId.toString()))); } @@ -296,7 +296,7 @@ abstract contract PoolNFTBaseIntegrationTest is ERC721IntegrationTest { Assertion Helpers //////////////////////////////////////////////////////////////////////////*/ function _assertPoolAdminNftStateIsExpected(uint256 _tokenId, address _expectedPool, address _expectedAdmin) - public + public view { PoolAdminNFT.PoolAdminNFTData memory poolAdminNFTData = poolAdminNFT.poolAdminDataByTokenId(_tokenId); @@ -316,7 +316,7 @@ abstract contract PoolNFTBaseIntegrationTest is ERC721IntegrationTest { address _expectedPool, address _expectedMember, uint128 _expectedUnits - ) public { + ) public view { PoolMemberNFT.PoolMemberNFTData memory poolMemberNFTData = poolMemberNFT.poolMemberDataByTokenId(_tokenId); assertEq(poolMemberNFTData.pool, _expectedPool, "PoolMemberNFT: pool address not as expected"); diff --git a/packages/ethereum-contracts/test/foundry/superfluid/SuperToken.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/SuperToken.t.sol index d0e3150a3b..85013ed052 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/SuperToken.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/SuperToken.t.sol @@ -20,7 +20,7 @@ contract SuperTokenIntegrationTest is FoundrySuperfluidTester { super.setUp(); } - function testUnderlyingTokenDecimals() public { + function testUnderlyingTokenDecimals() public view { assertEq(token.decimals(), superToken.getUnderlyingDecimals()); } diff --git a/packages/ethereum-contracts/test/foundry/superfluid/SuperfluidPool.prop.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/SuperfluidPool.prop.t.sol index 943f4a782a..9518ad24af 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/SuperfluidPool.prop.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/SuperfluidPool.prop.t.sol @@ -18,7 +18,9 @@ import { contract SuperfluidPoolProperties is SuperfluidPool, Test { constructor() SuperfluidPool(GeneralDistributionAgreementV1(address(0))) { } - function _helperAssertWrappedParticle(PoolIndexData memory poolIndexData, BasicParticle memory particle) internal { + function _helperAssertWrappedParticle(PoolIndexData memory poolIndexData, BasicParticle memory particle) + internal pure + { assertEq( FlowRate.unwrap(particle.flow_rate()), int128(poolIndexData.wrappedFlowRate), @@ -36,7 +38,7 @@ contract SuperfluidPoolProperties is SuperfluidPool, Test { ); } - function _helperAssertWrappedParticle(MemberData memory memberData, BasicParticle memory particle) internal { + function _helperAssertWrappedParticle(MemberData memory memberData, BasicParticle memory particle) internal pure { assertEq( FlowRate.unwrap(particle.flow_rate()), int128(memberData.syncedFlowRate), @@ -54,12 +56,12 @@ contract SuperfluidPoolProperties is SuperfluidPool, Test { ); } - function testPoolIndexDataToWrappedParticle(PoolIndexData memory data) public { + function testPoolIndexDataToWrappedParticle(PoolIndexData memory data) public pure { BasicParticle memory wrappedParticle = poolIndexDataToWrappedParticle(data); _helperAssertWrappedParticle(data, wrappedParticle); } - function testPoolIndexDataToPDPoolIndex(PoolIndexData memory data) public { + function testPoolIndexDataToPDPoolIndex(PoolIndexData memory data) public pure { vm.assume(data.totalUnits < uint128(type(int128).max)); PDPoolIndex memory pdPoolIndex = poolIndexDataToPDPoolIndex(data); @@ -74,7 +76,7 @@ contract SuperfluidPoolProperties is SuperfluidPool, Test { uint32 wrappedSettledAt, int96 wrappedFlowRate, int256 wrappedSettledValue - ) public { + ) public pure { vm.assume(totalUnits > 0); PDPoolIndex memory pdPoolIndex = PDPoolIndex( Unit.wrap(totalUnits), @@ -89,7 +91,7 @@ contract SuperfluidPoolProperties is SuperfluidPool, Test { _helperAssertWrappedParticle(poolIndexData, pdPoolIndex._wrapped_particle); } - function testMemberDataToPDPoolMember(MemberData memory data) public { + function testMemberDataToPDPoolMember(MemberData memory data) public pure { vm.assume(data.ownedUnits < uint128(type(int128).max)); PDPoolMember memory pdPoolMember = _memberDataToPDPoolMember(data); diff --git a/packages/ethereum-contracts/test/foundry/utils/BatchLiquidator.t.sol b/packages/ethereum-contracts/test/foundry/utils/BatchLiquidator.t.sol index d40b736f9d..b598bae38f 100644 --- a/packages/ethereum-contracts/test/foundry/utils/BatchLiquidator.t.sol +++ b/packages/ethereum-contracts/test/foundry/utils/BatchLiquidator.t.sol @@ -61,17 +61,17 @@ contract BatchLiquidatorTest is FoundrySuperfluidTester { _helperTransferAll(superToken, sender, admin); } - function _assertNoCFAFlow(address sender, address receiver) internal { + function _assertNoCFAFlow(address sender, address receiver) internal view { (, int96 flowRate,,) = sf.cfa.getFlow(superToken, sender, receiver); assertEq(flowRate, 0, "BatchLiquidator: CFA Flowrate should be 0"); } - function _assertNoGDAFlow(address sender, ISuperfluidPool pool) internal { + function _assertNoGDAFlow(address sender, ISuperfluidPool pool) internal view { int96 flowRate = sf.gda.getFlowRate(superToken, sender, pool); assertEq(flowRate, 0, "BatchLiquidator: GDA Flowrate should be 0"); } - function _assertLiquidatorBalanceGreater(address _liqudidator, uint256 balanceBefore_) internal { + function _assertLiquidatorBalanceGreater(address _liqudidator, uint256 balanceBefore_) internal view { assertGt( superToken.balanceOf(_liqudidator), balanceBefore_, diff --git a/packages/ethereum-contracts/test/foundry/utils/IDAv1Forwarder.t.sol b/packages/ethereum-contracts/test/foundry/utils/IDAv1Forwarder.t.sol index c71c036c55..a97178b7d4 100644 --- a/packages/ethereum-contracts/test/foundry/utils/IDAv1Forwarder.t.sol +++ b/packages/ethereum-contracts/test/foundry/utils/IDAv1Forwarder.t.sol @@ -177,7 +177,7 @@ contract IDAv1ForwarderIntegrationTest is FoundrySuperfluidTester { assertEq(pendingDistribution, 0, "testIDAv1ForwarderGetSubscriptionByID: pending distribution mismatch"); } - function testIDAv1ForwarderEmptyListSubscriptions(address subscriber) external { + function testIDAv1ForwarderEmptyListSubscriptions(address subscriber) external view { vm.assume(subscriber != address(0)); (address[] memory publishers, uint32[] memory indexIds, uint128[] memory unitsList) = sf.idaV1Forwarder.listSubscriptions(superToken, subscriber); diff --git a/packages/ethereum-contracts/test/foundry/utils/TOGA.t.sol b/packages/ethereum-contracts/test/foundry/utils/TOGA.t.sol index 30765652a2..d012e51f14 100644 --- a/packages/ethereum-contracts/test/foundry/utils/TOGA.t.sol +++ b/packages/ethereum-contracts/test/foundry/utils/TOGA.t.sol @@ -49,7 +49,7 @@ contract TOGAIntegrationTest is FoundrySuperfluidTester { * @param account The address of the account to check. * @param expectedNetFlow The expected net flow. */ - function _assertNetFlow(ISuperToken superToken_, address account, int96 expectedNetFlow) internal { + function _assertNetFlow(ISuperToken superToken_, address account, int96 expectedNetFlow) internal view { int96 flowRate = sf.cfa.getNetFlow(superToken_, account); assertEq(flowRate, expectedNetFlow, "_assertNetFlow: net flow not equal"); } @@ -145,7 +145,7 @@ contract TOGAIntegrationTest is FoundrySuperfluidTester { assertEq(exitRate, newExitRate, "_helperChangeExitRate: exit rate not equal"); } - function _boundBondValue(uint256 bond_) internal view returns (uint256 bond) { + function _boundBondValue(uint256 bond_) internal pure returns (uint256 bond) { // User only has 64 bits test super tokens // setting the lower bound > 1 in order to avoid // failures due to the exit stream not having enough min deposit @@ -161,11 +161,11 @@ contract TOGAIntegrationTest is FoundrySuperfluidTester { /** * @dev Tests the contract setup. */ - function testContractSetup() public { + function testContractSetup() public view { assertEq(toga.minBondDuration(), MIN_BOND_DURATION, "minBondDuration"); } - function testNoPICExistsInitially() public { + function testNoPICExistsInitially() public view { assertEq( address(0), toga.getCurrentPIC(superToken), "testNoPICExistsInitially: current PIC should be address(0)" ); @@ -207,7 +207,7 @@ contract TOGAIntegrationTest is FoundrySuperfluidTester { _helperSendPICBid(bob, superToken, bobBond, 0); } - function testTOGARegisteredWithERC1820() public { + function testTOGARegisteredWithERC1820() public view { address implementer1 = _ERC1820_REG.getInterfaceImplementer(address(toga), keccak256("TOGAv1")); address implementer2 = _ERC1820_REG.getInterfaceImplementer(address(toga), keccak256("TOGAv2")); @@ -260,7 +260,7 @@ contract TOGAIntegrationTest is FoundrySuperfluidTester { toga.changeExitRate(superToken, exitRate); } - function testMaxExitRateForGreaterThanOrEqualToDefaultExitRate(uint256 bond) public { + function testMaxExitRateForGreaterThanOrEqualToDefaultExitRate(uint256 bond) public view { bond = _boundBondValue(bond); // the max exit rate needs to be greater or equal than default exit rate From 60dc875e9a5a7488b13a683d7ecd32f1bebd01be Mon Sep 17 00:00:00 2001 From: Miao ZhiCheng Date: Thu, 4 Jul 2024 03:49:53 +0800 Subject: [PATCH 17/42] [ETHEREUM-CONTRACTS] relax solidity pragma ^0.8.23 & update to 0.8.26 (#1981) * [ETHEREUM-CONTRACTS] relax solidity pragma ^0.8.23 * [solidity-semantic-money] relax solidity pragma ^0.8.23 * [solidity-semantic-money] adapt to latet forge-std * ci.canary.yml: upgrade-contracts disabled * to use solc 0.8.26 * [ethereum-contracts] use 0.8.26 * fix forge command * fix build * fix build * sdk-core: fix build * [ethereum-contracts] move mocks for foundry to foundry folder * fix build * fix build --- .../call.test-automation-contracts.yml | 2 - .../call.test-ethereum-contracts.yml | 2 - .../call.test-solidity-semantic-money.yml | 2 - .github/workflows/ci.canary.yml | 5 +- flake.lock | 27 +++++-- flake.nix | 2 +- packages/ethereum-contracts/CHANGELOG.md | 9 ++- .../contracts/agreements/AgreementBase.sol | 2 +- .../contracts/agreements/AgreementLibrary.sol | 2 +- .../agreements/ConstantFlowAgreementV1.sol | 2 +- .../InstantDistributionAgreementV1.sol | 2 +- .../gdav1/GeneralDistributionAgreementV1.sol | 2 +- .../agreements/gdav1/PoolAdminNFT.sol | 2 +- .../agreements/gdav1/PoolMemberNFT.sol | 2 +- .../agreements/gdav1/PoolNFTBase.sol | 2 +- .../agreements/gdav1/SuperfluidPool.sol | 2 +- .../gdav1/SuperfluidPoolDeployerLibrary.sol | 2 +- .../gdav1/SuperfluidPoolPlaceholder.sol | 2 +- .../gov/SuperfluidGovernanceBase.sol | 2 +- .../contracts/gov/SuperfluidGovernanceII.sol | 2 +- .../contracts/libs/BaseRelayRecipient.sol | 2 +- .../contracts/libs/CallUtils.sol | 2 +- .../libs/ERC1820RegistryCompiled.sol | 2 +- .../contracts/libs/ERC777Helper.sol | 2 +- .../contracts/libs/FixedSizeData.sol | 2 +- .../contracts/libs/SafeGasLibrary.sol | 2 +- .../contracts/libs/SlotsBitmapLibrary.sol | 2 +- .../contracts/libs/SolvencyHelperLibrary.sol | 2 +- ...{AgreementMock.sol => AgreementMock.t.sol} | 2 +- .../{CFAAppMocks.sol => CFAAppMocks.t.sol} | 2 +- ...FALibraryMock.sol => CFALibraryMock.t.sol} | 2 +- ...{CallUtilsMock.sol => CallUtilsMock.t.sol} | 2 +- ...lUtilsTester.sol => CallUtilsTester.t.sol} | 2 +- .../contracts/mocks/CrossStreamSuperApp.sol | 47 ----------- ...kenMock.sol => CustomSuperTokenMock.t.sol} | 2 +- ...ck.sol => ERC777SenderRecipientMock.t.sol} | 2 +- ...fluidMock.sol => FakeSuperfluidMock.t.sol} | 2 +- ...{ForwarderMock.sol => ForwarderMock.t.sol} | 2 +- ...rAppTester.sol => IDASuperAppTester.t.sol} | 2 +- ...LibraryMock.sol => IDAv1LibraryMock.t.sol} | 2 +- ...kSmartWallet.sol => MockSmartWallet.t.sol} | 2 +- ...TesterApp.sol => MultiFlowTesterApp.t.sol} | 2 +- ...mRedirector.sol => StreamRedirector.t.sol} | 2 +- ...{SuperAppMocks.sol => SuperAppMocks.t.sol} | 4 +- ...ryMock.sol => SuperTokenFactoryMock.t.sol} | 2 +- ...Mock.sol => SuperTokenLibraryV1Mock.t.sol} | 2 +- ...uperTokenMock.sol => SuperTokenMock.t.sol} | 7 +- ...ock.sol => SuperfluidDestructorMock.t.sol} | 2 +- ...k.sol => SuperfluidGovernanceIIMock.t.sol} | 2 +- ...uperfluidMock.sol => SuperfluidMock.t.sol} | 2 +- ...xiableMock.sol => UUPSProxiableMock.t.sol} | 2 +- .../superfluid/ConstantInflowNFT.sol | 2 +- .../superfluid/ConstantOutflowNFT.sol | 2 +- .../contracts/superfluid/FlowNFTBase.sol | 2 +- .../FullUpgradableSuperTokenProxy.sol | 2 +- .../contracts/superfluid/SuperToken.sol | 2 +- .../superfluid/SuperTokenFactory.sol | 2 +- .../contracts/superfluid/Superfluid.sol | 2 +- .../contracts/superfluid/SuperfluidToken.sol | 2 +- .../contracts/tokens/PureSuperToken.sol | 2 +- .../contracts/tokens/SETH.sol | 2 +- .../upgradability/BeaconProxiable.sol | 2 +- .../SuperfluidUpgradeableBeacon.sol | 2 +- .../contracts/upgradability/UUPSProxiable.sol | 2 +- .../contracts/upgradability/UUPSProxy.sol | 2 +- .../contracts/upgradability/UUPSUtils.sol | 2 +- .../contracts/utils/BatchLiquidator.sol | 2 +- .../contracts/utils/CFAv1Forwarder.sol | 2 +- .../contracts/utils/DMZForwarder.sol | 2 +- .../contracts/utils/ForwarderBase.sol | 2 +- .../contracts/utils/GDAv1Forwarder.sol | 2 +- .../contracts/utils/IDAv1Forwarder.sol | 2 +- .../contracts/utils/MacroForwarder.sol | 2 +- .../contracts/utils/SuperUpgrader.sol | 2 +- .../contracts/utils/TOGA.sol | 2 +- packages/ethereum-contracts/foundry.toml | 3 +- packages/ethereum-contracts/hardhat.config.ts | 2 +- packages/ethereum-contracts/package.json | 2 +- .../contracts/agreements/AgreementHelper.ts | 2 +- .../foundry/StorageLayoutTestBase.t.sol} | 6 +- .../foundry/SuperfluidFrameworkDeployer.t.sol | 2 +- .../ConstantFlowAgreementV1.ACL.t.sol | 2 +- .../ConstantFlowAgreementV1.prop.t.sol | 2 +- .../agreements/ConstantFlowAgreementV1.t.sol | 2 +- .../InstantDistributionAgreementV1.t.sol | 2 +- .../gdav1/GeneralDistributionAgreement.t.sol | 4 +- .../GeneralDistributionAgreementV1.prop.t.sol | 2 +- .../SuperfluidPoolUpgradabilityMock.t.sol} | 12 +-- .../test/foundry/apps/CFASuperAppBase.t.sol | 9 ++- .../foundry/apps/CFASuperAppBaseTester.t.sol} | 8 +- .../foundry/apps/CrossStreamSuperApp.t.sol | 45 ++++++++++- .../apps/SuperAppTester/FlowSplitter.sol | 2 +- .../apps/SuperAppTester/SuperAppTest.t.sol | 2 +- .../apps/SuperAppTester/handlers/Handler.sol | 2 +- .../handlers/IStreamHandler.sol | 2 +- .../foundry/echidna/EchidnaTestCases.t.sol | 4 +- .../foundry/gov/SuperfluidGovernanceII.t.sol | 5 +- .../foundry/libs/AgreementLibrary.prop.t.sol | 2 +- .../test/foundry/libs/CallUtils.t.sol | 2 +- .../libs/SlotsBitmapLibrary.prop.t.sol | 2 +- .../foundry/superfluid/CFAv1NFTMock.t.sol} | 11 +-- .../CFAv1NFTUpgradabilityMock.t.sol} | 18 ++--- .../superfluid/ConstantInflowNFT.t.sol | 2 +- .../superfluid/ConstantOutflowNFT.t.sol | 78 +++++++++++-------- .../test/foundry/superfluid/ERC721.t.sol | 8 +- .../foundry/superfluid/FlowNFTBase.prop.t.sol | 2 +- .../test/foundry/superfluid/FlowNFTBase.t.sol | 12 +-- .../foundry/superfluid/PoolAdminNFT.t.sol | 2 +- .../foundry/superfluid/PoolMemberNFT.t.sol | 2 +- .../test/foundry/superfluid/PoolNFTBase.t.sol | 8 +- .../foundry/superfluid/PoolNFTMock.t.sol} | 13 ++-- .../PoolNFTUpgradabilityMock.t.sol} | 20 ++--- .../test/foundry/superfluid/SuperToken.t.sol | 2 +- .../superfluid/SuperTokenFactory.t.sol | 2 +- .../superfluid/Superfluid.BatchCall.t.sol | 4 +- .../test/foundry/superfluid/Superfluid.t.sol | 4 +- .../superfluid/SuperfluidPool.prop.t.sol | 2 +- .../SuperfluidUpgradeableBeacon.t.sol | 2 +- .../test/foundry/utils/BatchLiquidator.t.sol | 2 +- .../test/foundry/utils/IDAv1Forwarder.t.sol | 2 +- .../test/foundry/utils/MacroForwarder.t.sol | 2 +- .../test/foundry/utils/TOGA.t.sol | 2 +- packages/ethereum-contracts/truffle-config.js | 2 +- .../contracts/NoGetUnderlyingToken.sol | 2 +- .../sdk-core/contracts/SuperAppTester.sol | 2 +- packages/solidity-semantic-money/foundry.toml | 3 +- .../src/examples/Aqueduct.sol | 2 +- .../src/ref-impl/ToySuperToken.sol | 2 +- .../src/ref-impl/ToySuperfluidPool.sol | 2 +- .../src/ref-impl/ToySuperfluidToken.sol | 2 +- .../test/SemanticMoney.t.sol | 72 ++++++++--------- .../test/examples/Aqueduct.t.sol | 4 +- .../test/ref-impl/CertoraHarness.sol | 2 +- .../test/ref-impl/ToySuperToken.t.sol | 10 +-- 134 files changed, 353 insertions(+), 317 deletions(-) rename packages/ethereum-contracts/contracts/mocks/{AgreementMock.sol => AgreementMock.t.sol} (99%) rename packages/ethereum-contracts/contracts/mocks/{CFAAppMocks.sol => CFAAppMocks.t.sol} (99%) rename packages/ethereum-contracts/contracts/mocks/{CFALibraryMock.sol => CFALibraryMock.t.sol} (99%) rename packages/ethereum-contracts/contracts/mocks/{CallUtilsMock.sol => CallUtilsMock.t.sol} (98%) rename packages/ethereum-contracts/contracts/mocks/{CallUtilsTester.sol => CallUtilsTester.t.sol} (95%) delete mode 100644 packages/ethereum-contracts/contracts/mocks/CrossStreamSuperApp.sol rename packages/ethereum-contracts/contracts/mocks/{CustomSuperTokenMock.sol => CustomSuperTokenMock.t.sol} (99%) rename packages/ethereum-contracts/contracts/mocks/{ERC777SenderRecipientMock.sol => ERC777SenderRecipientMock.t.sol} (99%) rename packages/ethereum-contracts/contracts/mocks/{FakeSuperfluidMock.sol => FakeSuperfluidMock.t.sol} (95%) rename packages/ethereum-contracts/contracts/mocks/{ForwarderMock.sol => ForwarderMock.t.sol} (97%) rename packages/ethereum-contracts/contracts/mocks/{IDASuperAppTester.sol => IDASuperAppTester.t.sol} (99%) rename packages/ethereum-contracts/contracts/mocks/{IDAv1LibraryMock.sol => IDAv1LibraryMock.t.sol} (99%) rename packages/ethereum-contracts/contracts/mocks/{MockSmartWallet.sol => MockSmartWallet.t.sol} (94%) rename packages/ethereum-contracts/contracts/mocks/{MultiFlowTesterApp.sol => MultiFlowTesterApp.t.sol} (99%) rename packages/ethereum-contracts/contracts/mocks/{StreamRedirector.sol => StreamRedirector.t.sol} (99%) rename packages/ethereum-contracts/contracts/mocks/{SuperAppMocks.sol => SuperAppMocks.t.sol} (99%) rename packages/ethereum-contracts/contracts/mocks/{SuperTokenFactoryMock.sol => SuperTokenFactoryMock.t.sol} (99%) rename packages/ethereum-contracts/contracts/mocks/{SuperTokenLibraryV1Mock.sol => SuperTokenLibraryV1Mock.t.sol} (99%) rename packages/ethereum-contracts/contracts/mocks/{SuperTokenMock.sol => SuperTokenMock.t.sol} (99%) rename packages/ethereum-contracts/contracts/mocks/{SuperfluidDestructorMock.sol => SuperfluidDestructorMock.t.sol} (91%) rename packages/ethereum-contracts/contracts/mocks/{SuperfluidGovernanceIIMock.sol => SuperfluidGovernanceIIMock.t.sol} (96%) rename packages/ethereum-contracts/contracts/mocks/{SuperfluidMock.sol => SuperfluidMock.t.sol} (99%) rename packages/ethereum-contracts/contracts/mocks/{UUPSProxiableMock.sol => UUPSProxiableMock.t.sol} (96%) rename packages/ethereum-contracts/{contracts/mocks/IStorageLayoutBase.sol => test/foundry/StorageLayoutTestBase.t.sol} (55%) rename packages/ethereum-contracts/{contracts/mocks/SuperfluidPoolUpgradabilityMock.sol => test/foundry/agreements/gdav1/SuperfluidPoolUpgradabilityMock.t.sol} (85%) rename packages/ethereum-contracts/{contracts/mocks/CFASuperAppBaseTester.sol => test/foundry/apps/CFASuperAppBaseTester.t.sol} (89%) rename packages/ethereum-contracts/{contracts/mocks/CFAv1NFTMock.sol => test/foundry/superfluid/CFAv1NFTMock.t.sol} (92%) rename packages/ethereum-contracts/{contracts/mocks/CFAv1NFTUpgradabilityMock.sol => test/foundry/superfluid/CFAv1NFTUpgradabilityMock.t.sol} (92%) rename packages/ethereum-contracts/{contracts/mocks/PoolNFTMock.sol => test/foundry/superfluid/PoolNFTMock.t.sol} (88%) rename packages/ethereum-contracts/{contracts/mocks/PoolNFTUpgradabilityMock.sol => test/foundry/superfluid/PoolNFTUpgradabilityMock.t.sol} (88%) diff --git a/.github/workflows/call.test-automation-contracts.yml b/.github/workflows/call.test-automation-contracts.yml index beac3f49cd..b8cf75784b 100644 --- a/.github/workflows/call.test-automation-contracts.yml +++ b/.github/workflows/call.test-automation-contracts.yml @@ -33,11 +33,9 @@ jobs: - name: Test automation-contracts-scheduler run: | echo "FOUNDRY_PROFILE=ci" >> $GITHUB_ENV - echo "FOUNDRY_SOLC_VERSION=$SOLC" >> $GITHUB_ENV yarn workspace scheduler test - name: Test automation-contracts-autowrap run: | echo "FOUNDRY_PROFILE=ci" >> $GITHUB_ENV - echo "FOUNDRY_SOLC_VERSION=$SOLC" >> $GITHUB_ENV yarn workspace autowrap test diff --git a/.github/workflows/call.test-ethereum-contracts.yml b/.github/workflows/call.test-ethereum-contracts.yml index cb67fb35c0..0ab64beb6e 100644 --- a/.github/workflows/call.test-ethereum-contracts.yml +++ b/.github/workflows/call.test-ethereum-contracts.yml @@ -77,7 +77,6 @@ jobs: if: inputs.run-coverage-tests == false run: | echo "FOUNDRY_PROFILE=ci" >> $GITHUB_ENV - echo "FOUNDRY_SOLC_VERSION=$SOLC" >> $GITHUB_ENV yarn test cat testing-benchmark.json working-directory: ./packages/ethereum-contracts @@ -92,7 +91,6 @@ jobs: if: inputs.run-coverage-tests == true run: | echo "FOUNDRY_PROFILE=ci" >> $GITHUB_ENV - echo "FOUNDRY_SOLC_VERSION=$SOLC" >> $GITHUB_ENV yarn test-coverage working-directory: ./packages/ethereum-contracts # NOTE: currently coverage report is not working properly in parallel mode. diff --git a/.github/workflows/call.test-solidity-semantic-money.yml b/.github/workflows/call.test-solidity-semantic-money.yml index 6b48ed99ae..ac629f98f7 100644 --- a/.github/workflows/call.test-solidity-semantic-money.yml +++ b/.github/workflows/call.test-solidity-semantic-money.yml @@ -31,8 +31,6 @@ jobs: - name: Build & Test run: | cd packages/solidity-semantic-money - # use native compiler provided through the nix devShell - echo "FOUNDRY_SOLC_VERSION=$SOLC" >> $GITHUB_ENV make build-src test-all env: FOUNDRY_FUZZ_RUNS: 4200 # yea, baby diff --git a/.github/workflows/ci.canary.yml b/.github/workflows/ci.canary.yml index 79d64a17b1..89f27780e3 100644 --- a/.github/workflows/ci.canary.yml +++ b/.github/workflows/ci.canary.yml @@ -64,13 +64,12 @@ jobs: run: | yarn install --frozen-lockfile yarn lint - echo "FOUNDRY_PROFILE=ci" >> $GITHUB_ENV - echo "FOUNDRY_SOLC_VERSION=$SOLC" >> $GITHUB_ENV yarn build yarn test env: POLYGON_MAINNET_PROVIDER_URL: ${{ secrets.POLYGON_MAINNET_PROVIDER_URL }} SUBGRAPH_RELEASE_TAG: dev + FOUNDRY_PROFILE: ci test-hot-fuzz: uses: ./.github/workflows/call.test-hot-fuzz.yml @@ -276,6 +275,8 @@ jobs: upgrade-contracts: name: Upgrade ethereum-contracts on canary testnet (protocol release version "canary") + if: false # disable this for now + needs: [all-packages-tested] runs-on: ubuntu-latest diff --git a/flake.lock b/flake.lock index 83f4a97425..ebd320ecd2 100644 --- a/flake.lock +++ b/flake.lock @@ -28,11 +28,11 @@ ] }, "locked": { - "lastModified": 1717405880, - "narHash": "sha256-qcXXOnRSl0sGKm7JknntBU4su8/342YKZvjklHsIl+Q=", + "lastModified": 1719997877, + "narHash": "sha256-/Edw+w0PiGgxwnCeJycM0VgH4HtlCi91v1d8xbi+REE=", "owner": "shazow", "repo": "foundry.nix", - "rev": "708c0df1e36b5185a727a3c517a5100e46392792", + "rev": "02febba4f1cf0606d790acdb24adcf7a64afb4e1", "type": "github" }, "original": { @@ -73,14 +73,15 @@ ], "nixpkgs": [ "nixpkgs" - ] + ], + "solc-macos-amd64-list-json": "solc-macos-amd64-list-json" }, "locked": { - "lastModified": 1706563406, - "narHash": "sha256-XoMphCwfqx00wx/2nALvMPEAmD32A8lwSmwI5MNopyA=", + "lastModified": 1717442267, + "narHash": "sha256-6TnQvA6Q/xC3r1M+wGC5gnDc/5XfOPjC8X6LlGDWDNc=", "owner": "hellwolf", "repo": "solc.nix", - "rev": "c863de2fa3721fc4201484c084a49e996ce21e19", + "rev": "2ac2862f224aa0d67cbc6b3246392489f8a50596", "type": "github" }, "original": { @@ -89,6 +90,18 @@ "type": "github" } }, + "solc-macos-amd64-list-json": { + "flake": false, + "locked": { + "narHash": "sha256-Prwz95BgMHcWd72VwVbcH17LsV9f24K2QMcUiWUQZzI=", + "type": "file", + "url": "https://github.com/ethereum/solc-bin/raw/f743ca7/macosx-amd64/list.json" + }, + "original": { + "type": "file", + "url": "https://github.com/ethereum/solc-bin/raw/f743ca7/macosx-amd64/list.json" + } + }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index f552a7eb89..ce3fe67b2c 100644 --- a/flake.nix +++ b/flake.nix @@ -20,7 +20,7 @@ flake-utils.lib.eachDefaultSystem (system: let minDevSolcVer = "solc_0_8_11"; # minimum solidity version used for external development - solcVer = "solc_0_8_23"; + solcVer = "solc_0_8_26"; ghcVer92 = "ghc928"; ghcVer94 = "ghc948"; diff --git a/packages/ethereum-contracts/CHANGELOG.md b/packages/ethereum-contracts/CHANGELOG.md index 3865b17a62..5cefe71267 100644 --- a/packages/ethereum-contracts/CHANGELOG.md +++ b/packages/ethereum-contracts/CHANGELOG.md @@ -8,7 +8,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Breaking - ISuperfuidPool self-transfer is not allowed -- FoundrySuperfluidTester is test with forge-std@v1.8.2, which may break with older forge-std lib +- FoundrySuperfluidTester is test with forge-std@v1.9.1, which may break with 1.7.x and prio forge-std lib ### Added @@ -22,10 +22,17 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Changed +- relax pragram solidity with "^0.8.23" +- bump solc to 0.8.26 - fix a few types and build warnings - rename '.prop.sol' to '.prop.t.sol' +- mark mock-contract files with 't.sol' to be skipped by foundry build automatically - upgrade flake lock input: foundry +## Fixes + +- make testTokenURIIsExpected work with non via-ir pipeline + ## [v1.9.1] - 2024-03-19 ### Breaking diff --git a/packages/ethereum-contracts/contracts/agreements/AgreementBase.sol b/packages/ethereum-contracts/contracts/agreements/AgreementBase.sol index cce4e2e418..aae9e32c0d 100644 --- a/packages/ethereum-contracts/contracts/agreements/AgreementBase.sol +++ b/packages/ethereum-contracts/contracts/agreements/AgreementBase.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { UUPSProxiable } from "../upgradability/UUPSProxiable.sol"; import { ISuperAgreement } from "../interfaces/superfluid/ISuperAgreement.sol"; diff --git a/packages/ethereum-contracts/contracts/agreements/AgreementLibrary.sol b/packages/ethereum-contracts/contracts/agreements/AgreementLibrary.sol index 51d1ea0d4f..6d7324c214 100644 --- a/packages/ethereum-contracts/contracts/agreements/AgreementLibrary.sol +++ b/packages/ethereum-contracts/contracts/agreements/AgreementLibrary.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { ISuperfluid, diff --git a/packages/ethereum-contracts/contracts/agreements/ConstantFlowAgreementV1.sol b/packages/ethereum-contracts/contracts/agreements/ConstantFlowAgreementV1.sol index cc85dc1456..d4e0edc98d 100644 --- a/packages/ethereum-contracts/contracts/agreements/ConstantFlowAgreementV1.sol +++ b/packages/ethereum-contracts/contracts/agreements/ConstantFlowAgreementV1.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { ISuperfluid, diff --git a/packages/ethereum-contracts/contracts/agreements/InstantDistributionAgreementV1.sol b/packages/ethereum-contracts/contracts/agreements/InstantDistributionAgreementV1.sol index 832a8f5dcc..6bd8a6740b 100644 --- a/packages/ethereum-contracts/contracts/agreements/InstantDistributionAgreementV1.sol +++ b/packages/ethereum-contracts/contracts/agreements/InstantDistributionAgreementV1.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; diff --git a/packages/ethereum-contracts/contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol b/packages/ethereum-contracts/contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol index 21de10a40a..133557ce90 100644 --- a/packages/ethereum-contracts/contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol +++ b/packages/ethereum-contracts/contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPLv3 // solhint-disable not-rely-on-time -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; diff --git a/packages/ethereum-contracts/contracts/agreements/gdav1/PoolAdminNFT.sol b/packages/ethereum-contracts/contracts/agreements/gdav1/PoolAdminNFT.sol index 2a73cc5c1f..4b86cb5b83 100644 --- a/packages/ethereum-contracts/contracts/agreements/gdav1/PoolAdminNFT.sol +++ b/packages/ethereum-contracts/contracts/agreements/gdav1/PoolAdminNFT.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import { IPoolAdminNFT } from "../../interfaces/agreements/gdav1/IPoolAdminNFT.sol"; diff --git a/packages/ethereum-contracts/contracts/agreements/gdav1/PoolMemberNFT.sol b/packages/ethereum-contracts/contracts/agreements/gdav1/PoolMemberNFT.sol index 06ee1cb997..2387806555 100644 --- a/packages/ethereum-contracts/contracts/agreements/gdav1/PoolMemberNFT.sol +++ b/packages/ethereum-contracts/contracts/agreements/gdav1/PoolMemberNFT.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import { IPoolMemberNFT } from "../../interfaces/agreements/gdav1/IPoolMemberNFT.sol"; diff --git a/packages/ethereum-contracts/contracts/agreements/gdav1/PoolNFTBase.sol b/packages/ethereum-contracts/contracts/agreements/gdav1/PoolNFTBase.sol index c0689ded5a..c0a061103c 100644 --- a/packages/ethereum-contracts/contracts/agreements/gdav1/PoolNFTBase.sol +++ b/packages/ethereum-contracts/contracts/agreements/gdav1/PoolNFTBase.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; // Notes: We use reserved slots for upgradable contracts. // solhint-disable max-states-count diff --git a/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPool.sol b/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPool.sol index d0b7e912b7..7c273e9ded 100644 --- a/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPool.sol +++ b/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPool.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPLv3 // solhint-disable not-rely-on-time -pragma solidity 0.8.23; +pragma solidity ^0.8.23; // Notes: We use these interfaces in natspec documentation below, grep @inheritdoc // solhint-disable-next-line no-unused-import diff --git a/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPoolDeployerLibrary.sol b/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPoolDeployerLibrary.sol index 4a4c7d4842..a54019225f 100644 --- a/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPoolDeployerLibrary.sol +++ b/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPoolDeployerLibrary.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { BeaconProxy } from "@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol"; import { ISuperfluidToken } from "../../interfaces/superfluid/ISuperfluidToken.sol"; diff --git a/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPoolPlaceholder.sol b/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPoolPlaceholder.sol index 7879629324..491492765b 100644 --- a/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPoolPlaceholder.sol +++ b/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPoolPlaceholder.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPLv3 // solhint-disable not-rely-on-time -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { BeaconProxiable } from "../../upgradability/BeaconProxiable.sol"; diff --git a/packages/ethereum-contracts/contracts/gov/SuperfluidGovernanceBase.sol b/packages/ethereum-contracts/contracts/gov/SuperfluidGovernanceBase.sol index 29d7dfcf24..02d8beb2fd 100644 --- a/packages/ethereum-contracts/contracts/gov/SuperfluidGovernanceBase.sol +++ b/packages/ethereum-contracts/contracts/gov/SuperfluidGovernanceBase.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { ISuperfluid, diff --git a/packages/ethereum-contracts/contracts/gov/SuperfluidGovernanceII.sol b/packages/ethereum-contracts/contracts/gov/SuperfluidGovernanceII.sol index 664a1148c3..541c24254d 100644 --- a/packages/ethereum-contracts/contracts/gov/SuperfluidGovernanceII.sol +++ b/packages/ethereum-contracts/contracts/gov/SuperfluidGovernanceII.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { UUPSProxy } from "../upgradability/UUPSProxy.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; diff --git a/packages/ethereum-contracts/contracts/libs/BaseRelayRecipient.sol b/packages/ethereum-contracts/contracts/libs/BaseRelayRecipient.sol index ba6489bc87..8f86ba53c9 100644 --- a/packages/ethereum-contracts/contracts/libs/BaseRelayRecipient.sol +++ b/packages/ethereum-contracts/contracts/libs/BaseRelayRecipient.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { IRelayRecipient } from "../interfaces/utils/IRelayRecipient.sol"; diff --git a/packages/ethereum-contracts/contracts/libs/CallUtils.sol b/packages/ethereum-contracts/contracts/libs/CallUtils.sol index 6c85a4cedf..91392b0038 100644 --- a/packages/ethereum-contracts/contracts/libs/CallUtils.sol +++ b/packages/ethereum-contracts/contracts/libs/CallUtils.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; /** * @title Call utilities library that is absent from the OpenZeppelin diff --git a/packages/ethereum-contracts/contracts/libs/ERC1820RegistryCompiled.sol b/packages/ethereum-contracts/contracts/libs/ERC1820RegistryCompiled.sol index 0cd3dee8c0..fa245fa4f4 100644 --- a/packages/ethereum-contracts/contracts/libs/ERC1820RegistryCompiled.sol +++ b/packages/ethereum-contracts/contracts/libs/ERC1820RegistryCompiled.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: AGPLv3 // solhint-disable const-name-snakecase // solhint-disable max-line-length -pragma solidity 0.8.23; +pragma solidity ^0.8.23; /// @dev This is meant to be used by test framework to get the raw bytecode without compiling the origin contract library ERC1820RegistryCompiled { diff --git a/packages/ethereum-contracts/contracts/libs/ERC777Helper.sol b/packages/ethereum-contracts/contracts/libs/ERC777Helper.sol index 2533d0d428..1842629981 100644 --- a/packages/ethereum-contracts/contracts/libs/ERC777Helper.sol +++ b/packages/ethereum-contracts/contracts/libs/ERC777Helper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { IERC1820Registry } from "@openzeppelin/contracts/utils/introspection/IERC1820Registry.sol"; diff --git a/packages/ethereum-contracts/contracts/libs/FixedSizeData.sol b/packages/ethereum-contracts/contracts/libs/FixedSizeData.sol index 55442882e6..93d847cc34 100644 --- a/packages/ethereum-contracts/contracts/libs/FixedSizeData.sol +++ b/packages/ethereum-contracts/contracts/libs/FixedSizeData.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; /** * @title Utilities for fixed size data in storage diff --git a/packages/ethereum-contracts/contracts/libs/SafeGasLibrary.sol b/packages/ethereum-contracts/contracts/libs/SafeGasLibrary.sol index 211e8fb06a..c16654bb1e 100644 --- a/packages/ethereum-contracts/contracts/libs/SafeGasLibrary.sol +++ b/packages/ethereum-contracts/contracts/libs/SafeGasLibrary.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; /// @title SafeGasLibrary /// @author Superfluid diff --git a/packages/ethereum-contracts/contracts/libs/SlotsBitmapLibrary.sol b/packages/ethereum-contracts/contracts/libs/SlotsBitmapLibrary.sol index 824e6e1929..3322b7056e 100644 --- a/packages/ethereum-contracts/contracts/libs/SlotsBitmapLibrary.sol +++ b/packages/ethereum-contracts/contracts/libs/SlotsBitmapLibrary.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import {ISuperfluidToken} from "../interfaces/superfluid/ISuperfluidToken.sol"; diff --git a/packages/ethereum-contracts/contracts/libs/SolvencyHelperLibrary.sol b/packages/ethereum-contracts/contracts/libs/SolvencyHelperLibrary.sol index 3ea991d819..765215cb41 100644 --- a/packages/ethereum-contracts/contracts/libs/SolvencyHelperLibrary.sol +++ b/packages/ethereum-contracts/contracts/libs/SolvencyHelperLibrary.sol @@ -7,7 +7,7 @@ import { SuperfluidGovernanceConfigs } from "../interfaces/superfluid/ISuperfluid.sol"; -pragma solidity 0.8.23; +pragma solidity ^0.8.23; library SolvencyHelperLibrary { function decode3PsData(ISuperfluid host, ISuperfluidToken token) diff --git a/packages/ethereum-contracts/contracts/mocks/AgreementMock.sol b/packages/ethereum-contracts/contracts/mocks/AgreementMock.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/AgreementMock.sol rename to packages/ethereum-contracts/contracts/mocks/AgreementMock.t.sol index e0a2b342ad..bcfac48017 100644 --- a/packages/ethereum-contracts/contracts/mocks/AgreementMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/AgreementMock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/CFAAppMocks.sol b/packages/ethereum-contracts/contracts/mocks/CFAAppMocks.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/CFAAppMocks.sol rename to packages/ethereum-contracts/contracts/mocks/CFAAppMocks.t.sol index a3e0fca7e0..ef7a92ce30 100644 --- a/packages/ethereum-contracts/contracts/mocks/CFAAppMocks.sol +++ b/packages/ethereum-contracts/contracts/mocks/CFAAppMocks.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { ISuperfluid, diff --git a/packages/ethereum-contracts/contracts/mocks/CFALibraryMock.sol b/packages/ethereum-contracts/contracts/mocks/CFALibraryMock.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/CFALibraryMock.sol rename to packages/ethereum-contracts/contracts/mocks/CFALibraryMock.t.sol index be508cb8a8..3dfdf0b466 100644 --- a/packages/ethereum-contracts/contracts/mocks/CFALibraryMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/CFALibraryMock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { ISuperfluid, ISuperfluidToken, ISuperToken, IConstantFlowAgreementV1 diff --git a/packages/ethereum-contracts/contracts/mocks/CallUtilsMock.sol b/packages/ethereum-contracts/contracts/mocks/CallUtilsMock.t.sol similarity index 98% rename from packages/ethereum-contracts/contracts/mocks/CallUtilsMock.sol rename to packages/ethereum-contracts/contracts/mocks/CallUtilsMock.t.sol index e475a85dd2..59c8dde78d 100644 --- a/packages/ethereum-contracts/contracts/mocks/CallUtilsMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/CallUtilsMock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { CallUtils } from "../libs/CallUtils.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/CallUtilsTester.sol b/packages/ethereum-contracts/contracts/mocks/CallUtilsTester.t.sol similarity index 95% rename from packages/ethereum-contracts/contracts/mocks/CallUtilsTester.sol rename to packages/ethereum-contracts/contracts/mocks/CallUtilsTester.t.sol index afb8831b84..87e56d8bf7 100644 --- a/packages/ethereum-contracts/contracts/mocks/CallUtilsTester.sol +++ b/packages/ethereum-contracts/contracts/mocks/CallUtilsTester.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { CallUtils } from "../libs/CallUtils.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/CrossStreamSuperApp.sol b/packages/ethereum-contracts/contracts/mocks/CrossStreamSuperApp.sol deleted file mode 100644 index 4166cb4cf2..0000000000 --- a/packages/ethereum-contracts/contracts/mocks/CrossStreamSuperApp.sol +++ /dev/null @@ -1,47 +0,0 @@ -// SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; - -import { ISuperfluid, ISuperToken } from "../interfaces/superfluid/ISuperfluid.sol"; -import { CFASuperAppBase } from "../apps/CFASuperAppBase.sol"; -import { SuperTokenV1Library } from "../apps/SuperTokenV1Library.sol"; - -using SuperTokenV1Library for ISuperToken; - -/// @title CrossStreamSuperApp -/// @author Superfluid -/// @dev A super app used for testing "cross-stream" flows in callbacks -/// and its behavior surrounding the internal protocol accounting. -/// That is, two senders sending a flow to the super app -contract CrossStreamSuperApp is CFASuperAppBase { - address public flowRecipient; - address public prevSender; - int96 public prevFlowRate; - - constructor(ISuperfluid host_, address z_) CFASuperAppBase(host_) { - selfRegister(true, true, true); - flowRecipient = z_; - } - - function onFlowCreated(ISuperToken superToken, address sender, bytes calldata ctx) - internal - override - returns (bytes memory newCtx) - { - newCtx = ctx; - - // get incoming stream - int96 inFlowRate = superToken.getFlowRate(sender, address(this)); - - if (prevSender == address(0)) { - // first flow to super app creates a flow - newCtx = superToken.createFlowWithCtx(flowRecipient, inFlowRate, newCtx); - } else { - // subsequent flows to super app updates and deletes the flow - newCtx = superToken.updateFlowWithCtx(flowRecipient, inFlowRate, newCtx); - newCtx = superToken.deleteFlowWithCtx(prevSender, address(this), newCtx); - } - - prevSender = sender; - prevFlowRate = inFlowRate; - } -} diff --git a/packages/ethereum-contracts/contracts/mocks/CustomSuperTokenMock.sol b/packages/ethereum-contracts/contracts/mocks/CustomSuperTokenMock.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/CustomSuperTokenMock.sol rename to packages/ethereum-contracts/contracts/mocks/CustomSuperTokenMock.t.sol index fa9c503727..3cf3a3daf6 100644 --- a/packages/ethereum-contracts/contracts/mocks/CustomSuperTokenMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/CustomSuperTokenMock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { CustomSuperTokenBase, ISuperToken } from "../interfaces/superfluid/CustomSuperTokenBase.sol"; import { UUPSProxy } from "../upgradability/UUPSProxy.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/ERC777SenderRecipientMock.sol b/packages/ethereum-contracts/contracts/mocks/ERC777SenderRecipientMock.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/ERC777SenderRecipientMock.sol rename to packages/ethereum-contracts/contracts/mocks/ERC777SenderRecipientMock.t.sol index 15b2655374..f6ca024fce 100644 --- a/packages/ethereum-contracts/contracts/mocks/ERC777SenderRecipientMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/ERC777SenderRecipientMock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { Context } from "@openzeppelin/contracts/utils/Context.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/FakeSuperfluidMock.sol b/packages/ethereum-contracts/contracts/mocks/FakeSuperfluidMock.t.sol similarity index 95% rename from packages/ethereum-contracts/contracts/mocks/FakeSuperfluidMock.sol rename to packages/ethereum-contracts/contracts/mocks/FakeSuperfluidMock.t.sol index 115e1a09b7..53df7296a3 100644 --- a/packages/ethereum-contracts/contracts/mocks/FakeSuperfluidMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/FakeSuperfluidMock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { CallUtils } from "../libs/CallUtils.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/ForwarderMock.sol b/packages/ethereum-contracts/contracts/mocks/ForwarderMock.t.sol similarity index 97% rename from packages/ethereum-contracts/contracts/mocks/ForwarderMock.sol rename to packages/ethereum-contracts/contracts/mocks/ForwarderMock.t.sol index 394bde0ba9..f03c442429 100644 --- a/packages/ethereum-contracts/contracts/mocks/ForwarderMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/ForwarderMock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { CallUtils } from "../libs/CallUtils.sol"; import { IRelayRecipient } from "../interfaces/utils/IRelayRecipient.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/IDASuperAppTester.sol b/packages/ethereum-contracts/contracts/mocks/IDASuperAppTester.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/IDASuperAppTester.sol rename to packages/ethereum-contracts/contracts/mocks/IDASuperAppTester.t.sol index a1e73c614f..ac9d2a5488 100644 --- a/packages/ethereum-contracts/contracts/mocks/IDASuperAppTester.sol +++ b/packages/ethereum-contracts/contracts/mocks/IDASuperAppTester.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { ISuperfluid, diff --git a/packages/ethereum-contracts/contracts/mocks/IDAv1LibraryMock.sol b/packages/ethereum-contracts/contracts/mocks/IDAv1LibraryMock.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/IDAv1LibraryMock.sol rename to packages/ethereum-contracts/contracts/mocks/IDAv1LibraryMock.t.sol index d17ff9a727..938d2fb327 100644 --- a/packages/ethereum-contracts/contracts/mocks/IDAv1LibraryMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/IDAv1LibraryMock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; pragma experimental ABIEncoderV2; import {ISuperfluid, ISuperfluidToken, ISuperToken} from "../interfaces/superfluid/ISuperfluid.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/MockSmartWallet.sol b/packages/ethereum-contracts/contracts/mocks/MockSmartWallet.t.sol similarity index 94% rename from packages/ethereum-contracts/contracts/mocks/MockSmartWallet.sol rename to packages/ethereum-contracts/contracts/mocks/MockSmartWallet.t.sol index fdb6fe9329..1edf9e5833 100644 --- a/packages/ethereum-contracts/contracts/mocks/MockSmartWallet.sol +++ b/packages/ethereum-contracts/contracts/mocks/MockSmartWallet.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { ISuperToken, IERC20 } from "../interfaces/superfluid/ISuperfluid.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/MultiFlowTesterApp.sol b/packages/ethereum-contracts/contracts/mocks/MultiFlowTesterApp.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/MultiFlowTesterApp.sol rename to packages/ethereum-contracts/contracts/mocks/MultiFlowTesterApp.t.sol index 900bf63fad..53476772f7 100644 --- a/packages/ethereum-contracts/contracts/mocks/MultiFlowTesterApp.sol +++ b/packages/ethereum-contracts/contracts/mocks/MultiFlowTesterApp.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { ISuperfluid, diff --git a/packages/ethereum-contracts/contracts/mocks/StreamRedirector.sol b/packages/ethereum-contracts/contracts/mocks/StreamRedirector.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/StreamRedirector.sol rename to packages/ethereum-contracts/contracts/mocks/StreamRedirector.t.sol index 36d4fb918d..12c3bcbad0 100644 --- a/packages/ethereum-contracts/contracts/mocks/StreamRedirector.sol +++ b/packages/ethereum-contracts/contracts/mocks/StreamRedirector.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { ISuperfluid, ISuperToken, SuperAppBase, ISuperApp, SuperAppDefinitions, IConstantFlowAgreementV1, ISuperAgreement diff --git a/packages/ethereum-contracts/contracts/mocks/SuperAppMocks.sol b/packages/ethereum-contracts/contracts/mocks/SuperAppMocks.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/SuperAppMocks.sol rename to packages/ethereum-contracts/contracts/mocks/SuperAppMocks.t.sol index 35d0f439b8..1781a599d2 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperAppMocks.sol +++ b/packages/ethereum-contracts/contracts/mocks/SuperAppMocks.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { ISuperfluid, @@ -8,7 +8,7 @@ import { ISuperAgreement, SuperAppDefinitions } from "../superfluid/Superfluid.sol"; -import { AgreementMock } from "./AgreementMock.sol"; +import { AgreementMock } from "./AgreementMock.t.sol"; contract SuperAppMockAux { diff --git a/packages/ethereum-contracts/contracts/mocks/SuperTokenFactoryMock.sol b/packages/ethereum-contracts/contracts/mocks/SuperTokenFactoryMock.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/SuperTokenFactoryMock.sol rename to packages/ethereum-contracts/contracts/mocks/SuperTokenFactoryMock.t.sol index b8e079e074..824d006bd6 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperTokenFactoryMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/SuperTokenFactoryMock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { ISuperfluid, diff --git a/packages/ethereum-contracts/contracts/mocks/SuperTokenLibraryV1Mock.sol b/packages/ethereum-contracts/contracts/mocks/SuperTokenLibraryV1Mock.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/SuperTokenLibraryV1Mock.sol rename to packages/ethereum-contracts/contracts/mocks/SuperTokenLibraryV1Mock.t.sol index 3ee4869538..663034e984 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperTokenLibraryV1Mock.sol +++ b/packages/ethereum-contracts/contracts/mocks/SuperTokenLibraryV1Mock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { ISuperfluid, ISuperToken } from "../interfaces/superfluid/ISuperfluid.sol"; import { SuperAppDefinitions } from "../interfaces/superfluid/ISuperfluid.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/SuperTokenMock.sol b/packages/ethereum-contracts/contracts/mocks/SuperTokenMock.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/SuperTokenMock.sol rename to packages/ethereum-contracts/contracts/mocks/SuperTokenMock.t.sol index 42107a49d6..5863890cdb 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperTokenMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/SuperTokenMock.t.sol @@ -1,11 +1,12 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; + +import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import { ISuperfluid, IERC20, IConstantInflowNFT, IConstantOutflowNFT, IPoolAdminNFT, IPoolMemberNFT } from "../interfaces/superfluid/ISuperfluid.sol"; import { UUPSProxiable } from "../upgradability/UUPSProxiable.sol"; -import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import { ERC777Helper } from "../libs/ERC777Helper.sol"; import { SuperToken } from "../superfluid/SuperToken.sol"; import { SuperfluidToken } from "../superfluid/SuperfluidToken.sol"; @@ -17,7 +18,7 @@ contract SuperTokenStorageLayoutTester is SuperToken { IConstantInflowNFT constantInflowNFTProxy, IPoolAdminNFT poolAdminNFTProxy, IPoolMemberNFT poolMemberNFTProxy - ) SuperToken(host, constantOutflowNFTProxy, constantInflowNFTProxy, poolAdminNFTProxy, poolMemberNFTProxy) + ) SuperToken(host, constantOutflowNFTProxy, constantInflowNFTProxy, poolAdminNFTProxy, poolMemberNFTProxy) // solhint-disable-next-line no-empty-blocks { } diff --git a/packages/ethereum-contracts/contracts/mocks/SuperfluidDestructorMock.sol b/packages/ethereum-contracts/contracts/mocks/SuperfluidDestructorMock.t.sol similarity index 91% rename from packages/ethereum-contracts/contracts/mocks/SuperfluidDestructorMock.sol rename to packages/ethereum-contracts/contracts/mocks/SuperfluidDestructorMock.t.sol index fb2f3dbe8f..33252f20e8 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperfluidDestructorMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/SuperfluidDestructorMock.t.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPLv3 // solhint-disable -pragma solidity 0.8.23; +pragma solidity ^0.8.23; contract SuperfluidDestructorMock { diff --git a/packages/ethereum-contracts/contracts/mocks/SuperfluidGovernanceIIMock.sol b/packages/ethereum-contracts/contracts/mocks/SuperfluidGovernanceIIMock.t.sol similarity index 96% rename from packages/ethereum-contracts/contracts/mocks/SuperfluidGovernanceIIMock.sol rename to packages/ethereum-contracts/contracts/mocks/SuperfluidGovernanceIIMock.t.sol index 1736a5af0d..7cce278d75 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperfluidGovernanceIIMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/SuperfluidGovernanceIIMock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { SuperfluidGovernanceII } from "../gov/SuperfluidGovernanceII.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/SuperfluidMock.sol b/packages/ethereum-contracts/contracts/mocks/SuperfluidMock.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/SuperfluidMock.sol rename to packages/ethereum-contracts/contracts/mocks/SuperfluidMock.t.sol index d516c7c338..0b9e2a9d91 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperfluidMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/SuperfluidMock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { Superfluid, diff --git a/packages/ethereum-contracts/contracts/mocks/UUPSProxiableMock.sol b/packages/ethereum-contracts/contracts/mocks/UUPSProxiableMock.t.sol similarity index 96% rename from packages/ethereum-contracts/contracts/mocks/UUPSProxiableMock.sol rename to packages/ethereum-contracts/contracts/mocks/UUPSProxiableMock.t.sol index 2fc6699595..0a4b8af744 100644 --- a/packages/ethereum-contracts/contracts/mocks/UUPSProxiableMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/UUPSProxiableMock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { UUPSProxiable } from "../upgradability/UUPSProxiable.sol"; diff --git a/packages/ethereum-contracts/contracts/superfluid/ConstantInflowNFT.sol b/packages/ethereum-contracts/contracts/superfluid/ConstantInflowNFT.sol index 98304fd782..44bbd35627 100644 --- a/packages/ethereum-contracts/contracts/superfluid/ConstantInflowNFT.sol +++ b/packages/ethereum-contracts/contracts/superfluid/ConstantInflowNFT.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import { IGeneralDistributionAgreementV1 } from "../interfaces/agreements/gdav1/IGeneralDistributionAgreementV1.sol"; diff --git a/packages/ethereum-contracts/contracts/superfluid/ConstantOutflowNFT.sol b/packages/ethereum-contracts/contracts/superfluid/ConstantOutflowNFT.sol index 534855ace6..98c5592dff 100644 --- a/packages/ethereum-contracts/contracts/superfluid/ConstantOutflowNFT.sol +++ b/packages/ethereum-contracts/contracts/superfluid/ConstantOutflowNFT.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPLv3 // solhint-disable not-rely-on-time -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import { ISuperfluidToken } from "../interfaces/superfluid/ISuperfluidToken.sol"; diff --git a/packages/ethereum-contracts/contracts/superfluid/FlowNFTBase.sol b/packages/ethereum-contracts/contracts/superfluid/FlowNFTBase.sol index cb9c91a927..3629dfa7f1 100644 --- a/packages/ethereum-contracts/contracts/superfluid/FlowNFTBase.sol +++ b/packages/ethereum-contracts/contracts/superfluid/FlowNFTBase.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; // solhint-disable max-states-count // Notes: We use reserved slots for upgradable contracts. diff --git a/packages/ethereum-contracts/contracts/superfluid/FullUpgradableSuperTokenProxy.sol b/packages/ethereum-contracts/contracts/superfluid/FullUpgradableSuperTokenProxy.sol index b7e327a880..5870bd8174 100644 --- a/packages/ethereum-contracts/contracts/superfluid/FullUpgradableSuperTokenProxy.sol +++ b/packages/ethereum-contracts/contracts/superfluid/FullUpgradableSuperTokenProxy.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { ISuperTokenFactory } from "../interfaces/superfluid/ISuperTokenFactory.sol"; import { Proxy } from "@openzeppelin/contracts/proxy/Proxy.sol"; diff --git a/packages/ethereum-contracts/contracts/superfluid/SuperToken.sol b/packages/ethereum-contracts/contracts/superfluid/SuperToken.sol index b2eeee0717..f6ac26f51f 100644 --- a/packages/ethereum-contracts/contracts/superfluid/SuperToken.sol +++ b/packages/ethereum-contracts/contracts/superfluid/SuperToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; // solhint-disable max-states-count // Notes: SuperToken is rich with states, disable this default rule here. diff --git a/packages/ethereum-contracts/contracts/superfluid/SuperTokenFactory.sol b/packages/ethereum-contracts/contracts/superfluid/SuperTokenFactory.sol index 67bd08a06e..fe9db038e0 100644 --- a/packages/ethereum-contracts/contracts/superfluid/SuperTokenFactory.sol +++ b/packages/ethereum-contracts/contracts/superfluid/SuperTokenFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { IERC20Metadata } from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; diff --git a/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol b/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol index a4fbedf23d..02867ff032 100644 --- a/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol +++ b/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; import { UUPSProxiable } from "../upgradability/UUPSProxiable.sol"; diff --git a/packages/ethereum-contracts/contracts/superfluid/SuperfluidToken.sol b/packages/ethereum-contracts/contracts/superfluid/SuperfluidToken.sol index 83ffc62593..cb5218676e 100644 --- a/packages/ethereum-contracts/contracts/superfluid/SuperfluidToken.sol +++ b/packages/ethereum-contracts/contracts/superfluid/SuperfluidToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; diff --git a/packages/ethereum-contracts/contracts/tokens/PureSuperToken.sol b/packages/ethereum-contracts/contracts/tokens/PureSuperToken.sol index 11681904c5..0deeb3dcff 100644 --- a/packages/ethereum-contracts/contracts/tokens/PureSuperToken.sol +++ b/packages/ethereum-contracts/contracts/tokens/PureSuperToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { ISuperToken, diff --git a/packages/ethereum-contracts/contracts/tokens/SETH.sol b/packages/ethereum-contracts/contracts/tokens/SETH.sol index c8eec65449..7b6532cf14 100644 --- a/packages/ethereum-contracts/contracts/tokens/SETH.sol +++ b/packages/ethereum-contracts/contracts/tokens/SETH.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { ISuperToken, diff --git a/packages/ethereum-contracts/contracts/upgradability/BeaconProxiable.sol b/packages/ethereum-contracts/contracts/upgradability/BeaconProxiable.sol index a8339a6b9b..43db85e730 100644 --- a/packages/ethereum-contracts/contracts/upgradability/BeaconProxiable.sol +++ b/packages/ethereum-contracts/contracts/upgradability/BeaconProxiable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; diff --git a/packages/ethereum-contracts/contracts/upgradability/SuperfluidUpgradeableBeacon.sol b/packages/ethereum-contracts/contracts/upgradability/SuperfluidUpgradeableBeacon.sol index ba23d1aef2..3dc1bbc9f6 100644 --- a/packages/ethereum-contracts/contracts/upgradability/SuperfluidUpgradeableBeacon.sol +++ b/packages/ethereum-contracts/contracts/upgradability/SuperfluidUpgradeableBeacon.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { UpgradeableBeacon diff --git a/packages/ethereum-contracts/contracts/upgradability/UUPSProxiable.sol b/packages/ethereum-contracts/contracts/upgradability/UUPSProxiable.sol index bb1a37f46f..13f5fc9036 100644 --- a/packages/ethereum-contracts/contracts/upgradability/UUPSProxiable.sol +++ b/packages/ethereum-contracts/contracts/upgradability/UUPSProxiable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { UUPSUtils } from "./UUPSUtils.sol"; import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; diff --git a/packages/ethereum-contracts/contracts/upgradability/UUPSProxy.sol b/packages/ethereum-contracts/contracts/upgradability/UUPSProxy.sol index eeac91eae0..c871838a61 100644 --- a/packages/ethereum-contracts/contracts/upgradability/UUPSProxy.sol +++ b/packages/ethereum-contracts/contracts/upgradability/UUPSProxy.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { UUPSUtils } from "./UUPSUtils.sol"; import { Proxy } from "@openzeppelin/contracts/proxy/Proxy.sol"; diff --git a/packages/ethereum-contracts/contracts/upgradability/UUPSUtils.sol b/packages/ethereum-contracts/contracts/upgradability/UUPSUtils.sol index dcdedf669f..224a44009f 100644 --- a/packages/ethereum-contracts/contracts/upgradability/UUPSUtils.sol +++ b/packages/ethereum-contracts/contracts/upgradability/UUPSUtils.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; /** * @title UUPS (Universal Upgradeable Proxy Standard) Shared Library diff --git a/packages/ethereum-contracts/contracts/utils/BatchLiquidator.sol b/packages/ethereum-contracts/contracts/utils/BatchLiquidator.sol index bca8ee8d51..d8d2ccd01e 100644 --- a/packages/ethereum-contracts/contracts/utils/BatchLiquidator.sol +++ b/packages/ethereum-contracts/contracts/utils/BatchLiquidator.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { ISuperfluid, ISuperAgreement, ISuperToken, ISuperfluidPool, diff --git a/packages/ethereum-contracts/contracts/utils/CFAv1Forwarder.sol b/packages/ethereum-contracts/contracts/utils/CFAv1Forwarder.sol index 89c4408ecc..89f9a17c08 100644 --- a/packages/ethereum-contracts/contracts/utils/CFAv1Forwarder.sol +++ b/packages/ethereum-contracts/contracts/utils/CFAv1Forwarder.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { ISuperfluid, diff --git a/packages/ethereum-contracts/contracts/utils/DMZForwarder.sol b/packages/ethereum-contracts/contracts/utils/DMZForwarder.sol index 5c36c8ea7e..caaa47497d 100644 --- a/packages/ethereum-contracts/contracts/utils/DMZForwarder.sol +++ b/packages/ethereum-contracts/contracts/utils/DMZForwarder.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; diff --git a/packages/ethereum-contracts/contracts/utils/ForwarderBase.sol b/packages/ethereum-contracts/contracts/utils/ForwarderBase.sol index b30d4bde90..7097873328 100644 --- a/packages/ethereum-contracts/contracts/utils/ForwarderBase.sol +++ b/packages/ethereum-contracts/contracts/utils/ForwarderBase.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { BatchOperation, ISuperfluid } from "../interfaces/superfluid/ISuperfluid.sol"; import { CallUtils } from "../libs/CallUtils.sol"; diff --git a/packages/ethereum-contracts/contracts/utils/GDAv1Forwarder.sol b/packages/ethereum-contracts/contracts/utils/GDAv1Forwarder.sol index 2673099504..bc7af3235a 100644 --- a/packages/ethereum-contracts/contracts/utils/GDAv1Forwarder.sol +++ b/packages/ethereum-contracts/contracts/utils/GDAv1Forwarder.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { ISuperfluid, ISuperfluidToken } from "../interfaces/superfluid/ISuperfluid.sol"; import { ISuperfluidPool } from "../agreements/gdav1/SuperfluidPool.sol"; diff --git a/packages/ethereum-contracts/contracts/utils/IDAv1Forwarder.sol b/packages/ethereum-contracts/contracts/utils/IDAv1Forwarder.sol index 8bd109fd37..adcc812400 100644 --- a/packages/ethereum-contracts/contracts/utils/IDAv1Forwarder.sol +++ b/packages/ethereum-contracts/contracts/utils/IDAv1Forwarder.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { ISuperfluid, ISuperfluidToken } from "../interfaces/superfluid/ISuperfluid.sol"; import { IInstantDistributionAgreementV1 } from "../interfaces/agreements/IInstantDistributionAgreementV1.sol"; diff --git a/packages/ethereum-contracts/contracts/utils/MacroForwarder.sol b/packages/ethereum-contracts/contracts/utils/MacroForwarder.sol index 8f601e999e..c68a323183 100644 --- a/packages/ethereum-contracts/contracts/utils/MacroForwarder.sol +++ b/packages/ethereum-contracts/contracts/utils/MacroForwarder.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { IUserDefinedMacro } from "../interfaces/utils/IUserDefinedMacro.sol"; import { ISuperfluid } from "../interfaces/superfluid/ISuperfluid.sol"; diff --git a/packages/ethereum-contracts/contracts/utils/SuperUpgrader.sol b/packages/ethereum-contracts/contracts/utils/SuperUpgrader.sol index a83570805b..ba410beb21 100644 --- a/packages/ethereum-contracts/contracts/utils/SuperUpgrader.sol +++ b/packages/ethereum-contracts/contracts/utils/SuperUpgrader.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { AccessControlEnumerable } from "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; diff --git a/packages/ethereum-contracts/contracts/utils/TOGA.sol b/packages/ethereum-contracts/contracts/utils/TOGA.sol index fb0d5aae56..30dcf941c5 100644 --- a/packages/ethereum-contracts/contracts/utils/TOGA.sol +++ b/packages/ethereum-contracts/contracts/utils/TOGA.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; diff --git a/packages/ethereum-contracts/foundry.toml b/packages/ethereum-contracts/foundry.toml index 052a997e02..bfc0278b1c 100644 --- a/packages/ethereum-contracts/foundry.toml +++ b/packages/ethereum-contracts/foundry.toml @@ -2,7 +2,7 @@ root = '../..' src = 'packages/ethereum-contracts/contracts' test = 'packages/ethereum-contracts/test/foundry' -solc_version = "0.8.23" +solc_version = "0.8.26" #deny_warnings = true ignored_error_codes = [ 1699 # assembly { selfdestruct } in contracts/mocks/SuperfluidDestructorMock.sol @@ -32,6 +32,7 @@ wrap_comments = true [profile.ci] offline = true +verbosity = 2 [profile.ci.fuzz] runs = 1000 diff --git a/packages/ethereum-contracts/hardhat.config.ts b/packages/ethereum-contracts/hardhat.config.ts index d1453421b5..91301ba2d1 100644 --- a/packages/ethereum-contracts/hardhat.config.ts +++ b/packages/ethereum-contracts/hardhat.config.ts @@ -93,7 +93,7 @@ function createNetworkConfig( const config: HardhatUserConfig = { solidity: { - version: "0.8.23", + version: "0.8.26", settings: { optimizer: { enabled: true, diff --git a/packages/ethereum-contracts/package.json b/packages/ethereum-contracts/package.json index 52e4ece8e2..12ec29657d 100644 --- a/packages/ethereum-contracts/package.json +++ b/packages/ethereum-contracts/package.json @@ -60,7 +60,7 @@ "posttest": "yarn testenv:stop", "test-coverage": "run-s test-coverage:*", "test-coverage:hardhat": "yarn run-hardhat coverage --testfiles testsuites/all-contracts.js --solcoverjs ./.solcover.js", - "test-coverage:foundry": "yarn run-foundry coverage --hardhat --report lcov", + "test-coverage:foundry": "yarn run-foundry coverage --gas-limit 999999999999 --report lcov", "test-slither": "tasks/test-slither.sh", "lint": "run-s lint:*", "lint:sol": "solhint -w 0 `find contracts -name *.sol` && echo '✔ Your .sol files look good.'", diff --git a/packages/ethereum-contracts/test/contracts/agreements/AgreementHelper.ts b/packages/ethereum-contracts/test/contracts/agreements/AgreementHelper.ts index e29ae8b7b2..05bdd5598f 100644 --- a/packages/ethereum-contracts/test/contracts/agreements/AgreementHelper.ts +++ b/packages/ethereum-contracts/test/contracts/agreements/AgreementHelper.ts @@ -4,7 +4,7 @@ import {ethers} from "hardhat"; import IConstantFlowAgreementV1Artifact from "../../../build/hardhat/contracts/interfaces/agreements/IConstantFlowAgreementV1.sol/IConstantFlowAgreementV1.json"; import IInstantDistributionAgreementV1Artifact from "../../../build/hardhat/contracts/interfaces/agreements/IInstantDistributionAgreementV1.sol/IInstantDistributionAgreementV1.json"; -import SuperfluidMockArtifact from "../../../build/hardhat/contracts/mocks/SuperfluidMock.sol/SuperfluidMock.json"; +import SuperfluidMockArtifact from "../../../build/hardhat/contracts/mocks/SuperfluidMock.t.sol/SuperfluidMock.json"; import TestEnvironment from "../../TestEnvironment"; import { diff --git a/packages/ethereum-contracts/contracts/mocks/IStorageLayoutBase.sol b/packages/ethereum-contracts/test/foundry/StorageLayoutTestBase.t.sol similarity index 55% rename from packages/ethereum-contracts/contracts/mocks/IStorageLayoutBase.sol rename to packages/ethereum-contracts/test/foundry/StorageLayoutTestBase.t.sol index 0ba2441109..5c4cffb488 100644 --- a/packages/ethereum-contracts/contracts/mocks/IStorageLayoutBase.sol +++ b/packages/ethereum-contracts/test/foundry/StorageLayoutTestBase.t.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; -interface IStorageLayoutBase { +abstract contract StorageLayoutTestBase { error STORAGE_LOCATION_CHANGED(string _name); -} \ No newline at end of file +} diff --git a/packages/ethereum-contracts/test/foundry/SuperfluidFrameworkDeployer.t.sol b/packages/ethereum-contracts/test/foundry/SuperfluidFrameworkDeployer.t.sol index fe5ebf060f..c8b62eeb5a 100644 --- a/packages/ethereum-contracts/test/foundry/SuperfluidFrameworkDeployer.t.sol +++ b/packages/ethereum-contracts/test/foundry/SuperfluidFrameworkDeployer.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { FoundrySuperfluidTester } from "./FoundrySuperfluidTester.sol"; import { IPureSuperToken, ISETH, TestToken, SuperToken } from "../../contracts/utils/SuperfluidFrameworkDeployer.sol"; diff --git a/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.ACL.t.sol b/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.ACL.t.sol index 5f7cc18f68..2d8256baa9 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.ACL.t.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.ACL.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { ISuperToken, SuperToken } from "../../../contracts/superfluid/SuperToken.sol"; import { IConstantFlowAgreementV1 } from "../../../contracts/interfaces/agreements/IConstantFlowAgreementV1.sol"; diff --git a/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.prop.t.sol b/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.prop.t.sol index 50a77dd90d..9cc190359c 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.prop.t.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.prop.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import "forge-std/Test.sol"; diff --git a/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.t.sol b/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.t.sol index 77ad32e71b..4221a66583 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.t.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { console } from "forge-std/Test.sol"; import { FoundrySuperfluidTester, SuperTokenV1Library } from "../FoundrySuperfluidTester.sol"; diff --git a/packages/ethereum-contracts/test/foundry/agreements/InstantDistributionAgreementV1.t.sol b/packages/ethereum-contracts/test/foundry/agreements/InstantDistributionAgreementV1.t.sol index ef7a75dc6b..ab58a6dab8 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/InstantDistributionAgreementV1.t.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/InstantDistributionAgreementV1.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import "../FoundrySuperfluidTester.sol"; import { ISuperToken } from "../../../contracts/superfluid/SuperToken.sol"; diff --git a/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol b/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol index 6a91b1e0b4..c7e96329bb 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; @@ -14,13 +14,13 @@ import { SuperfluidUpgradeableBeacon } from "../../../../contracts/upgradability import { ISuperToken, SuperToken } from "../../../../contracts/superfluid/SuperToken.sol"; import { ISuperfluidToken } from "../../../../contracts/interfaces/superfluid/ISuperfluidToken.sol"; import { ISuperfluidPool, SuperfluidPool } from "../../../../contracts/agreements/gdav1/SuperfluidPool.sol"; -import { SuperfluidPoolStorageLayoutMock } from "../../../../contracts/mocks/SuperfluidPoolUpgradabilityMock.sol"; import { IPoolNFTBase } from "../../../../contracts/interfaces/agreements/gdav1/IPoolNFTBase.sol"; import { IPoolAdminNFT } from "../../../../contracts/interfaces/agreements/gdav1/IPoolAdminNFT.sol"; import { IPoolMemberNFT } from "../../../../contracts/interfaces/agreements/gdav1/IPoolMemberNFT.sol"; import { IFlowNFTBase } from "../../../../contracts/interfaces/superfluid/IFlowNFTBase.sol"; import { IConstantOutflowNFT } from "../../../../contracts/interfaces/superfluid/IConstantOutflowNFT.sol"; import { IConstantInflowNFT } from "../../../../contracts/interfaces/superfluid/IConstantInflowNFT.sol"; +import { SuperfluidPoolStorageLayoutMock } from "./SuperfluidPoolUpgradabilityMock.t.sol"; /// @title GeneralDistributionAgreementV1 Integration Tests /// @author Superfluid diff --git a/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreementV1.prop.t.sol b/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreementV1.prop.t.sol index d3d750f4cb..95d4b2e336 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreementV1.prop.t.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreementV1.prop.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import "forge-std/Test.sol"; import { IBeacon } from "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/SuperfluidPoolUpgradabilityMock.sol b/packages/ethereum-contracts/test/foundry/agreements/gdav1/SuperfluidPoolUpgradabilityMock.t.sol similarity index 85% rename from packages/ethereum-contracts/contracts/mocks/SuperfluidPoolUpgradabilityMock.sol rename to packages/ethereum-contracts/test/foundry/agreements/gdav1/SuperfluidPoolUpgradabilityMock.t.sol index 3e3f38c649..92f0922920 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperfluidPoolUpgradabilityMock.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/gdav1/SuperfluidPoolUpgradabilityMock.t.sol @@ -1,14 +1,16 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; -import { GeneralDistributionAgreementV1 } from "../agreements/gdav1/GeneralDistributionAgreementV1.sol"; -import { SuperfluidPool } from "../agreements/gdav1/SuperfluidPool.sol"; -import { IStorageLayoutBase } from "./IStorageLayoutBase.sol"; +import { + GeneralDistributionAgreementV1 +} from "../../../../contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol"; +import { SuperfluidPool } from "../../../../contracts/agreements/gdav1/SuperfluidPool.sol"; +import { StorageLayoutTestBase } from "../../StorageLayoutTestBase.t.sol"; /// @title SuperfluidPoolStorageLayoutMock /// @notice A mock SuperfluidPool contract for testing storage layout. /// @dev This contract *MUST* have the same storage layout as SuperfluidPool. -contract SuperfluidPoolStorageLayoutMock is SuperfluidPool, IStorageLayoutBase { +contract SuperfluidPoolStorageLayoutMock is SuperfluidPool, StorageLayoutTestBase { constructor(GeneralDistributionAgreementV1 gda_) SuperfluidPool(gda_) { } function validateStorageLayout() public pure { diff --git a/packages/ethereum-contracts/test/foundry/apps/CFASuperAppBase.t.sol b/packages/ethereum-contracts/test/foundry/apps/CFASuperAppBase.t.sol index 6c3c621dcc..eefa08c094 100644 --- a/packages/ethereum-contracts/test/foundry/apps/CFASuperAppBase.t.sol +++ b/packages/ethereum-contracts/test/foundry/apps/CFASuperAppBase.t.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import "forge-std/console.sol"; + import "../FoundrySuperfluidTester.sol"; -import { CFASuperAppBase } from "../../../contracts/apps/CFASuperAppBase.sol"; -import { CFASuperAppBaseTester } from "../../../contracts/mocks/CFASuperAppBaseTester.sol"; + import { ISuperToken, ISuperApp, @@ -12,6 +12,9 @@ import { } from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; import { IConstantFlowAgreementV1 } from "../../../contracts/interfaces/agreements/IConstantFlowAgreementV1.sol"; import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; +import { CFASuperAppBase } from "../../../contracts/apps/CFASuperAppBase.sol"; + +import { CFASuperAppBaseTester } from "./CFASuperAppBaseTester.t.sol"; contract CFASuperAppBaseTest is FoundrySuperfluidTester { using SuperTokenV1Library for SuperToken; diff --git a/packages/ethereum-contracts/contracts/mocks/CFASuperAppBaseTester.sol b/packages/ethereum-contracts/test/foundry/apps/CFASuperAppBaseTester.t.sol similarity index 89% rename from packages/ethereum-contracts/contracts/mocks/CFASuperAppBaseTester.sol rename to packages/ethereum-contracts/test/foundry/apps/CFASuperAppBaseTester.t.sol index 38fcb0d3df..48fbb81d27 100644 --- a/packages/ethereum-contracts/contracts/mocks/CFASuperAppBaseTester.sol +++ b/packages/ethereum-contracts/test/foundry/apps/CFASuperAppBaseTester.t.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; -import { ISuperfluid, ISuperToken } from "../interfaces/superfluid/ISuperfluid.sol"; -import { CFASuperAppBase } from "../apps/CFASuperAppBase.sol"; -import { SuperTokenV1Library } from "../apps/SuperTokenV1Library.sol"; +import { ISuperfluid, ISuperToken } from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; +import { CFASuperAppBase } from "../../../contracts/apps/CFASuperAppBase.sol"; +import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; contract CFASuperAppBaseTester is CFASuperAppBase { using SuperTokenV1Library for ISuperToken; diff --git a/packages/ethereum-contracts/test/foundry/apps/CrossStreamSuperApp.t.sol b/packages/ethereum-contracts/test/foundry/apps/CrossStreamSuperApp.t.sol index e502bd120b..672687a1c1 100644 --- a/packages/ethereum-contracts/test/foundry/apps/CrossStreamSuperApp.t.sol +++ b/packages/ethereum-contracts/test/foundry/apps/CrossStreamSuperApp.t.sol @@ -1,7 +1,9 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; -import { CrossStreamSuperApp } from "../../../contracts/mocks/CrossStreamSuperApp.sol"; +import { ISuperfluid, ISuperToken } from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; +import { CFASuperAppBase } from "../../../contracts/apps/CFASuperAppBase.sol"; +import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; import { ISuperToken } from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; @@ -11,6 +13,45 @@ import "forge-std/Test.sol"; using SuperTokenV1Library for ISuperToken; +/// @title CrossStreamSuperApp +/// @author Superfluid +/// @dev A super app used for testing "cross-stream" flows in callbacks +/// and its behavior surrounding the internal protocol accounting. +/// That is, two senders sending a flow to the super app +contract CrossStreamSuperApp is CFASuperAppBase { + address public flowRecipient; + address public prevSender; + int96 public prevFlowRate; + + constructor(ISuperfluid host_, address z_) CFASuperAppBase(host_) { + selfRegister(true, true, true); + flowRecipient = z_; + } + + function onFlowCreated(ISuperToken superToken, address sender, bytes calldata ctx) + internal + override + returns (bytes memory newCtx) + { + newCtx = ctx; + + // get incoming stream + int96 inFlowRate = superToken.getFlowRate(sender, address(this)); + + if (prevSender == address(0)) { + // first flow to super app creates a flow + newCtx = superToken.createFlowWithCtx(flowRecipient, inFlowRate, newCtx); + } else { + // subsequent flows to super app updates and deletes the flow + newCtx = superToken.updateFlowWithCtx(flowRecipient, inFlowRate, newCtx); + newCtx = superToken.deleteFlowWithCtx(prevSender, address(this), newCtx); + } + + prevSender = sender; + prevFlowRate = inFlowRate; + } +} + contract CrossStreamSuperAppTest is FoundrySuperfluidTester { CrossStreamSuperApp public superApp; diff --git a/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/FlowSplitter.sol b/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/FlowSplitter.sol index 2496dbe472..808b9f34bb 100644 --- a/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/FlowSplitter.sol +++ b/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/FlowSplitter.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity ^0.8.23; // code taken from: // https://github.com/superfluid-finance/super-examples/blob/main/projects/flow-splitter/contracts/FlowSplitter.sol diff --git a/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/SuperAppTest.t.sol b/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/SuperAppTest.t.sol index 93d253799c..797b5f0fa1 100644 --- a/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/SuperAppTest.t.sol +++ b/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/SuperAppTest.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import "forge-std/Test.sol"; import "forge-std/console.sol"; diff --git a/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/handlers/Handler.sol b/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/handlers/Handler.sol index 6c071110a1..46bbda62d6 100644 --- a/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/handlers/Handler.sol +++ b/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/handlers/Handler.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import "forge-std/Test.sol"; import "./IStreamHandler.sol"; diff --git a/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/handlers/IStreamHandler.sol b/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/handlers/IStreamHandler.sol index 10684b8726..37fd6ce25a 100644 --- a/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/handlers/IStreamHandler.sol +++ b/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/handlers/IStreamHandler.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; // Interface to define expected behavior of a stream handler. // We are defining a stream operation as a create, update, or delete flow. diff --git a/packages/ethereum-contracts/test/foundry/echidna/EchidnaTestCases.t.sol b/packages/ethereum-contracts/test/foundry/echidna/EchidnaTestCases.t.sol index 98f0557883..c25489a0a1 100644 --- a/packages/ethereum-contracts/test/foundry/echidna/EchidnaTestCases.t.sol +++ b/packages/ethereum-contracts/test/foundry/echidna/EchidnaTestCases.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; -import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; +import { FoundrySuperfluidTester } from "../../foundry/FoundrySuperfluidTester.sol"; import { ISuperfluidPool, SuperfluidPool } from "../../../contracts/agreements/gdav1/SuperfluidPool.sol"; import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; import { ISuperToken, SuperToken } from "../../../contracts/superfluid/SuperToken.sol"; diff --git a/packages/ethereum-contracts/test/foundry/gov/SuperfluidGovernanceII.t.sol b/packages/ethereum-contracts/test/foundry/gov/SuperfluidGovernanceII.t.sol index 2648a6896c..8ce9cbda94 100644 --- a/packages/ethereum-contracts/test/foundry/gov/SuperfluidGovernanceII.t.sol +++ b/packages/ethereum-contracts/test/foundry/gov/SuperfluidGovernanceII.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import "../FoundrySuperfluidTester.sol"; import { UUPSProxiable } from "../../../contracts/upgradability/UUPSProxiable.sol"; @@ -7,7 +7,6 @@ import { ISuperToken, SuperToken } from "../../../contracts/superfluid/SuperToke import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; import { ISuperAgreement } from "../../../contracts/interfaces/superfluid/ISuperAgreement.sol"; import { ISuperfluid } from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; -import { AgreementMock } from "../../../contracts/mocks/AgreementMock.sol"; import { SuperfluidPool } from "../../../contracts/agreements/gdav1/SuperfluidPool.sol"; contract SuperfluidGovernanceIntegrationTest is FoundrySuperfluidTester { @@ -68,7 +67,7 @@ contract SuperfluidGovernanceIntegrationTest is FoundrySuperfluidTester { "testUpdateContractsToUpgradePoolBeaconLogic: pool beacon logic not upgraded" ); } - + function testRevertUpgradePoolBeaconLogicWhenNotGovernance() public { SuperfluidPool newPoolLogic = new SuperfluidPool(sf.gda); vm.expectRevert(); diff --git a/packages/ethereum-contracts/test/foundry/libs/AgreementLibrary.prop.t.sol b/packages/ethereum-contracts/test/foundry/libs/AgreementLibrary.prop.t.sol index 697a9b6497..3e4612da59 100644 --- a/packages/ethereum-contracts/test/foundry/libs/AgreementLibrary.prop.t.sol +++ b/packages/ethereum-contracts/test/foundry/libs/AgreementLibrary.prop.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { AgreementLibrary } from "../../../contracts/agreements/AgreementLibrary.sol"; diff --git a/packages/ethereum-contracts/test/foundry/libs/CallUtils.t.sol b/packages/ethereum-contracts/test/foundry/libs/CallUtils.t.sol index fd8187fe35..9a68c67c43 100644 --- a/packages/ethereum-contracts/test/foundry/libs/CallUtils.t.sol +++ b/packages/ethereum-contracts/test/foundry/libs/CallUtils.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import "forge-std/Test.sol"; diff --git a/packages/ethereum-contracts/test/foundry/libs/SlotsBitmapLibrary.prop.t.sol b/packages/ethereum-contracts/test/foundry/libs/SlotsBitmapLibrary.prop.t.sol index 347ac551b1..b1c64df1e2 100644 --- a/packages/ethereum-contracts/test/foundry/libs/SlotsBitmapLibrary.prop.t.sol +++ b/packages/ethereum-contracts/test/foundry/libs/SlotsBitmapLibrary.prop.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import "forge-std/Test.sol"; import { ERC1820RegistryCompiled } from "../../../contracts/libs/ERC1820RegistryCompiled.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/CFAv1NFTMock.sol b/packages/ethereum-contracts/test/foundry/superfluid/CFAv1NFTMock.t.sol similarity index 92% rename from packages/ethereum-contracts/contracts/mocks/CFAv1NFTMock.sol rename to packages/ethereum-contracts/test/foundry/superfluid/CFAv1NFTMock.t.sol index 45454bf12f..439d6e881c 100644 --- a/packages/ethereum-contracts/contracts/mocks/CFAv1NFTMock.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/CFAv1NFTMock.t.sol @@ -1,19 +1,20 @@ // SPDX-License-Identifier: AGPLv3 // solhint-disable reason-string // solhint-disable not-rely-on-time -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; + import { IConstantFlowAgreementV1, IGeneralDistributionAgreementV1, ISuperfluid, IConstantInflowNFT, IConstantOutflowNFT -} from "../interfaces/superfluid/ISuperfluid.sol"; -import { ConstantOutflowNFT } from "../superfluid/ConstantOutflowNFT.sol"; -import { ConstantInflowNFT } from "../superfluid/ConstantInflowNFT.sol"; -import { FlowNFTBase } from "../superfluid/FlowNFTBase.sol"; +} from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; +import { ConstantOutflowNFT } from "../../../contracts/superfluid/ConstantOutflowNFT.sol"; +import { ConstantInflowNFT } from "../../../contracts/superfluid/ConstantInflowNFT.sol"; +import { FlowNFTBase } from "../../../contracts/superfluid/FlowNFTBase.sol"; /// @title FlowNFTBaseMock /// @author Superfluid diff --git a/packages/ethereum-contracts/contracts/mocks/CFAv1NFTUpgradabilityMock.sol b/packages/ethereum-contracts/test/foundry/superfluid/CFAv1NFTUpgradabilityMock.t.sol similarity index 92% rename from packages/ethereum-contracts/contracts/mocks/CFAv1NFTUpgradabilityMock.sol rename to packages/ethereum-contracts/test/foundry/superfluid/CFAv1NFTUpgradabilityMock.t.sol index f404d48558..2d0ca77cd5 100644 --- a/packages/ethereum-contracts/contracts/mocks/CFAv1NFTUpgradabilityMock.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/CFAv1NFTUpgradabilityMock.t.sol @@ -1,12 +1,12 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { IConstantFlowAgreementV1, IGeneralDistributionAgreementV1, ISuperfluid } - from "../interfaces/superfluid/ISuperfluid.sol"; -import { ConstantInflowNFT, IConstantInflowNFT } from "../superfluid/ConstantInflowNFT.sol"; -import { ConstantOutflowNFT, IConstantOutflowNFT } from "../superfluid/ConstantOutflowNFT.sol"; -import { FlowNFTBase } from "../superfluid/FlowNFTBase.sol"; -import { IStorageLayoutBase } from "./IStorageLayoutBase.sol"; + from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; +import { ConstantInflowNFT, IConstantInflowNFT } from "../../../contracts/superfluid/ConstantInflowNFT.sol"; +import { ConstantOutflowNFT, IConstantOutflowNFT } from "../../../contracts/superfluid/ConstantOutflowNFT.sol"; +import { FlowNFTBase } from "../../../contracts/superfluid/FlowNFTBase.sol"; +import { StorageLayoutTestBase } from "../StorageLayoutTestBase.t.sol"; /*////////////////////////////////////////////////////////////////////////// FlowNFTBase Mocks @@ -16,7 +16,7 @@ import { IStorageLayoutBase } from "./IStorageLayoutBase.sol"; /// @author Superfluid /// @notice A mock FlowNFTBase contract for testing storage layout. /// @dev This contract *MUST* have the same storage layout as FlowNFTBase.sol -contract FlowNFTBaseStorageLayoutMock is FlowNFTBase, IStorageLayoutBase { +contract FlowNFTBaseStorageLayoutMock is FlowNFTBase, StorageLayoutTestBase { constructor(ISuperfluid host, IConstantFlowAgreementV1 cfaV1, IGeneralDistributionAgreementV1 gdaV1) FlowNFTBase(host, cfaV1, gdaV1) @@ -92,7 +92,7 @@ contract FlowNFTBaseStorageLayoutMock is FlowNFTBase, IStorageLayoutBase { /// @author Superfluid /// @notice A mock ConstantOutflowNFT contract for testing storage layout. /// @dev This contract *MUST* have the same storage layout as ConstantOutflowNFT.sol -contract ConstantInflowNFTStorageLayoutMock is ConstantInflowNFT, IStorageLayoutBase { +contract ConstantInflowNFTStorageLayoutMock is ConstantInflowNFT, StorageLayoutTestBase { constructor( ISuperfluid host, @@ -145,7 +145,7 @@ contract ConstantInflowNFTStorageLayoutMock is ConstantInflowNFT, IStorageLayout /// @author Superfluid /// @notice A mock ConstantOutflowNFT contract for testing storage layout. /// @dev This contract *MUST* have the same storage layout as ConstantOutflowNFT.sol -contract ConstantOutflowNFTStorageLayoutMock is ConstantOutflowNFT, IStorageLayoutBase { +contract ConstantOutflowNFTStorageLayoutMock is ConstantOutflowNFT, StorageLayoutTestBase { constructor( ISuperfluid host, diff --git a/packages/ethereum-contracts/test/foundry/superfluid/ConstantInflowNFT.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/ConstantInflowNFT.t.sol index c883a5acd8..ee26eade89 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/ConstantInflowNFT.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/ConstantInflowNFT.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { IERC165, IERC721, IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import { ConstantOutflowNFT } from "../../../contracts/superfluid/ConstantOutflowNFT.sol"; diff --git a/packages/ethereum-contracts/test/foundry/superfluid/ConstantOutflowNFT.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/ConstantOutflowNFT.t.sol index 5026c047c5..e06dff36b9 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/ConstantOutflowNFT.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/ConstantOutflowNFT.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { IERC165, IERC721, IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; @@ -11,13 +11,20 @@ import { import { ConstantInflowNFT } from "../../../contracts/superfluid/ConstantInflowNFT.sol"; import { FoundrySuperfluidTester, SuperTokenV1Library } from "../FoundrySuperfluidTester.sol"; import { IFlowNFTBase } from "../../../contracts/interfaces/superfluid/IFlowNFTBase.sol"; -import { FlowNFTBaseTest } from "./FlowNFTBase.t.sol"; -import { SuperToken, SuperTokenMock } from "../../../contracts/mocks/SuperTokenMock.sol"; -import { ConstantOutflowNFTMock } from "../../../contracts/mocks/CFAv1NFTMock.sol"; -import { NoNFTSuperTokenMock } from "../../../contracts/mocks/SuperTokenMock.sol"; import { TestToken } from "../../../contracts/utils/TestToken.sol"; import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; import { ISuperToken } from "../../../contracts/superfluid/SuperToken.sol"; +import { SuperToken, SuperTokenMock, NoNFTSuperTokenMock } from "../../../contracts/mocks/SuperTokenMock.t.sol"; +import { FlowNFTBaseTest } from "./FlowNFTBase.t.sol"; +import { ConstantOutflowNFTMock } from "./CFAv1NFTMock.t.sol"; + + +library StringExtra { + function concat(string memory a, string memory b) internal pure returns (string memory) { + return string(abi.encodePacked(a, b)); + } +} +using StringExtra for string; contract ConstantOutflowNFTTest is FlowNFTBaseTest { using Strings for uint256; @@ -227,37 +234,42 @@ contract ConstantOutflowNFTTest is FlowNFTBaseTest { _assertNFTFlowDataStateIsEmpty(nftId); } - function testTokenURIIsExpected() public { - int96 flowRate = 42069; + function testTokenURIIsExpected(uint32 startDate, uint32 flowRate) public { + vm.assume(flowRate > 0); address flowSender = alice; address flowReceiver = bob; - _helperCreateFlowAndAssertNFTInvariants(flowSender, flowReceiver, flowRate); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), flowSender, flowReceiver); - assertEq( - constantOutflowNFT.tokenURI(nftId), - string( - abi.encodePacked( - "https://nft.superfluid.finance/cfa/v2/getmeta?flowRate=", - uint256(uint96(flowRate)).toString(), - "&outgoing=true", - "&token_address=", - Strings.toHexString(uint256(uint160(address(superTokenMock))), 20), - "&chain_id=", - block.chainid.toString(), - "&token_symbol=", - superTokenMock.symbol(), - "&sender=", - Strings.toHexString(uint256(uint160(flowSender)), 20), - "&receiver=", - Strings.toHexString(uint256(uint160(flowReceiver)), 20), - "&token_decimals=", - uint256(superTokenMock.decimals()).toString(), - "&start_date=1" // timestamp shifts 1 - ) - ) - ); + vm.warp(startDate); + _helperCreateFlowAndAssertNFTInvariants(flowSender, flowReceiver, int96(int256(uint256(flowRate)))); + + string memory tokenURI; + { + uint256 nftId = _helperGetNFTID(address(superTokenMock), flowSender, flowReceiver); + tokenURI = constantOutflowNFT.tokenURI(nftId); + } + + string memory expectedTokenURI; + { + expectedTokenURI = string("https://nft.superfluid.finance/cfa/v2/getmeta?flowRate=") + .concat(uint256(flowRate).toString()); + expectedTokenURI = expectedTokenURI.concat("&outgoing=true"); + expectedTokenURI = expectedTokenURI.concat("&token_address=") + .concat(Strings.toHexString(uint256(uint160(address(superTokenMock))), 20)); + expectedTokenURI = expectedTokenURI.concat("&chain_id=") + .concat(block.chainid.toString()); + expectedTokenURI = expectedTokenURI.concat("&token_symbol=") + .concat(superTokenMock.symbol()); + expectedTokenURI = expectedTokenURI.concat("&sender=") + .concat(Strings.toHexString(uint256(uint160(flowSender)), 20)); + expectedTokenURI = expectedTokenURI.concat("&receiver=") + .concat(Strings.toHexString(uint256(uint160(flowReceiver)), 20)); + expectedTokenURI = expectedTokenURI.concat("&token_decimals=") + .concat(uint256(superTokenMock.decimals()).toString()); + expectedTokenURI = expectedTokenURI.concat("&start_date=") + .concat(uint256(startDate).toString()); + } + + assertEq(tokenURI, expectedTokenURI); } function testCreateUpdateDeleteFlowNoNFTToken() public { diff --git a/packages/ethereum-contracts/test/foundry/superfluid/ERC721.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/ERC721.t.sol index 86daa2eaaa..5c72ede53e 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/ERC721.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/ERC721.t.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { IERC721Metadata } from "@openzeppelin/contracts/interfaces/IERC721Metadata.sol"; import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; -import { ConstantOutflowNFTMock, ConstantInflowNFTMock } from "../../../contracts/mocks/CFAv1NFTMock.sol"; -import { PoolAdminNFTMock, PoolMemberNFTMock } from "../../../contracts/mocks/PoolNFTMock.sol"; +import { ConstantOutflowNFTMock, ConstantInflowNFTMock } from "./CFAv1NFTMock.t.sol"; +import { PoolAdminNFTMock, PoolMemberNFTMock } from "./PoolNFTMock.t.sol"; import { ConstantOutflowNFT, IConstantOutflowNFT } from "../../../contracts/superfluid/ConstantOutflowNFT.sol"; import { ConstantInflowNFT, IConstantInflowNFT } from "../../../contracts/superfluid/ConstantInflowNFT.sol"; import { TestToken } from "../../../contracts/utils/TestToken.sol"; @@ -12,7 +12,7 @@ import { PoolAdminNFT, IPoolAdminNFT } from "../../../contracts/agreements/gdav1 import { PoolMemberNFT, IPoolMemberNFT } from "../../../contracts/agreements/gdav1/PoolMemberNFT.sol"; import { UUPSProxy } from "../../../contracts/upgradability/UUPSProxy.sol"; import { UUPSProxiable } from "../../../contracts/upgradability/UUPSProxiable.sol"; -import { SuperToken, SuperTokenMock } from "../../../contracts/mocks/SuperTokenMock.sol"; +import { SuperToken, SuperTokenMock } from "../../../contracts/mocks/SuperTokenMock.t.sol"; contract ERC721IntegrationTest is FoundrySuperfluidTester { string internal constant POOL_MEMBER_NFT_NAME_TEMPLATE = "Pool Member NFT"; diff --git a/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.prop.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.prop.t.sol index b1b2e12488..339de5d93d 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.prop.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.prop.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; diff --git a/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.t.sol index c118c1072e..423b2eac1b 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { IERC165, IERC721, IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; @@ -15,16 +15,16 @@ import { ConstantInflowNFT, IConstantInflowNFT } from "../../../contracts/superf import { IPoolAdminNFT } from "../../../contracts/agreements/gdav1/PoolAdminNFT.sol"; import { IPoolMemberNFT } from "../../../contracts/agreements/gdav1/PoolMemberNFT.sol"; import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; -import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; -import { ConstantOutflowNFTMock, ConstantInflowNFTMock } from "../../../contracts/mocks/CFAv1NFTMock.sol"; -import { SuperToken, SuperTokenMock } from "../../../contracts/mocks/SuperTokenMock.sol"; -import { FlowNFTBaseMock } from "../../../contracts/mocks/CFAv1NFTMock.sol"; +import { ConstantOutflowNFTMock, ConstantInflowNFTMock } from "./CFAv1NFTMock.t.sol"; +import { SuperToken, SuperTokenMock } from "../../../contracts/mocks/SuperTokenMock.t.sol"; import { TestToken } from "../../../contracts/utils/TestToken.sol"; +import { FlowNFTBaseMock } from "./CFAv1NFTMock.t.sol"; +import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; import { FlowNFTBaseStorageLayoutMock, ConstantInflowNFTStorageLayoutMock, ConstantOutflowNFTStorageLayoutMock -} from "../../../contracts/mocks/CFAv1NFTUpgradabilityMock.sol"; +} from "./CFAv1NFTUpgradabilityMock.t.sol"; import { ERC721IntegrationTest } from "./ERC721.t.sol"; abstract contract FlowNFTBaseTest is ERC721IntegrationTest { diff --git a/packages/ethereum-contracts/test/foundry/superfluid/PoolAdminNFT.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/PoolAdminNFT.t.sol index a272f17ca0..1d33ffbea6 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/PoolAdminNFT.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/PoolAdminNFT.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { IERC165, IERC721, IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; diff --git a/packages/ethereum-contracts/test/foundry/superfluid/PoolMemberNFT.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/PoolMemberNFT.t.sol index 0915899611..dad71ff3c9 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/PoolMemberNFT.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/PoolMemberNFT.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { IERC165, IERC721, IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; diff --git a/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTBase.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTBase.t.sol index 3f35801cf1..a54ed4c924 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTBase.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTBase.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { IERC165, IERC721, IERC721Metadata } from "@openzeppelin/contracts/interfaces/IERC721Metadata.sol"; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; @@ -8,15 +8,15 @@ import { PoolNFTBaseStorageLayoutMock, PoolAdminNFTStorageLayoutMock, PoolMemberNFTStorageLayoutMock -} from "../../../contracts/mocks/PoolNFTUpgradabilityMock.sol"; +} from "./PoolNFTUpgradabilityMock.t.sol"; import { IPoolNFTBase, PoolNFTBase } from "../../../contracts/agreements/gdav1/PoolNFTBase.sol"; import { ConstantOutflowNFT, IConstantOutflowNFT } from "../../../contracts/superfluid/ConstantOutflowNFT.sol"; import { ConstantInflowNFT, IConstantInflowNFT } from "../../../contracts/superfluid/ConstantInflowNFT.sol"; import { TestToken } from "../../../contracts/utils/TestToken.sol"; import { PoolAdminNFT, IPoolAdminNFT } from "../../../contracts/agreements/gdav1/PoolAdminNFT.sol"; import { PoolMemberNFT, IPoolMemberNFT } from "../../../contracts/agreements/gdav1/PoolMemberNFT.sol"; -import { ConstantOutflowNFTMock, ConstantInflowNFTMock } from "../../../contracts/mocks/CFAv1NFTMock.sol"; -import { PoolNFTBaseMock } from "../../../contracts/mocks/PoolNFTMock.sol"; +import { ConstantOutflowNFTMock, ConstantInflowNFTMock } from "./CFAv1NFTMock.t.sol"; +import { PoolNFTBaseMock } from "./PoolNFTMock.t.sol"; import { ISuperfluidPool } from "../../../contracts/agreements/gdav1/SuperfluidPool.sol"; import { ERC721IntegrationTest } from "./ERC721.t.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/PoolNFTMock.sol b/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTMock.t.sol similarity index 88% rename from packages/ethereum-contracts/contracts/mocks/PoolNFTMock.sol rename to packages/ethereum-contracts/test/foundry/superfluid/PoolNFTMock.t.sol index d1979816b2..04110c4a7c 100644 --- a/packages/ethereum-contracts/contracts/mocks/PoolNFTMock.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTMock.t.sol @@ -1,12 +1,15 @@ // SPDX-License-Identifier: AGPLv3 // solhint-disable reason-string -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; -import { IGeneralDistributionAgreementV1, ISuperfluid } from "../interfaces/superfluid/ISuperfluid.sol"; -import { PoolAdminNFT } from "../agreements/gdav1/PoolAdminNFT.sol"; -import { PoolMemberNFT } from "../agreements/gdav1/PoolMemberNFT.sol"; -import { PoolNFTBase } from "../agreements/gdav1/PoolNFTBase.sol"; + +import { + IGeneralDistributionAgreementV1, ISuperfluid +} from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; +import { PoolAdminNFT } from "../../../contracts/agreements/gdav1/PoolAdminNFT.sol"; +import { PoolMemberNFT } from "../../../contracts/agreements/gdav1/PoolMemberNFT.sol"; +import { PoolNFTBase } from "../../../contracts/agreements/gdav1/PoolNFTBase.sol"; contract PoolNFTBaseMock is PoolNFTBase { using Strings for uint256; diff --git a/packages/ethereum-contracts/contracts/mocks/PoolNFTUpgradabilityMock.sol b/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTUpgradabilityMock.t.sol similarity index 88% rename from packages/ethereum-contracts/contracts/mocks/PoolNFTUpgradabilityMock.sol rename to packages/ethereum-contracts/test/foundry/superfluid/PoolNFTUpgradabilityMock.t.sol index ace431351a..f462a8e070 100644 --- a/packages/ethereum-contracts/contracts/mocks/PoolNFTUpgradabilityMock.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTUpgradabilityMock.t.sol @@ -1,14 +1,16 @@ // SPDX-License-Identifier: AGPLv3 // solhint-disable reason-string -pragma solidity 0.8.23; +pragma solidity ^0.8.23; -import { PoolNFTBase } from "../agreements/gdav1/PoolNFTBase.sol"; -import { IGeneralDistributionAgreementV1, ISuperfluid } from "../interfaces/superfluid/ISuperfluid.sol"; -import { PoolMemberNFT } from "../agreements/gdav1/PoolMemberNFT.sol"; -import { PoolAdminNFT } from "../agreements/gdav1/PoolAdminNFT.sol"; -import { IStorageLayoutBase } from "./IStorageLayoutBase.sol"; +import { PoolNFTBase } from "../../../contracts/agreements/gdav1/PoolNFTBase.sol"; +import { + IGeneralDistributionAgreementV1, ISuperfluid +} from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; +import { PoolMemberNFT } from "../../../contracts/agreements/gdav1/PoolMemberNFT.sol"; +import { PoolAdminNFT } from "../../../contracts/agreements/gdav1/PoolAdminNFT.sol"; +import { StorageLayoutTestBase } from "../StorageLayoutTestBase.t.sol"; -contract PoolNFTBaseStorageLayoutMock is PoolNFTBase, IStorageLayoutBase { +contract PoolNFTBaseStorageLayoutMock is PoolNFTBase, StorageLayoutTestBase { constructor(ISuperfluid host, IGeneralDistributionAgreementV1 gdaV1) PoolNFTBase(host, gdaV1) { } function validateStorageLayout() public virtual { @@ -71,7 +73,7 @@ contract PoolNFTBaseStorageLayoutMock is PoolNFTBase, IStorageLayoutBase { } } -contract PoolAdminNFTStorageLayoutMock is PoolAdminNFT, IStorageLayoutBase { +contract PoolAdminNFTStorageLayoutMock is PoolAdminNFT, StorageLayoutTestBase { constructor(ISuperfluid host, IGeneralDistributionAgreementV1 gdaV1) PoolAdminNFT(host, gdaV1) { } function validateStorageLayout() public virtual { @@ -111,7 +113,7 @@ contract PoolAdminNFTStorageLayoutMock is PoolAdminNFT, IStorageLayoutBase { } } -contract PoolMemberNFTStorageLayoutMock is PoolMemberNFT, IStorageLayoutBase { +contract PoolMemberNFTStorageLayoutMock is PoolMemberNFT, StorageLayoutTestBase { constructor(ISuperfluid host, IGeneralDistributionAgreementV1 gdaV1) PoolMemberNFT(host, gdaV1) { } function validateStorageLayout() public virtual { diff --git a/packages/ethereum-contracts/test/foundry/superfluid/SuperToken.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/SuperToken.t.sol index 85013ed052..1c2f031429 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/SuperToken.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/SuperToken.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { Test } from "forge-std/Test.sol"; import { UUPSProxy } from "../../../contracts/upgradability/UUPSProxy.sol"; diff --git a/packages/ethereum-contracts/test/foundry/superfluid/SuperTokenFactory.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/SuperTokenFactory.t.sol index eece7f6443..e164348d98 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/SuperTokenFactory.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/SuperTokenFactory.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; import { SuperTokenFactory } from "../../../contracts/superfluid/SuperTokenFactory.sol"; diff --git a/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.BatchCall.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.BatchCall.t.sol index 6571cf6814..ad56918876 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.BatchCall.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.BatchCall.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { stdError } from "forge-std/Test.sol"; @@ -9,7 +9,7 @@ import { IGeneralDistributionAgreementV1, ISuperfluidPool, PoolConfig } from ".. import { IConstantFlowAgreementV1, ISuperToken, ISuperfluidToken } from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; -import { SuperAppMock } from "../../../contracts/mocks/SuperAppMocks.sol"; +import { SuperAppMock } from "../../../contracts/mocks/SuperAppMocks.t.sol"; import { DMZForwarder } from "../../../contracts/utils/DMZForwarder.sol"; import { Ownable } from '@openzeppelin/contracts/access/Ownable.sol'; import { BaseRelayRecipient } from "../../../contracts/libs/BaseRelayRecipient.sol"; diff --git a/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.t.sol index 97ea632f58..68480e9d0b 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import "../FoundrySuperfluidTester.sol"; import { UUPSProxiable } from "../../../contracts/upgradability/UUPSProxiable.sol"; @@ -7,7 +7,7 @@ import { SuperToken } from "../../../contracts/superfluid/SuperToken.sol"; import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; import { ISuperAgreement } from "../../../contracts/interfaces/superfluid/ISuperAgreement.sol"; import { ISuperfluid } from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; -import { AgreementMock } from "../../../contracts/mocks/AgreementMock.sol"; +import { AgreementMock } from "../../../contracts/mocks/AgreementMock.t.sol"; contract SuperfluidIntegrationTest is FoundrySuperfluidTester { using SuperTokenV1Library for SuperToken; diff --git a/packages/ethereum-contracts/test/foundry/superfluid/SuperfluidPool.prop.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/SuperfluidPool.prop.t.sol index 9518ad24af..7a09f8574f 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/SuperfluidPool.prop.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/SuperfluidPool.prop.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import "forge-std/Test.sol"; import "@superfluid-finance/solidity-semantic-money/src/SemanticMoney.sol"; diff --git a/packages/ethereum-contracts/test/foundry/upgradability/SuperfluidUpgradeableBeacon.t.sol b/packages/ethereum-contracts/test/foundry/upgradability/SuperfluidUpgradeableBeacon.t.sol index 7cddaeda4b..5117ad87a5 100644 --- a/packages/ethereum-contracts/test/foundry/upgradability/SuperfluidUpgradeableBeacon.t.sol +++ b/packages/ethereum-contracts/test/foundry/upgradability/SuperfluidUpgradeableBeacon.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { Test } from "forge-std/Test.sol"; diff --git a/packages/ethereum-contracts/test/foundry/utils/BatchLiquidator.t.sol b/packages/ethereum-contracts/test/foundry/utils/BatchLiquidator.t.sol index b598bae38f..60fab41092 100644 --- a/packages/ethereum-contracts/test/foundry/utils/BatchLiquidator.t.sol +++ b/packages/ethereum-contracts/test/foundry/utils/BatchLiquidator.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { FoundrySuperfluidTester, SuperTokenV1Library } from "../FoundrySuperfluidTester.sol"; import { diff --git a/packages/ethereum-contracts/test/foundry/utils/IDAv1Forwarder.t.sol b/packages/ethereum-contracts/test/foundry/utils/IDAv1Forwarder.t.sol index a97178b7d4..856d7fb504 100644 --- a/packages/ethereum-contracts/test/foundry/utils/IDAv1Forwarder.t.sol +++ b/packages/ethereum-contracts/test/foundry/utils/IDAv1Forwarder.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { FoundrySuperfluidTester, SuperTokenV1Library } from "../FoundrySuperfluidTester.sol"; import { ISuperToken } from "../../../contracts/superfluid/SuperToken.sol"; diff --git a/packages/ethereum-contracts/test/foundry/utils/MacroForwarder.t.sol b/packages/ethereum-contracts/test/foundry/utils/MacroForwarder.t.sol index e8754b10d8..2e84154ffd 100644 --- a/packages/ethereum-contracts/test/foundry/utils/MacroForwarder.t.sol +++ b/packages/ethereum-contracts/test/foundry/utils/MacroForwarder.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { ISuperfluid, BatchOperation } from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; import { ISuperToken } from "../../../contracts/superfluid/SuperToken.sol"; diff --git a/packages/ethereum-contracts/test/foundry/utils/TOGA.t.sol b/packages/ethereum-contracts/test/foundry/utils/TOGA.t.sol index d012e51f14..d39afe4456 100644 --- a/packages/ethereum-contracts/test/foundry/utils/TOGA.t.sol +++ b/packages/ethereum-contracts/test/foundry/utils/TOGA.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import "forge-std/Test.sol"; import { FoundrySuperfluidTester, SuperTokenV1Library } from "../FoundrySuperfluidTester.sol"; diff --git a/packages/ethereum-contracts/truffle-config.js b/packages/ethereum-contracts/truffle-config.js index 359f1aa42d..4b06ef4675 100644 --- a/packages/ethereum-contracts/truffle-config.js +++ b/packages/ethereum-contracts/truffle-config.js @@ -375,7 +375,7 @@ const E = (module.exports = { // Fetch exact version from solc-bin (default: truffle's version) // If SOLC environment variable is provided, assuming it is available as "solc", use it instead. // Ref, this maybe possible in the future: https://github.com/trufflesuite/truffle/pull/6007 - version: process.env.SOLC ? "native" : "0.8.23", + version: process.env.SOLC ? "native" : "0.8.26", settings: { // See the solidity docs for advice about optimization and evmVersion optimizer: { diff --git a/packages/sdk-core/contracts/NoGetUnderlyingToken.sol b/packages/sdk-core/contracts/NoGetUnderlyingToken.sol index 3f9365792d..a8d58ede86 100644 --- a/packages/sdk-core/contracts/NoGetUnderlyingToken.sol +++ b/packages/sdk-core/contracts/NoGetUnderlyingToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.23; +pragma solidity ^0.8.23; contract NoGetUnderlyingToken { diff --git a/packages/sdk-core/contracts/SuperAppTester.sol b/packages/sdk-core/contracts/SuperAppTester.sol index 6994f04a1a..32b46a0037 100644 --- a/packages/sdk-core/contracts/SuperAppTester.sol +++ b/packages/sdk-core/contracts/SuperAppTester.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { ISuperfluid, diff --git a/packages/solidity-semantic-money/foundry.toml b/packages/solidity-semantic-money/foundry.toml index 4d4636410f..1dd24e4df7 100644 --- a/packages/solidity-semantic-money/foundry.toml +++ b/packages/solidity-semantic-money/foundry.toml @@ -3,8 +3,9 @@ root = '../..' src = 'packages/solidity-semantic-money/src' out = 'packages/solidity-semantic-money/out/default' cache_path = 'packages/solidity-semantic-money/out/default.cache' -solc_version = '0.8.23' +solc_version = '0.8.26' evm_version = 'paris' # no PUSH0 for now +deny_warnings = true via_ir = false remappings = [ '@superfluid-finance/solidity-semantic-money/src/=packages/solidity-semantic-money/src/', diff --git a/packages/solidity-semantic-money/src/examples/Aqueduct.sol b/packages/solidity-semantic-money/src/examples/Aqueduct.sol index ceea62e24d..794b81bc09 100644 --- a/packages/solidity-semantic-money/src/examples/Aqueduct.sol +++ b/packages/solidity-semantic-money/src/examples/Aqueduct.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { diff --git a/packages/solidity-semantic-money/src/ref-impl/ToySuperToken.sol b/packages/solidity-semantic-money/src/ref-impl/ToySuperToken.sol index fb0df23007..074eb05147 100644 --- a/packages/solidity-semantic-money/src/ref-impl/ToySuperToken.sol +++ b/packages/solidity-semantic-money/src/ref-impl/ToySuperToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity ^0.8.23; // solhint-disable not-rely-on-time diff --git a/packages/solidity-semantic-money/src/ref-impl/ToySuperfluidPool.sol b/packages/solidity-semantic-money/src/ref-impl/ToySuperfluidPool.sol index b16916af4f..ab23129214 100644 --- a/packages/solidity-semantic-money/src/ref-impl/ToySuperfluidPool.sol +++ b/packages/solidity-semantic-money/src/ref-impl/ToySuperfluidPool.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity ^0.8.23; // solhint-disable not-rely-on-time diff --git a/packages/solidity-semantic-money/src/ref-impl/ToySuperfluidToken.sol b/packages/solidity-semantic-money/src/ref-impl/ToySuperfluidToken.sol index 3c7dae538b..5c999ae717 100644 --- a/packages/solidity-semantic-money/src/ref-impl/ToySuperfluidToken.sol +++ b/packages/solidity-semantic-money/src/ref-impl/ToySuperfluidToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity ^0.8.23; // solhint-disable not-rely-on-time diff --git a/packages/solidity-semantic-money/test/SemanticMoney.t.sol b/packages/solidity-semantic-money/test/SemanticMoney.t.sol index d115be2528..267a5e3970 100644 --- a/packages/solidity-semantic-money/test/SemanticMoney.t.sol +++ b/packages/solidity-semantic-money/test/SemanticMoney.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { Test } from "forge-std/Test.sol"; import { @@ -16,19 +16,19 @@ contract SemanticMoneyTest is Test { p._flow_rate = FlowRate.wrap(FlowRate.unwrap(p._flow_rate) >> 2); } - function assertEq(FlowRate a, FlowRate b, string memory e) internal { + function assertEq(FlowRate a, FlowRate b, string memory e) internal pure { assertEq(FlowRate.unwrap(a), FlowRate.unwrap(b), e); } - function assertEq(Unit a, Unit b, string memory e) internal { + function assertEq(Unit a, Unit b, string memory e) internal pure { assertEq(Unit.unwrap(a), Unit.unwrap(b), e); } - function assertEq(Value a, Value b, string memory e) internal { + function assertEq(Value a, Value b, string memory e) internal pure { assertEq(Value.unwrap(a), Value.unwrap(b), e); } - function assertEq(Time a, Time b, string memory e) internal { + function assertEq(Time a, Time b, string memory e) internal pure { assertEq(Time.unwrap(a), Time.unwrap(b), e); } - function assertEq(BasicParticle memory a, BasicParticle memory b, string memory e) internal { + function assertEq(BasicParticle memory a, BasicParticle memory b, string memory e) internal pure { assertEq(a._settled_at, b._settled_at, e); assertEq(a._settled_value, b._settled_value, e); assertEq(a._flow_rate, b._flow_rate, e); @@ -39,7 +39,7 @@ contract SemanticMoneyTest is Test { //////////////////////////////////////////////////////////////////////////////// /// value `mul` unit distributive law: v * (u1 + u2) = v * u1 + v * u2 - function test_value_mul_unit_distributive_law(int128 x_, Unit u1, Unit u2) external { + function test_value_mul_unit_distributive_law(int128 x_, Unit u1, Unit u2) external pure { Value x = Value.wrap(x_); int256 tu = int256(Unit.unwrap(u1)) + int256(Unit.unwrap(u2)); // FIXME NB! vm.assume crashes solc/yul 0.8.19 @@ -48,14 +48,14 @@ contract SemanticMoneyTest is Test { } /// Value `mul.div` unit is a fixed-point function - function test_value_muldiv_unit_fixed(int128 x_, Unit u) external { + function test_value_muldiv_unit_fixed(int128 x_, Unit u) external pure { if (Unit.unwrap(u) == 0) return; Value x = Value.wrap(x_); assertEq(x.div(u).mul(u), x.div(u).mul(u).div(u).mul(u), "e1"); } /// flowrate `mul` unit distributive law: r * (u1 + u2) = r * u1 + r * u2 - function test_flowrate_mul_unit_distributive_law(int64 r_, int64 u1_, int64 u2_) external { + function test_flowrate_mul_unit_distributive_law(int64 r_, int64 u1_, int64 u2_) external pure { // eliminate the signed integer overflow case if (int256(r_) * (int256(u1_) + int256(u2_)) > type(int128).max || int256(r_) * (int256(u1_) + int256(u2_)) < type(int128).min) return; @@ -66,7 +66,7 @@ contract SemanticMoneyTest is Test { } /// FlowRate `mul.div` unit is a fixed-point function - function test_flowrate_muldiv_unit_fixed(int64 r_, int64 u_) external { + function test_flowrate_muldiv_unit_fixed(int64 r_, int64 u_) external pure { if (u_ == 0) return; FlowRate r = FlowRate.wrap(r_); Unit u = Unit.wrap(u_); @@ -74,7 +74,7 @@ contract SemanticMoneyTest is Test { } /// flowrate and unit quotien remainder law: (q, e) = r \ u => q * u + e = r - function test_flowrate_quotrem_unit(FlowRate r, Unit u) external { + function test_flowrate_quotrem_unit(FlowRate r, Unit u) external pure { // FIXME NB! vm.assume crashes solc/yul 0.8.19 atm, using simpler prunings if (Unit.unwrap(u) == 0) return; // eliminate the div by 0 case if (FlowRate.unwrap(r) == type(int128).min) return; // eliminate the signed integer overflow case @@ -82,7 +82,7 @@ contract SemanticMoneyTest is Test { assertEq(q.mul(u) + e, r, "e1"); } - function test_operators() external { + function test_operators() external pure { assertTrue(Time.wrap(0) == Time.wrap(0)); assertTrue(Time.wrap(0) != Time.wrap(1)); assertTrue(Time.wrap(0) < Time.wrap(1)); @@ -161,20 +161,22 @@ contract SemanticMoneyTest is Test { // Particle/Universal Index Properties: Monoidal Laws & Monetary Unit Laws //////////////////////////////////////////////////////////////////////////////// - function test_u_monoid_identity(BasicParticle memory p1) external { + function test_u_monoid_identity(BasicParticle memory p1) external pure { BasicParticle memory id; assertEq(p1, p1.mappend(id), "e1"); assertEq(p1, id.mappend(p1), "e2"); } - function test_u_monoid_assoc(BasicParticle memory p1, BasicParticle memory p2, BasicParticle memory p3) external { + function test_u_monoid_assoc(BasicParticle memory p1, BasicParticle memory p2, BasicParticle memory p3) + external pure + { limitToSafeParticle(p1); limitToSafeParticle(p2); limitToSafeParticle(p3); assertEq(p1.mappend(p2).mappend(p3), p1.mappend(p2.mappend(p3)), "e2"); } - function test_u_settle_idempotence(BasicParticle memory p, uint16 m) external { + function test_u_settle_idempotence(BasicParticle memory p, uint16 m) external pure { limitToSafeParticle(p); Time t1 = p.settled_at() + Time.wrap(m); @@ -184,7 +186,7 @@ contract SemanticMoneyTest is Test { assertEq(p1, p2, "e2"); } - function test_u_constant_rtb(BasicParticle memory p, uint16 m1, uint16 m2, uint16 m3) external { + function test_u_constant_rtb(BasicParticle memory p, uint16 m1, uint16 m2, uint16 m3) external pure { limitToSafeParticle(p); Time t1 = p.settled_at() + Time.wrap(m1); @@ -220,7 +222,7 @@ contract SemanticMoneyTest is Test { function (BasicParticle memory, BasicParticle memory, Time, int64) internal pure returns (BasicParticle memory, BasicParticle memory) op1, function (BasicParticle memory, BasicParticle memory, Time, int64) - internal pure returns (BasicParticle memory, BasicParticle memory) op2) internal { + internal pure returns (BasicParticle memory, BasicParticle memory) op2) internal pure { UUTestVars memory d; d.t1 = Time.wrap(m1); d.t2 = d.t1 + Time.wrap(m2); @@ -230,19 +232,19 @@ contract SemanticMoneyTest is Test { (d.a, d.b) = op2(d.a, d.b, d.t2, x2); assertEq(0, Value.unwrap(d.a.rtb(d.t3) + d.b.rtb(d.t3))); } - function test_uu_ss(uint16 m1, int64 x1, uint16 m2, int64 x2, uint16 m3) external { + function test_uu_ss(uint16 m1, int64 x1, uint16 m2, int64 x2, uint16 m3) external pure { run_uu_test(m1, x1, m2, x2, m3, uu_shift2, uu_shift2); } - function test_uu_ff(uint16 m1, int64 r1, uint16 m2, int64 r2, uint16 m3) external { + function test_uu_ff(uint16 m1, int64 r1, uint16 m2, int64 r2, uint16 m3) external pure { run_uu_test(m1, r1, m2, r2, m3, uu_flow2, uu_flow2); } - function test_uu_fs(uint16 m1, int64 r1, uint16 m2, int64 x2, uint16 m3) external { + function test_uu_fs(uint16 m1, int64 r1, uint16 m2, int64 x2, uint16 m3) external pure { run_uu_test(m1, r1, m2, x2, m3, uu_flow2, uu_shift2); } - function test_uu_sf(uint16 m1, int64 x1, uint16 m2, int64 r2, uint16 m3) external { + function test_uu_sf(uint16 m1, int64 x1, uint16 m2, int64 r2, uint16 m3) external pure { run_uu_test(m1, x1, m2, r2, m3, uu_shift2, uu_flow2); } - function test_uu_flow2(uint16 m1, int64 r1, uint16 m2, int64 r2, uint16 m3) external { + function test_uu_flow2(uint16 m1, int64 r1, uint16 m2, int64 r2, uint16 m3) external pure { UUTestVars memory d; d.t1 = Time.wrap(m1); d.t2 = d.t1 + Time.wrap(m2); @@ -255,7 +257,7 @@ contract SemanticMoneyTest is Test { assertEq(Value.unwrap(d.b.rtb(d.t3)), int256(r1) * int256(uint256(m2)) + int256(r2) * int256(uint256(m3))); } - function test_uu_shift_flow2b(uint16 m1, int64 r1, uint16 m2, int64 r2, uint16 m3) external { + function test_uu_shift_flow2b(uint16 m1, int64 r1, uint16 m2, int64 r2, uint16 m3) external pure { UUTestVars memory d; d.t1 = Time.wrap(m1); d.t2 = d.t1 + Time.wrap(m2); @@ -268,7 +270,7 @@ contract SemanticMoneyTest is Test { assertEq(Value.unwrap(d.b.rtb(d.t3)), int256(r1) * int256(uint256(m2)) + (int256(r1) + int256(r2)) * int256(uint256(m3))); } - function test_uu_shift_flow2ab_equiv(int64 r1, uint16 m1, int64 r2, uint16 m2) external { + function test_uu_shift_flow2ab_equiv(int64 r1, uint16 m1, int64 r2, uint16 m2) external pure { Time t1 = Time.wrap(m1); Time t2 = Time.wrap(m1) + Time.wrap(m2); BasicParticle memory a0; @@ -318,7 +320,7 @@ contract SemanticMoneyTest is Test { function (BasicParticle memory, PDPoolIndex memory, Time, int64) internal pure returns (BasicParticle memory, PDPoolIndex memory) op2, // final test time - uint16 m5) internal { + uint16 m5) internal pure { UPDPTestVars memory d; d.t1 = Time.wrap(m1); d.t2 = d.t1 + Time.wrap(m2); @@ -345,28 +347,28 @@ contract SemanticMoneyTest is Test { uint16 m2, int64 x2, // distribute uint16 m3, int64 u2, // update unit uint16 m4, int64 x4, // distribute - uint16 m5) external { + uint16 m5) external pure { run_updp_1m_test(m1, u1, m2, x2, updp_shift2, m3, u2, m4, x4, updp_shift2, m5); } function test_updp_1m_ff(uint16 m1, int64 u1, // update unit uint16 m2, int64 r2, // distribute flow uint16 m3, int64 u2, // update unit uint16 m4, int64 r4, // distribute flow - uint16 m5) external { + uint16 m5) external pure { run_updp_1m_test(m1, u1, m2, r2, updp_flow2, m3, u2, m4, r4, updp_flow2, m5); } function test_updp_1m_sf(uint16 m1, int64 u1, // update unit uint16 m2, int64 x2, // distribute uint16 m3, int64 u2, // update unit uint16 m4, int64 r4, // distribute flow - uint16 m5) external { + uint16 m5) external pure { run_updp_1m_test(m1, u1, m2, x2, updp_shift2, m3, u2, m4, r4, updp_flow2, m5); } function test_updp_1m_fs(uint16 m1, int64 u1, // update unit uint16 m2, int64 r2, // distribute flow uint16 m3, int64 u2, // update unit uint16 m4, int64 x4, // distribute - uint16 m5) external { + uint16 m5) external pure { run_updp_1m_test(m1, u1, m2, r2, updp_flow2, m3, u2, m4, x4, updp_shift2, m5); } @@ -383,7 +385,7 @@ contract SemanticMoneyTest is Test { function (BasicParticle memory, PDPoolIndex memory, Time, int64) internal pure returns (BasicParticle memory, PDPoolIndex memory) op2, // final test time - uint16 m5) internal { + uint16 m5) internal pure { UPDPTestVars memory d; d.t1 = Time.wrap(m1); d.t2 = d.t1 + Time.wrap(m2); @@ -412,31 +414,31 @@ contract SemanticMoneyTest is Test { uint16 m2, int64 x2, // distribute uint16 m3, int64 u2, // update unit uint16 m4, int64 x4, // distribute - uint16 m5) external { + uint16 m5) external pure { run_updp_2m_test(m1, u1, m2, x2, updp_shift2, m3, u2, m4, x4, updp_shift2, m5); } function test_updp_2m_ff(uint16 m1, int64 u1, // update unit uint16 m2, int64 r2, // distribute flow uint16 m3, int64 u2, // update unit uint16 m4, int64 r4, // distribute flow - uint16 m5) external { + uint16 m5) external pure { run_updp_2m_test(m1, u1, m2, r2, updp_flow2, m3, u2, m4, r4, updp_flow2, m5); } function test_updp_2m_sf(uint16 m1, int64 u1, // update unit uint16 m2, int64 x2, // distribute uint16 m3, int64 u2, // update unit uint16 m4, int64 r4, // distribute flow - uint16 m5) external { + uint16 m5) external pure { run_updp_2m_test(m1, u1, m2, x2, updp_shift2, m3, u2, m4, r4, updp_flow2, m5); } function test_updp_2m_fs(uint16 m1, int64 u1, // update unit uint16 m2, int64 r2, // distribute flow uint16 m3, int64 u2, // update unit uint16 m4, int64 x4, // distribute - uint16 m5) external { + uint16 m5) external pure { run_updp_2m_test(m1, u1, m2, r2, updp_flow2, m3, u2, m4, x4, updp_shift2, m5); } - function test_updp_flow2(uint16 m1, int64 r1, uint16 m2, int64 r2, uint16 m3) external { + function test_updp_flow2(uint16 m1, int64 r1, uint16 m2, int64 r2, uint16 m3) external pure { UPDPTestVars memory d; d.t1 = Time.wrap(m1); d.t2 = d.t1 + Time.wrap(m2); diff --git a/packages/solidity-semantic-money/test/examples/Aqueduct.t.sol b/packages/solidity-semantic-money/test/examples/Aqueduct.t.sol index c505c6e352..acb77a4a7b 100644 --- a/packages/solidity-semantic-money/test/examples/Aqueduct.t.sol +++ b/packages/solidity-semantic-money/test/examples/Aqueduct.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity ^0.8.23; // solhint-disable not-rely-on-time @@ -57,7 +57,7 @@ contract AqueductTest is Test { } } - function assertEq(Value a, Value b, string memory e) internal { + function assertEq(Value a, Value b, string memory e) internal pure { assertEq(Value.unwrap(a), Value.unwrap(b), e); } diff --git a/packages/solidity-semantic-money/test/ref-impl/CertoraHarness.sol b/packages/solidity-semantic-money/test/ref-impl/CertoraHarness.sol index 35e8c06db8..f0060bce85 100644 --- a/packages/solidity-semantic-money/test/ref-impl/CertoraHarness.sol +++ b/packages/solidity-semantic-money/test/ref-impl/CertoraHarness.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity ^0.8.23; import { ToySuperfluidPool } from "../../src/ref-impl/ToySuperfluidToken.sol"; diff --git a/packages/solidity-semantic-money/test/ref-impl/ToySuperToken.t.sol b/packages/solidity-semantic-money/test/ref-impl/ToySuperToken.t.sol index 9dc5e85497..28e70aa6b2 100644 --- a/packages/solidity-semantic-money/test/ref-impl/ToySuperToken.t.sol +++ b/packages/solidity-semantic-money/test/ref-impl/ToySuperToken.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity ^0.8.23; // solhint-disable not-rely-on-time @@ -62,17 +62,17 @@ contract ToySuperTokenTest is Test { vm.stopPrank(); } - function assertEq(FlowRate a, FlowRate b, string memory e) internal { + function assertEq(FlowRate a, FlowRate b, string memory e) internal pure { assertEq(FlowRate.unwrap(a), FlowRate.unwrap(b), e); } - function assertEq(Unit a, Unit b, string memory e) internal { + function assertEq(Unit a, Unit b, string memory e) internal pure { assertEq(Unit.unwrap(a), Unit.unwrap(b), e); } - function assertEq(Value a, Value b, string memory e) internal { + function assertEq(Value a, Value b, string memory e) internal pure { assertEq(Value.unwrap(a), Value.unwrap(b), e); } function getAdjustmentFlowRate(ToySuperfluidPool pool, address expectedRecipient) - internal returns (FlowRate) + internal view returns (FlowRate) { (address recipient, ,FlowRate r) = token.getPoolAdjustmentFlowInfo(pool); assertEq(recipient, expectedRecipient, "expectedRecipient fail"); From 635bb8abc96cbb1efbde58c1e86c25646737ddb9 Mon Sep 17 00:00:00 2001 From: Kaspar Kallas Date: Thu, 4 Jul 2024 11:32:26 +0300 Subject: [PATCH 18/42] [sdk-core] chore: change out the graph's hosted endpoints used in ci/cd (#1984) * chore: change out the graph's hosted endpoints used in ci/cd * chore: fetch latest schema (no effect on sdk-core version) --- packages/sdk-core/package.json | 5 +-- packages/sdk-core/src/subgraph/.graphqlconfig | 2 +- packages/sdk-core/src/subgraph/schema.graphql | 37 +++++++++++++++---- 3 files changed, 32 insertions(+), 12 deletions(-) diff --git a/packages/sdk-core/package.json b/packages/sdk-core/package.json index 476b0ddca7..4dc2cb66d5 100644 --- a/packages/sdk-core/package.json +++ b/packages/sdk-core/package.json @@ -48,9 +48,8 @@ "generate:graphql-types": "graphql-codegen --config subgraph-codegen.yml", "generate-graphql-schema": "yarn generate-graphql-schema:v1", "generate-graphql-schema:local": "get-graphql-schema http://localhost:8000/subgraphs/name/superfluid-test > src/subgraph/schema.graphql", - "generate-graphql-schema:v1": "get-graphql-schema https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-sepolia > src/subgraph/schema.graphql", - "generate-graphql-schema:dev": "get-graphql-schema https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-dev-optimism-sepolia > src/subgraph/schema.graphql", - "generate-graphql-schema:feature": "get-graphql-schema https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-feature-matic > src/subgraph/schema.graphql", + "generate-graphql-schema:v1": "get-graphql-schema https://subgraph-endpoints.superfluid.dev/optimism-mainnet/protocol-v1 > src/subgraph/schema.graphql", + "generate-graphql-schema:dev": "get-graphql-schema https://subgraph-endpoints.superfluid.dev/optimism-sepolia/protocol-v1 > src/subgraph/schema.graphql", "cloc": "sh tasks/cloc.sh" }, "bugs": { diff --git a/packages/sdk-core/src/subgraph/.graphqlconfig b/packages/sdk-core/src/subgraph/.graphqlconfig index 5deb8e10e8..09ca050d76 100644 --- a/packages/sdk-core/src/subgraph/.graphqlconfig +++ b/packages/sdk-core/src/subgraph/.graphqlconfig @@ -4,7 +4,7 @@ "extensions": { "endpoints": { "Default GraphQL Endpoint": { - "url": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-dev-optimism-sepolia", + "url": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/protocol-v1", "headers": { "user-agent": "JS GraphQL" }, diff --git a/packages/sdk-core/src/subgraph/schema.graphql b/packages/sdk-core/src/subgraph/schema.graphql index 7c93eab6f2..fb5e6f06c5 100644 --- a/packages/sdk-core/src/subgraph/schema.graphql +++ b/packages/sdk-core/src/subgraph/schema.graphql @@ -21,9 +21,6 @@ type _Block_ { """Integer representation of the timestamp stored in blocks for the chain""" timestamp: Int - - """The hash of the parent block""" - parentHash: Bytes } """The type for the top-level _meta field""" @@ -176,6 +173,8 @@ type AccountTokenSnapshot { """ id: ID! + createdAtTimestamp: BigInt! + createdAtBlockNumber: BigInt! updatedAtTimestamp: BigInt! updatedAtBlockNumber: BigInt! @@ -419,6 +418,22 @@ input AccountTokenSnapshot_filter { id_lte: ID id_in: [ID!] id_not_in: [ID!] + createdAtTimestamp: BigInt + createdAtTimestamp_not: BigInt + createdAtTimestamp_gt: BigInt + createdAtTimestamp_lt: BigInt + createdAtTimestamp_gte: BigInt + createdAtTimestamp_lte: BigInt + createdAtTimestamp_in: [BigInt!] + createdAtTimestamp_not_in: [BigInt!] + createdAtBlockNumber: BigInt + createdAtBlockNumber_not: BigInt + createdAtBlockNumber_gt: BigInt + createdAtBlockNumber_lt: BigInt + createdAtBlockNumber_gte: BigInt + createdAtBlockNumber_lte: BigInt + createdAtBlockNumber_in: [BigInt!] + createdAtBlockNumber_not_in: [BigInt!] updatedAtTimestamp: BigInt updatedAtTimestamp_not: BigInt updatedAtTimestamp_gt: BigInt @@ -772,6 +787,8 @@ input AccountTokenSnapshot_filter { enum AccountTokenSnapshot_orderBy { id + createdAtTimestamp + createdAtBlockNumber updatedAtTimestamp updatedAtBlockNumber isLiquidationEstimateOptimistic @@ -1546,6 +1563,8 @@ enum AccountTokenSnapshotLog_orderBy { token__underlyingAddress accountTokenSnapshot accountTokenSnapshot__id + accountTokenSnapshot__createdAtTimestamp + accountTokenSnapshot__createdAtBlockNumber accountTokenSnapshot__updatedAtTimestamp accountTokenSnapshot__updatedAtBlockNumber accountTokenSnapshot__isLiquidationEstimateOptimistic @@ -1586,11 +1605,6 @@ enum AccountTokenSnapshotLog_orderBy { accountTokenSnapshot__totalAmountTransferredUntilUpdatedAt } -enum Aggregation_interval { - hour - day -} - type AgreementClassRegisteredEvent implements Event { id: ID! transactionHash: Bytes! @@ -5371,6 +5385,8 @@ enum FlowOperator_orderBy { token__underlyingAddress accountTokenSnapshot accountTokenSnapshot__id + accountTokenSnapshot__createdAtTimestamp + accountTokenSnapshot__createdAtBlockNumber accountTokenSnapshot__updatedAtTimestamp accountTokenSnapshot__updatedAtBlockNumber accountTokenSnapshot__isLiquidationEstimateOptimistic @@ -20346,6 +20362,11 @@ type Token { """ underlyingToken: Token + + """ + If `governanceConfig.id` is the zero address, the token uses the default governance config. + + """ governanceConfig: TokenGovernanceConfig } From a5696361280d44ad8b52d3f406eae3ec027b62c2 Mon Sep 17 00:00:00 2001 From: Momodu Afegbua Date: Thu, 4 Jul 2024 03:53:34 -0500 Subject: [PATCH 19/42] [SUBGRAPHS] Add goldsky subgraph tag script (#1966) * added goldsky subgraph tag script * added tag and subgraph-type input --- packages/subgraph/tasks/tagGoldskySubgraph.sh | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100755 packages/subgraph/tasks/tagGoldskySubgraph.sh diff --git a/packages/subgraph/tasks/tagGoldskySubgraph.sh b/packages/subgraph/tasks/tagGoldskySubgraph.sh new file mode 100755 index 0000000000..a65b0b5583 --- /dev/null +++ b/packages/subgraph/tasks/tagGoldskySubgraph.sh @@ -0,0 +1,76 @@ +#!/bin/bash + +# Default subgraph type +subgraph_type="protocol-v1" + +# Default tag +tag="prod" + +# Function to display usage instructions +usage() { + echo "Usage: $0 --token --version [--network |all] [--subgraph-type ] [--tag ]" + exit 1 +} + +# Parse command-line arguments +while [[ "$#" -gt 0 ]]; do + case $1 in + --token) API_KEY="$2"; shift ;; + --version) version="$2"; shift ;; + --network) network="$2"; shift ;; + --subgraph-type) subgraph_type="$2"; shift ;; + --tag) tag="$2"; shift ;; + *) echo "Unknown parameter passed: $1"; usage ;; + esac + shift +done + +# Ensure required arguments are provided +if [ -z "$API_KEY" ] || [ -z "$version" ]; then + usage +fi + +# List of networks (modify this list as needed) +networks=("polygon-mainnet" "xdai-mainnet" "eth-mainnet" "base-mainnet" "optimism-mainnet" "arbitrum-one" "bsc-mainnet" "avalanche-c" "optimism-sepolia" "scroll-sepolia" "scroll-mainnet" "eth-sepolia" "avalanche-fuji" "base-sepolia") + +# Function to generate goldsky commands for each network +generate_goldsky_commands() { + local commands="" + for net in "${networks[@]}"; do + commands+=" + if ! goldsky subgraph tag create $subgraph_type-$net/$version --tag $tag; then + echo 'Error: Failed to create subgraph tag for network: $net' >&2 + exit 1 + fi" + done + echo "$commands" +} + +# Function to run the goldsky commands in Docker +run_goldsky_commands_in_docker() { + local commands=$1 + docker run --platform linux/x86_64 -it goldsky/indexed.xyz:latest /bin/bash -c " + if ! goldsky login --token $API_KEY; then + echo 'Error: Failed to login to Goldsky' >&2 + exit 1 + fi + $commands + " + if [ $? -ne 0 ]; then + echo "Error: Command execution failed" + exit 1 + fi +} + +# Check if the network argument is 'all' +if [ "$network" == "all" ]; then + goldsky_commands=$(generate_goldsky_commands) + run_goldsky_commands_in_docker "$goldsky_commands" +elif [ -n "$network" ]; then + run_goldsky_commands_in_docker "if ! goldsky subgraph tag create $subgraph_type-$network/$version --tag $tag; then + echo 'Error: Failed to create subgraph tag for network: $network' >&2 + exit 1 + fi" +else + usage +fi From 73705c7f15777f76fd5e1b38547df169ef4614f1 Mon Sep 17 00:00:00 2001 From: Miao ZhiCheng Date: Thu, 4 Jul 2024 19:24:45 +0800 Subject: [PATCH 20/42] Lib CallbackUtils & Remove PoolNFT callback try/catch (#1979) * update forge-std * [ETHEREUM-CONTRACTS] CallbackUtils replaces SafeGasLibrary * update forge-std to v1.8.2 * [ETHEREUM-CONTRACTS] fix compiler warnings * [ETHEREUM-CONTRACTS] update changelog * revert lib/forge-std update * [ETHEREUM-CONTRACTS] relax solidity pragma ^0.8.23 * update forge-std to v1.9.1 * [ETHEREUM-CONTRACTS] fast SuperAppMocks._burnGas * [workflows] actions/upload-artifact@v4 * [ethereum-contracts] some comments to SuperAppMocks._burnGas * [solidity-semantic-money] relax solidity pragma ^0.8.23 * [solidity-semantic-money] adapt to latet forge-std * ci.canary.yml: upgrade-contracts disabled * to use solc 0.8.26 * [ethereum-contracts] use 0.8.26 * fix forge command * fix build * fix build * sdk-core: fix build * [ethereum-contracts] move mocks for foundry to foundry folder * fix build * fix build * fix solidity pragma * [ethereum-contracts] updated changelog * [ethereum-contracts] skip-on-coverage superfluid#6.24 again * [ethereum-contracts] update CHANGELOG * [ethereum-contracts] fix Superfluid#6.24 gasLowerBound * [ethereum-contracts] make testOutOfCbGasZone pass for coverage test * workflows: actions/download-artifact@v4 * fix build * fix packages/subgraph/tasks/tagGoldskySubgraph.sh shellcheck error * fix packages/subgraph/tasks/tagGoldskySubgraph.sh shellcheck error --- .../call.test-ethereum-contracts.yml | 2 +- .github/workflows/call.test-sdk-core.yml | 2 +- .../call.upload-coverage-reports.yml | 4 +- .../cd.feature.create-pr-artifact.yml | 2 +- .../workflows/handler.publish-pr-packages.yml | 2 +- packages/ethereum-contracts/CHANGELOG.md | 25 +++-- .../gdav1/GeneralDistributionAgreementV1.sol | 8 +- .../agreements/gdav1/SuperfluidPool.sol | 25 +---- .../contracts/libs/CallbackUtils.sol | 93 +++++++++++++++++++ .../contracts/libs/SafeGasLibrary.sol | 24 ----- .../contracts/mocks/SuperAppMocks.t.sol | 13 ++- .../contracts/superfluid/Superfluid.sol | 26 ++---- .../contracts/superfluid/Superfluid.test.ts | 2 +- .../foundry/apps/CrossStreamSuperApp.t.sol | 2 +- .../test/foundry/libs/CallbackUtils.t.sol | 71 ++++++++++++++ packages/subgraph/tasks/tagGoldskySubgraph.sh | 5 +- 16 files changed, 211 insertions(+), 95 deletions(-) create mode 100644 packages/ethereum-contracts/contracts/libs/CallbackUtils.sol delete mode 100644 packages/ethereum-contracts/contracts/libs/SafeGasLibrary.sol create mode 100644 packages/ethereum-contracts/test/foundry/libs/CallbackUtils.t.sol diff --git a/.github/workflows/call.test-ethereum-contracts.yml b/.github/workflows/call.test-ethereum-contracts.yml index 0ab64beb6e..8da108bd63 100644 --- a/.github/workflows/call.test-ethereum-contracts.yml +++ b/.github/workflows/call.test-ethereum-contracts.yml @@ -111,7 +111,7 @@ jobs: - name: Create coverage artifact if: inputs.run-coverage-tests == true - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ethereum-contracts-coverage path: | diff --git a/.github/workflows/call.test-sdk-core.yml b/.github/workflows/call.test-sdk-core.yml index c8a965f12e..d24e3e09e4 100644 --- a/.github/workflows/call.test-sdk-core.yml +++ b/.github/workflows/call.test-sdk-core.yml @@ -105,7 +105,7 @@ jobs: - name: "Create coverage artifact" if: inputs.run-coverage-tests == true - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: sdk-core-coverage path: | diff --git a/.github/workflows/call.upload-coverage-reports.yml b/.github/workflows/call.upload-coverage-reports.yml index cdcc951048..a9ab6c3334 100644 --- a/.github/workflows/call.upload-coverage-reports.yml +++ b/.github/workflows/call.upload-coverage-reports.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v4 - name: Download ethereum-contracts-coverage - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ethereum-contracts-coverage path: packages/ethereum-contracts/coverage @@ -30,7 +30,7 @@ jobs: fail_ci_if_error: true - name: Download sdk-core-coverage - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: sdk-core-coverage path: packages/sdk-core/coverage diff --git a/.github/workflows/cd.feature.create-pr-artifact.yml b/.github/workflows/cd.feature.create-pr-artifact.yml index 20e3b0ff58..a91af4a0be 100644 --- a/.github/workflows/cd.feature.create-pr-artifact.yml +++ b/.github/workflows/cd.feature.create-pr-artifact.yml @@ -78,7 +78,7 @@ jobs: done - name: Upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: pr-packages path: bin diff --git a/.github/workflows/handler.publish-pr-packages.yml b/.github/workflows/handler.publish-pr-packages.yml index dddc3b4691..65ec96bc8f 100644 --- a/.github/workflows/handler.publish-pr-packages.yml +++ b/.github/workflows/handler.publish-pr-packages.yml @@ -39,7 +39,7 @@ jobs: - name: Download artifact continue-on-error: true id: download_artifact - uses: dawidd6/action-download-artifact@v2 + uses: dawidd6/action-download-artifact@v4 with: workflow: ${{ github.event.workflow_run.workflow_id }} workflow_conclusion: success diff --git a/packages/ethereum-contracts/CHANGELOG.md b/packages/ethereum-contracts/CHANGELOG.md index 5cefe71267..49ffbdf3e2 100644 --- a/packages/ethereum-contracts/CHANGELOG.md +++ b/packages/ethereum-contracts/CHANGELOG.md @@ -7,8 +7,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Breaking -- ISuperfuidPool self-transfer is not allowed -- FoundrySuperfluidTester is test with forge-std@v1.9.1, which may break with 1.7.x and prio forge-std lib +- ISuperfuidPool self-transfer is not allowed. +- FoundrySuperfluidTester is test with forge-std@v1.9.1, which may break with 1.7.x and prio forge-std lib. +- Removing SafeGasLibrary, in favor of CallbackUtils. ### Added @@ -17,21 +18,25 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - `OPERATION_TYPE_SUPERTOKEN_DOWNGRADE_TO` - `OPERATION_TYPE_SIMPLE_FORWARD_CALL` - `OPERATION_TYPE_ERC2771_FORWARD_CALL` - The latter 2 allow to add arbitrary contract calls to batch call. +- Solidity library CallbackUtils for dealing with EIP-150 1/64-rule for callbacks. ### Changed -- relax pragram solidity with "^0.8.23" -- bump solc to 0.8.26 -- fix a few types and build warnings -- rename '.prop.sol' to '.prop.t.sol' -- mark mock-contract files with 't.sol' to be skipped by foundry build automatically -- upgrade flake lock input: foundry +- Remove try/catch in PoolNFT callbacks. +- upgrade flake locked foundry: 0.2.0 (20b3da1 2024-07-02T00:18:52.435480726Z). +- relax pragram solidity with "^0.8.23". +- bump solc to 0.8.26. +- Faster SuperAppMockAux._burnGas implementation. +- foundry test reorg: + - rename '.prop.sol' to '.prop.t.sol'; + - mark mock-contract files with 't.sol' to be skipped by foundry build automatically; + - move some mock contracts to test/foundry if they are only used for foundry tests. ## Fixes -- make testTokenURIIsExpected work with non via-ir pipeline +- Fix a few types and build warnings. +- Make testTokenURIIsExpected work with non via-ir pipeline. ## [v1.9.1] - 2024-03-19 diff --git a/packages/ethereum-contracts/contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol b/packages/ethereum-contracts/contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol index 133557ce90..3876ca7177 100644 --- a/packages/ethereum-contracts/contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol +++ b/packages/ethereum-contracts/contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol @@ -28,7 +28,6 @@ import { IPoolAdminNFT } from "../../interfaces/agreements/gdav1/IPoolAdminNFT.s import { ISuperfluidPool } from "../../interfaces/agreements/gdav1/ISuperfluidPool.sol"; import { SlotsBitmapLibrary } from "../../libs/SlotsBitmapLibrary.sol"; import { SolvencyHelperLibrary } from "../../libs/SolvencyHelperLibrary.sol"; -import { SafeGasLibrary } from "../../libs/SafeGasLibrary.sol"; import { AgreementBase } from "../AgreementBase.sol"; import { AgreementLibrary } from "../AgreementLibrary.sol"; @@ -288,12 +287,7 @@ contract GeneralDistributionAgreementV1 is AgreementBase, TokenMonad, IGeneralDi IPoolAdminNFT poolAdminNFT = IPoolAdminNFT(_getPoolAdminNFTAddress(token)); if (address(poolAdminNFT) != address(0)) { - uint256 gasLeftBefore = gasleft(); - // solhint-disable-next-line no-empty-blocks - try poolAdminNFT.mint(address(pool)) { } - catch { - SafeGasLibrary._revertWhenOutOfGas(gasLeftBefore); - } + poolAdminNFT.mint(address(pool)); } emit PoolCreated(token, admin, pool); diff --git a/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPool.sol b/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPool.sol index 7c273e9ded..4dd9ad344f 100644 --- a/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPool.sol +++ b/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPool.sol @@ -24,7 +24,6 @@ import { ISuperfluidPool } from "../../interfaces/agreements/gdav1/ISuperfluidPo import { GeneralDistributionAgreementV1 } from "../../agreements/gdav1/GeneralDistributionAgreementV1.sol"; import { BeaconProxiable } from "../../upgradability/BeaconProxiable.sol"; import { IPoolMemberNFT } from "../../interfaces/agreements/gdav1/IPoolMemberNFT.sol"; -import { SafeGasLibrary } from "../../libs/SafeGasLibrary.sol"; using SafeCast for uint256; using SafeCast for int256; @@ -385,33 +384,17 @@ contract SuperfluidPool is ISuperfluidPool, BeaconProxiable { IPoolMemberNFT poolMemberNFT = IPoolMemberNFT(_canCallNFTHook(superToken)); if (address(poolMemberNFT) != address(0)) { uint256 tokenId = poolMemberNFT.getTokenId(address(this), memberAddr); - uint256 gasLeftBefore; if (newUnits == 0) { if (poolMemberNFT.poolMemberDataByTokenId(tokenId).member != address(0)) { - gasLeftBefore = gasleft(); - // solhint-disable-next-line no-empty-blocks - try poolMemberNFT.onDelete(address(this), memberAddr) { } - catch { - SafeGasLibrary._revertWhenOutOfGas(gasLeftBefore); - } + poolMemberNFT.onDelete(address(this), memberAddr); } } else { // if not minted, we mint a new pool member nft if (poolMemberNFT.poolMemberDataByTokenId(tokenId).member == address(0)) { - gasLeftBefore = gasleft(); - // solhint-disable-next-line no-empty-blocks - try poolMemberNFT.onCreate(address(this), memberAddr) { } - catch { - SafeGasLibrary._revertWhenOutOfGas(gasLeftBefore); - } - // if minted, we update the pool member nft + poolMemberNFT.onCreate(address(this), memberAddr); } else { - gasLeftBefore = gasleft(); - // solhint-disable-next-line no-empty-blocks - try poolMemberNFT.onUpdate(address(this), memberAddr) { } - catch { - SafeGasLibrary._revertWhenOutOfGas(gasLeftBefore); - } + // if minted, we update the pool member nft + poolMemberNFT.onUpdate(address(this), memberAddr); } } } diff --git a/packages/ethereum-contracts/contracts/libs/CallbackUtils.sol b/packages/ethereum-contracts/contracts/libs/CallbackUtils.sol new file mode 100644 index 0000000000..6d15d5bec1 --- /dev/null +++ b/packages/ethereum-contracts/contracts/libs/CallbackUtils.sol @@ -0,0 +1,93 @@ +// SPDX-License-Identifier: AGPLv3 +pragma solidity ^0.8.23; + +/** + * @title Callback utilities solidity library + * @notice An internal library used to handle different types of out of gas errors in callbacks + * + * @dev + * + * ## Problem Statement + * + * When calling an untrusted external callback (or hook), gas limit is usually provided to prevent + * grief attack from them. However, such gas limits are nested. From the callback invoking site, one + * might need to differentiate the cases between the outer-layer induced out-of-gas vs. the callback + * resulted out-of-gas. + * + * This library solves such challenge by safely marking the second case with an explicit flag of + * insufficient-callback-gas-provided. In order to use this library, one must first understand the + * concept of callback gas limit zones. + * + * ## Definitions: callback gas limit zones + * + * +---------------------------+--------------+---------------------+ + * | insufficient-callback-gas | transitional | out-of-callback-gas | + * +---------------------------+--------------+---------------------+ + * + * - insufficient-callback-gas zone + * + * This zone includes all outer gas limits that are below callback gas limit. The invariance of + * this zone is that calling the callback shall return with the insufficient-callback-gas-provided + * set to true if more gas is needed to execute the callback. + * + * - out-of-callback-gas zone + * + * Within this continuous zone, the invariance is that calling the callback shall never return + * with the insufficient-callback-gas-provided flag set to true. + * + * - transitional zone + * + * Between the insufficient-callback-gas zone to the out-of-callback-gas zone, there is a zone of + * unspecified size where insufficient-callback-gas-provided may be set to true. This is due the + * factors of EIP-150 Magic N and callback setup overhead. + * + * ## EIP-150 Magic N + * + * "If a call asks for more gas than the maximum allowed amount (i.e. the total amount of gas + * remaining in the parent after subtracting the gas cost of the call and memory expansion), do not + * return an OOG error; instead, if a call asks for more gas than all but one 64th of the maximum + * allowed amount, call with all but one 64th of the maximum allowed amount of gas (this is + * equivalent to a version of EIP-90 plus EIP-114). CREATE only provides all but one 64th of the + * parent gas to the child call." + * + * Another article about this topic: + * https://medium.com/%40wighawag/ethereum-the-concept-of-gas-and-its-dangers-28d0eb809bb2 + * + */ +library CallbackUtils { + /// The magic N constant from the EIP-150 + uint256 internal constant EIP150_MAGIC_N = 64; + + /// Make a call to the target with a callback gas limit. + function externalCall(address target, bytes memory callData, uint256 callbackGasLimit) internal + returns (bool success, bool insufficientCallbackGasProvided, bytes memory returnedData) + { + uint256 gasLeftBefore = gasleft(); + // solhint-disable-next-line avoid-low-level-calls + (success, returnedData) = address(target).call{ gas: callbackGasLimit }(callData); + if (!success) { + if (gasleft() <= gasLeftBefore / EIP150_MAGIC_N) insufficientCallbackGasProvided = true; + } + } + + /// Make a staticcall to the target with a callback gas limit. + function staticCall(address target, bytes memory callData, uint256 callbackGasLimit) internal view + returns (bool success, bool insufficientCallbackGasProvided, bytes memory returnedData) + { + uint256 gasLeftBefore = gasleft(); + // solhint-disable-next-line avoid-low-level-calls + (success, returnedData) = address(target).staticcall{ gas: callbackGasLimit }(callData); + if (!success) { + if (gasleft() <= gasLeftBefore / EIP150_MAGIC_N) insufficientCallbackGasProvided = true; + } + } + + /// Reliably consume all the gas given. + function consumeAllGas() internal pure { + // Neither revert or assert consume all gas since Solidity 0.8.20 + // https://docs.soliditylang.org/en/v0.8.20/control-structures.html#panic-via-assert-and-error-via-require + // @solidity memory-safe-assembly + // solhint-disable-next-line no-inline-assembly + assembly { invalid() } + } +} diff --git a/packages/ethereum-contracts/contracts/libs/SafeGasLibrary.sol b/packages/ethereum-contracts/contracts/libs/SafeGasLibrary.sol deleted file mode 100644 index c16654bb1e..0000000000 --- a/packages/ethereum-contracts/contracts/libs/SafeGasLibrary.sol +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: AGPLv3 -pragma solidity ^0.8.23; - -/// @title SafeGasLibrary -/// @author Superfluid -/// @notice An internal library used to handle out of gas errors -library SafeGasLibrary { - error OUT_OF_GAS(); // 0x20afada5 - - function _isOutOfGas(uint256 gasLeftBefore) internal view returns (bool) { - return gasleft() <= gasLeftBefore / 64; - } - - /// @dev A function used in the catch block to handle true out of gas errors - /// @param gasLeftBefore the gas left before the try/catch block - function _revertWhenOutOfGas(uint256 gasLeftBefore) internal view { -// If the function actually runs out of gas, not just hitting the safety gas limit, we revert the whole transaction. -// This solves an issue where the gas estimaton didn't provide enough gas by default for the function to succeed. -// See https://medium.com/@wighawag/ethereum-the-concept-of-gas-and-its-dangers-28d0eb809bb2 - if (_isOutOfGas(gasLeftBefore)) { - revert OUT_OF_GAS(); - } - } -} diff --git a/packages/ethereum-contracts/contracts/mocks/SuperAppMocks.t.sol b/packages/ethereum-contracts/contracts/mocks/SuperAppMocks.t.sol index 1781a599d2..3c92cf017c 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperAppMocks.t.sol +++ b/packages/ethereum-contracts/contracts/mocks/SuperAppMocks.t.sol @@ -8,8 +8,10 @@ import { ISuperAgreement, SuperAppDefinitions } from "../superfluid/Superfluid.sol"; +import { CallbackUtils } from "../libs/CallbackUtils.sol"; import { AgreementMock } from "./AgreementMock.t.sol"; + contract SuperAppMockAux { function actionPingAgreement(ISuperfluid host, AgreementMock agreement, uint256 ping, bytes calldata ctx) @@ -446,11 +448,16 @@ contract SuperAppMock is ISuperApp { function _burnGas(uint256 gasToBurn) private view { uint256 gasStart = gasleft(); - uint256 gasNow = gasleft(); - while ((gasStart - gasNow) < gasToBurn - 1000 /* some margin for other things*/) { - gasNow = gasleft(); + // _stubBurnGas burns gas more efficiently + try this._stubBurnGas{ gas: gasToBurn }() { assert(false); } catch { + // use gasleft() to burn the remaining gas budget + // solhint-disable-next-line no-empty-blocks + while ((gasStart - gasleft()) < gasToBurn - 1000 /* some margin for other things*/) { } } } + function _stubBurnGas() external pure { + CallbackUtils.consumeAllGas(); + } modifier requireValidCtx(bytes calldata ctx) { require(ISuperfluid(msg.sender).isCtxValid(ctx), "AgreementMock: ctx not valid before"); diff --git a/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol b/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol index 02867ff032..8094b0da95 100644 --- a/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol +++ b/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol @@ -4,7 +4,6 @@ pragma solidity ^0.8.23; import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; import { UUPSProxiable } from "../upgradability/UUPSProxiable.sol"; import { UUPSProxy } from "../upgradability/UUPSProxy.sol"; -import { SafeGasLibrary } from "../libs/SafeGasLibrary.sol"; import { ISuperfluid, @@ -22,6 +21,7 @@ import { import { GeneralDistributionAgreementV1 } from "../agreements/gdav1/GeneralDistributionAgreementV1.sol"; import { SuperfluidUpgradeableBeacon } from "../upgradability/SuperfluidUpgradeableBeacon.sol"; import { CallUtils } from "../libs/CallUtils.sol"; +import { CallbackUtils } from "../libs/CallbackUtils.sol"; import { BaseRelayRecipient } from "../libs/BaseRelayRecipient.sol"; import { DMZForwarder } from "../utils/DMZForwarder.sol"; @@ -1074,26 +1074,14 @@ contract Superfluid is callData = _replacePlaceholderCtx(callData, ctx); - uint256 gasLimit = CALLBACK_GAS_LIMIT; - uint256 gasLeftBefore = gasleft(); - if (isStaticall) { - /* solhint-disable-next-line avoid-low-level-calls*/ - (success, returnedData) = address(app).staticcall{ gas: gasLimit }(callData); - } else { - /* solhint-disable-next-line avoid-low-level-calls*/ - (success, returnedData) = address(app).call{ gas: gasLimit }(callData); - } + uint256 callbackGasLimit = CALLBACK_GAS_LIMIT; + bool insufficientCallbackGasProvided; + (success, insufficientCallbackGasProvided, returnedData) = isStaticall ? + CallbackUtils.staticCall(address(app), callData, callbackGasLimit) : + CallbackUtils.externalCall(address(app), callData, callbackGasLimit); if (!success) { - // - "/ 63" is a magic to avoid out of gas attack. - // See: https://medium.com/@wighawag/ethereum-the-concept-of-gas-and-its-dangers-28d0eb809bb2. - // - Without it, an app callback may use this to block the APP_RULE_NO_REVERT_ON_TERMINATION_CALLBACK jail - // rule. - // - Also note that, the CALLBACK_GAS_LIMIT given to the app includes the overhead an app developer may not - // have direct control of, such as abi decoding code block. It is recommend for the app developer to stay - // at least 30000 less gas usage from that value to not trigger - // APP_RULE_NO_REVERT_ON_TERMINATION_CALLBACK. - if (!SafeGasLibrary._isOutOfGas(gasLeftBefore)) { + if (!insufficientCallbackGasProvided) { if (!isTermination) { CallUtils.revertFromReturnedData(returnedData); } else { diff --git a/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts b/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts index 4711f77427..c727456791 100644 --- a/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts +++ b/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts @@ -1497,7 +1497,7 @@ describe("Superfluid Host Contract", function () { let receipt = await tx.wait(); console.debug("Gas used", receipt.gasUsed.toString()); let gasLowerBound = Number(receipt.gasUsed.toString()); - let gasUpperBound = gasLowerBound + 300000; + let gasUpperBound = Math.floor(gasLowerBound * 1.3); console.debug( "Current bound", gasLowerBound, diff --git a/packages/ethereum-contracts/test/foundry/apps/CrossStreamSuperApp.t.sol b/packages/ethereum-contracts/test/foundry/apps/CrossStreamSuperApp.t.sol index 672687a1c1..570e04dfd8 100644 --- a/packages/ethereum-contracts/test/foundry/apps/CrossStreamSuperApp.t.sol +++ b/packages/ethereum-contracts/test/foundry/apps/CrossStreamSuperApp.t.sol @@ -64,7 +64,7 @@ contract CrossStreamSuperAppTest is FoundrySuperfluidTester { _addAccount(address(superApp)); } - function testNoTokensMintedOrBurnedInCrossStreamSuperApp(int96 flowRate, uint64 blockTimestamp) public { + function testNoTokensMintedOrBurnedInCrossStreamSuperApp(int96 flowRate, uint32 blockTimestamp) public { // @note due to clipping, there is precision loss, therefore if the flow rate is too low // tokens will be unrecoverable flowRate = int96(bound(flowRate, 2 ** 31 - 1, 1e14)); diff --git a/packages/ethereum-contracts/test/foundry/libs/CallbackUtils.t.sol b/packages/ethereum-contracts/test/foundry/libs/CallbackUtils.t.sol new file mode 100644 index 0000000000..3328352796 --- /dev/null +++ b/packages/ethereum-contracts/test/foundry/libs/CallbackUtils.t.sol @@ -0,0 +1,71 @@ +pragma solidity ^0.8.23; + +import "forge-std/Test.sol"; + +import { CallbackUtils } from "../../../contracts/libs/CallbackUtils.sol"; + +contract CallbackUtilsTest is Test { + function testInsufficientCbGasZone(bool isStaticCall, uint256 callbackGasLimit) external { + callbackGasLimit = _boundCallbackGasLimit(callbackGasLimit); + // Non-exhaustive binary search for a counter case + for (uint256 gasLimit = callbackGasLimit / 2; + gasLimit <= callbackGasLimit; + gasLimit += (callbackGasLimit - gasLimit) / 2 + 1) { + try this._stubCall{ gas: gasLimit }(callbackGasLimit, isStaticCall) + returns (bool success, bool insufficientCallbackGasProvided, bytes memory) { + assertFalse(success, "Unexpected success"); + assertTrue(insufficientCallbackGasProvided, "Expected insufficientCallbackGasProvided"); + } catch { } + } + } + + function testOutOfCbGasZone(bool isStaticCall, uint256 callbackGasLimit) external { + callbackGasLimit = _boundCallbackGasLimit(callbackGasLimit); + // Heuristically, it should not take more than few steps going from transitional zone to + // out-of-callback-gas zone + bool transitioned = false; + for (uint256 i = 0; i < 20; i++) { + uint256 gasLimit = callbackGasLimit + + callbackGasLimit / (CallbackUtils.EIP150_MAGIC_N - i); + (bool success, bool insufficientCallbackGasProvided, bytes memory reason) = + this._stubCall{ gas: gasLimit } (callbackGasLimit, isStaticCall); + if (success) { + console.log("GasLimit %d / %d", gasLimit, callbackGasLimit); + assertTrue(false, "Unexpected success"); + break; + } else { + console.log("GasLimit %d / %d = %d, ", gasLimit, callbackGasLimit, + callbackGasLimit * 100 / (gasLimit - callbackGasLimit)); + console.log("reason length %d", reason.length); + if (!insufficientCallbackGasProvided) { + transitioned = true; + break; + } + } + } + assertTrue(transitioned, "out-of-callback-gas zone not found"); + } + + function _boundCallbackGasLimit(uint256 callbackGasLimit) internal pure returns (uint256) { + return bound(callbackGasLimit, 500e3, 10e6); // 500k to 10M + } + + // This is the opcode 0xfe consumes all the rest of the gas + function _gasUnlimitedEater() external pure { CallbackUtils.consumeAllGas(); } + + function _stubCall(uint256 callbackGasLimit, bool isStaticCall) external + returns (bool success, bool insufficientCallbackGasProvided, bytes memory returnedData) + { + bytes memory callData = abi.encodeCall(this._gasUnlimitedEater, ()); + if (isStaticCall) { + (success, insufficientCallbackGasProvided, returnedData) = + CallbackUtils.staticCall(address(this), callData, callbackGasLimit); + } else { + (success, insufficientCallbackGasProvided, returnedData) = + CallbackUtils.externalCall(address(this), callData, callbackGasLimit); + } + if (insufficientCallbackGasProvided) + assertFalse(success, "insufficientCallbackGasProvided only when !success"); + } +} + diff --git a/packages/subgraph/tasks/tagGoldskySubgraph.sh b/packages/subgraph/tasks/tagGoldskySubgraph.sh index a65b0b5583..4626245990 100755 --- a/packages/subgraph/tasks/tagGoldskySubgraph.sh +++ b/packages/subgraph/tasks/tagGoldskySubgraph.sh @@ -49,14 +49,13 @@ generate_goldsky_commands() { # Function to run the goldsky commands in Docker run_goldsky_commands_in_docker() { local commands=$1 - docker run --platform linux/x86_64 -it goldsky/indexed.xyz:latest /bin/bash -c " + if ! docker run --platform linux/x86_64 -it goldsky/indexed.xyz:latest /bin/bash -c " if ! goldsky login --token $API_KEY; then echo 'Error: Failed to login to Goldsky' >&2 exit 1 fi $commands - " - if [ $? -ne 0 ]; then + "; then echo "Error: Command execution failed" exit 1 fi From b905896f6269c9c60fe35e5722c7b738c6eebdd2 Mon Sep 17 00:00:00 2001 From: Didi Date: Fri, 5 Jul 2024 10:08:20 +0200 Subject: [PATCH 21/42] [ETHEREUM-CONTRACTS] per chain configurable app callback gas limit (#1982) * update forge-std * [ETHEREUM-CONTRACTS] CallbackUtils replaces SafeGasLibrary * update forge-std to v1.8.2 * [ETHEREUM-CONTRACTS] fix compiler warnings * [ETHEREUM-CONTRACTS] update changelog * revert lib/forge-std update * [ETHEREUM-CONTRACTS] relax solidity pragma ^0.8.23 * update forge-std to v1.9.1 * configurable app callback gas limit * amended changelog * add comments * [ETHEREUM-CONTRACTS] fast SuperAppMocks._burnGas * [workflows] actions/upload-artifact@v4 * [ethereum-contracts] some comments to SuperAppMocks._burnGas * [solidity-semantic-money] relax solidity pragma ^0.8.23 * [solidity-semantic-money] adapt to latet forge-std * ci.canary.yml: upgrade-contracts disabled * to use solc 0.8.26 * [ethereum-contracts] use 0.8.26 * fix forge command * fix build * fix build * sdk-core: fix build * [ethereum-contracts] move mocks for foundry to foundry folder * fix build * fix build * fix solidity pragma * [ethereum-contracts] updated changelog * [ethereum-contracts] skip-on-coverage superfluid#6.24 again * [ethereum-contracts] update CHANGELOG * [ethereum-contracts] fix Superfluid#6.24 gasLowerBound * [ethereum-contracts] fix Superfluid#6.24 gasLowerBound * [ethereum-contracts] make testOutOfCbGasZone pass for coverage test --------- Co-authored-by: Miao, ZhiCheng Co-authored-by: Miao ZhiCheng --- packages/ethereum-contracts/CHANGELOG.md | 1 + .../contracts/mocks/SuperfluidMock.t.sol | 12 +++++-- .../contracts/superfluid/Superfluid.sol | 13 ++++--- .../SuperfluidFrameworkDeploymentSteps.sol | 12 +++++-- .../ops-scripts/deploy-framework.js | 18 ++++++++-- .../ops-scripts/libs/getConfig.js | 35 ++++++++++++++++++- .../contracts/superfluid/Superfluid.test.ts | 3 ++ .../test/ops-scripts/deployment.test.js | 1 + 8 files changed, 82 insertions(+), 13 deletions(-) diff --git a/packages/ethereum-contracts/CHANGELOG.md b/packages/ethereum-contracts/CHANGELOG.md index 49ffbdf3e2..9dd9ba725b 100644 --- a/packages/ethereum-contracts/CHANGELOG.md +++ b/packages/ethereum-contracts/CHANGELOG.md @@ -23,6 +23,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Changed +- increase SuperApp callback gas limit on some chains, to be queried with `host.CALLBACK_GAS_LIMIT()` - Remove try/catch in PoolNFT callbacks. - upgrade flake locked foundry: 0.2.0 (20b3da1 2024-07-02T00:18:52.435480726Z). - relax pragram solidity with "^0.8.23". diff --git a/packages/ethereum-contracts/contracts/mocks/SuperfluidMock.t.sol b/packages/ethereum-contracts/contracts/mocks/SuperfluidMock.t.sol index 0b9e2a9d91..caa1fb6955 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperfluidMock.t.sol +++ b/packages/ethereum-contracts/contracts/mocks/SuperfluidMock.t.sol @@ -11,7 +11,8 @@ import { CallUtils } from "../libs/CallUtils.sol"; contract SuperfluidUpgradabilityTester is Superfluid { - constructor() Superfluid(false, false, address(0)) + // 3_000_000 is the min callback gas limit used in a prod deployment + constructor() Superfluid(false, false, 3_000_000, address(0)) // solhint-disable-next-line no-empty-blocks { } @@ -129,8 +130,13 @@ contract SuperfluidUpgradabilityTester is Superfluid { contract SuperfluidMock is Superfluid { - constructor(bool nonUpgradable, bool appWhiteListingEnabled, address dmzForwarder) - Superfluid(nonUpgradable, appWhiteListingEnabled, dmzForwarder) + constructor( + bool nonUpgradable, + bool appWhiteListingEnabled, + uint64 callbackGasLimit, + address dmzForwarder + ) + Superfluid(nonUpgradable, appWhiteListingEnabled, callbackGasLimit, dmzForwarder) // solhint-disable-next-line no-empty-blocks { } diff --git a/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol b/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol index 8094b0da95..9528c99748 100644 --- a/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol +++ b/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol @@ -52,6 +52,8 @@ contract Superfluid is // solhint-disable-next-line var-name-mixedcase bool immutable public APP_WHITE_LISTING_ENABLED; + uint64 immutable public CALLBACK_GAS_LIMIT; + DMZForwarder immutable public DMZ_FORWARDER; /** @@ -64,9 +66,6 @@ contract Superfluid is // solhint-disable-next-line var-name-mixedcase uint constant public MAX_APP_CALLBACK_LEVEL = 1; - // solhint-disable-next-line var-name-mixedcase - uint64 constant public CALLBACK_GAS_LIMIT = 3000000; - uint32 constant public MAX_NUM_AGREEMENTS = 256; /* WARNING: NEVER RE-ORDER VARIABLES! Always double-check that new @@ -98,9 +97,15 @@ contract Superfluid is /// function in its respective mock contract to ensure that it doesn't break anything or lead to unexpected /// behaviors/layout when upgrading - constructor(bool nonUpgradable, bool appWhiteListingEnabled, address dmzForwarderAddress) { + constructor( + bool nonUpgradable, + bool appWhiteListingEnabled, + uint64 callbackGasLimit, + address dmzForwarderAddress + ) { NON_UPGRADABLE_DEPLOYMENT = nonUpgradable; APP_WHITE_LISTING_ENABLED = appWhiteListingEnabled; + CALLBACK_GAS_LIMIT = callbackGasLimit; DMZ_FORWARDER = DMZForwarder(dmzForwarderAddress); } diff --git a/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol b/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol index 943e1f0e45..bef16401a6 100644 --- a/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol +++ b/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol @@ -156,7 +156,8 @@ contract SuperfluidFrameworkDeploymentSteps { } else if (step == 1) { // CORE CONTRACT: Superfluid (Host) DMZForwarder dmzForwarder = SuperfluidDMZForwarderDeployerLibrary.deploy(); // Deploy Host and initialize the test governance. - host = SuperfluidHostDeployerLibrary.deploy(true, false, address(dmzForwarder)); + // 3_000_000 is the min callback gas limit used in a prod deployment + host = SuperfluidHostDeployerLibrary.deploy(true, false, 3_000_000, address(dmzForwarder)); dmzForwarder.transferOwnership(address(host)); host.initialize(testGovernance); @@ -357,10 +358,15 @@ library SuperfluidDMZForwarderDeployerLibrary { } library SuperfluidHostDeployerLibrary { - function deploy(bool _nonUpgradable, bool _appWhiteListingEnabled, address dmzForwarderAddress) + function deploy( + bool _nonUpgradable, + bool _appWhiteListingEnabled, + uint64 callbackGasLimit, + address dmzForwarderAddress + ) external returns (Superfluid) { - return new Superfluid(_nonUpgradable, _appWhiteListingEnabled, dmzForwarderAddress); + return new Superfluid(_nonUpgradable, _appWhiteListingEnabled, callbackGasLimit, dmzForwarderAddress); } } diff --git a/packages/ethereum-contracts/ops-scripts/deploy-framework.js b/packages/ethereum-contracts/ops-scripts/deploy-framework.js index fe2b89e681..e758e07f7d 100644 --- a/packages/ethereum-contracts/ops-scripts/deploy-framework.js +++ b/packages/ethereum-contracts/ops-scripts/deploy-framework.js @@ -122,6 +122,7 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( useMocks, nonUpgradable, appWhiteListing, + appCallbackGasLimit, protocolReleaseVersion, outputFile, newSuperfluidLoader, @@ -149,6 +150,7 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( console.log("chain ID: ", chainId); console.log("deployer: ", deployerAddr); const config = getConfig(chainId); + if (config.isTestnet) { output += "IS_TESTNET=1\n"; } @@ -177,6 +179,10 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( appWhiteListing || config.gov_enableAppWhiteListing || !!process.env.ENABLE_APP_WHITELISTING; + appCallbackGasLimit = + appCallbackGasLimit || + config.appCallbackGasLimit || + !!process.env.APP_CALLBACK_GAS_LIMIT; newSuperfluidLoader = newSuperfluidLoader || !!process.env.NEW_SUPERFLUID_LOADER; console.log("app whitelisting enabled:", appWhiteListing); @@ -357,7 +363,7 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( const superfluidLogic = await web3tx( SuperfluidLogic.new, "SuperfluidLogic.new" - )(nonUpgradable, appWhiteListing, dmzForwarder.address); + )(nonUpgradable, appWhiteListing, appCallbackGasLimit, dmzForwarder.address); console.log( `Superfluid new code address ${superfluidLogic.address}` ); @@ -829,6 +835,14 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( } ); + // get previous callback gas limit, make sure we don't decrease it + const prevCallbackGasLimit = await superfluid.CALLBACK_GAS_LIMIT(); + if (prevCallbackGasLimit.toNumber() > appCallbackGasLimit) { + throw new Error("Cannot decrease app callback gas limit"); + } else if (prevCallbackGasLimit.toNumber() !== appCallbackGasLimit) { + console.log(` !!! CHANGING APP CALLBACK GAS LIMIT FROM ${prevCallbackGasLimit} to ${appCallbackGasLimit} !!!`); + } + // deploy new superfluid host logic superfluidNewLogicAddress = await deployContractIfCodeChanged( web3, @@ -841,7 +855,7 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( const superfluidLogic = await web3tx( SuperfluidLogic.new, "SuperfluidLogic.new" - )(nonUpgradable, appWhiteListing, dmzForwarderAddress); + )(nonUpgradable, appWhiteListing, appCallbackGasLimit, dmzForwarderAddress); output += `SUPERFLUID_HOST_LOGIC=${superfluidLogic.address}\n`; return superfluidLogic.address; } diff --git a/packages/ethereum-contracts/ops-scripts/libs/getConfig.js b/packages/ethereum-contracts/ops-scripts/libs/getConfig.js index 98bb0cb0da..8aef920ee3 100644 --- a/packages/ethereum-contracts/ops-scripts/libs/getConfig.js +++ b/packages/ethereum-contracts/ops-scripts/libs/getConfig.js @@ -22,10 +22,42 @@ module.exports = function getConfig(chainId) { trustedForwarders: ["0x3075b4dc7085C48A14A5A39BBa68F58B19545971"], }, + // persistent chains + + // eth-mainnet + 1: { + // we keep it low because mainnet is expensive and we don't want solvency risks + appCallbackGasLimit: 3000000, + }, + + // xdai-mainnet + 100: { + // half of the block gas limit of 17M + appCallbackGasLimit: 8500000, + }, + + // avalanche-fuji + 43113: { + // half of the block gas limit of 15M + appCallbackGasLimit: 7500000, + }, + // avalanche-c + 43114: { + // half of the block gas limit of 15M + appCallbackGasLimit: 7500000, + }, + // Celo Mainnet 42220: { gov_enableAppWhiteListing: false, - } + }, + + // scroll-mainnet + 534352: { + // we keep it low in order to minimize the chance of "proof overflows" + // see https://docs.scroll.io/en/technology/sequencer/execution-node/#circuit-capacity-checker + appCallbackGasLimit: 3000000, + }, }; const sfNw = sfMetadata.getNetworkByChainId(chainId); @@ -51,6 +83,7 @@ module.exports = function getConfig(chainId) { metadata: sfNw, resolverAddress: global?.process.env.RESOLVER_ADDRESS || sfNw?.contractsV1?.resolver, trustedForwarders: sfNw?.trustedForwarders, + appCallbackGasLimit: 15000000, ...EXTRA_CONFIG[chainId] }; }; diff --git a/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts b/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts index c727456791..2573dd827e 100644 --- a/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts +++ b/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts @@ -113,11 +113,13 @@ describe("Superfluid Host Contract", function () { const mock1 = await sfMockFactory.deploy( false /* nonUpgradable */, false /* appWhiteListingEnabled */, + 3000000 /* callbackGasLimit */, ZERO_ADDRESS /* dmzForwader */ ); const mock2 = await sfMockFactory.deploy( true /* nonUpgradable */, false /* appWhiteListingEnabled */, + 3000000 /* callbackGasLimit */, ZERO_ADDRESS /* dmzForwader */ ); await governance.updateContracts( @@ -2702,6 +2704,7 @@ describe("Superfluid Host Contract", function () { const mock1 = await mock1Factory.deploy( false /* nonUpgradable */, false /* appWhiteListingEnabled */, + 3000000 /* callbackGasLimit */, ZERO_ADDRESS /* dmzForwader */ ); await expectCustomError( diff --git a/packages/ethereum-contracts/test/ops-scripts/deployment.test.js b/packages/ethereum-contracts/test/ops-scripts/deployment.test.js index 9bbb62b166..cc934187fa 100644 --- a/packages/ethereum-contracts/test/ops-scripts/deployment.test.js +++ b/packages/ethereum-contracts/test/ops-scripts/deployment.test.js @@ -125,6 +125,7 @@ contract("Embedded deployment scripts", (accounts) => { const a1 = await web3tx(Superfluid.new, "Superfluid.new 1")( true, // nonUpgradable false, // appWhiteListingEnabled + 3000000, // callbackGasLimit ZERO_ADDRESS // dmzForwader ); assert.isFalse(await codeChanged(web3, Superfluid, a1.address)); From ab300e3e851d4e4ba7e082a9820d968bcc37682a Mon Sep 17 00:00:00 2001 From: Momodu Afegbua Date: Wed, 10 Jul 2024 07:50:52 -0500 Subject: [PATCH 22/42] use only v1 subgraphs (#1985) --- packages/sdk-core/tasks/testSchemasAndQueries.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/sdk-core/tasks/testSchemasAndQueries.sh b/packages/sdk-core/tasks/testSchemasAndQueries.sh index ba0519fac0..92e376f26b 100755 --- a/packages/sdk-core/tasks/testSchemasAndQueries.sh +++ b/packages/sdk-core/tasks/testSchemasAndQueries.sh @@ -33,12 +33,7 @@ for i in "${NETWORKS[@]}";do GRAPH_NETWORK="${LEGACY_NETWORK_NAMES[$i]:-$i}" - if [ "$SUBGRAPH_RELEASE_TAG" == "v1" ]; then - # No need for the legacy name here - SUBGRAPH_ENDPOINT="https://$i.subgraph.x.superfluid.dev" - else - SUBGRAPH_ENDPOINT="https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-$SUBGRAPH_RELEASE_TAG-$GRAPH_NETWORK" - fi + SUBGRAPH_ENDPOINT="https://subgraph-endpoints.superfluid.dev/$i/protocol-v1" testSchemaAndQueries From 88370d515608cf697180f8f544a8709a597a4d65 Mon Sep 17 00:00:00 2001 From: Miao ZhiCheng Date: Wed, 10 Jul 2024 17:09:26 +0300 Subject: [PATCH 23/42] Add pre-commit check in ci.feature (#1986) * workflow: lint-aways in ci.feature * workflow: check-pre-commit for ci.feature * lint packages/sdk-core/tasks/testSchemasAndQueries.sh * workflow: fix ci.feature * workflow: fix ci.feature * workflow: fix ci.feature --- .github/workflows/ci.feature.yml | 19 ++++++++++++++++++- package.json | 6 +++--- .../sdk-core/tasks/testSchemasAndQueries.sh | 9 --------- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.feature.yml b/.github/workflows/ci.feature.yml index 93fafaabed..0cb9d3b6fc 100644 --- a/.github/workflows/ci.feature.yml +++ b/.github/workflows/ci.feature.yml @@ -18,6 +18,10 @@ jobs: runs-on: ubuntu-latest + defaults: + run: + shell: nix develop . -c bash -xe {0} + outputs: build_solidity_semantic_money: ${{ env.BUILD_SOLIDITY_SEMANTIC_MONEY }} build_ethereum_contracts: ${{ env.BUILD_ETHEREUM_CONTRACTS }} @@ -28,6 +32,18 @@ jobs: build_automation_contracts: ${{ env.BUILD_AUTOMATION_CONTRACTS }} steps: + - uses: actions/checkout@v4 + + - uses: cachix/install-nix-action@v19 + with: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Initialize devShell + run: | + node --version + shellcheck --version + actionlint --version + - name: Show contexts env: HEAD_REF: ${{ github.head_ref }} @@ -40,7 +56,8 @@ jobs: echo github.head_ref: "$HEAD_REF" echo github.base_ref: ${{ github.base_ref }} - - uses: actions/checkout@v4 + - name: Run pre-commit check + run: npm run pre-commit - name: Check changeset run: tasks/check-changeset.sh ${{ github.sha }} dev diff --git a/package.json b/package.json index 5c5b090391..721f98049a 100644 --- a/package.json +++ b/package.json @@ -9,18 +9,18 @@ "npmClient": "yarn", "license": "MIT", "scripts": { - "postinstall": "yarn git-submodule:init && husky install", + "postinstall": "npm run git-submodule:init && husky install", "lint": "run-s lint:*", "lint:shellcheck": "tasks/shellcheck-all-tasks.sh", "lint:workspaces": "yarn workspaces run lint", "lint:actionlint": "actionlint .github/workflows/*.yml", - "build": "yarn build-essentials #synonym of build-essentials", + "build": "npm run build-essentials #synonym of build-essentials", "build-essentials": "set -ex;for i in metadata ethereum-contracts js-sdk sdk-core sdk-redux;do yarn workspace @superfluid-finance/$i build;done", "build-for-contracts-dev": "set -ex;for i in metadata ethereum-contracts js-sdk;do yarn workspace @superfluid-finance/$i build;done", "clean": "rm -rf node_modules; rm -rf packages/*/node_modules; yarn workspace @superfluid-finance/ethereum-contracts clean", "test": "set -ex;for i in ethereum-contracts;do yarn workspace @superfluid-finance/$i test;done", "show-versions": "lerna ls --long", - "pre-commit": "yarn lint:shellcheck && yarn workspaces run pre-commit", + "pre-commit": "npm run lint:shellcheck && npm run lint:actionlint && yarn workspaces run pre-commit", "git-submodule:init": "git submodule update --init --recursive", "git-submodule:update": "git submodule update --recursive", "git-submodule:sync": "git submodule update --remote --recursive;git submodule sync --recursive", diff --git a/packages/sdk-core/tasks/testSchemasAndQueries.sh b/packages/sdk-core/tasks/testSchemasAndQueries.sh index 92e376f26b..d698023616 100755 --- a/packages/sdk-core/tasks/testSchemasAndQueries.sh +++ b/packages/sdk-core/tasks/testSchemasAndQueries.sh @@ -25,16 +25,7 @@ function testSchemaAndQueries() { # for sdk-core releases: test deployed subgraphs for i in "${NETWORKS[@]}";do - # name mapping for subgraphs created before introducing canonical names - declare -A LEGACY_NETWORK_NAMES=( - ["xdai-mainnet"]="xdai" - ["polygon-mainnet"]="matic" - ) - - GRAPH_NETWORK="${LEGACY_NETWORK_NAMES[$i]:-$i}" - SUBGRAPH_ENDPOINT="https://subgraph-endpoints.superfluid.dev/$i/protocol-v1" testSchemaAndQueries - done From 2682cce147d4c6aa401cf5c262991090e43c5b78 Mon Sep 17 00:00:00 2001 From: DemoYeti <164791169+DemoYeti@users.noreply.github.com> Date: Wed, 10 Jul 2024 16:11:04 -0400 Subject: [PATCH 24/42] feat(doc): center header (#1987) --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c55fc4f721..21ebbb3c8f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -

Welcome to superfluid protocol-monorepo 👋

+
+

Welcome to superfluid protocol-monorepo 👋

@@ -27,6 +28,7 @@

+
> Contracts and resources for the Superfluid Protocol From 72eab9fb2c783bf88f6cd12edeacb69f4c11caad Mon Sep 17 00:00:00 2001 From: Momodu Afegbua Date: Fri, 12 Jul 2024 07:35:41 -0500 Subject: [PATCH 25/42] [SUBGRAPH] Graph studio deployment (#1983) * added deploy to graphstudio * ci handler deploy to graphstudio * fixed ci option typo * added eth-mainnet to supported networks * set version label as commit hash * fixed shellcheck * ignore shellcheck 2181 --- .github/workflows/call.deploy-subgraph.yml | 2 +- .../handler.deploy-production-subgraphs.yml | 3 ++- packages/subgraph/tasks/deploy.sh | 13 ++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/call.deploy-subgraph.yml b/.github/workflows/call.deploy-subgraph.yml index c4f57b3e85..5aab6388c3 100644 --- a/.github/workflows/call.deploy-subgraph.yml +++ b/.github/workflows/call.deploy-subgraph.yml @@ -5,7 +5,7 @@ on: inputs: vendor: required: true - description: "Where to deploy subgraph to; superfluid, goldsky or airstack" + description: "Where to deploy subgraph to; superfluid, goldsky, graph or airstack" type: string deployment_env: required: true diff --git a/.github/workflows/handler.deploy-production-subgraphs.yml b/.github/workflows/handler.deploy-production-subgraphs.yml index c2e43093c3..19d9aaa702 100644 --- a/.github/workflows/handler.deploy-production-subgraphs.yml +++ b/.github/workflows/handler.deploy-production-subgraphs.yml @@ -12,12 +12,13 @@ on: inputs: vendor: required: true - description: "Where to deploy subgraph to; one of `superfluid`, `goldsky` or `airstack`" + description: "Where to deploy subgraph to; one of `superfluid`, `goldsky`, `graph` or `airstack`" default: "superfluid" type: choice options: - superfluid - goldsky + - graph - airstack deployment_env: required: true diff --git a/packages/subgraph/tasks/deploy.sh b/packages/subgraph/tasks/deploy.sh index 698b2fcbd0..80aab6d83e 100755 --- a/packages/subgraph/tasks/deploy.sh +++ b/packages/subgraph/tasks/deploy.sh @@ -13,7 +13,7 @@ SUPPORTED_VENDORS=( "graph" "satsuma" "superfluid" "goldsky" "airstack" ) # list of supported networks by vendor # shellcheck disable=SC2034,SC2207 -GRAPH_NETWORKS=( $($JQ -r .[] ./hosted-service-networks.json) ) || exit 1 +GRAPH_NETWORKS=( "polygon-mainnet" "eth-mainnet" ) # shellcheck disable=SC2034 SATSUMA_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "eth-mainnet" "eth-sepolia" "optimism-mainnet" "base-mainnet") # shellcheck disable=SC2034 @@ -77,15 +77,14 @@ deploy_to_graph() { ) local graphNetwork="${legacyNetworkNames[$network]:-$network}" - local subgraphName="superfluid-finance/protocol-$DEPLOYMENT_ENV-$graphNetwork" + local subgraphName="protocol-$DEPLOYMENT_ENV-$graphNetwork" echo "********* Deploying $network subgraph $subgraphName to The Graph (hosted service). **********" + $GRAPH_CLI deploy \ - --product hosted-service \ - "$subgraphName" \ - --node https://api.thegraph.com/deploy/ \ - --ipfs https://api.thegraph.com/ipfs \ - --deploy-key "$THE_GRAPH_ACCESS_TOKEN" + --studio "$subgraphName" \ + --deploy-key "$THE_GRAPH_ACCESS_TOKEN" \ + --version-label "$VERSION_LABEL" } deploy_to_satsuma() { From 44b6510da3ab026bfdde146846988597cc8829d9 Mon Sep 17 00:00:00 2001 From: Didi Date: Mon, 15 Jul 2024 14:41:42 +0200 Subject: [PATCH 26/42] [ETHEREUM-CONTRACTS] Release 1.10.0 (#1988) * bumping ethereum-contracts version to v1.9.2 * add DMZForwarder to verification script * bumping ethereum-contracts version to 1.10.0 --- packages/automation-contracts/autowrap/package.json | 4 ++-- packages/automation-contracts/scheduler/package.json | 4 ++-- packages/ethereum-contracts/CHANGELOG.md | 2 +- packages/ethereum-contracts/package.json | 4 ++-- .../ethereum-contracts/tasks/etherscan-verify-framework.sh | 4 ++++ packages/hot-fuzz/package.json | 2 +- packages/js-sdk/package.json | 4 ++-- packages/sdk-core/package.json | 4 ++-- packages/subgraph/package.json | 2 +- 9 files changed, 17 insertions(+), 13 deletions(-) diff --git a/packages/automation-contracts/autowrap/package.json b/packages/automation-contracts/autowrap/package.json index 405107484a..0020552fd1 100644 --- a/packages/automation-contracts/autowrap/package.json +++ b/packages/automation-contracts/autowrap/package.json @@ -14,7 +14,7 @@ }, "devDependencies": { "@openzeppelin/contracts": "4.9.6", - "@superfluid-finance/ethereum-contracts": "^1.9.1", - "@superfluid-finance/metadata": "^1.2.6" + "@superfluid-finance/ethereum-contracts": "^1.10.0", + "@superfluid-finance/metadata": "^1.3.1" } } diff --git a/packages/automation-contracts/scheduler/package.json b/packages/automation-contracts/scheduler/package.json index 6c2dbe0d9a..e5e477d5e0 100644 --- a/packages/automation-contracts/scheduler/package.json +++ b/packages/automation-contracts/scheduler/package.json @@ -14,7 +14,7 @@ }, "devDependencies": { "@openzeppelin/contracts": "4.9.6", - "@superfluid-finance/ethereum-contracts": "^1.9.1", - "@superfluid-finance/metadata": "^1.2.6" + "@superfluid-finance/ethereum-contracts": "^1.10.0", + "@superfluid-finance/metadata": "^1.3.1" } } diff --git a/packages/ethereum-contracts/CHANGELOG.md b/packages/ethereum-contracts/CHANGELOG.md index 9dd9ba725b..2c5b8c8d50 100644 --- a/packages/ethereum-contracts/CHANGELOG.md +++ b/packages/ethereum-contracts/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to the ethereum-contracts will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [unreleased] +## [v1.10.0] ### Breaking diff --git a/packages/ethereum-contracts/package.json b/packages/ethereum-contracts/package.json index 12ec29657d..6f38908b9d 100644 --- a/packages/ethereum-contracts/package.json +++ b/packages/ethereum-contracts/package.json @@ -1,6 +1,6 @@ { "name": "@superfluid-finance/ethereum-contracts", - "version": "1.9.1", + "version": "1.10.0", "description": " Ethereum contracts implementation for the Superfluid Protocol", "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/ethereum-contracts#readme", "repository": { @@ -93,7 +93,7 @@ "@safe-global/safe-service-client": "^2.0.3", "@safe-global/safe-web3-lib": "^1.9.4", "@superfluid-finance/js-sdk": "^0.6.3", - "@superfluid-finance/metadata": "^1.2.6", + "@superfluid-finance/metadata": "^1.3.1", "async": "^3.2.5", "csv-writer": "^1.6.0", "ethers": "^5.7.2", diff --git a/packages/ethereum-contracts/tasks/etherscan-verify-framework.sh b/packages/ethereum-contracts/tasks/etherscan-verify-framework.sh index 7444a09a09..6631786d4d 100755 --- a/packages/ethereum-contracts/tasks/etherscan-verify-framework.sh +++ b/packages/ethereum-contracts/tasks/etherscan-verify-framework.sh @@ -67,6 +67,10 @@ if [ -n "$RESOLVER" ]; then try_verify Resolver@"${RESOLVER}" fi +if [ -n "$DMZ_FORWARDER" ]; then + try_verify DMZForwarder@"${DMZ_FORWARDER}" +fi + if [ -n "$SUPERFLUID_HOST_LOGIC" ]; then # verify the logic contract. May or may not be already set as a proxy implementation try_verify Superfluid@"${SUPERFLUID_HOST_LOGIC}" diff --git a/packages/hot-fuzz/package.json b/packages/hot-fuzz/package.json index 0741f7d3fa..98dcd72656 100644 --- a/packages/hot-fuzz/package.json +++ b/packages/hot-fuzz/package.json @@ -25,7 +25,7 @@ "@superfluid-finance/ethereum-contracts": "1.8.0" }, "devDependencies": { - "@superfluid-finance/ethereum-contracts": "^1.9.1" + "@superfluid-finance/ethereum-contracts": "^1.10.0" }, "license": "AGPL-3.0", "bugs": { diff --git a/packages/js-sdk/package.json b/packages/js-sdk/package.json index ceb3cd53a7..1f665a8007 100644 --- a/packages/js-sdk/package.json +++ b/packages/js-sdk/package.json @@ -43,13 +43,13 @@ "cloc": "sh tasks/cloc.sh" }, "dependencies": { - "@superfluid-finance/metadata": "^1.2.6", + "@superfluid-finance/metadata": "^1.3.1", "@truffle/contract": "4.6.31", "auto-bind": "4.0.0", "node-fetch": "2.7.0" }, "devDependencies": { - "@superfluid-finance/ethereum-contracts": "^1.9.1", + "@superfluid-finance/ethereum-contracts": "^1.10.0", "chai-as-promised": "^7.1.1", "webpack": "^5.90.1", "webpack-bundle-analyzer": "^4.10.1", diff --git a/packages/sdk-core/package.json b/packages/sdk-core/package.json index 4dc2cb66d5..526ad6c16b 100644 --- a/packages/sdk-core/package.json +++ b/packages/sdk-core/package.json @@ -56,8 +56,8 @@ "url": "https://github.com/superfluid-finance/protocol-monorepo/issues" }, "dependencies": { - "@superfluid-finance/ethereum-contracts": "^1.9.1", - "@superfluid-finance/metadata": "^1.2.6", + "@superfluid-finance/ethereum-contracts": "^1.10.0", + "@superfluid-finance/metadata": "^1.3.1", "browserify": "^17.0.0", "graphql-request": "^6.1.0", "lodash": "^4.17.21", diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 44a15d206a..3b6554cbfe 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -56,7 +56,7 @@ "mustache": "^4.2.0" }, "devDependencies": { - "@superfluid-finance/metadata": "^1.2.6", + "@superfluid-finance/metadata": "^1.3.1", "coingecko-api": "^1.0.10", "graphql": "^16.8.1", "graphql-request": "^6.1.0", From 5106c4441d84cf52ef42802efac6f6a960c654f0 Mon Sep 17 00:00:00 2001 From: Kaspar Kallas Date: Tue, 23 Jul 2024 14:20:02 +0300 Subject: [PATCH 27/42] [automations][epic] Vesting Scheduler V2 (#1952) * chore: no-op for pull request diff Signed-off-by: Miao, ZhiCheng * [automations] Vesting Scheduler V2 ergonomic improvements (#1904) * allow creation and execution of the vesting schedule in the current block * add createVestingSchedule function which works with totalAmount and totalDuration * add overloads without ctx * need to improve testing coverage * add more overloads with fewer parameters * reorganize the functions * add create and execute schedule mvp * work in progress, needs proper testing * remove try-catch from early end * prefer reverting the early end until stream can be closed without needing the transfer (i.e. it will slightly overflow in that case) * add dust amount fix (wip) * needs proper test cover * consider the log events * rename from dustFixAmount to remainderAmount * add to log as well * fix test issues * tiny comment rename * remove functions create and execute functions with cliff period * add a comprehensive fuzzed test for createScheduleFromAmountAndDuration * slightly change end compensation & remainder handling * use greater or equal handling for case when only remainder needs to be transferred * assert transferFrom success result * add todo-s, improve tests * keep V1 contract, separate V2 explicitly * update deploy script for v2 * unify deploy scripts * use newer host.registerApp & unify deploy scripts - add base-mainnet option * clean-up * add diff generation script & completely revert VestingScheduler.sol Signed-off-by: Miao, ZhiCheng * [AUTOMATIONS] Vesting Scheduler - add claimable schedule feature (#1944) * added claimable vesting feature * add check on `_executeCliffAndFlow` for claimable schedules * updated time window condition on schedule claim * fix typo * add some unit tests for claiming schedules * increased test coverage * added claimValidityDate feature * updated tests * add claimValidityDate param to createSchedules function * updated unit tests * refactor internal function params (stack too deep) + add claimValidityDate to schedule creation event * removed `isClaimable` boolean from VestingSchedule data structure * remove internal function creating dupplication * updated claim validity date check logic * refactor: re-order the claimValidityDate in the event - keep it as one of the last for backwards compatibility * refactor: rename error CannotClaimFlowOnBehalf to CannotClaimScheduleOnBehalf * fix: remove merge issues from hardhat configs * fix: remove duplication from hardhat config * fix: moved & rename params struct into VestingSchedulerV2 contract --------- Co-authored-by: Kaspar Kallas Co-authored-by: Kaspar Kallas Signed-off-by: Miao, ZhiCheng * [AUTOMATIONS] VestingSchdulerV2 improvements (#1963) * update: change claimValidityDate to claimPeriod in function that takes amount and duration as params * fix: clear claimValidityDate on claim + add checks to execute* functions * update: add VestingClaimed event to `_executeCliffAndFlow` function Signed-off-by: Miao, ZhiCheng * [automations] VestingSchedulerV2 add helpful view functions (#1965) * refactor: use uint96 for remainderAmount & change packing order * feat: add `getMaximumNeededTokenAllowance` helper function with a test * refactor: converge on view function usage * chore: add comments * chore: clean-up * chore: reset whitespace Signed-off-by: Miao, ZhiCheng * [AUTOMATIONS] VestingSchedulerV2 claim after end date (#1964) * update: change claimValidityDate to claimPeriod in function that takes amount and duration as params * fix: clear claimValidityDate on claim + add checks to execute* functions * update: add VestingClaimed event to `_executeCliffAndFlow` function * feature: add capabilities to have claimValidityDate after endDate * fix: rearrange `_executeCliffAndFlow` logic * test: increased coverage for executeCliffAndFlow * test: added revert check on `executeEndVesting` test * refactor: clean-up - add additional asserts - change log event order (to match other situation) --------- Co-authored-by: Kaspar Kallas Signed-off-by: Miao, ZhiCheng * fix: check if schedule is claimed on executeEndVesting Signed-off-by: Miao, ZhiCheng * test: increased `getMaximumNeededTokenAllowance` coverage Signed-off-by: Miao, ZhiCheng * feat: added remainderAmount in `VestingScheduleUpdated` Signed-off-by: Miao, ZhiCheng * add tests & fixes Signed-off-by: Miao, ZhiCheng * [automations] Vesting Scheduler V2 refactoring after single-transfer feature (#1969) * refactor: explicit functions - _claim - _exececuteAtSingleTransfer - _getTotalVestedAmount * chore: test that schedule is deleted in more places * refactor: use more foundry bound in tests * chore: test better the scenario where the schedule is not ended on time * refactor: refactor to using aggregate object - make executeCliffAndFlow public * chore: improve the test further * refactor: use aggregate in all places * refactor: re-order some functions based on visibility * chore: add small comment * refactor: small whitespace fix * refactor: use named parameters when using structs * refactor: remove unnecessary comments * fix: change type in log event * chore: test claim event * chore: add version Signed-off-by: Miao, ZhiCheng * chore: add optimism hardhat config Signed-off-by: Miao, ZhiCheng * refactor: unify `createClaimableVestingSchedule` and `createVestingSchedule` functions Signed-off-by: Miao, ZhiCheng * refactor: reoder `createVestingScheduleFromAmountAndDuration` function params Signed-off-by: Miao, ZhiCheng * refactor: unify `createVestingScheduleFormAmountAndDuration` and `createClaimableVestingScheduleFormAmountAndDuration` functions Signed-off-by: Miao, ZhiCheng * [automations] Vesting Scheduler V2 final clean-up (#1973) * refactor: unify `createClaimableVestingSchedule` and `createVestingSchedule` functions * refactor: reoder `createVestingScheduleFromAmountAndDuration` function params * refactor: unify `createVestingScheduleFormAmountAndDuration` and `createClaimableVestingScheduleFormAmountAndDuration` functions * refactor: remove confusing overloads * feat: add cliffPeriod to createAndExecute functions * unify modifiers & remove a helper function * refactor: use normalizeStartDate function to get a function to be pure * refactor: remove unnecessary passing of ctx * refactor: rename * add more claim fuzz tests * change log event semantics slightly for single transfer * remove version --------- Co-authored-by: Pilou <76021631+0xPilou@users.noreply.github.com> Signed-off-by: Miao, ZhiCheng * [automations] Vesting scheduler v2 - fix & v1 compatibility (#1977) * refactor: unify `createClaimableVestingSchedule` and `createVestingSchedule` functions * refactor: reoder `createVestingScheduleFromAmountAndDuration` function params * refactor: unify `createVestingScheduleFormAmountAndDuration` and `createClaimableVestingScheduleFormAmountAndDuration` functions * chore: add `createVestingSchedule` v1 overload for backward compatibility * fix: remove `cliffPeriod` parameter in `createAndExecuteVestingScheduleFromAmountAndDuration` function * refactor: replace `_getSender(bytes(""))` by `msg.sender` Signed-off-by: Miao, ZhiCheng * refactor: re-order functions for better readability Signed-off-by: Miao, ZhiCheng --------- Signed-off-by: Miao, ZhiCheng Co-authored-by: Pilou <76021631+0xPilou@users.noreply.github.com> --- README.md | 2 +- .../autowrap/.env-example | 9 - .../autowrap/.env.example | 11 + .../autowrap/hardhat.config.js | 46 +- .../autowrap/package.json | 1 + .../scheduler/.env-example | 9 - .../scheduler/.env.example | 16 + .../scheduler/audit/generate_diffs.sh | 4 + .../scheduler/contracts/FlowScheduler.sol | 4 +- .../scheduler/contracts/VestingScheduler.sol | 6 +- .../contracts/VestingSchedulerV2.sol | 718 ++++++ .../contracts/interface/IVestingScheduler.sol | 2 +- .../interface/IVestingSchedulerV2.sol | 387 +++ .../scheduler/deploy/deploy.js | 77 +- .../scheduler/hardhat.config.js | 53 +- .../scheduler/package.json | 3 +- .../scheduler/test/FlowScheduler.t.sol | 2 +- .../test/FlowSchedulerResolver.t.sol | 2 +- .../scheduler/test/VestingScheduler.t.sol | 4 +- .../scheduler/test/VestingSchedulerV2.t.sol | 2283 +++++++++++++++++ 20 files changed, 3579 insertions(+), 60 deletions(-) delete mode 100644 packages/automation-contracts/autowrap/.env-example create mode 100644 packages/automation-contracts/autowrap/.env.example delete mode 100644 packages/automation-contracts/scheduler/.env-example create mode 100644 packages/automation-contracts/scheduler/.env.example create mode 100755 packages/automation-contracts/scheduler/audit/generate_diffs.sh create mode 100644 packages/automation-contracts/scheduler/contracts/VestingSchedulerV2.sol create mode 100644 packages/automation-contracts/scheduler/contracts/interface/IVestingSchedulerV2.sol create mode 100644 packages/automation-contracts/scheduler/test/VestingSchedulerV2.t.sol diff --git a/README.md b/README.md index 21ebbb3c8f..d7a2a27f42 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,7 @@ Thanks goes to these wonderful people ([🐸](https://allcontributors.org/docs/e - + diff --git a/packages/automation-contracts/autowrap/.env-example b/packages/automation-contracts/autowrap/.env-example deleted file mode 100644 index 4b025569de..0000000000 --- a/packages/automation-contracts/autowrap/.env-example +++ /dev/null @@ -1,9 +0,0 @@ -# .env-example - -POLYGON_PRIVATE_KEY= -BSC_PRIVATE_KEY= - -POLYGON_URL= -BSC_URL= - -ETHERSCAN_API_KEY = diff --git a/packages/automation-contracts/autowrap/.env.example b/packages/automation-contracts/autowrap/.env.example new file mode 100644 index 0000000000..6caf6fef41 --- /dev/null +++ b/packages/automation-contracts/autowrap/.env.example @@ -0,0 +1,11 @@ +# .env-example + +PRIVATE_KEY= + +MUMBAI_URL= +POLYGON_URL= +BSC_URL= +OPSEPOLIA_URL= +BASE_URL=https://mainnet.base.org + +ETHERSCAN_API_KEY= \ No newline at end of file diff --git a/packages/automation-contracts/autowrap/hardhat.config.js b/packages/automation-contracts/autowrap/hardhat.config.js index ef1e4d8be5..923ae77b0e 100644 --- a/packages/automation-contracts/autowrap/hardhat.config.js +++ b/packages/automation-contracts/autowrap/hardhat.config.js @@ -18,8 +18,8 @@ module.exports = { optimizer: { enabled: true, runs: 200, - } - } + }, + }, }, networks: { localhost: { @@ -29,15 +29,33 @@ module.exports = { polygon: { url: process.env.POLYGON_URL || "", accounts: - process.env.POLYGON_PRIVATE_KEY !== undefined ? [process.env.POLYGON_PRIVATE_KEY] : [], + process.env.PRIVATE_KEY !== undefined + ? [process.env.PRIVATE_KEY] + : [], }, bsc: { url: process.env.BSC_URL || "", accounts: - process.env.BSC_PRIVATE_KEY !== undefined ? [process.env.BSC_PRIVATE_KEY] : [], + process.env.PRIVATE_KEY !== undefined + ? [process.env.PRIVATE_KEY] + : [], + }, + opsepolia: { + url: process.env.OPSEPOLIA_URL || "", + accounts: + process.env.PRIVATE_KEY !== undefined + ? [process.env.PRIVATE_KEY] + : [], + }, + "base-mainnet": { + url: process.env.BASE_URL || "", + accounts: + process.env.PRIVATE_KEY !== undefined + ? [process.env.PRIVATE_KEY] + : [], + gasPrice: 1000000000, }, }, - namedAccounts: { deployer: { default: 0, @@ -45,5 +63,23 @@ module.exports = { }, etherscan: { apiKey: process.env.ETHERSCAN_API_KEY, + customChains: [ + { + network: "opsepolia", + chainId: 11155420, + urls: { + apiURL: "https://api-sepolia-optimistic.etherscan.io/api", + browserURL: "https://sepolia-optimism.etherscan.io/", + }, + }, + { + network: "base-mainnet", + chainId: 8453, + urls: { + apiURL: "https://api.basescan.org/api", + browserURL: "https://basescan.org/", + }, + }, + ], }, }; diff --git a/packages/automation-contracts/autowrap/package.json b/packages/automation-contracts/autowrap/package.json index 0020552fd1..ec0852e5f0 100644 --- a/packages/automation-contracts/autowrap/package.json +++ b/packages/automation-contracts/autowrap/package.json @@ -6,6 +6,7 @@ "scripts": { "test": "forge test", "build": "forge build", + "deploy": "npx hardhat deploy --network", "lint": "run-s lint:*", "lint:sol": "solhint -w 0 contracts/*.sol contracts/*/*.sol && echo '✔ Your .sol files look good.'", "pre-commit": "if [ ! -z \"$(git status -s .)\" ];then run-s pre-commit:*;else true;fi", diff --git a/packages/automation-contracts/scheduler/.env-example b/packages/automation-contracts/scheduler/.env-example deleted file mode 100644 index 4b025569de..0000000000 --- a/packages/automation-contracts/scheduler/.env-example +++ /dev/null @@ -1,9 +0,0 @@ -# .env-example - -POLYGON_PRIVATE_KEY= -BSC_PRIVATE_KEY= - -POLYGON_URL= -BSC_URL= - -ETHERSCAN_API_KEY = diff --git a/packages/automation-contracts/scheduler/.env.example b/packages/automation-contracts/scheduler/.env.example new file mode 100644 index 0000000000..19cb641fc6 --- /dev/null +++ b/packages/automation-contracts/scheduler/.env.example @@ -0,0 +1,16 @@ +# .env-example + +PRIVATE_KEY= + +MUMBAI_URL= +POLYGON_URL= +BSC_URL= +OPSEPOLIA_URL= +BASE_URL=https://mainnet.base.org +OPTIMISM_URL= + +ETHERSCAN_API_KEY= + +DEPLOY_FLOW_SCHEDULER= +DEPLOY_VESTING_SCHEDULER= +DEPLOY_VESTING_SCHEDULER_V2= \ No newline at end of file diff --git a/packages/automation-contracts/scheduler/audit/generate_diffs.sh b/packages/automation-contracts/scheduler/audit/generate_diffs.sh new file mode 100755 index 0000000000..e257ba3be9 --- /dev/null +++ b/packages/automation-contracts/scheduler/audit/generate_diffs.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +git diff -U9999 --no-index --minimal --ignore-cr-at-eol --ignore-space-at-eol ./../contracts/interface/IVestingScheduler.sol ./../contracts/interface/IVestingSchedulerV2.sol > diff_IVestingScheduler_vs_IVestingSchedulerV2.txt +git diff -U9999 --no-index --minimal --ignore-cr-at-eol --ignore-space-at-eol ./../contracts/VestingScheduler.sol ./../contracts/VestingSchedulerV2.sol > diff_VestingScheduler_vs_VestingSchedulerV2.txt \ No newline at end of file diff --git a/packages/automation-contracts/scheduler/contracts/FlowScheduler.sol b/packages/automation-contracts/scheduler/contracts/FlowScheduler.sol index 2f7cf24435..263a967ccd 100644 --- a/packages/automation-contracts/scheduler/contracts/FlowScheduler.sol +++ b/packages/automation-contracts/scheduler/contracts/FlowScheduler.sol @@ -19,7 +19,7 @@ contract FlowScheduler is IFlowScheduler, SuperAppBase { using CFAv1Library for CFAv1Library.InitData; CFAv1Library.InitData public cfaV1; //initialize cfaV1 variable - constructor(ISuperfluid host, string memory registrationKey) { + constructor(ISuperfluid host) { // Initialize CFA Library cfaV1 = CFAv1Library.InitData( host, @@ -40,7 +40,7 @@ contract FlowScheduler is IFlowScheduler, SuperAppBase { SuperAppDefinitions.AFTER_AGREEMENT_UPDATED_NOOP | SuperAppDefinitions.BEFORE_AGREEMENT_TERMINATED_NOOP | SuperAppDefinitions.AFTER_AGREEMENT_TERMINATED_NOOP; - host.registerAppWithKey(configWord, registrationKey); + host.registerApp(configWord); } /// @dev IFlowScheduler.createFlowSchedule implementation. diff --git a/packages/automation-contracts/scheduler/contracts/VestingScheduler.sol b/packages/automation-contracts/scheduler/contracts/VestingScheduler.sol index 5bb4ee2e5f..9f6fd0c6c9 100644 --- a/packages/automation-contracts/scheduler/contracts/VestingScheduler.sol +++ b/packages/automation-contracts/scheduler/contracts/VestingScheduler.sol @@ -18,7 +18,7 @@ contract VestingScheduler is IVestingScheduler, SuperAppBase { uint32 public constant START_DATE_VALID_AFTER = 3 days; uint32 public constant END_DATE_VALID_BEFORE = 1 days; - constructor(ISuperfluid host, string memory registrationKey) { + constructor(ISuperfluid host) { cfaV1 = CFAv1Library.InitData( host, IConstantFlowAgreementV1( @@ -37,7 +37,7 @@ contract VestingScheduler is IVestingScheduler, SuperAppBase { SuperAppDefinitions.AFTER_AGREEMENT_UPDATED_NOOP | SuperAppDefinitions.BEFORE_AGREEMENT_TERMINATED_NOOP | SuperAppDefinitions.AFTER_AGREEMENT_TERMINATED_NOOP; - host.registerAppWithKey(configWord, registrationKey); + host.registerApp(configWord); } /// @dev IVestingScheduler.createVestingSchedule implementation. @@ -254,4 +254,4 @@ contract VestingScheduler is IVestingScheduler, SuperAppBase { (,int96 flowRate,,) = cfaV1.cfa.getFlow(superToken, sender, receiver); return flowRate != 0; } -} +} \ No newline at end of file diff --git a/packages/automation-contracts/scheduler/contracts/VestingSchedulerV2.sol b/packages/automation-contracts/scheduler/contracts/VestingSchedulerV2.sol new file mode 100644 index 0000000000..8163826012 --- /dev/null +++ b/packages/automation-contracts/scheduler/contracts/VestingSchedulerV2.sol @@ -0,0 +1,718 @@ +// SPDX-License-Identifier: AGPLv3 +// solhint-disable not-rely-on-time +pragma solidity ^0.8.0; +import { + ISuperfluid, ISuperToken, SuperAppDefinitions, IConstantFlowAgreementV1 +} from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol"; +import { SuperAppBase } from "@superfluid-finance/ethereum-contracts/contracts/apps/SuperAppBase.sol"; +import { CFAv1Library } from "@superfluid-finance/ethereum-contracts/contracts/apps/CFAv1Library.sol"; +import { IVestingSchedulerV2 } from "./interface/IVestingSchedulerV2.sol"; +import { SafeMath } from "@openzeppelin/contracts/utils/math/SafeMath.sol"; +import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; + +contract VestingSchedulerV2 is IVestingSchedulerV2, SuperAppBase { + using CFAv1Library for CFAv1Library.InitData; + CFAv1Library.InitData public cfaV1; + mapping(bytes32 => VestingSchedule) public vestingSchedules; // id = keccak(supertoken, sender, receiver) + + uint32 public constant MIN_VESTING_DURATION = 7 days; + uint32 public constant START_DATE_VALID_AFTER = 3 days; + uint32 public constant END_DATE_VALID_BEFORE = 1 days; + + struct ScheduleAggregate { + ISuperToken superToken; + address sender; + address receiver; + bytes32 id; + VestingSchedule schedule; + } + + constructor(ISuperfluid host) { + cfaV1 = CFAv1Library.InitData( + host, + IConstantFlowAgreementV1( + address( + host.getAgreementClass( + keccak256("org.superfluid-finance.agreements.ConstantFlowAgreement.v1") + ) + ) + ) + ); + // Superfluid SuperApp registration. This is a dumb SuperApp, only for front-end tx batch calls. + uint256 configWord = SuperAppDefinitions.APP_LEVEL_FINAL | + SuperAppDefinitions.BEFORE_AGREEMENT_CREATED_NOOP | + SuperAppDefinitions.AFTER_AGREEMENT_CREATED_NOOP | + SuperAppDefinitions.BEFORE_AGREEMENT_UPDATED_NOOP | + SuperAppDefinitions.AFTER_AGREEMENT_UPDATED_NOOP | + SuperAppDefinitions.BEFORE_AGREEMENT_TERMINATED_NOOP | + SuperAppDefinitions.AFTER_AGREEMENT_TERMINATED_NOOP; + host.registerApp(configWord); + } + + /// @dev IVestingScheduler.createVestingSchedule implementation. + function createVestingSchedule( + ISuperToken superToken, + address receiver, + uint32 startDate, + uint32 cliffDate, + int96 flowRate, + uint256 cliffAmount, + uint32 endDate, + uint32 claimValidityDate, + bytes memory ctx + ) external returns (bytes memory newCtx) { + newCtx = ctx; + address sender = _getSender(ctx); + + _validateAndCreateVestingSchedule( + ScheduleCreationParams({ + superToken: superToken, + sender: sender, + receiver: receiver, + startDate: _normalizeStartDate(startDate), + claimValidityDate: claimValidityDate, + cliffDate: cliffDate, + flowRate: flowRate, + cliffAmount: cliffAmount, + endDate: endDate, + remainderAmount: 0 + }) + ); + } + + /// @dev IVestingScheduler.createVestingSchedule implementation. + function createVestingSchedule( + ISuperToken superToken, + address receiver, + uint32 startDate, + uint32 cliffDate, + int96 flowRate, + uint256 cliffAmount, + uint32 endDate, + uint32 claimValidityDate + ) external { + _validateAndCreateVestingSchedule( + ScheduleCreationParams({ + superToken: superToken, + sender: msg.sender, + receiver: receiver, + startDate: _normalizeStartDate(startDate), + claimValidityDate: claimValidityDate, + cliffDate: cliffDate, + flowRate: flowRate, + cliffAmount: cliffAmount, + endDate: endDate, + remainderAmount: 0 + }) + ); + } + + /// @dev IVestingScheduler.createVestingSchedule implementation. + /// @dev Note: VestingScheduler (V1) compatible function + function createVestingSchedule( + ISuperToken superToken, + address receiver, + uint32 startDate, + uint32 cliffDate, + int96 flowRate, + uint256 cliffAmount, + uint32 endDate, + bytes memory ctx + ) external returns (bytes memory newCtx) { + newCtx = ctx; + address sender = _getSender(ctx); + + _validateAndCreateVestingSchedule( + ScheduleCreationParams({ + superToken: superToken, + sender: sender, + receiver: receiver, + startDate: _normalizeStartDate(startDate), + claimValidityDate: 0, + cliffDate: cliffDate, + flowRate: flowRate, + cliffAmount: cliffAmount, + endDate: endDate, + remainderAmount: 0 + }) + ); + } + + /// @dev IVestingScheduler.createVestingScheduleFromAmountAndDuration implementation. + /// @dev Note: creating from amount and duration is the preferred way + function createVestingScheduleFromAmountAndDuration( + ISuperToken superToken, + address receiver, + uint256 totalAmount, + uint32 totalDuration, + uint32 startDate, + uint32 cliffPeriod, + uint32 claimPeriod, + bytes memory ctx + ) external returns (bytes memory newCtx) { + newCtx = ctx; + address sender = _getSender(ctx); + + _validateAndCreateVestingSchedule( + mapCreateVestingScheduleParams( + superToken, + sender, + receiver, + totalAmount, + totalDuration, + _normalizeStartDate(startDate), + cliffPeriod, + claimPeriod + ) + ); + } + + /// @dev IVestingScheduler.createVestingScheduleFromAmountAndDuration implementation. + function createVestingScheduleFromAmountAndDuration( + ISuperToken superToken, + address receiver, + uint256 totalAmount, + uint32 totalDuration, + uint32 startDate, + uint32 cliffPeriod, + uint32 claimPeriod + ) external { + _validateAndCreateVestingSchedule( + mapCreateVestingScheduleParams( + superToken, + msg.sender, + receiver, + totalAmount, + totalDuration, + _normalizeStartDate(startDate), + cliffPeriod, + claimPeriod + ) + ); + } + + /// @dev IVestingScheduler.mapCreateVestingScheduleParams implementation. + function mapCreateVestingScheduleParams( + ISuperToken superToken, + address sender, + address receiver, + uint256 totalAmount, + uint32 totalDuration, + uint32 startDate, + uint32 cliffPeriod, + uint32 claimPeriod + ) public pure override returns (ScheduleCreationParams memory params) { + uint32 claimValidityDate = claimPeriod != 0 + ? startDate + claimPeriod + : 0; + + uint32 endDate = startDate + totalDuration; + int96 flowRate = SafeCast.toInt96( + SafeCast.toInt256(totalAmount / totalDuration) + ); + uint96 remainderAmount = SafeCast.toUint96( + totalAmount - (SafeCast.toUint256(flowRate) * totalDuration) + ); + + if (cliffPeriod == 0) { + params = ScheduleCreationParams({ + superToken: superToken, + sender: sender, + receiver: receiver, + startDate: startDate, + claimValidityDate: claimValidityDate, + cliffDate: 0, + flowRate: flowRate, + cliffAmount: 0, + endDate: endDate, + remainderAmount: remainderAmount + }); + } else { + uint256 cliffAmount = SafeMath.mul( + cliffPeriod, + SafeCast.toUint256(flowRate) + ); + params = ScheduleCreationParams({ + superToken: superToken, + sender: sender, + receiver: receiver, + startDate: startDate, + claimValidityDate: claimValidityDate, + cliffDate: startDate + cliffPeriod, + flowRate: flowRate, + cliffAmount: cliffAmount, + endDate: endDate, + remainderAmount: remainderAmount + }); + } + } + + function _validateAndCreateVestingSchedule( + ScheduleCreationParams memory params + ) private { + // Note: Vesting Scheduler V2 doesn't allow start date to be in the past. + // V1 did but didn't allow cliff and flow to be in the past though. + if (params.startDate < block.timestamp) revert TimeWindowInvalid(); + if (params.endDate <= END_DATE_VALID_BEFORE) revert TimeWindowInvalid(); + + if (params.receiver == address(0) || params.receiver == params.sender) revert AccountInvalid(); + if (address(params.superToken) == address(0)) revert ZeroAddress(); + if (params.flowRate <= 0) revert FlowRateInvalid(); + if (params.cliffDate != 0 && params.startDate > params.cliffDate) revert TimeWindowInvalid(); + if (params.cliffDate == 0 && params.cliffAmount != 0) revert CliffInvalid(); + + uint32 cliffAndFlowDate = params.cliffDate == 0 ? params.startDate : params.cliffDate; + // Note: Vesting Scheduler V2 allows cliff and flow to be in the schedule creation block, V1 didn't. + if (cliffAndFlowDate < block.timestamp || + cliffAndFlowDate >= params.endDate || + cliffAndFlowDate + START_DATE_VALID_AFTER >= params.endDate - END_DATE_VALID_BEFORE || + params.endDate - cliffAndFlowDate < MIN_VESTING_DURATION + ) revert TimeWindowInvalid(); + + // Note : claimable schedule created with a claim validity date equal to 0 is considered regular schedule + if (params.claimValidityDate != 0 && params.claimValidityDate < cliffAndFlowDate) + revert TimeWindowInvalid(); + + bytes32 id = _getId(address(params.superToken), params.sender, params.receiver); + if (vestingSchedules[id].endDate != 0) revert ScheduleAlreadyExists(); + + vestingSchedules[id] = VestingSchedule({ + cliffAndFlowDate: cliffAndFlowDate, + endDate: params.endDate, + flowRate: params.flowRate, + cliffAmount: params.cliffAmount, + remainderAmount: params.remainderAmount, + claimValidityDate: params.claimValidityDate + }); + + emit VestingScheduleCreated( + params.superToken, + params.sender, + params.receiver, + params.startDate, + params.cliffDate, + params.flowRate, + params.endDate, + params.cliffAmount, + params.claimValidityDate, + params.remainderAmount + ); + } + + /// @dev IVestingScheduler.createAndExecuteVestingScheduleFromAmountAndDuration. + function createAndExecuteVestingScheduleFromAmountAndDuration( + ISuperToken superToken, + address receiver, + uint256 totalAmount, + uint32 totalDuration, + bytes memory ctx + ) external returns (bytes memory newCtx) { + newCtx = _validateAndCreateAndExecuteVestingScheduleFromAmountAndDuration( + superToken, + receiver, + totalAmount, + totalDuration, + ctx + ); + } + + /// @dev IVestingScheduler.createAndExecuteVestingScheduleFromAmountAndDuration. + function createAndExecuteVestingScheduleFromAmountAndDuration( + ISuperToken superToken, + address receiver, + uint256 totalAmount, + uint32 totalDuration + ) external { + _validateAndCreateAndExecuteVestingScheduleFromAmountAndDuration( + superToken, + receiver, + totalAmount, + totalDuration, + bytes("") + ); + } + + /// @dev IVestingScheduler.createAndExecuteVestingScheduleFromAmountAndDuration. + function _validateAndCreateAndExecuteVestingScheduleFromAmountAndDuration( + ISuperToken superToken, + address receiver, + uint256 totalAmount, + uint32 totalDuration, + bytes memory ctx + ) private returns (bytes memory newCtx) { + newCtx = ctx; + address sender = _getSender(ctx); + + _validateAndCreateVestingSchedule( + mapCreateVestingScheduleParams( + superToken, + sender, + receiver, + totalAmount, + totalDuration, + _normalizeStartDate(0), + 0, // cliffPeriod + 0 // claimValidityDate + ) + ); + + ScheduleAggregate memory agg = _getVestingScheduleAggregate(superToken, sender, receiver); + + _validateBeforeCliffAndFlow(agg.schedule, /* disableClaimCheck: */ false); + assert(_executeCliffAndFlow(agg)); + } + + /// @dev IVestingScheduler.updateVestingSchedule implementation. + function updateVestingSchedule( + ISuperToken superToken, + address receiver, + uint32 endDate, + bytes memory ctx + ) external returns (bytes memory newCtx) { + newCtx = ctx; + address sender = _getSender(ctx); + ScheduleAggregate memory agg = _getVestingScheduleAggregate(superToken, sender, receiver); + VestingSchedule memory schedule = agg.schedule; + + if (endDate <= block.timestamp) revert TimeWindowInvalid(); + + // Note: Claimable schedules that have not been claimed cannot be updated + + // Only allow an update if 1. vesting exists 2. executeCliffAndFlow() has been called + if (schedule.cliffAndFlowDate != 0 || schedule.endDate == 0) revert ScheduleNotFlowing(); + + vestingSchedules[agg.id].endDate = endDate; + // Note: Nullify the remainder amount when complexity of updates is introduced. + vestingSchedules[agg.id].remainderAmount = 0; + + emit VestingScheduleUpdated( + superToken, + sender, + receiver, + schedule.endDate, + endDate, + 0 // remainderAmount + ); + } + + /// @dev IVestingScheduler.deleteVestingSchedule implementation. + function deleteVestingSchedule( + ISuperToken superToken, + address receiver, + bytes memory ctx + ) external returns (bytes memory newCtx) { + newCtx = ctx; + address sender = _getSender(ctx); + ScheduleAggregate memory agg = _getVestingScheduleAggregate(superToken, sender, receiver); + VestingSchedule memory schedule = agg.schedule; + + if (schedule.endDate != 0) { + delete vestingSchedules[agg.id]; + emit VestingScheduleDeleted(superToken, sender, receiver); + } else { + revert ScheduleDoesNotExist(); + } + } + + /// @dev IVestingScheduler.executeCliffAndFlow implementation. + function executeCliffAndFlow( + ISuperToken superToken, + address sender, + address receiver + ) external returns (bool success) { + ScheduleAggregate memory agg = _getVestingScheduleAggregate(superToken, sender, receiver); + VestingSchedule memory schedule = agg.schedule; + + if (schedule.claimValidityDate != 0) { + _validateAndClaim(agg); + _validateBeforeCliffAndFlow(schedule, /* disableClaimCheck: */ true); + if (block.timestamp >= _gteDateToExecuteEndVesting(schedule)) { + _validateBeforeEndVesting(schedule, /* disableClaimCheck: */ true); + success = _executeVestingAsSingleTransfer(agg); + } else { + success = _executeCliffAndFlow(agg); + } + } else { + _validateBeforeCliffAndFlow(schedule, /* disableClaimCheck: */ false); + success = _executeCliffAndFlow(agg); + } + } + + function _validateBeforeCliffAndFlow( + VestingSchedule memory schedule, + bool disableClaimCheck + ) private view { + if (schedule.cliffAndFlowDate == 0) + revert AlreadyExecuted(); + + if (!disableClaimCheck && schedule.claimValidityDate != 0) + revert ScheduleNotClaimed(); + + // Ensure that that the claming date is after the cliff/flow date and before the claim validity date + if (schedule.cliffAndFlowDate > block.timestamp || + _lteDateToExecuteCliffAndFlow(schedule) < block.timestamp) + revert TimeWindowInvalid(); + } + + function _lteDateToExecuteCliffAndFlow( + VestingSchedule memory schedule + ) private pure returns (uint32) { + if (schedule.cliffAndFlowDate == 0) + revert AlreadyExecuted(); + + if (schedule.claimValidityDate != 0) { + return schedule.claimValidityDate; + } else { + return schedule.cliffAndFlowDate + START_DATE_VALID_AFTER; + } + } + + function _validateAndClaim( + ScheduleAggregate memory agg + ) private { + VestingSchedule memory schedule = agg.schedule; + + // Ensure that the caller is the sender or the receiver if the vesting schedule requires claiming. + if (msg.sender != agg.sender && msg.sender != agg.receiver) + revert CannotClaimScheduleOnBehalf(); + + if (schedule.claimValidityDate < block.timestamp) + revert TimeWindowInvalid(); + + delete vestingSchedules[agg.id].claimValidityDate; + emit VestingClaimed(agg.superToken, agg.sender, agg.receiver, msg.sender); + } + + /// @dev IVestingScheduler.executeCliffAndFlow implementation. + function _executeCliffAndFlow( + ScheduleAggregate memory agg + ) private returns (bool success) { + VestingSchedule memory schedule = agg.schedule; + + // Invalidate configuration straight away -- avoid any chance of re-execution or re-entry. + delete vestingSchedules[agg.id].cliffAndFlowDate; + delete vestingSchedules[agg.id].cliffAmount; + + // Compensate for the fact that flow will almost always be executed slightly later than scheduled. + uint256 flowDelayCompensation = + (block.timestamp - schedule.cliffAndFlowDate) * uint96(schedule.flowRate); + + // If there's cliff or compensation then transfer that amount. + if (schedule.cliffAmount != 0 || flowDelayCompensation != 0) { + // Note: Super Tokens revert, not return false, i.e. we expect always true here. + assert( + agg.superToken.transferFrom( + agg.sender, agg.receiver, schedule.cliffAmount + flowDelayCompensation)); + } + // Create a flow according to the vesting schedule configuration. + cfaV1.createFlowByOperator(agg.sender, agg.receiver, agg.superToken, schedule.flowRate); + emit VestingCliffAndFlowExecuted( + agg.superToken, + agg.sender, + agg.receiver, + schedule.cliffAndFlowDate, + schedule.flowRate, + schedule.cliffAmount, + flowDelayCompensation + ); + + return true; + } + + function _executeVestingAsSingleTransfer( + ScheduleAggregate memory agg + ) private returns (bool success) { + VestingSchedule memory schedule = agg.schedule; + + delete vestingSchedules[agg.id]; + + uint256 totalVestedAmount = _getTotalVestedAmount(schedule); + + // Note: Super Tokens revert, not return false, i.e. we expect always true here. + assert(agg.superToken.transferFrom(agg.sender, agg.receiver, totalVestedAmount)); + + emit VestingCliffAndFlowExecuted( + agg.superToken, + agg.sender, + agg.receiver, + schedule.cliffAndFlowDate, + 0, // flow rate + schedule.cliffAmount, + totalVestedAmount - schedule.cliffAmount // flow delay compensation + ); + + emit VestingEndExecuted( + agg.superToken, + agg.sender, + agg.receiver, + schedule.endDate, + 0, // Early end compensation + false // Did end fail + ); + + return true; + } + + function _getTotalVestedAmount( + VestingSchedule memory schedule + ) private pure returns (uint256) { + return + schedule.cliffAmount + + schedule.remainderAmount + + (schedule.endDate - schedule.cliffAndFlowDate) * SafeCast.toUint256(schedule.flowRate); + } + + /// @dev IVestingScheduler.executeEndVesting implementation. + function executeEndVesting( + ISuperToken superToken, + address sender, + address receiver + ) external returns (bool success) { + ScheduleAggregate memory agg = _getVestingScheduleAggregate(superToken, sender, receiver); + VestingSchedule memory schedule = agg.schedule; + + _validateBeforeEndVesting(schedule, /* disableClaimCheck: */ false); + + // Invalidate configuration straight away -- avoid any chance of re-execution or re-entry. + delete vestingSchedules[agg.id]; + + // If vesting is not running, we can't do anything, just emit failing event. + if (_isFlowOngoing(superToken, sender, receiver)) { + // delete first the stream and unlock deposit amount. + cfaV1.deleteFlowByOperator(sender, receiver, superToken); + + uint256 earlyEndCompensation = schedule.endDate >= block.timestamp + ? (schedule.endDate - block.timestamp) * uint96(schedule.flowRate) + schedule.remainderAmount + : 0; + + // Note: we consider the compensation as failed if the stream is still ongoing after the end date. + bool didCompensationFail = schedule.endDate < block.timestamp; + if (earlyEndCompensation != 0) { + // Note: Super Tokens revert, not return false, i.e. we expect always true here. + assert(superToken.transferFrom(sender, receiver, earlyEndCompensation)); + } + + emit VestingEndExecuted( + superToken, + sender, + receiver, + schedule.endDate, + earlyEndCompensation, + didCompensationFail + ); + } else { + emit VestingEndFailed( + superToken, + sender, + receiver, + schedule.endDate + ); + } + + return true; + } + + function _validateBeforeEndVesting( + VestingSchedule memory schedule, + bool disableClaimCheck + ) private view { + if (schedule.endDate == 0) + revert AlreadyExecuted(); + + if (!disableClaimCheck && schedule.claimValidityDate != 0) + revert ScheduleNotClaimed(); + + if (_gteDateToExecuteEndVesting(schedule) > block.timestamp) + revert TimeWindowInvalid(); + } + + function _gteDateToExecuteEndVesting( + VestingSchedule memory schedule + ) private pure returns (uint32) { + if (schedule.endDate == 0) + revert AlreadyExecuted(); + + return schedule.endDate - END_DATE_VALID_BEFORE; + } + + /// @dev IVestingScheduler.getVestingSchedule implementation. + function getVestingSchedule( + address superToken, address sender, address receiver + ) external view returns (VestingSchedule memory) { + return vestingSchedules[_getId(address(superToken), sender, receiver)]; + } + + function _getVestingScheduleAggregate( + ISuperToken superToken, address sender, address receiver + ) private view returns (ScheduleAggregate memory) { + bytes32 id = _getId(address(superToken), sender, receiver); + return ScheduleAggregate({ + superToken: superToken, + sender: sender, + receiver: receiver, + id: id, + schedule: vestingSchedules[id] + }); + } + + function _normalizeStartDate(uint32 startDate) private view returns (uint32) { + // Default to current block timestamp if no start date is provided. + if (startDate == 0) { + return uint32(block.timestamp); + } + return startDate; + } + + /// @dev IVestingScheduler.getMaximumNeededTokenAllowance implementation. + function getMaximumNeededTokenAllowance( + VestingSchedule memory schedule + ) external pure override returns (uint256) { + uint256 maxFlowDelayCompensationAmount = + schedule.cliffAndFlowDate == 0 + ? 0 + : START_DATE_VALID_AFTER * SafeCast.toUint256(schedule.flowRate); + uint256 maxEarlyEndCompensationAmount = + schedule.endDate == 0 + ? 0 + : END_DATE_VALID_BEFORE * SafeCast.toUint256(schedule.flowRate); + + if (schedule.claimValidityDate == 0) { + return + schedule.cliffAmount + + schedule.remainderAmount + + maxFlowDelayCompensationAmount + + maxEarlyEndCompensationAmount; + } else if (schedule.claimValidityDate >= _gteDateToExecuteEndVesting(schedule)) { + return _getTotalVestedAmount(schedule); + } else { + return schedule.cliffAmount + + schedule.remainderAmount + + (schedule.claimValidityDate - schedule.cliffAndFlowDate) * SafeCast.toUint256(schedule.flowRate) + + maxEarlyEndCompensationAmount; + } + } + + /// @dev get sender of transaction from Superfluid Context or transaction itself. + function _getSender(bytes memory ctx) private view returns (address sender) { + if (ctx.length != 0) { + if (msg.sender != address(cfaV1.host)) revert HostInvalid(); + sender = cfaV1.host.decodeCtx(ctx).msgSender; + } else { + sender = msg.sender; + } + // This is an invariant and should never happen. + assert(sender != address(0)); + } + + /// @dev get flowRate of stream + function _isFlowOngoing(ISuperToken superToken, address sender, address receiver) private view returns (bool) { + (,int96 flowRate,,) = cfaV1.cfa.getFlow(superToken, sender, receiver); + return flowRate != 0; + } + + function _getId( + address superToken, address sender, address receiver + ) private pure returns (bytes32) { + return keccak256(abi.encodePacked(superToken, sender, receiver)); + } +} diff --git a/packages/automation-contracts/scheduler/contracts/interface/IVestingScheduler.sol b/packages/automation-contracts/scheduler/contracts/interface/IVestingScheduler.sol index 7e9dc37616..9cb5b20802 100644 --- a/packages/automation-contracts/scheduler/contracts/interface/IVestingScheduler.sol +++ b/packages/automation-contracts/scheduler/contracts/interface/IVestingScheduler.sol @@ -203,4 +203,4 @@ interface IVestingScheduler { external view returns (VestingSchedule memory); -} +} \ No newline at end of file diff --git a/packages/automation-contracts/scheduler/contracts/interface/IVestingSchedulerV2.sol b/packages/automation-contracts/scheduler/contracts/interface/IVestingSchedulerV2.sol new file mode 100644 index 0000000000..65561080c9 --- /dev/null +++ b/packages/automation-contracts/scheduler/contracts/interface/IVestingSchedulerV2.sol @@ -0,0 +1,387 @@ +// SPDX-License-Identifier: AGPLv3 +pragma solidity ^0.8.0; + +import { + ISuperToken +} from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol"; + +interface IVestingSchedulerV2 { + error TimeWindowInvalid(); + error AccountInvalid(); + error ZeroAddress(); + error HostInvalid(); + error FlowRateInvalid(); + error CliffInvalid(); + error ScheduleAlreadyExists(); + error ScheduleDoesNotExist(); + error ScheduleNotFlowing(); + error CannotClaimScheduleOnBehalf(); + error AlreadyExecuted(); + error ScheduleNotClaimed(); + + /** + * @dev Vesting configuration provided by user. + * @param cliffAndFlowDate Date of flow start and cliff execution (if a cliff was specified) + * @param endDate End date of the vesting + * @param claimValidityDate Date before which the claimable schedule must be claimed + * @param flowRate For the stream + * @param cliffAmount Amount to be transferred at the cliff + * @param remainderAmount Amount transferred during early end to achieve an accurate "total vested amount" + */ + struct VestingSchedule { + uint32 cliffAndFlowDate; + uint32 endDate; + int96 flowRate; + + uint256 cliffAmount; + + uint96 remainderAmount; + uint32 claimValidityDate; + } + + /** + * @dev Parameters used to create vesting schedules + * @param superToken SuperToken to be vested + * @param receiver Vesting receiver + * @param startDate Timestamp when the vesting should start + * @param claimValidityDate Date before which the claimable schedule must be claimed + * @param cliffDate Timestamp of cliff exectution - if 0, startDate acts as cliff + * @param flowRate The flowRate for the stream + * @param cliffAmount The amount to be transferred at the cliff + * @param endDate The timestamp when the stream should stop. + * @param remainderAmount Amount transferred during early end to achieve an accurate "total vested amount" + * @param ctx Superfluid context used when batching operations. (or bytes(0) if not SF batching) + */ + struct ScheduleCreationParams { + ISuperToken superToken; + address sender; + address receiver; + uint32 startDate; + uint32 claimValidityDate; + uint32 cliffDate; + int96 flowRate; + uint256 cliffAmount; + uint32 endDate; + uint96 remainderAmount; + } + + /** + * @dev Event emitted on creation of a new vesting schedule + * @param superToken SuperToken to be vested + * @param sender Vesting sender + * @param receiver Vesting receiver + * @param startDate Timestamp when the vesting starts + * @param claimValidityDate Date before which the claimable schedule must be claimed + * @param cliffDate Timestamp of the cliff + * @param flowRate The flowRate for the stream + * @param endDate The timestamp when the stream should stop + * @param cliffAmount The amount to be transferred at the cliff + * @param remainderAmount Amount transferred during early end to achieve an accurate "total vested amount" + */ + event VestingScheduleCreated( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver, + uint32 startDate, + uint32 cliffDate, + int96 flowRate, + uint32 endDate, + uint256 cliffAmount, + uint32 claimValidityDate, + uint96 remainderAmount + ); + + /** + * @dev Creates a new vesting schedule + * @dev If a non-zero cliffDate is set, the startDate has no effect other than being logged in an event. + * @dev If cliffDate is set to zero, the startDate becomes the cliff (transfer cliffAmount and start stream). + * @param superToken SuperToken to be vested + * @param receiver Vesting receiver + * @param startDate Timestamp when the vesting should start + * @param cliffDate Timestamp of cliff exectution - if 0, startDate acts as cliff + * @param flowRate The flowRate for the stream + * @param cliffAmount The amount to be transferred at the cliff + * @param endDate The timestamp when the stream should stop. + * @param claimValidityDate Date before which the claimable schedule must be claimed + * @param ctx Superfluid context used when batching operations. (or bytes(0) if not SF batching) + */ + function createVestingSchedule( + ISuperToken superToken, + address receiver, + uint32 startDate, + uint32 cliffDate, + int96 flowRate, + uint256 cliffAmount, + uint32 endDate, + uint32 claimValidityDate, + bytes memory ctx + ) external returns (bytes memory newCtx); + + /** + * @dev See IVestingScheduler.createVestingSchedule overload for more details. + */ + function createVestingSchedule( + ISuperToken superToken, + address receiver, + uint32 startDate, + uint32 cliffDate, + int96 flowRate, + uint256 cliffAmount, + uint32 endDate, + bytes memory ctx + ) external returns (bytes memory newCtx); + + /** + * @dev See IVestingScheduler.createVestingSchedule overload for more details. + */ + function createVestingSchedule( + ISuperToken superToken, + address receiver, + uint32 startDate, + uint32 cliffDate, + int96 flowRate, + uint256 cliffAmount, + uint32 endDate, + uint32 claimValidityDate + ) external; + + /** + * @dev Creates a new vesting schedule + * @dev The function makes it more intuitive to create a vesting schedule compared to the original function. + * @dev The function calculates the endDate, cliffDate, cliffAmount, flowRate, etc, based on the input arguments. + * @param superToken SuperToken to be vested + * @param receiver Vesting receiver + * @param totalAmount The total amount to be vested + * @param totalDuration The total duration of the vestingß + * @param startDate Timestamp when the vesting should start + * @param cliffPeriod The cliff period of the vesting + * @param claimPeriod The claim availability period + * @param ctx Superfluid context used when batching operations. (or bytes(0) if not SF batching) + */ + function createVestingScheduleFromAmountAndDuration( + ISuperToken superToken, + address receiver, + uint256 totalAmount, + uint32 totalDuration, + uint32 startDate, + uint32 cliffPeriod, + uint32 claimPeriod, + bytes memory ctx + ) external returns (bytes memory newCtx); + + /** + * @dev See IVestingScheduler.createVestingScheduleFromAmountAndDuration overload for more details. + */ + function createVestingScheduleFromAmountAndDuration( + ISuperToken superToken, + address receiver, + uint256 totalAmount, + uint32 totalDuration, + uint32 startDate, + uint32 cliffPeriod, + uint32 claimPeriod + ) external; + + /** + * @dev Returns all relevant information related to a new vesting schedule creation + * @dev based on the amounts and durations. + * @param superToken SuperToken to be vested + * @param receiver Vesting receiver + * @param totalAmount The total amount to be vested + * @param totalDuration The total duration of the vestingß + * @param startDate Timestamp when the vesting should start + * @param cliffPeriod The cliff period of the vesting + * @param claimPeriod The claim availability period + */ + function mapCreateVestingScheduleParams( + ISuperToken superToken, + address sender, + address receiver, + uint256 totalAmount, + uint32 totalDuration, + uint32 startDate, + uint32 cliffPeriod, + uint32 claimPeriod + ) external returns (ScheduleCreationParams memory params); + + /** + * @dev Creates a new vesting schedule + * @dev The function calculates the endDate, cliffDate, cliffAmount, flowRate, etc, based on the input arguments. + * @dev The function creates the vesting schedule with start date set to current timestamp, + * @dev and executes the start (i.e. creation of the flow) immediately. + * @param superToken SuperToken to be vested + * @param receiver Vesting receiver + * @param totalAmount The total amount to be vested + * @param totalDuration The total duration of the vesting + * @param ctx Superfluid context used when batching operations. (or bytes(0) if not SF batching) + */ + function createAndExecuteVestingScheduleFromAmountAndDuration( + ISuperToken superToken, + address receiver, + uint256 totalAmount, + uint32 totalDuration, + bytes memory ctx + ) external returns (bytes memory newCtx); + + /** + * @dev See IVestingScheduler.createAndExecuteVestingScheduleFromAmountAndDuration. + */ + function createAndExecuteVestingScheduleFromAmountAndDuration( + ISuperToken superToken, + address receiver, + uint256 totalAmount, + uint32 totalDuration + ) external; + + /** + * @dev Event emitted on update of a vesting schedule + * @param superToken The superToken to be vested + * @param sender Vesting sender + * @param receiver Vesting receiver + * @param oldEndDate Old timestamp when the stream should stop + * @param endDate New timestamp when the stream should stop + */ + event VestingScheduleUpdated( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver, + uint32 oldEndDate, + uint32 endDate, + uint96 remainderAmount + ); + + /** + * @dev Updates the end date for a vesting schedule which already reached the cliff + * @notice When updating, there's no restriction to the end date other than not being in the past + * @param superToken SuperToken to be vested + * @param receiver Vesting receiver + * @param endDate The timestamp when the stream should stop + * @param ctx Superfluid context used when batching operations. (or bytes(0) if not SF batching) + */ + function updateVestingSchedule(ISuperToken superToken, address receiver, uint32 endDate, bytes memory ctx) + external + returns (bytes memory newCtx); + + /** + * @dev Event emitted on deletion of a vesting schedule + * @param superToken The superToken to be vested + * @param sender Vesting sender + * @param receiver Vesting receiver + */ + event VestingScheduleDeleted(ISuperToken indexed superToken, address indexed sender, address indexed receiver); + + /** + * @dev Event emitted on end of a vesting that failed because there was no running stream + * @param superToken The superToken to be vested + * @param sender Vesting sender + * @param receiver Vesting receiver + * @param endDate The timestamp when the stream should stop + */ + event VestingEndFailed( + ISuperToken indexed superToken, address indexed sender, address indexed receiver, uint32 endDate + ); + + /** + * @dev Deletes a vesting schedule + * @param superToken The superToken to be vested + * @param receiver Vesting receiver + * @param ctx Superfluid context used when batching operations. (or bytes(0) if not SF batching) + */ + function deleteVestingSchedule(ISuperToken superToken, address receiver, bytes memory ctx) + external + returns (bytes memory newCtx); + + /** + * @dev Emitted when the cliff of a scheduled vesting is executed + * @param superToken The superToken to be vested + * @param sender Vesting sender + * @param receiver Vesting receiver + * @param cliffAndFlowDate The timestamp when the stream should start + * @param flowRate The flowRate for the stream + * @param cliffAmount The amount you would like to transfer at the startDate when you start streaming + * @param flowDelayCompensation Adjusted amount transferred to receiver. (elapse time from config and tx timestamp) + */ + event VestingCliffAndFlowExecuted( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver, + uint32 cliffAndFlowDate, + int96 flowRate, + uint256 cliffAmount, + uint256 flowDelayCompensation + ); + + /** + * @dev Emitted when a claimable vesting schedule is claimed + * @param superToken The superToken to be vested + * @param sender Vesting sender + * @param receiver Vesting receiver + * @param claimer Account that claimed the vesting (can only be sender or receiver) + */ + event VestingClaimed( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver, + address claimer + ); + + /** + * @dev Executes a cliff (transfer and stream start) + * @notice Intended to be invoked by a backend service + * @param superToken SuperToken to be streamed + * @param sender Account who will be send the stream + * @param receiver Account who will be receiving the stream + */ + function executeCliffAndFlow(ISuperToken superToken, address sender, address receiver) + external + returns (bool success); + + /** + * @dev Emitted when the end of a scheduled vesting is executed + * @param superToken The superToken to be vested + * @param sender Vesting sender + * @param receiver Vesting receiver + * @param endDate The timestamp when the stream should stop + * @param earlyEndCompensation adjusted close amount transferred to receiver. + * @param didCompensationFail adjusted close amount transfer fail. + */ + event VestingEndExecuted( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver, + uint32 endDate, + uint256 earlyEndCompensation, + bool didCompensationFail + ); + + /** + * @dev Executes the end of a vesting (stop stream) + * @notice Intended to be invoked by a backend service + * @param superToken The superToken to be vested + * @param sender Vesting sender + * @param receiver Vesting receiver + */ + function executeEndVesting(ISuperToken superToken, address sender, address receiver) + external + returns (bool success); + + /** + * @dev Gets data currently stored for a vesting schedule + * @param superToken The superToken to be vested + * @param sender Vesting sender + * @param receiver Vesting receiver + */ + function getVestingSchedule(address superToken, address sender, address receiver) + external + view + returns (VestingSchedule memory); + + /** + * @dev Estimates the maximum possible ERC-20 token allowance needed for the vesting schedule + * @dev to work properly under all circumstances. + * @param vestingSchedule A vesting schedule (doesn't have to exist) + */ + function getMaximumNeededTokenAllowance( + VestingSchedule memory vestingSchedule + ) external returns (uint256); +} diff --git a/packages/automation-contracts/scheduler/deploy/deploy.js b/packages/automation-contracts/scheduler/deploy/deploy.js index 718fd771d9..a094182a33 100644 --- a/packages/automation-contracts/scheduler/deploy/deploy.js +++ b/packages/automation-contracts/scheduler/deploy/deploy.js @@ -15,7 +15,6 @@ module.exports = async function ({ deployments, getNamedAccounts }) { const chainId = await hre.getChainId(); const host = metadata.networks.filter((item) => item.chainId == chainId)[0] .contractsV1.host; - const registrationKey = ""; if (host === undefined) { console.log("Host contract not found for this network"); return; @@ -24,41 +23,79 @@ module.exports = async function ({ deployments, getNamedAccounts }) { const { deploy } = deployments; const { deployer } = await getNamedAccounts(); + console.log(`network: ${hre.network.name}`); console.log(`chainId: ${chainId}`); console.log(`rpc: ${hre.network.config.url}`); console.log(`host: ${host}`); - const FlowScheduler = await deploy("FlowScheduler", { - from: deployer, - args: [host, registrationKey], - log: true, - skipIfAlreadyDeployed: false, - }); - const VestingScheduler = await deploy("VestingScheduler", { - from: deployer, - args: [host, registrationKey], - log: true, - skipIfAlreadyDeployed: false, - }); + const deployFlowScheduler = process.env.DEPLOY_FLOW_SCHEDULER?.toLowerCase() === "true"; + const deployVestingScheduler = process.env.DEPLOY_VESTING_SCHEDULER?.toLowerCase() === "true"; + const deployVestingSchedulerV2 = process.env.DEPLOY_VESTING_SCHEDULER_V2?.toLowerCase() === "true"; + console.log(`deployFlowScheduler: ${deployFlowScheduler}`); + console.log(`deployVestingScheduler: ${deployVestingScheduler}`); + console.log(`deployVestingSchedulerV2: ${deployVestingSchedulerV2}`); + + if (deployFlowScheduler) { + console.log("Deploying FlowScheduler..."); + const FlowScheduler = await deploy("FlowScheduler", { + from: deployer, + args: [host], + log: true, + skipIfAlreadyDeployed: false + }); - // wait for 15 seconds to allow etherscan to indexed the contracts - await sleep(15000); + // wait for 15 seconds to allow etherscan to indexed the contracts + await sleep(15000); - try { + console.log("Verifying FlowScheduler..."); await hre.run("verify:verify", { address: FlowScheduler.address, - constructorArguments: [host, registrationKey], + constructorArguments: [host], contract: "contracts/FlowScheduler.sol:FlowScheduler", }); + } + + if (deployVestingScheduler) { + console.log("Deploying VestingScheduler..."); + const VestingScheduler = await deploy("VestingScheduler", { + from: deployer, + args: [host], + log: true, + skipIfAlreadyDeployed: false + }); + + // wait for 15 seconds to allow etherscan to indexed the contracts + await sleep(15000); + console.log("Verifying VestingScheduler..."); await hre.run("verify:verify", { address: VestingScheduler.address, - constructorArguments: [host, registrationKey], + constructorArguments: [host], contract: "contracts/VestingScheduler.sol:VestingScheduler", }); - } catch (err) { - console.error(err); } + + if (deployVestingSchedulerV2) { + console.log("Deploying VestingSchedulerV2..."); + const VestingSchedulerV2 = await deploy("VestingSchedulerV2", { + from: deployer, + args: [host], + log: true, + skipIfAlreadyDeployed: false, + }); + + // wait for 15 seconds to allow etherscan to indexed the contracts + await sleep(15000); + + console.log("Verifying VestingSchedulerV2..."); + await hre.run("verify:verify", { + address: VestingSchedulerV2.address, + constructorArguments: [host], + contract: "contracts/VestingSchedulerV2.sol:VestingSchedulerV2", + }); + } + + console.log("Finished."); }; diff --git a/packages/automation-contracts/scheduler/hardhat.config.js b/packages/automation-contracts/scheduler/hardhat.config.js index 93eb9b8e9a..8336b37f79 100644 --- a/packages/automation-contracts/scheduler/hardhat.config.js +++ b/packages/automation-contracts/scheduler/hardhat.config.js @@ -17,8 +17,8 @@ module.exports = { optimizer: { enabled: true, runs: 200, - } - } + }, + }, }, networks: { localhost: { @@ -28,15 +28,40 @@ module.exports = { polygon: { url: process.env.POLYGON_URL || "", accounts: - process.env.POLYGON_PRIVATE_KEY !== undefined ? [process.env.POLYGON_PRIVATE_KEY] : [], + process.env.PRIVATE_KEY !== undefined + ? [process.env.PRIVATE_KEY] + : [], }, bsc: { url: process.env.BSC_URL || "", accounts: - process.env.BSC_PRIVATE_KEY !== undefined ? [process.env.BSC_PRIVATE_KEY] : [], + process.env.PRIVATE_KEY !== undefined + ? [process.env.PRIVATE_KEY] + : [], + }, + optimism: { + url: "https://mainnet.optimism.io", + accounts: + process.env.PRIVATE_KEY !== undefined + ? [process.env.PRIVATE_KEY] + : [], + }, + opsepolia: { + url: process.env.OPSEPOLIA_URL || "", + accounts: + process.env.PRIVATE_KEY !== undefined + ? [process.env.PRIVATE_KEY] + : [], + }, + "base-mainnet": { + url: process.env.BASE_URL || "", + accounts: + process.env.PRIVATE_KEY !== undefined + ? [process.env.PRIVATE_KEY] + : [], + gasPrice: 1000000000, }, }, - namedAccounts: { deployer: { default: 0, @@ -44,5 +69,23 @@ module.exports = { }, etherscan: { apiKey: process.env.ETHERSCAN_API_KEY, + customChains: [ + { + network: "opsepolia", + chainId: 11155420, + urls: { + apiURL: "https://api-sepolia-optimistic.etherscan.io/api", + browserURL: "https://sepolia-optimism.etherscan.io/", + }, + }, + { + network: "base-mainnet", + chainId: 8453, + urls: { + apiURL: "https://api.basescan.org/api", + browserURL: "https://basescan.org/", + }, + }, + ], }, }; diff --git a/packages/automation-contracts/scheduler/package.json b/packages/automation-contracts/scheduler/package.json index e5e477d5e0..1f9ecca1ef 100644 --- a/packages/automation-contracts/scheduler/package.json +++ b/packages/automation-contracts/scheduler/package.json @@ -1,11 +1,12 @@ { "name": "scheduler", - "version": "0.0.1", + "version": "1.2.0", "description": "Open contracts that allow scheduling streams and vestings onchain", "license": "MIT", "scripts": { "test": "forge test", "build": "forge build", + "deploy": "npx hardhat deploy --network", "lint": "run-s lint:*", "lint:sol": "solhint -w 0 contracts/*.sol contracts/*/*.sol && echo '✔ Your .sol files look good.'", "pre-commit": "if [ ! -z \"$(git status -s .)\" ];then run-s pre-commit:*;else true;fi", diff --git a/packages/automation-contracts/scheduler/test/FlowScheduler.t.sol b/packages/automation-contracts/scheduler/test/FlowScheduler.t.sol index 881bd0dd9c..10c63dabc2 100644 --- a/packages/automation-contracts/scheduler/test/FlowScheduler.t.sol +++ b/packages/automation-contracts/scheduler/test/FlowScheduler.t.sol @@ -57,7 +57,7 @@ contract FlowSchedulerTest is FoundrySuperfluidTester { function setUp() override public virtual { super.setUp(); - flowScheduler = new FlowScheduler(sf.host, ""); + flowScheduler = new FlowScheduler(sf.host); } function getHashID( diff --git a/packages/automation-contracts/scheduler/test/FlowSchedulerResolver.t.sol b/packages/automation-contracts/scheduler/test/FlowSchedulerResolver.t.sol index eec76dd1ea..ae98f43848 100644 --- a/packages/automation-contracts/scheduler/test/FlowSchedulerResolver.t.sol +++ b/packages/automation-contracts/scheduler/test/FlowSchedulerResolver.t.sol @@ -26,7 +26,7 @@ contract FlowSchedulerResolverTest is FoundrySuperfluidTester { function setUp() override public virtual { super.setUp(); - flowScheduler = new FlowScheduler(sf.host, ""); + flowScheduler = new FlowScheduler(sf.host); flowSchedulerResolver = new FlowSchedulerResolver(address(flowScheduler)); createPayload = abi.encodeCall( FlowScheduler.executeCreateFlow, ( diff --git a/packages/automation-contracts/scheduler/test/VestingScheduler.t.sol b/packages/automation-contracts/scheduler/test/VestingScheduler.t.sol index c1c1853b21..756523c954 100644 --- a/packages/automation-contracts/scheduler/test/VestingScheduler.t.sol +++ b/packages/automation-contracts/scheduler/test/VestingScheduler.t.sol @@ -79,7 +79,7 @@ contract VestingSchedulerTests is FoundrySuperfluidTester { uint256 internal _expectedTotalSupply = 0; constructor() FoundrySuperfluidTester(3) { - vestingScheduler = new VestingScheduler(sf.host, ""); + vestingScheduler = new VestingScheduler(sf.host); } /// SETUP AND HELPERS @@ -561,4 +561,4 @@ contract VestingSchedulerTests is FoundrySuperfluidTester { success = vestingScheduler.executeEndVesting(superToken, alice, bob); assertTrue(success, "executeCloseVesting should return true"); } -} +} \ No newline at end of file diff --git a/packages/automation-contracts/scheduler/test/VestingSchedulerV2.t.sol b/packages/automation-contracts/scheduler/test/VestingSchedulerV2.t.sol new file mode 100644 index 0000000000..1dd9086899 --- /dev/null +++ b/packages/automation-contracts/scheduler/test/VestingSchedulerV2.t.sol @@ -0,0 +1,2283 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.0; + +import { ISuperToken } from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol"; +import { FlowOperatorDefinitions } from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol"; +import { IVestingSchedulerV2 } from "./../contracts/interface/IVestingSchedulerV2.sol"; +import { VestingSchedulerV2 } from "./../contracts/VestingSchedulerV2.sol"; +import { FoundrySuperfluidTester } from "@superfluid-finance/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol"; +import { SuperTokenV1Library } from "@superfluid-finance/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol"; +import { SafeMath } from "@openzeppelin/contracts/utils/math/SafeMath.sol"; +import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; +import "forge-std/console.sol"; + +/// @title VestingSchedulerTests +/// @notice Look at me , I am the captain now - Elvijs +contract VestingSchedulerV2Tests is FoundrySuperfluidTester { + using SuperTokenV1Library for ISuperToken; + + event VestingScheduleCreated( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver, + uint32 startDate, + uint32 cliffDate, + int96 flowRate, + uint32 endDate, + uint256 cliffAmount, + uint32 claimValidityDate, + uint96 remainderAmount + ); + + event VestingScheduleUpdated( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver, + uint32 oldEndDate, + uint32 endDate, + uint96 remainderAmount + ); + + event VestingScheduleDeleted( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver + ); + + event VestingCliffAndFlowExecuted( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver, + uint32 cliffAndFlowDate, + int96 flowRate, + uint256 cliffAmount, + uint256 flowDelayCompensation + ); + + event VestingEndExecuted( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver, + uint32 endDate, + uint256 earlyEndCompensation, + bool didCompensationFail + ); + + event VestingEndFailed( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver, + uint32 endDate + ); + + event VestingClaimed( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver, + address claimer + ); + + event Transfer(address indexed from, address indexed to, uint256 value); + + /// @dev This is required by solidity for using the SuperTokenV1Library in the tester + VestingSchedulerV2 public vestingScheduler; + + /// @dev Constants for Testing + uint256 immutable BLOCK_TIMESTAMP = 100; + uint32 immutable START_DATE = uint32(BLOCK_TIMESTAMP + 1); + uint32 immutable CLIFF_DATE = uint32(BLOCK_TIMESTAMP + 10 days); + int96 constant FLOW_RATE = 1000000000; + uint256 constant CLIFF_TRANSFER_AMOUNT = 1 ether; + uint32 immutable CLAIM_VALIDITY_DATE = uint32(BLOCK_TIMESTAMP + 15 days); + uint32 immutable END_DATE = uint32(BLOCK_TIMESTAMP + 20 days); + bytes constant EMPTY_CTX = ""; + uint256 internal _expectedTotalSupply = 0; + + constructor() FoundrySuperfluidTester(3) { + vestingScheduler = new VestingSchedulerV2(sf.host); + } + + /// SETUP AND HELPERS + function setUp() override public virtual { + super.setUp(); + vm.warp(BLOCK_TIMESTAMP); + } + + function _setACL_AUTHORIZE_FULL_CONTROL(address user, int96 flowRate) private { + vm.startPrank(user); + sf.host.callAgreement( + sf.cfa, + abi.encodeCall( + sf.cfa.updateFlowOperatorPermissions, + ( + superToken, + address(vestingScheduler), + FlowOperatorDefinitions.AUTHORIZE_FULL_CONTROL, + flowRate, + new bytes(0) + ) + ), + new bytes(0) + ); + vm.stopPrank(); + } + + function _arrangeAllowances(address sender, int96 flowRate) private { + // ## Superfluid ACL allowance and permissions + _setACL_AUTHORIZE_FULL_CONTROL(sender, flowRate); + + // ## ERC-20 allowance for cliff and compensation transfers + vm.startPrank(sender); + superToken.approve(address(vestingScheduler), type(uint256).max); + vm.stopPrank(); + } + + function _createVestingScheduleWithDefaultData(address sender, address receiver) private { + vm.startPrank(sender); + vestingScheduler.createVestingSchedule( + superToken, + receiver, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + 0, + EMPTY_CTX + ); + vm.stopPrank(); + } + + function _createClaimableVestingScheduleWithDefaultData(address sender, address receiver) private { + vm.startPrank(sender); + vestingScheduler.createVestingSchedule( + superToken, + receiver, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + vm.stopPrank(); + } + + function _createClaimableVestingScheduleWithClaimDateAfterEndDate(address sender, address receiver, uint256 delayAfterEndDate) private { + vm.startPrank(sender); + vestingScheduler.createVestingSchedule( + superToken, + receiver, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + END_DATE + uint32(delayAfterEndDate), + EMPTY_CTX + ); + vm.stopPrank(); + } + + function assertAreScheduleCreationParamsEqual( + IVestingSchedulerV2.ScheduleCreationParams memory params1, + IVestingSchedulerV2.ScheduleCreationParams memory params2 + ) internal pure { + require(params1.superToken == params2.superToken, "SuperToken mismatch"); + require(params1.receiver == params2.receiver, "Receiver mismatch"); + require(params1.startDate == params2.startDate, "StartDate mismatch"); + require(params1.claimValidityDate == params2.claimValidityDate, "ClaimValidityDate mismatch"); + require(params1.cliffDate == params2.cliffDate, "CliffDate mismatch"); + require(params1.flowRate == params2.flowRate, "FlowRate mismatch"); + require(params1.cliffAmount == params2.cliffAmount, "CliffAmount mismatch"); + require(params1.endDate == params2.endDate, "EndDate mismatch"); + require(params1.remainderAmount == params2.remainderAmount, "RemainderAmount mismatch"); + } + + function testAssertScheduleDoesNotExist( + address superToken, + address sender, + address receiver + ) public { + VestingSchedulerV2.VestingSchedule memory schedule = vestingScheduler.getVestingSchedule(superToken, sender, receiver); + VestingSchedulerV2.VestingSchedule memory deletedSchedule; + + assertEq(schedule.cliffAndFlowDate, deletedSchedule.cliffAndFlowDate, "cliffAndFlowDate mismatch"); + assertEq(schedule.endDate, deletedSchedule.endDate, "endDate mismatch"); + assertEq(schedule.flowRate, deletedSchedule.flowRate, "flowRate mismatch"); + assertEq(schedule.cliffAmount, deletedSchedule.cliffAmount, "cliffAmount mismatch"); + assertEq(schedule.remainderAmount, deletedSchedule.remainderAmount, "remainderAmount mismatch"); + assertEq(schedule.claimValidityDate, deletedSchedule.claimValidityDate, "claimValidityDate mismatch"); + } + + function _getExpectedSchedule( + uint32 startDate, + uint32 cliffDate, + int96 flowRate, + uint256 cliffAmount, + uint32 endDate + ) public view returns (IVestingSchedulerV2.VestingSchedule memory expectedSchedule) { + if (startDate == 0) { + startDate = uint32(block.timestamp); + } + + uint32 cliffAndFlowDate = cliffDate == 0 ? startDate : cliffDate; + + expectedSchedule = IVestingSchedulerV2.VestingSchedule({ + cliffAndFlowDate: cliffAndFlowDate, + endDate: endDate, + claimValidityDate: 0, + flowRate: flowRate, + cliffAmount: cliffAmount, + remainderAmount: 0 + }); + } + + function _getExpectedScheduleFromAmountAndDuration( + uint256 totalAmount, + uint32 totalDuration, + uint32 cliffPeriod, + uint32 startDate, + uint32 claimPeriod + ) public view returns (IVestingSchedulerV2.VestingSchedule memory expectedSchedule) { + if (startDate == 0) { + startDate = uint32(block.timestamp); + } + + int96 flowRate = SafeCast.toInt96(SafeCast.toInt256(totalAmount / totalDuration)); + + uint32 cliffDate; + uint32 cliffAndFlowDate; + uint256 cliffAmount; + if (cliffPeriod > 0) { + cliffDate = startDate + cliffPeriod; + cliffAmount = cliffPeriod * SafeCast.toUint256(flowRate); + cliffAndFlowDate = cliffDate; + } else { + cliffDate = 0; + cliffAmount = 0; + cliffAndFlowDate = startDate; + } + + uint32 endDate = startDate + totalDuration; + + uint96 remainderAmount = SafeCast.toUint96(totalAmount - SafeCast.toUint256(flowRate) * totalDuration); + + expectedSchedule = IVestingSchedulerV2.VestingSchedule({ + cliffAndFlowDate: cliffAndFlowDate, + endDate: endDate, + flowRate: flowRate, + cliffAmount: cliffAmount, + remainderAmount: remainderAmount, + claimValidityDate: claimPeriod == 0 ? 0 : startDate + claimPeriod + }); + } + + /// TESTS + + function testCreateVestingSchedule() public { + vm.expectEmit(true, true, true, true); + emit VestingScheduleCreated( + superToken, alice, bob, START_DATE, CLIFF_DATE, FLOW_RATE, END_DATE, CLIFF_TRANSFER_AMOUNT, 0, 0); + _createVestingScheduleWithDefaultData(alice, bob); + vm.startPrank(alice); + //assert storage data + VestingSchedulerV2.VestingSchedule memory schedule = vestingScheduler.getVestingSchedule(address(superToken), alice, bob); + assertTrue(schedule.cliffAndFlowDate == CLIFF_DATE , "schedule.cliffAndFlowDate"); + assertTrue(schedule.endDate == END_DATE , "schedule.endDate"); + assertTrue(schedule.flowRate == FLOW_RATE , "schedule.flowRate"); + assertTrue(schedule.cliffAmount == CLIFF_TRANSFER_AMOUNT , "schedule.cliffAmount"); + } + + function testCannotCreateVestingScheduleWithWrongData() public { + vm.startPrank(alice); + // revert with superToken = 0 + vm.expectRevert(IVestingSchedulerV2.ZeroAddress.selector); + vestingScheduler.createVestingSchedule( + ISuperToken(address(0)), + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + 0, + EMPTY_CTX + ); + + // revert with receivers = sender + vm.expectRevert(IVestingSchedulerV2.AccountInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + alice, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + 0, + EMPTY_CTX + ); + + // revert with receivers = address(0) + vm.expectRevert(IVestingSchedulerV2.AccountInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + address(0), + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + 0, + EMPTY_CTX + ); + + // revert with flowRate = 0 + vm.expectRevert(IVestingSchedulerV2.FlowRateInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + 0, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + 0, + EMPTY_CTX + ); + + // revert with cliffDate = 0 but cliffAmount != 0 + vm.expectRevert(IVestingSchedulerV2.CliffInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + 0, + 0, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + 0, + EMPTY_CTX + ); + + // revert with startDate < block.timestamp && cliffDate = 0 + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + uint32(block.timestamp - 1), + 0, + FLOW_RATE, + 0, + END_DATE, + 0, + EMPTY_CTX + ); + + // revert with endDate = 0 + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + 0, + 0, + EMPTY_CTX + ); + + // revert with cliffAndFlowDate < block.timestamp + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + 0, + uint32(block.timestamp) - 1, + FLOW_RATE, + 0, + END_DATE, + 0, + EMPTY_CTX + ); + + // revert with cliffAndFlowDate >= endDate + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + CLIFF_DATE, + 0, + EMPTY_CTX + ); + + // revert with cliffAndFlowDate + startDateValidFor >= endDate - endDateValidBefore + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + CLIFF_DATE, + 0, + EMPTY_CTX + ); + + // revert with startDate > cliffDate + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + CLIFF_DATE + 1, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + 0, + EMPTY_CTX + ); + + + // revert with vesting duration < 7 days + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + CLIFF_DATE + 2 days, + 0, + EMPTY_CTX + ); + } + + function testCannotCreateVestingScheduleIfDataExist() public { + _createVestingScheduleWithDefaultData(alice, bob); + vm.expectRevert(IVestingSchedulerV2.ScheduleAlreadyExists.selector); + _createVestingScheduleWithDefaultData(alice, bob); + } + + function testUpdateVestingSchedule() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + vm.expectEmit(true, true, true, true); + emit VestingScheduleCreated( + superToken, alice, bob, START_DATE, CLIFF_DATE, FLOW_RATE, END_DATE, CLIFF_TRANSFER_AMOUNT, 0, 0); + _createVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.startPrank(admin); + uint256 initialTimestamp = block.timestamp + 10 days + 1800; + vm.warp(initialTimestamp); + vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + vm.stopPrank(); + vm.startPrank(alice); + vestingScheduler.updateVestingSchedule(superToken, bob, END_DATE + 1000, EMPTY_CTX); + //assert storage data + IVestingSchedulerV2.VestingSchedule memory schedule = vestingScheduler.getVestingSchedule(address(superToken), alice, bob); + assertTrue(schedule.cliffAndFlowDate == 0 , "schedule.cliffAndFlowDate"); + assertTrue(schedule.endDate == END_DATE + 1000 , "schedule.endDate"); + } + + function test_updateVestingSchedule_invalidEndDate() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + vm.expectEmit(true, true, true, true); + emit VestingScheduleCreated( + superToken, alice, bob, START_DATE, CLIFF_DATE, FLOW_RATE, END_DATE, CLIFF_TRANSFER_AMOUNT, 0, 0); + _createVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.startPrank(admin); + uint256 initialTimestamp = block.timestamp + 10 days + 1800; + vm.warp(initialTimestamp); + vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + vm.stopPrank(); + vm.startPrank(alice); + + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.updateVestingSchedule(superToken, bob, uint32(initialTimestamp - 1), EMPTY_CTX); + + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.updateVestingSchedule(superToken, bob, uint32(initialTimestamp), EMPTY_CTX); + + + } + + function testCannotUpdateVestingScheduleIfNotRunning() public { + _createVestingScheduleWithDefaultData(alice, bob); + vm.startPrank(alice); + vm.expectRevert(IVestingSchedulerV2.ScheduleNotFlowing.selector); + vestingScheduler.updateVestingSchedule(superToken, bob, END_DATE, EMPTY_CTX); + } + + function testCannotUpdateVestingScheduleIfDataDontExist() public { + vm.startPrank(alice); + vm.expectRevert(IVestingSchedulerV2.ScheduleNotFlowing.selector); + vestingScheduler.updateVestingSchedule(superToken, bob, END_DATE, EMPTY_CTX); + } + + function testDeleteVestingSchedule() public { + _createVestingScheduleWithDefaultData(alice, bob); + vm.startPrank(alice); + vm.expectEmit(true, true, true, true); + emit VestingScheduleDeleted(superToken, alice, bob); + vestingScheduler.deleteVestingSchedule(superToken, bob, EMPTY_CTX); + testAssertScheduleDoesNotExist(address(superToken), alice, bob); + } + + function testCannotDeleteVestingScheduleIfDataDontExist() public { + vm.startPrank(alice); + vm.expectRevert(IVestingSchedulerV2.ScheduleDoesNotExist.selector); + vestingScheduler.deleteVestingSchedule( + superToken, + bob, + EMPTY_CTX + ); + } + + function testExecuteCliffAndFlowWithCliffAmount() public { + uint256 aliceInitialBalance = superToken.balanceOf(alice); + uint256 bobInitialBalance = superToken.balanceOf(bob); + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.startPrank(admin); + uint256 initialTimestamp = block.timestamp + 10 days + 1800; + vm.warp(initialTimestamp); + uint256 flowDelayCompensation = (block.timestamp - CLIFF_DATE) * uint96(FLOW_RATE); + vm.expectEmit(true, true, true, true); + emit Transfer(alice, bob, CLIFF_TRANSFER_AMOUNT + flowDelayCompensation); + vm.expectEmit(true, true, true, true); + emit VestingCliffAndFlowExecuted( + superToken, alice, bob, CLIFF_DATE, FLOW_RATE, CLIFF_TRANSFER_AMOUNT, flowDelayCompensation + ); + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + assertTrue(success, "executeVesting should return true"); + uint256 finalTimestamp = block.timestamp + 10 days - 3600; + vm.warp(finalTimestamp); + vm.expectEmit(true, true, true, true); + uint256 timeDiffToEndDate = END_DATE > block.timestamp ? END_DATE - block.timestamp : 0; + uint256 adjustedAmountClosing = timeDiffToEndDate * uint96(FLOW_RATE); + emit Transfer(alice, bob, adjustedAmountClosing); + vm.expectEmit(true, true, true, true); + emit VestingEndExecuted( + superToken, alice, bob, END_DATE, adjustedAmountClosing, false + ); + success = vestingScheduler.executeEndVesting(superToken, alice, bob); + assertTrue(success, "executeCloseVesting should return true"); + uint256 aliceFinalBalance = superToken.balanceOf(alice); + uint256 bobFinalBalance = superToken.balanceOf(bob); + uint256 aliceShouldStream = (END_DATE-CLIFF_DATE) * uint96(FLOW_RATE) + CLIFF_TRANSFER_AMOUNT ; + assertEq(aliceInitialBalance - aliceFinalBalance, aliceShouldStream, "(sender) wrong final balance"); + assertEq(bobFinalBalance, bobInitialBalance + aliceShouldStream, "(receiver) wrong final balance"); + + vm.expectRevert(IVestingSchedulerV2.AlreadyExecuted.selector); + success = vestingScheduler.executeEndVesting(superToken, alice, bob); + + } + + function testExecuteCliffAndFlowWithoutCliffAmountOrAdjustment() public { + uint256 aliceInitialBalance = superToken.balanceOf(alice); + uint256 bobInitialBalance = superToken.balanceOf(bob); + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + vm.startPrank(alice); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + 0, + END_DATE, + 0, + EMPTY_CTX + ); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.stopPrank(); + vm.startPrank(admin); + vm.warp(CLIFF_DATE); + vm.expectEmit(true, true, true, true); + emit VestingCliffAndFlowExecuted( + superToken, alice, bob, CLIFF_DATE, FLOW_RATE, 0, 0 + ); + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + assertTrue(success, "executeVesting should return true"); + vm.warp(END_DATE); + vm.expectEmit(true, true, true, true); + emit VestingEndExecuted(superToken, alice, bob, END_DATE, 0, false); + success = vestingScheduler.executeEndVesting(superToken, alice, bob); + assertTrue(success, "executeCloseVesting should return true"); + uint256 aliceFinalBalance = superToken.balanceOf(alice); + uint256 bobFinalBalance = superToken.balanceOf(bob); + uint256 aliceShouldStream = (END_DATE-CLIFF_DATE) * uint96(FLOW_RATE); + assertEq(aliceInitialBalance - aliceFinalBalance, aliceShouldStream, "(sender) wrong final balance"); + assertEq(bobFinalBalance, bobInitialBalance + aliceShouldStream, "(receiver) wrong final balance"); + } + + function testExecuteCliffAndFlowWithUpdatedEndDate() public { + uint32 NEW_END_DATE = END_DATE - 1000; + uint256 aliceInitialBalance = superToken.balanceOf(alice); + uint256 bobInitialBalance = superToken.balanceOf(bob); + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.startPrank(admin); + uint256 initialTimestamp = block.timestamp + 10 days + 1800; + vm.warp(initialTimestamp); + uint256 flowDelayCompensation = (block.timestamp - CLIFF_DATE) * uint96(FLOW_RATE); + vm.expectEmit(true, true, true, true); + emit Transfer(alice, bob, CLIFF_TRANSFER_AMOUNT + flowDelayCompensation); + vm.expectEmit(true, true, true, true); + emit VestingCliffAndFlowExecuted( + superToken, alice, bob, CLIFF_DATE, FLOW_RATE, CLIFF_TRANSFER_AMOUNT, flowDelayCompensation + ); + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + assertTrue(success, "executeVesting should return true"); + vm.stopPrank(); + vm.prank(alice); + vm.expectEmit(true, true, true, true); + emit VestingScheduleUpdated(superToken, alice, bob, END_DATE, NEW_END_DATE, 0); + vestingScheduler.updateVestingSchedule(superToken, bob, NEW_END_DATE, EMPTY_CTX); + uint256 finalTimestamp = block.timestamp + 10 days - 3600; + vm.warp(finalTimestamp); + vm.expectEmit(true, true, true, true); + uint256 timeDiffToEndDate = NEW_END_DATE > block.timestamp ? NEW_END_DATE - block.timestamp : 0; + uint256 adjustedAmountClosing = timeDiffToEndDate * uint96(FLOW_RATE); + emit Transfer(alice, bob, adjustedAmountClosing); + vm.expectEmit(true, true, true, true); + emit VestingEndExecuted( + superToken, alice, bob, NEW_END_DATE, adjustedAmountClosing, false + ); + success = vestingScheduler.executeEndVesting(superToken, alice, bob); + assertTrue(success, "executeCloseVesting should return true"); + uint256 aliceFinalBalance = superToken.balanceOf(alice); + uint256 bobFinalBalance = superToken.balanceOf(bob); + uint256 aliceShouldStream = (NEW_END_DATE-CLIFF_DATE) * uint96(FLOW_RATE) + CLIFF_TRANSFER_AMOUNT ; + assertEq(aliceInitialBalance - aliceFinalBalance, aliceShouldStream, "(sender) wrong final balance"); + assertEq(bobFinalBalance, bobInitialBalance + aliceShouldStream, "(receiver) wrong final balance"); + } + + function testExecuteCliffAndFlowRevertClosingTransfer() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.startPrank(admin); + uint256 initialTimestamp = block.timestamp + 10 days + 1800; + vm.warp(initialTimestamp); + uint256 flowDelayCompensation = (block.timestamp - CLIFF_DATE) * uint96(FLOW_RATE); + vm.expectEmit(true, true, true, true); + emit Transfer(alice, bob, CLIFF_TRANSFER_AMOUNT + flowDelayCompensation); + vm.expectEmit(true, true, true, true); + emit VestingCliffAndFlowExecuted( + superToken, alice, bob, CLIFF_DATE, FLOW_RATE, CLIFF_TRANSFER_AMOUNT, flowDelayCompensation + ); + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + assertTrue(success, "executeVesting should return true"); + vm.stopPrank(); + vm.startPrank(alice); + superToken.transferAll(eve); + vm.stopPrank(); + vm.startPrank(admin); + uint256 earlyEndTimestamp = block.timestamp + 10 days - 3600; + vm.warp(earlyEndTimestamp); + + vm.expectRevert(); + vestingScheduler.executeEndVesting(superToken, alice, bob); + + uint256 finalTimestamp = END_DATE + 1; + vm.warp(finalTimestamp); + + vm.expectEmit(true, true, true, true); + emit VestingEndExecuted( + superToken, alice, bob, END_DATE, 0, true + ); + success = vestingScheduler.executeEndVesting(superToken, alice, bob); + assertTrue(success, "executeCloseVesting should return true"); + } + + function testCannotExecuteEndVestingBeforeTime() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.startPrank(admin); + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.executeEndVesting(superToken, alice, bob); + } + + function testCannotExecuteCliffAndFlowBeforeTime() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.startPrank(admin); + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + } + + function testCannotExecuteEndWithoutStreamRunning() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.startPrank(admin); + uint256 initialTimestamp = block.timestamp + 10 days + 1800; + vm.warp(initialTimestamp); + + uint256 flowDelayCompensation = (block.timestamp - CLIFF_DATE) * uint96(FLOW_RATE); + + vm.expectEmit(true, true, true, true); + emit Transfer(alice, bob, CLIFF_TRANSFER_AMOUNT + flowDelayCompensation); + + vm.expectEmit(true, true, true, true); + emit VestingCliffAndFlowExecuted( + superToken, alice, bob, CLIFF_DATE, FLOW_RATE, CLIFF_TRANSFER_AMOUNT, flowDelayCompensation + ); + + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + assertTrue(success, "executeVesting should return true"); + vm.stopPrank(); + vm.startPrank(alice); + superToken.deleteFlow(alice, bob); + vm.stopPrank(); + vm.startPrank(admin); + uint256 finalTimestamp = block.timestamp + 10 days - 3600; + vm.warp(finalTimestamp); + vm.expectEmit(true, true, true, true); + emit VestingEndFailed( + superToken, alice, bob, END_DATE + ); + success = vestingScheduler.executeEndVesting(superToken, alice, bob); + assertTrue(success, "executeCloseVesting should return true"); + } + + // # Vesting Scheduler V2 tests + + function testCreateAndExecuteImmediately() public { + uint256 aliceInitialBalance = superToken.balanceOf(alice); + uint256 bobInitialBalance = superToken.balanceOf(bob); + + // # Create schedule + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + + vm.startPrank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + + uint32 startAndCliffDate = uint32(block.timestamp); + + vm.expectEmit(); + emit VestingScheduleCreated(superToken, alice, bob, startAndCliffDate, startAndCliffDate, FLOW_RATE, END_DATE, CLIFF_TRANSFER_AMOUNT, 0, 0); + + vestingScheduler.createVestingSchedule( + superToken, + bob, + startAndCliffDate, + startAndCliffDate, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + 0, + EMPTY_CTX + ); + // --- + + // # Execute start + vm.expectEmit(); + emit Transfer(alice, bob, CLIFF_TRANSFER_AMOUNT); + + vm.expectEmit(); + emit VestingCliffAndFlowExecuted( + superToken, alice, bob, startAndCliffDate, FLOW_RATE, CLIFF_TRANSFER_AMOUNT, uint256(0) + ); + vm.stopPrank(); + + vm.startPrank(admin); + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + vm.stopPrank(); + + assertTrue(success, "executeVesting should return true"); + // --- + + // # Execute end + uint256 finalTimestamp = END_DATE - 3600; + vm.warp(finalTimestamp); + + uint256 timeDiffToEndDate = END_DATE > block.timestamp ? END_DATE - block.timestamp : 0; + uint256 adjustedAmountClosing = timeDiffToEndDate * uint96(FLOW_RATE); + + vm.expectEmit(); + emit Transfer(alice, bob, adjustedAmountClosing); + + vm.expectEmit(); + emit VestingEndExecuted( + superToken, alice, bob, END_DATE, adjustedAmountClosing, false + ); + vm.startPrank(admin); + success = vestingScheduler.executeEndVesting(superToken, alice, bob); + vm.stopPrank(); + assertTrue(success, "executeCloseVesting should return true"); + + uint256 aliceFinalBalance = superToken.balanceOf(alice); + uint256 bobFinalBalance = superToken.balanceOf(bob); + uint256 aliceShouldStream = (END_DATE - startAndCliffDate) * uint96(FLOW_RATE) + CLIFF_TRANSFER_AMOUNT; + assertEq(aliceInitialBalance - aliceFinalBalance, aliceShouldStream, "(sender) wrong final balance"); + assertEq(bobFinalBalance, bobInitialBalance + aliceShouldStream, "(receiver) wrong final balance"); + // --- + } + + function test_createScheduleFromAmountAndDuration_reverts() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + + vm.expectRevert(IVestingSchedulerV2.FlowRateInvalid.selector); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + 0, // amount + 1209600, // duration + uint32(block.timestamp), // startDate + 604800, // cliffPeriod + 0, // claimPeriod + EMPTY_CTX + ); + + console.log("Revert with cliff and start in history."); + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + 1 ether, // amount + 1209600, // duration + uint32(block.timestamp - 1), // startDate + 0, // cliffPeriod + 0, // claimPeriod + EMPTY_CTX + ); + + console.log("Revert with overflow."); + vm.expectRevert("SafeCast: value doesn't fit in 96 bits"); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + type(uint256).max, // amount + 1209600, // duration + uint32(block.timestamp), // startDate + 0, // cliffPeriod + 0, // claimPeriod + EMPTY_CTX + ); + + console.log("Revert with underflow/overflow."); + vm.expectRevert(); // todo: the right error + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + 1 ether, // amount + type(uint32).max, // duration + uint32(block.timestamp), // startDate + 0, // cliffPeriod + 0, // claimPeriod + EMPTY_CTX + ); + + console.log("Revert with start date in history."); + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + 1 ether, // amount + 1209600, // duration + uint32(block.timestamp - 1), // startDate + 604800, // cliffPeriod + 0, // claimPeriod + EMPTY_CTX + ); + } + + function testNewFunctionScheduleCreationWithoutCliff(uint8 randomizer) public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + + vm.startPrank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.stopPrank(); + + uint32 startDate = uint32(block.timestamp); + uint256 totalVestedAmount = 105_840_000; // a value perfectly divisible by a week + uint32 vestingDuration = 1 weeks; + int96 expectedFlowRate = 175; // totalVestedAmount / vestingDuration + uint32 expectedEndDate = startDate + vestingDuration; + + vm.expectEmit(); + emit VestingScheduleCreated(superToken, alice, bob, startDate, 0, expectedFlowRate, expectedEndDate, 0, 0, 0); + + vm.startPrank(alice); + bool useCtx = randomizer % 2 == 0; + if (useCtx) { + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalVestedAmount, + vestingDuration, + startDate, + 0, // cliffPeriod + 0, // claimPeriod + EMPTY_CTX + ); + } else { + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalVestedAmount, + vestingDuration, + startDate, + 0, // cliffPeriod + 0 // claimPeriod + ); + } + vm.stopPrank(); + } + + function testNewFunctionScheduleCreationWithCliff(uint8 randomizer) public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + + vm.startPrank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.stopPrank(); + + uint32 startDate = uint32(block.timestamp); + uint256 totalVestedAmount = 103_680_000; // a value perfectly divisible + uint32 vestingDuration = 1 weeks + 1 days; + uint32 cliffPeriod = 1 days; + + int96 expectedFlowRate = 150; // (totalVestedAmount - cliffAmount) / (vestingDuration - cliffPeriod) + uint256 expectedCliffAmount = 12960000; + uint32 expectedCliffDate = startDate + cliffPeriod; + uint32 expectedEndDate = startDate + vestingDuration; + + vm.expectEmit(); + emit VestingScheduleCreated(superToken, alice, bob, startDate, expectedCliffDate, expectedFlowRate, expectedEndDate, expectedCliffAmount, 0, 0); + + vm.startPrank(alice); + bool useCtx = randomizer % 2 == 0; + if (useCtx) { + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalVestedAmount, + vestingDuration, + startDate, + cliffPeriod, + 0, + EMPTY_CTX + ); + } else { + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalVestedAmount, + vestingDuration, + startDate, + cliffPeriod, + 0 + ); + } + vm.stopPrank(); + } + + struct BigTestData { + uint256 beforeSenderBalance; + uint256 beforeReceiverBalance; + uint256 afterSenderBalance; + uint256 afterReceiverBalance; + uint32 expectedCliffDate; + uint32 expectedStartDate; + address claimer; + IVestingSchedulerV2.VestingSchedule expectedSchedule; + } + + // Claimable Vesting Schedules tests + function test_createScheduleFromAmountAndDuration_executeCliffAndFlow_executeEndVesting_withClaim( + uint256 totalAmount, + uint32 totalDuration, + uint32 cliffPeriod, + uint32 startDate, + uint32 claimPeriod, + uint8 randomizer + ) public { + // Assume + randomizer = SafeCast.toUint8(bound(randomizer, 1, type(uint8).max)); + + if (startDate != 0) { + startDate = SafeCast.toUint32(bound(startDate, block.timestamp, 2524600800)); + } + + totalDuration = SafeCast.toUint32(bound(totalDuration, vestingScheduler.MIN_VESTING_DURATION(), 9125 days)); + vm.assume(cliffPeriod <= totalDuration - vestingScheduler.MIN_VESTING_DURATION()); + + claimPeriod = SafeCast.toUint32(bound(claimPeriod, 1, 9125 days)); + vm.assume(claimPeriod > (cliffPeriod > 0 ? startDate + cliffPeriod : startDate)); + vm.assume(claimPeriod < totalDuration - vestingScheduler.END_DATE_VALID_BEFORE()); + + BigTestData memory $; + + $.beforeSenderBalance = superToken.balanceOf(alice); + $.beforeReceiverBalance = superToken.balanceOf(bob); + + totalAmount = bound(totalAmount, 1, $.beforeSenderBalance); + vm.assume(totalAmount >= totalDuration); + vm.assume(totalAmount / totalDuration <= SafeCast.toUint256(type(int96).max)); + + assertTrue(vestingScheduler.getVestingSchedule(address(superToken), alice, bob).endDate == 0, "Schedule should not exist"); + + // Arrange + $.expectedSchedule = _getExpectedScheduleFromAmountAndDuration( + totalAmount, + totalDuration, + cliffPeriod, + startDate, + claimPeriod + ); + $.expectedCliffDate = cliffPeriod == 0 ? 0 : $.expectedSchedule.cliffAndFlowDate; + $.expectedStartDate = startDate == 0 ? uint32(block.timestamp) : startDate; + + // Assume we're not getting liquidated at the end: + vm.assume($.beforeSenderBalance >= totalAmount + vestingScheduler.END_DATE_VALID_BEFORE() * SafeCast.toUint256($.expectedSchedule.flowRate)); + + console.log("Total amount: %s", totalAmount); + console.log("Total duration: %s", totalDuration); + console.log("Cliff period: %s", cliffPeriod); + console.log("Claim period: %s", claimPeriod); + console.log("Start date: %s", startDate); + console.log("Randomizer: %s", randomizer); + console.log("Expected start date: %s", $.expectedStartDate); + console.log("Expected claim date: %s", $.expectedSchedule.claimValidityDate); + console.log("Expected cliff date: %s", $.expectedCliffDate); + console.log("Expected cliff & flow date: %s", $.expectedSchedule.cliffAndFlowDate); + console.log("Expected end date: %s", $.expectedSchedule.endDate); + console.log("Expected flow rate: %s", SafeCast.toUint256($.expectedSchedule.flowRate)); + console.log("Expected cliff amount: %s", $.expectedSchedule.cliffAmount); + console.log("Expected remainder amount: %s", $.expectedSchedule.remainderAmount); + console.log("Sender balance: %s", $.beforeSenderBalance); + + // Arrange allowance + assertTrue(superToken.allowance(alice, address(vestingScheduler)) == 0, "Let's start without any allowance"); + + vm.startPrank(alice); + superToken.revokeFlowPermissions(address(vestingScheduler)); + superToken.setFlowPermissions( + address(vestingScheduler), + true, // allowCreate + false, // allowUpdate + true, // allowDelete, + $.expectedSchedule.flowRate + ); + superToken.approve(address(vestingScheduler), vestingScheduler.getMaximumNeededTokenAllowance($.expectedSchedule)); + vm.stopPrank(); + + // Intermediary `mapCreateVestingScheduleParams` test + assertAreScheduleCreationParamsEqual( + IVestingSchedulerV2.ScheduleCreationParams( + superToken, + alice, + bob, + $.expectedStartDate, + $.expectedSchedule.claimValidityDate, + $.expectedCliffDate, + $.expectedSchedule.flowRate, + $.expectedSchedule.cliffAmount, + $.expectedSchedule.endDate, + $.expectedSchedule.remainderAmount + ), + vestingScheduler.mapCreateVestingScheduleParams(superToken, alice, bob, totalAmount, totalDuration, $.expectedStartDate, cliffPeriod, claimPeriod)); + + vm.expectEmit(); + emit VestingScheduleCreated(superToken, alice, bob, $.expectedStartDate, $.expectedCliffDate, $.expectedSchedule.flowRate, $.expectedSchedule.endDate, $.expectedSchedule.cliffAmount, $.expectedSchedule.claimValidityDate, $.expectedSchedule.remainderAmount); + + // Act + vm.startPrank(alice); + if (randomizer % 3 == 0) { + console.log("Using the overload without superfluid context."); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalAmount, + totalDuration, + startDate, + cliffPeriod, + claimPeriod + ); + } else { + console.log("Using the overload with superfluid context."); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalAmount, + totalDuration, + startDate, + cliffPeriod, + claimPeriod, + EMPTY_CTX + ); + } + vm.stopPrank(); + + // Assert + IVestingSchedulerV2.VestingSchedule memory actualSchedule = vestingScheduler.getVestingSchedule(address(superToken), alice, bob); + assertEq(actualSchedule.cliffAndFlowDate, $.expectedSchedule.cliffAndFlowDate, "schedule created: cliffAndFlowDate not expected"); + assertEq(actualSchedule.flowRate, $.expectedSchedule.flowRate, "schedule created: flowRate not expected"); + assertEq(actualSchedule.cliffAmount, $.expectedSchedule.cliffAmount, "schedule created: cliffAmount not expected"); + assertEq(actualSchedule.endDate, $.expectedSchedule.endDate, "schedule created: endDate not expected"); + assertEq(actualSchedule.remainderAmount, $.expectedSchedule.remainderAmount, "schedule created: remainderAmount not expected"); + assertEq(actualSchedule.claimValidityDate, $.expectedSchedule.claimValidityDate, "schedule created: claimValidityDate not expected"); + + // Act + console.log("Executing cliff and flow."); + uint32 randomFlowDelay = ($.expectedSchedule.claimValidityDate - $.expectedSchedule.cliffAndFlowDate); + vm.warp($.expectedSchedule.cliffAndFlowDate + randomFlowDelay); + + $.claimer = randomizer % 2 == 0 ? bob : alice; + + vm.prank($.claimer); + vm.expectEmit(); + emit VestingClaimed( + superToken, alice, bob, $.claimer + ); + vm.expectEmit(); + emit VestingCliffAndFlowExecuted(superToken, alice, bob, $.expectedSchedule.cliffAndFlowDate, $.expectedSchedule.flowRate, $.expectedSchedule.cliffAmount, randomFlowDelay * SafeCast.toUint256($.expectedSchedule.flowRate)); + assertTrue(vestingScheduler.executeCliffAndFlow(superToken, alice, bob)); + vm.stopPrank(); + + // Assert + actualSchedule = vestingScheduler.getVestingSchedule(address(superToken), alice, bob); + assertEq(actualSchedule.cliffAndFlowDate, 0, "schedule started: cliffAndFlowDate not expected"); + assertEq(actualSchedule.cliffAmount, 0, "schedule started: cliffAmount not expected"); + assertEq(actualSchedule.flowRate, $.expectedSchedule.flowRate, "schedule started: flowRate not expected"); + assertEq(actualSchedule.endDate, $.expectedSchedule.endDate, "schedule started: endDate not expected"); + assertEq(actualSchedule.remainderAmount, $.expectedSchedule.remainderAmount, "schedule started: remainderAmount not expected"); + + if (randomizer % 7 != 0) { + // # Test end execution on time. + + console.log("Executing end vesting early."); + uint32 randomEarlyEndTime = (vestingScheduler.END_DATE_VALID_BEFORE() - (vestingScheduler.END_DATE_VALID_BEFORE() / randomizer)); + vm.warp($.expectedSchedule.endDate - randomEarlyEndTime); + vm.expectEmit(); + uint256 earlyEndCompensation = randomEarlyEndTime * SafeCast.toUint256($.expectedSchedule.flowRate) + $.expectedSchedule.remainderAmount; + emit VestingEndExecuted(superToken, alice, bob, $.expectedSchedule.endDate, earlyEndCompensation, false); + + // Act + assertTrue(vestingScheduler.executeEndVesting(superToken, alice, bob)); + + // Assert + $.afterSenderBalance = superToken.balanceOf(alice); + $.afterReceiverBalance = superToken.balanceOf(bob); + + assertEq($.afterSenderBalance, $.beforeSenderBalance - totalAmount, "Sender balance should decrease by totalAmount"); + assertEq($.afterReceiverBalance, $.beforeReceiverBalance + totalAmount, "Receiver balance should increase by totalAmount"); + } else { + // # Test end execution delayed. + + console.log("Executing end vesting late."); + uint32 randomLateEndDelay = (totalDuration / randomizer); + vm.warp($.expectedSchedule.endDate + randomLateEndDelay); // There is some chance of overflow here. + + if (randomizer % 13 == 0) { + vm.startPrank(alice); + superToken.deleteFlow(alice, bob); + vm.stopPrank(); + + vm.expectEmit(); + emit VestingEndFailed(superToken, alice, bob, $.expectedSchedule.endDate); + } else { + vm.expectEmit(); + emit VestingEndExecuted(superToken, alice, bob, $.expectedSchedule.endDate, 0, true); + } + + // Act + assertTrue(vestingScheduler.executeEndVesting(superToken, alice, bob)); + + // Assert + $.afterSenderBalance = superToken.balanceOf(alice); + $.afterReceiverBalance = superToken.balanceOf(bob); + + assertLt($.afterSenderBalance, $.beforeSenderBalance - totalAmount + $.expectedSchedule.remainderAmount, "Sender balance should decrease by at least totalAmount"); + assertGt($.afterReceiverBalance, $.beforeReceiverBalance + totalAmount - $.expectedSchedule.remainderAmount, "Receiver balance should increase by at least totalAmount"); + } + + testAssertScheduleDoesNotExist(address(superToken), alice, bob); + + vm.warp(type(uint32).max); + assertEq($.afterSenderBalance, superToken.balanceOf(alice), "After the schedule has ended, the sender's balance should never change."); + } + + function test_createScheduleFromAmountAndDuration_executeCliffAndFlow_executeEndVesting_withClaim_withSingleTransfer( + uint256 totalAmount, + uint32 totalDuration, + uint32 cliffPeriod, + uint32 startDate, + uint32 claimPeriod, + uint8 randomizer + ) public { + // Assume + randomizer = SafeCast.toUint8(bound(randomizer, 1, type(uint8).max)); + + if (startDate != 0) { + startDate = SafeCast.toUint32(bound(startDate, block.timestamp, 2524600800)); + } + + totalDuration = SafeCast.toUint32(bound(totalDuration, vestingScheduler.MIN_VESTING_DURATION(), 9125 days)); + vm.assume(cliffPeriod <= totalDuration - vestingScheduler.MIN_VESTING_DURATION()); + + claimPeriod = SafeCast.toUint32(bound(claimPeriod, 1, 9125 days)); + vm.assume(claimPeriod > (startDate + totalDuration - vestingScheduler.END_DATE_VALID_BEFORE())); + + BigTestData memory $; + + $.beforeSenderBalance = superToken.balanceOf(alice); + $.beforeReceiverBalance = superToken.balanceOf(bob); + + totalAmount = bound(totalAmount, 1, $.beforeSenderBalance); + vm.assume(totalAmount >= totalDuration); + vm.assume(totalAmount / totalDuration <= SafeCast.toUint256(type(int96).max)); + + assertTrue(vestingScheduler.getVestingSchedule(address(superToken), alice, bob).endDate == 0, "Schedule should not exist"); + + // Arrange + $.expectedSchedule = _getExpectedScheduleFromAmountAndDuration( + totalAmount, + totalDuration, + cliffPeriod, + startDate, + claimPeriod + ); + $.expectedCliffDate = cliffPeriod == 0 ? 0 : $.expectedSchedule.cliffAndFlowDate; + $.expectedStartDate = startDate == 0 ? uint32(block.timestamp) : startDate; + + // Assume we're not getting liquidated at the end: + vm.assume($.beforeSenderBalance >= totalAmount + vestingScheduler.END_DATE_VALID_BEFORE() * SafeCast.toUint256($.expectedSchedule.flowRate)); + + console.log("Total amount: %s", totalAmount); + console.log("Total duration: %s", totalDuration); + console.log("Cliff period: %s", cliffPeriod); + console.log("Claim period: %s", claimPeriod); + console.log("Start date: %s", startDate); + console.log("Randomizer: %s", randomizer); + console.log("Expected start date: %s", $.expectedStartDate); + console.log("Expected claim date: %s", $.expectedSchedule.claimValidityDate); + console.log("Expected cliff date: %s", $.expectedCliffDate); + console.log("Expected cliff & flow date: %s", $.expectedSchedule.cliffAndFlowDate); + console.log("Expected end date: %s", $.expectedSchedule.endDate); + console.log("Expected flow rate: %s", SafeCast.toUint256($.expectedSchedule.flowRate)); + console.log("Expected cliff amount: %s", $.expectedSchedule.cliffAmount); + console.log("Expected remainder amount: %s", $.expectedSchedule.remainderAmount); + console.log("Sender balance: %s", $.beforeSenderBalance); + + // Arrange allowance + assertTrue(superToken.allowance(alice, address(vestingScheduler)) == 0, "Let's start without any allowance"); + + vm.startPrank(alice); + superToken.revokeFlowPermissions(address(vestingScheduler)); + superToken.approve(address(vestingScheduler), vestingScheduler.getMaximumNeededTokenAllowance($.expectedSchedule)); + vm.stopPrank(); + + // Intermediary `mapCreateVestingScheduleParams` test + assertAreScheduleCreationParamsEqual( + IVestingSchedulerV2.ScheduleCreationParams( + superToken, + alice, + bob, + $.expectedStartDate, + $.expectedSchedule.claimValidityDate, + $.expectedCliffDate, + $.expectedSchedule.flowRate, + $.expectedSchedule.cliffAmount, + $.expectedSchedule.endDate, + $.expectedSchedule.remainderAmount + ), + vestingScheduler.mapCreateVestingScheduleParams(superToken, alice, bob, totalAmount, totalDuration, $.expectedStartDate, cliffPeriod, claimPeriod)); + + vm.expectEmit(); + emit VestingScheduleCreated(superToken, alice, bob, $.expectedStartDate, $.expectedCliffDate, $.expectedSchedule.flowRate, $.expectedSchedule.endDate, $.expectedSchedule.cliffAmount, $.expectedSchedule.claimValidityDate, $.expectedSchedule.remainderAmount); + + // Act + vm.startPrank(alice); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalAmount, + totalDuration, + startDate, + cliffPeriod, + claimPeriod, + EMPTY_CTX + ); + vm.stopPrank(); + + // Assert + IVestingSchedulerV2.VestingSchedule memory actualSchedule = vestingScheduler.getVestingSchedule(address(superToken), alice, bob); + assertEq(actualSchedule.cliffAndFlowDate, $.expectedSchedule.cliffAndFlowDate, "schedule created: cliffAndFlowDate not expected"); + assertEq(actualSchedule.flowRate, $.expectedSchedule.flowRate, "schedule created: flowRate not expected"); + assertEq(actualSchedule.cliffAmount, $.expectedSchedule.cliffAmount, "schedule created: cliffAmount not expected"); + assertEq(actualSchedule.endDate, $.expectedSchedule.endDate, "schedule created: endDate not expected"); + assertEq(actualSchedule.remainderAmount, $.expectedSchedule.remainderAmount, "schedule created: remainderAmount not expected"); + assertEq(actualSchedule.claimValidityDate, $.expectedSchedule.claimValidityDate, "schedule created: claimValidityDate not expected"); + + // Act + console.log("Executing cliff and flow."); + vm.warp($.expectedSchedule.endDate - vestingScheduler.END_DATE_VALID_BEFORE() + + /* random delay: */ ($.expectedSchedule.claimValidityDate - ($.expectedSchedule.endDate - vestingScheduler.END_DATE_VALID_BEFORE())) / randomizer + ); + + $.claimer = randomizer % 2 == 0 ? bob : alice; + + vm.prank($.claimer); + + vm.expectEmit(); + emit VestingClaimed( + superToken, alice, bob, $.claimer + ); + vm.expectEmit(); + emit VestingCliffAndFlowExecuted(superToken, alice, bob, $.expectedSchedule.cliffAndFlowDate, 0, $.expectedSchedule.cliffAmount, totalAmount - $.expectedSchedule.cliffAmount); + + vm.expectEmit(); + emit VestingEndExecuted(superToken, alice, bob, $.expectedSchedule.endDate, 0, false); + + assertTrue(vestingScheduler.executeCliffAndFlow(superToken, alice, bob)); + vm.stopPrank(); + + $.afterSenderBalance = superToken.balanceOf(alice); + $.afterReceiverBalance = superToken.balanceOf(bob); + + assertEq($.afterSenderBalance, $.beforeSenderBalance - totalAmount, "Sender balance should decrease by totalAmount"); + assertEq($.afterReceiverBalance, $.beforeReceiverBalance + totalAmount, "Receiver balance should increase by totalAmount"); + + testAssertScheduleDoesNotExist(address(superToken), alice, bob); + + vm.warp(type(uint32).max); + assertEq($.afterSenderBalance, superToken.balanceOf(alice), "After the schedule has ended, the sender's balance should never change."); + } + + function test_createClaimableVestingSchedule() public { + + vm.expectEmit(true, true, true, true); + emit VestingScheduleCreated( + superToken, alice, bob, START_DATE, CLIFF_DATE, FLOW_RATE, END_DATE, CLIFF_TRANSFER_AMOUNT, CLAIM_VALIDITY_DATE, 0); + + vm.startPrank(alice); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + vm.stopPrank(); + + vm.startPrank(alice); + //assert storage data + VestingSchedulerV2.VestingSchedule memory schedule = vestingScheduler.getVestingSchedule(address(superToken), alice, bob); + assertTrue(schedule.cliffAndFlowDate == CLIFF_DATE , "schedule.cliffAndFlowDate"); + assertTrue(schedule.endDate == END_DATE , "schedule.endDate"); + assertTrue(schedule.flowRate == FLOW_RATE , "schedule.flowRate"); + assertTrue(schedule.claimValidityDate == CLAIM_VALIDITY_DATE, "schedule.claimValidityDate"); + assertTrue(schedule.cliffAmount == CLIFF_TRANSFER_AMOUNT , "schedule.cliffAmount"); + } + + function test_createClaimableVestingSchedule_claimValidity() public { + vm.expectEmit(true, true, true, true); + emit VestingScheduleCreated( + superToken, alice, bob, START_DATE, CLIFF_DATE, FLOW_RATE, END_DATE, CLIFF_TRANSFER_AMOUNT, CLAIM_VALIDITY_DATE, 0); + + vm.startPrank(alice); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + vm.stopPrank(); + + vm.startPrank(alice); + //assert storage data + VestingSchedulerV2.VestingSchedule memory schedule = vestingScheduler.getVestingSchedule(address(superToken), alice, bob); + assertTrue(schedule.cliffAndFlowDate == CLIFF_DATE , "schedule.cliffAndFlowDate"); + assertTrue(schedule.endDate == END_DATE , "schedule.endDate"); + assertTrue(schedule.flowRate == FLOW_RATE , "schedule.flowRate"); + assertTrue(schedule.claimValidityDate == CLAIM_VALIDITY_DATE, "schedule.claimValidityDate"); + assertTrue(schedule.cliffAmount == CLIFF_TRANSFER_AMOUNT , "schedule.cliffAmount"); + } + + function test_createClaimableVestingSchedule_noCtx() public { + vm.expectEmit(true, true, true, true); + emit VestingScheduleCreated( + superToken, alice, bob, START_DATE, CLIFF_DATE, FLOW_RATE, END_DATE, CLIFF_TRANSFER_AMOUNT, CLAIM_VALIDITY_DATE, 0); + + vm.startPrank(alice); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE + ); + vm.stopPrank(); + + vm.startPrank(alice); + //assert storage data + VestingSchedulerV2.VestingSchedule memory schedule = vestingScheduler.getVestingSchedule(address(superToken), alice, bob); + assertTrue(schedule.cliffAndFlowDate == CLIFF_DATE , "schedule.cliffAndFlowDate"); + assertTrue(schedule.endDate == END_DATE , "schedule.endDate"); + assertTrue(schedule.flowRate == FLOW_RATE , "schedule.flowRate"); + assertTrue(schedule.claimValidityDate == CLAIM_VALIDITY_DATE, "schedule.flowRate"); + assertTrue(schedule.cliffAmount == CLIFF_TRANSFER_AMOUNT , "schedule.cliffAmount"); + } + + function test_createClaimableVestingSchedule_wrongData() public { + vm.startPrank(alice); + // revert with superToken = 0 + vm.expectRevert(IVestingSchedulerV2.ZeroAddress.selector); + vestingScheduler.createVestingSchedule( + ISuperToken(address(0)), + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + // revert with receivers = sender + vm.expectRevert(IVestingSchedulerV2.AccountInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + alice, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + // revert with receivers = address(0) + vm.expectRevert(IVestingSchedulerV2.AccountInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + address(0), + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + // revert with flowRate = 0 + vm.expectRevert(IVestingSchedulerV2.FlowRateInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + 0, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + // revert with cliffDate = 0 but cliffAmount != 0 + vm.expectRevert(IVestingSchedulerV2.CliffInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + 0, + 0, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + // revert with startDate < block.timestamp && cliffDate = 0 + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + uint32(block.timestamp - 1), + 0, + FLOW_RATE, + 0, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + // revert with endDate = 0 + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + 0, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + // revert with cliffAndFlowDate < block.timestamp + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + 0, + uint32(block.timestamp) - 1, + FLOW_RATE, + 0, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + // revert with cliffAndFlowDate >= endDate + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + CLIFF_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + // revert with cliffAndFlowDate + startDateValidFor >= endDate - endDateValidBefore + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + CLIFF_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + // revert with startDate > cliffDate + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + CLIFF_DATE + 1, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + + // revert with vesting duration < 7 days + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + CLIFF_DATE + 2 days, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + // revert with invalid claim validity date (before schedule/cliff start) + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLIFF_DATE - 1, + EMPTY_CTX + ); + } + + function test_createClaimableVestingSchedule_dataExists() public { + vm.startPrank(alice); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + vm.stopPrank(); + + vm.expectRevert(IVestingSchedulerV2.ScheduleAlreadyExists.selector); + + vm.startPrank(alice); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + vm.stopPrank(); + + } + + function test_createClaimableVestingScheduleFromAmountAndDuration_withoutCliff(uint8 randomizer) public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + + vm.startPrank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.stopPrank(); + + uint32 startDate = uint32(block.timestamp); + uint256 totalVestedAmount = 105_840_000; // a value perfectly divisible by a week + uint32 vestingDuration = 1 weeks; + uint32 claimPeriod = 1 days; + int96 expectedFlowRate = 175; // totalVestedAmount / vestingDuration + uint32 expectedEndDate = startDate + vestingDuration; + + vm.expectEmit(); + emit VestingScheduleCreated(superToken, alice, bob, startDate, 0, expectedFlowRate, expectedEndDate, 0, startDate + claimPeriod, 0); + vm.startPrank(alice); + bool useCtx = randomizer % 2 == 0; + if (useCtx) { + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalVestedAmount, + vestingDuration, + startDate, + 0, // cliffPeriod + claimPeriod, + EMPTY_CTX + ); + } else { + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalVestedAmount, + vestingDuration, + startDate, + 0, // cliffPeriod + claimPeriod + ); + } + vm.stopPrank(); + } + + function test_createClaimableVestingScheduleFromAmountAndDuration_withoutCliff_noStartDate() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + + vm.startPrank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.stopPrank(); + + uint256 totalVestedAmount = 105_840_000; // a value perfectly divisible by a week + uint32 vestingDuration = 1 weeks; + uint32 claimPeriod = 2 days; + int96 expectedFlowRate = 175; // totalVestedAmount / vestingDuration + uint32 expectedEndDate = uint32(block.timestamp) + vestingDuration; + + vm.expectEmit(); + emit VestingScheduleCreated( + superToken, + alice, + bob, + uint32(block.timestamp), + 0, + expectedFlowRate, + expectedEndDate, + 0, + uint32(block.timestamp) + claimPeriod, + 0 + ); + + vm.startPrank(alice); + + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalVestedAmount, + vestingDuration, + 0, + 0, + claimPeriod + ); + vm.stopPrank(); + } + + function test_createClaimableVestingScheduleFromAmountAndDuration_withCliff(uint8 randomizer) public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + + vm.startPrank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.stopPrank(); + + uint32 startDate = uint32(block.timestamp); + uint256 totalVestedAmount = 103_680_000; // a value perfectly divisible + uint32 vestingDuration = 1 weeks + 1 days; + uint32 cliffPeriod = 1 days; + uint32 claimPeriod = cliffPeriod + 1 days; + + int96 expectedFlowRate = 150; // (totalVestedAmount - cliffAmount) / (vestingDuration - cliffPeriod) + + vm.expectEmit(); + emit VestingScheduleCreated(superToken, alice, bob, startDate, startDate + cliffPeriod, expectedFlowRate, startDate + vestingDuration, 12960000, startDate + claimPeriod, 0); + + vm.startPrank(alice); + bool useCtx = randomizer % 2 == 0; + if (useCtx) { + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalVestedAmount, + vestingDuration, + startDate, + cliffPeriod, + claimPeriod, + EMPTY_CTX + ); + } else { + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalVestedAmount, + vestingDuration, + startDate, + cliffPeriod, + claimPeriod + ); + } + vm.stopPrank(); + } + + function test_createClaimableVestingScheduleFromAmountAndDuration_withCliff_noStartDate() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + + vm.startPrank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.stopPrank(); + + uint256 totalVestedAmount = 103_680_000; // a value perfectly divisible + uint32 vestingDuration = 1 weeks + 1 days; + uint32 cliffPeriod = 1 days; + + int96 expectedFlowRate = 150; // (totalVestedAmount - cliffAmount) / (vestingDuration - cliffPeriod) + uint256 expectedCliffAmount = 12960000; + uint32 expectedCliffDate = uint32(block.timestamp) + cliffPeriod; + uint32 claimPeriod = expectedCliffDate + 1 days; + uint32 expectedEndDate = uint32(block.timestamp) + vestingDuration; + + vm.expectEmit(); + emit VestingScheduleCreated(superToken, alice, bob, uint32(block.timestamp), expectedCliffDate, expectedFlowRate, expectedEndDate, expectedCliffAmount, uint32(block.timestamp) + claimPeriod, 0); + + vm.startPrank(alice); + + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalVestedAmount, + vestingDuration, + 0, + cliffPeriod, + claimPeriod + ); + + vm.stopPrank(); + } + + function test_createClaimableScheduleFromAmountAndDuration_wrongData() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + + vm.expectRevert(IVestingSchedulerV2.FlowRateInvalid.selector); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + 0, // amount + 1209600, // duration + uint32(block.timestamp), // startDate + 604800, // cliffPeriod + 15 days, // claimPeriod + EMPTY_CTX + ); + + console.log("Revert with cliff and start in history."); + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + 1 ether, // amount + 1209600, // duration + uint32(block.timestamp - 1), // startDate + 0, // cliffPeriod + 15 days, // claimPeriod + EMPTY_CTX + ); + + console.log("Revert with overflow."); + vm.expectRevert("SafeCast: value doesn't fit in 96 bits"); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + type(uint256).max, // amount + 1209600, // duration + uint32(block.timestamp), // startDate + 0, // cliffPeriod + 15 days, // claimPeriod + EMPTY_CTX + ); + + console.log("Revert with underflow/overflow."); + vm.expectRevert(); // todo: the right error + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + 1 ether, // amount + type(uint32).max, // duration + uint32(block.timestamp), // startDate + 0, // cliffPeriod + 15 days, // claimPeriod + EMPTY_CTX + ); + + console.log("Revert with start date in history."); + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + 1 ether, // amount + 1209600, // duration + uint32(block.timestamp - 1), // startDate + 604800, // cliffPeriod + 15 days, // claimPeriod + EMPTY_CTX + ); + } + + function test_executeCliffAndFlow_claimableScheduleWithCliffAmount_receiverClaim() public { + uint256 aliceInitialBalance = superToken.balanceOf(alice); + uint256 bobInitialBalance = superToken.balanceOf(bob); + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createClaimableVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + uint256 initialTimestamp = block.timestamp + 10 days + 1800; + vm.warp(initialTimestamp); + uint256 flowDelayCompensation = (block.timestamp - CLIFF_DATE) * uint96(FLOW_RATE); + vm.expectEmit(true, true, true, true); + emit Transfer(alice, bob, CLIFF_TRANSFER_AMOUNT + flowDelayCompensation); + vm.expectEmit(true, true, true, true); + emit VestingCliffAndFlowExecuted( + superToken, alice, bob, CLIFF_DATE, FLOW_RATE, CLIFF_TRANSFER_AMOUNT, flowDelayCompensation + ); + + vm.prank(bob); + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + assertTrue(success, "executeVesting should return true"); + uint256 finalTimestamp = block.timestamp + 10 days - 3600; + vm.warp(finalTimestamp); + vm.expectEmit(true, true, true, true); + uint256 timeDiffToEndDate = END_DATE > block.timestamp ? END_DATE - block.timestamp : 0; + uint256 adjustedAmountClosing = timeDiffToEndDate * uint96(FLOW_RATE); + emit Transfer(alice, bob, adjustedAmountClosing); + vm.expectEmit(true, true, true, true); + emit VestingEndExecuted( + superToken, alice, bob, END_DATE, adjustedAmountClosing, false + ); + success = vestingScheduler.executeEndVesting(superToken, alice, bob); + assertTrue(success, "executeCloseVesting should return true"); + uint256 aliceFinalBalance = superToken.balanceOf(alice); + uint256 bobFinalBalance = superToken.balanceOf(bob); + uint256 aliceShouldStream = (END_DATE-CLIFF_DATE) * uint96(FLOW_RATE) + CLIFF_TRANSFER_AMOUNT ; + assertEq(aliceInitialBalance - aliceFinalBalance, aliceShouldStream, "(sender) wrong final balance"); + assertEq(bobFinalBalance, bobInitialBalance + aliceShouldStream, "(receiver) wrong final balance"); + + testAssertScheduleDoesNotExist(address(superToken), alice, bob); + } + + function test_executeCliffAndFlow_claimAfterEndDate(uint256 delayAfterEndDate, uint256 claimDate, uint8 randomizer) public { + randomizer = SafeCast.toUint8(bound(randomizer, 1, type(uint8).max)); + + uint256 aliceInitialBalance = superToken.balanceOf(alice); + uint256 bobInitialBalance = superToken.balanceOf(bob); + + uint256 totalExpectedAmount = CLIFF_TRANSFER_AMOUNT + + (END_DATE - CLIFF_DATE) * + SafeCast.toUint256(FLOW_RATE); + + delayAfterEndDate = bound(delayAfterEndDate, 1, 1e8); + claimDate = bound(claimDate, END_DATE - vestingScheduler.END_DATE_VALID_BEFORE(), END_DATE + delayAfterEndDate); + + _createClaimableVestingScheduleWithClaimDateAfterEndDate(alice, bob, delayAfterEndDate); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + + vm.warp(claimDate); + + address claimer = randomizer % 2 == 0 ? bob : alice; + vm.expectEmit(true, true, true, false); + emit VestingClaimed( + superToken, alice, bob, claimer + ); + + vm.expectEmit(true, true, true, true); + emit Transfer(alice, bob, totalExpectedAmount); + + vm.expectEmit(true, true, true, true); + emit VestingCliffAndFlowExecuted( + superToken, alice, bob, CLIFF_DATE, 0, CLIFF_TRANSFER_AMOUNT, totalExpectedAmount - CLIFF_TRANSFER_AMOUNT + ); + + vm.expectEmit(true, true, true, true); + emit VestingEndExecuted( + superToken, alice, bob, END_DATE, 0, false + ); + + IVestingSchedulerV2.VestingSchedule memory schedule = vestingScheduler.getVestingSchedule(address(superToken), alice, bob); + assertEq(vestingScheduler.getMaximumNeededTokenAllowance(schedule), totalExpectedAmount); + + vm.prank(claimer); + assertTrue(vestingScheduler.executeCliffAndFlow(superToken, alice, bob)); + + assertEq(superToken.balanceOf(alice), aliceInitialBalance - totalExpectedAmount); + assertEq(superToken.balanceOf(bob), bobInitialBalance + totalExpectedAmount); + + testAssertScheduleDoesNotExist(address(superToken), alice, bob); + } + + function test_executeCliffAndFlow_claimableScheduleWithCliffAmount_senderClaim() public { + uint256 aliceInitialBalance = superToken.balanceOf(alice); + uint256 bobInitialBalance = superToken.balanceOf(bob); + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createClaimableVestingScheduleWithDefaultData(alice, bob); + vm.startPrank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + uint256 initialTimestamp = block.timestamp + 10 days + 1800; + vm.warp(initialTimestamp); + uint256 flowDelayCompensation = (block.timestamp - CLIFF_DATE) * uint96(FLOW_RATE); + vm.expectEmit(true, true, true, true); + emit Transfer(alice, bob, CLIFF_TRANSFER_AMOUNT + flowDelayCompensation); + vm.expectEmit(true, true, true, true); + emit VestingCliffAndFlowExecuted( + superToken, alice, bob, CLIFF_DATE, FLOW_RATE, CLIFF_TRANSFER_AMOUNT, flowDelayCompensation + ); + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + vm.stopPrank(); + assertTrue(success, "executeVesting should return true"); + uint256 finalTimestamp = block.timestamp + 10 days - 3600; + vm.warp(finalTimestamp); + vm.expectEmit(true, true, true, true); + uint256 timeDiffToEndDate = END_DATE > block.timestamp ? END_DATE - block.timestamp : 0; + uint256 adjustedAmountClosing = timeDiffToEndDate * uint96(FLOW_RATE); + emit Transfer(alice, bob, adjustedAmountClosing); + vm.expectEmit(true, true, true, true); + emit VestingEndExecuted( + superToken, alice, bob, END_DATE, adjustedAmountClosing, false + ); + success = vestingScheduler.executeEndVesting(superToken, alice, bob); + assertTrue(success, "executeCloseVesting should return true"); + uint256 aliceFinalBalance = superToken.balanceOf(alice); + uint256 bobFinalBalance = superToken.balanceOf(bob); + uint256 aliceShouldStream = (END_DATE-CLIFF_DATE) * uint96(FLOW_RATE) + CLIFF_TRANSFER_AMOUNT ; + assertEq(aliceInitialBalance - aliceFinalBalance, aliceShouldStream, "(sender) wrong final balance"); + assertEq(bobFinalBalance, bobInitialBalance + aliceShouldStream, "(receiver) wrong final balance"); + } + + function test_executeCliffAndFlow_claimableScheduleWithCliffAmount_cannotClaimOnBehalf(address _claimer) public { + vm.assume(_claimer != address(0) && _claimer != alice && _claimer != bob); + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createClaimableVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + uint256 initialTimestamp = block.timestamp + 10 days + 1800; + vm.warp(initialTimestamp); + vm.prank(_claimer); + vm.expectRevert(IVestingSchedulerV2.CannotClaimScheduleOnBehalf.selector); + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + assertEq(success, false); + } + + function test_executeCliffAndFlow_claimableScheduleWithCliffAmount_claimBeforeStart() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createClaimableVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + uint256 startTimestamp = vestingScheduler.getVestingSchedule(address(superToken), alice, bob).cliffAndFlowDate; + vm.warp(startTimestamp - 1); + + vm.prank(bob); + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + assertEq(success, false); + } + + function test_executeCliffAndFlow_claimableScheduleWithCliffAmount_claimAfterValidityDate() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createClaimableVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + + vm.warp(CLAIM_VALIDITY_DATE + 1); + vm.prank(bob); + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + assertEq(success, false); + } + + function test_executeCliffAndFlow_cannotReexecute() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createClaimableVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + + vm.warp(CLAIM_VALIDITY_DATE - 1); + vm.startPrank(bob); + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + assertEq(success, true); + vm.expectRevert(IVestingSchedulerV2.AlreadyExecuted.selector); + success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + assertEq(success, false); + vm.stopPrank(); + } + + function test_getMaximumNeededTokenAllowance_should_end_with_zero_if_extreme_ranges_are_used( + uint256 totalAmount, + uint32 totalDuration, + uint32 cliffPeriod, + uint32 startDate, + uint8 randomizer + ) public { + // Assume + randomizer = SafeCast.toUint8(bound(randomizer, 1, type(uint8).max)); + + if (startDate != 0) { + startDate = SafeCast.toUint32(bound(startDate, block.timestamp, 2524600800)); + } + + totalDuration = SafeCast.toUint32(bound(totalDuration, vestingScheduler.MIN_VESTING_DURATION(), 18250 days)); + vm.assume(cliffPeriod <= totalDuration - vestingScheduler.MIN_VESTING_DURATION()); + + uint256 beforeSenderBalance = superToken.balanceOf(alice); + + totalAmount = bound(totalAmount, 1, beforeSenderBalance); + vm.assume(totalAmount >= totalDuration); + vm.assume(totalAmount / totalDuration <= SafeCast.toUint256(type(int96).max)); + + // Arrange + IVestingSchedulerV2.VestingSchedule memory expectedSchedule = _getExpectedScheduleFromAmountAndDuration( + totalAmount, + totalDuration, + cliffPeriod, + startDate, + 0 + ); + + // Assume we're not getting liquidated at the end: + vm.assume(beforeSenderBalance >= totalAmount + vestingScheduler.END_DATE_VALID_BEFORE() * SafeCast.toUint256(expectedSchedule.flowRate)); + + // Arrange allowance + vm.assume(superToken.allowance(alice, address(vestingScheduler)) == 0); + + vm.startPrank(alice); + superToken.revokeFlowPermissions(address(vestingScheduler)); + superToken.setFlowPermissions( + address(vestingScheduler), + true, // allowCreate + false, // allowUpdate + true, // allowDelete, + expectedSchedule.flowRate + ); + superToken.approve(address(vestingScheduler), vestingScheduler.getMaximumNeededTokenAllowance(expectedSchedule)); + vm.stopPrank(); + + // Act + vm.startPrank(alice); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalAmount, + totalDuration, + startDate, + cliffPeriod, + 0, + EMPTY_CTX + ); + vm.stopPrank(); + + // Act + vm.warp(expectedSchedule.cliffAndFlowDate + (vestingScheduler.START_DATE_VALID_AFTER())); + assertTrue(vestingScheduler.executeCliffAndFlow(superToken, alice, bob)); + + if (randomizer % 2 == 0) { + // Let's set the allowance again half-way through. + vm.startPrank(alice); + superToken.approve(address(vestingScheduler), vestingScheduler.getMaximumNeededTokenAllowance(vestingScheduler.getVestingSchedule(address(superToken), alice, bob))); + vm.stopPrank(); + } + + // Act + vm.warp(expectedSchedule.endDate - (vestingScheduler.END_DATE_VALID_BEFORE())); + assertTrue(vestingScheduler.executeEndVesting(superToken, alice, bob)); + + // Assert + assertEq(superToken.allowance(alice, address(vestingScheduler)), 0, "No allowance should be left"); + (,,,int96 flowRateAllowance) = superToken.getFlowPermissions(alice, address(vestingScheduler)); + assertEq(flowRateAllowance, 0, "No flow rate allowance should be left"); + + testAssertScheduleDoesNotExist(address(superToken), alice, bob); + } + + function test_getMaximumNeededTokenAllowance_with_claim_should_end_with_zero_if_extreme_ranges_are_used( + uint256 totalAmount, + uint32 totalDuration, + uint32 cliffPeriod, + uint32 startDate, + uint32 claimPeriod, + uint8 randomizer + ) public { + // Assume + randomizer = SafeCast.toUint8(bound(randomizer, 1, type(uint8).max)); + + if (startDate != 0) { + startDate = SafeCast.toUint32(bound(startDate, block.timestamp, 2524600800)); + } + + claimPeriod = SafeCast.toUint32(bound(claimPeriod, 1, 18250 days)); + vm.assume(claimPeriod >= cliffPeriod); + + totalDuration = SafeCast.toUint32(bound(totalDuration, vestingScheduler.MIN_VESTING_DURATION(), 18250 days)); + vm.assume(cliffPeriod <= totalDuration - vestingScheduler.MIN_VESTING_DURATION()); + + uint256 beforeSenderBalance = superToken.balanceOf(alice); + + totalAmount = bound(totalAmount, 1, beforeSenderBalance); + vm.assume(totalAmount >= totalDuration); + vm.assume(totalAmount / totalDuration <= SafeCast.toUint256(type(int96).max)); + + // Arrange + IVestingSchedulerV2.VestingSchedule memory expectedSchedule = _getExpectedScheduleFromAmountAndDuration( + totalAmount, + totalDuration, + cliffPeriod, + startDate, + claimPeriod + ); + + // Assume we're not getting liquidated at the end: + vm.assume(beforeSenderBalance >= totalAmount + vestingScheduler.END_DATE_VALID_BEFORE() * SafeCast.toUint256(expectedSchedule.flowRate)); + + // Arrange allowance + vm.assume(superToken.allowance(alice, address(vestingScheduler)) == 0); + + vm.startPrank(alice); + superToken.revokeFlowPermissions(address(vestingScheduler)); + bool willThereBeFullTransfer = expectedSchedule.claimValidityDate >= expectedSchedule.endDate - vestingScheduler.END_DATE_VALID_BEFORE(); + if (!willThereBeFullTransfer) { + // No flow needed in this case. + superToken.setFlowPermissions( + address(vestingScheduler), + true, // allowCreate + false, // allowUpdate + true, // allowDelete, + expectedSchedule.flowRate + ); + } + superToken.approve(address(vestingScheduler), vestingScheduler.getMaximumNeededTokenAllowance(expectedSchedule)); + vm.stopPrank(); + + // Act + vm.startPrank(alice); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalAmount, + totalDuration, + startDate, + cliffPeriod, + claimPeriod, + EMPTY_CTX + ); + vm.stopPrank(); + + // Act + vm.warp(expectedSchedule.claimValidityDate); + vm.startPrank(randomizer % 3 == 0 ? alice : bob); // Both sender and receiver can execute + assertTrue(vestingScheduler.executeCliffAndFlow(superToken, alice, bob)); + vm.stopPrank(); + + if (randomizer % 2 == 0) { + // Let's set the allowance again half-way through. + vm.startPrank(alice); + superToken.approve(address(vestingScheduler), vestingScheduler.getMaximumNeededTokenAllowance(vestingScheduler.getVestingSchedule(address(superToken), alice, bob))); + vm.stopPrank(); + } + + // Act + if (!willThereBeFullTransfer) { + vm.warp(expectedSchedule.endDate - vestingScheduler.END_DATE_VALID_BEFORE()); + assertTrue(vestingScheduler.executeEndVesting(superToken, alice, bob)); + } + + // Assert + assertEq(superToken.allowance(alice, address(vestingScheduler)), 0, "No allowance should be left"); + (,,,int96 flowRateAllowance) = superToken.getFlowPermissions(alice, address(vestingScheduler)); + assertEq(flowRateAllowance, 0, "No flow rate allowance should be left"); + + testAssertScheduleDoesNotExist(address(superToken), alice, bob); + } +} From 69c58565819cd8e69dfe3e2f50bab869706568e3 Mon Sep 17 00:00:00 2001 From: Didi Date: Mon, 5 Aug 2024 16:50:17 +0200 Subject: [PATCH 28/42] [ETHEREUM-CONTRACTS] Disable flownfts (#1991) * gov-upgrade-super-token-logic: auto-include tokens using the previous canonical logic * fix multisig detection * disable FlowNFT hooks * remove unused imports * ? * don't update IDA, don't update FlowNFTs, remove bad test code * remove obsolete tests * fix deploy script for tests * updated CHANGELOG * not in this PR * flowNFT purging * more removal, changing subgraph too. WIP * fix tests & devcontainer * fetch newest schema and fix sdk-core build * bump sdk-redux version * remove from verification script * appease linter * remove ApprovalForAllEvent * one more * github runner switched to docker compose v2 * removed MetadataUpdate event, bumped versions, updated metadata, updated CHANGELOG files * fix deploy script * fix code path with pre-existing DMZForwarder * more removal --------- Co-authored-by: Kaspar Kallas --- .devcontainer/devcontainer.json | 4 +- .../workflows/call.test-local-subgraph.yml | 2 +- .github/workflows/call.test-sdk-core.yml | 4 +- ...subgraph-on-previous-sdk-core-versions.yml | 2 +- .../handler.publish-release-packages.yml | 4 +- .../autowrap/package.json | 4 +- .../scheduler/package.json | 4 +- packages/ethereum-contracts/CHANGELOG.md | 6 + .../agreements/ConstantFlowAgreementV1.sol | 75 +-- .../gdav1/GeneralDistributionAgreementV1.sol | 51 -- .../apps/SuperfluidLoaderLibrary.sol | 6 + .../superfluid/IConstantInflowNFT.sol | 28 - .../superfluid/IConstantOutflowNFT.sol | 41 -- .../interfaces/superfluid/IFlowNFTBase.sol | 78 --- .../interfaces/superfluid/ISuperToken.sol | 23 - .../interfaces/superfluid/ISuperfluid.sol | 3 - .../mocks/SuperTokenFactoryMock.t.sol | 6 +- .../contracts/mocks/SuperTokenMock.t.sol | 4 +- .../superfluid/ConstantInflowNFT.sol | 99 --- .../superfluid/ConstantOutflowNFT.sol | 177 ------ .../contracts/superfluid/FlowNFTBase.sol | 362 ----------- .../contracts/superfluid/SuperToken.sol | 24 +- .../superfluid/SuperTokenFactory.sol | 13 +- .../SuperfluidFrameworkDeploymentSteps.sol | 73 +-- .../dev-scripts/deploy-test-framework.js | 12 - .../run-deploy-contracts-and-token.js | 2 - .../ops-scripts/deploy-framework.js | 179 +----- .../gov-transfer-framework-ownership.js | 9 +- .../gov-upgrade-super-token-logic.js | 56 +- .../info-print-contract-addresses.js | 26 - .../ops-scripts/validate-deployment.ts | 41 +- packages/ethereum-contracts/package.json | 4 +- .../tasks/bundled-abi-contracts-list.json | 3 - .../tasks/etherscan-verify-framework.sh | 16 - .../test/TestEnvironment.ts | 139 +---- .../apps/SuperTokenV1Library.CFA.test.ts | 12 +- .../superfluid/SuperToken.NonStandard.test.ts | 24 +- .../superfluid/SuperTokenFactory.test.ts | 48 +- .../contracts/superfluid/Superfluid.test.ts | 36 +- .../test/foundry/FoundrySuperfluidTester.sol | 49 +- .../foundry/SuperfluidFrameworkDeployer.t.sol | 2 - .../agreements/ConstantFlowAgreementV1.t.sol | 24 - .../gdav1/GeneralDistributionAgreement.t.sol | 3 - .../foundry/superfluid/CFAv1NFTMock.t.sol | 124 ---- .../CFAv1NFTUpgradabilityMock.t.sol | 198 ------ .../superfluid/ConstantInflowNFT.t.sol | 141 ----- .../superfluid/ConstantOutflowNFT.t.sol | 300 --------- .../test/foundry/superfluid/ERC721.t.sol | 49 +- .../foundry/superfluid/FlowNFTBase.prop.t.sol | 24 - .../test/foundry/superfluid/FlowNFTBase.t.sol | 396 ------------ .../test/foundry/superfluid/PoolNFTBase.t.sol | 3 - .../test/foundry/superfluid/SuperToken.t.sol | 70 +-- .../superfluid/SuperTokenFactory.t.sol | 32 +- packages/hot-fuzz/hot-fuzz | 3 +- packages/hot-fuzz/package.json | 2 +- packages/js-sdk/package.json | 4 +- packages/metadata/CHANGELOG.md | 10 + packages/metadata/main/networks/list.cjs | 28 - packages/metadata/module/networks/list.d.ts | 2 - packages/metadata/module/networks/list.js | 28 - packages/metadata/networks.json | 28 - packages/metadata/package.json | 2 +- packages/sdk-core/CHANGELOG.md | 6 + packages/sdk-core/package.json | 15 +- packages/sdk-core/src/ConstantInflowNFT.ts | 18 - packages/sdk-core/src/ConstantOutflowNFT.ts | 18 - packages/sdk-core/src/ERC721Token.ts | 24 +- packages/sdk-core/src/FlowNFTBase.ts | 85 --- packages/sdk-core/src/SuperToken.ts | 112 +--- packages/sdk-core/src/events.ts | 10 - .../src/mapGetAllEventsQueryEvents.ts | 24 - .../src/subgraph/events/events.graphql | 16 +- .../src/subgraph/queries/getAllEvents.graphql | 8 - packages/sdk-core/src/subgraph/schema.graphql | 581 +----------------- .../sdk-core/test/1.4_supertoken_nft.test.ts | 348 ----------- packages/sdk-redux/CHANGELOG.md | 6 + packages/sdk-redux/package.json | 4 +- packages/subgraph/CHANGELOG.md | 6 + packages/subgraph/README.md | 4 +- packages/subgraph/config/mock.json | 4 +- packages/subgraph/package.json | 6 +- packages/subgraph/schema.graphql | 83 +-- .../subgraph/scripts/buildNetworkConfig.ts | 6 +- packages/subgraph/scripts/getAbi.js | 1 - packages/subgraph/src/mappings/flowNFT.ts | 67 -- packages/subgraph/src/mappings/superToken.ts | 3 - packages/subgraph/subgraph.template.yaml | 70 --- packages/subgraph/tasks/setup-graph-node.sh | 10 +- .../superToken/event/superToken.event.test.ts | 14 +- 89 files changed, 275 insertions(+), 4496 deletions(-) delete mode 100644 packages/ethereum-contracts/contracts/interfaces/superfluid/IConstantInflowNFT.sol delete mode 100644 packages/ethereum-contracts/contracts/interfaces/superfluid/IConstantOutflowNFT.sol delete mode 100644 packages/ethereum-contracts/contracts/interfaces/superfluid/IFlowNFTBase.sol delete mode 100644 packages/ethereum-contracts/contracts/superfluid/ConstantInflowNFT.sol delete mode 100644 packages/ethereum-contracts/contracts/superfluid/ConstantOutflowNFT.sol delete mode 100644 packages/ethereum-contracts/contracts/superfluid/FlowNFTBase.sol delete mode 100644 packages/ethereum-contracts/test/foundry/superfluid/CFAv1NFTMock.t.sol delete mode 100644 packages/ethereum-contracts/test/foundry/superfluid/CFAv1NFTUpgradabilityMock.t.sol delete mode 100644 packages/ethereum-contracts/test/foundry/superfluid/ConstantInflowNFT.t.sol delete mode 100644 packages/ethereum-contracts/test/foundry/superfluid/ConstantOutflowNFT.t.sol delete mode 100644 packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.prop.t.sol delete mode 100644 packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.t.sol delete mode 100644 packages/sdk-core/src/ConstantInflowNFT.ts delete mode 100644 packages/sdk-core/src/ConstantOutflowNFT.ts delete mode 100644 packages/sdk-core/src/FlowNFTBase.ts delete mode 100644 packages/sdk-core/test/1.4_supertoken_nft.test.ts delete mode 100644 packages/subgraph/src/mappings/flowNFT.ts diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index dcfd2038eb..ee2b5c9cd6 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -31,11 +31,11 @@ // 3. if you want to use nix further, do "nix develop" "postCreateCommand": [ "curl -L https://foundry.paradigm.xyz | bash", - "source /home/node/.bashrc && foundryup", + "source /home/vscode/.bashrc && foundryup", "yarn global add npm-run-all", "yarn install && yarn build", "sudo apt-get install libpq5", // for subgraph's matchstick - "./tasks/fix-devcontainer.sh && nix develop . -c bash <(echo \"yarn install && yarn build\")" + "./tasks/fix-devcontainer.sh && yarn shell . -c bash <(echo \"yarn install && yarn build\")" ] // Configure tool-specific properties. // "customizations": {}, diff --git a/.github/workflows/call.test-local-subgraph.yml b/.github/workflows/call.test-local-subgraph.yml index cf6c30a5c9..0fb84d40f5 100644 --- a/.github/workflows/call.test-local-subgraph.yml +++ b/.github/workflows/call.test-local-subgraph.yml @@ -102,7 +102,7 @@ jobs: - name: "Docker compose" run: | docker rm subgraph_graph-node_1 || true - docker-compose up & + docker compose up & working-directory: ${{ env.subgraph-working-directory }} - name: "Run subgraph integration test suite" diff --git a/.github/workflows/call.test-sdk-core.yml b/.github/workflows/call.test-sdk-core.yml index d24e3e09e4..0c77edadd2 100644 --- a/.github/workflows/call.test-sdk-core.yml +++ b/.github/workflows/call.test-sdk-core.yml @@ -73,7 +73,7 @@ jobs: - name: "Docker compose" run: | docker rm subgraph_graph-node_1 || true - docker-compose up & + docker compose up & working-directory: ${{ env.subgraph-working-directory }} - name: "Build and deploy local subgraph" @@ -86,7 +86,7 @@ jobs: - name: "Run test suite" if: inputs.run-coverage-tests == false run: | - yarn generate-graphql-schema:${{ inputs.subgraph-release }} + yarn get-graphql-schema:${{ inputs.subgraph-release }} ./tasks/setupTestEnvironment.sh npx hardhat test --network localhost working-directory: ${{ env.sdk-core-working-directory }} diff --git a/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml b/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml index 05f4c83c4d..bd74a576ea 100644 --- a/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml +++ b/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml @@ -73,7 +73,7 @@ jobs: - name: "Docker compose" run: | docker rm subgraph_graph-node_1 || true - docker-compose up & + docker compose up & working-directory: ./packages/subgraph - name: "Prepare and Deploy Local Subgraph" diff --git a/.github/workflows/handler.publish-release-packages.yml b/.github/workflows/handler.publish-release-packages.yml index 556a241dc7..b6d82f8a1d 100644 --- a/.github/workflows/handler.publish-release-packages.yml +++ b/.github/workflows/handler.publish-release-packages.yml @@ -58,7 +58,7 @@ jobs: id: publish-sdk-core if: env.PUBLISH_SDK_CORE == 1 run: | - yarn --cwd packages/sdk-core generate-graphql-schema:v1 + yarn --cwd packages/sdk-core get-graphql-schema:v1 yarn --cwd packages/ethereum-contracts build yarn --cwd packages/sdk-core build tasks/npm-publish.sh packages/sdk-core/ latest @@ -103,7 +103,7 @@ jobs: if: env.PUBLISH_SDK_REDUX == 1 run: | yarn --cwd packages/ethereum-contracts build - yarn --cwd packages/sdk-core generate-graphql-schema:v1 + yarn --cwd packages/sdk-core get-graphql-schema:v1 yarn --cwd packages/sdk-core build yarn --cwd packages/sdk-redux build tasks/npm-publish.sh packages/sdk-redux/ latest diff --git a/packages/automation-contracts/autowrap/package.json b/packages/automation-contracts/autowrap/package.json index ec0852e5f0..ccbb894182 100644 --- a/packages/automation-contracts/autowrap/package.json +++ b/packages/automation-contracts/autowrap/package.json @@ -15,7 +15,7 @@ }, "devDependencies": { "@openzeppelin/contracts": "4.9.6", - "@superfluid-finance/ethereum-contracts": "^1.10.0", - "@superfluid-finance/metadata": "^1.3.1" + "@superfluid-finance/ethereum-contracts": "^1.11.0", + "@superfluid-finance/metadata": "^1.4.0" } } diff --git a/packages/automation-contracts/scheduler/package.json b/packages/automation-contracts/scheduler/package.json index 1f9ecca1ef..72ebc8a154 100644 --- a/packages/automation-contracts/scheduler/package.json +++ b/packages/automation-contracts/scheduler/package.json @@ -15,7 +15,7 @@ }, "devDependencies": { "@openzeppelin/contracts": "4.9.6", - "@superfluid-finance/ethereum-contracts": "^1.10.0", - "@superfluid-finance/metadata": "^1.3.1" + "@superfluid-finance/ethereum-contracts": "^1.11.0", + "@superfluid-finance/metadata": "^1.4.0" } } diff --git a/packages/ethereum-contracts/CHANGELOG.md b/packages/ethereum-contracts/CHANGELOG.md index 2c5b8c8d50..d9e6aa95b0 100644 --- a/packages/ethereum-contracts/CHANGELOG.md +++ b/packages/ethereum-contracts/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to the ethereum-contracts will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.11.0] + +### Breaking + +- FlowNFTs are being deprecated. The hooks aren't invoked anymore by CFA and GDA. + ## [v1.10.0] ### Breaking diff --git a/packages/ethereum-contracts/contracts/agreements/ConstantFlowAgreementV1.sol b/packages/ethereum-contracts/contracts/agreements/ConstantFlowAgreementV1.sol index d4e0edc98d..bf225b729b 100644 --- a/packages/ethereum-contracts/contracts/agreements/ConstantFlowAgreementV1.sol +++ b/packages/ethereum-contracts/contracts/agreements/ConstantFlowAgreementV1.sol @@ -5,14 +5,12 @@ import { ISuperfluid, ISuperfluidGovernance, ISuperApp, - ISuperToken, ISuperfluidToken, IConstantFlowAgreementV1, FlowOperatorDefinitions, SuperAppDefinitions, ContextDefinitions, - SuperfluidGovernanceConfigs, - IConstantOutflowNFT + SuperfluidGovernanceConfigs } from "../interfaces/superfluid/ISuperfluid.sol"; import { AgreementBase } from "./AgreementBase.sol"; import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; @@ -431,71 +429,6 @@ contract ConstantFlowAgreementV1 is if (flowParams.flowRate <= 0) revert CFA_INVALID_FLOW_RATE(); } - - /** - * @notice Checks whether or not the NFT hook can be called. - * @dev A staticcall, so `CONSTANT_OUTFLOW_NFT` must be a view otherwise the assumption is that it reverts - * @param token the super token that is being streamed - * @return constantOutflowNFTAddress the address returned by low level call - */ - function _canCallNFTHook( - ISuperfluidToken token - ) internal view returns (address constantOutflowNFTAddress) { - // solhint-disable-next-line avoid-low-level-calls - (bool success, bytes memory data) = address(token).staticcall( - abi.encodeWithSelector(ISuperToken.CONSTANT_OUTFLOW_NFT.selector) - ); - - if (success) { - // @note We are aware this may revert if a Custom SuperToken's - // CONSTANT_OUTFLOW_NFT does not return data that can be - // decoded to an address. This would mean it was intentionally - // done by the creator of the Custom SuperToken logic and is - // fully expected to revert in that case as the author desired. - constantOutflowNFTAddress = abi.decode(data, (address)); - } - } - - function _handleOnCreateHook( - _StackVars_createOrUpdateFlow memory flowVars - ) internal { - address constantOutflowNFTAddress = _canCallNFTHook(flowVars.token); - - if (constantOutflowNFTAddress != address(0)) { - IConstantOutflowNFT(constantOutflowNFTAddress).onCreate( - flowVars.token, - flowVars.sender, - flowVars.receiver - ); - } - } - - function _handleOnUpdateHook( - _StackVars_createOrUpdateFlow memory flowVars - ) internal { - address constantOutflowNFTAddress = _canCallNFTHook(flowVars.token); - if (constantOutflowNFTAddress != address(0)) { - IConstantOutflowNFT(constantOutflowNFTAddress).onUpdate( - flowVars.token, - flowVars.sender, - flowVars.receiver - ); - } - } - - function _handleOnDeleteHook( - _StackVars_createOrUpdateFlow memory flowVars - ) internal { - address constantOutflowNFTAddress = _canCallNFTHook(flowVars.token); - if (constantOutflowNFTAddress != address(0)) { - IConstantOutflowNFT(constantOutflowNFTAddress).onDelete( - flowVars.token, - flowVars.sender, - flowVars.receiver - ); - } - } - function _createFlow( _StackVars_createOrUpdateFlow memory flowVars, bytes calldata ctx, @@ -521,8 +454,6 @@ contract ConstantFlowAgreementV1 is } _requireAvailableBalance(flowVars.token, flowVars.sender, currentContext); - - _handleOnCreateHook(flowVars); } function _updateFlow( @@ -551,8 +482,6 @@ contract ConstantFlowAgreementV1 is } _requireAvailableBalance(flowVars.token, flowVars.sender, currentContext); - - _handleOnUpdateHook(flowVars); } function _deleteFlow( @@ -663,8 +592,6 @@ contract ConstantFlowAgreementV1 is newCtx, currentContext); } } - - _handleOnDeleteHook(flowVars); } /************************************************************************** diff --git a/packages/ethereum-contracts/contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol b/packages/ethereum-contracts/contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol index 3876ca7177..846967aec7 100644 --- a/packages/ethereum-contracts/contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol +++ b/packages/ethereum-contracts/contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol @@ -22,7 +22,6 @@ import { } from "../../interfaces/agreements/gdav1/IGeneralDistributionAgreementV1.sol"; import { SuperfluidUpgradeableBeacon } from "../../upgradability/SuperfluidUpgradeableBeacon.sol"; import { ISuperfluidToken } from "../../interfaces/superfluid/ISuperfluidToken.sol"; -import { IConstantOutflowNFT } from "../../interfaces/superfluid/IConstantOutflowNFT.sol"; import { ISuperToken } from "../../interfaces/superfluid/ISuperToken.sol"; import { IPoolAdminNFT } from "../../interfaces/agreements/gdav1/IPoolAdminNFT.sol"; import { ISuperfluidPool } from "../../interfaces/agreements/gdav1/ISuperfluidPool.sol"; @@ -565,31 +564,6 @@ contract GeneralDistributionAgreementV1 is AgreementBase, TokenMonad, IGeneralDi } } - // handleFlowNFT() - mint/burn FlowNFT to flow distributor - { - address constantOutflowNFTAddress = _getConstantOutflowNFTAddress(token); - - if (constantOutflowNFTAddress != address(0)) { - // create flow (mint) - if (requestedFlowRate > 0 && FlowRate.unwrap(flowVars.oldFlowRate) == 0) { - // solhint-disable-next-line no-empty-blocks - IConstantOutflowNFT(constantOutflowNFTAddress).onCreate(token, from, address(pool)); - } - - // update flow (update metadata) - if (requestedFlowRate > 0 && FlowRate.unwrap(flowVars.oldFlowRate) > 0) { - // solhint-disable-next-line no-empty-blocks - IConstantOutflowNFT(constantOutflowNFTAddress).onUpdate(token, from, address(pool)); - } - - // delete flow (burn) - if (requestedFlowRate == 0) { - // solhint-disable-next-line no-empty-blocks - IConstantOutflowNFT(constantOutflowNFTAddress).onDelete(token, from, address(pool)); - } - } - } - { (address adjustmentFlowRecipient,, int96 adjustmentFlowRate) = _getPoolAdjustmentFlowInfo(abi.encode(token), address(pool)); @@ -609,31 +583,6 @@ contract GeneralDistributionAgreementV1 is AgreementBase, TokenMonad, IGeneralDi } } - /** - * @notice Checks whether or not the NFT hook can be called. - * @dev A staticcall, so `CONSTANT_OUTFLOW_NFT` must be a view otherwise the assumption is that it reverts - * @param token the super token that is being streamed - * @return constantOutflowNFTAddress the address returned by low level call - */ - function _getConstantOutflowNFTAddress(ISuperfluidToken token) - internal - view - returns (address constantOutflowNFTAddress) - { - // solhint-disable-next-line avoid-low-level-calls - (bool success, bytes memory data) = - address(token).staticcall(abi.encodeWithSelector(ISuperToken.CONSTANT_OUTFLOW_NFT.selector)); - - if (success) { - // @note We are aware this may revert if a Custom SuperToken's - // CONSTANT_OUTFLOW_NFT does not return data that can be - // decoded to an address. This would mean it was intentionally - // done by the creator of the Custom SuperToken logic and is - // fully expected to revert in that case as the author desired. - constantOutflowNFTAddress = abi.decode(data, (address)); - } - } - function _getPoolAdminNFTAddress(ISuperfluidToken token) internal view returns (address poolAdminNFTAddress) { // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory data) = diff --git a/packages/ethereum-contracts/contracts/apps/SuperfluidLoaderLibrary.sol b/packages/ethereum-contracts/contracts/apps/SuperfluidLoaderLibrary.sol index 859795406a..4d09832e2c 100644 --- a/packages/ethereum-contracts/contracts/apps/SuperfluidLoaderLibrary.sol +++ b/packages/ethereum-contracts/contracts/apps/SuperfluidLoaderLibrary.sol @@ -15,6 +15,7 @@ library SuperfluidLoaderLibrary { uint256 private constant CELO_MAINNET = 42220; uint256 private constant AVALANCHE_C = 43114; uint256 private constant SCROLL_MAINNET = 534352; + uint256 private constant DEGENCHAIN = 666666666; // testnets @@ -22,6 +23,7 @@ library SuperfluidLoaderLibrary { uint256 private constant SCROLL_SEPOLIA = 534351; uint256 private constant ETH_SEPOLIA = 11155111; uint256 private constant OPTIMISM_SEPOLIA = 11155420; + uint256 private constant BASE_SEPOLIA = 84532; function getHost() public view returns (address) { @@ -46,6 +48,8 @@ library SuperfluidLoaderLibrary { return 0x60377C7016E4cdB03C87EF474896C11cB560752C; } else if (block.chainid == SCROLL_MAINNET) { return 0x0F86a21F6216c061B222c224e315d9FC34520bb7; + } else if (block.chainid == DEGENCHAIN) { + return 0xc1314EdcD7e478C831a7a24169F7dEADB2646eD2; // testnets } else if (block.chainid == AVALANCHE_FUJI) { return 0x85Fe79b998509B77BF10A8BD4001D58475D29386; @@ -55,6 +59,8 @@ library SuperfluidLoaderLibrary { return 0x109412E3C84f0539b43d39dB691B08c90f58dC7c; } else if (block.chainid == OPTIMISM_SEPOLIA) { return 0xd399e2Fb5f4cf3722a11F65b88FAB6B2B8621005; + } else if (block.chainid == BASE_SEPOLIA) { + return 0x109412E3C84f0539b43d39dB691B08c90f58dC7c; } else { revert UnsupportedNetwork(); } diff --git a/packages/ethereum-contracts/contracts/interfaces/superfluid/IConstantInflowNFT.sol b/packages/ethereum-contracts/contracts/interfaces/superfluid/IConstantInflowNFT.sol deleted file mode 100644 index c0c89879ad..0000000000 --- a/packages/ethereum-contracts/contracts/interfaces/superfluid/IConstantInflowNFT.sol +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.11; - -import { IFlowNFTBase } from "./IFlowNFTBase.sol"; - -interface IConstantInflowNFT is IFlowNFTBase { - /************************************************************************** - * Custom Errors - *************************************************************************/ - error CIF_NFT_ONLY_CONSTANT_OUTFLOW(); // 0xe81ef57a - - /************************************************************************** - * Write Functions - *************************************************************************/ - - /// @notice The mint function emits the "mint" `Transfer` event. - /// @dev We don't modify storage as this is handled in ConstantOutflowNFT.sol and this function's sole purpose - /// is to inform clients that search for events. - /// @param to the flow receiver (inflow NFT receiver) - /// @param newTokenId the new token id - function mint(address to, uint256 newTokenId) external; - - /// @notice This burn function emits the "burn" `Transfer` event. - /// @dev We don't modify storage as this is handled in ConstantOutflowNFT.sol and this function's sole purpose - /// is to inform clients that search for events. - /// @param tokenId desired token id to burn - function burn(uint256 tokenId) external; -} diff --git a/packages/ethereum-contracts/contracts/interfaces/superfluid/IConstantOutflowNFT.sol b/packages/ethereum-contracts/contracts/interfaces/superfluid/IConstantOutflowNFT.sol deleted file mode 100644 index 76dc52c8f3..0000000000 --- a/packages/ethereum-contracts/contracts/interfaces/superfluid/IConstantOutflowNFT.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.11; - -import { ISuperfluidToken } from "./ISuperfluidToken.sol"; -import { IFlowNFTBase } from "./IFlowNFTBase.sol"; - -interface IConstantOutflowNFT is IFlowNFTBase { - /************************************************************************** - * Custom Errors - *************************************************************************/ - - error COF_NFT_INVALID_SUPER_TOKEN(); // 0x6de98774 - error COF_NFT_MINT_TO_AND_FLOW_RECEIVER_SAME(); // 0x0d1d1161 - error COF_NFT_MINT_TO_ZERO_ADDRESS(); // 0x43d05e51 - error COF_NFT_ONLY_CONSTANT_INFLOW(); // 0xa495a718 - error COF_NFT_ONLY_FLOW_AGREEMENTS(); // 0xd367b64f - error COF_NFT_TOKEN_ALREADY_EXISTS(); // 0xe2480183 - - - /************************************************************************** - * Write Functions - *************************************************************************/ - - /// @notice The onCreate function is called when a new flow is created. - /// @param token the super token passed from the CFA (flowVars) - /// @param flowSender the flow sender - /// @param flowReceiver the flow receiver - function onCreate(ISuperfluidToken token, address flowSender, address flowReceiver) external; - - /// @notice The onUpdate function is called when a flow is updated. - /// @param token the super token passed from the CFA (flowVars) - /// @param flowSender the flow sender - /// @param flowReceiver the flow receiver - function onUpdate(ISuperfluidToken token, address flowSender, address flowReceiver) external; - - /// @notice The onDelete function is called when a flow is deleted. - /// @param token the super token passed from the CFA (flowVars) - /// @param flowSender the flow sender - /// @param flowReceiver the flow receiver - function onDelete(ISuperfluidToken token, address flowSender, address flowReceiver) external; -} diff --git a/packages/ethereum-contracts/contracts/interfaces/superfluid/IFlowNFTBase.sol b/packages/ethereum-contracts/contracts/interfaces/superfluid/IFlowNFTBase.sol deleted file mode 100644 index 3ca847e6ad..0000000000 --- a/packages/ethereum-contracts/contracts/interfaces/superfluid/IFlowNFTBase.sol +++ /dev/null @@ -1,78 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.11; - -import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; - -interface IFlowNFTBase is IERC721Metadata { - // FlowNFTData struct storage packing: - // b = bits - // WORD 1: | superToken | FREE - // | 160b | 96b - // WORD 2: | flowSender | FREE - // | 160b | 96b - // WORD 3: | flowReceiver | flowStartDate | FREE - // | 160b | 32b | 64b - struct FlowNFTData { - address superToken; - address flowSender; - address flowReceiver; - uint32 flowStartDate; - } - - /************************************************************************** - * Custom Errors - *************************************************************************/ - - error CFA_NFT_APPROVE_CALLER_NOT_OWNER_OR_APPROVED_FOR_ALL(); // 0xa3352582 - error CFA_NFT_APPROVE_TO_CALLER(); // 0xd3c77329 - error CFA_NFT_APPROVE_TO_CURRENT_OWNER(); // 0xe4790b25 - error CFA_NFT_INVALID_TOKEN_ID(); // 0xeab95e3b - error CFA_NFT_ONLY_SUPER_TOKEN_FACTORY(); // 0xebb7505b - error CFA_NFT_TRANSFER_CALLER_NOT_OWNER_OR_APPROVED_FOR_ALL(); // 0x2551d606 - error CFA_NFT_TRANSFER_FROM_INCORRECT_OWNER(); // 0x5a26c744 - error CFA_NFT_TRANSFER_IS_NOT_ALLOWED(); // 0xaa747eca - error CFA_NFT_TRANSFER_TO_ZERO_ADDRESS(); // 0xde06d21e - - /************************************************************************** - * Events - *************************************************************************/ - - /// @notice Informs third-party platforms that NFT metadata should be updated - /// @dev This event comes from https://eips.ethereum.org/EIPS/eip-4906 - /// @param tokenId the id of the token that should have its metadata updated - event MetadataUpdate(uint256 tokenId); - - /************************************************************************** - * View - *************************************************************************/ - - /// @notice An external function for querying flow data by `tokenId`` - /// @param tokenId the token id - /// @return flowData the flow data associated with `tokenId` - function flowDataByTokenId( - uint256 tokenId - ) external view returns (FlowNFTData memory flowData); - - /// @notice An external function for computing the deterministic tokenId - /// @dev tokenId = uint256(keccak256(abi.encode(block.chainId, superToken, flowSender, flowReceiver))) - /// @param superToken the super token - /// @param flowSender the flow sender - /// @param flowReceiver the flow receiver - /// @return tokenId the tokenId - function getTokenId( - address superToken, - address flowSender, - address flowReceiver - ) external view returns (uint256); - - /************************************************************************** - * Write - *************************************************************************/ - - function initialize( - string memory nftName, - string memory nftSymbol - ) external; // initializer; - - function triggerMetadataUpdate(uint256 tokenId) external; -} diff --git a/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol b/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol index 30d7e95084..c1a468f631 100644 --- a/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol +++ b/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol @@ -4,8 +4,6 @@ pragma solidity >= 0.8.11; import { ISuperfluidToken } from "./ISuperfluidToken.sol"; import { IERC20, IERC20Metadata } from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import { IERC777 } from "@openzeppelin/contracts/token/ERC777/IERC777.sol"; -import { IConstantOutflowNFT } from "./IConstantOutflowNFT.sol"; -import { IConstantInflowNFT } from "./IConstantInflowNFT.sol"; import { IPoolAdminNFT } from "../agreements/gdav1/IPoolAdminNFT.sol"; import { IPoolMemberNFT } from "../agreements/gdav1/IPoolMemberNFT.sol"; @@ -73,10 +71,6 @@ interface ISuperToken is ISuperfluidToken, IERC20Metadata, IERC777 { * Immutable variables *************************************************************************/ - // solhint-disable-next-line func-name-mixedcase - function CONSTANT_OUTFLOW_NFT() external view returns (IConstantOutflowNFT); - // solhint-disable-next-line func-name-mixedcase - function CONSTANT_INFLOW_NFT() external view returns (IConstantInflowNFT); // solhint-disable-next-line func-name-mixedcase function POOL_ADMIN_NFT() external view returns (IPoolAdminNFT); // solhint-disable-next-line func-name-mixedcase @@ -600,23 +594,6 @@ interface ISuperToken is ISuperfluidToken, IERC20Metadata, IERC777 { */ function operationDowngradeTo(address account, address to, uint256 amount) external; - // Flow NFT events - /** - * @dev Constant Outflow NFT proxy created event - * @param constantOutflowNFT constant outflow nft address - */ - event ConstantOutflowNFTCreated( - IConstantOutflowNFT indexed constantOutflowNFT - ); - - /** - * @dev Constant Inflow NFT proxy created event - * @param constantInflowNFT constant inflow nft address - */ - event ConstantInflowNFTCreated( - IConstantInflowNFT indexed constantInflowNFT - ); - /** * @dev Pool Admin NFT proxy created event * @param poolAdminNFT pool admin nft address diff --git a/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol b/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol index cf660e9a10..b698648111 100644 --- a/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol +++ b/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol @@ -23,9 +23,6 @@ import { ISuperToken } from "./ISuperToken.sol"; import { ISuperTokenFactory } from "./ISuperTokenFactory.sol"; import { ISETH } from "../tokens/ISETH.sol"; /// Superfluid/ERC20x NFTs -import { IFlowNFTBase } from "./IFlowNFTBase.sol"; -import { IConstantOutflowNFT } from "./IConstantOutflowNFT.sol"; -import { IConstantInflowNFT } from "./IConstantInflowNFT.sol"; import { IPoolAdminNFT } from "../agreements/gdav1/IPoolAdminNFT.sol"; import { IPoolMemberNFT } from "../agreements/gdav1/IPoolMemberNFT.sol"; /// Superfluid agreement interfaces: diff --git a/packages/ethereum-contracts/contracts/mocks/SuperTokenFactoryMock.t.sol b/packages/ethereum-contracts/contracts/mocks/SuperTokenFactoryMock.t.sol index 824d006bd6..bb1ad92282 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperTokenFactoryMock.t.sol +++ b/packages/ethereum-contracts/contracts/mocks/SuperTokenFactoryMock.t.sol @@ -1,15 +1,13 @@ // SPDX-License-Identifier: AGPLv3 pragma solidity ^0.8.23; -import { +import { ISuperfluid, ISuperToken, - IConstantInflowNFT, - IConstantOutflowNFT, IPoolAdminNFT, IPoolMemberNFT } from "../interfaces/superfluid/ISuperfluid.sol"; -import { SuperTokenFactoryBase } from "../superfluid/SuperTokenFactory.sol"; +import { SuperTokenFactoryBase, IConstantOutflowNFT, IConstantInflowNFT } from "../superfluid/SuperTokenFactory.sol"; contract SuperTokenFactoryStorageLayoutTester is SuperTokenFactoryBase { constructor( diff --git a/packages/ethereum-contracts/contracts/mocks/SuperTokenMock.t.sol b/packages/ethereum-contracts/contracts/mocks/SuperTokenMock.t.sol index 5863890cdb..402c753631 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperTokenMock.t.sol +++ b/packages/ethereum-contracts/contracts/mocks/SuperTokenMock.t.sol @@ -4,11 +4,11 @@ pragma solidity ^0.8.23; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import { - ISuperfluid, IERC20, IConstantInflowNFT, IConstantOutflowNFT, IPoolAdminNFT, IPoolMemberNFT + ISuperfluid, IERC20, IPoolAdminNFT, IPoolMemberNFT } from "../interfaces/superfluid/ISuperfluid.sol"; import { UUPSProxiable } from "../upgradability/UUPSProxiable.sol"; import { ERC777Helper } from "../libs/ERC777Helper.sol"; -import { SuperToken } from "../superfluid/SuperToken.sol"; +import { SuperToken, IConstantOutflowNFT, IConstantInflowNFT } from "../superfluid/SuperToken.sol"; import { SuperfluidToken } from "../superfluid/SuperfluidToken.sol"; contract SuperTokenStorageLayoutTester is SuperToken { diff --git a/packages/ethereum-contracts/contracts/superfluid/ConstantInflowNFT.sol b/packages/ethereum-contracts/contracts/superfluid/ConstantInflowNFT.sol deleted file mode 100644 index 44bbd35627..0000000000 --- a/packages/ethereum-contracts/contracts/superfluid/ConstantInflowNFT.sol +++ /dev/null @@ -1,99 +0,0 @@ -// SPDX-License-Identifier: AGPLv3 -pragma solidity ^0.8.23; - -import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; -import { IGeneralDistributionAgreementV1 } from "../interfaces/agreements/gdav1/IGeneralDistributionAgreementV1.sol"; -import { IConstantFlowAgreementV1 } from "../interfaces/agreements/IConstantFlowAgreementV1.sol"; -import { IConstantOutflowNFT } from "../interfaces/superfluid/IConstantOutflowNFT.sol"; -import { IConstantInflowNFT } from "../interfaces/superfluid/IConstantInflowNFT.sol"; -import { ISuperfluid } from "../interfaces/superfluid/ISuperfluid.sol"; -import { FlowNFTBase, IFlowNFTBase } from "./FlowNFTBase.sol"; - -/// @title ConstantInflowNFT Contract (CIF NFT) -/// @author Superfluid -/// @notice The ConstantInflowNFT contract to be minted to the flow sender on flow creation. -/// @dev This contract does not hold any storage, but references the ConstantOutflowNFT contract storage. -contract ConstantInflowNFT is FlowNFTBase, IConstantInflowNFT { - IConstantOutflowNFT public immutable CONSTANT_OUTFLOW_NFT; - - // solhint-disable-next-line no-empty-blocks - constructor( - ISuperfluid host, - IConstantFlowAgreementV1 cfaV1, - IGeneralDistributionAgreementV1 gdaV1, - IConstantOutflowNFT constantOutflowNFT - ) FlowNFTBase(host, cfaV1, gdaV1) { - CONSTANT_OUTFLOW_NFT = constantOutflowNFT; - } - - function proxiableUUID() public pure override returns (bytes32) { - return keccak256("org.superfluid-finance.contracts.ConstantInflowNFT.implementation"); - } - - /// @notice The mint function emits the "mint" `Transfer` event. - /// @dev We don't modify storage as this is handled in ConstantOutflowNFT.sol and this function's sole purpose - /// is to inform clients that search for events. - /// Only callable by ConstantOutflowNFT - /// @param to the receiver of the inflow nft and desired flow receiver - /// @param newTokenId the new token id - function mint(address to, uint256 newTokenId) external onlyConstantOutflowNFT { - _mint(to, newTokenId); - } - - /// @notice This burn function emits the "burn" `Transfer` event. - /// @dev We don't modify storage as this is handled in ConstantOutflowNFT.sol and this function's sole purpose - /// is to inform clients that search for events. - /// Only callable by ConstantOutflowNFT - /// @param tokenId desired token id to burn - function burn(uint256 tokenId) external onlyConstantOutflowNFT { - _burn(tokenId); - } - - function flowDataByTokenId(uint256 tokenId) - public - view - override(FlowNFTBase, IFlowNFTBase) - returns (FlowNFTData memory flowData) - { - flowData = CONSTANT_OUTFLOW_NFT.flowDataByTokenId(tokenId); - } - - function tokenURI(uint256 tokenId) external view override(FlowNFTBase, IERC721Metadata) returns (string memory) { - return _tokenURI(tokenId, true); - } - - /// @inheritdoc FlowNFTBase - function _ownerOf(uint256 tokenId) internal view override returns (address) { - FlowNFTData memory flowData = flowDataByTokenId(tokenId); - return flowData.flowReceiver; - } - - /// @notice Transfer is currently not allowed. - /// @dev Will revert currently. - function _transfer( - address, // from, - address, // to, - uint256 // tokenId - ) internal pure override { - revert CFA_NFT_TRANSFER_IS_NOT_ALLOWED(); - } - - function _mint(address to, uint256 newTokenId) internal { - emit Transfer(address(0), to, newTokenId); - } - - function _burn(uint256 tokenId) internal override { - FlowNFTData memory flowData = flowDataByTokenId(tokenId); - - super._burn(tokenId); - - emit Transfer(flowData.flowReceiver, address(0), tokenId); - } - - modifier onlyConstantOutflowNFT() { - if (msg.sender != address(CONSTANT_OUTFLOW_NFT)) { - revert CIF_NFT_ONLY_CONSTANT_OUTFLOW(); - } - _; - } -} diff --git a/packages/ethereum-contracts/contracts/superfluid/ConstantOutflowNFT.sol b/packages/ethereum-contracts/contracts/superfluid/ConstantOutflowNFT.sol deleted file mode 100644 index 98c5592dff..0000000000 --- a/packages/ethereum-contracts/contracts/superfluid/ConstantOutflowNFT.sol +++ /dev/null @@ -1,177 +0,0 @@ -// SPDX-License-Identifier: AGPLv3 -// solhint-disable not-rely-on-time -pragma solidity ^0.8.23; - -import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; -import { ISuperfluidToken } from "../interfaces/superfluid/ISuperfluidToken.sol"; -import { IGeneralDistributionAgreementV1 } from "../interfaces/agreements/gdav1/IGeneralDistributionAgreementV1.sol"; -import { IConstantFlowAgreementV1 } from "../interfaces/agreements/IConstantFlowAgreementV1.sol"; -import { IConstantInflowNFT } from "../interfaces/superfluid/IConstantInflowNFT.sol"; -import { IConstantOutflowNFT } from "../interfaces/superfluid/IConstantOutflowNFT.sol"; -import { ISuperfluid } from "../interfaces/superfluid/ISuperfluid.sol"; -import { FlowNFTBase, IFlowNFTBase } from "./FlowNFTBase.sol"; - -/// @title ConstantOutflowNFT contract (COF NFT) -/// @author Superfluid -/// @notice The ConstantOutflowNFT contract to be minted to the flow sender on flow creation. -/// @dev This contract uses mint/burn interface for flow creation/deletion and holds the actual storage for both NFTs. -contract ConstantOutflowNFT is FlowNFTBase, IConstantOutflowNFT { - IConstantInflowNFT public immutable CONSTANT_INFLOW_NFT; - - /// @notice A mapping from token id to FlowNFTData - /// FlowNFTData: { address flowSender, uint32 flowStartDate, address flowReceiver, address superToken } - /// @dev The token id is uint256(keccak256(abi.encode(flowSender, flowReceiver))) - mapping(uint256 => FlowNFTData) internal _flowDataByTokenId; - - // solhint-disable-next-line no-empty-blocks - constructor( - ISuperfluid host, - IConstantFlowAgreementV1 cfaV1, - IGeneralDistributionAgreementV1 gdaV1, - IConstantInflowNFT constantInflowNFT - ) FlowNFTBase(host, cfaV1, gdaV1) { - CONSTANT_INFLOW_NFT = constantInflowNFT; - } - - // note that this is used so we don't upgrade to wrong logic contract - function proxiableUUID() public pure override returns (bytes32) { - return keccak256("org.superfluid-finance.contracts.ConstantOutflowNFT.implementation"); - } - - /// @notice An external function for querying flow data by `tokenId`` - /// @param tokenId the token id - /// @return flowData the flow data associated with `tokenId` - function flowDataByTokenId(uint256 tokenId) - public - view - override(FlowNFTBase, IFlowNFTBase) - returns (FlowNFTData memory flowData) - { - flowData = _flowDataByTokenId[tokenId]; - } - - function tokenURI(uint256 tokenId) external view override(FlowNFTBase, IERC721Metadata) returns (string memory) { - return _tokenURI(tokenId, false); - } - - /// @notice Hook called by CFA contract on flow creation - /// @dev This function mints the COF NFT to the flow sender and mints the CIF NFT to the flow receiver - /// @param superToken the SuperToken contract address - /// @param flowSender the flow sender - /// @param flowReceiver the flow receiver - /// NOTE: We do an existence check in here to determine whether or not to execute the hook - function onCreate(ISuperfluidToken superToken, address flowSender, address flowReceiver) - external - onlyFlowAgreements - { - // we don't check matching super token because the nft token id - // is generated based on the superToken - uint256 newTokenId = _getTokenId(address(superToken), flowSender, flowReceiver); - if (_flowDataByTokenId[newTokenId].flowSender == address(0)) { - _mint(address(superToken), flowSender, flowReceiver, newTokenId); - - CONSTANT_INFLOW_NFT.mint(flowReceiver, newTokenId); - } - } - - /// @notice Hook called by CFA contract on flow update - /// @dev This function triggers the metadata update of both COF and CIF NFTs - /// @param superToken the SuperToken contract address - /// @param flowSender the flow sender - /// @param flowReceiver the flow receiver - /// NOTE: We do an existence check in here to determine whether or not to execute the hook - function onUpdate(ISuperfluidToken superToken, address flowSender, address flowReceiver) - external - onlyFlowAgreements - { - uint256 tokenId = _getTokenId(address(superToken), flowSender, flowReceiver); - if (_flowDataByTokenId[tokenId].flowSender != address(0)) { - _triggerMetadataUpdate(tokenId); - - CONSTANT_INFLOW_NFT.triggerMetadataUpdate(tokenId); - } - } - - /// @notice Hook called by CFA contract on flow deletion - /// @dev This function burns the COF NFT and burns the CIF NFT - /// @param superToken the SuperToken contract address - /// @param flowSender the flow sender - /// @param flowReceiver the flow receiver - /// NOTE: We do an existence check in here to determine whether or not to execute the hook - function onDelete(ISuperfluidToken superToken, address flowSender, address flowReceiver) - external - onlyFlowAgreements - { - uint256 tokenId = _getTokenId(address(superToken), flowSender, flowReceiver); - if (_flowDataByTokenId[tokenId].flowSender != address(0)) { - // must "burn" inflow NFT first because we clear storage when burning outflow NFT - - CONSTANT_INFLOW_NFT.burn(tokenId); - - _burn(tokenId); - } - } - - /// @inheritdoc FlowNFTBase - function _ownerOf(uint256 tokenId) internal view override returns (address) { - return _flowDataByTokenId[tokenId].flowSender; - } - - /// @notice Reverts - Transfer of outflow NFT is not allowed. - /// @dev We revert when users attempt to transfer outflow NFTs. - function _transfer( - address, // from, - address, // to, - uint256 // tokenId - ) internal pure override { - revert CFA_NFT_TRANSFER_IS_NOT_ALLOWED(); - } - - /// @notice Mints `newTokenId` and transfers it to `flowSender` - /// @dev `newTokenId` must not exist `flowSender` cannot be `address(0)` and we emit a {Transfer} event. - /// `flowSender` cannot be equal to `flowReceiver`. - /// @param superToken the SuperToken contract address - /// @param flowSender the receiver of the newly minted outflow nft (to) - /// @param flowReceiver the flow receiver (owner of the InflowNFT) - /// @param newTokenId the new token id to be minted - function _mint(address superToken, address flowSender, address flowReceiver, uint256 newTokenId) internal { - assert(flowSender != address(0)); - assert(flowSender != flowReceiver); - - // update mapping for new NFT to be minted - _flowDataByTokenId[newTokenId] = FlowNFTData( - superToken, - flowSender, - flowReceiver, - uint32(block.timestamp) // flowStartDate - ); - - // emit mint of new outflow token with newTokenId - emit Transfer(address(0), flowSender, newTokenId); - } - - /// @notice Destroys token with `tokenId` and clears approvals from previous owner. - /// @dev `tokenId` must exist AND we emit a {Transfer} event - /// @param tokenId the id of the token we are destroying - function _burn(uint256 tokenId) internal override { - address owner = _ownerOf(tokenId); - - super._burn(tokenId); - - // remove previous tokenId flow data mapping - delete _flowDataByTokenId[tokenId]; - - // emit burn of outflow token with tokenId - emit Transfer(owner, address(0), tokenId); - } - - modifier onlyFlowAgreements() { - if ( - msg.sender != address(CONSTANT_FLOW_AGREEMENT_V1) - && msg.sender != address(GENERAL_DISTRIBUTION_AGREEMENT_V1) - ) { - revert COF_NFT_ONLY_FLOW_AGREEMENTS(); - } - _; - } -} diff --git a/packages/ethereum-contracts/contracts/superfluid/FlowNFTBase.sol b/packages/ethereum-contracts/contracts/superfluid/FlowNFTBase.sol deleted file mode 100644 index 3629dfa7f1..0000000000 --- a/packages/ethereum-contracts/contracts/superfluid/FlowNFTBase.sol +++ /dev/null @@ -1,362 +0,0 @@ -// SPDX-License-Identifier: AGPLv3 -pragma solidity ^0.8.23; - -// solhint-disable max-states-count -// Notes: We use reserved slots for upgradable contracts. - -// They are used in solidity docs. -import { - // solhint-disable-next-line no-unused-import - IERC165, IERC721, IERC721Metadata -} from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; - -import { UUPSProxiable } from "../upgradability/UUPSProxiable.sol"; -import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; -import { - ISuperfluid, ISuperToken, ISuperTokenFactory, IFlowNFTBase, - IConstantFlowAgreementV1, IGeneralDistributionAgreementV1 -} from "../interfaces/superfluid/ISuperfluid.sol"; - -/// @title FlowNFTBase abstract contract -/// @author Superfluid -/// @notice The abstract contract to be inherited by the Flow NFTs. -/// @dev This contract inherits from IFlowNFTBase which inherits from -/// IERC721Metadata and holds shared storage and functions for the two NFT contracts. -/// This contract is upgradeable and it inherits from our own ad-hoc UUPSProxiable contract which allows. -/// NOTE: the storage gap allows us to add an additional 16 storage variables to this contract without breaking child -/// COFNFT or CIFNFT storage. -abstract contract FlowNFTBase is UUPSProxiable, IFlowNFTBase { - using Strings for uint256; - - string public constant DEFAULT_BASE_URI = "https://nft.superfluid.finance/cfa/v2/getmeta"; - - function baseURI() public pure returns (string memory) { return DEFAULT_BASE_URI; } - - /// @notice ConstantFlowAgreementV1 contract address - /// @dev This is the address of the CFAv1 contract cached so we don't have to - /// do an external call for every flow created. - // solhint-disable-next-line var-name-mixedcase - IConstantFlowAgreementV1 public immutable CONSTANT_FLOW_AGREEMENT_V1; - - /// @notice GeneralDistributionAgreementV1 contract address - /// @dev This is the address of the GDAv1 contract cached so we don't have to - /// do an external call for every flow created. - // solhint-disable-next-line var-name-mixedcase - IGeneralDistributionAgreementV1 public immutable GENERAL_DISTRIBUTION_AGREEMENT_V1; - - /// @notice Superfluid host contract address - ISuperfluid public immutable HOST; - - /************************************************************************** - * Storage variables - *************************************************************************/ - /// NOTE: The storage variables in this contract MUST NOT: - /// - change the ordering of the existing variables - /// - change any of the variable types - /// - rename any of the existing variables - /// - remove any of the existing variables - /// - add any new variables after _gap - /// - add any new variables before _gap and NOT decrement the length of the _gap array - /// Go to CFAv1NFTUpgradability.t.sol for the tests and make sure to add new tests for upgrades. - - string internal _name; - string internal _symbol; - - /// @notice Mapping for token approvals - /// @dev tokenID => approved address mapping - mapping(uint256 => address) internal _tokenApprovals; - - /// @notice Mapping for operator approvals - mapping(address => mapping(address => bool)) internal _operatorApprovals; - - /// @notice This allows us to add new storage variables in the base contract - /// without having to worry about messing up the storage layout that exists in COFNFT or CIFNFT. - /// @dev This empty reserved space is put in place to allow future versions to add new - /// variables without shifting down storage in the inheritance chain. - /// Slots 5-21 are reserved for future use. - /// We use this pattern in SuperToken.sol and favor this over the OpenZeppelin pattern - /// as this prevents silly footgunning. - /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - uint256 internal _reserve5; - uint256 private _reserve6; - uint256 private _reserve7; - uint256 private _reserve8; - uint256 private _reserve9; - uint256 private _reserve10; - uint256 private _reserve11; - uint256 private _reserve12; - uint256 private _reserve13; - uint256 private _reserve14; - uint256 private _reserve15; - uint256 private _reserve16; - uint256 private _reserve17; - uint256 private _reserve18; - uint256 private _reserve19; - uint256 private _reserve20; - uint256 internal _reserve21; - - constructor(ISuperfluid host, IConstantFlowAgreementV1 cfaV1, IGeneralDistributionAgreementV1 gdaV1) { - HOST = host; - CONSTANT_FLOW_AGREEMENT_V1 = cfaV1; - GENERAL_DISTRIBUTION_AGREEMENT_V1 = gdaV1; - } - - function initialize(string memory nftName, string memory nftSymbol) - external - override - initializer // OpenZeppelin Initializable - { - _name = nftName; - _symbol = nftSymbol; - } - - function updateCode(address newAddress) external override { - ISuperTokenFactory superTokenFactory = HOST.getSuperTokenFactory(); - if (msg.sender != address(superTokenFactory)) { - revert CFA_NFT_ONLY_SUPER_TOKEN_FACTORY(); - } - - UUPSProxiable._updateCodeAddress(newAddress); - } - - /// @notice Emits the MetadataUpdate event with `tokenId` as the argument. - /// @dev Callable by anyone. - /// @param tokenId the token id to trigger a metaupdate for - function triggerMetadataUpdate(uint256 tokenId) external { - _triggerMetadataUpdate(tokenId); - } - - /// @notice This contract supports IERC165, IERC721 and IERC721Metadata - /// @dev This is part of the Standard Interface Detection EIP: https://eips.ethereum.org/EIPS/eip-165 - /// @param interfaceId the XOR of all function selectors in the interface - /// @return boolean true if the interface is supported - /// @inheritdoc IERC165 - function supportsInterface(bytes4 interfaceId) external pure virtual override returns (bool) { - return interfaceId == 0x01ffc9a7 // ERC165 Interface ID for ERC165 - || interfaceId == 0x80ac58cd // ERC165 Interface ID for ERC721 - || interfaceId == 0x5b5e139f; // ERC165 Interface ID for ERC721Metadata - } - - /// @inheritdoc IERC721 - function ownerOf(uint256 tokenId) public view virtual override returns (address) { - address owner = _ownerOf(tokenId); - if (owner == address(0)) { - revert CFA_NFT_INVALID_TOKEN_ID(); - } - return owner; - } - - /// @notice Returns a hardcoded balance of 1 - /// @dev We always return 1 to avoid the need for additional mapping - /// @return balance = 1 - function balanceOf( - address // owner - ) external pure returns (uint256 balance) { - balance = 1; - } - - /// @notice Returns the name of the NFT - /// @dev Should follow the naming convention: TOKENx Constant Outflow/Inflow NFT - /// @return name of the NFT - function name() external view virtual override returns (string memory) { - return _name; - } - - /// @notice Returns the symbol of the NFT - /// @dev Should follow the naming convention: TOKENx(COF/CIF) - /// @return symbol of the NFT - function symbol() external view virtual override returns (string memory) { - return _symbol; - } - - /// @notice This returns the Uniform Resource Identifier (URI), where the metadata for the NFT lives. - /// @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. - /// @return the token URI - function tokenURI(uint256 tokenId) external view virtual returns (string memory); - - function _tokenURI(uint256 tokenId, bool isInflow) internal view virtual returns (string memory) { - FlowNFTData memory flowData = flowDataByTokenId(tokenId); - - ISuperToken token = ISuperToken(flowData.superToken); - - (, int96 flowRate,,) = CONSTANT_FLOW_AGREEMENT_V1.getFlow(token, flowData.flowSender, flowData.flowReceiver); - - return - string( - abi.encodePacked( - baseURI(), - "?flowRate=", - uint256(uint96(flowRate)).toString(), - "&outgoing=", - isInflow ? "false" : "true", - _flowDataString(tokenId) - ) - ); - } - - function _flowDataString(uint256 tokenId) internal view returns (string memory) { - FlowNFTData memory flowData = flowDataByTokenId(tokenId); - - // @note taking this out to deal with the stack too deep issue - // which occurs when you are attempting to abi.encodePacked - // too many elements - return string( - abi.encodePacked( - "&token_address=", - Strings.toHexString(uint256(uint160(flowData.superToken)), 20), - "&chain_id=", - block.chainid.toString(), - "&token_symbol=", - ISuperToken(flowData.superToken).symbol(), - "&sender=", - Strings.toHexString(uint256(uint160(flowData.flowSender)), 20), - "&receiver=", - Strings.toHexString(uint256(uint160(flowData.flowReceiver)), 20), - "&token_decimals=", - uint256(ISuperToken(flowData.superToken).decimals()).toString(), - "&start_date=", - // @note upcasting is safe - uint256(flowData.flowStartDate).toString() - ) - ); - } - - /// @inheritdoc IERC721 - function approve(address to, uint256 tokenId) public virtual override { - address owner = FlowNFTBase.ownerOf(tokenId); - if (to == owner) { - revert CFA_NFT_APPROVE_TO_CURRENT_OWNER(); - } - - if (msg.sender != owner && !isApprovedForAll(owner, msg.sender)) { - revert CFA_NFT_APPROVE_CALLER_NOT_OWNER_OR_APPROVED_FOR_ALL(); - } - - _approve(to, tokenId); - } - - /// @inheritdoc IFlowNFTBase - function getTokenId(address superToken, address sender, address receiver) external view returns (uint256 tokenId) { - tokenId = _getTokenId(superToken, sender, receiver); - } - - function _getTokenId(address superToken, address sender, address receiver) - internal - view - returns (uint256 tokenId) - { - tokenId = uint256(keccak256(abi.encode(block.chainid, superToken, sender, receiver))); - } - - /// @inheritdoc IERC721 - function getApproved(uint256 tokenId) public view virtual override returns (address) { - _requireMinted(tokenId); - - return _tokenApprovals[tokenId]; - } - - /// @inheritdoc IERC721 - function setApprovalForAll(address operator, bool approved) external virtual override { - _setApprovalForAll(msg.sender, operator, approved); - } - - /// @inheritdoc IERC721 - function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { - return _operatorApprovals[owner][operator]; - } - - /// @inheritdoc IERC721 - function transferFrom(address from, address to, uint256 tokenId) external virtual override { - if (!_isApprovedOrOwner(msg.sender, tokenId)) { - revert CFA_NFT_TRANSFER_CALLER_NOT_OWNER_OR_APPROVED_FOR_ALL(); - } - - _transfer(from, to, tokenId); - } - - /// @inheritdoc IERC721 - function safeTransferFrom(address from, address to, uint256 tokenId) external virtual override { - safeTransferFrom(from, to, tokenId, ""); - } - - /// @inheritdoc IERC721 - function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override { - if (!_isApprovedOrOwner(msg.sender, tokenId)) { - revert CFA_NFT_TRANSFER_CALLER_NOT_OWNER_OR_APPROVED_FOR_ALL(); - } - - _safeTransfer(from, to, tokenId, data); - } - - /// @notice Returns whether `spender` is allowed to manage `tokenId`. - /// @dev Will revert if `tokenId` doesn't exist. - /// @param spender the spender of the token - /// @param tokenId the id of the token to be spent - /// @return whether `tokenId` can be spent by `spender` - function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) { - address owner = FlowNFTBase.ownerOf(tokenId); - return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); - } - - /// @notice Reverts if `tokenId` doesn't exist - /// @param tokenId the token id whose existence we are checking - function _requireMinted(uint256 tokenId) internal view { - if (!_exists(tokenId)) revert CFA_NFT_INVALID_TOKEN_ID(); - } - - /// @notice Returns whether `tokenId` exists - /// @dev Tokens can be managed by their owner or approved accounts via `approve` or `setApprovalForAll`. - /// Tokens start existing when they are minted (`_mint`), - /// and stop existing when they are burned (`_burn`). - /// @param tokenId the token id we're interested in seeing if exists - /// @return bool whether ot not the token exists - function _exists(uint256 tokenId) internal view returns (bool) { - return _ownerOf(tokenId) != address(0); - } - - function _triggerMetadataUpdate(uint256 tokenId) internal { - emit MetadataUpdate(tokenId); - } - - function _approve(address to, uint256 tokenId) internal { - _tokenApprovals[tokenId] = to; - - emit Approval(_ownerOf(tokenId), to, tokenId); - } - - function _setApprovalForAll(address owner, address operator, bool approved) internal { - if (owner == operator) revert CFA_NFT_APPROVE_TO_CALLER(); - - _operatorApprovals[owner][operator] = approved; - - emit ApprovalForAll(owner, operator, approved); - } - - /// @dev Returns the flow data of the `tokenId`. Does NOT revert if token doesn't exist. - /// @param tokenId the token id whose existence we're checking - /// @return flowData the FlowNFTData struct for `tokenId` - function flowDataByTokenId(uint256 tokenId) public view virtual returns (FlowNFTData memory flowData); - - /// @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist. - /// @param tokenId the token id whose existence we're checking - /// @return address the address of the owner of `tokenId` - function _ownerOf(uint256 tokenId) internal view virtual returns (address); - - function _transfer(address from, address to, uint256 tokenId) internal virtual; - - function _safeTransfer( - address from, - address to, - uint256 tokenId, - bytes memory // data - ) internal virtual { - _transfer(from, to, tokenId); - } - - /// @dev Deletes the tokenApprovals for `tokenId` - /// @param tokenId the token id whose approvals we're clearing - function _burn(uint256 tokenId) internal virtual { - // clear approvals from the previous owner - delete _tokenApprovals[tokenId]; - } -} diff --git a/packages/ethereum-contracts/contracts/superfluid/SuperToken.sol b/packages/ethereum-contracts/contracts/superfluid/SuperToken.sol index f6ac26f51f..dbb0db043f 100644 --- a/packages/ethereum-contracts/contracts/superfluid/SuperToken.sol +++ b/packages/ethereum-contracts/contracts/superfluid/SuperToken.sol @@ -9,8 +9,6 @@ import { ISuperfluid, ISuperToken, IERC20, - IConstantOutflowNFT, - IConstantInflowNFT, IPoolAdminNFT, IPoolMemberNFT } from "../interfaces/superfluid/ISuperfluid.sol"; @@ -23,6 +21,12 @@ import { IERC777Recipient } from "@openzeppelin/contracts/token/ERC777/IERC777Re import { IERC777Sender } from "@openzeppelin/contracts/token/ERC777/IERC777Sender.sol"; import { Address } from "@openzeppelin/contracts/utils/Address.sol"; +// placeholder types needed as an intermediate step before complete removal of FlowNFTs +// solhint-disable-next-line no-empty-blocks +interface IConstantOutflowNFT {} +// solhint-disable-next-line no-empty-blocks +interface IConstantInflowNFT {} + /** * @title Superfluid's super token implementation * @@ -117,12 +121,10 @@ contract SuperToken is // set the immutable canonical NFT proxy addresses CONSTANT_OUTFLOW_NFT = constantOutflowNFT; CONSTANT_INFLOW_NFT = constantInflowNFT; + POOL_ADMIN_NFT = poolAdminNFT; POOL_MEMBER_NFT = poolMemberNFT; - emit ConstantOutflowNFTCreated(constantOutflowNFT); - emit ConstantInflowNFTCreated(constantInflowNFT); - emit PoolAdminNFTCreated(poolAdminNFT); emit PoolMemberNFTCreated(poolMemberNFT); } @@ -177,18 +179,6 @@ contract SuperToken is */ function updateCode(address newAddress) external virtual override onlyAdmin { UUPSProxiable._updateCodeAddress(newAddress); - - // @note This is another check to ensure that when updating to a new SuperToken logic contract - // that we have passed the correct NFT proxy contracts in the construction of the new SuperToken - // logic contract - if ( - CONSTANT_OUTFLOW_NFT != - SuperToken(newAddress).CONSTANT_OUTFLOW_NFT() || - CONSTANT_INFLOW_NFT != - SuperToken(newAddress).CONSTANT_INFLOW_NFT() - ) { - revert SUPER_TOKEN_NFT_PROXY_ADDRESS_CHANGED(); - } } function changeAdmin(address newAdmin) external override onlyAdmin { diff --git a/packages/ethereum-contracts/contracts/superfluid/SuperTokenFactory.sol b/packages/ethereum-contracts/contracts/superfluid/SuperTokenFactory.sol index fe9db038e0..55823bf0e4 100644 --- a/packages/ethereum-contracts/contracts/superfluid/SuperTokenFactory.sol +++ b/packages/ethereum-contracts/contracts/superfluid/SuperTokenFactory.sol @@ -8,11 +8,12 @@ import { ISuperToken } from "../interfaces/superfluid/ISuperTokenFactory.sol"; import { - ISuperfluid, IConstantOutflowNFT, IConstantInflowNFT, IPoolAdminNFT, IPoolMemberNFT + ISuperfluid, IPoolAdminNFT, IPoolMemberNFT } from "../interfaces/superfluid/ISuperfluid.sol"; import { UUPSProxy } from "../upgradability/UUPSProxy.sol"; import { UUPSProxiable } from "../upgradability/UUPSProxiable.sol"; import { FullUpgradableSuperTokenProxy } from "./FullUpgradableSuperTokenProxy.sol"; +import { IConstantOutflowNFT, IConstantInflowNFT } from "./SuperToken.sol"; abstract contract SuperTokenFactoryBase is UUPSProxiable, @@ -144,16 +145,6 @@ abstract contract SuperTokenFactoryBase is // We only do this if the new logic contracts passed in updating the SuperTokenFactory // are different from the current logic contracts SuperTokenFactory newFactory = SuperTokenFactory(newAddress); - address newConstantOutflowLogic = address(newFactory.CONSTANT_OUTFLOW_NFT_LOGIC()); - address newConstantInflowLogic = address(newFactory.CONSTANT_INFLOW_NFT_LOGIC()); - - if (address(CONSTANT_OUTFLOW_NFT_LOGIC) != newConstantOutflowLogic) { - UUPSProxiable(address(_SUPER_TOKEN_LOGIC.CONSTANT_OUTFLOW_NFT())).updateCode(newConstantOutflowLogic); - } - - if (address(CONSTANT_INFLOW_NFT_LOGIC) != newConstantInflowLogic) { - UUPSProxiable(address(_SUPER_TOKEN_LOGIC.CONSTANT_INFLOW_NFT())).updateCode(newConstantInflowLogic); - } if (address(POOL_ADMIN_NFT_LOGIC) != address(newFactory.POOL_ADMIN_NFT_LOGIC())) { UUPSProxiable(address(_SUPER_TOKEN_LOGIC.POOL_ADMIN_NFT())).updateCode( diff --git a/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol b/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol index bef16401a6..7d15408dd4 100644 --- a/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol +++ b/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol @@ -9,9 +9,7 @@ import { IDAv1Forwarder } from "./IDAv1Forwarder.sol"; import { GDAv1Forwarder } from "./GDAv1Forwarder.sol"; import { ISuperfluid, ISuperfluidToken, Superfluid } from "../superfluid/Superfluid.sol"; import { TestGovernance } from "./TestGovernance.sol"; -import { IConstantFlowAgreementV1, ConstantFlowAgreementV1 } from "../agreements/ConstantFlowAgreementV1.sol"; -import { ConstantOutflowNFT, IConstantOutflowNFT } from "../superfluid/ConstantOutflowNFT.sol"; -import { ConstantInflowNFT, IConstantInflowNFT } from "../superfluid/ConstantInflowNFT.sol"; +import { ConstantFlowAgreementV1 } from "../agreements/ConstantFlowAgreementV1.sol"; import { PoolAdminNFT, IPoolAdminNFT } from "../agreements/gdav1/PoolAdminNFT.sol"; import { PoolMemberNFT, IPoolMemberNFT } from "../agreements/gdav1/PoolMemberNFT.sol"; import { InstantDistributionAgreementV1 } from "../agreements/InstantDistributionAgreementV1.sol"; @@ -23,7 +21,7 @@ import { SuperTokenFactory } from "../superfluid/SuperTokenFactory.sol"; import { TestToken } from "./TestToken.sol"; import { PureSuperToken } from "../tokens/PureSuperToken.sol"; import { SETHProxy } from "../tokens/SETH.sol"; -import { ISuperToken, SuperToken } from "../superfluid/SuperToken.sol"; +import { ISuperToken, SuperToken, IConstantOutflowNFT, IConstantInflowNFT } from "../superfluid/SuperToken.sol"; import { TestResolver } from "./TestResolver.sol"; import { SuperfluidLoader } from "./SuperfluidLoader.sol"; import { SuperfluidPool } from "../agreements/gdav1/SuperfluidPool.sol"; @@ -63,8 +61,6 @@ contract SuperfluidFrameworkDeploymentSteps { IDAv1Library.InitData idaLib; SuperTokenFactory superTokenFactory; ISuperToken superTokenLogic; - ConstantOutflowNFT constantOutflowNFT; - ConstantInflowNFT constantInflowNFT; TestResolver resolver; SuperfluidLoader superfluidLoader; CFAv1Forwarder cfaV1Forwarder; @@ -86,8 +82,6 @@ contract SuperfluidFrameworkDeploymentSteps { GeneralDistributionAgreementV1 internal gdaV1; // SuperToken-related Contracts - ConstantOutflowNFT internal constantOutflowNFT; - ConstantInflowNFT internal constantInflowNFT; PoolAdminNFT internal poolAdminNFT; PoolMemberNFT internal poolMemberNFT; @@ -122,8 +116,6 @@ contract SuperfluidFrameworkDeploymentSteps { gda: gdaV1, superTokenFactory: superTokenFactory, superTokenLogic: superTokenLogic, - constantOutflowNFT: constantOutflowNFT, - constantInflowNFT: constantInflowNFT, resolver: testResolver, superfluidLoader: superfluidLoader, cfaV1Forwarder: cfaV1Forwarder, @@ -204,27 +196,6 @@ contract SuperfluidFrameworkDeploymentSteps { gdaV1Logic.superfluidPoolBeacon().transferOwnership(address(host)); } } else if (step == 3) {// PERIPHERAL CONTRACTS: NFT Proxy and Logic - { - constantOutflowNFT = ConstantOutflowNFT(address(ProxyDeployerLibrary.deployUUPSProxy())); - constantInflowNFT = ConstantInflowNFT(address(ProxyDeployerLibrary.deployUUPSProxy())); - - ConstantOutflowNFT constantOutflowNFTLogic = SuperfluidFlowNFTLogicDeployerLibrary - .deployConstantOutflowNFT(host, cfaV1, gdaV1, constantInflowNFT); - constantOutflowNFTLogic.castrate(); - - ConstantInflowNFT constantInflowNFTLogic = SuperfluidFlowNFTLogicDeployerLibrary - .deployConstantInflowNFT(host, cfaV1, gdaV1, constantOutflowNFT); - constantInflowNFTLogic.castrate(); - - UUPSProxy(payable(address(constantOutflowNFT))).initializeProxy(address(constantOutflowNFTLogic)); - - UUPSProxy(payable(address(constantInflowNFT))).initializeProxy(address(constantInflowNFTLogic)); - - constantOutflowNFT.initialize("Constant Outflow NFT", "COF"); - - constantInflowNFT.initialize("Constant Inflow NFT", "CIF"); - } - { poolAdminNFT = PoolAdminNFT(address(ProxyDeployerLibrary.deployUUPSProxy())); PoolAdminNFT poolAdminNFTLogic = @@ -257,8 +228,6 @@ contract SuperfluidFrameworkDeploymentSteps { // Deploy canonical SuperToken logic contract superTokenLogic = SuperToken(SuperTokenDeployerLibrary.deploy( host, - constantOutflowNFT, - constantInflowNFT, poolAdminNFT, poolMemberNFT )); @@ -270,8 +239,6 @@ contract SuperfluidFrameworkDeploymentSteps { SuperTokenFactory superTokenFactoryLogic = SuperTokenFactoryDeployerLibrary.deploy( host, superTokenLogic, - IConstantOutflowNFT(constantOutflowNFT.getCodeAddress()), - IConstantInflowNFT(constantInflowNFT.getCodeAddress()), IPoolAdminNFT(poolAdminNFT.getCodeAddress()), IPoolMemberNFT(poolMemberNFT.getCodeAddress()) ); @@ -420,32 +387,16 @@ library GDAv1ForwarderDeployerLibrary { library SuperTokenDeployerLibrary { function deploy( ISuperfluid host, - IConstantOutflowNFT constantOutflowNFT, - IConstantInflowNFT constantInflowNFT, IPoolAdminNFT poolAdminNFT, IPoolMemberNFT poolMemberNFT ) external returns (address) { - return address(new SuperToken(host, constantOutflowNFT, constantInflowNFT, poolAdminNFT, poolMemberNFT)); - } -} - -library SuperfluidFlowNFTLogicDeployerLibrary { - function deployConstantOutflowNFT( - ISuperfluid host, - IConstantFlowAgreementV1 cfa, - IGeneralDistributionAgreementV1 gda, - IConstantInflowNFT constantInflowNFTProxy - ) external returns (ConstantOutflowNFT) { - return new ConstantOutflowNFT(host, cfa, gda, constantInflowNFTProxy); - } - - function deployConstantInflowNFT( - ISuperfluid host, - IConstantFlowAgreementV1 cfa, - IGeneralDistributionAgreementV1 gda, - IConstantOutflowNFT constantOutflowNFTProxy - ) external returns (ConstantInflowNFT) { - return new ConstantInflowNFT(host, cfa, gda, constantOutflowNFTProxy); + return address(new SuperToken( + host, + IConstantOutflowNFT(address(0)), + IConstantInflowNFT(address(0)), + poolAdminNFT, + poolMemberNFT + )); } } @@ -498,16 +449,14 @@ library SuperTokenFactoryDeployerLibrary { function deploy( ISuperfluid host, ISuperToken superTokenLogic, - IConstantOutflowNFT constantOutflowNFTLogic, - IConstantInflowNFT constantInflowNFTLogic, IPoolAdminNFT poolAdminNFTLogic, IPoolMemberNFT poolMemberNFTLogic ) external returns (SuperTokenFactory) { return new SuperTokenFactory( host, superTokenLogic, - constantOutflowNFTLogic, - constantInflowNFTLogic, + IConstantOutflowNFT(address(0)), + IConstantInflowNFT(address(0)), poolAdminNFTLogic, poolMemberNFTLogic ); diff --git a/packages/ethereum-contracts/dev-scripts/deploy-test-framework.js b/packages/ethereum-contracts/dev-scripts/deploy-test-framework.js index 41d12ae832..3425d88afb 100644 --- a/packages/ethereum-contracts/dev-scripts/deploy-test-framework.js +++ b/packages/ethereum-contracts/dev-scripts/deploy-test-framework.js @@ -10,7 +10,6 @@ const SuperfluidGDAv1DeployerLibraryArtifact = require("@superfluid-finance/ethe const SuperTokenDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperTokenDeployerLibrary.json"); const SuperfluidPeripheryDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperfluidPeripheryDeployerLibrary.json"); const SuperfluidPoolLogicDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperfluidPoolLogicDeployerLibrary.json"); -const SuperfluidFlowNFTLogicDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperfluidFlowNFTLogicDeployerLibrary.json"); const SuperfluidPoolNFTLogicDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperfluidPoolNFTLogicDeployerLibrary.json"); const ProxyDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/ProxyDeployerLibrary.json"); const CFAv1ForwarderDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/CFAv1ForwarderDeployerLibrary.json"); @@ -193,12 +192,6 @@ const _deployTestFramework = async (provider, signer) => { SuperfluidPoolLogicDeployerLibraryArtifact, signer ); - const SuperfluidFlowNFTLogicDeployerLibrary = - await _getFactoryAndReturnDeployedContract( - "SuperfluidFlowNFTLogicDeployerLibrary", - SuperfluidFlowNFTLogicDeployerLibraryArtifact, - signer - ); const SuperfluidPoolNFTLogicDeployerLibrary = await _getFactoryAndReturnDeployedContract( "SuperfluidPoolNFTLogicDeployerLibrary", @@ -276,9 +269,6 @@ const _deployTestFramework = async (provider, signer) => { SuperfluidPoolLogicDeployerLibrary: getContractAddress( SuperfluidPoolLogicDeployerLibrary ), - SuperfluidFlowNFTLogicDeployerLibrary: getContractAddress( - SuperfluidFlowNFTLogicDeployerLibrary - ), SuperfluidPoolNFTLogicDeployerLibrary: getContractAddress( SuperfluidPoolNFTLogicDeployerLibrary ), @@ -316,8 +306,6 @@ const printProtocolFrameworkAddresses = (framework) => { IDAv1: framework.ida, SuperTokenFactory: framework.superTokenFactory, SuperTokenLogic: framework.superTokenLogic, - ConstantOutflowNFT: framework.constantOutflowNFT, - ConstantInflowNFT: framework.constantInflowNFT, Resolver: framework.resolver, SuperfluidLoader: framework.superfluidLoader, CFAv1Forwarder: framework.cfaV1Forwarder, diff --git a/packages/ethereum-contracts/dev-scripts/run-deploy-contracts-and-token.js b/packages/ethereum-contracts/dev-scripts/run-deploy-contracts-and-token.js index e81ebc157e..6b033f737f 100644 --- a/packages/ethereum-contracts/dev-scripts/run-deploy-contracts-and-token.js +++ b/packages/ethereum-contracts/dev-scripts/run-deploy-contracts-and-token.js @@ -18,8 +18,6 @@ deployContractsAndToken() nativeAssetSuperTokenAddress: tokenDeploymentOutput.nativeAssetSuperTokenData .nativeAssetSuperTokenAddress, - constantOutflowNFTAddress: frameworkAddresses.constantOutflowNFT, - constantInflowNFTAddress: frameworkAddresses.constantInflowNFT, }; // create json output diff --git a/packages/ethereum-contracts/ops-scripts/deploy-framework.js b/packages/ethereum-contracts/ops-scripts/deploy-framework.js index e758e07f7d..3e28ba35db 100644 --- a/packages/ethereum-contracts/ops-scripts/deploy-framework.js +++ b/packages/ethereum-contracts/ops-scripts/deploy-framework.js @@ -229,8 +229,6 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( "SuperfluidPoolPlaceholder", "SuperfluidPoolDeployerLibrary", "BeaconProxy", - "ConstantOutflowNFT", - "ConstantInflowNFT", "PoolAdminNFT", "PoolMemberNFT", "IAccessControlEnumerable", @@ -270,8 +268,6 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( SuperfluidPoolPlaceholder, SuperfluidPoolDeployerLibrary, BeaconProxy, - ConstantOutflowNFT, - ConstantInflowNFT, PoolAdminNFT, PoolMemberNFT, IAccessControlEnumerable, @@ -812,18 +808,19 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( } async function getPrevDMZForwarderAddr() { - console.log("Getting DMZForwarder address..."); try { return await superfluid.DMZ_FORWARDER(); } catch (err) { + console.error("### Error getting DMZForwarder address", err); return ZERO_ADDRESS; // fallback } } + const prevDMZForwarderAddr = await getPrevDMZForwarderAddr(); - const dmzForwarderAddress = await deployContractIfCodeChanged( + const dmzForwarderNewAddress = await deployContractIfCodeChanged( web3, DMZForwarder, - await getPrevDMZForwarderAddr(), + prevDMZForwarderAddr, async () => { const dmzForwarder = await web3tx(DMZForwarder.new, "DMZForwarder.new")(); await web3tx( @@ -834,6 +831,9 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( return dmzForwarder.address; } ); + const dmzForwarderAddress = dmzForwarderNewAddress !== ZERO_ADDRESS + ? dmzForwarderNewAddress + : prevDMZForwarderAddr; // get previous callback gas limit, make sure we don't decrease it const prevCallbackGasLimit = await superfluid.CALLBACK_GAS_LIMIT(); @@ -921,8 +921,6 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( const factoryAddress = await superfluid.getSuperTokenFactory.call(); - let constantOutflowNFTLogicChanged = false; - let constantInflowNFTLogicChanged = false; let poolAdminNFTLogicChanged = false; let poolMemberNFTLogicChanged = false; @@ -951,37 +949,22 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( const superTokenLogicAddress = await factory.getSuperTokenLogic.call(); const superTokenLogic = await SuperTokenLogic.at(superTokenLogicAddress); - const cfaPAddr = await superfluid.getAgreementClass.call(CFAv1_TYPE); const gdaPAddr = await superfluid.getAgreementClass.call(GDAv1_TYPE); const cofNFTPAddr = await superTokenLogic.CONSTANT_OUTFLOW_NFT(); const cifNFTPAddr = await superTokenLogic.CONSTANT_INFLOW_NFT(); - let cofNFTLAddr; - let cifNFTLAddr; + let cofNFTLAddr = ZERO_ADDRESS; + let cifNFTLAddr = ZERO_ADDRESS; if (cofNFTPAddr !== ZERO_ADDRESS) { - const cofNFTContract = await ConstantOutflowNFT.at(cofNFTPAddr); + const cofNFTContract = await UUPSProxiable.at(cofNFTPAddr); cofNFTLAddr = await cofNFTContract.getCodeAddress(); - constantOutflowNFTLogicChanged = await codeChanged( - web3, - ConstantOutflowNFT, - cofNFTLAddr, - [superfluidConstructorParam, ap(cifNFTPAddr), ap(cfaPAddr), ap(gdaPAddr)] - ); - console.log(" constantOutflowNFTLogicChanged:", constantOutflowNFTLogicChanged); } if (cifNFTPAddr !== ZERO_ADDRESS) { - const cifNFTContract = await ConstantInflowNFT.at(cifNFTPAddr); + const cifNFTContract = await UUPSProxiable.at(cifNFTPAddr); cifNFTLAddr = await cifNFTContract.getCodeAddress(); - constantInflowNFTLogicChanged = await codeChanged( - web3, - ConstantInflowNFT, - cifNFTLAddr, - [superfluidConstructorParam, ap(cofNFTPAddr), ap(cfaPAddr), ap(gdaPAddr)] - ); - console.log(" constantInflowNFTLogicChanged:", constantInflowNFTLogicChanged); } // TODO: remove from try block once all networks have a PoolNFT aware supertoken logic deployed @@ -1037,12 +1020,9 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( return ( // check if super token factory logic has changed // or super token logic has changed - // or constant outflow nft logic has changed - // or constant inflow nft logic has changed + // or pool nft logic has changed superTokenFactoryCodeChanged || superTokenLogicCodeChanged || - constantOutflowNFTLogicChanged || - constantInflowNFTLogicChanged || poolAdminNFTLogicChanged || poolMemberNFTLogicChanged ); @@ -1061,8 +1041,8 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( // @note this will either be freshly created proxies on the very first bootstrapping per network // OR it will be the canonical proxy set on the SuperToken - let cofNFTProxyAddress = ZERO_ADDRESS; - let cifNFTProxyAddress = ZERO_ADDRESS; + let cofNFTProxyAddress; + let cifNFTProxyAddress; let cofNFTLogicAddress = ZERO_ADDRESS; let cifNFTLogicAddress = ZERO_ADDRESS; let poolAdminNFTProxyAddress = ZERO_ADDRESS; @@ -1088,10 +1068,10 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( await superTokenLogic.CONSTANT_OUTFLOW_NFT.call(); cifNFTProxyAddress = await superTokenLogic.CONSTANT_INFLOW_NFT.call(); - cofNFTLogicAddress = await ( + cofNFTLogicAddress = cofNFTProxyAddress === ZERO_ADDRESS ? ZERO_ADDRESS : await ( await UUPSProxiable.at(cofNFTProxyAddress) ).getCodeAddress(); - cifNFTLogicAddress = await ( + cifNFTLogicAddress = cofNFTProxyAddress === ZERO_ADDRESS ? ZERO_ADDRESS : await ( await UUPSProxiable.at(cifNFTProxyAddress) ).getCodeAddress(); @@ -1121,118 +1101,23 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( const cfaAddr = await superfluid.getAgreementClass.call(CFAv1_TYPE); const gdaAddr = await superfluid.getAgreementClass.call(GDAv1_TYPE); - // TODO: we may not want it deployed if address is zero (eth-mainnet) - - if ( - cofNFTProxyAddress === ZERO_ADDRESS || - cifNFTProxyAddress === ZERO_ADDRESS - ) { - console.log("BOOTSTRAPPING: Deploying Flow NFT Proxies..."); - const constantOutflowNFTProxy = await web3tx( - UUPSProxy.new, - `Create ConstantOutflowNFT proxy` - )(); - console.log( - "ConstantOutflowNFT Proxy address", - constantOutflowNFTProxy.address - ); - output += `CONSTANT_OUTFLOW_NFT_PROXY=${constantOutflowNFTProxy.address}\n`; - - const constantInflowNFTProxy = await web3tx( - UUPSProxy.new, - `Create ConstantInflowNFT proxy` - )(); - console.log( - "ConstantInflowNFT Proxy address", - constantInflowNFTProxy.address - ); - output += `CONSTANT_INFLOW_NFT_PROXY=${constantInflowNFTProxy.address}\n`; - - const constantOutflowNFTLogic = await deployNFTContract( - ConstantOutflowNFT, - "ConstantOutflowNFT", - "CONSTANT_OUTFLOW_NFT_LOGIC", - [superfluid.address, cfaAddr, gdaAddr, constantInflowNFTProxy.address] - ); - const constantInflowNFTLogic = await deployNFTContract( - ConstantInflowNFT, - "ConstantInflowNFT", - "CONSTANT_INFLOW_NFT_LOGIC", - [superfluid.address, cfaAddr, gdaAddr, constantOutflowNFTProxy.address] - ); - - // set the nft logic addresses (to be consumed by the super token factory logic constructor) - cofNFTLogicAddress = constantOutflowNFTLogic.address; - cifNFTLogicAddress = constantInflowNFTLogic.address; - - // initialize the nft proxy with the nft logic - await constantOutflowNFTProxy.initializeProxy( - constantOutflowNFTLogic.address - ); - await constantInflowNFTProxy.initializeProxy( - constantInflowNFTLogic.address - ); - const constantOutflowNFT = await ConstantOutflowNFT.at( - constantOutflowNFTProxy.address - ); - const constantInflowNFT = await ConstantInflowNFT.at( - constantInflowNFTProxy.address - ); - - // initialize the proxy contracts with the nft names - await constantOutflowNFT.initialize( - "Constant Outflow NFT", - "COF" - ); - await constantInflowNFT.initialize( - "Constant Inflow NFT", - "CIF" - ); - - // set the nft proxy addresses (to be consumed by the super token logic constructor) - cofNFTProxyAddress = constantOutflowNFTProxy.address; - cifNFTProxyAddress = constantInflowNFTProxy.address; - } else { - // FlowNFT proxies already exist - console.log("Check-upgrading Flow NFTs..."); - await deployContractIf( - web3, - ConstantOutflowNFT, - async () => { - return constantOutflowNFTLogicChanged; - }, - async () => { - const cofNFTLogic = await deployNFTContract( - ConstantOutflowNFT, - "ConstantOutflowNFT", - "CONSTANT_OUTFLOW_NFT_LOGIC", - [superfluid.address, cfaAddr, gdaAddr, cifNFTProxyAddress] - ); - // @note we set the cofNFTLogicAddress to be passed to SuperTokenFactoryLogic here - cofNFTLogicAddress = cofNFTLogic.address; + // We used to deploy a proxy if none existed. But FlowNFTs are now deprecated, so we don't. + if (cofNFTProxyAddress === undefined) { + console.log("COFNFT proxy doesn't exist, skipping deployment"); + cofNFTProxyAddress = ZERO_ADDRESS; + } + if (cifNFTProxyAddress === undefined) { + console.log("CIFNFT proxy doesn't exist, skipping deployment"); + cifNFTProxyAddress = ZERO_ADDRESS; + } - return cofNFTLogic.address; - } - ); - await deployContractIf( - web3, - ConstantInflowNFT, - async () => { - return constantInflowNFTLogicChanged; - }, - async () => { - const cifNFTLogic = await deployNFTContract( - ConstantInflowNFT, - "ConstantInflowNFT", - "CONSTANT_INFLOW_NFT_LOGIC", - [superfluid.address, cfaAddr, gdaAddr, cofNFTProxyAddress] - ); - // @note we set the cifNFTLogicAddress to be passed to SuperTokenFactoryLogic here - cifNFTLogicAddress = cifNFTLogic.address; - return cifNFTLogic.address; - } - ); - }; + // For existing proxies, we used to check-update the logic. But we don't anymore. + if (cofNFTProxyAddress !== ZERO_ADDRESS) { + console.log("skipping COFNFT logic update") + } + if (cifNFTProxyAddress !== ZERO_ADDRESS) { + console.log("skipping CIFNFT logic update") + } if ( diff --git a/packages/ethereum-contracts/ops-scripts/gov-transfer-framework-ownership.js b/packages/ethereum-contracts/ops-scripts/gov-transfer-framework-ownership.js index b66286c95f..1b5ef9924f 100644 --- a/packages/ethereum-contracts/ops-scripts/gov-transfer-framework-ownership.js +++ b/packages/ethereum-contracts/ops-scripts/gov-transfer-framework-ownership.js @@ -5,6 +5,7 @@ const { extractWeb3Options, hasCode, sendGovernanceAction, + builtTruffleContractLoader, } = require("./libs/common"); /** @@ -47,7 +48,13 @@ module.exports = eval(`(${S.toString()})()`)(async function ( const sf = new SuperfluidSDK.Framework({ ...extractWeb3Options(options), version: protocolReleaseVersion, - additionalContracts: ["AccessControl", "Ownable"], + additionalContracts: [ + "AccessControl", + "Ownable", + "IMultiSigWallet", + "ISafe" + ], + contractLoader: builtTruffleContractLoader, }); await sf.initialize(); diff --git a/packages/ethereum-contracts/ops-scripts/gov-upgrade-super-token-logic.js b/packages/ethereum-contracts/ops-scripts/gov-upgrade-super-token-logic.js index 2393da2e01..a40e979ec1 100644 --- a/packages/ethereum-contracts/ops-scripts/gov-upgrade-super-token-logic.js +++ b/packages/ethereum-contracts/ops-scripts/gov-upgrade-super-token-logic.js @@ -92,8 +92,27 @@ module.exports = eval(`(${S.toString()})()`)(async function ( console.log("SuperToken logic to update to:", newSuperTokenLogic); + const pastSuperTokenLogics = (await sf.subgraphQuery(`{ + superTokenLogicCreatedEvents { + name + tokenLogic + } + }`)).superTokenLogicCreatedEvents.map((i) => i.tokenLogic); + + const extraPastSuperTokenLogics = (process.env.EXTRA_PAST_SUPER_TOKEN_LOGICS || "").split(",") + .map((i) => i.trim()) + .filter((i) => i !== ""); + + // workaround for the subgraph query not returning all past canonical super token logics + if (canonicalSuperTokenLogic !== newSuperTokenLogic) { + pastSuperTokenLogics.push(canonicalSuperTokenLogic); + } + + console.log(`Extra past SuperToken logic contracts: ${JSON.stringify(extraPastSuperTokenLogics, null, 2)}`); + pastSuperTokenLogics.push(...extraPastSuperTokenLogics); + let tokensToBeUpgraded = (args.length === 1 && args[0] === "ALL") ? - await getTokensToBeUpgraded(sf, newSuperTokenLogic, skipTokens) : + await getTokensToBeUpgraded(sf, newSuperTokenLogic, skipTokens, pastSuperTokenLogics) : Array.from(args); console.log(`${tokensToBeUpgraded.length} tokens to be upgraded`); @@ -123,24 +142,6 @@ module.exports = eval(`(${S.toString()})()`)(async function ( (gov) => gov.batchUpdateSuperTokenLogic(sf.host.address, batch) await sendGovernanceAction(sf, govAction); - - // When first updating to the version adding native flow NFTs, this needs to be run twice - console.log("checking if 2nd run needed..."); - try { - const beaconST = await sf.contracts.ISuperToken.at(batch[0]); - const cofAddr = await beaconST.CONSTANT_OUTFLOW_NFT(); - if (cofAddr === ZERO_ADDRESS) { - console.log("...running upgrade again for NFT initialization..."); - // the first time it is to get the code to initialize the NFT proxies there - // the second time is to actually execute that code in updateCode - await sendGovernanceAction(sf, govAction); - } else { - console.log("...not needed"); - } - } catch (e) { - console.log(`failed to read constantOutflowNFT addr: ${e.toString()}`); - console.log("this is expected if running against a pre-1.6.0 deployment"); - } } } } @@ -161,25 +162,10 @@ async function getCanonicalSuperTokenLogic(sf) { // - not being a proxy or not having a logic address // - already pointing to the latest logic // - in the skip list (e.g. because not managed by SF gov) -async function getTokensToBeUpgraded(sf, newSuperTokenLogic, skipList) { +async function getTokensToBeUpgraded(sf, newSuperTokenLogic, skipList, pastSuperTokenLogics) { const maxItems = parseInt(process.env.MAX_ITEMS) || 1000; const skipItems = parseInt(process.env.SKIP_ITEMS) || 0; - const pastSuperTokenLogics = (await sf.subgraphQuery(`{ - superTokenLogicCreatedEvents { - name - tokenLogic - } - }`)).superTokenLogicCreatedEvents.map((i) => i.tokenLogic); - - const extraPastSuperTokenLogics = (process.env.EXTRA_PAST_SUPER_TOKEN_LOGICS || "").split(",") - .map((i) => i.trim()) - .filter((i) => i !== ""); - - console.log(`Extra past SuperToken logic contracts: ${JSON.stringify(extraPastSuperTokenLogics, null, 2)}`); - pastSuperTokenLogics.push(...extraPastSuperTokenLogics); - - console.log(`Past SuperToken logic contracts we take into account: ${JSON.stringify(pastSuperTokenLogics, null, 2)}`); const candidateTokens = (await sf.subgraphQuery(`{ diff --git a/packages/ethereum-contracts/ops-scripts/info-print-contract-addresses.js b/packages/ethereum-contracts/ops-scripts/info-print-contract-addresses.js index ec20fd41f8..aca089f4e0 100644 --- a/packages/ethereum-contracts/ops-scripts/info-print-contract-addresses.js +++ b/packages/ethereum-contracts/ops-scripts/info-print-contract-addresses.js @@ -141,32 +141,6 @@ module.exports = eval(`(${S.toString()})()`)(async function ( const superTokenLogicContract = await SuperToken.at(superTokenLogicAddress); - const constantOutflowNFTProxyAddress = - await superTokenLogicContract.CONSTANT_OUTFLOW_NFT(); - - // FlowNFTs are optional, zero address means not deployed - if (constantOutflowNFTProxyAddress !== ZERO_ADDRESS) { - output += `CONSTANT_OUTFLOW_NFT_PROXY=${constantOutflowNFTProxyAddress}\n`; - - const constantOutflowNFTLogicAddress = await ( - await UUPSProxiable.at(constantOutflowNFTProxyAddress) - ).getCodeAddress(); - output += `CONSTANT_OUTFLOW_NFT_LOGIC=${constantOutflowNFTLogicAddress}\n`; - } - - const constantInflowNFTProxyAddress = - await superTokenLogicContract.CONSTANT_INFLOW_NFT(); - - // FlowNFTs are optional, zero address means not deployed - if (constantInflowNFTProxyAddress !== ZERO_ADDRESS) { - output += `CONSTANT_INFLOW_NFT_PROXY=${constantInflowNFTProxyAddress}\n`; - - const constantInflowNFTLogicAddress = await ( - await UUPSProxiable.at(constantInflowNFTProxyAddress) - ).getCodeAddress(); - output += `CONSTANT_INFLOW_NFT_LOGIC=${constantInflowNFTLogicAddress}\n`; - } - // not yet deployed on all networks // TODO: remove try after rollout try { diff --git a/packages/ethereum-contracts/ops-scripts/validate-deployment.ts b/packages/ethereum-contracts/ops-scripts/validate-deployment.ts index 0495f223b7..907c083c27 100644 --- a/packages/ethereum-contracts/ops-scripts/validate-deployment.ts +++ b/packages/ethereum-contracts/ops-scripts/validate-deployment.ts @@ -7,8 +7,6 @@ const gdaAgreementType = ethers.utils.solidityKeccak256(["string"], ["org.superf const superTokenFactoryUuid = ethers.utils.solidityKeccak256(["string"], ["org.superfluid-finance.contracts.SuperTokenFactory.implementation"]); const superTokenUUID = ethers.utils.solidityKeccak256(["string"], ["org.superfluid-finance.contracts.SuperToken.implementation"]); -const constantOutflowNftUuid = ethers.utils.solidityKeccak256(["string"], ["org.superfluid-finance.contracts.ConstantOutflowNFT.implementation"]); -const constantInflowNftUuid = ethers.utils.solidityKeccak256(["string"], ["org.superfluid-finance.contracts.ConstantInflowNFT.implementation"]); const superfluidPoolUUID = ethers.utils.solidityKeccak256(["string"], ["org.superfluid-finance.contracts.SuperfluidPool.implementation"]); function assertLog(condition: boolean, message: string) { @@ -45,7 +43,7 @@ async function main() { console.log("SuperTokenFactory Logic Address:", superTokenFactoryLogicAddress, "\n"); assertLog(superTokenFactoryLogicAddress === await superTokenFactoryContract.getCodeAddress(), "Canonical Factory Logic Address matches Factory Proxy Logic Address"); - + const superTokenLogicAddress = await superTokenFactoryContract.getSuperTokenLogic(); console.log("SuperToken Logic Address:", superTokenLogicAddress, "\n"); @@ -53,37 +51,6 @@ async function main() { const superTokenLiveUUID = await superTokenLogicContract.proxiableUUID(); assertLog(superTokenUUID === superTokenLiveUUID, "SuperTokenFactory Deployed UUID matches live UUID"); - // validate flow NFTs - const constantOutflowNFTCanonicalLogic = await superTokenFactoryContract.CONSTANT_OUTFLOW_NFT_LOGIC(); - console.log("ConstantOutflowNFT Canonical Logic (on Factory):", constantOutflowNFTCanonicalLogic); - const constantInflowNFTCanonicalLogic = await superTokenFactoryContract.CONSTANT_INFLOW_NFT_LOGIC(); - console.log("ConstantInflowNFT Canonical Logic (on Factory):", constantInflowNFTCanonicalLogic, "\n"); - - const constantOutflowNFProxy = await superTokenLogicContract.CONSTANT_OUTFLOW_NFT(); - const cofNFTContract = await ethers.getContractAt("ConstantOutflowNFT", constantOutflowNFProxy); - const cofNFTContractLiveUUID = await cofNFTContract.proxiableUUID(); - assertLog(constantOutflowNftUuid === cofNFTContractLiveUUID, "ConstantOutflowNFT Deployed UUID matches live UUID"); - console.log("ConstantOutflowNFT:", constantOutflowNFProxy); - - const outflowProxyLogic = await cofNFTContract.getCodeAddress(); - console.log("ConstantOutflow NFT Logic (on Proxy):", outflowProxyLogic, "\n"); - assertLog(await cofNFTContract.baseURI() === "https://nft.superfluid.finance/cfa/v2/getmeta", "ConstantOutflowNFT baseURI is equal to https://nft.superfluid.finance/cfa/v2/getmeta"); - - const constantInflowNFProxy = await superTokenLogicContract.CONSTANT_INFLOW_NFT(); - const cifNFTContract = await ethers.getContractAt("ConstantInflowNFT", constantInflowNFProxy); - const cifNFTContractLiveUUID = await cifNFTContract.proxiableUUID(); - assertLog(constantInflowNftUuid === cifNFTContractLiveUUID, "ConstantInflowNFT Deployed UUID matches live UUID"); - console.log("ConstantInflowNFT:", constantInflowNFProxy); - assertLog(await cifNFTContract.baseURI() === "https://nft.superfluid.finance/cfa/v2/getmeta", "ConstantInflowNFT baseURI is equal to https://nft.superfluid.finance/cfa/v2/getmeta"); - - const inflowProxyLogic = await cifNFTContract.getCodeAddress(); - console.log("ConstantInflow NFT Logic (on Proxy):", inflowProxyLogic); - - assertLog(await cofNFTContract.proxiableUUID() !== await cifNFTContract.proxiableUUID(), "NFT proxies have different implementation."); - - assertLog(outflowProxyLogic === constantOutflowNFTCanonicalLogic, "Outflow proxy logic is equal to canonical outflow logic"); - assertLog(inflowProxyLogic === constantInflowNFTCanonicalLogic, "Inflow proxy logic is equal to canonical inflow logic"); - // validate pool NFTs const poolAdminNFTCanonicalLogic = await superTokenFactoryContract.POOL_ADMIN_NFT_LOGIC(); console.log("PoolAdminNFT Canonical Logic (on Factory):", poolAdminNFTCanonicalLogic); @@ -101,7 +68,7 @@ async function main() { console.log("PoolMemberNFT:", poolMemberNFProxy); const pmNFTContract = await ethers.getContractAt("PoolMemberNFT", poolMemberNFProxy); assertLog(await pmNFTContract.baseURI() === "https://nft.superfluid.finance/pool/v2/getmeta", "PoolMemberNFT baseURI is equal to https://nft.superfluid.finance/pool/v2/getmeta"); - + const poolMemberProxyLogic = await pmNFTContract.getCodeAddress(); console.log("ConstantInflow NFT Logic (on Proxy):", poolMemberProxyLogic); @@ -129,11 +96,11 @@ async function main() { // GDA specific validation const superfluidPoolBeaconAddress = await gdaContract.superfluidPoolBeacon(); assertLog(superfluidPoolBeaconAddress !== ethers.constants.AddressZero, "SuperfluidPoolBeaconAddress is not zero address") - + const beaconContract = await ethers.getContractAt("IBeacon", superfluidPoolBeaconAddress); const sfPoolBeaconImplementationAddress = await beaconContract.implementation(); assertLog(sfPoolBeaconImplementationAddress !== ethers.constants.AddressZero, "SFPool beacon implementation is not zero address"); - + const superfluidPoolContract = await ethers.getContractAt("SuperfluidPool", sfPoolBeaconImplementationAddress); const sfPoolLiveUUID = await superfluidPoolContract.proxiableUUID(); diff --git a/packages/ethereum-contracts/package.json b/packages/ethereum-contracts/package.json index 6f38908b9d..f9f8d6ee64 100644 --- a/packages/ethereum-contracts/package.json +++ b/packages/ethereum-contracts/package.json @@ -1,6 +1,6 @@ { "name": "@superfluid-finance/ethereum-contracts", - "version": "1.10.0", + "version": "1.11.0", "description": " Ethereum contracts implementation for the Superfluid Protocol", "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/ethereum-contracts#readme", "repository": { @@ -93,7 +93,7 @@ "@safe-global/safe-service-client": "^2.0.3", "@safe-global/safe-web3-lib": "^1.9.4", "@superfluid-finance/js-sdk": "^0.6.3", - "@superfluid-finance/metadata": "^1.3.1", + "@superfluid-finance/metadata": "^1.4.0", "async": "^3.2.5", "csv-writer": "^1.6.0", "ethers": "^5.7.2", diff --git a/packages/ethereum-contracts/tasks/bundled-abi-contracts-list.json b/packages/ethereum-contracts/tasks/bundled-abi-contracts-list.json index d99757e764..dcb99646a4 100644 --- a/packages/ethereum-contracts/tasks/bundled-abi-contracts-list.json +++ b/packages/ethereum-contracts/tasks/bundled-abi-contracts-list.json @@ -10,9 +10,6 @@ "ISuperToken", "SuperToken", "ISuperTokenFactory", "SuperTokenFactory", "ISETH", "SETHProxy", - "IFlowNFTBase", "FlowNFTBase", - "IConstantInflowNFT", "ConstantInflowNFT", - "IConstantOutflowNFT", "ConstantOutflowNFT", "IPoolAdminNFT", "PoolAdminNFT", "IPoolMemberNFT", "PoolMemberNFT", "ISuperAgreement", diff --git a/packages/ethereum-contracts/tasks/etherscan-verify-framework.sh b/packages/ethereum-contracts/tasks/etherscan-verify-framework.sh index 6631786d4d..63bfcf9cdb 100755 --- a/packages/ethereum-contracts/tasks/etherscan-verify-framework.sh +++ b/packages/ethereum-contracts/tasks/etherscan-verify-framework.sh @@ -102,22 +102,6 @@ if [ -n "$SUPER_TOKEN_FACTORY_PROXY" ]; then try_verify SuperTokenFactory@"${SUPER_TOKEN_FACTORY_PROXY}" --custom-proxy UUPSProxy fi -if [ -n "$CONSTANT_OUTFLOW_NFT_LOGIC" ]; then - try_verify ConstantOutflowNFT@"${CONSTANT_OUTFLOW_NFT_LOGIC}" -fi - -if [ -n "$CONSTANT_INFLOW_NFT_LOGIC" ]; then - try_verify ConstantInflowNFT@"${CONSTANT_INFLOW_NFT_LOGIC}" -fi - -if [ -n "$CONSTANT_OUTFLOW_NFT_PROXY" ]; then - try_verify ConstantOutflowNFT@"${CONSTANT_OUTFLOW_NFT_PROXY}" --custom-proxy UUPSProxy -fi - -if [ -n "$CONSTANT_INFLOW_NFT_PROXY" ]; then - try_verify ConstantInflowNFT@"${CONSTANT_INFLOW_NFT_PROXY}" --custom-proxy UUPSProxy -fi - if [ -n "$POOL_ADMIN_NFT_PROXY" ]; then try_verify PoolAdminNFT@"${POOL_ADMIN_NFT_PROXY}" --custom-proxy UUPSProxy fi diff --git a/packages/ethereum-contracts/test/TestEnvironment.ts b/packages/ethereum-contracts/test/TestEnvironment.ts index 1985ef56c3..2474e042eb 100644 --- a/packages/ethereum-contracts/test/TestEnvironment.ts +++ b/packages/ethereum-contracts/test/TestEnvironment.ts @@ -7,20 +7,12 @@ import _ from "lodash"; import Web3 from "web3"; import { - ConstantInflowNFT, - ConstantInflowNFT__factory, - ConstantOutflowNFT, - ConstantOutflowNFT__factory, ISuperToken, ISuperToken__factory, - PoolAdminNFT, PoolAdminNFT__factory, - PoolMemberNFT, PoolMemberNFT__factory, SuperTokenMock, TestToken, - UUPSProxiableMock__factory, - UUPSProxy, } from "../typechain-types"; import {VerifyOptions} from "./contracts/agreements/Agreement.types"; @@ -585,15 +577,6 @@ export default class TestEnvironment { } deployNFTContracts = async () => { - let constantOutflowNFT; - let constantInflowNFT; - let cofNFTLogicAddress; - let cifNFTLogicAddress; - let paNFTLogicAddress; - let poolAdminNFT; - let pmNFTLogicAddress; - let poolMemberNFT; - const superTokenFactoryLogicAddress = await this.contracts.superfluid.getSuperTokenFactoryLogic(); const superTokenFactory = await ethers.getContractAt( @@ -606,125 +589,23 @@ export default class TestEnvironment { "SuperToken", superTokenLogicAddress ); - const constantOutflowNFTProxyAddress = - await superTokenLogic.CONSTANT_OUTFLOW_NFT(); - const constantInflowNFTProxyAddress = - await superTokenLogic.CONSTANT_INFLOW_NFT(); const poolAdminNFTProxyAddress = await superTokenLogic.POOL_ADMIN_NFT(); const poolMemberNFTProxyAddress = await superTokenLogic.POOL_MEMBER_NFT(); - if ( - constantOutflowNFTProxyAddress === ethers.constants.AddressZero || - constantInflowNFTProxyAddress === ethers.constants.AddressZero || - poolAdminNFTProxyAddress === ethers.constants.AddressZero || - poolMemberNFTProxyAddress === ethers.constants.AddressZero - ) { - const cofProxy = await this.deployContract("UUPSProxy"); - const cifProxy = await this.deployContract("UUPSProxy"); - - const paProxy = await this.deployContract("UUPSProxy"); - const pmProxy = await this.deployContract("UUPSProxy"); - - const constantOutflowNFTLogic = - await this.deployContract( - "ConstantOutflowNFT", - this.contracts.superfluid.address, - cifProxy.address - ); - cofNFTLogicAddress = constantOutflowNFTLogic.address; - - const constantInflowNFTLogic = - await this.deployContract( - "ConstantInflowNFT", - this.contracts.superfluid.address, - cofProxy.address - ); - cifNFTLogicAddress = constantInflowNFTLogic.address; - - const poolAdminNFTLogic = await this.deployContract( - "PoolAdminNFT", - this.contracts.superfluid.address - ); - paNFTLogicAddress = poolAdminNFTLogic.address; - - const poolMemberNFTLogic = await this.deployContract( - "PoolMemberNFT", - this.contracts.superfluid.address - ); - pmNFTLogicAddress = poolMemberNFTLogic.address; - - const signer = await ethers.getSigner(this.aliases.admin); - const proxiableCofLogic = UUPSProxiableMock__factory.connect( - constantOutflowNFTLogic.address, - signer - ); - const proxiableCifLogic = UUPSProxiableMock__factory.connect( - constantInflowNFTLogic.address, - signer - ); - const proxiablePaLogic = UUPSProxiableMock__factory.connect( - poolAdminNFTLogic.address, - signer - ); - const proxiablePmLogic = UUPSProxiableMock__factory.connect( - poolMemberNFTLogic.address, - signer - ); - await proxiableCofLogic.castrate(); - await proxiableCifLogic.castrate(); - await proxiablePaLogic.castrate(); - await proxiablePmLogic.castrate(); - - await cofProxy.initializeProxy(constantOutflowNFTLogic.address); - await cifProxy.initializeProxy(constantInflowNFTLogic.address); - await paProxy.initializeProxy(poolAdminNFTLogic.address); - await pmProxy.initializeProxy(poolMemberNFTLogic.address); - constantOutflowNFT = ConstantOutflowNFT__factory.connect( - cofProxy.address, - signer - ); - constantInflowNFT = ConstantInflowNFT__factory.connect( - cifProxy.address, - signer - ); - poolAdminNFT = PoolAdminNFT__factory.connect( - paProxy.address, - signer - ); - poolMemberNFT = PoolMemberNFT__factory.connect( - pmProxy.address, - signer - ); - } else { - constantOutflowNFT = ConstantOutflowNFT__factory.connect( - constantOutflowNFTProxyAddress, - await ethers.getSigner(this.aliases.admin) - ); - constantInflowNFT = ConstantInflowNFT__factory.connect( - constantInflowNFTProxyAddress, - await ethers.getSigner(this.aliases.admin) - ); - poolAdminNFT = PoolAdminNFT__factory.connect( - poolAdminNFTProxyAddress, - await ethers.getSigner(this.aliases.admin) - ); - poolMemberNFT = PoolMemberNFT__factory.connect( - poolMemberNFTProxyAddress, - await ethers.getSigner(this.aliases.admin) - ); - cofNFTLogicAddress = await constantOutflowNFT.getCodeAddress(); - cifNFTLogicAddress = await constantInflowNFT.getCodeAddress(); - paNFTLogicAddress = await poolAdminNFT.getCodeAddress(); - pmNFTLogicAddress = await poolMemberNFT.getCodeAddress(); - } + const poolAdminNFT = PoolAdminNFT__factory.connect( + poolAdminNFTProxyAddress, + await ethers.getSigner(this.aliases.admin) + ); + const poolMemberNFT = PoolMemberNFT__factory.connect( + poolMemberNFTProxyAddress, + await ethers.getSigner(this.aliases.admin) + ); + const paNFTLogicAddress = await poolAdminNFT.getCodeAddress(); + const pmNFTLogicAddress = await poolMemberNFT.getCodeAddress(); return { - constantOutflowNFTProxy: constantOutflowNFT, - constantInflowNFTProxy: constantInflowNFT, - cofNFTLogicAddress, - cifNFTLogicAddress, poolAdminNFTProxy: poolAdminNFT, poolMemberNFTProxy: poolMemberNFT, paNFTLogicAddress, diff --git a/packages/ethereum-contracts/test/contracts/apps/SuperTokenV1Library.CFA.test.ts b/packages/ethereum-contracts/test/contracts/apps/SuperTokenV1Library.CFA.test.ts index 2d34e6a453..4022e3c1bd 100644 --- a/packages/ethereum-contracts/test/contracts/apps/SuperTokenV1Library.CFA.test.ts +++ b/packages/ethereum-contracts/test/contracts/apps/SuperTokenV1Library.CFA.test.ts @@ -41,18 +41,14 @@ const callbackFunctionIndex = { export const deploySuperTokenAndNFTContractsAndInitialize = async ( t: TestEnvironment ) => { - const { - constantOutflowNFTProxy, - constantInflowNFTProxy, - poolAdminNFTProxy, - poolMemberNFTProxy, - } = await t.deployNFTContracts(); + const {poolAdminNFTProxy, poolMemberNFTProxy} = + await t.deployNFTContracts(); const superToken = await t.deployContract( "SuperTokenMock", t.contracts.superfluid.address, "69", - constantOutflowNFTProxy.address, - constantInflowNFTProxy.address, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, poolAdminNFTProxy.address, poolMemberNFTProxy.address ); diff --git a/packages/ethereum-contracts/test/contracts/superfluid/SuperToken.NonStandard.test.ts b/packages/ethereum-contracts/test/contracts/superfluid/SuperToken.NonStandard.test.ts index bbbeb74be4..1c7ce0b917 100644 --- a/packages/ethereum-contracts/test/contracts/superfluid/SuperToken.NonStandard.test.ts +++ b/packages/ethereum-contracts/test/contracts/superfluid/SuperToken.NonStandard.test.ts @@ -67,18 +67,14 @@ describe("SuperToken's Non Standard Functions", function () { describe("#1 upgradability", () => { it("#1.1 storage layout", async () => { - const { - constantOutflowNFTProxy, - constantInflowNFTProxy, - poolAdminNFTProxy, - poolMemberNFTProxy, - } = await t.deployNFTContracts(); + const {poolAdminNFTProxy, poolMemberNFTProxy} = + await t.deployNFTContracts(); const superTokenLogic = await t.deployContract( "SuperTokenStorageLayoutTester", superfluid.address, - constantOutflowNFTProxy.address, - constantInflowNFTProxy.address, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, poolAdminNFTProxy.address, poolMemberNFTProxy.address ); @@ -710,18 +706,14 @@ describe("SuperToken's Non Standard Functions", function () { }); it("#3.1 Custom token storage should not overlap with super token", async () => { - const { - constantOutflowNFTProxy, - constantInflowNFTProxy, - poolAdminNFTProxy, - poolMemberNFTProxy, - } = await t.deployNFTContracts(); + const {poolAdminNFTProxy, poolMemberNFTProxy} = + await t.deployNFTContracts(); const superTokenLogic = await t.deployContract( "SuperTokenStorageLayoutTester", superfluid.address, - constantOutflowNFTProxy.address, - constantInflowNFTProxy.address, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, poolAdminNFTProxy.address, poolMemberNFTProxy.address ); diff --git a/packages/ethereum-contracts/test/contracts/superfluid/SuperTokenFactory.test.ts b/packages/ethereum-contracts/test/contracts/superfluid/SuperTokenFactory.test.ts index 0e19b464c4..9e708aee40 100644 --- a/packages/ethereum-contracts/test/contracts/superfluid/SuperTokenFactory.test.ts +++ b/packages/ethereum-contracts/test/contracts/superfluid/SuperTokenFactory.test.ts @@ -66,10 +66,6 @@ describe("SuperTokenFactory Contract", function () { describe("#1 upgradability", () => { it("#1.1 storage layout", async () => { const { - constantOutflowNFTProxy, - constantInflowNFTProxy, - cofNFTLogicAddress, - cifNFTLogicAddress, poolAdminNFTProxy, poolMemberNFTProxy, paNFTLogicAddress, @@ -79,8 +75,8 @@ describe("SuperTokenFactory Contract", function () { "SuperTokenMock", superfluid.address, "0", - constantOutflowNFTProxy.address, - constantInflowNFTProxy.address, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, poolAdminNFTProxy.address, poolMemberNFTProxy.address ); @@ -89,8 +85,8 @@ describe("SuperTokenFactory Contract", function () { "SuperTokenFactoryStorageLayoutTester", superfluid.address, superTokenLogic.address, - cofNFTLogicAddress, - cifNFTLogicAddress, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, paNFTLogicAddress, pmNFTLogicAddress ); @@ -153,10 +149,6 @@ describe("SuperTokenFactory Contract", function () { context("#2.a Mock factory", () => { async function updateSuperTokenFactory() { const { - constantOutflowNFTProxy, - constantInflowNFTProxy, - cofNFTLogicAddress, - cifNFTLogicAddress, poolAdminNFTProxy, poolMemberNFTProxy, paNFTLogicAddress, @@ -166,8 +158,8 @@ describe("SuperTokenFactory Contract", function () { "SuperTokenMock", superfluid.address, 42, - constantOutflowNFTProxy.address, - constantInflowNFTProxy.address, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, poolAdminNFTProxy.address, poolMemberNFTProxy.address ); @@ -176,8 +168,8 @@ describe("SuperTokenFactory Contract", function () { "SuperTokenFactoryMock42", superfluid.address, superTokenLogic.address, - cofNFTLogicAddress, - cifNFTLogicAddress, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, paNFTLogicAddress, pmNFTLogicAddress ); @@ -287,18 +279,14 @@ describe("SuperTokenFactory Contract", function () { await updateSuperTokenFactory(); assert.equal((await superToken1.waterMark()).toString(), "0"); - const { - constantOutflowNFTProxy, - constantInflowNFTProxy, - poolAdminNFTProxy, - poolMemberNFTProxy, - } = await t.deployNFTContracts(); + const {poolAdminNFTProxy, poolMemberNFTProxy} = + await t.deployNFTContracts(); const superTokenLogic = await t.deployContract( "SuperTokenMock", superfluid.address, 69, - constantOutflowNFTProxy.address, - constantInflowNFTProxy.address, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, poolAdminNFTProxy.address, poolMemberNFTProxy.address ); @@ -317,10 +305,6 @@ describe("SuperTokenFactory Contract", function () { context("#2.b Production Factory", () => { it("#2.b.1 use production factory to create different super tokens", async () => { const { - constantOutflowNFTProxy, - constantInflowNFTProxy, - cofNFTLogicAddress, - cifNFTLogicAddress, poolAdminNFTProxy, poolMemberNFTProxy, paNFTLogicAddress, @@ -329,8 +313,8 @@ describe("SuperTokenFactory Contract", function () { const superTokenLogic = await t.deployContract( "SuperToken", superfluid.address, - constantOutflowNFTProxy.address, - constantInflowNFTProxy.address, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, poolAdminNFTProxy.address, poolMemberNFTProxy.address ); @@ -339,8 +323,8 @@ describe("SuperTokenFactory Contract", function () { "SuperTokenFactoryMock42", superfluid.address, superTokenLogic.address, - cofNFTLogicAddress, - cifNFTLogicAddress, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, paNFTLogicAddress, pmNFTLogicAddress ); diff --git a/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts b/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts index 2573dd827e..7556c16e02 100644 --- a/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts +++ b/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts @@ -407,10 +407,6 @@ describe("Superfluid Host Contract", function () { it("#3.2 update super token factory", async () => { const factory = await superfluid.getSuperTokenFactory(); const { - constantOutflowNFTProxy, - constantInflowNFTProxy, - cofNFTLogicAddress, - cifNFTLogicAddress, poolAdminNFTProxy, poolMemberNFTProxy, paNFTLogicAddress, @@ -419,8 +415,8 @@ describe("Superfluid Host Contract", function () { const superTokenLogic = await t.deployContract( "SuperToken", superfluid.address, - constantOutflowNFTProxy.address, - constantInflowNFTProxy.address, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, poolAdminNFTProxy.address, poolMemberNFTProxy.address ); @@ -429,8 +425,8 @@ describe("Superfluid Host Contract", function () { const factory2Logic = await factory2LogicFactory.deploy( superfluid.address, superTokenLogic.address, - cofNFTLogicAddress, - cifNFTLogicAddress, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, paNFTLogicAddress, pmNFTLogicAddress ); @@ -456,10 +452,6 @@ describe("Superfluid Host Contract", function () { it("#3.3 update super token factory double check if new code is called", async () => { const factory = await superfluid.getSuperTokenFactory(); const { - constantOutflowNFTProxy, - constantInflowNFTProxy, - cofNFTLogicAddress, - cifNFTLogicAddress, poolAdminNFTProxy, poolMemberNFTProxy, paNFTLogicAddress, @@ -468,8 +460,8 @@ describe("Superfluid Host Contract", function () { const superTokenLogic = await t.deployContract( "SuperToken", superfluid.address, - constantOutflowNFTProxy.address, - constantInflowNFTProxy.address, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, poolAdminNFTProxy.address, poolMemberNFTProxy.address ); @@ -479,8 +471,8 @@ describe("Superfluid Host Contract", function () { const factory2Logic = await factory2LogicFactory.deploy( superfluid.address, superTokenLogic.address, - cofNFTLogicAddress, - cifNFTLogicAddress, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, paNFTLogicAddress, pmNFTLogicAddress ); @@ -2659,10 +2651,6 @@ describe("Superfluid Host Contract", function () { await superfluid.getSuperTokenFactoryLogic() ); const { - constantOutflowNFTProxy, - constantInflowNFTProxy, - cofNFTLogicAddress, - cifNFTLogicAddress, poolAdminNFTProxy, poolMemberNFTProxy, paNFTLogicAddress, @@ -2671,8 +2659,8 @@ describe("Superfluid Host Contract", function () { const superTokenLogic = await t.deployContract( "SuperToken", superfluid.address, - constantOutflowNFTProxy.address, - constantInflowNFTProxy.address, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, poolAdminNFTProxy.address, poolMemberNFTProxy.address ); @@ -2680,8 +2668,8 @@ describe("Superfluid Host Contract", function () { "SuperTokenFactory", superfluid.address, superTokenLogic.address, - cofNFTLogicAddress, - cifNFTLogicAddress, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, paNFTLogicAddress, pmNFTLogicAddress ); diff --git a/packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol b/packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol index b626f85a62..7412fe2234 100644 --- a/packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol +++ b/packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol @@ -9,7 +9,6 @@ import { ERC1820RegistryCompiled } from "../../contracts/libs/ERC1820RegistryCom import { SuperfluidFrameworkDeployer } from "../../contracts/utils/SuperfluidFrameworkDeployer.sol"; import { Superfluid } from "../../contracts/superfluid/Superfluid.sol"; import { ISuperfluidPool, SuperfluidPool } from "../../contracts/agreements/gdav1/SuperfluidPool.sol"; -import { IFlowNFTBase } from "../../contracts/interfaces/superfluid/IFlowNFTBase.sol"; import { IGeneralDistributionAgreementV1, PoolConfig @@ -17,14 +16,13 @@ import { import { IPoolNFTBase } from "../../contracts/interfaces/agreements/gdav1/IPoolNFTBase.sol"; import { IPoolAdminNFT } from "../../contracts/interfaces/agreements/gdav1/IPoolAdminNFT.sol"; import { IPoolMemberNFT } from "../../contracts/interfaces/agreements/gdav1/IPoolMemberNFT.sol"; -import { IConstantOutflowNFT } from "../../contracts/interfaces/superfluid/IConstantOutflowNFT.sol"; -import { IConstantInflowNFT } from "../../contracts/interfaces/superfluid/IConstantInflowNFT.sol"; import { ISuperfluidToken } from "../../contracts/interfaces/superfluid/ISuperfluidToken.sol"; import { ISETH } from "../../contracts/interfaces/tokens/ISETH.sol"; import { UUPSProxy } from "../../contracts/upgradability/UUPSProxy.sol"; import { ConstantFlowAgreementV1 } from "../../contracts/agreements/ConstantFlowAgreementV1.sol"; import { SuperTokenV1Library } from "../../contracts/apps/SuperTokenV1Library.sol"; -import { IERC20, ISuperToken, SuperToken } from "../../contracts/superfluid/SuperToken.sol"; +import { IERC20, ISuperToken, SuperToken, IConstantOutflowNFT, IConstantInflowNFT } + from "../../contracts/superfluid/SuperToken.sol"; import { SuperfluidLoader } from "../../contracts/utils/SuperfluidLoader.sol"; import { TestResolver } from "../../contracts/utils/TestResolver.sol"; import { TestToken } from "../../contracts/utils/TestToken.sol"; @@ -180,8 +178,6 @@ contract FoundrySuperfluidTester is Test { // - Host // - CFA // - IDA - // - ConstantOutflowNFT logic - // - ConstantInflowNFT logic // - SuperToken logic // - SuperTokenFactory // - Resolver @@ -692,8 +688,8 @@ contract FoundrySuperfluidTester is Test { ) internal returns (SuperToken localSuperToken) { localSuperToken = new SuperToken( sf.host, - previousSuperToken.CONSTANT_OUTFLOW_NFT(), - previousSuperToken.CONSTANT_INFLOW_NFT(), + IConstantOutflowNFT(address(0)), + IConstantInflowNFT(address(0)), previousSuperToken.POOL_ADMIN_NFT(), previousSuperToken.POOL_MEMBER_NFT() ); @@ -742,8 +738,6 @@ contract FoundrySuperfluidTester is Test { _assertAccountFlowInfo(receiver, flowRateDelta, receiverFlowInfoBefore, false); } - _assertFlowNftState(superToken_, sender, receiver, flowRate); - // Assert RTB for all users _assertRealTimeBalances(superToken_); _assertGlobalInvariants(); @@ -1946,10 +1940,6 @@ contract FoundrySuperfluidTester is Test { ); } - // Assert Outflow NFT is minted to distributor - // Assert Inflow NFT is minted to pool - _assertFlowNftState(superToken_, from, address(pool_), requestedFlowRate); - { if (members.length == 0) return; uint128 poolTotalUnitsAfter = pool_.getTotalUnits(); @@ -2295,35 +2285,4 @@ contract FoundrySuperfluidTester is Test { poolMemberNFT.ownerOf(tokenId); } } - - function _assertFlowNftState( - ISuperfluidToken _superToken, - address _senderOrDistributor, - address _receiverOrPool, - int96 _newFlowRate - ) internal { - IConstantOutflowNFT constantOutflowNFT = SuperToken(address(_superToken)).CONSTANT_OUTFLOW_NFT(); - IConstantInflowNFT constantInflowNFT = SuperToken(address(_superToken)).CONSTANT_INFLOW_NFT(); - uint256 tokenId = constantOutflowNFT.getTokenId(address(_superToken), address(_senderOrDistributor), address(_receiverOrPool)); - if (_newFlowRate > 0) { - // positive flowrate: NFT exists and is owned by sender/distributor and receiver/pool - assertEq( - constantOutflowNFT.ownerOf(tokenId), - _senderOrDistributor, - "_assertFlowNftState: sender/distributor doesn't own outflow NFT" - ); - assertEq( - constantInflowNFT.ownerOf(tokenId), - address(_receiverOrPool), - "_assertFlowNftState: receiver/pool doesn't own inflow NFT" - ); - } else { - // zero flowrate: NFT doesn't exist (never minted or already burned) - vm.expectRevert(IFlowNFTBase.CFA_NFT_INVALID_TOKEN_ID.selector); - constantOutflowNFT.ownerOf(tokenId); - - vm.expectRevert(IFlowNFTBase.CFA_NFT_INVALID_TOKEN_ID.selector); - constantInflowNFT.ownerOf(tokenId); - } - } } diff --git a/packages/ethereum-contracts/test/foundry/SuperfluidFrameworkDeployer.t.sol b/packages/ethereum-contracts/test/foundry/SuperfluidFrameworkDeployer.t.sol index c8b62eeb5a..250b0367f8 100644 --- a/packages/ethereum-contracts/test/foundry/SuperfluidFrameworkDeployer.t.sol +++ b/packages/ethereum-contracts/test/foundry/SuperfluidFrameworkDeployer.t.sol @@ -16,8 +16,6 @@ contract SuperfluidFrameworkDeployerTest is FoundrySuperfluidTester { assertTrue(address(sf.gda) != address(0), "SFDeployer: gda not deployed"); assertTrue(address(sf.superTokenFactory) != address(0), "SFDeployer: superTokenFactory not deployed"); assertTrue(address(sf.superTokenLogic) != address(0), "SFDeployer: superTokenLogic not deployed"); - assertTrue(address(sf.constantOutflowNFT) != address(0), "SFDeployer: constantOutflowNFT not deployed"); - assertTrue(address(sf.constantInflowNFT) != address(0), "SFDeployer: constantInflowNFT not deployed"); assertTrue(address(sf.resolver) != address(0), "SFDeployer: resolver not deployed"); assertTrue(address(sf.superfluidLoader) != address(0), "SFDeployer: superfluidLoader not deployed"); assertTrue(address(sf.cfaV1Forwarder) != address(0), "SFDeployer: cfaV1Forwarder not deployed"); diff --git a/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.t.sol b/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.t.sol index 4221a66583..556f96955f 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.t.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.t.sol @@ -26,30 +26,6 @@ contract ConstantFlowAgreementV1IntegrationTest is FoundrySuperfluidTester { _warpAndAssertAll(superToken); } - // there should be no gas limit which causes the NFT hook to fail with the tx succeeding - function testNFTHookOutOfGasRevertsWholeTx(uint256 gasLimit) public { - gasLimit = bound(gasLimit, 350000, 550000); - - console.log("trying createFlow..."); - int96 fr = 1; - try this.__external_createFlow{gas: gasLimit}(superToken, alice, bob, fr) { - // if the tx does not revert, the NFT hook isn't allowed to revert with outofgas, - // which we can check by verifying the FlowNFT state - _assertFlowNftState(superToken, alice, bob, fr); - } catch { } // revert of the tx is ok - - console.log("trying updateFlow..."); - fr = 2; - try this.__external_updateFlow{gas: gasLimit}(superToken, alice, bob, fr) { - _assertFlowNftState(superToken, alice, bob, fr); - } catch { } - - console.log("trying deleteFlow..."); - try this.__external_deleteFlow{gas: gasLimit}(superToken, alice, bob) { - _assertFlowNftState(superToken, alice, bob, 0); - } catch { } - } - // helper functions wrapping internal calls into external calls (needed for try/catch) function __external_createFlow(ISuperToken superToken, address sender, address receiver, int96 fr) external { diff --git a/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol b/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol index c7e96329bb..122414dd95 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol @@ -17,9 +17,6 @@ import { ISuperfluidPool, SuperfluidPool } from "../../../../contracts/agreement import { IPoolNFTBase } from "../../../../contracts/interfaces/agreements/gdav1/IPoolNFTBase.sol"; import { IPoolAdminNFT } from "../../../../contracts/interfaces/agreements/gdav1/IPoolAdminNFT.sol"; import { IPoolMemberNFT } from "../../../../contracts/interfaces/agreements/gdav1/IPoolMemberNFT.sol"; -import { IFlowNFTBase } from "../../../../contracts/interfaces/superfluid/IFlowNFTBase.sol"; -import { IConstantOutflowNFT } from "../../../../contracts/interfaces/superfluid/IConstantOutflowNFT.sol"; -import { IConstantInflowNFT } from "../../../../contracts/interfaces/superfluid/IConstantInflowNFT.sol"; import { SuperfluidPoolStorageLayoutMock } from "./SuperfluidPoolUpgradabilityMock.t.sol"; /// @title GeneralDistributionAgreementV1 Integration Tests diff --git a/packages/ethereum-contracts/test/foundry/superfluid/CFAv1NFTMock.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/CFAv1NFTMock.t.sol deleted file mode 100644 index 439d6e881c..0000000000 --- a/packages/ethereum-contracts/test/foundry/superfluid/CFAv1NFTMock.t.sol +++ /dev/null @@ -1,124 +0,0 @@ -// SPDX-License-Identifier: AGPLv3 -// solhint-disable reason-string -// solhint-disable not-rely-on-time -pragma solidity ^0.8.23; - -import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; - -import { - IConstantFlowAgreementV1, - IGeneralDistributionAgreementV1, - ISuperfluid, - IConstantInflowNFT, - IConstantOutflowNFT -} from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; -import { ConstantOutflowNFT } from "../../../contracts/superfluid/ConstantOutflowNFT.sol"; -import { ConstantInflowNFT } from "../../../contracts/superfluid/ConstantInflowNFT.sol"; -import { FlowNFTBase } from "../../../contracts/superfluid/FlowNFTBase.sol"; - -/// @title FlowNFTBaseMock -/// @author Superfluid -/// @dev A mock contract for testing the functionality on FlowNFTBase -contract FlowNFTBaseMock is FlowNFTBase { - using Strings for uint256; - - mapping(uint256 => FlowNFTData) internal _flowDataByTokenId; - - constructor(ISuperfluid host, IConstantFlowAgreementV1 cfaV1, IGeneralDistributionAgreementV1 gdaV1) - FlowNFTBase(host, cfaV1, gdaV1) - { } - - function proxiableUUID() public pure override returns (bytes32) { - return keccak256("org.superfluid-finance.contracts.FlowNFTBaseMock.implementation"); - } - - /// @dev The owner of here is always the flow sender - function _ownerOf(uint256 tokenId) internal view override returns (address) { - return _flowDataByTokenId[tokenId].flowSender; - } - - /// @dev a mock mint function that sets the FlowNFTData - function mockMint(address _superToken, address _flowSender, address _flowReceiver) public { - uint256 tokenId = _getTokenId(_superToken, _flowSender, _flowReceiver); - _flowDataByTokenId[tokenId] = FlowNFTData({ - flowSender: _flowSender, - flowStartDate: uint32(block.timestamp), - flowReceiver: _flowReceiver, - superToken: _superToken - }); - } - - function _transfer( - address, //from, - address, //to, - uint256 //tokenId - ) internal pure override { - revert CFA_NFT_TRANSFER_IS_NOT_ALLOWED(); - } - - function flowDataByTokenId(uint256 tokenId) public view override returns (FlowNFTData memory flowData) { - return _flowDataByTokenId[tokenId]; - } - - function tokenURI(uint256 tokenId) external pure override returns (string memory) { - return string(abi.encodePacked("tokenId=", tokenId.toString())); - } -} - -contract ConstantOutflowNFTMock is ConstantOutflowNFT { - constructor( - ISuperfluid host, - IConstantFlowAgreementV1 cfaV1, - IGeneralDistributionAgreementV1 gdaV1, - IConstantInflowNFT constantInflowNFT - ) ConstantOutflowNFT(host, cfaV1, gdaV1, constantInflowNFT) { } - - /// @dev a mock mint function that exposes the internal _mint function - function mockMint(address _superToken, address _to, address _flowReceiver, uint256 _newTokenId) public { - _mint(_superToken, _to, _flowReceiver, _newTokenId); - } - - /// @dev a mock burn function that exposes the internal _burn function - function mockBurn(uint256 _tokenId) public { - _burn(_tokenId); - } - - /// @dev this ownerOf doesn't revert if _tokenId doesn't exist - function mockOwnerOf(uint256 _tokenId) public view returns (address) { - return _ownerOf(_tokenId); - } - - /// @dev This exposes the _tokenApprovals storage without the requireMinted call - function mockGetApproved(uint256 _tokenId) public view returns (address) { - return _tokenApprovals[_tokenId]; - } -} - -contract ConstantInflowNFTMock is ConstantInflowNFT { - constructor( - ISuperfluid host, - IConstantFlowAgreementV1 cfaV1, - IGeneralDistributionAgreementV1 gdaV1, - IConstantOutflowNFT constantOutflowNFT - ) ConstantInflowNFT(host, cfaV1, gdaV1, constantOutflowNFT) { } - - /// @dev a mock mint function to emit the mint Transfer event - function mockMint(address _to, uint256 _newTokenId) public { - _mint(_to, _newTokenId); - } - - /// @dev a mock burn function to emit the burn Transfer event - function mockBurn(uint256 _tokenId) public { - _burn(_tokenId); - } - - // @dev this ownerOf doesn't revert if _tokenId doesn't exist - function mockOwnerOf(uint256 _tokenId) public view returns (address) { - return _ownerOf(_tokenId); - } - - /// @dev This exposes the _tokenApprovals storage without the requireMinted call - function mockGetApproved(uint256 _tokenId) public view returns (address) { - return _tokenApprovals[_tokenId]; - } -} diff --git a/packages/ethereum-contracts/test/foundry/superfluid/CFAv1NFTUpgradabilityMock.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/CFAv1NFTUpgradabilityMock.t.sol deleted file mode 100644 index 2d0ca77cd5..0000000000 --- a/packages/ethereum-contracts/test/foundry/superfluid/CFAv1NFTUpgradabilityMock.t.sol +++ /dev/null @@ -1,198 +0,0 @@ -// SPDX-License-Identifier: AGPLv3 -pragma solidity ^0.8.23; - -import { IConstantFlowAgreementV1, IGeneralDistributionAgreementV1, ISuperfluid } - from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; -import { ConstantInflowNFT, IConstantInflowNFT } from "../../../contracts/superfluid/ConstantInflowNFT.sol"; -import { ConstantOutflowNFT, IConstantOutflowNFT } from "../../../contracts/superfluid/ConstantOutflowNFT.sol"; -import { FlowNFTBase } from "../../../contracts/superfluid/FlowNFTBase.sol"; -import { StorageLayoutTestBase } from "../StorageLayoutTestBase.t.sol"; - -/*////////////////////////////////////////////////////////////////////////// - FlowNFTBase Mocks -//////////////////////////////////////////////////////////////////////////*/ - -/// @title FlowNFTBaseStorageLayoutMock -/// @author Superfluid -/// @notice A mock FlowNFTBase contract for testing storage layout. -/// @dev This contract *MUST* have the same storage layout as FlowNFTBase.sol -contract FlowNFTBaseStorageLayoutMock is FlowNFTBase, StorageLayoutTestBase { - - constructor(ISuperfluid host, IConstantFlowAgreementV1 cfaV1, IGeneralDistributionAgreementV1 gdaV1) - FlowNFTBase(host, cfaV1, gdaV1) - { } - - /// @notice Validates storage layout - /// @dev This function is used by all the FlowNFTBase mock contracts to validate the layout - function validateStorageLayout() public virtual { - uint256 slot; - uint256 offset; // in bytes - - // slot 0 taken is occupied by these variables: - // Initializable._initialized (uint8) 1byte - // Initializable._initializing (bool) 1byte - - assembly { slot := _name.slot offset := _name.offset } - if (slot != 1 || offset != 0) revert STORAGE_LOCATION_CHANGED("_name"); - - assembly { slot := _symbol.slot offset := _symbol.offset } - if (slot != 2 || offset != 0) revert STORAGE_LOCATION_CHANGED("_symbol"); - - assembly { slot := _tokenApprovals.slot offset := _tokenApprovals.offset } - if (slot != 3 || offset != 0) revert STORAGE_LOCATION_CHANGED("_tokenApprovals"); - - assembly { slot := _operatorApprovals.slot offset := _operatorApprovals.offset } - if (slot != 4 || offset != 0) revert STORAGE_LOCATION_CHANGED("_operatorApprovals"); - - assembly { slot := _reserve5.slot offset := _reserve5.offset } - if (slot != 5 || offset != 0) revert STORAGE_LOCATION_CHANGED("_reserve5"); - - assembly { slot := _reserve21.slot offset := _reserve21.offset } - if (slot != 21 || offset != 0) revert STORAGE_LOCATION_CHANGED("_reserve21"); - } - - // Dummy implementations for abstract functions - function flowDataByTokenId( - uint256 //tokenId - ) public pure override returns (FlowNFTData memory flowData) { - return flowData; - } - // Dummy implementations for abstract functions - function _ownerOf( - uint256 //tokenId - ) internal pure override returns (address) { - return address(0); - } - function _transfer( - address, //from, - address, //to, - uint256 //tokenId - ) internal pure override { - return; - } - function _safeTransfer( - address from, - address to, - uint256 tokenId, - bytes memory // data - ) internal pure override { - _transfer(from, to, tokenId); - } - function proxiableUUID() public pure override returns (bytes32) { - return keccak256(""); - } - - function tokenURI(uint256 /* tokenId */) external pure override returns (string memory) { - return ""; - } -} - - -/// @title ConstantInflowNFTStorageLayoutMock -/// @author Superfluid -/// @notice A mock ConstantOutflowNFT contract for testing storage layout. -/// @dev This contract *MUST* have the same storage layout as ConstantOutflowNFT.sol -contract ConstantInflowNFTStorageLayoutMock is ConstantInflowNFT, StorageLayoutTestBase { - - constructor( - ISuperfluid host, - IConstantFlowAgreementV1 cfaV1, - IGeneralDistributionAgreementV1 gdaV1, - IConstantOutflowNFT constantOutflowNFT - ) ConstantInflowNFT(host, cfaV1, gdaV1, constantOutflowNFT) { } - - /// @notice Validates storage layout - /// @dev This function is used to validate storage layout of ConstantInflowNFT - function validateStorageLayout() public virtual { - uint256 slot; - uint256 offset; // in bytes - - // slot 0 taken is occupied by these variables: - // Initializable._initialized (uint8) 1byte - // Initializable._initializing (bool) 1byte - - assembly { slot := _name.slot offset := _name.offset } - if (slot != 1 || offset != 0) revert STORAGE_LOCATION_CHANGED("_name"); - - assembly { slot := _symbol.slot offset := _symbol.offset } - if (slot != 2 || offset != 0) revert STORAGE_LOCATION_CHANGED("_symbol"); - - assembly { slot := _tokenApprovals.slot offset := _tokenApprovals.offset } - if (slot != 3 || offset != 0) revert STORAGE_LOCATION_CHANGED("_tokenApprovals"); - - assembly { slot := _operatorApprovals.slot offset := _operatorApprovals.offset } - if (slot != 4 || offset != 0) revert STORAGE_LOCATION_CHANGED("_operatorApprovals"); - - assembly { slot := _reserve5.slot offset := _reserve5.offset } - if (slot != 5 || offset != 0) revert STORAGE_LOCATION_CHANGED("_reserve5"); - - assembly { slot := _reserve21.slot offset := _reserve21.offset } - if (slot != 21 || offset != 0) revert STORAGE_LOCATION_CHANGED("_reserve21"); - } - - // Dummy implementations for abstract functions - function _safeTransfer( - address from, - address to, - uint256 tokenId, - bytes memory // data - ) internal override pure { - _transfer(from, to, tokenId); - } -} - -/// @title ConstantOutflowNFTStorageLayoutMock -/// @author Superfluid -/// @notice A mock ConstantOutflowNFT contract for testing storage layout. -/// @dev This contract *MUST* have the same storage layout as ConstantOutflowNFT.sol -contract ConstantOutflowNFTStorageLayoutMock is ConstantOutflowNFT, StorageLayoutTestBase { - - constructor( - ISuperfluid host, - IConstantFlowAgreementV1 cfaV1, - IGeneralDistributionAgreementV1 gdaV1, - IConstantInflowNFT constantInflowNFT - ) ConstantOutflowNFT(host, cfaV1, gdaV1, constantInflowNFT) { } - - /// @notice Validates storage layout - /// @dev This function is used to validate storage layout of ConstantOutflowNFT - function validateStorageLayout() public virtual { - uint256 slot; - uint256 offset; // in bytes - - // slot 0 taken is occupied by these variables: - // Initializable._initialized (uint8) 1byte - // Initializable._initializing (bool) 1byte - - assembly { slot := _name.slot offset := _name.offset } - if (slot != 1 || offset != 0) revert STORAGE_LOCATION_CHANGED("_name"); - - assembly { slot := _symbol.slot offset := _symbol.offset } - if (slot != 2 || offset != 0) revert STORAGE_LOCATION_CHANGED("_symbol"); - - assembly { slot := _tokenApprovals.slot offset := _tokenApprovals.offset } - if (slot != 3 || offset != 0) revert STORAGE_LOCATION_CHANGED("_tokenApprovals"); - - assembly { slot := _operatorApprovals.slot offset := _operatorApprovals.offset } - if (slot != 4 || offset != 0) revert STORAGE_LOCATION_CHANGED("_operatorApprovals"); - - assembly { slot := _reserve5.slot offset := _reserve5.offset } - if (slot != 5 || offset != 0) revert STORAGE_LOCATION_CHANGED("_reserve5"); - - assembly { slot := _reserve21.slot offset := _reserve21.offset } - if (slot != 21 || offset != 0) revert STORAGE_LOCATION_CHANGED("_reserve21"); - - assembly { slot := _flowDataByTokenId.slot offset := _flowDataByTokenId.offset } - if (slot != 22 || offset != 0) revert STORAGE_LOCATION_CHANGED("_flowDataByTokenId"); - } - - // Dummy implementations for abstract functions - function _safeTransfer( - address from, - address to, - uint256 tokenId, - bytes memory // data - ) internal pure override { - _transfer(from, to, tokenId); - } -} diff --git a/packages/ethereum-contracts/test/foundry/superfluid/ConstantInflowNFT.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/ConstantInflowNFT.t.sol deleted file mode 100644 index ee26eade89..0000000000 --- a/packages/ethereum-contracts/test/foundry/superfluid/ConstantInflowNFT.t.sol +++ /dev/null @@ -1,141 +0,0 @@ -// SPDX-License-Identifier: AGPLv3 -pragma solidity ^0.8.23; - -import { IERC165, IERC721, IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; -import { ConstantOutflowNFT } from "../../../contracts/superfluid/ConstantOutflowNFT.sol"; -import { IFlowNFTBase } from "../../../contracts/interfaces/superfluid/IFlowNFTBase.sol"; -import { FlowNFTBase, ConstantInflowNFT, IConstantInflowNFT } from "../../../contracts/superfluid/ConstantInflowNFT.sol"; -import { FlowNFTBaseTest } from "./FlowNFTBase.t.sol"; - -contract ConstantInflowNFTTest is FlowNFTBaseTest { - /*////////////////////////////////////////////////////////////////////////// - Revert Tests - //////////////////////////////////////////////////////////////////////////*/ - - function testRevertIfMintIsNotCalledByOutflowNFT(address caller) public { - _assumeCallerIsNotOtherAddress(caller, address(constantOutflowNFT)); - vm.expectRevert(IConstantInflowNFT.CIF_NFT_ONLY_CONSTANT_OUTFLOW.selector); - constantInflowNFT.mint(address(0), 69); - } - - function testRevertIfBurnIsNotCalledByOutflowNFT(address caller) public { - _assumeCallerIsNotOtherAddress(caller, address(constantOutflowNFT)); - vm.expectRevert(IConstantInflowNFT.CIF_NFT_ONLY_CONSTANT_OUTFLOW.selector); - constantInflowNFT.burn(69); - } - - function testRevertIfYouTryToTransferInflowNFT(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - constantOutflowNFT.mockMint(address(superTokenMock), _flowSender, _flowReceiver, nftId); - - vm.startPrank(_flowReceiver); - vm.expectRevert(IFlowNFTBase.CFA_NFT_TRANSFER_IS_NOT_ALLOWED.selector); - constantInflowNFT.transferFrom(_flowReceiver, _flowSender, nftId); - vm.stopPrank(); - } - - /*////////////////////////////////////////////////////////////////////////// - Passing Tests - //////////////////////////////////////////////////////////////////////////*/ - - function testProxiableUUIDIsExpectedValue() public view { - assertEq( - constantInflowNFT.proxiableUUID(), - keccak256("org.superfluid-finance.contracts.ConstantInflowNFT.implementation") - ); - } - - function testConstantInflowNFTIsProperlyInitialized() public view { - assertEq(constantInflowNFT.name(), INFLOW_NFT_NAME_TEMPLATE); - assertEq(constantInflowNFT.symbol(), INFLOW_NFT_SYMBOL_TEMPLATE); - } - - function testFlowDataByTokenIdMint(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - - constantOutflowNFT.mockMint(address(superTokenMock), _flowSender, _flowReceiver, nftId); - _assertNFTFlowDataStateIsExpected( - nftId, address(superTokenMock), _flowSender, uint32(block.timestamp), _flowReceiver - ); - - IFlowNFTBase.FlowNFTData memory flowData = constantInflowNFT.flowDataByTokenId(nftId); - assertEq(flowData.flowSender, _flowSender); - assertEq(flowData.flowReceiver, _flowReceiver); - } - - function testInternalMintToken(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - - _assertEventTransfer(address(constantInflowNFT), address(0), _flowReceiver, nftId); - - constantInflowNFT.mockMint(_flowReceiver, nftId); - - _assertNFTFlowDataStateIsEmpty(nftId); - } - - function testInternalBurnToken(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - constantOutflowNFT.mockMint(address(superTokenMock), _flowSender, _flowReceiver, nftId); - _assertNFTFlowDataStateIsExpected( - nftId, address(superTokenMock), _flowSender, uint32(block.timestamp), _flowReceiver - ); - - _assertEventTransfer(address(constantInflowNFT), _flowReceiver, address(0), nftId); - - constantInflowNFT.mockBurn(nftId); - - _assertNFTFlowDataStateIsExpected( - nftId, address(superTokenMock), _flowSender, uint32(block.timestamp), _flowReceiver - ); - } - - function testApprove(address _flowSender, address _flowReceiver, address _approvedAccount) - public - override - returns (uint256 nftId) - { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - vm.assume(_flowReceiver != _approvedAccount); - - nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - constantOutflowNFT.mockMint(address(superTokenMock), _flowSender, _flowReceiver, nftId); - _assertNFTFlowDataStateIsExpected( - nftId, address(superTokenMock), _flowSender, uint32(block.timestamp), _flowReceiver - ); - - _assertEventApproval(address(constantInflowNFT), _flowReceiver, _approvedAccount, nftId); - - vm.startPrank(_flowReceiver); - constantInflowNFT.approve(_approvedAccount, nftId); - vm.stopPrank(); - - _assertApprovalIsExpected(constantInflowNFT, nftId, _approvedAccount); - } - - function testApproveThenBurn(address _flowSender, address _flowReceiver, address _approvedAccount) public { - uint256 nftId = testApprove(_flowSender, _flowReceiver, _approvedAccount); - constantInflowNFT.mockBurn(nftId); - - assertEq(constantInflowNFT.mockGetApproved(nftId), address(0)); - } - - function testSetApprovalForAll(address _tokenOwner, address _operator, bool _approved) public { - vm.assume(_tokenOwner != address(0)); - vm.assume(_tokenOwner != _operator); - - vm.startPrank(_tokenOwner); - _assertEventApprovalForAll(address(constantInflowNFT), _tokenOwner, _operator, _approved); - constantInflowNFT.setApprovalForAll(_operator, _approved); - vm.stopPrank(); - - _assertOperatorApprovalIsExpected(constantInflowNFT, _tokenOwner, _operator, _approved); - } -} diff --git a/packages/ethereum-contracts/test/foundry/superfluid/ConstantOutflowNFT.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/ConstantOutflowNFT.t.sol deleted file mode 100644 index e06dff36b9..0000000000 --- a/packages/ethereum-contracts/test/foundry/superfluid/ConstantOutflowNFT.t.sol +++ /dev/null @@ -1,300 +0,0 @@ -// SPDX-License-Identifier: AGPLv3 -pragma solidity ^0.8.23; - -import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import { IERC165, IERC721, IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; -import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; -import { UUPSProxy } from "../../../contracts/upgradability/UUPSProxy.sol"; -import { - FlowNFTBase, ConstantOutflowNFT, IConstantOutflowNFT -} from "../../../contracts/superfluid/ConstantOutflowNFT.sol"; -import { ConstantInflowNFT } from "../../../contracts/superfluid/ConstantInflowNFT.sol"; -import { FoundrySuperfluidTester, SuperTokenV1Library } from "../FoundrySuperfluidTester.sol"; -import { IFlowNFTBase } from "../../../contracts/interfaces/superfluid/IFlowNFTBase.sol"; -import { TestToken } from "../../../contracts/utils/TestToken.sol"; -import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; -import { ISuperToken } from "../../../contracts/superfluid/SuperToken.sol"; -import { SuperToken, SuperTokenMock, NoNFTSuperTokenMock } from "../../../contracts/mocks/SuperTokenMock.t.sol"; -import { FlowNFTBaseTest } from "./FlowNFTBase.t.sol"; -import { ConstantOutflowNFTMock } from "./CFAv1NFTMock.t.sol"; - - -library StringExtra { - function concat(string memory a, string memory b) internal pure returns (string memory) { - return string(abi.encodePacked(a, b)); - } -} -using StringExtra for string; - -contract ConstantOutflowNFTTest is FlowNFTBaseTest { - using Strings for uint256; - using SuperTokenV1Library for ISuperToken; - using SuperTokenV1Library for SuperTokenMock; - - /*////////////////////////////////////////////////////////////////////////// - Revert Tests - //////////////////////////////////////////////////////////////////////////*/ - - function testRevertIfInternalMintToZeroAddress(address _flowReceiver) public { - uint256 nftId = _helperGetNFTID(address(superTokenMock), address(0), _flowReceiver); - vm.expectRevert(); - constantOutflowNFT.mockMint(address(superTokenMock), address(0), _flowReceiver, nftId); - } - - // test disabled -we do now explicitly allow this in order to not revert - // if previous onDelete hooks failed to execute - function noTestRevertIfInternalMintTokenThatExists(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - constantOutflowNFT.mockMint(address(superTokenMock), _flowSender, _flowReceiver, nftId); - vm.expectRevert(); - constantOutflowNFT.mockMint(address(superTokenMock), _flowSender, _flowReceiver, nftId); - } - - function testRevertIfInternalMintSameToAndFlowReceiver(address _flowSender) public { - vm.assume(_flowSender != address(0)); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowSender); - vm.expectRevert(); - constantOutflowNFT.mockMint(address(superTokenMock), _flowSender, _flowSender, nftId); - } - - function testRevertIfOnCreateIsNotCalledByFlowAgreement(address caller) public { - _assumeCallerIsNotOtherAddress(caller, address(sf.cfa)); - _assumeCallerIsNotOtherAddress(caller, address(sf.gda)); - - vm.expectRevert(IConstantOutflowNFT.COF_NFT_ONLY_FLOW_AGREEMENTS.selector); - vm.prank(caller); - constantOutflowNFT.onCreate(superToken, address(1), address(2)); - } - - function testRevertIfOnUpdateIsNotCalledByFlowAgreement(address caller) public { - _assumeCallerIsNotOtherAddress(caller, address(sf.cfa)); - _assumeCallerIsNotOtherAddress(caller, address(sf.gda)); - - vm.startPrank(caller); - vm.expectRevert(IConstantOutflowNFT.COF_NFT_ONLY_FLOW_AGREEMENTS.selector); - constantOutflowNFT.onUpdate(superToken, address(1), address(2)); - vm.stopPrank(); - } - - function testRevertIfOnDeleteIsNotCalledByFlowAgreement(address caller) public { - _assumeCallerIsNotOtherAddress(caller, address(sf.cfa)); - _assumeCallerIsNotOtherAddress(caller, address(sf.gda)); - vm.prank(caller); - vm.expectRevert(IConstantOutflowNFT.COF_NFT_ONLY_FLOW_AGREEMENTS.selector); - constantOutflowNFT.onDelete(superToken, address(1), address(2)); - } - - function testRevertIfGetNoFlowTokenURI() public { - uint256 nftId = _helperGetNFTID(address(superTokenMock), alice, bob); - vm.expectRevert(); - constantOutflowNFT.tokenURI(nftId); - vm.expectRevert(); - constantInflowNFT.tokenURI(nftId); - } - - function testRevertIfYouTryToTransferOutflowNFT(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - constantOutflowNFT.mockMint(address(superTokenMock), _flowSender, _flowReceiver, nftId); - - vm.startPrank(_flowSender); - vm.expectRevert(IFlowNFTBase.CFA_NFT_TRANSFER_IS_NOT_ALLOWED.selector); - constantOutflowNFT.transferFrom(_flowSender, _flowReceiver, nftId); - vm.stopPrank(); - } - - /*////////////////////////////////////////////////////////////////////////// - Passing Tests - //////////////////////////////////////////////////////////////////////////*/ - - function testProxiableUUIDIsExpectedValue() public view { - assertEq( - constantOutflowNFT.proxiableUUID(), - keccak256("org.superfluid-finance.contracts.ConstantOutflowNFT.implementation") - ); - } - - function testConstantOutflowNFTIsProperlyInitialized() public view { - assertEq(constantOutflowNFT.name(), OUTFLOW_NFT_NAME_TEMPLATE); - assertEq(constantOutflowNFT.symbol(), OUTFLOW_NFT_SYMBOL_TEMPLATE); - } - - function testInternalMintToken(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - - _assertEventTransfer(address(constantOutflowNFT), address(0), _flowSender, nftId); - - constantOutflowNFT.mockMint(address(superTokenMock), _flowSender, _flowReceiver, nftId); - _assertNFTFlowDataStateIsExpected( - nftId, address(superTokenMock), _flowSender, uint32(block.timestamp), _flowReceiver - ); - } - - function testInternalBurnToken(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - constantOutflowNFT.mockMint(address(superTokenMock), _flowSender, _flowReceiver, nftId); - _assertNFTFlowDataStateIsExpected( - nftId, address(superTokenMock), _flowSender, uint32(block.timestamp), _flowReceiver - ); - - _assertEventTransfer(address(constantOutflowNFT), _flowSender, address(0), nftId); - - constantOutflowNFT.mockBurn(nftId); - _assertNFTFlowDataStateIsEmpty(nftId); - } - - function testApprove(address _flowSender, address _flowReceiver, address _approvedAccount) - public - override - returns (uint256 nftId) - { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - vm.assume(_flowSender != _approvedAccount); - - nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - constantOutflowNFT.mockMint(address(superTokenMock), _flowSender, _flowReceiver, nftId); - - _assertEventApproval(address(constantOutflowNFT), _flowSender, _approvedAccount, nftId); - - vm.startPrank(_flowSender); - constantOutflowNFT.approve(_approvedAccount, nftId); - vm.stopPrank(); - - _assertApprovalIsExpected(constantOutflowNFT, nftId, _approvedAccount); - } - - function testApproveThenBurn(address _flowSender, address _flowReceiver, address _approvedAccount) public { - uint256 nftId = testApprove(_flowSender, _flowReceiver, _approvedAccount); - constantOutflowNFT.mockBurn(nftId); - - assertEq(constantOutflowNFT.mockGetApproved(nftId), address(0)); - } - - function testSetApprovalForAll(address _tokenOwner, address _operator, bool _approved) public { - vm.assume(_tokenOwner != address(0)); - vm.assume(_tokenOwner != _operator); - - - vm.startPrank(_tokenOwner); - _assertEventApprovalForAll(address(constantOutflowNFT), _tokenOwner, _operator, _approved); - constantOutflowNFT.setApprovalForAll(_operator, _approved); - vm.stopPrank(); - - _assertOperatorApprovalIsExpected(constantOutflowNFT, _tokenOwner, _operator, _approved); - } - - function testCreateFlowMintsOutflowAndInflowNFTsAndEmitsTransferEvents() public { - int96 flowRate = 42069; - address flowSender = alice; - address flowReceiver = bob; - _helperCreateFlowAndAssertNFTInvariants(flowSender, flowReceiver, flowRate); - } - - function testUpdateFlowDoesNotImpactStorageAndEmitsMetadataUpdateEvents() public { - int96 flowRate = 42069; - address flowSender = alice; - address flowReceiver = bob; - _helperCreateFlowAndAssertNFTInvariants(flowSender, flowReceiver, flowRate); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), flowSender, flowReceiver); - _assertEventMetadataUpdate(address(constantOutflowNFT), nftId); - _assertEventMetadataUpdate(address(constantInflowNFT), nftId); - - vm.prank(flowSender); - superTokenMock.updateFlow(flowReceiver, flowRate + 333); - - _assertNFTFlowDataStateIsExpected( - nftId, address(superTokenMock), flowSender, uint32(block.timestamp), flowReceiver - ); - } - - function testDeleteFlowClearsStorageAndEmitsTransferEvents() public { - int96 flowRate = 42069; - address flowSender = alice; - address flowReceiver = bob; - _helperCreateFlowAndAssertNFTInvariants(flowSender, flowReceiver, flowRate); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), flowSender, flowReceiver); - - _assertEventTransfer(address(constantInflowNFT), flowReceiver, address(0), nftId); - - _assertEventTransfer(address(constantOutflowNFT), flowSender, address(0), nftId); - - vm.prank(flowSender); - superTokenMock.deleteFlow(flowSender, flowReceiver); - - _assertNFTFlowDataStateIsEmpty(nftId); - } - - function testTokenURIIsExpected(uint32 startDate, uint32 flowRate) public { - vm.assume(flowRate > 0); - address flowSender = alice; - address flowReceiver = bob; - - vm.warp(startDate); - _helperCreateFlowAndAssertNFTInvariants(flowSender, flowReceiver, int96(int256(uint256(flowRate)))); - - string memory tokenURI; - { - uint256 nftId = _helperGetNFTID(address(superTokenMock), flowSender, flowReceiver); - tokenURI = constantOutflowNFT.tokenURI(nftId); - } - - string memory expectedTokenURI; - { - expectedTokenURI = string("https://nft.superfluid.finance/cfa/v2/getmeta?flowRate=") - .concat(uint256(flowRate).toString()); - expectedTokenURI = expectedTokenURI.concat("&outgoing=true"); - expectedTokenURI = expectedTokenURI.concat("&token_address=") - .concat(Strings.toHexString(uint256(uint160(address(superTokenMock))), 20)); - expectedTokenURI = expectedTokenURI.concat("&chain_id=") - .concat(block.chainid.toString()); - expectedTokenURI = expectedTokenURI.concat("&token_symbol=") - .concat(superTokenMock.symbol()); - expectedTokenURI = expectedTokenURI.concat("&sender=") - .concat(Strings.toHexString(uint256(uint160(flowSender)), 20)); - expectedTokenURI = expectedTokenURI.concat("&receiver=") - .concat(Strings.toHexString(uint256(uint160(flowReceiver)), 20)); - expectedTokenURI = expectedTokenURI.concat("&token_decimals=") - .concat(uint256(superTokenMock.decimals()).toString()); - expectedTokenURI = expectedTokenURI.concat("&start_date=") - .concat(uint256(startDate).toString()); - } - - assertEq(tokenURI, expectedTokenURI); - } - - function testCreateUpdateDeleteFlowNoNFTToken() public { - uint256 initialAmount = 10000 ether; - TestToken testToken = new TestToken("Test", "TS", 18, initialAmount); - NoNFTSuperTokenMock noNFTSuperTokenMock = new NoNFTSuperTokenMock( - sf.host - ); - noNFTSuperTokenMock.initialize(testToken, 18, "Super Test", "TSx"); - vm.startPrank(alice); - testToken.mint(alice, initialAmount); - testToken.approve(address(noNFTSuperTokenMock), initialAmount); - noNFTSuperTokenMock.upgrade(initialAmount); - ISuperToken(address(noNFTSuperTokenMock)).createFlow(bob, 100); - (, int96 flowRate,,) = sf.cfa.getFlow(noNFTSuperTokenMock, alice, bob); - assertEq(flowRate, 100); - ISuperToken(address(noNFTSuperTokenMock)).updateFlow(bob, 150); - (, flowRate,,) = sf.cfa.getFlow(noNFTSuperTokenMock, alice, bob); - assertEq(flowRate, 150); - ISuperToken(address(noNFTSuperTokenMock)).updateFlow(bob, 90); - (, flowRate,,) = sf.cfa.getFlow(noNFTSuperTokenMock, alice, bob); - assertEq(flowRate, 90); - ISuperToken(address(noNFTSuperTokenMock)).deleteFlow(alice, bob); - (, flowRate,,) = sf.cfa.getFlow(noNFTSuperTokenMock, alice, bob); - assertEq(flowRate, 0); - vm.stopPrank(); - } -} diff --git a/packages/ethereum-contracts/test/foundry/superfluid/ERC721.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/ERC721.t.sol index 5c72ede53e..befdcadd4d 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/ERC721.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/ERC721.t.sol @@ -3,35 +3,22 @@ pragma solidity ^0.8.23; import { IERC721Metadata } from "@openzeppelin/contracts/interfaces/IERC721Metadata.sol"; import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; -import { ConstantOutflowNFTMock, ConstantInflowNFTMock } from "./CFAv1NFTMock.t.sol"; import { PoolAdminNFTMock, PoolMemberNFTMock } from "./PoolNFTMock.t.sol"; -import { ConstantOutflowNFT, IConstantOutflowNFT } from "../../../contracts/superfluid/ConstantOutflowNFT.sol"; -import { ConstantInflowNFT, IConstantInflowNFT } from "../../../contracts/superfluid/ConstantInflowNFT.sol"; import { TestToken } from "../../../contracts/utils/TestToken.sol"; import { PoolAdminNFT, IPoolAdminNFT } from "../../../contracts/agreements/gdav1/PoolAdminNFT.sol"; import { PoolMemberNFT, IPoolMemberNFT } from "../../../contracts/agreements/gdav1/PoolMemberNFT.sol"; import { UUPSProxy } from "../../../contracts/upgradability/UUPSProxy.sol"; import { UUPSProxiable } from "../../../contracts/upgradability/UUPSProxiable.sol"; -import { SuperToken, SuperTokenMock } from "../../../contracts/mocks/SuperTokenMock.t.sol"; +import { SuperToken, SuperTokenMock, IConstantOutflowNFT, IConstantInflowNFT } from "../../../contracts/mocks/SuperTokenMock.t.sol"; contract ERC721IntegrationTest is FoundrySuperfluidTester { string internal constant POOL_MEMBER_NFT_NAME_TEMPLATE = "Pool Member NFT"; string internal constant POOL_MEMBER_NFT_SYMBOL_TEMPLATE = "PMF"; string internal constant POOL_ADMIN_NFT_NAME_TEMPLATE = "Pool Admin NFT"; string internal constant POOL_ADMIN_NFT_SYMBOL_TEMPLATE = "PAF"; - string internal constant OUTFLOW_NFT_NAME_TEMPLATE = "Constant Outflow NFT"; - string internal constant OUTFLOW_NFT_SYMBOL_TEMPLATE = "COF"; - string internal constant INFLOW_NFT_NAME_TEMPLATE = "Constant Inflow NFT"; - string internal constant INFLOW_NFT_SYMBOL_TEMPLATE = "CIF"; SuperTokenMock public superTokenMock; - ConstantOutflowNFTMock public constantOutflowNFTLogic; - ConstantInflowNFTMock public constantInflowNFTLogic; - - ConstantOutflowNFTMock public constantOutflowNFT; - ConstantInflowNFTMock public constantInflowNFT; - PoolMemberNFTMock public poolMemberNFTLogic; PoolAdminNFTMock public poolAdminNFTLogic; @@ -51,36 +38,6 @@ contract ERC721IntegrationTest is FoundrySuperfluidTester { function setUp() public virtual override { super.setUp(); - // Deploy Flow NFTs - - // deploy outflow NFT contract - UUPSProxy outflowProxy = new UUPSProxy(); - - // deploy inflow NFT contract - UUPSProxy inflowProxy = new UUPSProxy(); - - // we deploy mock NFT contracts for the tests to access internal functions - constantOutflowNFTLogic = - new ConstantOutflowNFTMock(sf.host, sf.cfa, sf.gda, IConstantInflowNFT(address(inflowProxy))); - constantInflowNFTLogic = - new ConstantInflowNFTMock(sf.host, sf.cfa, sf.gda, IConstantOutflowNFT(address(outflowProxy))); - - constantOutflowNFTLogic.castrate(); - constantInflowNFTLogic.castrate(); - - // initialize proxy to point at logic - outflowProxy.initializeProxy(address(constantOutflowNFTLogic)); - - // initialize proxy to point at logic - inflowProxy.initializeProxy(address(constantInflowNFTLogic)); - - constantOutflowNFT = ConstantOutflowNFTMock(address(outflowProxy)); - constantInflowNFT = ConstantInflowNFTMock(address(inflowProxy)); - - constantOutflowNFT.initialize(OUTFLOW_NFT_NAME_TEMPLATE, OUTFLOW_NFT_SYMBOL_TEMPLATE); - - constantInflowNFT.initialize(INFLOW_NFT_NAME_TEMPLATE, INFLOW_NFT_SYMBOL_TEMPLATE); - // Deploy Pool NFTs // deploy pool member NFT contract @@ -119,8 +76,8 @@ contract ERC721IntegrationTest is FoundrySuperfluidTester { SuperTokenMock superTokenMockLogic = new SuperTokenMock( sf.host, 0, - IConstantOutflowNFT(address(constantOutflowNFT)), - IConstantInflowNFT(address(constantInflowNFT)), + IConstantOutflowNFT(address(0)), + IConstantInflowNFT(address(0)), IPoolAdminNFT(address(poolAdminNFT)), IPoolMemberNFT(address(poolMemberNFT)) ); diff --git a/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.prop.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.prop.t.sol deleted file mode 100644 index 339de5d93d..0000000000 --- a/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.prop.t.sol +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: AGPLv3 -pragma solidity ^0.8.23; - -import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; - -contract FlowNFTBasePropertyTest is FoundrySuperfluidTester { - constructor() FoundrySuperfluidTester(0) { } - - function setUp() public override { - super.setUp(); - } - - function testNoTokenIdCollisionDifferentTokenSameSenderReceiver(address tokenA, address tokenB) public view { - vm.assume(tokenA != tokenB); - uint256 tokenIdA = superToken.CONSTANT_OUTFLOW_NFT().getTokenId(tokenA, alice, bob); - uint256 tokenIdB = superToken.CONSTANT_OUTFLOW_NFT().getTokenId(tokenB, alice, bob); - assertNotEq(tokenIdA, tokenIdB, "FlowNFTBaseProperties: Token Ids should differ"); - } - - function testBalanceOfIsAlwaysEqualToOne(address account) public view { - uint256 balance = superToken.CONSTANT_OUTFLOW_NFT().balanceOf(account); - assertEq(balance, 1, "FlowNFTBaseProperties: Balance of should always be equal to one"); - } -} diff --git a/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.t.sol deleted file mode 100644 index 423b2eac1b..0000000000 --- a/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.t.sol +++ /dev/null @@ -1,396 +0,0 @@ -// SPDX-License-Identifier: AGPLv3 -pragma solidity ^0.8.23; - -import { IERC165, IERC721, IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; -import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; -import { UUPSProxy } from "../../../contracts/upgradability/UUPSProxy.sol"; -import { UUPSProxiable } from "../../../contracts/upgradability/UUPSProxiable.sol"; -import { - FlowNFTBase, - IFlowNFTBase, - ConstantOutflowNFT, - IConstantOutflowNFT -} from "../../../contracts/superfluid/ConstantOutflowNFT.sol"; -import { ConstantInflowNFT, IConstantInflowNFT } from "../../../contracts/superfluid/ConstantInflowNFT.sol"; -import { IPoolAdminNFT } from "../../../contracts/agreements/gdav1/PoolAdminNFT.sol"; -import { IPoolMemberNFT } from "../../../contracts/agreements/gdav1/PoolMemberNFT.sol"; -import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; -import { ConstantOutflowNFTMock, ConstantInflowNFTMock } from "./CFAv1NFTMock.t.sol"; -import { SuperToken, SuperTokenMock } from "../../../contracts/mocks/SuperTokenMock.t.sol"; -import { TestToken } from "../../../contracts/utils/TestToken.sol"; -import { FlowNFTBaseMock } from "./CFAv1NFTMock.t.sol"; -import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; -import { - FlowNFTBaseStorageLayoutMock, - ConstantInflowNFTStorageLayoutMock, - ConstantOutflowNFTStorageLayoutMock -} from "./CFAv1NFTUpgradabilityMock.t.sol"; -import { ERC721IntegrationTest } from "./ERC721.t.sol"; - -abstract contract FlowNFTBaseTest is ERC721IntegrationTest { - using Strings for uint256; - using SuperTokenV1Library for SuperTokenMock; - using SuperTokenV1Library for SuperToken; - - string public constant NAME = "Flow NFT Base"; - string public constant SYMBOL = "FNFTB"; - - FlowNFTBaseMock public flowNFTBaseMock; - - function setUp() public virtual override { - super.setUp(); - flowNFTBaseMock = new FlowNFTBaseMock(sf.host, sf.cfa, sf.gda); - flowNFTBaseMock.initialize(NAME, SYMBOL); - } - - /*////////////////////////////////////////////////////////////////////////// - Revert Tests - //////////////////////////////////////////////////////////////////////////*/ - - function testRevertIfContractAlreadyInitialized() public { - vm.expectRevert("Initializable: contract is already initialized"); - - flowNFTBaseMock.initialize(NAME, SYMBOL); - } - - function testRevertIfOwnerOfCalledForNonExistentToken(uint256 tokenId) public { - _helperRevertIfOwnerOf(flowNFTBaseMock, tokenId, IFlowNFTBase.CFA_NFT_INVALID_TOKEN_ID.selector); - } - - function testRevertIfGetApprovedCalledForNonExistentToken(uint256 tokenId) public { - _helperRevertIfGetApproved(flowNFTBaseMock, tokenId, IFlowNFTBase.CFA_NFT_INVALID_TOKEN_ID.selector); - } - - function testRevertIfSetApprovalForAllOperatorApproveToCaller(address _flowSender) public { - vm.assume(_flowSender != address(0)); - - vm.startPrank(_flowSender); - vm.expectRevert(IFlowNFTBase.CFA_NFT_APPROVE_TO_CALLER.selector); - flowNFTBaseMock.setApprovalForAll(_flowSender, true); - vm.stopPrank(); - } - - function testRevertIfApproveToCurrentOwner(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - flowNFTBaseMock.mockMint(address(superTokenMock), _flowSender, _flowReceiver); - - vm.startPrank(_flowSender); - vm.expectRevert(IFlowNFTBase.CFA_NFT_APPROVE_TO_CURRENT_OWNER.selector); - flowNFTBaseMock.approve(_flowSender, nftId); - vm.stopPrank(); - } - - function testRevertIfApproveAsNonOwner( - address _flowSender, - address _flowReceiver, - address _approver, - address _approvedAccount - ) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - /// @dev _flowSender is owner of outflow NFT - vm.assume(_approver != _flowSender); - vm.assume(_approvedAccount != _flowSender); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - flowNFTBaseMock.mockMint(address(superTokenMock), _flowSender, _flowReceiver); - vm.expectRevert(IFlowNFTBase.CFA_NFT_APPROVE_CALLER_NOT_OWNER_OR_APPROVED_FOR_ALL.selector); - vm.startPrank(_approver); - flowNFTBaseMock.approve(_approvedAccount, nftId); - vm.stopPrank(); - } - - function testRevertIfTransferFrom(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - flowNFTBaseMock.mockMint(address(superTokenMock), _flowSender, _flowReceiver); - - _helperRevertIfTransferFrom( - flowNFTBaseMock, - _flowSender, - _flowSender, - _flowReceiver, - nftId, - IFlowNFTBase.CFA_NFT_TRANSFER_IS_NOT_ALLOWED.selector - ); - } - - function testRevertIfSafeTransferFrom(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - flowNFTBaseMock.mockMint(address(superTokenMock), _flowSender, _flowReceiver); - - _helperRevertIfSafeTransferFrom( - flowNFTBaseMock, - _flowSender, - _flowSender, - _flowReceiver, - nftId, - IFlowNFTBase.CFA_NFT_TRANSFER_IS_NOT_ALLOWED.selector - ); - } - - function testRevertIfTransferFromWithData(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - flowNFTBaseMock.mockMint(address(superTokenMock), _flowSender, _flowReceiver); - - _helperRevertIfSafeTransferFrom( - flowNFTBaseMock, - _flowSender, - _flowSender, - _flowReceiver, - nftId, - "0x", - IFlowNFTBase.CFA_NFT_TRANSFER_IS_NOT_ALLOWED.selector - ); - } - - function testRevertIfTransferFromAsNonOwner(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - flowNFTBaseMock.mockMint(address(superTokenMock), _flowSender, _flowReceiver); - - _helperRevertIfTransferFrom( - flowNFTBaseMock, - _flowReceiver, - _flowSender, - _flowReceiver, - nftId, - IFlowNFTBase.CFA_NFT_TRANSFER_CALLER_NOT_OWNER_OR_APPROVED_FOR_ALL.selector - ); - } - - function testRevertIfSafeTransferFromAsNonOwner(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - flowNFTBaseMock.mockMint(address(superTokenMock), _flowSender, _flowReceiver); - - _helperRevertIfSafeTransferFrom( - flowNFTBaseMock, - _flowReceiver, - _flowSender, - _flowReceiver, - nftId, - IFlowNFTBase.CFA_NFT_TRANSFER_CALLER_NOT_OWNER_OR_APPROVED_FOR_ALL.selector - ); - } - - function testRevertIfTransferFromWithDataAsNonOwner(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - flowNFTBaseMock.mockMint(address(superTokenMock), _flowSender, _flowReceiver); - - _helperRevertIfSafeTransferFrom( - flowNFTBaseMock, - _flowReceiver, - _flowSender, - _flowReceiver, - nftId, - "0x", - IFlowNFTBase.CFA_NFT_TRANSFER_CALLER_NOT_OWNER_OR_APPROVED_FOR_ALL.selector - ); - } - - /*////////////////////////////////////////////////////////////////////////// - Passing Tests - //////////////////////////////////////////////////////////////////////////*/ - function testContractSupportsExpectedInterfaces() public view { - assertEq(flowNFTBaseMock.supportsInterface(type(IERC165).interfaceId), true); - assertEq(flowNFTBaseMock.supportsInterface(type(IERC721).interfaceId), true); - assertEq(flowNFTBaseMock.supportsInterface(type(IERC721Metadata).interfaceId), true); - } - - function testNFTBalanceOfIsAlwaysOne(address _owner) public view { - assertEq(flowNFTBaseMock.balanceOf(_owner), 1); - } - - function testHostIsProperlySetInConstructor() public view { - assertEq(address(flowNFTBaseMock.HOST()), address(sf.host)); - } - - function testCFAv1IsProperlySetInConstructor() public view { - assertEq(address(flowNFTBaseMock.CONSTANT_FLOW_AGREEMENT_V1()), address(sf.cfa)); - } - - function testGDAv1IsProperlySetInConstructor() public view { - assertEq(address(flowNFTBaseMock.GENERAL_DISTRIBUTION_AGREEMENT_V1()), address(sf.gda)); - } - - function testNFTMetadataIsProperlyInitialized() public view { - assertEq(flowNFTBaseMock.name(), NAME); - assertEq(flowNFTBaseMock.symbol(), SYMBOL); - } - - function testTriggerMetadataUpdate(uint256 tokenId) public { - _assertEventMetadataUpdate(address(flowNFTBaseMock), tokenId); - flowNFTBaseMock.triggerMetadataUpdate(tokenId); - } - - function testTokenURI(uint256 tokenId) public view { - assertEq(flowNFTBaseMock.tokenURI(tokenId), string(abi.encodePacked("tokenId=", tokenId.toString()))); - } - - function testApprove(address _flowSender, address _flowReceiver, address _approvedAccount) - public - virtual - returns (uint256 nftId) - { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - vm.assume(_flowSender != _approvedAccount); - - nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - flowNFTBaseMock.mockMint(address(superTokenMock), _flowSender, _flowReceiver); - - _assertEventApproval(address(flowNFTBaseMock), _flowSender, _approvedAccount, nftId); - - vm.startPrank(_flowSender); - flowNFTBaseMock.approve(_approvedAccount, nftId); - vm.stopPrank(); - - _assertApprovalIsExpected(flowNFTBaseMock, nftId, _approvedAccount); - } - - /*////////////////////////////////////////////////////////////////////////// - Assertion Helpers - //////////////////////////////////////////////////////////////////////////*/ - function _assertNFTFlowDataStateIsExpected( - uint256 _tokenId, - address _expectedSuperToken, - address _expectedFlowSender, - uint32 _expectedFlowStartDate, - address _expectedFlowReceiver - ) public view { - FlowNFTBase.FlowNFTData memory flowData = constantOutflowNFT.flowDataByTokenId(_tokenId); - - assertEq(flowData.superToken, _expectedSuperToken); - - // assert flow sender is equal to expected flow sender - assertEq(flowData.flowSender, _expectedFlowSender); - - // assert flow start date is equal to expected flow start date - assertEq(flowData.flowStartDate, _expectedFlowStartDate); - - // assert flow sender is equal to expected flow sender - assertEq(flowData.flowReceiver, _expectedFlowReceiver); - - // assert owner of outflow nft equal to expected flow sender - _assertOwnerOfIsExpected( - constantOutflowNFT, _tokenId, _expectedFlowSender, "ConstantOutflowNFT: owner of COF nft not as expected" - ); - - // assert owner of inflow nft equal to expected flow receiver - _assertOwnerOfIsExpected( - constantInflowNFT, _tokenId, _expectedFlowReceiver, "ConstantInflowNFT: owner of COF nft not as expected" - ); - } - - function _assertNFTFlowDataStateIsEmpty(uint256 _tokenId) public view { - _assertNFTFlowDataStateIsExpected(_tokenId, address(0), address(0), 0, address(0)); - } - - /*////////////////////////////////////////////////////////////////////////// - Helper Functions - //////////////////////////////////////////////////////////////////////////*/ - function _helperGetNFTID(address _superToken, address _flowSender, address _flowReceiver) - public - view - returns (uint256) - { - return constantOutflowNFT.getTokenId(_superToken, _flowSender, _flowReceiver); - } - - function _helperCreateFlowAndAssertNFTInvariants(address _flowSender, address _flowReceiver, int96 _flowRate) - public - { - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - - _assertEventTransfer(address(constantOutflowNFT), address(0), _flowSender, nftId); - - _assertEventTransfer(address(constantInflowNFT), address(0), _flowReceiver, nftId); - - vm.startPrank(_flowSender); - superTokenMock.createFlow(_flowReceiver, _flowRate); - vm.stopPrank(); - _assertNFTFlowDataStateIsExpected( - nftId, address(superTokenMock), _flowSender, uint32(block.timestamp), _flowReceiver - ); - - (uint256 timestamp, int96 flowRate,,) = sf.cfa.getFlow(superTokenMock, _flowSender, _flowReceiver); - assertEq(timestamp, block.timestamp); - assertEq(flowRate, _flowRate); - } - - /*////////////////////////////////////////////////////////////////////////// - Assume Helpers - //////////////////////////////////////////////////////////////////////////*/ - function _assumeSenderNEQReceiverAndNeitherAreZeroAddress(address _flowSender, address _flowReceiver) public pure { - vm.assume(_flowSender != address(0)); - vm.assume(_flowReceiver != address(0)); - vm.assume(_flowSender != _flowReceiver); - } - - function _assumeCallerIsNotOtherAddress(address caller, address otherAddress) public pure { - vm.assume(caller != otherAddress); - } -} - -/// @title CFAv1NFTUpgradabilityTest -/// @author Superfluid -/// @notice Used for testing storage layout and upgradability of CFAv1 NFT contracts -contract CFAv1NFTUpgradabilityTest is FlowNFTBaseTest { - function setUp() public override { - super.setUp(); - } - - /*////////////////////////////////////////////////////////////////////////// - Storage Layout Tests - //////////////////////////////////////////////////////////////////////////*/ - function testFlowNFTBaseStorageLayout() public { - FlowNFTBaseStorageLayoutMock flowNFTBaseStorageLayoutMock = - new FlowNFTBaseStorageLayoutMock(sf.host, sf.cfa, sf.gda); - flowNFTBaseStorageLayoutMock.validateStorageLayout(); - } - - function testConstantInflowNFTStorageLayout() public { - ConstantInflowNFTStorageLayoutMock constantInflowNFTBaseStorageLayoutMock = - new ConstantInflowNFTStorageLayoutMock(sf.host, sf.cfa, sf.gda, constantOutflowNFT); - constantInflowNFTBaseStorageLayoutMock.validateStorageLayout(); - } - - function testConstantOutflowNFTStorageLayout() public { - ConstantOutflowNFTStorageLayoutMock constantOutflowNFTBaseStorageLayoutMock = - new ConstantOutflowNFTStorageLayoutMock(sf.host, sf.cfa, sf.gda, constantInflowNFT); - constantOutflowNFTBaseStorageLayoutMock.validateStorageLayout(); - } - - /*////////////////////////////////////////////////////////////////////////// - Revert Tests - //////////////////////////////////////////////////////////////////////////*/ - function testRevertFlowNFTContractsCannotBeUpgradedByNonSuperTokenFactory(address notSuperTokenFactory) public { - vm.assume(notSuperTokenFactory != address(sf.superTokenFactory)); - ConstantOutflowNFT newOutflowLogic = new ConstantOutflowNFT(sf.host, sf.cfa, sf.gda, constantInflowNFT); - vm.expectRevert(IFlowNFTBase.CFA_NFT_ONLY_SUPER_TOKEN_FACTORY.selector); - vm.prank(notSuperTokenFactory); - constantOutflowNFT.updateCode(address(newOutflowLogic)); - - ConstantInflowNFT newInflowLogic = new ConstantInflowNFT(sf.host, sf.cfa, sf.gda, constantOutflowNFT); - vm.expectRevert(IFlowNFTBase.CFA_NFT_ONLY_SUPER_TOKEN_FACTORY.selector); - vm.prank(notSuperTokenFactory); - constantInflowNFT.updateCode(address(newInflowLogic)); - } - - /*////////////////////////////////////////////////////////////////////////// - Passing Tests - //////////////////////////////////////////////////////////////////////////*/ - function testFlowNFTContractsCanBeUpgradedBySuperTokenFactory() public { - ConstantOutflowNFT newOutflowLogic = new ConstantOutflowNFT(sf.host, sf.cfa, sf.gda, constantInflowNFT); - vm.prank(address(sf.superTokenFactory)); - constantOutflowNFT.updateCode(address(newOutflowLogic)); - - ConstantInflowNFT newInflowLogic = new ConstantInflowNFT(sf.host, sf.cfa, sf.gda, constantOutflowNFT); - vm.prank(address(sf.superTokenFactory)); - constantInflowNFT.updateCode(address(newInflowLogic)); - } -} diff --git a/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTBase.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTBase.t.sol index a54ed4c924..03fbf57e29 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTBase.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTBase.t.sol @@ -10,12 +10,9 @@ import { PoolMemberNFTStorageLayoutMock } from "./PoolNFTUpgradabilityMock.t.sol"; import { IPoolNFTBase, PoolNFTBase } from "../../../contracts/agreements/gdav1/PoolNFTBase.sol"; -import { ConstantOutflowNFT, IConstantOutflowNFT } from "../../../contracts/superfluid/ConstantOutflowNFT.sol"; -import { ConstantInflowNFT, IConstantInflowNFT } from "../../../contracts/superfluid/ConstantInflowNFT.sol"; import { TestToken } from "../../../contracts/utils/TestToken.sol"; import { PoolAdminNFT, IPoolAdminNFT } from "../../../contracts/agreements/gdav1/PoolAdminNFT.sol"; import { PoolMemberNFT, IPoolMemberNFT } from "../../../contracts/agreements/gdav1/PoolMemberNFT.sol"; -import { ConstantOutflowNFTMock, ConstantInflowNFTMock } from "./CFAv1NFTMock.t.sol"; import { PoolNFTBaseMock } from "./PoolNFTMock.t.sol"; import { ISuperfluidPool } from "../../../contracts/agreements/gdav1/SuperfluidPool.sol"; import { ERC721IntegrationTest } from "./ERC721.t.sol"; diff --git a/packages/ethereum-contracts/test/foundry/superfluid/SuperToken.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/SuperToken.t.sol index 1c2f031429..02727ad7aa 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/SuperToken.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/SuperToken.t.sol @@ -4,9 +4,8 @@ pragma solidity ^0.8.23; import { Test } from "forge-std/Test.sol"; import { UUPSProxy } from "../../../contracts/upgradability/UUPSProxy.sol"; import { UUPSProxiable } from "../../../contracts/upgradability/UUPSProxiable.sol"; -import { IERC20, ISuperToken, SuperToken } from "../../../contracts/superfluid/SuperToken.sol"; -import { ConstantOutflowNFT, IConstantOutflowNFT } from "../../../contracts/superfluid/ConstantOutflowNFT.sol"; -import { ConstantInflowNFT, IConstantInflowNFT } from "../../../contracts/superfluid/ConstantInflowNFT.sol"; +import { IERC20, ISuperToken, SuperToken, IConstantOutflowNFT, IConstantInflowNFT } + from "../../../contracts/superfluid/SuperToken.sol"; import { PoolAdminNFT, IPoolAdminNFT } from "../../../contracts/agreements/gdav1/PoolAdminNFT.sol"; import { PoolMemberNFT, IPoolMemberNFT } from "../../../contracts/agreements/gdav1/PoolMemberNFT.sol"; import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; @@ -69,71 +68,6 @@ contract SuperTokenIntegrationTest is FoundrySuperfluidTester { ); } - function testRevertSuperTokenUpdateCodeWrongNFTProxies() public { - UUPSProxy cifProxy = new UUPSProxy(); - UUPSProxy cofProxy = new UUPSProxy(); - UUPSProxy paProxy = new UUPSProxy(); - UUPSProxy pmProxy = new UUPSProxy(); - - ConstantInflowNFT cifNFTLogic = - new ConstantInflowNFT(sf.host, sf.cfa, sf.gda, IConstantOutflowNFT(address(cofProxy))); - ConstantOutflowNFT cofNFTLogic = - new ConstantOutflowNFT(sf.host, sf.cfa, sf.gda, IConstantInflowNFT(address(cifProxy))); - PoolAdminNFT paNFTLogic = new PoolAdminNFT(sf.host, sf.gda); - PoolMemberNFT pmNFTLogic = new PoolMemberNFT(sf.host, sf.gda); - - cifNFTLogic.castrate(); - cofNFTLogic.castrate(); - paNFTLogic.castrate(); - pmNFTLogic.castrate(); - - cifProxy.initializeProxy(address(cifNFTLogic)); - cofProxy.initializeProxy(address(cofNFTLogic)); - paProxy.initializeProxy(address(paNFTLogic)); - pmProxy.initializeProxy(address(pmNFTLogic)); - - ConstantInflowNFT(address(cofProxy)).initialize("Constant Outflow NFT", "COF"); - ConstantOutflowNFT(address(cifProxy)).initialize("Constant Inflow NFT", "CIF"); - PoolAdminNFT(address(paProxy)).initialize("Pool Admin NFT", "PA"); - PoolMemberNFT(address(pmProxy)).initialize("Pool Member NFT", "PM"); - - // all nft proxies incorrect - SuperToken superTokenLogic = new SuperToken( - sf.host, - ConstantOutflowNFT(address(cofProxy)), - ConstantInflowNFT(address(cifProxy)), - PoolAdminNFT(address(paProxy)), - PoolMemberNFT(address(pmProxy)) - ); - vm.prank(address(sf.host)); - vm.expectRevert(ISuperToken.SUPER_TOKEN_NFT_PROXY_ADDRESS_CHANGED.selector); - UUPSProxiable(address(superToken)).updateCode(address(superTokenLogic)); - - // inflow nft proxy incorrect - superTokenLogic = new SuperToken( - sf.host, - superToken.CONSTANT_OUTFLOW_NFT(), - ConstantInflowNFT(address(cifProxy)), - superToken.POOL_ADMIN_NFT(), - superToken.POOL_MEMBER_NFT() - ); - vm.prank(address(sf.host)); - vm.expectRevert(ISuperToken.SUPER_TOKEN_NFT_PROXY_ADDRESS_CHANGED.selector); - UUPSProxiable(address(superToken)).updateCode(address(superTokenLogic)); - - // outflow nft proxy incorrect - superTokenLogic = new SuperToken( - sf.host, - ConstantOutflowNFT(address(cofProxy)), - superToken.CONSTANT_INFLOW_NFT(), - superToken.POOL_ADMIN_NFT(), - superToken.POOL_MEMBER_NFT() - ); - vm.prank(address(sf.host)); - vm.expectRevert(ISuperToken.SUPER_TOKEN_NFT_PROXY_ADDRESS_CHANGED.selector); - UUPSProxiable(address(superToken)).updateCode(address(superTokenLogic)); - } - function testInitializeSuperTokenWithAndWithoutAdmin(address _admin) public { (, ISuperToken localSuperToken) = sfDeployer.deployWrapperSuperToken("FTT", "FTT", 18, type(uint256).max, _admin); diff --git a/packages/ethereum-contracts/test/foundry/superfluid/SuperTokenFactory.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/SuperTokenFactory.t.sol index e164348d98..068871c872 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/SuperTokenFactory.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/SuperTokenFactory.t.sol @@ -3,11 +3,9 @@ pragma solidity ^0.8.23; import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; import { SuperTokenFactory } from "../../../contracts/superfluid/SuperTokenFactory.sol"; -import { ConstantOutflowNFT, IConstantOutflowNFT } from "../../../contracts/superfluid/ConstantOutflowNFT.sol"; -import { ConstantInflowNFT, IConstantInflowNFT } from "../../../contracts/superfluid/ConstantInflowNFT.sol"; import { PoolAdminNFT, IPoolAdminNFT } from "../../../contracts/agreements/gdav1/PoolAdminNFT.sol"; import { PoolMemberNFT, IPoolMemberNFT } from "../../../contracts/agreements/gdav1/PoolMemberNFT.sol"; -import { ISuperToken, SuperToken } from "../../../contracts/superfluid/SuperToken.sol"; +import { ISuperToken, SuperToken, IConstantOutflowNFT, IConstantInflowNFT } from "../../../contracts/superfluid/SuperToken.sol"; import { UUPSProxiable } from "../../../contracts/upgradability/UUPSProxiable.sol"; contract SuperTokenFactoryTest is FoundrySuperfluidTester { @@ -20,32 +18,18 @@ contract SuperTokenFactoryTest is FoundrySuperfluidTester { function testUpdateCodeSetsNewContracts() public { SuperToken newSuperTokenLogic = new SuperToken( sf.host, - superToken.CONSTANT_OUTFLOW_NFT(), - superToken.CONSTANT_INFLOW_NFT(), + IConstantOutflowNFT(address(0)), + IConstantInflowNFT(address(0)), superToken.POOL_ADMIN_NFT(), superToken.POOL_MEMBER_NFT() ); - ConstantOutflowNFT newConstantOutflowNFTLogic = new ConstantOutflowNFT( - sf.host, sf.cfa, sf.gda, IConstantInflowNFT(address(superToken.CONSTANT_INFLOW_NFT())) - ); - ConstantInflowNFT newConstantInflowNFTLogic = new ConstantInflowNFT( - sf.host, sf.cfa, sf.gda, IConstantOutflowNFT(address(superToken.CONSTANT_OUTFLOW_NFT())) - ); PoolAdminNFT newPoolAdminNFTLogic = new PoolAdminNFT(sf.host, sf.gda); PoolMemberNFT newPoolMemberNFTLogic = new PoolMemberNFT(sf.host, sf.gda); - assertEq( - UUPSProxiable(address(superToken.CONSTANT_OUTFLOW_NFT())).getCodeAddress(), - address(sf.superTokenFactory.CONSTANT_OUTFLOW_NFT_LOGIC()) - ); - assertEq( - UUPSProxiable(address(superToken.CONSTANT_INFLOW_NFT())).getCodeAddress(), - address(sf.superTokenFactory.CONSTANT_INFLOW_NFT_LOGIC()) - ); SuperTokenFactory newSuperTokenFactoryLogic = new SuperTokenFactory( sf.host, newSuperTokenLogic, - newConstantOutflowNFTLogic, - newConstantInflowNFTLogic, + IConstantOutflowNFT(address(0)), + IConstantInflowNFT(address(0)), newPoolAdminNFTLogic, newPoolMemberNFTLogic ); @@ -56,11 +40,5 @@ contract SuperTokenFactoryTest is FoundrySuperfluidTester { } sf.superTokenFactory.updateCode(address(newSuperTokenFactoryLogic)); vm.stopPrank(); - - // We only assert this if the protocol is upgradable - if (!sf.host.NON_UPGRADABLE_DEPLOYMENT()) { - assertEq(address(newConstantOutflowNFTLogic), address(sf.superTokenFactory.CONSTANT_OUTFLOW_NFT_LOGIC())); - assertEq(address(newConstantInflowNFTLogic), address(sf.superTokenFactory.CONSTANT_INFLOW_NFT_LOGIC())); - } } } diff --git a/packages/hot-fuzz/hot-fuzz b/packages/hot-fuzz/hot-fuzz index 2aafee1a4d..587abe7dfa 100755 --- a/packages/hot-fuzz/hot-fuzz +++ b/packages/hot-fuzz/hot-fuzz @@ -43,7 +43,7 @@ cryticArgs: [ "--compile-force-framework=${CRYTIC_COMPILE_FRAMEWORK}", "--foundry-out-directory=${FOUNDRY_ROOT}/${FOUNDRY_OUT:-out}", # "--export-dir=${PROJECT_DIR}/crytic-export", TODO unfortunately this doesn't work - "--compile-libraries=(CFAv1ForwarderDeployerLibrary,0xf01),(GDAv1ForwarderDeployerLibrary,0xf02),(IDAv1ForwarderDeployerLibrary,0xf03),(ProxyDeployerLibrary,0xf04),(SlotsBitmapLibrary,0xf05),(SuperfluidCFAv1DeployerLibrary,0xf06),(SuperfluidFlowNFTLogicDeployerLibrary,0xf07),(SuperfluidGDAv1DeployerLibrary,0xf08),(SuperfluidGovDeployerLibrary,0xf09),(SuperfluidHostDeployerLibrary,0xf0a),(SuperfluidIDAv1DeployerLibrary,0xf0b),(SuperfluidPeripheryDeployerLibrary,0xf0c),(SuperfluidPoolDeployerLibrary,0xf0d),(SuperfluidPoolLogicDeployerLibrary,0xf0e),(SuperfluidPoolNFTLogicDeployerLibrary,0xf0f),(SuperTokenDeployerLibrary,0xf10),(SuperTokenFactoryDeployerLibrary,0xf11),(TokenDeployerLibrary,0xf12),(SuperfluidDMZForwarderDeployerLibrary,0xf13)" + "--compile-libraries=(CFAv1ForwarderDeployerLibrary,0xf01),(GDAv1ForwarderDeployerLibrary,0xf02),(IDAv1ForwarderDeployerLibrary,0xf03),(ProxyDeployerLibrary,0xf04),(SlotsBitmapLibrary,0xf05),(SuperfluidCFAv1DeployerLibrary,0xf06),(SuperfluidGDAv1DeployerLibrary,0xf08),(SuperfluidGovDeployerLibrary,0xf09),(SuperfluidHostDeployerLibrary,0xf0a),(SuperfluidIDAv1DeployerLibrary,0xf0b),(SuperfluidPeripheryDeployerLibrary,0xf0c),(SuperfluidPoolDeployerLibrary,0xf0d),(SuperfluidPoolLogicDeployerLibrary,0xf0e),(SuperfluidPoolNFTLogicDeployerLibrary,0xf0f),(SuperTokenDeployerLibrary,0xf10),(SuperTokenFactoryDeployerLibrary,0xf11),(TokenDeployerLibrary,0xf12),(SuperfluidDMZForwarderDeployerLibrary,0xf13)" ] deployContracts: [ ["0xf01", "CFAv1ForwarderDeployerLibrary"], @@ -52,7 +52,6 @@ deployContracts: [ ["0xf04", "ProxyDeployerLibrary"], ["0xf05", "SlotsBitmapLibrary"], ["0xf06", "SuperfluidCFAv1DeployerLibrary"], -["0xf07", "SuperfluidFlowNFTLogicDeployerLibrary"], ["0xf08", "SuperfluidGDAv1DeployerLibrary"], ["0xf09", "SuperfluidGovDeployerLibrary"], ["0xf0a", "SuperfluidHostDeployerLibrary"], diff --git a/packages/hot-fuzz/package.json b/packages/hot-fuzz/package.json index 98dcd72656..30237032c8 100644 --- a/packages/hot-fuzz/package.json +++ b/packages/hot-fuzz/package.json @@ -25,7 +25,7 @@ "@superfluid-finance/ethereum-contracts": "1.8.0" }, "devDependencies": { - "@superfluid-finance/ethereum-contracts": "^1.10.0" + "@superfluid-finance/ethereum-contracts": "^1.11.0" }, "license": "AGPL-3.0", "bugs": { diff --git a/packages/js-sdk/package.json b/packages/js-sdk/package.json index 1f665a8007..76003009a8 100644 --- a/packages/js-sdk/package.json +++ b/packages/js-sdk/package.json @@ -43,13 +43,13 @@ "cloc": "sh tasks/cloc.sh" }, "dependencies": { - "@superfluid-finance/metadata": "^1.3.1", + "@superfluid-finance/metadata": "^1.4.0", "@truffle/contract": "4.6.31", "auto-bind": "4.0.0", "node-fetch": "2.7.0" }, "devDependencies": { - "@superfluid-finance/ethereum-contracts": "^1.10.0", + "@superfluid-finance/ethereum-contracts": "^1.11.0", "chai-as-promised": "^7.1.1", "webpack": "^5.90.1", "webpack-bundle-analyzer": "^4.10.1", diff --git a/packages/metadata/CHANGELOG.md b/packages/metadata/CHANGELOG.md index 5082807fa4..60e1098462 100644 --- a/packages/metadata/CHANGELOG.md +++ b/packages/metadata/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to the metadata will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + + +## [v1.4.0] +### Changed +- Removed FlowNFTs + +## [v1.3.0] +### Added +- VestingScheduler v2 + ## [v1.2.6] ### Changed - Added native token wrapper address for base-sepolia diff --git a/packages/metadata/main/networks/list.cjs b/packages/metadata/main/networks/list.cjs index 660750ca0b..1801ca457b 100644 --- a/packages/metadata/main/networks/list.cjs +++ b/packages/metadata/main/networks/list.cjs @@ -21,8 +21,6 @@ module.exports = "gdaV1": "0x51f571D934C59185f13d17301a36c07A2268B814", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x1C92042426B6bAAe497bEf461B6d8342D03aEc92", - "constantOutflowNFT": "0x49583f57EFeBe733EC872c5d5437116085a3eE3c", - "constantInflowNFT": "0x67d0Efab10b390206b356BA7FB453Ab56AAB7480", "superfluidLoader": "0x36446Ec9C7909608065dEB7f491701d815B880e5", "autowrap": { "manager": "0x30aE282CF477E2eF28B14d0125aCEAd57Fe1d7a1", @@ -68,8 +66,6 @@ module.exports = "gdaV1": "0x9823364056BcA85Dc3c4a3b96801314D082C8Eb9", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x254C2e152E8602839D288A7bccdf3d0974597193", - "constantOutflowNFT": "0xfBE332e001D6b54e1F4B63c2343B8E7746d99Ece", - "constantInflowNFT": "0xC95346B7394009ccEfaA62Eca28797804B2bCF1C", "superfluidLoader": "0x862F59081FC7907F940bE4227b9f485d700E6cdD", "existentialNFTCloneFactory": "0x0D1F0d4629B722b4dFabd195c14F12f2095418d9" }, @@ -106,8 +102,6 @@ module.exports = "gdaV1": "0xd453d38A001B47271488886532f1CCeAbf0c7eF3", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0xfcF0489488397332579f35b0F711BE570Da0E8f5", - "constantOutflowNFT": "0xda6db863cb2EE39b196edB8159c38A1ed5c55344", - "constantInflowNFT": "0x87E00Dced5670e01BEe33a9a724B1dac790937eF", "flowScheduler": "0x73B1Ce21d03ad389C2A291B1d1dc4DAFE7B5Dc68", "vestingScheduler": "0x27444c0235a4D921F3106475faeba0B5e7ABDD7a", "vestingSchedulerV2": "0x3aa62b96f44D0f8892BeBBC819DE8e02E9DE69A8", @@ -161,8 +155,6 @@ module.exports = "idaV1": "0x296556422F44F19E5d216CBf98348A03BDc445E7", "gdaV1": "0x93fA9B627eE016990Fe5e654F923aaE8a480a75b", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", - "constantOutflowNFT": "0xEdB0A24DDb09cFeffF0C5348EB5d6D1C439d36bf", - "constantInflowNFT": "0x1DA4e4F848Cd4D0f528c2D0F19F41226BacB5489", "superfluidLoader": "0xe25603df330027d91A0BAcc3e80a7f9e84930FC6", "superTokenFactory": "0x87560833d59Be057aFc63cFFa3fc531589Ba428F" }, @@ -230,8 +222,6 @@ module.exports = "gdaV1": "0xd7992D358A20478c82dDEd98B3D8A9da46e99b82", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x23410e2659380784498509698ed70E414D384880", - "constantOutflowNFT": "0xfC00dEE8a980110c5608A823a5B3af3872635456", - "constantInflowNFT": "0x1497440B4E92DC4ca0F76223b28C20Cb9cB8a0f1", "superfluidLoader": "0xb688e4Da3100Bcec4b5B3140C8Fb482ad15D2013", "toga": "0xb7DE52F4281a7a276E18C40F94cd93159C4A2d22", "batchLiquidator": "0x27636F8E129cdd4ccA0F30E2b4C116DDaC773bE5", @@ -293,8 +283,6 @@ module.exports = "gdaV1": "0x961dd5A052741B49B6CBf6759591f9D8576fCFb0", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x2C90719f25B10Fc5646c82DA3240C76Fa5BcCF34", - "constantOutflowNFT": "0x554e2bbaCF43FD87417b7201A9F1649a3ED89d68", - "constantInflowNFT": "0x55909bB8cd8276887Aae35118d60b19755201c68", "superfluidLoader": "0x444A48dA32649Ed03eeC9B9cD416748262c320E6", "toga": "0x6AEAeE5Fd4D05A741723D752D30EE4D72690A8f7", "batchLiquidator": "0xA6Cdb472e7E22Bf30ae6fB752E4a13eBF3c12165", @@ -354,8 +342,6 @@ module.exports = "gdaV1": "0x68Ae17fa7a31b86F306c383277552fd4813b0d35", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x8276469A443D5C6B7146BED45e2abCaD3B6adad9", - "constantOutflowNFT": "0xFb2b126660BE2fdEBa254b1F6e4348644E8482e7", - "constantInflowNFT": "0x0C6D90a98426bfD572a5c5Be572a7f6Bd1C5ED76", "superfluidLoader": "0xe8B40071df98bBEe23833905AFcF7b28fC7Ca3cb", "toga": "0xA3c8502187fD7a7118eAD59dc811281448946C8f", "batchLiquidator": "0x36Df169DBf5CE3c6f58D46f0addeF58F01381232", @@ -416,8 +402,6 @@ module.exports = "gdaV1": "0x1e299701792a2aF01408B122419d65Fd2dF0Ba02", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x1C21Ead77fd45C84a4c916Db7A6635D0C6FF09D6", - "constantOutflowNFT": "0x051e766e2d8dc65ae2bFCF084A50AD0447634227", - "constantInflowNFT": "0x0043d7c85C8b96a49A72A92C0B48CdC4720437d7", "superfluidLoader": "0xe8B40071df98bBEe23833905AFcF7b28fC7Ca3cb", "toga": "0xFC63B7C762B10670Eda15cF3ca3970bCDB28C9eF", "batchLiquidator": "0x6C66e5c5D201A753ff497F2e9eC5D545631854d0", @@ -477,8 +461,6 @@ module.exports = "gdaV1": "0xA7b197cD5b0cEF6d62c4A0a851E3581f5E62e4D2", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x464AADdBB2B80f3Cb666522EB7381bE610F638b4", - "constantOutflowNFT": "0x4247bA6C3658Fa5C0F523BAcea8D0b97aF1a175e", - "constantInflowNFT": "0x82b9D8A91A5b333b5A6e78439551ea0E7da153E3", "superfluidLoader": "0x42B709822F18595443c308c1BE5E63CbFEf06481", "toga": "0x3D9A67D5ec1E72CEcA8157e028855056786b6159", "batchLiquidator": "0xdddaD64A9Fe7709A729C4a5428617e369278e0b6", @@ -538,8 +520,6 @@ module.exports = "gdaV1": "0x3bbFA4C406719424C7f66CD97A8Fe27Af383d3e2", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x8bde47397301F0Cd31b9000032fD517a39c946Eb", - "constantOutflowNFT": "0xcb05535bd212eCFC4B7b9db81d6C2C768b726776", - "constantInflowNFT": "0xbF7BCcE8D60A9C3F6bFaEc9346Aa85B9f781a4e9", "superfluidLoader": "0xF353978890204756fc5fa6dfbD16a91eac9E6f4d", "toga": "0xFCD84210f5d51Cd40a30443d44d6A5500d5D10dF", "batchLiquidator": "0x5487d078CA8933e83d91d5E7AFBe3A7bfC3412d6", @@ -655,8 +635,6 @@ module.exports = "gdaV1": "0x308b7405272d11494716e30C6E972DbF6fb89555", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x36be86dEe6BC726Ed0Cbd170ccD2F21760BC73D9", - "constantOutflowNFT": "0xbe49ac1EadAc65dccf204D4Df81d650B50122aB2", - "constantInflowNFT": "0x0FB7694c990CF19001127391Dbe53924dd7a61c7", "superfluidLoader": "0xF0d7d1D47109bA426B9D8A3Cde1941327af1eea3", "toga": "0x9bCa3a623e7b2e248510d88B2894F54898d88F91", "batchLiquidator": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", @@ -695,8 +673,6 @@ module.exports = "gdaV1": "0xfE6c87BE05feDB2059d2EC41bA0A09826C9FD7aa", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0xe20B9a38E0c96F61d1bA6b42a61512D56Fea1Eb3", - "constantOutflowNFT": "0xD3C78bb5a16Ea4ab584844eeb8F90Ac710c16355", - "constantInflowNFT": "0x2d51962A9EE4D3C2819EF585eab7412c2a2C31Ac", "superfluidLoader": "0x9F9EEd9Bbc38E9e0514fD9dFcc0Bca9869A9c534", "toga": "0xA87F76e99f6C8Ff8996d14f550ceF47f193D9A09", "batchLiquidator": "0x889ebeCaD5F8C34Fd96023456d0fC5cE54eb74Cb", @@ -752,8 +728,6 @@ module.exports = "idaV1": "0x4112557F0F228A18654d3C39599421DE9F61144d", "gdaV1": "0x97a9f293d7eD13f3fbD499cE684Ed4F103295a28", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", - "constantOutflowNFT": "0x0de05fe0fF8F5eA9475CA8425e2D05Dd38ccED84", - "constantInflowNFT": "0x8c24Fc82c8fDd763F08E654212fc27e577EbD934", "superfluidLoader": "0x7613030429E95cDFC76FE70f9573037068B51815", "toga": "0x1bF9D75d50fD828a93f69ECB06f2B85767792CEB", "batchLiquidator": "0x3024A39099D4FAE7c9eA8329FAfe05576AEd2c00", @@ -789,8 +763,6 @@ module.exports = "idaV1": "0xb19CE3e7DA9FbAf9De2526BD662A82f26421A53E", "gdaV1": "0x210a01ad187003603B2287F78579ec103Eb70D9B", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", - "constantOutflowNFT": "0xFC29D2db9c952D8253d1291964100C838B236DbD", - "constantInflowNFT": "0xd97b1C090B3A3512E1776197A86fddf8a437D8D1", "superfluidLoader": "0x5fb676d66eAb8E0c22Ae24C5c10eD7E4A6397c1C", "toga": "0x38ed5512Ac11926bB697F4CF4eE0DD04358E2E7e", "batchLiquidator": "0x7BCE8e8401dc98E3Da26F1D701c3C2168b8e466c", diff --git a/packages/metadata/module/networks/list.d.ts b/packages/metadata/module/networks/list.d.ts index 89c1ab04ed..d3427c81e7 100644 --- a/packages/metadata/module/networks/list.d.ts +++ b/packages/metadata/module/networks/list.d.ts @@ -12,8 +12,6 @@ interface ContractAddresses { readonly gdaV1?: string; readonly gdaV1Forwarder?: string; readonly superTokenFactory: string; - readonly constantOutflowNFT?: string; - readonly constantInflowNFT?: string; readonly superfluidLoader: string; readonly toga?: string; readonly vestingScheduler?: string; diff --git a/packages/metadata/module/networks/list.js b/packages/metadata/module/networks/list.js index 203b64c1b6..2079f1be38 100644 --- a/packages/metadata/module/networks/list.js +++ b/packages/metadata/module/networks/list.js @@ -21,8 +21,6 @@ export default "gdaV1": "0x51f571D934C59185f13d17301a36c07A2268B814", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x1C92042426B6bAAe497bEf461B6d8342D03aEc92", - "constantOutflowNFT": "0x49583f57EFeBe733EC872c5d5437116085a3eE3c", - "constantInflowNFT": "0x67d0Efab10b390206b356BA7FB453Ab56AAB7480", "superfluidLoader": "0x36446Ec9C7909608065dEB7f491701d815B880e5", "autowrap": { "manager": "0x30aE282CF477E2eF28B14d0125aCEAd57Fe1d7a1", @@ -68,8 +66,6 @@ export default "gdaV1": "0x9823364056BcA85Dc3c4a3b96801314D082C8Eb9", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x254C2e152E8602839D288A7bccdf3d0974597193", - "constantOutflowNFT": "0xfBE332e001D6b54e1F4B63c2343B8E7746d99Ece", - "constantInflowNFT": "0xC95346B7394009ccEfaA62Eca28797804B2bCF1C", "superfluidLoader": "0x862F59081FC7907F940bE4227b9f485d700E6cdD", "existentialNFTCloneFactory": "0x0D1F0d4629B722b4dFabd195c14F12f2095418d9" }, @@ -106,8 +102,6 @@ export default "gdaV1": "0xd453d38A001B47271488886532f1CCeAbf0c7eF3", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0xfcF0489488397332579f35b0F711BE570Da0E8f5", - "constantOutflowNFT": "0xda6db863cb2EE39b196edB8159c38A1ed5c55344", - "constantInflowNFT": "0x87E00Dced5670e01BEe33a9a724B1dac790937eF", "flowScheduler": "0x73B1Ce21d03ad389C2A291B1d1dc4DAFE7B5Dc68", "vestingScheduler": "0x27444c0235a4D921F3106475faeba0B5e7ABDD7a", "vestingSchedulerV2": "0x3aa62b96f44D0f8892BeBBC819DE8e02E9DE69A8", @@ -161,8 +155,6 @@ export default "idaV1": "0x296556422F44F19E5d216CBf98348A03BDc445E7", "gdaV1": "0x93fA9B627eE016990Fe5e654F923aaE8a480a75b", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", - "constantOutflowNFT": "0xEdB0A24DDb09cFeffF0C5348EB5d6D1C439d36bf", - "constantInflowNFT": "0x1DA4e4F848Cd4D0f528c2D0F19F41226BacB5489", "superfluidLoader": "0xe25603df330027d91A0BAcc3e80a7f9e84930FC6", "superTokenFactory": "0x87560833d59Be057aFc63cFFa3fc531589Ba428F" }, @@ -230,8 +222,6 @@ export default "gdaV1": "0xd7992D358A20478c82dDEd98B3D8A9da46e99b82", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x23410e2659380784498509698ed70E414D384880", - "constantOutflowNFT": "0xfC00dEE8a980110c5608A823a5B3af3872635456", - "constantInflowNFT": "0x1497440B4E92DC4ca0F76223b28C20Cb9cB8a0f1", "superfluidLoader": "0xb688e4Da3100Bcec4b5B3140C8Fb482ad15D2013", "toga": "0xb7DE52F4281a7a276E18C40F94cd93159C4A2d22", "batchLiquidator": "0x27636F8E129cdd4ccA0F30E2b4C116DDaC773bE5", @@ -293,8 +283,6 @@ export default "gdaV1": "0x961dd5A052741B49B6CBf6759591f9D8576fCFb0", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x2C90719f25B10Fc5646c82DA3240C76Fa5BcCF34", - "constantOutflowNFT": "0x554e2bbaCF43FD87417b7201A9F1649a3ED89d68", - "constantInflowNFT": "0x55909bB8cd8276887Aae35118d60b19755201c68", "superfluidLoader": "0x444A48dA32649Ed03eeC9B9cD416748262c320E6", "toga": "0x6AEAeE5Fd4D05A741723D752D30EE4D72690A8f7", "batchLiquidator": "0xA6Cdb472e7E22Bf30ae6fB752E4a13eBF3c12165", @@ -354,8 +342,6 @@ export default "gdaV1": "0x68Ae17fa7a31b86F306c383277552fd4813b0d35", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x8276469A443D5C6B7146BED45e2abCaD3B6adad9", - "constantOutflowNFT": "0xFb2b126660BE2fdEBa254b1F6e4348644E8482e7", - "constantInflowNFT": "0x0C6D90a98426bfD572a5c5Be572a7f6Bd1C5ED76", "superfluidLoader": "0xe8B40071df98bBEe23833905AFcF7b28fC7Ca3cb", "toga": "0xA3c8502187fD7a7118eAD59dc811281448946C8f", "batchLiquidator": "0x36Df169DBf5CE3c6f58D46f0addeF58F01381232", @@ -416,8 +402,6 @@ export default "gdaV1": "0x1e299701792a2aF01408B122419d65Fd2dF0Ba02", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x1C21Ead77fd45C84a4c916Db7A6635D0C6FF09D6", - "constantOutflowNFT": "0x051e766e2d8dc65ae2bFCF084A50AD0447634227", - "constantInflowNFT": "0x0043d7c85C8b96a49A72A92C0B48CdC4720437d7", "superfluidLoader": "0xe8B40071df98bBEe23833905AFcF7b28fC7Ca3cb", "toga": "0xFC63B7C762B10670Eda15cF3ca3970bCDB28C9eF", "batchLiquidator": "0x6C66e5c5D201A753ff497F2e9eC5D545631854d0", @@ -477,8 +461,6 @@ export default "gdaV1": "0xA7b197cD5b0cEF6d62c4A0a851E3581f5E62e4D2", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x464AADdBB2B80f3Cb666522EB7381bE610F638b4", - "constantOutflowNFT": "0x4247bA6C3658Fa5C0F523BAcea8D0b97aF1a175e", - "constantInflowNFT": "0x82b9D8A91A5b333b5A6e78439551ea0E7da153E3", "superfluidLoader": "0x42B709822F18595443c308c1BE5E63CbFEf06481", "toga": "0x3D9A67D5ec1E72CEcA8157e028855056786b6159", "batchLiquidator": "0xdddaD64A9Fe7709A729C4a5428617e369278e0b6", @@ -538,8 +520,6 @@ export default "gdaV1": "0x3bbFA4C406719424C7f66CD97A8Fe27Af383d3e2", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x8bde47397301F0Cd31b9000032fD517a39c946Eb", - "constantOutflowNFT": "0xcb05535bd212eCFC4B7b9db81d6C2C768b726776", - "constantInflowNFT": "0xbF7BCcE8D60A9C3F6bFaEc9346Aa85B9f781a4e9", "superfluidLoader": "0xF353978890204756fc5fa6dfbD16a91eac9E6f4d", "toga": "0xFCD84210f5d51Cd40a30443d44d6A5500d5D10dF", "batchLiquidator": "0x5487d078CA8933e83d91d5E7AFBe3A7bfC3412d6", @@ -655,8 +635,6 @@ export default "gdaV1": "0x308b7405272d11494716e30C6E972DbF6fb89555", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x36be86dEe6BC726Ed0Cbd170ccD2F21760BC73D9", - "constantOutflowNFT": "0xbe49ac1EadAc65dccf204D4Df81d650B50122aB2", - "constantInflowNFT": "0x0FB7694c990CF19001127391Dbe53924dd7a61c7", "superfluidLoader": "0xF0d7d1D47109bA426B9D8A3Cde1941327af1eea3", "toga": "0x9bCa3a623e7b2e248510d88B2894F54898d88F91", "batchLiquidator": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", @@ -695,8 +673,6 @@ export default "gdaV1": "0xfE6c87BE05feDB2059d2EC41bA0A09826C9FD7aa", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0xe20B9a38E0c96F61d1bA6b42a61512D56Fea1Eb3", - "constantOutflowNFT": "0xD3C78bb5a16Ea4ab584844eeb8F90Ac710c16355", - "constantInflowNFT": "0x2d51962A9EE4D3C2819EF585eab7412c2a2C31Ac", "superfluidLoader": "0x9F9EEd9Bbc38E9e0514fD9dFcc0Bca9869A9c534", "toga": "0xA87F76e99f6C8Ff8996d14f550ceF47f193D9A09", "batchLiquidator": "0x889ebeCaD5F8C34Fd96023456d0fC5cE54eb74Cb", @@ -752,8 +728,6 @@ export default "idaV1": "0x4112557F0F228A18654d3C39599421DE9F61144d", "gdaV1": "0x97a9f293d7eD13f3fbD499cE684Ed4F103295a28", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", - "constantOutflowNFT": "0x0de05fe0fF8F5eA9475CA8425e2D05Dd38ccED84", - "constantInflowNFT": "0x8c24Fc82c8fDd763F08E654212fc27e577EbD934", "superfluidLoader": "0x7613030429E95cDFC76FE70f9573037068B51815", "toga": "0x1bF9D75d50fD828a93f69ECB06f2B85767792CEB", "batchLiquidator": "0x3024A39099D4FAE7c9eA8329FAfe05576AEd2c00", @@ -789,8 +763,6 @@ export default "idaV1": "0xb19CE3e7DA9FbAf9De2526BD662A82f26421A53E", "gdaV1": "0x210a01ad187003603B2287F78579ec103Eb70D9B", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", - "constantOutflowNFT": "0xFC29D2db9c952D8253d1291964100C838B236DbD", - "constantInflowNFT": "0xd97b1C090B3A3512E1776197A86fddf8a437D8D1", "superfluidLoader": "0x5fb676d66eAb8E0c22Ae24C5c10eD7E4A6397c1C", "toga": "0x38ed5512Ac11926bB697F4CF4eE0DD04358E2E7e", "batchLiquidator": "0x7BCE8e8401dc98E3Da26F1D701c3C2168b8e466c", diff --git a/packages/metadata/networks.json b/packages/metadata/networks.json index 4afe442ba2..a0df12d090 100644 --- a/packages/metadata/networks.json +++ b/packages/metadata/networks.json @@ -19,8 +19,6 @@ "gdaV1": "0x51f571D934C59185f13d17301a36c07A2268B814", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x1C92042426B6bAAe497bEf461B6d8342D03aEc92", - "constantOutflowNFT": "0x49583f57EFeBe733EC872c5d5437116085a3eE3c", - "constantInflowNFT": "0x67d0Efab10b390206b356BA7FB453Ab56AAB7480", "superfluidLoader": "0x36446Ec9C7909608065dEB7f491701d815B880e5", "autowrap": { "manager": "0x30aE282CF477E2eF28B14d0125aCEAd57Fe1d7a1", @@ -66,8 +64,6 @@ "gdaV1": "0x9823364056BcA85Dc3c4a3b96801314D082C8Eb9", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x254C2e152E8602839D288A7bccdf3d0974597193", - "constantOutflowNFT": "0xfBE332e001D6b54e1F4B63c2343B8E7746d99Ece", - "constantInflowNFT": "0xC95346B7394009ccEfaA62Eca28797804B2bCF1C", "superfluidLoader": "0x862F59081FC7907F940bE4227b9f485d700E6cdD", "existentialNFTCloneFactory": "0x0D1F0d4629B722b4dFabd195c14F12f2095418d9" }, @@ -104,8 +100,6 @@ "gdaV1": "0xd453d38A001B47271488886532f1CCeAbf0c7eF3", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0xfcF0489488397332579f35b0F711BE570Da0E8f5", - "constantOutflowNFT": "0xda6db863cb2EE39b196edB8159c38A1ed5c55344", - "constantInflowNFT": "0x87E00Dced5670e01BEe33a9a724B1dac790937eF", "flowScheduler": "0x73B1Ce21d03ad389C2A291B1d1dc4DAFE7B5Dc68", "vestingScheduler": "0x27444c0235a4D921F3106475faeba0B5e7ABDD7a", "vestingSchedulerV2": "0x3aa62b96f44D0f8892BeBBC819DE8e02E9DE69A8", @@ -159,8 +153,6 @@ "idaV1": "0x296556422F44F19E5d216CBf98348A03BDc445E7", "gdaV1": "0x93fA9B627eE016990Fe5e654F923aaE8a480a75b", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", - "constantOutflowNFT": "0xEdB0A24DDb09cFeffF0C5348EB5d6D1C439d36bf", - "constantInflowNFT": "0x1DA4e4F848Cd4D0f528c2D0F19F41226BacB5489", "superfluidLoader": "0xe25603df330027d91A0BAcc3e80a7f9e84930FC6", "superTokenFactory": "0x87560833d59Be057aFc63cFFa3fc531589Ba428F" }, @@ -228,8 +220,6 @@ "gdaV1": "0xd7992D358A20478c82dDEd98B3D8A9da46e99b82", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x23410e2659380784498509698ed70E414D384880", - "constantOutflowNFT": "0xfC00dEE8a980110c5608A823a5B3af3872635456", - "constantInflowNFT": "0x1497440B4E92DC4ca0F76223b28C20Cb9cB8a0f1", "superfluidLoader": "0xb688e4Da3100Bcec4b5B3140C8Fb482ad15D2013", "toga": "0xb7DE52F4281a7a276E18C40F94cd93159C4A2d22", "batchLiquidator": "0x27636F8E129cdd4ccA0F30E2b4C116DDaC773bE5", @@ -291,8 +281,6 @@ "gdaV1": "0x961dd5A052741B49B6CBf6759591f9D8576fCFb0", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x2C90719f25B10Fc5646c82DA3240C76Fa5BcCF34", - "constantOutflowNFT": "0x554e2bbaCF43FD87417b7201A9F1649a3ED89d68", - "constantInflowNFT": "0x55909bB8cd8276887Aae35118d60b19755201c68", "superfluidLoader": "0x444A48dA32649Ed03eeC9B9cD416748262c320E6", "toga": "0x6AEAeE5Fd4D05A741723D752D30EE4D72690A8f7", "batchLiquidator": "0xA6Cdb472e7E22Bf30ae6fB752E4a13eBF3c12165", @@ -352,8 +340,6 @@ "gdaV1": "0x68Ae17fa7a31b86F306c383277552fd4813b0d35", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x8276469A443D5C6B7146BED45e2abCaD3B6adad9", - "constantOutflowNFT": "0xFb2b126660BE2fdEBa254b1F6e4348644E8482e7", - "constantInflowNFT": "0x0C6D90a98426bfD572a5c5Be572a7f6Bd1C5ED76", "superfluidLoader": "0xe8B40071df98bBEe23833905AFcF7b28fC7Ca3cb", "toga": "0xA3c8502187fD7a7118eAD59dc811281448946C8f", "batchLiquidator": "0x36Df169DBf5CE3c6f58D46f0addeF58F01381232", @@ -414,8 +400,6 @@ "gdaV1": "0x1e299701792a2aF01408B122419d65Fd2dF0Ba02", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x1C21Ead77fd45C84a4c916Db7A6635D0C6FF09D6", - "constantOutflowNFT": "0x051e766e2d8dc65ae2bFCF084A50AD0447634227", - "constantInflowNFT": "0x0043d7c85C8b96a49A72A92C0B48CdC4720437d7", "superfluidLoader": "0xe8B40071df98bBEe23833905AFcF7b28fC7Ca3cb", "toga": "0xFC63B7C762B10670Eda15cF3ca3970bCDB28C9eF", "batchLiquidator": "0x6C66e5c5D201A753ff497F2e9eC5D545631854d0", @@ -475,8 +459,6 @@ "gdaV1": "0xA7b197cD5b0cEF6d62c4A0a851E3581f5E62e4D2", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x464AADdBB2B80f3Cb666522EB7381bE610F638b4", - "constantOutflowNFT": "0x4247bA6C3658Fa5C0F523BAcea8D0b97aF1a175e", - "constantInflowNFT": "0x82b9D8A91A5b333b5A6e78439551ea0E7da153E3", "superfluidLoader": "0x42B709822F18595443c308c1BE5E63CbFEf06481", "toga": "0x3D9A67D5ec1E72CEcA8157e028855056786b6159", "batchLiquidator": "0xdddaD64A9Fe7709A729C4a5428617e369278e0b6", @@ -536,8 +518,6 @@ "gdaV1": "0x3bbFA4C406719424C7f66CD97A8Fe27Af383d3e2", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x8bde47397301F0Cd31b9000032fD517a39c946Eb", - "constantOutflowNFT": "0xcb05535bd212eCFC4B7b9db81d6C2C768b726776", - "constantInflowNFT": "0xbF7BCcE8D60A9C3F6bFaEc9346Aa85B9f781a4e9", "superfluidLoader": "0xF353978890204756fc5fa6dfbD16a91eac9E6f4d", "toga": "0xFCD84210f5d51Cd40a30443d44d6A5500d5D10dF", "batchLiquidator": "0x5487d078CA8933e83d91d5E7AFBe3A7bfC3412d6", @@ -653,8 +633,6 @@ "gdaV1": "0x308b7405272d11494716e30C6E972DbF6fb89555", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x36be86dEe6BC726Ed0Cbd170ccD2F21760BC73D9", - "constantOutflowNFT": "0xbe49ac1EadAc65dccf204D4Df81d650B50122aB2", - "constantInflowNFT": "0x0FB7694c990CF19001127391Dbe53924dd7a61c7", "superfluidLoader": "0xF0d7d1D47109bA426B9D8A3Cde1941327af1eea3", "toga": "0x9bCa3a623e7b2e248510d88B2894F54898d88F91", "batchLiquidator": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", @@ -693,8 +671,6 @@ "gdaV1": "0xfE6c87BE05feDB2059d2EC41bA0A09826C9FD7aa", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0xe20B9a38E0c96F61d1bA6b42a61512D56Fea1Eb3", - "constantOutflowNFT": "0xD3C78bb5a16Ea4ab584844eeb8F90Ac710c16355", - "constantInflowNFT": "0x2d51962A9EE4D3C2819EF585eab7412c2a2C31Ac", "superfluidLoader": "0x9F9EEd9Bbc38E9e0514fD9dFcc0Bca9869A9c534", "toga": "0xA87F76e99f6C8Ff8996d14f550ceF47f193D9A09", "batchLiquidator": "0x889ebeCaD5F8C34Fd96023456d0fC5cE54eb74Cb", @@ -750,8 +726,6 @@ "idaV1": "0x4112557F0F228A18654d3C39599421DE9F61144d", "gdaV1": "0x97a9f293d7eD13f3fbD499cE684Ed4F103295a28", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", - "constantOutflowNFT": "0x0de05fe0fF8F5eA9475CA8425e2D05Dd38ccED84", - "constantInflowNFT": "0x8c24Fc82c8fDd763F08E654212fc27e577EbD934", "superfluidLoader": "0x7613030429E95cDFC76FE70f9573037068B51815", "toga": "0x1bF9D75d50fD828a93f69ECB06f2B85767792CEB", "batchLiquidator": "0x3024A39099D4FAE7c9eA8329FAfe05576AEd2c00", @@ -787,8 +761,6 @@ "idaV1": "0xb19CE3e7DA9FbAf9De2526BD662A82f26421A53E", "gdaV1": "0x210a01ad187003603B2287F78579ec103Eb70D9B", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", - "constantOutflowNFT": "0xFC29D2db9c952D8253d1291964100C838B236DbD", - "constantInflowNFT": "0xd97b1C090B3A3512E1776197A86fddf8a437D8D1", "superfluidLoader": "0x5fb676d66eAb8E0c22Ae24C5c10eD7E4A6397c1C", "toga": "0x38ed5512Ac11926bB697F4CF4eE0DD04358E2E7e", "batchLiquidator": "0x7BCE8e8401dc98E3Da26F1D701c3C2168b8e466c", diff --git a/packages/metadata/package.json b/packages/metadata/package.json index d3de958985..b48874142a 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -1,6 +1,6 @@ { "name": "@superfluid-finance/metadata", - "version": "1.3.1", + "version": "1.4.0", "description": "Superfluid Metadata", "main": "main/index.cjs", "module": "module/index.js", diff --git a/packages/sdk-core/CHANGELOG.md b/packages/sdk-core/CHANGELOG.md index ed3a55597f..256e301e42 100644 --- a/packages/sdk-core/CHANGELOG.md +++ b/packages/sdk-core/CHANGELOG.md @@ -10,6 +10,12 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Changed ### Fixed +## [0.8.0] - 2024-08-01 + +### Breaking + +- Removed all FlowNFT related functionality, because deprecated from the protocol + ## [0.7.1] - 2024-06-19 ### Updated diff --git a/packages/sdk-core/package.json b/packages/sdk-core/package.json index 526ad6c16b..4b1724c92a 100644 --- a/packages/sdk-core/package.json +++ b/packages/sdk-core/package.json @@ -1,6 +1,6 @@ { "name": "@superfluid-finance/sdk-core", - "version": "0.7.1", + "version": "0.8.0", "description": "SDK Core for building with Superfluid Protocol", "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/sdk-core#readme", "repository": { @@ -46,18 +46,19 @@ "generate": "run-s generate:*", "generate:ajv-validations": "ts-node scripts/ajv.ts", "generate:graphql-types": "graphql-codegen --config subgraph-codegen.yml", - "generate-graphql-schema": "yarn generate-graphql-schema:v1", - "generate-graphql-schema:local": "get-graphql-schema http://localhost:8000/subgraphs/name/superfluid-test > src/subgraph/schema.graphql", - "generate-graphql-schema:v1": "get-graphql-schema https://subgraph-endpoints.superfluid.dev/optimism-mainnet/protocol-v1 > src/subgraph/schema.graphql", - "generate-graphql-schema:dev": "get-graphql-schema https://subgraph-endpoints.superfluid.dev/optimism-sepolia/protocol-v1 > src/subgraph/schema.graphql", + "get-graphql-schema": "yarn get-graphql-schema:v1", + "get-graphql-schema:local": "get-graphql-schema http://localhost:8000/subgraphs/name/superfluid-test > src/subgraph/schema.graphql", + "get-graphql-schema:v1": "get-graphql-schema https://subgraph-endpoints.superfluid.dev/optimism-mainnet/protocol-v1 > src/subgraph/schema.graphql", + "get-graphql-schema:dev": "get-graphql-schema https://subgraph-endpoints.superfluid.dev/optimism-sepolia/protocol-v1 > src/subgraph/schema.graphql", + "get-graphql-schema:custom-url": "get-graphql-schema $1 > src/subgraph/schema.graphql", "cloc": "sh tasks/cloc.sh" }, "bugs": { "url": "https://github.com/superfluid-finance/protocol-monorepo/issues" }, "dependencies": { - "@superfluid-finance/ethereum-contracts": "^1.10.0", - "@superfluid-finance/metadata": "^1.3.1", + "@superfluid-finance/ethereum-contracts": "^1.11.0", + "@superfluid-finance/metadata": "^1.4.0", "browserify": "^17.0.0", "graphql-request": "^6.1.0", "lodash": "^4.17.21", diff --git a/packages/sdk-core/src/ConstantInflowNFT.ts b/packages/sdk-core/src/ConstantInflowNFT.ts deleted file mode 100644 index 85abb311d8..0000000000 --- a/packages/sdk-core/src/ConstantInflowNFT.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ethers } from "ethers"; - -import FlowNFTBase from "./FlowNFTBase"; -import { - ConstantInflowNFT__factory, - IConstantInflowNFT, -} from "./typechain-types"; - -export default class ConstantInflowNFT extends FlowNFTBase { - override readonly contract: IConstantInflowNFT; - constructor(address: string) { - super(address); - this.contract = new ethers.Contract( - address, - ConstantInflowNFT__factory.abi - ) as IConstantInflowNFT; - } -} diff --git a/packages/sdk-core/src/ConstantOutflowNFT.ts b/packages/sdk-core/src/ConstantOutflowNFT.ts deleted file mode 100644 index e081da27df..0000000000 --- a/packages/sdk-core/src/ConstantOutflowNFT.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ethers } from "ethers"; - -import FlowNFTBase from "./FlowNFTBase"; -import { - ConstantOutflowNFT__factory, - IConstantOutflowNFT, -} from "./typechain-types"; - -export default class ConstantOutflowNFT extends FlowNFTBase { - override readonly contract: IConstantOutflowNFT; - constructor(address: string) { - super(address); - this.contract = new ethers.Contract( - address, - ConstantOutflowNFT__factory.abi - ) as IConstantOutflowNFT; - } -} diff --git a/packages/sdk-core/src/ERC721Token.ts b/packages/sdk-core/src/ERC721Token.ts index f7feee9647..aafb6d5473 100644 --- a/packages/sdk-core/src/ERC721Token.ts +++ b/packages/sdk-core/src/ERC721Token.ts @@ -12,15 +12,10 @@ import { ERC721SetApprovalForAllParams, ERC721TokenURIParams, ERC721TransferFromParams, - NFTFlowData, ProviderOrSigner, } from "./interfaces"; -import { - IERC721Metadata, - IERC721Metadata__factory, - IFlowNFTBase, -} from "./typechain-types"; -import { getSanitizedTimestamp, normalizeAddress } from "./utils"; +import { IERC721Metadata, IERC721Metadata__factory } from "./typechain-types"; +import { normalizeAddress } from "./utils"; export default class ERC721MetadataToken { readonly address: string; @@ -292,19 +287,4 @@ export default class ERC721MetadataToken { ); return new Operation(txn, "UNSUPPORTED"); }; - - /** - * Sanitizes NFTFlowData, converting number to Date. - * @param params NFTFlowData - * @returns {NFTFlowData} sanitized NFTFlowData - */ - _sanitizeNFTFlowData = ( - params: IFlowNFTBase.FlowNFTDataStructOutput - ): NFTFlowData => { - return { - flowSender: params.flowSender, - flowStartDate: getSanitizedTimestamp(params.flowStartDate), - flowReceiver: params.flowReceiver, - }; - }; } diff --git a/packages/sdk-core/src/FlowNFTBase.ts b/packages/sdk-core/src/FlowNFTBase.ts deleted file mode 100644 index 9b95fd2872..0000000000 --- a/packages/sdk-core/src/FlowNFTBase.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { ethers } from "ethers"; - -import ERC721MetadataToken from "./ERC721Token"; -import { SFError } from "./SFError"; -import { NFTFlowData } from "./interfaces"; -import { FlowNFTBase__factory, IFlowNFTBase } from "./typechain-types"; -import { normalizeAddress } from "./utils"; - -export default class FlowNFTBase extends ERC721MetadataToken { - override readonly contract: IFlowNFTBase; - constructor(address: string) { - super(address); - this.contract = new ethers.Contract( - address, - FlowNFTBase__factory.abi - ) as IFlowNFTBase; - } - - /** ### ConstantInflowNFT Contract Read Functions ### */ - - /** - * Returns the computed `tokenId` of a flow NFT given a sender and receiver. - * @param sender the flow sender - * @param receiver the flow receiver - * @returns - */ - getTokenId = async ({ - superToken, - sender, - receiver, - providerOrSigner, - }: { - superToken: string; - sender: string; - receiver: string; - providerOrSigner: ethers.providers.Provider | ethers.Signer; - }): Promise => { - const normalizedSuperToken = normalizeAddress(superToken); - const normalizedSender = normalizeAddress(sender); - const normalizedReceiver = normalizeAddress(receiver); - try { - const tokenId = await this.contract - - .connect(providerOrSigner) - .getTokenId( - normalizedSuperToken, - normalizedSender, - normalizedReceiver - ); - return tokenId.toString(); - } catch (err) { - throw new SFError({ - type: "NFT_READ", - message: "There was an error getting token id", - cause: err, - }); - } - }; - - /** - * Returns the NFT flow data of the NFT with `tokenId`. - * @param tokenId the token id - * @returns {NFTFlowData} the NFT flow data - */ - flowDataByTokenId = async ({ - tokenId, - providerOrSigner, - }: { - tokenId: string; - providerOrSigner: ethers.providers.Provider | ethers.Signer; - }): Promise => { - try { - const flowData = await this.contract - .connect(providerOrSigner) - .flowDataByTokenId(tokenId); - return this._sanitizeNFTFlowData(flowData); - } catch (err) { - throw new SFError({ - type: "NFT_READ", - message: "There was an error getting flow data by token id", - cause: err, - }); - } - }; -} diff --git a/packages/sdk-core/src/SuperToken.ts b/packages/sdk-core/src/SuperToken.ts index b44286b5d4..51c7965842 100644 --- a/packages/sdk-core/src/SuperToken.ts +++ b/packages/sdk-core/src/SuperToken.ts @@ -1,8 +1,6 @@ import { BytesLike, ethers, Overrides } from "ethers"; import ConstantFlowAgreementV1 from "./ConstantFlowAgreementV1"; -import ConstantInflowNFT from "./ConstantInflowNFT"; -import ConstantOutflowNFT from "./ConstantOutflowNFT"; import ERC20Token from "./ERC20Token"; import GeneralDistributionAgreementV1 from "./GeneralDistributionAgreementV1"; import Governance from "./Governance"; @@ -72,11 +70,6 @@ import { tryGet, } from "./utils"; -export interface NFTAddresses { - readonly constantInflowNFTProxy: string; - readonly constantOutflowNFTProxy: string; -} - export interface ITokenSettings { readonly address: string; readonly config: IConfig; @@ -105,10 +98,6 @@ export default abstract class SuperToken extends ERC20Token { readonly gdaV1: GeneralDistributionAgreementV1; readonly governance: Governance; readonly underlyingToken?: ERC20Token; - readonly constantOutflowNFTProxy?: ConstantOutflowNFT; - readonly constantInflowNFTProxy?: ConstantInflowNFT; - readonly constantOutflowNFTLogic?: string; - readonly constantInflowNFTLogic?: string; override readonly contract: ISuperToken; protected constructor(options: ITokenOptions, settings: ITokenSettings) { @@ -183,73 +172,21 @@ export default abstract class SuperToken extends ERC20Token { const nativeTokenSymbol = resolverData.nativeTokenSymbol || "ETH"; const nativeSuperTokenSymbol = nativeTokenSymbol + "x"; - // @note This is tech debt and should be reverted once GoodDollar upgrades their token contract - // @note We are using tryGet here just to handle GoodDollar not having - // CONSTANT_OUTFLOW_NFT in its SuperToken implementation. - let constantOutflowNFTProxy = await tryGet( - superToken.CONSTANT_OUTFLOW_NFT(), - ethers.constants.AddressZero - ); - let constantInflowNFTProxy = await tryGet( - superToken.CONSTANT_INFLOW_NFT(), - ethers.constants.AddressZero - ); - - // @note We only want to run this bit of code for GoodDollar SuperTokens - // (dev and mainnet) - const GOOD_DOLLAR_SYMBOL = "G$"; - if (tokenSymbol === GOOD_DOLLAR_SYMBOL) { - // @note we need to create a new interface for the old GoodDollar SuperToken - // which contains the functions for constantInflowNFT and constantOutflowNFT - const oldSuperTokenInterface = new ethers.utils.Interface([ - "function constantInflowNFT() view returns (address)", - "function constantOutflowNFT() view returns (address)", - ]); - const goodDollarSpecificToken = new ethers.Contract( - superToken.address, - oldSuperTokenInterface - ); - - // @note we attempt to get the constantInflowNFT and constantOutflowNFT - if (constantOutflowNFTProxy === ethers.constants.AddressZero) { - constantOutflowNFTProxy = await tryGet( - goodDollarSpecificToken.constantOutflowNFT(), - ethers.constants.AddressZero - ); - } - if (constantInflowNFTProxy === ethers.constants.AddressZero) { - constantInflowNFTProxy = await tryGet( - goodDollarSpecificToken.constantInflowNFT(), - ethers.constants.AddressZero - ); - } - } - - const nftAddresses: NFTAddresses = { - constantOutflowNFTProxy, - constantInflowNFTProxy, - }; - if (nativeSuperTokenSymbol === tokenSymbol) { return new NativeAssetSuperToken( options, settings, - nativeTokenSymbol, - nftAddresses + nativeTokenSymbol ); } if (underlyingTokenAddress !== ethers.constants.AddressZero) { - return new WrapperSuperToken( - options, - { - ...settings, - underlyingTokenAddress, - }, - nftAddresses - ); + return new WrapperSuperToken(options, { + ...settings, + underlyingTokenAddress, + }); } - return new PureSuperToken(options, settings, nftAddresses); + return new PureSuperToken(options, settings); } catch (err) { throw new SFError({ type: "SUPERTOKEN_INITIALIZATION", @@ -1042,22 +979,13 @@ export default abstract class SuperToken extends ERC20Token { */ export class WrapperSuperToken extends SuperToken { override readonly underlyingToken: ERC20Token; - override readonly constantOutflowNFTProxy: ConstantOutflowNFT; - override readonly constantInflowNFTProxy: ConstantInflowNFT; constructor( options: ITokenOptions, - settings: ITokenSettings & { underlyingTokenAddress: string }, - nftAddresses: NFTAddresses + settings: ITokenSettings & { underlyingTokenAddress: string } ) { super(options, settings); this.underlyingToken = new ERC20Token(settings.underlyingTokenAddress); - this.constantInflowNFTProxy = new ConstantInflowNFT( - nftAddresses.constantInflowNFTProxy - ); - this.constantOutflowNFTProxy = new ConstantOutflowNFT( - nftAddresses.constantOutflowNFTProxy - ); } /** ### WrapperSuperToken Contract Write Functions ### */ @@ -1159,21 +1087,8 @@ export class WrapperSuperToken extends SuperToken { * PureSuperToken doesn't have any underlying ERC20 token. */ export class PureSuperToken extends SuperToken { - override readonly constantOutflowNFTProxy: ConstantOutflowNFT; - override readonly constantInflowNFTProxy: ConstantInflowNFT; - - constructor( - options: ITokenOptions, - settings: ITokenSettings, - nftAddresses: NFTAddresses - ) { + constructor(options: ITokenOptions, settings: ITokenSettings) { super(options, settings); - this.constantInflowNFTProxy = new ConstantInflowNFT( - nftAddresses.constantInflowNFTProxy - ); - this.constantOutflowNFTProxy = new ConstantOutflowNFT( - nftAddresses.constantOutflowNFTProxy - ); } } @@ -1182,23 +1097,14 @@ export class PureSuperToken extends SuperToken { */ export class NativeAssetSuperToken extends SuperToken { readonly nativeTokenSymbol: string; - override readonly constantOutflowNFTProxy: ConstantOutflowNFT; - override readonly constantInflowNFTProxy: ConstantInflowNFT; constructor( options: ITokenOptions, settings: ITokenSettings, - nativeTokenSymbol: string, - nftAddresses: NFTAddresses + nativeTokenSymbol: string ) { super(options, settings); this.nativeTokenSymbol = nativeTokenSymbol; - this.constantInflowNFTProxy = new ConstantInflowNFT( - nftAddresses.constantInflowNFTProxy - ); - this.constantOutflowNFTProxy = new ConstantOutflowNFT( - nftAddresses.constantOutflowNFTProxy - ); } get nativeAssetContract() { diff --git a/packages/sdk-core/src/events.ts b/packages/sdk-core/src/events.ts index ad2cd8aa0d..03c9c8a07a 100644 --- a/packages/sdk-core/src/events.ts +++ b/packages/sdk-core/src/events.ts @@ -68,8 +68,6 @@ export type OtherEvents = | DistributionClaimedEvent | MemberUnitsUpdatedEvent | ApprovalEvent - | ApprovalForAllEvent - | MetadataUpdateEvent | UnknownEvent; export type AllEvents = AccountEvents | OtherEvents; @@ -183,7 +181,6 @@ export interface TransferEvent extends EventBase { to: string; value: string; token: string; - isNFTTransfer: boolean; } export interface AgreementClassRegisteredEvent extends EventBase { @@ -469,13 +466,6 @@ export interface MemberUnitsUpdatedEvent extends EventBase { } export interface ApprovalEvent extends EventBase { name: "ApprovalEvent"; - isNFTApproval: boolean; -} -export interface ApprovalForAllEvent extends EventBase { - name: "ApprovalForAllEvent"; -} -export interface MetadataUpdateEvent extends EventBase { - name: "MetadataUpdateEvent"; } export interface UnknownEvent extends EventBase { diff --git a/packages/sdk-core/src/mapGetAllEventsQueryEvents.ts b/packages/sdk-core/src/mapGetAllEventsQueryEvents.ts index 9d144e19af..dabd3f5969 100644 --- a/packages/sdk-core/src/mapGetAllEventsQueryEvents.ts +++ b/packages/sdk-core/src/mapGetAllEventsQueryEvents.ts @@ -598,7 +598,6 @@ export const mapGetAllEventsQueryEvents = ( to: x.to.id, token: x.token, value: x.value, - isNFTTransfer: x.isNFTTransfer, }); case "TrustedForwarderChangedEvent": return typeGuard({ @@ -761,29 +760,6 @@ export const mapGetAllEventsQueryEvents = ( order: Number(x.order), timestamp: Number(x.timestamp), logIndex: Number(x.logIndex), - isNFTApproval: x.isNFTApproval, - }); - case "ApprovalForAllEvent": - return typeGuard({ - name: "ApprovalForAllEvent", - id: x.id, - blockNumber: Number(x.blockNumber), - transactionHash: x.transactionHash, - gasPrice: x.gasPrice, - order: Number(x.order), - timestamp: Number(x.timestamp), - logIndex: Number(x.logIndex), - }); - case "MetadataUpdateEvent": - return typeGuard({ - name: "MetadataUpdateEvent", - id: x.id, - blockNumber: Number(x.blockNumber), - transactionHash: x.transactionHash, - gasPrice: x.gasPrice, - order: Number(x.order), - timestamp: Number(x.timestamp), - logIndex: Number(x.logIndex), }); default: // eslint-disable-next-line no-case-declarations diff --git a/packages/sdk-core/src/subgraph/events/events.graphql b/packages/sdk-core/src/subgraph/events/events.graphql index e72b88c012..b3e583d42e 100644 --- a/packages/sdk-core/src/subgraph/events/events.graphql +++ b/packages/sdk-core/src/subgraph/events/events.graphql @@ -1033,12 +1033,6 @@ query events( ... on ApprovalEvent { ...approvalEvent } - ... on ApprovalForAllEvent { - ...approvalForAllEvent - } - ... on MetadataUpdateEvent { - ...metadataUpdateEvent - } } } @@ -1207,7 +1201,6 @@ fragment transferEvent on TransferEvent { ...eventFields value token - isNFTTransfer to { id } @@ -1479,11 +1472,4 @@ fragment memberUnitsUpdatedEvent on MemberUnitsUpdatedEvent { } fragment approvalEvent on ApprovalEvent { ...eventFields - isNFTApproval -} -fragment approvalForAllEvent on ApprovalForAllEvent { - ...eventFields -} -fragment metadataUpdateEvent on MetadataUpdateEvent { - ...eventFields -} +} \ No newline at end of file diff --git a/packages/sdk-core/src/subgraph/queries/getAllEvents.graphql b/packages/sdk-core/src/subgraph/queries/getAllEvents.graphql index 3846b67f48..a4d132a140 100644 --- a/packages/sdk-core/src/subgraph/queries/getAllEvents.graphql +++ b/packages/sdk-core/src/subgraph/queries/getAllEvents.graphql @@ -162,7 +162,6 @@ query getAllEvents( from { id } - isNFTTransfer } ... on TokenUpgradedEvent { ...eventFields @@ -398,13 +397,6 @@ query getAllEvents( ...eventFields } ... on ApprovalEvent { - isNFTApproval - ...eventFields - } - ... on ApprovalForAllEvent { - ...eventFields - } - ... on MetadataUpdateEvent { ...eventFields } } diff --git a/packages/sdk-core/src/subgraph/schema.graphql b/packages/sdk-core/src/subgraph/schema.graphql index fb5e6f06c5..7781fd8a42 100644 --- a/packages/sdk-core/src/subgraph/schema.graphql +++ b/packages/sdk-core/src/subgraph/schema.graphql @@ -21,6 +21,9 @@ type _Block_ { """Integer representation of the timestamp stored in blocks for the chain""" timestamp: Int + + """The hash of the parent block""" + parentHash: Bytes } """The type for the top-level _meta field""" @@ -1605,6 +1608,11 @@ enum AccountTokenSnapshotLog_orderBy { accountTokenSnapshot__totalAmountTransferredUntilUpdatedAt } +enum Aggregation_interval { + hour + day +} + type AgreementClassRegisteredEvent implements Event { id: ID! transactionHash: Bytes! @@ -2629,7 +2637,7 @@ type ApprovalEvent implements Event { """ Contains the addresses that were impacted by this event: - addresses[0] = `isNFTApproval` ? `nft address` : `token` (superToken) + addresses[0] = `token` (superToken) addresses[1] = `owner` addresses[2] = `to` @@ -2640,37 +2648,23 @@ type ApprovalEvent implements Event { order: BigInt! """ - The address that will be granting allowance to transfer ERC20/NFT. + The address that will be granting allowance to transfer ERC20. """ owner: Account! """ - The address that will be granted allowance to transfer ERC20/NFT. + The address that will be granted allowance to transfer ERC20. """ to: Account! - """ - Indicates whether the event was emitted for the approval of an NFT. - - """ - isNFTApproval: Boolean! - """ If `amount` is non-zero, this event was emitted for the approval of an ERC20. Tne amount of ERC20 tokens that will be granted allowance to transfer. """ amount: BigInt! - - """ - If `tokenId` is non-zero, this event was emitted for the approval of an NFT. - The id of the NFT that will be granted allowance to transfer. - The id is: uint256(keccak256(abi.encode(block.chainid, superToken, sender, receiver))) - - """ - tokenId: BigInt! } input ApprovalEvent_filter { @@ -2808,10 +2802,6 @@ input ApprovalEvent_filter { to_not_ends_with: String to_not_ends_with_nocase: String to_: Account_filter - isNFTApproval: Boolean - isNFTApproval_not: Boolean - isNFTApproval_in: [Boolean!] - isNFTApproval_not_in: [Boolean!] amount: BigInt amount_not: BigInt amount_gt: BigInt @@ -2820,14 +2810,6 @@ input ApprovalEvent_filter { amount_lte: BigInt amount_in: [BigInt!] amount_not_in: [BigInt!] - tokenId: BigInt - tokenId_not: BigInt - tokenId_gt: BigInt - tokenId_lt: BigInt - tokenId_gte: BigInt - tokenId_lte: BigInt - tokenId_in: [BigInt!] - tokenId_not_in: [BigInt!] """Filter for the block changed event.""" _change_block: BlockChangedFilter @@ -2860,217 +2842,7 @@ enum ApprovalEvent_orderBy { to__updatedAtTimestamp to__updatedAtBlockNumber to__isSuperApp - isNFTApproval amount - tokenId -} - -type ApprovalForAllEvent implements Event { - id: ID! - transactionHash: Bytes! - gasPrice: BigInt! - gasUsed: BigInt! - timestamp: BigInt! - name: String! - - """ - Contains the addresses that were impacted by this event: - addresses[0] = NFT address - addresses[1] = `owner` - addresses[2] = `operator` - - """ - addresses: [Bytes!]! - blockNumber: BigInt! - logIndex: BigInt! - order: BigInt! - owner: Account! - - """ - The address that will be granted operator permissions for the all of the owner's tokens. - - """ - operator: Account! - - """ - Whether the operator is enabled or disabled for `owner`. - - """ - approved: Boolean! -} - -input ApprovalForAllEvent_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - transactionHash: Bytes - transactionHash_not: Bytes - transactionHash_gt: Bytes - transactionHash_lt: Bytes - transactionHash_gte: Bytes - transactionHash_lte: Bytes - transactionHash_in: [Bytes!] - transactionHash_not_in: [Bytes!] - transactionHash_contains: Bytes - transactionHash_not_contains: Bytes - gasPrice: BigInt - gasPrice_not: BigInt - gasPrice_gt: BigInt - gasPrice_lt: BigInt - gasPrice_gte: BigInt - gasPrice_lte: BigInt - gasPrice_in: [BigInt!] - gasPrice_not_in: [BigInt!] - gasUsed: BigInt - gasUsed_not: BigInt - gasUsed_gt: BigInt - gasUsed_lt: BigInt - gasUsed_gte: BigInt - gasUsed_lte: BigInt - gasUsed_in: [BigInt!] - gasUsed_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - name: String - name_not: String - name_gt: String - name_lt: String - name_gte: String - name_lte: String - name_in: [String!] - name_not_in: [String!] - name_contains: String - name_contains_nocase: String - name_not_contains: String - name_not_contains_nocase: String - name_starts_with: String - name_starts_with_nocase: String - name_not_starts_with: String - name_not_starts_with_nocase: String - name_ends_with: String - name_ends_with_nocase: String - name_not_ends_with: String - name_not_ends_with_nocase: String - addresses: [Bytes!] - addresses_not: [Bytes!] - addresses_contains: [Bytes!] - addresses_contains_nocase: [Bytes!] - addresses_not_contains: [Bytes!] - addresses_not_contains_nocase: [Bytes!] - blockNumber: BigInt - blockNumber_not: BigInt - blockNumber_gt: BigInt - blockNumber_lt: BigInt - blockNumber_gte: BigInt - blockNumber_lte: BigInt - blockNumber_in: [BigInt!] - blockNumber_not_in: [BigInt!] - logIndex: BigInt - logIndex_not: BigInt - logIndex_gt: BigInt - logIndex_lt: BigInt - logIndex_gte: BigInt - logIndex_lte: BigInt - logIndex_in: [BigInt!] - logIndex_not_in: [BigInt!] - order: BigInt - order_not: BigInt - order_gt: BigInt - order_lt: BigInt - order_gte: BigInt - order_lte: BigInt - order_in: [BigInt!] - order_not_in: [BigInt!] - owner: String - owner_not: String - owner_gt: String - owner_lt: String - owner_gte: String - owner_lte: String - owner_in: [String!] - owner_not_in: [String!] - owner_contains: String - owner_contains_nocase: String - owner_not_contains: String - owner_not_contains_nocase: String - owner_starts_with: String - owner_starts_with_nocase: String - owner_not_starts_with: String - owner_not_starts_with_nocase: String - owner_ends_with: String - owner_ends_with_nocase: String - owner_not_ends_with: String - owner_not_ends_with_nocase: String - owner_: Account_filter - operator: String - operator_not: String - operator_gt: String - operator_lt: String - operator_gte: String - operator_lte: String - operator_in: [String!] - operator_not_in: [String!] - operator_contains: String - operator_contains_nocase: String - operator_not_contains: String - operator_not_contains_nocase: String - operator_starts_with: String - operator_starts_with_nocase: String - operator_not_starts_with: String - operator_not_starts_with_nocase: String - operator_ends_with: String - operator_ends_with_nocase: String - operator_not_ends_with: String - operator_not_ends_with_nocase: String - operator_: Account_filter - approved: Boolean - approved_not: Boolean - approved_in: [Boolean!] - approved_not_in: [Boolean!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [ApprovalForAllEvent_filter] - or: [ApprovalForAllEvent_filter] -} - -enum ApprovalForAllEvent_orderBy { - id - transactionHash - gasPrice - gasUsed - timestamp - name - addresses - blockNumber - logIndex - order - owner - owner__id - owner__createdAtTimestamp - owner__createdAtBlockNumber - owner__updatedAtTimestamp - owner__updatedAtBlockNumber - owner__isSuperApp - operator - operator__id - operator__createdAtTimestamp - operator__createdAtBlockNumber - operator__updatedAtTimestamp - operator__updatedAtBlockNumber - operator__isSuperApp - approved } scalar BigDecimal @@ -8865,153 +8637,6 @@ enum MemberUnitsUpdatedEvent_orderBy { poolMember__syncedPerUnitFlowRate } -type MetadataUpdateEvent implements Event { - id: ID! - transactionHash: Bytes! - gasPrice: BigInt! - gasUsed: BigInt! - timestamp: BigInt! - name: String! - - """ - Empty addresses array. - - """ - addresses: [Bytes!]! - blockNumber: BigInt! - logIndex: BigInt! - order: BigInt! - - """ - The id of the NFT that will be granted allowance to transfer. - The id is: uint256(keccak256(abi.encode(block.chainid, superToken, sender, receiver))) - - """ - tokenId: BigInt! -} - -input MetadataUpdateEvent_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - transactionHash: Bytes - transactionHash_not: Bytes - transactionHash_gt: Bytes - transactionHash_lt: Bytes - transactionHash_gte: Bytes - transactionHash_lte: Bytes - transactionHash_in: [Bytes!] - transactionHash_not_in: [Bytes!] - transactionHash_contains: Bytes - transactionHash_not_contains: Bytes - gasPrice: BigInt - gasPrice_not: BigInt - gasPrice_gt: BigInt - gasPrice_lt: BigInt - gasPrice_gte: BigInt - gasPrice_lte: BigInt - gasPrice_in: [BigInt!] - gasPrice_not_in: [BigInt!] - gasUsed: BigInt - gasUsed_not: BigInt - gasUsed_gt: BigInt - gasUsed_lt: BigInt - gasUsed_gte: BigInt - gasUsed_lte: BigInt - gasUsed_in: [BigInt!] - gasUsed_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - name: String - name_not: String - name_gt: String - name_lt: String - name_gte: String - name_lte: String - name_in: [String!] - name_not_in: [String!] - name_contains: String - name_contains_nocase: String - name_not_contains: String - name_not_contains_nocase: String - name_starts_with: String - name_starts_with_nocase: String - name_not_starts_with: String - name_not_starts_with_nocase: String - name_ends_with: String - name_ends_with_nocase: String - name_not_ends_with: String - name_not_ends_with_nocase: String - addresses: [Bytes!] - addresses_not: [Bytes!] - addresses_contains: [Bytes!] - addresses_contains_nocase: [Bytes!] - addresses_not_contains: [Bytes!] - addresses_not_contains_nocase: [Bytes!] - blockNumber: BigInt - blockNumber_not: BigInt - blockNumber_gt: BigInt - blockNumber_lt: BigInt - blockNumber_gte: BigInt - blockNumber_lte: BigInt - blockNumber_in: [BigInt!] - blockNumber_not_in: [BigInt!] - logIndex: BigInt - logIndex_not: BigInt - logIndex_gt: BigInt - logIndex_lt: BigInt - logIndex_gte: BigInt - logIndex_lte: BigInt - logIndex_in: [BigInt!] - logIndex_not_in: [BigInt!] - order: BigInt - order_not: BigInt - order_gt: BigInt - order_lt: BigInt - order_gte: BigInt - order_lte: BigInt - order_in: [BigInt!] - order_not_in: [BigInt!] - tokenId: BigInt - tokenId_not: BigInt - tokenId_gt: BigInt - tokenId_lt: BigInt - tokenId_gte: BigInt - tokenId_lte: BigInt - tokenId_in: [BigInt!] - tokenId_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [MetadataUpdateEvent_filter] - or: [MetadataUpdateEvent_filter] -} - -enum MetadataUpdateEvent_orderBy { - id - transactionHash - gasPrice - gasUsed - timestamp - name - addresses - blockNumber - logIndex - order - tokenId -} - type MintedEvent implements Event { id: ID! transactionHash: Bytes! @@ -12625,86 +12250,6 @@ type Query { """ subgraphError: _SubgraphErrorPolicy_! = deny ): [ApprovalEvent!]! - approvalForAllEvent( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): ApprovalForAllEvent - approvalForAllEvents( - skip: Int = 0 - first: Int = 100 - orderBy: ApprovalForAllEvent_orderBy - orderDirection: OrderDirection - where: ApprovalForAllEvent_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [ApprovalForAllEvent!]! - metadataUpdateEvent( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): MetadataUpdateEvent - metadataUpdateEvents( - skip: Int = 0 - first: Int = 100 - orderBy: MetadataUpdateEvent_orderBy - orderDirection: OrderDirection - where: MetadataUpdateEvent_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [MetadataUpdateEvent!]! customSuperTokenCreatedEvent( id: ID! @@ -17478,86 +17023,6 @@ type Subscription { """ subgraphError: _SubgraphErrorPolicy_! = deny ): [ApprovalEvent!]! - approvalForAllEvent( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): ApprovalForAllEvent - approvalForAllEvents( - skip: Int = 0 - first: Int = 100 - orderBy: ApprovalForAllEvent_orderBy - orderDirection: OrderDirection - where: ApprovalForAllEvent_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [ApprovalForAllEvent!]! - metadataUpdateEvent( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): MetadataUpdateEvent - metadataUpdateEvents( - skip: Int = 0 - first: Int = 100 - orderBy: MetadataUpdateEvent_orderBy - orderDirection: OrderDirection - where: MetadataUpdateEvent_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [MetadataUpdateEvent!]! customSuperTokenCreatedEvent( id: ID! @@ -20321,6 +19786,12 @@ enum SuperTokenMinimumDepositChangedEvent_orderBy { minimumDeposit } +""" +A string representation of microseconds UNIX timestamp (16 digits) + +""" +scalar Timestamp + """ Token: A higher order entity created for super tokens (and underlying tokens) that are "valid" (tokens that have Superfluid's host contract address set as the host). @@ -22204,7 +21675,7 @@ type TransferEvent implements Event { """ Contains the addresses that were impacted by this event: - addresses[0] = `token` (superToken if `isNFTTransfer` is false, otherwise the ConstantOutflowNFT or ConstantInflowNFT) + addresses[0] = `token` addresses[1] = `from` addresses[2] = `to` @@ -22215,18 +21686,7 @@ type TransferEvent implements Event { order: BigInt! from: Account! to: Account! - isNFTTransfer: Boolean! - - """ - If `isNFTTransfer` is true, value is the `tokenId` of the NFT transferred. - - """ value: BigInt! - - """ - If `isNFTTransfer` is true, value is the NFT address, else it is the SuperToken address. - - """ token: Bytes! } @@ -22365,10 +21825,6 @@ input TransferEvent_filter { to_not_ends_with: String to_not_ends_with_nocase: String to_: Account_filter - isNFTTransfer: Boolean - isNFTTransfer_not: Boolean - isNFTTransfer_in: [Boolean!] - isNFTTransfer_not_in: [Boolean!] value: BigInt value_not: BigInt value_gt: BigInt @@ -22419,7 +21875,6 @@ enum TransferEvent_orderBy { to__updatedAtTimestamp to__updatedAtBlockNumber to__isSuperApp - isNFTTransfer value token } diff --git a/packages/sdk-core/test/1.4_supertoken_nft.test.ts b/packages/sdk-core/test/1.4_supertoken_nft.test.ts deleted file mode 100644 index 8ff3085f3a..0000000000 --- a/packages/sdk-core/test/1.4_supertoken_nft.test.ts +++ /dev/null @@ -1,348 +0,0 @@ -import { expect } from "chai"; - -import { makeSuite, TestEnvironment } from "./TestEnvironment"; -import { getPerSecondFlowRateByMonth } from "../src"; - -const createFlow = async (testEnv: TestEnvironment) => { - const flowRate = getPerSecondFlowRateByMonth("1000"); - await testEnv.wrapperSuperToken - .createFlow({ - sender: testEnv.alice.address, - receiver: testEnv.bob.address, - flowRate, - }) - .exec(testEnv.alice); - - return await testEnv.wrapperSuperToken.constantOutflowNFTProxy.getTokenId({ - superToken: testEnv.wrapperSuperToken.address, - sender: testEnv.alice.address, - receiver: testEnv.bob.address, - providerOrSigner: testEnv.alice, - }); -}; - -makeSuite("SuperToken-NFT Tests", (testEnv: TestEnvironment) => { - describe("Revert cases", () => { - it("Should revert when trying to transferFrom", async () => { - const tokenId = await createFlow(testEnv); - - await expect( - testEnv.wrapperSuperToken.constantOutflowNFTProxy - .transferFrom({ - from: testEnv.alice.address, - to: testEnv.bob.address, - tokenId, - }) - .exec(testEnv.alice) - ).to.be.revertedWithCustomError( - testEnv.wrapperSuperToken.constantOutflowNFTProxy.contract, - "CFA_NFT_TRANSFER_IS_NOT_ALLOWED" - ); - }); - - it("Should revert when trying to safeTransferFrom", async () => { - const tokenId = await createFlow(testEnv); - - await expect( - testEnv.wrapperSuperToken.constantOutflowNFTProxy - .safeTransferFrom({ - from: testEnv.alice.address, - to: testEnv.bob.address, - tokenId, - }) - .exec(testEnv.alice) - ).to.be.revertedWithCustomError( - testEnv.wrapperSuperToken.constantOutflowNFTProxy.contract, - "CFA_NFT_TRANSFER_IS_NOT_ALLOWED" - ); - }); - - it("Should revert when trying to safeTransferFromWithData", async () => { - const tokenId = await createFlow(testEnv); - - await expect( - testEnv.wrapperSuperToken.constantOutflowNFTProxy - .safeTransferFromWithData({ - from: testEnv.alice.address, - to: testEnv.bob.address, - tokenId, - data: "0x", - }) - .exec(testEnv.alice) - ).to.be.revertedWithCustomError( - testEnv.wrapperSuperToken.constantOutflowNFTProxy.contract, - "CFA_NFT_TRANSFER_IS_NOT_ALLOWED" - ); - }); - - it("Should revert if ownerOf token does not exist", async () => { - try { - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.ownerOf( - { - tokenId: "69", - providerOrSigner: testEnv.alice, - } - ); - } catch (err: any) { - expect(err.message).to.contain("CFA_NFT_INVALID_TOKEN_ID"); - } - }); - - it("Should revert if approve to owner", async () => { - const tokenId = await createFlow(testEnv); - - await expect( - testEnv.wrapperSuperToken.constantOutflowNFTProxy - .approve({ - approved: testEnv.alice.address, - tokenId, - }) - .exec(testEnv.alice) - ).to.be.revertedWithCustomError( - testEnv.wrapperSuperToken.constantOutflowNFTProxy.contract, - "CFA_NFT_APPROVE_TO_CURRENT_OWNER" - ); - }); - - it("Should revert if approve on behalf of someone else", async () => { - const tokenId = await createFlow(testEnv); - - await expect( - testEnv.wrapperSuperToken.constantOutflowNFTProxy - .approve({ - approved: testEnv.bob.address, - tokenId, - }) - .exec(testEnv.bob) - ).to.be.revertedWithCustomError( - testEnv.wrapperSuperToken.constantOutflowNFTProxy.contract, - "CFA_NFT_APPROVE_CALLER_NOT_OWNER_OR_APPROVED_FOR_ALL" - ); - }); - - it("Should catch error in balanceOf", async () => { - try { - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.balanceOf( - { - owner: "0x", - providerOrSigner: testEnv.alice, - } - ); - } catch (err: any) { - expect(err.message).to.contain( - "There was an error getting balanceOf" - ); - } - }); - - it("Should catch error in getApproved", async () => { - try { - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.getApproved( - { - tokenId: "0x", - providerOrSigner: testEnv.alice, - } - ); - } catch (err: any) { - expect(err.message).to.contain( - "There was an error getting getApproved" - ); - } - }); - - it("Should catch error in isApprovedForAll", async () => { - try { - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.isApprovedForAll( - { - owner: "0x", - operator: "0x", - providerOrSigner: testEnv.alice, - } - ); - } catch (err: any) { - expect(err.message).to.contain( - "There was an error getting isApprovedForAll" - ); - } - }); - - it("Should catch error in name", async () => { - try { - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.name({ - providerOrSigner: testEnv.alice, - }); - } catch (err: any) { - expect(err.message).to.contain( - "There was an error getting name" - ); - } - }); - - it("Should catch error in symbol", async () => { - try { - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.symbol({ - providerOrSigner: testEnv.alice, - }); - } catch (err: any) { - expect(err.message).to.contain( - "There was an error getting symbol" - ); - } - }); - - it("Should catch error in tokenURI", async () => { - try { - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.tokenURI( - { - tokenId: "0x", - providerOrSigner: testEnv.alice, - } - ); - } catch (err: any) { - expect(err.message).to.contain( - "There was an error getting tokenURI" - ); - } - }); - - it("Should catch error in getTokenId", async () => { - try { - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.getTokenId( - { - superToken: testEnv.wrapperSuperToken.address, - sender: testEnv.alice.address, - receiver: testEnv.bob.address, - providerOrSigner: "testEnv.alice" as any, - } - ); - } catch (err: any) { - expect(err.message).to.contain( - "There was an error getting token id" - ); - } - }); - - it("Should catch error in flowDataByTokenId", async () => { - try { - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.flowDataByTokenId( - { - tokenId: "0x", - providerOrSigner: testEnv.alice, - } - ); - } catch (err: any) { - expect(err.message).to.contain( - "There was an error getting flow data by token id" - ); - } - }); - }); - - describe("Happy Path Tests", () => { - it("Should be able to get flowDataByTokenId", async () => { - const tokenId = await createFlow(testEnv); - - const flowData = - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.flowDataByTokenId( - { - tokenId, - providerOrSigner: testEnv.alice, - } - ); - expect(flowData.flowSender).to.equal(testEnv.alice.address); - expect(flowData.flowReceiver).to.equal(testEnv.bob.address); - }); - - it("Should be able to approve", async () => { - const tokenId = await createFlow(testEnv); - - await testEnv.wrapperSuperToken.constantOutflowNFTProxy - .approve({ - approved: testEnv.bob.address, - tokenId, - }) - .exec(testEnv.alice); - - const approved = - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.getApproved( - { - tokenId, - providerOrSigner: testEnv.alice, - } - ); - expect(approved).to.equal(testEnv.bob.address); - }); - - it("Should be able to setApprovalForAll", async () => { - await testEnv.wrapperSuperToken.constantOutflowNFTProxy - .setApprovalForAll({ - operator: testEnv.bob.address, - approved: true, - }) - .exec(testEnv.alice); - - const approved = - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.isApprovedForAll( - { - owner: testEnv.alice.address, - operator: testEnv.bob.address, - providerOrSigner: testEnv.alice, - } - ); - expect(approved).to.equal(true); - }); - - it("Should be able to get ownerOf", async () => { - const tokenId = await createFlow(testEnv); - - const owner = - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.ownerOf( - { - tokenId, - providerOrSigner: testEnv.alice, - } - ); - expect(owner).to.equal(testEnv.alice.address); - }); - - it("Should be able to get balanceOf (always returns 1)", async () => { - const balance = - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.balanceOf( - { - owner: testEnv.alice.address, - providerOrSigner: testEnv.alice, - } - ); - expect(balance.toString()).to.equal("1"); - }); - - it("Should be able to get name", async () => { - const name = - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.name({ - providerOrSigner: testEnv.alice, - }); - expect(name).to.equal("Constant Outflow NFT"); - }); - - it("Should be able to get tokenURI", async () => { - const tokenId = await createFlow(testEnv); - - const tokenURI = - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.tokenURI( - { - tokenId, - providerOrSigner: testEnv.alice, - } - ); - expect(tokenURI).to.not.be.empty; - }); - - it("Should be able to get symbol", async () => { - const symbol = - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.symbol({ - providerOrSigner: testEnv.alice, - }); - expect(symbol.toString()).to.equal("COF"); - }); - }); -}); diff --git a/packages/sdk-redux/CHANGELOG.md b/packages/sdk-redux/CHANGELOG.md index cb3e71513f..b35a69bd06 100644 --- a/packages/sdk-redux/CHANGELOG.md +++ b/packages/sdk-redux/CHANGELOG.md @@ -7,6 +7,12 @@ All notable changes to the SDK-redux will be documented in this file. ### Changed ### Fixed +## [0.6.1] - 2024-08-01 + +### Changed + +- sdk-core dependency update + ## [0.6.0] - 2023-05-01 ### Changed diff --git a/packages/sdk-redux/package.json b/packages/sdk-redux/package.json index 2430bca178..f196714c45 100644 --- a/packages/sdk-redux/package.json +++ b/packages/sdk-redux/package.json @@ -1,6 +1,6 @@ { "name": "@superfluid-finance/sdk-redux", - "version": "0.6.0", + "version": "0.6.1", "description": "SDK Redux for streamlined front-end application development with Superfluid Protocol", "homepage": "https://docs.superfluid.finance/", "repository": { @@ -52,7 +52,7 @@ }, "peerDependencies": { "@reduxjs/toolkit": "^1.7.0 || ^1.8.0 || ^1.9.0", - "@superfluid-finance/sdk-core": "^0.7.0" + "@superfluid-finance/sdk-core": ">0.7.0" }, "files": [ "dist/main", diff --git a/packages/subgraph/CHANGELOG.md b/packages/subgraph/CHANGELOG.md index b9d7348e2e..dfaa232bb8 100644 --- a/packages/subgraph/CHANGELOG.md +++ b/packages/subgraph/CHANGELOG.md @@ -6,6 +6,12 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +## [2.1.0] + +## Breaking + +- Removed FlowNFT related entities and attributes + ## [2.0.0] ### Changed diff --git a/packages/subgraph/README.md b/packages/subgraph/README.md index fe052bbcae..3c560b8b13 100644 --- a/packages/subgraph/README.md +++ b/packages/subgraph/README.md @@ -38,7 +38,7 @@ If you get stuck, see The Graph [docs](https://thegraph.com/docs/quick-start#loc First install these dependencies: - [docker](https://docs.docker.com/install/) -- [docker-compose](https://docs.docker.com/compose/install/) +- [docker compose](https://docs.docker.com/compose/install/) Now install the necessary node packages with the following commands: @@ -56,7 +56,7 @@ npx hardhat node --hostname 0.0.0.0 ### Setting up a local Subgraph node instance -Run `docker-compose up` in `packages/subgraph`. There is a `docker-compose.yml` file which sets up a local graph node container. +Run `docker compose up` in `packages/subgraph`. There is a `docker-compose.yml` file which sets up a local graph node container. You should see logs start coming in on the same terminal window once everything is set up: diff --git a/packages/subgraph/config/mock.json b/packages/subgraph/config/mock.json index 0a91e0f421..0fa37532d9 100644 --- a/packages/subgraph/config/mock.json +++ b/packages/subgraph/config/mock.json @@ -7,7 +7,5 @@ "gdaAddress": "0x0000000000000000000000000000000000000000", "superTokenFactoryAddress": "0x0000000000000000000000000000000000000000", "resolverV1Address": "0x0000000000000000000000000000000000000000", - "nativeAssetSuperTokenAddress": "0x0000000000000000000000000000000000000000", - "constantOutflowNFTAddress": "0x0000000000000000000000000000000000000000", - "constantInflowNFTAddress": "0x0000000000000000000000000000000000000000" + "nativeAssetSuperTokenAddress": "0x0000000000000000000000000000000000000000" } diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 3b6554cbfe..201715ce97 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -1,6 +1,6 @@ { "name": "@superfluid-finance/subgraph", - "version": "2.0.0", + "version": "2.1.0", "description": "Subgraph for the Superfluid Ethereum contracts.", "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/subgraph", "repository": { @@ -52,11 +52,11 @@ "dependencies": { "@graphprotocol/graph-cli": "0.73.0", "@graphprotocol/graph-ts": "0.35.1", - "@superfluid-finance/sdk-core": "^0.7.1", + "@superfluid-finance/sdk-core": "^0.8.0", "mustache": "^4.2.0" }, "devDependencies": { - "@superfluid-finance/metadata": "^1.3.1", + "@superfluid-finance/metadata": "^1.4.0", "coingecko-api": "^1.0.10", "graphql": "^16.8.1", "graphql-request": "^6.1.0", diff --git a/packages/subgraph/schema.graphql b/packages/subgraph/schema.graphql index d66a1060da..6e81290bf0 100644 --- a/packages/subgraph/schema.graphql +++ b/packages/subgraph/schema.graphql @@ -1423,7 +1423,7 @@ type TransferEvent implements Event @entity(immutable: true) { """ Contains the addresses that were impacted by this event: - addresses[0] = `token` (superToken if `isNFTTransfer` is false, otherwise the ConstantOutflowNFT or ConstantInflowNFT) + addresses[0] = `token` addresses[1] = `from` addresses[2] = `to` """ @@ -1434,15 +1434,8 @@ type TransferEvent implements Event @entity(immutable: true) { from: Account! to: Account! - isNFTTransfer: Boolean! - """ - If `isNFTTransfer` is true, value is the `tokenId` of the NFT transferred. - """ value: BigInt! - """ - If `isNFTTransfer` is true, value is the NFT address, else it is the SuperToken address. - """ token: Bytes! } @@ -1492,8 +1485,6 @@ type TokenUpgradedEvent implements Event @entity(immutable: true) { amount: BigInt! } - -# NFTs # type ApprovalEvent implements Event @entity(immutable: true) { id: ID! transactionHash: Bytes! @@ -1504,7 +1495,7 @@ type ApprovalEvent implements Event @entity(immutable: true) { """ Contains the addresses that were impacted by this event: - addresses[0] = `isNFTApproval` ? `nft address` : `token` (superToken) + addresses[0] = `token` (superToken) addresses[1] = `owner` addresses[2] = `to` """ @@ -1514,86 +1505,20 @@ type ApprovalEvent implements Event @entity(immutable: true) { order: BigInt! """ - The address that will be granting allowance to transfer ERC20/NFT. + The address that will be granting allowance to transfer ERC20. """ owner: Account! """ - The address that will be granted allowance to transfer ERC20/NFT. + The address that will be granted allowance to transfer ERC20. """ to: Account! - """ - Indicates whether the event was emitted for the approval of an NFT. - """ - isNFTApproval: Boolean! - """ If `amount` is non-zero, this event was emitted for the approval of an ERC20. Tne amount of ERC20 tokens that will be granted allowance to transfer. """ amount: BigInt! - - """ - If `tokenId` is non-zero, this event was emitted for the approval of an NFT. - The id of the NFT that will be granted allowance to transfer. - The id is: uint256(keccak256(abi.encode(block.chainid, superToken, sender, receiver))) - """ - tokenId: BigInt! -} - -type ApprovalForAllEvent implements Event @entity(immutable: true) { - id: ID! - transactionHash: Bytes! - gasPrice: BigInt! - gasUsed: BigInt! - timestamp: BigInt! - name: String! - - """ - Contains the addresses that were impacted by this event: - addresses[0] = NFT address - addresses[1] = `owner` - addresses[2] = `operator` - """ - addresses: [Bytes!]! - blockNumber: BigInt! - logIndex: BigInt! - order: BigInt! - - owner: Account! - - """ - The address that will be granted operator permissions for the all of the owner's tokens. - """ - operator: Account! - """ - Whether the operator is enabled or disabled for `owner`. - """ - approved: Boolean! -} - -type MetadataUpdateEvent implements Event @entity(immutable: true) { - id: ID! - transactionHash: Bytes! - gasPrice: BigInt! - gasUsed: BigInt! - timestamp: BigInt! - name: String! - - """ - Empty addresses array. - """ - addresses: [Bytes!]! - blockNumber: BigInt! - logIndex: BigInt! - order: BigInt! - - """ - The id of the NFT that will be granted allowance to transfer. - The id is: uint256(keccak256(abi.encode(block.chainid, superToken, sender, receiver))) - """ - tokenId: BigInt! } # SuperTokenFactory # diff --git a/packages/subgraph/scripts/buildNetworkConfig.ts b/packages/subgraph/scripts/buildNetworkConfig.ts index b73edf3c99..d89d5f56f7 100644 --- a/packages/subgraph/scripts/buildNetworkConfig.ts +++ b/packages/subgraph/scripts/buildNetworkConfig.ts @@ -12,8 +12,6 @@ interface SubgraphConfig { readonly superTokenFactoryAddress: string; readonly resolverV1Address: string; readonly nativeAssetSuperTokenAddress: string; - readonly constantOutflowNFTAddress: string; - readonly constantInflowNFTAddress: string; readonly indexerHints_prune: string; } @@ -35,7 +33,7 @@ function main() { const networkName = process.argv[2]; const vendorName = process.argv[3]; - const networkMetadata = metadata.getNetworkByName(networkName); + const networkMetadata = metadata.getNetworkByName(networkName); if (!networkMetadata) { throw new Error("No metadata found"); @@ -51,8 +49,6 @@ function main() { superTokenFactoryAddress: networkMetadata.contractsV1.superTokenFactory, resolverV1Address: networkMetadata.contractsV1.resolver, nativeAssetSuperTokenAddress: networkMetadata.nativeTokenWrapper, - constantOutflowNFTAddress: networkMetadata.contractsV1.constantOutflowNFT || ADDRESS_ZERO, - constantInflowNFTAddress: networkMetadata.contractsV1.constantInflowNFT || ADDRESS_ZERO, indexerHints_prune: vendorHistoryPruning[vendorName] || "never", }; diff --git a/packages/subgraph/scripts/getAbi.js b/packages/subgraph/scripts/getAbi.js index b3502b1385..924c0cdfe9 100755 --- a/packages/subgraph/scripts/getAbi.js +++ b/packages/subgraph/scripts/getAbi.js @@ -4,7 +4,6 @@ const path = require("path"); const contracts = [ "ERC20", "IConstantFlowAgreementV1", - "IFlowNFTBase", "ISuperTokenFactory", "ISuperToken", "ISuperfluid", diff --git a/packages/subgraph/src/mappings/flowNFT.ts b/packages/subgraph/src/mappings/flowNFT.ts deleted file mode 100644 index af232c8485..0000000000 --- a/packages/subgraph/src/mappings/flowNFT.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { - Approval, - ApprovalForAll, - Transfer, - MetadataUpdate, -} from "../../generated/ConstantInflowNFT/IFlowNFTBase"; -import { - ApprovalEvent, - ApprovalForAllEvent, - MetadataUpdateEvent, - TransferEvent, -} from "../../generated/schema"; -import { getOrInitAccount } from "../mappingHelpers"; -import { BIG_INT_ONE, createEventID, initializeEventEntity } from "../utils"; - -export function handleApproval(event: Approval): void { - const eventId = createEventID("Approval", event); - const ev = new ApprovalEvent(eventId); - initializeEventEntity(ev, event, [event.address, event.params.owner, event.params.approved]); - ev.owner = event.params.owner.toHex(); - ev.to = event.params.approved.toHex(); - ev.tokenId = event.params.tokenId; - ev.amount = BIG_INT_ONE.neg(); - ev.isNFTApproval = true; - - ev.save(); -} - -export function handleApprovalForAll(event: ApprovalForAll): void { - const eventId = createEventID("ApprovalForAll", event); - const ev = new ApprovalForAllEvent(eventId); - initializeEventEntity(ev, event, [event.address, event.params.owner, event.params.operator]); - ev.owner = event.params.owner.toHex(); - ev.operator = event.params.operator.toHex(); - ev.approved = event.params.approved; - - ev.save(); -} - -export function handleTransfer(event: Transfer): void { - const eventId = createEventID("Transfer", event); - const ev = new TransferEvent(eventId); - initializeEventEntity(ev, event, [ - event.address, - event.params.from, - event.params.to, - ]); - ev.isNFTTransfer = true; - ev.from = event.params.from.toHex(); - ev.to = event.params.to.toHex(); - ev.value = event.params.tokenId; - ev.token = event.address; - - ev.save(); - - getOrInitAccount(event.params.to, event.block); - getOrInitAccount(event.params.from, event.block); -} - -export function handleMetadataUpdate(event: MetadataUpdate): void { - const eventId = createEventID("MetadataUpdate", event); - const ev = new MetadataUpdateEvent(eventId); - initializeEventEntity(ev, event, []); - ev.tokenId = event.params.tokenId; - - ev.save(); -} \ No newline at end of file diff --git a/packages/subgraph/src/mappings/superToken.ts b/packages/subgraph/src/mappings/superToken.ts index 18be4b2050..164a2c8abf 100644 --- a/packages/subgraph/src/mappings/superToken.ts +++ b/packages/subgraph/src/mappings/superToken.ts @@ -444,7 +444,6 @@ function _createTransferEventEntity(event: Transfer): void { event.params.from, event.params.to, ]); - ev.isNFTTransfer = false; ev.from = event.params.from.toHex(); ev.to = event.params.to.toHex(); ev.value = event.params.value; @@ -458,9 +457,7 @@ export function handleApproval(event: Approval): void { initializeEventEntity(ev, event, [event.address, event.params.owner, event.params.spender]); ev.owner = event.params.owner.toHex(); ev.to = event.params.spender.toHex(); - ev.tokenId = BIG_INT_ZERO; ev.amount = event.params.value; - ev.isNFTApproval = false; ev.save(); diff --git a/packages/subgraph/subgraph.template.yaml b/packages/subgraph/subgraph.template.yaml index 5c0226f970..498fa057d3 100644 --- a/packages/subgraph/subgraph.template.yaml +++ b/packages/subgraph/subgraph.template.yaml @@ -291,76 +291,6 @@ dataSources: - event: Set(indexed string,address) handler: handleSet receipt: true - - kind: ethereum/contract - name: ConstantOutflowNFT - network: {{ network }} - source: - address: "{{ constantOutflowNFTAddress }}" - abi: IFlowNFTBase - startBlock: {{ hostStartBlock }} - mapping: - kind: ethereum/events - apiVersion: 0.0.8 - language: wasm/assemblyscript - file: ./src/mappings/flowNFT.ts - entities: - - ApprovalEvent - - ApprovalForAllEvent - - MetadataUpdateEvent - - TransferEvent - abis: - - name: IFlowNFTBase - file: ./abis/IFlowNFTBase.json - - name: ISuperfluid - file: ./abis/ISuperfluid.json - eventHandlers: - - event: Transfer(indexed address,indexed address,indexed uint256) - handler: handleTransfer - receipt: true - - event: Approval(indexed address,indexed address,indexed uint256) - handler: handleApproval - receipt: true - - event: ApprovalForAll(indexed address,indexed address,bool) - handler: handleApprovalForAll - receipt: true - - event: MetadataUpdate(uint256) - handler: handleMetadataUpdate - receipt: true - - kind: ethereum/contract - name: ConstantInflowNFT - network: {{ network }} - source: - address: "{{ constantInflowNFTAddress }}" - abi: IFlowNFTBase - startBlock: {{ hostStartBlock }} - mapping: - kind: ethereum/events - apiVersion: 0.0.8 - language: wasm/assemblyscript - file: ./src/mappings/flowNFT.ts - entities: - - ApprovalEvent - - ApprovalForAllEvent - - MetadataUpdateEvent - - TransferEvent - abis: - - name: IFlowNFTBase - file: ./abis/IFlowNFTBase.json - - name: ISuperfluid - file: ./abis/ISuperfluid.json - eventHandlers: - - event: Transfer(indexed address,indexed address,indexed uint256) - handler: handleTransfer - receipt: true - - event: Approval(indexed address,indexed address,indexed uint256) - handler: handleApproval - receipt: true - - event: ApprovalForAll(indexed address,indexed address,bool) - handler: handleApprovalForAll - receipt: true - - event: MetadataUpdate(uint256) - handler: handleMetadataUpdate - receipt: true templates: - name: SuperToken kind: ethereum/contract diff --git a/packages/subgraph/tasks/setup-graph-node.sh b/packages/subgraph/tasks/setup-graph-node.sh index f5050dae5d..f7758a3d98 100644 --- a/packages/subgraph/tasks/setup-graph-node.sh +++ b/packages/subgraph/tasks/setup-graph-node.sh @@ -7,8 +7,8 @@ if ! which docker >/dev/null 2>&1 ; then exit 1 fi -if ! which docker-compose >/dev/null 2>&1; then - echo "Please install 'docker-compose' first" +if ! docker compose --help >/dev/null 2>&1; then + echo "Please install 'docker compose' first" exit 1 fi @@ -18,10 +18,10 @@ if ! which jq >/dev/null 2>&1; then fi # Create the graph-node container -docker-compose up --no-start graph-node +docker compose up --no-start graph-node # Start graph-node so we can inspect it -docker-compose start graph-node +docker compose start graph-node # Identify the container ID CONTAINER_ID=$(docker container ls | grep graph-node | cut -d' ' -f1) @@ -36,7 +36,7 @@ sed -i -e "s/host.docker.internal/$HOST_IP/g" docker-compose.yml function stop_graph_node { # Ensure graph-node is stopped - docker-compose stop graph-node + docker compose stop graph-node } trap stop_graph_node EXIT diff --git a/packages/subgraph/tests/superToken/event/superToken.event.test.ts b/packages/subgraph/tests/superToken/event/superToken.event.test.ts index b04f280ba2..f2ae06e9af 100644 --- a/packages/subgraph/tests/superToken/event/superToken.event.test.ts +++ b/packages/subgraph/tests/superToken/event/superToken.event.test.ts @@ -359,8 +359,6 @@ describe("SuperToken Mapper Unit Tests", () => { assert.fieldEquals("ApprovalEvent", id, "owner", owner); assert.fieldEquals("ApprovalEvent", id, "to", spender); assert.fieldEquals("ApprovalEvent", id, "amount", value.toString()); - assert.fieldEquals("ApprovalEvent", id, "isNFTApproval", FALSE); - assert.fieldEquals("ApprovalEvent", id, "tokenId", "0"); }); test("handleTransfer() - Should create a new TransferEvent entity", () => { @@ -506,21 +504,21 @@ describe("SuperToken Mapper Unit Tests", () => { "operatorData", operatorData.toHexString() ); - }); + }); test("TokenStatistic::totalNumberOfHolders should decrease its count when a user transfers tokens and the balance reaches 0.", () => { const from = alice; const to = bob; const value = BigInt.fromI32(100); - + const transferEvent = createTransferEvent( from, to, value ); - + handleTransfer(transferEvent); - + const id = assertEventBaseProperties( transferEvent, "Transfer" @@ -528,7 +526,7 @@ describe("SuperToken Mapper Unit Tests", () => { assert.fieldEquals("TransferEvent", id, "from", from); assert.fieldEquals("TransferEvent", id, "to", to); assert.fieldEquals("TransferEvent", id, "value", value.toString()); - + assertTokenStatisticProperties( null, null, @@ -558,7 +556,7 @@ describe("SuperToken Mapper Unit Tests", () => { BIG_INT_ZERO, // totalSupply = 0 2, // totalNumberOfAccounts, 2 // totalNumberOfHolders - ); + ); const secondTransferEvent = createTransferEvent( From b9cd1885ad1b5c576c4e5772d3ac29823ec95669 Mon Sep 17 00:00:00 2001 From: Didi Date: Wed, 7 Aug 2024 13:56:41 +0200 Subject: [PATCH 29/42] [CI] Fix sdk core workflow (#1999) * gov-upgrade-super-token-logic: auto-include tokens using the previous canonical logic * fix multisig detection * disable FlowNFT hooks * remove unused imports * ? * don't update IDA, don't update FlowNFTs, remove bad test code * remove obsolete tests * fix deploy script for tests * updated CHANGELOG * not in this PR * flowNFT purging * more removal, changing subgraph too. WIP * fix tests & devcontainer * fetch newest schema and fix sdk-core build * bump sdk-redux version * remove from verification script * appease linter * remove ApprovalForAllEvent * one more * github runner switched to docker compose v2 * removed MetadataUpdate event, bumped versions, updated metadata, updated CHANGELOG files * fix deploy script * fix code path with pre-existing DMZForwarder * more removal * fix workflow --------- Co-authored-by: Kaspar Kallas --- .../workflows/cd.packages-stable.create-release-drafts.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.packages-stable.create-release-drafts.yml b/.github/workflows/cd.packages-stable.create-release-drafts.yml index b5be582ee9..6a8d5f5e49 100644 --- a/.github/workflows/cd.packages-stable.create-release-drafts.yml +++ b/.github/workflows/cd.packages-stable.create-release-drafts.yml @@ -130,6 +130,7 @@ jobs: outputs: publish_sdk_core: ${{ env.SHOULD_PUBLISH_SDK_CORE }} + sdk_core_new_version: ${{ env.SDK_CORE_NEW_VERSION }} steps: - uses: actions/checkout@v4 @@ -182,8 +183,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token with: - tag_name: sdk-core@v${{ env.SDK_CORE_NEW_VERSION }} - release_name: sdk-core@v${{ env.SDK_CORE_NEW_VERSION }} + tag_name: sdk-core@v${{ needs.check-sdk-core-version.outputs.sdk_core_new_version }} + release_name: sdk-core@v${{ needs.check-sdk-core-version.outputs.sdk_core_new_version }} body_path: .github/RELEASE_TEMPLATE/release-notes.md draft: true From 029035e72a37086ec4a83571a0932aee2ad36d18 Mon Sep 17 00:00:00 2001 From: Miao ZhiCheng Date: Thu, 8 Aug 2024 15:00:08 +0300 Subject: [PATCH 30/42] nix: update nixpkgs to the latest & using node20 by default (#2001) * nix: update nixpkgs to the latest * tasks/check-changeset.sh renamed * ci.feature: cancel concurrent workflows * run lcov ignoring inconsistent errors --- ...ll.check-query-schema-against-subgraph.yml | 2 +- .github/workflows/call.deploy-subgraph.yml | 2 +- .../workflows/call.test-local-subgraph.yml | 5 +- .github/workflows/call.test-sdk-core.yml | 3 +- .../call.test-solidity-semantic-money.yml | 2 +- ...subgraph-on-previous-sdk-core-versions.yml | 2 +- .../call.upload-coverage-reports.yml | 2 +- .../cd.feature.create-pr-artifact.yml | 6 +- .github/workflows/ci.canary.yml | 10 +- .github/workflows/ci.feature.yml | 14 +- .../workflows/handler.changelog-reminder.yml | 8 +- .../workflows/handler.deploy-to-mainnet.yml | 2 +- .../workflows/handler.deploy-to-testnets.yml | 2 +- .../workflows/handler.list-super-token.yml | 2 +- .../handler.publish-release-packages.yml | 2 +- .../handler.run-ethereum-contracts-script.yml | 4 +- .../workflows/handler.verify-contracts.yml | 2 +- flake.lock | 24 ++-- flake.nix | 13 +- .../tasks/coverage-cleanup.sh | 8 +- tasks/check-changeset.sh | 119 ---------------- tasks/create-build-set.sh | 134 ++++++++++++++++++ 22 files changed, 196 insertions(+), 172 deletions(-) delete mode 100755 tasks/check-changeset.sh create mode 100755 tasks/create-build-set.sh diff --git a/.github/workflows/call.check-query-schema-against-subgraph.yml b/.github/workflows/call.check-query-schema-against-subgraph.yml index 11961641a5..13275c31ec 100644 --- a/.github/workflows/call.check-query-schema-against-subgraph.yml +++ b/.github/workflows/call.check-query-schema-against-subgraph.yml @@ -18,7 +18,7 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/call.deploy-subgraph.yml b/.github/workflows/call.deploy-subgraph.yml index 5aab6388c3..854ecc2a0a 100644 --- a/.github/workflows/call.deploy-subgraph.yml +++ b/.github/workflows/call.deploy-subgraph.yml @@ -64,7 +64,7 @@ jobs: defaults: run: - shell: nix develop -c bash {0} + shell: nix develop .#ci-default -c bash {0} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/call.test-local-subgraph.yml b/.github/workflows/call.test-local-subgraph.yml index 0fb84d40f5..51e58e4aad 100644 --- a/.github/workflows/call.test-local-subgraph.yml +++ b/.github/workflows/call.test-local-subgraph.yml @@ -13,7 +13,8 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} + # FIXME: subgraph test fails with node20 + shell: nix develop .#ci-node18 -c bash -xe {0} steps: - uses: actions/checkout@v4 @@ -59,7 +60,7 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#ci-node18 -c bash -xe {0} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/call.test-sdk-core.yml b/.github/workflows/call.test-sdk-core.yml index 0c77edadd2..46c2131371 100644 --- a/.github/workflows/call.test-sdk-core.yml +++ b/.github/workflows/call.test-sdk-core.yml @@ -26,7 +26,8 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} + # FIXME: subgraph test fails with node20 + shell: nix develop .#ci-node18 -c bash -xe {0} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/call.test-solidity-semantic-money.yml b/.github/workflows/call.test-solidity-semantic-money.yml index ac629f98f7..5a46c4aff4 100644 --- a/.github/workflows/call.test-solidity-semantic-money.yml +++ b/.github/workflows/call.test-solidity-semantic-money.yml @@ -11,7 +11,7 @@ jobs: defaults: run: - shell: nix develop . -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml b/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml index bd74a576ea..de04046cd1 100644 --- a/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml +++ b/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml @@ -30,7 +30,7 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/call.upload-coverage-reports.yml b/.github/workflows/call.upload-coverage-reports.yml index a9ab6c3334..fca4edbaee 100644 --- a/.github/workflows/call.upload-coverage-reports.yml +++ b/.github/workflows/call.upload-coverage-reports.yml @@ -21,7 +21,7 @@ jobs: name: ethereum-contracts-coverage path: packages/ethereum-contracts/coverage - name: Upload ethereum-contracts-coverage to codecov - uses: codecov/codecov-action@v4.2.0 + uses: codecov/codecov-action@v4.3.0 with: token: ${{ secrets.codecov_token }} files: packages/ethereum-contracts/coverage/lcov.info diff --git a/.github/workflows/cd.feature.create-pr-artifact.yml b/.github/workflows/cd.feature.create-pr-artifact.yml index a91af4a0be..a536169efc 100644 --- a/.github/workflows/cd.feature.create-pr-artifact.yml +++ b/.github/workflows/cd.feature.create-pr-artifact.yml @@ -12,7 +12,7 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} if: ${{ !github.event.pull_request.draft }} @@ -41,8 +41,8 @@ jobs: echo " .locked" ${{ github.event.pull_request.locked }} echo " .draft" ${{ github.event.pull_request.draft }} - - name: Check changeset - run: tasks/check-changeset.sh ${{ github.sha }} dev + - name: Create build set + run: tasks/create-build-set.sh ${{ github.sha }} dev origin - name: Install dependencies if: env.PUBLISH_PR_ARTIFACT == 1 diff --git a/.github/workflows/ci.canary.yml b/.github/workflows/ci.canary.yml index 89f27780e3..01cb9d826f 100644 --- a/.github/workflows/ci.canary.yml +++ b/.github/workflows/ci.canary.yml @@ -23,8 +23,8 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Check changeset - run: tasks/check-changeset.sh ${{ github.sha }} dev + - name: Create build set + run: tasks/create-build-set.sh ${{ github.sha }} dev origin essential-build-and-test: name: Build and test essential packages of dev branch @@ -179,7 +179,7 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} steps: - uses: actions/checkout@v4 @@ -223,7 +223,7 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} steps: - uses: actions/checkout@v4 @@ -288,7 +288,7 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/ci.feature.yml b/.github/workflows/ci.feature.yml index 0cb9d3b6fc..d08dca1ef8 100644 --- a/.github/workflows/ci.feature.yml +++ b/.github/workflows/ci.feature.yml @@ -12,6 +12,10 @@ on: merge_group: pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: check: name: Checking what packages need to be built @@ -59,8 +63,8 @@ jobs: - name: Run pre-commit check run: npm run pre-commit - - name: Check changeset - run: tasks/check-changeset.sh ${{ github.sha }} dev + - name: Create build set + run: tasks/create-build-set.sh ${{ github.sha }} dev origin test-ethereum-contracts: name: Test ethereum-contracts (Feature Branch) @@ -71,7 +75,7 @@ jobs: run-coverage-tests: false coverage-ethereum-contracts: - name: Coverage test ethereum-contracts (Feature Branch) + name: Coverage Test ethereum-contracts (Feature Branch) uses: ./.github/workflows/call.test-ethereum-contracts.yml needs: [check] if: needs.check.outputs.build_ethereum_contracts @@ -106,7 +110,7 @@ jobs: # sdk-core integration test + local subgraph w/ local sdk-core test-sdk-core: - name: Test SDK-Core (Feature Branch) + name: Test sdk-core (Feature Branch) uses: ./.github/workflows/call.test-sdk-core.yml needs: [check] if: needs.check.outputs.build_sdk_core @@ -116,7 +120,7 @@ jobs: run-coverage-tests: false coverage-sdk-core: - name: Test SDK-Core (Feature Branch) + name: Coverage Test sdk-core (Feature Branch) uses: ./.github/workflows/call.test-sdk-core.yml needs: [check] if: needs.check.outputs.build_sdk_core diff --git a/.github/workflows/handler.changelog-reminder.yml b/.github/workflows/handler.changelog-reminder.yml index a5c64cf89e..fa751eae46 100644 --- a/.github/workflows/handler.changelog-reminder.yml +++ b/.github/workflows/handler.changelog-reminder.yml @@ -19,9 +19,9 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Check changeset - run: tasks/check-changeset.sh ${{ github.sha }} dev - + - name: Create build set + run: tasks/create-build-set.sh ${{ github.sha }} dev origin + create-reminder: name: Create Changelog reminder in PR discussion @@ -45,4 +45,4 @@ jobs: Reminder to update the CHANGELOG.md for any of the modified packages in this PR. - [ ] CHANGELOG.md modified - [ ] Double check before merge - reactions: white_check_mark \ No newline at end of file + reactions: white_check_mark diff --git a/.github/workflows/handler.deploy-to-mainnet.yml b/.github/workflows/handler.deploy-to-mainnet.yml index 617d3b359f..484ac44dbc 100644 --- a/.github/workflows/handler.deploy-to-mainnet.yml +++ b/.github/workflows/handler.deploy-to-mainnet.yml @@ -28,7 +28,7 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/handler.deploy-to-testnets.yml b/.github/workflows/handler.deploy-to-testnets.yml index a355181252..b6ec062b54 100644 --- a/.github/workflows/handler.deploy-to-testnets.yml +++ b/.github/workflows/handler.deploy-to-testnets.yml @@ -28,7 +28,7 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} strategy: fail-fast: false diff --git a/.github/workflows/handler.list-super-token.yml b/.github/workflows/handler.list-super-token.yml index faa9d35e93..67e02909a6 100644 --- a/.github/workflows/handler.list-super-token.yml +++ b/.github/workflows/handler.list-super-token.yml @@ -35,7 +35,7 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/handler.publish-release-packages.yml b/.github/workflows/handler.publish-release-packages.yml index b6d82f8a1d..0fcb873870 100644 --- a/.github/workflows/handler.publish-release-packages.yml +++ b/.github/workflows/handler.publish-release-packages.yml @@ -14,7 +14,7 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/handler.run-ethereum-contracts-script.yml b/.github/workflows/handler.run-ethereum-contracts-script.yml index 774b3a81cb..0e994beb82 100644 --- a/.github/workflows/handler.run-ethereum-contracts-script.yml +++ b/.github/workflows/handler.run-ethereum-contracts-script.yml @@ -30,8 +30,8 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} - + shell: nix develop .#ci-default -c bash -xe {0} + env: RELEASE_VERSION: ${{ github.event.inputs.release_version }} RESOLVER_ADMIN_TYPE: ${{ github.event.inputs.admin_type }} diff --git a/.github/workflows/handler.verify-contracts.yml b/.github/workflows/handler.verify-contracts.yml index 321cea196b..34b4ef08c1 100644 --- a/.github/workflows/handler.verify-contracts.yml +++ b/.github/workflows/handler.verify-contracts.yml @@ -28,7 +28,7 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} steps: - uses: actions/checkout@v4 diff --git a/flake.lock b/flake.lock index ebd320ecd2..fb9e7b1b8b 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -28,11 +28,11 @@ ] }, "locked": { - "lastModified": 1719997877, - "narHash": "sha256-/Edw+w0PiGgxwnCeJycM0VgH4HtlCi91v1d8xbi+REE=", + "lastModified": 1722676286, + "narHash": "sha256-wEDJdvwRZF2ErQ33nQ0Lqn/48XrPbaadv56/bM2MSZU=", "owner": "shazow", "repo": "foundry.nix", - "rev": "02febba4f1cf0606d790acdb24adcf7a64afb4e1", + "rev": "d84c83b1c1722c8742b3d2d84c9386814d75384e", "type": "github" }, "original": { @@ -44,11 +44,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1707205916, - "narHash": "sha256-fmRJilYGlB7VCt3XsdYxrA0u8e/K84O5xYucerUY0iM=", + "lastModified": 1723019560, + "narHash": "sha256-O/kxmybNecC3Efr6ITOdtCzFv90/B2Iiedavj5aRWt0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8cc79aa39bbc6eaedaf286ae655b224c71e02907", + "rev": "f5129fb42b9c262318130a97b47516946da3e7d7", "type": "github" }, "original": { @@ -77,11 +77,11 @@ "solc-macos-amd64-list-json": "solc-macos-amd64-list-json" }, "locked": { - "lastModified": 1717442267, - "narHash": "sha256-6TnQvA6Q/xC3r1M+wGC5gnDc/5XfOPjC8X6LlGDWDNc=", + "lastModified": 1723108822, + "narHash": "sha256-0SToQBucC4haDvgiG+JyL566ylCLl8s3SKaBT9m/nVo=", "owner": "hellwolf", "repo": "solc.nix", - "rev": "2ac2862f224aa0d67cbc6b3246392489f8a50596", + "rev": "d1f30906719dfcbd69a90996aa98d8e5322e5705", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index ce3fe67b2c..8ab6136c02 100644 --- a/flake.nix +++ b/flake.nix @@ -73,7 +73,7 @@ ]; # minimem development shell - minimumDevInputs = commonDevInputs ++ ethDevInputs ++ node18DevInputs; + minimumDevInputs = commonDevInputs ++ ethDevInputs ++ node20DevInputs; # additional tooling for whitehat hackers whitehatInputs = with pkgs; [ @@ -113,9 +113,7 @@ FOUNDRY_OFFLINE = "true"; FOUNDRY_SOLC_VERSION = pkgs.lib.getExe pkgs.${solcVer}; } // o); - - # ci-spec-with-ghc - ci-spec-with-ghc = ghcVer : mkShell { + mkShellForSpecCI = ghcVer : mkShell { buildInputs = with pkgs; [ cabal-install haskell.compiler.${ghcVer} @@ -142,14 +140,17 @@ }; # CI shells + devShells.ci-default = mkShell { + buildInputs = ciInputs ++ minimumDevInputs; + }; devShells.ci-node18 = mkShell { buildInputs = ciInputs ++ commonDevInputs ++ ethDevInputs ++ node18DevInputs; }; devShells.ci-node20 = mkShell { buildInputs = ciInputs ++ commonDevInputs ++ ethDevInputs ++ node20DevInputs; }; - devShells.ci-spec-ghc92 = ci-spec-with-ghc ghcVer92; - devShells.ci-spec-ghc94 = ci-spec-with-ghc ghcVer94; + devShells.ci-spec-ghc92 = mkShellForSpecCI ghcVer92; + devShells.ci-spec-ghc94 = mkShellForSpecCI ghcVer94; devShells.ci-hot-fuzz = mkShell { buildInputs = with pkgs; ciInputs ++ commonDevInputs ++ ethDevInputs ++ [ slither-analyzer diff --git a/packages/ethereum-contracts/tasks/coverage-cleanup.sh b/packages/ethereum-contracts/tasks/coverage-cleanup.sh index 0ff548eac5..c7a5d56394 100755 --- a/packages/ethereum-contracts/tasks/coverage-cleanup.sh +++ b/packages/ethereum-contracts/tasks/coverage-cleanup.sh @@ -4,13 +4,15 @@ set -ex cd "$(dirname "$0")"/.. +LCOV="lcov --ignore-errors inconsistent" + # extract coverage for Superfluid contracts from forge coverage -lcov -e ../../lcov.info \ +$LCOV -e ../../lcov.info \ "packages/ethereum-contracts/contracts/*" \ -o lcov.info # remove contracts whose coverage we don't care about (see .solcover.js) -lcov -r lcov.info \ +$LCOV -r lcov.info \ "packages/ethereum-contracts/contracts/mocks/*" \ "packages/ethereum-contracts/contracts/apps/*Base*" \ "packages/ethereum-contracts/contracts/utils/*Test*" \ @@ -19,6 +21,6 @@ lcov -r lcov.info \ -o lcov.info # merge hardhat and forge coverage files -lcov -a lcov.info \ +$LCOV -a lcov.info \ -a coverage/lcov.info \ -o coverage/lcov.info diff --git a/tasks/check-changeset.sh b/tasks/check-changeset.sh deleted file mode 100755 index ab74cfc714..0000000000 --- a/tasks/check-changeset.sh +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env bash - -set -e - -SOURCE_REF=$1 -BASE_REF=$2 - -echo "SOURCE_REF: $SOURCE_REF" -echo "BASE_REF: $BASE_REF" - -# fetch the latest commit of the base ref -git fetch origin --depth=1 refs/heads/"${BASE_REF}":refs/remotes/origin/"${BASE_REF}" - -# compare the source branch with the dev branch -git diff --name-only "${SOURCE_REF}" refs/remotes/origin/"${BASE_REF}" > changed-files.list -echo Changed files: -echo --- -cat changed-files.list -echo --- - -function setBuildAll() { - BUILD_ETHEREUM_CONTRACTS=1 - BUILD_HOT_FUZZ=1 - BUILD_SDK_CORE=1 - BUILD_SDK_REDUX=1 - #BUILD_SPEC_HASKELL=1 - BUILD_SUBGRAPH=1 - BUILD_AUTOMATION_CONTRACTS=1 - BUILD_SOLIDITY_SEMANTIC_MONEY=1 - echo Everything will be tested. -} - -# set BUILD_* variables to GITHUB_ENV -# (dependency graph implied below) -if [ -n "$GITHUB_ENV" ];then - # if ci workflows changed - if grep -E "^.github/workflows/ci\..*\.yml$" changed-files.list;then - echo "CI workflows changed." - setBuildAll - fi - # if call (reusable) workflows changed - if grep -E "^.github/workflows/call\..*\.yml$" changed-files.list;then - echo "Call workflows changed." - setBuildAll - fi - # if root package.json changed, rebuild everything - if grep -E "^(flake\.nix|flake\.lock|package\.json|yarn\.lock)$" changed-files.list;then - echo "Root package.json changed." - setBuildAll - fi - # if specified solidity-semantic-money folders and files changed - if grep -E "^packages/solidity-semantic-money/(src/|test/|foundry\.toml|Makefile|package\.json)" changed-files.list;then - BUILD_SOLIDITY_SEMANTIC_MONEY=1 - BUILD_ETHEREUM_CONTRACTS=1 - echo Solidity semantic money will be tested. - fi - # if specified ethereum-contracts folders and files changed - if grep -E "^packages/ethereum-contracts/(contracts/|scripts/|test/|truffle-config\.js|package\.json)" changed-files.list;then - BUILD_ETHEREUM_CONTRACTS=1 - BUILD_SUBGRAPH=1 - BUILD_HOT_FUZZ=1 - BUILD_AUTOMATION_CONTRACTS=1 - echo Ethereum contracts, HotFuzz and Subgraph will be tested. - fi - # if specified hot-fuzz folders and files changed - if grep -E "^packages/hot-fuzz/(contracts/|scripts/|.+\.js|.+\.yaml|hot-fuzz|package\.json)" changed-files.list;then - BUILD_HOT_FUZZ=1 - echo HotFuzz will be tested. - fi - # if specified sdk-core folders and files changed - if grep -E "^packages/sdk-core/(src/|test/|package\.json|tsconfig\.*)" changed-files.list;then - BUILD_SDK_CORE=1 - BUILD_SDK_REDUX=1 - BUILD_SUBGRAPH=1 - echo SDK-CORE, SDK-REDUX and SUBGRAPH will be tested. - fi - # if specified sdk-redux folders and files changed - if grep -E "^packages/sdk-redux/(src/|test/|package\.json)" changed-files.list;then - BUILD_SDK_REDUX=1 - echo SDK-REDUX will be tested. - fi - # if specified subgraph folders and files changed - if grep -E "^packages/subgraph/(subgraph\.template\.yaml|schema\.graphql|config|scripts|src|tasks|test|hardhat\.config\.ts|package\.json|docker-compose\.yml)" changed-files.list;then - BUILD_SUBGRAPH=1 - echo Subgraph will be tested. - fi - # if specified haskell folders and files changed - if grep -E "^packages/spec-haskell/(packages/|cabal\.project)" changed-files.list;then - # BUILD_SPEC_HASKELL=1 - echo SPEC-HASKELL will be tested, disabled for now. - fi - # if specified automation-contracts/scheduler folders and files changed - if grep -E "^packages/automation-contracts/scheduler/(contracts/|scripts/|test/|truffle-config\.js|package\.json)" changed-files.list;then - BUILD_AUTOMATION_CONTRACTS=1 - echo Automation Contracts will be tested. - fi - # if specified automation-contracts/autowrap folders and files changed - if grep -E "^packages/automation-contracts/autowrap/(contracts/|scripts/|test/|truffle-config\.js|package\.json)" changed-files.list;then - BUILD_AUTOMATION_CONTRACTS=1 - echo Automation Contracts will be tested. - fi - - if [ "$BUILD_ETHEREUM_CONTRACTS" == 1 ] || [ "$BUILD_SDK_CORE" == 1 ] || [ "$BUILD_SDK_REDUX" == 1 ];then - echo "PR packages will be published." - PUBLISH_PR_ARTIFACT=1 - fi - - { - echo "BUILD_ETHEREUM_CONTRACTS=${BUILD_ETHEREUM_CONTRACTS}" - echo "BUILD_HOT_FUZZ=${BUILD_HOT_FUZZ}" - echo "BUILD_SDK_CORE=${BUILD_SDK_CORE}" - echo "BUILD_SDK_REDUX=${BUILD_SDK_REDUX}" - echo "BUILD_SUBGRAPH=${BUILD_SUBGRAPH}" - echo "BUILD_SPEC_HASKELL=${BUILD_SPEC_HASKELL}" - echo "BUILD_AUTOMATION_CONTRACTS=${BUILD_AUTOMATION_CONTRACTS}" - echo "BUILD_SOLIDITY_SEMANTIC_MONEY=${BUILD_SOLIDITY_SEMANTIC_MONEY}" - echo "PUBLISH_PR_ARTIFACT=${PUBLISH_PR_ARTIFACT}" - } >> "$GITHUB_ENV" -fi diff --git a/tasks/create-build-set.sh b/tasks/create-build-set.sh new file mode 100755 index 0000000000..4336c1ec94 --- /dev/null +++ b/tasks/create-build-set.sh @@ -0,0 +1,134 @@ +#!/usr/bin/env bash +# Synopsis: Create packages build set based on the files change set. +# Usage: create-build-set.sh SOURCE_REF BASE_REF [BASE_ORIGIN] +# Notes: +# - The files change set is derived from the `git diff` between SOURCE_REF and BASE_REF. +# - Optionally, it fetches BASE_REF first BASE_ORIGIN first before `git diff`. +# - The packages build set is output to GITHUB_ENV or /dev/stdout in a form of "BUILD_*" environment variables. + +console.debug() { + echo "debug:" "$@" > /dev/stderr +} + +set -e + +SOURCE_REF=$1 +BASE_REF=$2 +BASE_ORIGIN=$3 + +console.debug "SOURCE_REF: $SOURCE_REF" +console.debug "BASE_REF: $BASE_REF" + +# fetch the latest commit of the BASE_REF from BASE_ORIGIN +if [ -n "${BASE_ORIGIN}" ]; then + git fetch "${BASE_ORIGIN}" --depth=1 refs/heads/"${BASE_REF}":refs/remotes/"${BASE_ORIGIN}"/"${BASE_REF}" +fi + +# compare the source branch with the dev branch +CHANGED_FILES=changed-files.ignore.list +git diff --name-only "${SOURCE_REF}" refs/remotes/origin/"${BASE_REF}" > "$CHANGED_FILES" +console.debug "=== BEGIN CHANGED FILES" +cat "$CHANGED_FILES" > /dev/stderr +console.debug "=== END CHANGED FILES" + +console.debug "=== BEGIN CREATE BUILD SET" + +function setBuildAll() { + BUILD_ETHEREUM_CONTRACTS=1 + BUILD_HOT_FUZZ=1 + BUILD_SDK_CORE=1 + BUILD_SDK_REDUX=1 + BUILD_SPEC_HASKELL=1 + BUILD_SUBGRAPH=1 + BUILD_AUTOMATION_CONTRACTS=1 + BUILD_SOLIDITY_SEMANTIC_MONEY=1 + console.debug "Everything will be tested." +} + +# if ci workflows changed +if grep -E "^.github/workflows/ci\..*\.yml$" "$CHANGED_FILES" > /dev/null; then + console.debug "CI workflows changed." + setBuildAll +fi + +# if call (reusable) workflows changed +if grep -E "^.github/workflows/call\..*\.yml$" "$CHANGED_FILES" > /dev/null; then + console.debug "Call workflows changed." + setBuildAll +fi +# if root package.json changed, rebuild everything +if grep -E "^(flake\.nix|flake\.lock|package\.json|yarn\.lock)$" "$CHANGED_FILES" > /dev/null; then + console.debug "Root package.json changed." + setBuildAll +fi +# if specified solidity-semantic-money folders and files changed +if grep -E "^packages/solidity-semantic-money/(src/|test/|foundry\.toml|Makefile|package\.json)" "$CHANGED_FILES" > /dev/null; then + BUILD_SOLIDITY_SEMANTIC_MONEY=1 + BUILD_ETHEREUM_CONTRACTS=1 + console.debug Solidity semantic money will be tested. +fi +# if specified ethereum-contracts folders and files changed +if grep -E "^packages/ethereum-contracts/(contracts/|scripts/|test/|truffle-config\.js|package\.json)" "$CHANGED_FILES" > /dev/null; then + BUILD_ETHEREUM_CONTRACTS=1 + BUILD_SUBGRAPH=1 + BUILD_HOT_FUZZ=1 + BUILD_AUTOMATION_CONTRACTS=1 + console.debug Ethereum contracts, HotFuzz and Subgraph will be tested. +fi +# if specified hot-fuzz folders and files changed +if grep -E "^packages/hot-fuzz/(contracts/|scripts/|.+\.js|.+\.yaml|hot-fuzz|package\.json)" "$CHANGED_FILES" > /dev/null; then + BUILD_HOT_FUZZ=1 + console.debug HotFuzz will be tested. +fi +# if specified sdk-core folders and files changed +if grep -E "^packages/sdk-core/(src/|test/|package\.json|tsconfig\.*)" "$CHANGED_FILES" > /dev/null; then + BUILD_SDK_CORE=1 + BUILD_SDK_REDUX=1 + BUILD_SUBGRAPH=1 + console.debug SDK-CORE, SDK-REDUX and SUBGRAPH will be tested. +fi +# if specified sdk-redux folders and files changed +if grep -E "^packages/sdk-redux/(src/|test/|package\.json)" "$CHANGED_FILES" > /dev/null; then + BUILD_SDK_REDUX=1 + console.debug SDK-REDUX will be tested. +fi +# if specified subgraph folders and files changed +if grep -E "^packages/subgraph/(subgraph\.template\.yaml|schema\.graphql|config|scripts|src|tasks|test|hardhat\.config\.ts|package\.json|docker-compose\.yml)" "$CHANGED_FILES" > /dev/null; then + BUILD_SUBGRAPH=1 + console.debug Subgraph will be tested. +fi +# if specified haskell folders and files changed +if grep -E "^packages/spec-haskell/(packages/|cabal\.project)" "$CHANGED_FILES" > /dev/null; then + BUILD_SPEC_HASKELL=1 + console.debug SPEC-HASKELL will be tested. +fi +# if specified automation-contracts/scheduler folders and files changed +if grep -E "^packages/automation-contracts/scheduler/(contracts/|scripts/|test/|truffle-config\.js|package\.json)" "$CHANGED_FILES" > /dev/null; then + BUILD_AUTOMATION_CONTRACTS=1 + console.debug Automation Contracts will be tested. +fi +# if specified automation-contracts/autowrap folders and files changed +if grep -E "^packages/automation-contracts/autowrap/(contracts/|scripts/|test/|truffle-config\.js|package\.json)" "$CHANGED_FILES" > /dev/null; then + BUILD_AUTOMATION_CONTRACTS=1 + console.debug Automation Contracts will be tested. +fi + +if [ "$BUILD_ETHEREUM_CONTRACTS" == 1 ] || [ "$BUILD_SDK_CORE" == 1 ] || [ "$BUILD_SDK_REDUX" == 1 ]; then + console.debug "PR packages will be published." + PUBLISH_PR_ARTIFACT=1 +fi + +console.debug "=== END CREATE BUILD SET" + +# print BUILD_* variables to $GITHUB_ENV, for local debugging GITHUB_ENV is default to /dev/stdout +{ + echo "BUILD_ETHEREUM_CONTRACTS=${BUILD_ETHEREUM_CONTRACTS}" + echo "BUILD_HOT_FUZZ=${BUILD_HOT_FUZZ}" + echo "BUILD_SDK_CORE=${BUILD_SDK_CORE}" + echo "BUILD_SDK_REDUX=${BUILD_SDK_REDUX}" + echo "BUILD_SUBGRAPH=${BUILD_SUBGRAPH}" + echo "BUILD_SPEC_HASKELL=${BUILD_SPEC_HASKELL}" + echo "BUILD_AUTOMATION_CONTRACTS=${BUILD_AUTOMATION_CONTRACTS}" + echo "BUILD_SOLIDITY_SEMANTIC_MONEY=${BUILD_SOLIDITY_SEMANTIC_MONEY}" + echo "PUBLISH_PR_ARTIFACT=${PUBLISH_PR_ARTIFACT}" +} >> "${GITHUB_ENV:-/dev/stdout}" From 0ed2d5cefc095f3da416f15da3c7aaee2b3dfdfa Mon Sep 17 00:00:00 2001 From: Didi Date: Thu, 8 Aug 2024 14:14:18 +0200 Subject: [PATCH 31/42] updated metadata, undo hardcoded gas settings for eth-mainnet (#2000) --- .../gov-upgrade-super-token-logic.js | 23 ++++++++++--------- packages/ethereum-contracts/truffle-config.js | 2 -- packages/metadata/CHANGELOG.md | 4 +++- packages/metadata/main/networks/list.cjs | 6 +++-- packages/metadata/module/networks/list.js | 6 +++-- packages/metadata/networks.json | 6 +++-- packages/metadata/package.json | 2 +- 7 files changed, 28 insertions(+), 21 deletions(-) diff --git a/packages/ethereum-contracts/ops-scripts/gov-upgrade-super-token-logic.js b/packages/ethereum-contracts/ops-scripts/gov-upgrade-super-token-logic.js index a40e979ec1..7fca30798c 100644 --- a/packages/ethereum-contracts/ops-scripts/gov-upgrade-super-token-logic.js +++ b/packages/ethereum-contracts/ops-scripts/gov-upgrade-super-token-logic.js @@ -207,21 +207,22 @@ async function getTokensToBeUpgraded(sf, newSuperTokenLogic, skipList, pastSuper `!!! [SKIP] SuperToken@${superToken.address} (${symbol}) alien previous logic ${superTokenLogic} - please manually check!` ); } else { + let adminAddr = ZERO_ADDRESS; try { - const adminAddr = await superToken.getAdmin(); - if (adminAddr !== ZERO_ADDRESS) { - console.warn( - `!!! [SKIP] SuperToken@${superToken.address} admin override set to ${adminAddr}` - ); - } else { - console.log( - `SuperToken@${superToken.address} (${symbol}) logic needs upgrade from ${superTokenLogic}` - ); - return superTokenAddress; - } + adminAddr = await superToken.getAdmin(); } catch(err) { console.log("### failed to get admin addr:", err.message); } + if (adminAddr !== ZERO_ADDRESS) { + console.warn( + `!!! [SKIP] SuperToken@${superToken.address} admin override set to ${adminAddr}` + ); + } else { + console.log( + `SuperToken@${superToken.address} (${symbol}) logic needs upgrade from ${superTokenLogic}` + ); + return superTokenAddress; + } } } else { console.log( diff --git a/packages/ethereum-contracts/truffle-config.js b/packages/ethereum-contracts/truffle-config.js index 4b06ef4675..f8f035c3f4 100644 --- a/packages/ethereum-contracts/truffle-config.js +++ b/packages/ethereum-contracts/truffle-config.js @@ -177,8 +177,6 @@ const E = (module.exports = { "eth-mainnet": { ...createNetworkDefaultConfiguration("eth-mainnet"), network_id: 1, // mainnet's id - maxPriorityFeePerGas: 200e6, // 0.2 gwei. The default of 2.5 gwei is overpaying - maxFeePerGas: 50e9, }, "eth-sepolia": { diff --git a/packages/metadata/CHANGELOG.md b/packages/metadata/CHANGELOG.md index 60e1098462..1f278c7120 100644 --- a/packages/metadata/CHANGELOG.md +++ b/packages/metadata/CHANGELOG.md @@ -3,7 +3,9 @@ All notable changes to the metadata will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - +## [v1.4.1] +### Changed +- New & updated contracts on eth-mainnet ## [v1.4.0] ### Changed diff --git a/packages/metadata/main/networks/list.cjs b/packages/metadata/main/networks/list.cjs index 1801ca457b..18b5934b18 100644 --- a/packages/metadata/main/networks/list.cjs +++ b/packages/metadata/main/networks/list.cjs @@ -576,10 +576,12 @@ module.exports = "cfaV1": "0x2844c1BBdA121E9E43105630b9C8310e5c72744b", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0xbCF9cfA8Da20B591790dF27DE65C1254Bf91563d", + "gdaV1": "0xAAdBB3Eee3Bd080f5353d86DdF1916aCA3fAC842", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x0422689cc4087b6B7280e0a7e7F655200ec86Ae1", - "superfluidLoader": "0x9775EEBdfF8AE845e7Ad3d1D04B85e6c6d284aCB", + "superfluidLoader": "0xcb05535bd212eCFC4B7b9db81d6C2C768b726776", "toga": "0x8B5a2CF69a56d7F8Fa027edcA23594cdDF544dDc", - "batchLiquidator": "0x554c06487bEc8c890A0345eb05a5292C1b1017Bd", + "batchLiquidator": "0x4eC223bef5D8cB609FC8Ee2e0ad43244C8e46A02", "flowScheduler": "0xAA0cD305eD020137E302CeCede7b18c0A05aCCDA", "vestingScheduler": "0x39D5cBBa9adEBc25085a3918d36D5325546C001B", "autowrap": { diff --git a/packages/metadata/module/networks/list.js b/packages/metadata/module/networks/list.js index 2079f1be38..5fdc19074e 100644 --- a/packages/metadata/module/networks/list.js +++ b/packages/metadata/module/networks/list.js @@ -576,10 +576,12 @@ export default "cfaV1": "0x2844c1BBdA121E9E43105630b9C8310e5c72744b", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0xbCF9cfA8Da20B591790dF27DE65C1254Bf91563d", + "gdaV1": "0xAAdBB3Eee3Bd080f5353d86DdF1916aCA3fAC842", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x0422689cc4087b6B7280e0a7e7F655200ec86Ae1", - "superfluidLoader": "0x9775EEBdfF8AE845e7Ad3d1D04B85e6c6d284aCB", + "superfluidLoader": "0xcb05535bd212eCFC4B7b9db81d6C2C768b726776", "toga": "0x8B5a2CF69a56d7F8Fa027edcA23594cdDF544dDc", - "batchLiquidator": "0x554c06487bEc8c890A0345eb05a5292C1b1017Bd", + "batchLiquidator": "0x4eC223bef5D8cB609FC8Ee2e0ad43244C8e46A02", "flowScheduler": "0xAA0cD305eD020137E302CeCede7b18c0A05aCCDA", "vestingScheduler": "0x39D5cBBa9adEBc25085a3918d36D5325546C001B", "autowrap": { diff --git a/packages/metadata/networks.json b/packages/metadata/networks.json index a0df12d090..963901aea4 100644 --- a/packages/metadata/networks.json +++ b/packages/metadata/networks.json @@ -574,10 +574,12 @@ "cfaV1": "0x2844c1BBdA121E9E43105630b9C8310e5c72744b", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0xbCF9cfA8Da20B591790dF27DE65C1254Bf91563d", + "gdaV1": "0xAAdBB3Eee3Bd080f5353d86DdF1916aCA3fAC842", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x0422689cc4087b6B7280e0a7e7F655200ec86Ae1", - "superfluidLoader": "0x9775EEBdfF8AE845e7Ad3d1D04B85e6c6d284aCB", + "superfluidLoader": "0xcb05535bd212eCFC4B7b9db81d6C2C768b726776", "toga": "0x8B5a2CF69a56d7F8Fa027edcA23594cdDF544dDc", - "batchLiquidator": "0x554c06487bEc8c890A0345eb05a5292C1b1017Bd", + "batchLiquidator": "0x4eC223bef5D8cB609FC8Ee2e0ad43244C8e46A02", "flowScheduler": "0xAA0cD305eD020137E302CeCede7b18c0A05aCCDA", "vestingScheduler": "0x39D5cBBa9adEBc25085a3918d36D5325546C001B", "autowrap": { diff --git a/packages/metadata/package.json b/packages/metadata/package.json index b48874142a..16e503d600 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -1,6 +1,6 @@ { "name": "@superfluid-finance/metadata", - "version": "1.4.0", + "version": "1.4.1", "description": "Superfluid Metadata", "main": "main/index.cjs", "module": "module/index.js", From 23b300d04f08870355abb8f7c7fcb059855f843b Mon Sep 17 00:00:00 2001 From: Miao ZhiCheng Date: Wed, 21 Aug 2024 13:25:16 +0300 Subject: [PATCH 32/42] Small build pipeline improvements (#2005) * same JQ variable in shell scripts * make truffle-config support private key * fix build * remove the practice of $JQ --- .../tasks/build-bundled-abi.sh | 6 ++--- packages/ethereum-contracts/truffle-config.js | 26 +++++++++++-------- .../sdk-core/tasks/testSchemasAndQueries.sh | 4 +-- packages/subgraph/tasks/deploy.sh | 4 +-- 4 files changed, 19 insertions(+), 21 deletions(-) diff --git a/packages/ethereum-contracts/tasks/build-bundled-abi.sh b/packages/ethereum-contracts/tasks/build-bundled-abi.sh index 6368476c4b..f65d3d72e0 100755 --- a/packages/ethereum-contracts/tasks/build-bundled-abi.sh +++ b/packages/ethereum-contracts/tasks/build-bundled-abi.sh @@ -5,9 +5,7 @@ set -e cd "$(dirname "$0")/.." || exit 1 -JQ="npx --package=node-jq -- jq" - -CONTRACTS=( $($JQ -r .[] tasks/bundled-abi-contracts-list.json) ) || exit 2 +CONTRACTS=( $(jq -r .[] tasks/bundled-abi-contracts-list.json) ) || exit 2 { echo "if (typeof module === \"undefined\") module = {};" @@ -19,7 +17,7 @@ CONTRACTS=( $($JQ -r .[] tasks/bundled-abi-contracts-list.json) ) || exit 2 echo "${CONTRACTS[@]}" | xargs -n1 -P4 bash -c " { echo -n \" \$1: \" - $JQ \".abi\" build/truffle/\"\$1\".json || exit 3 + jq \".abi\" build/truffle/\"\$1\".json || exit 3 echo ',' } > build/bundled-abi.\$1.frag " -- diff --git a/packages/ethereum-contracts/truffle-config.js b/packages/ethereum-contracts/truffle-config.js index f8f035c3f4..8829a93c28 100644 --- a/packages/ethereum-contracts/truffle-config.js +++ b/packages/ethereum-contracts/truffle-config.js @@ -128,18 +128,22 @@ function createNetworkDefaultConfiguration( networkName, providerWrapper = (a) => a ) { + const providerConfig = { + url: providerWrapper( + getEnvValue(networkName, "PROVIDER_URL") || + getProviderUrlByTemplate(networkName) + ), + addressIndex: 0, + numberOfAddresses: 10, + shareNonce: true, + }; + providerConfig.mnemonic = getEnvValue(networkName, "MNEMONIC"); + if (!providerConfig.mnemonic) { + const pkey = getEnvValue(networkName, "PRIVATE_KEY"); + providerConfig.privateKeys = [pkey]; + } return { - provider: () => - new HDWalletProvider({ - mnemonic: getEnvValue(networkName, "MNEMONIC"), - url: providerWrapper( - getEnvValue(networkName, "PROVIDER_URL") || - getProviderUrlByTemplate(networkName) - ), - addressIndex: 0, - numberOfAddresses: 10, - shareNonce: true, - }), + provider: () => new HDWalletProvider(providerConfig), gasPrice: getEnvValue(networkName, "GAS_PRICE"), maxFeePerGas: getEnvValue(networkName, "MAX_FEE_PER_GAS"), maxPriorityFeePerGas: getEnvValue(networkName, "MAX_PRIORITY_FEE_PER_GAS"), diff --git a/packages/sdk-core/tasks/testSchemasAndQueries.sh b/packages/sdk-core/tasks/testSchemasAndQueries.sh index d698023616..2076d4f0dc 100755 --- a/packages/sdk-core/tasks/testSchemasAndQueries.sh +++ b/packages/sdk-core/tasks/testSchemasAndQueries.sh @@ -1,7 +1,5 @@ #!/usr/bin/env bash -JQ="npx --package=node-jq -- jq" - # make sure that if any step fails, the script fails set -xe @@ -11,7 +9,7 @@ fi if [ "$SUBGRAPH_RELEASE_TAG" == "dev" ] || [ "$SUBGRAPH_RELEASE_TAG" == "v1" ];then # shellcheck disable=SC2207 - NETWORKS=( $($JQ -r .[] ../subgraph/hosted-service-networks.json) ) + NETWORKS=( $(jq -r .[] ../subgraph/hosted-service-networks.json) ) fi function testSchemaAndQueries() { diff --git a/packages/subgraph/tasks/deploy.sh b/packages/subgraph/tasks/deploy.sh index 80aab6d83e..638e6fee4b 100755 --- a/packages/subgraph/tasks/deploy.sh +++ b/packages/subgraph/tasks/deploy.sh @@ -2,8 +2,6 @@ set -eux -JQ="jq" - # shellcheck disable=SC2207 GRAPH_CLI="npx --package=@graphprotocol/graph-cli --yes -- graph" # shellcheck disable=SC2207 @@ -127,7 +125,7 @@ deploy_to_goldsky() { #Get subgraph version from package.json PACKAGE_JSON_PATH="package.json" - SUBGRAPH_VERSION=$($JQ -r '.version' $PACKAGE_JSON_PATH) + SUBGRAPH_VERSION=$(jq -r '.version' $PACKAGE_JSON_PATH) local subgraphName="protocol-$DEPLOYMENT_ENV-$network/$SUBGRAPH_VERSION" From 43a6c37db890eea96127085bafdef86f7e42e23b Mon Sep 17 00:00:00 2001 From: Miao ZhiCheng Date: Mon, 26 Aug 2024 19:05:39 +0300 Subject: [PATCH 33/42] Workflow caching with nix & faster pre-commit hook (#1929) * workflow: caching using mk-cache-key.nix and github cache This allows testing same code only once. - composite action: .github/actions/setup-workflow-base/action.yml - caching enalbed workflows: - ethereum-contracts - sdk-core - solidity-semantic-money - spec-haskell - hot-fuzz - automations - subgraph * new pre-commit hook - remove pre-commit script from all workflows, - instead, putting workflow filtering in the pre-commit hook. --- .../actions/setup-workflow-base/action.yml | 52 ++++++ ...ll.check-query-schema-against-subgraph.yml | 4 +- .github/workflows/call.deploy-subgraph.yml | 4 +- .../call.test-automation-contracts.yml | 31 ++-- .../call.test-ethereum-contracts.yml | 70 ++++---- .github/workflows/call.test-hot-fuzz.yml | 27 +-- .../workflows/call.test-local-subgraph.yml | 78 +++++---- .github/workflows/call.test-sdk-core.yml | 94 ++++++++--- .../call.test-solidity-semantic-money.yml | 24 ++- .github/workflows/call.test-spec-haskell.yml | 47 +++--- ...subgraph-on-previous-sdk-core-versions.yml | 4 +- .../cd.feature.create-pr-artifact.yml | 4 +- .github/workflows/ci.canary.yml | 157 +++++++++--------- .github/workflows/ci.feature.yml | 70 ++++---- .../workflows/handler.deploy-to-mainnet.yml | 4 +- .../workflows/handler.deploy-to-testnets.yml | 2 +- .../workflows/handler.list-super-token.yml | 4 +- .../handler.publish-release-packages.yml | 4 +- .../handler.run-ethereum-contracts-script.yml | 4 +- .../workflows/handler.verify-contracts.yml | 2 +- .husky/pre-commit | 15 +- default.nix | 12 ++ flake.lock | 25 +++ flake.nix | 13 +- package.json | 20 ++- .../autowrap/foundry.toml | 1 + .../autowrap/package.json | 2 - packages/automation-contracts/default.nix | 24 +++ .../scheduler/foundry.toml | 1 + .../scheduler/package.json | 2 - packages/ethereum-contracts/default.nix | 27 +++ packages/ethereum-contracts/package.json | 4 +- packages/hot-fuzz/default.nix | 17 ++ packages/hot-fuzz/package.json | 2 - packages/js-sdk/package.json | 5 +- packages/metadata/package.json | 3 - packages/sdk-core/default.nix | 29 ++++ packages/sdk-core/package.json | 1 - packages/sdk-redux/package.json | 3 +- packages/solidity-semantic-money/default.nix | 14 ++ packages/solidity-semantic-money/package.json | 3 +- packages/spec-haskell/default.nix | 17 ++ packages/subgraph/.gitignore | 3 +- .../subgraph/cache/solidity-files-cache.json | 4 - packages/subgraph/default.nix | 23 +++ packages/subgraph/package.json | 2 - .../sdk-redux-react-typecript/package.json | 3 +- tasks/create-build-set.sh | 48 +++--- tasks/mk-cache-key.sh | 17 ++ tasks/show-git-rev.sh | 12 ++ 50 files changed, 700 insertions(+), 338 deletions(-) create mode 100644 .github/actions/setup-workflow-base/action.yml create mode 100644 default.nix create mode 100644 packages/automation-contracts/default.nix create mode 100644 packages/ethereum-contracts/default.nix create mode 100644 packages/hot-fuzz/default.nix create mode 100644 packages/sdk-core/default.nix create mode 100644 packages/solidity-semantic-money/default.nix create mode 100644 packages/spec-haskell/default.nix delete mode 100644 packages/subgraph/cache/solidity-files-cache.json create mode 100644 packages/subgraph/default.nix create mode 100755 tasks/mk-cache-key.sh create mode 100755 tasks/show-git-rev.sh diff --git a/.github/actions/setup-workflow-base/action.yml b/.github/actions/setup-workflow-base/action.yml new file mode 100644 index 0000000000..73c4f97682 --- /dev/null +++ b/.github/actions/setup-workflow-base/action.yml @@ -0,0 +1,52 @@ +name: Setup Workflow Base +description: > + This sets up the base for a workflow, where: + + - nix is installed, + - cache is looked up, + - and nix dev shell is setup if cache is missed. + +inputs: + package-name: + description: Name of the package where input files are from + required: true + cache-key-prefix: + description: Cache key prefix to attach to the calculated input files hash + required: true + dev-shell-name: + description: Default shell to be used + +outputs: + cache-hit: + value: ${{ steps.cache.outputs.cache-hit }} + +runs: + using: composite + steps: + - uses: DeterminateSystems/nix-installer-action@v13 + + - name: Load the half-board nix module + id: hb + run: | + ./tasks/mk-cache-key.sh ./packages/${{ inputs.package-name }} > cache.json + jq . cache.json + key_prefix="${{ inputs.cache-key-prefix }}" + path=$(jq '.outputs | join("\n")' cache.json) + hash=$(jq -r .hash cache.json) + echo "path=$path" >> "$GITHUB_OUTPUT" + echo "key=${key_prefix}${hash}" >> "$GITHUB_OUTPUT" + shell: nix develop .#mk-cache-key -c bash -xe {0} + + - name: Lookup cache + id: cache + uses: actions/cache@v4 + with: + path: ${{ fromJSON(steps.hb.outputs.path) }} + key: ${{ steps.hb.outputs.key }} + + - name: Initialize nix dev shell + if: steps.cache.outputs.cache-hit != 'true' + run: | + node --version + yarn --version + shell: nix develop .#${{ inputs.dev-shell-name }} -c bash -xe {0} diff --git a/.github/workflows/call.check-query-schema-against-subgraph.yml b/.github/workflows/call.check-query-schema-against-subgraph.yml index 13275c31ec..b5b45fb748 100644 --- a/.github/workflows/call.check-query-schema-against-subgraph.yml +++ b/.github/workflows/call.check-query-schema-against-subgraph.yml @@ -23,9 +23,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/nix-installer-action@v13 - name: "Install dependencies" run: yarn install --frozen-lockfile diff --git a/.github/workflows/call.deploy-subgraph.yml b/.github/workflows/call.deploy-subgraph.yml index 854ecc2a0a..a4503a6725 100644 --- a/.github/workflows/call.deploy-subgraph.yml +++ b/.github/workflows/call.deploy-subgraph.yml @@ -69,9 +69,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/nix-installer-action@v13 - name: "Install dependencies" run: yarn install --frozen-lockfile diff --git a/.github/workflows/call.test-automation-contracts.yml b/.github/workflows/call.test-automation-contracts.yml index b8cf75784b..04bf4d4023 100644 --- a/.github/workflows/call.test-automation-contracts.yml +++ b/.github/workflows/call.test-automation-contracts.yml @@ -9,33 +9,44 @@ jobs: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18, 20] - defaults: run: - shell: nix develop .#ci-node${{ matrix.node-version }} -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 + - name: Setup workflow base + id: base + uses: ./.github/actions/setup-workflow-base with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + package-name: automation-contracts + cache-key-prefix: automation-contracts- + dev-shell-name: ci-default - - name: Install, lint and build + - name: Install dependencies + if: steps.base.outputs.cache-hit != 'true' run: | yarn install --frozen-lockfile + solc --version + forge --version + + - name: Lint and build + if: steps.base.outputs.cache-hit != 'true' + run: | yarn lint yarn build - name: Test automation-contracts-scheduler + if: steps.base.outputs.cache-hit != 'true' run: | - echo "FOUNDRY_PROFILE=ci" >> $GITHUB_ENV yarn workspace scheduler test + env: + FOUNDRY_PROFILE: ci - name: Test automation-contracts-autowrap + if: steps.base.outputs.cache-hit != 'true' run: | - echo "FOUNDRY_PROFILE=ci" >> $GITHUB_ENV yarn workspace autowrap test + env: + FOUNDRY_PROFILE: ci diff --git a/.github/workflows/call.test-ethereum-contracts.yml b/.github/workflows/call.test-ethereum-contracts.yml index 8da108bd63..7b3a5f2627 100644 --- a/.github/workflows/call.test-ethereum-contracts.yml +++ b/.github/workflows/call.test-ethereum-contracts.yml @@ -8,7 +8,7 @@ on: type: boolean jobs: - # Ahhhhhhhhhh, it is silly, but the only way to preparing conditional matrix. + # When this scrip is written, it is the only way to preparing conditional matrix: # Ref: https://stackoverflow.com/questions/65384420/how-do-i-make-a-github-action-matrix-element-conditional matrix-prep: name: Preparing Conditional Strategy Matrix @@ -19,16 +19,17 @@ jobs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - - name: Check out code into the Go module directory - uses: actions/checkout@v4 + - name: Check out code into the Go module directory + uses: actions/checkout@v4 - - id: set-matrix - run: | - if [ "${{ inputs.run-coverage-tests }}" == "true" ];then - echo "matrix={\"node-version\": [20]}" >> "$GITHUB_OUTPUT" - else - echo "matrix={\"node-version\": [18, 20]}" >> "$GITHUB_OUTPUT" - fi + - name: Set matrix variable + id: set-matrix + run: | + if [ "${{ inputs.run-coverage-tests }}" == "true" ];then + echo "matrix={\"node-version\": [20]}" >> "$GITHUB_OUTPUT" + else + echo "matrix={\"node-version\": [18, 20]}" >> "$GITHUB_OUTPUT" + fi test-ethereum-contracts: name: Test ethereum-contracts @@ -40,41 +41,55 @@ jobs: strategy: matrix: ${{ fromJson(needs.matrix-prep.outputs.matrix) }} + env: + DEV_SHELL_NAME: ci-node${{ matrix.node-version }} + defaults: run: - shell: nix develop .#ci-node${{ matrix.node-version }} -c bash -xe {0} + shell: nix develop .#${{ env.DEV_SHELL_NAME }} -c bash -xe {0} steps: - uses: actions/checkout@v4 with: submodules: recursive - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Initialize devShell + - name: Set cache key prefix + id: set-cache-key-prefix run: | - node --version - yarn --version - solc --version + node_version=${{ matrix.node-version }} + if [ "${{ inputs.run-coverage-tests }}" == false ]; then + v=ethereum-contracts-test-${node_version}- + else + v=ethereum-contracts-coverage-${node_version}- + fi + echo "cache_key_prefix=$v" >> "$GITHUB_OUTPUT" + shell: bash + + - name: Setup workflow base + id: base + uses: ./.github/actions/setup-workflow-base + with: + package-name: ethereum-contracts + cache-key-prefix: ${{ steps.set-cache-key-prefix.outputs.cache_key_prefix }} + dev-shell-name: ${{ env.DEV_SHELL_NAME }} - - name: Yarn Install + - name: Install dependencies + if: steps.base.outputs.cache-hit != 'true' run: | yarn install --frozen-lockfile + solc --version + forge --version npx tsc --version npx hardhat --version - name: Lint and build + if: steps.base.outputs.cache-hit != 'true' run: | yarn lint yarn build - ######################################## - ## Test Suite - ######################################## - name: Run test suite - if: inputs.run-coverage-tests == false + if: steps.base.outputs.cache-hit != 'true' && inputs.run-coverage-tests == false run: | echo "FOUNDRY_PROFILE=ci" >> $GITHUB_ENV yarn test @@ -84,11 +99,8 @@ jobs: HARDHAT_TEST_JOBS: 4 HARDHAT_RUN_PARALLEL: 1 - ######################################## - ## Coverage Test - ######################################## - name: Run coverage test - if: inputs.run-coverage-tests == true + if: steps.base.outputs.cache-hit != 'true' && inputs.run-coverage-tests == true run: | echo "FOUNDRY_PROFILE=ci" >> $GITHUB_ENV yarn test-coverage @@ -105,7 +117,7 @@ jobs: HARDHAT_RUN_PARALLEL: 0 - name: Clean up and merge coverage artifacts - if: inputs.run-coverage-tests == true + if: steps.base.outputs.cache-hit != 'true' && inputs.run-coverage-tests == true run: ./tasks/coverage-cleanup.sh working-directory: ./packages/ethereum-contracts diff --git a/.github/workflows/call.test-hot-fuzz.yml b/.github/workflows/call.test-hot-fuzz.yml index 1b3058696c..9d97f04036 100644 --- a/.github/workflows/call.test-hot-fuzz.yml +++ b/.github/workflows/call.test-hot-fuzz.yml @@ -16,23 +16,26 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 + - name: Setup workflow base + id: base + uses: ./.github/actions/setup-workflow-base with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + package-name: hot-fuzz + cache-key-prefix: hot-fuzz- + dev-shell-name: ci-hot-fuzz - - name: Initialize devShell + - name: Install dependencies + if: steps.base.outputs.cache-hit != 'true' run: | - set -xe + yarn install + solc --version + forge --version slither --version echidna --version - - name: Run Yarn Install - run: | - yarn install - - name: Run tests - run: | - cd packages/hot-fuzz - ./hot-fuzz contracts/superfluid-tests/SuperHotFuzz.yaml + if: steps.base.outputs.cache-hit != 'true' + run: ./hot-fuzz contracts/superfluid-tests/SuperHotFuzz.yaml + working-directory: packages/hot-fuzz env: - ECHIDNA_TEST_LIMIT: 10000 + ECHIDNA_TEST_LIMIT: 20000 diff --git a/.github/workflows/call.test-local-subgraph.yml b/.github/workflows/call.test-local-subgraph.yml index 51e58e4aad..eea711bd78 100644 --- a/.github/workflows/call.test-local-subgraph.yml +++ b/.github/workflows/call.test-local-subgraph.yml @@ -3,6 +3,10 @@ name: Reusable Workflow | Run Unit and Integration Tests on Local Subgraph on: workflow_call: +env: + # FIXME: subgraph test fails with node20 + DEV_SHELL_NAME: ci-node18 + jobs: subgraph-unit-tests: name: Run subgraph unit tests @@ -13,43 +17,39 @@ jobs: defaults: run: - # FIXME: subgraph test fails with node20 - shell: nix develop .#ci-node18 -c bash -xe {0} + shell: nix develop .#${{ env.DEV_SHELL_NAME }} -c bash -xe {0} steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 + - name: Setup workflow base + id: base + uses: ./.github/actions/setup-workflow-base with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Initialize devShell - run: | - set -ex - node --version - yarn --version + package-name: subgraph + cache-key-prefix: subgraph-unit-tests- + dev-shell-name: ${{ env.DEV_SHELL_NAME }} - - name: "Install dependencies" + - name: Install dependencies + if: steps.base.outputs.cache-hit != 'true' run: | - set -ex yarn install --frozen-lockfile npx tsc --version + npx graph --version - - name: "Build contracts" + - name: Build ethereum contracts + if: steps.base.outputs.cache-hit != 'true' run: | yarn lint yarn build working-directory: ./packages/ethereum-contracts - - name: "Build" - run: npx ts-node scripts/buildNetworkConfig.ts polygon-mainnet - working-directory: ${{ env.subgraph-working-directory }} - - - name: "Run unit tests" + - name: Run unit tests + if: steps.base.outputs.cache-hit != 'true' run: yarn matchstick working-directory: ${{ env.subgraph-working-directory }} - subgraph-end-to-end-integration: + subgraph-integration-tests: name: Run subgraph integration tests runs-on: ubuntu-latest @@ -60,52 +60,64 @@ jobs: defaults: run: - shell: nix develop .#ci-node18 -c bash -xe {0} + shell: nix develop .#${{ env.DEV_SHELL_NAME }} -c bash -xe {0} steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 + - name: Setup workflow base + id: base + uses: ./.github/actions/setup-workflow-base with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + package-name: subgraph + cache-key-prefix: subgraph-integration-tests- + dev-shell-name: ${{ env.DEV_SHELL_NAME }} - - name: "Install dependencies" + - name: Install dependencies + if: steps.base.outputs.cache-hit != 'true' run: yarn install --frozen-lockfile - - name: "Build contracts" + - name: Build contracts + if: steps.base.outputs.cache-hit != 'true' run: yarn build working-directory: ./packages/ethereum-contracts - - name: "Start hardhat node" - run: | - ./tasks/startHardhatNode.sh start + - name: Start hardhat node + if: steps.base.outputs.cache-hit != 'true' + run: ./tasks/startHardhatNode.sh start working-directory: ${{ env.sdk-core-working-directory }} - - name: "Build SDK-Core" + - name: Build SDK core + if: steps.base.outputs.cache-hit != 'true' # build sdk-core because subgraph tests use sdk-core run: yarn build working-directory: ${{ env.sdk-core-working-directory }} - - name: "Deploy Framework and Tokens" + - name: Deploy framework and tokens + if: steps.base.outputs.cache-hit != 'true' run: npx hardhat run dev-scripts/run-deploy-contracts-and-token.js --network localhost working-directory: ./packages/ethereum-contracts - - name: "Prepare files for local testing" + - name: Prepare files for local testing + if: steps.base.outputs.cache-hit != 'true' run: yarn prepare-local working-directory: ${{ env.subgraph-working-directory }} - - name: "Run setup-graph-node" + - name: Run setup-graph-node + if: steps.base.outputs.cache-hit != 'true' run: | chmod +x ./tasks/setup-graph-node.sh ./tasks/setup-graph-node.sh working-directory: ${{ env.subgraph-working-directory }} - - name: "Docker compose" + - name: Docker compose + if: steps.base.outputs.cache-hit != 'true' run: | docker rm subgraph_graph-node_1 || true docker compose up & working-directory: ${{ env.subgraph-working-directory }} - - name: "Run subgraph integration test suite" + - name: Run subgraph integration test suite + if: steps.base.outputs.cache-hit != 'true' run: yarn test --network localhost working-directory: ${{ env.subgraph-working-directory }} diff --git a/.github/workflows/call.test-sdk-core.yml b/.github/workflows/call.test-sdk-core.yml index 46c2131371..b6ffed2ffb 100644 --- a/.github/workflows/call.test-sdk-core.yml +++ b/.github/workflows/call.test-sdk-core.yml @@ -14,78 +14,134 @@ on: type: boolean jobs: + # When this scrip is written, it is the only way to preparing conditional matrix: + # Ref: https://stackoverflow.com/questions/65384420/how-do-i-make-a-github-action-matrix-element-conditional + matrix-prep: + name: Preparing Conditional Strategy Matrix + + runs-on: ubuntu-latest + + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + + steps: + - name: Set matrix variable + id: set-matrix + run: | + if [ "${{ inputs.run-coverage-tests }}" == "true" ];then + echo "matrix={\"node-version\": [18]}" >> "$GITHUB_OUTPUT" + else + # FIXME: subgraph test fails with node20 + echo "matrix={\"node-version\": [18]}" >> "$GITHUB_OUTPUT" + fi + test-sdk-core: name: Test SDK-Core + needs: [matrix-prep] + runs-on: ubuntu-latest + strategy: + matrix: ${{ fromJson(needs.matrix-prep.outputs.matrix) }} + env: + DEV_SHELL_NAME: ci-node${{ matrix.node-version }} ethereum-contracts-working-directory: ./packages/ethereum-contracts subgraph-working-directory: ./packages/subgraph sdk-core-working-directory: ./packages/sdk-core defaults: run: - # FIXME: subgraph test fails with node20 - shell: nix develop .#ci-node18 -c bash -xe {0} + shell: nix develop .#${{ env.DEV_SHELL_NAME }} -c bash -xe {0} steps: - uses: actions/checkout@v4 + with: + submodules: recursive - - uses: cachix/install-nix-action@v19 + - name: Set cache key prefix + id: set-cache-key-prefix + run: | + node_version=${{ matrix.node-version }} + if [ "${{ inputs.run-coverage-tests }}" == false ]; then + v=sdk-core-test-${node_version}- + else + v=sdk-core-coverage-${node_version}- + fi + echo "cache_key_prefix=$v" >> "$GITHUB_OUTPUT" + shell: bash + + - name: Setup workflow base + id: base + uses: ./.github/actions/setup-workflow-base with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + package-name: sdk-core + cache-key-prefix: ${{ steps.set-cache-key-prefix.outputs.cache_key_prefix }} + dev-shell-name: ${{ env.DEV_SHELL_NAME }} - - name: "Install dependencies" - run: yarn install --frozen-lockfile + - name: Install dependencies + if: steps.base.outputs.cache-hit != 'true' + run: | + yarn install --frozen-lockfile + npx tsc --version + npx hardhat --version - - name: "Build contracts" + - name: Lint and build essentials + if: steps.base.outputs.cache-hit != 'true' run: | yarn lint yarn build working-directory: ${{ env.ethereum-contracts-working-directory }} - - name: "Start hardhat node" + - name: Start hardhat node + if: steps.base.outputs.cache-hit != 'true' run: | ./tasks/startHardhatNode.sh start working-directory: ${{ env.sdk-core-working-directory }} - - name: "Build SDK-Core" + - name: Build SDK Core + if: steps.base.outputs.cache-hit != 'true' # build sdk-core because of auto linking to dependency run: | yarn lint yarn build working-directory: ${{ env.sdk-core-working-directory }} - - name: "Deploy Framework and Tokens" + - name: Deploy Framework and Tokens + if: steps.base.outputs.cache-hit != 'true' run: npx hardhat run dev-scripts/run-deploy-contracts-and-token.js --network localhost working-directory: ${{ env.ethereum-contracts-working-directory }} - - name: "Prepare files for local testing" + - name: Prepare files for local testing + if: steps.base.outputs.cache-hit != 'true' run: yarn prepare-local working-directory: ${{ env.subgraph-working-directory }} - - name: "Run setup-graph-node" + - name: Run setup-graph-node + if: steps.base.outputs.cache-hit != 'true' run: | chmod +x ./tasks/setup-graph-node.sh ./tasks/setup-graph-node.sh working-directory: ${{ env.subgraph-working-directory }} - - name: "Docker compose" + - name: Docker compose + if: steps.base.outputs.cache-hit != 'true' run: | docker rm subgraph_graph-node_1 || true docker compose up & working-directory: ${{ env.subgraph-working-directory }} - - name: "Build and deploy local subgraph" + - name: Build and deploy local subgraph + if: steps.base.outputs.cache-hit != 'true' run: | yarn build-and-deploy-local # artificial slow down to give the subgraph time to sync sleep 30 working-directory: ${{ env.subgraph-working-directory }} - - name: "Run test suite" - if: inputs.run-coverage-tests == false + - name: Run test suite + if: steps.base.outputs.cache-hit != 'true' && inputs.run-coverage-tests == false run: | yarn get-graphql-schema:${{ inputs.subgraph-release }} ./tasks/setupTestEnvironment.sh @@ -95,8 +151,8 @@ jobs: SUBGRAPH_RELEASE_TAG: ${{ inputs.subgraph-release }} SUBGRAPH_ENDPOINT: ${{ inputs.subgraph-endpoint }} - - name: "Run coverage test" - if: inputs.run-coverage-tests == true + - name: Run coverage test + if: steps.base.outputs.cache-hit != 'true' && inputs.run-coverage-tests == true run: | yarn workspace @superfluid-finance/sdk-core test-coverage working-directory: ${{ env.sdk-core-working-directory }} @@ -104,7 +160,7 @@ jobs: SUBGRAPH_RELEASE_TAG: ${{ inputs.subgraph-release }} SUBGRAPH_ENDPOINT: ${{ inputs.subgraph-endpoint }} - - name: "Create coverage artifact" + - name: Create coverage artifact if: inputs.run-coverage-tests == true uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/call.test-solidity-semantic-money.yml b/.github/workflows/call.test-solidity-semantic-money.yml index 5a46c4aff4..cceec6a41d 100644 --- a/.github/workflows/call.test-solidity-semantic-money.yml +++ b/.github/workflows/call.test-solidity-semantic-money.yml @@ -15,22 +15,28 @@ jobs: steps: - uses: actions/checkout@v4 + with: + submodules: recursive - - uses: cachix/install-nix-action@v19 + - name: Setup workflow base + id: base + uses: ./.github/actions/setup-workflow-base with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + package-name: solidity-semantic-money + cache-key-prefix: solidity-semantic-money- + dev-shell-name: ci-default - - name: Initialize Nix DevShell + - name: Install dependencies + if: steps.base.outputs.cache-hit != 'true' run: | + yarn install --frozen-lockfile + solc --version forge --version - - name: Initialize Node Modules - run: | - yarn install - - - name: Build & Test + - name: Build and test + if: steps.base.outputs.cache-hit != 'true' run: | - cd packages/solidity-semantic-money make build-src test-all + working-directory: packages/solidity-semantic-money env: FOUNDRY_FUZZ_RUNS: 4200 # yea, baby diff --git a/.github/workflows/call.test-spec-haskell.yml b/.github/workflows/call.test-spec-haskell.yml index b4a89792b9..907ddd3676 100644 --- a/.github/workflows/call.test-spec-haskell.yml +++ b/.github/workflows/call.test-spec-haskell.yml @@ -12,49 +12,48 @@ jobs: strategy: matrix: include: - #- compiler-name: ghc-9.2 - # dev-shell-type: ci-spec-ghc92 - compiler-name: ghc-9.4 - dev-shell-type: ci-spec-ghc94 + dev-shell-name: ci-spec-ghc94 fail-fast: false defaults: run: - shell: nix develop .#${{ matrix.dev-shell-type }} -c bash -xe {0} + shell: nix develop .#${{ matrix.dev-shell-name }} -c bash -xe {0} steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 + - name: Setup workflow base + id: base + uses: ./.github/actions/setup-workflow-base with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Initialize devShell - run: | - set -xe - cabal --version - ghc --version + package-name: spec-haskell + cache-key-prefix: spec-haskell-${{ matrix.compiler-name }}- + dev-shell-name: ${{ matrix.dev-shell-name }} - name: Run cabal update + if: steps.base.outputs.cache-hit != 'true' run: | cabal v2-update + cabal --version + ghc --version - name: Run lint - run: | - cd packages/spec-haskell - make lint + if: steps.base.outputs.cache-hit != 'true' + run: make lint + working-directory: packages/spec-haskell - name: Run build - run: | - cd packages/spec-haskell - make build + if: steps.base.outputs.cache-hit != 'true' + run: make build + working-directory: packages/spec-haskell - name: Run tests - run: | - cd packages/spec-haskell - make test + if: steps.base.outputs.cache-hit != 'true' + run: make test + working-directory: packages/spec-haskell - name: Make haddock docs - run: | - cd packages/spec-haskell - make docs-haddock + if: steps.base.outputs.cache-hit != 'true' + run: make docs-haddock + working-directory: packages/spec-haskell diff --git a/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml b/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml index de04046cd1..e13da59427 100644 --- a/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml +++ b/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml @@ -35,9 +35,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/nix-installer-action@v13 - name: "Install dependencies" run: yarn install --frozen-lockfile diff --git a/.github/workflows/cd.feature.create-pr-artifact.yml b/.github/workflows/cd.feature.create-pr-artifact.yml index a536169efc..0104786319 100644 --- a/.github/workflows/cd.feature.create-pr-artifact.yml +++ b/.github/workflows/cd.feature.create-pr-artifact.yml @@ -19,9 +19,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/nix-installer-action@v13 - name: Show context env: diff --git a/.github/workflows/ci.canary.yml b/.github/workflows/ci.canary.yml index 01cb9d826f..0826f8150a 100644 --- a/.github/workflows/ci.canary.yml +++ b/.github/workflows/ci.canary.yml @@ -4,12 +4,13 @@ on: push: branches: ["dev"] paths: + - ".github/workflows/ci.canary.yml" + - ".github/workflows/call.*.yml" - "package.json" + - "yarn.lock" - "packages/**" - # - "**.md" commented-out because README updates should go to the packages - - ".github/workflows/ci.canary.yml" - "codecov.yml" - - ".github/workflows/call.*.yml" + # - "**.md" are commented out because docs updates should go into the packages jobs: check: @@ -23,30 +24,14 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Create build set - run: tasks/create-build-set.sh ${{ github.sha }} dev origin - - essential-build-and-test: - name: Build and test essential packages of dev branch - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [18, 20] - - defaults: - run: - shell: nix develop .#ci-node${{ matrix.node-version }} -c bash -xe {0} - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive + - uses: DeterminateSystems/nix-installer-action@v13 - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - name: Initialize nix dev shell + run: | + node --version + yarn --version + shellcheck --version + actionlint --version - name: Show contexts env: @@ -60,33 +45,71 @@ jobs: echo github.head_ref: "$HEAD_REF" echo github.base_ref: ${{ github.base_ref }} - - name: Install, lint, build, and test + - name: Run global lint run: | - yarn install --frozen-lockfile - yarn lint - yarn build - yarn test - env: - POLYGON_MAINNET_PROVIDER_URL: ${{ secrets.POLYGON_MAINNET_PROVIDER_URL }} - SUBGRAPH_RELEASE_TAG: dev - FOUNDRY_PROFILE: ci + npm run lint:shellcheck + npm run lint:actionlint + + - name: Create build set + run: tasks/create-build-set.sh ${{ github.sha }} dev origin + + test-spec-haskell: + uses: ./.github/workflows/call.test-spec-haskell.yml + name: Build and Test Spec Haskell (Canary Branch) + needs: [check] + + test-solidity-semantic-money: + name: Build and Test Solidity Semantic Money (Canary Branch) + uses: ./.github/workflows/call.test-solidity-semantic-money.yml + needs: [check] + + test-ethereum-contracts: + name: Test ethereum-contracts (Canary Branch) + uses: ./.github/workflows/call.test-ethereum-contracts.yml + needs: [check] + with: + run-coverage-tests: false + + coverage-ethereum-contracts: + name: Coverage test ethereum-contracts (Canary Branch) + uses: ./.github/workflows/call.test-ethereum-contracts.yml + needs: [check] + with: + run-coverage-tests: true test-hot-fuzz: uses: ./.github/workflows/call.test-hot-fuzz.yml name: Hot Fuzz (Development Branch) - - test-subgraph: - uses: ./.github/workflows/call.test-local-subgraph.yml - name: Build and Test Subgraph (Development Branch) + needs: [check] test-sdk-core: uses: ./.github/workflows/call.test-sdk-core.yml name: Build and Test SDK-Core (Development Branch) + needs: [check] with: subgraph-release: local subgraph-endpoint: http://localhost:8000/subgraphs/name/superfluid-test run-coverage-tests: false + coverage-sdk-core: + uses: ./.github/workflows/call.test-sdk-core.yml + name: Build and Test SDK-Core Coverage (Canary Branch) + needs: [check] + with: + subgraph-release: local + subgraph-endpoint: http://localhost:8000/subgraphs/name/superfluid-test + run-coverage-tests: true + + test-subgraph: + uses: ./.github/workflows/call.test-local-subgraph.yml + name: Build and Test Subgraph (Development Branch) + needs: [check] + + test-automation-contracts: + uses: ./.github/workflows/call.test-automation-contracts.yml + name: Build and Test Automation Contracts (Canary Branch) + needs: [check] + # deploy subgraph if changes are made, we can call this every time, but we won't actually do any deployments # if the IPFS hash generated stays the same (no mapping logic changes) deploy-subgraph-changes: @@ -101,32 +124,6 @@ jobs: secrets: THE_GRAPH_ACCESS_TOKEN: ${{ secrets.THE_GRAPH_ACCESS_TOKEN }} - test-solidity-semantic-money: - name: Build and Test Solidity Semantic Money (Canary Branch) - uses: ./.github/workflows/call.test-solidity-semantic-money.yml - - test-spec-haskell: - uses: ./.github/workflows/call.test-spec-haskell.yml - name: Build and Test Spec Haskell (Canary Branch) - - test-automation-contracts: - uses: ./.github/workflows/call.test-automation-contracts.yml - name: Build and Test Automation Contracts (Canary Branch) - - coverage-ethereum-contracts: - name: Coverage test ethereum-contracts (Canary Branch) - uses: ./.github/workflows/call.test-ethereum-contracts.yml - with: - run-coverage-tests: true - - coverage-sdk-core: - uses: ./.github/workflows/call.test-sdk-core.yml - name: Build and Test SDK-Core Coverage (Canary Branch) - with: - subgraph-release: local - subgraph-endpoint: http://localhost:8000/subgraphs/name/superfluid-test - run-coverage-tests: true - upload-coverage-reports: name: Upload Coverage Reports (Feature Branch) uses: ./.github/workflows/call.upload-coverage-reports.yml @@ -139,13 +136,14 @@ jobs: runs-on: ubuntu-latest # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-not-requiring-successful-dependent-jobs if: ${{ always() }} - needs: [ essential-build-and-test - , test-spec-haskell + + needs: [ test-spec-haskell , test-solidity-semantic-money + , test-ethereum-contracts, coverage-ethereum-contracts , test-hot-fuzz + , test-sdk-core, coverage-sdk-core , test-subgraph - , coverage-ethereum-contracts - , coverage-sdk-core + , test-automation-contracts ] steps: - name: Test Results @@ -161,12 +159,15 @@ jobs: echo "Passed." fi } - check_result essential-build-and-test ${{ needs.essential-build-and-test.result }} check_result spec-haskell ${{ needs.test-spec-haskell.result }} + check_result solidity-semantic-money ${{ needs.test-solidity-semantic-money.result }} + check_result test-ethereum-contracts ${{ needs.test-ethereum-contracts.result }} + check_result coverage-ethereum-contracts ${{ needs.coverage-ethereum-contracts.result }} check_result hot-fuzz ${{ needs.test-hot-fuzz.result }} + check_result test-sdk-core ${{ needs.test-sdk-core.result }} + check_result coverage-sdk-core ${{ needs.coverage-sdk-core.result }} check_result subgraph ${{ needs.test-subgraph.result }} - check_result ethereum-contracts-coverage ${{ needs.coverage-ethereum-contracts.result }} - check_result sdk-core-coverage ${{ needs.coverage-sdk-core.result }} + check_result automation-contracts ${{ needs.test-automation-contracts.result }} publish-npm-packages: name: Publish canary packages to registries @@ -184,9 +185,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/nix-installer-action@v13 - name: Install dependencies run: yarn install --frozen-lockfile @@ -233,9 +232,7 @@ jobs: repository: superfluid-finance/build-scripts path: build-scripts - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/nix-installer-action@v13 - name: Install dependencies run: yarn install --frozen-lockfile @@ -293,9 +290,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/nix-installer-action@v13 - name: Build run: | diff --git a/.github/workflows/ci.feature.yml b/.github/workflows/ci.feature.yml index d08dca1ef8..01647af667 100644 --- a/.github/workflows/ci.feature.yml +++ b/.github/workflows/ci.feature.yml @@ -38,13 +38,12 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/nix-installer-action@v13 - - name: Initialize devShell + - name: Initialize nix dev shell run: | node --version + yarn --version shellcheck --version actionlint --version @@ -60,12 +59,26 @@ jobs: echo github.head_ref: "$HEAD_REF" echo github.base_ref: ${{ github.base_ref }} - - name: Run pre-commit check - run: npm run pre-commit + - name: Run global lint + run: | + npm run lint:shellcheck + npm run lint:actionlint - name: Create build set run: tasks/create-build-set.sh ${{ github.sha }} dev origin + test-spec-haskell: + name: Test Spec Haskell (Feature Branch) + uses: ./.github/workflows/call.test-spec-haskell.yml + needs: [check] + if: needs.check.outputs.build_spec_haskell + + test-solidity-semantic-money: + name: Test Solidity Semantic Money Library (Feature Branch) + uses: ./.github/workflows/call.test-solidity-semantic-money.yml + needs: [ check ] + if: needs.check.outputs.build_solidity_semantic_money + test-ethereum-contracts: name: Test ethereum-contracts (Feature Branch) uses: ./.github/workflows/call.test-ethereum-contracts.yml @@ -88,26 +101,6 @@ jobs: needs: [ check ] if: needs.check.outputs.build_hot_fuzz - test-solidity-semantic-money: - name: Test Solidity Semantic Money Library (Feature Branch) - uses: ./.github/workflows/call.test-solidity-semantic-money.yml - needs: [ check ] - if: needs.check.outputs.build_solidity_semantic_money - - #test automations: - test-automation-contracts: - name: Test Automation Contracts (Feature Branch) - uses: ./.github/workflows/call.test-automation-contracts.yml - needs: [ check ] - if: needs.check.outputs.build_automation_contracts - - # subgraph integration test - test-subgraph: - name: Test Subgraph (Feature Branch) - uses: ./.github/workflows/call.test-local-subgraph.yml - needs: [check] - if: needs.check.outputs.build_subgraph - # sdk-core integration test + local subgraph w/ local sdk-core test-sdk-core: name: Test sdk-core (Feature Branch) @@ -129,11 +122,17 @@ jobs: subgraph-endpoint: http://localhost:8000/subgraphs/name/superfluid-test run-coverage-tests: true - test-spec-haskell: - name: Test Spec Haskell (Feature Branch) - uses: ./.github/workflows/call.test-spec-haskell.yml + test-subgraph: + name: Test Subgraph (Feature Branch) + uses: ./.github/workflows/call.test-local-subgraph.yml needs: [check] - if: needs.check.outputs.build_spec_haskell + if: needs.check.outputs.build_subgraph + + test-automation-contracts: + name: Test Automation Contracts (Feature Branch) + uses: ./.github/workflows/call.test-automation-contracts.yml + needs: [check] + if: needs.check.outputs.build_automation_contracts upload-coverage-reports: name: Upload Coverage Reports (Feature Branch) @@ -170,18 +169,19 @@ jobs: local package_name="$1" local result="$2" if [ "$result" == "skipped" ];then - echo "Skipped $package_name package." + echo "Skipped job: $package_name." else - echo "Checking if $package_name package test passes..." + echo "Checking if the job \"$package_name\" passes..." test "$result" == "success" echo "Passed." fi } check_result spec-haskell ${{ needs.test-spec-haskell.result }} check_result solidity-semantic-money ${{ needs.test-solidity-semantic-money.result }} - check_result ethereum-contracts ${{ needs.test-ethereum-contracts.result }} - check_result ethereum-contracts-coverage ${{ needs.coverage-ethereum-contracts.result }} + check_result test-ethereum-contracts ${{ needs.test-ethereum-contracts.result }} + check_result coverage-ethereum-contracts ${{ needs.coverage-ethereum-contracts.result }} check_result hot-fuzz ${{ needs.test-hot-fuzz.result }} - check_result sdk-core ${{ needs.test-sdk-core.result }} + check_result test-sdk-core ${{ needs.test-sdk-core.result }} + check_result coverage-sdk-core ${{ needs.coverage-sdk-core.result }} check_result subgraph ${{ needs.test-subgraph.result }} check_result automation-contracts ${{ needs.test-automation-contracts.result }} diff --git a/.github/workflows/handler.deploy-to-mainnet.yml b/.github/workflows/handler.deploy-to-mainnet.yml index 484ac44dbc..165fde5fd3 100644 --- a/.github/workflows/handler.deploy-to-mainnet.yml +++ b/.github/workflows/handler.deploy-to-mainnet.yml @@ -38,9 +38,7 @@ jobs: repository: superfluid-finance/build-scripts path: build-scripts - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/nix-installer-action@v13 - name: Build run: | diff --git a/.github/workflows/handler.deploy-to-testnets.yml b/.github/workflows/handler.deploy-to-testnets.yml index b6ec062b54..5586897a6d 100644 --- a/.github/workflows/handler.deploy-to-testnets.yml +++ b/.github/workflows/handler.deploy-to-testnets.yml @@ -43,7 +43,7 @@ jobs: if: ${{ github.event.inputs.only_network != '' && github.event.inputs.only_network != matrix.network }} run: echo "DO_SKIP=1" >> "$GITHUB_ENV" - - uses: cachix/install-nix-action@v19 + - uses: cachix/install-nix-action@v27 if: env.DO_SKIP != 1 with: github_access_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/handler.list-super-token.yml b/.github/workflows/handler.list-super-token.yml index 67e02909a6..5cbe04f8f8 100644 --- a/.github/workflows/handler.list-super-token.yml +++ b/.github/workflows/handler.list-super-token.yml @@ -40,9 +40,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/nix-installer-action@v13 - name: Build run: | diff --git a/.github/workflows/handler.publish-release-packages.yml b/.github/workflows/handler.publish-release-packages.yml index 0fcb873870..1bf9aa1c9e 100644 --- a/.github/workflows/handler.publish-release-packages.yml +++ b/.github/workflows/handler.publish-release-packages.yml @@ -24,9 +24,7 @@ jobs: repository: superfluid-finance/build-scripts path: build-scripts - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/nix-installer-action@v13 - name: Parse Tag env: diff --git a/.github/workflows/handler.run-ethereum-contracts-script.yml b/.github/workflows/handler.run-ethereum-contracts-script.yml index 0e994beb82..6b0309606a 100644 --- a/.github/workflows/handler.run-ethereum-contracts-script.yml +++ b/.github/workflows/handler.run-ethereum-contracts-script.yml @@ -40,9 +40,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/nix-installer-action@v13 - name: Build run: | diff --git a/.github/workflows/handler.verify-contracts.yml b/.github/workflows/handler.verify-contracts.yml index 34b4ef08c1..5f63de52ca 100644 --- a/.github/workflows/handler.verify-contracts.yml +++ b/.github/workflows/handler.verify-contracts.yml @@ -37,7 +37,7 @@ jobs: if: ${{ github.event.inputs.only_network != '' && github.event.inputs.only_network != matrix.network }} run: echo "DO_SKIP=1" >> "$GITHUB_ENV" - - uses: cachix/install-nix-action@v19 + - uses: cachix/install-nix-action@v27 if: env.DO_SKIP != 1 with: github_access_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.husky/pre-commit b/.husky/pre-commit index 025779ed2b..4a4468a912 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,17 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -yarn pre-commit +# always lint these +npm run lint:shellcheck +npm run lint:actionlint + +# only lint the workspace if there is staged files +for i in $(jq -r '.workspaces.packages | .[]' package.json); do + if [ -n "$(git diff --name-only HEAD -- "$i")" ]; then ( + echo "= Linting workspace $i" + cd "$i" || exit 3 + npm run lint + ) else { + echo "= Skipping workspace $i: no changed files." + } fi +done diff --git a/default.nix b/default.nix new file mode 100644 index 0000000000..846b1f7d48 --- /dev/null +++ b/default.nix @@ -0,0 +1,12 @@ +{ + halfBoardModule = { + includedFiles = [ + # development tooling defined in nix + ./flake.nix + ./flake.lock + # managing the npm dependencies with yarna + ./package.json + ./yarn.lock + ]; + }; +} diff --git a/flake.lock b/flake.lock index fb9e7b1b8b..6c8994fd15 100644 --- a/flake.lock +++ b/flake.lock @@ -42,6 +42,30 @@ "type": "github" } }, + "mk-cache-key": { + "inputs": { + "flake-utils": [ + "flake-utils" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1718047354, + "narHash": "sha256-WGlodS+Ju1rH5CNuDeNDuRMEXAk4A3IZIimIGNMdoxk=", + "owner": "hellwolf", + "repo": "mk-cache-key.nix", + "rev": "82f25a577f25fcb9eed94b3a04330ccf4a102cba", + "type": "github" + }, + "original": { + "owner": "hellwolf", + "ref": "master", + "repo": "mk-cache-key.nix", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1723019560, @@ -62,6 +86,7 @@ "inputs": { "flake-utils": "flake-utils", "foundry": "foundry", + "mk-cache-key": "mk-cache-key", "nixpkgs": "nixpkgs", "solc": "solc" } diff --git a/flake.nix b/flake.nix index 8ab6136c02..6cab030f3e 100644 --- a/flake.nix +++ b/flake.nix @@ -14,9 +14,14 @@ inputs.flake-utils.follows = "flake-utils"; inputs.nixpkgs.follows = "nixpkgs"; }; + mk-cache-key = { + url = "github:hellwolf/mk-cache-key.nix/master"; + inputs.flake-utils.follows = "flake-utils"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs, flake-utils, foundry, solc } : + outputs = { self, nixpkgs, flake-utils, foundry, solc, mk-cache-key } : flake-utils.lib.eachDefaultSystem (system: let minDevSolcVer = "solc_0_8_11"; # minimum solidity version used for external development @@ -32,12 +37,15 @@ ]; }; + mk-cache-key-pkg = mk-cache-key.packages.${system}.default; + # ghc ecosystem ghc = pkgs.haskell.compiler.${ghcVer94}; ghcPkgs = pkgs.haskell.packages.${ghcVer94}; # common dev inputs commonDevInputs = with pkgs; [ + mk-cache-key-pkg gnumake # for shell script linting shellcheck @@ -140,6 +148,9 @@ }; # CI shells + devShells.mk-cache-key = mkShell { + buildInputs = [ mk-cache-key-pkg ]; + }; devShells.ci-default = mkShell { buildInputs = ciInputs ++ minimumDevInputs; }; diff --git a/package.json b/package.json index 721f98049a..4fa3381846 100644 --- a/package.json +++ b/package.json @@ -10,22 +10,30 @@ "license": "MIT", "scripts": { "postinstall": "npm run git-submodule:init && husky install", - "lint": "run-s lint:*", + "lint": "run-s -l lint:*", "lint:shellcheck": "tasks/shellcheck-all-tasks.sh", - "lint:workspaces": "yarn workspaces run lint", "lint:actionlint": "actionlint .github/workflows/*.yml", + "lint:workspaces": "yarn workspaces run lint", "build": "npm run build-essentials #synonym of build-essentials", - "build-essentials": "set -ex;for i in metadata ethereum-contracts js-sdk sdk-core sdk-redux;do yarn workspace @superfluid-finance/$i build;done", - "build-for-contracts-dev": "set -ex;for i in metadata ethereum-contracts js-sdk;do yarn workspace @superfluid-finance/$i build;done", + "build-essentials": "run-s -l build-essentials:*", + "build-essentials:metadata": "yarn workspace @superfluid-finance/metadata build", + "build-essentials:solidity-semantic-money": "yarn workspace @superfluid-finance/solidity-semantic-money build", + "build-essentials:ethereum-contracts": "yarn workspace @superfluid-finance/ethereum-contracts build", + "build-essentials:js-sdk": "yarn workspace @superfluid-finance/js-sdk build", + "build-essentials:sdk-core": "yarn workspace @superfluid-finance/sdk-core build", + "build-essentials:sdk-redux": "yarn workspace @superfluid-finance/sdk-redux build", + "build-for-contracts-dev": "run-s -l build-for-contracts-dev:*", + "build-for-contracts-dev:metadata": "yarn workspace @superfluid-finance/metadata build", + "build-for-contracts-dev:ethereum-contracts": "yarn workspace @superfluid-finance/ethereum-contracts build", + "build-for-contracts-dev:js-sdk": "yarn workspace @superfluid-finance/js-sdk build", "clean": "rm -rf node_modules; rm -rf packages/*/node_modules; yarn workspace @superfluid-finance/ethereum-contracts clean", "test": "set -ex;for i in ethereum-contracts;do yarn workspace @superfluid-finance/$i test;done", "show-versions": "lerna ls --long", - "pre-commit": "npm run lint:shellcheck && npm run lint:actionlint && yarn workspaces run pre-commit", "git-submodule:init": "git submodule update --init --recursive", "git-submodule:update": "git submodule update --recursive", "git-submodule:sync": "git submodule update --remote --recursive;git submodule sync --recursive", "git-submodule:deinit": "git submodule deinit --all --force", - "check-updates": "run-s check-updates:*", + "check-updates": "run-s -l check-updates:*", "check-updates:root": "ncu --target minor --dep dev", "check-updates:workspaces": "yarn workspaces run check-updates", "shell": "nix develop", diff --git a/packages/automation-contracts/autowrap/foundry.toml b/packages/automation-contracts/autowrap/foundry.toml index bc22bba488..38ee59fb0b 100644 --- a/packages/automation-contracts/autowrap/foundry.toml +++ b/packages/automation-contracts/autowrap/foundry.toml @@ -9,6 +9,7 @@ remappings = [ '@openzeppelin/=node_modules/@openzeppelin/', 'ds-test/=lib/forge-std/lib/ds-test/src/', 'forge-std/=lib/forge-std/src/'] +out = 'packages/automation-contracts/autowrap/out/default' [profile.ci] offline = true diff --git a/packages/automation-contracts/autowrap/package.json b/packages/automation-contracts/autowrap/package.json index ccbb894182..a6e7fa8ba6 100644 --- a/packages/automation-contracts/autowrap/package.json +++ b/packages/automation-contracts/autowrap/package.json @@ -9,8 +9,6 @@ "deploy": "npx hardhat deploy --network", "lint": "run-s lint:*", "lint:sol": "solhint -w 0 contracts/*.sol contracts/*/*.sol && echo '✔ Your .sol files look good.'", - "pre-commit": "if [ ! -z \"$(git status -s .)\" ];then run-s pre-commit:*;else true;fi", - "pre-commit:lint": "yarn lint", "check-updates": "ncu --target minor" }, "devDependencies": { diff --git a/packages/automation-contracts/default.nix b/packages/automation-contracts/default.nix new file mode 100644 index 0000000000..dacac2bd26 --- /dev/null +++ b/packages/automation-contracts/default.nix @@ -0,0 +1,24 @@ +{ + halfBoardModule = { + dependencies = [ ../ethereum-contracts ]; + outputs = [ + "autowrap/out" + "scheduler/out" + ]; + includedFiles = [ + # autowrap + ./autowrap/foundry.toml + ./autowrap/package.json + ./autowrap/contracts + ./autowrap/test + ./autowrap/script + ./autowrap/.solhint.json + # scheduler + ./scheduler/foundry.toml + ./scheduler/package.json + ./scheduler/contracts + ./scheduler/test + ./scheduler/.solhint.json + ]; + }; +} diff --git a/packages/automation-contracts/scheduler/foundry.toml b/packages/automation-contracts/scheduler/foundry.toml index 55557575b3..6b3a7ebf3a 100644 --- a/packages/automation-contracts/scheduler/foundry.toml +++ b/packages/automation-contracts/scheduler/foundry.toml @@ -9,6 +9,7 @@ remappings = [ '@openzeppelin/=node_modules/@openzeppelin/', 'ds-test/=lib/forge-std/lib/ds-test/src/', 'forge-std/=lib/forge-std/src/'] +out = 'packages/automation-contracts/scheduler/out/default' [profile.ci] offline = true diff --git a/packages/automation-contracts/scheduler/package.json b/packages/automation-contracts/scheduler/package.json index 72ebc8a154..0445eb3281 100644 --- a/packages/automation-contracts/scheduler/package.json +++ b/packages/automation-contracts/scheduler/package.json @@ -9,8 +9,6 @@ "deploy": "npx hardhat deploy --network", "lint": "run-s lint:*", "lint:sol": "solhint -w 0 contracts/*.sol contracts/*/*.sol && echo '✔ Your .sol files look good.'", - "pre-commit": "if [ ! -z \"$(git status -s .)\" ];then run-s pre-commit:*;else true;fi", - "pre-commit:lint": "yarn lint", "check-updates": "ncu --target minor" }, "devDependencies": { diff --git a/packages/ethereum-contracts/default.nix b/packages/ethereum-contracts/default.nix new file mode 100644 index 0000000000..b895da1e83 --- /dev/null +++ b/packages/ethereum-contracts/default.nix @@ -0,0 +1,27 @@ +{ + halfBoardModule = { + dependencies = [ + ../.. + ../solidity-semantic-money + ]; + outputs = [ + "build" + "coverage" + ]; + includedFiles = [ + # source code + ./tasks + ./contracts + ./dev-scripts + ./test + ./testsuites + # configurations + ./package.json + ./truffle-config.js + ./hardhat.config.ts + ./foundry.toml + ./tsconfig.json + ./tsconfig.scripts.json + ]; + }; +} diff --git a/packages/ethereum-contracts/package.json b/packages/ethereum-contracts/package.json index f9f8d6ee64..ac3064057b 100644 --- a/packages/ethereum-contracts/package.json +++ b/packages/ethereum-contracts/package.json @@ -44,7 +44,7 @@ "build:post-contracts": "run-p -l build:post-contracts:*", "build:post-contracts:abi-bundle": "tasks/build-bundled-abi.sh", "build:post-contracts:dev-scripts-typings": "rm -rf dev-scripts/*.d.ts dev-scripts/*.d.ts.map; tsc -p tsconfig.scripts.json", - "build:post-contracts:contracts-size": "forge build --sizes > build/contracts-sizes.txt > /dev/null&", + "build:post-contracts:contracts-size": "forge build --sizes > build/contracts-sizes.txt", "verify-framework": "tasks/etherscan-verify-framework.sh", "testenv:start": "test/testenv-ctl.sh start", "testenv:stop": "test/testenv-ctl.sh stop", @@ -71,8 +71,6 @@ "fix": "run-s fix:*", "fix:eslint": "yarn lint-ts --fix", "lint:check-no-focused-tests": "grep -FR .only test || { echo 'No test is focused.';exit 0; } && { echo '✘ You have focused tests.'; exit 1; }", - "pre-commit": "if [ ! -z \"$(git status -s .)\" ];then run-s pre-commit:*;else true;fi", - "pre-commit:lint": "yarn lint", "check-updates": "ncu --target minor --dep prod,dev", "cloc": "tasks/cloc.sh", "docgen": "rm -rf docs/api; hardhat docgen" diff --git a/packages/hot-fuzz/default.nix b/packages/hot-fuzz/default.nix new file mode 100644 index 0000000000..32b97ed9a4 --- /dev/null +++ b/packages/hot-fuzz/default.nix @@ -0,0 +1,17 @@ +{ + halfBoardModule = { + dependencies = [ ../ethereum-contracts]; + outputs = [ + "build" + "crytic-export" + ]; + includedFiles = [ + ./package.json + ./foundry.toml + ./contracts + ./scripts + ./hot-fuzz + ./Makefile + ]; + }; +} diff --git a/packages/hot-fuzz/package.json b/packages/hot-fuzz/package.json index 30237032c8..5251c6af1a 100644 --- a/packages/hot-fuzz/package.json +++ b/packages/hot-fuzz/package.json @@ -6,8 +6,6 @@ "scripts": { "lint": "run-s lint:*", "lint:sol": "solhint -w 0 contracts/*.sol contracts/*/*.sol && echo '✔ Your .sol files look good.'", - "pre-commit": "if [ ! -z \"$(git status -s .)\" ];then run-s pre-commit:*;else true;fi", - "pre-commit:lint": "yarn lint", "check-updates": "ncu --target minor" }, "bin": { diff --git a/packages/js-sdk/package.json b/packages/js-sdk/package.json index 76003009a8..b6c6eb67ba 100644 --- a/packages/js-sdk/package.json +++ b/packages/js-sdk/package.json @@ -35,10 +35,7 @@ "stats": "webpack --profile --json > stats.json && webpack-bundle-analyzer ./stats.json", "lint": "run-s lint:*", "lint:js-eslint": "eslint . --max-warnings=0 --report-unused-disable-directives && echo '✔ Your .js files look good.'", - "check-no-focused-tests": "grep -FR .only test || { echo '✔ No test is focused.';exit 0; } && { echo '✘ You have focused tests.'; exit 1; }", - "pre-commit": "if [ ! -z \"$(git status -s .)\" ];then run-s pre-commit:*;else true;fi", - "pre-commit:lint": "yarn lint", - "pre-commit:check-no-focused-tests": "yarn check-no-focused-tests", + "lint:check-no-focused-tests": "grep -FR .only test || { echo '✔ No test is focused.';exit 0; } && { echo '✘ You have focused tests.'; exit 1; }", "check-updates": "ncu --target minor --dep prod,dev", "cloc": "sh tasks/cloc.sh" }, diff --git a/packages/metadata/package.json b/packages/metadata/package.json index 16e503d600..99bfe4f4bc 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -17,9 +17,6 @@ "scripts": { "build": "./build.sh && echo '@superfluid-finance/metadata build successfully'", "bump-version-to": "./bump-version-to.sh $@", - "pre-commit": "if [ ! -z \"$(git status -s .)\" ];then run-s pre-commit:*;else true;fi", - "pre-commit:lint": "yarn lint", - "pre-commit:check": "./tasks/compare-committed-against-build.sh", "lint": "run-s lint:*", "lint:js-eslint": "eslint . --max-warnings=0 --report-unused-disable-directives && echo '✔ Your .js files look good.'", "lint:consistency": "./tasks/compare-committed-against-build.sh", diff --git a/packages/sdk-core/default.nix b/packages/sdk-core/default.nix new file mode 100644 index 0000000000..2a218b68d1 --- /dev/null +++ b/packages/sdk-core/default.nix @@ -0,0 +1,29 @@ +{ + halfBoardModule = { + dependencies = [ + ../.. + ../ethereum-contracts + ]; + outputs = [ + "dist" + "coverage" + ]; + includedFiles = [ + # source code + ./tasks + ./src + ./test + ./previous-versions-testing + ./scripts + # configurations + ./package.json + ./hardhat.config.ts + ./subgraph-codegen.yml + ./tsconfig.json + ./tsconfig.module.json + ./tsconfig.test.json + ./tsconfig.typechain.json + ./typedoc.js + ]; + }; +} diff --git a/packages/sdk-core/package.json b/packages/sdk-core/package.json index 4b1724c92a..cbf1aca57c 100644 --- a/packages/sdk-core/package.json +++ b/packages/sdk-core/package.json @@ -40,7 +40,6 @@ "lint:eslint": "eslint src --ext .ts", "fix": "run-s fix:*", "fix:eslint": "yarn lint:eslint --fix", - "pre-commit": "if [ ! -z \"$(git status -s .)\" ];then run-s lint:*;else true;fi", "set-default-subgraph-release-tag": "node scripts/setDefaultSubgraphReleaseTag.js", "start-node": "hardhat node", "generate": "run-s generate:*", diff --git a/packages/sdk-redux/package.json b/packages/sdk-redux/package.json index f196714c45..471816f638 100644 --- a/packages/sdk-redux/package.json +++ b/packages/sdk-redux/package.json @@ -14,8 +14,7 @@ "module": "dist/module/index.js", "keywords": [], "scripts": { - "pre-commit": "if [ ! -z \"$(git status -s .)\" ];then run-s lint:*;else true;fi", - "build": "rm -rf dist && run-p build:*", + "build": "rm -rf dist && run-p -l build:*", "build:main": "tsc -p tsconfig.json", "build:module": "tsc -p tsconfig.module.json", "lint": "run-s lint:*", diff --git a/packages/solidity-semantic-money/default.nix b/packages/solidity-semantic-money/default.nix new file mode 100644 index 0000000000..a71e97068a --- /dev/null +++ b/packages/solidity-semantic-money/default.nix @@ -0,0 +1,14 @@ +{ + halfBoardModule = { + dependencies = [ ../.. ]; + outputs = [ "out" ]; + includedFiles = [ + ./package.json + ./foundry.toml + ./src + ./test + ./.solhint.json + ./Makefile + ]; + }; +} diff --git a/packages/solidity-semantic-money/package.json b/packages/solidity-semantic-money/package.json index 1bb9f1a54d..d7c2654397 100644 --- a/packages/solidity-semantic-money/package.json +++ b/packages/solidity-semantic-money/package.json @@ -8,11 +8,10 @@ "test": "test" }, "scripts": { + "build": "make build-all", "test": "make test-all", "lint": "run-s lint:*", "lint:sol": "solhint -w 0 `find src test -name *.sol` && echo '✔ Your .sol files look good.'", - "pre-commit": "if [ ! -z \"$(git status -s .)\" ];then run-s pre-commit:*;else true;fi", - "pre-commit:lint": "yarn lint", "check-updates": "ncu --target minor" }, "dependencies": { diff --git a/packages/spec-haskell/default.nix b/packages/spec-haskell/default.nix new file mode 100644 index 0000000000..1e78d2a40f --- /dev/null +++ b/packages/spec-haskell/default.nix @@ -0,0 +1,17 @@ +{ + halfBoardModule = { + dependencies = [ ]; + outputs = [ + "dist-test" + "dist-docs" + ]; + includedFiles = [ + ../../flake.nix + ../../flake.lock + ./cabal.project + ./cabal.project.freeze + ./Makefile + ./pkgs + ]; + }; +} diff --git a/packages/subgraph/.gitignore b/packages/subgraph/.gitignore index 1cd9202169..07d42023ea 100644 --- a/packages/subgraph/.gitignore +++ b/packages/subgraph/.gitignore @@ -1,3 +1,4 @@ +/cache/ build/ generated/ abis/ @@ -11,4 +12,4 @@ src/addresses.ts tests/.bin hosted-service-networks.json config/*.json -!config/mock.json \ No newline at end of file +!config/mock.json diff --git a/packages/subgraph/cache/solidity-files-cache.json b/packages/subgraph/cache/solidity-files-cache.json deleted file mode 100644 index cb236ef8bf..0000000000 --- a/packages/subgraph/cache/solidity-files-cache.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-cache-2", - "files": {} -} diff --git a/packages/subgraph/default.nix b/packages/subgraph/default.nix new file mode 100644 index 0000000000..aa4a2cc1c1 --- /dev/null +++ b/packages/subgraph/default.nix @@ -0,0 +1,23 @@ +{ + halfBoardModule = { + dependencies = [ + ../ethereum-contracts + ../sdk-core + ]; + outputs = [ + "abi" + "generate" + ]; + includedFiles = [ + ./package.json + ./config + ./matchstick.yaml + ./schema.graphql + ./tsconfig.json + ./types + ./src + ./scripts + ./tests + ]; + }; +} diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 201715ce97..1e9e37cbbb 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -42,8 +42,6 @@ "watch": "graph deploy superfluid-test --node http://localhost:8020/ --ipfs http://localhost:5001 --watch", "lint": "run-s lint:*", "lint:js-eslint": "eslint . --max-warnings=0 --report-unused-disable-directives && echo '✔ Your .js files look good.'", - "pre-commit": "if [ ! -z \"$(git status -s .)\" ];then run-s pre-commit:*;else true;fi", - "pre-commit:lint": "yarn lint", "generate-sf-meta": "./tasks/getSFMeta.sh", "generate-sf-meta-local": "COMMIT_HASH=local CONFIGURATION=local BRANCH=local TAG=local ./tasks/getSFMeta.sh", "check-updates": "ncu --target minor --dep prod,dev", diff --git a/sdk-redux-examples/sdk-redux-react-typecript/package.json b/sdk-redux-examples/sdk-redux-react-typecript/package.json index 75e8dc2f0d..0a2fb27355 100644 --- a/sdk-redux-examples/sdk-redux-react-typecript/package.json +++ b/sdk-redux-examples/sdk-redux-react-typecript/package.json @@ -47,8 +47,7 @@ "start": "react-app-rewired start", "build": "react-app-rewired build", "test": "echo test", - "lint": "echo lint", - "pre-commit": "echo pre-commit" + "lint": "echo lint" }, "eslintConfig": { "extends": "react-app" diff --git a/tasks/create-build-set.sh b/tasks/create-build-set.sh index 4336c1ec94..01a7118c20 100755 --- a/tasks/create-build-set.sh +++ b/tasks/create-build-set.sh @@ -56,66 +56,70 @@ if grep -E "^.github/workflows/call\..*\.yml$" "$CHANGED_FILES" > /dev/null; the console.debug "Call workflows changed." setBuildAll fi + # if root package.json changed, rebuild everything if grep -E "^(flake\.nix|flake\.lock|package\.json|yarn\.lock)$" "$CHANGED_FILES" > /dev/null; then console.debug "Root package.json changed." setBuildAll fi + +# if specified haskell folders and files changed +if grep -E "^packages/spec-haskell/" "$CHANGED_FILES" > /dev/null; then + BUILD_SPEC_HASKELL=1 + console.debug SPEC-HASKELL will be tested. +fi + # if specified solidity-semantic-money folders and files changed -if grep -E "^packages/solidity-semantic-money/(src/|test/|foundry\.toml|Makefile|package\.json)" "$CHANGED_FILES" > /dev/null; then +if grep -E "^packages/solidity-semantic-money/" "$CHANGED_FILES" > /dev/null; then BUILD_SOLIDITY_SEMANTIC_MONEY=1 BUILD_ETHEREUM_CONTRACTS=1 console.debug Solidity semantic money will be tested. fi + # if specified ethereum-contracts folders and files changed -if grep -E "^packages/ethereum-contracts/(contracts/|scripts/|test/|truffle-config\.js|package\.json)" "$CHANGED_FILES" > /dev/null; then +if grep -E "^packages/ethereum-contracts/" "$CHANGED_FILES" > /dev/null; then BUILD_ETHEREUM_CONTRACTS=1 BUILD_SUBGRAPH=1 BUILD_HOT_FUZZ=1 BUILD_AUTOMATION_CONTRACTS=1 console.debug Ethereum contracts, HotFuzz and Subgraph will be tested. fi -# if specified hot-fuzz folders and files changed -if grep -E "^packages/hot-fuzz/(contracts/|scripts/|.+\.js|.+\.yaml|hot-fuzz|package\.json)" "$CHANGED_FILES" > /dev/null; then - BUILD_HOT_FUZZ=1 - console.debug HotFuzz will be tested. -fi + # if specified sdk-core folders and files changed -if grep -E "^packages/sdk-core/(src/|test/|package\.json|tsconfig\.*)" "$CHANGED_FILES" > /dev/null; then +if grep -E "^packages/sdk-core/" "$CHANGED_FILES" > /dev/null; then BUILD_SDK_CORE=1 BUILD_SDK_REDUX=1 BUILD_SUBGRAPH=1 console.debug SDK-CORE, SDK-REDUX and SUBGRAPH will be tested. fi + # if specified sdk-redux folders and files changed -if grep -E "^packages/sdk-redux/(src/|test/|package\.json)" "$CHANGED_FILES" > /dev/null; then +if grep -E "^packages/sdk-redux/" "$CHANGED_FILES" > /dev/null; then BUILD_SDK_REDUX=1 console.debug SDK-REDUX will be tested. fi + +# if specified hot-fuzz folders and files changed +if grep -E "^packages/hot-fuzz/" "$CHANGED_FILES" > /dev/null; then + BUILD_HOT_FUZZ=1 + console.debug HotFuzz will be tested. +fi + # if specified subgraph folders and files changed -if grep -E "^packages/subgraph/(subgraph\.template\.yaml|schema\.graphql|config|scripts|src|tasks|test|hardhat\.config\.ts|package\.json|docker-compose\.yml)" "$CHANGED_FILES" > /dev/null; then +if grep -E "^packages/subgraph/" "$CHANGED_FILES" > /dev/null; then BUILD_SUBGRAPH=1 console.debug Subgraph will be tested. fi -# if specified haskell folders and files changed -if grep -E "^packages/spec-haskell/(packages/|cabal\.project)" "$CHANGED_FILES" > /dev/null; then - BUILD_SPEC_HASKELL=1 - console.debug SPEC-HASKELL will be tested. -fi + # if specified automation-contracts/scheduler folders and files changed -if grep -E "^packages/automation-contracts/scheduler/(contracts/|scripts/|test/|truffle-config\.js|package\.json)" "$CHANGED_FILES" > /dev/null; then - BUILD_AUTOMATION_CONTRACTS=1 - console.debug Automation Contracts will be tested. -fi -# if specified automation-contracts/autowrap folders and files changed -if grep -E "^packages/automation-contracts/autowrap/(contracts/|scripts/|test/|truffle-config\.js|package\.json)" "$CHANGED_FILES" > /dev/null; then +if grep -E "^packages/automation-contracts/" "$CHANGED_FILES" > /dev/null; then BUILD_AUTOMATION_CONTRACTS=1 console.debug Automation Contracts will be tested. fi if [ "$BUILD_ETHEREUM_CONTRACTS" == 1 ] || [ "$BUILD_SDK_CORE" == 1 ] || [ "$BUILD_SDK_REDUX" == 1 ]; then - console.debug "PR packages will be published." PUBLISH_PR_ARTIFACT=1 + console.debug "PR packages will be published." fi console.debug "=== END CREATE BUILD SET" diff --git a/tasks/mk-cache-key.sh b/tasks/mk-cache-key.sh new file mode 100755 index 0000000000..0e4c64fb71 --- /dev/null +++ b/tasks/mk-cache-key.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# Synopsis: The wrapper of mk-cache-key.nix taking into accoutn git submodule dependencies. + +oops() { echo "$@" >&2; exit 1; } + +cd "$(dirname "$0")"/.. || oops "cd failed" + +modulePath=$(readlink -f "$1") +[ -d "$modulePath" ] || oops "invalid module: ${modulePath}" + +# create additional build context +{ + # include git submodule status + git submodule status +} > additional-build-context.ignored + +mk-cache-key.nix "$PWD" "$modulePath" ./additional-build-context.ignored --json diff --git a/tasks/show-git-rev.sh b/tasks/show-git-rev.sh new file mode 100755 index 0000000000..b2296ee35c --- /dev/null +++ b/tasks/show-git-rev.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env sh + +{ + echo -n "$(git rev-parse --short HEAD)" + [ -n "$(git status --porcelain)" ] && echo -n " (dirty)" +} | { + if [ "$1" == forge_ffi_mode ]; then + xxd -p + else + cat + fi +} From 58abb2ba80243149637a3bcc93f37a20024c2476 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 20:29:06 +0300 Subject: [PATCH 34/42] Bump micromatch from 4.0.5 to 4.0.8 (#2009) Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8. - [Release notes](https://github.com/micromatch/micromatch/releases) - [Changelog](https://github.com/micromatch/micromatch/blob/4.0.8/CHANGELOG.md) - [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8) --- updated-dependencies: - dependency-name: micromatch dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0a44468047..5eea612513 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6146,7 +6146,7 @@ brace-expansion@^2.0.1: dependencies: balanced-match "^1.0.0" -braces@^3.0.2, braces@~3.0.2: +braces@^3.0.2, braces@^3.0.3, braces@~3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== @@ -13404,11 +13404,11 @@ micro-ftch@^0.3.1: integrity sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg== micromatch@^4.0.4, micromatch@^4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== dependencies: - braces "^3.0.2" + braces "^3.0.3" picomatch "^2.3.1" miller-rabin@^4.0.0: From 349f760a4776480ae3215b4a48a20dd98f278f2c Mon Sep 17 00:00:00 2001 From: "Miao, ZhiCheng" Date: Mon, 26 Aug 2024 21:06:46 +0300 Subject: [PATCH 35/42] workflow: use ci-minimum dev shell --- .github/workflows/ci.canary.yml | 4 ++++ .github/workflows/ci.feature.yml | 2 +- flake.nix | 5 ++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.canary.yml b/.github/workflows/ci.canary.yml index 0826f8150a..2100b04dc6 100644 --- a/.github/workflows/ci.canary.yml +++ b/.github/workflows/ci.canary.yml @@ -18,6 +18,10 @@ jobs: runs-on: ubuntu-latest + defaults: + run: + shell: nix develop .#ci-minimum -c bash -xe {0} + outputs: build_subgraph: ${{ env.BUILD_SUBGRAPH }} diff --git a/.github/workflows/ci.feature.yml b/.github/workflows/ci.feature.yml index 01647af667..cc0042a0be 100644 --- a/.github/workflows/ci.feature.yml +++ b/.github/workflows/ci.feature.yml @@ -24,7 +24,7 @@ jobs: defaults: run: - shell: nix develop . -c bash -xe {0} + shell: nix develop .#ci-minimum -c bash -xe {0} outputs: build_solidity_semantic_money: ${{ env.BUILD_SOLIDITY_SEMANTIC_MONEY }} diff --git a/flake.nix b/flake.nix index 6cab030f3e..f617ab83cf 100644 --- a/flake.nix +++ b/flake.nix @@ -149,7 +149,10 @@ # CI shells devShells.mk-cache-key = mkShell { - buildInputs = [ mk-cache-key-pkg ]; + buildInputs = [ mk-cache-key-pkg ]; + }; + devShells.ci-minimum = mkShell { + buildInputs = ciInputs ++ commonDevInputs; }; devShells.ci-default = mkShell { buildInputs = ciInputs ++ minimumDevInputs; From c887de90a36948653e180ad7084487e4ad1708aa Mon Sep 17 00:00:00 2001 From: Momodu Afegbua Date: Wed, 28 Aug 2024 02:28:18 -0500 Subject: [PATCH 36/42] [WORKFLOW] Subgraph deploy matrix (#2003) --- .github/workflows/call.deploy-subgraph.yml | 89 ++++++------- .../handler.deploy-production-subgraphs.yml | 12 +- .../previous-versions-testing/package.json | 2 +- .../previous-versions-testing/queryTests.ts | 5 + packages/subgraph/tasks/deploy.sh | 124 +++++++++--------- packages/subgraph/tasks/vendorNetworkMap.json | 6 + 6 files changed, 121 insertions(+), 117 deletions(-) create mode 100644 packages/subgraph/tasks/vendorNetworkMap.json diff --git a/.github/workflows/call.deploy-subgraph.yml b/.github/workflows/call.deploy-subgraph.yml index a4503a6725..36656db577 100644 --- a/.github/workflows/call.deploy-subgraph.yml +++ b/.github/workflows/call.deploy-subgraph.yml @@ -5,7 +5,7 @@ on: inputs: vendor: required: true - description: "Where to deploy subgraph to; superfluid, goldsky, graph or airstack" + description: "Where to deploy subgraph to; superfluid, goldsky, or graph" type: string deployment_env: required: true @@ -24,7 +24,7 @@ on: description: "Satsuma deploy key" required: false THE_GRAPH_ACCESS_TOKEN: - description: "The Graph (hosted service) access token for deploying subgraphs" + description: "The Graph access token for deploying subgraphs" required: false GOLDSKY_API_KEY: description: "Goldsky API key for deploying subgraphs" @@ -55,12 +55,38 @@ jobs: echo github.head_ref: "$HEAD_REF" echo github.base_ref: ${{ github.base_ref }} + determine-networks: + name: Determine Networks + runs-on: ubuntu-latest + outputs: + networks: ${{ steps.determine.outputs.networks }} + steps: + - uses: actions/checkout@v4 + + - name: "Determine vendors for the network" + id: determine + run: | + networks=$(jq -r --arg vendor "${{ inputs.vendor }}" --arg network "${{ inputs.network }}" ' + if $network == "all" then + .[$vendor] | @json + else + [$network] | @json + end' packages/subgraph/tasks/vendorNetworkMap.json) + if [ -z "$networks" ] || [ "$networks" == "null" ]; then + echo "Unsupported vendor or network: ${{ inputs.vendor }} / ${{ inputs.network }}" + exit 1 + fi + echo "networks=$networks" >> "$GITHUB_OUTPUT" + deploy-subgraph: name: Build and Deploy Subgraph runs-on: ubuntu-latest - env: - subgraph-working-directory: ./packages/subgraph + needs: determine-networks + strategy: + matrix: + network: ${{ fromJson(needs.determine-networks.outputs.networks) }} + fail-fast: false defaults: run: @@ -69,7 +95,9 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: DeterminateSystems/nix-installer-action@v13 + - uses: cachix/install-nix-action@v19 + with: + github_access_token: ${{ secrets.GITHUB_TOKEN }} - name: "Install dependencies" run: yarn install --frozen-lockfile @@ -78,53 +106,14 @@ jobs: run: yarn build working-directory: ./packages/ethereum-contracts - - name: "Get ABI" - run: node scripts/getAbi.js - working-directory: ${{ env.subgraph-working-directory }} - - - name: "Prepare subgraph manifest" - # This step is required for generating a preliminary subgraph.yaml - # and addresses.ts file for the yarn codegen step below - # using a mock.json networks file. - run: ./tasks/prepare-manifest.sh mock - working-directory: ${{ env.subgraph-working-directory }} - - - name: "Generate meta.ignore.ts file" - # Collects metadata like the git branch and commit hash - run: "yarn generate-sf-meta" - working-directory: ${{ env.subgraph-working-directory }} - env: - COMMIT_HASH: ${{ github.sha }} - CONFIGURATION: ${{ inputs.deployment_env }} - - - name: "Generate AssemblyScript types" - run: "yarn codegen" - working-directory: ${{ env.subgraph-working-directory }} - - - name: Get Hosted Service Networks from metadata - run: npx ts-node ./scripts/getHostedServiceNetworks.ts - working-directory: ${{ env.subgraph-working-directory }} - - # - name: Ensure deployment_env property is passed - # run: | - # if [ "${{ inputs.deployment_env }}" == "" ];then - # echo "You must pass in the deployment_env at a minimum." - # exit 1 - # fi - - # If tagged, get subgraph tag name that starts with subgraph@. Outputs $GIT_TAG_NAME - - uses: olegtarasov/get-tag@v2.1.2 - id: "getSubgraphTag" - with: - tagRegex: "subgraph@(.*)" - - # Version is the git tag or revision + # Version is from subgraph@ git tag if exists, else short git commit revision - name: "Deploy to a node" run: | shortRev=$(git rev-parse --short ${{ github.sha }}) - versionLabel="${GIT_TAG_NAME:-$shortRev}" - ./tasks/deploy.sh -o ${{ inputs.vendor }} -n ${{ inputs.network }} -r ${{ inputs.deployment_env }} -v $versionLabel - working-directory: ${{ env.subgraph-working-directory }} + versionTag=$(git tag --contains ${{ github.sha }} | grep "^subgraph@" | sed 's/^subgraph@//') + versionLabel="${versionTag:-$shortRev}" + ./tasks/deploy.sh -o ${{ inputs.vendor }} -n ${{ matrix.network }} -r ${{ inputs.deployment_env }} -v $versionLabel + working-directory: ./packages/subgraph env: SUBGRAPH_URL_TEMPLATE: ${{ secrets.SUBGRAPH_URL_TEMPLATE }} SUPERFLUID_IPFS_API: ${{ secrets.SUPERFLUID_IPFS_API }} @@ -132,3 +121,5 @@ jobs: SATSUMA_DEPLOY_KEY: ${{ secrets.SATSUMA_DEPLOY_KEY }} GOLDSKY_API_KEY: ${{ secrets.GOLDSKY_API_KEY }} AIRSTACK_API_KEY: ${{ secrets.AIRSTACK_API_KEY }} + COMMIT_HASH: ${{ github.sha }} + CONFIGURATION: ${{ inputs.deployment_env }} diff --git a/.github/workflows/handler.deploy-production-subgraphs.yml b/.github/workflows/handler.deploy-production-subgraphs.yml index 19d9aaa702..0d9561e995 100644 --- a/.github/workflows/handler.deploy-production-subgraphs.yml +++ b/.github/workflows/handler.deploy-production-subgraphs.yml @@ -13,13 +13,12 @@ on: vendor: required: true description: "Where to deploy subgraph to; one of `superfluid`, `goldsky`, `graph` or `airstack`" - default: "superfluid" + default: "superfluid" type: choice options: - superfluid - goldsky - graph - - airstack deployment_env: required: true description: 'The subgraph deployment env: v1, dev, feature.' @@ -46,12 +45,11 @@ jobs: subgraph-release: '' subgraph-endpoint: http://localhost:8000/subgraphs/name/superfluid-test - deploy-subgraph: + deploy-subgraphs: + if: ${{ success() }} uses: ./.github/workflows/call.deploy-subgraph.yml - needs: [ - build-and-test-local-subgraph - , build-and-test-local-subgraph-against-previous-sdk-core-releases - ] + # build-and-test-local-subgraph-against-previous-sdk-core-releases is currently not "needed" here because it fails. + needs: [build-and-test-local-subgraph] name: Deploy graph to ${{ github.event.inputs.vendor }} vendor with: deployment_env: ${{ github.event.inputs.deployment_env }} diff --git a/packages/sdk-core/previous-versions-testing/package.json b/packages/sdk-core/previous-versions-testing/package.json index 9cf28c6ae9..7bb012d58e 100644 --- a/packages/sdk-core/previous-versions-testing/package.json +++ b/packages/sdk-core/previous-versions-testing/package.json @@ -6,7 +6,7 @@ "run-query-tests": "npx hardhat test ./queryTests.ts" }, "devDependencies": { - "@superfluid-finance/sdk-core": "0.4.3" + "@superfluid-finance/sdk-core": "0.8.0" }, "resolutions": { "@superfluid-finance/metadata": ">1.2.0" diff --git a/packages/sdk-core/previous-versions-testing/queryTests.ts b/packages/sdk-core/previous-versions-testing/queryTests.ts index fe1d1e07a2..ce69cedae7 100644 --- a/packages/sdk-core/previous-versions-testing/queryTests.ts +++ b/packages/sdk-core/previous-versions-testing/queryTests.ts @@ -16,10 +16,15 @@ export const getChainId = () => { }; export const testQueryClassFunctions = async (query: Query) => { + console.log("query listAllSuperTokens..."); await query.listAllSuperTokens({}, { take: 10 }); + console.log("query listIndexes..."); await query.listIndexes({}, { take: 10 }); + console.log("query listIndexSubscriptions..."); await query.listIndexSubscriptions({}, { take: 10 }); + console.log("query listStreams..."); await query.listStreams({}, { take: 10 }); + console.log("query listUserInteractedSuperTokens..."); await query.listUserInteractedSuperTokens({}, { take: 10 }); }; diff --git a/packages/subgraph/tasks/deploy.sh b/packages/subgraph/tasks/deploy.sh index 638e6fee4b..6072bf1582 100755 --- a/packages/subgraph/tasks/deploy.sh +++ b/packages/subgraph/tasks/deploy.sh @@ -8,26 +8,6 @@ GRAPH_CLI="npx --package=@graphprotocol/graph-cli --yes -- graph" GOLDSKY_CLI="npx --package=@goldskycom/cli --yes -- goldsky" SUPPORTED_VENDORS=( "graph" "satsuma" "superfluid" "goldsky" "airstack" ) -# list of supported networks by vendor - -# shellcheck disable=SC2034,SC2207 -GRAPH_NETWORKS=( "polygon-mainnet" "eth-mainnet" ) -# shellcheck disable=SC2034 -SATSUMA_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "eth-mainnet" "eth-sepolia" "optimism-mainnet" "base-mainnet") -# shellcheck disable=SC2034 -SUPERFLUID_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "base-mainnet" "optimism-mainnet" "arbitrum-one" "celo-mainnet" "bsc-mainnet" "avalanche-c" "optimism-sepolia" "scroll-sepolia" "scroll-mainnet" "degenchain" "base-sepolia") -# shellcheck disable=SC2034 -GOLDSKY_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "eth-mainnet" "base-mainnet" "optimism-mainnet" "arbitrum-one" "bsc-mainnet" "avalanche-c" "optimism-sepolia" "scroll-sepolia" "scroll-mainnet" "eth-sepolia" "avalanche-fuji" "base-sepolia") -# shellcheck disable=SC2034 -AIRSTACK_NETWORKS=( "degenchain") - -declare -A VENDOR_NETWORKS=( - ["graph"]="${GRAPH_NETWORKS[@]}" - ["satsuma"]="${SATSUMA_NETWORKS[@]}" - ["superfluid"]="${SUPERFLUID_NETWORKS[@]}" - ["goldsky"]="${GOLDSKY_NETWORKS[@]}" - ["airstack"]="${AIRSTACK_NETWORKS[@]}" -) VENDOR="" NETWORK="" @@ -65,6 +45,32 @@ while [[ $# -gt 0 ]]; do esac done +prepare_deployment() { + # Read environment variables directly, with a fallback Git command for commit_hash + local commit_hash="${GITHUB_SHA:-$(git rev-parse HEAD)}" + local configuration="${CONFIGURATION:-v1}" + + # Get ABI + echo "Getting ABI..." + node "./scripts/getAbi.js" + + # Prepare subgraph manifest + echo "Preparing subgraph manifest..." + ./tasks/prepare-manifest.sh mock + + # Generate meta.ignore.ts file + echo "Generating meta.ignore.ts file..." + COMMIT_HASH="$commit_hash" CONFIGURATION="$configuration" yarn generate-sf-meta + + # Generate AssemblyScript types + echo "Generating AssemblyScript types..." + yarn codegen + + # Get Hosted Service Networks from metadata + echo "Getting Hosted Service Networks from metadata..." + npx ts-node "./scripts/getHostedServiceNetworks.ts" +} + deploy_to_graph() { local network="$1" @@ -79,10 +85,10 @@ deploy_to_graph() { echo "********* Deploying $network subgraph $subgraphName to The Graph (hosted service). **********" - $GRAPH_CLI deploy \ - --studio "$subgraphName" \ - --deploy-key "$THE_GRAPH_ACCESS_TOKEN" \ - --version-label "$VERSION_LABEL" + if ! $GRAPH_CLI deploy --studio "$subgraphName" --deploy-key "$THE_GRAPH_ACCESS_TOKEN" --version-label "$VERSION_LABEL"; then + echo "Error: Deployment to The Graph (hosted service) failed for $network" + exit 1 + fi } deploy_to_satsuma() { @@ -112,31 +118,37 @@ deploy_to_superfluid() { local subgraphName="protocol-$DEPLOYMENT_ENV" echo "node url: $nodeUrl, subgraph name: $subgraphName" - $GRAPH_CLI create "$subgraphName" --node "$nodeUrl" - $GRAPH_CLI deploy "$subgraphName" \ - --version-label "$VERSION_LABEL" \ - --node "$nodeUrl" \ - --ipfs "$SUPERFLUID_IPFS_API" + if ! $GRAPH_CLI create "$subgraphName" --node "$nodeUrl"; then + echo "Error: Creation of subgraph $subgraphName on Superfluid (self hosted) failed for $network" + exit 1 + fi + if ! $GRAPH_CLI deploy "$subgraphName" --version-label "$VERSION_LABEL" --node "$nodeUrl" --ipfs "$SUPERFLUID_IPFS_API"; then + echo "Error: Deployment to Superfluid (self hosted) failed for $network" + exit 1 + fi } deploy_to_goldsky() { local network="$1" # TODO: use tagging? - #Get subgraph version from package.json + # Get subgraph version from package.json PACKAGE_JSON_PATH="package.json" SUBGRAPH_VERSION=$(jq -r '.version' $PACKAGE_JSON_PATH) local subgraphName="protocol-$DEPLOYMENT_ENV-$network/$SUBGRAPH_VERSION" - # Note: when using Graph CLI to deploy, it implicitly triggers build too, but Goldsky CLI doesn't, so we do it explicitly. - $GRAPH_CLI build + # Note: when using Graph CLI to deploy, it implicitly triggers build too, but Goldsky CLI doesn't, so we do it explicitly. + if ! $GRAPH_CLI build; then + echo "Error: Build for Goldsky failed" + exit 1 + fi echo "********* Deploying $network subgraph $subgraphName to Goldsky. **********" - $GOLDSKY_CLI subgraph deploy \ - "$subgraphName" \ - --path . \ - --token "$GOLDSKY_API_KEY" + if ! $GOLDSKY_CLI subgraph deploy "$subgraphName" --path . --token "$GOLDSKY_API_KEY"; then + echo "Error: Deployment to Goldsky failed for $network" + exit 1 + fi } deploy_to_airstack() { @@ -145,14 +157,14 @@ deploy_to_airstack() { local subgraphName="protocol-$DEPLOYMENT_ENV-$network" echo "********* Deploying $network subgraph $subgraphName to Airstack. **********" - $GRAPH_CLI create "$subgraphName" --node "$nodeUrl" --access-token "$AIRSTACK_API_KEY" - $GRAPH_CLI deploy \ - --version-label "$VERSION_LABEL" \ - --node "$nodeUrl" \ - --deploy-key "$AIRSTACK_API_KEY" \ - --ipfs https://ipfs.airstack.xyz/ipfs/api/v0 \ - --headers '{"Authorization": "'"$AIRSTACK_API_KEY"'"}' \ - "$subgraphName" + if ! $GRAPH_CLI create "$subgraphName" --node "$nodeUrl" --access-token "$AIRSTACK_API_KEY"; then + echo "Error: Creation of subgraph $subgraphName on Airstack failed for $network" + exit 1 + fi + if ! $GRAPH_CLI deploy --version-label "$VERSION_LABEL" --node "$nodeUrl" --deploy-key "$AIRSTACK_API_KEY" --ipfs https://ipfs.airstack.xyz/ipfs/api/v0 --headers '{"Authorization": "'"$AIRSTACK_API_KEY"'"}' "$subgraphName"; then + echo "Error: Deployment to Airstack failed for $network" + exit 1 + fi } # Vendor specific function dispatcher @@ -163,15 +175,6 @@ deploy_to() { local vendor="$1" local network="$2" - # check if network is supported by vendor - local -n networksRef="${vendor^^}_NETWORKS" - # We can safely ignore this warning, becasue the value in network won't contain whitespaces - # shellcheck disable=SC2199,SC2076 - if [[ ! " ${networksRef[@]} " =~ " $network " ]]; then - echo "The network, $network, is currently not on the list of networks supported by $vendor." - exit 1 - fi - npx ts-node ./scripts/buildNetworkConfig.ts "$network" "$vendor" # prepare the manifest prior to deployment @@ -212,11 +215,12 @@ if [[ ! " ${SUPPORTED_VENDORS[@]} " =~ " $VENDOR " ]]; then print_usage_and_exit fi -# Handle all vs specific network -if [ "$NETWORK" == "all" ]; then - for network in ${VENDOR_NETWORKS[$VENDOR]}; do - deploy_to "$VENDOR" "$network" - done -else - deploy_to "$VENDOR" "$NETWORK" +#Prepare deployment +# Prepare deployment +if ! prepare_deployment; then + echo "Error: Failed to prepare deployment" + exit 1 fi + +# Deploy the specified network +deploy_to "$VENDOR" "$NETWORK" diff --git a/packages/subgraph/tasks/vendorNetworkMap.json b/packages/subgraph/tasks/vendorNetworkMap.json new file mode 100644 index 0000000000..41e953aa25 --- /dev/null +++ b/packages/subgraph/tasks/vendorNetworkMap.json @@ -0,0 +1,6 @@ +{ + "superfluid": ["polygon-mainnet", "xdai-mainnet", "base-mainnet", "optimism-mainnet", "arbitrum-one", "celo-mainnet", "bsc-mainnet", "avalanche-c", "optimism-sepolia", "scroll-sepolia", "scroll-mainnet", "degenchain", "base-sepolia"], + "goldsky": ["polygon-mainnet", "xdai-mainnet", "eth-mainnet", "base-mainnet", "optimism-mainnet", "arbitrum-one", "bsc-mainnet", "avalanche-c", "optimism-sepolia", "scroll-sepolia", "scroll-mainnet", "eth-sepolia", "avalanche-fuji", "base-sepolia", "degenchain"], + "graph": ["polygon-mainnet", "eth-mainnet", "celo-mainnet"] +} + From 04f7b3c22cb1da823bfd378d1a3a4e540f57dcc5 Mon Sep 17 00:00:00 2001 From: Didi Date: Wed, 28 Aug 2024 18:15:19 +0200 Subject: [PATCH 37/42] [ETHEREUM-CONTRACTS] User Macro: added postCheck and recommendation for getParams (#1903) --- packages/ethereum-contracts/CHANGELOG.md | 6 ++ .../interfaces/utils/IUserDefinedMacro.sol | 32 +++++++ .../contracts/utils/MacroForwarder.sol | 4 +- .../tasks/deploy-macro-forwarder.sh | 4 +- .../test/foundry/utils/MacroForwarder.t.sol | 92 +++++++++++++++++-- 5 files changed, 128 insertions(+), 10 deletions(-) diff --git a/packages/ethereum-contracts/CHANGELOG.md b/packages/ethereum-contracts/CHANGELOG.md index d9e6aa95b0..82dac18b5f 100644 --- a/packages/ethereum-contracts/CHANGELOG.md +++ b/packages/ethereum-contracts/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to the ethereum-contracts will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Changed + +* `IUserDefinedMacro`: added a method `postCheck()` which allows to verify state changes after running the macro. + ## [v1.11.0] ### Breaking diff --git a/packages/ethereum-contracts/contracts/interfaces/utils/IUserDefinedMacro.sol b/packages/ethereum-contracts/contracts/interfaces/utils/IUserDefinedMacro.sol index 50eb17525e..fef43f95a2 100644 --- a/packages/ethereum-contracts/contracts/interfaces/utils/IUserDefinedMacro.sol +++ b/packages/ethereum-contracts/contracts/interfaces/utils/IUserDefinedMacro.sol @@ -18,4 +18,36 @@ interface IUserDefinedMacro { */ function buildBatchOperations(ISuperfluid host, bytes memory params, address msgSender) external view returns (ISuperfluid.Operation[] memory operations); + + /** + * @dev A post-check function which is called after execution. + * It allows to do arbitrary checks based on the state after execution, + * and to revert if the result is not as expected. + * Can be an empty implementation if no check is needed. + * @param host The host contract set for the executing MacroForwarder. + * @param params The encoded parameters as provided to `MacroForwarder.runMacro()` + * @param msgSender The msg.sender of the call to the MacroForwarder. + */ + function postCheck(ISuperfluid host, bytes memory params, address msgSender) external view; + + /* + * Additional to the required interface, we recommend to implement the following function: + * `function getParams(...) external view returns (bytes memory);` + * + * It shall return abi encoded params as required as second argument of `MacroForwarder.runMacro()`. + * + * The function name shall be `getParams` and the return type shall be `bytes memory`. + * The number, type and name of arguments are free to choose such that they best fit the macro use case. + * + * In conjunction with the name of the Macro contract, the signature should be as self-explanatory as possible. + * + * Example for a contract `MultiFlowDeleteMacro` which lets a user delete multiple flows in one transaction: + * `function getParams(ISuperToken superToken, address[] memory receivers) external view returns (bytes memory)` + * + * + * Implementing this view function has several advantages: + * - Allows to use generic tooling like Explorers to interact with the macro + * - Allows to build auto-generated UIs based on the contract ABI + * - Makes it easier to interface with the macro from Dapps + */ } diff --git a/packages/ethereum-contracts/contracts/utils/MacroForwarder.sol b/packages/ethereum-contracts/contracts/utils/MacroForwarder.sol index c68a323183..3e8f4e2b03 100644 --- a/packages/ethereum-contracts/contracts/utils/MacroForwarder.sol +++ b/packages/ethereum-contracts/contracts/utils/MacroForwarder.sol @@ -33,6 +33,8 @@ contract MacroForwarder is ForwarderBase { function runMacro(IUserDefinedMacro m, bytes calldata params) external returns (bool) { ISuperfluid.Operation[] memory operations = buildBatchOperations(m, params); - return _forwardBatchCall(operations); + bool retVal = _forwardBatchCall(operations); + m.postCheck(_host, params, msg.sender); + return retVal; } } diff --git a/packages/ethereum-contracts/tasks/deploy-macro-forwarder.sh b/packages/ethereum-contracts/tasks/deploy-macro-forwarder.sh index 71fca058cb..29065255fc 100755 --- a/packages/ethereum-contracts/tasks/deploy-macro-forwarder.sh +++ b/packages/ethereum-contracts/tasks/deploy-macro-forwarder.sh @@ -10,7 +10,7 @@ set -eu # RELEASE_VERSION, MACROFWD_DEPLOYER_PK # # You can use the npm package vanity-eth to get a deployer account for a given contract address: -# Example use: npx vanityeth -i cfa1 --contract +# Example use: npx vanityeth -i fd01 --contract # # For optimism the gas estimation doesn't work, requires setting EST_TX_COST # (the value auto-detected for arbitrum should work). @@ -23,7 +23,7 @@ source .env set -x network=$1 -expectedContractAddr="0xFd017DBC8aCf18B06cff9322fA6cAae2243a5c95" +expectedContractAddr="0xfD01285b9435bc45C243E5e7F978E288B2912de6" deployerPk=$MACROFWD_DEPLOYER_PK tmpfile="/tmp/$(basename "$0").addr" diff --git a/packages/ethereum-contracts/test/foundry/utils/MacroForwarder.t.sol b/packages/ethereum-contracts/test/foundry/utils/MacroForwarder.t.sol index 2e84154ffd..58d9a31bcc 100644 --- a/packages/ethereum-contracts/test/foundry/utils/MacroForwarder.t.sol +++ b/packages/ethereum-contracts/test/foundry/utils/MacroForwarder.t.sol @@ -9,6 +9,9 @@ import { FoundrySuperfluidTester, SuperTokenV1Library } from "../FoundrySuperflu using SuperTokenV1Library for ISuperToken; +// ============== Macro Contracts ============== + +// not overriding IUserDefinedMacro here in order to avoid the compiler enforcing the function to be view-only. contract NaugthyMacro { int naughtyCounter = -1; @@ -26,6 +29,8 @@ contract NaugthyMacro { } return new ISuperfluid.Operation[](0); } + + function postCheck(ISuperfluid host, bytes memory params, address msgSender) external view { } } contract GoodMacro is IUserDefinedMacro { @@ -56,10 +61,19 @@ contract GoodMacro is IUserDefinedMacro { }); } } + + function postCheck(ISuperfluid host, bytes memory params, address msgSender) external view { } + + // recommended view function for parameter encoding + function getParams(ISuperToken token, int96 flowRate, address[] calldata recipients) external pure returns (bytes memory) { + return abi.encode(token, flowRate, recipients); + } } -// deletes a bunch of flows of the msgSender +// deletes a bunch of flows from one sender to muliple receivers contract MultiFlowDeleteMacro is IUserDefinedMacro { + error InsufficientReward(); + function buildBatchOperations(ISuperfluid host, bytes memory params, address msgSender) external override view returns (ISuperfluid.Operation[] memory operations) { @@ -68,15 +82,15 @@ contract MultiFlowDeleteMacro is IUserDefinedMacro { ))); // parse params - (ISuperToken token, address[] memory receivers) = - abi.decode(params, (ISuperToken, address[])); + (ISuperToken token, address sender, address[] memory receivers, uint256 minBalanceAfter) = + abi.decode(params, (ISuperToken, address, address[], uint256)); // construct batch operations operations = new ISuperfluid.Operation[](receivers.length); for (uint i = 0; i < receivers.length; ++i) { bytes memory callData = abi.encodeCall(cfa.deleteFlow, (token, - msgSender, + sender, receivers[i], new bytes(0) // placeholder )); @@ -87,6 +101,23 @@ contract MultiFlowDeleteMacro is IUserDefinedMacro { }); } } + + // recommended view function for parameter encoding + function getParams(ISuperToken superToken, address sender, address[] memory receivers, uint256 minBalanceAfter) + external pure + returns (bytes memory) + { + return abi.encode(superToken, sender, receivers, minBalanceAfter); + } + + function postCheck(ISuperfluid host, bytes memory params, address msgSender) external view { + // parse params + (ISuperToken superToken,,, uint256 minBalanceAfter) = + abi.decode(params, (ISuperToken, address, address[], uint256)); + if (superToken.balanceOf(msgSender) < minBalanceAfter) { + revert InsufficientReward(); + } + } } /* @@ -134,8 +165,12 @@ contract StatefulMacro is IUserDefinedMacro { }); } } + + function postCheck(ISuperfluid host, bytes memory params, address msgSender) external view { } } +// ============== Test Contract ============== + contract MacroForwarderTest is FoundrySuperfluidTester { MacroForwarder internal macroForwarder; @@ -176,6 +211,20 @@ contract MacroForwarderTest is FoundrySuperfluidTester { vm.stopPrank(); } + function testGoodMacroUsingGetParams() external { + GoodMacro m = new GoodMacro(); + address[] memory recipients = new address[](2); + recipients[0] = bob; + recipients[1] = carol; + vm.startPrank(admin); + // NOTE! This is different from abi.encode(superToken, int96(42), [bob, carol]), + // which is a fixed array: address[2]. + macroForwarder.runMacro(m, m.getParams(superToken, int96(42), recipients)); + assertEq(sf.cfa.getNetFlow(superToken, bob), 42); + assertEq(sf.cfa.getNetFlow(superToken, carol), 42); + vm.stopPrank(); + } + function testStatefulMacro() external { address[] memory recipients = new address[](2); recipients[0] = bob; @@ -193,22 +242,51 @@ contract MacroForwarderTest is FoundrySuperfluidTester { function testMultiFlowDeleteMacro() external { MultiFlowDeleteMacro m = new MultiFlowDeleteMacro(); + address sender = alice; address[] memory recipients = new address[](3); recipients[0] = bob; recipients[1] = carol; recipients[2] = dan; - vm.startPrank(admin); + vm.startPrank(sender); // flows to be deleted need to exist in the first place for (uint i = 0; i < recipients.length; ++i) { superToken.createFlow(recipients[i], 42); } // now batch-delete them - macroForwarder.runMacro(m, abi.encode(superToken, recipients)); + macroForwarder.runMacro(m, m.getParams(superToken, sender, recipients, 0)); for (uint i = 0; i < recipients.length; ++i) { assertEq(sf.cfa.getNetFlow(superToken, recipients[i]), 0); } vm.stopPrank(); } -} + + function testPostCheck() external { + MultiFlowDeleteMacro m = new MultiFlowDeleteMacro(); + address[] memory recipients = new address[](2); + recipients[0] = bob; + recipients[1] = carol; + int96 flowRate = 1e18; + + vm.startPrank(alice); + // flows to be deleted need to exist in the first place + for (uint i = 0; i < recipients.length; ++i) { + superToken.createFlow(recipients[i], flowRate); + } + vm.stopPrank(); + + // fast forward 3000 days + vm.warp(block.timestamp + 86400*3000); + + // alice is now insolvent, dan can batch-delete the flows + vm.startPrank(dan); + uint256 danBalanceBefore = superToken.balanceOf(dan); + // unreasonable reward expectation: post check fails + vm.expectRevert(MultiFlowDeleteMacro.InsufficientReward.selector); + macroForwarder.runMacro(m, abi.encode(superToken, alice, recipients, danBalanceBefore + 1e24)); + + // reasonable reward expectation: post check passes + macroForwarder.runMacro(m, abi.encode(superToken, alice, recipients, danBalanceBefore + (uint256(uint96(flowRate)) * 600))); + } +} \ No newline at end of file From 3d5df703b7feecbe6901d773d3c3821462d38acf Mon Sep 17 00:00:00 2001 From: Miao ZhiCheng Date: Thu, 29 Aug 2024 10:30:53 +0300 Subject: [PATCH 38/42] Workflow: tweak test-local-subgraph (#2013) **Problem** At some point, the sdk-core/subgraph test cases started to fail with "socket hang up" error when querying subgraph. After some research, it was discovered that it is due to the usage of an older version of the "cross-fetch" polyfill which didn't support node 20+, see [here](https://github.com/jasonkuhrt/graphql-request/issues/628) and [here](https://github.com/jasonkuhrt/graphql-request/pull/597). **Solution** The newer cross-fetch project solved this. The solution is to fix the "resolution" of the cross-fetch in this project to the latest, for now. Additionally, this PR also: a) include some minor refactoring around the test setup process, b) test against both node 18 and 20 for SDK core, and test against node 20 for subgraph. --- .../call.test-ethereum-contracts.yml | 5 +- .../workflows/call.test-local-subgraph.yml | 47 +++++++--------- .github/workflows/call.test-sdk-core.yml | 42 ++++++--------- ...subgraph-on-previous-sdk-core-versions.yml | 11 ++-- package.json | 3 +- packages/subgraph/default.nix | 5 +- packages/subgraph/docker-compose.yml | 5 +- packages/subgraph/tasks/setup-graph-node.sh | 30 +++-------- yarn.lock | 53 ++----------------- 9 files changed, 56 insertions(+), 145 deletions(-) mode change 100644 => 100755 packages/subgraph/tasks/setup-graph-node.sh diff --git a/.github/workflows/call.test-ethereum-contracts.yml b/.github/workflows/call.test-ethereum-contracts.yml index 7b3a5f2627..64d8b0b2dc 100644 --- a/.github/workflows/call.test-ethereum-contracts.yml +++ b/.github/workflows/call.test-ethereum-contracts.yml @@ -56,11 +56,10 @@ jobs: - name: Set cache key prefix id: set-cache-key-prefix run: | - node_version=${{ matrix.node-version }} if [ "${{ inputs.run-coverage-tests }}" == false ]; then - v=ethereum-contracts-test-${node_version}- + v=ethereum-contracts-${{ env.DEV_SHELL_NAME }}-test- else - v=ethereum-contracts-coverage-${node_version}- + v=ethereum-contracts-${{ env.DEV_SHELL_NAME }}-coverage- fi echo "cache_key_prefix=$v" >> "$GITHUB_OUTPUT" shell: bash diff --git a/.github/workflows/call.test-local-subgraph.yml b/.github/workflows/call.test-local-subgraph.yml index eea711bd78..cb05a6a288 100644 --- a/.github/workflows/call.test-local-subgraph.yml +++ b/.github/workflows/call.test-local-subgraph.yml @@ -4,17 +4,16 @@ on: workflow_call: env: - # FIXME: subgraph test fails with node20 - DEV_SHELL_NAME: ci-node18 + DEV_SHELL_NAME: ci-node20 + ethereum-contracts-working-directory: ./packages/ethereum-contracts + sdk-core-working-directory: ./packages/sdk-core + subgraph-working-directory: ./packages/subgraph jobs: subgraph-unit-tests: name: Run subgraph unit tests runs-on: ubuntu-latest - env: - subgraph-working-directory: ./packages/subgraph - defaults: run: shell: nix develop .#${{ env.DEV_SHELL_NAME }} -c bash -xe {0} @@ -27,7 +26,7 @@ jobs: uses: ./.github/actions/setup-workflow-base with: package-name: subgraph - cache-key-prefix: subgraph-unit-tests- + cache-key-prefix: subgraph-${{ env.DEV_SHELL_NAME }}-unit-tests- dev-shell-name: ${{ env.DEV_SHELL_NAME }} - name: Install dependencies @@ -42,7 +41,7 @@ jobs: run: | yarn lint yarn build - working-directory: ./packages/ethereum-contracts + working-directory: ${{ env.ethereum-contracts-working-directory }} - name: Run unit tests if: steps.base.outputs.cache-hit != 'true' @@ -54,10 +53,6 @@ jobs: runs-on: ubuntu-latest - env: - subgraph-working-directory: ./packages/subgraph - sdk-core-working-directory: ./packages/sdk-core - defaults: run: shell: nix develop .#${{ env.DEV_SHELL_NAME }} -c bash -xe {0} @@ -70,7 +65,7 @@ jobs: uses: ./.github/actions/setup-workflow-base with: package-name: subgraph - cache-key-prefix: subgraph-integration-tests- + cache-key-prefix: subgraph-${{ env.DEV_SHELL_NAME }}-integration-tests- dev-shell-name: ${{ env.DEV_SHELL_NAME }} - name: Install dependencies @@ -80,12 +75,7 @@ jobs: - name: Build contracts if: steps.base.outputs.cache-hit != 'true' run: yarn build - working-directory: ./packages/ethereum-contracts - - - name: Start hardhat node - if: steps.base.outputs.cache-hit != 'true' - run: ./tasks/startHardhatNode.sh start - working-directory: ${{ env.sdk-core-working-directory }} + working-directory: ${{ env.ethereum-contracts-working-directory }} - name: Build SDK core if: steps.base.outputs.cache-hit != 'true' @@ -93,28 +83,27 @@ jobs: run: yarn build working-directory: ${{ env.sdk-core-working-directory }} + - name: Start hardhat node + if: steps.base.outputs.cache-hit != 'true' + run: ./tasks/startHardhatNode.sh start + working-directory: ${{ env.sdk-core-working-directory }} + - name: Deploy framework and tokens if: steps.base.outputs.cache-hit != 'true' run: npx hardhat run dev-scripts/run-deploy-contracts-and-token.js --network localhost - working-directory: ./packages/ethereum-contracts + working-directory: ${{ env.ethereum-contracts-working-directory }} - name: Prepare files for local testing if: steps.base.outputs.cache-hit != 'true' run: yarn prepare-local working-directory: ${{ env.subgraph-working-directory }} - - name: Run setup-graph-node - if: steps.base.outputs.cache-hit != 'true' - run: | - chmod +x ./tasks/setup-graph-node.sh - ./tasks/setup-graph-node.sh - working-directory: ${{ env.subgraph-working-directory }} - - - name: Docker compose + - name: Setup graph node if: steps.base.outputs.cache-hit != 'true' run: | - docker rm subgraph_graph-node_1 || true - docker compose up & + ./tasks/setup-graph-node.sh & + # wait for it to warm up + sleep 30 working-directory: ${{ env.subgraph-working-directory }} - name: Run subgraph integration test suite diff --git a/.github/workflows/call.test-sdk-core.yml b/.github/workflows/call.test-sdk-core.yml index b6ffed2ffb..d6341c3e2b 100644 --- a/.github/workflows/call.test-sdk-core.yml +++ b/.github/workflows/call.test-sdk-core.yml @@ -29,10 +29,9 @@ jobs: id: set-matrix run: | if [ "${{ inputs.run-coverage-tests }}" == "true" ];then - echo "matrix={\"node-version\": [18]}" >> "$GITHUB_OUTPUT" + echo "matrix={\"node-version\": [20]}" >> "$GITHUB_OUTPUT" else - # FIXME: subgraph test fails with node20 - echo "matrix={\"node-version\": [18]}" >> "$GITHUB_OUTPUT" + echo "matrix={\"node-version\": [18, 20]}" >> "$GITHUB_OUTPUT" fi test-sdk-core: @@ -63,11 +62,10 @@ jobs: - name: Set cache key prefix id: set-cache-key-prefix run: | - node_version=${{ matrix.node-version }} if [ "${{ inputs.run-coverage-tests }}" == false ]; then - v=sdk-core-test-${node_version}- + v=sdk-core-${{ env.DEV_SHELL_NAME }}-test- else - v=sdk-core-coverage-${node_version}- + v=sdk-core-${{ env.DEV_SHELL_NAME }}-coverage- fi echo "cache_key_prefix=$v" >> "$GITHUB_OUTPUT" shell: bash @@ -87,19 +85,12 @@ jobs: npx tsc --version npx hardhat --version - - name: Lint and build essentials + - name: Build contracts if: steps.base.outputs.cache-hit != 'true' run: | - yarn lint yarn build working-directory: ${{ env.ethereum-contracts-working-directory }} - - name: Start hardhat node - if: steps.base.outputs.cache-hit != 'true' - run: | - ./tasks/startHardhatNode.sh start - working-directory: ${{ env.sdk-core-working-directory }} - - name: Build SDK Core if: steps.base.outputs.cache-hit != 'true' # build sdk-core because of auto linking to dependency @@ -108,7 +99,12 @@ jobs: yarn build working-directory: ${{ env.sdk-core-working-directory }} - - name: Deploy Framework and Tokens + - name: Start hardhat node + if: steps.base.outputs.cache-hit != 'true' + run: ./tasks/startHardhatNode.sh start + working-directory: ${{ env.sdk-core-working-directory }} + + - name: Deploy framework and tokens if: steps.base.outputs.cache-hit != 'true' run: npx hardhat run dev-scripts/run-deploy-contracts-and-token.js --network localhost working-directory: ${{ env.ethereum-contracts-working-directory }} @@ -118,26 +114,18 @@ jobs: run: yarn prepare-local working-directory: ${{ env.subgraph-working-directory }} - - name: Run setup-graph-node - if: steps.base.outputs.cache-hit != 'true' - run: | - chmod +x ./tasks/setup-graph-node.sh - ./tasks/setup-graph-node.sh - working-directory: ${{ env.subgraph-working-directory }} - - - name: Docker compose + - name: Setup graph node if: steps.base.outputs.cache-hit != 'true' run: | - docker rm subgraph_graph-node_1 || true - docker compose up & + ./tasks/setup-graph-node.sh & + # wait for it to warm up + sleep 30 working-directory: ${{ env.subgraph-working-directory }} - name: Build and deploy local subgraph if: steps.base.outputs.cache-hit != 'true' run: | yarn build-and-deploy-local - # artificial slow down to give the subgraph time to sync - sleep 30 working-directory: ${{ env.subgraph-working-directory }} - name: Run test suite diff --git a/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml b/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml index e13da59427..f1fd34b8af 100644 --- a/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml +++ b/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml @@ -62,16 +62,11 @@ jobs: run: yarn prepare-local working-directory: ./packages/subgraph - - name: "Run setup-graph-node" - run: | - chmod +x ./tasks/setup-graph-node.sh - ./tasks/setup-graph-node.sh - working-directory: ./packages/subgraph - - name: "Docker compose" run: | - docker rm subgraph_graph-node_1 || true - docker compose up & + ./tasks/setup-graph-node.sh & + # wait 5 seconds for it to warm up + sleep 5 working-directory: ./packages/subgraph - name: "Prepare and Deploy Local Subgraph" diff --git a/package.json b/package.json index 4fa3381846..427e96d9d2 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,8 @@ "web3": "^1.10.4" }, "resolutions": { - "mocha": "^10.2.0" + "mocha": "^10.2.0", + "cross-fetch": "^4.0.0" }, "workspaces": { "packages": [ diff --git a/packages/subgraph/default.nix b/packages/subgraph/default.nix index aa4a2cc1c1..9e528f88da 100644 --- a/packages/subgraph/default.nix +++ b/packages/subgraph/default.nix @@ -11,13 +11,16 @@ includedFiles = [ ./package.json ./config - ./matchstick.yaml ./schema.graphql ./tsconfig.json ./types ./src ./scripts + # for testing + ./docker-compose.yml + ./matchstick.yaml ./tests + ./tasks ]; }; } diff --git a/packages/subgraph/docker-compose.yml b/packages/subgraph/docker-compose.yml index 7848978088..2950fc4e79 100644 --- a/packages/subgraph/docker-compose.yml +++ b/packages/subgraph/docker-compose.yml @@ -1,4 +1,3 @@ -version: "3" services: graph-node: image: graphprotocol/graph-node:v0.35.0 @@ -11,15 +10,13 @@ services: depends_on: - ipfs - postgres - extra_hosts: - - host.docker.internal:host-gateway environment: postgres_host: postgres postgres_user: graph-node postgres_pass: let-me-in postgres_db: graph-node ipfs: "ipfs:5001" - ethereum: "mainnet:http://host.docker.internal:8545" + ethereum: "mainnet:http://${DOCKER_HOST_IP}:8545" GRAPH_LOG: info ipfs: image: ipfs/go-ipfs:v0.4.23 diff --git a/packages/subgraph/tasks/setup-graph-node.sh b/packages/subgraph/tasks/setup-graph-node.sh old mode 100644 new mode 100755 index f7758a3d98..bb9a699b69 --- a/packages/subgraph/tasks/setup-graph-node.sh +++ b/packages/subgraph/tasks/setup-graph-node.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -e +set -ex if ! which docker >/dev/null 2>&1 ; then echo "Please install 'docker' first" @@ -17,26 +17,10 @@ if ! which jq >/dev/null 2>&1; then exit 1 fi -# Create the graph-node container -docker compose up --no-start graph-node +# this creates the bridged network for the composed ervices (network id: subgraph_default) +docker compose up --no-start +# we then extract the gateway ip address and export it +DOCKER_HOST_IP=$(docker network inspect subgraph_default | jq -r '.[0].IPAM.Config[].Gateway') -# Start graph-node so we can inspect it -docker compose start graph-node - -# Identify the container ID -CONTAINER_ID=$(docker container ls | grep graph-node | cut -d' ' -f1) - -# Inspect the container to identify the host IP address -HOST_IP=$(docker inspect "$CONTAINER_ID" | jq -r .[0].NetworkSettings.Networks[].Gateway) - -echo "Host IP: $HOST_IP" - -# Inject the host IP into docker-compose.yml -sed -i -e "s/host.docker.internal/$HOST_IP/g" docker-compose.yml - -function stop_graph_node { - # Ensure graph-node is stopped - docker compose stop graph-node -} - -trap stop_graph_node EXIT +# docker compose with required variables +DOCKER_HOST_IP=$DOCKER_HOST_IP docker compose up diff --git a/yarn.lock b/yarn.lock index 5eea612513..1b89030f9c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7578,22 +7578,7 @@ create-require@^1.1.0: resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== -cross-fetch@^2.1.0: - version "2.2.6" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-2.2.6.tgz#2ef0bb39a24ac034787965c457368a28730e220a" - integrity sha512-9JZz+vXCmfKUZ68zAptS7k4Nu8e2qcibe7WVZYps7sAgk5R8GYTc+T1WR0v1rlP9HxgARmOX1UTIJZFytajpNA== - dependencies: - node-fetch "^2.6.7" - whatwg-fetch "^2.0.4" - -cross-fetch@^3.1.4, cross-fetch@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" - integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== - dependencies: - node-fetch "2.6.7" - -cross-fetch@^4.0.0: +cross-fetch@^2.1.0, cross-fetch@^3.1.4, cross-fetch@^3.1.5, cross-fetch@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-4.0.0.tgz#f037aef1580bb3a1a35164ea2a848ba81b445983" integrity sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g== @@ -17264,7 +17249,7 @@ string-format@^2.0.0: resolved "https://registry.yarnpkg.com/string-format/-/string-format-2.0.0.tgz#f2df2e7097440d3b65de31b6d40d54c96eaffb9b" integrity sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA== -"string-width-cjs@npm:string-width@^4.2.0": +"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -17282,15 +17267,6 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - string-width@^5.0.1, string-width@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" @@ -17382,7 +17358,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -17410,13 +17386,6 @@ strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -19954,11 +19923,6 @@ websocket@^1.0.32: utf-8-validate "^5.0.2" yaeti "^0.0.6" -whatwg-fetch@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" - integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng== - whatwg-mimetype@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz#5fa1a7623867ff1af6ca3dc72ad6b8a4208beba7" @@ -20084,7 +20048,7 @@ workerpool@6.2.1: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -20110,15 +20074,6 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From 9a4abafcef9d72af1840864b8cfd02a545afd762 Mon Sep 17 00:00:00 2001 From: Miao ZhiCheng Date: Fri, 30 Aug 2024 11:42:03 +0300 Subject: [PATCH 39/42] Update dependencies (#2011) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Dependency updates: - update all dependencies, targeting minor versions - update major versions of: - hardhat 9 - syncpack - solhint - webpack-cli 5 - prettier-eslint, @typescript-eslint/eslint-plugin, @typescript-eslint/parser - @nomicfoundation/hardhat-ethers - node-jq - chai-as-promised - nyc - @graphql-codegen/near-operation-file-preset - syncpack linting: - integrated into ci and pre-commit - format all package.json - pin stack-trace package version due to its es module usage - removed dependency resolutions: - root: mocha - sdk-core: graphql - upgrade nodejs usage - making node22 default - testing matrix expanded to 18,20,22 - update to yarn 1.22.22 **Dependencies left not updated to new major versions** ◉ @nomicfoundation/hardhat-chai-matchers 1.0.6 → 2.0.7 - https://github.com/nomicfoundation/hardhat ◉ eslint 8.57.0 → 9.9.1 - https://github.com/eslint/eslint ◉ web3 ^1.10.4 → 4.12.1 - https://github.com/ChainSafe/web3.js ◉ @openzeppelin/contracts 4.9.6 → 5.0.2 - https://github.com/OpenZeppelin/openzeppelin-contracts ◉ ethers ^5.7.2 → 6.13.2 - https://github.com/ethers-io/ethers.js ◉ auto-bind 4.0.0 → 5.0.1 - https://github.com/sindresorhus/auto-bind ◉ node-fetch 2.7.0 → 3.3.2 - https://github.com/node-fetch/node-fetch ◉ graphql-request ^6.1.0 → 7.1.0 - https://github.com/jasonkuhrt/graphql-request ◉ @reduxjs/toolkit ^1.9.7 → 2.2.7 - https://github.com/reduxjs/redux-toolkit ◉ react-redux ^8.1.3 → 9.1.2 - https://github.com/reduxjs/react-redux --- .../call.test-ethereum-contracts.yml | 5 +- .../workflows/call.test-local-subgraph.yml | 4 +- .github/workflows/call.test-sdk-core.yml | 9 +- ...subgraph-on-previous-sdk-core-versions.yml | 4 +- .husky/pre-commit | 18 +- .syncpackrc.yml | 23 + .../{yarn-1.22.19.cjs => yarn-1.22.22.cjs} | 2036 +++++--- .yarnrc | 2 +- default.nix | 1 + flake.nix | 26 +- package.json | 101 +- .../autowrap/package.json | 12 +- .../scheduler/package.json | 12 +- packages/ethereum-contracts/.eslintrc.ts.json | 2 + packages/ethereum-contracts/.solhint.json | 6 +- packages/ethereum-contracts/README.md | 2 +- .../contracts/tokens/SETH.sol | 3 +- packages/ethereum-contracts/package.json | 78 +- packages/hot-fuzz/.solhint.json | 2 +- packages/hot-fuzz/package.json | 34 +- packages/js-sdk/package.json | 50 +- packages/metadata/package.json | 54 +- packages/sdk-core/.eslintrc.json | 1 + packages/sdk-core/package.json | 79 +- packages/sdk-redux/package.json | 88 +- .../solidity-semantic-money/.solhint.json | 2 +- packages/solidity-semantic-money/package.json | 66 +- packages/subgraph/package.json | 32 +- tasks/find-dup-devDependencies.sh | 19 +- yarn.lock | 4314 +++++++++-------- 30 files changed, 3977 insertions(+), 3108 deletions(-) create mode 100644 .syncpackrc.yml rename .yarn/releases/{yarn-1.22.19.cjs => yarn-1.22.22.cjs} (99%) diff --git a/.github/workflows/call.test-ethereum-contracts.yml b/.github/workflows/call.test-ethereum-contracts.yml index 64d8b0b2dc..edfa2eea18 100644 --- a/.github/workflows/call.test-ethereum-contracts.yml +++ b/.github/workflows/call.test-ethereum-contracts.yml @@ -26,9 +26,9 @@ jobs: id: set-matrix run: | if [ "${{ inputs.run-coverage-tests }}" == "true" ];then - echo "matrix={\"node-version\": [20]}" >> "$GITHUB_OUTPUT" + echo "matrix={\"node-version\": [22]}" >> "$GITHUB_OUTPUT" else - echo "matrix={\"node-version\": [18, 20]}" >> "$GITHUB_OUTPUT" + echo "matrix={\"node-version\": [18, 20, 22]}" >> "$GITHUB_OUTPUT" fi test-ethereum-contracts: @@ -40,6 +40,7 @@ jobs: strategy: matrix: ${{ fromJson(needs.matrix-prep.outputs.matrix) }} + fail-fast: false env: DEV_SHELL_NAME: ci-node${{ matrix.node-version }} diff --git a/.github/workflows/call.test-local-subgraph.yml b/.github/workflows/call.test-local-subgraph.yml index cb05a6a288..acace6743b 100644 --- a/.github/workflows/call.test-local-subgraph.yml +++ b/.github/workflows/call.test-local-subgraph.yml @@ -4,7 +4,7 @@ on: workflow_call: env: - DEV_SHELL_NAME: ci-node20 + DEV_SHELL_NAME: ci-node22 ethereum-contracts-working-directory: ./packages/ethereum-contracts sdk-core-working-directory: ./packages/sdk-core subgraph-working-directory: ./packages/subgraph @@ -103,7 +103,7 @@ jobs: run: | ./tasks/setup-graph-node.sh & # wait for it to warm up - sleep 30 + sleep 15 working-directory: ${{ env.subgraph-working-directory }} - name: Run subgraph integration test suite diff --git a/.github/workflows/call.test-sdk-core.yml b/.github/workflows/call.test-sdk-core.yml index d6341c3e2b..f777ee0a91 100644 --- a/.github/workflows/call.test-sdk-core.yml +++ b/.github/workflows/call.test-sdk-core.yml @@ -29,9 +29,9 @@ jobs: id: set-matrix run: | if [ "${{ inputs.run-coverage-tests }}" == "true" ];then - echo "matrix={\"node-version\": [20]}" >> "$GITHUB_OUTPUT" + echo "matrix={\"node-version\": [22]}" >> "$GITHUB_OUTPUT" else - echo "matrix={\"node-version\": [18, 20]}" >> "$GITHUB_OUTPUT" + echo "matrix={\"node-version\": [18, 20, 22]}" >> "$GITHUB_OUTPUT" fi test-sdk-core: @@ -43,6 +43,7 @@ jobs: strategy: matrix: ${{ fromJson(needs.matrix-prep.outputs.matrix) }} + fail-fast: false env: DEV_SHELL_NAME: ci-node${{ matrix.node-version }} @@ -119,13 +120,15 @@ jobs: run: | ./tasks/setup-graph-node.sh & # wait for it to warm up - sleep 30 + sleep 15 working-directory: ${{ env.subgraph-working-directory }} - name: Build and deploy local subgraph if: steps.base.outputs.cache-hit != 'true' run: | yarn build-and-deploy-local + # wait for it to sync + sleep 15 working-directory: ${{ env.subgraph-working-directory }} - name: Run test suite diff --git a/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml b/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml index f1fd34b8af..063b1065be 100644 --- a/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml +++ b/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml @@ -65,8 +65,8 @@ jobs: - name: "Docker compose" run: | ./tasks/setup-graph-node.sh & - # wait 5 seconds for it to warm up - sleep 5 + # wait for it to sync + sleep 15 working-directory: ./packages/subgraph - name: "Prepare and Deploy Local Subgraph" diff --git a/.husky/pre-commit b/.husky/pre-commit index 4a4468a912..f9d8543080 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,9 +1,19 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" +#!/usr/bin/env bash + +maybe_run() { + exec=$1 + shift + if which "$exec" &>/dev/null; then + "$@" + else + echo "⚠️ Please install $exec!" + fi +} # always lint these -npm run lint:shellcheck -npm run lint:actionlint +npm run lint:syncpack +maybe_run shellcheck npm run lint:shellcheck +maybe_run actionlint npm run lint:actionlint # only lint the workspace if there is staged files for i in $(jq -r '.workspaces.packages | .[]' package.json); do diff --git a/.syncpackrc.yml b/.syncpackrc.yml new file mode 100644 index 0000000000..e253709112 --- /dev/null +++ b/.syncpackrc.yml @@ -0,0 +1,23 @@ +indent: " " # four spaces +dependencyTypes: ["!peer", "!resolutions"] # let us take care of the peer dependency resolutions by hand +sortAz: ["!scripts"] # we prefer to sort scripts by-hand, because sometimes it uses run-s pattern +semverGroups: + # Note: rule priority is top (high) to bottom (low) + - label: Use looser ranges for metadata local packages + dependencies: + # Note: - Metadata updates often include new network configuration, which we do not want to force a new SDK + # version in order for the client to be able to use. + # - Probably this is better set in peerDependencies, instaed. However, that might be a breaking change to + # the current developers of SDK. + - "@superfluid-finance/metadata" + range: "^" + - label: Use exact version for prod dependencies + dependencyTypes: ["prod"] + range: "" + - label: Use looser range by default + range: "^" +versionGroups: + - label: Pin stack-trace to the same version, since newer version starts to use ES module + dependencies: + - "stack-trace" + pinVersion: "0.0.10" diff --git a/.yarn/releases/yarn-1.22.19.cjs b/.yarn/releases/yarn-1.22.22.cjs similarity index 99% rename from .yarn/releases/yarn-1.22.19.cjs rename to .yarn/releases/yarn-1.22.22.cjs index 0fefc25827..3ff8687a11 100755 --- a/.yarn/releases/yarn-1.22.19.cjs +++ b/.yarn/releases/yarn-1.22.22.cjs @@ -1411,7 +1411,7 @@ function _load_glob() { var _os; function _load_os() { - return _os = _interopRequireDefault(__webpack_require__(46)); + return _os = _interopRequireDefault(__webpack_require__(42)); } var _path; @@ -1441,7 +1441,7 @@ function _load_promise2() { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } var _fsNormalized; @@ -1471,7 +1471,7 @@ const readdir = exports.readdir = (0, (_promise2 || _load_promise2()).promisify) const rename = exports.rename = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.rename); const access = exports.access = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.access); const stat = exports.stat = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.stat); -const mkdirp = exports.mkdirp = (0, (_promise2 || _load_promise2()).promisify)(__webpack_require__(145)); +const mkdirp = exports.mkdirp = (0, (_promise2 || _load_promise2()).promisify)(__webpack_require__(146)); const exists = exports.exists = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.exists, true); const lstat = exports.lstat = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.lstat); const chmod = exports.chmod = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.chmod); @@ -1487,7 +1487,7 @@ const CONCURRENT_QUEUE_ITEMS = (_fs || _load_fs()).default.copyFile ? 128 : 4; const fsSymlink = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.symlink); const invariant = __webpack_require__(9); -const stripBOM = __webpack_require__(160); +const stripBOM = __webpack_require__(161); const noop = () => {}; @@ -1582,12 +1582,12 @@ exports.OneTimePasswordError = OneTimePasswordError; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscriber; }); /* unused harmony export SafeSubscriber */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isFunction__ = __webpack_require__(154); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isFunction__ = __webpack_require__(155); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Observer__ = __webpack_require__(420); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscription__ = __webpack_require__(25); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__internal_symbol_rxSubscriber__ = __webpack_require__(321); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__internal_symbol_rxSubscriber__ = __webpack_require__(322); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__config__ = __webpack_require__(186); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util_hostReportError__ = __webpack_require__(323); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util_hostReportError__ = __webpack_require__(324); /** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */ @@ -1838,7 +1838,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.getPathKey = getPathKey; -const os = __webpack_require__(46); +const os = __webpack_require__(42); const path = __webpack_require__(0); const userHome = __webpack_require__(67).default; @@ -2106,10 +2106,10 @@ module.exports = require("crypto"); "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Observable; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_canReportError__ = __webpack_require__(322); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_canReportError__ = __webpack_require__(323); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_toSubscriber__ = __webpack_require__(932); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__internal_symbol_observable__ = __webpack_require__(118); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_pipe__ = __webpack_require__(324); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_pipe__ = __webpack_require__(325); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__config__ = __webpack_require__(186); /** PURE_IMPORTS_START _util_canReportError,_util_toSubscriber,_internal_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */ @@ -2374,7 +2374,7 @@ module.exports = safer // Copyright (c) 2012, Mark Cavage. All rights reserved. // Copyright 2015 Joyent, Inc. -var assert = __webpack_require__(28); +var assert = __webpack_require__(29); var Stream = __webpack_require__(23).Stream; var util = __webpack_require__(3); @@ -2958,20 +2958,19 @@ class Lockfile { invariant(remote, 'Package is missing a remote'); const remoteKey = keyForRemote(remote); - const seenPattern = remoteKey && seen.get(remoteKey); + const pkgName = getName(pattern); + + const seenKey = remoteKey ? `${remoteKey}#${pkgName}` : null; + const seenPattern = seenKey ? seen.get(seenKey) : null; + if (seenPattern) { // no point in duplicating it lockfile[pattern] = seenPattern; - - // if we're relying on our name being inferred and two of the patterns have - // different inferred names then we need to set it - if (!seenPattern.name && getName(pattern) !== pkg.name) { - seenPattern.name = pkg.name; - } continue; } + const obj = implodeEntry(pattern, { - name: pkg.name, + name: pkgName, version: pkg.version, uid: pkg._uid, resolved: remote.resolved, @@ -2986,8 +2985,8 @@ class Lockfile { lockfile[pattern] = obj; - if (remoteKey) { - seen.set(remoteKey, obj); + if (seenKey) { + seen.set(seenKey, obj); } } @@ -3029,8 +3028,8 @@ exports.default = _assign2.default || function (target) { /* 21 */ /***/ (function(module, exports, __webpack_require__) { -var store = __webpack_require__(133)('wks'); -var uid = __webpack_require__(137); +var store = __webpack_require__(134)('wks'); +var uid = __webpack_require__(138); var Symbol = __webpack_require__(17).Symbol; var USE_SYMBOL = typeof Symbol == 'function'; @@ -4392,7 +4391,7 @@ module.exports = require("url"); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscription; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isArray__ = __webpack_require__(41); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isObject__ = __webpack_require__(444); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__(154); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__(155); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_tryCatch__ = __webpack_require__(57); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_errorObject__ = __webpack_require__(48); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__ = __webpack_require__(441); @@ -4559,7 +4558,7 @@ module.exports = { var assert = __webpack_require__(16); var Buffer = __webpack_require__(15).Buffer; var PrivateKey = __webpack_require__(33); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var crypto = __webpack_require__(11); var algs = __webpack_require__(32); var asn1 = __webpack_require__(66); @@ -4861,7 +4860,7 @@ function publicFromPrivateECDSA(curveName, priv) { assert.string(curveName, 'curveName'); assert.buffer(priv); if (ec === undefined) - ec = __webpack_require__(139); + ec = __webpack_require__(140); if (jsbn === undefined) jsbn = __webpack_require__(81).BigInteger; var params = algs.curves[curveName]; @@ -4929,6 +4928,241 @@ function opensshCipherInfo(cipher) { /* 27 */ /***/ (function(module, exports, __webpack_require__) { +"use strict"; + +const escapeStringRegexp = __webpack_require__(382); +const ansiStyles = __webpack_require__(474); +const stdoutColor = __webpack_require__(566).stdout; + +const template = __webpack_require__(567); + +const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); + +// `supportsColor.level` → `ansiStyles.color[name]` mapping +const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; + +// `color-convert` models to exclude from the Chalk API due to conflicts and such +const skipModels = new Set(['gray']); + +const styles = Object.create(null); + +function applyOptions(obj, options) { + options = options || {}; + + // Detect level if not set manually + const scLevel = stdoutColor ? stdoutColor.level : 0; + obj.level = options.level === undefined ? scLevel : options.level; + obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; +} + +function Chalk(options) { + // We check for this.template here since calling `chalk.constructor()` + // by itself will have a `this` of a previously constructed chalk object + if (!this || !(this instanceof Chalk) || this.template) { + const chalk = {}; + applyOptions(chalk, options); + + chalk.template = function () { + const args = [].slice.call(arguments); + return chalkTag.apply(null, [chalk.template].concat(args)); + }; + + Object.setPrototypeOf(chalk, Chalk.prototype); + Object.setPrototypeOf(chalk.template, chalk); + + chalk.template.constructor = Chalk; + + return chalk.template; + } + + applyOptions(this, options); +} + +// Use bright blue on Windows as the normal blue color is illegible +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001B[94m'; +} + +for (const key of Object.keys(ansiStyles)) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + styles[key] = { + get() { + const codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); + } + }; +} + +styles.visible = { + get() { + return build.call(this, this._styles || [], true, 'visible'); + } +}; + +ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); +for (const model of Object.keys(ansiStyles.color.ansi)) { + if (skipModels.has(model)) { + continue; + } + + styles[model] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); +for (const model of Object.keys(ansiStyles.bgColor.ansi)) { + if (skipModels.has(model)) { + continue; + } + + const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +const proto = Object.defineProperties(() => {}, styles); + +function build(_styles, _empty, key) { + const builder = function () { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder._empty = _empty; + + const self = this; + + Object.defineProperty(builder, 'level', { + enumerable: true, + get() { + return self.level; + }, + set(level) { + self.level = level; + } + }); + + Object.defineProperty(builder, 'enabled', { + enumerable: true, + get() { + return self.enabled; + }, + set(enabled) { + self.enabled = enabled; + } + }); + + // See below for fix regarding invisible grey/dim combination on Windows + builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; + + // `__proto__` is used because we must return a function, but there is + // no way to create a function with a different prototype + builder.__proto__ = proto; // eslint-disable-line no-proto + + return builder; +} + +function applyStyle() { + // Support varags, but simply cast to string in case there's only one arg + const args = arguments; + const argsLen = args.length; + let str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + + if (argsLen > 1) { + // Don't slice `arguments`, it prevents V8 optimizations + for (let a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || this.level <= 0 || !str) { + return this._empty ? '' : str; + } + + // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + const originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ''; + } + + for (const code of this._styles.slice().reverse()) { + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; + + // Close the styling before a linebreak and reopen + // after next line to fix a bleed issue on macOS + // https://github.com/chalk/chalk/pull/92 + str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); + } + + // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue + ansiStyles.dim.open = originalDim; + + return str; +} + +function chalkTag(chalk, strings) { + if (!Array.isArray(strings)) { + // If chalk() was called by itself or with a string, + // return the string itself as a string. + return [].slice.call(arguments, 1).join(' '); + } + + const args = [].slice.call(arguments, 2); + const parts = [strings.raw[0]]; + + for (let i = 1; i < strings.length; i++) { + parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); + parts.push(String(strings.raw[i])); + } + + return template(chalk, parts.join('')); +} + +Object.defineProperties(Chalk.prototype, styles); + +module.exports = Chalk(); // eslint-disable-line new-cap +module.exports.supportsColor = stdoutColor; +module.exports.default = module.exports; // For TypeScript + + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + // Copyright 2017 Joyent, Inc. module.exports = Key; @@ -4936,9 +5170,9 @@ module.exports = Key; var assert = __webpack_require__(16); var algs = __webpack_require__(32); var crypto = __webpack_require__(11); -var Fingerprint = __webpack_require__(156); +var Fingerprint = __webpack_require__(157); var Signature = __webpack_require__(75); -var DiffieHellman = __webpack_require__(325).DiffieHellman; +var DiffieHellman = __webpack_require__(326).DiffieHellman; var errs = __webpack_require__(74); var utils = __webpack_require__(26); var PrivateKey = __webpack_require__(33); @@ -4956,13 +5190,13 @@ var KeyParseError = errs.KeyParseError; var formats = {}; formats['auto'] = __webpack_require__(455); formats['pem'] = __webpack_require__(86); -formats['pkcs1'] = __webpack_require__(327); -formats['pkcs8'] = __webpack_require__(157); +formats['pkcs1'] = __webpack_require__(328); +formats['pkcs8'] = __webpack_require__(158); formats['rfc4253'] = __webpack_require__(103); formats['ssh'] = __webpack_require__(456); formats['ssh-private'] = __webpack_require__(193); formats['openssh'] = formats['ssh-private']; -formats['dnssec'] = __webpack_require__(326); +formats['dnssec'] = __webpack_require__(327); function Key(opts) { assert.object(opts, 'options'); @@ -5207,13 +5441,13 @@ Key._oldVersionDetect = function (obj) { /***/ }), -/* 28 */ +/* 29 */ /***/ (function(module, exports) { module.exports = require("assert"); /***/ }), -/* 29 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5255,241 +5489,6 @@ function nullify(obj = {}) { return obj; } -/***/ }), -/* 30 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const escapeStringRegexp = __webpack_require__(382); -const ansiStyles = __webpack_require__(474); -const stdoutColor = __webpack_require__(566).stdout; - -const template = __webpack_require__(567); - -const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); - -// `supportsColor.level` → `ansiStyles.color[name]` mapping -const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; - -// `color-convert` models to exclude from the Chalk API due to conflicts and such -const skipModels = new Set(['gray']); - -const styles = Object.create(null); - -function applyOptions(obj, options) { - options = options || {}; - - // Detect level if not set manually - const scLevel = stdoutColor ? stdoutColor.level : 0; - obj.level = options.level === undefined ? scLevel : options.level; - obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; -} - -function Chalk(options) { - // We check for this.template here since calling `chalk.constructor()` - // by itself will have a `this` of a previously constructed chalk object - if (!this || !(this instanceof Chalk) || this.template) { - const chalk = {}; - applyOptions(chalk, options); - - chalk.template = function () { - const args = [].slice.call(arguments); - return chalkTag.apply(null, [chalk.template].concat(args)); - }; - - Object.setPrototypeOf(chalk, Chalk.prototype); - Object.setPrototypeOf(chalk.template, chalk); - - chalk.template.constructor = Chalk; - - return chalk.template; - } - - applyOptions(this, options); -} - -// Use bright blue on Windows as the normal blue color is illegible -if (isSimpleWindowsTerm) { - ansiStyles.blue.open = '\u001B[94m'; -} - -for (const key of Object.keys(ansiStyles)) { - ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); - - styles[key] = { - get() { - const codes = ansiStyles[key]; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); - } - }; -} - -styles.visible = { - get() { - return build.call(this, this._styles || [], true, 'visible'); - } -}; - -ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); -for (const model of Object.keys(ansiStyles.color.ansi)) { - if (skipModels.has(model)) { - continue; - } - - styles[model] = { - get() { - const level = this.level; - return function () { - const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); - const codes = { - open, - close: ansiStyles.color.close, - closeRe: ansiStyles.color.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); - }; - } - }; -} - -ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); -for (const model of Object.keys(ansiStyles.bgColor.ansi)) { - if (skipModels.has(model)) { - continue; - } - - const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); - styles[bgModel] = { - get() { - const level = this.level; - return function () { - const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); - const codes = { - open, - close: ansiStyles.bgColor.close, - closeRe: ansiStyles.bgColor.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); - }; - } - }; -} - -const proto = Object.defineProperties(() => {}, styles); - -function build(_styles, _empty, key) { - const builder = function () { - return applyStyle.apply(builder, arguments); - }; - - builder._styles = _styles; - builder._empty = _empty; - - const self = this; - - Object.defineProperty(builder, 'level', { - enumerable: true, - get() { - return self.level; - }, - set(level) { - self.level = level; - } - }); - - Object.defineProperty(builder, 'enabled', { - enumerable: true, - get() { - return self.enabled; - }, - set(enabled) { - self.enabled = enabled; - } - }); - - // See below for fix regarding invisible grey/dim combination on Windows - builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; - - // `__proto__` is used because we must return a function, but there is - // no way to create a function with a different prototype - builder.__proto__ = proto; // eslint-disable-line no-proto - - return builder; -} - -function applyStyle() { - // Support varags, but simply cast to string in case there's only one arg - const args = arguments; - const argsLen = args.length; - let str = String(arguments[0]); - - if (argsLen === 0) { - return ''; - } - - if (argsLen > 1) { - // Don't slice `arguments`, it prevents V8 optimizations - for (let a = 1; a < argsLen; a++) { - str += ' ' + args[a]; - } - } - - if (!this.enabled || this.level <= 0 || !str) { - return this._empty ? '' : str; - } - - // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, - // see https://github.com/chalk/chalk/issues/58 - // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. - const originalDim = ansiStyles.dim.open; - if (isSimpleWindowsTerm && this.hasGrey) { - ansiStyles.dim.open = ''; - } - - for (const code of this._styles.slice().reverse()) { - // Replace any instances already present with a re-opening code - // otherwise only the part of the string until said closing code - // will be colored, and the rest will simply be 'plain'. - str = code.open + str.replace(code.closeRe, code.open) + code.close; - - // Close the styling before a linebreak and reopen - // after next line to fix a bleed issue on macOS - // https://github.com/chalk/chalk/pull/92 - str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); - } - - // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue - ansiStyles.dim.open = originalDim; - - return str; -} - -function chalkTag(chalk, strings) { - if (!Array.isArray(strings)) { - // If chalk() was called by itself or with a string, - // return the string itself as a string. - return [].slice.call(arguments, 1).join(' '); - } - - const args = [].slice.call(arguments, 2); - const parts = [strings.raw[0]]; - - for (let i = 1; i < strings.length; i++) { - parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); - parts.push(String(strings.raw[i])); - } - - return template(chalk, parts.join('')); -} - -Object.defineProperties(Chalk.prototype, styles); - -module.exports = Chalk(); // eslint-disable-line new-cap -module.exports.supportsColor = stdoutColor; -module.exports.default = module.exports; // For TypeScript - - /***/ }), /* 31 */ /***/ (function(module, exports) { @@ -5684,12 +5683,12 @@ var assert = __webpack_require__(16); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); var crypto = __webpack_require__(11); -var Fingerprint = __webpack_require__(156); +var Fingerprint = __webpack_require__(157); var Signature = __webpack_require__(75); var errs = __webpack_require__(74); var util = __webpack_require__(3); var utils = __webpack_require__(26); -var dhe = __webpack_require__(325); +var dhe = __webpack_require__(326); var generateECDSA = dhe.generateECDSA; var generateED25519 = dhe.generateED25519; var edCompat; @@ -5701,7 +5700,7 @@ try { /* Just continue through, and bail out if we try to use it. */ } -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var InvalidAlgorithmError = errs.InvalidAlgorithmError; var KeyParseError = errs.KeyParseError; @@ -5710,13 +5709,13 @@ var KeyEncryptedError = errs.KeyEncryptedError; var formats = {}; formats['auto'] = __webpack_require__(455); formats['pem'] = __webpack_require__(86); -formats['pkcs1'] = __webpack_require__(327); -formats['pkcs8'] = __webpack_require__(157); +formats['pkcs1'] = __webpack_require__(328); +formats['pkcs8'] = __webpack_require__(158); formats['rfc4253'] = __webpack_require__(103); formats['ssh-private'] = __webpack_require__(193); formats['openssh'] = formats['ssh-private']; formats['ssh'] = formats['ssh-private']; -formats['dnssec'] = __webpack_require__(326); +formats['dnssec'] = __webpack_require__(327); function PrivateKey(opts) { assert.object(opts, 'options'); @@ -6149,7 +6148,7 @@ function _load_fs() { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } var _yarnVersion; @@ -7512,7 +7511,7 @@ module.exports = function (it) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscription__ = __webpack_require__(25); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__ = __webpack_require__(190); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__SubjectSubscription__ = __webpack_require__(422); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_symbol_rxSubscriber__ = __webpack_require__(321); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_symbol_rxSubscriber__ = __webpack_require__(322); /** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */ @@ -24833,7 +24832,7 @@ function normalizePattern(pattern) { } }.call(this)); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(163)(module))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(121)(module))) /***/ }), /* 39 */ @@ -24862,8 +24861,8 @@ function emptyScheduled(scheduler) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return async; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncAction__ = __webpack_require__(149); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncScheduler__ = __webpack_require__(150); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncAction__ = __webpack_require__(150); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncScheduler__ = __webpack_require__(151); /** PURE_IMPORTS_START _AsyncAction,_AsyncScheduler PURE_IMPORTS_END */ @@ -24884,10 +24883,16 @@ var isArray = Array.isArray || (function (x) { return x && typeof x.length === ' /***/ }), /* 42 */ +/***/ (function(module, exports) { + +module.exports = require("os"); + +/***/ }), +/* 43 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(72); -var createDesc = __webpack_require__(132); +var createDesc = __webpack_require__(133); module.exports = __webpack_require__(52) ? function (object, key, value) { return dP.f(object, key, createDesc(1, value)); } : function (object, key, value) { @@ -24897,7 +24902,7 @@ module.exports = __webpack_require__(52) ? function (object, key, value) { /***/ }), -/* 43 */ +/* 44 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24963,7 +24968,7 @@ module.exports.extend = extend; /***/ }), -/* 44 */ +/* 45 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24971,7 +24976,7 @@ module.exports.extend = extend; /*eslint-disable max-len*/ -var common = __webpack_require__(43); +var common = __webpack_require__(44); var YAMLException = __webpack_require__(55); var Type = __webpack_require__(10); @@ -25078,7 +25083,7 @@ module.exports = Schema; /***/ }), -/* 45 */ +/* 46 */ /***/ (function(module, exports, __webpack_require__) { /* eslint-disable node/no-deprecated-api */ @@ -25145,12 +25150,6 @@ SafeBuffer.allocUnsafeSlow = function (size) { } -/***/ }), -/* 46 */ -/***/ (function(module, exports) { - -module.exports = require("os"); - /***/ }), /* 47 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -25277,7 +25276,8 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; /* global child_process$spawnOpts */ -const child = __webpack_require__(331); +const os = __webpack_require__(42); +const child = __webpack_require__(332); const fs = __webpack_require__(4); const path = __webpack_require__(0); @@ -25330,8 +25330,9 @@ function forkp(program, args, opts) { reject(error); }); - proc.on('close', exitCode => { - resolve(exitCode); + proc.on('close', (exitCode, signal) => { + const finalExitCode = typeof exitCode !== `undefined` && exitCode !== null ? exitCode : 128 + os.constants.signals[signal]; + resolve(finalExitCode); }); }); } @@ -25347,8 +25348,9 @@ function spawnp(program, args, opts) { reject(error); }); - proc.on('close', exitCode => { - resolve(exitCode); + proc.on('close', (exitCode, signal) => { + const finalExitCode = typeof exitCode !== `undefined` && exitCode !== null ? exitCode : 128 + os.constants.signals[signal]; + resolve(finalExitCode); }); }); } @@ -25622,12 +25624,12 @@ module.exports = YAMLException; -var Schema = __webpack_require__(44); +var Schema = __webpack_require__(45); module.exports = new Schema({ include: [ - __webpack_require__(143) + __webpack_require__(144) ], implicit: [ __webpack_require__(299), @@ -25795,7 +25797,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de var global = __webpack_require__(17); var core = __webpack_require__(31); var ctx = __webpack_require__(70); -var hide = __webpack_require__(42); +var hide = __webpack_require__(43); var has = __webpack_require__(71); var PROTOTYPE = 'prototype'; @@ -25962,7 +25964,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return __WEBPACK_IMPORTED_MODULE_15__internal_operators_debounce__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__internal_operators_debounceTime__ = __webpack_require__(851); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return __WEBPACK_IMPORTED_MODULE_16__internal_operators_debounceTime__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__internal_operators_defaultIfEmpty__ = __webpack_require__(146); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__internal_operators_defaultIfEmpty__ = __webpack_require__(147); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return __WEBPACK_IMPORTED_MODULE_17__internal_operators_defaultIfEmpty__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__internal_operators_delay__ = __webpack_require__(852); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return __WEBPACK_IMPORTED_MODULE_18__internal_operators_delay__["a"]; }); @@ -25988,7 +25990,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return __WEBPACK_IMPORTED_MODULE_28__internal_operators_exhaustMap__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__internal_operators_expand__ = __webpack_require__(862); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return __WEBPACK_IMPORTED_MODULE_29__internal_operators_expand__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__internal_operators_filter__ = __webpack_require__(147); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__internal_operators_filter__ = __webpack_require__(148); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return __WEBPACK_IMPORTED_MODULE_30__internal_operators_filter__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__internal_operators_finalize__ = __webpack_require__(863); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return __WEBPACK_IMPORTED_MODULE_31__internal_operators_finalize__["a"]; }); @@ -26016,9 +26018,9 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return __WEBPACK_IMPORTED_MODULE_42__internal_operators_max__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_43__internal_operators_merge__ = __webpack_require__(872); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return __WEBPACK_IMPORTED_MODULE_43__internal_operators_merge__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_44__internal_operators_mergeAll__ = __webpack_require__(315); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_44__internal_operators_mergeAll__ = __webpack_require__(316); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return __WEBPACK_IMPORTED_MODULE_44__internal_operators_mergeAll__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_45__internal_operators_mergeMap__ = __webpack_require__(148); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_45__internal_operators_mergeMap__ = __webpack_require__(149); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return __WEBPACK_IMPORTED_MODULE_45__internal_operators_mergeMap__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "flatMap", function() { return __WEBPACK_IMPORTED_MODULE_45__internal_operators_mergeMap__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_46__internal_operators_mergeMapTo__ = __webpack_require__(873); @@ -26059,13 +26061,13 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return __WEBPACK_IMPORTED_MODULE_63__internal_operators_retry__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_64__internal_operators_retryWhen__ = __webpack_require__(888); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return __WEBPACK_IMPORTED_MODULE_64__internal_operators_retryWhen__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_65__internal_operators_refCount__ = __webpack_require__(316); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_65__internal_operators_refCount__ = __webpack_require__(317); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return __WEBPACK_IMPORTED_MODULE_65__internal_operators_refCount__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_66__internal_operators_sample__ = __webpack_require__(889); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return __WEBPACK_IMPORTED_MODULE_66__internal_operators_sample__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_67__internal_operators_sampleTime__ = __webpack_require__(890); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return __WEBPACK_IMPORTED_MODULE_67__internal_operators_sampleTime__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_68__internal_operators_scan__ = __webpack_require__(317); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_68__internal_operators_scan__ = __webpack_require__(318); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return __WEBPACK_IMPORTED_MODULE_68__internal_operators_scan__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_69__internal_operators_sequenceEqual__ = __webpack_require__(891); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return __WEBPACK_IMPORTED_MODULE_69__internal_operators_sequenceEqual__["a"]; }); @@ -26089,13 +26091,13 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return __WEBPACK_IMPORTED_MODULE_78__internal_operators_subscribeOn__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_79__internal_operators_switchAll__ = __webpack_require__(901); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return __WEBPACK_IMPORTED_MODULE_79__internal_operators_switchAll__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_80__internal_operators_switchMap__ = __webpack_require__(318); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_80__internal_operators_switchMap__ = __webpack_require__(319); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return __WEBPACK_IMPORTED_MODULE_80__internal_operators_switchMap__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_81__internal_operators_switchMapTo__ = __webpack_require__(902); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return __WEBPACK_IMPORTED_MODULE_81__internal_operators_switchMapTo__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_82__internal_operators_take__ = __webpack_require__(319); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_82__internal_operators_take__ = __webpack_require__(320); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "take", function() { return __WEBPACK_IMPORTED_MODULE_82__internal_operators_take__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_83__internal_operators_takeLast__ = __webpack_require__(320); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_83__internal_operators_takeLast__ = __webpack_require__(321); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return __WEBPACK_IMPORTED_MODULE_83__internal_operators_takeLast__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_84__internal_operators_takeUntil__ = __webpack_require__(903); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return __WEBPACK_IMPORTED_MODULE_84__internal_operators_takeUntil__["a"]; }); @@ -26256,7 +26258,7 @@ module.exports = require("buffer"); "use strict"; -const Buffer = __webpack_require__(45).Buffer +const Buffer = __webpack_require__(46).Buffer const crypto = __webpack_require__(11) const Transform = __webpack_require__(23).Transform @@ -26683,7 +26685,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de const path = __webpack_require__(0); -const home = exports.home = __webpack_require__(46).homedir(); +const home = exports.home = __webpack_require__(42).homedir(); const userHomeDir = (_rootUser || _load_rootUser()).default ? path.resolve('/usr/local/share') : home; @@ -26785,7 +26787,7 @@ exports.f = __webpack_require__(52) ? Object.defineProperty : function definePro -var Schema = __webpack_require__(44); +var Schema = __webpack_require__(45); module.exports = Schema.DEFAULT = new Schema({ @@ -26905,7 +26907,7 @@ var crypto = __webpack_require__(11); var errs = __webpack_require__(74); var utils = __webpack_require__(26); var asn1 = __webpack_require__(66); -var SSHBuffer = __webpack_require__(159); +var SSHBuffer = __webpack_require__(160); var InvalidAlgorithmError = errs.InvalidAlgorithmError; var SignatureParseError = errs.SignatureParseError; @@ -29627,7 +29629,7 @@ exports.hostedGitFragmentToGitUrl = hostedGitFragmentToGitUrl; var _baseResolver; function _load_baseResolver() { - return _baseResolver = _interopRequireDefault(__webpack_require__(123)); + return _baseResolver = _interopRequireDefault(__webpack_require__(124)); } var _npmResolver; @@ -29645,7 +29647,7 @@ function _load_yarnResolver() { var _gitResolver; function _load_gitResolver() { - return _gitResolver = _interopRequireDefault(__webpack_require__(124)); + return _gitResolver = _interopRequireDefault(__webpack_require__(125)); } var _tarballResolver; @@ -29776,7 +29778,7 @@ for (const key in registries) { */ var _ = __webpack_require__(38); -var chalk = __webpack_require__(30); +var chalk = __webpack_require__(27); var runAsync = __webpack_require__(182); var { filter, flatMap, share, take, takeUntil } = __webpack_require__(63); var Choices = __webpack_require__(686); @@ -32275,7 +32277,7 @@ function regExpEscape (s) { /* 83 */ /***/ (function(module, exports, __webpack_require__) { -var wrappy = __webpack_require__(161) +var wrappy = __webpack_require__(162) module.exports = wrappy(once) module.exports.strict = wrappy(onceStrict) @@ -32412,11 +32414,11 @@ var crypto = __webpack_require__(11); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); var utils = __webpack_require__(26); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); -var pkcs1 = __webpack_require__(327); -var pkcs8 = __webpack_require__(157); +var pkcs1 = __webpack_require__(328); +var pkcs8 = __webpack_require__(158); var sshpriv = __webpack_require__(193); var rfc4253 = __webpack_require__(103); @@ -33199,7 +33201,7 @@ Object.defineProperty(exports, "__esModule", { var _baseResolver; function _load_baseResolver() { - return _baseResolver = _interopRequireDefault(__webpack_require__(123)); + return _baseResolver = _interopRequireDefault(__webpack_require__(124)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -33334,8 +33336,8 @@ module.exports = function (it, tag, stat) { /* 96 */ /***/ (function(module, exports, __webpack_require__) { -var shared = __webpack_require__(133)('keys'); -var uid = __webpack_require__(137); +var shared = __webpack_require__(134)('keys'); +var uid = __webpack_require__(138); module.exports = function (key) { return shared[key] || (shared[key] = uid(key)); }; @@ -33412,16 +33414,16 @@ module.exports = function (it) { module.exports = glob var fs = __webpack_require__(4) -var rp = __webpack_require__(140) +var rp = __webpack_require__(141) var minimatch = __webpack_require__(82) var Minimatch = minimatch.Minimatch var inherits = __webpack_require__(61) var EE = __webpack_require__(77).EventEmitter var path = __webpack_require__(0) -var assert = __webpack_require__(28) +var assert = __webpack_require__(29) var isAbsolute = __webpack_require__(101) var globSync = __webpack_require__(269) -var common = __webpack_require__(141) +var common = __webpack_require__(142) var alphasort = common.alphasort var alphasorti = common.alphasorti var setopts = common.setopts @@ -34173,7 +34175,7 @@ Glob.prototype._stat2 = function (f, abs, er, stat, cb) { -var Schema = __webpack_require__(44); +var Schema = __webpack_require__(45); module.exports = new Schema({ @@ -34260,9 +34262,9 @@ var assert = __webpack_require__(16); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); var utils = __webpack_require__(26); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); -var SSHBuffer = __webpack_require__(159); +var SSHBuffer = __webpack_require__(160); function algToKeyType(alg) { assert.string(alg); @@ -34525,7 +34527,7 @@ function _load_invariant() { var _stripBom; function _load_stripBom() { - return _stripBom = _interopRequireDefault(__webpack_require__(160)); + return _stripBom = _interopRequireDefault(__webpack_require__(161)); } var _constants; @@ -34543,7 +34545,7 @@ function _load_errors() { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -35201,7 +35203,7 @@ function _load_isCi() { var _os; function _load_os() { - return _os = _interopRequireDefault(__webpack_require__(46)); + return _os = _interopRequireDefault(__webpack_require__(42)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -35509,7 +35511,7 @@ function _load_index() { var _gitResolver; function _load_gitResolver() { - return _gitResolver = _interopRequireDefault(__webpack_require__(124)); + return _gitResolver = _interopRequireDefault(__webpack_require__(125)); } var _exoticResolver; @@ -35782,7 +35784,7 @@ Object.defineProperty(exports, "__esModule", { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -36364,7 +36366,7 @@ function _load_fixCmdWinSlashes() { var _global; function _load_global() { - return _global = __webpack_require__(121); + return _global = __webpack_require__(122); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -37468,6 +37470,34 @@ module.exports = uuid; /***/ }), /* 121 */ +/***/ (function(module, exports) { + +module.exports = function(module) { + if(!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + // module.parent = undefined by default + if(!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function() { + return module.i; + } + }); + module.webpackPolyfill = 1; + } + return module; +}; + + +/***/ }), +/* 122 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -37983,7 +38013,7 @@ function setFlags(commander) { } /***/ }), -/* 122 */ +/* 123 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -38020,7 +38050,7 @@ function _load_semver() { var _validate; function _load_validate() { - return _validate = __webpack_require__(125); + return _validate = __webpack_require__(126); } var _lockfile; @@ -38564,7 +38594,7 @@ class PackageRequest { exports.default = PackageRequest; /***/ }), -/* 123 */ +/* 124 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -38597,7 +38627,7 @@ class BaseResolver { exports.default = BaseResolver; /***/ }), -/* 124 */ +/* 125 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -38817,7 +38847,7 @@ class GitResolver extends (_exoticResolver || _load_exoticResolver()).default { exports.default = GitResolver; /***/ }), -/* 125 */ +/* 126 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -39068,7 +39098,7 @@ function cleanDependencies(info, isRoot, reporter, warn) { } /***/ }), -/* 126 */ +/* 127 */ /***/ (function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() @@ -39097,7 +39127,7 @@ module.exports = function (it) { /***/ }), -/* 127 */ +/* 128 */ /***/ (function(module, exports) { // IE 8- don't enum bug keys @@ -39107,7 +39137,7 @@ module.exports = ( /***/ }), -/* 128 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { var document = __webpack_require__(17).document; @@ -39115,7 +39145,7 @@ module.exports = document && document.documentElement; /***/ }), -/* 129 */ +/* 130 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -39123,7 +39153,7 @@ module.exports = document && document.documentElement; var LIBRARY = __webpack_require__(93); var $export = __webpack_require__(60); var redefine = __webpack_require__(248); -var hide = __webpack_require__(42); +var hide = __webpack_require__(43); var Iterators = __webpack_require__(54); var $iterCreate = __webpack_require__(239); var setToStringTag = __webpack_require__(95); @@ -39191,7 +39221,7 @@ module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE /***/ }), -/* 130 */ +/* 131 */ /***/ (function(module, exports) { module.exports = function (exec) { @@ -39204,7 +39234,7 @@ module.exports = function (exec) { /***/ }), -/* 131 */ +/* 132 */ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(35); @@ -39222,7 +39252,7 @@ module.exports = function (C, x) { /***/ }), -/* 132 */ +/* 133 */ /***/ (function(module, exports) { module.exports = function (bitmap, value) { @@ -39236,7 +39266,7 @@ module.exports = function (bitmap, value) { /***/ }), -/* 133 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { var core = __webpack_require__(31); @@ -39254,7 +39284,7 @@ var store = global[SHARED] || (global[SHARED] = {}); /***/ }), -/* 134 */ +/* 135 */ /***/ (function(module, exports, __webpack_require__) { // 7.3.20 SpeciesConstructor(O, defaultConstructor) @@ -39269,12 +39299,12 @@ module.exports = function (O, D) { /***/ }), -/* 135 */ +/* 136 */ /***/ (function(module, exports, __webpack_require__) { var ctx = __webpack_require__(70); var invoke = __webpack_require__(236); -var html = __webpack_require__(128); +var html = __webpack_require__(129); var cel = __webpack_require__(92); var global = __webpack_require__(17); var process = global.process; @@ -39359,7 +39389,7 @@ module.exports = { /***/ }), -/* 136 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.15 ToLength @@ -39371,7 +39401,7 @@ module.exports = function (it) { /***/ }), -/* 137 */ +/* 138 */ /***/ (function(module, exports) { var id = 0; @@ -39382,7 +39412,7 @@ module.exports = function (key) { /***/ }), -/* 138 */ +/* 139 */ /***/ (function(module, exports, __webpack_require__) { @@ -39613,7 +39643,7 @@ function coerce(val) { /***/ }), -/* 139 */ +/* 140 */ /***/ (function(module, exports, __webpack_require__) { // Basic Javascript Elliptic Curve implementation @@ -40180,7 +40210,7 @@ module.exports = exports /***/ }), -/* 140 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { module.exports = realpath @@ -40252,7 +40282,7 @@ function unmonkeypatch () { /***/ }), -/* 141 */ +/* 142 */ /***/ (function(module, exports, __webpack_require__) { exports.alphasort = alphasort @@ -40498,7 +40528,7 @@ function childrenIgnored (self, path) { /***/ }), -/* 142 */ +/* 143 */ /***/ (function(module, exports) { @@ -40510,7 +40540,7 @@ module.exports = function(det, rec, confidence, name, lang) { /***/ }), -/* 143 */ +/* 144 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -40524,18 +40554,18 @@ module.exports = function(det, rec, confidence, name, lang) { -var Schema = __webpack_require__(44); +var Schema = __webpack_require__(45); module.exports = new Schema({ include: [ - __webpack_require__(144) + __webpack_require__(145) ] }); /***/ }), -/* 144 */ +/* 145 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -40550,7 +40580,7 @@ module.exports = new Schema({ -var Schema = __webpack_require__(44); +var Schema = __webpack_require__(45); module.exports = new Schema({ @@ -40567,7 +40597,7 @@ module.exports = new Schema({ /***/ }), -/* 145 */ +/* 146 */ /***/ (function(module, exports, __webpack_require__) { var path = __webpack_require__(0); @@ -40671,7 +40701,7 @@ mkdirP.sync = function sync (p, opts, made) { /***/ }), -/* 146 */ +/* 147 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -40720,7 +40750,7 @@ var DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 147 */ +/* 148 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -40773,7 +40803,7 @@ var FilterSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 148 */ +/* 149 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -40889,7 +40919,7 @@ var MergeMapSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 149 */ +/* 150 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -40993,7 +41023,7 @@ var AsyncAction = /*@__PURE__*/ (function (_super) { /***/ }), -/* 150 */ +/* 151 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -41061,7 +41091,7 @@ var AsyncScheduler = /*@__PURE__*/ (function (_super) { /***/ }), -/* 151 */ +/* 152 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -41081,7 +41111,7 @@ var $$iterator = iterator; /***/ }), -/* 152 */ +/* 153 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -41099,7 +41129,7 @@ var ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl; /***/ }), -/* 153 */ +/* 154 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -41117,7 +41147,7 @@ var EmptyError = EmptyErrorImpl; /***/ }), -/* 154 */ +/* 155 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -41130,7 +41160,7 @@ function isFunction(x) { /***/ }), -/* 155 */ +/* 156 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2016 Joyent, Inc. @@ -41141,14 +41171,14 @@ var assert = __webpack_require__(16); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); var crypto = __webpack_require__(11); -var Fingerprint = __webpack_require__(156); +var Fingerprint = __webpack_require__(157); var Signature = __webpack_require__(75); var errs = __webpack_require__(74); var util = __webpack_require__(3); var utils = __webpack_require__(26); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); -var Identity = __webpack_require__(158); +var Identity = __webpack_require__(159); var formats = {}; formats['openssh'] = __webpack_require__(940); @@ -41514,7 +41544,7 @@ Certificate._oldVersionDetect = function (obj) { /***/ }), -/* 156 */ +/* 157 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2015 Joyent, Inc. @@ -41526,8 +41556,8 @@ var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); var crypto = __webpack_require__(11); var errs = __webpack_require__(74); -var Key = __webpack_require__(27); -var Certificate = __webpack_require__(155); +var Key = __webpack_require__(28); +var Certificate = __webpack_require__(156); var utils = __webpack_require__(26); var FingerprintFormatError = errs.FingerprintFormatError; @@ -41682,7 +41712,7 @@ Fingerprint._oldVersionDetect = function (obj) { /***/ }), -/* 157 */ +/* 158 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2015 Joyent, Inc. @@ -41702,7 +41732,7 @@ var asn1 = __webpack_require__(66); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); var utils = __webpack_require__(26); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); var pem = __webpack_require__(86); @@ -42300,7 +42330,7 @@ function writePkcs8EdDSAPrivate(key, der) { /***/ }), -/* 158 */ +/* 159 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2017 Joyent, Inc. @@ -42310,7 +42340,7 @@ module.exports = Identity; var assert = __webpack_require__(16); var algs = __webpack_require__(32); var crypto = __webpack_require__(11); -var Fingerprint = __webpack_require__(156); +var Fingerprint = __webpack_require__(157); var Signature = __webpack_require__(75); var errs = __webpack_require__(74); var util = __webpack_require__(3); @@ -42595,7 +42625,7 @@ Identity._oldVersionDetect = function (obj) { /***/ }), -/* 159 */ +/* 160 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2015 Joyent, Inc. @@ -42750,7 +42780,7 @@ SSHBuffer.prototype.write = function (buf) { /***/ }), -/* 160 */ +/* 161 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -42771,7 +42801,7 @@ module.exports = x => { /***/ }), -/* 161 */ +/* 162 */ /***/ (function(module, exports) { // Returns a wrapper function that returns a wrapped callback @@ -42810,7 +42840,7 @@ function wrappy (fn, cb) { /***/ }), -/* 162 */ +/* 163 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -42903,7 +42933,7 @@ function _load_index3() { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -43948,34 +43978,6 @@ function extractWorkspaces(manifest) { return undefined; } -/***/ }), -/* 163 */ -/***/ (function(module, exports) { - -module.exports = function(module) { - if(!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - // module.parent = undefined by default - if(!module.children) module.children = []; - Object.defineProperty(module, "loaded", { - enumerable: true, - get: function() { - return module.l; - } - }); - Object.defineProperty(module, "id", { - enumerable: true, - get: function() { - return module.i; - } - }); - module.webpackPolyfill = 1; - } - return module; -}; - - /***/ }), /* 164 */ /***/ (function(module, exports) { @@ -45165,7 +45167,7 @@ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = __webpack_require__(246); -var enumBugKeys = __webpack_require__(127); +var enumBugKeys = __webpack_require__(128); module.exports = Object.keys || function keys(O) { return $keys(O, enumBugKeys); @@ -45283,7 +45285,7 @@ module.exports = eos; // Copyright 2012 Joyent, Inc. All rights reserved. var assert = __webpack_require__(16); -var sshpk = __webpack_require__(328); +var sshpk = __webpack_require__(329); var util = __webpack_require__(3); var HASH_ALGOS = { @@ -45400,7 +45402,7 @@ module.exports = { "use strict"; -var chalk = __webpack_require__(30); +var chalk = __webpack_require__(27); var figures = __webpack_require__(267); /** @@ -45446,7 +45448,7 @@ module.exports = Separator; var _ = __webpack_require__(38); -var chalk = __webpack_require__(30); +var chalk = __webpack_require__(27); /** * The paginator keeps track of a pointer index in a list and returns @@ -45793,7 +45795,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return __WEBPACK_IMPORTED_MODULE_4__internal_Subject__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__internal_BehaviorSubject__ = __webpack_require__(419); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return __WEBPACK_IMPORTED_MODULE_5__internal_BehaviorSubject__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_ReplaySubject__ = __webpack_require__(308); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_ReplaySubject__ = __webpack_require__(309); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return __WEBPACK_IMPORTED_MODULE_6__internal_ReplaySubject__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__internal_AsyncSubject__ = __webpack_require__(184); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return __WEBPACK_IMPORTED_MODULE_7__internal_AsyncSubject__["a"]; }); @@ -45816,7 +45818,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return __WEBPACK_IMPORTED_MODULE_15__internal_Subscriber__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__internal_Notification__ = __webpack_require__(185); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return __WEBPACK_IMPORTED_MODULE_16__internal_Notification__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__internal_util_pipe__ = __webpack_require__(324); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__internal_util_pipe__ = __webpack_require__(325); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return __WEBPACK_IMPORTED_MODULE_17__internal_util_pipe__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__internal_util_noop__ = __webpack_require__(192); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return __WEBPACK_IMPORTED_MODULE_18__internal_util_noop__["a"]; }); @@ -45824,9 +45826,9 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return __WEBPACK_IMPORTED_MODULE_19__internal_util_identity__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__internal_util_isObservable__ = __webpack_require__(930); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return __WEBPACK_IMPORTED_MODULE_20__internal_util_isObservable__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__internal_util_ArgumentOutOfRangeError__ = __webpack_require__(152); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__internal_util_ArgumentOutOfRangeError__ = __webpack_require__(153); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return __WEBPACK_IMPORTED_MODULE_21__internal_util_ArgumentOutOfRangeError__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__internal_util_EmptyError__ = __webpack_require__(153); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__internal_util_EmptyError__ = __webpack_require__(154); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return __WEBPACK_IMPORTED_MODULE_22__internal_util_EmptyError__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__internal_util_ObjectUnsubscribedError__ = __webpack_require__(190); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return __WEBPACK_IMPORTED_MODULE_23__internal_util_ObjectUnsubscribedError__["a"]; }); @@ -45838,11 +45840,11 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return __WEBPACK_IMPORTED_MODULE_26__internal_observable_bindCallback__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__internal_observable_bindNodeCallback__ = __webpack_require__(824); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return __WEBPACK_IMPORTED_MODULE_27__internal_observable_bindNodeCallback__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__internal_observable_combineLatest__ = __webpack_require__(309); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__internal_observable_combineLatest__ = __webpack_require__(310); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return __WEBPACK_IMPORTED_MODULE_28__internal_observable_combineLatest__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__internal_observable_concat__ = __webpack_require__(187); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return __WEBPACK_IMPORTED_MODULE_29__internal_observable_concat__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__internal_observable_defer__ = __webpack_require__(310); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__internal_observable_defer__ = __webpack_require__(311); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return __WEBPACK_IMPORTED_MODULE_30__internal_observable_defer__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__internal_observable_empty__ = __webpack_require__(39); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return __WEBPACK_IMPORTED_MODULE_31__internal_observable_empty__["a"]; }); @@ -45864,7 +45866,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return __WEBPACK_IMPORTED_MODULE_39__internal_observable_merge__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_40__internal_observable_never__ = __webpack_require__(425); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "never", function() { return __WEBPACK_IMPORTED_MODULE_40__internal_observable_never__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_41__internal_observable_of__ = __webpack_require__(311); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_41__internal_observable_of__ = __webpack_require__(312); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "of", function() { return __WEBPACK_IMPORTED_MODULE_41__internal_observable_of__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_42__internal_observable_onErrorResumeNext__ = __webpack_require__(834); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return __WEBPACK_IMPORTED_MODULE_42__internal_observable_onErrorResumeNext__["a"]; }); @@ -45874,13 +45876,13 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return __WEBPACK_IMPORTED_MODULE_44__internal_observable_race__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_45__internal_observable_range__ = __webpack_require__(836); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "range", function() { return __WEBPACK_IMPORTED_MODULE_45__internal_observable_range__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_46__internal_observable_throwError__ = __webpack_require__(313); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_46__internal_observable_throwError__ = __webpack_require__(314); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return __WEBPACK_IMPORTED_MODULE_46__internal_observable_throwError__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_47__internal_observable_timer__ = __webpack_require__(427); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return __WEBPACK_IMPORTED_MODULE_47__internal_observable_timer__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_48__internal_observable_using__ = __webpack_require__(837); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "using", function() { return __WEBPACK_IMPORTED_MODULE_48__internal_observable_using__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_49__internal_observable_zip__ = __webpack_require__(314); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_49__internal_observable_zip__ = __webpack_require__(315); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return __WEBPACK_IMPORTED_MODULE_49__internal_observable_zip__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return __WEBPACK_IMPORTED_MODULE_31__internal_observable_empty__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return __WEBPACK_IMPORTED_MODULE_40__internal_observable_never__["b"]; }); @@ -46008,8 +46010,8 @@ var AsyncSubject = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Notification; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_empty__ = __webpack_require__(39); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__observable_of__ = __webpack_require__(311); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_throwError__ = __webpack_require__(313); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__observable_of__ = __webpack_require__(312); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_throwError__ = __webpack_require__(314); /** PURE_IMPORTS_START _observable_empty,_observable_of,_observable_throwError PURE_IMPORTS_END */ @@ -46116,7 +46118,7 @@ var config = { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = concat; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isScheduler__ = __webpack_require__(49); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__of__ = __webpack_require__(311); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__of__ = __webpack_require__(312); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__from__ = __webpack_require__(62); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__operators_concatAll__ = __webpack_require__(429); /** PURE_IMPORTS_START _util_isScheduler,_of,_from,_operators_concatAll PURE_IMPORTS_END */ @@ -46143,10 +46145,10 @@ function concat() { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = reduce; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__scan__ = __webpack_require__(317); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__takeLast__ = __webpack_require__(320); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__defaultIfEmpty__ = __webpack_require__(146); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_pipe__ = __webpack_require__(324); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__scan__ = __webpack_require__(318); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__takeLast__ = __webpack_require__(321); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__defaultIfEmpty__ = __webpack_require__(147); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_pipe__ = __webpack_require__(325); /** PURE_IMPORTS_START _scan,_takeLast,_defaultIfEmpty,_util_pipe PURE_IMPORTS_END */ @@ -46172,7 +46174,7 @@ function reduce(accumulator, seed) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return throwIfEmpty; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__tap__ = __webpack_require__(435); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_EmptyError__ = __webpack_require__(153); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_EmptyError__ = __webpack_require__(154); /** PURE_IMPORTS_START _tap,_util_EmptyError PURE_IMPORTS_END */ @@ -46259,11 +46261,11 @@ var algs = __webpack_require__(32); var utils = __webpack_require__(26); var crypto = __webpack_require__(11); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); var pem = __webpack_require__(86); var rfc4253 = __webpack_require__(103); -var SSHBuffer = __webpack_require__(159); +var SSHBuffer = __webpack_require__(160); var errors = __webpack_require__(74); var bcrypt; @@ -46515,10 +46517,10 @@ function write(key, options) { var chownr = __webpack_require__(568) var tar = __webpack_require__(460) var pump = __webpack_require__(781) -var mkdirp = __webpack_require__(145) +var mkdirp = __webpack_require__(146) var fs = __webpack_require__(4) var path = __webpack_require__(0) -var os = __webpack_require__(46) +var os = __webpack_require__(42) var win32 = os.platform() === 'win32' @@ -46863,7 +46865,7 @@ function mkdirfix (name, opts, cb) { /* 195 */ /***/ (function(module, exports) { -module.exports = {"name":"yarn","installationMethod":"unknown","version":"1.22.19","packageManager":"yarn@1.22.17","license":"BSD-2-Clause","preferGlobal":true,"description":"📦🐈 Fast, reliable, and secure dependency management.","dependencies":{"@zkochan/cmd-shim":"^3.1.0","babel-runtime":"^6.26.0","bytes":"^3.0.0","camelcase":"^4.0.0","chalk":"^2.1.0","cli-table3":"^0.4.0","commander":"^2.9.0","death":"^1.0.0","debug":"^3.0.0","deep-equal":"^1.0.1","detect-indent":"^5.0.0","dnscache":"^1.0.1","glob":"^7.1.1","gunzip-maybe":"^1.4.0","hash-for-dep":"^1.2.3","imports-loader":"^0.8.0","ini":"^1.3.4","inquirer":"^6.2.0","invariant":"^2.2.0","is-builtin-module":"^2.0.0","is-ci":"^1.0.10","is-webpack-bundle":"^1.0.0","js-yaml":"^3.13.1","leven":"^2.0.0","loud-rejection":"^1.2.0","micromatch":"^2.3.11","mkdirp":"^0.5.1","node-emoji":"^1.6.1","normalize-url":"^2.0.0","npm-logical-tree":"^1.2.1","object-path":"^0.11.2","proper-lockfile":"^2.0.0","puka":"^1.0.0","read":"^1.0.7","request":"^2.87.0","request-capture-har":"^1.2.2","rimraf":"^2.5.0","semver":"^5.1.0","ssri":"^5.3.0","strip-ansi":"^4.0.0","strip-bom":"^3.0.0","tar-fs":"^1.16.0","tar-stream":"^1.6.1","uuid":"^3.0.1","v8-compile-cache":"^2.0.0","validate-npm-package-license":"^3.0.4","yn":"^2.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"^7.2.3","babel-loader":"^6.2.5","babel-plugin-array-includes":"^2.0.3","babel-plugin-inline-import":"^3.0.0","babel-plugin-transform-builtin-extend":"^1.1.2","babel-plugin-transform-inline-imports-commonjs":"^1.0.0","babel-plugin-transform-runtime":"^6.4.3","babel-preset-env":"^1.6.0","babel-preset-flow":"^6.23.0","babel-preset-stage-0":"^6.0.0","babylon":"^6.5.0","commitizen":"^2.9.6","cz-conventional-changelog":"^2.0.0","eslint":"^4.3.0","eslint-config-fb-strict":"^22.0.0","eslint-plugin-babel":"^5.0.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-jasmine":"^2.6.2","eslint-plugin-jest":"^21.0.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-prefer-object-spread":"^1.2.1","eslint-plugin-prettier":"^2.1.2","eslint-plugin-react":"^7.1.0","eslint-plugin-relay":"^0.0.28","eslint-plugin-yarn-internal":"file:scripts/eslint-rules","execa":"^0.11.0","fancy-log":"^1.3.2","flow-bin":"^0.66.0","git-release-notes":"^3.0.0","gulp":"^4.0.0","gulp-babel":"^7.0.0","gulp-if":"^2.0.1","gulp-newer":"^1.0.0","gulp-plumber":"^1.0.1","gulp-sourcemaps":"^2.2.0","jest":"^22.4.4","jsinspect":"^0.12.6","minimatch":"^3.0.4","mock-stdin":"^0.3.0","prettier":"^1.5.2","string-replace-loader":"^2.1.1","temp":"^0.8.3","webpack":"^2.1.0-beta.25","yargs":"^6.3.0"},"resolutions":{"sshpk":"^1.14.2"},"engines":{"node":">=4.0.0"},"repository":"yarnpkg/yarn","bin":{"yarn":"./bin/yarn.js","yarnpkg":"./bin/yarn.js"},"scripts":{"build":"gulp build","build-bundle":"node ./scripts/build-webpack.js","build-chocolatey":"powershell ./scripts/build-chocolatey.ps1","build-deb":"./scripts/build-deb.sh","build-dist":"bash ./scripts/build-dist.sh","build-win-installer":"scripts\\build-windows-installer.bat","changelog":"git-release-notes $(git describe --tags --abbrev=0 $(git describe --tags --abbrev=0)^)..$(git describe --tags --abbrev=0) scripts/changelog.md","dupe-check":"yarn jsinspect ./src","lint":"eslint . && flow check","pkg-tests":"yarn --cwd packages/pkg-tests jest yarn.test.js","prettier":"eslint src __tests__ --fix","release-branch":"./scripts/release-branch.sh","test":"yarn lint && yarn test-only","test-only":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --verbose","test-only-debug":"node --inspect-brk --max_old_space_size=4096 node_modules/jest/bin/jest.js --runInBand --verbose","test-coverage":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --coverage --verbose","watch":"gulp watch","commit":"git-cz"},"jest":{"collectCoverageFrom":["src/**/*.js"],"testEnvironment":"node","modulePathIgnorePatterns":["__tests__/fixtures/","packages/pkg-tests/pkg-tests-fixtures","dist/"],"testPathIgnorePatterns":["__tests__/(fixtures|__mocks__)/","updates/","_(temp|mock|install|init|helpers).js$","packages/pkg-tests"]},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}}} +module.exports = {"name":"yarn","installationMethod":"unknown","version":"1.22.22","packageManager":"yarn@1.22.17","license":"BSD-2-Clause","preferGlobal":true,"description":"📦🐈 Fast, reliable, and secure dependency management.","dependencies":{"@zkochan/cmd-shim":"^3.1.0","babel-runtime":"^6.26.0","bytes":"^3.0.0","camelcase":"^4.0.0","chalk":"^2.1.0","cli-table3":"^0.4.0","commander":"^2.9.0","death":"^1.0.0","debug":"^3.0.0","deep-equal":"^1.0.1","detect-indent":"^5.0.0","dnscache":"^1.0.1","glob":"^7.1.1","gunzip-maybe":"^1.4.0","hash-for-dep":"^1.2.3","imports-loader":"^0.8.0","ini":"^1.3.4","inquirer":"^6.2.0","invariant":"^2.2.0","is-builtin-module":"^2.0.0","is-ci":"^1.0.10","is-webpack-bundle":"^1.0.0","js-yaml":"^3.13.1","leven":"^2.0.0","loud-rejection":"^1.2.0","micromatch":"^2.3.11","mkdirp":"^0.5.1","node-emoji":"^1.6.1","normalize-url":"^2.0.0","npm-logical-tree":"^1.2.1","object-path":"^0.11.2","proper-lockfile":"^2.0.0","puka":"^1.0.0","punycode":"1.4.1","read":"^1.0.7","request":"^2.87.0","request-capture-har":"^1.2.2","rimraf":"^2.5.0","semver":"^5.1.0","ssri":"^5.3.0","strip-ansi":"^4.0.0","strip-bom":"^3.0.0","tar-fs":"^1.16.0","tar-stream":"^1.6.1","uuid":"^3.0.1","v8-compile-cache":"^2.0.0","validate-npm-package-license":"^3.0.4","yn":"^2.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"^7.2.3","babel-loader":"^6.2.5","babel-plugin-array-includes":"^2.0.3","babel-plugin-inline-import":"^3.0.0","babel-plugin-transform-builtin-extend":"^1.1.2","babel-plugin-transform-inline-imports-commonjs":"^1.0.0","babel-plugin-transform-runtime":"^6.4.3","babel-preset-env":"^1.6.0","babel-preset-flow":"^6.23.0","babel-preset-stage-0":"^6.0.0","babylon":"^6.5.0","commitizen":"^2.9.6","cz-conventional-changelog":"^2.0.0","eslint":"^4.3.0","eslint-config-fb-strict":"^22.0.0","eslint-plugin-babel":"^5.0.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-jasmine":"^2.6.2","eslint-plugin-jest":"^21.0.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-prefer-object-spread":"^1.2.1","eslint-plugin-prettier":"^2.1.2","eslint-plugin-react":"^7.1.0","eslint-plugin-relay":"^0.0.28","eslint-plugin-yarn-internal":"file:scripts/eslint-rules","execa":"^0.11.0","fancy-log":"^1.3.2","flow-bin":"^0.66.0","git-release-notes":"^3.0.0","gulp":"^4.0.0","gulp-babel":"^7.0.0","gulp-if":"^2.0.1","gulp-newer":"^1.0.0","gulp-plumber":"^1.0.1","gulp-sourcemaps":"^2.2.0","jest":"^22.4.4","jsinspect":"^0.12.6","minimatch":"^3.0.4","mock-stdin":"^0.3.0","prettier":"^1.5.2","string-replace-loader":"^2.1.1","temp":"^0.8.3","webpack":"^2.1.0-beta.25","yargs":"^6.3.0"},"resolutions":{"sshpk":"^1.14.2"},"engines":{"node":">=4.0.0"},"repository":"yarnpkg/yarn","bin":{"yarn":"./bin/yarn.js","yarnpkg":"./bin/yarn.js"},"scripts":{"build":"gulp build","build-bundle":"node ./scripts/build-webpack.js","build-chocolatey":"powershell ./scripts/build-chocolatey.ps1","build-deb":"./scripts/build-deb.sh","build-dist":"bash ./scripts/build-dist.sh","build-win-installer":"scripts\\build-windows-installer.bat","changelog":"git-release-notes $(git describe --tags --abbrev=0 $(git describe --tags --abbrev=0)^)..$(git describe --tags --abbrev=0) scripts/changelog.md","dupe-check":"yarn jsinspect ./src","lint":"eslint . && flow check","pkg-tests":"yarn --cwd packages/pkg-tests jest yarn.test.js","prettier":"eslint src __tests__ --fix","release-branch":"./scripts/release-branch.sh","test":"yarn lint && yarn test-only","test-only":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --verbose","test-only-debug":"node --inspect-brk --max_old_space_size=4096 node_modules/jest/bin/jest.js --runInBand --verbose","test-coverage":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --coverage --verbose","watch":"gulp watch","commit":"git-cz"},"jest":{"collectCoverageFrom":["src/**/*.js"],"testEnvironment":"node","modulePathIgnorePatterns":["__tests__/fixtures/","packages/pkg-tests/pkg-tests-fixtures","dist/"],"testPathIgnorePatterns":["__tests__/(fixtures|__mocks__)/","updates/","_(temp|mock|install|init|helpers).js$","packages/pkg-tests"]},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}}} /***/ }), /* 196 */ @@ -47569,7 +47571,7 @@ function _load_lockfile() { var _packageRequest; function _load_packageRequest() { - return _packageRequest = _interopRequireDefault(__webpack_require__(122)); + return _packageRequest = _interopRequireDefault(__webpack_require__(123)); } var _normalizePattern; @@ -48374,7 +48376,7 @@ function _load_errors() { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } var _misc; @@ -50008,7 +50010,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de const readline = __webpack_require__(198); -var _require = __webpack_require__(30); +var _require = __webpack_require__(27); const supportsColor = _require.supportsColor; @@ -50295,7 +50297,7 @@ function _load_minimatch() { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } var _normalizePattern2; @@ -50575,7 +50577,7 @@ function _load_errors() { var _gitResolver; function _load_gitResolver() { - return _gitResolver = _interopRequireDefault(__webpack_require__(124)); + return _gitResolver = _interopRequireDefault(__webpack_require__(125)); } var _exoticResolver; @@ -50674,7 +50676,7 @@ function _load_npmRegistry() { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } var _fs; @@ -51029,7 +51031,7 @@ const futimes = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()) const write = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.write); -const unlink = exports.unlink = (0, (_promise || _load_promise()).promisify)(__webpack_require__(307)); +const unlink = exports.unlink = (0, (_promise || _load_promise()).promisify)(__webpack_require__(308)); /** * Unlinks the destination to force a recreation. This is needed on case-insensitive file systems @@ -51209,7 +51211,7 @@ function _load_fs2() { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } var _misc; @@ -51787,7 +51789,7 @@ function _load_resolveRelative() { var _validate; function _load_validate() { - return _validate = _interopRequireDefault(__webpack_require__(125)); + return _validate = _interopRequireDefault(__webpack_require__(126)); } var _fix; @@ -52595,7 +52597,7 @@ module.exports = function (it, Constructor, name, forbiddenField) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__(98); -var toLength = __webpack_require__(136); +var toLength = __webpack_require__(137); var toAbsoluteIndex = __webpack_require__(251); module.exports = function (IS_INCLUDES) { return function ($this, el, fromIndex) { @@ -52625,7 +52627,7 @@ var ctx = __webpack_require__(70); var call = __webpack_require__(238); var isArrayIter = __webpack_require__(237); var anObject = __webpack_require__(35); -var toLength = __webpack_require__(136); +var toLength = __webpack_require__(137); var getIterFn = __webpack_require__(254); var BREAK = {}; var RETURN = {}; @@ -52718,12 +52720,12 @@ module.exports = function (iterator, fn, value, entries) { "use strict"; var create = __webpack_require__(243); -var descriptor = __webpack_require__(132); +var descriptor = __webpack_require__(133); var setToStringTag = __webpack_require__(95); var IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() -__webpack_require__(42)(IteratorPrototype, __webpack_require__(21)('iterator'), function () { return this; }); +__webpack_require__(43)(IteratorPrototype, __webpack_require__(21)('iterator'), function () { return this; }); module.exports = function (Constructor, NAME, next) { Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); @@ -52773,7 +52775,7 @@ module.exports = function (done, value) { /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(17); -var macrotask = __webpack_require__(135).set; +var macrotask = __webpack_require__(136).set; var Observer = global.MutationObserver || global.WebKitMutationObserver; var process = global.process; var Promise = global.Promise; @@ -52850,7 +52852,7 @@ module.exports = function () { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__(35); var dPs = __webpack_require__(244); -var enumBugKeys = __webpack_require__(127); +var enumBugKeys = __webpack_require__(128); var IE_PROTO = __webpack_require__(96)('IE_PROTO'); var Empty = function () { /* empty */ }; var PROTOTYPE = 'prototype'; @@ -52864,7 +52866,7 @@ var createDict = function () { var gt = '>'; var iframeDocument; iframe.style.display = 'none'; - __webpack_require__(128).appendChild(iframe); + __webpack_require__(129).appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); @@ -52955,7 +52957,7 @@ module.exports = function (object, names) { /* 247 */ /***/ (function(module, exports, __webpack_require__) { -var hide = __webpack_require__(42); +var hide = __webpack_require__(43); module.exports = function (target, src, safe) { for (var key in src) { if (safe && target[key]) target[key] = src[key]; @@ -52968,7 +52970,7 @@ module.exports = function (target, src, safe) { /* 248 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(42); +module.exports = __webpack_require__(43); /***/ }), @@ -53060,7 +53062,7 @@ module.exports = navigator && navigator.userAgent || ''; /* 254 */ /***/ (function(module, exports, __webpack_require__) { -var classof = __webpack_require__(126); +var classof = __webpack_require__(127); var ITERATOR = __webpack_require__(21)('iterator'); var Iterators = __webpack_require__(54); module.exports = __webpack_require__(31).getIteratorMethod = function (it) { @@ -53085,7 +53087,7 @@ var toIObject = __webpack_require__(98); // 22.1.3.13 Array.prototype.keys() // 22.1.3.29 Array.prototype.values() // 22.1.3.30 Array.prototype[@@iterator]() -module.exports = __webpack_require__(129)(Array, 'Array', function (iterated, kind) { +module.exports = __webpack_require__(130)(Array, 'Array', function (iterated, kind) { this._t = toIObject(iterated); // target this._i = 0; // next index this._k = kind; // kind @@ -53126,19 +53128,19 @@ addToUnscopables('entries'); var LIBRARY = __webpack_require__(93); var global = __webpack_require__(17); var ctx = __webpack_require__(70); -var classof = __webpack_require__(126); +var classof = __webpack_require__(127); var $export = __webpack_require__(60); var isObject = __webpack_require__(53); var aFunction = __webpack_require__(68); var anInstance = __webpack_require__(232); var forOf = __webpack_require__(234); -var speciesConstructor = __webpack_require__(134); -var task = __webpack_require__(135).set; +var speciesConstructor = __webpack_require__(135); +var task = __webpack_require__(136).set; var microtask = __webpack_require__(242)(); var newPromiseCapabilityModule = __webpack_require__(94); -var perform = __webpack_require__(130); +var perform = __webpack_require__(131); var userAgent = __webpack_require__(253); -var promiseResolve = __webpack_require__(131); +var promiseResolve = __webpack_require__(132); var PROMISE = 'Promise'; var TypeError = global.TypeError; var process = global.process; @@ -53419,7 +53421,7 @@ $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(240)(functio var $at = __webpack_require__(250)(true); // 21.1.3.27 String.prototype[@@iterator]() -__webpack_require__(129)(String, 'String', function (iterated) { +__webpack_require__(130)(String, 'String', function (iterated) { this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() @@ -53444,8 +53446,8 @@ __webpack_require__(129)(String, 'String', function (iterated) { var $export = __webpack_require__(60); var core = __webpack_require__(31); var global = __webpack_require__(17); -var speciesConstructor = __webpack_require__(134); -var promiseResolve = __webpack_require__(131); +var speciesConstructor = __webpack_require__(135); +var promiseResolve = __webpack_require__(132); $export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { var C = speciesConstructor(this, core.Promise || global.Promise); @@ -53470,7 +53472,7 @@ $export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { // https://github.com/tc39/proposal-promise-try var $export = __webpack_require__(60); var newPromiseCapability = __webpack_require__(94); -var perform = __webpack_require__(130); +var perform = __webpack_require__(131); $export($export.S, 'Promise', { 'try': function (callbackfn) { var promiseCapability = newPromiseCapability.f(this); @@ -53486,7 +53488,7 @@ $export($export.S, 'Promise', { 'try': function (callbackfn) { __webpack_require__(255); var global = __webpack_require__(17); -var hide = __webpack_require__(42); +var hide = __webpack_require__(43); var Iterators = __webpack_require__(54); var TO_STRING_TAG = __webpack_require__(21)('toStringTag'); @@ -53515,7 +53517,7 @@ for (var i = 0; i < DOMIterables.length; i++) { * Expose `debug()` as the module. */ -exports = module.exports = __webpack_require__(138); +exports = module.exports = __webpack_require__(139); exports.log = log; exports.formatArgs = formatArgs; exports.save = save; @@ -53739,7 +53741,7 @@ var util = __webpack_require__(3); * Expose `debug()` as the module. */ -exports = module.exports = __webpack_require__(138); +exports = module.exports = __webpack_require__(139); exports.init = init; exports.log = log; exports.formatArgs = formatArgs; @@ -53754,7 +53756,7 @@ exports.useColors = useColors; exports.colors = [ 6, 2, 3, 4, 5, 1 ]; try { - var supportsColor = __webpack_require__(330); + var supportsColor = __webpack_require__(331); if (supportsColor && supportsColor.level >= 2) { exports.colors = [ 20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, @@ -61223,15 +61225,15 @@ module.exports = globSync globSync.GlobSync = GlobSync var fs = __webpack_require__(4) -var rp = __webpack_require__(140) +var rp = __webpack_require__(141) var minimatch = __webpack_require__(82) var Minimatch = minimatch.Minimatch var Glob = __webpack_require__(99).Glob var util = __webpack_require__(3) var path = __webpack_require__(0) -var assert = __webpack_require__(28) +var assert = __webpack_require__(29) var isAbsolute = __webpack_require__(101) -var common = __webpack_require__(141) +var common = __webpack_require__(142) var alphasort = common.alphasort var alphasorti = common.alphasorti var setopts = common.setopts @@ -62109,7 +62111,7 @@ module.exports = function (flag, argv) { /* 274 */ /***/ (function(module, exports, __webpack_require__) { -var wrappy = __webpack_require__(161) +var wrappy = __webpack_require__(162) var reqs = Object.create(null) var once = __webpack_require__(83) @@ -62340,10 +62342,10 @@ function deprecated(name) { module.exports.Type = __webpack_require__(10); -module.exports.Schema = __webpack_require__(44); +module.exports.Schema = __webpack_require__(45); module.exports.FAILSAFE_SCHEMA = __webpack_require__(100); -module.exports.JSON_SCHEMA = __webpack_require__(144); -module.exports.CORE_SCHEMA = __webpack_require__(143); +module.exports.JSON_SCHEMA = __webpack_require__(145); +module.exports.CORE_SCHEMA = __webpack_require__(144); module.exports.DEFAULT_SAFE_SCHEMA = __webpack_require__(56); module.exports.DEFAULT_FULL_SCHEMA = __webpack_require__(73); module.exports.load = loader.load; @@ -62375,7 +62377,7 @@ module.exports.addConstructor = deprecated('addConstructor'); /*eslint-disable no-use-before-define*/ -var common = __webpack_require__(43); +var common = __webpack_require__(44); var YAMLException = __webpack_require__(55); var DEFAULT_FULL_SCHEMA = __webpack_require__(73); var DEFAULT_SAFE_SCHEMA = __webpack_require__(56); @@ -63209,7 +63211,7 @@ module.exports.safeDump = safeDump; /*eslint-disable max-len,no-use-before-define*/ -var common = __webpack_require__(43); +var common = __webpack_require__(44); var YAMLException = __webpack_require__(55); var Mark = __webpack_require__(283); var DEFAULT_SAFE_SCHEMA = __webpack_require__(56); @@ -64840,7 +64842,7 @@ module.exports.safeLoad = safeLoad; -var common = __webpack_require__(43); +var common = __webpack_require__(44); function Mark(name, buffer, position, line, column) { @@ -65109,7 +65111,7 @@ module.exports = new Type('tag:yaml.org,2002:bool', { "use strict"; -var common = __webpack_require__(43); +var common = __webpack_require__(44); var Type = __webpack_require__(10); var YAML_FLOAT_PATTERN = new RegExp( @@ -65232,7 +65234,7 @@ module.exports = new Type('tag:yaml.org,2002:float', { "use strict"; -var common = __webpack_require__(43); +var common = __webpack_require__(44); var Type = __webpack_require__(10); function isHexCode(c) { @@ -66675,12 +66677,551 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /* 305 */ /***/ (function(module, exports, __webpack_require__) { +/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */ +;(function(root) { + + /** Detect free variables */ + var freeExports = typeof exports == 'object' && exports && + !exports.nodeType && exports; + var freeModule = typeof module == 'object' && module && + !module.nodeType && module; + var freeGlobal = typeof global == 'object' && global; + if ( + freeGlobal.global === freeGlobal || + freeGlobal.window === freeGlobal || + freeGlobal.self === freeGlobal + ) { + root = freeGlobal; + } + + /** + * The `punycode` object. + * @name punycode + * @type Object + */ + var punycode, + + /** Highest positive signed 32-bit float value */ + maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 + + /** Bootstring parameters */ + base = 36, + tMin = 1, + tMax = 26, + skew = 38, + damp = 700, + initialBias = 72, + initialN = 128, // 0x80 + delimiter = '-', // '\x2D' + + /** Regular expressions */ + regexPunycode = /^xn--/, + regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars + regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators + + /** Error messages */ + errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' + }, + + /** Convenience shortcuts */ + baseMinusTMin = base - tMin, + floor = Math.floor, + stringFromCharCode = String.fromCharCode, + + /** Temporary variable */ + key; + + /*--------------------------------------------------------------------------*/ + + /** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ + function error(type) { + throw new RangeError(errors[type]); + } + + /** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ + function map(array, fn) { + var length = array.length; + var result = []; + while (length--) { + result[length] = fn(array[length]); + } + return result; + } + + /** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ + function mapDomain(string, fn) { + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + var labels = string.split('.'); + var encoded = map(labels, fn).join('.'); + return result + encoded; + } + + /** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ + function ucs2decode(string) { + var output = [], + counter = 0, + length = string.length, + value, + extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // high surrogate, and there is a next character + extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // low surrogate + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // unmatched surrogate; only append this code unit, in case the next + // code unit is the high surrogate of a surrogate pair + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + + /** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ + function ucs2encode(array) { + return map(array, function(value) { + var output = ''; + if (value > 0xFFFF) { + value -= 0x10000; + output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); + value = 0xDC00 | value & 0x3FF; + } + output += stringFromCharCode(value); + return output; + }).join(''); + } + + /** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ + function basicToDigit(codePoint) { + if (codePoint - 48 < 10) { + return codePoint - 22; + } + if (codePoint - 65 < 26) { + return codePoint - 65; + } + if (codePoint - 97 < 26) { + return codePoint - 97; + } + return base; + } + + /** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ + function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); + } + + /** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ + function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); + } + + /** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ + function decode(input) { + // Don't use UCS-2 + var output = [], + inputLength = input.length, + out, + i = 0, + n = initialN, + bias = initialBias, + basic, + j, + index, + oldi, + w, + k, + digit, + t, + /** Cached calculation results */ + baseMinusT; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + for (oldi = i, w = 1, k = base; /* no condition */; k += base) { + + if (index >= inputLength) { + error('invalid-input'); + } + + digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error('overflow'); + } + + i += digit * w; + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + + if (digit < t) { + break; + } + + baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + + w *= baseMinusT; + + } + + out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output + output.splice(i++, 0, n); + + } + + return ucs2encode(output); + } + + /** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ + function encode(input) { + var n, + delta, + handledCPCount, + basicLength, + bias, + j, + m, + q, + k, + t, + currentValue, + output = [], + /** `inputLength` will hold the number of code points in `input`. */ + inputLength, + /** Cached calculation results */ + handledCPCountPlusOne, + baseMinusT, + qMinusT; + + // Convert the input in UCS-2 to Unicode + input = ucs2decode(input); + + // Cache the length + inputLength = input.length; + + // Initialize the state + n = initialN; + delta = 0; + bias = initialBias; + + // Handle the basic code points + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + handledCPCount = basicLength = output.length; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string - if it is not empty - with a delimiter + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + for (m = maxInt, j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow + handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + + if (currentValue == n) { + // Represent delta as a generalized variable-length integer + for (q = delta, k = base; /* no condition */; k += base) { + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + qMinusT = q - t; + baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); + } + + /** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ + function toUnicode(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); + } + + /** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ + function toASCII(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); + } + + /*--------------------------------------------------------------------------*/ + + /** Define the public API */ + punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '1.4.1', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode + }; + + /** Expose `punycode` */ + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + true + ) { + !(__WEBPACK_AMD_DEFINE_RESULT__ = function() { + return punycode; + }.call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (freeExports && freeModule) { + if (module.exports == freeExports) { + // in Node.js, io.js, or RingoJS v0.8.0+ + freeModule.exports = punycode; + } else { + // in Narwhal or RingoJS v0.7.0- + for (key in punycode) { + punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); + } + } + } else { + // in Rhino or a web browser + root.punycode = punycode; + } + +}(this)); + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(121)(module))) + +/***/ }), +/* 306 */ +/***/ (function(module, exports, __webpack_require__) { + "use strict"; var jsonSafeStringify = __webpack_require__(745) var crypto = __webpack_require__(11) -var Buffer = __webpack_require__(45).Buffer +var Buffer = __webpack_require__(46).Buffer var defer = typeof setImmediate === 'undefined' ? process.nextTick @@ -66745,7 +67286,7 @@ exports.defer = defer /***/ }), -/* 306 */ +/* 307 */ /***/ (function(module, exports, __webpack_require__) { var current = (process.versions && process.versions.node && process.versions.node.split('.')) || []; @@ -66804,13 +67345,13 @@ module.exports = core; /***/ }), -/* 307 */ +/* 308 */ /***/ (function(module, exports, __webpack_require__) { module.exports = rimraf rimraf.sync = rimrafSync -var assert = __webpack_require__(28) +var assert = __webpack_require__(29) var path = __webpack_require__(0) var fs = __webpack_require__(4) var glob = __webpack_require__(99) @@ -67174,7 +67715,7 @@ function rmkidsSync (p, options) { /***/ }), -/* 308 */ +/* 309 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -67306,7 +67847,7 @@ var ReplayEvent = /*@__PURE__*/ (function () { /***/ }), -/* 309 */ +/* 310 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -67423,7 +67964,7 @@ var CombineLatestSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 310 */ +/* 311 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -67453,7 +67994,7 @@ function defer(observableFactory) { /***/ }), -/* 311 */ +/* 312 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -67461,7 +68002,7 @@ function defer(observableFactory) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isScheduler__ = __webpack_require__(49); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__fromArray__ = __webpack_require__(85); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__empty__ = __webpack_require__(39); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__scalar__ = __webpack_require__(312); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__scalar__ = __webpack_require__(313); /** PURE_IMPORTS_START _util_isScheduler,_fromArray,_empty,_scalar PURE_IMPORTS_END */ @@ -67492,7 +68033,7 @@ function of() { /***/ }), -/* 312 */ +/* 313 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -67513,7 +68054,7 @@ function scalar(value) { /***/ }), -/* 313 */ +/* 314 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -67537,7 +68078,7 @@ function dispatch(_a) { /***/ }), -/* 314 */ +/* 315 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -67550,7 +68091,7 @@ function dispatch(_a) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscriber__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__OuterSubscriber__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_subscribeToResult__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_symbol_iterator__ = __webpack_require__(151); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_symbol_iterator__ = __webpack_require__(152); /** PURE_IMPORTS_START tslib,_fromArray,_util_isArray,_Subscriber,_OuterSubscriber,_util_subscribeToResult,_.._internal_symbol_iterator PURE_IMPORTS_END */ @@ -67772,12 +68313,12 @@ var ZipBufferIterator = /*@__PURE__*/ (function (_super) { /***/ }), -/* 315 */ +/* 316 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = mergeAll; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mergeMap__ = __webpack_require__(148); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mergeMap__ = __webpack_require__(149); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_identity__ = __webpack_require__(119); /** PURE_IMPORTS_START _mergeMap,_util_identity PURE_IMPORTS_END */ @@ -67792,7 +68333,7 @@ function mergeAll(concurrent) { /***/ }), -/* 316 */ +/* 317 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -67860,7 +68401,7 @@ var RefCountSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 317 */ +/* 318 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -67941,7 +68482,7 @@ var ScanSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 318 */ +/* 319 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -68031,14 +68572,14 @@ var SwitchMapSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 319 */ +/* 320 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = take; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(7); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_ArgumentOutOfRangeError__ = __webpack_require__(152); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_ArgumentOutOfRangeError__ = __webpack_require__(153); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__observable_empty__ = __webpack_require__(39); /** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */ @@ -68092,14 +68633,14 @@ var TakeSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 320 */ +/* 321 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = takeLast; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(7); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_ArgumentOutOfRangeError__ = __webpack_require__(152); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_ArgumentOutOfRangeError__ = __webpack_require__(153); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__observable_empty__ = __webpack_require__(39); /** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */ @@ -68168,7 +68709,7 @@ var TakeLastSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 321 */ +/* 322 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -68183,7 +68724,7 @@ var $$rxSubscriber = rxSubscriber; /***/ }), -/* 322 */ +/* 323 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -68210,7 +68751,7 @@ function canReportError(observer) { /***/ }), -/* 323 */ +/* 324 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -68223,7 +68764,7 @@ function hostReportError(err) { /***/ }), -/* 324 */ +/* 325 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -68254,7 +68795,7 @@ function pipeFromArray(fns) { /***/ }), -/* 325 */ +/* 326 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2017 Joyent, Inc. @@ -68272,7 +68813,7 @@ var algs = __webpack_require__(32); var utils = __webpack_require__(26); var nacl; -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); var CRYPTO_HAVE_ECDH = (crypto.createECDH !== undefined); @@ -68305,7 +68846,7 @@ function DiffieHellman(key) { if (ecdh === undefined) ecdh = __webpack_require__(381); if (ec === undefined) - ec = __webpack_require__(139); + ec = __webpack_require__(140); if (jsbn === undefined) jsbn = __webpack_require__(81).BigInteger; @@ -68636,7 +69177,7 @@ function generateECDSA(curve) { if (ecdh === undefined) ecdh = __webpack_require__(381); if (ec === undefined) - ec = __webpack_require__(139); + ec = __webpack_require__(140); if (jsbn === undefined) jsbn = __webpack_require__(81).BigInteger; @@ -68674,7 +69215,7 @@ function generateECDSA(curve) { /***/ }), -/* 326 */ +/* 327 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2017 Joyent, Inc. @@ -68686,11 +69227,11 @@ module.exports = { var assert = __webpack_require__(16); var Buffer = __webpack_require__(15).Buffer; -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); var utils = __webpack_require__(26); -var SSHBuffer = __webpack_require__(159); -var Dhe = __webpack_require__(325); +var SSHBuffer = __webpack_require__(160); +var Dhe = __webpack_require__(326); var supportedAlgos = { 'rsa-sha1' : 5, @@ -68967,7 +69508,7 @@ function write(key, options) { /***/ }), -/* 327 */ +/* 328 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2015 Joyent, Inc. @@ -68985,11 +69526,11 @@ var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); var utils = __webpack_require__(26); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); var pem = __webpack_require__(86); -var pkcs8 = __webpack_require__(157); +var pkcs8 = __webpack_require__(158); var readECDSACurve = pkcs8.readECDSACurve; function read(buf, options) { @@ -69346,17 +69887,17 @@ function writePkcs1EdDSAPublic(der, key) { /***/ }), -/* 328 */ +/* 329 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2015 Joyent, Inc. -var Key = __webpack_require__(27); -var Fingerprint = __webpack_require__(156); +var Key = __webpack_require__(28); +var Fingerprint = __webpack_require__(157); var Signature = __webpack_require__(75); var PrivateKey = __webpack_require__(33); -var Certificate = __webpack_require__(155); -var Identity = __webpack_require__(158); +var Certificate = __webpack_require__(156); +var Identity = __webpack_require__(159); var errs = __webpack_require__(74); module.exports = { @@ -69391,7 +69932,7 @@ module.exports = { /***/ }), -/* 329 */ +/* 330 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69402,7 +69943,7 @@ module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), /***/ }), -/* 330 */ +/* 331 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69492,17 +70033,11 @@ if (supportLevel === 0 && 'FORCE_COLOR' in process.env) { module.exports = process && support(supportLevel); -/***/ }), -/* 331 */ -/***/ (function(module, exports) { - -module.exports = require("child_process"); - /***/ }), /* 332 */ /***/ (function(module, exports) { -module.exports = require("punycode"); +module.exports = require("child_process"); /***/ }), /* 333 */ @@ -69596,7 +70131,7 @@ function _load_generateLockEntry() { var _global; function _load_global() { - return _global = _interopRequireWildcard(__webpack_require__(121)); + return _global = _interopRequireWildcard(__webpack_require__(122)); } var _help; @@ -69789,7 +70324,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } -const chalk = __webpack_require__(30); +const chalk = __webpack_require__(27); const getDocsLink = name => `${(_constants || _load_constants()).YARN_DOCS}${name || ''}`; @@ -69943,7 +70478,7 @@ function loadRcFile(fileText, filePath) { let values = _parse.object; - if (filePath.match(/\.yml$/) && typeof values.yarnPath === 'string') { + if (filePath.match(/\.yml$/) && values && typeof values.yarnPath === 'string') { values = { 'yarn-path': values.yarnPath }; } @@ -70066,7 +70601,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.isOffline = isOffline; -const os = __webpack_require__(46); +const os = __webpack_require__(42); const IGNORE_INTERFACES = ['lo0', 'awdl0', 'bridge0']; const LOCAL_IPS = ['127.0.0.1', '::1']; @@ -70126,7 +70661,7 @@ function isOffline() { */ var EventEmitter = __webpack_require__(77).EventEmitter; -var spawn = __webpack_require__(331).spawn; +var spawn = __webpack_require__(332).spawn; var path = __webpack_require__(0); var dirname = path.dirname; var basename = path.basename; @@ -73242,7 +73777,7 @@ function _load_fs() { var _global; function _load_global() { - return _global = __webpack_require__(121); + return _global = __webpack_require__(122); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -74394,7 +74929,7 @@ function _load_normalizePattern() { var _validate; function _load_validate() { - return _validate = __webpack_require__(125); + return _validate = __webpack_require__(126); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -75027,7 +75562,7 @@ function _load_fs() { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -75673,7 +76208,7 @@ function _load_index() { var _packageRequest; function _load_packageRequest() { - return _packageRequest = _interopRequireDefault(__webpack_require__(122)); + return _packageRequest = _interopRequireDefault(__webpack_require__(123)); } var _normalizePattern2; @@ -75703,7 +76238,7 @@ function _load_lockfile() { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } var _workspaceLayout; @@ -77291,7 +77826,7 @@ function _load_network() { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -80293,7 +80828,7 @@ module.exports = Duplexify var crypto = __webpack_require__(11); var BigInteger = __webpack_require__(81).BigInteger; -var ECPointFp = __webpack_require__(139).ECPointFp; +var ECPointFp = __webpack_require__(140).ECPointFp; var Buffer = __webpack_require__(15).Buffer; exports.ECCurves = __webpack_require__(606); @@ -80489,7 +81024,7 @@ else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { process.on('exit', function() { debug(queue) - __webpack_require__(28).equal(queue.length, 0) + __webpack_require__(29).equal(queue.length, 0) }) } @@ -81632,7 +82167,7 @@ module.exports = function generate_validate(it, $keyword, $ruleType) { * `input` type prompt */ -var chalk = __webpack_require__(30); +var chalk = __webpack_require__(27); var { map, takeUntil } = __webpack_require__(63); var Base = __webpack_require__(79); var observe = __webpack_require__(80); @@ -82305,7 +82840,7 @@ MuteStream.prototype.close = proxy('close') "use strict"; const url = __webpack_require__(24); -const punycode = __webpack_require__(332); +const punycode = __webpack_require__(305); const queryString = __webpack_require__(786); const prependHttp = __webpack_require__(777); const sortKeys = __webpack_require__(934); @@ -82790,7 +83325,7 @@ var Stream = __webpack_require__(410); /**/ -var Buffer = __webpack_require__(45).Buffer; +var Buffer = __webpack_require__(46).Buffer; var OurUint8Array = global.Uint8Array || function () {}; function _uint8ArrayToBuffer(chunk) { return Buffer.from(chunk); @@ -84063,7 +84598,7 @@ var Stream = __webpack_require__(410); /**/ -var Buffer = __webpack_require__(45).Buffer; +var Buffer = __webpack_require__(46).Buffer; var OurUint8Array = global.Uint8Array || function () {}; function _uint8ArrayToBuffer(chunk) { return Buffer.from(chunk); @@ -84969,7 +85504,7 @@ exports.permuteDomain = permuteDomain; -var punycode = __webpack_require__(332); +var punycode = __webpack_require__(305); module.exports.getPublicSuffix = function getPublicSuffix(domain) { /*! @@ -85266,7 +85801,7 @@ var BehaviorSubject = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return empty; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__config__ = __webpack_require__(186); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_hostReportError__ = __webpack_require__(323); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_hostReportError__ = __webpack_require__(324); /** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */ @@ -85367,7 +85902,7 @@ var SubjectSubscription = /*@__PURE__*/ (function (_super) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscriber__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Subscription__ = __webpack_require__(25); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__operators_refCount__ = __webpack_require__(316); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__operators_refCount__ = __webpack_require__(317); /** PURE_IMPORTS_START tslib,_Subject,_Observable,_Subscriber,_Subscription,_operators_refCount PURE_IMPORTS_END */ @@ -85521,7 +86056,7 @@ var RefCountSubscriber = /*@__PURE__*/ (function (_super) { /* harmony export (immutable) */ __webpack_exports__["a"] = merge; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isScheduler__ = __webpack_require__(49); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__operators_mergeAll__ = __webpack_require__(315); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__operators_mergeAll__ = __webpack_require__(316); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__fromArray__ = __webpack_require__(85); /** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */ @@ -85806,7 +86341,7 @@ var AuditSubscriber = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = concatAll; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mergeAll__ = __webpack_require__(315); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mergeAll__ = __webpack_require__(316); /** PURE_IMPORTS_START _mergeAll PURE_IMPORTS_END */ function concatAll() { @@ -85821,7 +86356,7 @@ function concatAll() { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = concatMap; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mergeMap__ = __webpack_require__(148); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mergeMap__ = __webpack_require__(149); /** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */ function concatMap(project, resultSelector) { @@ -86260,7 +86795,7 @@ var ObserveOnMessage = /*@__PURE__*/ (function () { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_noop__ = __webpack_require__(192); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_isFunction__ = __webpack_require__(154); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_isFunction__ = __webpack_require__(155); /** PURE_IMPORTS_START tslib,_Subscriber,_util_noop,_util_isFunction PURE_IMPORTS_END */ @@ -86654,7 +87189,7 @@ function isPromise(value) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isArrayLike__ = __webpack_require__(442); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isPromise__ = __webpack_require__(445); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isObject__ = __webpack_require__(444); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__symbol_iterator__ = __webpack_require__(151); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__symbol_iterator__ = __webpack_require__(152); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__symbol_observable__ = __webpack_require__(118); /** PURE_IMPORTS_START _Observable,_subscribeToArray,_subscribeToPromise,_subscribeToIterable,_subscribeToObservable,_isArrayLike,_isPromise,_isObject,_symbol_iterator,_symbol_observable PURE_IMPORTS_END */ @@ -86728,7 +87263,7 @@ var subscribeToArray = function (array) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return subscribeToIterable; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__symbol_iterator__ = __webpack_require__(151); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__symbol_iterator__ = __webpack_require__(152); /** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */ var subscribeToIterable = function (iterable) { @@ -86787,7 +87322,7 @@ var subscribeToObservable = function (obj) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return subscribeToPromise; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hostReportError__ = __webpack_require__(323); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hostReportError__ = __webpack_require__(324); /** PURE_IMPORTS_START _hostReportError PURE_IMPORTS_END */ var subscribeToPromise = function (promise) { @@ -86812,7 +87347,7 @@ var subscribeToPromise = function (promise) { // Note: since nyc uses this module to output coverage, any lines // that are in the direct sync flow of nyc's outputCoverage are // ignored, since we can never get coverage for them. -var assert = __webpack_require__(28) +var assert = __webpack_require__(29) var signals = __webpack_require__(933) var EE = __webpack_require__(77) @@ -87107,13 +87642,13 @@ module.exports = { var assert = __webpack_require__(16); var Buffer = __webpack_require__(15).Buffer; var utils = __webpack_require__(26); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); var pem = __webpack_require__(86); var ssh = __webpack_require__(456); var rfc4253 = __webpack_require__(103); -var dnssec = __webpack_require__(326); +var dnssec = __webpack_require__(327); var DNSSEC_PRIVKEY_HEADER_PREFIX = 'Private-key-format: v1'; @@ -87221,7 +87756,7 @@ var assert = __webpack_require__(16); var Buffer = __webpack_require__(15).Buffer; var rfc4253 = __webpack_require__(103); var utils = __webpack_require__(26); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); var sshpriv = __webpack_require__(193); @@ -87346,13 +87881,13 @@ var asn1 = __webpack_require__(66); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); var utils = __webpack_require__(26); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); var pem = __webpack_require__(86); -var Identity = __webpack_require__(158); +var Identity = __webpack_require__(159); var Signature = __webpack_require__(75); -var Certificate = __webpack_require__(155); -var pkcs8 = __webpack_require__(157); +var Certificate = __webpack_require__(156); +var pkcs8 = __webpack_require__(158); /* * This file is based on RFC5280 (X.509). @@ -88092,7 +88627,7 @@ function writeBitField(setBits, bitIndex) { /**/ -var Buffer = __webpack_require__(45).Buffer; +var Buffer = __webpack_require__(46).Buffer; /**/ var isEncoding = Buffer.isEncoding || function (encoding) { @@ -89706,7 +90241,7 @@ Object.defineProperty(module, 'exports', { get: assembleStyles }); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(163)(module))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(121)(module))) /***/ }), /* 475 */ @@ -90186,7 +90721,7 @@ for (var e in errors) { // Copyright 2011 Mark Cavage All rights reserved. -var assert = __webpack_require__(28); +var assert = __webpack_require__(29); var Buffer = __webpack_require__(15).Buffer; var ASN1 = __webpack_require__(204); @@ -90454,7 +90989,7 @@ module.exports = Reader; // Copyright 2011 Mark Cavage All rights reserved. -var assert = __webpack_require__(28); +var assert = __webpack_require__(29); var Buffer = __webpack_require__(15).Buffer; var ASN1 = __webpack_require__(204); var errors = __webpack_require__(203); @@ -91891,7 +92426,7 @@ function _load_fs() { var _global; function _load_global() { - return _global = __webpack_require__(121); + return _global = __webpack_require__(122); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -92132,7 +92667,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const chalk = __webpack_require__(30); +const chalk = __webpack_require__(27); function hasWrapper(flags, args) { return false; @@ -92258,7 +92793,7 @@ function _load_index() { var _baseResolver; function _load_baseResolver() { - return _baseResolver = _interopRequireDefault(__webpack_require__(123)); + return _baseResolver = _interopRequireDefault(__webpack_require__(124)); } var _hostedGitResolver; @@ -92288,7 +92823,7 @@ function _load_gistResolver2() { var _gitResolver; function _load_gitResolver() { - return _gitResolver = _interopRequireDefault(__webpack_require__(124)); + return _gitResolver = _interopRequireDefault(__webpack_require__(125)); } var _fileResolver; @@ -92306,7 +92841,7 @@ function _load_packageResolver() { var _packageRequest; function _load_packageRequest() { - return _packageRequest = _interopRequireDefault(__webpack_require__(122)); + return _packageRequest = _interopRequireDefault(__webpack_require__(123)); } var _packageReference; @@ -93264,7 +93799,7 @@ function _load_fs() { var _validate; function _load_validate() { - return _validate = _interopRequireWildcard(__webpack_require__(125)); + return _validate = _interopRequireWildcard(__webpack_require__(126)); } var _constants; @@ -93845,7 +94380,7 @@ exports.hasWrapper = hasWrapper; var _packageRequest; function _load_packageRequest() { - return _packageRequest = _interopRequireDefault(__webpack_require__(122)); + return _packageRequest = _interopRequireDefault(__webpack_require__(123)); } var _lockfile; @@ -94034,7 +94569,7 @@ function _load_buildSubCommands() { var _validate; function _load_validate() { - return _validate = __webpack_require__(125); + return _validate = __webpack_require__(126); } var _tag; @@ -94273,7 +94808,7 @@ const V2_NAMES = ['berry', 'stable', 'canary', 'v2', '2']; const isLocalFile = version => version.match(/^\.{0,2}[\\/]/) || path.isAbsolute(version); const isV2Version = version => (0, (_semver || _load_semver()).satisfiesWithPrereleases)(version, '>=2.0.0'); -const chalk = __webpack_require__(30); +const chalk = __webpack_require__(27); const invariant = __webpack_require__(9); const path = __webpack_require__(0); const semver = __webpack_require__(22); @@ -94330,7 +94865,7 @@ var _buildSubCommands = (0, (_buildSubCommands2 || _load_buildSubCommands()).def bundleUrl = 'https://nightly.yarnpkg.com/latest.js'; bundleVersion = 'nightly'; } else if (V2_NAMES.includes(range) || isLocalFile(range) || isV2Version(range)) { - const normalizedRange = range === `canary` ? `canary` : `stable`; + const normalizedRange = isV2Version(range) ? range : range === `canary` ? `canary` : `stable`; if (process.env.COREPACK_ROOT) { yield (_child || _load_child()).spawn((_constants || _load_constants()).NODE_BIN_PATH, [path.join(process.env.COREPACK_ROOT, 'dist/corepack.js'), `yarn@${normalizedRange}`, `set`, `version`, normalizedRange], { @@ -95026,7 +95561,7 @@ function _load_link() { var _global; function _load_global() { - return _global = __webpack_require__(121); + return _global = __webpack_require__(122); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -96008,7 +96543,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de const invariant = __webpack_require__(9); const path = __webpack_require__(0); -const os = __webpack_require__(46); +const os = __webpack_require__(42); const semver = __webpack_require__(22); function hasWrapper(commander, args) { @@ -96247,6 +96782,28 @@ let main = exports.main = (() => { reporter.initPeakMemoryCounter(); const config = new (_config || _load_config()).default(reporter); + + if (!process.env.COREPACK_ROOT && !process.env.SKIP_YARN_COREPACK_CHECK) { + const packageManager = findPackageManager((_commander || _load_commander()).default.cwd); + if (packageManager !== null) { + if (!packageManager.match(/^yarn@[01]\./)) { + reporter.error(`This project's package.json defines ${chalk.gray('"packageManager": "yarn@')}${chalk.yellow(`${packageManager.replace(/^yarn@/, ``).replace(/\+.*/, ``)}`)}${chalk.gray(`"`)}. However the current global version of Yarn is ${chalk.yellow((_yarnVersion || _load_yarnVersion()).version)}.`); + + process.stderr.write(`\n`); + process.stderr.write(`Presence of the ${chalk.gray(`"packageManager"` + // eslint-disable-next-line max-len + )} field indicates that the project is meant to be used with Corepack, a tool included by default with all official Node.js distributions starting from 16.9 and 14.19.\n`); + + process.stderr.write(`Corepack must currently be enabled by running ${chalk.magenta(`corepack enable` + // $FlowIgnore + )} in your terminal. For more information, check out ${chalk.blueBright(`https://yarnpkg.com/corepack`)}.\n`); + + exit(1); + return; + } + } + } + const outputWrapperEnabled = (0, (_conversion || _load_conversion()).boolifyWithDefault)(process.env.YARN_WRAP_OUTPUT, true); const shouldWrapOutput = outputWrapperEnabled && !(_commander || _load_commander()).default.json && command.hasWrapper((_commander || _load_commander()).default, (_commander || _load_commander()).default.args) && !(commandName === 'init' && (_commander || _load_commander()).default[`2`]); @@ -96477,68 +97034,6 @@ let main = exports.main = (() => { }); }; - function onUnexpectedError(err) { - function indent(str) { - return '\n ' + str.trim().split('\n').join('\n '); - } - - const log = []; - log.push(`Arguments: ${indent(process.argv.join(' '))}`); - log.push(`PATH: ${indent(process.env.PATH || 'undefined')}`); - log.push(`Yarn version: ${indent((_yarnVersion || _load_yarnVersion()).version)}`); - log.push(`Node version: ${indent(process.versions.node)}`); - log.push(`Platform: ${indent(process.platform + ' ' + process.arch)}`); - - log.push(`Trace: ${indent(err.stack)}`); - - // add manifests - for (var _iterator3 = (_index2 || _load_index2()).registryNames, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { - var _ref4; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref4 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref4 = _i3.value; - } - - const registryName = _ref4; - - const possibleLoc = (_path || _load_path()).default.join(config.cwd, (_index2 || _load_index2()).registries[registryName].filename); - const manifest = (_fs || _load_fs()).default.existsSync(possibleLoc) ? (_fs || _load_fs()).default.readFileSync(possibleLoc, 'utf8') : 'No manifest'; - log.push(`${registryName} manifest: ${indent(manifest)}`); - } - - // lockfile - const lockLoc = (_path || _load_path()).default.join(config.lockfileFolder || config.cwd, // lockfileFolder might not be set at this point - (_constants || _load_constants()).LOCKFILE_FILENAME); - const lockfile = (_fs || _load_fs()).default.existsSync(lockLoc) ? (_fs || _load_fs()).default.readFileSync(lockLoc, 'utf8') : 'No lockfile'; - log.push(`Lockfile: ${indent(lockfile)}`); - - const errorReportLoc = writeErrorReport(log); - - reporter.error(reporter.lang('unexpectedError', err.message)); - - if (errorReportLoc) { - reporter.info(reporter.lang('bugReport', errorReportLoc)); - } - } - - function writeErrorReport(log) { - const errorReportLoc = config.enableMetaFolder ? (_path || _load_path()).default.join(config.cwd, (_constants || _load_constants()).META_FOLDER, 'yarn-error.log') : (_path || _load_path()).default.join(config.cwd, 'yarn-error.log'); - - try { - (_fs || _load_fs()).default.writeFileSync(errorReportLoc, log.join('\n\n') + '\n'); - } catch (err) { - reporter.error(reporter.lang('fileWriteError', errorReportLoc, err.message)); - return undefined; - } - - return errorReportLoc; - } - const cwd = command.shouldRunInCurrentCwd ? (_commander || _load_commander()).default.cwd : findProjectRoot((_commander || _load_commander()).default.cwd); const folderOptionKeys = ['linkFolder', 'globalFolder', 'preferredCacheFolder', 'cacheFolder', 'modulesFolder']; @@ -96626,7 +97121,7 @@ let main = exports.main = (() => { if (err instanceof (_errors || _load_errors()).MessageError) { reporter.error(err.message); } else { - onUnexpectedError(err); + reporter.error(err.stack); } if (command.getDocsInfo) { @@ -96647,7 +97142,7 @@ let main = exports.main = (() => { })(); let start = (() => { - var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var _ref4 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { const rc = (0, (_rc || _load_rc()).getRcConfigForCwd)(process.cwd(), process.argv.slice(2)); const yarnPath = rc['yarn-path'] || rc['yarnPath']; @@ -96692,7 +97187,7 @@ let start = (() => { }); return function start() { - return _ref5.apply(this, arguments); + return _ref4.apply(this, arguments); }; })(); @@ -96799,7 +97294,7 @@ function _load_errors() { var _config; function _load_config() { - return _config = _interopRequireDefault(__webpack_require__(162)); + return _config = _interopRequireDefault(__webpack_require__(163)); } var _rc; @@ -96842,6 +97337,8 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const chalk = __webpack_require__(27); + process.stdout.prependListener('error', err => { // swallow err only if downstream consumer process closed pipe early if (err.code === 'EPIPE' || err.code === 'ERR_STREAM_DESTROYED') { @@ -96850,6 +97347,29 @@ process.stdout.prependListener('error', err => { throw err; }); +function findPackageManager(base) { + let prev = null; + let dir = base; + + do { + const p = (_path || _load_path()).default.join(dir, (_constants || _load_constants()).NODE_PACKAGE_JSON); + + let data; + try { + data = JSON.parse((_fs || _load_fs()).default.readFileSync(p, `utf8`)); + } catch (err) {} + + if (data && typeof data.packageManager === `string`) { + return data.packageManager; + } + + prev = dir; + dir = (_path || _load_path()).default.dirname(dir); + } while (dir !== prev); + + return null; +} + function findProjectRoot(base) { let prev = null; let dir = base; @@ -96876,7 +97396,7 @@ if (__webpack_require__.c[__webpack_require__.s] === module) { } exports.default = start; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(163)(module))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(121)(module))) /***/ }), /* 518 */ @@ -96994,7 +97514,7 @@ function _load_lockfile() { var _config; function _load_config() { - return _config = _interopRequireDefault(__webpack_require__(162)); + return _config = _interopRequireDefault(__webpack_require__(163)); } var _pack; @@ -97589,7 +98109,7 @@ function _load_extends() { var _config; function _load_config() { - return _config = _interopRequireDefault(__webpack_require__(162)); + return _config = _interopRequireDefault(__webpack_require__(163)); } var _misc; @@ -98753,7 +99273,7 @@ function _load_asyncToGenerator() { var _config; function _load_config() { - return _config = _interopRequireDefault(__webpack_require__(162)); + return _config = _interopRequireDefault(__webpack_require__(163)); } var _executeLifecycleScript; @@ -99855,8 +100375,8 @@ var _require = __webpack_require__(3); const inspect = _require.inspect; const readline = __webpack_require__(198); -const chalk = __webpack_require__(30); -const stripAnsi = __webpack_require__(329); +const chalk = __webpack_require__(27); +const stripAnsi = __webpack_require__(330); const read = __webpack_require__(790); const tty = __webpack_require__(104); @@ -101275,13 +101795,13 @@ function _load_extends() { var _packageRequest; function _load_packageRequest() { - return _packageRequest = _interopRequireDefault(__webpack_require__(122)); + return _packageRequest = _interopRequireDefault(__webpack_require__(123)); } var _baseResolver; function _load_baseResolver() { - return _baseResolver = _interopRequireDefault(__webpack_require__(123)); + return _baseResolver = _interopRequireDefault(__webpack_require__(124)); } var _workspaceLayout; @@ -101541,7 +102061,7 @@ function _load_exoticResolver() { var _gitResolver; function _load_gitResolver() { - return _gitResolver = _interopRequireDefault(__webpack_require__(124)); + return _gitResolver = _interopRequireDefault(__webpack_require__(125)); } var _guessName; @@ -101691,7 +102211,7 @@ Object.defineProperty(exports, "__esModule", { var _baseResolver; function _load_baseResolver() { - return _baseResolver = _interopRequireDefault(__webpack_require__(123)); + return _baseResolver = _interopRequireDefault(__webpack_require__(124)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -103817,7 +104337,7 @@ module.exports = { "default": __webpack_require__(591), __esModule: true }; var DuplexStream = __webpack_require__(791) , util = __webpack_require__(3) - , Buffer = __webpack_require__(45).Buffer + , Buffer = __webpack_require__(46).Buffer function BufferList (callback) { @@ -104502,7 +105022,7 @@ module.exports = (flag, argv) => { "use strict"; -const os = __webpack_require__(46); +const os = __webpack_require__(42); const hasFlag = __webpack_require__(565); const env = process.env; @@ -106619,7 +107139,7 @@ THE SOFTWARE. -var os = __webpack_require__(46); +var os = __webpack_require__(42); var hasFlag = __webpack_require__(587); var env = process.env; @@ -107871,7 +108391,7 @@ module.exports = function(conf) { // Requires ec.js, jsbn.js, and jsbn2.js var BigInteger = __webpack_require__(81).BigInteger -var ECCurveFp = __webpack_require__(139).ECCurveFp +var ECCurveFp = __webpack_require__(140).ECCurveFp // ---------------- @@ -108914,7 +109434,7 @@ function toRegex(pattern, contains, isNegated) { * extsprintf.js: extended POSIX-style sprintf */ -var mod_assert = __webpack_require__(28); +var mod_assert = __webpack_require__(29); var mod_util = __webpack_require__(3); /* @@ -115129,7 +115649,7 @@ var assert = __webpack_require__(16); var crypto = __webpack_require__(11); var http = __webpack_require__(87); var util = __webpack_require__(3); -var sshpk = __webpack_require__(328); +var sshpk = __webpack_require__(329); var jsprim = __webpack_require__(746); var utils = __webpack_require__(175); @@ -115534,7 +116054,7 @@ module.exports = { var assert = __webpack_require__(16); var crypto = __webpack_require__(11); -var sshpk = __webpack_require__(328); +var sshpk = __webpack_require__(329); var utils = __webpack_require__(175); var HASH_ALGOS = utils.HASH_ALGOS; @@ -115870,7 +116390,7 @@ module.exports = class Choice { "use strict"; -var assert = __webpack_require__(28); +var assert = __webpack_require__(29); var _ = __webpack_require__(38); var Separator = __webpack_require__(176); var Choice = __webpack_require__(685); @@ -115996,7 +116516,7 @@ module.exports = class Choices { */ var _ = __webpack_require__(38); -var chalk = __webpack_require__(30); +var chalk = __webpack_require__(27); var cliCursor = __webpack_require__(375); var figures = __webpack_require__(267); var { map, takeUntil } = __webpack_require__(63); @@ -116256,7 +116776,7 @@ module.exports = CheckboxPrompt; */ var _ = __webpack_require__(38); -var chalk = __webpack_require__(30); +var chalk = __webpack_require__(27); var { take, takeUntil } = __webpack_require__(63); var Base = __webpack_require__(79); var observe = __webpack_require__(80); @@ -116362,7 +116882,7 @@ module.exports = ConfirmPrompt; * `editor` type prompt */ -var chalk = __webpack_require__(30); +var chalk = __webpack_require__(27); var editAsync = __webpack_require__(709).editAsync; var Base = __webpack_require__(79); var observe = __webpack_require__(80); @@ -116470,7 +116990,7 @@ module.exports = EditorPrompt; */ var _ = __webpack_require__(38); -var chalk = __webpack_require__(30); +var chalk = __webpack_require__(27); var { map, takeUntil } = __webpack_require__(63); var Base = __webpack_require__(79); var Separator = __webpack_require__(176); @@ -116744,7 +117264,7 @@ module.exports = ExpandPrompt; */ var _ = __webpack_require__(38); -var chalk = __webpack_require__(30); +var chalk = __webpack_require__(27); var figures = __webpack_require__(267); var cliCursor = __webpack_require__(375); var runAsync = __webpack_require__(182); @@ -116967,7 +117487,7 @@ module.exports = NumberPrompt; * `password` type prompt */ -var chalk = __webpack_require__(30); +var chalk = __webpack_require__(27); var { map, takeUntil } = __webpack_require__(63); var Base = __webpack_require__(79); var observe = __webpack_require__(80); @@ -117084,7 +117604,7 @@ module.exports = PasswordPrompt; */ var _ = __webpack_require__(38); -var chalk = __webpack_require__(30); +var chalk = __webpack_require__(27); var { map, takeUntil } = __webpack_require__(63); var Base = __webpack_require__(79); var Separator = __webpack_require__(176); @@ -117506,7 +118026,7 @@ module.exports = PromptUI; var _ = __webpack_require__(38); var util = __webpack_require__(394); var cliWidth = __webpack_require__(574); -var stripAnsi = __webpack_require__(329); +var stripAnsi = __webpack_require__(330); var stringWidth = __webpack_require__(728); function height(content) { @@ -117680,7 +118200,7 @@ exports.fetchAsyncQuestionProperty = function(question, prop, answers) { /***/ (function(module, exports, __webpack_require__) { var util = __webpack_require__(3), - Match = __webpack_require__ (142); + Match = __webpack_require__ (143); /** @@ -117827,7 +118347,7 @@ util.inherits(module.exports.ISO_2022_CN, ISO_2022); /***/ (function(module, exports, __webpack_require__) { var util = __webpack_require__(3), - Match = __webpack_require__ (142); + Match = __webpack_require__ (143); /** * Binary search implementation (recursive) @@ -118335,7 +118855,7 @@ util.inherits(module.exports.gb_18030, mbcs); /***/ (function(module, exports, __webpack_require__) { var util = __webpack_require__(3), - Match = __webpack_require__ (142); + Match = __webpack_require__ (143); /** * This class recognizes single-byte encodings. Because the encoding scheme is so @@ -119250,7 +119770,7 @@ util.inherits(module.exports.ISO_8859_7, sbcs); "use strict"; var util = __webpack_require__(3), - Match = __webpack_require__ (142); + Match = __webpack_require__ (143); /** * This class matches UTF-16 and UTF-32, both big- and little-endian. The @@ -119367,7 +119887,7 @@ util.inherits(module.exports.UTF_32LE, UTF_32); /***/ (function(module, exports, __webpack_require__) { -var Match = __webpack_require__ (142); +var Match = __webpack_require__ (143); /** * Charset recognizer for UTF-8 @@ -119807,7 +120327,7 @@ exports.RemoveFileError = RemoveFileError; */ Object.defineProperty(exports, "__esModule", { value: true }); var chardet_1 = __webpack_require__(704); -var child_process_1 = __webpack_require__(331); +var child_process_1 = __webpack_require__(332); var fs_1 = __webpack_require__(4); var iconv_lite_1 = __webpack_require__(726); var tmp_1 = __webpack_require__(954); @@ -122759,7 +123279,7 @@ IconvLiteDecoderStream.prototype.collect = function(cb) { "use strict"; -const stripAnsi = __webpack_require__(329); +const stripAnsi = __webpack_require__(330); const isFullwidthCodePoint = __webpack_require__(736); module.exports = str => { @@ -126102,7 +126622,7 @@ function constant(value) { module.exports = baseClone; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(163)(module))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(121)(module))) /***/ }), /* 749 */ @@ -128180,7 +128700,7 @@ module.exports = (to, from) => { "use strict"; -const mkdirp = __webpack_require__(145) +const mkdirp = __webpack_require__(146) module.exports = function (dir, opts) { return new Promise((resolve, reject) => { @@ -131673,7 +132193,7 @@ PassThrough.prototype._transform = function (chunk, encoding, cb) { function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -var Buffer = __webpack_require__(45).Buffer; +var Buffer = __webpack_require__(46).Buffer; var util = __webpack_require__(3); function copyBuffer(src, target, offset) { @@ -132108,7 +132628,7 @@ module.exports = HarWrapper; var extend = __webpack_require__(266) var cookies = __webpack_require__(412) -var helpers = __webpack_require__(305) +var helpers = __webpack_require__(306) var paramsHaveRequestBody = helpers.paramsHaveRequestBody @@ -132256,7 +132776,7 @@ Object.defineProperty(request, 'debug', { var caseless = __webpack_require__(228) var uuid = __webpack_require__(120) -var helpers = __webpack_require__(305) +var helpers = __webpack_require__(306) var md5 = helpers.md5 var toBase64 = helpers.toBase64 @@ -132825,7 +133345,7 @@ exports.header = function (uri, method, opts) { var uuid = __webpack_require__(120) var CombinedStream = __webpack_require__(379) var isstream = __webpack_require__(399) -var Buffer = __webpack_require__(45).Buffer +var Buffer = __webpack_require__(46).Buffer function Multipart (request) { this.request = request @@ -132947,7 +133467,7 @@ var caseless = __webpack_require__(228) var uuid = __webpack_require__(120) var oauth = __webpack_require__(768) var crypto = __webpack_require__(11) -var Buffer = __webpack_require__(45).Buffer +var Buffer = __webpack_require__(46).Buffer function OAuth (request) { this.request = request @@ -133535,7 +134055,7 @@ var VERSION = __webpack_require__(812).version; var punycode; try { - punycode = __webpack_require__(332); + punycode = __webpack_require__(305); } catch(e) { console.warn("cookie: can't load punycode; won't use punycode for domain normalization"); } @@ -135128,7 +135648,7 @@ var FormData = __webpack_require__(617) var extend = __webpack_require__(266) var isstream = __webpack_require__(399) var isTypedArray = __webpack_require__(742).strict -var helpers = __webpack_require__(305) +var helpers = __webpack_require__(306) var cookies = __webpack_require__(412) var getProxyFromURI = __webpack_require__(802) var Querystring = __webpack_require__(807).Querystring @@ -135140,7 +135660,7 @@ var Multipart = __webpack_require__(805).Multipart var Redirect = __webpack_require__(808).Redirect var Tunnel = __webpack_require__(809).Tunnel var now = __webpack_require__(776) -var Buffer = __webpack_require__(45).Buffer +var Buffer = __webpack_require__(46).Buffer var safeStringify = helpers.safeStringify var isReadStream = helpers.isReadStream @@ -136662,7 +137182,7 @@ module.exports = Request /* 814 */ /***/ (function(module, exports, __webpack_require__) { -var core = __webpack_require__(306); +var core = __webpack_require__(307); var async = __webpack_require__(815); async.core = core; async.isCore = function isCore(x) { return core[x]; }; @@ -136676,7 +137196,7 @@ module.exports = async; /* 815 */ /***/ (function(module, exports, __webpack_require__) { -var core = __webpack_require__(306); +var core = __webpack_require__(307); var fs = __webpack_require__(4); var path = __webpack_require__(0); var caller = __webpack_require__(417); @@ -136894,7 +137414,7 @@ module.exports = {"assert":true,"async_hooks":">= 8","buffer_ieee754":"< 0.9.7", /* 817 */ /***/ (function(module, exports, __webpack_require__) { -var core = __webpack_require__(306); +var core = __webpack_require__(307); var fs = __webpack_require__(4); var path = __webpack_require__(0); var caller = __webpack_require__(417); @@ -137376,7 +137896,7 @@ var SubscribeOnObservable = /*@__PURE__*/ (function (_super) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncSubject__ = __webpack_require__(184); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__operators_map__ = __webpack_require__(47); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_canReportError__ = __webpack_require__(322); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_canReportError__ = __webpack_require__(323); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isArray__ = __webpack_require__(41); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_isScheduler__ = __webpack_require__(49); /** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isArray,_util_isScheduler PURE_IMPORTS_END */ @@ -137495,7 +138015,7 @@ function dispatchError(state) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncSubject__ = __webpack_require__(184); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__operators_map__ = __webpack_require__(47); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_canReportError__ = __webpack_require__(322); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_canReportError__ = __webpack_require__(323); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isScheduler__ = __webpack_require__(49); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_isArray__ = __webpack_require__(41); /** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isScheduler,_util_isArray PURE_IMPORTS_END */ @@ -137710,7 +138230,7 @@ var ForkJoinSubscriber = /*@__PURE__*/ (function (_super) { /* harmony export (immutable) */ __webpack_exports__["a"] = fromEvent; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isArray__ = __webpack_require__(41); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__(154); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__(155); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__operators_map__ = __webpack_require__(47); /** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */ @@ -137785,7 +138305,7 @@ function isEventTarget(sourceObj) { /* harmony export (immutable) */ __webpack_exports__["a"] = fromEventPattern; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isArray__ = __webpack_require__(41); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__(154); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__(155); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__operators_map__ = __webpack_require__(47); /** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */ @@ -137829,7 +138349,7 @@ function fromEventPattern(addHandler, removeHandler, resultSelector) { /* harmony export (immutable) */ __webpack_exports__["a"] = fromIterable; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscription__ = __webpack_require__(25); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__symbol_iterator__ = __webpack_require__(151); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__symbol_iterator__ = __webpack_require__(152); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_subscribeToIterable__ = __webpack_require__(448); /** PURE_IMPORTS_START _Observable,_Subscription,_symbol_iterator,_util_subscribeToIterable PURE_IMPORTS_END */ @@ -138101,7 +138621,7 @@ function dispatch(state) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = iif; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defer__ = __webpack_require__(310); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defer__ = __webpack_require__(311); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__empty__ = __webpack_require__(39); /** PURE_IMPORTS_START _defer,_empty PURE_IMPORTS_END */ @@ -138958,7 +139478,7 @@ var CatchSubscriber = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = combineAll; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_combineLatest__ = __webpack_require__(309); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_combineLatest__ = __webpack_require__(310); /** PURE_IMPORTS_START _observable_combineLatest PURE_IMPORTS_END */ function combineAll(project) { @@ -138974,7 +139494,7 @@ function combineAll(project) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = combineLatest; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isArray__ = __webpack_require__(41); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__observable_combineLatest__ = __webpack_require__(309); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__observable_combineLatest__ = __webpack_require__(310); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_from__ = __webpack_require__(62); /** PURE_IMPORTS_START _util_isArray,_observable_combineLatest,_observable_from PURE_IMPORTS_END */ @@ -139644,11 +140164,11 @@ function distinctUntilKeyChanged(key, compare) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = elementAt; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_ArgumentOutOfRangeError__ = __webpack_require__(152); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__filter__ = __webpack_require__(147); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_ArgumentOutOfRangeError__ = __webpack_require__(153); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__filter__ = __webpack_require__(148); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__throwIfEmpty__ = __webpack_require__(189); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__defaultIfEmpty__ = __webpack_require__(146); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__take__ = __webpack_require__(319); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__defaultIfEmpty__ = __webpack_require__(147); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__take__ = __webpack_require__(320); /** PURE_IMPORTS_START _util_ArgumentOutOfRangeError,_filter,_throwIfEmpty,_defaultIfEmpty,_take PURE_IMPORTS_END */ @@ -139676,7 +140196,7 @@ function elementAt(index, defaultValue) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = endWith; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_fromArray__ = __webpack_require__(85); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__observable_scalar__ = __webpack_require__(312); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__observable_scalar__ = __webpack_require__(313); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_empty__ = __webpack_require__(39); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__observable_concat__ = __webpack_require__(187); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isScheduler__ = __webpack_require__(49); @@ -140104,10 +140624,10 @@ function findIndex(predicate, thisArg) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = first; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_EmptyError__ = __webpack_require__(153); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__filter__ = __webpack_require__(147); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__take__ = __webpack_require__(319); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__defaultIfEmpty__ = __webpack_require__(146); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_EmptyError__ = __webpack_require__(154); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__filter__ = __webpack_require__(148); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__take__ = __webpack_require__(320); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__defaultIfEmpty__ = __webpack_require__(147); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__throwIfEmpty__ = __webpack_require__(189); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_identity__ = __webpack_require__(119); /** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */ @@ -140209,11 +140729,11 @@ var IsEmptySubscriber = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = last; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_EmptyError__ = __webpack_require__(153); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__filter__ = __webpack_require__(147); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__takeLast__ = __webpack_require__(320); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_EmptyError__ = __webpack_require__(154); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__filter__ = __webpack_require__(148); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__takeLast__ = __webpack_require__(321); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__throwIfEmpty__ = __webpack_require__(189); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__defaultIfEmpty__ = __webpack_require__(146); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__defaultIfEmpty__ = __webpack_require__(147); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_identity__ = __webpack_require__(119); /** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */ @@ -140359,7 +140879,7 @@ function merge() { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = mergeMapTo; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mergeMap__ = __webpack_require__(148); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mergeMap__ = __webpack_require__(149); /** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */ function mergeMapTo(innerObservable, resultSelector, concurrent) { @@ -140648,7 +141168,7 @@ var PairwiseSubscriber = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = partition; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_not__ = __webpack_require__(931); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__filter__ = __webpack_require__(147); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__filter__ = __webpack_require__(148); /** PURE_IMPORTS_START _util_not,_filter PURE_IMPORTS_END */ @@ -140761,7 +141281,7 @@ function publishLast() { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = publishReplay; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ReplaySubject__ = __webpack_require__(308); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ReplaySubject__ = __webpack_require__(309); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__multicast__ = __webpack_require__(117); /** PURE_IMPORTS_START _ReplaySubject,_multicast PURE_IMPORTS_END */ @@ -141353,7 +141873,7 @@ var SequenceEqualCompareToSubscriber = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = share; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__multicast__ = __webpack_require__(117); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__refCount__ = __webpack_require__(316); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__refCount__ = __webpack_require__(317); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Subject__ = __webpack_require__(36); /** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */ @@ -141374,7 +141894,7 @@ function share() { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = shareReplay; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ReplaySubject__ = __webpack_require__(308); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ReplaySubject__ = __webpack_require__(309); /** PURE_IMPORTS_START _ReplaySubject PURE_IMPORTS_END */ function shareReplay(bufferSize, windowTime, scheduler) { @@ -141430,7 +141950,7 @@ function shareReplayOperator(bufferSize, windowTime, scheduler) { /* harmony export (immutable) */ __webpack_exports__["a"] = single; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(7); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_EmptyError__ = __webpack_require__(153); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_EmptyError__ = __webpack_require__(154); /** PURE_IMPORTS_START tslib,_Subscriber,_util_EmptyError PURE_IMPORTS_END */ @@ -141550,7 +142070,7 @@ var SkipSubscriber = /*@__PURE__*/ (function (_super) { /* harmony export (immutable) */ __webpack_exports__["a"] = skipLast; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(7); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_ArgumentOutOfRangeError__ = __webpack_require__(152); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_ArgumentOutOfRangeError__ = __webpack_require__(153); /** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError PURE_IMPORTS_END */ @@ -141721,7 +142241,7 @@ var SkipWhileSubscriber = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = startWith; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_fromArray__ = __webpack_require__(85); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__observable_scalar__ = __webpack_require__(312); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__observable_scalar__ = __webpack_require__(313); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_empty__ = __webpack_require__(39); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__observable_concat__ = __webpack_require__(187); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isScheduler__ = __webpack_require__(49); @@ -141795,7 +142315,7 @@ var SubscribeOnOperator = /*@__PURE__*/ (function () { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = switchAll; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__switchMap__ = __webpack_require__(318); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__switchMap__ = __webpack_require__(319); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_identity__ = __webpack_require__(119); /** PURE_IMPORTS_START _switchMap,_util_identity PURE_IMPORTS_END */ @@ -141812,7 +142332,7 @@ function switchAll() { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = switchMapTo; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__switchMap__ = __webpack_require__(318); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__switchMap__ = __webpack_require__(319); /** PURE_IMPORTS_START _switchMap PURE_IMPORTS_END */ function switchMapTo(innerObservable, resultSelector) { @@ -142028,8 +142548,8 @@ function dispatchNext(arg) { /* harmony export (immutable) */ __webpack_exports__["a"] = timeInterval; /* unused harmony export TimeInterval */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__scheduler_async__ = __webpack_require__(40); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__scan__ = __webpack_require__(317); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_defer__ = __webpack_require__(310); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__scan__ = __webpack_require__(318); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_defer__ = __webpack_require__(311); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__map__ = __webpack_require__(47); /** PURE_IMPORTS_START _scheduler_async,_scan,_observable_defer,_map PURE_IMPORTS_END */ @@ -142072,7 +142592,7 @@ var TimeInterval = /*@__PURE__*/ (function () { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__scheduler_async__ = __webpack_require__(40); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_TimeoutError__ = __webpack_require__(440); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__timeoutWith__ = __webpack_require__(437); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__observable_throwError__ = __webpack_require__(313); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__observable_throwError__ = __webpack_require__(314); /** PURE_IMPORTS_START _scheduler_async,_util_TimeoutError,_timeoutWith,_observable_throwError PURE_IMPORTS_END */ @@ -142818,7 +143338,7 @@ var WithLatestFromSubscriber = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = zip; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_zip__ = __webpack_require__(314); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_zip__ = __webpack_require__(315); /** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */ function zip() { @@ -142839,7 +143359,7 @@ function zip() { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = zipAll; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_zip__ = __webpack_require__(314); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_zip__ = __webpack_require__(315); /** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */ function zipAll(project) { @@ -142883,7 +143403,7 @@ var Action = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AnimationFrameAction; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncAction__ = __webpack_require__(149); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncAction__ = __webpack_require__(150); /** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */ @@ -142931,7 +143451,7 @@ var AnimationFrameAction = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AnimationFrameScheduler; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncScheduler__ = __webpack_require__(150); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncScheduler__ = __webpack_require__(151); /** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */ @@ -142975,7 +143495,7 @@ var AnimationFrameScheduler = /*@__PURE__*/ (function (_super) { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AsapAction; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_Immediate__ = __webpack_require__(927); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__AsyncAction__ = __webpack_require__(149); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__AsyncAction__ = __webpack_require__(150); /** PURE_IMPORTS_START tslib,_util_Immediate,_AsyncAction PURE_IMPORTS_END */ @@ -143024,7 +143544,7 @@ var AsapAction = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AsapScheduler; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncScheduler__ = __webpack_require__(150); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncScheduler__ = __webpack_require__(151); /** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */ @@ -143067,7 +143587,7 @@ var AsapScheduler = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return QueueAction; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncAction__ = __webpack_require__(149); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncAction__ = __webpack_require__(150); /** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */ @@ -143118,7 +143638,7 @@ var QueueAction = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return QueueScheduler; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncScheduler__ = __webpack_require__(150); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncScheduler__ = __webpack_require__(151); /** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */ @@ -143141,8 +143661,8 @@ var QueueScheduler = /*@__PURE__*/ (function (_super) { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return VirtualTimeScheduler; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return VirtualAction; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncAction__ = __webpack_require__(149); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__AsyncScheduler__ = __webpack_require__(150); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncAction__ = __webpack_require__(150); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__AsyncScheduler__ = __webpack_require__(151); /** PURE_IMPORTS_START tslib,_AsyncAction,_AsyncScheduler PURE_IMPORTS_END */ @@ -143318,7 +143838,7 @@ function isInteropObservable(input) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = isIterable; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__symbol_iterator__ = __webpack_require__(151); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__symbol_iterator__ = __webpack_require__(152); /** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */ function isIterable(input) { @@ -143367,7 +143887,7 @@ function not(pred, thisArg) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = toSubscriber; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subscriber__ = __webpack_require__(7); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__symbol_rxSubscriber__ = __webpack_require__(321); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__symbol_rxSubscriber__ = __webpack_require__(322); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Observer__ = __webpack_require__(420); /** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */ @@ -144157,17 +144677,17 @@ module.exports = { }; var assert = __webpack_require__(16); -var SSHBuffer = __webpack_require__(159); +var SSHBuffer = __webpack_require__(160); var crypto = __webpack_require__(11); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); -var Identity = __webpack_require__(158); +var Identity = __webpack_require__(159); var rfc4253 = __webpack_require__(103); var Signature = __webpack_require__(75); var utils = __webpack_require__(26); -var Certificate = __webpack_require__(155); +var Certificate = __webpack_require__(156); function verify(cert, key) { /* @@ -144487,12 +145007,12 @@ var asn1 = __webpack_require__(66); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); var utils = __webpack_require__(26); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); var pem = __webpack_require__(86); -var Identity = __webpack_require__(158); +var Identity = __webpack_require__(159); var Signature = __webpack_require__(75); -var Certificate = __webpack_require__(155); +var Certificate = __webpack_require__(156); function read(buf, options) { if (typeof (buf) !== 'string') { @@ -145359,7 +145879,7 @@ function deprecated(source, name) { var Promise = __webpack_require__(339) -var assert = __webpack_require__(28) +var assert = __webpack_require__(29) module.exports = thenify @@ -146182,9 +146702,9 @@ var net = __webpack_require__(164) , http = __webpack_require__(87) , https = __webpack_require__(196) , events = __webpack_require__(77) - , assert = __webpack_require__(28) + , assert = __webpack_require__(29) , util = __webpack_require__(3) - , Buffer = __webpack_require__(45).Buffer + , Buffer = __webpack_require__(46).Buffer ; exports.httpOverHttp = httpOverHttp @@ -147140,7 +147660,7 @@ WError.prototype.cause = function we_cause(c) * extsprintf.js: extended POSIX-style sprintf */ -var mod_assert = __webpack_require__(28); +var mod_assert = __webpack_require__(29); var mod_util = __webpack_require__(3); /* diff --git a/.yarnrc b/.yarnrc index c2acf2d321..8e395ab893 100644 --- a/.yarnrc +++ b/.yarnrc @@ -3,4 +3,4 @@ lastUpdateCheck 1628516485956 -yarn-path ".yarn/releases/yarn-1.22.19.cjs" +yarn-path ".yarn/releases/yarn-1.22.22.cjs" diff --git a/default.nix b/default.nix index 846b1f7d48..2403bf9a78 100644 --- a/default.nix +++ b/default.nix @@ -6,6 +6,7 @@ ./flake.lock # managing the npm dependencies with yarna ./package.json + ./.yarnrc ./yarn.lock ]; }; diff --git a/flake.nix b/flake.nix index f617ab83cf..79fd972816 100644 --- a/flake.nix +++ b/flake.nix @@ -73,6 +73,8 @@ ]; node18DevInputs = nodeDevInputsWith pkgs.nodejs_18; node20DevInputs = nodeDevInputsWith pkgs.nodejs_20; + node22DevInputs = nodeDevInputsWith pkgs.nodejs_22; + defaultNodeDevInputs = node22DevInputs; # CI inputs ciInputs = with pkgs; [ @@ -81,7 +83,7 @@ ]; # minimem development shell - minimumDevInputs = commonDevInputs ++ ethDevInputs ++ node20DevInputs; + minimumDevInputs = commonDevInputs ++ ethDevInputs ++ defaultNodeDevInputs; # additional tooling for whitehat hackers whitehatInputs = with pkgs; [ @@ -121,6 +123,9 @@ FOUNDRY_OFFLINE = "true"; FOUNDRY_SOLC_VERSION = pkgs.lib.getExe pkgs.${solcVer}; } // o); + mkShellForNodeCI = nodeDevInputs : mkShell { + buildInputs = ciInputs ++ commonDevInputs ++ ethDevInputs ++ nodeDevInputs; + }; mkShellForSpecCI = ghcVer : mkShell { buildInputs = with pkgs; [ cabal-install @@ -151,20 +156,19 @@ devShells.mk-cache-key = mkShell { buildInputs = [ mk-cache-key-pkg ]; }; + devShells.ci-minimum = mkShell { - buildInputs = ciInputs ++ commonDevInputs; - }; - devShells.ci-default = mkShell { - buildInputs = ciInputs ++ minimumDevInputs; - }; - devShells.ci-node18 = mkShell { - buildInputs = ciInputs ++ commonDevInputs ++ ethDevInputs ++ node18DevInputs; - }; - devShells.ci-node20 = mkShell { - buildInputs = ciInputs ++ commonDevInputs ++ ethDevInputs ++ node20DevInputs; + buildInputs = with pkgs; ciInputs ++ [ actionlint shellcheck ]; }; + + devShells.ci-default = mkShellForNodeCI defaultNodeDevInputs; + devShells.ci-node18 = mkShellForNodeCI node18DevInputs; + devShells.ci-node20 = mkShellForNodeCI node20DevInputs; + devShells.ci-node22 = mkShellForNodeCI node22DevInputs; + devShells.ci-spec-ghc92 = mkShellForSpecCI ghcVer92; devShells.ci-spec-ghc94 = mkShellForSpecCI ghcVer94; + devShells.ci-hot-fuzz = mkShell { buildInputs = with pkgs; ciInputs ++ commonDevInputs ++ ethDevInputs ++ [ slither-analyzer diff --git a/package.json b/package.json index 427e96d9d2..b2305f51f9 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,58 @@ { "name": "@superfluid-finance/protocol-monorepo", "description": "Superfluid Protocol monorepo", - "repository": { - "type": "git", - "url": "github:superfluid-finance/protocol-monorepo" + "version": "0.0.0", + "devDependencies": { + "@nomicfoundation/hardhat-chai-matchers": "^1.0.6", + "@nomicfoundation/hardhat-ethers": "^3.0.7", + "@nomiclabs/hardhat-etherscan": "^3.1.7", + "@nomiclabs/hardhat-web3": "^2.0.0", + "@openzeppelin/test-helpers": "^0.5.16", + "@truffle/hdwallet-provider": "^2.1.15", + "@typechain/ethers-v5": "^11.1.2", + "@typechain/hardhat": "^9.1.0", + "@types/lodash": "^4.17.7", + "@types/mocha": "^10.0.7", + "@typescript-eslint/eslint-plugin": "^8.3.0", + "@typescript-eslint/parser": "^8.3.0", + "cloc": "^2.11.0", + "copyfiles": "^2.4.1", + "dotenv": "^16.4.5", + "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-eslint-comments": "^3.2.0", + "eslint-plugin-import": "^2.29.1", + "eslint-plugin-prettier": "^5.2.1", + "hardhat": "^2.22.9", + "hardhat-deploy": "^0.12.4", + "husky": "^9.1.5", + "lerna": "^8.1.8", + "node-jq": "^6.0.1", + "nodemon": "^3.1.4", + "npm-run-all": "^4.1.5", + "nyc": "^17.0.0", + "prettier": "^3.3.3", + "prettier-eslint": "^16.3.0", + "solhint": "^5.0.3", + "syncpack": "^13.0.0", + "truffle": "^5.11.5", + "ts-node": "^10.9.2", + "typechain": "^8.3.2", + "typedoc": "^0.26.6", + "typescript": "^5.5.4", + "web3": "^1.10.4" }, - "private": true, - "npmClient": "yarn", "license": "MIT", + "npmClient": "yarn", + "private": true, + "repository": "github:superfluid-finance/protocol-monorepo", + "resolutions": { + "cross-fetch": "^4.0.0" + }, "scripts": { - "postinstall": "npm run git-submodule:init && husky install", + "prepare": "husky && npm run git-submodule:init", "lint": "run-s -l lint:*", + "lint:syncpack": "syncpack lint", "lint:shellcheck": "tasks/shellcheck-all-tasks.sh", "lint:actionlint": "actionlint .github/workflows/*.yml", "lint:workspaces": "yarn workspaces run lint", @@ -42,50 +84,6 @@ "shell:full": "nix develop .#full", "manage-versions": "lerna version --no-git-tag-version --preid rc" }, - "devDependencies": { - "@nomicfoundation/hardhat-chai-matchers": "^1.0.6", - "@nomiclabs/hardhat-ethers": "^2.2.3", - "@nomiclabs/hardhat-etherscan": "^3.1.7", - "@nomiclabs/hardhat-web3": "^2.0.0", - "@openzeppelin/test-helpers": "^0.5.16", - "@truffle/hdwallet-provider": "^2.1.15", - "@typechain/ethers-v5": "^11.1.2", - "@typechain/hardhat": "^8.0.3", - "@types/lodash": "^4.14.202", - "@types/mocha": "^10.0.6", - "@typescript-eslint/eslint-plugin": "^6.21.0", - "@typescript-eslint/parser": "^6.21.0", - "cloc": "^2.11.0", - "copyfiles": "^2.4.1", - "dotenv": "^16.4.1", - "eslint": "^8.56.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-import": "^2.29.1", - "eslint-plugin-prettier": "^5.1.3", - "hardhat": "^2.19.5", - "hardhat-deploy": "^0.11.45", - "husky": "^8.0.3", - "lerna": "^7.4.2", - "node-jq": "^4.3.0", - "nodemon": "^3.0.3", - "npm-run-all": "^4.1.5", - "nyc": "^15.1.0", - "prettier": "^3.2.5", - "prettier-eslint": "^15.0.1", - "solhint": "3.6.2", - "syncpack": "^10.9.3", - "truffle": "^5.11.5", - "ts-node": "^10.9.2", - "typechain": "^8.3.2", - "typedoc": "^0.25.7", - "typescript": "^5.3.3", - "web3": "^1.10.4" - }, - "resolutions": { - "mocha": "^10.2.0", - "cross-fetch": "^4.0.0" - }, "workspaces": { "packages": [ "packages/solidity-semantic-money", @@ -103,6 +101,5 @@ "**/webpack", "**/webpack/**" ] - }, - "version": "0.0.0" + } } diff --git a/packages/automation-contracts/autowrap/package.json b/packages/automation-contracts/autowrap/package.json index a6e7fa8ba6..ad5b341d8c 100644 --- a/packages/automation-contracts/autowrap/package.json +++ b/packages/automation-contracts/autowrap/package.json @@ -1,7 +1,12 @@ { "name": "autowrap", - "version": "0.0.1", "description": "Open contracts that allow upgrading underlying token to supertokens based on running stream", + "version": "0.3.0", + "devDependencies": { + "@openzeppelin/contracts": "^4.9.6", + "@superfluid-finance/ethereum-contracts": "^1.11.0", + "@superfluid-finance/metadata": "^1.4.1" + }, "license": "MIT", "scripts": { "test": "forge test", @@ -10,10 +15,5 @@ "lint": "run-s lint:*", "lint:sol": "solhint -w 0 contracts/*.sol contracts/*/*.sol && echo '✔ Your .sol files look good.'", "check-updates": "ncu --target minor" - }, - "devDependencies": { - "@openzeppelin/contracts": "4.9.6", - "@superfluid-finance/ethereum-contracts": "^1.11.0", - "@superfluid-finance/metadata": "^1.4.0" } } diff --git a/packages/automation-contracts/scheduler/package.json b/packages/automation-contracts/scheduler/package.json index 0445eb3281..8290687a88 100644 --- a/packages/automation-contracts/scheduler/package.json +++ b/packages/automation-contracts/scheduler/package.json @@ -1,7 +1,12 @@ { "name": "scheduler", - "version": "1.2.0", "description": "Open contracts that allow scheduling streams and vestings onchain", + "version": "1.2.0", + "devDependencies": { + "@openzeppelin/contracts": "^4.9.6", + "@superfluid-finance/ethereum-contracts": "^1.11.0", + "@superfluid-finance/metadata": "^1.4.1" + }, "license": "MIT", "scripts": { "test": "forge test", @@ -10,10 +15,5 @@ "lint": "run-s lint:*", "lint:sol": "solhint -w 0 contracts/*.sol contracts/*/*.sol && echo '✔ Your .sol files look good.'", "check-updates": "ncu --target minor" - }, - "devDependencies": { - "@openzeppelin/contracts": "4.9.6", - "@superfluid-finance/ethereum-contracts": "^1.11.0", - "@superfluid-finance/metadata": "^1.4.0" } } diff --git a/packages/ethereum-contracts/.eslintrc.ts.json b/packages/ethereum-contracts/.eslintrc.ts.json index 04b71f8510..1328ba6cde 100644 --- a/packages/ethereum-contracts/.eslintrc.ts.json +++ b/packages/ethereum-contracts/.eslintrc.ts.json @@ -21,6 +21,8 @@ "@typescript-eslint/no-non-null-assertion": "off", "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-var-requires": "off", + "@typescript-eslint/no-require-imports": "off", + "@typescript-eslint/no-unused-expressions": "off", "eslint-comments/disable-enable-pair": [ "error", { diff --git a/packages/ethereum-contracts/.solhint.json b/packages/ethereum-contracts/.solhint.json index 9cbc0f0f15..86c3f4d7b6 100644 --- a/packages/ethereum-contracts/.solhint.json +++ b/packages/ethereum-contracts/.solhint.json @@ -3,14 +3,14 @@ "rules": { "no-inline-assembly": "off", "func-named-parameters": "off", + "gas-custom-errors": "off", + "one-contract-per-file": "off", + "explicit-types": ["off"], "func-name-mixedcase": "error", "func-param-name-mixedcase": "error", "modifier-name-mixedcase": "error", "const-name-snakecase": "error", "immutable-vars-naming": ["off", { "immutablesAsConstants" : false }], - "explicit-types": ["off"], - "custom-errors": "off", - "one-contract-per-file": "off", "reason-string": ["error", { "maxLength": 64 }], "compiler-version": ["off"], "constructor-syntax": "error", diff --git a/packages/ethereum-contracts/README.md b/packages/ethereum-contracts/README.md index 284d2b982c..c13774902d 100644 --- a/packages/ethereum-contracts/README.md +++ b/packages/ethereum-contracts/README.md @@ -35,7 +35,7 @@ If you're building a smart contract that uses Superfluid protocol, or even your ### Installation Prerequisites: -- [node.js v18+](https://nodejs.org/en/download) +- [node.js v18+](https://nodejs.org/en/download). The project recommends 22, and is tested with node 18,20,22. - [yarn](https://classic.yarnpkg.com/en/docs/install) - [forge](https://book.getfoundry.sh/getting-started/installation) diff --git a/packages/ethereum-contracts/contracts/tokens/SETH.sol b/packages/ethereum-contracts/contracts/tokens/SETH.sol index 7b6532cf14..4070afc825 100644 --- a/packages/ethereum-contracts/contracts/tokens/SETH.sol +++ b/packages/ethereum-contracts/contracts/tokens/SETH.sol @@ -19,7 +19,8 @@ contract SETHProxy is ISETHCustom, CustomSuperTokenBase, UUPSProxy { event TokenUpgraded(address indexed account, uint256 amount); event TokenDowngraded(address indexed account, uint256 amount); - // fallback function which mints Super Tokens for received ETH + /// fallback function which mints Super Tokens for received ETH + // solhint-disable-next-line no-complex-fallback receive() external payable override { ISuperToken(address(this)).selfMint(msg.sender, msg.value, new bytes(0)); emit TokenUpgraded(msg.sender, msg.value); diff --git a/packages/ethereum-contracts/package.json b/packages/ethereum-contracts/package.json index ac3064057b..7473056ddf 100644 --- a/packages/ethereum-contracts/package.json +++ b/packages/ethereum-contracts/package.json @@ -1,14 +1,35 @@ { "name": "@superfluid-finance/ethereum-contracts", - "version": "1.11.0", "description": " Ethereum contracts implementation for the Superfluid Protocol", - "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/ethereum-contracts#readme", - "repository": { - "type": "git", - "url": "https://github.com/superfluid-finance/protocol-monorepo.git", - "directory": "packages/ethereum-contracts" + "version": "1.11.0", + "dependencies": { + "@decentral.ee/web3-helpers": "0.5.3", + "@nomiclabs/hardhat-ethers": "2.2.3", + "@openzeppelin/contracts": "4.9.6", + "@truffle/contract": "4.6.31", + "ethereumjs-tx": "2.1.2", + "ethereumjs-util": "7.1.5", + "hardhat": "2.22.9" + }, + "devDependencies": { + "@d10r/truffle-plugin-verify": "^0.6.10", + "@nomiclabs/hardhat-truffle5": "^2.0.7", + "@safe-global/safe-core-sdk": "^3.3.5", + "@safe-global/safe-service-client": "^2.0.3", + "@safe-global/safe-web3-lib": "^1.9.4", + "@superfluid-finance/js-sdk": "^0.6.3", + "@superfluid-finance/metadata": "^1.4.1", + "async": "^3.2.6", + "csv-writer": "^1.6.0", + "ethers": "^5.7.2", + "ganache-time-traveler": "^1.0.16", + "mochawesome": "^7.1.3", + "readline": "^1.3.0", + "solidity-coverage": "^0.8.12", + "solidity-docgen": "^0.6.0-beta.36", + "stack-trace": "0.0.10", + "truffle-flattener": "^1.6.0" }, - "license": "AGPL-3.0-or-later OR MIT", "files": [ "/contracts/**/*", "!/contracts/mocks/*", @@ -25,8 +46,17 @@ "dev-scripts/**/*", "utils/**/*" ], + "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/ethereum-contracts#readme", + "license": "AGPL-3.0-or-later OR MIT", "main": "./dev-scripts/index.js", - "typings": "./types/index.d.ts", + "peerDependencies": { + "ethers": "^5.7.2" + }, + "repository": { + "type": "git", + "url": "https://github.com/superfluid-finance/protocol-monorepo.git", + "directory": "packages/ethereum-contracts" + }, "scripts": { "dev": "yarn dev-foundry", "dev-foundry": "nodemon -e sol -x yarn run-foundry test --hardhat", @@ -75,35 +105,5 @@ "cloc": "tasks/cloc.sh", "docgen": "rm -rf docs/api; hardhat docgen" }, - "dependencies": { - "@decentral.ee/web3-helpers": "0.5.3", - "@nomiclabs/hardhat-ethers": "^2.2.3", - "@openzeppelin/contracts": "4.9.6", - "@truffle/contract": "4.6.31", - "ethereumjs-tx": "2.1.2", - "ethereumjs-util": "7.1.5", - "hardhat": "^2.19.5" - }, - "devDependencies": { - "@d10r/truffle-plugin-verify": "^0.6.10", - "@nomiclabs/hardhat-truffle5": "^2.0.7", - "@safe-global/safe-core-sdk": "^3.3.5", - "@safe-global/safe-service-client": "^2.0.3", - "@safe-global/safe-web3-lib": "^1.9.4", - "@superfluid-finance/js-sdk": "^0.6.3", - "@superfluid-finance/metadata": "^1.4.0", - "async": "^3.2.5", - "csv-writer": "^1.6.0", - "ethers": "^5.7.2", - "ganache-time-traveler": "1.0.16", - "mochawesome": "^7.1.3", - "readline": "1.3.0", - "solidity-coverage": "0.8.6", - "solidity-docgen": "^0.6.0-beta.36", - "stack-trace": "0.0.10", - "truffle-flattener": "^1.6.0" - }, - "peerDependencies": { - "ethers": "^5.7.2" - } + "typings": "./types/index.d.ts" } diff --git a/packages/hot-fuzz/.solhint.json b/packages/hot-fuzz/.solhint.json index 6554ad1885..f127ecd0bb 100644 --- a/packages/hot-fuzz/.solhint.json +++ b/packages/hot-fuzz/.solhint.json @@ -9,7 +9,7 @@ "max-states-count": "off", "no-inline-assembly": "off", "mark-callable-contracts": "off", - "custom-errors": "off", + "gas-custom-errors": "off", "one-contract-per-file": "off", "max-line-length": ["error", 120], "func-param-name-mixedcase": "error", diff --git a/packages/hot-fuzz/package.json b/packages/hot-fuzz/package.json index 5251c6af1a..6bc9083056 100644 --- a/packages/hot-fuzz/package.json +++ b/packages/hot-fuzz/package.json @@ -1,33 +1,31 @@ { "name": "@superfluid-finance/hot-fuzz", - "version": "0.1.0", "description": "A hot fuzz for testing Superfluid protocol and Super Apps", - "main": "index.js", - "scripts": { - "lint": "run-s lint:*", - "lint:sol": "solhint -w 0 contracts/*.sol contracts/*/*.sol && echo '✔ Your .sol files look good.'", - "check-updates": "ncu --target minor" - }, + "version": "0.1.0", "bin": { "hot-fuzz": "./hot-fuzz" }, - "repository": { - "type": "git", - "url": "https://github.com/superfluid-finance/protocol-monorepo.git", - "directory": "packages/hot-fuzz" - }, + "bugs": "https://github.com/superfluid-finance/protocol-monorepo/issues", "dependencies": { "@openzeppelin/contracts": "4.9.6" }, - "peerDependencies": { - "@superfluid-finance/ethereum-contracts": "1.8.0" - }, "devDependencies": { "@superfluid-finance/ethereum-contracts": "^1.11.0" }, + "homepage": "https://github.com/superfluid-finance/protocol-monorepo#readme", "license": "AGPL-3.0", - "bugs": { - "url": "https://github.com/superfluid-finance/protocol-monorepo/issues" + "main": "index.js", + "peerDependencies": { + "@superfluid-finance/ethereum-contracts": "1.8.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/superfluid-finance/protocol-monorepo.git", + "directory": "packages/hot-fuzz" }, - "homepage": "https://github.com/superfluid-finance/protocol-monorepo#readme" + "scripts": { + "lint": "run-s lint:*", + "lint:sol": "solhint -w 0 contracts/*.sol contracts/*/*.sol && echo '✔ Your .sol files look good.'", + "check-updates": "ncu --target minor" + } } diff --git a/packages/js-sdk/package.json b/packages/js-sdk/package.json index b6c6eb67ba..72ae0df589 100644 --- a/packages/js-sdk/package.json +++ b/packages/js-sdk/package.json @@ -1,16 +1,24 @@ { "name": "@superfluid-finance/js-sdk", - "version": "0.6.3", "description": "Javascript SDK for building with Superfluid Protocol", - "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/js-sdk#readme", - "repository": { - "type": "git", - "url": "https://github.com/superfluid-finance/protocol-monorepo.git", - "directory": "packages/js-sdk" + "version": "0.6.3", + "browser": { + "fs": false, + "path": false + }, + "dependencies": { + "@superfluid-finance/metadata": "^1.4.1", + "@truffle/contract": "4.6.31", + "auto-bind": "4.0.0", + "node-fetch": "2.7.0" + }, + "devDependencies": { + "@superfluid-finance/ethereum-contracts": "^1.11.0", + "chai-as-promised": "^8.0.0", + "webpack": "^5.94.0", + "webpack-bundle-analyzer": "^4.10.2", + "webpack-cli": "^5.1.4" }, - "license": "MIT", - "main": "src/index.js", - "types": "src/index.d.ts", "files": [ "src/**/*.md", "src/**/*.d.ts", @@ -18,9 +26,13 @@ "src/**/*.js", "dist/index.js" ], - "browser": { - "fs": false, - "path": false + "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/js-sdk#readme", + "license": "MIT", + "main": "src/index.js", + "repository": { + "type": "git", + "url": "https://github.com/superfluid-finance/protocol-monorepo.git", + "directory": "packages/js-sdk" }, "scripts": { "dev": "nodemon -e js,ts -i build -x 'truffle test 2>&1'", @@ -39,17 +51,5 @@ "check-updates": "ncu --target minor --dep prod,dev", "cloc": "sh tasks/cloc.sh" }, - "dependencies": { - "@superfluid-finance/metadata": "^1.4.0", - "@truffle/contract": "4.6.31", - "auto-bind": "4.0.0", - "node-fetch": "2.7.0" - }, - "devDependencies": { - "@superfluid-finance/ethereum-contracts": "^1.11.0", - "chai-as-promised": "^7.1.1", - "webpack": "^5.90.1", - "webpack-bundle-analyzer": "^4.10.1", - "webpack-cli": "^4.10.0" - } + "types": "src/index.d.ts" } diff --git a/packages/metadata/package.json b/packages/metadata/package.json index 99bfe4f4bc..c2272040e3 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -1,30 +1,28 @@ { - "name": "@superfluid-finance/metadata", - "version": "1.4.1", - "description": "Superfluid Metadata", - "main": "main/index.cjs", - "module": "module/index.js", - "type": "module", - "types": "module/index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/superfluid-finance/protocol-monorepo.git", - "directory": "packages/metadata" - }, - "bugs": { - "url": "https://github.com/superfluid-finance/protocol-monorepo/issues" - }, - "scripts": { - "build": "./build.sh && echo '@superfluid-finance/metadata build successfully'", - "bump-version-to": "./bump-version-to.sh $@", - "lint": "run-s lint:*", - "lint:js-eslint": "eslint . --max-warnings=0 --report-unused-disable-directives && echo '✔ Your .js files look good.'", - "lint:consistency": "./tasks/compare-committed-against-build.sh", - "fix": "run-s fix:*", - "fix:eslint": "yarn lint:js-eslint --fix", - "check-updates": "ncu --target minor" - }, - "author": "Superfluid", - "license": "MIT", - "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/metadata#readme" + "name": "@superfluid-finance/metadata", + "description": "Superfluid Metadata", + "version": "1.4.1", + "author": "Superfluid", + "bugs": "https://github.com/superfluid-finance/protocol-monorepo/issues", + "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/metadata#readme", + "license": "MIT", + "main": "main/index.cjs", + "module": "module/index.js", + "repository": { + "type": "git", + "url": "https://github.com/superfluid-finance/protocol-monorepo.git", + "directory": "packages/metadata" + }, + "scripts": { + "build": "./build.sh && echo '@superfluid-finance/metadata build successfully'", + "bump-version-to": "./bump-version-to.sh $@", + "lint": "run-s lint:*", + "lint:js-eslint": "eslint . --max-warnings=0 --report-unused-disable-directives && echo '✔ Your .js files look good.'", + "lint:consistency": "./tasks/compare-committed-against-build.sh", + "fix": "run-s fix:*", + "fix:eslint": "yarn lint:js-eslint --fix", + "check-updates": "ncu --target minor" + }, + "type": "module", + "types": "module/index.d.ts" } diff --git a/packages/sdk-core/.eslintrc.json b/packages/sdk-core/.eslintrc.json index 23c20004f9..600135a0a2 100644 --- a/packages/sdk-core/.eslintrc.json +++ b/packages/sdk-core/.eslintrc.json @@ -33,6 +33,7 @@ "@typescript-eslint/explicit-module-boundary-types": "off", "@typescript-eslint/no-non-null-assertion": "off", "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-empty-object-type": "off", "eslint-comments/disable-enable-pair": [ "error", { diff --git a/packages/sdk-core/package.json b/packages/sdk-core/package.json index cbf1aca57c..012baa9e6c 100644 --- a/packages/sdk-core/package.json +++ b/packages/sdk-core/package.json @@ -1,17 +1,28 @@ { "name": "@superfluid-finance/sdk-core", - "version": "0.8.0", "description": "SDK Core for building with Superfluid Protocol", - "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/sdk-core#readme", - "repository": { - "type": "git", - "url": "https://github.com/superfluid-finance/protocol-monorepo.git", - "directory": "packages/sdk-core" + "version": "0.8.0", + "bugs": "https://github.com/superfluid-finance/protocol-monorepo/issues", + "dependencies": { + "@superfluid-finance/ethereum-contracts": "1.11.0", + "@superfluid-finance/metadata": "^1.4.1", + "browserify": "17.0.0", + "graphql-request": "6.1.0", + "lodash": "4.17.21", + "tsify": "5.0.4" + }, + "devDependencies": { + "@graphql-codegen/cli": "^5.0.2", + "@graphql-codegen/near-operation-file-preset": "^3.0.0", + "@graphql-typed-document-node/core": "^3.2.0", + "ajv": "^8.17.1", + "ethers": "^5.7.2", + "get-graphql-schema": "^2.1.2", + "mocha": "^10.7.3" + }, + "engines": { + "node": ">=12" }, - "license": "MIT", - "main": "dist/main/index.js", - "module": "dist/module/index.js", - "types": "dist/module/index.d.ts", "files": [ "dist/main", "dist/module", @@ -20,6 +31,19 @@ "LICENSE", "README.md" ], + "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/sdk-core#readme", + "license": "MIT", + "main": "dist/main/index.js", + "module": "dist/module/index.js", + "peerDependencies": { + "ethers": "^5.7.2", + "graphql": "^16.0.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/superfluid-finance/protocol-monorepo.git", + "directory": "packages/sdk-core" + }, "scripts": { "build": "yarn generate && rm -rf dist && run-s build:*", "build:typechain-types": "./tasks/build-types.sh", @@ -52,38 +76,5 @@ "get-graphql-schema:custom-url": "get-graphql-schema $1 > src/subgraph/schema.graphql", "cloc": "sh tasks/cloc.sh" }, - "bugs": { - "url": "https://github.com/superfluid-finance/protocol-monorepo/issues" - }, - "dependencies": { - "@superfluid-finance/ethereum-contracts": "^1.11.0", - "@superfluid-finance/metadata": "^1.4.0", - "browserify": "^17.0.0", - "graphql-request": "^6.1.0", - "lodash": "^4.17.21", - "tsify": "^5.0.4" - }, - "devDependencies": { - "@graphql-codegen/cli": "^5.0.2", - "@graphql-codegen/introspection": "^4.0.2", - "@graphql-codegen/near-operation-file-preset": "^2.5.0", - "@graphql-codegen/typed-document-node": "^5.0.4", - "@graphql-codegen/typescript": "^4.0.4", - "@graphql-codegen/typescript-operations": "^4.1.2", - "@graphql-typed-document-node/core": "^3.2.0", - "ajv": "^8.12.0", - "ethers": "^5.7.2", - "get-graphql-schema": "^2.1.2", - "mocha": "^10.2.0" - }, - "peerDependencies": { - "ethers": "^5.7.2", - "graphql": "^16.0.0" - }, - "resolutions": { - "graphql": "^16.0.0" - }, - "engines": { - "node": ">=12" - } + "types": "dist/module/index.d.ts" } diff --git a/packages/sdk-redux/package.json b/packages/sdk-redux/package.json index 471816f638..f43c44071b 100644 --- a/packages/sdk-redux/package.json +++ b/packages/sdk-redux/package.json @@ -1,18 +1,54 @@ { "name": "@superfluid-finance/sdk-redux", - "version": "0.6.1", "description": "SDK Redux for streamlined front-end application development with Superfluid Protocol", + "version": "0.6.1", + "bugs": "https://github.com/superfluid-finance/protocol-monorepo/issues", + "config": { + "commitizen": { + "path": "cz-conventional-changelog" + } + }, + "dependencies": { + "graphql-request": "6.1.0", + "lodash": "4.17.21", + "promise-retry": "2.0.1" + }, + "devDependencies": { + "@reduxjs/toolkit": "^1.9.7", + "@types/promise-retry": "^1.1.6", + "@types/react": "^18", + "@types/react-dom": "^18", + "react": "^18", + "react-dom": "^18", + "react-redux": "^8.1.3" + }, + "directories": { + "test": "test" + }, + "engines": { + "node": ">=12" + }, + "files": [ + "dist/main", + "dist/module", + "CHANGELOG.md", + "LICENSE", + "README.md" + ], "homepage": "https://docs.superfluid.finance/", + "keywords": [], + "license": "MIT", + "main": "dist/main/index.js", + "module": "dist/module/index.js", + "peerDependencies": { + "@reduxjs/toolkit": "^1.7.0 || ^1.8.0 || ^1.9.0", + "@superfluid-finance/sdk-core": ">0.7.0" + }, "repository": { "type": "git", "url": "https://github.com/superfluid-finance/protocol-monorepo.git", "directory": "packages/sdk-redux" }, - "license": "MIT", - "main": "dist/main/index.js", - "typings": "dist/module/index.d.ts", - "module": "dist/module/index.js", - "keywords": [], "scripts": { "build": "rm -rf dist && run-p -l build:*", "build:main": "tsc -p tsconfig.json", @@ -32,43 +68,5 @@ "sideEffects": [ "./src/sdkReduxConfig.ts" ], - "engines": { - "node": ">=12" - }, - "dependencies": { - "graphql-request": "^5.2.0", - "lodash": "^4.17.21", - "promise-retry": "^2.0.1" - }, - "devDependencies": { - "@reduxjs/toolkit": "^1.9.7", - "@types/promise-retry": "^1.1.6", - "@types/react": "^18", - "@types/react-dom": "^18", - "react": "^18", - "react-dom": "^18", - "react-redux": "^8.1.3" - }, - "peerDependencies": { - "@reduxjs/toolkit": "^1.7.0 || ^1.8.0 || ^1.9.0", - "@superfluid-finance/sdk-core": ">0.7.0" - }, - "files": [ - "dist/main", - "dist/module", - "CHANGELOG.md", - "LICENSE", - "README.md" - ], - "config": { - "commitizen": { - "path": "cz-conventional-changelog" - } - }, - "bugs": { - "url": "https://github.com/superfluid-finance/protocol-monorepo/issues" - }, - "directories": { - "test": "test" - } + "typings": "dist/module/index.d.ts" } diff --git a/packages/solidity-semantic-money/.solhint.json b/packages/solidity-semantic-money/.solhint.json index 8011799317..f4923a5b6f 100644 --- a/packages/solidity-semantic-money/.solhint.json +++ b/packages/solidity-semantic-money/.solhint.json @@ -5,9 +5,9 @@ "func-named-parameters": "off", "func-name-mixedcase": "off", "const-name-snakecase": "off", + "gas-custom-errors": "off", "func-param-name-mixedcase": "error", "modifier-name-mixedcase": "error", - "custom-errors": "off", "one-contract-per-file": "off", "immutable-vars-naming": ["off", { "immutablesAsConstants" : false }], "explicit-types": ["off"], diff --git a/packages/solidity-semantic-money/package.json b/packages/solidity-semantic-money/package.json index d7c2654397..a83fa185dd 100644 --- a/packages/solidity-semantic-money/package.json +++ b/packages/solidity-semantic-money/package.json @@ -1,36 +1,34 @@ { - "name": "@superfluid-finance/solidity-semantic-money", - "version": "0.1.0", - "description": "Semantic money implementation in solidity.", - "main": "index.js", - "directories": { - "src": "src", - "test": "test" - }, - "scripts": { - "build": "make build-all", - "test": "make test-all", - "lint": "run-s lint:*", - "lint:sol": "solhint -w 0 `find src test -name *.sol` && echo '✔ Your .sol files look good.'", - "check-updates": "ncu --target minor" - }, - "dependencies": { - "@openzeppelin/contracts": "4.9.6" - }, - "repository": { - "type": "git", - "url": "https://github.com/superfluid-finance/protocol-monorepo.git", - "directory": "packages/solidity-semantic-money" - }, - "keywords": [ - "money", - "finance", - "semantic money", - "solidity" - ], - "license": "MIT", - "bugs": { - "url": "https://github.com/superfluid-finance/protocol-monorepo/issues" - }, - "homepage": "https://github.com/superfluid-finance/protocol-monorepo#readme" + "name": "@superfluid-finance/solidity-semantic-money", + "description": "Semantic money implementation in solidity.", + "version": "0.1.0", + "bugs": "https://github.com/superfluid-finance/protocol-monorepo/issues", + "dependencies": { + "@openzeppelin/contracts": "4.9.6" + }, + "directories": { + "src": "src", + "test": "test" + }, + "homepage": "https://github.com/superfluid-finance/protocol-monorepo#readme", + "keywords": [ + "money", + "finance", + "semantic money", + "solidity" + ], + "license": "MIT", + "main": "index.js", + "repository": { + "type": "git", + "url": "https://github.com/superfluid-finance/protocol-monorepo.git", + "directory": "packages/solidity-semantic-money" + }, + "scripts": { + "build": "make build-all", + "test": "make test-all", + "lint": "run-s lint:*", + "lint:sol": "solhint -w 0 `find src test -name *.sol` && echo '✔ Your .sol files look good.'", + "check-updates": "ncu --target minor" + } } diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 1e9e37cbbb..55ff394c9f 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -1,14 +1,28 @@ { "name": "@superfluid-finance/subgraph", - "version": "2.1.0", "description": "Subgraph for the Superfluid Ethereum contracts.", + "version": "2.1.0", + "dependencies": { + "@graphprotocol/graph-cli": "0.80.1", + "@graphprotocol/graph-ts": "0.35.1", + "@superfluid-finance/sdk-core": "0.8.0", + "mustache": "4.2.0" + }, + "devDependencies": { + "@superfluid-finance/metadata": "^1.4.1", + "coingecko-api": "^1.0.10", + "graphql": "^16.9.0", + "graphql-request": "^6.1.0", + "lodash": "^4.17.21", + "matchstick-as": "^0.6.0" + }, "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/subgraph", + "license": "MIT", "repository": { "type": "git", "url": "https://github.com/superfluid-finance/protocol-monorepo.git", "directory": "packages/subgraph" }, - "license": "MIT", "scripts": { "getAbi": "node scripts/getAbi", "codegen": "graph codegen", @@ -46,19 +60,5 @@ "generate-sf-meta-local": "COMMIT_HASH=local CONFIGURATION=local BRANCH=local TAG=local ./tasks/getSFMeta.sh", "check-updates": "ncu --target minor --dep prod,dev", "cloc": "cloc src" - }, - "dependencies": { - "@graphprotocol/graph-cli": "0.73.0", - "@graphprotocol/graph-ts": "0.35.1", - "@superfluid-finance/sdk-core": "^0.8.0", - "mustache": "^4.2.0" - }, - "devDependencies": { - "@superfluid-finance/metadata": "^1.4.0", - "coingecko-api": "^1.0.10", - "graphql": "^16.8.1", - "graphql-request": "^6.1.0", - "lodash": "^4.17.21", - "matchstick-as": "^0.6.0" } } diff --git a/tasks/find-dup-devDependencies.sh b/tasks/find-dup-devDependencies.sh index 9d3e8d6e6e..9c5263c352 100755 --- a/tasks/find-dup-devDependencies.sh +++ b/tasks/find-dup-devDependencies.sh @@ -1,12 +1,13 @@ #!/usr/bin/env bash +# Synopsis: find duplicated devDependencies in packages -P=$(echo package.json packages/*/package.json packages/*/*/package.json) -# find duplicated devDependencies in packages -echo "$P" | xargs -- jq -r ".devDependencies | keys | .[]" | \ +P=$(jq -r ".workspaces.packages | .[]" package.json | xargs printf "%s/package.json\n") +P="package.json $P" +echo "$P" | \ + xargs -- jq -r "if .devDependencies? then .devDependencies | keys | .[] else empty end" | \ sort | uniq -c | \ - grep -ve '^ *1' | awk '{print $2}' | while read -r i;do - echo "$i" - echo "$P" | xargs -- grep "\"$i\"" - echo - exit 42 -done + grep -ve '^ *1 ' | awk '{print $2}' | while read -r i; do + echo "$i" + echo "$P" | xargs -- grep "\"$i\"" + echo + done diff --git a/yarn.lock b/yarn.lock index 1b89030f9c..6d5880bb95 100644 --- a/yarn.lock +++ b/yarn.lock @@ -176,6 +176,14 @@ "@babel/highlight" "^7.22.13" chalk "^2.4.2" +"@babel/code-frame@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" + integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== + dependencies: + "@babel/highlight" "^7.24.7" + picocolors "^1.0.0" + "@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.5": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.21.0.tgz#c241dc454e5b5917e40d37e525e2f4530c399298" @@ -186,7 +194,12 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.9.tgz#71cdb00a1ce3a329ce4cbec3a44f9fef35669730" integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ== -"@babel/core@^7.14.0", "@babel/core@^7.7.5": +"@babel/compat-data@^7.25.2": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.25.4.tgz#7d2a80ce229890edcf4cc259d4d696cb4dae2fcb" + integrity sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ== + +"@babel/core@^7.14.0": version "7.21.3" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.3.tgz#cf1c877284a469da5d1ce1d1e53665253fae712e" integrity sha512-qIJONzoa/qiHghnm0l1n4i/6IIziDpzqc36FBs4pzMhDUraHqponwJLiAKm1hGLP3OSB/TVNz6rMwVGpwxxySw== @@ -228,6 +241,27 @@ json5 "^2.2.2" semver "^6.3.1" +"@babel/core@^7.23.9": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.25.2.tgz#ed8eec275118d7613e77a352894cd12ded8eba77" + integrity sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.25.0" + "@babel/helper-compilation-targets" "^7.25.2" + "@babel/helper-module-transforms" "^7.25.2" + "@babel/helpers" "^7.25.0" + "@babel/parser" "^7.25.0" + "@babel/template" "^7.25.0" + "@babel/traverse" "^7.25.2" + "@babel/types" "^7.25.2" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + "@babel/generator@^7.14.0", "@babel/generator@^7.18.13", "@babel/generator@^7.21.3": version "7.21.3" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.3.tgz#232359d0874b392df04045d72ce2fd9bb5045fce" @@ -258,6 +292,16 @@ "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" +"@babel/generator@^7.25.0", "@babel/generator@^7.25.4": + version "7.25.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.25.5.tgz#b31cf05b3fe8c32d206b6dad03bb0aacbde73450" + integrity sha512-abd43wyLfbWoxC6ahM8xTkqLpGB2iWBVyuKC9/srhFunCd1SDNrV1s72bBpK4hLj8KLzHBBcOblvLQZBNw9r3w== + dependencies: + "@babel/types" "^7.25.4" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" @@ -287,6 +331,17 @@ lru-cache "^5.1.1" semver "^6.3.1" +"@babel/helper-compilation-targets@^7.25.2": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.2.tgz#e1d9410a90974a3a5a66e84ff55ef62e3c02d06c" + integrity sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw== + dependencies: + "@babel/compat-data" "^7.25.2" + "@babel/helper-validator-option" "^7.24.8" + browserslist "^4.23.1" + lru-cache "^5.1.1" + semver "^6.3.1" + "@babel/helper-create-class-features-plugin@^7.18.6": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.0.tgz#64f49ecb0020532f19b1d014b03bccaa1ab85fb9" @@ -372,6 +427,14 @@ dependencies: "@babel/types" "^7.22.5" +"@babel/helper-module-imports@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz#f2f980392de5b84c3328fc71d38bd81bbb83042b" + integrity sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/helper-module-transforms@^7.21.2": version "7.21.2" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz#160caafa4978ac8c00ac66636cb0fa37b024e2d2" @@ -397,6 +460,16 @@ "@babel/helper-split-export-declaration" "^7.22.6" "@babel/helper-validator-identifier" "^7.22.5" +"@babel/helper-module-transforms@^7.25.2": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.25.2.tgz#ee713c29768100f2776edf04d4eb23b8d27a66e6" + integrity sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ== + dependencies: + "@babel/helper-module-imports" "^7.24.7" + "@babel/helper-simple-access" "^7.24.7" + "@babel/helper-validator-identifier" "^7.24.7" + "@babel/traverse" "^7.25.2" + "@babel/helper-optimise-call-expression@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" @@ -440,6 +513,14 @@ dependencies: "@babel/types" "^7.22.5" +"@babel/helper-simple-access@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz#bcade8da3aec8ed16b9c4953b74e506b51b5edb3" + integrity sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/helper-skip-transparent-expression-wrappers@^7.20.0": version "7.20.0" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz#fbe4c52f60518cab8140d77101f0e63a8a230684" @@ -471,6 +552,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== +"@babel/helper-string-parser@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz#5b3329c9a58803d5df425e5785865881a81ca48d" + integrity sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ== + "@babel/helper-validator-identifier@^7.19.1": version "7.19.1" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" @@ -486,6 +572,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz#9544ef6a33999343c8740fa51350f30eeaaaf193" integrity sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ== +"@babel/helper-validator-identifier@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" + integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== + "@babel/helper-validator-option@^7.18.6": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz#8224c7e13ace4bafdc4004da2cf064ef42673180" @@ -496,6 +587,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz#de52000a15a177413c8234fa3a8af4ee8102d0ac" integrity sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw== +"@babel/helper-validator-option@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz#3725cdeea8b480e86d34df15304806a06975e33d" + integrity sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q== + "@babel/helpers@^7.21.0": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.21.0.tgz#9dd184fb5599862037917cdc9eecb84577dc4e7e" @@ -514,6 +610,14 @@ "@babel/traverse" "^7.22.10" "@babel/types" "^7.22.10" +"@babel/helpers@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.25.0.tgz#e69beb7841cb93a6505531ede34f34e6a073650a" + integrity sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw== + dependencies: + "@babel/template" "^7.25.0" + "@babel/types" "^7.25.0" + "@babel/highlight@^7.18.6", "@babel/highlight@^7.22.10": version "7.22.10" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.10.tgz#02a3f6d8c1cb4521b2fd0ab0da8f4739936137d7" @@ -532,6 +636,16 @@ chalk "^2.4.2" js-tokens "^4.0.0" +"@babel/highlight@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" + integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== + dependencies: + "@babel/helper-validator-identifier" "^7.24.7" + chalk "^2.4.2" + js-tokens "^4.0.0" + picocolors "^1.0.0" + "@babel/parser@^7.14.0", "@babel/parser@^7.16.8", "@babel/parser@^7.20.7", "@babel/parser@^7.21.3": version "7.21.3" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.3.tgz#1d285d67a19162ff9daa358d4cb41d50c06220b3" @@ -547,6 +661,13 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719" integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw== +"@babel/parser@^7.23.9", "@babel/parser@^7.25.0", "@babel/parser@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.4.tgz#af4f2df7d02440286b7de57b1c21acfb2a6f257a" + integrity sha512-nq+eWrOgdtu3jG5Os4TQP3x3cLA8hR8TvJNjD8vnPa20WGycimcparWnLK4jJhElTK6SDyuJo1weMKO/5LpmLA== + dependencies: + "@babel/types" "^7.25.4" + "@babel/plugin-proposal-class-properties@^7.0.0": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" @@ -807,6 +928,15 @@ "@babel/parser" "^7.22.5" "@babel/types" "^7.22.5" +"@babel/template@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.0.tgz#e733dc3134b4fede528c15bc95e89cb98c52592a" + integrity sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/parser" "^7.25.0" + "@babel/types" "^7.25.0" + "@babel/traverse@^7.14.0", "@babel/traverse@^7.16.8", "@babel/traverse@^7.20.7", "@babel/traverse@^7.21.0", "@babel/traverse@^7.21.2", "@babel/traverse@^7.21.3", "@babel/traverse@^7.22.10": version "7.23.2" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8" @@ -823,6 +953,19 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.24.7", "@babel/traverse@^7.25.2": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.4.tgz#648678046990f2957407e3086e97044f13c3e18e" + integrity sha512-VJ4XsrD+nOvlXyLzmLzUs/0qjFS4sK30te5yEFlvbbUNEgKaVb2BHZUpAL+ttLPQAHNrsI3zZisbfha5Cvr8vg== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.25.4" + "@babel/parser" "^7.25.4" + "@babel/template" "^7.25.0" + "@babel/types" "^7.25.4" + debug "^4.3.1" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.16.8", "@babel/types@^7.18.13", "@babel/types@^7.18.6", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.7", "@babel/types@^7.21.0", "@babel/types@^7.21.2", "@babel/types@^7.21.3": version "7.21.3" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.3.tgz#4865a5357ce40f64e3400b0f3b737dc6d4f64d05" @@ -850,41 +993,14 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" -"@chainsafe/as-sha256@^0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@chainsafe/as-sha256/-/as-sha256-0.3.1.tgz#3639df0e1435cab03f4d9870cc3ac079e57a6fc9" - integrity sha512-hldFFYuf49ed7DAakWVXSJODuq3pzJEguD8tQ7h+sGkM18vja+OFoJI9krnGmgzyuZC2ETX0NOIcCTy31v2Mtg== - -"@chainsafe/persistent-merkle-tree@^0.4.2": - version "0.4.2" - resolved "https://registry.yarnpkg.com/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.4.2.tgz#4c9ee80cc57cd3be7208d98c40014ad38f36f7ff" - integrity sha512-lLO3ihKPngXLTus/L7WHKaw9PnNJWizlOF1H9NNzHP6Xvh82vzg9F2bzkXhYIFshMZ2gTCEz8tq6STe7r5NDfQ== - dependencies: - "@chainsafe/as-sha256" "^0.3.1" - -"@chainsafe/persistent-merkle-tree@^0.5.0": - version "0.5.0" - resolved "https://registry.yarnpkg.com/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.5.0.tgz#2b4a62c9489a5739dedd197250d8d2f5427e9f63" - integrity sha512-l0V1b5clxA3iwQLXP40zYjyZYospQLZXzBVIhhr9kDg/1qHZfzzHw0jj4VPBijfYCArZDlPkRi1wZaV2POKeuw== - dependencies: - "@chainsafe/as-sha256" "^0.3.1" - -"@chainsafe/ssz@^0.10.0": - version "0.10.2" - resolved "https://registry.yarnpkg.com/@chainsafe/ssz/-/ssz-0.10.2.tgz#c782929e1bb25fec66ba72e75934b31fd087579e" - integrity sha512-/NL3Lh8K+0q7A3LsiFq09YXS9fPE+ead2rr7vM2QK8PLzrNsw3uqrif9bpRX5UxgeRjM+vYi+boCM3+GM4ovXg== +"@babel/types@^7.24.7", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.4.tgz#6bcb46c72fdf1012a209d016c07f769e10adcb5f" + integrity sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ== dependencies: - "@chainsafe/as-sha256" "^0.3.1" - "@chainsafe/persistent-merkle-tree" "^0.5.0" - -"@chainsafe/ssz@^0.9.2": - version "0.9.4" - resolved "https://registry.yarnpkg.com/@chainsafe/ssz/-/ssz-0.9.4.tgz#696a8db46d6975b600f8309ad3a12f7c0e310497" - integrity sha512-77Qtg2N1ayqs4Bg/wvnWfg5Bta7iy7IRh8XqXh7oNMeP2HBbBwx8m6yTpA8p0EHItWPEBkgZd5S5/LSlp3GXuQ== - dependencies: - "@chainsafe/as-sha256" "^0.3.1" - "@chainsafe/persistent-merkle-tree" "^0.4.2" - case "^1.6.3" + "@babel/helper-string-parser" "^7.24.8" + "@babel/helper-validator-identifier" "^7.24.7" + to-fast-properties "^2.0.0" "@cspotcode/source-map-support@^0.8.0": version "0.8.1" @@ -917,34 +1033,34 @@ resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== -"@effect/data@0.17.1", "@effect/data@^0.17.0", "@effect/data@^0.17.1": - version "0.17.1" - resolved "https://registry.yarnpkg.com/@effect/data/-/data-0.17.1.tgz#8a5904c16ae67fa132641a6d9490a46b840522fd" - integrity sha512-QCYkLE5Y5Dm5Yax5R3GmW4ZIgTx7W+kSZ7yq5eqQ/mFWa8i4yxbLuu8cudqzdeZtRtTGZKlhDxfFfgVtMywXJg== +"@effect/schema@0.71.1": + version "0.71.1" + resolved "https://registry.yarnpkg.com/@effect/schema/-/schema-0.71.1.tgz#4d344b3c44b2490fb6d6698439956a25ae18ea0f" + integrity sha512-XvFttkuBUL3s4ofZ+OVE4Pagb4wsPG8laSS8iO5lVI9Yt1zIM49uxlYIA2BJ45jjS3MdplUepC0NilotKnjU2A== + dependencies: + fast-check "^3.21.0" -"@effect/io@0.37.1", "@effect/io@^0.37.0": - version "0.37.1" - resolved "https://registry.yarnpkg.com/@effect/io/-/io-0.37.1.tgz#53ecd1ab8438cead598f3b0dd75edc84db817720" - integrity sha512-Ez3GfcG+gDDfAiBXtSjJpSrPU5Guiyw69LsYkMtIukFwyNwpHWLhYaVgfVbVjoQasil8KiFSQJSd5DbJL6nqPg== +"@emnapi/core@^1.1.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@emnapi/core/-/core-1.2.0.tgz#7b738e5033738132bf6af0b8fae7b05249bdcbd7" + integrity sha512-E7Vgw78I93we4ZWdYCb4DGAwRROGkMIXk7/y87UmANR+J6qsWusmC3gLt0H+O0KOt5e6O38U8oJamgbudrES/w== dependencies: - "@effect/data" "^0.17.0" + "@emnapi/wasi-threads" "1.0.1" + tslib "^2.4.0" -"@effect/match@0.31.0": - version "0.31.0" - resolved "https://registry.yarnpkg.com/@effect/match/-/match-0.31.0.tgz#557a00d1814f84f95e045d0c9ab97a77576808a5" - integrity sha512-QT0HSh19Y6iHAghc51Yt/rYDU9/jhs7O+2kSEQiJqj4xqCLjfJONWsK19xBCNbuV5bt3ZO1NGFqvsWeNR7ZhDg== +"@emnapi/runtime@^1.1.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.2.0.tgz#71d018546c3a91f3b51106530edbc056b9f2f2e3" + integrity sha512-bV21/9LQmcQeCPEg3BDFtvwL6cwiTMksYNWQQ4KOxCZikEGalWtenoZ0wCiukJINlGCIi2KXx01g4FoH/LxpzQ== dependencies: - "@effect/data" "^0.17.1" - "@effect/schema" "^0.32.0" + tslib "^2.4.0" -"@effect/schema@0.32.0", "@effect/schema@^0.32.0": - version "0.32.0" - resolved "https://registry.yarnpkg.com/@effect/schema/-/schema-0.32.0.tgz#fb29b86c35cd0364ac22683506c29a6859839d22" - integrity sha512-4HJK/cFkVPdIjYICy0eRsL7JuuLJ6mE3aJC5rX9OuUIei/qfctFEEX2NaARjtGX7hACBrRcuJCNwiq+54TTjFw== +"@emnapi/wasi-threads@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@emnapi/wasi-threads/-/wasi-threads-1.0.1.tgz#d7ae71fd2166b1c916c6cd2d0df2ef565a2e1a5b" + integrity sha512-iIBu7mwkq4UQGeMEM8bLwNK962nXdhodeScX4slfQnRhEMMzvYivHhutCIk8uojvmASXXPC2WNEjwxFWk72Oqw== dependencies: - "@effect/data" "^0.17.1" - "@effect/io" "^0.37.0" - fast-check "^3.12.0" + tslib "^2.4.0" "@ensdomains/address-encoder@^0.1.7": version "0.1.9" @@ -1003,16 +1119,16 @@ dependencies: eslint-visitor-keys "^3.3.0" +"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.6.1": + version "4.11.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae" + integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A== + "@eslint-community/regexpp@^4.4.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.4.0.tgz#3e61c564fcd6b921cb789838631c5ee44df09403" integrity sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ== -"@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": - version "4.6.2" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.6.2.tgz#1816b5f6948029c5eaacb0703b850ee0cb37d8f8" - integrity sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw== - "@eslint/eslintrc@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.0.1.tgz#7888fe7ec8f21bc26d646dbd2c11cd776e21192d" @@ -1048,10 +1164,10 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.36.0.tgz#9837f768c03a1e4a30bd304a64fb8844f0e72efe" integrity sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg== -"@eslint/js@8.56.0": - version "8.56.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.56.0.tgz#ef20350fec605a7f7035a01764731b2de0f3782b" - integrity sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A== +"@eslint/js@8.57.0": + version "8.57.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" + integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== "@ethereumjs/common@2.5.0": version "2.5.0" @@ -1314,7 +1430,7 @@ dependencies: "@ethersproject/logger" "^5.7.0" -"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.7.1", "@ethersproject/providers@^5.7.2": +"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.7.2": version "5.7.2" resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== @@ -1499,10 +1615,10 @@ optionalDependencies: "@trufflesuite/bigint-buffer" "1.1.9" -"@graphprotocol/graph-cli@0.73.0": - version "0.73.0" - resolved "https://registry.yarnpkg.com/@graphprotocol/graph-cli/-/graph-cli-0.73.0.tgz#ff4ab0a153b9fedad4ade3cddb52caf68f519c1b" - integrity sha512-g+EapDRvxhRjMccnUJE8gBRGDIF6mXqtv8g0tzzixVClw/BezBni8QXtXMHs4Gg0G2UnerJJLp5ZQgZqtHWnmg== +"@graphprotocol/graph-cli@0.80.1": + version "0.80.1" + resolved "https://registry.yarnpkg.com/@graphprotocol/graph-cli/-/graph-cli-0.80.1.tgz#a46e5f7c62a4d98c1f66f219725aff9c4bc7e31d" + integrity sha512-Kg1o3Ww2B4Q1IhCvYBCJ4fMCv+EqVtLgGvLCZdVyZo4a994Uj76apqkr1KVwRBSW60jgrGkTtpoE2JTNpgbaXg== dependencies: "@float-capital/float-subgraph-uncrashable" "^0.0.0-alpha.4" "@oclif/core" "2.8.6" @@ -1637,26 +1753,17 @@ auto-bind "~4.0.0" tslib "~2.6.0" -"@graphql-codegen/introspection@^4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@graphql-codegen/introspection/-/introspection-4.0.2.tgz#083a0a0ea4a4b7a68e49f74463d2c9b29fb55105" - integrity sha512-yx6SpiBYwrCI67inicHKhvOhrD4mSYQkIcUtGjvksqv7UC4JBj/YtvneupeNnd2Qxb7XXp4wk+Fnop9odRoQAA== - dependencies: - "@graphql-codegen/plugin-helpers" "^5.0.3" - "@graphql-codegen/visitor-plugin-common" "^4.1.2" - tslib "~2.6.0" - -"@graphql-codegen/near-operation-file-preset@^2.5.0": - version "2.5.0" - resolved "https://registry.yarnpkg.com/@graphql-codegen/near-operation-file-preset/-/near-operation-file-preset-2.5.0.tgz#987d9bb8d0101e944b9afc406b77d098a4c1e978" - integrity sha512-S9PNJP5tTkUWBQ6inbviOsTREzsMxYVqJGrtPcIdMWkKLZAAItAfAb60klB1T64vt6Oru+nUf8IYUNrchJ8MYg== +"@graphql-codegen/near-operation-file-preset@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@graphql-codegen/near-operation-file-preset/-/near-operation-file-preset-3.0.0.tgz#f294df4b4cf5a565aecfdbb5de281b5852594879" + integrity sha512-HRPaa7OsIAHQBFeGiTUVdjFcxzgvAs7uxSqcLEJgDpCr9cffpwnlgWP3gK79KnTiHsRkyb55U1K4YyrL00g1Cw== dependencies: "@graphql-codegen/add" "^3.2.1" - "@graphql-codegen/plugin-helpers" "^2.7.2" + "@graphql-codegen/plugin-helpers" "^3.0.0" "@graphql-codegen/visitor-plugin-common" "2.13.1" - "@graphql-tools/utils" "^8.8.0" + "@graphql-tools/utils" "^10.0.0" parse-filepath "^1.0.2" - tslib "~2.4.0" + tslib "~2.6.0" "@graphql-codegen/plugin-helpers@^2.7.2": version "2.7.2" @@ -1670,7 +1777,7 @@ lodash "~4.17.0" tslib "~2.4.0" -"@graphql-codegen/plugin-helpers@^3.1.1": +"@graphql-codegen/plugin-helpers@^3.0.0", "@graphql-codegen/plugin-helpers@^3.1.1": version "3.1.2" resolved "https://registry.yarnpkg.com/@graphql-codegen/plugin-helpers/-/plugin-helpers-3.1.2.tgz#69a2e91178f478ea6849846ade0a59a844d34389" integrity sha512-emOQiHyIliVOIjKVKdsI5MXj312zmRDwmHpyUTZMjfpvxq/UVAHUJIVdVf+lnjjrI+LXBTgMlTWTgHQfmICxjg== @@ -2001,9 +2108,9 @@ tslib "^2.4.0" "@graphql-tools/optimize@^1.3.0": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@graphql-tools/optimize/-/optimize-1.3.1.tgz#29407991478dbbedc3e7deb8c44f46acb4e9278b" - integrity sha512-5j5CZSRGWVobt4bgRRg7zhjPiSimk+/zIuColih8E8DxuFOaJ+t0qu7eZS5KXWBkjcd4BPNuhUPpNlEmHPqVRQ== + version "1.4.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/optimize/-/optimize-1.4.0.tgz#20d6a9efa185ef8fc4af4fd409963e0907c6e112" + integrity sha512-dJs/2XvZp+wgHH8T5J2TqptT9/6uVzIYvA6uFACha+ufvdMBedkfR4b4GbT8jAKLRARiqRTxy3dctnwkTM2tdw== dependencies: tslib "^2.4.0" @@ -2039,12 +2146,12 @@ yaml-ast-parser "^0.0.43" "@graphql-tools/relay-operation-optimizer@^6.5.0": - version "6.5.17" - resolved "https://registry.yarnpkg.com/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.5.17.tgz#4e4e2675d696a2a31f106b09ed436c43f7976f37" - integrity sha512-hHPEX6ccRF3+9kfVz0A3In//Dej7QrHOLGZEokBmPDMDqn9CS7qUjpjyGzclbOX0tRBtLfuFUZ68ABSac3P1nA== + version "6.5.18" + resolved "https://registry.yarnpkg.com/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.5.18.tgz#a1b74a8e0a5d0c795b8a4d19629b654cf66aa5ab" + integrity sha512-mc5VPyTeV+LwiM+DNvoDQfPqwQYhPV/cl5jOBjTgSniyaq8/86aODfMkrE2OduhQ5E00hqrkuL2Fdrgk0w1QJg== dependencies: "@ardatan/relay-compiler" "12.0.0" - "@graphql-tools/utils" "9.2.1" + "@graphql-tools/utils" "^9.2.1" tslib "^2.4.0" "@graphql-tools/relay-operation-optimizer@^7.0.0": @@ -2112,7 +2219,7 @@ dependencies: tslib "^2.4.0" -"@graphql-tools/utils@9.2.1", "@graphql-tools/utils@^9.0.0": +"@graphql-tools/utils@9.2.1", "@graphql-tools/utils@^9.0.0", "@graphql-tools/utils@^9.2.1": version "9.2.1" resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-9.2.1.tgz#1b3df0ef166cfa3eae706e3518b17d5922721c57" integrity sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A== @@ -2152,25 +2259,13 @@ resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.2.0.tgz#5f3d96ec6b2354ad6d8a28bf216a1d97b5426861" integrity sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ== -"@hapi/hoek@^9.0.0": - version "9.3.0" - resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" - integrity sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ== - -"@hapi/topo@^5.0.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-5.1.0.tgz#dc448e332c6c6e37a4dc02fd84ba8d44b9afb012" - integrity sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg== - dependencies: - "@hapi/hoek" "^9.0.0" - -"@humanwhocodes/config-array@^0.11.13": - version "0.11.13" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.13.tgz#075dc9684f40a531d9b26b0822153c1e832ee297" - integrity sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ== +"@humanwhocodes/config-array@^0.11.14": + version "0.11.14" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" + integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== dependencies: - "@humanwhocodes/object-schema" "^2.0.1" - debug "^4.1.1" + "@humanwhocodes/object-schema" "^2.0.2" + debug "^4.3.1" minimatch "^3.0.5" "@humanwhocodes/config-array@^0.11.8": @@ -2192,10 +2287,10 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== -"@humanwhocodes/object-schema@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz#e5211452df060fa8522b55c7b3c0c4d1981cb044" - integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw== +"@humanwhocodes/object-schema@^2.0.2": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" + integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== "@hutson/parse-repository-url@^3.0.0": version "3.0.2" @@ -2237,6 +2332,18 @@ wrap-ansi "^8.1.0" wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" +"@isaacs/fs-minipass@^4.0.0": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz#2d59ae3ab4b38fb4270bfa23d30f8e2e86c7fe32" + integrity sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w== + dependencies: + minipass "^7.0.4" + +"@isaacs/string-locale-compare@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@isaacs/string-locale-compare/-/string-locale-compare-1.1.0.tgz#291c227e93fd407a96ecd59879a35809120e432b" + integrity sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ== + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -2248,7 +2355,7 @@ js-yaml "^3.13.1" resolve-from "^5.0.0" -"@istanbuljs/schema@^0.1.2": +"@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3": version "0.1.3" resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== @@ -2282,6 +2389,15 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" +"@jridgewell/gen-mapping@^0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" + integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== + dependencies: + "@jridgewell/set-array" "^1.2.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.24" + "@jridgewell/resolve-uri@3.1.0", "@jridgewell/resolve-uri@^3.0.3": version "3.1.0" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" @@ -2297,6 +2413,11 @@ resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== + "@jridgewell/source-map@^0.3.3": version "0.3.5" resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.5.tgz#a3bb4d5c6825aab0d281268f47f6ad5853431e91" @@ -2339,85 +2460,90 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@lerna/child-process@7.4.2": - version "7.4.2" - resolved "https://registry.yarnpkg.com/@lerna/child-process/-/child-process-7.4.2.tgz#a2fd013ac2150dc288270d3e0d0b850c06bec511" - integrity sha512-je+kkrfcvPcwL5Tg8JRENRqlbzjdlZXyaR88UcnCdNW0AJ1jX9IfHRys1X7AwSroU2ug8ESNC+suoBw1vX833Q== +"@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": + version "0.3.25" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== dependencies: - chalk "^4.1.0" - execa "^5.0.0" - strong-log-transformer "^2.1.0" + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" -"@lerna/create@7.4.2": - version "7.4.2" - resolved "https://registry.yarnpkg.com/@lerna/create/-/create-7.4.2.tgz#f845fad1480e46555af98bd39af29571605dddc9" - integrity sha512-1wplFbQ52K8E/unnqB0Tq39Z4e+NEoNrpovEnl6GpsTUrC6WDp8+w0Le2uCBV0hXyemxChduCkLz4/y1H1wTeg== +"@lerna/create@8.1.8": + version "8.1.8" + resolved "https://registry.yarnpkg.com/@lerna/create/-/create-8.1.8.tgz#be70d620f1d6b71e9d6b9d20049b784168b6ca19" + integrity sha512-wi72R01tgjBjzG2kjRyTHl4yCTKDfDMIXRyKz9E/FBa9SkFvUOAE4bdyY9MhEsRZmSWL7+CYE8Flv/HScRpBbA== dependencies: - "@lerna/child-process" "7.4.2" - "@npmcli/run-script" "6.0.2" - "@nx/devkit" ">=16.5.1 < 17" + "@npmcli/arborist" "7.5.4" + "@npmcli/package-json" "5.2.0" + "@npmcli/run-script" "8.1.0" + "@nx/devkit" ">=17.1.2 < 20" "@octokit/plugin-enterprise-rest" "6.0.1" "@octokit/rest" "19.0.11" + aproba "2.0.0" byte-size "8.1.1" chalk "4.1.0" clone-deep "4.0.1" - cmd-shim "6.0.1" + cmd-shim "6.0.3" + color-support "1.1.3" columnify "1.6.0" + console-control-strings "^1.1.0" conventional-changelog-core "5.0.1" conventional-recommended-bump "7.0.1" cosmiconfig "^8.2.0" - dedent "0.7.0" + dedent "1.5.3" execa "5.0.0" - fs-extra "^11.1.1" + fs-extra "^11.2.0" get-stream "6.0.0" - git-url-parse "13.1.0" - glob-parent "5.1.2" + git-url-parse "14.0.0" + glob-parent "6.0.2" globby "11.1.0" graceful-fs "4.2.11" has-unicode "2.0.1" ini "^1.3.8" - init-package-json "5.0.0" + init-package-json "6.0.3" inquirer "^8.2.4" is-ci "3.0.1" is-stream "2.0.0" js-yaml "4.1.0" - libnpmpublish "7.3.0" + libnpmpublish "9.0.9" load-json-file "6.2.0" lodash "^4.17.21" make-dir "4.0.0" minimatch "3.0.5" multimatch "5.0.0" node-fetch "2.6.7" - npm-package-arg "8.1.1" - npm-packlist "5.1.1" - npm-registry-fetch "^14.0.5" - npmlog "^6.0.2" - nx ">=16.5.1 < 17" + npm-package-arg "11.0.2" + npm-packlist "8.0.2" + npm-registry-fetch "^17.1.0" + nx ">=17.1.2 < 20" p-map "4.0.0" p-map-series "2.1.0" p-queue "6.6.2" p-reduce "^2.1.0" - pacote "^15.2.0" + pacote "^18.0.6" pify "5.0.0" read-cmd-shim "4.0.0" - read-package-json "6.0.4" resolve-from "5.0.0" rimraf "^4.4.1" semver "^7.3.4" + set-blocking "^2.0.0" signal-exit "3.0.7" slash "^3.0.0" - ssri "^9.0.1" + ssri "^10.0.6" + string-width "^4.2.3" + strip-ansi "^6.0.1" strong-log-transformer "2.1.0" - tar "6.1.11" + tar "6.2.1" temp-dir "1.0.0" upath "2.0.1" - uuid "^9.0.0" + uuid "^10.0.0" validate-npm-package-license "^3.0.4" - validate-npm-package-name "5.0.0" + validate-npm-package-name "5.0.1" + wide-align "1.1.5" write-file-atomic "5.0.1" write-pkg "4.0.0" - yargs "16.2.0" - yargs-parser "20.2.4" + yargs "17.7.2" + yargs-parser "21.1.1" "@metamask/eth-sig-util@4.0.1", "@metamask/eth-sig-util@^4.0.0": version "4.0.1" @@ -2443,6 +2569,15 @@ lodash "^4.17.16" uuid "^7.0.3" +"@napi-rs/wasm-runtime@0.2.4": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.4.tgz#d27788176f250d86e498081e3c5ff48a17606918" + integrity sha512-9zESzOO5aDByvhIAsOy9TbpZ0Ur2AJbUI7UT73kcUTS2mxAMHOBaa1st/jAymNoCtvrit99kkzT1FZuXVcgfIQ== + dependencies: + "@emnapi/core" "^1.1.0" + "@emnapi/runtime" "^1.1.0" + "@tybys/wasm-util" "^0.9.0" + "@noble/curves@1.1.0", "@noble/curves@~1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.1.0.tgz#f13fc667c89184bc04cccb9b11e8e7bae27d8c3d" @@ -2501,139 +2636,83 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@nomicfoundation/ethereumjs-block@5.0.2": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.2.tgz#13a7968f5964f1697da941281b7f7943b0465d04" - integrity sha512-hSe6CuHI4SsSiWWjHDIzWhSiAVpzMUcDRpWYzN0T9l8/Rz7xNn3elwVOJ/tAyS0LqL6vitUD78Uk7lQDXZun7Q== - dependencies: - "@nomicfoundation/ethereumjs-common" "4.0.2" - "@nomicfoundation/ethereumjs-rlp" "5.0.2" - "@nomicfoundation/ethereumjs-trie" "6.0.2" - "@nomicfoundation/ethereumjs-tx" "5.0.2" - "@nomicfoundation/ethereumjs-util" "9.0.2" - ethereum-cryptography "0.1.3" - ethers "^5.7.1" +"@nomicfoundation/edr-darwin-arm64@0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.5.2.tgz#72f7a826c9f0f2c91308edca562de3b9484ac079" + integrity sha512-Gm4wOPKhbDjGTIRyFA2QUAPfCXA1AHxYOKt3yLSGJkQkdy9a5WW+qtqKeEKHc/+4wpJSLtsGQfpzyIzggFfo/A== -"@nomicfoundation/ethereumjs-blockchain@7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.2.tgz#45323b673b3d2fab6b5008535340d1b8fea7d446" - integrity sha512-8UUsSXJs+MFfIIAKdh3cG16iNmWzWC/91P40sazNvrqhhdR/RtGDlFk2iFTGbBAZPs2+klZVzhRX8m2wvuvz3w== - dependencies: - "@nomicfoundation/ethereumjs-block" "5.0.2" - "@nomicfoundation/ethereumjs-common" "4.0.2" - "@nomicfoundation/ethereumjs-ethash" "3.0.2" - "@nomicfoundation/ethereumjs-rlp" "5.0.2" - "@nomicfoundation/ethereumjs-trie" "6.0.2" - "@nomicfoundation/ethereumjs-tx" "5.0.2" - "@nomicfoundation/ethereumjs-util" "9.0.2" - abstract-level "^1.0.3" - debug "^4.3.3" - ethereum-cryptography "0.1.3" - level "^8.0.0" - lru-cache "^5.1.1" - memory-level "^1.0.0" +"@nomicfoundation/edr-darwin-x64@0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.5.2.tgz#6d0fedb219d664631c6feddc596ab8c3bbc36fa8" + integrity sha512-ClyABq2dFCsrYEED3/UIO0c7p4H1/4vvlswFlqUyBpOkJccr75qIYvahOSJRM62WgUFRhbSS0OJXFRwc/PwmVg== -"@nomicfoundation/ethereumjs-common@4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.2.tgz#a15d1651ca36757588fdaf2a7d381a150662a3c3" - integrity sha512-I2WGP3HMGsOoycSdOTSqIaES0ughQTueOsddJ36aYVpI3SN8YSusgRFLwzDJwRFVIYDKx/iJz0sQ5kBHVgdDwg== - dependencies: - "@nomicfoundation/ethereumjs-util" "9.0.2" - crc-32 "^1.2.0" +"@nomicfoundation/edr-linux-arm64-gnu@0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.5.2.tgz#60e4d52d963141bc2bb4a02639dc590a7fbdda2f" + integrity sha512-HWMTVk1iOabfvU2RvrKLDgtFjJZTC42CpHiw2h6rfpsgRqMahvIlx2jdjWYzFNy1jZKPTN1AStQ/91MRrg5KnA== -"@nomicfoundation/ethereumjs-ethash@3.0.2": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.2.tgz#da77147f806401ee996bfddfa6487500118addca" - integrity sha512-8PfoOQCcIcO9Pylq0Buijuq/O73tmMVURK0OqdjhwqcGHYC2PwhbajDh7GZ55ekB0Px197ajK3PQhpKoiI/UPg== - dependencies: - "@nomicfoundation/ethereumjs-block" "5.0.2" - "@nomicfoundation/ethereumjs-rlp" "5.0.2" - "@nomicfoundation/ethereumjs-util" "9.0.2" - abstract-level "^1.0.3" - bigint-crypto-utils "^3.0.23" - ethereum-cryptography "0.1.3" +"@nomicfoundation/edr-linux-arm64-musl@0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.5.2.tgz#6676a09eab57c435a16ffc144658c896acca9baa" + integrity sha512-CwsQ10xFx/QAD5y3/g5alm9+jFVuhc7uYMhrZAu9UVF+KtVjeCvafj0PaVsZ8qyijjqVuVsJ8hD1x5ob7SMcGg== -"@nomicfoundation/ethereumjs-evm@2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.2.tgz#4c2f4b84c056047102a4fa41c127454e3f0cfcf6" - integrity sha512-rBLcUaUfANJxyOx9HIdMX6uXGin6lANCulIm/pjMgRqfiCRMZie3WKYxTSd8ZE/d+qT+zTedBF4+VHTdTSePmQ== - dependencies: - "@ethersproject/providers" "^5.7.1" - "@nomicfoundation/ethereumjs-common" "4.0.2" - "@nomicfoundation/ethereumjs-tx" "5.0.2" - "@nomicfoundation/ethereumjs-util" "9.0.2" - debug "^4.3.3" - ethereum-cryptography "0.1.3" - mcl-wasm "^0.7.1" - rustbn.js "~0.2.0" +"@nomicfoundation/edr-linux-x64-gnu@0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.5.2.tgz#f558d9697ce961410e7a7468f9ab8c8a601b9df6" + integrity sha512-CWVCEdhWJ3fmUpzWHCRnC0/VLBDbqtqTGTR6yyY1Ep3S3BOrHEAvt7h5gx85r2vLcztisu2vlDq51auie4IU1A== -"@nomicfoundation/ethereumjs-rlp@5.0.2": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.2.tgz#4fee8dc58a53ac6ae87fb1fca7c15dc06c6b5dea" - integrity sha512-QwmemBc+MMsHJ1P1QvPl8R8p2aPvvVcKBbvHnQOKBpBztEo0omN0eaob6FeZS/e3y9NSe+mfu3nNFBHszqkjTA== +"@nomicfoundation/edr-linux-x64-musl@0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.5.2.tgz#c9c9cbb2997499f75c1d022be724b0551d44569f" + integrity sha512-+aJDfwhkddy2pP5u1ISg3IZVAm0dO836tRlDTFWtvvSMQ5hRGqPcWwlsbobhDQsIxhPJyT7phL0orCg5W3WMeA== -"@nomicfoundation/ethereumjs-statemanager@2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.2.tgz#3ba4253b29b1211cafe4f9265fee5a0d780976e0" - integrity sha512-dlKy5dIXLuDubx8Z74sipciZnJTRSV/uHG48RSijhgm1V7eXYFC567xgKtsKiVZB1ViTP9iFL4B6Je0xD6X2OA== - dependencies: - "@nomicfoundation/ethereumjs-common" "4.0.2" - "@nomicfoundation/ethereumjs-rlp" "5.0.2" - debug "^4.3.3" - ethereum-cryptography "0.1.3" - ethers "^5.7.1" - js-sdsl "^4.1.4" +"@nomicfoundation/edr-win32-x64-msvc@0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.5.2.tgz#f16db88bf4fe09a996af0a25096e09deecb72bfa" + integrity sha512-CcvvuA3sAv7liFNPsIR/68YlH6rrybKzYttLlMr80d4GKJjwJ5OKb3YgE6FdZZnOfP19HEHhsLcE0DPLtY3r0w== -"@nomicfoundation/ethereumjs-trie@6.0.2": - version "6.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.2.tgz#9a6dbd28482dca1bc162d12b3733acab8cd12835" - integrity sha512-yw8vg9hBeLYk4YNg5MrSJ5H55TLOv2FSWUTROtDtTMMmDGROsAu+0tBjiNGTnKRi400M6cEzoFfa89Fc5k8NTQ== +"@nomicfoundation/edr@^0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr/-/edr-0.5.2.tgz#e8c7b3d3dd4a312432ab3930dec60f76dc5c4926" + integrity sha512-hW/iLvUQZNTVjFyX/I40rtKvvDOqUEyIi96T28YaLfmPL+3LW2lxmYLUXEJ6MI14HzqxDqrLyhf6IbjAa2r3Dw== + dependencies: + "@nomicfoundation/edr-darwin-arm64" "0.5.2" + "@nomicfoundation/edr-darwin-x64" "0.5.2" + "@nomicfoundation/edr-linux-arm64-gnu" "0.5.2" + "@nomicfoundation/edr-linux-arm64-musl" "0.5.2" + "@nomicfoundation/edr-linux-x64-gnu" "0.5.2" + "@nomicfoundation/edr-linux-x64-musl" "0.5.2" + "@nomicfoundation/edr-win32-x64-msvc" "0.5.2" + +"@nomicfoundation/ethereumjs-common@4.0.4": + version "4.0.4" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.4.tgz#9901f513af2d4802da87c66d6f255b510bef5acb" + integrity sha512-9Rgb658lcWsjiicr5GzNCjI1llow/7r0k50dLL95OJ+6iZJcVbi15r3Y0xh2cIO+zgX0WIHcbzIu6FeQf9KPrg== dependencies: - "@nomicfoundation/ethereumjs-rlp" "5.0.2" - "@nomicfoundation/ethereumjs-util" "9.0.2" - "@types/readable-stream" "^2.3.13" - ethereum-cryptography "0.1.3" - readable-stream "^3.6.0" + "@nomicfoundation/ethereumjs-util" "9.0.4" -"@nomicfoundation/ethereumjs-tx@5.0.2": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.2.tgz#117813b69c0fdc14dd0446698a64be6df71d7e56" - integrity sha512-T+l4/MmTp7VhJeNloMkM+lPU3YMUaXdcXgTGCf8+ZFvV9NYZTRLFekRwlG6/JMmVfIfbrW+dRRJ9A6H5Q/Z64g== - dependencies: - "@chainsafe/ssz" "^0.9.2" - "@ethersproject/providers" "^5.7.2" - "@nomicfoundation/ethereumjs-common" "4.0.2" - "@nomicfoundation/ethereumjs-rlp" "5.0.2" - "@nomicfoundation/ethereumjs-util" "9.0.2" - ethereum-cryptography "0.1.3" +"@nomicfoundation/ethereumjs-rlp@5.0.4": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.4.tgz#66c95256fc3c909f6fb18f6a586475fc9762fa30" + integrity sha512-8H1S3s8F6QueOc/X92SdrA4RDenpiAEqMg5vJH99kcQaCy/a3Q6fgseo75mgWlbanGJXSlAPtnCeG9jvfTYXlw== -"@nomicfoundation/ethereumjs-util@9.0.2": - version "9.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.2.tgz#16bdc1bb36f333b8a3559bbb4b17dac805ce904d" - integrity sha512-4Wu9D3LykbSBWZo8nJCnzVIYGvGCuyiYLIJa9XXNVt1q1jUzHdB+sJvx95VGCpPkCT+IbLecW6yfzy3E1bQrwQ== +"@nomicfoundation/ethereumjs-tx@5.0.4": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.4.tgz#b0ceb58c98cc34367d40a30d255d6315b2f456da" + integrity sha512-Xjv8wAKJGMrP1f0n2PeyfFCCojHd7iS3s/Ab7qzF1S64kxZ8Z22LCMynArYsVqiFx6rzYy548HNVEyI+AYN/kw== dependencies: - "@chainsafe/ssz" "^0.10.0" - "@nomicfoundation/ethereumjs-rlp" "5.0.2" + "@nomicfoundation/ethereumjs-common" "4.0.4" + "@nomicfoundation/ethereumjs-rlp" "5.0.4" + "@nomicfoundation/ethereumjs-util" "9.0.4" ethereum-cryptography "0.1.3" -"@nomicfoundation/ethereumjs-vm@7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.2.tgz#3b0852cb3584df0e18c182d0672a3596c9ca95e6" - integrity sha512-Bj3KZT64j54Tcwr7Qm/0jkeZXJMfdcAtRBedou+Hx0dPOSIgqaIr0vvLwP65TpHbak2DmAq+KJbW2KNtIoFwvA== - dependencies: - "@nomicfoundation/ethereumjs-block" "5.0.2" - "@nomicfoundation/ethereumjs-blockchain" "7.0.2" - "@nomicfoundation/ethereumjs-common" "4.0.2" - "@nomicfoundation/ethereumjs-evm" "2.0.2" - "@nomicfoundation/ethereumjs-rlp" "5.0.2" - "@nomicfoundation/ethereumjs-statemanager" "2.0.2" - "@nomicfoundation/ethereumjs-trie" "6.0.2" - "@nomicfoundation/ethereumjs-tx" "5.0.2" - "@nomicfoundation/ethereumjs-util" "9.0.2" - debug "^4.3.3" +"@nomicfoundation/ethereumjs-util@9.0.4": + version "9.0.4" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.4.tgz#84c5274e82018b154244c877b76bc049a4ed7b38" + integrity sha512-sLOzjnSrlx9Bb9EFNtHzK/FJFsfg2re6bsGqinFinH1gCqVfz9YYlXiMWwDM4C/L4ywuHFCYwfKTVr/QHQcU0Q== + dependencies: + "@nomicfoundation/ethereumjs-rlp" "5.0.4" ethereum-cryptography "0.1.3" - mcl-wasm "^0.7.1" - rustbn.js "~0.2.0" "@nomicfoundation/hardhat-chai-matchers@^1.0.6": version "1.0.6" @@ -2646,6 +2725,14 @@ deep-eql "^4.0.1" ordinal "^1.0.3" +"@nomicfoundation/hardhat-ethers@^3.0.7": + version "3.0.7" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.0.7.tgz#be90f79e96a22e6e982bca20ab0af05ed1f09c26" + integrity sha512-pxLWpDiqC208shoz/lMbVFbxcVxE+qIs8qDrwdcubWH99UO1p6uwXakMa36ICRfB/IEToSLDJGSsKhwY84feCQ== + dependencies: + debug "^4.1.1" + lodash.isequal "^4.5.0" + "@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.1": version "0.1.1" resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.1.tgz#4c858096b1c17fe58a474fe81b46815f93645c15" @@ -2712,7 +2799,7 @@ "@nomicfoundation/solidity-analyzer-win32-ia32-msvc" "0.1.1" "@nomicfoundation/solidity-analyzer-win32-x64-msvc" "0.1.1" -"@nomiclabs/hardhat-ethers@^2.2.3": +"@nomiclabs/hardhat-ethers@2.2.3": version "2.2.3" resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.3.tgz#b41053e360c31a32c2640c9a45ee981a7e603fe0" integrity sha512-YhzPdzb612X591FOe68q+qXVXGG2ANZRvDo0RRUtimev85rCrAlv/TLMEZw5c+kq9AbzocLTVX/h2jVIFPL9Xg== @@ -2767,6 +2854,58 @@ ethers "^4.0.0-beta.1" source-map-support "^0.5.19" +"@npmcli/agent@^2.0.0": + version "2.2.2" + resolved "https://registry.yarnpkg.com/@npmcli/agent/-/agent-2.2.2.tgz#967604918e62f620a648c7975461c9c9e74fc5d5" + integrity sha512-OrcNPXdpSl9UX7qPVRWbmWMCSXrcDa2M9DvrbOTj7ao1S4PlqVFYv9/yLKMkrJKZ/V5A/kDBC690or307i26Og== + dependencies: + agent-base "^7.1.0" + http-proxy-agent "^7.0.0" + https-proxy-agent "^7.0.1" + lru-cache "^10.0.1" + socks-proxy-agent "^8.0.3" + +"@npmcli/arborist@7.5.4": + version "7.5.4" + resolved "https://registry.yarnpkg.com/@npmcli/arborist/-/arborist-7.5.4.tgz#3dd9e531d6464ef6715e964c188e0880c471ac9b" + integrity sha512-nWtIc6QwwoUORCRNzKx4ypHqCk3drI+5aeYdMTQQiRCcn4lOOgfQh7WyZobGYTxXPSq1VwV53lkpN/BRlRk08g== + dependencies: + "@isaacs/string-locale-compare" "^1.1.0" + "@npmcli/fs" "^3.1.1" + "@npmcli/installed-package-contents" "^2.1.0" + "@npmcli/map-workspaces" "^3.0.2" + "@npmcli/metavuln-calculator" "^7.1.1" + "@npmcli/name-from-folder" "^2.0.0" + "@npmcli/node-gyp" "^3.0.0" + "@npmcli/package-json" "^5.1.0" + "@npmcli/query" "^3.1.0" + "@npmcli/redact" "^2.0.0" + "@npmcli/run-script" "^8.1.0" + bin-links "^4.0.4" + cacache "^18.0.3" + common-ancestor-path "^1.0.1" + hosted-git-info "^7.0.2" + json-parse-even-better-errors "^3.0.2" + json-stringify-nice "^1.1.4" + lru-cache "^10.2.2" + minimatch "^9.0.4" + nopt "^7.2.1" + npm-install-checks "^6.2.0" + npm-package-arg "^11.0.2" + npm-pick-manifest "^9.0.1" + npm-registry-fetch "^17.0.1" + pacote "^18.0.6" + parse-conflict-json "^3.0.0" + proc-log "^4.2.0" + proggy "^2.0.0" + promise-all-reject-late "^1.0.0" + promise-call-limit "^3.0.1" + read-package-json-fast "^3.0.2" + semver "^7.3.7" + ssri "^10.0.6" + treeverse "^3.0.0" + walk-up-path "^3.0.1" + "@npmcli/fs@^3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-3.1.0.tgz#233d43a25a91d68c3a863ba0da6a3f00924a173e" @@ -2774,19 +2913,27 @@ dependencies: semver "^7.3.5" -"@npmcli/git@^4.0.0": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@npmcli/git/-/git-4.1.0.tgz#ab0ad3fd82bc4d8c1351b6c62f0fa56e8fe6afa6" - integrity sha512-9hwoB3gStVfa0N31ymBmrX+GuDGdVA/QWShZVqE0HK2Af+7QGGrCTbZia/SW0ImUTjTne7SP91qxDmtXvDHRPQ== +"@npmcli/fs@^3.1.1": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-3.1.1.tgz#59cdaa5adca95d135fc00f2bb53f5771575ce726" + integrity sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg== dependencies: - "@npmcli/promise-spawn" "^6.0.0" - lru-cache "^7.4.4" - npm-pick-manifest "^8.0.0" - proc-log "^3.0.0" + semver "^7.3.5" + +"@npmcli/git@^5.0.0": + version "5.0.8" + resolved "https://registry.yarnpkg.com/@npmcli/git/-/git-5.0.8.tgz#8ba3ff8724192d9ccb2735a2aa5380a992c5d3d1" + integrity sha512-liASfw5cqhjNW9UFd+ruwwdEf/lbOAQjLL2XY2dFW/bkJheXDYZgOyul/4gVvEV4BWkTXjYGmDqMw9uegdbJNQ== + dependencies: + "@npmcli/promise-spawn" "^7.0.0" + ini "^4.1.3" + lru-cache "^10.0.1" + npm-pick-manifest "^9.0.0" + proc-log "^4.0.0" promise-inflight "^1.0.1" promise-retry "^2.0.1" semver "^7.3.5" - which "^3.0.0" + which "^4.0.0" "@npmcli/installed-package-contents@^2.0.1": version "2.0.2" @@ -2796,106 +2943,168 @@ npm-bundled "^3.0.0" npm-normalize-package-bin "^3.0.0" +"@npmcli/installed-package-contents@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@npmcli/installed-package-contents/-/installed-package-contents-2.1.0.tgz#63048e5f6e40947a3a88dcbcb4fd9b76fdd37c17" + integrity sha512-c8UuGLeZpm69BryRykLuKRyKFZYJsZSCT4aVY5ds4omyZqJ172ApzgfKJ5eV/r3HgLdUYgFVe54KSFVjKoe27w== + dependencies: + npm-bundled "^3.0.0" + npm-normalize-package-bin "^3.0.0" + +"@npmcli/map-workspaces@^3.0.2": + version "3.0.6" + resolved "https://registry.yarnpkg.com/@npmcli/map-workspaces/-/map-workspaces-3.0.6.tgz#27dc06c20c35ef01e45a08909cab9cb3da08cea6" + integrity sha512-tkYs0OYnzQm6iIRdfy+LcLBjcKuQCeE5YLb8KnrIlutJfheNaPvPpgoFEyEFgbjzl5PLZ3IA/BWAwRU0eHuQDA== + dependencies: + "@npmcli/name-from-folder" "^2.0.0" + glob "^10.2.2" + minimatch "^9.0.0" + read-package-json-fast "^3.0.0" + +"@npmcli/metavuln-calculator@^7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@npmcli/metavuln-calculator/-/metavuln-calculator-7.1.1.tgz#4d3b6c3192f72bc8ad59476de0da939c33877fcf" + integrity sha512-Nkxf96V0lAx3HCpVda7Vw4P23RILgdi/5K1fmj2tZkWIYLpXAN8k2UVVOsW16TsS5F8Ws2I7Cm+PU1/rsVF47g== + dependencies: + cacache "^18.0.0" + json-parse-even-better-errors "^3.0.0" + pacote "^18.0.0" + proc-log "^4.1.0" + semver "^7.3.5" + +"@npmcli/name-from-folder@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@npmcli/name-from-folder/-/name-from-folder-2.0.0.tgz#c44d3a7c6d5c184bb6036f4d5995eee298945815" + integrity sha512-pwK+BfEBZJbKdNYpHHRTNBwBoqrN/iIMO0AiGvYsp3Hoaq0WbgGSWQR6SCldZovoDpY3yje5lkFUe6gsDgJ2vg== + "@npmcli/node-gyp@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz#101b2d0490ef1aa20ed460e4c0813f0db560545a" integrity sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA== -"@npmcli/promise-spawn@^6.0.0", "@npmcli/promise-spawn@^6.0.1": - version "6.0.2" - resolved "https://registry.yarnpkg.com/@npmcli/promise-spawn/-/promise-spawn-6.0.2.tgz#c8bc4fa2bd0f01cb979d8798ba038f314cfa70f2" - integrity sha512-gGq0NJkIGSwdbUt4yhdF8ZrmkGKVz9vAdVzpOfnom+V8PLSmSOVhZwbNvZZS1EYcJN5hzzKBxmmVVAInM6HQLg== +"@npmcli/package-json@5.2.0", "@npmcli/package-json@^5.0.0", "@npmcli/package-json@^5.1.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@npmcli/package-json/-/package-json-5.2.0.tgz#a1429d3111c10044c7efbfb0fce9f2c501f4cfad" + integrity sha512-qe/kiqqkW0AGtvBjL8TJKZk/eBBSpnJkUWvHdQ9jM2lKHXRYYJuyNpJPlJw3c8QjC2ow6NZYiLExhUaeJelbxQ== + dependencies: + "@npmcli/git" "^5.0.0" + glob "^10.2.2" + hosted-git-info "^7.0.0" + json-parse-even-better-errors "^3.0.0" + normalize-package-data "^6.0.0" + proc-log "^4.0.0" + semver "^7.5.3" + +"@npmcli/promise-spawn@^7.0.0": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@npmcli/promise-spawn/-/promise-spawn-7.0.2.tgz#1d53d34ffeb5d151bfa8ec661bcccda8bbdfd532" + integrity sha512-xhfYPXoV5Dy4UkY0D+v2KkwvnDfiA/8Mt3sWCGI/hM03NsYIH8ZaG6QzS9x7pje5vHZBZJ2v6VRFVTWACnqcmQ== dependencies: - which "^3.0.0" + which "^4.0.0" -"@npmcli/run-script@6.0.2", "@npmcli/run-script@^6.0.0": - version "6.0.2" - resolved "https://registry.yarnpkg.com/@npmcli/run-script/-/run-script-6.0.2.tgz#a25452d45ee7f7fb8c16dfaf9624423c0c0eb885" - integrity sha512-NCcr1uQo1k5U+SYlnIrbAh3cxy+OQT1VtqiAbxdymSlptbzBb62AjH2xXgjNCoP073hoa1CfCAcwoZ8k96C4nA== +"@npmcli/query@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@npmcli/query/-/query-3.1.0.tgz#bc202c59e122a06cf8acab91c795edda2cdad42c" + integrity sha512-C/iR0tk7KSKGldibYIB9x8GtO/0Bd0I2mhOaDb8ucQL/bQVTmGoeREaFj64Z5+iCBRf3dQfed0CjJL7I8iTkiQ== + dependencies: + postcss-selector-parser "^6.0.10" + +"@npmcli/redact@^2.0.0": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@npmcli/redact/-/redact-2.0.1.tgz#95432fd566e63b35c04494621767a4312c316762" + integrity sha512-YgsR5jCQZhVmTJvjduTOIHph0L73pK8xwMVaDY0PatySqVM9AZj93jpoXYSJqfHFxFkN9dmqTw6OiqExsS3LPw== + +"@npmcli/run-script@8.1.0", "@npmcli/run-script@^8.0.0", "@npmcli/run-script@^8.1.0": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@npmcli/run-script/-/run-script-8.1.0.tgz#a563e5e29b1ca4e648a6b1bbbfe7220b4bfe39fc" + integrity sha512-y7efHHwghQfk28G2z3tlZ67pLG0XdfYbcVG26r7YIXALRsrVQcTq4/tdenSmdOrEsNahIYA/eh8aEVROWGFUDg== dependencies: "@npmcli/node-gyp" "^3.0.0" - "@npmcli/promise-spawn" "^6.0.0" - node-gyp "^9.0.0" - read-package-json-fast "^3.0.0" - which "^3.0.0" + "@npmcli/package-json" "^5.0.0" + "@npmcli/promise-spawn" "^7.0.0" + node-gyp "^10.0.0" + proc-log "^4.0.0" + which "^4.0.0" -"@nrwl/devkit@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-16.7.3.tgz#eaace944c3d2f712f6b8ff03df16e58324bc40c0" - integrity sha512-3pHEOm6ASTTwH0nZF1hyHIDlXJBYbp+Xj4P1ymmG8v/e9t7aF5z8yOLOPiVvWSq3+KW86Ntt/CyjP9Yz1OF4/w== +"@nrwl/devkit@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-19.6.3.tgz#71e7e9cf7ca8e4dbc1868dd16ec43582122b385b" + integrity sha512-zrAboArNfrEMjimBl/0YeM08HfjqOEG/VHdCHKO+5QMDg65w7vDJ2flwyNhlmnMl8BMJSy9fNo6PNGhboOf3+w== dependencies: - "@nx/devkit" "16.7.3" + "@nx/devkit" "19.6.3" -"@nrwl/tao@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-16.7.3.tgz#bd2282238442bc670ad09be73a35fea8d011094f" - integrity sha512-kaH0i7ZuncSW8hGXg6DVlUBG319lUG/ene6aJUeV1spOxEsEqlckCm9HfJPfcVntvh9m1LauW+yk64cw/biVwg== +"@nrwl/tao@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-19.6.3.tgz#cd532b5c17709bdd7f4e1bc9e27c97bb62aba2da" + integrity sha512-j4vPU87yBhTrdyPFSNhlUkN29w4BQ+M14khT8PFGe+Y26gHMxNRNXNFUCwtVARYAc6IwxS8Uvlwy7AwXG2ETPA== dependencies: - nx "16.7.3" + nx "19.6.3" tslib "^2.3.0" -"@nx/devkit@16.7.3", "@nx/devkit@>=16.5.1 < 17": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nx/devkit/-/devkit-16.7.3.tgz#856befa64d5bc3e2807d40e19c0e618584c27cdd" - integrity sha512-5jb8m9jZBatBDNZMkc/jbfiETIP7fC5rH3dqtYFFZ35pAVWVMj6WhQdZDJldlo+iC+iIAmJ0kkiZQ82999g9Lw== +"@nx/devkit@19.6.3", "@nx/devkit@>=17.1.2 < 20": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nx/devkit/-/devkit-19.6.3.tgz#92649ca35168d6e1991b76f552483bd356b8386a" + integrity sha512-/d8Z5/Cy/H/1rIHxW3VjeK5dlvHwRxRj8rCm8/sj5Pz3GmGX03uuEK+J/p+VlP3gP8dAYMgZu3ImeqTAu6rBtw== dependencies: - "@nrwl/devkit" "16.7.3" + "@nrwl/devkit" "19.6.3" ejs "^3.1.7" enquirer "~2.3.6" ignore "^5.0.4" - semver "7.5.3" + minimatch "9.0.3" + semver "^7.5.3" tmp "~0.2.1" tslib "^2.3.0" + yargs-parser "21.1.1" -"@nx/nx-darwin-arm64@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nx/nx-darwin-arm64/-/nx-darwin-arm64-16.7.3.tgz#4742fb20394b5c8be80039ea3dda5707d282da6d" - integrity sha512-s1woGSGbNEzDSzNoSIIpaYkVwJmM0D89/1QmccVZIv7jvGGcqx4ONQPsBylWpDco3IeTDhNsOMzMhF3fvqhtgA== - -"@nx/nx-darwin-x64@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nx/nx-darwin-x64/-/nx-darwin-x64-16.7.3.tgz#9b9cc3d0074097bec2cdab48b185af2c02ff37ab" - integrity sha512-J9lE+T7Hm3hD+s33xidxa6Jkq2CCKZwwTrLO+Ff1/A2d4T13d16O/Rf3Y/nuveUjCVEYwwYkk4G5v2FPJ4i3SQ== - -"@nx/nx-freebsd-x64@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nx/nx-freebsd-x64/-/nx-freebsd-x64-16.7.3.tgz#5d6bb9d507576c5f94cceef2029b71186b92092e" - integrity sha512-/1WrplEyxTkoARsCUcI2FjMVy2AFuaH2oS1vFuGtBchWoKbgFZd3Aek8+oYt0wiQ7cfBxs2y92UqvTOhLygxOw== - -"@nx/nx-linux-arm-gnueabihf@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-16.7.3.tgz#c3f038934839d008f19df1cd39c4489325d2c125" - integrity sha512-Z3CLZcxBnpra8nlizK97eyohI9x+JPh4wp+87x9WvIiLGd+k3hO42nth/q0xXJs2G5emQN8cSLPscGzbZodVpA== - -"@nx/nx-linux-arm64-gnu@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-16.7.3.tgz#df84943a1499833fd2ad536e0548c070cdf2b498" - integrity sha512-a4E4psBgU0b7ZT99630mylxcrlLObgy4bA6JrT+4XIFAcaHkfCmWLupPyXgBCmSqQN01jsuXSYm/t7EWjKL98Q== - -"@nx/nx-linux-arm64-musl@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-16.7.3.tgz#ab90fb0eb16154ced6fc6290f433d91ba4b4b9c4" - integrity sha512-vl+WONX6uOS8uGwtcAlb4yiAh2ws/gZSLaIURJaDnf509FrYTb/RsBca5BskOQUYkKSI//6oQu653TRDKYxyWw== - -"@nx/nx-linux-x64-gnu@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-16.7.3.tgz#1c3534354f5dde1038cb2a91ee27dc8471bdeaec" - integrity sha512-udZ+6IOYv0Ra0MRpbAW8TSFdcUxtfuIryRsGVF2767HeWqHzOhLynmJyJPatJ7gXMVFaL7+zfcAoV6fm7My1FQ== - -"@nx/nx-linux-x64-musl@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-16.7.3.tgz#498226e4a2d38b730045c4265f76a4988a6a6b69" - integrity sha512-LQW1ttQWNekHoJTrzXMumaMxfYRcjsuGQP8Ki2pWuw43TFTQyI6Cfgk8/wjKv8ATc772cF9Tadyz4+JEIQlcNw== - -"@nx/nx-win32-arm64-msvc@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-16.7.3.tgz#d2ba0e5feea87bee07e3a9771b2cdc2b242bcd13" - integrity sha512-wCrpGqh5fPrlkhHZXVSPBDs9E3L5vIJHtdPrc1QP1uCQiV41mpauey31p6rjvQUWYCC0BGTWJGF+hAY7wYUHdg== - -"@nx/nx-win32-x64-msvc@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-16.7.3.tgz#be86889de92c52273d0672ce485146482dcd6b2e" - integrity sha512-Ja2+VhMFWiVsZt3mkdsU1MCotQlAxG94zFiJYbXufsERJItWuN4i0mZjeZITiRBosEmkn4SeAUkg+xuiH+q4GA== +"@nx/nx-darwin-arm64@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nx/nx-darwin-arm64/-/nx-darwin-arm64-19.6.3.tgz#dc81e7d36f7eb99437ce162e2d228430e9b1d642" + integrity sha512-P7WlX5YDZOABAlyfpR6eObigQTNuUuy3iJVUuGwp1Nuo3VPMPkpK1GMWKWLwOR9+2jGnF5MzuqWHk7CdF33uqQ== + +"@nx/nx-darwin-x64@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nx/nx-darwin-x64/-/nx-darwin-x64-19.6.3.tgz#05ee87e8c33969be0f9ff00f832141e60eace474" + integrity sha512-HF28dPc7h0EmEGYJWJUPA3cBvjXyHbSbGQP5oP885gos9zcyVBjQ2kdJEUZDNMHB9KlZraeXbmV1umFkikjn6A== + +"@nx/nx-freebsd-x64@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nx/nx-freebsd-x64/-/nx-freebsd-x64-19.6.3.tgz#348f1dcea2aa849c58608c30d5eca1bcc4f9e935" + integrity sha512-y52dWxQ/x2ccyPqA4Vou4CnTqZX4gr/wV9myJX56G1CyEpWasmcqmPFeOKQd6dj7llGM/KJ/4Gz29RYxcWffcA== + +"@nx/nx-linux-arm-gnueabihf@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-19.6.3.tgz#601f13acddb870b78af3c704859da0d047ee5600" + integrity sha512-RneCg1tglLbP4cmGnGUs4FgZVT0aOA9wA53tO4IbyxLnlRXNY9OE452YLgqv3H7sLtNjsey2Lkq1seBHtr3p/Q== + +"@nx/nx-linux-arm64-gnu@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-19.6.3.tgz#85c54cefc541ff57ceea373616470bbdb25db89c" + integrity sha512-Y+vgqaxrPQUEtCzxK25QY4ahO90l0eWgVrvCALexGmq0lW41JrVpfTTsbH/BAPLsx+u8A/GPAQAgrmg7d5lSxw== + +"@nx/nx-linux-arm64-musl@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-19.6.3.tgz#6a2f0654735006ccbdbc47dd7b97e959294df286" + integrity sha512-o/99DBgafbjiJ4e9KFxaldvtlZta/FdzEiQQW+SQQ0JGSYlLCZZ8tIT6t3edV7cmG+gQLNMwolJzgpY53O9wjA== + +"@nx/nx-linux-x64-gnu@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-19.6.3.tgz#bff4c697ac2d8b2d031fd7d7ea7d0b59c4b3fc24" + integrity sha512-ppp0NBOhwJ39U1vR7h8jhFSfiur6CZPSUYjXsV44BlaNGc1wHZ+7FDXhzOTokgTNWHavYgYOJuVan5LtTLKJkA== + +"@nx/nx-linux-x64-musl@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-19.6.3.tgz#ae48b18a80dcf656452275c04ad06e2401ca25f5" + integrity sha512-H7xgsT5OTtVYCXjXBLZu28v+rIInhbUggrgVJ2iQJFGBT2A2qmvGmDJdcDz8+K90ku1f4VuWmm8i+TEyDEcBuQ== + +"@nx/nx-win32-arm64-msvc@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-19.6.3.tgz#ebe6f2b29258e7b2fba1726849c54c13f67a81cd" + integrity sha512-o9O6lSmx67zUnqOtlDC4YpC++fiUkixgIsQEG8J/2jdNgAATqOtERcqCNra/uke/Q94Vht2tVXjXF3uj92APhw== + +"@nx/nx-win32-x64-msvc@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-19.6.3.tgz#b3b4ae931bda6679dc3cc8939c24309f73e70740" + integrity sha512-6NQhc7jYQ/sqPt5fDy8C+br73kTd5jhb8ZkPtEy2Amr1aA1K9SAxZAYfyvxLHS2z1nBEelNFgXe6HBmDX92FkA== "@oclif/core@2.8.6": version "2.8.6" @@ -3109,7 +3318,7 @@ find-up "^4.1.0" fs-extra "^8.1.0" -"@openzeppelin/contracts@4.9.6": +"@openzeppelin/contracts@4.9.6", "@openzeppelin/contracts@^4.9.6": version "4.9.6" resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.9.6.tgz#2a880a24eb19b4f8b25adc2a5095f2aa27f39677" integrity sha512-xSmezSupL+y9VkHZJGDoCBpmnB2ogM13ccaYDWqJTfS3dbuHkgjuwDFUmaFauBCboQMGB/S5UqUl2y54X99BmA== @@ -3130,14 +3339,6 @@ web3 "^1.2.5" web3-utils "^1.2.5" -"@parcel/watcher@2.0.4": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.0.4.tgz#f300fef4cc38008ff4b8c29d92588eced3ce014b" - integrity sha512-cTDi+FUDBIUOBKEtj+nhiJ71AZVlkAsQFuGQTun5tV9mwQBQgZvhCzG+URPQc8myeN32yRVZEfVAPCs1RW+Jvg== - dependencies: - node-addon-api "^3.2.1" - node-gyp-build "^4.3.0" - "@peculiar/asn1-schema@^2.3.6": version "2.3.6" resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.3.6.tgz#3dd3c2ade7f702a9a94dfb395c192f5fa5d6b922" @@ -3175,6 +3376,27 @@ resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.0.tgz#7d8dacb7fdef0e4387caf7396cbd77f179867d06" integrity sha512-Zwq5OCzuwJC2jwqmpEQt7Ds1DTi6BWSwoGkbb1n9pO3hzb35BoJELx7c0T23iDkBGkh2e7tvOtjF3tr3OaQHDQ== +"@pnpm/config.env-replace@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz#ab29da53df41e8948a00f2433f085f54de8b3a4c" + integrity sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w== + +"@pnpm/network.ca-file@^1.0.1": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz#2ab05e09c1af0cdf2fcf5035bea1484e222f7983" + integrity sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA== + dependencies: + graceful-fs "4.2.10" + +"@pnpm/npm-conf@^2.1.0": + version "2.3.1" + resolved "https://registry.yarnpkg.com/@pnpm/npm-conf/-/npm-conf-2.3.1.tgz#bb375a571a0bd63ab0a23bece33033c683e9b6b0" + integrity sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw== + dependencies: + "@pnpm/config.env-replace" "^1.1.0" + "@pnpm/network.ca-file" "^1.0.1" + config-chain "^1.1.11" + "@polka/url@^1.0.0-next.20": version "1.0.0-next.21" resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1" @@ -3524,51 +3746,58 @@ "@sentry/types" "5.30.0" tslib "^1.9.3" -"@sideway/address@^4.1.3": - version "4.1.4" - resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0" - integrity sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw== +"@shikijs/core@1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@shikijs/core/-/core-1.14.1.tgz#008f1c4a20ff83fd1672d9e31d76b687862f7511" + integrity sha512-KyHIIpKNaT20FtFPFjCQB5WVSTpLR/n+jQXhWHWVUMm9MaOaG9BGOG0MSyt7yA4+Lm+4c9rTc03tt3nYzeYSfw== dependencies: - "@hapi/hoek" "^9.0.0" - -"@sideway/formula@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.1.tgz#80fcbcbaf7ce031e0ef2dd29b1bfc7c3f583611f" - integrity sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg== + "@types/hast" "^3.0.4" -"@sideway/pinpoint@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" - integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== +"@sigstore/bundle@^2.3.2": + version "2.3.2" + resolved "https://registry.yarnpkg.com/@sigstore/bundle/-/bundle-2.3.2.tgz#ad4dbb95d665405fd4a7a02c8a073dbd01e4e95e" + integrity sha512-wueKWDk70QixNLB363yHc2D2ItTgYiMTdPwK8D9dKQMR3ZQ0c35IxP5xnwQ8cNLoCgCRcHf14kE+CLIvNX1zmA== + dependencies: + "@sigstore/protobuf-specs" "^0.3.2" -"@sigstore/bundle@^1.1.0": +"@sigstore/core@^1.0.0", "@sigstore/core@^1.1.0": version "1.1.0" - resolved "https://registry.yarnpkg.com/@sigstore/bundle/-/bundle-1.1.0.tgz#17f8d813b09348b16eeed66a8cf1c3d6bd3d04f1" - integrity sha512-PFutXEy0SmQxYI4texPw3dd2KewuNqv7OuK1ZFtY2fM754yhvG2KdgwIhRnoEE2uHdtdGNQ8s0lb94dW9sELog== - dependencies: - "@sigstore/protobuf-specs" "^0.2.0" + resolved "https://registry.yarnpkg.com/@sigstore/core/-/core-1.1.0.tgz#5583d8f7ffe599fa0a89f2bf289301a5af262380" + integrity sha512-JzBqdVIyqm2FRQCulY6nbQzMpJJpSiJ8XXWMhtOX9eKgaXXpfNOF53lzQEjIydlStnd/eFtuC1dW4VYdD93oRg== -"@sigstore/protobuf-specs@^0.2.0": - version "0.2.1" - resolved "https://registry.yarnpkg.com/@sigstore/protobuf-specs/-/protobuf-specs-0.2.1.tgz#be9ef4f3c38052c43bd399d3f792c97ff9e2277b" - integrity sha512-XTWVxnWJu+c1oCshMLwnKvz8ZQJJDVOlciMfgpJBQbThVjKTCG8dwyhgLngBD2KN0ap9F/gOV8rFDEx8uh7R2A== +"@sigstore/protobuf-specs@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@sigstore/protobuf-specs/-/protobuf-specs-0.3.2.tgz#5becf88e494a920f548d0163e2978f81b44b7d6f" + integrity sha512-c6B0ehIWxMI8wiS/bj6rHMPqeFvngFV7cDU/MY+B16P9Z3Mp9k8L93eYZ7BYzSickzuqAQqAq0V956b3Ju6mLw== -"@sigstore/sign@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@sigstore/sign/-/sign-1.0.0.tgz#6b08ebc2f6c92aa5acb07a49784cb6738796f7b4" - integrity sha512-INxFVNQteLtcfGmcoldzV6Je0sbbfh9I16DM4yJPw3j5+TFP8X6uIiA18mvpEa9yyeycAKgPmOA3X9hVdVTPUA== +"@sigstore/sign@^2.3.2": + version "2.3.2" + resolved "https://registry.yarnpkg.com/@sigstore/sign/-/sign-2.3.2.tgz#d3d01e56d03af96fd5c3a9b9897516b1233fc1c4" + integrity sha512-5Vz5dPVuunIIvC5vBb0APwo7qKA4G9yM48kPWJT+OEERs40md5GoUR1yedwpekWZ4m0Hhw44m6zU+ObsON+iDA== + dependencies: + "@sigstore/bundle" "^2.3.2" + "@sigstore/core" "^1.0.0" + "@sigstore/protobuf-specs" "^0.3.2" + make-fetch-happen "^13.0.1" + proc-log "^4.2.0" + promise-retry "^2.0.1" + +"@sigstore/tuf@^2.3.4": + version "2.3.4" + resolved "https://registry.yarnpkg.com/@sigstore/tuf/-/tuf-2.3.4.tgz#da1d2a20144f3b87c0172920cbc8dcc7851ca27c" + integrity sha512-44vtsveTPUpqhm9NCrbU8CWLe3Vck2HO1PNLw7RIajbB7xhtn5RBPm1VNSCMwqGYHhDsBJG8gDF0q4lgydsJvw== dependencies: - "@sigstore/bundle" "^1.1.0" - "@sigstore/protobuf-specs" "^0.2.0" - make-fetch-happen "^11.0.1" + "@sigstore/protobuf-specs" "^0.3.2" + tuf-js "^2.2.1" -"@sigstore/tuf@^1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@sigstore/tuf/-/tuf-1.0.3.tgz#2a65986772ede996485728f027b0514c0b70b160" - integrity sha512-2bRovzs0nJZFlCN3rXirE4gwxCn97JNjMmwpecqlbgV9WcxX7WRuIrgzx/X7Ib7MYRbyUTpBYE0s2x6AmZXnlg== +"@sigstore/verify@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@sigstore/verify/-/verify-1.2.1.tgz#c7e60241b432890dcb8bd8322427f6062ef819e1" + integrity sha512-8iKx79/F73DKbGfRf7+t4dqrc0bRr0thdPrxAtCKWRm/F0tG71i6O1rvlnScncJLLBZHn3h8M3c1BSUAb9yu8g== dependencies: - "@sigstore/protobuf-specs" "^0.2.0" - tuf-js "^1.1.7" + "@sigstore/bundle" "^2.3.2" + "@sigstore/core" "^1.1.0" + "@sigstore/protobuf-specs" "^0.3.2" "@sinclair/typebox@^0.27.8": version "0.27.8" @@ -3580,6 +3809,16 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== +"@sindresorhus/is@^5.2.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-5.6.0.tgz#41dd6093d34652cddb5d5bdeee04eafc33826668" + integrity sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g== + +"@sindresorhus/merge-streams@^2.1.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz#719df7fb41766bc143369eaa0dd56d8dc87c9958" + integrity sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg== + "@solidity-parser/parser@^0.14.1": version "0.14.5" resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.14.5.tgz#87bc3cc7b068e08195c219c91cd8ddff5ef1a804" @@ -3613,11 +3852,6 @@ dependencies: defer-to-connect "^2.0.1" -"@tootallnate/once@2": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" - integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== - "@truffle/abi-utils@^0.3.0", "@truffle/abi-utils@^0.3.9": version "0.3.9" resolved "https://registry.yarnpkg.com/@truffle/abi-utils/-/abi-utils-0.3.9.tgz#c476f5cfe01072b513b3e93fd7bea05cf7bd9d96" @@ -4177,18 +4411,25 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== -"@tufjs/canonical-json@1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@tufjs/canonical-json/-/canonical-json-1.0.0.tgz#eade9fd1f537993bc1f0949f3aea276ecc4fab31" - integrity sha512-QTnf++uxunWvG2z3UFNzAoQPHxnSXOwtaI3iJ+AohhV+5vONuArPjJE7aPXPVXfXJsqrVbZBu9b81AJoSd09IQ== +"@tufjs/canonical-json@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz#a52f61a3d7374833fca945b2549bc30a2dd40d0a" + integrity sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA== -"@tufjs/models@1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@tufjs/models/-/models-1.0.4.tgz#5a689630f6b9dbda338d4b208019336562f176ef" - integrity sha512-qaGV9ltJP0EO25YfFUPhxRVK0evXFIAGicsVXuRim4Ed9cjPxYhNnNJ49SFmbeLgtxpslIkX317IgpfcHPVj/A== +"@tufjs/models@2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@tufjs/models/-/models-2.0.1.tgz#e429714e753b6c2469af3212e7f320a6973c2812" + integrity sha512-92F7/SFyufn4DXsha9+QfKnN03JGqtMFMXgSHbZOo8JG59WkTni7UzAouNQDf7AuP9OAMxVOPQcqG3sB7w+kkg== dependencies: - "@tufjs/canonical-json" "1.0.0" - minimatch "^9.0.0" + "@tufjs/canonical-json" "2.0.0" + minimatch "^9.0.4" + +"@tybys/wasm-util@^0.9.0": + version "0.9.0" + resolved "https://registry.yarnpkg.com/@tybys/wasm-util/-/wasm-util-0.9.0.tgz#3e75eb00604c8d6db470bf18c37b7d984a0e3355" + integrity sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw== + dependencies: + tslib "^2.4.0" "@typechain/ethers-v5@^11.1.2": version "11.1.2" @@ -4198,10 +4439,10 @@ lodash "^4.17.15" ts-essentials "^7.0.1" -"@typechain/hardhat@^8.0.3": - version "8.0.3" - resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-8.0.3.tgz#a114825f130405bbb8e535314003733b7ce3f91c" - integrity sha512-MytSmJJn+gs7Mqrpt/gWkTCOpOQ6ZDfRrRT2gtZL0rfGe4QrU4x9ZdW15fFbVM/XTa+5EsKiOMYXhRABibNeng== +"@typechain/hardhat@^9.1.0": + version "9.1.0" + resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-9.1.0.tgz#6985015f01dfb37ef2ca8a29c742d05890351ddc" + integrity sha512-mtaUlzLlkqTlfPwB3FORdejqBskSnh+Jl8AIJGjXNAQfRQ4ofHADPl1+oU7Z3pAJzmZbUXII8MhOLQltcHgKnA== dependencies: fs-extra "^9.1.0" @@ -4289,27 +4530,6 @@ resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.12.tgz#6b2c510a7ad7039e98e7b8d3d6598f4359e5c080" integrity sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw== -"@types/eslint-scope@^3.7.3": - version "3.7.4" - resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16" - integrity sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA== - dependencies: - "@types/eslint" "*" - "@types/estree" "*" - -"@types/eslint@*", "@types/eslint@^8.4.2": - version "8.21.3" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.21.3.tgz#5794b3911f0f19e34e3a272c49cbdf48d6f543f2" - integrity sha512-fa7GkppZVEByMWGbTtE5MbmXWJTVbrjjaS8K6uQj+XtuuUv1fsuPAxhygfqLmsb/Ufb3CV8deFCpiMfAgi00Sw== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - -"@types/estree@*": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" - integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== - "@types/estree@^1.0.5": version "1.0.5" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" @@ -4365,6 +4585,13 @@ "@types/minimatch" "*" "@types/node" "*" +"@types/hast@^3.0.4": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@types/hast/-/hast-3.0.4.tgz#1d6b39993b82cea6ad783945b0508c25903e15aa" + integrity sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ== + dependencies: + "@types/unist" "*" + "@types/hoist-non-react-statics@^3.3.1": version "3.3.1" resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f" @@ -4378,21 +4605,21 @@ resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812" integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ== +"@types/http-cache-semantics@^4.0.2": + version "4.0.4" + resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz#b979ebad3919799c979b17c72621c0bc0a31c6c4" + integrity sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA== + "@types/js-yaml@^4.0.0": version "4.0.5" resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-4.0.5.tgz#738dd390a6ecc5442f35e7f03fa1431353f7e138" integrity sha512-FhpRzf927MNQdRZP0J5DLIdTXhjLYzeUTmLAu69mnVksLH9CJY3IuSeEgbKUki7GQZm0WqDkGzyxju2EZGD2wA== -"@types/json-schema@*", "@types/json-schema@^7.0.8": +"@types/json-schema@^7.0.8": version "7.0.11" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== -"@types/json-schema@^7.0.12": - version "7.0.12" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb" - integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA== - "@types/json-stable-stringify@^1.0.32": version "1.0.34" resolved "https://registry.yarnpkg.com/@types/json-stable-stringify/-/json-stable-stringify-1.0.34.tgz#c0fb25e4d957e0ee2e497c1f553d7f8bb668fd75" @@ -4410,10 +4637,10 @@ dependencies: "@types/node" "*" -"@types/lodash@^4.14.202": - version "4.14.202" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.202.tgz#f09dbd2fb082d507178b2f2a5c7e74bd72ff98f8" - integrity sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ== +"@types/lodash@^4.17.7": + version "4.17.7" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.7.tgz#2f776bcb53adc9e13b2c0dfd493dfcbd7de43612" + integrity sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA== "@types/long@^4.0.0", "@types/long@^4.0.1": version "4.0.2" @@ -4445,10 +4672,10 @@ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== -"@types/mocha@^10.0.6": - version "10.0.6" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.6.tgz#818551d39113081048bdddbef96701b4e8bb9d1b" - integrity sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg== +"@types/mocha@^10.0.7": + version "10.0.7" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.7.tgz#4c620090f28ca7f905a94b706f74dc5b57b44f2f" + integrity sha512-GN8yJ1mNTcFcah/wKEFIJckJx9iJLoMSzWcfRRuxz/Jk+U6KQNnml+etbtxFK8lPjzOw3zp4Ha/kjSst9fsHYw== "@types/node@*": version "18.15.5" @@ -4492,7 +4719,7 @@ dependencies: "@types/node" "*" -"@types/prettier@^2.1.1", "@types/prettier@^2.6.0": +"@types/prettier@^2.1.1": version "2.7.2" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.2.tgz#6c2324641cc4ba050a8c710b2b251b377581fbf0" integrity sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg== @@ -4535,14 +4762,6 @@ "@types/scheduler" "*" csstype "^3.0.2" -"@types/readable-stream@^2.3.13": - version "2.3.15" - resolved "https://registry.yarnpkg.com/@types/readable-stream/-/readable-stream-2.3.15.tgz#3d79c9ceb1b6a57d5f6e6976f489b9b5384321ae" - integrity sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ== - dependencies: - "@types/node" "*" - safe-buffer "~5.1.1" - "@types/responselike@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" @@ -4572,11 +4791,6 @@ resolved "https://registry.yarnpkg.com/@types/seedrandom/-/seedrandom-3.0.1.tgz#1254750a4fec4aff2ebec088ccd0bb02e91fedb4" integrity sha512-giB9gzDeiCeloIXDgzFBCgjj1k4WxcDrZtGl6h1IqmUPlxF+Nx8Ve+96QCyDZ/HseB/uvDsKbpib9hU5cU53pw== -"@types/semver@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.0.tgz#591c1ce3a702c45ee15f47a42ade72c2fd78978a" - integrity sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw== - "@types/serve-static@*": version "1.15.1" resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.1.tgz#86b1753f0be4f9a1bee68d459fcda5be4ea52b5d" @@ -4590,6 +4804,11 @@ resolved "https://registry.yarnpkg.com/@types/underscore/-/underscore-1.11.4.tgz#62e393f8bc4bd8a06154d110c7d042a93751def3" integrity sha512-uO4CD2ELOjw8tasUrAhvnn2W4A0ZECOvMjCivJr4gA9pGgjv+qxKWY9GLTMVEK8ej85BxQOocUyE7hImmSQYcg== +"@types/unist@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/unist/-/unist-3.0.3.tgz#acaab0f919ce69cce629c2d4ed2eb4adc1b6c20c" + integrity sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q== + "@types/use-sync-external-store@^0.0.3": version "0.0.3" resolved "https://registry.yarnpkg.com/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz#b6725d5f4af24ace33b36fafd295136e75509f43" @@ -4624,34 +4843,22 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^6.21.0": - version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz#30830c1ca81fd5f3c2714e524c4303e0194f9cd3" - integrity sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA== - dependencies: - "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "6.21.0" - "@typescript-eslint/type-utils" "6.21.0" - "@typescript-eslint/utils" "6.21.0" - "@typescript-eslint/visitor-keys" "6.21.0" - debug "^4.3.4" +"@typescript-eslint/eslint-plugin@^8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.3.0.tgz#726627fad16d41d20539637efee8c2329fe6be32" + integrity sha512-FLAIn63G5KH+adZosDYiutqkOkYEx0nvcwNNfJAf+c7Ae/H35qWwTYvPZUKFj5AS+WfHG/WJJfWnDnyNUlp8UA== + dependencies: + "@eslint-community/regexpp" "^4.10.0" + "@typescript-eslint/scope-manager" "8.3.0" + "@typescript-eslint/type-utils" "8.3.0" + "@typescript-eslint/utils" "8.3.0" + "@typescript-eslint/visitor-keys" "8.3.0" graphemer "^1.4.0" - ignore "^5.2.4" + ignore "^5.3.1" natural-compare "^1.4.0" - semver "^7.5.4" - ts-api-utils "^1.0.1" - -"@typescript-eslint/parser@^5.10.0": - version "5.56.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.56.0.tgz#42eafb44b639ef1dbd54a3dbe628c446ca753ea6" - integrity sha512-sn1OZmBxUsgxMmR8a8U5QM/Wl+tyqlH//jTqCg8daTAmhAk26L2PFhcqPLlYBhYUJMZJK276qLXlHN3a83o2cg== - dependencies: - "@typescript-eslint/scope-manager" "5.56.0" - "@typescript-eslint/types" "5.56.0" - "@typescript-eslint/typescript-estree" "5.56.0" - debug "^4.3.4" + ts-api-utils "^1.3.0" -"@typescript-eslint/parser@^6.21.0": +"@typescript-eslint/parser@^6.7.5": version "6.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.21.0.tgz#af8fcf66feee2edc86bc5d1cf45e33b0630bf35b" integrity sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ== @@ -4662,13 +4869,16 @@ "@typescript-eslint/visitor-keys" "6.21.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.56.0": - version "5.56.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.56.0.tgz#62b4055088903b5254fa20403010e1c16d6ab725" - integrity sha512-jGYKyt+iBakD0SA5Ww8vFqGpoV2asSjwt60Gl6YcO8ksQ8s2HlUEyHBMSa38bdLopYqGf7EYQMUIGdT/Luw+sw== +"@typescript-eslint/parser@^8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.3.0.tgz#3c72c32bc909cb91ce3569e7d11d729ad84deafa" + integrity sha512-h53RhVyLu6AtpUzVCYLPhZGL5jzTD9fZL+SYf/+hYOx2bDkyQXztXSc4tbvKYHzfMXExMLiL9CWqJmVz6+78IQ== dependencies: - "@typescript-eslint/types" "5.56.0" - "@typescript-eslint/visitor-keys" "5.56.0" + "@typescript-eslint/scope-manager" "8.3.0" + "@typescript-eslint/types" "8.3.0" + "@typescript-eslint/typescript-estree" "8.3.0" + "@typescript-eslint/visitor-keys" "8.3.0" + debug "^4.3.4" "@typescript-eslint/scope-manager@6.21.0": version "6.21.0" @@ -4678,38 +4888,33 @@ "@typescript-eslint/types" "6.21.0" "@typescript-eslint/visitor-keys" "6.21.0" -"@typescript-eslint/type-utils@6.21.0": - version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz#6473281cfed4dacabe8004e8521cee0bd9d4c01e" - integrity sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag== +"@typescript-eslint/scope-manager@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.3.0.tgz#834301d2e70baf924c26818b911bdc40086f7468" + integrity sha512-mz2X8WcN2nVu5Hodku+IR8GgCOl4C0G/Z1ruaWN4dgec64kDBabuXyPAr+/RgJtumv8EEkqIzf3X2U5DUKB2eg== dependencies: - "@typescript-eslint/typescript-estree" "6.21.0" - "@typescript-eslint/utils" "6.21.0" - debug "^4.3.4" - ts-api-utils "^1.0.1" + "@typescript-eslint/types" "8.3.0" + "@typescript-eslint/visitor-keys" "8.3.0" -"@typescript-eslint/types@5.56.0": - version "5.56.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.56.0.tgz#b03f0bfd6fa2afff4e67c5795930aff398cbd834" - integrity sha512-JyAzbTJcIyhuUhogmiu+t79AkdnqgPUEsxMTMc/dCZczGMJQh1MK2wgrju++yMN6AWroVAy2jxyPcPr3SWCq5w== +"@typescript-eslint/type-utils@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.3.0.tgz#c1ae6af8c21a27254321016b052af67ddb44a9ac" + integrity sha512-wrV6qh//nLbfXZQoj32EXKmwHf4b7L+xXLrP3FZ0GOUU72gSvLjeWUl5J5Ue5IwRxIV1TfF73j/eaBapxx99Lg== + dependencies: + "@typescript-eslint/typescript-estree" "8.3.0" + "@typescript-eslint/utils" "8.3.0" + debug "^4.3.4" + ts-api-utils "^1.3.0" "@typescript-eslint/types@6.21.0": version "6.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d" integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg== -"@typescript-eslint/typescript-estree@5.56.0": - version "5.56.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.56.0.tgz#48342aa2344649a03321e74cab9ccecb9af086c3" - integrity sha512-41CH/GncsLXOJi0jb74SnC7jVPWeVJ0pxQj8bOjH1h2O26jXN3YHKDT1ejkVz5YeTEQPeLCCRY0U2r68tfNOcg== - dependencies: - "@typescript-eslint/types" "5.56.0" - "@typescript-eslint/visitor-keys" "5.56.0" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - semver "^7.3.7" - tsutils "^3.21.0" +"@typescript-eslint/types@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.3.0.tgz#378e62447c2d7028236e55a81d3391026600563b" + integrity sha512-y6sSEeK+facMaAyixM36dQ5NVXTnKWunfD1Ft4xraYqxP0lC0POJmIaL/mw72CUMqjY9qfyVfXafMeaUj0noWw== "@typescript-eslint/typescript-estree@6.21.0": version "6.21.0" @@ -4725,26 +4930,29 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/utils@6.21.0": - version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.21.0.tgz#4714e7a6b39e773c1c8e97ec587f520840cd8134" - integrity sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ== +"@typescript-eslint/typescript-estree@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.3.0.tgz#3e3d38af101ba61a8568f034733b72bfc9f176b9" + integrity sha512-Mq7FTHl0R36EmWlCJWojIC1qn/ZWo2YiWYc1XVtasJ7FIgjo0MVv9rZWXEE7IK2CGrtwe1dVOxWwqXUdNgfRCA== dependencies: - "@eslint-community/eslint-utils" "^4.4.0" - "@types/json-schema" "^7.0.12" - "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "6.21.0" - "@typescript-eslint/types" "6.21.0" - "@typescript-eslint/typescript-estree" "6.21.0" - semver "^7.5.4" + "@typescript-eslint/types" "8.3.0" + "@typescript-eslint/visitor-keys" "8.3.0" + debug "^4.3.4" + fast-glob "^3.3.2" + is-glob "^4.0.3" + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^1.3.0" -"@typescript-eslint/visitor-keys@5.56.0": - version "5.56.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.56.0.tgz#f19eb297d972417eb13cb69b35b3213e13cc214f" - integrity sha512-1mFdED7u5bZpX6Xxf5N9U2c18sb+8EvU3tyOIj6LQZ5OOvnmj8BVeNNP603OFPm5KkS1a7IvCIcwrdHXaEMG/Q== +"@typescript-eslint/utils@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.3.0.tgz#b10972319deac5959c7a7075d0cf2b5e1de7ec08" + integrity sha512-F77WwqxIi/qGkIGOGXNBLV7nykwfjLsdauRB/DOFPdv6LTF3BHHkBpq81/b5iMPSF055oO2BiivDJV4ChvNtXA== dependencies: - "@typescript-eslint/types" "5.56.0" - eslint-visitor-keys "^3.3.0" + "@eslint-community/eslint-utils" "^4.4.0" + "@typescript-eslint/scope-manager" "8.3.0" + "@typescript-eslint/types" "8.3.0" + "@typescript-eslint/typescript-estree" "8.3.0" "@typescript-eslint/visitor-keys@6.21.0": version "6.21.0" @@ -4754,15 +4962,23 @@ "@typescript-eslint/types" "6.21.0" eslint-visitor-keys "^3.4.1" +"@typescript-eslint/visitor-keys@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.3.0.tgz#320d747d107af1eef1eb43fbc4ccdbddda13068b" + integrity sha512-RmZwrTbQ9QveF15m/Cl28n0LXD6ea2CjkhH5rQ55ewz3H24w+AMCJHPVYaZ8/0HoG8Z3cLLFFycRXxeO2tz9FA== + dependencies: + "@typescript-eslint/types" "8.3.0" + eslint-visitor-keys "^3.4.3" + "@ungap/structured-clone@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== -"@webassemblyjs/ast@1.11.6", "@webassemblyjs/ast@^1.11.5": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.6.tgz#db046555d3c413f8966ca50a95176a0e2c642e24" - integrity sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q== +"@webassemblyjs/ast@1.12.1", "@webassemblyjs/ast@^1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.12.1.tgz#bb16a0e8b1914f979f45864c23819cc3e3f0d4bb" + integrity sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg== dependencies: "@webassemblyjs/helper-numbers" "1.11.6" "@webassemblyjs/helper-wasm-bytecode" "1.11.6" @@ -4777,10 +4993,10 @@ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz#6132f68c4acd59dcd141c44b18cbebbd9f2fa768" integrity sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q== -"@webassemblyjs/helper-buffer@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz#b66d73c43e296fd5e88006f18524feb0f2c7c093" - integrity sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA== +"@webassemblyjs/helper-buffer@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz#6df20d272ea5439bf20ab3492b7fb70e9bfcb3f6" + integrity sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw== "@webassemblyjs/helper-numbers@1.11.6": version "1.11.6" @@ -4796,15 +5012,15 @@ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz#bb2ebdb3b83aa26d9baad4c46d4315283acd51e9" integrity sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA== -"@webassemblyjs/helper-wasm-section@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz#ff97f3863c55ee7f580fd5c41a381e9def4aa577" - integrity sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g== +"@webassemblyjs/helper-wasm-section@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz#3da623233ae1a60409b509a52ade9bc22a37f7bf" + integrity sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g== dependencies: - "@webassemblyjs/ast" "1.11.6" - "@webassemblyjs/helper-buffer" "1.11.6" + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/wasm-gen" "1.11.6" + "@webassemblyjs/wasm-gen" "1.12.1" "@webassemblyjs/ieee754@1.11.6": version "1.11.6" @@ -4825,77 +5041,75 @@ resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.6.tgz#90f8bc34c561595fe156603be7253cdbcd0fab5a" integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA== -"@webassemblyjs/wasm-edit@^1.11.5": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz#c72fa8220524c9b416249f3d94c2958dfe70ceab" - integrity sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw== +"@webassemblyjs/wasm-edit@^1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz#9f9f3ff52a14c980939be0ef9d5df9ebc678ae3b" + integrity sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g== dependencies: - "@webassemblyjs/ast" "1.11.6" - "@webassemblyjs/helper-buffer" "1.11.6" + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/helper-wasm-section" "1.11.6" - "@webassemblyjs/wasm-gen" "1.11.6" - "@webassemblyjs/wasm-opt" "1.11.6" - "@webassemblyjs/wasm-parser" "1.11.6" - "@webassemblyjs/wast-printer" "1.11.6" - -"@webassemblyjs/wasm-gen@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz#fb5283e0e8b4551cc4e9c3c0d7184a65faf7c268" - integrity sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA== - dependencies: - "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-wasm-section" "1.12.1" + "@webassemblyjs/wasm-gen" "1.12.1" + "@webassemblyjs/wasm-opt" "1.12.1" + "@webassemblyjs/wasm-parser" "1.12.1" + "@webassemblyjs/wast-printer" "1.12.1" + +"@webassemblyjs/wasm-gen@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz#a6520601da1b5700448273666a71ad0a45d78547" + integrity sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w== + dependencies: + "@webassemblyjs/ast" "1.12.1" "@webassemblyjs/helper-wasm-bytecode" "1.11.6" "@webassemblyjs/ieee754" "1.11.6" "@webassemblyjs/leb128" "1.11.6" "@webassemblyjs/utf8" "1.11.6" -"@webassemblyjs/wasm-opt@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz#d9a22d651248422ca498b09aa3232a81041487c2" - integrity sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g== +"@webassemblyjs/wasm-opt@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz#9e6e81475dfcfb62dab574ac2dda38226c232bc5" + integrity sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg== dependencies: - "@webassemblyjs/ast" "1.11.6" - "@webassemblyjs/helper-buffer" "1.11.6" - "@webassemblyjs/wasm-gen" "1.11.6" - "@webassemblyjs/wasm-parser" "1.11.6" + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" + "@webassemblyjs/wasm-gen" "1.12.1" + "@webassemblyjs/wasm-parser" "1.12.1" -"@webassemblyjs/wasm-parser@1.11.6", "@webassemblyjs/wasm-parser@^1.11.5": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz#bb85378c527df824004812bbdb784eea539174a1" - integrity sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ== +"@webassemblyjs/wasm-parser@1.12.1", "@webassemblyjs/wasm-parser@^1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz#c47acb90e6f083391e3fa61d113650eea1e95937" + integrity sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ== dependencies: - "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/ast" "1.12.1" "@webassemblyjs/helper-api-error" "1.11.6" "@webassemblyjs/helper-wasm-bytecode" "1.11.6" "@webassemblyjs/ieee754" "1.11.6" "@webassemblyjs/leb128" "1.11.6" "@webassemblyjs/utf8" "1.11.6" -"@webassemblyjs/wast-printer@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz#a7bf8dd7e362aeb1668ff43f35cb849f188eff20" - integrity sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A== +"@webassemblyjs/wast-printer@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz#bcecf661d7d1abdaf989d8341a4833e33e2b31ac" + integrity sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA== dependencies: - "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/ast" "1.12.1" "@xtuc/long" "4.2.2" -"@webpack-cli/configtest@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-1.2.0.tgz#7b20ce1c12533912c3b217ea68262365fa29a6f5" - integrity sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg== +"@webpack-cli/configtest@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-2.1.1.tgz#3b2f852e91dac6e3b85fb2a314fb8bef46d94646" + integrity sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw== -"@webpack-cli/info@^1.5.0": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-1.5.0.tgz#6c78c13c5874852d6e2dd17f08a41f3fe4c261b1" - integrity sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ== - dependencies: - envinfo "^7.7.3" +"@webpack-cli/info@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-2.0.2.tgz#cc3fbf22efeb88ff62310cf885c5b09f44ae0fdd" + integrity sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A== -"@webpack-cli/serve@^1.7.0": - version "1.7.0" - resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.7.0.tgz#e1993689ac42d2b16e9194376cfb6753f6254db1" - integrity sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q== +"@webpack-cli/serve@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e" + integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ== "@whatwg-node/events@^0.0.2": version "0.0.2" @@ -4998,10 +5212,10 @@ js-yaml "^3.10.0" tslib "^2.4.0" -"@zkochan/js-yaml@0.0.6": - version "0.0.6" - resolved "https://registry.yarnpkg.com/@zkochan/js-yaml/-/js-yaml-0.0.6.tgz#975f0b306e705e28b8068a07737fa46d3fc04826" - integrity sha512-nzvgl3VfhcELQ8LyVrYOru+UtAy1nrygk2+AGbTm8a5YcO6o8lSjAT+pfg3vJWxIoZKOUhrK6UU7xW/+00kQrg== +"@zkochan/js-yaml@0.0.7": + version "0.0.7" + resolved "https://registry.yarnpkg.com/@zkochan/js-yaml/-/js-yaml-0.0.7.tgz#4b0cb785220d7c28ce0ec4d0804deb5d821eae89" + integrity sha512-nrUSn7hzt7J6JWgWGz78ZYI8wj+gdIJdk0Ynjpp8l+trkn58Uqsf6RYrYkEK+3X18EX+TNdtJI0WxAtc+L84SQ== dependencies: argparse "^2.0.1" @@ -5021,7 +5235,7 @@ JSONStream@^1.0.3, JSONStream@^1.3.5: jsonparse "^1.2.0" through ">=2.2.7 <3" -abbrev@1, abbrev@^1.0.0: +abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== @@ -5031,6 +5245,11 @@ abbrev@1.0.x: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" integrity sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q== +abbrev@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-2.0.0.tgz#cf59829b8b4f03f89dda2771cb7f3653828c89bf" + integrity sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ== + abi-to-sol@^0.6.6: version "0.6.6" resolved "https://registry.yarnpkg.com/abi-to-sol/-/abi-to-sol-0.6.6.tgz#2f0b7ea949f7015c1a7939d200b9e8d07f2c3c6d" @@ -5059,7 +5278,7 @@ abortcontroller-polyfill@^1.7.3, abortcontroller-polyfill@^1.7.5: resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz#6738495f4e901fbb57b6c0611d0c75f76c485bed" integrity sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ== -abstract-level@1.0.3, abstract-level@^1.0.0, abstract-level@^1.0.2, abstract-level@^1.0.3: +abstract-level@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/abstract-level/-/abstract-level-1.0.3.tgz#78a67d3d84da55ee15201486ab44c09560070741" integrity sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA== @@ -5128,10 +5347,10 @@ accepts@^1.3.5, accepts@~1.3.8: mime-types "~2.1.34" negotiator "0.6.3" -acorn-import-assertions@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" - integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== +acorn-import-attributes@^1.9.5: + version "1.9.5" + resolved "https://registry.yarnpkg.com/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz#7eb1557b1ba05ef18b5ed0ec67591bfab04688ef" + integrity sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ== acorn-jsx@^5.3.2: version "5.3.2" @@ -5177,11 +5396,6 @@ add-stream@^1.0.0: resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" integrity sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ== -address@^1.0.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/address/-/address-1.2.2.tgz#2b5248dac5485a6390532c6a517fda2e3faac89e" - integrity sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA== - adm-zip@^0.4.16: version "0.4.16" resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.16.tgz#cf4c508fdffab02c269cbc7f471a875f05570365" @@ -5192,7 +5406,7 @@ aes-js@3.0.0: resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== -agent-base@6, agent-base@^6.0.2: +agent-base@6: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== @@ -5206,12 +5420,12 @@ agent-base@^7.0.2, agent-base@^7.1.0: dependencies: debug "^4.3.4" -agentkeepalive@^4.2.1: - version "4.5.0" - resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923" - integrity sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew== +agent-base@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.1.tgz#bdbded7dfb096b751a2a087eeeb9664725b2e317" + integrity sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA== dependencies: - humanize-ms "^1.2.1" + debug "^4.3.4" aggregate-error@^3.0.0: version "3.1.0" @@ -5243,7 +5457,7 @@ ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5, ajv@^6.12.6: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.0, ajv@^8.0.1, ajv@^8.12.0, ajv@^8.6.3: +ajv@^8.0.0, ajv@^8.0.1, ajv@^8.6.3: version "8.12.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== @@ -5253,6 +5467,16 @@ ajv@^8.0.0, ajv@^8.0.1, ajv@^8.12.0, ajv@^8.6.3: require-from-string "^2.0.2" uri-js "^4.2.2" +ajv@^8.17.1: + version "8.17.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" + integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== + dependencies: + fast-deep-equal "^3.1.3" + fast-uri "^3.0.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" @@ -5275,7 +5499,7 @@ ansi-colors@^3.2.3: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== -ansi-colors@^4.1.1: +ansi-colors@^4.1.1, ansi-colors@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== @@ -5317,17 +5541,12 @@ ansi-regex@^6.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== -ansi-sequence-parser@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz#4d790f31236ac20366b23b3916b789e1bde39aed" - integrity sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ== - ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" integrity sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA== -ansi-styles@^3.2.0, ansi-styles@^3.2.1: +ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== @@ -5356,10 +5575,10 @@ ansicolors@~0.3.2: resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.3.2.tgz#665597de86a9ffe3aa9bfbe6cae5c6ea426b4979" integrity sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg== -antlr4@^4.11.0: - version "4.12.0" - resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.12.0.tgz#e2323fbb057c77068a174914b0533398aeaba56a" - integrity sha512-23iB5IzXJZRZeK9TigzUyrNc9pSmNqAerJRBcNq1ETrmttMWRgaYZzC561IgEO3ygKsDJTYDTozABXa4b/fTQQ== +antlr4@^4.13.1-patch-1: + version "4.13.2" + resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.13.2.tgz#0d084ad0e32620482a9c3a0e2470c02e72e4006d" + integrity sha512-QiVbZhyy4xAZ17UPEuG3YTOt8ZaoeOR1CvEAqrEsDBsOqINslaB147i9xqljZqoyf5S+EUlGStaj+t22LT9MOg== antlr4ts@^0.5.0-alpha.4: version "0.5.0-alpha.4" @@ -5511,7 +5730,7 @@ append-transform@^2.0.0: dependencies: default-require-extensions "^3.0.0" -"aproba@^1.0.3 || ^2.0.0": +aproba@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== @@ -5521,14 +5740,6 @@ archy@^1.0.0: resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" integrity sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw== -are-we-there-yet@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz#679df222b278c64f2cdba1175cdc00b0d96164bd" - integrity sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg== - dependencies: - delegates "^1.0.0" - readable-stream "^3.6.0" - arg@^4.1.0: version "4.1.3" resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" @@ -5773,10 +5984,10 @@ async@^3.2.3, async@^3.2.4: resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== -async@^3.2.5: - version "3.2.5" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66" - integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg== +async@^3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.6.tgz#1b0728e14929d51b85b449b7f06e27c1145e38ce" + integrity sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA== asynckit@^0.4.0: version "0.4.0" @@ -5853,12 +6064,12 @@ axios@^0.26.1: dependencies: follow-redirects "^1.14.8" -axios@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.4.0.tgz#38a7bf1224cd308de271146038b551d725f0be1f" - integrity sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA== +axios@^1.7.4: + version "1.7.5" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.5.tgz#21eed340eb5daf47d29b6e002424b3e88c8c54b1" + integrity sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw== dependencies: - follow-redirects "^1.15.0" + follow-redirects "^1.15.6" form-data "^4.0.0" proxy-from-env "^1.1.0" @@ -5988,18 +6199,6 @@ big.js@^6.0.3: resolved "https://registry.yarnpkg.com/big.js/-/big.js-6.2.1.tgz#7205ce763efb17c2e41f26f121c420c6a7c2744f" integrity sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ== -bigint-crypto-utils@^3.0.23: - version "3.1.8" - resolved "https://registry.yarnpkg.com/bigint-crypto-utils/-/bigint-crypto-utils-3.1.8.tgz#e2e0f40cf45488f9d7f0e32ff84152aa73819d5d" - integrity sha512-+VMV9Laq8pXLBKKKK49nOoq9bfR3j7NNQAtbA617a4nw9bVLo8rsqkKMBgM2AJWlNX9fEIyYaYX+d0laqYV4tw== - dependencies: - bigint-mod-arith "^3.1.0" - -bigint-mod-arith@^3.1.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/bigint-mod-arith/-/bigint-mod-arith-3.1.2.tgz#658e416bc593a463d97b59766226d0a3021a76b1" - integrity sha512-nx8J8bBeiRR+NlsROFH9jHswW5HO8mgfOSqW0AmjicMMvaONDa8AO+5ViKDUUNytBPWiwfvZP4/Bj4Y3lUfvgQ== - bignumber.js@*, bignumber.js@^9.0.0, bignumber.js@^9.0.1: version "9.1.1" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.1.tgz#c4df7dc496bd849d4c9464344c1aa74228b4dac6" @@ -6010,16 +6209,15 @@ bignumber.js@7.2.1, bignumber.js@^7.2.1: resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ== -bin-build@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bin-build/-/bin-build-3.0.0.tgz#c5780a25a8a9f966d8244217e6c1f5082a143861" - integrity sha512-jcUOof71/TNAI2uM5uoUaDq2ePcVBQ3R/qhxAz1rX7UfvduAL/RXD3jXzvn8cVcDJdGVkiR1shal3OH0ImpuhA== +bin-links@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/bin-links/-/bin-links-4.0.4.tgz#c3565832b8e287c85f109a02a17027d152a58a63" + integrity sha512-cMtq4W5ZsEwcutJrVId+a/tjt8GSbS+h0oNkdl6+6rBuEv8Ot33Bevj5KPm40t309zuhVic8NjpuL42QCiJWWA== dependencies: - decompress "^4.0.0" - download "^6.2.2" - execa "^0.7.0" - p-map-series "^1.0.0" - tempfile "^2.0.0" + cmd-shim "^6.0.0" + npm-normalize-package-bin "^3.0.0" + read-cmd-shim "^4.0.0" + write-file-atomic "^5.0.0" binary-extensions@^2.0.0: version "2.2.0" @@ -6158,16 +6356,6 @@ brorand@^1.0.1, brorand@^1.1.0: resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== -browser-level@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browser-level/-/browser-level-1.0.1.tgz#36e8c3183d0fe1c405239792faaab5f315871011" - integrity sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ== - dependencies: - abstract-level "^1.0.2" - catering "^2.1.1" - module-error "^1.0.2" - run-parallel-limit "^1.1.0" - browser-pack@^6.0.1: version "6.1.0" resolved "https://registry.yarnpkg.com/browser-pack/-/browser-pack-6.1.0.tgz#c34ba10d0b9ce162b5af227c7131c92c2ecd5774" @@ -6192,7 +6380,7 @@ browser-resolve@^2.0.0: dependencies: resolve "^1.17.0" -browser-stdout@1.3.1: +browser-stdout@1.3.1, browser-stdout@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== @@ -6258,7 +6446,7 @@ browserify-zlib@~0.2.0: dependencies: pako "~1.0.5" -browserify@^17.0.0: +browserify@17.0.0: version "17.0.0" resolved "https://registry.yarnpkg.com/browserify/-/browserify-17.0.0.tgz#4c48fed6c02bfa2b51fd3b670fddb805723cdc22" integrity sha512-SaHqzhku9v/j6XsQMRxPyBrSP3gnwmE27gLJYZgMT2GeK3J0+0toN+MnuNYDfHwVGQfLiMZ7KSNSIXHemy905w== @@ -6342,6 +6530,16 @@ browserslist@^4.21.9: node-releases "^2.0.13" update-browserslist-db "^1.0.11" +browserslist@^4.23.1: + version "4.23.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.3.tgz#debb029d3c93ebc97ffbc8d9cbb03403e227c800" + integrity sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA== + dependencies: + caniuse-lite "^1.0.30001646" + electron-to-chromium "^1.5.4" + node-releases "^2.0.18" + update-browserslist-db "^1.1.0" + bs58@^4.0.0, bs58@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" @@ -6383,11 +6581,6 @@ buffer-alloc@^1.2.0: buffer-alloc-unsafe "^1.1.0" buffer-fill "^1.0.0" -buffer-crc32@~0.2.3: - version "0.2.13" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== - buffer-fill@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" @@ -6416,7 +6609,7 @@ buffer@6.0.3, buffer@^6.0.1, buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" -buffer@^5.0.5, buffer@^5.2.1, buffer@^5.5.0, buffer@^5.6.0: +buffer@^5.0.5, buffer@^5.5.0, buffer@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== @@ -6451,11 +6644,6 @@ builtin-status-codes@^3.0.0: resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" integrity sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ== -builtins@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" - integrity sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ== - builtins@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9" @@ -6480,17 +6668,17 @@ bytes@3.1.2: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== -cacache@^17.0.0: - version "17.1.4" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-17.1.4.tgz#b3ff381580b47e85c6e64f801101508e26604b35" - integrity sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A== +cacache@^18.0.0, cacache@^18.0.3: + version "18.0.4" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-18.0.4.tgz#4601d7578dadb59c66044e157d02a3314682d6a5" + integrity sha512-B+L5iIa9mgcjLbliir2th36yEwPftrzteHYujzsx3dFP/31GCHcIeS8f5MGd80odLOjaOvSpU3EEAmRQptkxLQ== dependencies: "@npmcli/fs" "^3.1.0" fs-minipass "^3.0.0" glob "^10.2.2" - lru-cache "^7.7.1" + lru-cache "^10.0.1" minipass "^7.0.3" - minipass-collect "^1.0.2" + minipass-collect "^2.0.1" minipass-flush "^1.0.5" minipass-pipeline "^1.2.4" p-map "^4.0.0" @@ -6508,6 +6696,24 @@ cacheable-lookup@^6.0.4: resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-6.1.0.tgz#0330a543471c61faa4e9035db583aad753b36385" integrity sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww== +cacheable-lookup@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz#3476a8215d046e5a3202a9209dd13fec1f933a27" + integrity sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w== + +cacheable-request@^10.2.8: + version "10.2.14" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-10.2.14.tgz#eb915b665fda41b79652782df3f553449c406b9d" + integrity sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ== + dependencies: + "@types/http-cache-semantics" "^4.0.2" + get-stream "^6.0.1" + http-cache-semantics "^4.1.1" + keyv "^4.5.3" + mimic-response "^4.0.0" + normalize-url "^8.0.0" + responselike "^3.0.0" + cacheable-request@^7.0.2: version "7.0.2" resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.2.tgz#ea0d0b889364a25854757301ca12b2da77f91d27" @@ -6618,6 +6824,11 @@ caniuse-lite@^1.0.30001580: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001585.tgz#0b4e848d84919c783b2a41c13f7de8ce96744401" integrity sha512-yr2BWR1yLXQ8fMpdS/4ZZXpseBgE7o4g41x3a6AJOqZuOi+iE/WdJYAuZ6Y95i4Ohd2Y+9MzIWRR+uGABH4s3Q== +caniuse-lite@^1.0.30001646: + version "1.0.30001653" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001653.tgz#b8af452f8f33b1c77f122780a4aecebea0caca56" + integrity sha512-XGWQVB8wFQ2+9NZwZ10GxTYC5hk0Fa+q8cSkr0tgvMhYhMHP/QC+WTgrePMDBWiWc/pV+1ik82Al20XOK25Gcw== + capital-case@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/capital-case/-/capital-case-1.0.4.tgz#9d130292353c9249f6b00fa5852bee38a717e669" @@ -6635,31 +6846,16 @@ cardinal@^2.1.1: ansicolors "~0.3.2" redeyed "~2.1.0" -case@^1.6.3: - version "1.6.3" - resolved "https://registry.yarnpkg.com/case/-/case-1.6.3.tgz#0a4386e3e9825351ca2e6216c60467ff5f1ea1c9" - integrity sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ== - caseless@^0.12.0, caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== -catering@^2.0.0, catering@^2.1.0, catering@^2.1.1: +catering@^2.0.0, catering@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/catering/-/catering-2.1.1.tgz#66acba06ed5ee28d5286133982a927de9a04b510" integrity sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w== -caw@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/caw/-/caw-2.0.1.tgz#6c3ca071fc194720883c2dc5da9b074bfc7e9e95" - integrity sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA== - dependencies: - get-proxy "^2.0.0" - isurl "^1.0.0-alpha5" - tunnel-agent "^0.6.0" - url-to-options "^1.0.1" - cbor@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/cbor/-/cbor-5.2.0.tgz#4cca67783ccd6de7b50ab4ed62636712f287a67c" @@ -6687,6 +6883,13 @@ chai-as-promised@^7.1.1: dependencies: check-error "^1.0.2" +chai-as-promised@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-8.0.0.tgz#7eda823f2a6fe9fd3a76bc76878886e955232e6f" + integrity sha512-sMsGXTrS3FunP/wbqh/KxM8Kj/aLPXQGkNtvE5wPfSToq8wkkvBpTZo1LIiEVmC4BwkKpag+l5h/20lBMk6nUg== + dependencies: + check-error "^2.0.0" + chai-bn@^0.2.1: version "0.2.2" resolved "https://registry.yarnpkg.com/chai-bn/-/chai-bn-0.2.2.tgz#4dcf30dbc79db2378a00781693bc749c972bf34f" @@ -6705,6 +6908,13 @@ chai@^4.2.0: pathval "^1.1.1" type-detect "^4.0.5" +chalk-template@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/chalk-template/-/chalk-template-1.1.0.tgz#ffc55db6dd745e9394b85327c8ac8466edb7a7b1" + integrity sha512-T2VJbcDuZQ0Tb2EWwSotMPJjgpy1/tGee1BTpUNsGZ/qgNjV2t7Mvu+d4600U564nbLesN1x2dPL+xii174Ekg== + dependencies: + chalk "^5.2.0" + chalk@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" @@ -6721,13 +6931,10 @@ chalk@4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@4.1.2, chalk@^4, chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" +chalk@5.3.0, chalk@^5.2.0, chalk@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" + integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== chalk@^1.1.3: version "1.1.3" @@ -6749,6 +6956,14 @@ chalk@^2.3.2, chalk@^2.4.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^4, chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + change-case-all@1.0.14: version "1.0.14" resolved "https://registry.yarnpkg.com/change-case-all/-/change-case-all-1.0.14.tgz#bac04da08ad143278d0ac3dda7eccd39280bfba1" @@ -6833,6 +7048,11 @@ check-error@^1.0.2: resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== +check-error@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-2.1.1.tgz#87eb876ae71ee388fa0471fe423f494be1d96ccc" + integrity sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw== + checkpoint-store@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/checkpoint-store/-/checkpoint-store-1.1.0.tgz#04e4cb516b91433893581e6d4601a78e9552ea06" @@ -6880,6 +7100,21 @@ chokidar@3.5.3, chokidar@^3.4.0, chokidar@^3.5.2: optionalDependencies: fsevents "~2.3.2" +chokidar@^3.5.3: + version "3.6.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" + integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== + 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" + optionalDependencies: + fsevents "~2.3.2" + chownr@^1.0.1, chownr@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" @@ -6890,6 +7125,11 @@ chownr@^2.0.0: resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== +chownr@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-3.0.0.tgz#9855e64ecd240a9cc4267ce8a4aa5d24a1da15e4" + integrity sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g== + chrome-trace-event@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" @@ -6900,11 +7140,16 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== -ci-info@^3.2.0, ci-info@^3.6.1: +ci-info@^3.2.0: version "3.8.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91" integrity sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw== +ci-info@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-4.0.0.tgz#65466f8b280fc019b9f50a5388115d17a63a44f2" + integrity sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg== + cids@^0.7.1: version "0.7.5" resolved "https://registry.yarnpkg.com/cids/-/cids-0.7.5.tgz#60a08138a99bfb69b6be4ceb63bfef7a396b28b2" @@ -6934,17 +7179,6 @@ class-is@^1.1.0: resolved "https://registry.yarnpkg.com/class-is/-/class-is-1.1.0.tgz#9d3c0fba0440d211d843cec3dedfa48055005825" integrity sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw== -classic-level@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/classic-level/-/classic-level-1.2.0.tgz#2d52bdec8e7a27f534e67fdeb890abef3e643c27" - integrity sha512-qw5B31ANxSluWz9xBzklRWTUAJ1SXIdaVKTVS7HcTGKOAmExx65Wo5BUICW+YGORe2FOUaDghoI9ZDxj82QcFg== - dependencies: - abstract-level "^1.0.2" - catering "^2.1.0" - module-error "^1.0.1" - napi-macros "~2.0.0" - node-gyp-build "^4.3.0" - clean-stack@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" @@ -6969,6 +7203,13 @@ cli-cursor@3.1.0, cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" +cli-cursor@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-4.0.0.tgz#3cecfe3734bf4fe02a8361cbdc0f6fe28c6a57ea" + integrity sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg== + dependencies: + restore-cursor "^4.0.0" + cli-logger@^0.5.40: version "0.5.40" resolved "https://registry.yarnpkg.com/cli-logger/-/cli-logger-0.5.40.tgz#097f0e11b072c7c698a26c47f588a29c20b48b0b" @@ -7004,6 +7245,11 @@ cli-spinners@^2.5.0: resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.0.tgz#5881d0ad96381e117bbe07ad91f2008fe6ffd8db" integrity sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g== +cli-spinners@^2.9.2: + version "2.9.2" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41" + integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg== + cli-table3@0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.0.tgz#b7b1bc65ca8e7b5cef9124e13dc2b21e2ce4faee" @@ -7106,10 +7352,10 @@ clone@^2.0.0, clone@^2.1.1: resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" integrity sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w== -cmd-shim@6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-6.0.1.tgz#a65878080548e1dca760b3aea1e21ed05194da9d" - integrity sha512-S9iI9y0nKR4hwEQsVWpyxld/6kRfGepGfzff83FcaiEBpmvlbA2nnGe7Cylgrx2f/p1P5S5wpRm9oL8z1PbS3Q== +cmd-shim@6.0.3, cmd-shim@^6.0.0: + version "6.0.3" + resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-6.0.3.tgz#c491e9656594ba17ac83c4bd931590a9d6e26033" + integrity sha512-FMabTRlc5t5zjdenF6mS0MBeFZm0XqHqeOkcskKFb/LYCcRQ5fVgLOHVc4Lq9CqABd9zhjwPjMBCJvMCziSVtA== code-error-fragment@0.0.230: version "0.0.230" @@ -7150,7 +7396,7 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -color-support@^1.1.3: +color-support@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== @@ -7215,27 +7461,27 @@ command-line-usage@^6.1.0: table-layout "^1.0.2" typical "^5.2.0" -commander@11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-11.0.0.tgz#43e19c25dbedc8256203538e8d7e9346877a6f67" - integrity sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ== - -commander@3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" - integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== +commander@12.1.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3" + integrity sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA== commander@^10.0.0: version "10.0.0" resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.0.tgz#71797971162cd3cf65f0b9d24eb28f8d303acdf1" integrity sha512-zS5PnTI22FIRM6ylNW8G4Ap0IEOyk62fhLSD0+uHRT9McRCLGpkVNvao4bjimpK/GShynyQkFFxHhwMcETmduA== -commander@^2.20.0, commander@^2.20.3, commander@^2.8.1: +commander@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" + integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== + +commander@^2.20.0, commander@^2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^7.0.0, commander@^7.2.0: +commander@^7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== @@ -7245,6 +7491,11 @@ commander@^8.1.0: resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== +common-ancestor-path@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz#4f7d2d1394d91b7abdf51871c62f71eadb0182a7" + integrity sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w== + common-tags@1.8.2, common-tags@^1.4.0: version "1.8.2" resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6" @@ -7344,7 +7595,7 @@ constants-browserify@~1.0.0: resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" integrity sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ== -content-disposition@0.5.4, content-disposition@^0.5.2: +content-disposition@0.5.4: version "0.5.4" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== @@ -7443,6 +7694,11 @@ convert-source-map@^1.1.0, convert-source-map@^1.7.0: resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== +convert-source-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" + integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== + convert-source-map@~1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.1.3.tgz#4829c877e9fe49b3161f3bf3673888e204699860" @@ -7517,15 +7773,15 @@ cosmiconfig@7.0.1: path-type "^4.0.0" yaml "^1.10.0" -cosmiconfig@8.2.0, cosmiconfig@^8.1.0, cosmiconfig@^8.1.3, cosmiconfig@^8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.2.0.tgz#f7d17c56a590856cd1e7cee98734dca272b0d8fd" - integrity sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ== +cosmiconfig@9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-9.0.0.tgz#34c3fc58287b915f3ae905ab6dc3de258b55ad9d" + integrity sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg== dependencies: - import-fresh "^3.2.1" + env-paths "^2.2.1" + import-fresh "^3.3.0" js-yaml "^4.1.0" - parse-json "^5.0.0" - path-type "^4.0.0" + parse-json "^5.2.0" cosmiconfig@^8.0.0: version "8.1.3" @@ -7537,6 +7793,16 @@ cosmiconfig@^8.0.0: parse-json "^5.0.0" path-type "^4.0.0" +cosmiconfig@^8.1.0, cosmiconfig@^8.1.3, cosmiconfig@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.2.0.tgz#f7d17c56a590856cd1e7cee98734dca272b0d8fd" + integrity sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ== + dependencies: + import-fresh "^3.2.1" + js-yaml "^4.1.0" + parse-json "^5.0.0" + path-type "^4.0.0" + crc-32@^1.2.0: version "1.2.2" resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" @@ -7594,15 +7860,6 @@ cross-spawn@7.0.3, cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - integrity sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A== - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -7644,6 +7901,13 @@ crypto-browserify@^3.0.0: randombytes "^2.0.0" randomfill "^1.0.3" +crypto-random-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-4.0.0.tgz#5a3cc53d7dd86183df5da0312816ceeeb5bb1fc2" + integrity sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA== + dependencies: + type-fest "^1.0.1" + css-select@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/css-select/-/css-select-5.1.0.tgz#b8ebd6554c3637ccc76688804ad3f6a6fdaea8a6" @@ -7660,6 +7924,11 @@ css-what@^6.1.0: resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== +cssesc@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== + cssfilter@0.0.10: version "0.0.10" resolved "https://registry.yarnpkg.com/cssfilter/-/cssfilter-0.0.10.tgz#c6d2672632a2e5c83e013e6864a42ce8defd20ae" @@ -7751,7 +8020,7 @@ debug@3.1.0: dependencies: ms "2.0.0" -debug@4, debug@4.3.4, debug@^4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: +debug@4, debug@4.3.4, debug@^4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -7765,6 +8034,13 @@ debug@^3.1.0, debug@^3.2.6, debug@^3.2.7: dependencies: ms "^2.1.1" +debug@^4.3.5: + version "4.3.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" + integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== + dependencies: + ms "2.1.2" + decamelize-keys@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.1.tgz#04a2d523b2f18d80d0158a43b895d56dff8d19d8" @@ -7788,7 +8064,7 @@ decode-uri-component@^0.2.0: resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== -decompress-response@^3.2.0, decompress-response@^3.3.0: +decompress-response@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" integrity sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA== @@ -7802,63 +8078,10 @@ decompress-response@^6.0.0: dependencies: mimic-response "^3.1.0" -decompress-tar@^4.0.0, decompress-tar@^4.1.0, decompress-tar@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/decompress-tar/-/decompress-tar-4.1.1.tgz#718cbd3fcb16209716e70a26b84e7ba4592e5af1" - integrity sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ== - dependencies: - file-type "^5.2.0" - is-stream "^1.1.0" - tar-stream "^1.5.2" - -decompress-tarbz2@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz#3082a5b880ea4043816349f378b56c516be1a39b" - integrity sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A== - dependencies: - decompress-tar "^4.1.0" - file-type "^6.1.0" - is-stream "^1.1.0" - seek-bzip "^1.0.5" - unbzip2-stream "^1.0.9" - -decompress-targz@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/decompress-targz/-/decompress-targz-4.1.1.tgz#c09bc35c4d11f3de09f2d2da53e9de23e7ce1eee" - integrity sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w== - dependencies: - decompress-tar "^4.1.1" - file-type "^5.2.0" - is-stream "^1.1.0" - -decompress-unzip@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/decompress-unzip/-/decompress-unzip-4.0.1.tgz#deaaccdfd14aeaf85578f733ae8210f9b4848f69" - integrity sha512-1fqeluvxgnn86MOh66u8FjbtJpAFv5wgCT9Iw8rcBqQcCo5tO8eiJw7NNTrvt9n4CRBVq7CstiS922oPgyGLrw== - dependencies: - file-type "^3.8.0" - get-stream "^2.2.0" - pify "^2.3.0" - yauzl "^2.4.2" - -decompress@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/decompress/-/decompress-4.2.1.tgz#007f55cc6a62c055afa37c07eb6a4ee1b773f118" - integrity sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ== - dependencies: - decompress-tar "^4.0.0" - decompress-tarbz2 "^4.0.0" - decompress-targz "^4.0.0" - decompress-unzip "^4.0.1" - graceful-fs "^4.1.10" - make-dir "^1.0.0" - pify "^2.3.0" - strip-dirs "^2.0.0" - -dedent@0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" - integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== +dedent@1.5.3: + version "1.5.3" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.3.tgz#99aee19eb9bae55a67327717b6e848d0bf777e5a" + integrity sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ== deep-eql@^4.0.1, deep-eql@^4.1.2: version "4.1.3" @@ -7867,7 +8090,7 @@ deep-eql@^4.0.1, deep-eql@^4.1.2: dependencies: type-detect "^4.0.0" -deep-extend@~0.6.0: +deep-extend@^0.6.0, deep-extend@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== @@ -7948,11 +8171,6 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== - depd@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" @@ -8008,14 +8226,6 @@ detect-installed@^2.0.4: dependencies: get-installed-path "^2.0.3" -detect-port@^1.3.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/detect-port/-/detect-port-1.5.1.tgz#451ca9b6eaf20451acb0799b8ab40dff7718727b" - integrity sha512-aBzdj76lueB6uUst5iAs7+0H/oOjqI5D16XUWxlWMIMROhcM0rfsNVk93zTngq1dDNpoXRr++Sus7ETAExppAQ== - dependencies: - address "^1.0.1" - debug "4" - detective@^5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/detective/-/detective-5.2.1.tgz#6af01eeda11015acb0e73f933242b70f24f91034" @@ -8045,6 +8255,11 @@ diff@^5.0.0: resolved "https://registry.yarnpkg.com/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40" integrity sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw== +diff@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.0.tgz#26ded047cd1179b78b9537d5ef725503ce1ae531" + integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A== + diffie-hellman@^5.0.0: version "5.0.3" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" @@ -8191,43 +8406,28 @@ dot-prop@^6.0.1: dependencies: is-obj "^2.0.0" +dotenv-expand@~11.0.6: + version "11.0.6" + resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-11.0.6.tgz#f2c840fd924d7c77a94eff98f153331d876882d3" + integrity sha512-8NHi73otpWsZGBSZwwknTXS5pqMOrk9+Ssrna8xCaxkzEpU9OTf9R5ArQGVw03//Zmk9MOwLPng9WwndvpAJ5g== + dependencies: + dotenv "^16.4.4" + dotenv@^16.0.0: version "16.0.3" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.3.tgz#115aec42bac5053db3c456db30cc243a5a836a07" integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ== -dotenv@^16.4.1: - version "16.4.1" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.1.tgz#1d9931f1d3e5d2959350d1250efab299561f7f11" - integrity sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ== - -dotenv@~16.3.1: - version "16.3.1" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e" - integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ== +dotenv@^16.4.4, dotenv@^16.4.5, dotenv@~16.4.5: + version "16.4.5" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" + integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== double-ended-queue@2.1.0-0: version "2.1.0-0" resolved "https://registry.yarnpkg.com/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz#103d3527fd31528f40188130c841efdd78264e5c" integrity sha512-+BNfZ+deCo8hMNpDqDnvT+c0XpJ5cUa6mqYq89bho2Ifze4URTqRkcwR399hWoTrTkbZ/XJYDgP6rc7pRgffEQ== -download@^6.2.2: - version "6.2.5" - resolved "https://registry.yarnpkg.com/download/-/download-6.2.5.tgz#acd6a542e4cd0bb42ca70cfc98c9e43b07039714" - integrity sha512-DpO9K1sXAST8Cpzb7kmEhogJxymyVUd5qz/vCOSyvwtp2Klj2XcDt5YUuasgxka44SxF0q5RriKIwJmQHG2AuA== - dependencies: - caw "^2.0.0" - content-disposition "^0.5.2" - decompress "^4.0.0" - ext-name "^5.0.0" - file-type "5.2.0" - filenamify "^2.0.0" - get-stream "^3.0.0" - got "^7.0.0" - make-dir "^1.0.0" - p-event "^1.0.0" - pify "^3.0.0" - dset@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/dset/-/dset-3.1.2.tgz#89c436ca6450398396dc6538ea00abc0c54cd45a" @@ -8240,11 +8440,6 @@ duplexer2@^0.1.2, duplexer2@~0.1.0, duplexer2@~0.1.2: dependencies: readable-stream "^2.0.2" -duplexer3@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.5.tgz#0b5e4d7bad5de8901ea4440624c8e1d20099217e" - integrity sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA== - duplexer@^0.1.1, duplexer@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" @@ -8268,6 +8463,11 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== +effect@3.6.5: + version "3.6.5" + resolved "https://registry.yarnpkg.com/effect/-/effect-3.6.5.tgz#be177847e69273ea9ed95bebe03bd672c5af474b" + integrity sha512-NhopZTAKljaAlR0CEroOAJJngdqg7bzlnWcDrCwh4d2WNVohVbBtUS4SGqLt8tUy7IFsTWATYiUtmhDG+YELjA== + ejs@3.1.8: version "3.1.8" resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.8.tgz#758d32910c78047585c7ef1f92f9ee041c1c190b" @@ -8304,6 +8504,11 @@ electron-to-chromium@^1.4.648: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.660.tgz#80be71d08c1224980e645904ab9155f3fa54a1ea" integrity sha512-1BqvQG0BBQrAA7FVL2EMrb5A1sVyXF3auwJneXjGWa1TpN+g0C4KbUsYWePz6OZ0mXZfXGy+RmQDELJWwE8v/Q== +electron-to-chromium@^1.5.4: + version "1.5.13" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.13.tgz#1abf0410c5344b2b829b7247e031f02810d442e6" + integrity sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q== + elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" @@ -8327,6 +8532,11 @@ emittery@^0.4.1: resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.4.1.tgz#abe9d3297389ba424ac87e53d1c701962ce7433d" integrity sha512-r4eRSeStEGf6M5SKdrQhhLK5bOwOBxQhIE3YSTnZE3GpKiLfnnhE+tPtrJE79+eDJgm39BM6LSoI8SCx4HbwlQ== +emoji-regex@^10.3.0: + version "10.4.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.4.0.tgz#03553afea80b3975749cfcb36f776ca268e413d4" + integrity sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw== + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -8378,10 +8588,10 @@ end-stream@~0.1.0: dependencies: write-stream "~0.4.3" -enhanced-resolve@^5.15.0: - version "5.15.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35" - integrity sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg== +enhanced-resolve@^5.17.1: + version "5.17.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" + integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" @@ -8411,7 +8621,12 @@ env-paths@^2.2.0, env-paths@^2.2.1: resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== -envinfo@7.8.1, envinfo@^7.7.3: +envinfo@7.13.0: + version "7.13.0" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.13.0.tgz#81fbb81e5da35d74e814941aeab7c325a606fb31" + integrity sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q== + +envinfo@^7.7.3: version "7.8.1" resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== @@ -8604,6 +8819,11 @@ escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== +escalade@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" + integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== + escape-html@^1.0.3, escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -8683,13 +8903,13 @@ eslint-plugin-import@^2.29.1: semver "^6.3.1" tsconfig-paths "^3.15.0" -eslint-plugin-prettier@^5.1.3: - version "5.1.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz#17cfade9e732cef32b5f5be53bd4e07afd8e67e1" - integrity sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw== +eslint-plugin-prettier@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz#d1c8f972d8f60e414c25465c163d16f209411f95" + integrity sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw== dependencies: prettier-linter-helpers "^1.0.0" - synckit "^0.8.6" + synckit "^0.9.1" eslint-scope@5.1.1: version "5.1.1" @@ -8699,7 +8919,7 @@ eslint-scope@5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-scope@^7.0.0, eslint-scope@^7.1.1: +eslint-scope@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== @@ -8715,7 +8935,7 @@ eslint-scope@^7.2.2: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-visitor-keys@^3.1.0, eslint-visitor-keys@^3.3.0: +eslint-visitor-keys@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== @@ -8730,16 +8950,16 @@ eslint-visitor-keys@^3.4.3: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@^8.56.0: - version "8.56.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.56.0.tgz#4957ce8da409dc0809f99ab07a1b94832ab74b15" - integrity sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ== +eslint@^8.57.0: + version "8.57.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" + integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.56.0" - "@humanwhocodes/config-array" "^0.11.13" + "@eslint/js" "8.57.0" + "@humanwhocodes/config-array" "^0.11.14" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" "@ungap/structured-clone" "^1.2.0" @@ -8830,16 +9050,7 @@ esniff@^2.0.1: event-emitter "^0.3.5" type "^2.7.2" -espree@^9.0.0, espree@^9.5.0: - version "9.5.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.0.tgz#3646d4e3f58907464edba852fa047e6a27bdf113" - integrity sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw== - dependencies: - acorn "^8.8.0" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.3.0" - -espree@^9.6.0, espree@^9.6.1: +espree@^9.3.1, espree@^9.6.0, espree@^9.6.1: version "9.6.1" resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== @@ -8848,6 +9059,15 @@ espree@^9.6.0, espree@^9.6.1: acorn-jsx "^5.3.2" eslint-visitor-keys "^3.4.1" +espree@^9.5.0: + version "9.5.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.0.tgz#3646d4e3f58907464edba852fa047e6a27bdf113" + integrity sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw== + dependencies: + acorn "^8.8.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.3.0" + esprima@2.7.x, esprima@^2.7.1: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" @@ -9228,7 +9448,7 @@ ethers@^4.0.0-beta.1, ethers@^4.0.32: uuid "2.0.1" xmlhttprequest "1.8.0" -ethers@^5.0.13, ethers@^5.7.0, ethers@^5.7.1, ethers@^5.7.2: +ethers@^5.0.13, ethers@^5.7.0, ethers@^5.7.2, ethers@~5.7.0: version "5.7.2" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== @@ -9340,7 +9560,7 @@ execa@5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" -execa@5.1.1, execa@^5.0.0: +execa@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== @@ -9355,19 +9575,6 @@ execa@5.1.1, execa@^5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - integrity sha512-RztN09XglpYI7aBBrJCPW95jEH7YF1UEPOoX9yDhUTPdp7mK+CQvnLTuD10BNXZ3byLTu2uehZ8EcKT/4CGiFw== - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - expand-tilde@^2.0.0, expand-tilde@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" @@ -9417,21 +9624,6 @@ express@^4.14.0, express@^4.17.1: utils-merge "1.0.1" vary "~1.1.2" -ext-list@^2.0.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/ext-list/-/ext-list-2.2.2.tgz#0b98e64ed82f5acf0f2931babf69212ef52ddd37" - integrity sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA== - dependencies: - mime-db "^1.28.0" - -ext-name@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ext-name/-/ext-name-5.0.0.tgz#70781981d183ee15d13993c8822045c506c8f0a6" - integrity sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ== - dependencies: - ext-list "^2.0.0" - sort-keys-length "^1.0.0" - ext@^1.1.2: version "1.7.0" resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" @@ -9458,11 +9650,6 @@ extract-files@^11.0.0: resolved "https://registry.yarnpkg.com/extract-files/-/extract-files-11.0.0.tgz#b72d428712f787eef1f5193aff8ab5351ca8469a" integrity sha512-FuoE1qtbJ4bBVvv94CC7s0oTnKUGvQs+Rjf1L2SJFfS+HTVVjhPFtehPdQ0JiGPqVNfSSZvL5yzHHQq2Z4WNhQ== -extract-files@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/extract-files/-/extract-files-9.0.0.tgz#8a7744f2437f81f5ed3250ed9f1550de902fe54a" - integrity sha512-CvdFfHkC95B4bBBk36hcEmvdR2awOdhhVUYH6S/zrVj3477zven/fJMYg7121h4T1xHZC+tetUpubpAhxwI7hQ== - extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" @@ -9492,12 +9679,19 @@ fast-check@3.1.1: dependencies: pure-rand "^5.0.1" -fast-check@^3.12.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-3.12.0.tgz#440949277387a053f7f82cd532fa3fcf67346ba1" - integrity sha512-SqahE9mlL3+lhjJ39joMLwcj6F+24hfZdf/tchlNO8sHcTdrUUdA5P/ZbSFZM9Xpzs36XaneGwE0FWepm/zyOA== +fast-check@3.21.0: + version "3.21.0" + resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-3.21.0.tgz#f9957cb4bc81b8529ae560ff5f772d9c147fc21c" + integrity sha512-QpmbiqRFRZ+SIlBJh6xi5d/PgXciUc/xWKc4Vi2RWEHHIRx6oM3f0fWNna++zP9VB5HUBTObUK9gTKQP3vVcrQ== + dependencies: + pure-rand "^6.1.0" + +fast-check@^3.21.0: + version "3.22.0" + resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-3.22.0.tgz#1a8153e9d6fbdcc60b818f447cbb9cac1fdd8fb6" + integrity sha512-8HKz3qXqnHYp/VCNn2qfjHdAdcI8zcSqOyX64GOMukp7SL2bfzfeDKjSd+UyECtejccaZv3LcvZTm9YDD22iCQ== dependencies: - pure-rand "^6.0.0" + pure-rand "^6.1.0" fast-decode-uri-component@^1.0.1: version "1.0.1" @@ -9519,17 +9713,6 @@ fast-fifo@^1.0.0: resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.2.0.tgz#2ee038da2468e8623066dee96958b0c1763aa55a" integrity sha512-NcvQXt7Cky1cNau15FWy64IjuO8X0JijhTBBrJj1YlxlDfRkJXNaK9RFUjwpfDPzMdv7wB38jr53l9tkNLxnWg== -fast-glob@3.2.7: - version "3.2.7" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1" - integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q== - 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.4" - fast-glob@^3.0.3: version "3.2.12" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" @@ -9552,6 +9735,17 @@ fast-glob@^3.2.9: merge2 "^1.3.0" micromatch "^4.0.4" +fast-glob@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" + integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== + 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.4" + fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -9581,6 +9775,11 @@ fast-safe-stringify@^2.0.6, fast-safe-stringify@^2.0.7: resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== +fast-uri@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.1.tgz#cddd2eecfc83a71c1be2cc2ef2061331be8a7134" + integrity sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw== + fast-url-parser@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/fast-url-parser/-/fast-url-parser-1.1.3.tgz#f4af3ea9f34d8a271cf58ad2b3759f431f0b318d" @@ -9625,13 +9824,6 @@ fbjs@^3.0.0: setimmediate "^1.0.5" ua-parser-js "^0.7.30" -fd-slicer@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" - integrity sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g== - dependencies: - pend "~1.2.0" - fetch-cookie@0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/fetch-cookie/-/fetch-cookie-0.11.0.tgz#e046d2abadd0ded5804ce7e2cae06d4331c15407" @@ -9653,21 +9845,6 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" -file-type@5.2.0, file-type@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-5.2.0.tgz#2ddbea7c73ffe36368dfae49dc338c058c2b8ad6" - integrity sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ== - -file-type@^3.8.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9" - integrity sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA== - -file-type@^6.1.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-6.2.0.tgz#e50cd75d356ffed4e306dc4f5bcf52a79903a919" - integrity sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg== - filelist@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.4.tgz#f78978a1e944775ff9e62e744424f215e58352b5" @@ -9675,20 +9852,6 @@ filelist@^1.0.4: dependencies: minimatch "^5.0.1" -filename-reserved-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz#abf73dfab735d045440abfea2d91f389ebbfa229" - integrity sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ== - -filenamify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-2.1.0.tgz#88faf495fb1b47abfd612300002a16228c677ee9" - integrity sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA== - dependencies: - filename-reserved-regex "^2.0.0" - strip-outer "^1.0.0" - trim-repeated "^1.0.0" - fill-range@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" @@ -9788,7 +9951,7 @@ fmix@^0.1.0: dependencies: imul "^1.0.0" -follow-redirects@^1.12.1, follow-redirects@^1.14.0, follow-redirects@^1.14.8, follow-redirects@^1.15.0: +follow-redirects@^1.12.1, follow-redirects@^1.14.0, follow-redirects@^1.14.8, follow-redirects@^1.15.0, follow-redirects@^1.15.6: version "1.15.6" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== @@ -9831,6 +9994,11 @@ form-data-encoder@1.7.1: resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-1.7.1.tgz#ac80660e4f87ee0d3d3c3638b7da8278ddb8ec96" integrity sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg== +form-data-encoder@^2.1.2: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-2.1.4.tgz#261ea35d2a70d48d30ec7a9603130fa5515e9cd5" + integrity sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw== + form-data@^2.2.0: version "2.5.1" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" @@ -9840,15 +10008,6 @@ form-data@^2.2.0: combined-stream "^1.0.6" mime-types "^2.1.12" -form-data@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" - integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - form-data@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" @@ -9892,20 +10051,18 @@ fromentries@^1.2.0: resolved "https://registry.yarnpkg.com/fromentries/-/fromentries-1.3.2.tgz#e4bca6808816bf8f93b52750f1127f5a6fd86e3a" integrity sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg== +front-matter@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/front-matter/-/front-matter-4.0.2.tgz#b14e54dc745cfd7293484f3210d15ea4edd7f4d5" + integrity sha512-I8ZuJ/qG92NWX8i5x1Y8qyj3vizhXS31OxjKDu3LKP+7/qBgfIKValiZIEwoVoJKUHlhWtYrktkxV1XsX+pPlg== + dependencies: + js-yaml "^3.13.1" + fs-constants@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== -fs-extra@11.1.1, fs-extra@^11.1.0, fs-extra@^11.1.1: - version "11.1.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.1.tgz#da69f7c39f3b002378b0954bb6ae7efdc0876e2d" - integrity sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - fs-extra@9.1.0, fs-extra@^9.0.1, fs-extra@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" @@ -9936,6 +10093,24 @@ fs-extra@^10.0.0: jsonfile "^6.0.1" universalify "^2.0.0" +fs-extra@^11.1.0: + version "11.1.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.1.tgz#da69f7c39f3b002378b0954bb6ae7efdc0876e2d" + integrity sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs-extra@^11.2.0: + version "11.2.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b" + integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^4.0.2: version "4.0.3" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" @@ -10047,7 +10222,7 @@ functions-have-names@^1.2.2, functions-have-names@^1.2.3: resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== -ganache-time-traveler@1.0.16: +ganache-time-traveler@^1.0.16: version "1.0.16" resolved "https://registry.yarnpkg.com/ganache-time-traveler/-/ganache-time-traveler-1.0.16.tgz#9ddeafd72c909ecd3501e4ec628a3af707334b3a" integrity sha512-oUaQge9tiT/zzcGqehqJcoH10claKi9QFhq7zI1Wa3KtdPobjgLVMYvqXCJuHCAZoS7sHvLB/N/rSnhmivxaKw== @@ -10073,20 +10248,6 @@ ganache@7.9.1: bufferutil "4.0.5" utf-8-validate "5.0.7" -gauge@^4.0.3: - version "4.0.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-4.0.4.tgz#52ff0652f2bbf607a989793d53b751bef2328dce" - integrity sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg== - dependencies: - aproba "^1.0.3 || ^2.0.0" - color-support "^1.1.3" - console-control-strings "^1.1.0" - has-unicode "^2.0.1" - signal-exit "^3.0.7" - string-width "^4.2.3" - strip-ansi "^6.0.1" - wide-align "^1.1.5" - gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" @@ -10107,6 +10268,11 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-east-asian-width@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz#5e6ebd9baee6fb8b7b6bd505221065f0cd91f64e" + integrity sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA== + get-func-name@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" @@ -10195,31 +10361,11 @@ get-port@^3.1.0: resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" integrity sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg== -get-proxy@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/get-proxy/-/get-proxy-2.1.0.tgz#349f2b4d91d44c4d4d4e9cba2ad90143fac5ef93" - integrity sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw== - dependencies: - npm-conf "^1.1.0" - get-stream@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.0.tgz#3e0012cb6827319da2706e601a1583e8629a6718" integrity sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg== -get-stream@^2.2.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de" - integrity sha512-AUGhbbemXxrZJRD5cDvKtQxLuYaIbNtDTK8YqupCI393Q2KSTreEsLUN3ZxAWFGiKTzL6nKuzfcIvieflUX9qA== - dependencies: - object-assign "^4.0.1" - pinkie-promise "^2.0.0" - -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - integrity sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ== - get-stream@^5.1.0: version "5.2.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" @@ -10288,10 +10434,10 @@ git-up@^7.0.0: is-ssh "^1.4.0" parse-url "^8.1.0" -git-url-parse@13.1.0: - version "13.1.0" - resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-13.1.0.tgz#07e136b5baa08d59fabdf0e33170de425adf07b4" - integrity sha512-5FvPJP/70WkIprlUZ33bm4UAaFdjcLkJLpWft1BeZKqwR0uhhNGoKwlUaPtVb4LxCSQ++erHapRak9kWGj+FCA== +git-url-parse@14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-14.0.0.tgz#18ce834726d5fbca0c25a4555101aa277017418f" + integrity sha512-NnLweV+2A4nCvn4U/m2AoYu0pPKlsmhK9cknG7IMwsjFY1S2jxM+mAhsDxyxfCIGfGaD+dozsyX4b6vkYc83yQ== dependencies: git-up "^7.0.0" @@ -10302,37 +10448,25 @@ gitconfiglocal@^1.0.0: dependencies: ini "^1.3.2" -glob-parent@5.1.2, glob-parent@^5.1.2, glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob-parent@^6.0.2: +glob-parent@6.0.2, glob-parent@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== dependencies: is-glob "^4.0.3" +glob-parent@^5.1.2, glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + glob-to-regexp@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@7.1.4: - version "7.1.4" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" - integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - glob@7.1.7: version "7.1.7" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" @@ -10378,6 +10512,18 @@ glob@^10.2.2: minipass "^5.0.0 || ^6.0.2 || ^7.0.0" path-scurry "^1.10.1" +glob@^10.3.10, glob@^10.3.7: + version "10.4.5" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" + integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== + dependencies: + foreground-child "^3.1.0" + jackspeak "^3.1.2" + minimatch "^9.0.4" + minipass "^7.1.2" + package-json-from-dist "^1.0.0" + path-scurry "^1.11.1" + glob@^5.0.15: version "5.0.15" resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" @@ -10401,7 +10547,7 @@ glob@^7.0.0, glob@^7.0.5, glob@^7.1.0, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, gl once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.0.1, glob@^8.0.3: +glob@^8.0.3, glob@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== @@ -10487,6 +10633,18 @@ globby@11.1.0, globby@^11.0.3, globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" +globby@14.0.2: + version "14.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-14.0.2.tgz#06554a54ccfe9264e5a9ff8eded46aa1e306482f" + integrity sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw== + dependencies: + "@sindresorhus/merge-streams" "^2.1.0" + fast-glob "^3.3.2" + ignore "^5.2.4" + path-type "^5.0.0" + slash "^5.1.0" + unicorn-magic "^0.1.0" + globby@^10.0.1: version "10.0.2" resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" @@ -10580,27 +10738,29 @@ got@^11.8.5: p-cancelable "^2.0.0" responselike "^2.0.0" -got@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a" - integrity sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw== +got@^12.1.0: + version "12.6.1" + resolved "https://registry.yarnpkg.com/got/-/got-12.6.1.tgz#8869560d1383353204b5a9435f782df9c091f549" + integrity sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ== dependencies: - decompress-response "^3.2.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - is-plain-obj "^1.1.0" - is-retry-allowed "^1.0.0" - is-stream "^1.0.0" - isurl "^1.0.0-alpha5" - lowercase-keys "^1.0.0" - p-cancelable "^0.3.0" - p-timeout "^1.1.1" - safe-buffer "^5.0.1" - timed-out "^4.0.0" - url-parse-lax "^1.0.0" - url-to-options "^1.0.1" + "@sindresorhus/is" "^5.2.0" + "@szmarczak/http-timer" "^5.0.1" + cacheable-lookup "^7.0.0" + cacheable-request "^10.2.8" + decompress-response "^6.0.0" + form-data-encoder "^2.1.2" + get-stream "^6.0.1" + http2-wrapper "^2.1.10" + lowercase-keys "^3.0.0" + p-cancelable "^3.0.0" + responselike "^3.0.0" + +graceful-fs@4.2.10: + version "4.2.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== -graceful-fs@4.2.11, graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: +graceful-fs@4.2.11, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.6: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -10637,17 +10797,7 @@ graphql-import-node@^0.0.5: resolved "https://registry.yarnpkg.com/graphql-import-node/-/graphql-import-node-0.0.5.tgz#caf76a6cece10858b14f27cce935655398fc1bf0" integrity sha512-OXbou9fqh9/Lm7vwXT0XoRN9J5+WCYKnbiTalgFDvkQERITRmcfncZs6aVABedd5B85yQU5EULS4a5pnbpuI0Q== -graphql-request@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-5.2.0.tgz#a05fb54a517d91bb2d7aefa17ade4523dc5ebdca" - integrity sha512-pLhKIvnMyBERL0dtFI3medKqWOz/RhHdcgbZ+hMMIb32mEPa5MJSzS4AuXxfI4sRAu6JVVk5tvXuGfCWl9JYWQ== - dependencies: - "@graphql-typed-document-node/core" "^3.1.1" - cross-fetch "^3.1.5" - extract-files "^9.0.0" - form-data "^3.0.0" - -graphql-request@^6.0.0, graphql-request@^6.1.0: +graphql-request@6.1.0, graphql-request@^6.0.0, graphql-request@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-6.1.0.tgz#f4eb2107967af3c7a5907eb3131c671eac89be4f" integrity sha512-p+XPfS4q7aIpKVcgmnZKhMNqhltk20hfXtkaIkTfjjmiKMJ5xrt5c743cL03y/K7y1rg3WrIC49xGiEQ4mxdNw== @@ -10684,11 +10834,16 @@ graphql@^15.3.0: resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.8.0.tgz#33410e96b012fa3bdb1091cc99a94769db212b38" integrity sha512-5gghUc24tP9HRznNpV2+FIoq3xKkj5dTQqf4v0CpdPbFVwFkWoxOM+o+2OC9ZSvjEMTjfmG9QT+gcvggTwW1zw== -graphql@^16.6.0, graphql@^16.8.1: +graphql@^16.6.0: version "16.8.1" resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.1.tgz#1930a965bef1170603702acdb68aedd3f3cf6f07" integrity sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw== +graphql@^16.9.0: + version "16.9.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.9.0.tgz#1c310e63f16a49ce1fbb230bd0a000e99f6f115f" + integrity sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw== + gzip-size@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-6.0.0.tgz#065367fd50c239c0671cbcbad5be3e2eeb10e462" @@ -10738,10 +10893,10 @@ hard-rejection@^2.1.0: resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== -hardhat-deploy@^0.11.45: - version "0.11.45" - resolved "https://registry.yarnpkg.com/hardhat-deploy/-/hardhat-deploy-0.11.45.tgz#bed86118175a38a03bb58aba2ce1ed5e80a20bc8" - integrity sha512-aC8UNaq3JcORnEUIwV945iJuvBwi65tjHVDU3v6mOcqik7WAzHVCJ7cwmkkipsHrWysrB5YvGF1q9S1vIph83w== +hardhat-deploy@^0.12.4: + version "0.12.4" + resolved "https://registry.yarnpkg.com/hardhat-deploy/-/hardhat-deploy-0.12.4.tgz#5ebef37f1004f52a74987213b0465ad7c9433fb2" + integrity sha512-bYO8DIyeGxZWlhnMoCBon9HNZb6ji0jQn7ngP1t5UmGhC8rQYhji7B73qETMOFhzt5ECZPr+U52duj3nubsqdQ== dependencies: "@ethersproject/abi" "^5.7.0" "@ethersproject/abstract-signer" "^5.7.0" @@ -10766,25 +10921,19 @@ hardhat-deploy@^0.11.45: match-all "^1.2.6" murmur-128 "^0.2.1" qs "^6.9.4" - zksync-web3 "^0.14.3" + zksync-ethers "^5.0.0" -hardhat@^2.19.5: - version "2.19.5" - resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.19.5.tgz#6017c35ae2844b669e9bcc84c3d05346d4ef031c" - integrity sha512-vx8R7zWCYVgM56vA6o0Wqx2bIIptkN4TMs9QwDqZVNGRhMzBfzqUeEYbp+69gxWp1neg2V2nYQUaaUv7aom1kw== +hardhat@2.22.9, hardhat@^2.22.9: + version "2.22.9" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.22.9.tgz#d8f2720561dc60f5cc0ee80c82f9b1907fd61c88" + integrity sha512-sWiuI/yRdFUPfndIvL+2H18Vs2Gav0XacCFYY5msT5dHOWkhLxESJySIk9j83mXL31aXL8+UMA9OgViFLexklg== dependencies: "@ethersproject/abi" "^5.1.2" "@metamask/eth-sig-util" "^4.0.0" - "@nomicfoundation/ethereumjs-block" "5.0.2" - "@nomicfoundation/ethereumjs-blockchain" "7.0.2" - "@nomicfoundation/ethereumjs-common" "4.0.2" - "@nomicfoundation/ethereumjs-evm" "2.0.2" - "@nomicfoundation/ethereumjs-rlp" "5.0.2" - "@nomicfoundation/ethereumjs-statemanager" "2.0.2" - "@nomicfoundation/ethereumjs-trie" "6.0.2" - "@nomicfoundation/ethereumjs-tx" "5.0.2" - "@nomicfoundation/ethereumjs-util" "9.0.2" - "@nomicfoundation/ethereumjs-vm" "7.0.2" + "@nomicfoundation/edr" "^0.5.2" + "@nomicfoundation/ethereumjs-common" "4.0.4" + "@nomicfoundation/ethereumjs-tx" "5.0.4" + "@nomicfoundation/ethereumjs-util" "9.0.4" "@nomicfoundation/solidity-analyzer" "^0.1.0" "@sentry/node" "^5.18.1" "@types/bn.js" "^5.1.0" @@ -10815,7 +10964,7 @@ hardhat@^2.19.5: raw-body "^2.4.1" resolve "1.17.0" semver "^6.3.0" - solc "0.7.3" + solc "0.8.26" source-map-support "^0.5.13" stacktrace-parser "^0.1.10" tsort "0.0.1" @@ -10862,23 +11011,11 @@ has-proto@^1.0.1: resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== -has-symbol-support-x@^1.4.1: - version "1.4.2" - resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" - integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== - has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== -has-to-string-tag-x@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" - integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw== - dependencies: - has-symbol-support-x "^1.4.1" - has-tostringtag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" @@ -10886,7 +11023,7 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" -has-unicode@2.0.1, has-unicode@^2.0.1: +has-unicode@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== @@ -10938,7 +11075,7 @@ hasown@^2.0.0: dependencies: function-bind "^1.1.2" -he@1.2.0: +he@1.2.0, he@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== @@ -11002,13 +11139,6 @@ hosted-git-info@^2.1.4, hosted-git-info@^2.6.0: resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== -hosted-git-info@^3.0.6: - version "3.0.8" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-3.0.8.tgz#6e35d4cc87af2c5f816e4cb9ce350ba87a3f370d" - integrity sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw== - dependencies: - lru-cache "^6.0.0" - hosted-git-info@^4.0.0, hosted-git-info@^4.0.1: version "4.1.0" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.1.0.tgz#827b82867e9ff1c8d0c4d9d53880397d2c86d224" @@ -11016,12 +11146,12 @@ hosted-git-info@^4.0.0, hosted-git-info@^4.0.1: dependencies: lru-cache "^6.0.0" -hosted-git-info@^6.0.0: - version "6.1.1" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-6.1.1.tgz#629442c7889a69c05de604d52996b74fe6f26d58" - integrity sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w== +hosted-git-info@^7.0.0, hosted-git-info@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-7.0.2.tgz#9b751acac097757667f30114607ef7b661ff4f17" + integrity sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w== dependencies: - lru-cache "^7.5.1" + lru-cache "^10.0.1" html-escaper@^2.0.0, html-escaper@^2.0.2: version "2.0.2" @@ -11074,15 +11204,6 @@ http-https@^1.0.0: resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b" integrity sha512-o0PWwVCSp3O0wS6FvNr6xfBCHgt0m1tvPLFOCc2iFDKTRAXhB7m8klDf7ErowFH8POa6dVdGatKU5I1YYwzUyg== -http-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" - integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w== - dependencies: - "@tootallnate/once" "2" - agent-base "6" - debug "4" - http-proxy-agent@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz#e9096c5afd071a3fce56e6252bb321583c124673" @@ -11144,22 +11265,23 @@ https-proxy-agent@^7.0.0: agent-base "^7.0.2" debug "4" +https-proxy-agent@^7.0.1: + version "7.0.5" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz#9e8b5013873299e11fab6fd548405da2d6c602b2" + integrity sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw== + dependencies: + agent-base "^7.0.2" + debug "4" + human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -humanize-ms@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" - integrity sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ== - dependencies: - ms "^2.0.0" - -husky@^8.0.3: - version "8.0.3" - resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184" - integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg== +husky@^9.1.5: + version "9.1.5" + resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.5.tgz#2b6edede53ee1adbbd3a3da490628a23f5243b83" + integrity sha512-rowAVRUBfI0b4+niA4SJMhfQwc107VLkBUgEYYAOQAbqDCnra1nYh83hF/MDmhYs9t9n1E3DuKOrs2LYNC+0Ag== hyperlinker@^1.0.0: version "1.0.0" @@ -11197,17 +11319,10 @@ ignore-by-default@^1.0.1: resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" integrity sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA== -ignore-walk@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-5.0.1.tgz#5f199e23e1288f518d90358d461387788a154776" - integrity sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw== - dependencies: - minimatch "^5.0.1" - -ignore-walk@^6.0.0: - version "6.0.3" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-6.0.3.tgz#0fcdb6decaccda35e308a7b0948645dd9523b7bb" - integrity sha512-C7FfFoTA+bI10qfeydT8aZbvr91vAEU+2W5BZUlzPec47oNb07SsOfwYrtxuvOYdUApPP/Qlh4DtAO51Ekk2QA== +ignore-walk@^6.0.4: + version "6.0.5" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-6.0.5.tgz#ef8d61eab7da169078723d1f82833b36e200b0dd" + integrity sha512-VuuG0wCnjhnylG1ABXT3dAuIpTNDs/G8jlpmwXY03fXoXy/8ZK8/T+hMzt8L4WnrLCJgdybqgPagnF/f97cg3A== dependencies: minimatch "^9.0.0" @@ -11216,6 +11331,11 @@ ignore@^5.0.4, ignore@^5.0.5, ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.4: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== +ignore@^5.3.1: + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== + immediate@3.3.0, immediate@^3.2.3: version "3.3.0" resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.3.0.tgz#1aef225517836bcdf7f2a2de2600c79ff0269266" @@ -11241,7 +11361,7 @@ immutable@~3.7.6: resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.7.6.tgz#13b4d3cb12befa15482a26fe1b2ebae640071e4b" integrity sha512-AizQPcaofEtO11RZhPPHBOJRdo/20MKQF9mBLnVkBoyHi1/zXK8fzVdnEpSV9gxqtnh6Qomfp3F0xT5qP/vThw== -import-fresh@^3.0.0, import-fresh@^3.2.1: +import-fresh@^3.0.0, import-fresh@^3.2.1, import-fresh@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -11295,20 +11415,25 @@ inherits@2.0.1: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" integrity sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA== -ini@^1.3.2, ini@^1.3.4, ini@^1.3.5, ini@^1.3.8: +ini@^1.3.2, ini@^1.3.4, ini@^1.3.5, ini@^1.3.8, ini@~1.3.0: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -init-package-json@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-5.0.0.tgz#030cf0ea9c84cfc1b0dc2e898b45d171393e4b40" - integrity sha512-kBhlSheBfYmq3e0L1ii+VKe3zBTLL5lDCDWR+f9dLmEGSB3MqLlMlsolubSsyI88Bg6EA+BIMlomAnQ1SwgQBw== +ini@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ini/-/ini-4.1.3.tgz#4c359675a6071a46985eb39b14e4a2c0ec98a795" + integrity sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg== + +init-package-json@6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-6.0.3.tgz#2552fba75b6eed2495dc97f44183e2e5a5bcf8b0" + integrity sha512-Zfeb5ol+H+eqJWHTaGca9BovufyGeIfr4zaaBorPmJBMrJ+KBnN+kQx2ZtXdsotUTgldHmHQV44xvUWOUA7E2w== dependencies: - npm-package-arg "^10.0.0" + "@npmcli/package-json" "^5.0.0" + npm-package-arg "^11.0.0" promzard "^1.0.0" - read "^2.0.0" - read-package-json "^6.0.0" + read "^3.0.1" semver "^7.3.5" validate-npm-package-license "^3.0.4" validate-npm-package-name "^5.0.0" @@ -11406,10 +11531,10 @@ interpret@^1.0.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== -interpret@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" - integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw== +interpret@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4" + integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ== invariant@^2.2.4: version "2.2.4" @@ -11430,16 +11555,19 @@ io-ts@1.10.4: dependencies: fp-ts "^1.0.0" +ip-address@^9.0.5: + version "9.0.5" + resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-9.0.5.tgz#117a960819b08780c3bd1f14ef3c1cc1d3f3ea5a" + integrity sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g== + dependencies: + jsbn "1.1.0" + sprintf-js "^1.1.3" + ip-regex@^4.0.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5" integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q== -ip@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105" - integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ== - ipaddr.js@1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" @@ -11609,7 +11737,7 @@ is-ci@3.0.1: dependencies: ci-info "^3.2.0" -is-core-module@^2.13.0, is-core-module@^2.5.0, is-core-module@^2.8.1, is-core-module@^2.9.0: +is-core-module@^2.13.0, is-core-module@^2.5.0, is-core-module@^2.9.0: version "2.13.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== @@ -11703,6 +11831,11 @@ is-interactive@^1.0.0: resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== +is-interactive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-2.0.0.tgz#40c57614593826da1100ade6059778d597f16e90" + integrity sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ== + is-invalid-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/is-invalid-path/-/is-invalid-path-0.1.0.tgz#307a855b3cf1a938b44ea70d2c61106053714f34" @@ -11736,11 +11869,6 @@ is-lower-case@^2.0.2: dependencies: tslib "^2.0.3" -is-natural-number@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8" - integrity sha512-Y4LTamMe0DDQIIAlaer9eKebAlDSV6huy+TWhJVPlzZh2o4tRP5SQWFlLn5N0To4mDD22/qdOq+veo1cSISLgQ== - is-negative-zero@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" @@ -11763,11 +11891,6 @@ is-obj@^2.0.0: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== -is-object@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" - integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== - is-path-inside@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" @@ -11810,11 +11933,6 @@ is-relative@^1.0.0: dependencies: is-unc-path "^1.0.0" -is-retry-allowed@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" - integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== - is-retry-allowed@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-2.2.0.tgz#88f34cbd236e043e71b6932d09b0c65fb7b4d71d" @@ -11839,16 +11957,16 @@ is-stream@2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== -is-stream@^1.0.0, is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ== - is-stream@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== +is-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" + integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== + is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" @@ -11905,6 +12023,16 @@ is-unicode-supported@^0.1.0: resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== +is-unicode-supported@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz#d824984b616c292a2e198207d4a609983842f714" + integrity sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ== + +is-unicode-supported@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-2.0.0.tgz#fdf32df9ae98ff6ab2cedc155a5a6e895701c451" + integrity sha512-FRdAyx5lusK1iHG0TWpVtk9+1i+GjrzRffhDg4ovQ7mcidMQ6mj+MhKPmvh7Xwyv5gIS06ns49CA7Sqg7lC22Q== + is-upper-case@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/is-upper-case/-/is-upper-case-1.1.2.tgz#8d0b1fa7e7933a1e58483600ec7d9661cbaf756f" @@ -11970,6 +12098,11 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== +isexe@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-3.1.1.tgz#4a407e2bd78ddfb14bea0c27c6f7072dde775f0d" + integrity sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ== + iso-url@^1.1.5: version "1.2.1" resolved "https://registry.yarnpkg.com/iso-url/-/iso-url-1.2.1.tgz#db96a49d8d9a64a1c889fc07cc525d093afb1811" @@ -12007,15 +12140,16 @@ istanbul-lib-hook@^3.0.0: dependencies: append-transform "^2.0.0" -istanbul-lib-instrument@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz#873c6fff897450118222774696a3f28902d77c1d" - integrity sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ== +istanbul-lib-instrument@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz#fa15401df6c15874bcb2105f773325d78c666765" + integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== dependencies: - "@babel/core" "^7.7.5" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.0.0" - semver "^6.3.0" + "@babel/core" "^7.23.9" + "@babel/parser" "^7.23.9" + "@istanbuljs/schema" "^0.1.3" + istanbul-lib-coverage "^3.2.0" + semver "^7.5.4" istanbul-lib-processinfo@^2.0.2: version "2.0.3" @@ -12055,14 +12189,6 @@ istanbul-reports@^3.0.2: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -isurl@^1.0.0-alpha5: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" - integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w== - dependencies: - has-to-string-tag-x "^1.2.0" - is-object "^1.0.1" - it-all@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/it-all/-/it-all-1.0.6.tgz#852557355367606295c4c3b7eff0136f07749335" @@ -12129,6 +12255,15 @@ jackspeak@^2.0.3: optionalDependencies: "@pkgjs/parseargs" "^0.11.0" +jackspeak@^3.1.2: + version "3.4.3" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a" + integrity sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw== + dependencies: + "@isaacs/cliui" "^8.0.2" + optionalDependencies: + "@pkgjs/parseargs" "^0.11.0" + jake@^10.8.5: version "10.8.7" resolved "https://registry.yarnpkg.com/jake/-/jake-10.8.7.tgz#63a32821177940c33f356e0ba44ff9d34e1c7d8f" @@ -12167,6 +12302,16 @@ jayson@4.0.0: jest-get-type "^29.6.3" pretty-format "^29.6.3" +jest-diff@^29.4.1: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" + integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== + dependencies: + chalk "^4.0.0" + diff-sequences "^29.6.3" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" + jest-get-type@^29.6.3: version "29.6.3" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" @@ -12186,17 +12331,6 @@ jiti@^1.17.1, jiti@^1.18.2: resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.19.3.tgz#ef554f76465b3c2b222dc077834a71f0d4a37569" integrity sha512-5eEbBDQT/jF1xg6l36P+mWGGoH9Spuy0PCdSr2dtWRDGC6ph/w9ZCL4lmESW8f8F7MwT3XKescfP0wnZWAKL9w== -joi@^17.4.0: - version "17.9.1" - resolved "https://registry.yarnpkg.com/joi/-/joi-17.9.1.tgz#74899b9fa3646904afa984a11df648eca66c9018" - integrity sha512-FariIi9j6QODKATGBrEX7HZcja8Bsh3rfdGYy/Sb65sGlZWK/QWesU1ghk7aJWDj95knjXlQfSmzFSPPkLVsfw== - dependencies: - "@hapi/hoek" "^9.0.0" - "@hapi/topo" "^5.0.0" - "@sideway/address" "^4.1.3" - "@sideway/formula" "^3.0.1" - "@sideway/pinpoint" "^2.0.0" - jose@^4.11.4: version "4.15.5" resolved "https://registry.yarnpkg.com/jose/-/jose-4.15.5.tgz#6475d0f467ecd3c630a1b5dadd2735a7288df706" @@ -12242,6 +12376,11 @@ js-yaml@4.1.0, js-yaml@^4.0.0, js-yaml@^4.1.0: dependencies: argparse "^2.0.1" +jsbn@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" + integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== + jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -12272,6 +12411,11 @@ json-parse-even-better-errors@^3.0.0: resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz#2cb2ee33069a78870a0c7e3da560026b89669cf7" integrity sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA== +json-parse-even-better-errors@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz#b43d35e89c0f3be6b5fbbe9dc6c82467b30c28da" + integrity sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ== + json-pointer@^0.6.1: version "0.6.2" resolved "https://registry.yarnpkg.com/json-pointer/-/json-pointer-0.6.2.tgz#f97bd7550be5e9ea901f8c9264c9d436a22a93cd" @@ -12332,6 +12476,11 @@ json-stable-stringify@^1.0.1: dependencies: jsonify "^0.0.1" +json-stringify-nice@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/json-stringify-nice/-/json-stringify-nice-1.1.4.tgz#2c937962b80181d3f317dd39aa323e14f5a60a67" + integrity sha512-5Z5RFW63yxReJ7vANgW6eZFGWaQvnPE3WNmZoOJrSkGju2etKA2L5rrOa1sm877TVTFt57A80BH1bArcmlLfPw== + json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" @@ -12360,16 +12509,21 @@ json5@^1.0.2: dependencies: minimist "^1.2.0" -json5@^2.2.2: +json5@^2.2.2, json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== -jsonc-parser@3.2.0, jsonc-parser@^3.2.0: +jsonc-parser@3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== +jsonc-parser@3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.3.1.tgz#f2a524b4f7fd11e3d791e559977ad60b98b798b4" + integrity sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ== + jsonfile@^2.1.0: version "2.4.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" @@ -12423,6 +12577,16 @@ jsprim@^1.2.2: json-schema "0.4.0" verror "1.10.0" +just-diff-apply@^5.2.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/just-diff-apply/-/just-diff-apply-5.5.0.tgz#771c2ca9fa69f3d2b54e7c3f5c1dfcbcc47f9f0f" + integrity sha512-OYTthRfSh55WOItVqwpefPtNt2VdKsq5AnAK6apdtR6yCH8pr0CmSr710J0Mf+WdQy7K/OzMy7K2MgAfdQURDw== + +just-diff@^6.0.0: + version "6.0.2" + resolved "https://registry.yarnpkg.com/just-diff/-/just-diff-6.0.2.tgz#03b65908543ac0521caf6d8eb85035f7d27ea285" + integrity sha512-S59eriX5u3/QhMNq3v/gm8Kd0w8OS6Tz2FS1NG4blv+z0MuQcBRJyFWjdovM0Rad4/P4aUPFtnkNjMjyMlMSYA== + keccak@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.1.tgz#ae30a0e94dbe43414f741375cff6d64c8bea0bff" @@ -12456,6 +12620,13 @@ keyv@^4.0.0: dependencies: json-buffer "3.0.1" +keyv@^4.5.3: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" + kind-of@^6.0.2, kind-of@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" @@ -12481,6 +12652,13 @@ labeled-stream-splicer@^2.0.0: inherits "^2.0.1" stream-splicer "^2.0.0" +latest-version@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-7.0.0.tgz#843201591ea81a4d404932eeb61240fe04e9e5da" + integrity sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg== + dependencies: + package-json "^8.1.0" + lcid@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" @@ -12488,86 +12666,92 @@ lcid@^1.0.0: dependencies: invert-kv "^1.0.0" -lerna@^7.4.2: - version "7.4.2" - resolved "https://registry.yarnpkg.com/lerna/-/lerna-7.4.2.tgz#03497125d7b7c8d463eebfe17a701b16bde2ad09" - integrity sha512-gxavfzHfJ4JL30OvMunmlm4Anw7d7Tq6tdVHzUukLdS9nWnxCN/QB21qR+VJYp5tcyXogHKbdUEGh6qmeyzxSA== +lerna@^8.1.8: + version "8.1.8" + resolved "https://registry.yarnpkg.com/lerna/-/lerna-8.1.8.tgz#9edc9ce4fb4b6c7e22c994e9ef91d4e0370595b2" + integrity sha512-Rmo5ShMx73xM2CUcRixjmpZIXB7ZFlWEul1YvJyx/rH4onAwDHtUGD7Rx4NZYL8QSRiQHroglM2Oyq+WqA4BYg== dependencies: - "@lerna/child-process" "7.4.2" - "@lerna/create" "7.4.2" - "@npmcli/run-script" "6.0.2" - "@nx/devkit" ">=16.5.1 < 17" + "@lerna/create" "8.1.8" + "@npmcli/arborist" "7.5.4" + "@npmcli/package-json" "5.2.0" + "@npmcli/run-script" "8.1.0" + "@nx/devkit" ">=17.1.2 < 20" "@octokit/plugin-enterprise-rest" "6.0.1" "@octokit/rest" "19.0.11" + aproba "2.0.0" byte-size "8.1.1" chalk "4.1.0" clone-deep "4.0.1" - cmd-shim "6.0.1" + cmd-shim "6.0.3" + color-support "1.1.3" columnify "1.6.0" + console-control-strings "^1.1.0" conventional-changelog-angular "7.0.0" conventional-changelog-core "5.0.1" conventional-recommended-bump "7.0.1" cosmiconfig "^8.2.0" - dedent "0.7.0" - envinfo "7.8.1" + dedent "1.5.3" + envinfo "7.13.0" execa "5.0.0" - fs-extra "^11.1.1" + fs-extra "^11.2.0" get-port "5.1.1" get-stream "6.0.0" - git-url-parse "13.1.0" - glob-parent "5.1.2" + git-url-parse "14.0.0" + glob-parent "6.0.2" globby "11.1.0" graceful-fs "4.2.11" has-unicode "2.0.1" import-local "3.1.0" ini "^1.3.8" - init-package-json "5.0.0" + init-package-json "6.0.3" inquirer "^8.2.4" is-ci "3.0.1" is-stream "2.0.0" jest-diff ">=29.4.3 < 30" js-yaml "4.1.0" - libnpmaccess "7.0.2" - libnpmpublish "7.3.0" + libnpmaccess "8.0.6" + libnpmpublish "9.0.9" load-json-file "6.2.0" lodash "^4.17.21" make-dir "4.0.0" minimatch "3.0.5" multimatch "5.0.0" node-fetch "2.6.7" - npm-package-arg "8.1.1" - npm-packlist "5.1.1" - npm-registry-fetch "^14.0.5" - npmlog "^6.0.2" - nx ">=16.5.1 < 17" + npm-package-arg "11.0.2" + npm-packlist "8.0.2" + npm-registry-fetch "^17.1.0" + nx ">=17.1.2 < 20" p-map "4.0.0" p-map-series "2.1.0" p-pipe "3.1.0" p-queue "6.6.2" p-reduce "2.1.0" p-waterfall "2.1.1" - pacote "^15.2.0" + pacote "^18.0.6" pify "5.0.0" read-cmd-shim "4.0.0" - read-package-json "6.0.4" resolve-from "5.0.0" rimraf "^4.4.1" semver "^7.3.8" + set-blocking "^2.0.0" signal-exit "3.0.7" slash "3.0.0" - ssri "^9.0.1" + ssri "^10.0.6" + string-width "^4.2.3" + strip-ansi "^6.0.1" strong-log-transformer "2.1.0" - tar "6.1.11" + tar "6.2.1" temp-dir "1.0.0" typescript ">=3 < 6" upath "2.0.1" - uuid "^9.0.0" + uuid "^10.0.0" validate-npm-package-license "3.0.4" - validate-npm-package-name "5.0.0" + validate-npm-package-name "5.0.1" + wide-align "1.1.5" write-file-atomic "5.0.1" write-pkg "4.0.0" - yargs "16.2.0" - yargs-parser "20.2.4" + yargs "17.7.2" + yargs-parser "21.1.1" level-codec@9.0.2, level-codec@^9.0.0: version "9.0.2" @@ -12700,14 +12884,6 @@ level@6.0.1: level-packager "^5.1.0" leveldown "^5.4.0" -level@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/level/-/level-8.0.0.tgz#41b4c515dabe28212a3e881b61c161ffead14394" - integrity sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ== - dependencies: - browser-level "^1.0.1" - classic-level "^1.2.0" - leveldown@5.6.0, leveldown@^5.4.0: version "5.6.0" resolved "https://registry.yarnpkg.com/leveldown/-/leveldown-5.6.0.tgz#16ba937bb2991c6094e13ac5a6898ee66d3eee98" @@ -12771,27 +12947,27 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" -libnpmaccess@7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-7.0.2.tgz#7f056c8c933dd9c8ba771fa6493556b53c5aac52" - integrity sha512-vHBVMw1JFMTgEk15zRsJuSAg7QtGGHpUSEfnbcRL1/gTBag9iEfJbyjpDmdJmwMhvpoLoNBtdAUCdGnaP32hhw== +libnpmaccess@8.0.6: + version "8.0.6" + resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-8.0.6.tgz#73be4c236258babc0a0bca6d3b6a93a6adf937cf" + integrity sha512-uM8DHDEfYG6G5gVivVl+yQd4pH3uRclHC59lzIbSvy7b5FEwR+mU49Zq1jEyRtRFv7+M99mUW9S0wL/4laT4lw== dependencies: - npm-package-arg "^10.1.0" - npm-registry-fetch "^14.0.3" + npm-package-arg "^11.0.2" + npm-registry-fetch "^17.0.1" -libnpmpublish@7.3.0: - version "7.3.0" - resolved "https://registry.yarnpkg.com/libnpmpublish/-/libnpmpublish-7.3.0.tgz#2ceb2b36866d75a6cd7b4aa748808169f4d17e37" - integrity sha512-fHUxw5VJhZCNSls0KLNEG0mCD2PN1i14gH5elGOgiVnU3VgTcRahagYP2LKI1m0tFCJ+XrAm0zVYyF5RCbXzcg== - dependencies: - ci-info "^3.6.1" - normalize-package-data "^5.0.0" - npm-package-arg "^10.1.0" - npm-registry-fetch "^14.0.3" - proc-log "^3.0.0" +libnpmpublish@9.0.9: + version "9.0.9" + resolved "https://registry.yarnpkg.com/libnpmpublish/-/libnpmpublish-9.0.9.tgz#e737378c09f09738377d2a276734be35cffb85e2" + integrity sha512-26zzwoBNAvX9AWOPiqqF6FG4HrSCPsHFkQm7nT+xU1ggAujL/eae81RnCv4CJ2In9q9fh10B88sYSzKCUh/Ghg== + dependencies: + ci-info "^4.0.0" + normalize-package-data "^6.0.1" + npm-package-arg "^11.0.2" + npm-registry-fetch "^17.0.1" + proc-log "^4.2.0" semver "^7.3.7" - sigstore "^1.4.0" - ssri "^10.0.1" + sigstore "^2.2.0" + ssri "^10.0.6" lines-and-columns@^1.1.6: version "1.2.4" @@ -12803,6 +12979,13 @@ lines-and-columns@~2.0.3: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-2.0.3.tgz#b2f0badedb556b747020ab8ea7f0373e22efac1b" integrity sha512-cNOjgCnLB+FnvWWtyRTzmB3POJ+cXxTA81LoW7u8JdmhfXzriropYwpjShnz1QLLWsQwY7nIxoDmcPTwphDK9w== +linkify-it@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-5.0.0.tgz#9ef238bfa6dc70bd8e7f9572b52d369af569b421" + integrity sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ== + dependencies: + uc.micro "^2.0.0" + listr2@^4.0.5: version "4.0.5" resolved "https://registry.yarnpkg.com/listr2/-/listr2-4.0.5.tgz#9dcc50221583e8b4c71c43f9c7dfd0ef546b75d5" @@ -12918,6 +13101,11 @@ lodash.isempty@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.isempty/-/lodash.isempty-4.4.0.tgz#6f86cbedd8be4ec987be9aaf33c9684db1b31e7e" integrity sha512-oKMuF3xEeqDltrGMfDxAPGIVMSSRv8tbRSODbrs4KGsRRLEhrW8N8Rd4DRgB2+621hY8A8XwwrTVhXWpxFvMzg== +lodash.isequal@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== + lodash.isfunction@^3.0.9: version "3.0.9" resolved "https://registry.yarnpkg.com/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz#06de25df4db327ac931981d1bdb067e5af68d051" @@ -13028,7 +13216,7 @@ lodash.upperfirst@^4.3.1: resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce" integrity sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg== -lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.16, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.2.1, lodash@~4.17.0: +lodash@4.17.21, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.16, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.2.1, lodash@~4.17.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -13048,6 +13236,14 @@ log-symbols@^3.0.0: dependencies: chalk "^2.4.2" +log-symbols@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-6.0.0.tgz#bb95e5f05322651cac30c0feb6404f9f2a8a9439" + integrity sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw== + dependencies: + chalk "^5.3.0" + is-unicode-supported "^1.3.0" + log-update@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" @@ -13121,11 +13317,6 @@ lower-case@^2.0.2: dependencies: tslib "^2.0.3" -lowercase-keys@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" - integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== - lowercase-keys@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" @@ -13141,13 +13332,10 @@ lowercase-keys@^3.0.0: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.13.1.tgz#267a81fbd0881327c46a81c5922606a2cfe336c4" integrity sha512-CHqbAq7NFlW3RSnoWXLJBxCWaZVBrfa9UEHId2M3AW8iEBurbqduNexEUCGc3SHc6iCYXNJCDi903LajSVAEPQ== -lru-cache@^4.0.1: - version "4.1.5" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" - integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" +lru-cache@^10.0.1, lru-cache@^10.2.0, lru-cache@^10.2.2: + version "10.4.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" + integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== lru-cache@^5.1.1: version "5.1.1" @@ -13163,11 +13351,6 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -lru-cache@^7.4.4, lru-cache@^7.5.1, lru-cache@^7.7.1: - version "7.18.3" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" - integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== - "lru-cache@^9.1.1 || ^10.0.0": version "10.0.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.0.1.tgz#0a3be479df549cca0e5d693ac402ff19537a6b7a" @@ -13195,13 +13378,6 @@ make-dir@4.0.0: dependencies: semver "^7.5.3" -make-dir@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" - integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== - dependencies: - pify "^3.0.0" - make-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" @@ -13222,25 +13398,22 @@ make-error@^1.1.1: resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== -make-fetch-happen@^11.0.0, make-fetch-happen@^11.0.1, make-fetch-happen@^11.0.3, make-fetch-happen@^11.1.1: - version "11.1.1" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz#85ceb98079584a9523d4bf71d32996e7e208549f" - integrity sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w== +make-fetch-happen@^13.0.0, make-fetch-happen@^13.0.1: + version "13.0.1" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-13.0.1.tgz#273ba2f78f45e1f3a6dca91cede87d9fa4821e36" + integrity sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA== dependencies: - agentkeepalive "^4.2.1" - cacache "^17.0.0" + "@npmcli/agent" "^2.0.0" + cacache "^18.0.0" http-cache-semantics "^4.1.1" - http-proxy-agent "^5.0.0" - https-proxy-agent "^5.0.0" is-lambda "^1.0.1" - lru-cache "^7.7.1" - minipass "^5.0.0" + minipass "^7.0.2" minipass-fetch "^3.0.0" minipass-flush "^1.0.5" minipass-pipeline "^1.2.4" negotiator "^0.6.3" + proc-log "^4.2.0" promise-retry "^2.0.1" - socks-proxy-agent "^7.0.0" ssri "^10.0.0" map-cache@^0.2.0: @@ -13258,10 +13431,17 @@ map-obj@^4.0.0: resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== -marked@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" - integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== +markdown-it@^14.1.0: + version "14.1.0" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-14.1.0.tgz#3c3c5992883c633db4714ccb4d7b5935d98b7d45" + integrity sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg== + dependencies: + argparse "^2.0.1" + entities "^4.4.0" + linkify-it "^5.0.0" + mdurl "^2.0.0" + punycode.js "^2.3.1" + uc.micro "^2.1.0" match-all@^1.2.6: version "1.2.6" @@ -13275,11 +13455,6 @@ matchstick-as@^0.6.0: dependencies: wabt "1.0.24" -mcl-wasm@^0.7.1: - version "0.7.9" - resolved "https://registry.yarnpkg.com/mcl-wasm/-/mcl-wasm-0.7.9.tgz#c1588ce90042a8700c3b60e40efb339fc07ab87f" - integrity sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ== - md5.js@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" @@ -13289,6 +13464,11 @@ md5.js@^1.3.4: inherits "^2.0.1" safe-buffer "^5.1.2" +mdurl@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-2.0.0.tgz#80676ec0433025dd3e17ee983d0fe8de5a2237e0" + integrity sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w== + media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" @@ -13306,15 +13486,6 @@ memdown@1.4.1, memdown@^1.0.0: ltgt "~2.2.0" safe-buffer "~5.1.1" -memory-level@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/memory-level/-/memory-level-1.0.0.tgz#7323c3fd368f9af2f71c3cd76ba403a17ac41692" - integrity sha512-UXzwewuWeHBz5krr7EvehKcmLFNoXxGcvuYhC41tRnkrTbJohtS7kVn9akmgirtRygg+f7Yjsfi8Uu5SGSQ4Og== - dependencies: - abstract-level "^1.0.0" - functional-red-black-tree "^1.0.1" - module-error "^1.0.1" - memorystream@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" @@ -13404,7 +13575,7 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@1.52.0, mime-db@^1.28.0: +mime-db@1.52.0: version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== @@ -13441,6 +13612,11 @@ mimic-response@^3.1.0: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== +mimic-response@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-4.0.0.tgz#35468b19e7c75d10f5165ea25e75a5ceea7cf70f" + integrity sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg== + min-document@^2.19.0: version "2.19.0" resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" @@ -13484,13 +13660,20 @@ minimatch@5.0.1: dependencies: brace-expansion "^2.0.1" -minimatch@9.0.3, minimatch@^9.0.0, minimatch@^9.0.1, minimatch@^9.0.3: +minimatch@9.0.3, minimatch@^9.0.0, minimatch@^9.0.1: version "9.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== dependencies: brace-expansion "^2.0.1" +minimatch@9.0.5, minimatch@^9.0.4, minimatch@^9.0.5: + version "9.0.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" + integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== + dependencies: + brace-expansion "^2.0.1" + minimatch@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-4.2.3.tgz#b4dcece1d674dee104bb0fb833ebb85a78cbbca6" @@ -13498,7 +13681,7 @@ minimatch@^4.2.3: dependencies: brace-expansion "^1.1.7" -minimatch@^5.0.1: +minimatch@^5.0.1, minimatch@^5.1.6: version "5.1.6" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== @@ -13526,12 +13709,12 @@ minimist@^1.1.0, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== -minipass-collect@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" - integrity sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA== +minipass-collect@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-2.0.1.tgz#1621bc77e12258a12c60d34e2276ec5c20680863" + integrity sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw== dependencies: - minipass "^3.0.0" + minipass "^7.0.3" minipass-fetch@^3.0.0: version "3.0.4" @@ -13551,14 +13734,6 @@ minipass-flush@^1.0.5: dependencies: minipass "^3.0.0" -minipass-json-stream@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz#7edbb92588fbfc2ff1db2fc10397acb7b6b44aa7" - integrity sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg== - dependencies: - jsonparse "^1.3.1" - minipass "^3.0.0" - minipass-pipeline@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" @@ -13581,7 +13756,7 @@ minipass@^2.6.0, minipass@^2.9.0: safe-buffer "^5.1.2" yallist "^3.0.0" -minipass@^3.0.0, minipass@^3.1.1: +minipass@^3.0.0: version "3.3.6" resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a" integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== @@ -13603,6 +13778,11 @@ minipass@^5.0.0: resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.3.tgz#05ea638da44e475037ed94d1c7efcc76a25e1974" integrity sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg== +minipass@^7.0.2, minipass@^7.0.4, minipass@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" + integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== + minizlib@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" @@ -13618,6 +13798,14 @@ minizlib@^2.1.1, minizlib@^2.1.2: minipass "^3.0.0" yallist "^4.0.0" +minizlib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-3.0.1.tgz#46d5329d1eb3c83924eff1d3b858ca0a31581012" + integrity sha512-umcy022ILvb5/3Djuu8LWeqUa8D68JaBzlttKeMWen48SjabqS3iY5w/vzeMzMUNhLDifyhbOwKDSznB1vvrwg== + dependencies: + minipass "^7.0.4" + rimraf "^5.0.5" + mkdirp-classic@^0.5.2: version "0.5.3" resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" @@ -13647,6 +13835,11 @@ mkdirp@^1.0.3, mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== +mkdirp@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.1.tgz#e44e4c5607fb279c168241713cc6e0fea9adcb50" + integrity sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg== + mnemonist@^0.38.0: version "0.38.5" resolved "https://registry.yarnpkg.com/mnemonist/-/mnemonist-0.38.5.tgz#4adc7f4200491237fe0fa689ac0b86539685cade" @@ -13654,7 +13847,34 @@ mnemonist@^0.38.0: dependencies: obliterator "^2.0.0" -mocha@10.1.0, mocha@^10.0.0, mocha@^10.2.0: +mocha@10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.1.0.tgz#dbf1114b7c3f9d0ca5de3133906aea3dfc89ef7a" + integrity sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg== + dependencies: + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.5.3" + debug "4.3.4" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.2.0" + he "1.2.0" + js-yaml "4.1.0" + log-symbols "4.1.0" + minimatch "5.0.1" + ms "2.1.3" + nanoid "3.3.3" + serialize-javascript "6.0.0" + strip-json-comments "3.1.1" + supports-color "8.1.1" + workerpool "6.2.1" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" + +mocha@^10.0.0, mocha@^10.2.0: version "10.2.0" resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== @@ -13681,6 +13901,32 @@ mocha@10.1.0, mocha@^10.0.0, mocha@^10.2.0: yargs-parser "20.2.4" yargs-unparser "2.0.0" +mocha@^10.7.3: + version "10.7.3" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.7.3.tgz#ae32003cabbd52b59aece17846056a68eb4b0752" + integrity sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A== + 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" + mochawesome-report-generator@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/mochawesome-report-generator/-/mochawesome-report-generator-6.2.0.tgz#65a30a11235ba7a68e1cf0ca1df80d764b93ae78" @@ -13746,7 +13992,7 @@ module-deps@^6.2.3: through2 "^2.0.0" xtend "^4.0.0" -module-error@^1.0.1, module-error@^1.0.2: +module-error@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/module-error/-/module-error-1.0.2.tgz#8d1a48897ca883f47a45816d4fb3e3c6ba404d86" integrity sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA== @@ -13766,7 +14012,7 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3, ms@^2.0.0, ms@^2.1.1: +ms@2.1.3, ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -13855,7 +14101,7 @@ murmur-128@^0.2.1: fmix "^0.1.0" imul "^1.0.0" -mustache@^4.2.0: +mustache@4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/mustache/-/mustache-4.2.0.tgz#e5892324d60a12ec9c2a73359edca52972bf6f64" integrity sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ== @@ -13865,7 +14111,7 @@ mute-stream@0.0.8: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -mute-stream@~1.0.0: +mute-stream@^1.0.0, mute-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-1.0.0.tgz#e31bd9fe62f0aed23520aa4324ea6671531e013e" integrity sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA== @@ -13967,16 +14213,6 @@ node-addon-api@^2.0.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== -node-addon-api@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" - integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== - -node-downloader-helper@^2.1.6: - version "2.1.6" - resolved "https://registry.yarnpkg.com/node-downloader-helper/-/node-downloader-helper-2.1.6.tgz#f73ac458e3ac8c21afd0b952a994eab99c64b879" - integrity sha512-VkOvAXIopI3xMuM/MC5UL7NqqnizQ/9QXZt28jR8FPZ6fHLQm4xe4+YXJ9FqsWwLho5BLXrF51nfOQ0QcohRkQ== - node-emoji@^1.10.0: version "1.11.0" resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.11.0.tgz#69a0150e6946e2f115e9d7ea4df7971e2628301c" @@ -14039,22 +14275,21 @@ node-gyp-build@~4.1.0: resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.1.1.tgz#d7270b5d86717068d114cc57fff352f96d745feb" integrity sha512-dSq1xmcPDKPZ2EED2S6zw/b9NKsqzXRE6dVr8TVQnI3FJOTteUMuqF3Qqs6LZg+mLGYJWqQzMbIjMtJqTv87nQ== -node-gyp@^9.0.0: - version "9.4.0" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-9.4.0.tgz#2a7a91c7cba4eccfd95e949369f27c9ba704f369" - integrity sha512-dMXsYP6gc9rRbejLXmTbVRYjAHw7ppswsKyMxuxJxxOHzluIO1rGp9TOQgjFJ+2MCqcOcQTOPB/8Xwhr+7s4Eg== +node-gyp@^10.0.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-10.2.0.tgz#80101c4aa4f7ab225f13fcc8daaaac4eb1a8dd86" + integrity sha512-sp3FonBAaFe4aYTcFdZUn2NYkbP7xroPGYvQmP4Nl5PxamznItBnNCgjrVTKrEfQynInMsJvZrdmqUnysCJ8rw== dependencies: env-paths "^2.2.0" exponential-backoff "^3.1.1" - glob "^7.1.4" + glob "^10.3.10" graceful-fs "^4.2.6" - make-fetch-happen "^11.0.3" - nopt "^6.0.0" - npmlog "^6.0.0" - rimraf "^3.0.2" + make-fetch-happen "^13.0.0" + nopt "^7.0.0" + proc-log "^4.1.0" semver "^7.3.5" - tar "^6.1.2" - which "^2.0.2" + tar "^6.2.1" + which "^4.0.0" node-int64@^0.4.0: version "0.4.0" @@ -14068,17 +14303,16 @@ node-interval-tree@^1.3.3: dependencies: shallowequal "^1.0.2" -node-jq@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/node-jq/-/node-jq-4.3.0.tgz#4d5557862039e58007af8707e9fdfecc75ce353a" - integrity sha512-cf8+Ndvn5QRJeRhvI8NsGQEzCOqER7NaEopQuMoO4yfnaxNxrwu9W45+l3yYheJzSdf3mwnpd1XaFdn3m9d3RQ== +node-jq@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/node-jq/-/node-jq-6.0.1.tgz#1492e320bd8610062b7a05f317d3a21d6f556ea5" + integrity sha512-jt1H7i2c/BZUkid7O8uK4KWw5wDZgpsSHq8WAVv8SpedToUOpA6kAgoLnoAHmorAUGJTfICZlniKkMaEl28Uyw== dependencies: - bin-build "^3.0.0" is-valid-path "^0.1.1" - joi "^17.4.0" - node-downloader-helper "^2.1.6" strip-final-newline "^2.0.0" - tempfile "^3.0.0" + tar "^7.4.0" + tempy "^3.1.0" + zod "^3.23.8" node-machine-id@1.1.12: version "1.1.12" @@ -14102,15 +14336,20 @@ node-releases@^2.0.14: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== +node-releases@^2.0.18: + version "2.0.18" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" + integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g== + node-releases@^2.0.8: version "2.0.10" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.10.tgz#c311ebae3b6a148c89b1813fd7c4d3c024ef537f" integrity sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w== -nodemon@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-3.0.3.tgz#244a62d1c690eece3f6165c6cdb0db03ebd80b76" - integrity sha512-7jH/NXbFPxVaMwmBCC2B9F/V6X1VkEdNgx3iu9jji8WxWcvhMWkmhNWhI5077zknOnZnBzba9hZP6bCPJLSReQ== +nodemon@^3.1.4: + version "3.1.4" + resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-3.1.4.tgz#c34dcd8eb46a05723ccde60cbdd25addcc8725e4" + integrity sha512-wjPBbFhtpJwmIeY2yP7QF+UKzPfltVGtfce1g/bB15/8vCGZj8uxD62b/b9M9/WVgme0NZudpownKN+c0plXlQ== dependencies: chokidar "^3.5.2" debug "^4" @@ -14148,12 +14387,12 @@ nopt@3.x: dependencies: abbrev "1" -nopt@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-6.0.0.tgz#245801d8ebf409c6df22ab9d95b65e1309cdb16d" - integrity sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g== +nopt@^7.0.0, nopt@^7.2.1: + version "7.2.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-7.2.1.tgz#1cac0eab9b8e97c9093338446eddd40b2c8ca1e7" + integrity sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w== dependencies: - abbrev "^1.0.0" + abbrev "^2.0.0" nopt@~1.0.10: version "1.0.10" @@ -14182,13 +14421,12 @@ normalize-package-data@^3.0.0, normalize-package-data@^3.0.3: semver "^7.3.4" validate-npm-package-license "^3.0.1" -normalize-package-data@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-5.0.0.tgz#abcb8d7e724c40d88462b84982f7cbf6859b4588" - integrity sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q== +normalize-package-data@^6.0.0, normalize-package-data@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-6.0.2.tgz#a7bc22167fe24025412bcff0a9651eb768b03506" + integrity sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g== dependencies: - hosted-git-info "^6.0.0" - is-core-module "^2.8.1" + hosted-git-info "^7.0.0" semver "^7.3.5" validate-npm-package-license "^3.0.4" @@ -14209,12 +14447,10 @@ normalize-url@^6.0.1: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== -npm-bundled@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.2.tgz#944c78789bd739035b70baa2ca5cc32b8d860bc1" - integrity sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ== - dependencies: - npm-normalize-package-bin "^1.0.1" +normalize-url@^8.0.0: + version "8.0.1" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-8.0.1.tgz#9b7d96af9836577c58f5883e939365fa15623a4a" + integrity sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w== npm-bundled@^3.0.0: version "3.0.0" @@ -14223,14 +14459,6 @@ npm-bundled@^3.0.0: dependencies: npm-normalize-package-bin "^3.0.0" -npm-conf@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/npm-conf/-/npm-conf-1.1.3.tgz#256cc47bd0e218c259c4e9550bf413bc2192aff9" - integrity sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw== - dependencies: - config-chain "^1.1.11" - pify "^3.0.0" - npm-install-checks@^6.0.0: version "6.2.0" resolved "https://registry.yarnpkg.com/npm-install-checks/-/npm-install-checks-6.2.0.tgz#fae55b9967b03ac309695ec96629492d5cedf371" @@ -14238,74 +14466,68 @@ npm-install-checks@^6.0.0: dependencies: semver "^7.1.1" -npm-normalize-package-bin@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" - integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== +npm-install-checks@^6.2.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/npm-install-checks/-/npm-install-checks-6.3.0.tgz#046552d8920e801fa9f919cad569545d60e826fe" + integrity sha512-W29RiK/xtpCGqn6f3ixfRYGk+zRyr+Ew9F2E20BfXxT5/euLdA/Nm7fO7OeTGuAmTs30cpgInyJ0cYe708YTZw== + dependencies: + semver "^7.1.1" npm-normalize-package-bin@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz#25447e32a9a7de1f51362c61a559233b89947832" integrity sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ== -npm-package-arg@10.1.0, npm-package-arg@^10.0.0, npm-package-arg@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-10.1.0.tgz#827d1260a683806685d17193073cc152d3c7e9b1" - integrity sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA== +npm-package-arg@11.0.2: + version "11.0.2" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-11.0.2.tgz#1ef8006c4a9e9204ddde403035f7ff7d718251ca" + integrity sha512-IGN0IAwmhDJwy13Wc8k+4PEbTPhpJnMtfR53ZbOyjkvmEcLS4nCwp6mvMWjS5sUjeiW3mpx6cHmuhKEu9XmcQw== dependencies: - hosted-git-info "^6.0.0" - proc-log "^3.0.0" + hosted-git-info "^7.0.0" + proc-log "^4.0.0" semver "^7.3.5" validate-npm-package-name "^5.0.0" -npm-package-arg@8.1.1: - version "8.1.1" - resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-8.1.1.tgz#00ebf16ac395c63318e67ce66780a06db6df1b04" - integrity sha512-CsP95FhWQDwNqiYS+Q0mZ7FAEDytDZAkNxQqea6IaAFJTAY9Lhhqyl0irU/6PMc7BGfUmnsbHcqxJD7XuVM/rg== +npm-package-arg@11.0.3, npm-package-arg@^11.0.0, npm-package-arg@^11.0.2: + version "11.0.3" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-11.0.3.tgz#dae0c21199a99feca39ee4bfb074df3adac87e2d" + integrity sha512-sHGJy8sOC1YraBywpzQlIKBE4pBbGbiF95U6Auspzyem956E0+FtDtsx1ZxlOJkQCZ1AFXAY/yuvtFYrOxF+Bw== dependencies: - hosted-git-info "^3.0.6" - semver "^7.0.0" - validate-npm-package-name "^3.0.0" - -npm-packlist@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-5.1.1.tgz#79bcaf22a26b6c30aa4dd66b976d69cc286800e0" - integrity sha512-UfpSvQ5YKwctmodvPPkK6Fwk603aoVsf8AEbmVKAEECrfvL8SSe1A2YIwrJ6xmTHAITKPwwZsWo7WwEbNk0kxw== - dependencies: - glob "^8.0.1" - ignore-walk "^5.0.1" - npm-bundled "^1.1.2" - npm-normalize-package-bin "^1.0.1" + hosted-git-info "^7.0.0" + proc-log "^4.0.0" + semver "^7.3.5" + validate-npm-package-name "^5.0.0" -npm-packlist@^7.0.0: - version "7.0.4" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-7.0.4.tgz#033bf74110eb74daf2910dc75144411999c5ff32" - integrity sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q== +npm-packlist@8.0.2, npm-packlist@^8.0.0: + version "8.0.2" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-8.0.2.tgz#5b8d1d906d96d21c85ebbeed2cf54147477c8478" + integrity sha512-shYrPFIS/JLP4oQmAwDyk5HcyysKW8/JLTEA32S0Z5TzvpaeeX2yMFfoK1fjEBnCBvVyIB/Jj/GBFdm0wsgzbA== dependencies: - ignore-walk "^6.0.0" + ignore-walk "^6.0.4" -npm-pick-manifest@^8.0.0: - version "8.0.2" - resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-8.0.2.tgz#2159778d9c7360420c925c1a2287b5a884c713aa" - integrity sha512-1dKY+86/AIiq1tkKVD3l0WI+Gd3vkknVGAggsFeBkTvbhMQ1OND/LKkYv4JtXPKUJ8bOTCyLiqEg2P6QNdK+Gg== +npm-pick-manifest@^9.0.0, npm-pick-manifest@^9.0.1: + version "9.1.0" + resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-9.1.0.tgz#83562afde52b0b07cb6244361788d319ce7e8636" + integrity sha512-nkc+3pIIhqHVQr085X9d2JzPzLyjzQS96zbruppqC9aZRm/x8xx6xhI98gHtsfELP2bE+loHq8ZaHFHhe+NauA== dependencies: npm-install-checks "^6.0.0" npm-normalize-package-bin "^3.0.0" - npm-package-arg "^10.0.0" + npm-package-arg "^11.0.0" semver "^7.3.5" -npm-registry-fetch@^14.0.0, npm-registry-fetch@^14.0.3, npm-registry-fetch@^14.0.5: - version "14.0.5" - resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-14.0.5.tgz#fe7169957ba4986a4853a650278ee02e568d115d" - integrity sha512-kIDMIo4aBm6xg7jOttupWZamsZRkAqMqwqqbVXnUqstY5+tapvv6bkH/qMR76jdgV+YljEUCyWx3hRYMrJiAgA== +npm-registry-fetch@^17.0.0, npm-registry-fetch@^17.0.1, npm-registry-fetch@^17.1.0: + version "17.1.0" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-17.1.0.tgz#fb69e8e762d456f08bda2f5f169f7638fb92beb1" + integrity sha512-5+bKQRH0J1xG1uZ1zMNvxW0VEyoNWgJpY9UDuluPFLKDfJ9u2JmmjmTJV1srBGQOROfdBMiVvnH2Zvpbm+xkVA== dependencies: - make-fetch-happen "^11.0.0" - minipass "^5.0.0" + "@npmcli/redact" "^2.0.0" + jsonparse "^1.3.1" + make-fetch-happen "^13.0.0" + minipass "^7.0.2" minipass-fetch "^3.0.0" - minipass-json-stream "^1.0.1" minizlib "^2.1.2" - npm-package-arg "^10.0.0" - proc-log "^3.0.0" + npm-package-arg "^11.0.0" + proc-log "^4.0.0" npm-run-all@^4.1.5: version "4.1.5" @@ -14322,13 +14544,6 @@ npm-run-all@^4.1.5: shell-quote "^1.6.1" string.prototype.padend "^3.0.0" -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - integrity sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw== - dependencies: - path-key "^2.0.0" - npm-run-path@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" @@ -14336,16 +14551,6 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" -npmlog@^6.0.0, npmlog@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-6.0.2.tgz#c8166017a42f2dea92d6453168dd865186a70830" - integrity sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg== - dependencies: - are-we-there-yet "^3.0.0" - console-control-strings "^1.1.0" - gauge "^4.0.3" - set-blocking "^2.0.0" - nth-check@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" @@ -14371,62 +14576,62 @@ number-to-bn@1.7.0: bn.js "4.11.6" strip-hex-prefix "1.0.0" -nx@16.7.3, "nx@>=16.5.1 < 17": - version "16.7.3" - resolved "https://registry.yarnpkg.com/nx/-/nx-16.7.3.tgz#cf90d5e48cad350d99add78038354d39842f1f39" - integrity sha512-aam+1ZesbCfV9xv5FktsAqHVBObcazrf1MG56SdBTYNuILBVgAztPj8NyIZ87ZHw8IE/JxWDDUtZo7lwaSOFzA== +nx@19.6.3, "nx@>=17.1.2 < 20": + version "19.6.3" + resolved "https://registry.yarnpkg.com/nx/-/nx-19.6.3.tgz#ed65e943aad7e9769274253210c138b916dd79fe" + integrity sha512-JbgrEKaIBvTfhw3mG3GeyyzJHBAMfuQkMNrxxIto1fn94gxdjXdMfqUnAzrW6xRAt5OEEU+rf7v2OA3vEXYc3A== dependencies: - "@nrwl/tao" "16.7.3" - "@parcel/watcher" "2.0.4" + "@napi-rs/wasm-runtime" "0.2.4" + "@nrwl/tao" "19.6.3" "@yarnpkg/lockfile" "^1.1.0" "@yarnpkg/parsers" "3.0.0-rc.46" - "@zkochan/js-yaml" "0.0.6" - axios "^1.0.0" + "@zkochan/js-yaml" "0.0.7" + axios "^1.7.4" chalk "^4.1.0" cli-cursor "3.1.0" cli-spinners "2.6.1" - cliui "^7.0.2" - dotenv "~16.3.1" + cliui "^8.0.1" + dotenv "~16.4.5" + dotenv-expand "~11.0.6" enquirer "~2.3.6" - fast-glob "3.2.7" figures "3.2.0" flat "^5.0.2" + front-matter "^4.0.2" fs-extra "^11.1.0" - glob "7.1.4" ignore "^5.0.4" - js-yaml "4.1.0" + jest-diff "^29.4.1" jsonc-parser "3.2.0" lines-and-columns "~2.0.3" - minimatch "3.0.5" + minimatch "9.0.3" node-machine-id "1.1.12" npm-run-path "^4.0.1" open "^8.4.0" - semver "7.5.3" + ora "5.3.0" + semver "^7.5.3" string-width "^4.2.3" strong-log-transformer "^2.1.0" tar-stream "~2.2.0" tmp "~0.2.1" tsconfig-paths "^4.1.2" tslib "^2.3.0" - v8-compile-cache "2.3.0" yargs "^17.6.2" yargs-parser "21.1.1" optionalDependencies: - "@nx/nx-darwin-arm64" "16.7.3" - "@nx/nx-darwin-x64" "16.7.3" - "@nx/nx-freebsd-x64" "16.7.3" - "@nx/nx-linux-arm-gnueabihf" "16.7.3" - "@nx/nx-linux-arm64-gnu" "16.7.3" - "@nx/nx-linux-arm64-musl" "16.7.3" - "@nx/nx-linux-x64-gnu" "16.7.3" - "@nx/nx-linux-x64-musl" "16.7.3" - "@nx/nx-win32-arm64-msvc" "16.7.3" - "@nx/nx-win32-x64-msvc" "16.7.3" - -nyc@^15.1.0: - version "15.1.0" - resolved "https://registry.yarnpkg.com/nyc/-/nyc-15.1.0.tgz#1335dae12ddc87b6e249d5a1994ca4bdaea75f02" - integrity sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A== + "@nx/nx-darwin-arm64" "19.6.3" + "@nx/nx-darwin-x64" "19.6.3" + "@nx/nx-freebsd-x64" "19.6.3" + "@nx/nx-linux-arm-gnueabihf" "19.6.3" + "@nx/nx-linux-arm64-gnu" "19.6.3" + "@nx/nx-linux-arm64-musl" "19.6.3" + "@nx/nx-linux-x64-gnu" "19.6.3" + "@nx/nx-linux-x64-musl" "19.6.3" + "@nx/nx-win32-arm64-msvc" "19.6.3" + "@nx/nx-win32-x64-msvc" "19.6.3" + +nyc@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/nyc/-/nyc-17.0.0.tgz#d8943407584242a448a70290b15bb72207fac9fd" + integrity sha512-ISp44nqNCaPugLLGGfknzQwSwt10SSS5IMoPR7GLoMAyS18Iw5js8U7ga2VF9lYuMZ42gOHr3UddZw4WZltxKg== dependencies: "@istanbuljs/load-nyc-config" "^1.0.0" "@istanbuljs/schema" "^0.1.2" @@ -14440,7 +14645,7 @@ nyc@^15.1.0: glob "^7.1.6" istanbul-lib-coverage "^3.0.0" istanbul-lib-hook "^3.0.0" - istanbul-lib-instrument "^4.0.0" + istanbul-lib-instrument "^6.0.2" istanbul-lib-processinfo "^2.0.2" istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" @@ -14461,7 +14666,7 @@ oauth-sign@~0.9.0: resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== -object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@^4, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== @@ -14625,7 +14830,36 @@ ora@4.0.2: strip-ansi "^5.2.0" wcwidth "^1.0.1" -ora@5.4.1, ora@^5.4.1: +ora@5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/ora/-/ora-5.3.0.tgz#fb832899d3a1372fe71c8b2c534bbfe74961bb6f" + integrity sha512-zAKMgGXUim0Jyd6CXK9lraBnD3H5yPGBPPOkC23a2BG6hsm4Zu6OQSjQuEtV0BHDf4aKHcUFvJiGRrFuW3MG8g== + dependencies: + bl "^4.0.3" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-spinners "^2.5.0" + is-interactive "^1.0.0" + log-symbols "^4.0.0" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + +ora@8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/ora/-/ora-8.0.1.tgz#6dcb9250a629642cbe0d2df3a6331ad6f7a2af3e" + integrity sha512-ANIvzobt1rls2BDny5fWZ3ZVKyD6nscLvfFRpQgfWsythlcsVUC9kL0zq6j2Z5z9wwp1kd7wpsD/T9qNPVLCaQ== + dependencies: + chalk "^5.3.0" + cli-cursor "^4.0.0" + cli-spinners "^2.9.2" + is-interactive "^2.0.0" + is-unicode-supported "^2.0.0" + log-symbols "^6.0.0" + stdin-discarder "^0.2.1" + string-width "^7.0.0" + strip-ansi "^7.1.0" + +ora@^5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== @@ -14667,11 +14901,6 @@ os-tmpdir@~1.0.2: resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== -p-cancelable@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" - integrity sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw== - p-cancelable@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf" @@ -14687,13 +14916,6 @@ p-defer@^3.0.0: resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-3.0.0.tgz#d1dceb4ee9b2b604b1d94ffec83760175d4e6f83" integrity sha512-ugZxsxmtTln604yeYd29EGrNhazN2lywetzpKhfmQjW/VJmhpDmWbiX+h0zL8V91R0UXkhb3KtPmyq9PZw3aYw== -p-event@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-event/-/p-event-1.3.0.tgz#8e6b4f4f65c72bc5b6fe28b75eda874f96a4a085" - integrity sha512-hV1zbA7gwqPVFcapfeATaNjQ3J0NuzorHPyG8GPL9g/Y/TplWVBVoCKCXL6Ej2zscrCEv195QNWJXuBH6XZuzA== - dependencies: - p-timeout "^1.1.1" - p-fifo@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-fifo/-/p-fifo-1.0.0.tgz#e29d5cf17c239ba87f51dde98c1d26a9cfe20a63" @@ -14761,13 +14983,6 @@ p-map-series@2.1.0: resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-2.1.0.tgz#7560d4c452d9da0c07e692fdbfe6e2c81a2a91f2" integrity sha512-RpYIIK1zXSNEOdwxcfe7FdvGcs7+y5n8rifMhMNWvaxRNMPINJHF5GDeuVxWqnfrcHPSCnp7Oo5yNXHId9Av2Q== -p-map-series@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-1.0.0.tgz#bf98fe575705658a9e1351befb85ae4c1f07bdca" - integrity sha512-4k9LlvY6Bo/1FcIdV33wqZQES0Py+iKISU9Uc8p8AjWoZPnFKMpVIVD3s0EYn4jzLh1I+WeUZkJ0Yoa4Qfw3Kg== - dependencies: - p-reduce "^1.0.0" - p-map@4.0.0, p-map@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" @@ -14800,18 +15015,6 @@ p-reduce@2.1.0, p-reduce@^2.0.0, p-reduce@^2.1.0: resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-2.1.0.tgz#09408da49507c6c274faa31f28df334bc712b64a" integrity sha512-2USApvnsutq8uoxZBGbbWM0JIYLiEMJ9RlaN7fAzVNb9OZN0SHjjTTfIcb667XynS5Y1VhwDJVDa72TnPzAYWw== -p-reduce@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" - integrity sha512-3Tx1T3oM1xO/Y8Gj0sWyE78EIJZ+t+aEmXUdvQgvGmSMri7aPTHoovbXEreWKkL5j21Er60XAWLTzKbAKYOujQ== - -p-timeout@^1.1.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" - integrity sha512-gb0ryzr+K2qFqFv6qi3khoeqMZF/+ajxQipEF6NteZVnvz9tzdsfAVj3lYtn1gAXvH5lfLwfxEII799gt/mRIA== - dependencies: - p-finally "^1.0.0" - p-timeout@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe" @@ -14846,27 +15049,41 @@ package-hash@^4.0.0: lodash.flattendeep "^4.4.0" release-zalgo "^1.0.0" -pacote@^15.2.0: - version "15.2.0" - resolved "https://registry.yarnpkg.com/pacote/-/pacote-15.2.0.tgz#0f0dfcc3e60c7b39121b2ac612bf8596e95344d3" - integrity sha512-rJVZeIwHTUta23sIZgEIM62WYwbmGbThdbnkt81ravBplQv+HjyroqnLRNH2+sLJHcGZmLRmhPwACqhfTcOmnA== +package-json-from-dist@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz#e501cd3094b278495eb4258d4c9f6d5ac3019f00" + integrity sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw== + +package-json@^8.1.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/package-json/-/package-json-8.1.1.tgz#3e9948e43df40d1e8e78a85485f1070bf8f03dc8" + integrity sha512-cbH9IAIJHNj9uXi196JVsRlt7cHKak6u/e6AkL/bkRelZ7rlL3X1YKxsZwa36xipOEKAsdtmaG6aAJoM1fx2zA== + dependencies: + got "^12.1.0" + registry-auth-token "^5.0.1" + registry-url "^6.0.0" + semver "^7.3.7" + +pacote@^18.0.0, pacote@^18.0.6: + version "18.0.6" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-18.0.6.tgz#ac28495e24f4cf802ef911d792335e378e86fac7" + integrity sha512-+eK3G27SMwsB8kLIuj4h1FUhHtwiEUo21Tw8wNjmvdlpOEr613edv+8FUsTj/4F/VN5ywGE19X18N7CC2EJk6A== dependencies: - "@npmcli/git" "^4.0.0" + "@npmcli/git" "^5.0.0" "@npmcli/installed-package-contents" "^2.0.1" - "@npmcli/promise-spawn" "^6.0.1" - "@npmcli/run-script" "^6.0.0" - cacache "^17.0.0" + "@npmcli/package-json" "^5.1.0" + "@npmcli/promise-spawn" "^7.0.0" + "@npmcli/run-script" "^8.0.0" + cacache "^18.0.0" fs-minipass "^3.0.0" - minipass "^5.0.0" - npm-package-arg "^10.0.0" - npm-packlist "^7.0.0" - npm-pick-manifest "^8.0.0" - npm-registry-fetch "^14.0.0" - proc-log "^3.0.0" + minipass "^7.0.2" + npm-package-arg "^11.0.0" + npm-packlist "^8.0.0" + npm-pick-manifest "^9.0.0" + npm-registry-fetch "^17.0.0" + proc-log "^4.0.0" promise-retry "^2.0.1" - read-package-json "^6.0.0" - read-package-json-fast "^3.0.0" - sigstore "^1.3.0" + sigstore "^2.2.0" ssri "^10.0.0" tar "^6.1.11" @@ -14920,6 +15137,15 @@ parse-cache-control@^1.0.1: resolved "https://registry.yarnpkg.com/parse-cache-control/-/parse-cache-control-1.0.1.tgz#8eeab3e54fa56920fe16ba38f77fa21aacc2d74e" integrity sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg== +parse-conflict-json@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/parse-conflict-json/-/parse-conflict-json-3.0.1.tgz#67dc55312781e62aa2ddb91452c7606d1969960c" + integrity sha512-01TvEktc68vwbJOtWZluyWeVGWjP+bZwXtPDMQVbBKzbJ/vZBif0L69KH1+cHv1SZ6e0FKLvjyHe8mqsIqYOmw== + dependencies: + json-parse-even-better-errors "^3.0.0" + just-diff "^6.0.0" + just-diff-apply "^5.2.0" + parse-duration@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/parse-duration/-/parse-duration-1.0.3.tgz#b6681f5edcc2689643b34c09ea63f86f58a35814" @@ -14954,7 +15180,7 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" -parse-json@^5.0.0: +parse-json@^5.0.0, parse-json@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== @@ -15069,7 +15295,7 @@ path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== -path-key@^2.0.0, path-key@^2.0.1: +path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== @@ -15109,6 +15335,14 @@ path-scurry@^1.10.1, path-scurry@^1.6.1: lru-cache "^9.1.1 || ^10.0.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" +path-scurry@^1.11.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" + integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== + dependencies: + lru-cache "^10.2.0" + minipass "^5.0.0 || ^6.0.2 || ^7.0.0" + path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" @@ -15135,6 +15369,11 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +path-type@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-5.0.0.tgz#14b01ed7aea7ddf9c7c3f46181d4d04f9c785bb8" + integrity sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg== + pathval@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" @@ -15151,11 +15390,6 @@ pbkdf2@^3.0.17, pbkdf2@^3.0.3: safe-buffer "^5.0.1" sha.js "^2.4.8" -pend@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" - integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg== - performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" @@ -15166,6 +15400,11 @@ picocolors@^1.0.0: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== +picocolors@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" + integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== + picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" @@ -15227,6 +15466,14 @@ pluralize@^8.0.0: resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== +postcss-selector-parser@^6.0.10: + version "6.1.2" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz#27ecb41fb0e3b6ba7a1ec84fff347f734c7929de" + integrity sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg== + dependencies: + cssesc "^3.0.0" + util-deprecate "^1.0.2" + pouchdb-abstract-mapreduce@7.3.1: version "7.3.1" resolved "https://registry.yarnpkg.com/pouchdb-abstract-mapreduce/-/pouchdb-abstract-mapreduce-7.3.1.tgz#96ff4a0f41cbe273f3f52fde003b719005a2093c" @@ -15428,30 +15675,23 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== -prepend-http@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" - integrity sha512-PhmXi5XmoyKw1Un4E+opM2KcsJInDvKyuOumcjjw3waw86ZNjHwVUOOWLc4bCzLdcKNaWBH9e99sbWzDQsVaYg== - -prettier-eslint@^15.0.1: - version "15.0.1" - resolved "https://registry.yarnpkg.com/prettier-eslint/-/prettier-eslint-15.0.1.tgz#2543a43e9acec2a9767ad6458165ce81f353db9c" - integrity sha512-mGOWVHixSvpZWARqSDXbdtTL54mMBxc5oQYQ6RAqy8jecuNJBgN3t9E5a81G66F8x8fsKNiR1HWaBV66MJDOpg== +prettier-eslint@^16.3.0: + version "16.3.0" + resolved "https://registry.yarnpkg.com/prettier-eslint/-/prettier-eslint-16.3.0.tgz#8f7bbc863f35939948e386eafe72ffd653b2d80b" + integrity sha512-Lh102TIFCr11PJKUMQ2kwNmxGhTsv/KzUg9QYF2Gkw259g/kPgndZDWavk7/ycbRvj2oz4BPZ1gCU8bhfZH/Xg== dependencies: - "@types/eslint" "^8.4.2" - "@types/prettier" "^2.6.0" - "@typescript-eslint/parser" "^5.10.0" + "@typescript-eslint/parser" "^6.7.5" common-tags "^1.4.0" dlv "^1.1.0" eslint "^8.7.0" indent-string "^4.0.0" lodash.merge "^4.6.0" loglevel-colored-level-prefix "^1.0.0" - prettier "^2.5.1" - pretty-format "^23.0.1" + prettier "^3.0.1" + pretty-format "^29.7.0" require-relative "^0.8.7" - typescript "^4.5.4" - vue-eslint-parser "^8.0.1" + typescript "^5.2.2" + vue-eslint-parser "^9.1.0" prettier-linter-helpers@^1.0.0: version "1.0.0" @@ -15474,23 +15714,15 @@ prettier@3.0.3: resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.3.tgz#432a51f7ba422d1469096c0fdc28e235db8f9643" integrity sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg== -prettier@^2.3.1, prettier@^2.5.1, prettier@^2.7.1, prettier@^2.8.3: +prettier@^2.3.1, prettier@^2.7.1, prettier@^2.8.3: version "2.8.6" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.6.tgz#5c174b29befd507f14b83e3c19f83fdc0e974b71" integrity sha512-mtuzdiBbHwPEgl7NxWlqOkithPyp4VN93V7VeHVWBF+ad3I5avc0RVDT4oImXQy9H/AqxA2NSQH8pSxHW6FYbQ== -prettier@^3.2.5: - version "3.2.5" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368" - integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A== - -pretty-format@^23.0.1: - version "23.6.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760" - integrity sha512-zf9NV1NSlDLDjycnwm6hpFATCGl/K1lt0R/GdkAK2O5LN/rwJoB+Mh93gGJjut4YbmecbfgLWVGSTCr0Ewvvbw== - dependencies: - ansi-regex "^3.0.0" - ansi-styles "^3.2.0" +prettier@^3.0.1, prettier@^3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105" + integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew== pretty-format@^29.6.3: version "29.6.3" @@ -15501,10 +15733,19 @@ pretty-format@^29.6.3: ansi-styles "^5.0.0" react-is "^18.0.0" -proc-log@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-3.0.0.tgz#fb05ef83ccd64fd7b20bbe9c8c1070fc08338dd8" - integrity sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A== +pretty-format@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" + integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== + dependencies: + "@jest/schemas" "^29.6.3" + ansi-styles "^5.0.0" + react-is "^18.0.0" + +proc-log@^4.0.0, proc-log@^4.1.0, proc-log@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-4.2.0.tgz#b6f461e4026e75fdfe228b265e9f7a00779d7034" + integrity sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA== process-nextick-args@~2.0.0: version "2.0.1" @@ -15523,12 +15764,27 @@ process@^0.11.10, process@~0.11.0: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== +proggy@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/proggy/-/proggy-2.0.0.tgz#154bb0e41d3125b518ef6c79782455c2c47d94e1" + integrity sha512-69agxLtnI8xBs9gUGqEnK26UfiexpHy+KUpBQWabiytQjnn5wFY8rklAi7GRfABIuPNnQ/ik48+LGLkYYJcy4A== + +promise-all-reject-late@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz#f8ebf13483e5ca91ad809ccc2fcf25f26f8643c2" + integrity sha512-vuf0Lf0lOxyQREH7GDIOUMLS7kz+gs8i6B+Yi8dC68a2sychGrHTJYghMBD6k7eUcH0H5P73EckCA48xijWqXw== + +promise-call-limit@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/promise-call-limit/-/promise-call-limit-3.0.1.tgz#3570f7a3f2aaaf8e703623a552cd74749688cf19" + integrity sha512-utl+0x8gIDasV5X+PI5qWEPqH6fJS0pFtQ/4gZ95xfEFb/89dmh+/b895TbFDBLiafBvxD/PGTKfvxl4kH/pQg== + promise-inflight@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" integrity sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g== -promise-retry@^2.0.1: +promise-retry@2.0.1, promise-retry@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22" integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g== @@ -15629,11 +15885,6 @@ prr@~1.0.1: resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" integrity sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw== -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ== - psl@^1.1.28, psl@^1.1.33: version "1.9.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" @@ -15672,6 +15923,11 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" +punycode.js@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode.js/-/punycode.js-2.3.1.tgz#6b53e56ad75588234e79f4affa90972c7dd8cdb7" + integrity sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA== + punycode@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" @@ -15697,10 +15953,10 @@ pure-rand@^5.0.1: resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-5.0.5.tgz#bda2a7f6a1fc0f284d78d78ca5902f26f2ad35cf" integrity sha512-BwQpbqxSCBJVpamI6ydzcKqyFmnd5msMWUGvzXLm1aXvusbbgkbOto/EUPM00hjveJEaJtdbhUjKSzWRhQVkaw== -pure-rand@^6.0.0: - version "6.0.2" - resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.0.2.tgz#a9c2ddcae9b68d736a8163036f088a2781c8b306" - integrity sha512-6Yg0ekpKICSjPswYOuC5sku/TSWaRYlA0qsXqJgM/d/4pLPHPuTxK7Nbf7jFKzAeedUhR8C7K9Uv63FBsSo8xQ== +pure-rand@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.1.0.tgz#d173cf23258231976ccbdb05247c9787957604f2" + integrity sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA== pvtsutils@^1.3.2: version "1.3.2" @@ -15807,6 +16063,16 @@ raw-body@2.5.2, raw-body@^2.4.1: iconv-lite "0.4.24" unpipe "1.0.0" +rc@1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + react-dom@^18: version "18.2.0" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" @@ -15851,7 +16117,7 @@ react@^18: dependencies: loose-envify "^1.1.0" -read-cmd-shim@4.0.0: +read-cmd-shim@4.0.0, read-cmd-shim@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-4.0.0.tgz#640a08b473a49043e394ae0c7a34dd822c73b9bb" integrity sha512-yILWifhaSEEytfXI76kB9xEEiG1AiozaCJZ83A87ytjRiN+jVibXjedjCRNjoZviinhG+4UkalO3mWTd8u5O0Q== @@ -15863,7 +16129,7 @@ read-only-stream@^2.0.0: dependencies: readable-stream "^2.0.2" -read-package-json-fast@^3.0.0: +read-package-json-fast@^3.0.0, read-package-json-fast@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz#394908a9725dc7a5f14e70c8e7556dff1d2b1049" integrity sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw== @@ -15871,16 +16137,6 @@ read-package-json-fast@^3.0.0: json-parse-even-better-errors "^3.0.0" npm-normalize-package-bin "^3.0.0" -read-package-json@6.0.4, read-package-json@^6.0.0: - version "6.0.4" - resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-6.0.4.tgz#90318824ec456c287437ea79595f4c2854708836" - integrity sha512-AEtWXYfopBj2z5N5PbkAOeNHRPUg5q+Nen7QLxV8M2zJq1ym6/lCz3fYNTCXe19puu2d06jfHhrP7v/S2PtMMw== - dependencies: - glob "^10.2.2" - json-parse-even-better-errors "^3.0.0" - normalize-package-data "^5.0.0" - npm-normalize-package-bin "^3.0.0" - read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" @@ -15949,6 +16205,13 @@ read@^2.0.0: dependencies: mute-stream "~1.0.0" +read@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/read/-/read-3.0.1.tgz#926808f0f7c83fa95f1ef33c0e2c09dbb28fd192" + integrity sha512-SLBrDU/Srs/9EoWhU5GdbAoxG1GzpQHo/6qiGItaoLJ1thmYpcNIM1qISEUvyHBzfGlWIyd6p2DNi1oV1VmAuw== + dependencies: + mute-stream "^1.0.0" + readable-stream@1.1.14, readable-stream@^1.0.33: version "1.1.14" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" @@ -16003,7 +16266,7 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" -readline@1.3.0: +readline@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/readline/-/readline-1.3.0.tgz#c580d77ef2cfc8752b132498060dc9793a7ac01c" integrity sha512-k2d6ACCkiNYz222Fs/iNze30rRJ1iIicW7JuX/7/cozvih6YCkFZH+J6mAFDVgv0dRBaAyr4jDqC95R2y4IADg== @@ -16022,12 +16285,12 @@ rechoir@^0.6.2: dependencies: resolve "^1.1.6" -rechoir@^0.7.0: - version "0.7.1" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.1.tgz#9478a96a1ca135b5e88fc027f03ee92d6c645686" - integrity sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg== +rechoir@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22" + integrity sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ== dependencies: - resolve "^1.9.0" + resolve "^1.20.0" recursive-readdir@^2.2.2: version "2.2.3" @@ -16108,6 +16371,20 @@ regexp.prototype.flags@^1.5.1: define-properties "^1.2.0" set-function-name "^2.0.0" +registry-auth-token@^5.0.1: + version "5.0.2" + resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-5.0.2.tgz#8b026cc507c8552ebbe06724136267e63302f756" + integrity sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ== + dependencies: + "@pnpm/npm-conf" "^2.1.0" + +registry-url@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-6.0.1.tgz#056d9343680f2f64400032b1e199faa692286c58" + integrity sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q== + dependencies: + rc "1.2.8" + relay-runtime@12.0.0: version "12.0.0" resolved "https://registry.yarnpkg.com/relay-runtime/-/relay-runtime-12.0.0.tgz#1e039282bdb5e0c1b9a7dc7f6b9a09d4f4ff8237" @@ -16175,7 +16452,7 @@ require-from-string@^1.1.0: resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" integrity sha512-H7AkJWMobeskkttHyhTVtS0fxpFLjxhbfMa6Bk3wimP7sdPRGL3EyCg3sAQenFfAe+xQ+oAc85Nmtvq0ROM83Q== -require-from-string@^2.0.0, require-from-string@^2.0.2: +require-from-string@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== @@ -16270,7 +16547,7 @@ resolve@^1.1.4, resolve@^1.1.6, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.4.0 path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -resolve@^1.10.0, resolve@^1.9.0: +resolve@^1.10.0: version "1.22.4" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.4.tgz#1dc40df46554cdaf8948a486a10f6ba1e2026c34" integrity sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg== @@ -16279,7 +16556,7 @@ resolve@^1.10.0, resolve@^1.9.0: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -resolve@^1.22.4: +resolve@^1.20.0, resolve@^1.22.4: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -16295,6 +16572,13 @@ responselike@^2.0.0: dependencies: lowercase-keys "^2.0.0" +responselike@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/responselike/-/responselike-3.0.0.tgz#20decb6c298aff0dbee1c355ca95461d42823626" + integrity sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg== + dependencies: + lowercase-keys "^3.0.0" + restore-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" @@ -16303,6 +16587,14 @@ restore-cursor@^3.1.0: onetime "^5.1.0" signal-exit "^3.0.2" +restore-cursor@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-4.0.0.tgz#519560a4318975096def6e609d44100edaa4ccb9" + integrity sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + retimer@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/retimer/-/retimer-3.0.0.tgz#98b751b1feaf1af13eb0228f8ea68b8f9da530df" @@ -16349,6 +16641,13 @@ rimraf@^4.4.1: dependencies: glob "^9.2.0" +rimraf@^5.0.5: + version "5.0.10" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-5.0.10.tgz#23b9843d3dc92db71f96e1a2ce92e39fd2a8221c" + integrity sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ== + dependencies: + glob "^10.3.7" + ripemd160-min@0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/ripemd160-min/-/ripemd160-min-0.0.6.tgz#a904b77658114474d02503e819dcc55853b67e62" @@ -16374,13 +16673,6 @@ run-async@^2.4.0: resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== -run-parallel-limit@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz#be80e936f5768623a38a963262d6bef8ff11e7ba" - integrity sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw== - dependencies: - queue-microtask "^1.2.2" - run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -16515,13 +16807,6 @@ seedrandom@3.0.5: resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-3.0.5.tgz#54edc85c95222525b0c7a6f6b3543d8e0b3aa0a7" integrity sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg== -seek-bzip@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.6.tgz#35c4171f55a680916b52a07859ecf3b5857f21c4" - integrity sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ== - dependencies: - commander "^2.8.1" - semaphore@>=1.0.1, semaphore@^1.0.3: version "1.1.0" resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa" @@ -16553,19 +16838,10 @@ semver@7.4.0: dependencies: lru-cache "^6.0.0" -semver@7.5.3: - version "7.5.3" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.3.tgz#161ce8c2c6b4b3bdca6caadc9fa3317a4c4fe88e" - integrity sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ== - dependencies: - lru-cache "^6.0.0" - -semver@7.5.4, semver@^7.0.0, semver@^7.1.1, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4: - version "7.5.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" - integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== - dependencies: - lru-cache "^6.0.0" +semver@7.6.3, semver@^7.3.6, semver@^7.6.0: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== semver@^5.3.0, semver@^5.5.0: version "5.7.1" @@ -16582,6 +16858,13 @@ semver@^6.1.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^7.0.0, semver@^7.1.1, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== + dependencies: + lru-cache "^6.0.0" + semver@~5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" @@ -16637,6 +16920,13 @@ serialize-javascript@^6.0.1: dependencies: randombytes "^2.1.0" +serialize-javascript@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" + integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== + dependencies: + randombytes "^2.1.0" + serve-static@1.15.0: version "1.15.0" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" @@ -16774,15 +17064,13 @@ shelljs@^0.8.3: interpret "^1.0.0" rechoir "^0.6.2" -shiki@^0.14.7: - version "0.14.7" - resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.7.tgz#c3c9e1853e9737845f1d2ef81b31bcfb07056d4e" - integrity sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg== +shiki@^1.9.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/shiki/-/shiki-1.14.1.tgz#617e62dfbe3a083e46111e22086044fbd7644786" + integrity sha512-FujAN40NEejeXdzPt+3sZ3F2dx1U24BY2XTY01+MG8mbxCiA2XukXdcbyMyLAHJ/1AUUnQd1tZlvIjefWWEJeA== dependencies: - ansi-sequence-parser "^1.1.0" - jsonc-parser "^3.2.0" - vscode-oniguruma "^1.7.0" - vscode-textmate "^8.0.0" + "@shikijs/core" "1.14.1" + "@types/hast" "^3.0.4" side-channel@^1.0.4: version "1.0.4" @@ -16793,7 +17081,7 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -signal-exit@3.0.7, signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: +signal-exit@3.0.7, signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -16808,16 +17096,17 @@ signedsource@^1.0.0: resolved "https://registry.yarnpkg.com/signedsource/-/signedsource-1.0.0.tgz#1ddace4981798f93bd833973803d80d52e93ad6a" integrity sha512-6+eerH9fEnNmi/hyM1DXcRK3pWdoMQtlkQ+ns0ntzunjKqp5i3sKCc80ym8Fib3iaYhdJUOPdhlJWj1tvge2Ww== -sigstore@^1.3.0, sigstore@^1.4.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/sigstore/-/sigstore-1.9.0.tgz#1e7ad8933aa99b75c6898ddd0eeebc3eb0d59875" - integrity sha512-0Zjz0oe37d08VeOtBIuB6cRriqXse2e8w+7yIy2XSXjshRKxbc2KkhXjL229jXSxEm7UbcjS76wcJDGQddVI9A== +sigstore@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/sigstore/-/sigstore-2.3.1.tgz#0755dd2cc4820f2e922506da54d3d628e13bfa39" + integrity sha512-8G+/XDU8wNsJOQS5ysDVO0Etg9/2uA5gR9l4ZwijjlwxBcrU6RPfwi2+jJmbP+Ap1Hlp/nVAaEO4Fj22/SL2gQ== dependencies: - "@sigstore/bundle" "^1.1.0" - "@sigstore/protobuf-specs" "^0.2.0" - "@sigstore/sign" "^1.0.0" - "@sigstore/tuf" "^1.0.3" - make-fetch-happen "^11.0.1" + "@sigstore/bundle" "^2.3.2" + "@sigstore/core" "^1.0.0" + "@sigstore/protobuf-specs" "^0.3.2" + "@sigstore/sign" "^2.3.2" + "@sigstore/tuf" "^2.3.4" + "@sigstore/verify" "^1.2.1" simple-concat@^1.0.0: version "1.0.1" @@ -16859,6 +17148,11 @@ slash@3.0.0, slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== +slash@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-5.1.0.tgz#be3adddcdf09ac38eebe8dcdc7b1a57a75b095ce" + integrity sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg== + slice-ansi@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" @@ -16897,42 +17191,40 @@ snake-case@^3.0.4: dot-case "^3.0.4" tslib "^2.0.3" -socks-proxy-agent@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz#dc069ecf34436621acb41e3efa66ca1b5fed15b6" - integrity sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww== +socks-proxy-agent@^8.0.3: + version "8.0.4" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz#9071dca17af95f483300316f4b063578fa0db08c" + integrity sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw== dependencies: - agent-base "^6.0.2" - debug "^4.3.3" - socks "^2.6.2" + agent-base "^7.1.1" + debug "^4.3.4" + socks "^2.8.3" -socks@^2.6.2: - version "2.7.1" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.7.1.tgz#d8e651247178fde79c0663043e07240196857d55" - integrity sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ== +socks@^2.8.3: + version "2.8.3" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.3.tgz#1ebd0f09c52ba95a09750afe3f3f9f724a800cb5" + integrity sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw== dependencies: - ip "^2.0.0" + ip-address "^9.0.5" smart-buffer "^4.2.0" -solc@0.7.3: - version "0.7.3" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.7.3.tgz#04646961bd867a744f63d2b4e3c0701ffdc7d78a" - integrity sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA== +solc@0.8.19: + version "0.8.19" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.19.tgz#cac6541106ae3cff101c740042c7742aa56a2ed3" + integrity sha512-yqurS3wzC4LdEvmMobODXqprV4MYJcVtinuxgrp61ac8K2zz40vXA0eSAskSHPgv8dQo7Nux39i3QBsHx4pqyA== dependencies: command-exists "^1.2.8" - commander "3.0.2" + commander "^8.1.0" follow-redirects "^1.12.1" - fs-extra "^0.30.0" js-sha3 "0.8.0" memorystream "^0.3.1" - require-from-string "^2.0.0" semver "^5.5.0" tmp "0.0.33" -solc@0.8.19: - version "0.8.19" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.19.tgz#cac6541106ae3cff101c740042c7742aa56a2ed3" - integrity sha512-yqurS3wzC4LdEvmMobODXqprV4MYJcVtinuxgrp61ac8K2zz40vXA0eSAskSHPgv8dQo7Nux39i3QBsHx4pqyA== +solc@0.8.26: + version "0.8.26" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.26.tgz#afc78078953f6ab3e727c338a2fefcd80dd5b01a" + integrity sha512-yiPQNVf5rBFHwN6SIf3TUUvVAFKcQqmSUFeq+fb6pNRCo0ZCgpYOZDi3BVoezCPIAcKrVYd/qXlBLUP9wVrZ9g== dependencies: command-exists "^1.2.8" commander "^8.1.0" @@ -16953,14 +17245,14 @@ solc@^0.4.20: semver "^5.3.0" yargs "^4.7.1" -solhint@3.6.2: - version "3.6.2" - resolved "https://registry.yarnpkg.com/solhint/-/solhint-3.6.2.tgz#2b2acbec8fdc37b2c68206a71ba89c7f519943fe" - integrity sha512-85EeLbmkcPwD+3JR7aEMKsVC9YrRSxd4qkXuMzrlf7+z2Eqdfm1wHWq1ffTuo5aDhoZxp2I9yF3QkxZOxOL7aQ== +solhint@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/solhint/-/solhint-5.0.3.tgz#b57f6d2534fe09a60f9db1b92e834363edd1cbde" + integrity sha512-OLCH6qm/mZTCpplTXzXTJGId1zrtNuDYP5c2e6snIv/hdRVxPfBBz/bAlL91bY/Accavkayp2Zp2BaDSrLVXTQ== dependencies: - "@solidity-parser/parser" "^0.16.0" + "@solidity-parser/parser" "^0.18.0" ajv "^6.12.6" - antlr4 "^4.11.0" + antlr4 "^4.13.1-patch-1" ast-parents "^0.0.1" chalk "^4.1.2" commander "^10.0.0" @@ -16969,6 +17261,7 @@ solhint@3.6.2: glob "^8.0.3" ignore "^5.2.4" js-yaml "^4.1.0" + latest-version "^7.0.0" lodash "^4.17.21" pluralize "^8.0.0" semver "^7.5.2" @@ -16988,23 +17281,22 @@ solidity-comments-extractor@^0.0.7: resolved "https://registry.yarnpkg.com/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz#99d8f1361438f84019795d928b931f4e5c39ca19" integrity sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw== -solidity-coverage@0.8.6: - version "0.8.6" - resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.8.6.tgz#c7b18dc9edfeba11064726c37d96265f689c9478" - integrity sha512-vV03mA/0nNMskOdVwNarUcqk0N/aYdelxAbf6RZ5l84FcYHbqDTr2JXyeYMp4bT48qHtAQjnKrygW1FrECyWNw== +solidity-coverage@^0.8.12: + version "0.8.13" + resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.8.13.tgz#8eeada2e82ae19d25568368aa782a2baad0e0ce7" + integrity sha512-RiBoI+kF94V3Rv0+iwOj3HQVSqNzA9qm/qDP1ZDXK5IX0Cvho1qiz8hAXTsAo6KOIUeP73jfscq0KlLqVxzGWA== dependencies: "@ethersproject/abi" "^5.0.9" "@solidity-parser/parser" "^0.18.0" chalk "^2.4.2" death "^1.1.0" - detect-port "^1.3.0" difflib "^0.2.4" fs-extra "^8.1.0" ghost-testrpc "^0.0.2" global-modules "^2.0.0" globby "^10.0.1" jsonschema "^1.2.4" - lodash "^4.17.15" + lodash "^4.17.21" mocha "^10.2.0" node-emoji "^1.10.0" pify "^4.0.1" @@ -17022,20 +17314,6 @@ solidity-docgen@^0.6.0-beta.36: handlebars "^4.7.7" solidity-ast "^0.4.38" -sort-keys-length@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/sort-keys-length/-/sort-keys-length-1.0.1.tgz#9cb6f4f4e9e48155a6aa0671edd336ff1479a188" - integrity sha512-GRbEOUqCxemTAk/b32F2xa8wDTs+Z1QHOkbhJDQTvv/6G3ZkbJ+frYWsTcc7cBB3Fu4wy4XlLCuNtJuMn7Gsvw== - dependencies: - sort-keys "^1.0.0" - -sort-keys@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" - integrity sha512-vzn8aSqKgytVik0iwdBEi+zevbTYZogewTUM6dtpmGwEcdzbub/TX4bCzRhebDCRC3QzXgJsLRKB2V/Oof7HXg== - dependencies: - is-plain-obj "^1.0.0" - sort-keys@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" @@ -17137,6 +17415,11 @@ sponge-case@^1.0.1: dependencies: tslib "^2.0.3" +sprintf-js@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a" + integrity sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA== + sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" @@ -17157,19 +17440,19 @@ sshpk@^1.7.0: safer-buffer "^2.0.2" tweetnacl "~0.14.0" -ssri@^10.0.0, ssri@^10.0.1: +ssri@^10.0.0: version "10.0.5" resolved "https://registry.yarnpkg.com/ssri/-/ssri-10.0.5.tgz#e49efcd6e36385196cb515d3a2ad6c3f0265ef8c" integrity sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A== dependencies: minipass "^7.0.3" -ssri@^9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-9.0.1.tgz#544d4c357a8d7b71a19700074b6883fcb4eae057" - integrity sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q== +ssri@^10.0.6: + version "10.0.6" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-10.0.6.tgz#a8aade2de60ba2bce8688e3fa349bad05c7dc1e5" + integrity sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ== dependencies: - minipass "^3.1.1" + minipass "^7.0.3" stack-trace@0.0.10: version "0.0.10" @@ -17188,6 +17471,11 @@ statuses@2.0.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== +stdin-discarder@^0.2.1: + version "0.2.2" + resolved "https://registry.yarnpkg.com/stdin-discarder/-/stdin-discarder-0.2.2.tgz#390037f44c4ae1a1ae535c5fe38dc3aba8d997be" + integrity sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ== + stream-browserify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-3.0.0.tgz#22b0a2850cdf6503e73085da1fc7b7d0c2122f2f" @@ -17249,7 +17537,7 @@ string-format@^2.0.0: resolved "https://registry.yarnpkg.com/string-format/-/string-format-2.0.0.tgz#f2df2e7097440d3b65de31b6d40d54c96eaffb9b" integrity sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA== -"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -17267,6 +17555,15 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string-width@^5.0.1, string-width@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" @@ -17276,6 +17573,15 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" +string-width@^7.0.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-7.2.0.tgz#b5bb8e2165ce275d4d43476dd2700ad9091db6dc" + integrity sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ== + dependencies: + emoji-regex "^10.3.0" + get-east-asian-width "^1.0.0" + strip-ansi "^7.1.0" + string.prototype.padend@^3.0.0: version "3.1.4" resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.1.4.tgz#2c43bb3a89eb54b6750de5942c123d6c98dd65b6" @@ -17358,7 +17664,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -17386,7 +17692,14 @@ strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" -strip-ansi@^7.0.1: +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^7.0.1, strip-ansi@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== @@ -17410,18 +17723,6 @@ strip-bom@^4.0.0: resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== -strip-dirs@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/strip-dirs/-/strip-dirs-2.1.0.tgz#4987736264fc344cf20f6c34aca9d13d1d4ed6c5" - integrity sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g== - dependencies: - is-natural-number "^4.0.1" - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q== - strip-final-newline@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" @@ -17451,18 +17752,11 @@ strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1. resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -strip-json-comments@^2.0.0: +strip-json-comments@^2.0.0, strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== -strip-outer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.1.tgz#b2fd2abf6604b9d1e6013057195df836b8a9d631" - integrity sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg== - dependencies: - escape-string-regexp "^1.0.2" - strong-log-transformer@2.1.0, strong-log-transformer@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10" @@ -17588,36 +17882,36 @@ sync-rpc@^1.2.1: dependencies: get-port "^3.1.0" -synckit@^0.8.6: - version "0.8.8" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.8.tgz#fe7fe446518e3d3d49f5e429f443cf08b6edfcd7" - integrity sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ== +synckit@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.9.1.tgz#febbfbb6649979450131f64735aa3f6c14575c88" + integrity sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A== dependencies: "@pkgr/core" "^0.1.0" tslib "^2.6.2" -syncpack@^10.9.3: - version "10.9.3" - resolved "https://registry.yarnpkg.com/syncpack/-/syncpack-10.9.3.tgz#24c56f506a8700aca032bd2a7ddc3acd3c8df824" - integrity sha512-urdxuqkvO2/4tB1GaZGbCTzOgdi1XJzHjpiG4DTunOMH4oChSg54hczzzybfFQhqUl0ZY8A6LJNziKsf3J6E7g== - dependencies: - "@effect/data" "0.17.1" - "@effect/io" "0.37.1" - "@effect/match" "0.31.0" - "@effect/schema" "0.32.0" - chalk "4.1.2" - commander "11.0.0" - cosmiconfig "8.2.0" +syncpack@^13.0.0: + version "13.0.0" + resolved "https://registry.yarnpkg.com/syncpack/-/syncpack-13.0.0.tgz#4b2eaa46ca9063f8a5b326efda75d0a9505eda08" + integrity sha512-0PIoEWMP2+YkllkcZXw8N9d2sFqpmr8ULBdvms3gc1vG5tnccEMqc6flxHYnF/N+NTTcUnf0J+4xAD5hwH6XGQ== + dependencies: + "@effect/schema" "0.71.1" + chalk "5.3.0" + chalk-template "1.1.0" + commander "12.1.0" + cosmiconfig "9.0.0" + effect "3.6.5" enquirer "2.4.1" - fs-extra "11.1.1" - globby "11.1.0" - minimatch "9.0.3" - npm-package-arg "10.1.0" - ora "5.4.1" + fast-check "3.21.0" + globby "14.0.2" + jsonc-parser "3.3.1" + minimatch "9.0.5" + npm-package-arg "11.0.3" + ora "8.0.1" prompts "2.4.2" read-yaml-file "2.1.0" - semver "7.5.4" - tightrope "0.1.0" + semver "7.6.3" + tightrope "0.2.0" ts-toolbelt "9.6.0" syntax-error@^1.1.1: @@ -17663,7 +17957,7 @@ tar-fs@~1.16.3: pump "^1.0.0" tar-stream "^1.1.2" -tar-stream@^1.1.2, tar-stream@^1.5.2: +tar-stream@^1.1.2: version "1.6.2" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" integrity sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A== @@ -17687,14 +17981,14 @@ tar-stream@~2.2.0: inherits "^2.0.3" readable-stream "^3.1.1" -tar@6.1.11: - version "6.1.11" - resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" - integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA== +tar@6.2.1, tar@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a" + integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A== dependencies: chownr "^2.0.0" fs-minipass "^2.0.0" - minipass "^3.0.0" + minipass "^5.0.0" minizlib "^2.1.1" mkdirp "^1.0.3" yallist "^4.0.0" @@ -17724,7 +18018,7 @@ tar@^6.1.0: mkdirp "^1.0.3" yallist "^4.0.0" -tar@^6.1.11, tar@^6.1.2: +tar@^6.1.11: version "6.1.15" resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.15.tgz#c9738b0b98845a3b344d334b8fa3041aaba53a69" integrity sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A== @@ -17736,6 +18030,18 @@ tar@^6.1.11, tar@^6.1.2: mkdirp "^1.0.3" yallist "^4.0.0" +tar@^7.4.0: + version "7.4.3" + resolved "https://registry.yarnpkg.com/tar/-/tar-7.4.3.tgz#88bbe9286a3fcd900e94592cda7a22b192e80571" + integrity sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw== + dependencies: + "@isaacs/fs-minipass" "^4.0.0" + chownr "^3.0.0" + minipass "^7.1.2" + minizlib "^3.0.1" + mkdirp "^3.0.1" + yallist "^5.0.0" + tcomb-validation@^3.3.0: version "3.4.1" resolved "https://registry.yarnpkg.com/tcomb-validation/-/tcomb-validation-3.4.1.tgz#a7696ec176ce56a081d9e019f8b732a5a8894b65" @@ -17748,31 +18054,25 @@ tcomb@^3.0.0, tcomb@^3.2.17: resolved "https://registry.yarnpkg.com/tcomb/-/tcomb-3.2.29.tgz#32404fe9456d90c2cf4798682d37439f1ccc386c" integrity sha512-di2Hd1DB2Zfw6StGv861JoAF5h/uQVu/QJp2g8KVbtfKnoHdBQl5M32YWq6mnSYBQ1vFFrns5B1haWJL7rKaOQ== -temp-dir@1.0.0, temp-dir@^1.0.0: +temp-dir@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" integrity sha512-xZFXEGbG7SNC3itwBzI3RYjq/cEhBkx2hJuKGIUOcEULmkQExXiHat2z/qkISYsuR+IKumhEfKKbV5qXmhICFQ== -temp-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-2.0.0.tgz#bde92b05bdfeb1516e804c9c00ad45177f31321e" - integrity sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg== - -tempfile@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-2.0.0.tgz#6b0446856a9b1114d1856ffcbe509cccb0977265" - integrity sha512-ZOn6nJUgvgC09+doCEF3oB+r3ag7kUvlsXEGX069QRD60p+P3uP7XG9N2/at+EyIRGSN//ZY3LyEotA1YpmjuA== - dependencies: - temp-dir "^1.0.0" - uuid "^3.0.1" - -tempfile@^3.0.0: +temp-dir@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-3.0.0.tgz#5376a3492de7c54150d0cc0612c3f00e2cdaf76c" - integrity sha512-uNFCg478XovRi85iD42egu+eSFUmmka750Jy7L5tfHI5hQKKtbPnxaSaXAbBqCDYrw3wx4tXjKwci4/QmsZJxw== + resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-3.0.0.tgz#7f147b42ee41234cc6ba3138cd8e8aa2302acffa" + integrity sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw== + +tempy@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/tempy/-/tempy-3.1.0.tgz#00958b6df85db8589cb595465e691852aac038e9" + integrity sha512-7jDLIdD2Zp0bDe5r3D2qtkd1QOCacylBuL7oa4udvN6v2pqr4+LcCr67C8DR1zkpaZ8XosF5m1yQSabKAW6f2g== dependencies: - temp-dir "^2.0.0" - uuid "^3.3.2" + is-stream "^3.0.0" + temp-dir "^3.0.0" + type-fest "^2.12.2" + unique-string "^3.0.0" terser-webpack-plugin@^5.3.10: version "5.3.10" @@ -17857,12 +18157,12 @@ through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@^2.3.8: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== -tightrope@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/tightrope/-/tightrope-0.1.0.tgz#f734fba76bd3472cc88884e4bd4bf109e5f0b051" - integrity sha512-HHHNYdCAIYwl1jOslQBT455zQpdeSo8/A346xpIb/uuqhSg+tCvYNsP5f11QW+z9VZ3vSX8YIfzTApjjuGH63w== +tightrope@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/tightrope/-/tightrope-0.2.0.tgz#5a2a1d8391d869be376b9160dd03965b53243a29" + integrity sha512-Kw36UHxJEELq2VUqdaSGR2/8cAsPgMtvX8uGVU6Jk26O66PhXec0A5ZnRYs47btbtwPDpXXF66+Fo3vimCM9aQ== -timed-out@^4.0.0, timed-out@^4.0.1: +timed-out@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" integrity sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA== @@ -17981,18 +18281,16 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +treeverse@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/treeverse/-/treeverse-3.0.0.tgz#dd82de9eb602115c6ebd77a574aae67003cb48c8" + integrity sha512-gcANaAnd2QDZFmHFEOF4k7uc1J/6a6z3DJMd/QwEyxLoKGiptJRwid582r7QIsFlFMIZ3SnxfS52S4hm2DHkuQ== + trim-newlines@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== -trim-repeated@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/trim-repeated/-/trim-repeated-1.0.0.tgz#e3646a2ea4e891312bf7eace6cfb05380bc01c21" - integrity sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg== - dependencies: - escape-string-regexp "^1.0.2" - truffle-flattener@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/truffle-flattener/-/truffle-flattener-1.6.0.tgz#abb64488b711e6cca0a9d3e449f6a85e35964c5d" @@ -18023,6 +18321,11 @@ ts-api-utils@^1.0.1: resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.1.tgz#8144e811d44c749cd65b2da305a032510774452d" integrity sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A== +ts-api-utils@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1" + integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== + ts-command-line-args@^2.2.0: version "2.4.2" resolved "https://registry.yarnpkg.com/ts-command-line-args/-/ts-command-line-args-2.4.2.tgz#b4815b23c35f8a0159d4e69e01012d95690bc448" @@ -18116,7 +18419,7 @@ tsconfig@^5.0.3: strip-bom "^2.0.0" strip-json-comments "^2.0.0" -tsify@^5.0.4: +tsify@5.0.4: version "5.0.4" resolved "https://registry.yarnpkg.com/tsify/-/tsify-5.0.4.tgz#22163648d04c0c90bdb15704fb14947df2328547" integrity sha512-XAZtQ5OMPsJFclkZ9xMZWkSNyMhMxEPsz3D2zu79yoKorH9j/DT4xCloJeXk5+cDhosEibu4bseMVjyPOAyLJA== @@ -18128,7 +18431,7 @@ tsify@^5.0.4: through2 "^2.0.0" tsconfig "^5.0.3" -tslib@^1.8.1, tslib@^1.9.3: +tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -18153,26 +18456,19 @@ tsort@0.0.1: resolved "https://registry.yarnpkg.com/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786" integrity sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw== -tsutils@^3.21.0: - version "3.21.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" - integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== - dependencies: - tslib "^1.8.1" - tty-browserify@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811" integrity sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw== -tuf-js@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/tuf-js/-/tuf-js-1.1.7.tgz#21b7ae92a9373015be77dfe0cb282a80ec3bbe43" - integrity sha512-i3P9Kgw3ytjELUfpuKVDNBJvk4u5bXL6gskv572mcevPbSKCV3zt3djhmlEQ65yERjIbOSncy7U4cQJaB1CBCg== +tuf-js@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tuf-js/-/tuf-js-2.2.1.tgz#fdd8794b644af1a75c7aaa2b197ddffeb2911b56" + integrity sha512-GwIJau9XaA8nLVbUXsN3IlFi7WmQ48gBUrl3FTkkL/XLu/POhBzfmX9hd33FNMX1qAsfl6ozO1iMmW9NC8YniA== dependencies: - "@tufjs/models" "1.0.4" + "@tufjs/models" "2.0.1" debug "^4.3.4" - make-fetch-happen "^11.1.1" + make-fetch-happen "^13.0.1" tunnel-agent@^0.6.0: version "0.6.0" @@ -18255,6 +18551,16 @@ type-fest@^0.8.0, type-fest@^0.8.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== +type-fest@^1.0.1: + version "1.4.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" + integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== + +type-fest@^2.12.2: + version "2.19.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b" + integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== + type-is@~1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" @@ -18340,15 +18646,16 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== -typedoc@^0.25.7: - version "0.25.7" - resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.25.7.tgz#11e3f527ca80ca3c029cb8e15f362e6d9f715e25" - integrity sha512-m6A6JjQRg39p2ZVRIN3NKXgrN8vzlHhOS+r9ymUYtcUP/TIQPvWSq7YgE5ZjASfv5Vd5BW5xrir6Gm2XNNcOow== +typedoc@^0.26.6: + version "0.26.6" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.26.6.tgz#9cb3d6f0ed5070f86af169c3f88ca2c9b7031f59" + integrity sha512-SfEU3SH3wHNaxhFPjaZE2kNl/NFtLNW5c1oHsg7mti7GjmUj1Roq6osBQeMd+F4kL0BoRBBr8gQAuqBlfFu8LA== dependencies: lunr "^2.3.9" - marked "^4.3.0" - minimatch "^9.0.3" - shiki "^0.14.7" + markdown-it "^14.1.0" + minimatch "^9.0.5" + shiki "^1.9.1" + yaml "^2.4.5" typescript-compare@^0.0.2: version "0.0.2" @@ -18374,15 +18681,10 @@ typescript-tuple@^2.2.1: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274" integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA== -typescript@^4.5.4: - version "4.9.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" - integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== - -typescript@^5.3.3: - version "5.3.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" - integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== +typescript@^5.2.2, typescript@^5.5.4: + version "5.5.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba" + integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== typical@^4.0.0: version "4.0.0" @@ -18399,6 +18701,11 @@ ua-parser-js@^0.7.30: resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.34.tgz#afb439e2e3e394bdc90080acb661a39c685b67d7" integrity sha512-cJMeh/eOILyGu0ejgTKB95yKT3zOenSe9UGE3vj6WfiOwgGYnmATUsnDixMFvdU+rNMvWih83hrUP8VwhF9yXQ== +uc.micro@^2.0.0, uc.micro@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-2.1.0.tgz#f8d3f7d0ec4c3dea35a7e3c8efa4cb8b45c9e7ee" + integrity sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A== + uglify-js@^3.1.4: version "3.17.4" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" @@ -18431,14 +18738,6 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -unbzip2-stream@^1.0.9: - version "1.4.3" - resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz#b0da04c4371311df771cdc215e87f2130991ace7" - integrity sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg== - dependencies: - buffer "^5.2.1" - through "^2.3.8" - unc-path-regex@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" @@ -18472,6 +18771,11 @@ undici@^5.14.0: dependencies: "@fastify/busboy" "^2.0.0" +unicorn-magic@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/unicorn-magic/-/unicorn-magic-0.1.0.tgz#1bb9a51c823aaf9d73a8bfcd3d1a23dde94b0ce4" + integrity sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ== + unique-filename@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-3.0.0.tgz#48ba7a5a16849f5080d26c760c86cf5cf05770ea" @@ -18486,6 +18790,13 @@ unique-slug@^4.0.0: dependencies: imurmurhash "^0.1.4" +unique-string@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-3.0.0.tgz#84a1c377aff5fd7a8bc6b55d8244b2bd90d75b9a" + integrity sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ== + dependencies: + crypto-random-string "^4.0.0" + universal-user-agent@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" @@ -18552,6 +18863,14 @@ update-browserslist-db@^1.0.13: escalade "^3.1.1" picocolors "^1.0.0" +update-browserslist-db@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz#7ca61c0d8650766090728046e416a8cde682859e" + integrity sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ== + dependencies: + escalade "^3.1.2" + picocolors "^1.0.1" + upper-case-first@^1.1.0, upper-case-first@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-1.1.2.tgz#5d79bedcff14419518fd2edb0a0507c9b6859115" @@ -18585,13 +18904,6 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -url-parse-lax@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" - integrity sha512-BVA4lR5PIviy2PMseNd2jbFQ+jwSwQGdJejf5ctd1rEXt0Ypd7yanUK9+lYechVlN5VaTJGsu2U/3MDDu6KgBA== - dependencies: - prepend-http "^1.0.1" - url-parse@^1.5.3: version "1.5.10" resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" @@ -18605,11 +18917,6 @@ url-set-query@^1.0.0: resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339" integrity sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg== -url-to-options@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" - integrity sha512-0kQLIzG4fdk/G5NONku64rSH/x32NOA39LVQqlK8Le6lvTF6GGRJpqaQFGgU+CLwySIqBSMdwYM0sYcW9f6P4A== - url@~0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" @@ -18666,7 +18973,7 @@ utf8@3.0.0, utf8@^3.0.0: resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== -util-deprecate@^1.0.1, util-deprecate@~1.0.1: +util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== @@ -18704,7 +19011,12 @@ uuid@8.3.2, uuid@^8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== -uuid@^3.0.1, uuid@^3.3.2: +uuid@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-10.0.0.tgz#5a95aa454e6e002725c79055fd42aaba30ca6294" + integrity sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ== + +uuid@^3.3.2: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== @@ -18724,11 +19036,6 @@ v8-compile-cache-lib@^3.0.1: resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== -v8-compile-cache@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" - integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== - validate-npm-package-license@3.0.4, validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -18737,20 +19044,18 @@ validate-npm-package-license@3.0.4, validate-npm-package-license@^3.0.1, validat spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" -validate-npm-package-name@5.0.0, validate-npm-package-name@^5.0.0: +validate-npm-package-name@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz#a316573e9b49f3ccd90dbb6eb52b3f06c6d604e8" + integrity sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ== + +validate-npm-package-name@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz#f16afd48318e6f90a1ec101377fa0384cfc8c713" integrity sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ== dependencies: builtins "^5.0.0" -validate-npm-package-name@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz#5fa912d81eb7d0c74afc140de7317f0ca7df437e" - integrity sha512-M6w37eVCMMouJ9V/sdPGnC5H4uDr73/+xdq0FBLO3TFFX1+7wiUY6Es328NN+y43tmY+doUdN9g9J21vqB7iLw== - dependencies: - builtins "^1.0.3" - validator@^13.6.0: version "13.9.0" resolved "https://registry.yarnpkg.com/validator/-/validator-13.9.0.tgz#33e7b85b604f3bbce9bb1a05d5c3e22e1c2ff855" @@ -18795,28 +19100,18 @@ vm-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== -vscode-oniguruma@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b" - integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA== - -vscode-textmate@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d" - integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== - -vue-eslint-parser@^8.0.1: - version "8.3.0" - resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-8.3.0.tgz#5d31129a1b3dd89c0069ca0a1c88f970c360bd0d" - integrity sha512-dzHGG3+sYwSf6zFBa0Gi9ZDshD7+ad14DGOdTLjruRVgZXe2J+DcZ9iUhyR48z5g1PqRa20yt3Njna/veLJL/g== +vue-eslint-parser@^9.1.0: + version "9.4.3" + resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-9.4.3.tgz#9b04b22c71401f1e8bca9be7c3e3416a4bde76a8" + integrity sha512-2rYRLWlIpaiN8xbPiDyXZXRgLGOtWxERV7ND5fFAv5qo1D2N9Fu9MNajBNc6o13lZ+24DAWCkQCvj4klgmcITg== dependencies: - debug "^4.3.2" - eslint-scope "^7.0.0" - eslint-visitor-keys "^3.1.0" - espree "^9.0.0" + debug "^4.3.4" + eslint-scope "^7.1.1" + eslint-visitor-keys "^3.3.0" + espree "^9.3.1" esquery "^1.4.0" lodash "^4.17.21" - semver "^7.3.5" + semver "^7.3.6" vuvuzela@1.0.3: version "1.0.3" @@ -18828,10 +19123,15 @@ wabt@1.0.24: resolved "https://registry.yarnpkg.com/wabt/-/wabt-1.0.24.tgz#c02e0b5b4503b94feaf4a30a426ef01c1bea7c6c" integrity sha512-8l7sIOd3i5GWfTWciPL0+ff/FK/deVK2Q6FN+MPz4vfUcD78i2M/49XJTwF6aml91uIiuXJEsLKWMB2cw/mtKg== -watchpack@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" - integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== +walk-up-path@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/walk-up-path/-/walk-up-path-3.0.1.tgz#c8d78d5375b4966c717eb17ada73dbd41490e886" + integrity sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA== + +watchpack@^2.4.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.2.tgz#2feeaed67412e7c33184e5a79ca738fbd38564da" + integrity sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw== dependencies: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" @@ -19831,10 +20131,10 @@ webidl-conversions@^3.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== -webpack-bundle-analyzer@^4.10.1: - version "4.10.1" - resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.1.tgz#84b7473b630a7b8c21c741f81d8fe4593208b454" - integrity sha512-s3P7pgexgT/HTUSYgxJyn28A+99mmLq4HsJepMPzu0R8ImJc52QNqaFYW1Z2z2uIb1/J3eYgaAWVpaC+v/1aAQ== +webpack-bundle-analyzer@^4.10.2: + version "4.10.2" + resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.2.tgz#633af2862c213730be3dbdf40456db171b60d5bd" + integrity sha512-vJptkMm9pk5si4Bv922ZbKLV8UTT4zib4FPgXMhgzUny0bfDDkLXAVQs3ly3fS4/TN9ROFtb0NFrm04UXFE/Vw== dependencies: "@discoveryjs/json-ext" "0.5.7" acorn "^8.0.4" @@ -19844,28 +20144,28 @@ webpack-bundle-analyzer@^4.10.1: escape-string-regexp "^4.0.0" gzip-size "^6.0.0" html-escaper "^2.0.2" - is-plain-object "^5.0.0" opener "^1.5.2" picocolors "^1.0.0" sirv "^2.0.3" ws "^7.3.1" -webpack-cli@^4.10.0: - version "4.10.0" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.10.0.tgz#37c1d69c8d85214c5a65e589378f53aec64dab31" - integrity sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w== +webpack-cli@^5.1.4: + version "5.1.4" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-5.1.4.tgz#c8e046ba7eaae4911d7e71e2b25b776fcc35759b" + integrity sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg== dependencies: "@discoveryjs/json-ext" "^0.5.0" - "@webpack-cli/configtest" "^1.2.0" - "@webpack-cli/info" "^1.5.0" - "@webpack-cli/serve" "^1.7.0" + "@webpack-cli/configtest" "^2.1.1" + "@webpack-cli/info" "^2.0.2" + "@webpack-cli/serve" "^2.0.5" colorette "^2.0.14" - commander "^7.0.0" + commander "^10.0.1" cross-spawn "^7.0.3" + envinfo "^7.7.3" fastest-levenshtein "^1.0.12" import-local "^3.0.2" - interpret "^2.2.0" - rechoir "^0.7.0" + interpret "^3.1.1" + rechoir "^0.8.0" webpack-merge "^5.7.3" webpack-merge@^5.7.3: @@ -19881,26 +20181,25 @@ webpack-sources@^3.2.3: resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@^5.90.1: - version "5.90.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.90.1.tgz#62ab0c097d7cbe83d32523dbfbb645cdb7c3c01c" - integrity sha512-SstPdlAC5IvgFnhiRok8hqJo/+ArAbNv7rhU4fnWGHNVfN59HSQFaxZDSAL3IFG2YmqxuRs+IU33milSxbPlog== +webpack@^5.94.0: + version "5.94.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.94.0.tgz#77a6089c716e7ab90c1c67574a28da518a20970f" + integrity sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg== dependencies: - "@types/eslint-scope" "^3.7.3" "@types/estree" "^1.0.5" - "@webassemblyjs/ast" "^1.11.5" - "@webassemblyjs/wasm-edit" "^1.11.5" - "@webassemblyjs/wasm-parser" "^1.11.5" + "@webassemblyjs/ast" "^1.12.1" + "@webassemblyjs/wasm-edit" "^1.12.1" + "@webassemblyjs/wasm-parser" "^1.12.1" acorn "^8.7.1" - acorn-import-assertions "^1.9.0" + acorn-import-attributes "^1.9.5" browserslist "^4.21.10" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.15.0" + enhanced-resolve "^5.17.1" es-module-lexer "^1.2.1" eslint-scope "5.1.1" events "^3.2.0" glob-to-regexp "^0.4.1" - graceful-fs "^4.2.9" + graceful-fs "^4.2.11" json-parse-even-better-errors "^2.3.1" loader-runner "^4.2.0" mime-types "^2.1.27" @@ -19908,7 +20207,7 @@ webpack@^5.90.1: schema-utils "^3.2.0" tapable "^2.1.1" terser-webpack-plugin "^5.3.10" - watchpack "^2.4.0" + watchpack "^2.4.1" webpack-sources "^3.2.3" websocket@^1.0.32: @@ -19980,7 +20279,7 @@ which-typed-array@^1.1.2, which-typed-array@^1.1.9: has-tostringtag "^1.0.0" is-typed-array "^1.1.10" -which@2.0.2, which@^2.0.1, which@^2.0.2: +which@2.0.2, which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== @@ -19994,14 +20293,14 @@ which@^1.1.1, which@^1.2.14, which@^1.2.9, which@^1.3.1: dependencies: isexe "^2.0.0" -which@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/which/-/which-3.0.1.tgz#89f1cd0c23f629a8105ffe69b8172791c87b4be1" - integrity sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg== +which@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/which/-/which-4.0.0.tgz#cd60b5e74503a3fbcfbf6cd6b4138a8bae644c1a" + integrity sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg== dependencies: - isexe "^2.0.0" + isexe "^3.1.1" -wide-align@^1.1.5: +wide-align@1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== @@ -20048,7 +20347,12 @@ workerpool@6.2.1: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +workerpool@^6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544" + integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA== + +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -20074,6 +20378,15 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" @@ -20088,7 +20401,7 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -write-file-atomic@5.0.1: +write-file-atomic@5.0.1, write-file-atomic@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-5.0.1.tgz#68df4717c55c6fa4281a7860b4c2ba0a6d2b11e7" integrity sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw== @@ -20249,11 +20562,6 @@ yaeti@^0.0.6: resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" integrity sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug== -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A== - yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" @@ -20264,6 +20572,11 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== +yallist@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-5.0.0.tgz#00e2de443639ed0d78fd87de0d27469fbcffb533" + integrity sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw== + yaml-ast-parser@^0.0.43: version "0.0.43" resolved "https://registry.yarnpkg.com/yaml-ast-parser/-/yaml-ast-parser-0.0.43.tgz#e8a23e6fb4c38076ab92995c5dca33f3d3d7c9bb" @@ -20279,6 +20592,11 @@ yaml@^2.3.1: resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.1.tgz#02fe0975d23cd441242aa7204e09fc28ac2ac33b" integrity sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ== +yaml@^2.4.5: + version "2.5.0" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.5.0.tgz#c6165a721cf8000e91c36490a41d7be25176cf5d" + integrity sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw== + yargs-parser@20.2.4: version "20.2.4" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" @@ -20305,12 +20623,12 @@ yargs-parser@^2.4.1: camelcase "^3.0.0" lodash.assign "^4.0.6" -yargs-parser@^20.2.2, yargs-parser@^20.2.3: +yargs-parser@^20.2.2, yargs-parser@^20.2.3, yargs-parser@^20.2.9: version "20.2.9" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs-unparser@2.0.0: +yargs-unparser@2.0.0, yargs-unparser@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== @@ -20333,6 +20651,19 @@ yargs@16.2.0, yargs@^16.1.0, yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" +yargs@17.7.2, yargs@^17.6.2: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + yargs@^15.0.2, yargs@^15.3.1: version "15.4.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" @@ -20363,19 +20694,6 @@ yargs@^17.0.0, yargs@^17.2.1: y18n "^5.0.5" yargs-parser "^21.1.1" -yargs@^17.6.2: - version "17.7.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" - integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== - dependencies: - cliui "^8.0.1" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.1.1" - yargs@^4.7.1: version "4.8.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" @@ -20396,14 +20714,6 @@ yargs@^4.7.1: y18n "^3.2.1" yargs-parser "^2.4.1" -yauzl@^2.4.2: - version "2.10.0" - resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" - integrity sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g== - dependencies: - buffer-crc32 "~0.2.3" - fd-slicer "~1.1.0" - yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" @@ -20414,7 +20724,19 @@ yocto-queue@^0.1.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== +zksync-ethers@^5.0.0: + version "5.9.2" + resolved "https://registry.yarnpkg.com/zksync-ethers/-/zksync-ethers-5.9.2.tgz#1c5f34cb25ac0b040fd1a6118f2ba1c2c3bda090" + integrity sha512-Y2Mx6ovvxO6UdC2dePLguVzvNToOY8iLWeq5ne+jgGSJxAi/f4He/NF6FNsf6x1aWX0o8dy4Df8RcOQXAkj5qw== + dependencies: + ethers "~5.7.0" + zksync-web3@^0.14.3: version "0.14.3" resolved "https://registry.yarnpkg.com/zksync-web3/-/zksync-web3-0.14.3.tgz#64ac2a16d597464c3fc4ae07447a8007631c57c9" integrity sha512-hT72th4AnqyLW1d5Jlv8N2B/qhEnl2NePK2A3org7tAa24niem/UAaHMkEvmWI3SF9waYUPtqAtjpf+yvQ9zvQ== + +zod@^3.23.8: + version "3.23.8" + resolved "https://registry.yarnpkg.com/zod/-/zod-3.23.8.tgz#e37b957b5d52079769fb8097099b592f0ef4067d" + integrity sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g== From fb6cd0526af5f26e7cec6b542ecbc17e63fdebac Mon Sep 17 00:00:00 2001 From: Didi Date: Fri, 30 Aug 2024 13:16:39 +0200 Subject: [PATCH 40/42] added macroForwarder, updated batchLiquidator (#2015) --- .../autowrap/package.json | 2 +- .../scheduler/package.json | 2 +- packages/ethereum-contracts/package.json | 2 +- .../test/foundry/utils/MacroForwarder.t.sol | 2 +- packages/js-sdk/package.json | 2 +- packages/metadata/CHANGELOG.md | 7 ++ packages/metadata/main/networks/list.cjs | 74 ++++++++++++------- packages/metadata/module/networks/list.d.ts | 1 + packages/metadata/module/networks/list.js | 74 ++++++++++++------- packages/metadata/networks.json | 74 ++++++++++++------- packages/metadata/package.json | 2 +- packages/sdk-core/package.json | 2 +- packages/subgraph/package.json | 2 +- 13 files changed, 157 insertions(+), 89 deletions(-) diff --git a/packages/automation-contracts/autowrap/package.json b/packages/automation-contracts/autowrap/package.json index ad5b341d8c..39615e1f40 100644 --- a/packages/automation-contracts/autowrap/package.json +++ b/packages/automation-contracts/autowrap/package.json @@ -5,7 +5,7 @@ "devDependencies": { "@openzeppelin/contracts": "^4.9.6", "@superfluid-finance/ethereum-contracts": "^1.11.0", - "@superfluid-finance/metadata": "^1.4.1" + "@superfluid-finance/metadata": "^1.5.0" }, "license": "MIT", "scripts": { diff --git a/packages/automation-contracts/scheduler/package.json b/packages/automation-contracts/scheduler/package.json index 8290687a88..7063595882 100644 --- a/packages/automation-contracts/scheduler/package.json +++ b/packages/automation-contracts/scheduler/package.json @@ -5,7 +5,7 @@ "devDependencies": { "@openzeppelin/contracts": "^4.9.6", "@superfluid-finance/ethereum-contracts": "^1.11.0", - "@superfluid-finance/metadata": "^1.4.1" + "@superfluid-finance/metadata": "^1.5.0" }, "license": "MIT", "scripts": { diff --git a/packages/ethereum-contracts/package.json b/packages/ethereum-contracts/package.json index 7473056ddf..f7f72e77d7 100644 --- a/packages/ethereum-contracts/package.json +++ b/packages/ethereum-contracts/package.json @@ -18,7 +18,7 @@ "@safe-global/safe-service-client": "^2.0.3", "@safe-global/safe-web3-lib": "^1.9.4", "@superfluid-finance/js-sdk": "^0.6.3", - "@superfluid-finance/metadata": "^1.4.1", + "@superfluid-finance/metadata": "^1.5.0", "async": "^3.2.6", "csv-writer": "^1.6.0", "ethers": "^5.7.2", diff --git a/packages/ethereum-contracts/test/foundry/utils/MacroForwarder.t.sol b/packages/ethereum-contracts/test/foundry/utils/MacroForwarder.t.sol index 58d9a31bcc..ac72df5219 100644 --- a/packages/ethereum-contracts/test/foundry/utils/MacroForwarder.t.sol +++ b/packages/ethereum-contracts/test/foundry/utils/MacroForwarder.t.sol @@ -19,7 +19,7 @@ contract NaugthyMacro { if (beNaughty) naughtyCounter = 0; } - // if naughtyCounter >= 0, this changes state, which leads to a rever in the context of a macro call + // if naughtyCounter >= 0, this changes state, which leads to a revert in the context of a macro call function buildBatchOperations(ISuperfluid, bytes memory, address /*msgSender*/) external returns (ISuperfluid.Operation[] memory /*operation*/) { diff --git a/packages/js-sdk/package.json b/packages/js-sdk/package.json index 72ae0df589..bebe476993 100644 --- a/packages/js-sdk/package.json +++ b/packages/js-sdk/package.json @@ -7,7 +7,7 @@ "path": false }, "dependencies": { - "@superfluid-finance/metadata": "^1.4.1", + "@superfluid-finance/metadata": "^1.5.0", "@truffle/contract": "4.6.31", "auto-bind": "4.0.0", "node-fetch": "2.7.0" diff --git a/packages/metadata/CHANGELOG.md b/packages/metadata/CHANGELOG.md index 1f278c7120..dc1914135e 100644 --- a/packages/metadata/CHANGELOG.md +++ b/packages/metadata/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to the metadata will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.5.0] +### Added +- MacroForwarder addresses + +### Changed +- Updated BatchLiquidator addresses + ## [v1.4.1] ### Changed - New & updated contracts on eth-mainnet diff --git a/packages/metadata/main/networks/list.cjs b/packages/metadata/main/networks/list.cjs index 18b5934b18..354d420c26 100644 --- a/packages/metadata/main/networks/list.cjs +++ b/packages/metadata/main/networks/list.cjs @@ -22,11 +22,13 @@ module.exports = "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x1C92042426B6bAAe497bEf461B6d8342D03aEc92", "superfluidLoader": "0x36446Ec9C7909608065dEB7f491701d815B880e5", + "batchLiquidator": "0x85AfCf531aF1a853AC65F6bfa4de99C742B8e432", "autowrap": { "manager": "0x30aE282CF477E2eF28B14d0125aCEAd57Fe1d7a1", "wrapStrategy": "0x1D65c6d3AD39d454Ea8F682c49aE7744706eA96d" }, - "existentialNFTCloneFactory": "0xF76529ddEE7AA7890323eCa40C212758DD93B888" + "existentialNFTCloneFactory": "0xF76529ddEE7AA7890323eCa40C212758DD93B888", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 3220000, "logsQueryRange": 50000, @@ -67,7 +69,9 @@ module.exports = "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x254C2e152E8602839D288A7bccdf3d0974597193", "superfluidLoader": "0x862F59081FC7907F940bE4227b9f485d700E6cdD", - "existentialNFTCloneFactory": "0x0D1F0d4629B722b4dFabd195c14F12f2095418d9" + "batchLiquidator": "0x79aE8BF8EE9238d8E848F7dbBF74Ddb3365f6c11", + "existentialNFTCloneFactory": "0x0D1F0d4629B722b4dFabd195c14F12f2095418d9", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 3322400, "logsQueryRange": 10000, @@ -109,7 +113,9 @@ module.exports = "manager": "0xe567b32C10B0dB72d9490eB1B9A409C5ADed192C", "wrapStrategy": "0xf232f1fd34CE12e24F4391865c2D6E374D2C34d9" }, - "superfluidLoader": "0x109412E3C84f0539b43d39dB691B08c90f58dC7c" + "superfluidLoader": "0x109412E3C84f0539b43d39dB691B08c90f58dC7c", + "batchLiquidator": "0x9539B21cC67844417E80aE168bc28c831E7Ed271", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 6886559, "logsQueryRange": 50000, @@ -156,7 +162,9 @@ module.exports = "gdaV1": "0x93fA9B627eE016990Fe5e654F923aaE8a480a75b", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superfluidLoader": "0xe25603df330027d91A0BAcc3e80a7f9e84930FC6", - "superTokenFactory": "0x87560833d59Be057aFc63cFFa3fc531589Ba428F" + "batchLiquidator": "0x70bbB7a057A13070dF11d533e8f299357D778637", + "superTokenFactory": "0x87560833d59Be057aFc63cFFa3fc531589Ba428F", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 2823800, "logsQueryRange": 50000, @@ -188,7 +196,9 @@ module.exports = "gdaV1": "0x53F4f44C813Dc380182d0b2b67fe5832A12B97f8", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x7447E94Dfe3d804a9f46Bf12838d467c912C8F6C", - "superfluidLoader": "0x777Be25F9fdcA87e8a0E06Ad4be93d65429FCb9f" + "superfluidLoader": "0x777Be25F9fdcA87e8a0E06Ad4be93d65429FCb9f", + "batchLiquidator": "0x95043eC349476B413eF5c369c4d2454a1a65eaB9", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 10604500, "logsQueryRange": 50000, @@ -224,8 +234,7 @@ module.exports = "superTokenFactory": "0x23410e2659380784498509698ed70E414D384880", "superfluidLoader": "0xb688e4Da3100Bcec4b5B3140C8Fb482ad15D2013", "toga": "0xb7DE52F4281a7a276E18C40F94cd93159C4A2d22", - "batchLiquidator": "0x27636F8E129cdd4ccA0F30E2b4C116DDaC773bE5", - "superSpreader": "0x74CDF863b00789c29734F8dFd9F83423Bc55E4cE", + "batchLiquidator": "0x96C3C2d23d143301cF363a02cB7fe3596d2834d7", "flowScheduler": "0x9cC7fc484fF588926149577e9330fA5b2cA74336", "vestingScheduler": "0x0170FFCC75d178d426EBad5b1a31451d00Ddbd0D", "wrapManager": "0x7a2899D179a8F205C8EDAd2e52954cA5f6d48D1A", @@ -233,7 +242,8 @@ module.exports = "manager": "0x8082e58681350876aFe8f52d3Bf8672034A03Db0", "wrapStrategy": "0x51FBAbD31A615E14b1bC12E9d887f60997264a4E" }, - "existentialNFTCloneFactory": "0xCd67c5bC1dfA3FF7d86b5ABc62A65C912Cbd2DA7" + "existentialNFTCloneFactory": "0xCd67c5bC1dfA3FF7d86b5ABc62A65C912Cbd2DA7", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 14820000, "logsQueryRange": 20000, @@ -285,14 +295,15 @@ module.exports = "superTokenFactory": "0x2C90719f25B10Fc5646c82DA3240C76Fa5BcCF34", "superfluidLoader": "0x444A48dA32649Ed03eeC9B9cD416748262c320E6", "toga": "0x6AEAeE5Fd4D05A741723D752D30EE4D72690A8f7", - "batchLiquidator": "0xA6Cdb472e7E22Bf30ae6fB752E4a13eBF3c12165", + "batchLiquidator": "0xA7afDc46999076C295cfC6812dd73d103cF64e19", "flowScheduler": "0x55F7758dd99d5e185f4CC08d4Ad95B71f598264D", "vestingScheduler": "0xcFE6382B33F2AdaFbE46e6A26A88E0182ae32b0c", "autowrap": { "manager": "0x2581c27E7f6D6AF452E63fCe884EDE3EDd716b32", "wrapStrategy": "0xb4afa36BAd8c76976Dc77a21c9Ad711EF720eE4b" }, - "existentialNFTCloneFactory": "0x497aa106Da00BFa8f8BC266EF0793131930Fa630" + "existentialNFTCloneFactory": "0x497aa106Da00BFa8f8BC266EF0793131930Fa630", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 11650500, "logsQueryRange": 10000, @@ -344,7 +355,7 @@ module.exports = "superTokenFactory": "0x8276469A443D5C6B7146BED45e2abCaD3B6adad9", "superfluidLoader": "0xe8B40071df98bBEe23833905AFcF7b28fC7Ca3cb", "toga": "0xA3c8502187fD7a7118eAD59dc811281448946C8f", - "batchLiquidator": "0x36Df169DBf5CE3c6f58D46f0addeF58F01381232", + "batchLiquidator": "0x84956C84c33c38AcE22C9324F1f92028AF2215ce", "flowScheduler": "0x55c8fc400833eEa791087cF343Ff2409A39DeBcC", "vestingScheduler": "0x65377d4dfE9c01639A41952B5083D58964782892", "vestingSchedulerV2": "0xe567b32C10B0dB72d9490eB1B9A409C5ADed192C", @@ -352,7 +363,8 @@ module.exports = "manager": "0x1fA76f2Cd0C3fe6c399A80111408d9C42C0CAC23", "wrapStrategy": "0x0Cf060a501c0040e9CCC708eFE94079F501c6Bb4" }, - "existentialNFTCloneFactory": "0xCb0Ff4D0cA186f0Fc0301258066Fe3fA258417a6" + "existentialNFTCloneFactory": "0xCb0Ff4D0cA186f0Fc0301258066Fe3fA258417a6", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 4300000, "logsQueryRange": 50000, @@ -404,14 +416,15 @@ module.exports = "superTokenFactory": "0x1C21Ead77fd45C84a4c916Db7A6635D0C6FF09D6", "superfluidLoader": "0xe8B40071df98bBEe23833905AFcF7b28fC7Ca3cb", "toga": "0xFC63B7C762B10670Eda15cF3ca3970bCDB28C9eF", - "batchLiquidator": "0x6C66e5c5D201A753ff497F2e9eC5D545631854d0", + "batchLiquidator": "0x9224413b9177E6c1D5721B4a4D1D00eC84B07Ce7", "flowScheduler": "0x3fA8B653F9abf91428800C0ba0F8D145a71F97A1", "vestingScheduler": "0x55c8fc400833eEa791087cF343Ff2409A39DeBcC", "autowrap": { "manager": "0xf01825eAFAe5CD1Dab5593EFAF218efC8968D272", "wrapStrategy": "0x342076aA957B0ec8bC1d3893af719b288eA31e61" }, - "existentialNFTCloneFactory": "0xF353978890204756fc5fa6dfbD16a91eac9E6f4d" + "existentialNFTCloneFactory": "0xF353978890204756fc5fa6dfbD16a91eac9E6f4d", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 7600000, "logsQueryRange": 50000, @@ -463,14 +476,15 @@ module.exports = "superTokenFactory": "0x464AADdBB2B80f3Cb666522EB7381bE610F638b4", "superfluidLoader": "0x42B709822F18595443c308c1BE5E63CbFEf06481", "toga": "0x3D9A67D5ec1E72CEcA8157e028855056786b6159", - "batchLiquidator": "0xdddaD64A9Fe7709A729C4a5428617e369278e0b6", + "batchLiquidator": "0x3b387638a5d33aE8772715642A21345f23Af824c", "flowScheduler": "0xF7AfF590E9DE493D7ACb421Fca7f1E35C1ad4Ce5", "vestingScheduler": "0x3fA8B653F9abf91428800C0ba0F8D145a71F97A1", "autowrap": { "manager": "0x8082e58681350876aFe8f52d3Bf8672034A03Db0", "wrapStrategy": "0x51FBAbD31A615E14b1bC12E9d887f60997264a4E" }, - "existentialNFTCloneFactory": "0x94aE5f52E401A5766b0877d2f030cFb9C3792BD7" + "existentialNFTCloneFactory": "0x94aE5f52E401A5766b0877d2f030cFb9C3792BD7", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 14700000, "logsQueryRange": 50000, @@ -522,14 +536,15 @@ module.exports = "superTokenFactory": "0x8bde47397301F0Cd31b9000032fD517a39c946Eb", "superfluidLoader": "0xF353978890204756fc5fa6dfbD16a91eac9E6f4d", "toga": "0xFCD84210f5d51Cd40a30443d44d6A5500d5D10dF", - "batchLiquidator": "0x5487d078CA8933e83d91d5E7AFBe3A7bfC3412d6", + "batchLiquidator": "0x27636F8E129cdd4ccA0F30E2b4C116DDaC773bE5", "flowScheduler": "0x2f9e2A2A59405682d4F86779275CF5525AD7eC2B", "vestingScheduler": "0x9B91c27f78376383003C6A12Ad12B341d016C5b9", "autowrap": { "manager": "0x2AcdD61ac1EFFe1535109449c31889bdE8d7f325", "wrapStrategy": "0x9e308cb079ae130790F604b1030cDf386670f199" }, - "existentialNFTCloneFactory": "0xe9F27eb8cdAaA0B01a4034e109496C3026b01bd9" + "existentialNFTCloneFactory": "0xe9F27eb8cdAaA0B01a4034e109496C3026b01bd9", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 18800000, "logsQueryRange": 5000, @@ -581,13 +596,14 @@ module.exports = "superTokenFactory": "0x0422689cc4087b6B7280e0a7e7F655200ec86Ae1", "superfluidLoader": "0xcb05535bd212eCFC4B7b9db81d6C2C768b726776", "toga": "0x8B5a2CF69a56d7F8Fa027edcA23594cdDF544dDc", - "batchLiquidator": "0x4eC223bef5D8cB609FC8Ee2e0ad43244C8e46A02", + "batchLiquidator": "0x42B709822F18595443c308c1BE5E63CbFEf06481", "flowScheduler": "0xAA0cD305eD020137E302CeCede7b18c0A05aCCDA", "vestingScheduler": "0x39D5cBBa9adEBc25085a3918d36D5325546C001B", "autowrap": { "manager": "0x30aE282CF477E2eF28B14d0125aCEAd57Fe1d7a1", "wrapStrategy": "0x1D65c6d3AD39d454Ea8F682c49aE7744706eA96d" - } + }, + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 15870000, "logsQueryRange": 10000, @@ -639,8 +655,9 @@ module.exports = "superTokenFactory": "0x36be86dEe6BC726Ed0Cbd170ccD2F21760BC73D9", "superfluidLoader": "0xF0d7d1D47109bA426B9D8A3Cde1941327af1eea3", "toga": "0x9bCa3a623e7b2e248510d88B2894F54898d88F91", - "batchLiquidator": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", - "existentialNFTCloneFactory": "0x051e766e2d8dc65ae2bFCF084A50AD0447634227" + "batchLiquidator": "0xCb0Ff4D0cA186f0Fc0301258066Fe3fA258417a6", + "existentialNFTCloneFactory": "0x051e766e2d8dc65ae2bFCF084A50AD0447634227", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 16393000, "logsQueryRange": 20000, @@ -677,14 +694,15 @@ module.exports = "superTokenFactory": "0xe20B9a38E0c96F61d1bA6b42a61512D56Fea1Eb3", "superfluidLoader": "0x9F9EEd9Bbc38E9e0514fD9dFcc0Bca9869A9c534", "toga": "0xA87F76e99f6C8Ff8996d14f550ceF47f193D9A09", - "batchLiquidator": "0x889ebeCaD5F8C34Fd96023456d0fC5cE54eb74Cb", + "batchLiquidator": "0x6b008BAc0e5846cB5d9Ca02ca0e801fCbF88B6f9", "flowScheduler": "0xC72CEd15204d02183c83fEbb918b183E400811Ee", "vestingScheduler": "0xDF92D0E6Bcb9385FDe99aD21Ff5e47Fb47E3c6b2", "autowrap": { "manager": "0x5D0acD0864Ad07ba4E1E0474AE69Da87482e14A9", "wrapStrategy": "0xB29005319B0caB24cF6D4d24e8420E54BB29Cb0d" }, - "existentialNFTCloneFactory": "0x642332562BC60a4Bd9681E7bb1588f7456A497aC" + "existentialNFTCloneFactory": "0x642332562BC60a4Bd9681E7bb1588f7456A497aC", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 1000000, "logsQueryRange": 20000, @@ -732,8 +750,9 @@ module.exports = "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superfluidLoader": "0x7613030429E95cDFC76FE70f9573037068B51815", "toga": "0x1bF9D75d50fD828a93f69ECB06f2B85767792CEB", - "batchLiquidator": "0x3024A39099D4FAE7c9eA8329FAfe05576AEd2c00", - "superTokenFactory": "0xacFBED2bC9344C158DD3dC229b84Bd7220e7c673" + "batchLiquidator": "0x2eaa49BeB4Aa4fcC709DC14c0FA0fF1B292077b5", + "superTokenFactory": "0xacFBED2bC9344C158DD3dC229b84Bd7220e7c673", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 2575000, "logsQueryRange": 50000, @@ -768,7 +787,8 @@ module.exports = "superfluidLoader": "0x5fb676d66eAb8E0c22Ae24C5c10eD7E4A6397c1C", "toga": "0x38ed5512Ac11926bB697F4CF4eE0DD04358E2E7e", "batchLiquidator": "0x7BCE8e8401dc98E3Da26F1D701c3C2168b8e466c", - "superTokenFactory": "0x184D999ea60e9b16fE4cCC1f756422114E9B663f" + "superTokenFactory": "0x184D999ea60e9b16fE4cCC1f756422114E9B663f", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 6500000, "logsQueryRange": 50000, diff --git a/packages/metadata/module/networks/list.d.ts b/packages/metadata/module/networks/list.d.ts index d3427c81e7..e7bd38c80c 100644 --- a/packages/metadata/module/networks/list.d.ts +++ b/packages/metadata/module/networks/list.d.ts @@ -21,6 +21,7 @@ interface ContractAddresses { readonly superSpreader?: string; readonly autowrap?: AutowrapAddresses; readonly existentialNFTCloneFactory: string; + readonly macroForwarder?: string; } interface SubgraphData { readonly name: string; diff --git a/packages/metadata/module/networks/list.js b/packages/metadata/module/networks/list.js index 5fdc19074e..90f9f98640 100644 --- a/packages/metadata/module/networks/list.js +++ b/packages/metadata/module/networks/list.js @@ -22,11 +22,13 @@ export default "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x1C92042426B6bAAe497bEf461B6d8342D03aEc92", "superfluidLoader": "0x36446Ec9C7909608065dEB7f491701d815B880e5", + "batchLiquidator": "0x85AfCf531aF1a853AC65F6bfa4de99C742B8e432", "autowrap": { "manager": "0x30aE282CF477E2eF28B14d0125aCEAd57Fe1d7a1", "wrapStrategy": "0x1D65c6d3AD39d454Ea8F682c49aE7744706eA96d" }, - "existentialNFTCloneFactory": "0xF76529ddEE7AA7890323eCa40C212758DD93B888" + "existentialNFTCloneFactory": "0xF76529ddEE7AA7890323eCa40C212758DD93B888", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 3220000, "logsQueryRange": 50000, @@ -67,7 +69,9 @@ export default "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x254C2e152E8602839D288A7bccdf3d0974597193", "superfluidLoader": "0x862F59081FC7907F940bE4227b9f485d700E6cdD", - "existentialNFTCloneFactory": "0x0D1F0d4629B722b4dFabd195c14F12f2095418d9" + "batchLiquidator": "0x79aE8BF8EE9238d8E848F7dbBF74Ddb3365f6c11", + "existentialNFTCloneFactory": "0x0D1F0d4629B722b4dFabd195c14F12f2095418d9", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 3322400, "logsQueryRange": 10000, @@ -109,7 +113,9 @@ export default "manager": "0xe567b32C10B0dB72d9490eB1B9A409C5ADed192C", "wrapStrategy": "0xf232f1fd34CE12e24F4391865c2D6E374D2C34d9" }, - "superfluidLoader": "0x109412E3C84f0539b43d39dB691B08c90f58dC7c" + "superfluidLoader": "0x109412E3C84f0539b43d39dB691B08c90f58dC7c", + "batchLiquidator": "0x9539B21cC67844417E80aE168bc28c831E7Ed271", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 6886559, "logsQueryRange": 50000, @@ -156,7 +162,9 @@ export default "gdaV1": "0x93fA9B627eE016990Fe5e654F923aaE8a480a75b", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superfluidLoader": "0xe25603df330027d91A0BAcc3e80a7f9e84930FC6", - "superTokenFactory": "0x87560833d59Be057aFc63cFFa3fc531589Ba428F" + "batchLiquidator": "0x70bbB7a057A13070dF11d533e8f299357D778637", + "superTokenFactory": "0x87560833d59Be057aFc63cFFa3fc531589Ba428F", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 2823800, "logsQueryRange": 50000, @@ -188,7 +196,9 @@ export default "gdaV1": "0x53F4f44C813Dc380182d0b2b67fe5832A12B97f8", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x7447E94Dfe3d804a9f46Bf12838d467c912C8F6C", - "superfluidLoader": "0x777Be25F9fdcA87e8a0E06Ad4be93d65429FCb9f" + "superfluidLoader": "0x777Be25F9fdcA87e8a0E06Ad4be93d65429FCb9f", + "batchLiquidator": "0x95043eC349476B413eF5c369c4d2454a1a65eaB9", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 10604500, "logsQueryRange": 50000, @@ -224,8 +234,7 @@ export default "superTokenFactory": "0x23410e2659380784498509698ed70E414D384880", "superfluidLoader": "0xb688e4Da3100Bcec4b5B3140C8Fb482ad15D2013", "toga": "0xb7DE52F4281a7a276E18C40F94cd93159C4A2d22", - "batchLiquidator": "0x27636F8E129cdd4ccA0F30E2b4C116DDaC773bE5", - "superSpreader": "0x74CDF863b00789c29734F8dFd9F83423Bc55E4cE", + "batchLiquidator": "0x96C3C2d23d143301cF363a02cB7fe3596d2834d7", "flowScheduler": "0x9cC7fc484fF588926149577e9330fA5b2cA74336", "vestingScheduler": "0x0170FFCC75d178d426EBad5b1a31451d00Ddbd0D", "wrapManager": "0x7a2899D179a8F205C8EDAd2e52954cA5f6d48D1A", @@ -233,7 +242,8 @@ export default "manager": "0x8082e58681350876aFe8f52d3Bf8672034A03Db0", "wrapStrategy": "0x51FBAbD31A615E14b1bC12E9d887f60997264a4E" }, - "existentialNFTCloneFactory": "0xCd67c5bC1dfA3FF7d86b5ABc62A65C912Cbd2DA7" + "existentialNFTCloneFactory": "0xCd67c5bC1dfA3FF7d86b5ABc62A65C912Cbd2DA7", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 14820000, "logsQueryRange": 20000, @@ -285,14 +295,15 @@ export default "superTokenFactory": "0x2C90719f25B10Fc5646c82DA3240C76Fa5BcCF34", "superfluidLoader": "0x444A48dA32649Ed03eeC9B9cD416748262c320E6", "toga": "0x6AEAeE5Fd4D05A741723D752D30EE4D72690A8f7", - "batchLiquidator": "0xA6Cdb472e7E22Bf30ae6fB752E4a13eBF3c12165", + "batchLiquidator": "0xA7afDc46999076C295cfC6812dd73d103cF64e19", "flowScheduler": "0x55F7758dd99d5e185f4CC08d4Ad95B71f598264D", "vestingScheduler": "0xcFE6382B33F2AdaFbE46e6A26A88E0182ae32b0c", "autowrap": { "manager": "0x2581c27E7f6D6AF452E63fCe884EDE3EDd716b32", "wrapStrategy": "0xb4afa36BAd8c76976Dc77a21c9Ad711EF720eE4b" }, - "existentialNFTCloneFactory": "0x497aa106Da00BFa8f8BC266EF0793131930Fa630" + "existentialNFTCloneFactory": "0x497aa106Da00BFa8f8BC266EF0793131930Fa630", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 11650500, "logsQueryRange": 10000, @@ -344,7 +355,7 @@ export default "superTokenFactory": "0x8276469A443D5C6B7146BED45e2abCaD3B6adad9", "superfluidLoader": "0xe8B40071df98bBEe23833905AFcF7b28fC7Ca3cb", "toga": "0xA3c8502187fD7a7118eAD59dc811281448946C8f", - "batchLiquidator": "0x36Df169DBf5CE3c6f58D46f0addeF58F01381232", + "batchLiquidator": "0x84956C84c33c38AcE22C9324F1f92028AF2215ce", "flowScheduler": "0x55c8fc400833eEa791087cF343Ff2409A39DeBcC", "vestingScheduler": "0x65377d4dfE9c01639A41952B5083D58964782892", "vestingSchedulerV2": "0xe567b32C10B0dB72d9490eB1B9A409C5ADed192C", @@ -352,7 +363,8 @@ export default "manager": "0x1fA76f2Cd0C3fe6c399A80111408d9C42C0CAC23", "wrapStrategy": "0x0Cf060a501c0040e9CCC708eFE94079F501c6Bb4" }, - "existentialNFTCloneFactory": "0xCb0Ff4D0cA186f0Fc0301258066Fe3fA258417a6" + "existentialNFTCloneFactory": "0xCb0Ff4D0cA186f0Fc0301258066Fe3fA258417a6", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 4300000, "logsQueryRange": 50000, @@ -404,14 +416,15 @@ export default "superTokenFactory": "0x1C21Ead77fd45C84a4c916Db7A6635D0C6FF09D6", "superfluidLoader": "0xe8B40071df98bBEe23833905AFcF7b28fC7Ca3cb", "toga": "0xFC63B7C762B10670Eda15cF3ca3970bCDB28C9eF", - "batchLiquidator": "0x6C66e5c5D201A753ff497F2e9eC5D545631854d0", + "batchLiquidator": "0x9224413b9177E6c1D5721B4a4D1D00eC84B07Ce7", "flowScheduler": "0x3fA8B653F9abf91428800C0ba0F8D145a71F97A1", "vestingScheduler": "0x55c8fc400833eEa791087cF343Ff2409A39DeBcC", "autowrap": { "manager": "0xf01825eAFAe5CD1Dab5593EFAF218efC8968D272", "wrapStrategy": "0x342076aA957B0ec8bC1d3893af719b288eA31e61" }, - "existentialNFTCloneFactory": "0xF353978890204756fc5fa6dfbD16a91eac9E6f4d" + "existentialNFTCloneFactory": "0xF353978890204756fc5fa6dfbD16a91eac9E6f4d", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 7600000, "logsQueryRange": 50000, @@ -463,14 +476,15 @@ export default "superTokenFactory": "0x464AADdBB2B80f3Cb666522EB7381bE610F638b4", "superfluidLoader": "0x42B709822F18595443c308c1BE5E63CbFEf06481", "toga": "0x3D9A67D5ec1E72CEcA8157e028855056786b6159", - "batchLiquidator": "0xdddaD64A9Fe7709A729C4a5428617e369278e0b6", + "batchLiquidator": "0x3b387638a5d33aE8772715642A21345f23Af824c", "flowScheduler": "0xF7AfF590E9DE493D7ACb421Fca7f1E35C1ad4Ce5", "vestingScheduler": "0x3fA8B653F9abf91428800C0ba0F8D145a71F97A1", "autowrap": { "manager": "0x8082e58681350876aFe8f52d3Bf8672034A03Db0", "wrapStrategy": "0x51FBAbD31A615E14b1bC12E9d887f60997264a4E" }, - "existentialNFTCloneFactory": "0x94aE5f52E401A5766b0877d2f030cFb9C3792BD7" + "existentialNFTCloneFactory": "0x94aE5f52E401A5766b0877d2f030cFb9C3792BD7", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 14700000, "logsQueryRange": 50000, @@ -522,14 +536,15 @@ export default "superTokenFactory": "0x8bde47397301F0Cd31b9000032fD517a39c946Eb", "superfluidLoader": "0xF353978890204756fc5fa6dfbD16a91eac9E6f4d", "toga": "0xFCD84210f5d51Cd40a30443d44d6A5500d5D10dF", - "batchLiquidator": "0x5487d078CA8933e83d91d5E7AFBe3A7bfC3412d6", + "batchLiquidator": "0x27636F8E129cdd4ccA0F30E2b4C116DDaC773bE5", "flowScheduler": "0x2f9e2A2A59405682d4F86779275CF5525AD7eC2B", "vestingScheduler": "0x9B91c27f78376383003C6A12Ad12B341d016C5b9", "autowrap": { "manager": "0x2AcdD61ac1EFFe1535109449c31889bdE8d7f325", "wrapStrategy": "0x9e308cb079ae130790F604b1030cDf386670f199" }, - "existentialNFTCloneFactory": "0xe9F27eb8cdAaA0B01a4034e109496C3026b01bd9" + "existentialNFTCloneFactory": "0xe9F27eb8cdAaA0B01a4034e109496C3026b01bd9", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 18800000, "logsQueryRange": 5000, @@ -581,13 +596,14 @@ export default "superTokenFactory": "0x0422689cc4087b6B7280e0a7e7F655200ec86Ae1", "superfluidLoader": "0xcb05535bd212eCFC4B7b9db81d6C2C768b726776", "toga": "0x8B5a2CF69a56d7F8Fa027edcA23594cdDF544dDc", - "batchLiquidator": "0x4eC223bef5D8cB609FC8Ee2e0ad43244C8e46A02", + "batchLiquidator": "0x42B709822F18595443c308c1BE5E63CbFEf06481", "flowScheduler": "0xAA0cD305eD020137E302CeCede7b18c0A05aCCDA", "vestingScheduler": "0x39D5cBBa9adEBc25085a3918d36D5325546C001B", "autowrap": { "manager": "0x30aE282CF477E2eF28B14d0125aCEAd57Fe1d7a1", "wrapStrategy": "0x1D65c6d3AD39d454Ea8F682c49aE7744706eA96d" - } + }, + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 15870000, "logsQueryRange": 10000, @@ -639,8 +655,9 @@ export default "superTokenFactory": "0x36be86dEe6BC726Ed0Cbd170ccD2F21760BC73D9", "superfluidLoader": "0xF0d7d1D47109bA426B9D8A3Cde1941327af1eea3", "toga": "0x9bCa3a623e7b2e248510d88B2894F54898d88F91", - "batchLiquidator": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", - "existentialNFTCloneFactory": "0x051e766e2d8dc65ae2bFCF084A50AD0447634227" + "batchLiquidator": "0xCb0Ff4D0cA186f0Fc0301258066Fe3fA258417a6", + "existentialNFTCloneFactory": "0x051e766e2d8dc65ae2bFCF084A50AD0447634227", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 16393000, "logsQueryRange": 20000, @@ -677,14 +694,15 @@ export default "superTokenFactory": "0xe20B9a38E0c96F61d1bA6b42a61512D56Fea1Eb3", "superfluidLoader": "0x9F9EEd9Bbc38E9e0514fD9dFcc0Bca9869A9c534", "toga": "0xA87F76e99f6C8Ff8996d14f550ceF47f193D9A09", - "batchLiquidator": "0x889ebeCaD5F8C34Fd96023456d0fC5cE54eb74Cb", + "batchLiquidator": "0x6b008BAc0e5846cB5d9Ca02ca0e801fCbF88B6f9", "flowScheduler": "0xC72CEd15204d02183c83fEbb918b183E400811Ee", "vestingScheduler": "0xDF92D0E6Bcb9385FDe99aD21Ff5e47Fb47E3c6b2", "autowrap": { "manager": "0x5D0acD0864Ad07ba4E1E0474AE69Da87482e14A9", "wrapStrategy": "0xB29005319B0caB24cF6D4d24e8420E54BB29Cb0d" }, - "existentialNFTCloneFactory": "0x642332562BC60a4Bd9681E7bb1588f7456A497aC" + "existentialNFTCloneFactory": "0x642332562BC60a4Bd9681E7bb1588f7456A497aC", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 1000000, "logsQueryRange": 20000, @@ -732,8 +750,9 @@ export default "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superfluidLoader": "0x7613030429E95cDFC76FE70f9573037068B51815", "toga": "0x1bF9D75d50fD828a93f69ECB06f2B85767792CEB", - "batchLiquidator": "0x3024A39099D4FAE7c9eA8329FAfe05576AEd2c00", - "superTokenFactory": "0xacFBED2bC9344C158DD3dC229b84Bd7220e7c673" + "batchLiquidator": "0x2eaa49BeB4Aa4fcC709DC14c0FA0fF1B292077b5", + "superTokenFactory": "0xacFBED2bC9344C158DD3dC229b84Bd7220e7c673", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 2575000, "logsQueryRange": 50000, @@ -768,7 +787,8 @@ export default "superfluidLoader": "0x5fb676d66eAb8E0c22Ae24C5c10eD7E4A6397c1C", "toga": "0x38ed5512Ac11926bB697F4CF4eE0DD04358E2E7e", "batchLiquidator": "0x7BCE8e8401dc98E3Da26F1D701c3C2168b8e466c", - "superTokenFactory": "0x184D999ea60e9b16fE4cCC1f756422114E9B663f" + "superTokenFactory": "0x184D999ea60e9b16fE4cCC1f756422114E9B663f", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 6500000, "logsQueryRange": 50000, diff --git a/packages/metadata/networks.json b/packages/metadata/networks.json index 963901aea4..656e8216ad 100644 --- a/packages/metadata/networks.json +++ b/packages/metadata/networks.json @@ -20,11 +20,13 @@ "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x1C92042426B6bAAe497bEf461B6d8342D03aEc92", "superfluidLoader": "0x36446Ec9C7909608065dEB7f491701d815B880e5", + "batchLiquidator": "0x85AfCf531aF1a853AC65F6bfa4de99C742B8e432", "autowrap": { "manager": "0x30aE282CF477E2eF28B14d0125aCEAd57Fe1d7a1", "wrapStrategy": "0x1D65c6d3AD39d454Ea8F682c49aE7744706eA96d" }, - "existentialNFTCloneFactory": "0xF76529ddEE7AA7890323eCa40C212758DD93B888" + "existentialNFTCloneFactory": "0xF76529ddEE7AA7890323eCa40C212758DD93B888", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 3220000, "logsQueryRange": 50000, @@ -65,7 +67,9 @@ "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x254C2e152E8602839D288A7bccdf3d0974597193", "superfluidLoader": "0x862F59081FC7907F940bE4227b9f485d700E6cdD", - "existentialNFTCloneFactory": "0x0D1F0d4629B722b4dFabd195c14F12f2095418d9" + "batchLiquidator": "0x79aE8BF8EE9238d8E848F7dbBF74Ddb3365f6c11", + "existentialNFTCloneFactory": "0x0D1F0d4629B722b4dFabd195c14F12f2095418d9", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 3322400, "logsQueryRange": 10000, @@ -107,7 +111,9 @@ "manager": "0xe567b32C10B0dB72d9490eB1B9A409C5ADed192C", "wrapStrategy": "0xf232f1fd34CE12e24F4391865c2D6E374D2C34d9" }, - "superfluidLoader": "0x109412E3C84f0539b43d39dB691B08c90f58dC7c" + "superfluidLoader": "0x109412E3C84f0539b43d39dB691B08c90f58dC7c", + "batchLiquidator": "0x9539B21cC67844417E80aE168bc28c831E7Ed271", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 6886559, "logsQueryRange": 50000, @@ -154,7 +160,9 @@ "gdaV1": "0x93fA9B627eE016990Fe5e654F923aaE8a480a75b", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superfluidLoader": "0xe25603df330027d91A0BAcc3e80a7f9e84930FC6", - "superTokenFactory": "0x87560833d59Be057aFc63cFFa3fc531589Ba428F" + "batchLiquidator": "0x70bbB7a057A13070dF11d533e8f299357D778637", + "superTokenFactory": "0x87560833d59Be057aFc63cFFa3fc531589Ba428F", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 2823800, "logsQueryRange": 50000, @@ -186,7 +194,9 @@ "gdaV1": "0x53F4f44C813Dc380182d0b2b67fe5832A12B97f8", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x7447E94Dfe3d804a9f46Bf12838d467c912C8F6C", - "superfluidLoader": "0x777Be25F9fdcA87e8a0E06Ad4be93d65429FCb9f" + "superfluidLoader": "0x777Be25F9fdcA87e8a0E06Ad4be93d65429FCb9f", + "batchLiquidator": "0x95043eC349476B413eF5c369c4d2454a1a65eaB9", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 10604500, "logsQueryRange": 50000, @@ -222,8 +232,7 @@ "superTokenFactory": "0x23410e2659380784498509698ed70E414D384880", "superfluidLoader": "0xb688e4Da3100Bcec4b5B3140C8Fb482ad15D2013", "toga": "0xb7DE52F4281a7a276E18C40F94cd93159C4A2d22", - "batchLiquidator": "0x27636F8E129cdd4ccA0F30E2b4C116DDaC773bE5", - "superSpreader": "0x74CDF863b00789c29734F8dFd9F83423Bc55E4cE", + "batchLiquidator": "0x96C3C2d23d143301cF363a02cB7fe3596d2834d7", "flowScheduler": "0x9cC7fc484fF588926149577e9330fA5b2cA74336", "vestingScheduler": "0x0170FFCC75d178d426EBad5b1a31451d00Ddbd0D", "wrapManager": "0x7a2899D179a8F205C8EDAd2e52954cA5f6d48D1A", @@ -231,7 +240,8 @@ "manager": "0x8082e58681350876aFe8f52d3Bf8672034A03Db0", "wrapStrategy": "0x51FBAbD31A615E14b1bC12E9d887f60997264a4E" }, - "existentialNFTCloneFactory": "0xCd67c5bC1dfA3FF7d86b5ABc62A65C912Cbd2DA7" + "existentialNFTCloneFactory": "0xCd67c5bC1dfA3FF7d86b5ABc62A65C912Cbd2DA7", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 14820000, "logsQueryRange": 20000, @@ -283,14 +293,15 @@ "superTokenFactory": "0x2C90719f25B10Fc5646c82DA3240C76Fa5BcCF34", "superfluidLoader": "0x444A48dA32649Ed03eeC9B9cD416748262c320E6", "toga": "0x6AEAeE5Fd4D05A741723D752D30EE4D72690A8f7", - "batchLiquidator": "0xA6Cdb472e7E22Bf30ae6fB752E4a13eBF3c12165", + "batchLiquidator": "0xA7afDc46999076C295cfC6812dd73d103cF64e19", "flowScheduler": "0x55F7758dd99d5e185f4CC08d4Ad95B71f598264D", "vestingScheduler": "0xcFE6382B33F2AdaFbE46e6A26A88E0182ae32b0c", "autowrap": { "manager": "0x2581c27E7f6D6AF452E63fCe884EDE3EDd716b32", "wrapStrategy": "0xb4afa36BAd8c76976Dc77a21c9Ad711EF720eE4b" }, - "existentialNFTCloneFactory": "0x497aa106Da00BFa8f8BC266EF0793131930Fa630" + "existentialNFTCloneFactory": "0x497aa106Da00BFa8f8BC266EF0793131930Fa630", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 11650500, "logsQueryRange": 10000, @@ -342,7 +353,7 @@ "superTokenFactory": "0x8276469A443D5C6B7146BED45e2abCaD3B6adad9", "superfluidLoader": "0xe8B40071df98bBEe23833905AFcF7b28fC7Ca3cb", "toga": "0xA3c8502187fD7a7118eAD59dc811281448946C8f", - "batchLiquidator": "0x36Df169DBf5CE3c6f58D46f0addeF58F01381232", + "batchLiquidator": "0x84956C84c33c38AcE22C9324F1f92028AF2215ce", "flowScheduler": "0x55c8fc400833eEa791087cF343Ff2409A39DeBcC", "vestingScheduler": "0x65377d4dfE9c01639A41952B5083D58964782892", "vestingSchedulerV2": "0xe567b32C10B0dB72d9490eB1B9A409C5ADed192C", @@ -350,7 +361,8 @@ "manager": "0x1fA76f2Cd0C3fe6c399A80111408d9C42C0CAC23", "wrapStrategy": "0x0Cf060a501c0040e9CCC708eFE94079F501c6Bb4" }, - "existentialNFTCloneFactory": "0xCb0Ff4D0cA186f0Fc0301258066Fe3fA258417a6" + "existentialNFTCloneFactory": "0xCb0Ff4D0cA186f0Fc0301258066Fe3fA258417a6", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 4300000, "logsQueryRange": 50000, @@ -402,14 +414,15 @@ "superTokenFactory": "0x1C21Ead77fd45C84a4c916Db7A6635D0C6FF09D6", "superfluidLoader": "0xe8B40071df98bBEe23833905AFcF7b28fC7Ca3cb", "toga": "0xFC63B7C762B10670Eda15cF3ca3970bCDB28C9eF", - "batchLiquidator": "0x6C66e5c5D201A753ff497F2e9eC5D545631854d0", + "batchLiquidator": "0x9224413b9177E6c1D5721B4a4D1D00eC84B07Ce7", "flowScheduler": "0x3fA8B653F9abf91428800C0ba0F8D145a71F97A1", "vestingScheduler": "0x55c8fc400833eEa791087cF343Ff2409A39DeBcC", "autowrap": { "manager": "0xf01825eAFAe5CD1Dab5593EFAF218efC8968D272", "wrapStrategy": "0x342076aA957B0ec8bC1d3893af719b288eA31e61" }, - "existentialNFTCloneFactory": "0xF353978890204756fc5fa6dfbD16a91eac9E6f4d" + "existentialNFTCloneFactory": "0xF353978890204756fc5fa6dfbD16a91eac9E6f4d", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 7600000, "logsQueryRange": 50000, @@ -461,14 +474,15 @@ "superTokenFactory": "0x464AADdBB2B80f3Cb666522EB7381bE610F638b4", "superfluidLoader": "0x42B709822F18595443c308c1BE5E63CbFEf06481", "toga": "0x3D9A67D5ec1E72CEcA8157e028855056786b6159", - "batchLiquidator": "0xdddaD64A9Fe7709A729C4a5428617e369278e0b6", + "batchLiquidator": "0x3b387638a5d33aE8772715642A21345f23Af824c", "flowScheduler": "0xF7AfF590E9DE493D7ACb421Fca7f1E35C1ad4Ce5", "vestingScheduler": "0x3fA8B653F9abf91428800C0ba0F8D145a71F97A1", "autowrap": { "manager": "0x8082e58681350876aFe8f52d3Bf8672034A03Db0", "wrapStrategy": "0x51FBAbD31A615E14b1bC12E9d887f60997264a4E" }, - "existentialNFTCloneFactory": "0x94aE5f52E401A5766b0877d2f030cFb9C3792BD7" + "existentialNFTCloneFactory": "0x94aE5f52E401A5766b0877d2f030cFb9C3792BD7", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 14700000, "logsQueryRange": 50000, @@ -520,14 +534,15 @@ "superTokenFactory": "0x8bde47397301F0Cd31b9000032fD517a39c946Eb", "superfluidLoader": "0xF353978890204756fc5fa6dfbD16a91eac9E6f4d", "toga": "0xFCD84210f5d51Cd40a30443d44d6A5500d5D10dF", - "batchLiquidator": "0x5487d078CA8933e83d91d5E7AFBe3A7bfC3412d6", + "batchLiquidator": "0x27636F8E129cdd4ccA0F30E2b4C116DDaC773bE5", "flowScheduler": "0x2f9e2A2A59405682d4F86779275CF5525AD7eC2B", "vestingScheduler": "0x9B91c27f78376383003C6A12Ad12B341d016C5b9", "autowrap": { "manager": "0x2AcdD61ac1EFFe1535109449c31889bdE8d7f325", "wrapStrategy": "0x9e308cb079ae130790F604b1030cDf386670f199" }, - "existentialNFTCloneFactory": "0xe9F27eb8cdAaA0B01a4034e109496C3026b01bd9" + "existentialNFTCloneFactory": "0xe9F27eb8cdAaA0B01a4034e109496C3026b01bd9", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 18800000, "logsQueryRange": 5000, @@ -579,13 +594,14 @@ "superTokenFactory": "0x0422689cc4087b6B7280e0a7e7F655200ec86Ae1", "superfluidLoader": "0xcb05535bd212eCFC4B7b9db81d6C2C768b726776", "toga": "0x8B5a2CF69a56d7F8Fa027edcA23594cdDF544dDc", - "batchLiquidator": "0x4eC223bef5D8cB609FC8Ee2e0ad43244C8e46A02", + "batchLiquidator": "0x42B709822F18595443c308c1BE5E63CbFEf06481", "flowScheduler": "0xAA0cD305eD020137E302CeCede7b18c0A05aCCDA", "vestingScheduler": "0x39D5cBBa9adEBc25085a3918d36D5325546C001B", "autowrap": { "manager": "0x30aE282CF477E2eF28B14d0125aCEAd57Fe1d7a1", "wrapStrategy": "0x1D65c6d3AD39d454Ea8F682c49aE7744706eA96d" - } + }, + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 15870000, "logsQueryRange": 10000, @@ -637,8 +653,9 @@ "superTokenFactory": "0x36be86dEe6BC726Ed0Cbd170ccD2F21760BC73D9", "superfluidLoader": "0xF0d7d1D47109bA426B9D8A3Cde1941327af1eea3", "toga": "0x9bCa3a623e7b2e248510d88B2894F54898d88F91", - "batchLiquidator": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", - "existentialNFTCloneFactory": "0x051e766e2d8dc65ae2bFCF084A50AD0447634227" + "batchLiquidator": "0xCb0Ff4D0cA186f0Fc0301258066Fe3fA258417a6", + "existentialNFTCloneFactory": "0x051e766e2d8dc65ae2bFCF084A50AD0447634227", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 16393000, "logsQueryRange": 20000, @@ -675,14 +692,15 @@ "superTokenFactory": "0xe20B9a38E0c96F61d1bA6b42a61512D56Fea1Eb3", "superfluidLoader": "0x9F9EEd9Bbc38E9e0514fD9dFcc0Bca9869A9c534", "toga": "0xA87F76e99f6C8Ff8996d14f550ceF47f193D9A09", - "batchLiquidator": "0x889ebeCaD5F8C34Fd96023456d0fC5cE54eb74Cb", + "batchLiquidator": "0x6b008BAc0e5846cB5d9Ca02ca0e801fCbF88B6f9", "flowScheduler": "0xC72CEd15204d02183c83fEbb918b183E400811Ee", "vestingScheduler": "0xDF92D0E6Bcb9385FDe99aD21Ff5e47Fb47E3c6b2", "autowrap": { "manager": "0x5D0acD0864Ad07ba4E1E0474AE69Da87482e14A9", "wrapStrategy": "0xB29005319B0caB24cF6D4d24e8420E54BB29Cb0d" }, - "existentialNFTCloneFactory": "0x642332562BC60a4Bd9681E7bb1588f7456A497aC" + "existentialNFTCloneFactory": "0x642332562BC60a4Bd9681E7bb1588f7456A497aC", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 1000000, "logsQueryRange": 20000, @@ -730,8 +748,9 @@ "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superfluidLoader": "0x7613030429E95cDFC76FE70f9573037068B51815", "toga": "0x1bF9D75d50fD828a93f69ECB06f2B85767792CEB", - "batchLiquidator": "0x3024A39099D4FAE7c9eA8329FAfe05576AEd2c00", - "superTokenFactory": "0xacFBED2bC9344C158DD3dC229b84Bd7220e7c673" + "batchLiquidator": "0x2eaa49BeB4Aa4fcC709DC14c0FA0fF1B292077b5", + "superTokenFactory": "0xacFBED2bC9344C158DD3dC229b84Bd7220e7c673", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 2575000, "logsQueryRange": 50000, @@ -766,7 +785,8 @@ "superfluidLoader": "0x5fb676d66eAb8E0c22Ae24C5c10eD7E4A6397c1C", "toga": "0x38ed5512Ac11926bB697F4CF4eE0DD04358E2E7e", "batchLiquidator": "0x7BCE8e8401dc98E3Da26F1D701c3C2168b8e466c", - "superTokenFactory": "0x184D999ea60e9b16fE4cCC1f756422114E9B663f" + "superTokenFactory": "0x184D999ea60e9b16fE4cCC1f756422114E9B663f", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 6500000, "logsQueryRange": 50000, diff --git a/packages/metadata/package.json b/packages/metadata/package.json index c2272040e3..4333ce8a3b 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -1,7 +1,7 @@ { "name": "@superfluid-finance/metadata", "description": "Superfluid Metadata", - "version": "1.4.1", + "version": "1.5.0", "author": "Superfluid", "bugs": "https://github.com/superfluid-finance/protocol-monorepo/issues", "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/metadata#readme", diff --git a/packages/sdk-core/package.json b/packages/sdk-core/package.json index 012baa9e6c..981a24703b 100644 --- a/packages/sdk-core/package.json +++ b/packages/sdk-core/package.json @@ -5,7 +5,7 @@ "bugs": "https://github.com/superfluid-finance/protocol-monorepo/issues", "dependencies": { "@superfluid-finance/ethereum-contracts": "1.11.0", - "@superfluid-finance/metadata": "^1.4.1", + "@superfluid-finance/metadata": "^1.5.0", "browserify": "17.0.0", "graphql-request": "6.1.0", "lodash": "4.17.21", diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 55ff394c9f..b61a4dd2f6 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -9,7 +9,7 @@ "mustache": "4.2.0" }, "devDependencies": { - "@superfluid-finance/metadata": "^1.4.1", + "@superfluid-finance/metadata": "^1.5.0", "coingecko-api": "^1.0.10", "graphql": "^16.9.0", "graphql-request": "^6.1.0", From 6e195314f72802a4404e758df3224373eca7e5b2 Mon Sep 17 00:00:00 2001 From: Miao ZhiCheng Date: Fri, 6 Sep 2024 19:05:21 +0300 Subject: [PATCH 41/42] GDA Pool Permission (#2010) --- packages/ethereum-contracts/CHANGELOG.md | 4 ++++ .../gdav1/GeneralDistributionAgreementV1.sol | 8 ++++++-- .../gdav1/GeneralDistributionAgreement.t.sol | 19 +++++++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/packages/ethereum-contracts/CHANGELOG.md b/packages/ethereum-contracts/CHANGELOG.md index 82dac18b5f..eaf48fb06a 100644 --- a/packages/ethereum-contracts/CHANGELOG.md +++ b/packages/ethereum-contracts/CHANGELOG.md @@ -9,6 +9,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm * `IUserDefinedMacro`: added a method `postCheck()` which allows to verify state changes after running the macro. +### Fixed + +* GDA Pools are not multi-tokens ready, added a permission check (#2010). + ## [v1.11.0] ### Breaking diff --git a/packages/ethereum-contracts/contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol b/packages/ethereum-contracts/contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol index 846967aec7..0583c2b7ed 100644 --- a/packages/ethereum-contracts/contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol +++ b/packages/ethereum-contracts/contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol @@ -421,7 +421,9 @@ contract GeneralDistributionAgreementV1 is AgreementBase, TokenMonad, IGeneralDi newCtx = ctx; - if (_isPool(token, address(pool)) == false) { + if (_isPool(token, address(pool)) == false || + // Note: we do not support multi-tokens pools + pool.superToken() != token) { revert GDA_ONLY_SUPER_TOKEN_POOL(); } @@ -485,7 +487,9 @@ contract GeneralDistributionAgreementV1 is AgreementBase, TokenMonad, IGeneralDi int96 requestedFlowRate, bytes calldata ctx ) external override returns (bytes memory newCtx) { - if (_isPool(token, address(pool)) == false) { + if (_isPool(token, address(pool)) == false || + // Note: we do not support multi-tokens pools + pool.superToken() != token) { revert GDA_ONLY_SUPER_TOKEN_POOL(); } if (requestedFlowRate < 0) { diff --git a/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol b/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol index 122414dd95..64314f4e1e 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol @@ -204,6 +204,16 @@ contract GeneralDistributionAgreementV1IntegrationTest is FoundrySuperfluidTeste vm.stopPrank(); } + function testRevertDistributeFlowToPoolOfWrongToken(int96 requestedFlowRate) public { + vm.assume(requestedFlowRate >= 0); + vm.assume(requestedFlowRate < int96(type(int64).max)); + ISuperToken badToken = sfDeployer.deployNativeAssetSuperToken("Super Bad", "BADx"); + vm.startPrank(alice); + vm.expectRevert(IGeneralDistributionAgreementV1.GDA_ONLY_SUPER_TOKEN_POOL.selector); + badToken.distributeFlow(alice, ISuperfluidPool(bob), requestedFlowRate); + vm.stopPrank(); + } + function testRevertDistributeFromAnyAddressWhenNotAllowed(bool useForwarder) public { PoolConfig memory config = PoolConfig({ transferabilityForUnitsOwner: true, distributionFromAnyAddress: false }); ISuperfluidPool pool = _helperCreatePool(superToken, alice, alice, useForwarder, config); @@ -258,6 +268,15 @@ contract GeneralDistributionAgreementV1IntegrationTest is FoundrySuperfluidTeste vm.stopPrank(); } + function testRevertDistributeToPoolOfWrongToken(uint256 requestedAmount) public { + vm.assume(requestedAmount < uint256(type(uint128).max)); + ISuperToken badToken = sfDeployer.deployNativeAssetSuperToken("Super Bad", "BADx"); + vm.startPrank(alice); + vm.expectRevert(IGeneralDistributionAgreementV1.GDA_ONLY_SUPER_TOKEN_POOL.selector); + badToken.distributeToPool(alice, ISuperfluidPool(bob), requestedAmount); + vm.stopPrank(); + } + function testRevertDistributeForOthers(address signer, uint256 requestedAmount) public { ISuperfluidPool pool = _helperCreatePool(superToken, alice, alice, false, poolConfig); vm.assume(requestedAmount < uint256(type(uint128).max)); From 2b2fe84cec086d658801442ed663356e950b9f6b Mon Sep 17 00:00:00 2001 From: Didi Date: Mon, 9 Sep 2024 16:08:32 +0200 Subject: [PATCH 42/42] [SUBGRAPH] fix missing token name/symbol (#2017) --- packages/subgraph/src/mappingHelpers.ts | 27 ++++++++++++------------- packages/subgraph/src/utils.ts | 2 ++ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/packages/subgraph/src/mappingHelpers.ts b/packages/subgraph/src/mappingHelpers.ts index 91a1a6e6db..a13d7739cb 100644 --- a/packages/subgraph/src/mappingHelpers.ts +++ b/packages/subgraph/src/mappingHelpers.ts @@ -1,4 +1,4 @@ -import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts"; +import { Address, BigInt, ethereum, log } from "@graphprotocol/graph-ts"; import { FlowUpdated } from "../generated/ConstantFlowAgreementV1/IConstantFlowAgreementV1"; import { ISuperfluid as Superfluid } from "../generated/Host/ISuperfluid"; import { @@ -43,7 +43,8 @@ import { getStreamID, getStreamRevisionID, getSubscriptionID, - handleTokenRPCCalls + handleTokenRPCCalls, + getTokenInfoAndReturn, } from "./utils"; /************************************************************************** @@ -101,6 +102,7 @@ export function getOrInitSuperToken( const resolverAddress = getResolverAddress(); if (token == null) { + log.info("Init SuperToken {} triggered by event {}", [tokenAddress.toHexString(), triggeredByEventName]); // Note: this is necessary otherwise we will not be able to capture // template data source events. SuperTokenTemplate.create(tokenAddress); @@ -145,17 +147,14 @@ export function getOrInitSuperToken( let address = Address.fromString(underlyingAddress.toHexString()); getOrInitToken(address, block, resolverAddress); } - return token as Token; - } - - if (token.symbol == "") { - const tokenContract = SuperToken.bind(tokenAddress); - const symbolResult = tokenContract.try_symbol(); - token.symbol = symbolResult.reverted ? "" : symbolResult.value; + } else if (token.name.length == 0 && token.symbol.length == 0) { + // custom SuperTokens may emit the factory event before the token is initialized, resulting in empty name and symbol. + // In such cases, this branch allows is to be updated once set. + log.info("Trying to update SuperToken {} with empty name or symbol", [tokenId]); + token = getTokenInfoAndReturn(token); + token.save(); } - token.save(); - return token as Token; } @@ -532,7 +531,7 @@ export function getOrInitOrUpdatePoolMember( poolMember = new PoolMember(poolMemberID); poolMember.createdAtTimestamp = event.block.timestamp; poolMember.createdAtBlockNumber = event.block.number; - + poolMember.units = BIG_INT_ZERO; poolMember.isConnected = false; poolMember.totalAmountClaimed = BIG_INT_ZERO; @@ -547,10 +546,10 @@ export function getOrInitOrUpdatePoolMember( } poolMember.updatedAtTimestamp = event.block.timestamp; poolMember.updatedAtBlockNumber = event.block.number; - + poolMember.updatedAtTimestamp = event.block.timestamp; poolMember.updatedAtBlockNumber = event.block.number; - + return poolMember; } diff --git a/packages/subgraph/src/utils.ts b/packages/subgraph/src/utils.ts index f7b84b85e7..fd418ef6e7 100644 --- a/packages/subgraph/src/utils.ts +++ b/packages/subgraph/src/utils.ts @@ -148,6 +148,8 @@ export function getTokenInfoAndReturn(token: Token): Token { token.symbol = symbolResult.reverted ? "" : symbolResult.value; token.decimals = decimalsResult.reverted ? 0 : decimalsResult.value; + log.info("Got token info: underlying {}, name {}, symbol {}, decimals {}", [token.underlyingAddress.toHexString(), token.name, token.symbol, token.decimals.toString()]); + return token; }