From d1421090caacd8c38edb7db285001ca7a2999e58 Mon Sep 17 00:00:00 2001 From: mpsc0x Date: Mon, 6 Jan 2025 14:21:05 +0200 Subject: [PATCH] update-2 --- .codespellrc | 3 + .dockerignore | 107 + .env.local | 11 - .env.template | 31 + .env.tesnet | 11 - .github/CODEOWNERS | 1 + .github/actionlint.yaml | 3 + .github/workflows/apterly-audit.yml | 35 + .github/workflows/doc.yml | 16 +- .github/workflows/lint.yml | 134 +- .github/workflows/test-suite-audit.yml | 35 + .github/workflows/testnet-deployment.yml | 101 +- .../typescript-integration-tests.yml | 35 +- .github/workflows/unit_tests.yml | 18 +- .gitignore | 2 - .markdownlint.json | 14 + .pre-commit-config.yaml | 44 + .prettierignore | 5 + .prettierrc.toml | 9 + .typos.toml | 2 + .yamlfix.toml | 7 + BusinessLogic.md | 1317 --- Makefile | 619 +- README.md | 91 +- aave-core/.gitignore | 2 + aave-core/Move.toml | 3 +- aave-core/aave-acl/Move.toml | 3 +- aave-core/aave-acl/sources/acl_manage.move | 88 +- .../aave-acl/tests/acl_manage_tests.move | 135 +- .../aave-config/sources/error_config.move | 186 +- .../aave-config/sources/reserve_config.move | 60 +- .../aave-config/sources/user_config.move | 20 +- aave-core/aave-config/tests/error_tests.move | 367 +- .../tests/reserve_config_tests.move | 82 +- .../aave-config/tests/user_config_tests.move | 16 +- .../{aave-mock-oracle => aave-data}/Move.toml | 9 +- aave-core/aave-data/sources/v1.move | 125 + aave-core/aave-data/sources/v1_values.move | 608 ++ aave-core/aave-large-packages/Move.toml | 2 +- .../sources/large_packages.move | 74 +- aave-core/aave-math/Move.toml | 1 + aave-core/aave-math/sources/math_utils.move | 20 +- aave-core/aave-math/sources/wad_ray_math.move | 52 +- .../aave-math/tests/math_utils_tests.move | 38 +- .../aave-math/tests/wad_ray_math_tests.move | 60 +- .../aave-mock-oracle/sources/oracle.move | 143 - .../sources/oracle_sentinel.move | 111 - .../tests/oracle_sentinel_tests.move | 77 - .../aave-mock-oracle/tests/oracle_tests.move | 210 - aave-core/aave-oracle/.gitignore | 2 - aave-core/aave-oracle/Move.toml | 49 +- .../doc/oracle.md | 0 .../doc/oracle_sentinel.md | 0 aave-core/aave-oracle/sources/oracle.move | 372 +- .../aave-oracle/sources/oracle_base.move | 198 + .../sources/price_cap_stable_adapter.move | 97 + .../aave-oracle/sources/reward_oracle.move | 50 + aave-core/aave-oracle/tests/oracle_tests.move | 416 +- .../tests/reward_oracle_tests.move | 56 + aave-core/aave-rate/Move.toml | 16 + ...efault_reserve_interest_rate_strategy.move | 192 +- .../sources/gho_interest_rate_strategy.move | 174 + .../sources/interest_rate_strategy.move | 92 + ..._reserve_interest_rate_strategy_tests.move | 72 +- aave-core/aave-scripts/Move.toml | 16 +- .../aave-scripts/sources/configure_acl.move | 115 + .../sources/configure_interest_rates.move | 89 + .../sources/configure_price_feeds.move | 79 + .../sources/configure_reserves.move | 134 + .../aave-scripts/sources/create_emodes.move | 62 + .../aave-scripts/sources/create_reserves.move | 94 + .../aave-scripts/sources/post-publish.move | 48 - aave-core/chainlink-data-feeds/Move.toml | 20 + .../sources/registry.move | 825 ++ .../chainlink-data-feeds/sources/router.move | 202 + aave-core/chainlink-platform/Move.toml | 17 + .../chainlink-platform/sources/forwarder.move | 571 ++ .../chainlink-platform/sources/storage.move | 220 + aave-core/doc/a_token_factory.md | 437 - .../doc/admin_controlled_ecosystem_reserve.md | 188 - aave-core/doc/borrow_logic.md | 176 - aave-core/doc/bridge_logic.md | 116 - aave-core/doc/coin_wrapper.md | 236 - aave-core/doc/collector.md | 164 - .../default_reserve_interest_rate_strategy.md | 230 - aave-core/doc/eac_aggregator_proxy.md | 84 - aave-core/doc/ecosystem_reserve_v2.md | 274 - aave-core/doc/emission_manager.md | 255 - aave-core/doc/emode_logic.md | 327 - aave-core/doc/flash_loan.md | 167 - aave-core/doc/generic_logic.md | 79 - aave-core/doc/isolation_mode_logic.md | 47 - aave-core/doc/liquidation_logic.md | 186 - .../doc/mock_underlying_token_factory.md | 272 - aave-core/doc/package-manager.md | 77 - aave-core/doc/pool.md | 884 -- aave-core/doc/pool_addresses_provider.md | 465 - aave-core/doc/pool_configurator.md | 752 -- aave-core/doc/pool_data_provider.md | 263 - aave-core/doc/rewards_controller.md | 646 -- aave-core/doc/staked_token.md | 58 - aave-core/doc/standard_token.md | 317 - aave-core/doc/stream.md | 106 - aave-core/doc/supply_logic.md | 169 - aave-core/doc/token_base.md | 435 - aave-core/doc/transfer_strategy.md | 414 - .../doc/ui_incentive_data_provider_v3.md | 189 - aave-core/doc/ui_pool_data_provider_v3.md | 278 - aave-core/doc/underlying_token_factory.md | 266 - aave-core/doc/user_logic.md | 35 - aave-core/doc/validation_logic.md | 303 - aave-core/doc/variable_debt_token_factory.md | 285 - aave-core/doc/variable_token_factory.md | 292 - .../borrow_logic.move | 217 +- .../bridge_logic.move | 105 +- .../emode_logic.move | 87 +- .../flashloan_logic.move} | 195 +- .../generic_logic.move | 58 +- .../isolation_mode_logic.move | 33 +- .../liquidation_logic.move | 269 +- .../supply_logic.move | 253 +- aave-core/sources/aave-logic/user_logic.move | 131 + .../validation_logic.move | 384 +- .../mock_underlying_token_factory.move | 52 +- .../admin_controlled_ecosystem_reserve.move | 146 +- .../sources/aave-periphery/coin_migrator.move | 107 + .../sources/aave-periphery/coin_wrapper.move | 20 +- .../sources/aave-periphery/collector.move | 15 +- .../aave-periphery/eac_aggregator_proxy.move | 51 +- .../aave-periphery/ecosystem_reserve_v2.move | 200 +- .../aave-periphery/emission_manager.move | 47 +- .../aave-periphery/package-manager.move | 45 +- .../aave-periphery/rewards_controller.move | 390 +- .../sources/aave-periphery/staked_token.move | 12 +- aave-core/sources/aave-periphery/stream.move | 30 +- .../aave-periphery/transfer_strategy.move | 1079 +- .../ui_incentive_data_provider_v3.move | 381 +- .../ui_pool_data_provider_v3.move | 463 +- aave-core/sources/aave-pool/pool.move | 871 +- .../aave-pool/pool_addresses_provider.move | 256 - .../sources/aave-pool/pool_configurator.move | 266 +- .../sources/aave-pool/pool_data_provider.move | 149 +- .../sources/aave-pool/validation_logic.move | 169 - .../aave-supply-borrow/user_logic.move | 54 - .../sources/aave-tokens/a_token_factory.move | 364 +- .../aave-tokens/fungible_asset_manager.move | 86 + .../sources/aave-tokens/standard_token.move | 76 +- aave-core/sources/aave-tokens/token_base.move | 361 +- .../variable_debt_token_factory.move | 231 +- .../borrow_logic_tests.move | 141 +- .../bridge_logic_tests.move | 314 +- .../emode_logic_tests.move | 181 +- .../flash_loan_tests.move | 466 +- .../generic_logic_tests.move | 4 +- .../isolation_mode_logic_tests.move | 4 +- .../liquidation_logic_tests.move | 4 +- .../supply_logic_tests.move | 325 +- .../user_logic_tests.move | 4 +- .../aave-periphery/coin_migrator_tests.move | 295 + .../aave-periphery/coin_wrapper_tests.move | 484 +- .../tests/aave-periphery/collector_tests.move | 302 +- .../emission_manager_tests.move | 1040 +- .../rewards_controller_tests.move | 2285 ++++- .../pool_addresses_provider_tests.move | 261 - .../aave-pool/pool_configurator_tests.move | 478 +- .../aave-pool/pool_data_provider_tests.move | 68 +- aave-core/tests/aave-pool/pool_tests.move | 251 +- .../aave-tokens/a_token_factory_tests.move | 388 +- ... mock_underlying_token_factory_tests.move} | 50 +- .../aave-tokens/standard_token_tests.move | 47 +- .../variable_token_factory_tests.move | 69 +- apterly/.markdownlint.json | 14 + apterly/.prettierignore | 5 + apterly/.prettierrc.toml | 9 + apterly/.typos.toml | 2 + apterly/.yamlfix.toml | 7 + apterly/Dockerfile | 50 + apterly/LICENSE | 1 + apterly/README.md | 35 + apterly/cli/index.ts | 53 + apterly/docker-compose.yml | 87 + apterly/entrypoint.sh | 37 + apterly/eslint.config.js | 34 + apterly/jest.config.ts | 31 + apterly/package.json | 86 + apterly/pnpm-lock.yaml | 9088 +++++++++++++++++ apterly/postgres-init/create_indexer_db.sql | 17 + apterly/test/example.ts | 5 + apterly/test/test.sh | 4 + apterly/tsconfig.commonjs.json | 11 + apterly/tsconfig.esm.json | 12 + apterly/tsconfig.json | 80 + package.json | 21 + pnpm-lock.yaml | 1319 +++ test-suites/.eslintignore | 6 - test-suites/.eslintrc.js | 46 - test-suites/.lintstagedrc | 4 + test-suites/.markdownlint.json | 14 + test-suites/.pre-commit-config.yaml | 44 + test-suites/.prettierignore | 19 +- test-suites/.prettierrc | 4 - test-suites/.prettierrc.toml | 9 + test-suites/.typos.toml | 2 + test-suites/.yamlfix.toml | 7 + test-suites/README.md | 9 +- test-suites/clients/aTokensClient.ts | 2 +- test-suites/clients/baseClass.ts | 2 +- test-suites/clients/bridgeClient.ts | 2 +- test-suites/clients/coreClient.ts | 2 +- .../defaultInterestRateStrategyClient.ts | 90 + test-suites/clients/oracleClient.ts | 55 +- test-suites/clients/poolClient.ts | 110 +- test-suites/clients/uiPoolDataProvider.ts | 2 + test-suites/clients/underlyingTokensClient.ts | 2 +- test-suites/clients/variableTokensClient.ts | 2 +- test-suites/configs/aclManage.ts | 11 +- test-suites/configs/bridge.ts | 9 +- test-suites/configs/common.ts | 7 +- test-suites/configs/config.ts | 33 +- test-suites/configs/flashLoan.ts | 9 +- test-suites/configs/largePackages.ts | 9 +- test-suites/configs/oracle.ts | 21 +- test-suites/configs/pool.ts | 27 +- test-suites/configs/rates.ts | 224 + test-suites/configs/supplyBorrow.ts | 9 +- test-suites/configs/tokens.ts | 19 +- test-suites/eslint.config.js | 33 + test-suites/helpers/common.ts | 7 + test-suites/helpers/constants.ts | 4 +- test-suites/helpers/contractHelper.ts | 2 +- test-suites/helpers/helper.ts | 2 +- test-suites/helpers/priceFeeds.ts | 15 + test-suites/package.json | 110 +- test-suites/pnpm-lock.yaml | 6006 ++++++----- test-suites/scripts/configReserves.ts | 81 +- test-suites/scripts/coreOperations.ts | 46 +- test-suites/scripts/createRoles.ts | 7 +- test-suites/scripts/createToken.ts | 237 - test-suites/scripts/createTokens.ts | 173 + test-suites/scripts/initData.ts | 27 +- test-suites/scripts/initInterestRate.ts | 28 +- test-suites/scripts/initOraclePrice.ts | 54 +- .../scripts/initPoolAddressesProvider.ts | 8 +- .../{initReserve.ts => initReserves.ts} | 9 +- test-suites/scripts/publishLargePackage.ts | 10 +- test-suites/test/aave-oracle.spec.ts | 6 +- test-suites/test/rate-strategy.spec.ts | 2 +- test-suites/test/test.sh | 27 - test-suites/test/wadraymath.spec.ts | 2 +- test-suites/test/withdraw.spec.ts | 2 +- test-suites/tsconfig.commonjs.json | 14 +- test-suites/tsconfig.esm.json | 36 +- test-suites/tsconfig.json | 15 +- test-suites/wrappers/aptosProvider.ts | 332 +- 254 files changed, 32336 insertions(+), 20785 deletions(-) create mode 100644 .codespellrc create mode 100644 .dockerignore delete mode 100644 .env.local create mode 100644 .env.template delete mode 100644 .env.tesnet create mode 100644 .github/CODEOWNERS create mode 100644 .github/actionlint.yaml create mode 100644 .github/workflows/apterly-audit.yml create mode 100644 .github/workflows/test-suite-audit.yml create mode 100644 .markdownlint.json create mode 100644 .pre-commit-config.yaml create mode 100644 .prettierignore create mode 100644 .prettierrc.toml create mode 100644 .typos.toml create mode 100644 .yamlfix.toml delete mode 100644 BusinessLogic.md create mode 100644 aave-core/.gitignore rename aave-core/{aave-mock-oracle => aave-data}/Move.toml (74%) create mode 100644 aave-core/aave-data/sources/v1.move create mode 100644 aave-core/aave-data/sources/v1_values.move delete mode 100644 aave-core/aave-mock-oracle/sources/oracle.move delete mode 100644 aave-core/aave-mock-oracle/sources/oracle_sentinel.move delete mode 100644 aave-core/aave-mock-oracle/tests/oracle_sentinel_tests.move delete mode 100644 aave-core/aave-mock-oracle/tests/oracle_tests.move delete mode 100644 aave-core/aave-oracle/.gitignore rename aave-core/{aave-mock-oracle => aave-oracle}/doc/oracle.md (100%) rename aave-core/{aave-mock-oracle => aave-oracle}/doc/oracle_sentinel.md (100%) create mode 100644 aave-core/aave-oracle/sources/oracle_base.move create mode 100644 aave-core/aave-oracle/sources/price_cap_stable_adapter.move create mode 100644 aave-core/aave-oracle/sources/reward_oracle.move create mode 100644 aave-core/aave-oracle/tests/reward_oracle_tests.move create mode 100644 aave-core/aave-rate/Move.toml rename aave-core/{sources/aave-pool => aave-rate/sources}/default_reserve_interest_rate_strategy.move (61%) create mode 100644 aave-core/aave-rate/sources/gho_interest_rate_strategy.move create mode 100644 aave-core/aave-rate/sources/interest_rate_strategy.move rename aave-core/{tests/aave-pool => aave-rate/tests}/default_reserve_interest_rate_strategy_tests.move (76%) create mode 100644 aave-core/aave-scripts/sources/configure_acl.move create mode 100644 aave-core/aave-scripts/sources/configure_interest_rates.move create mode 100644 aave-core/aave-scripts/sources/configure_price_feeds.move create mode 100644 aave-core/aave-scripts/sources/configure_reserves.move create mode 100644 aave-core/aave-scripts/sources/create_emodes.move create mode 100644 aave-core/aave-scripts/sources/create_reserves.move delete mode 100644 aave-core/aave-scripts/sources/post-publish.move create mode 100644 aave-core/chainlink-data-feeds/Move.toml create mode 100644 aave-core/chainlink-data-feeds/sources/registry.move create mode 100644 aave-core/chainlink-data-feeds/sources/router.move create mode 100644 aave-core/chainlink-platform/Move.toml create mode 100644 aave-core/chainlink-platform/sources/forwarder.move create mode 100644 aave-core/chainlink-platform/sources/storage.move delete mode 100644 aave-core/doc/a_token_factory.md delete mode 100644 aave-core/doc/admin_controlled_ecosystem_reserve.md delete mode 100644 aave-core/doc/borrow_logic.md delete mode 100644 aave-core/doc/bridge_logic.md delete mode 100644 aave-core/doc/coin_wrapper.md delete mode 100644 aave-core/doc/collector.md delete mode 100644 aave-core/doc/default_reserve_interest_rate_strategy.md delete mode 100644 aave-core/doc/eac_aggregator_proxy.md delete mode 100644 aave-core/doc/ecosystem_reserve_v2.md delete mode 100644 aave-core/doc/emission_manager.md delete mode 100644 aave-core/doc/emode_logic.md delete mode 100644 aave-core/doc/flash_loan.md delete mode 100644 aave-core/doc/generic_logic.md delete mode 100644 aave-core/doc/isolation_mode_logic.md delete mode 100644 aave-core/doc/liquidation_logic.md delete mode 100644 aave-core/doc/mock_underlying_token_factory.md delete mode 100644 aave-core/doc/package-manager.md delete mode 100644 aave-core/doc/pool.md delete mode 100644 aave-core/doc/pool_addresses_provider.md delete mode 100644 aave-core/doc/pool_configurator.md delete mode 100644 aave-core/doc/pool_data_provider.md delete mode 100644 aave-core/doc/rewards_controller.md delete mode 100644 aave-core/doc/staked_token.md delete mode 100644 aave-core/doc/standard_token.md delete mode 100644 aave-core/doc/stream.md delete mode 100644 aave-core/doc/supply_logic.md delete mode 100644 aave-core/doc/token_base.md delete mode 100644 aave-core/doc/transfer_strategy.md delete mode 100644 aave-core/doc/ui_incentive_data_provider_v3.md delete mode 100644 aave-core/doc/ui_pool_data_provider_v3.md delete mode 100644 aave-core/doc/underlying_token_factory.md delete mode 100644 aave-core/doc/user_logic.md delete mode 100644 aave-core/doc/validation_logic.md delete mode 100644 aave-core/doc/variable_debt_token_factory.md delete mode 100644 aave-core/doc/variable_token_factory.md rename aave-core/sources/{aave-supply-borrow => aave-logic}/borrow_logic.move (70%) rename aave-core/sources/{aave-bridge => aave-logic}/bridge_logic.move (71%) rename aave-core/sources/{aave-pool => aave-logic}/emode_logic.move (81%) rename aave-core/sources/{aave-flash-loan/flash_loan.move => aave-logic/flashloan_logic.move} (76%) rename aave-core/sources/{aave-pool => aave-logic}/generic_logic.move (89%) rename aave-core/sources/{aave-pool => aave-logic}/isolation_mode_logic.move (74%) rename aave-core/sources/{aave-supply-borrow => aave-logic}/liquidation_logic.move (77%) rename aave-core/sources/{aave-supply-borrow => aave-logic}/supply_logic.move (65%) create mode 100644 aave-core/sources/aave-logic/user_logic.move rename aave-core/sources/{aave-supply-borrow => aave-logic}/validation_logic.move (54%) rename aave-core/sources/{aave-tokens => aave-mocks}/mock_underlying_token_factory.move (89%) create mode 100644 aave-core/sources/aave-periphery/coin_migrator.move delete mode 100644 aave-core/sources/aave-pool/pool_addresses_provider.move delete mode 100644 aave-core/sources/aave-pool/validation_logic.move delete mode 100644 aave-core/sources/aave-supply-borrow/user_logic.move create mode 100644 aave-core/sources/aave-tokens/fungible_asset_manager.move rename aave-core/tests/{aave-supply-borrow => aave-logic}/borrow_logic_tests.move (74%) rename aave-core/tests/{aave-bridge => aave-logic}/bridge_logic_tests.move (78%) rename aave-core/tests/{aave-pool => aave-logic}/emode_logic_tests.move (78%) rename aave-core/tests/{aave-flash-loan => aave-logic}/flash_loan_tests.move (80%) rename aave-core/tests/{aave-pool => aave-logic}/generic_logic_tests.move (97%) rename aave-core/tests/{aave-pool => aave-logic}/isolation_mode_logic_tests.move (97%) rename aave-core/tests/{aave-supply-borrow => aave-logic}/liquidation_logic_tests.move (95%) rename aave-core/tests/{aave-supply-borrow => aave-logic}/supply_logic_tests.move (77%) rename aave-core/tests/{aave-supply-borrow => aave-logic}/user_logic_tests.move (94%) create mode 100644 aave-core/tests/aave-periphery/coin_migrator_tests.move delete mode 100644 aave-core/tests/aave-pool/pool_addresses_provider_tests.move rename aave-core/tests/aave-tokens/{underlying_token_factory_tests.move => mock_underlying_token_factory_tests.move} (84%) create mode 100644 apterly/.markdownlint.json create mode 100644 apterly/.prettierignore create mode 100644 apterly/.prettierrc.toml create mode 100644 apterly/.typos.toml create mode 100644 apterly/.yamlfix.toml create mode 100644 apterly/Dockerfile create mode 100644 apterly/LICENSE create mode 100644 apterly/README.md create mode 100644 apterly/cli/index.ts create mode 100644 apterly/docker-compose.yml create mode 100755 apterly/entrypoint.sh create mode 100644 apterly/eslint.config.js create mode 100644 apterly/jest.config.ts create mode 100644 apterly/package.json create mode 100644 apterly/pnpm-lock.yaml create mode 100644 apterly/postgres-init/create_indexer_db.sql create mode 100644 apterly/test/example.ts create mode 100755 apterly/test/test.sh create mode 100644 apterly/tsconfig.commonjs.json create mode 100644 apterly/tsconfig.esm.json create mode 100644 apterly/tsconfig.json create mode 100644 package.json create mode 100644 pnpm-lock.yaml delete mode 100644 test-suites/.eslintignore delete mode 100644 test-suites/.eslintrc.js create mode 100644 test-suites/.lintstagedrc create mode 100644 test-suites/.markdownlint.json create mode 100644 test-suites/.pre-commit-config.yaml delete mode 100644 test-suites/.prettierrc create mode 100644 test-suites/.prettierrc.toml create mode 100644 test-suites/.typos.toml create mode 100644 test-suites/.yamlfix.toml create mode 100644 test-suites/clients/defaultInterestRateStrategyClient.ts create mode 100644 test-suites/configs/rates.ts create mode 100644 test-suites/eslint.config.js create mode 100644 test-suites/helpers/priceFeeds.ts delete mode 100644 test-suites/scripts/createToken.ts create mode 100644 test-suites/scripts/createTokens.ts rename test-suites/scripts/{initReserve.ts => initReserves.ts} (89%) delete mode 100755 test-suites/test/test.sh diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000..5319ec6 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,3 @@ +[codespell] +skip = .git,target,pnpm-lock.yaml +ignore-words-list = crate,ser,ratatui,ot,tE diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..b1ef9e7 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,107 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +.coverage_map.mvcov +.trace + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +**/node_modules +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# next.js build output +.next + +# build folder +dist/ + +# bundle files +bundle.* + +# docs files +docs + +# Misc +.DS_Store + +# Generated by Cargo +# will have compiled files and executables +debug/ +target/ + +# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries +# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html +#Cargo.lock + +# These are backup files generated by rustfmt +**/*.rs.bk + +# MSVC Windows builds of rustc generate these, which store debugging information +*.pdb + +.idea +.github +**/build + +# Move coverage testing +*.mvcov +*.trace +gas-profiling + +# some aave-core specific stuff +aave-core/build/ +aave-core/doc/ +aave-core/tests/ +test-suites/node_modules/ + +# local aptos and gh +.aptos/ +.github/ diff --git a/.env.local b/.env.local deleted file mode 100644 index 9d11029..0000000 --- a/.env.local +++ /dev/null @@ -1,11 +0,0 @@ -#APTOS_CONFIG_FILE= ... put your aptos config file path here e.g. /home/user/.aptos/config.yaml or leave uncommented if default workspace... -APTOS_NETWORK=local -ARTIFACTS_LEVEL=all -DEFAULT_FUND_AMOUNT=100000000 -DEFAULT_FUNDER_PRIVATE_KEY=0x676c8aee36857acbcfa02c6953958236a695a6520967ca49cddd7547f5a958ce - -# pyth oracle (irrelevant for local) -PYTH_HERMES_URL=https://hermes-beta.pyth.network -PYTH_CONTRACT_ACCOUNT=0x0000000000000000000000000000000000000000000000000000000000000000 -PYTH_DEPLOYER_ACCOUNT=0x0000000000000000000000000000000000000000000000000000000000000000 -PYTH_WORMHOLE=0x0000000000000000000000000000000000000000000000000000000000000000 diff --git a/.env.template b/.env.template new file mode 100644 index 0000000..0cd2783 --- /dev/null +++ b/.env.template @@ -0,0 +1,31 @@ +#APTOS_CONFIG_FILE= ... put your aptos config file path here e.g. /home/user/.aptos/config.yaml or leave uncommented if default workspace... +APTOS_NETWORK=local +UPGRADE_CONTRACTS=false +ARTIFACTS_LEVEL=all +DEFAULT_FUND_AMOUNT=40000000 +CHAINLINK_DATA_FEEDS ?= 0x100 +CHAINLINK_PLATFORM ?= 0x200 + +# aave profiles private keys +AAVE_ACL_PRIVATE_KEY=[YOUR PROFILE ACCOUNT PRIVATE KEY] +AAVE_CONFIG_PRIVATE_KEY=[YOUR PROFILE ACCOUNT PRIVATE KEY] +AAVE_MATH_PRIVATE_KEY=[YOUR PROFILE ACCOUNT PRIVATE KEY] +AAVE_RATE_PRIVATE_KEY=[YOUR PROFILE ACCOUNT PRIVATE KEY] +AAVE_ORACLE_PRIVATE_KEY=[YOUR PROFILE ACCOUNT PRIVATE KEY] +AAVE_POOL_PRIVATE_KEY=[YOUR PROFILE ACCOUNT PRIVATE KEY] +A_TOKENS_PRIVATE_KEY=[YOUR PROFILE ACCOUNT PRIVATE KEY] +UNDERLYING_TOKENS_PRIVATE_KEY=[YOUR PROFILE ACCOUNT PRIVATE KEY] +VARIABLE_TOKENS_PRIVATE_KEY=[YOUR PROFILE ACCOUNT PRIVATE KEY] +AAVE_LARGE_PACKAGES_PRIVATE_KEY=[YOUR PROFILE ACCOUNT PRIVATE KEY] +AAVE_DATA_PRIVATE_KEY=[YOUR PROFILE ACCOUNT PRIVATE KEY] +AAVE_DATA_FEEDS_PRIVATE_KEY=[YOUR PROFILE ACCOUNT PRIVATE KEY] +AAVE_PLATFORM_PRIVATE_KEY=[YOUR PROFILE ACCOUNT PRIVATE KEY] +DEFAULT_FUNDER_PRIVATE_KEY=[YOUR PROFILE ACCOUNT PRIVATE KEY] + +# test profiles private keys +TEST_ACCOUNT_0_PRIVATE_KEY=[ADDRESS] +TEST_ACCOUNT_1_PRIVATE_KEY=[ADDRESS] +TEST_ACCOUNT_2_PRIVATE_KEY=[ADDRESS] +TEST_ACCOUNT_3_PRIVATE_KEY=[ADDRESS] +TEST_ACCOUNT_4_PRIVATE_KEY=[ADDRESS] +TEST_ACCOUNT_5_PRIVATE_KEY=[ADDRESS] diff --git a/.env.tesnet b/.env.tesnet deleted file mode 100644 index 43a0997..0000000 --- a/.env.tesnet +++ /dev/null @@ -1,11 +0,0 @@ -#APTOS_CONFIG_FILE= ... put your aptos config file path here e.g. /home/user/.aptos/config.yaml or leave uncommented if default workspace... -APTOS_NETWORK=testnet -ARTIFACTS_LEVEL=none -DEFAULT_FUND_AMOUNT=20000000 -DEFAULT_FUNDER_PRIVATE_KEY=[YOUR FUNDER ACCOUNT PRIVATE KEY] - -# pyth oracle (for testnet and devnet) -PYTH_HERMES_URL=https://hermes-beta.pyth.network -PYTH_CONTRACT_ACCOUNT=0x7e783b349d3e89cf5931af376ebeadbfab855b3fa239b7ada8f5a92fbea6b387 -PYTH_DEPLOYER_ACCOUNT=0xb31e712b26fd295357355f6845e77c888298636609e93bc9b05f0f604049f434 -PYTH_WORMHOLE=0x5bc11445584a763c1fa7ed39081f1b920954da14e04b32440cba863d03e19625 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..22d03f5 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @tyshko5 @meng-xu-cs @matchv @mpsc0x diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml new file mode 100644 index 0000000..592bf5e --- /dev/null +++ b/.github/actionlint.yaml @@ -0,0 +1,3 @@ +self-hosted-runner: + labels: + - Larger-Github-Runners diff --git a/.github/workflows/apterly-audit.yml b/.github/workflows/apterly-audit.yml new file mode 100644 index 0000000..dfa17e8 --- /dev/null +++ b/.github/workflows/apterly-audit.yml @@ -0,0 +1,35 @@ +name: npm audit + +on: + pull_request: + merge_group: + branches: + - main + schedule: + - cron: '0 10 * * *' + +jobs: + npm-scan: + name: apterly + runs-on: Larger-Github-Runners + steps: + - uses: actions/checkout@v4 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + run_install: false + + - name: Install dependencies + run: pnpm install --frozen-lockfile + working-directory: apterly + + - name: Run pnpm audit + run: pnpm audit + working-directory: apterly diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 5e965e6..94377e4 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -3,15 +3,21 @@ name: Build Aptos Documentation on: pull_request: merge_group: - branches: [main] + branches: + - main env: CARGO_TERM_COLOR: always + GITHUB_ACTIONS: true + APTOS_NETWORK: local + UPGRADE_CONTRACTS: false + ARTIFACTS_LEVEL: all + DEFAULT_FUNDER_PRIVATE_KEY: ${{ secrets.GH_DEFAULT_FUNDER_PRIVATE_KEY }} jobs: build-docs: name: Build Aptos Documentation - runs-on: ubuntu-latest + runs-on: Larger-Github-Runners timeout-minutes: 60 steps: - uses: actions/checkout@v4 @@ -25,7 +31,11 @@ jobs: echo $! > aptos_serve_pid.txt - name: Wait for Aptos Local Testnet to be ready run: sleep 20 + - name: Set Local Aptos Workspace Config + run: make set-workspace-config + - name: Init Local Aptos Workspace Config + run: make init-workspace-config - name: Run Aptos Create Profiles run: make init-profiles - name: Create Documentation - run: make doc-all \ No newline at end of file + run: make doc-all diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a3e4fcf..86379c1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,47 +1,147 @@ -name: Fmt Linter +name: lint on: pull_request: merge_group: - branches: [main] + branches: + - main env: CARGO_TERM_COLOR: always + CLICOLOR: true + CI: true GITHUB_ACTIONS: true APTOS_NETWORK: local + UPGRADE_CONTRACTS: false ARTIFACTS_LEVEL: all - PYTH_HERMES_URL: https://hermes-beta.pyth.network - PYTH_CONTRACT_ACCOUNT: 0x0 - PYTH_DEPLOYER_ACCOUNT: 0x0 - PYTH_WORMHOLE: 0x0 + AAVE_LARGE_PACKAGES_PRIVATE_KEY: ${{ secrets.GH_AAVE_LARGE_PACKAGES_PRIVATE_KEY }} # temp hack: remove after large packages is no longer needed jobs: + pre-commit: + name: Pre-commit + runs-on: Larger-Github-Runners + steps: + - uses: actions/checkout@v4 + + - name: Check workflow files + uses: docker://rhysd/actionlint:latest + env: + SHELLCHECK_OPTS: --exclude=SC2086,SC2129,SC2046 + with: + args: -color + + - uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt-get update -y + sudo apt-get install -y libudev-dev + + - name: Install Aptos CLI + run: | + curl -fsSL "https://aptos.dev/scripts/install_cli.py" | python3 + aptos --version + aptos update movefmt + echo 'Adding movefmt to PATH' + echo "$HOME/.aptos/bin" >> $GITHUB_PATH + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - uses: pnpm/action-setup@v4 + name: Install pnpm + with: + version: 9 + run_install: true + + - name: Install Python + uses: actions/setup-python@v5 + + - name: Run Pre Commit + uses: pre-commit/action@v3.0.1 + fmt: - name: Run fmt - runs-on: ubuntu-latest + name: fmt + runs-on: Larger-Github-Runners env: RUST_BACKTRACE: 1 timeout-minutes: 60 steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - - uses: taiki-e/install-action@nextest + - name: Install dependencies + run: | + sudo apt-get update -y + sudo apt-get install -y libudev-dev + + - name: Install Aptos CLI + run: | + curl -fsSL "https://aptos.dev/scripts/install_cli.py" | python3 + aptos --version + aptos update movefmt + echo 'Adding movefmt to PATH' + echo "$HOME/.aptos/bin" >> $GITHUB_PATH + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - uses: pnpm/action-setup@v4 + name: Install pnpm + with: + version: 9 + run_install: true + + - name: Fmt Project + run: make fmt - - uses: Swatinem/rust-cache@v2 + codespell: + runs-on: Larger-Github-Runners + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + - uses: codespell-project/actions-codespell@v2 with: - cache-on-failure: true + skip: "*.json" + + lint: + name: lint + needs: + - codespell + runs-on: Larger-Github-Runners + steps: + - uses: actions/checkout@v4 - name: Install dependencies run: | sudo apt-get update -y sudo apt-get install -y libudev-dev - - name: Run Install move fmt + - name: Install Aptos CLI run: | - cargo install --git https://github.com/movebit/movefmt --branch develop movefmt - export PATH=~/.cargo/bin:$PATH + curl -fsSL "https://aptos.dev/scripts/install_cli.py" | python3 + aptos --version + aptos update movefmt + echo 'Adding movefmt to PATH' + echo "$HOME/.aptos/bin" >> $GITHUB_PATH + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - uses: pnpm/action-setup@v4 + name: Install pnpm + with: + version: 9 + run_install: true + + - name: Install Python + uses: actions/setup-python@v5 - - name: Run fmt check on all files - run: make fmt-all \ No newline at end of file + - name: Lint project + run: make lint diff --git a/.github/workflows/test-suite-audit.yml b/.github/workflows/test-suite-audit.yml new file mode 100644 index 0000000..499112c --- /dev/null +++ b/.github/workflows/test-suite-audit.yml @@ -0,0 +1,35 @@ +name: npm audit + +on: + pull_request: + merge_group: + branches: + - main + schedule: + - cron: '0 10 * * *' + +jobs: + npm-scan: + name: test-suite + runs-on: Larger-Github-Runners + steps: + - uses: actions/checkout@v4 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + run_install: false + + - name: Install dependencies + run: pnpm install --frozen-lockfile + working-directory: test-suites + + - name: Run pnpm audit + run: pnpm audit + working-directory: test-suites diff --git a/.github/workflows/testnet-deployment.yml b/.github/workflows/testnet-deployment.yml index 33a5ef5..b447b09 100644 --- a/.github/workflows/testnet-deployment.yml +++ b/.github/workflows/testnet-deployment.yml @@ -19,26 +19,55 @@ on: options: - 'true' - 'false' - -env: - CARGO_TERM_COLOR: always - GITHUB_ACTIONS: true - APTOS_NETWORK: testnet - ARTIFACTS_LEVEL: none - DEFAULT_FUND_AMOUNT: 40000000 - PYTH_HERMES_URL: https://hermes-beta.pyth.network - PYTH_CONTRACT_ACCOUNT: 0x0000000000000000000000000000000000000000000000000000000000000000 - PYTH_DEPLOYER_ACCOUNT: 0x0000000000000000000000000000000000000000000000000000000000000000 - PYTH_WORMHOLE: 0x0000000000000000000000000000000000000000000000000000000000000000 + upgradeContracts: + description: 'Upgrade Contracts' + required: true + default: 'false' + type: choice + options: + - 'true' + - 'false' jobs: testnet-deployment: name: Deploy protocol on Testnet - runs-on: ubuntu-latest + runs-on: Larger-Github-Runners timeout-minutes: 60 env: - DEFAULT_FUNDER_PRIVATE_KEY: ${{ secrets.GH_DEFAULT_FUNDER_PRIVATE_KEY }} + # common settings + CARGO_TERM_COLOR: always + GITHUB_ACTIONS: true + ARTIFACTS_LEVEL: all + DEFAULT_FUND_AMOUNT: 40000000 APTOS_NETWORK: ${{ github.event.inputs.network }} + UPGRADE_CONTRACTS: ${{ github.event.inputs.upgradeContracts }} + + # external profiles + CHAINLINK_DATA_FEEDS: ${{ secrets.GH_CHAINLINK_DATA_FEEDS }} + CHAINLINK_PLATFORM: ${{ secrets.GH_CHAINLINK_PLATFORM }} + + # aave profiles + AAVE_ACL_PRIVATE_KEY: ${{ secrets.GH_AAVE_ACL_PRIVATE_KEY }} + AAVE_CONFIG_PRIVATE_KEY: ${{ secrets.GH_AAVE_CONFIG_PRIVATE_KEY }} + AAVE_MATH_PRIVATE_KEY: ${{ secrets.GH_AAVE_MATH_PRIVATE_KEY }} + AAVE_RATE_PRIVATE_KEY: ${{ secrets.GH_AAVE_RATE_PRIVATE_KEY }} + AAVE_ORACLE_PRIVATE_KEY: ${{ secrets.GH_AAVE_ORACLE_PRIVATE_KEY }} + AAVE_POOL_PRIVATE_KEY: ${{ secrets.GH_AAVE_POOL_PRIVATE_KEY }} + A_TOKENS_PRIVATE_KEY: ${{ secrets.GH_A_TOKENS_PRIVATE_KEY }} + UNDERLYING_TOKENS_PRIVATE_KEY: ${{ secrets.GH_UNDERLYING_TOKENS_PRIVATE_KEY }} + VARIABLE_TOKENS_PRIVATE_KEY: ${{ secrets.GH_VARIABLE_TOKENS_PRIVATE_KEY }} + AAVE_LARGE_PACKAGES_PRIVATE_KEY: ${{ secrets.GH_AAVE_LARGE_PACKAGES_PRIVATE_KEY }} + AAVE_DATA_PRIVATE_KEY: ${{ secrets.GH_AAVE_DATA_PRIVATE_KEY }} + DEFAULT_FUNDER_PRIVATE_KEY: ${{ secrets.GH_DEFAULT_FUNDER_PRIVATE_KEY }} + + # test profiles + TEST_ACCOUNT_0_PRIVATE_KEY: ${{ secrets.GH_TEST_ACCOUNT_0_PRIVATE_KEY }} + TEST_ACCOUNT_1_PRIVATE_KEY: ${{ secrets.GH_TEST_ACCOUNT_1_PRIVATE_KEY }} + TEST_ACCOUNT_2_PRIVATE_KEY: ${{ secrets.GH_TEST_ACCOUNT_2_PRIVATE_KEY }} + TEST_ACCOUNT_3_PRIVATE_KEY: ${{ secrets.GH_TEST_ACCOUNT_3_PRIVATE_KEY }} + TEST_ACCOUNT_4_PRIVATE_KEY: ${{ secrets.GH_TEST_ACCOUNT_4_PRIVATE_KEY }} + TEST_ACCOUNT_5_PRIVATE_KEY: ${{ secrets.GH_TEST_ACCOUNT_5_PRIVATE_KEY }} + steps: - uses: actions/checkout@v4 @@ -54,46 +83,6 @@ jobs: curl -fsSL "https://aptos.dev/scripts/install_cli.py" | python3 aptos --version # Verify that Aptos CLI is installed - - name: Checkout aptos-core repository - run: | - git clone https://github.com/0xjunha/aptos-core.git - cd aptos-core - git checkout large_packages_e2e - - - name: Cache Cargo registry - uses: actions/cache@v4 - id: cargo-cache - with: - path: | - ~/.cargo/registry - ~/.cargo/git - key: ${{ runner.os }}-cargo-registry-${{ hashFiles('aptos-core/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo-registry- - - - name: Cache Cargo target directory - uses: actions/cache@v4 - id: cargo-target-cache - with: - path: aptos-core/target - key: ${{ runner.os }}-cargo-target-${{ hashFiles('aptos-core/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo-target- - - - name: Build custom Aptos CLI - run: | - cd aptos-core - sh scripts/cli/build_cli_release.sh - - - name: Replace original Aptos CLI - run: | - cd aptos-core - zip_file=$(ls aptos-cli-*.zip) - unzip $zip_file - sudo mv /home/runner/.local/bin/aptos /home/runner/.local/bin/aptos_backup || true - sudo mv aptos /home/runner/.local/bin/aptos - aptos --version # Verify that the new Aptos CLI is installed - - name: Set Aptos Workspace Config run: make set-workspace-config @@ -156,10 +145,10 @@ jobs: - name: Initialize Data if: ${{ github.event.inputs.initData == 'true' }} - run: pnpm run init-data + run: pnpm run deploy:init-data working-directory: test-suites - name: Running Core Operations if: ${{ github.event.inputs.initData == 'true' }} - run: pnpm run core-operations - working-directory: test-suites \ No newline at end of file + run: pnpm run deploy:core-operations + working-directory: test-suites diff --git a/.github/workflows/typescript-integration-tests.yml b/.github/workflows/typescript-integration-tests.yml index 1c49a26..6bda2b4 100644 --- a/.github/workflows/typescript-integration-tests.yml +++ b/.github/workflows/typescript-integration-tests.yml @@ -3,29 +3,34 @@ name: TypeScript Integration Tests on: pull_request: merge_group: - branches: [main] + branches: + - main env: CARGO_TERM_COLOR: always GITHUB_ACTIONS: true APTOS_NETWORK: local + UPGRADE_CONTRACTS: false ARTIFACTS_LEVEL: all - PYTH_HERMES_URL: https://hermes-beta.pyth.network - PYTH_CONTRACT_ACCOUNT: 0x0 - PYTH_DEPLOYER_ACCOUNT: 0x0 - PYTH_WORMHOLE: 0x0 jobs: typescript-integration-tests: name: Run Typescript Integration Tests - runs-on: ubuntu-latest + runs-on: Larger-Github-Runners timeout-minutes: 60 env: DEFAULT_FUNDER_PRIVATE_KEY: ${{ secrets.GH_DEFAULT_FUNDER_PRIVATE_KEY }} steps: - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + + - name: Install dependencies + run: | + sudo apt-get update -y + sudo apt-get install -y libudev-dev lld libdw-dev + - name: Install Aptos CLI run: | curl -fsSL "https://aptos.dev/scripts/install_cli.py" | python3 @@ -56,7 +61,7 @@ jobs: ${{ runner.os }}-pnpm-store- - name: Install npm dependencies - run: pnpm install + run: pnpm install working-directory: test-suites - name: Run Aptos Create Local Testnet @@ -92,15 +97,15 @@ jobs: - name: Run Aptos Publish All Contracts run: make publish-all - - name: Run init test data - run: pnpm run init-data - working-directory: test-suites + # - name: Run init test data + # run: pnpm run deploy:init-data + # working-directory: test-suites - - name: Run integration tests logic - run: pnpm run test:logic - working-directory: test-suites + # - name: Run integration tests logic + # run: pnpm run test:logic + # working-directory: test-suites - name: Terminate Aptos Local Testnet if: always() - run: | - kill $(cat aptos_serve_pid.txt) || true \ No newline at end of file + run: |- + kill $(cat aptos_serve_pid.txt) || true diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 26bda7f..3eb1528 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -3,22 +3,21 @@ name: Unit Tests on: pull_request: merge_group: - branches: [main] + branches: + - main env: CARGO_TERM_COLOR: always GITHUB_ACTIONS: true APTOS_NETWORK: local + UPGRADE_CONTRACTS: false ARTIFACTS_LEVEL: all - PYTH_HERMES_URL: https://hermes-beta.pyth.network - PYTH_CONTRACT_ACCOUNT: 0x0 - PYTH_DEPLOYER_ACCOUNT: 0x0 - PYTH_WORMHOLE: 0x0 + DEFAULT_FUND_AMOUNT: 40000000 jobs: unit-tests: name: Run Aptos Unit Tests - runs-on: ubuntu-latest + runs-on: Larger-Github-Runners timeout-minutes: 60 env: DEFAULT_FUNDER_PRIVATE_KEY: ${{ secrets.GH_DEFAULT_FUNDER_PRIVATE_KEY }} @@ -53,4 +52,9 @@ jobs: run: make compile-all - name: Run Aptos Test All Contracts - run: make test-all \ No newline at end of file + run: make test-all + + - name: Terminate Aptos Local Testnet + if: always() + run: |- + kill $(cat aptos_serve_pid.txt) || true diff --git a/.gitignore b/.gitignore index ffd561d..f291704 100644 --- a/.gitignore +++ b/.gitignore @@ -95,5 +95,3 @@ target/ *.mvcov *.trace gas-profiling - -.aptos \ No newline at end of file diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..9d5a933 --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,14 @@ +{ + "extends": "markdownlint/style/prettier", + "first-line-h1": false, + "no-inline-html": false, + "no-alt-text": false, + "MD001": false, + "MD040": false, + "MD024": false, + "MD025": false, + "MD036": false, + "MD042": false, + "MD052": false, + "MD056": false +} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..c1aff3e --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,44 @@ +default_install_hook_types: + - pre-commit + +default_stages: + - pre-commit + +exclude: | + (?x)^( + CHANGELOG.md| + pnpm-lock.yaml| + cov-reports + )$ + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-json + - id: check-toml + - id: check-added-large-files + args: + - --maxkb=3000 + - id: check-merge-conflict + - id: check-case-conflict + - id: detect-private-key + + - repo: local + hooks: + - id: format + name: format + description: Format files using different tools + entry: make fmt + language: system + pass_filenames: false + + - repo: https://github.com/lyz-code/yamlfix/ + rev: 1.17.0 + hooks: + - id: yamlfix + args: + - -c + - .yamlfix.toml diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..8b63442 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,5 @@ +pnpm-lock.yaml +images +audit +cov-reports +aave-core diff --git a/.prettierrc.toml b/.prettierrc.toml new file mode 100644 index 0000000..a5370ca --- /dev/null +++ b/.prettierrc.toml @@ -0,0 +1,9 @@ +plugins = ["prettier-plugin-sh", "prettier-plugin-toml"] +singleQuote = false +printWidth = 100 + +[[overrides]] +files = ["**/*.md"] + +[overrides.options] +proseWrap = "preserve" diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 0000000..7b30bb8 --- /dev/null +++ b/.typos.toml @@ -0,0 +1,2 @@ +[files] +extend-exclude = [] diff --git a/.yamlfix.toml b/.yamlfix.toml new file mode 100644 index 0000000..2347b77 --- /dev/null +++ b/.yamlfix.toml @@ -0,0 +1,7 @@ +explicit_start = false +section_whitelines = 1 +whitelines = 1 +line_length = 100 +preserve_quotes = true +sequence_style = "block_style" +indent_mapping = 2 diff --git a/BusinessLogic.md b/BusinessLogic.md deleted file mode 100644 index 9cda610..0000000 --- a/BusinessLogic.md +++ /dev/null @@ -1,1317 +0,0 @@ -# AAVE Business Logic - - -## Pool -> source code: crest/blob/dev/aave-pool/sources/pool.move - -### Add resources to the pool -- 1. Add Token (underlying token, a token, variable token) -- 2. Determine whether the underlying token is in the pool. If it already exists, it will not be added and an error will be returned directly. -- 3. Determine whether the total size of the pool exceeds the total size set by the system. If it has exceeded, no more additions can be made. -- 4. Create resource objects and resource configurations and join the pool -- 5. Update the added resource count = count + 1 -- 6. Update the map of reserve_address_list (address=>count) -- 7. Release event ReserveInitialized -```bash= -struct ReserveData has key, store, copy, drop { - /// stores the reserve configuration - configuration: ReserveConfigurationMap, - /// the liquidity index. Expressed in ray - liquidity_index: u128, - /// the current supply rate. Expressed in ray - current_liquidity_rate: u128, - /// variable borrow index. Expressed in ray - variable_borrow_index: u128, - /// the current variable borrow rate. Expressed in ray - current_variable_borrow_rate: u128, - /// the current stable borrow rate. Expressed in ray - current_stable_borrow_rate: u128, - /// timestamp of last update (u40 -> u64) - last_update_timestamp: u64, - /// the id of the reserve. Represents the position in the list of the active reserves - id: u16, - /// aToken address - a_token_address: address, - /// stableDebtToken address - stable_debt_token_address: address, - /// variableDebtToken address - variable_debt_token_address: address, - /// address of the interest rate strategy - interest_rate_strategy_address: address, - /// the current treasury balance, scaled - accrued_to_treasury: u256, - /// the outstanding unbacked aTokens minted through the bridging feature - unbacked: u128, - /// the outstanding debt borrowed against this asset in isolation mode - isolation_mode_total_debt: u128, -} - -struct ReserveList has key { - // SmartTable to store reserve data with asset addresses as keys - value: SmartTable, - // Count of reserves in the list - count: u256, -} - -// List of reserves as a map (reserveId => reserve). -struct ReserveAddressesList has key { - value: SmartTable, -} - -public fun add_reserve( - account: &signer, - a_token_tmpl: address, - stable_debt_token_impl: address, - variable_debt_token_impl: address, - underlying_asset_decimals: u256, - interest_rate_strategy_address: address, - underlying_asset: address, - // _treasury: address, - // _incentives_controller: address, - // _a_token_name: String, - // _a_token_symbol: String, - // _variable_debt_token_name: String, - // _variable_debt_token_symbol: String, - // _stable_debt_token_name: String, - // _stable_debt_token_symbol: String, - // _params: String -) acquires ReserveList, ReserveAddressesList { - // Get the signers address - let singer_address = signer::address_of(account); - - // Borrow the ReserveList resource - let reserve_data_list = borrow_global_mut(singer_address); - - // Assert that the asset is not already added - assert!( - !smart_table::contains(&reserve_data_list.value, underlying_asset), - error_config::get_ereserve_already_added() - ); - - // Assert that the maximum number of reserves has not been reached - assert!( - reserve_data_list.count < (reserve_config::get_max_reserves_count()), - error_config::get_eno_more_reserves_allowed() - ); - - // Increment the reserve count - let count = reserve_data_list.count + 1; - - let reserve_configuration = reserve_config::init(); - reserve_config::set_decimals(&mut reserve_configuration, underlying_asset_decimals); - reserve_config::set_active(&mut reserve_configuration, true); - reserve_config::set_paused(&mut reserve_configuration, false); - reserve_config::set_frozen(&mut reserve_configuration, false); - - // Create a new ReserveData entry - let reserve_data = ReserveData { - configuration: reserve_configuration, - liquidity_index: (wad_ray_math::ray() as u128), - current_liquidity_rate: 0, - variable_borrow_index: (wad_ray_math::ray() as u128), - current_variable_borrow_rate: 0, - current_stable_borrow_rate: 0, - last_update_timestamp: 0, - id: (count as u16), - a_token_address: a_token_tmpl, - stable_debt_token_address: stable_debt_token_impl, - variable_debt_token_address: variable_debt_token_impl, - interest_rate_strategy_address, - accrued_to_treasury: 0, - unbacked: 0, - isolation_mode_total_debt: 0, - }; - - // Add or update the ReserveData in the smart table - smart_table::add(&mut reserve_data_list.value, underlying_asset, reserve_data); - - // Update the reserve count - reserve_data_list.count = count; - - // update reserve address list - add_reserve_address_list(count, underlying_asset); - - // emit the ReserveInitialized event - event::emit(ReserveInitialized { - asset: underlying_asset, - a_token: a_token_tmpl, - stable_debt_token: stable_debt_token_impl, - variable_debt_token: variable_debt_token_impl, - interest_rate_strategy_address, - }) -} -``` - -> Solidity Source Code(Line: 82) -> Link: https://github.com/aave/aave-v3-core/blob/master/contracts/protocol/pool/PoolConfigurator.sol -### Configuration of pool resources -```bash= -struct ReserveConfigurationMap has key, store, copy, drop { - /// bit 0-15: LTV - /// bit 16-31: Liq. threshold - /// bit 32-47: Liq. bonus - /// bit 48-55: Decimals - /// bit 56: reserve is active - /// bit 57: reserve is frozen - /// bit 58: borrowing is enabled - /// bit 59: stable rate borrowing enabled - /// bit 60: asset is paused - /// bit 61: borrowing in isolation mode is enabled - /// bit 62: siloed borrowing enabled - /// bit 63: flashloaning enabled - /// bit 64-79: reserve factor - /// bit 80-115 borrow cap in whole tokens, borrowCap == 0 => no cap - /// bit 116-151 supply cap in whole tokens, supplyCap == 0 => no cap - /// bit 152-167 liquidation protocol fee - /// bit 168-175 eMode category - /// bit 176-211 unbacked mint cap in whole tokens, unbackedMintCap == 0 => minting disabled - /// bit 212-251 debt ceiling for isolation mode with (ReserveConfigurationMap::DEBT_CEILING_DECIMALS) decimals - /// bit 252-255 unused - data: u256, -} - -# Source Code: crest/blob/dev/aave-config/sources/reserve_config.move - -``` - -### Delete pool resources -- 1. Determine whether the resource address to be deleted is the 0 address, and exit if it is the 0 address. -- 2. Determine whether the resource to be deleted exists. If it does not exist, exit with an error. -- 3. Get variable_debt_token total_supply and determine whether total_supply is 0. If it is not 0, exit -- 4. Get the total_supply of a_token, and check a_debt_token_total_supply == 0 && reserve_data.accrued_to_treasury == 0, if the check fails, exit -- 5. Remove resources and the relationship between resource id and address -- 6. Update resource count=count-1 -```bash= -public fun drop_reserve(account: &signer, asset: address) acquires ReserveList, ReserveAddressesList { - assert!(asset != @0x0, error_config::get_ezero_address_not_valid()); - - // Get the signers address - let singer_address = signer::address_of(account); - // Borrow the ReserveList resource - let reserve_data_list = borrow_global_mut(singer_address); - // Assert that the asset is listed - assert!(smart_table::contains(&reserve_data_list.value, asset), error_config::get_easset_not_listed()); - - // Get the ReserveData - let reserve_data = smart_table::borrow(&reserve_data_list.value, asset); - - let variable_debt_token_total_supply = variable_token_factory::supply(reserve_data.variable_debt_token_address); - assert!(variable_debt_token_total_supply == 0, error_config::get_evariable_debt_supply_not_zero()); - - let a_debt_token_total_supply = a_token_factory::supply(reserve_data.a_token_address); - assert!( - a_debt_token_total_supply == 0 && reserve_data.accrued_to_treasury == 0, - error_config::get_eunderlying_claimable_rights_not_zero() - ); - - // Remove the ReserveData entry from the smart_table - smart_table::remove(&mut reserve_data_list.value, asset); - - // Remove ReserveAddressList - let reserve_address_list = borrow_global_mut(singer_address); - if (smart_table::contains(&reserve_address_list.value, (reserve_data.id as u256))) { - smart_table::remove(&mut reserve_address_list.value, (reserve_data.id as u256)); - }; - // Decrease the reserve count - reserve_data_list.count = reserve_data_list.count - 1; -} -``` -## User -> source code: crest/tree/dev/aave-supply-borrow/sources -### Supply -- 1. Update the status of the pool (update_state) -- 2. validate_supply -```bash= -// Supply Validate -public fun validate_supply(reserve_data: &ReserveData, amount: u256) { - assert!(amount != 0, error_config::get_einvalid_amount()); - let reserve_configuration = pool::get_reserve_configuration_by_reserve_data(reserve_data); - let (is_active, is_frozen, _, _, is_paused) = reserve_config::get_flags(&reserve_configuration); - assert!(is_active, error_config::get_ereserve_inactive()); - assert!(!is_paused, error_config::get_ereserve_paused()); - assert!(!is_frozen, error_config::get_ereserve_frozen()); - - let supply_cap = reserve_config::get_supply_cap(&reserve_configuration); - let a_token_supply = a_token_factory::supply(pool::get_reserve_token_address(reserve_data)); - let accrued_to_treasury_liquidity = wad_ray_math::ray_mul(pool::get_reserve_accrued_to_treasury(reserve_data), - (pool::get_reserve_liquidity_index(reserve_data) as u256) - ); - let total_supply = a_token_supply + accrued_to_treasury_liquidity + amount; - let max_supply = supply_cap * (10 ^ reserve_config::get_decimals(&reserve_configuration)); - - assert!(supply_cap == 0 || total_supply <= max_supply, error_config::get_esupply_cap_exceeded()); -} -``` -- 3. Update interest rates update_interest_rates -- 4. Transfer standard assets to aToken -- 5. Mint atoken to on_behalf_of account -- 6. Determine whether on_behalf_of is the first deposit. If so, verify whether it can be automatically used as collateral. -- 7. Update the mortgage configuration and save it to the asset configuration -- 8. Event of deposit submission -```bash= -public entry fun supply( - account: &signer, - asset: address, - amount: u256, - on_behalf_of: address, - referral_code: u16 -) { - let reserve_data = pool::get_reserve_data(asset); - pool::update_state(asset, &mut reserve_data); - validation_logic::validate_supply(&reserve_data, amount); - pool::update_interest_rates(&mut reserve_data, asset, amount, 0); - - let account_address = signer::address_of(account); - let token_a_address = pool::get_reserve_token_address(&reserve_data); - let a_token_account = a_token_factory::get_token_account_address(token_a_address); - // transfer the asset to the a_token address - underlying_token_factory::transfer_from( - account, - account_address, - a_token_account, - (amount as u64), - asset - ); - let is_first_supply: bool = a_token_factory::balance_of(account_address, token_a_address) == 0; - a_token_factory::mint( - account_address, - on_behalf_of, - amount, - (pool::get_reserve_liquidity_index(&reserve_data) as u256), - token_a_address - ); - if (is_first_supply) { - if (pool_validation::validate_automatic_use_as_collateral(account_address, asset)) { - let user_config_map = pool::get_user_configuration(on_behalf_of); - user_config::set_using_as_collateral(&mut user_config_map, - (pool::get_reserve_id(&reserve_data) as u256), true); - pool::set_user_configuration(on_behalf_of, user_config_map); - event::emit(ReserveUsedAsCollateralEnabled { - reserve: asset, - user: account_address - }); - } - }; - // Emit a supply event - event::emit(Supply { - reserve: asset, - user: account_address, - on_behalf_of, - amount, - referral_code, - }); -} -``` -### Withdraw -- 1. Update the status of the pool (update_state) -- 2. Get the account balance of the current withdrawal -- 3. Verify withdrawal validate_withdraw -```bash= -public fun validate_withdraw(reserve_data: &ReserveData, amount: u256, user_balance: u256) { - assert!(amount != 0, error_config::get_einvalid_amount()); - assert!(amount <= user_balance, error_config::get_enot_enough_available_user_balance()); - let reserve_configuration = pool::get_reserve_configuration_by_reserve_data(reserve_data); - let (is_active, _, _, _, is_paused) = reserve_config::get_flags(&reserve_configuration); - assert!(is_active, error_config::get_ereserve_inactive()); - assert!(!is_paused, error_config::get_ereserve_paused()); -} -``` -- 4. Update interest rates update_interest_rates -- 5. Determine whether it is collateral and whether the withdrawal amount is equal to the user's account balance. If so, update the status of the collateral to uncollateralized and publish an uncollateralized event. -- 5.burn atoken from on_behalf_of account -- 6. Determine whether it is collateral and whether it is borrowing money. If so, verify the health factor and loan ratio validateHFAndLtv -- 7. Submit the event of withdrawal -```bash= -public entry fun withdraw( - account: &signer, - asset: address, - amount: u256, - to: address, - user_emode_category: u8, -) { - let account_address = signer::address_of(account); - let (reserve_data, reserves_count) = pool::get_reserve_data_and_reserves_count(asset); - // update pool state - pool::update_state(asset, &mut reserve_data); - let user_balance = wad_ray_math::ray_mul( - a_token_factory::balance_of(account_address, pool::get_reserve_token_address(&reserve_data)), - (pool::get_reserve_liquidity_index(&reserve_data) as u256) - ); - let amount_to_withdraw = amount; - if (amount == math_utils::u256_max()) { - amount_to_withdraw = user_balance; - }; - - // validate withdraw - validation_logic::validate_withdraw(&reserve_data, amount_to_withdraw, user_balance); - - // update interest rates - pool::update_interest_rates(&mut reserve_data, asset, 0, amount_to_withdraw); - - let user_config_map = pool::get_user_configuration(account_address); - let reserve_id = pool::get_reserve_id(&reserve_data); - let is_collateral = user_config::is_using_as_collateral(&user_config_map, - (reserve_id as u256) - ); - - if (is_collateral && amount_to_withdraw == user_balance) { - user_config::set_using_as_collateral(&mut user_config_map, (reserve_id as u256), false); - pool::set_user_configuration(account_address, user_config_map); - event::emit(ReserveUsedAsCollateralDisabled { - reserve: asset, - user: account_address - }); - }; - - // burn a token - a_token_factory::burn( - account_address, - to, - amount_to_withdraw, - (pool::get_reserve_liquidity_index(&reserve_data) as u256), - pool::get_reserve_token_address(&reserve_data) - ); - - if (is_collateral && user_config::is_borrowing_any(&user_config_map)) { - let (emode_ltv, emode_liq_threshold, emode_asset_price) = emode_logic::get_emode_configuration( - user_emode_category - ); - pool_validation::validate_hf_and_ltv( - &mut reserve_data, - reserves_count, - &user_config_map, - account_address, - user_emode_category, - emode_ltv, - emode_liq_threshold, - emode_asset_price - ); - }; - // Emit a withdraw event - event::emit(Withdraw { - reserve: asset, - user: account_address, - to, - amount, - }); -} -``` -### Borrow -- 1. Update the status of the resource, mainly updating two fields: variableBorrowIndex and accumulatedToTreasury -- 2. Get the resource isolationModeActive activation status and isolationModeDebtCeiling isolation mode debt ceiling and isolationModeCollateralAddress isolation mode with address -- 3. Verify Borrow, whether it meets the conditions for borrowing - - 3.1 Verify that the amount of borrowed money cannot be 0 - ```bash= - require(params.amount != 0, Errors.INVALID_AMOUNT); - ``` - - 3.2 Get the resource configuration flags: active, frozen, borrowing is enabled, stable rate borrowing enabled, asset is paused and verify - ```bash= - struct ReserveConfigurationMap { - //bit 0-15: LTV - //bit 16-31: Liq. threshold - //bit 32-47: Liq. bonus - //bit 48-55: Decimals - //bit 56: reserve is active - //bit 57: reserve is frozen - //bit 58: borrowing is enabled - //bit 59: stable rate borrowing enabled - //bit 60: asset is paused - //bit 61: borrowing in isolation mode is enabled - //bit 62: siloed borrowing enabled - //bit 63: flashloaning enabled - //bit 64-79: reserve factor - //bit 80-115 borrow cap in whole tokens, borrowCap == 0 => no cap - //bit 116-151 supply cap in whole tokens, supplyCap == 0 => no cap - //bit 152-167 liquidation protocol fee - //bit 168-175 eMode category - //bit 176-211 unbacked mint cap in whole tokens, unbackedMintCap == 0 => minting disabled - //bit 212-251 debt ceiling for isolation mode with (ReserveConfiguration::DEBT_CEILING_DECIMALS) decimals - //bit 252-255 unused - - uint256 data; - } - - # Get the flag of the resource and verify it - ( - vars.isActive, - vars.isFrozen, - vars.borrowingEnabled, - vars.stableRateBorrowingEnabled, - vars.isPaused - ) = params.reserveCache.reserveConfiguration.getFlags(); - - require(vars.isActive, Errors.RESERVE_INACTIVE); - require(!vars.isPaused, Errors.RESERVE_PAUSED); - require(!vars.isFrozen, Errors.RESERVE_FROZEN); - require(vars.borrowingEnabled, Errors.BORROWING_NOT_ENABLED); - ``` - - - 3.3 Verify whether borrowing is allowed through oracle sentinel isBorrowAllowed - - 3.4 Judgment interestRateMode must be one of two types of interest rates: variable and immutable. - - 3.5 By obtaining the total debt, determine whether the maximum number of borrowable Tokens exceeds BORROW_CAP_EXCEEDED - - 3.6 Check whether the borrowed assets can be borrowed in isolation mode and the total risk exposure is not greater than the mortgage debt limit - - 3.7 Determine the resource EModeCategory must be equal to the user's userEModeCategory - - 3.8 Calculate user account data (user collateral is base currency, user base currency debt, user's maximum loan value, health factor) and verify the data - ```bash= - require(vars.userCollateralInBaseCurrency != 0, Errors.COLLATERAL_BALANCE_IS_ZERO); - require(vars.currentLtv != 0, Errors.LTV_VALIDATION_FAILED); - - require( - vars.healthFactor > HEALTH_FACTOR_LIQUIDATION_THRESHOLD, - Errors.HEALTH_FACTOR_LOWER_THAN_LIQUIDATION_THRESHOLD - ); - ``` - - 3.9 Determine whether the collateral can cover the new borrowing - ```bash= - vars.amountInBaseCurrency = - IPriceOracleGetter(params.oracle).getAssetPrice( - vars.eModePriceSource != address(0) ? vars.eModePriceSource : params.asset - ) * params.amount; - - unchecked { - vars.amountInBaseCurrency /= vars.assetUnit; - } - - //add the current already borrowed amount to the amount requested to calculate the total collateral needed. - vars.collateralNeededInBaseCurrency = (vars.userDebtInBaseCurrency + vars.amountInBaseCurrency) - .percentDiv(vars.currentLtv); //LTV is calculated in percentage - - require( - vars.collateralNeededInBaseCurrency <= vars.userCollateralInBaseCurrency, - Errors.COLLATERAL_CANNOT_COVER_NEW_BORROW - ); - ``` - - 4.0 Check if the user has borrowed from any reserves - ```bash= - if (params.userConfig.isBorrowingAny()) { - (vars.siloedBorrowingEnabled, vars.siloedBorrowingAddress) = params - .userConfig - .getSiloedBorrowingState(reservesData, reservesList); - - if (vars.siloedBorrowingEnabled) { - require(vars.siloedBorrowingAddress == params.asset, Errors.SILOED_BORROWING_VIOLATION); - } else { - require( - !params.reserveCache.reserveConfiguration.getSiloedBorrowing(), - Errors.SILOED_BORROWING_VIOLATION - ); - } - } - } - ``` -- 4. According to the interest rate model, Mint specifies the number of Tokens corresponding to the interest rate and gives them to the borrower. -- 5. Determine whether it is the first time to borrow money. If it is the first time to borrow money, modify the user's status and call setBorrowing(reserve.id, true) to set the user's borrowing resources to true. -- 6. Determine whether it is isolationModeActive. If activated, obtain the total debt in the next isolation mode and submit the event to update the status of the isolation mode IsolationModeTotalDebtUpdated -- 7. Recalculate the interest rate updateInterestRates and update the currentLiquidityRate, currentStableBorrowRate, currentVariableBorrowRate of the resource and submit the event -```bash= -event ReserveDataUpdated( - address indexed reserve, - uint256 liquidityRate, - uint256 stableBorrowRate, - uint256 variableBorrowRate, - uint256 liquidityIndex, - uint256 variableBorrowIndex -); -``` -- 8. Determine whether releaseUnderlying == true, if true, transfer the token amount of the loan to the current user -- 9. Submit loan event -```bash= -event Borrow( - address indexed reserve, - address user, - address indexed onBehalfOf, - uint256 amount, - DataTypes.InterestRateMode interestRateMode, - uint256 borrowRate, - uint16 indexed referralCode -); -``` -### Repay -- 1. Update the status of repayment resources (mainly update two fields: variableBorrowIndex and accruedToTreasury) -```bash= - function executeRepay( - mapping(address => DataTypes.ReserveData) storage reservesData, - mapping(uint256 => address) storage reservesList, - DataTypes.UserConfigurationMap storage userConfig, - DataTypes.ExecuteRepayParams memory params -) external returns (uint256) { - DataTypes.ReserveData storage reserve = reservesData[params.asset]; - DataTypes.ReserveCache memory reserveCache = reserve.cache(); - reserve.updateState(reserveCache); -} -``` -- 2. Obtain the current user's debt (including variable interest rate debt and non-variable interest rate debt) -```bash= -(uint256 stableDebt, uint256 variableDebt) = Helpers.getUserCurrentDebt( - params.onBehalfOf, - reserveCache - ); -``` -- 3. validate Repay -```bash= - ValidationLogic.validateRepay( - reserveCache, - params.amount, - params.interestRateMode, - params.onBehalfOf, - stableDebt, - variableDebt - ); - /** - * @notice Validates a repay action. - * @param reserveCache The cached data of the reserve - * @param amountSent The amount sent for the repayment. Can be an actual value or uint(-1) - * @param interestRateMode The interest rate mode of the debt being repaid - * @param onBehalfOf The address of the user msg.sender is repaying for - * @param stableDebt The borrow balance of the user - * @param variableDebt The borrow balance of the user - */ - function validateRepay( - DataTypes.ReserveCache memory reserveCache, - uint256 amountSent, - DataTypes.InterestRateMode interestRateMode, - address onBehalfOf, - uint256 stableDebt, - uint256 variableDebt - ) internal view { - # step1. The repayment amount cannot be 0 - require(amountSent != 0, Errors.INVALID_AMOUNT); - - require( - amountSent != type(uint256).max || msg.sender == onBehalfOf, - Errors.NO_EXPLICIT_AMOUNT_TO_REPAY_ON_BEHALF - ); - - (bool isActive, , , , bool isPaused) = reserveCache.reserveConfiguration.getFlags(); - require(isActive, Errors.RESERVE_INACTIVE); - require(!isPaused, Errors.RESERVE_PAUSED); - - require( - (stableDebt != 0 && interestRateMode == DataTypes.InterestRateMode.STABLE) || - (variableDebt != 0 && interestRateMode == DataTypes.InterestRateMode.VARIABLE), - Errors.NO_DEBT_OF_SELECTED_TYPE - ); - } -``` -- 4. Get the payback amount -```bash= - uint256 paybackAmount = params.interestRateMode == DataTypes.InterestRateMode.STABLE - ? stableDebt - : variableDebt; - -// Allows a user to repay with aTokens without leaving dust from interest. -if (params.useATokens && params.amount == type(uint256).max) { - params.amount = IAToken(reserveCache.aTokenAddress).balanceOf(msg.sender); -} - -if (params.amount < paybackAmount) { - paybackAmount = params.amount; -} -``` - -- 5.Burn the specified number of tokens according to the interest rate model -```bash= -if (params.interestRateMode == DataTypes.InterestRateMode.STABLE) { - (reserveCache.nextTotalStableDebt, reserveCache.nextAvgStableBorrowRate) = IStableDebtToken( - reserveCache.stableDebtTokenAddress - ).burn(params.onBehalfOf, paybackAmount); -} else { - reserveCache.nextScaledVariableDebt = IVariableDebtToken( - reserveCache.variableDebtTokenAddress - ).burn(params.onBehalfOf, paybackAmount, reserveCache.nextVariableBorrowIndex); -} -``` -- 6.Recalculate the interest rate updateInterestRates and update the currentLiquidityRate, currentStableBorrowRate, currentVariableBorrowRate of the resource and submit the event -```bash= -function updateInterestRates( - DataTypes.ReserveData storage reserve, - DataTypes.ReserveCache memory reserveCache, - address reserveAddress, - uint256 liquidityAdded, - uint256 liquidityTaken - ) internal { - UpdateInterestRatesLocalVars memory vars; - - vars.totalVariableDebt = reserveCache.nextScaledVariableDebt.rayMul( - reserveCache.nextVariableBorrowIndex - ); - - ( - vars.nextLiquidityRate, - vars.nextStableRate, - vars.nextVariableRate - ) = IReserveInterestRateStrategy(reserve.interestRateStrategyAddress).calculateInterestRates( - DataTypes.CalculateInterestRatesParams({ - unbacked: reserve.unbacked, - liquidityAdded: liquidityAdded, - liquidityTaken: liquidityTaken, - totalStableDebt: reserveCache.nextTotalStableDebt, - totalVariableDebt: vars.totalVariableDebt, - averageStableBorrowRate: reserveCache.nextAvgStableBorrowRate, - reserveFactor: reserveCache.reserveFactor, - reserve: reserveAddress, - aToken: reserveCache.aTokenAddress - }) - ); - - reserve.currentLiquidityRate = vars.nextLiquidityRate.toUint128(); - reserve.currentStableBorrowRate = vars.nextStableRate.toUint128(); - reserve.currentVariableBorrowRate = vars.nextVariableRate.toUint128(); - - emit ReserveDataUpdated( - reserveAddress, - vars.nextLiquidityRate, - vars.nextStableRate, - vars.nextVariableRate, - reserveCache.nextLiquidityIndex, - reserveCache.nextVariableBorrowIndex - ); -} -``` -- 7. Calculate variable and immutable debt - whether the investment recovery amount is equal to 0, if equal to 0, update the status of the resource the user is borrowing to false -```bash= -if (stableDebt + variableDebt - paybackAmount == 0) { - userConfig.setBorrowing(reserve.id, false); -} -``` -- 8. updated the isolated debt whenever a position collateralized by an isolated asset is repaid or liquidated -```bash= -IsolationModeLogic.updateIsolatedDebtIfIsolated( - reservesData, - reservesList, - userConfig, - reserveCache, - paybackAmount -); -``` -- 9. Determine whether the user uses token to repay the loan -```bash= -if (params.useATokens) { - IAToken(reserveCache.aTokenAddress).burn( - msg.sender, - reserveCache.aTokenAddress, - paybackAmount, - reserveCache.nextLiquidityIndex - ); -} else { - IERC20(params.asset).safeTransferFrom(msg.sender, reserveCache.aTokenAddress, paybackAmount); - IAToken(reserveCache.aTokenAddress).handleRepayment( - msg.sender, - params.onBehalfOf, - paybackAmount - ); -} -``` -- 10. Submit repayment event -```bash= -event Repay( - address indexed reserve, - address indexed user, - address indexed repayer, - uint256 amount, - bool useATokens -); -emit Repay(params.asset, params.onBehalfOf, msg.sender, paybackAmount, params.useATokens); -``` -### Liquidation -- 1. Obtain mortgage resources and debt assets and update debt assets (mainly update two fields: variableBorrowIndex and accruedToTreasury) -```bash= -function executeLiquidationCall( - mapping(address => DataTypes.ReserveData) storage reservesData, - mapping(uint256 => address) storage reservesList, - mapping(address => DataTypes.UserConfigurationMap) storage usersConfig, - mapping(uint8 => DataTypes.EModeCategory) storage eModeCategories, - DataTypes.ExecuteLiquidationCallParams memory params -) external { - LiquidationCallLocalVars memory vars; - - DataTypes.ReserveData storage collateralReserve = reservesData[params.collateralAsset]; - DataTypes.ReserveData storage debtReserve = reservesData[params.debtAsset]; - DataTypes.UserConfigurationMap storage userConfig = usersConfig[params.user]; - vars.debtReserveCache = debtReserve.cache(); - debtReserve.updateState(vars.debtReserveCache); -``` -- 2. Calculate user data and obtain health factor -```bash= -(,,,, vars.healthFactor,) = GenericLogic.calculateUserAccountData( - reservesData, - reservesList, - eModeCategories, - DataTypes.CalculateUserAccountDataParams({ - userConfig: userConfig, - reservesCount: params.reservesCount, - user: params.user, - oracle: params.priceOracle, - userEModeCategory: params.userEModeCategory - }) -); -``` -- 3. Calculate Debt Gets the user's total debt with variable interest rates, the user's total debt and debts that need to be liquidated -```bash= -function _calculateDebt( - DataTypes.ReserveCache memory debtReserveCache, - DataTypes.ExecuteLiquidationCallParams memory params, - uint256 healthFactor -) internal view returns (uint256, uint256, uint256) { - (uint256 userStableDebt, uint256 userVariableDebt) = Helpers.getUserCurrentDebt( - params.user, - debtReserveCache - ); - - uint256 userTotalDebt = userStableDebt + userVariableDebt; - - uint256 closeFactor = healthFactor > CLOSE_FACTOR_HF_THRESHOLD - ? DEFAULT_LIQUIDATION_CLOSE_FACTOR - : MAX_LIQUIDATION_CLOSE_FACTOR; - - uint256 maxLiquidatableDebt = userTotalDebt.percentMul(closeFactor); - - uint256 actualDebtToLiquidate = params.debtToCover > maxLiquidatableDebt - ? maxLiquidatableDebt - : params.debtToCover; - - return (userVariableDebt, userTotalDebt, actualDebtToLiquidate); -} -``` -- 4.validate liquidation -```bash= -ValidationLogic.validateLiquidationCall( - userConfig, - collateralReserve, - DataTypes.ValidateLiquidationCallParams({ - debtReserveCache: vars.debtReserveCache, - totalDebt: vars.userTotalDebt, - healthFactor: vars.healthFactor, - priceOracleSentinel: params.priceOracleSentinel - }) -); - -function validateLiquidationCall( - DataTypes.UserConfigurationMap storage userConfig, - DataTypes.ReserveData storage collateralReserve, - DataTypes.ValidateLiquidationCallParams memory params -) internal view { - ValidateLiquidationCallLocalVars memory vars; - - (vars.collateralReserveActive, , , , vars.collateralReservePaused) = collateralReserve - .configuration - .getFlags(); - - (vars.principalReserveActive, , , , vars.principalReservePaused) = params - .debtReserveCache - .reserveConfiguration - .getFlags(); - - # step1. Verify the active status of the collateral and primary debt, must be active - require(vars.collateralReserveActive && vars.principalReserveActive, Errors.RESERVE_INACTIVE); - # step2. Verify the moratorium status of the collateral and primary debt, which must be non-moratorium - require(!vars.collateralReservePaused && !vars.principalReservePaused, Errors.RESERVE_PAUSED); - - # step3. Verify whether the conditions to allow forced liquidation are met - require( - params.priceOracleSentinel == address(0) || - params.healthFactor < MINIMUM_HEALTH_FACTOR_LIQUIDATION_THRESHOLD || - IPriceOracleSentinel(params.priceOracleSentinel).isLiquidationAllowed(), - Errors.PRICE_ORACLE_SENTINEL_CHECK_FAILED - ); - # step4. Verify that the health factor is not below the threshold - require( - params.healthFactor < HEALTH_FACTOR_LIQUIDATION_THRESHOLD, - Errors.HEALTH_FACTOR_NOT_BELOW_THRESHOLD - ); - - vars.isCollateralEnabled = - collateralReserve.configuration.getLiquidationThreshold() != 0 && - userConfig.isUsingAsCollateral(collateralReserve.id); - - //if collateral is not enabled as collateral by user, it cannot be liquidated - # step4. Verify whether the collateral has been enabled, if so, an error will be reported - require(vars.isCollateralEnabled, Errors.COLLATERAL_CANNOT_BE_LIQUIDATED); - # step5. Verify that the total debt cannot be 0. If it is 0, an error will be reported. - require(params.totalDebt != 0, Errors.SPECIFIED_CURRENCY_NOT_BORROWED_BY_USER); -} -``` -- 5. Get configuration data -```bash= -( - vars.collateralAToken, - vars.collateralPriceSource, - vars.debtPriceSource, - vars.liquidationBonus -) = _getConfigurationData(eModeCategories, collateralReserve, params); - -/** -* @notice Returns the configuration data for the debt and the collateral reserves. -* @param eModeCategories The configuration of all the efficiency mode categories -* @param collateralReserve The data of the collateral reserve -* @param params The additional parameters needed to execute the liquidation function -* @return The collateral aToken -* @return The address to use as price source for the collateral -* @return The address to use as price source for the debt -* @return The liquidation bonus to apply to the collateral -*/ -function _getConfigurationData( - mapping(uint8 => DataTypes.EModeCategory) storage eModeCategories, - DataTypes.ReserveData storage collateralReserve, - DataTypes.ExecuteLiquidationCallParams memory params -) internal view returns (IAToken, address, address, uint256) { - IAToken collateralAToken = IAToken(collateralReserve.aTokenAddress); - uint256 liquidationBonus = collateralReserve.configuration.getLiquidationBonus(); - - address collateralPriceSource = params.collateralAsset; - address debtPriceSource = params.debtAsset; - - if (params.userEModeCategory != 0) { - address eModePriceSource = eModeCategories[params.userEModeCategory].priceSource; - - if ( - EModeLogic.isInEModeCategory( - params.userEModeCategory, - collateralReserve.configuration.getEModeCategory() - ) - ) { - liquidationBonus = eModeCategories[params.userEModeCategory].liquidationBonus; - - if (eModePriceSource != address(0)) { - collateralPriceSource = eModePriceSource; - } - } - - // when in eMode, debt will always be in the same eMode category, can skip matching category check - if (eModePriceSource != address(0)) { - debtPriceSource = eModePriceSource; - } - } - - return (collateralAToken, collateralPriceSource, debtPriceSource, liquidationBonus); -} -``` -- 6.Get the user's collateral balance -```bash= -vars.userCollateralBalance = vars.collateralAToken.balanceOf(params.user); -``` -- 7.Calculate available collateral for liquidation -```bash= - ( - vars.actualCollateralToLiquidate, - vars.actualDebtToLiquidate, - vars.liquidationProtocolFeeAmount -) = _calculateAvailableCollateralToLiquidate( - collateralReserve, - vars.debtReserveCache, - vars.collateralPriceSource, - vars.debtPriceSource, - vars.actualDebtToLiquidate, - vars.userCollateralBalance, - vars.liquidationBonus, - IPriceOracleGetter(params.priceOracle) -); -``` -- 8.It is judged that the user's total debt is equal to the actual debt to be liquidated. If the conditions are met, the borrowing resources will be updated to the unborrowable state. -```bash= -if (vars.userTotalDebt == vars.actualDebtToLiquidate) { - userConfig.setBorrowing(debtReserve.id, false); -} -``` -- 9.If the liquidated collateral equals the user balance, we set the currency to no longer be used as collateral, and submit a collateral disable event -```bash= -if ( - vars.actualCollateralToLiquidate + vars.liquidationProtocolFeeAmount == - vars.userCollateralBalance -) { - userConfig.setUsingAsCollateral(collateralReserve.id, false); - emit ReserveUsedAsCollateralDisabled(params.collateralAsset, params.user); -} -``` -- 10.Burn Debt Token -```bash= -function _burnDebtTokens( - DataTypes.ExecuteLiquidationCallParams memory params, - LiquidationCallLocalVars memory vars -) internal { - if (vars.userVariableDebt >= vars.actualDebtToLiquidate) { - vars.debtReserveCache.nextScaledVariableDebt = IVariableDebtToken( - vars.debtReserveCache.variableDebtTokenAddress - ).burn( - params.user, - vars.actualDebtToLiquidate, - vars.debtReserveCache.nextVariableBorrowIndex - ); - } else { - // If the user does not have variable debt, no need to try to burn variable debt tokens - if (vars.userVariableDebt != 0) { - vars.debtReserveCache.nextScaledVariableDebt = IVariableDebtToken( - vars.debtReserveCache.variableDebtTokenAddress - ).burn(params.user, vars.userVariableDebt, vars.debtReserveCache.nextVariableBorrowIndex); - } - ( - vars.debtReserveCache.nextTotalStableDebt, - vars.debtReserveCache.nextAvgStableBorrowRate - ) = IStableDebtToken(vars.debtReserveCache.stableDebtTokenAddress).burn( - params.user, - vars.actualDebtToLiquidate - vars.userVariableDebt - ); - } -} -``` -- 11. Recalculate the interest rate of the debt resource updateInterestRates and update the currentLiquidityRate, currentStableBorrowRate, currentVariableBorrowRate of the resource and submit the event -```bash= -function updateInterestRates( - DataTypes.ReserveData storage reserve, - DataTypes.ReserveCache memory reserveCache, - address reserveAddress, - uint256 liquidityAdded, - uint256 liquidityTaken - ) internal { - UpdateInterestRatesLocalVars memory vars; - - vars.totalVariableDebt = reserveCache.nextScaledVariableDebt.rayMul( - reserveCache.nextVariableBorrowIndex - ); - - ( - vars.nextLiquidityRate, - vars.nextStableRate, - vars.nextVariableRate - ) = IReserveInterestRateStrategy(reserve.interestRateStrategyAddress).calculateInterestRates( - DataTypes.CalculateInterestRatesParams({ - unbacked: reserve.unbacked, - liquidityAdded: liquidityAdded, - liquidityTaken: liquidityTaken, - totalStableDebt: reserveCache.nextTotalStableDebt, - totalVariableDebt: vars.totalVariableDebt, - averageStableBorrowRate: reserveCache.nextAvgStableBorrowRate, - reserveFactor: reserveCache.reserveFactor, - reserve: reserveAddress, - aToken: reserveCache.aTokenAddress - }) - ); - - reserve.currentLiquidityRate = vars.nextLiquidityRate.toUint128(); - reserve.currentStableBorrowRate = vars.nextStableRate.toUint128(); - reserve.currentVariableBorrowRate = vars.nextVariableRate.toUint128(); - - emit ReserveDataUpdated( - reserveAddress, - vars.nextLiquidityRate, - vars.nextStableRate, - vars.nextVariableRate, - reserveCache.nextLiquidityIndex, - reserveCache.nextVariableBorrowIndex - ); -} -``` -- 12.updated the isolated debt whenever a position collateralized by an isolated asset is repaid or liquidated -```bash= -IsolationModeLogic.updateIsolatedDebtIfIsolated( - reservesData, - reservesList, - userConfig, - reserveCache, - paybackAmount -); -``` -- 13. Determine whether to liquidate with atoken (1. If liquidating with atoken: liquidate the user aToken by transferring them to the liquidator 2. If liquidating without atoken: destroy the collateral aTokens and transfer the underlying standard debt Token to the liquidator) -```bash= - if (params.receiveAToken) { - _liquidateATokens(reservesData, reservesList, usersConfig, collateralReserve, params, vars); -} else { - _burnCollateralATokens(collateralReserve, params, vars); -} -``` - -- 14.If it is judged that the amount of the liquidation agreement fee is not equal to 0, then the amount of the liquidation agreement fee will be transferred to the treasury of the collateral token. -```bash= -// Transfer fee to treasury if it is non-zero -if (vars.liquidationProtocolFeeAmount != 0) { - uint256 liquidityIndex = collateralReserve.getNormalizedIncome(); - uint256 scaledDownLiquidationProtocolFee = vars.liquidationProtocolFeeAmount.rayDiv( - liquidityIndex - ); - uint256 scaledDownUserBalance = vars.collateralAToken.scaledBalanceOf(params.user); - // To avoid trying to send more aTokens than available on balance, due to 1 wei imprecision - if (scaledDownLiquidationProtocolFee > scaledDownUserBalance) { - vars.liquidationProtocolFeeAmount = scaledDownUserBalance.rayMul(liquidityIndex); - } - vars.collateralAToken.transferOnLiquidation( - params.user, - vars.collateralAToken.RESERVE_TREASURY_ADDRESS(), - vars.liquidationProtocolFeeAmount - ); -} -``` -- 15.Transfer debt assets that are being repaid to aToken to maintain liquidity -```bash= -IERC20(params.debtAsset).safeTransferFrom( - msg.sender, - vars.debtReserveCache.aTokenAddress, - vars.actualDebtToLiquidate -); - -IAToken(vars.debtReserveCache.aTokenAddress).handleRepayment( - msg.sender, - params.user, - vars.actualDebtToLiquidate -); -``` -- 16.Submit liquidation event -```bash= -event LiquidationCall( - address indexed collateralAsset, - address indexed debtAsset, - address indexed user, - uint256 debtToCover, - uint256 liquidatedCollateralAmount, - address liquidator, - bool receiveAToken -); - -emit LiquidationCall( - params.collateralAsset, - params.debtAsset, - params.user, - vars.actualDebtToLiquidate, - vars.actualCollateralToLiquidate, - msg.sender, - params.receiveAToken -); -``` -## Bridge -> source code: crest/blob/dev/aave-bridge/sources/bridge_logic.move - -### MintUnbacked -- 1.Get resource data and update resource status - -```bash= -function executeMintUnbacked( - mapping(address => DataTypes.ReserveData) storage reservesData, - mapping(uint256 => address) storage reservesList, - DataTypes.UserConfigurationMap storage userConfig, - address asset, - uint256 amount, - address onBehalfOf, - uint16 referralCode - ) external { - DataTypes.ReserveData storage reserve = reservesData[asset]; - DataTypes.ReserveCache memory reserveCache = reserve.cache(); - - reserve.updateState(reserveCache); -``` -- 2. validate supply -```bash= - -ValidationLogic.validateSupply(reserveCache, reserve, amount); - -function validateSupply( - DataTypes.ReserveCache memory reserveCache, - DataTypes.ReserveData storage reserve, - uint256 amount -) internal view { - require(amount != 0, Errors.INVALID_AMOUNT); - - (bool isActive, bool isFrozen, , , bool isPaused) = reserveCache - .reserveConfiguration - .getFlags(); - require(isActive, Errors.RESERVE_INACTIVE); - require(!isPaused, Errors.RESERVE_PAUSED); - require(!isFrozen, Errors.RESERVE_FROZEN); - - uint256 supplyCap = reserveCache.reserveConfiguration.getSupplyCap(); - require( - supplyCap == 0 || - ((IAToken(reserveCache.aTokenAddress).scaledTotalSupply() + - uint256(reserve.accruedToTreasury)).rayMul(reserveCache.nextLiquidityIndex) + amount) <= - supplyCap * (10 ** reserveCache.reserveConfiguration.getDecimals()), - Errors.SUPPLY_CAP_EXCEEDED - ); -} -``` -- 3. Get unbacked in the resource and determine whether unbacked exceeds the maximum value -```bash= -uint256 unbackedMintCap = reserveCache.reserveConfiguration.getUnbackedMintCap(); -uint256 reserveDecimals = reserveCache.reserveConfiguration.getDecimals(); - -uint256 unbacked = reserve.unbacked += amount.toUint128(); - -require( - unbacked <= unbackedMintCap * (10 ** reserveDecimals), - Errors.UNBACKED_MINT_CAP_EXCEEDED -); -``` - -- 4.Recalculate the interest rate of the debt resource updateInterestRates and update the currentLiquidityRate, currentStableBorrowRate, currentVariableBorrowRate of the resource and submit the event -```bash= -reserve.updateInterestRates(reserveCache, asset, 0, 0); - -function updateInterestRates( - DataTypes.ReserveData storage reserve, - DataTypes.ReserveCache memory reserveCache, - address reserveAddress, - uint256 liquidityAdded, - uint256 liquidityTaken - ) internal { - UpdateInterestRatesLocalVars memory vars; - - vars.totalVariableDebt = reserveCache.nextScaledVariableDebt.rayMul( - reserveCache.nextVariableBorrowIndex - ); - - ( - vars.nextLiquidityRate, - vars.nextStableRate, - vars.nextVariableRate - ) = IReserveInterestRateStrategy(reserve.interestRateStrategyAddress).calculateInterestRates( - DataTypes.CalculateInterestRatesParams({ - unbacked: reserve.unbacked, - liquidityAdded: liquidityAdded, - liquidityTaken: liquidityTaken, - totalStableDebt: reserveCache.nextTotalStableDebt, - totalVariableDebt: vars.totalVariableDebt, - averageStableBorrowRate: reserveCache.nextAvgStableBorrowRate, - reserveFactor: reserveCache.reserveFactor, - reserve: reserveAddress, - aToken: reserveCache.aTokenAddress - }) - ); - - reserve.currentLiquidityRate = vars.nextLiquidityRate.toUint128(); - reserve.currentStableBorrowRate = vars.nextStableRate.toUint128(); - reserve.currentVariableBorrowRate = vars.nextVariableRate.toUint128(); - - emit ReserveDataUpdated( - reserveAddress, - vars.nextLiquidityRate, - vars.nextStableRate, - vars.nextVariableRate, - reserveCache.nextLiquidityIndex, - reserveCache.nextVariableBorrowIndex - ); -} -``` -- 5. Mint atoken to on_behalf_of account -- 6. Determine whether on_behalf_of is the first deposit. If so, verify whether it can be automatically used as collateral. -```bash= -bool isFirstSupply = IAToken(reserveCache.aTokenAddress).mint( - msg.sender, - onBehalfOf, - amount, - reserveCache.nextLiquidityIndex -); - -if (isFirstSupply) { - if ( - ValidationLogic.validateAutomaticUseAsCollateral( - reservesData, - reservesList, - userConfig, - reserveCache.reserveConfiguration, - reserveCache.aTokenAddress - ) - ) { - userConfig.setUsingAsCollateral(reserve.id, true); - emit ReserveUsedAsCollateralEnabled(asset, onBehalfOf); - } -} -``` -- 7. Submit MintUnbacked event -```bash= -event MintUnbacked( - address indexed reserve, - address user, - address indexed onBehalfOf, - uint256 amount, - uint16 indexed referralCode -); -emit MintUnbacked(asset, msg.sender, onBehalfOf, amount, referralCode); -``` - -### BackUnbacked -- 1.Get resource data and update resource status -```bash= - function executeBackUnbacked( - DataTypes.ReserveData storage reserve, - address asset, - uint256 amount, - uint256 fee, - uint256 protocolFeeBps - ) external returns (uint256) { - DataTypes.ReserveCache memory reserveCache = reserve.cache(); - - reserve.updateState(reserveCache); -``` -- 2.Update resourcesaccruedToTreasury and unbacked fields -```bash= -uint256 backingAmount = (amount < reserve.unbacked) ? amount : reserve.unbacked; - -uint256 feeToProtocol = fee.percentMul(protocolFeeBps); -uint256 feeToLP = fee - feeToProtocol; -uint256 added = backingAmount + fee; - -reserveCache.nextLiquidityIndex = reserve.cumulateToLiquidityIndex( - IERC20(reserveCache.aTokenAddress).totalSupply() + - uint256(reserve.accruedToTreasury).rayMul(reserveCache.nextLiquidityIndex), - feeToLP -); - -reserve.accruedToTreasury += feeToProtocol.rayDiv(reserveCache.nextLiquidityIndex).toUint128(); - -reserve.unbacked -= backingAmount.toUint128(); -``` -- 3.Recalculate the interest rate of the debt resource updateInterestRates and update the currentLiquidityRate, currentStableBorrowRate, currentVariableBorrowRate of the resource and submit the event -```bash= -reserve.updateInterestRates(reserveCache, asset, added, 0); - -function updateInterestRates( - DataTypes.ReserveData storage reserve, - DataTypes.ReserveCache memory reserveCache, - address reserveAddress, - uint256 liquidityAdded, - uint256 liquidityTaken - ) internal { - UpdateInterestRatesLocalVars memory vars; - - vars.totalVariableDebt = reserveCache.nextScaledVariableDebt.rayMul( - reserveCache.nextVariableBorrowIndex - ); - - ( - vars.nextLiquidityRate, - vars.nextStableRate, - vars.nextVariableRate - ) = IReserveInterestRateStrategy(reserve.interestRateStrategyAddress).calculateInterestRates( - DataTypes.CalculateInterestRatesParams({ - unbacked: reserve.unbacked, - liquidityAdded: liquidityAdded, - liquidityTaken: liquidityTaken, - totalStableDebt: reserveCache.nextTotalStableDebt, - totalVariableDebt: vars.totalVariableDebt, - averageStableBorrowRate: reserveCache.nextAvgStableBorrowRate, - reserveFactor: reserveCache.reserveFactor, - reserve: reserveAddress, - aToken: reserveCache.aTokenAddress - }) - ); - - reserve.currentLiquidityRate = vars.nextLiquidityRate.toUint128(); - reserve.currentStableBorrowRate = vars.nextStableRate.toUint128(); - reserve.currentVariableBorrowRate = vars.nextVariableRate.toUint128(); - - emit ReserveDataUpdated( - reserveAddress, - vars.nextLiquidityRate, - vars.nextStableRate, - vars.nextVariableRate, - reserveCache.nextLiquidityIndex, - reserveCache.nextVariableBorrowIndex - ); -} -``` -- 4. Transfer standard assets to the corresponding token address -```bash= -IERC20(asset).safeTransferFrom(msg.sender, reserveCache.aTokenAddress, added); -``` - -- 5. Submit BackUnbacked event -```bash= -emit BackUnbacked(asset, msg.sender, backingAmount, fee); -``` \ No newline at end of file diff --git a/Makefile b/Makefile index 4bb137b..28c04cc 100644 --- a/Makefile +++ b/Makefile @@ -3,57 +3,74 @@ ifndef GITHUB_ACTIONS -include .env endif -# default env values -APTOS_NETWORK ?= local -ARTIFACTS_LEVEL ?= all -DEFAULT_FUND_AMOUNT ?= 100000000 -DEFAULT_FUNDER_PRIVATE_KEY ?= 0x0 -PYTH_HERMES_URL ?= https://hermes-beta.pyth.network -PYTH_CONTRACT_ACCOUNT ?= 0x0 -PYTH_DEPLOYER_ACCOUNT ?= 0x0 -PYTH_WORMHOLE ?= 0x0 +# ===================== PROFILES ===================== # -# ===================== PRIVATE KEYS ===================== # +# aave base profiles +AAVE_BASE_PROFILES_KEY_MAP = aave_acl=$(AAVE_ACL_PRIVATE_KEY) \ + aave_config=$(AAVE_CONFIG_PRIVATE_KEY) \ + aave_math=$(AAVE_MATH_PRIVATE_KEY) \ + aave_rate=$(AAVE_RATE_PRIVATE_KEY) \ + aave_oracle=$(AAVE_ORACLE_PRIVATE_KEY) \ + aave_pool=$(AAVE_POOL_PRIVATE_KEY) \ + a_tokens=$(A_TOKENS_PRIVATE_KEY) \ + underlying_tokens=$(UNDERLYING_TOKENS_PRIVATE_KEY) \ + variable_tokens=$(VARIABLE_TOKENS_PRIVATE_KEY) \ + aave_large_packages=$(AAVE_LARGE_PACKAGES_PRIVATE_KEY) \ + aave_data=$(AAVE_DATA_PRIVATE_KEY) + +ifeq ($(APTOS_NETWORK), local) + AAVE_PROFILES_KEY_MAP = $(AAVE_BASE_PROFILES_KEY_MAP) data_feeds=$(AAVE_DATA_FEEDS_PRIVATE_KEY) platform=$(AAVE_PLATFORM_PRIVATE_KEY) +else + AAVE_PROFILES_KEY_MAP = $(AAVE_BASE_PROFILES_KEY_MAP) +endif -LARGE_PACKAGES_ACCOUNT_PRIVATE_KEY := 0xc9680e7b29b0a03344fb7e774f9919e5a99b62d25f4c00d91542571dde0e56e6 +AAVE_PROFILES := $(shell echo $(AAVE_PROFILES_KEY_MAP) | tr ' ' '\n' | cut -d '=' -f1) -# ===================== PROFILES ===================== # +# test user profiles +TEST_PROFILES_KEY_MAP = test_account_0=$(TEST_ACCOUNT_0_PRIVATE_KEY) \ + test_account_1=$(TEST_ACCOUNT_1_PRIVATE_KEY) \ + test_account_2=$(TEST_ACCOUNT_2_PRIVATE_KEY) \ + test_account_3=$(TEST_ACCOUNT_3_PRIVATE_KEY) \ + test_account_4=$(TEST_ACCOUNT_4_PRIVATE_KEY) \ + test_account_5=$(TEST_ACCOUNT_5_PRIVATE_KEY) -PROFILES := aave_acl \ - aave_config \ - aave_math \ - aave_oracle \ - aave_mock_oracle \ - aave_pool \ - a_tokens \ - underlying_tokens \ - variable_tokens \ - deployer_pm \ - resource_pm - -TEST_PROFILES := test_account_0 \ - test_account_1 \ - test_account_2 \ - test_account_3 \ - test_account_4 \ - test_account_5 - -ORACLE_PROFILES := pyth=$(PYTH_CONTRACT_ACCOUNT),deployer=$(PYTH_DEPLOYER_ACCOUNT),wormhole=$(PYTH_WORMHOLE) - -LARGE_PACKAGES_PROFILE := aave_large_packages=aave_large_packages +TEST_PROFILES := $(shell echo $(TEST_PROFILES_KEY_MAP) | tr ' ' '\n' | cut -d '=' -f1) # ===================== NAMED ADDRESSES ===================== # -define APTOS_NAMED_ADDRESSES -$(foreach profile,$(PROFILES),$(profile)=$(profile),)$(ORACLE_PROFILES),$(LARGE_PACKAGES_PROFILE) +# resource named addresses +AAVE_ORACLE_ADDRESS := $(shell [ -f .aptos/config.yaml ] && yq '.profiles.aave_oracle.account' .aptos/config.yaml || echo "") +LARGE_PACKAGE_ADDRESS := $(shell [ -f .aptos/config.yaml ] && yq '.profiles.aave_large_packages.account' .aptos/config.yaml || echo "") + +RESOURCE_NAMED_ADDRESSES := aave_oracle_racc_address=$(shell \ + [ -n "$(AAVE_ORACLE_ADDRESS)" ] && \ + aptos account derive-resource-account-address \ + --address "$(AAVE_ORACLE_ADDRESS)" \ + --seed "AAVE_ORACLE" \ + --seed-encoding "Utf8" | jq -r '.Result' || \ + echo "") + +ORACLE_NAMED_ADDRESSES := $(shell \ + if [ -n "$(CHAINLINK_DATA_FEEDS)" ] && [ -n "$(CHAINLINK_PLATFORM)" ]; then \ + echo ", data_feeds=$(CHAINLINK_DATA_FEEDS), platform=$(CHAINLINK_PLATFORM)"; \ + else \ + echo ""; \ + fi) + +define AAVE_NAMED_ADDRESSES +$(foreach profile,$(AAVE_PROFILES),$(profile)=$(profile),) \ +$(RESOURCE_NAMED_ADDRESSES) \ +$(ORACLE_NAMED_ADDRESSES) endef # ======================= CLEAN ====================== # + clean-package-%: cd ./aave-core/aave-$* && rm -rf build -clean-root: +clean-core: cd ./aave-core && rm -rf build + # ===================== CONFIG ===================== # set-workspace-config: @@ -71,54 +88,97 @@ init-workspace-config: # ===================== TESTING ===================== # local-testnet: - aptos node run-local-testnet --with-faucet --force-restart + aptos node run-localnet \ + --assume-yes \ + --no-txn-stream \ + --force-restart \ + --faucet-port 8081 \ + --performance + +local-testnet-docker: + aptos node run-localnet \ + --force-restart \ + --performance \ + --with-indexer-api \ + --indexer-api-port 8090 \ + --faucet-port 8081 \ + --use-host-postgres \ + --host-postgres-host "postgres" \ + --host-postgres-port 5432 \ + --host-postgres-password "postgres" \ + --postgres-user "postgres" \ + --postgres-database "indexer" \ + --existing-hasura-url http://hasura:8092 ts-test: cd test-suites && \ @pnpm i && \ - @pnpm run init-data && \ - @pnpm run core-operations && \ + @pnpm run deploy:init-data && \ + @pnpm run deploy:core-operations && \ @pnpm run test test-all: make test-acl make test-config make test-math - make test-mock-oracle + make test-rate + make test-chainlink-platform + make test-chainlink-data-feeds + make test-oracle make test-pool # ===================== PROFILES ===================== # init-profiles: - @for profile in $(PROFILES); do \ - echo | aptos init --profile $$profile --network $(APTOS_NETWORK) --assume-yes --skip-faucet; \ - done - aptos init --profile aave_large_packages --network $(APTOS_NETWORK) --assume-yes --skip-faucet --private-key $(LARGE_PACKAGES_ACCOUNT_PRIVATE_KEY); + @if [ "$(UPGRADE_CONTRACTS)" = "true" ]; then \ + echo "UPGRADE_CONTRACTS is true, using fixed aave profiles"; \ + for profile in $(shell echo $(AAVE_PROFILES_KEY_MAP) | tr ' ' '\n' | cut -d '=' -f 1); do \ + PRIVATE_KEY=$$(echo $(AAVE_PROFILES_KEY_MAP) | tr ' ' '\n' | grep "^$$profile=" | cut -d '=' -f2); \ + echo "Initializing profile: $$profile ..."; \ + echo | aptos init --profile $$profile --network $(APTOS_NETWORK) --assume-yes --skip-faucet --private-key $$PRIVATE_KEY; \ + done; \ + else \ + echo "UPGRADE_CONTRACTS is false, generating new aave profiles ..."; \ + for profile in $(AAVE_PROFILES); do \ + echo "Initializing aave profile: $$profile with random private key"; \ + echo | aptos init --profile $$profile --network $(APTOS_NETWORK) --assume-yes --skip-faucet; \ + done; \ + fi init-test-profiles: - @for profile in $(TEST_PROFILES); do \ - echo | aptos init --profile $$profile --network $(APTOS_NETWORK) --assume-yes --skip-faucet; \ - done + @if [ "$(UPGRADE_CONTRACTS)" = "true" ]; then \ + echo "UPGRADE_CONTRACTS is true, using fixed test profiles"; \ + for profile in $(shell echo $(TEST_PROFILES_KEY_MAP) | tr ' ' '\n' | cut -d '=' -f 1); do \ + PRIVATE_KEY=$$(echo $(TEST_PROFILES_KEY_MAP) | tr ' ' '\n' | grep "^$$profile=" | cut -d '=' -f2); \ + echo "Initializing test profile: $$profile ..."; \ + echo | aptos init --profile $$profile --network $(APTOS_NETWORK) --assume-yes --skip-faucet --private-key $$PRIVATE_KEY; \ + done; \ + else \ + echo "UPGRADE_CONTRACTS is false, generating new test profiles ..."; \ + for profile in $(TEST_PROFILES); do \ + echo "Initializing test profile: $$profile with random private key"; \ + echo | aptos init --profile $$profile --network $(APTOS_NETWORK) --assume-yes --skip-faucet; \ + done; \ + fi fund-profiles: - @for profile in $(PROFILES); do \ - aptos account fund-with-faucet --account $$profile --amount $(DEFAULT_FUND_AMOUNT) --profile $$profile && sleep 5; \ + @for profile in $(AAVE_PROFILES); do \ + aptos account fund-with-faucet --account $$profile --amount $(DEFAULT_FUND_AMOUNT) --profile $$profile; \ done - aptos account fund-with-faucet --account aave_large_packages --amount $(DEFAULT_FUND_AMOUNT) --profile aave_large_packages; fund-test-profiles: @for profile in $(TEST_PROFILES); do \ - aptos account fund-with-faucet --account $$profile --amount $(DEFAULT_FUND_AMOUNT) --profile $$profile && sleep 5; \ + aptos account fund-with-faucet --account $$profile --amount $(DEFAULT_FUND_AMOUNT) --profile $$profile; \ done top-up-profiles: - @for profile in $(PROFILES); do \ - aptos account transfer --account $$profile --amount $(DEFAULT_FUND_AMOUNT) --assume-yes --private-key $(DEFAULT_FUNDER_PRIVATE_KEY) && sleep 5; \ + @for profile in $(AAVE_PROFILES); do \ + aptos account transfer --account $$profile --amount $(DEFAULT_FUND_AMOUNT) --assume-yes --private-key $(DEFAULT_FUNDER_PRIVATE_KEY); \ done top-up-test-profiles: @for profile in $(TEST_PROFILES); do \ - aptos account transfer --account $$profile --amount $(DEFAULT_FUND_AMOUNT) --assume-yes --private-key $(DEFAULT_FUNDER_PRIVATE_KEY) && sleep 5; \ + aptos account transfer --account $$profile --amount $(DEFAULT_FUND_AMOUNT) --assume-yes --private-key $(DEFAULT_FUNDER_PRIVATE_KEY); \ done # ===================== PACKAGE AAVE-ACL ===================== # @@ -128,7 +188,8 @@ compile-acl: --included-artifacts $(ARTIFACTS_LEVEL) \ --save-metadata \ --package-dir "aave-acl" \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" publish-acl: cd aave-core && aptos move publish --assume-yes \ @@ -136,21 +197,32 @@ publish-acl: --included-artifacts $(ARTIFACTS_LEVEL) \ --sender-account aave_acl \ --profile aave_acl \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" \ + --gas-unit-price 100 \ + --max-gas 10000 test-acl: cd aave-core && aptos move test \ --ignore-compile-warnings \ --skip-attribute-checks \ --package-dir "aave-acl" \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" \ + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" \ --coverage doc-acl: cd aave-core && aptos move document \ --skip-attribute-checks \ --package-dir "aave-acl" \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" + --named-addresses "${AAVE_NAMED_ADDRESSES}" + +fmt-acl: + aptos move fmt \ + --package-path "aave-core/aave-acl" \ + --config-path ./movefmt.toml \ + --emit-mode "overwrite" \ + -v # ===================== PACKAGE AAVE-CONFIG ===================== # @@ -159,7 +231,8 @@ compile-config: --included-artifacts $(ARTIFACTS_LEVEL) \ --save-metadata \ --package-dir "aave-config" \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" publish-config: cd aave-core && aptos move publish --assume-yes \ @@ -167,21 +240,32 @@ publish-config: --included-artifacts $(ARTIFACTS_LEVEL) \ --sender-account aave_config \ --profile aave_config \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" \ + --gas-unit-price 100 \ + --max-gas 50000 test-config: cd aave-core && aptos move test \ --ignore-compile-warnings \ --skip-attribute-checks \ --package-dir "aave-config" \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" \ + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" \ --coverage doc-config: cd aave-core && aptos move document \ --skip-attribute-checks \ --package-dir "aave-config" \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" + --named-addresses "${AAVE_NAMED_ADDRESSES}" + +fmt-config: + aptos move fmt \ + --package-path "aave-core/aave-config" \ + --config-path ./movefmt.toml \ + --emit-mode "overwrite" \ + -v # ===================== PACKAGE AAVE-LARGE-PACKAGES ===================== # @@ -190,7 +274,8 @@ compile-large-packages: --included-artifacts $(ARTIFACTS_LEVEL) \ --save-metadata \ --package-dir "aave-large-packages" \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" publish-large-packages: cd aave-core && aptos move publish --assume-yes \ @@ -198,21 +283,32 @@ publish-large-packages: --included-artifacts $(ARTIFACTS_LEVEL) \ --sender-account aave_large_packages \ --profile aave_large_packages \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" \ + --gas-unit-price 100 \ + --max-gas 10000 test-large-packages: cd aave-core && aptos move test \ --ignore-compile-warnings \ --skip-attribute-checks \ --package-dir "aave-large-packages" \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" \ + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" \ --coverage doc-large-packages: cd aave-core && aptos move document \ --skip-attribute-checks \ --package-dir "aave-large-packages" \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" + --named-addresses "${AAVE_NAMED_ADDRESSES}" + +fmt-large-packages: + aptos move fmt \ + --package-path "aave-core/aave-large-packages" \ + --config-path ./movefmt.toml \ + --emit-mode "overwrite" \ + -v # ===================== PACKAGE AAVE-MATH ===================== # @@ -221,7 +317,8 @@ compile-math: --included-artifacts $(ARTIFACTS_LEVEL) \ --save-metadata \ --package-dir "aave-math" \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" publish-math: cd aave-core && aptos move publish --assume-yes \ @@ -229,83 +326,207 @@ publish-math: --included-artifacts $(ARTIFACTS_LEVEL) \ --sender-account aave_math \ --profile aave_math \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" \ + --gas-unit-price 100 \ + --max-gas 10000 test-math: cd aave-core && aptos move test \ --ignore-compile-warnings \ --skip-attribute-checks \ --package-dir "aave-math" \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" \ + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" \ --coverage doc-math: cd aave-core && aptos move document \ --skip-attribute-checks \ --package-dir "aave-math" \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" + --named-addresses "${AAVE_NAMED_ADDRESSES}" -# ===================== PACKAGE AAVE-ORACLE ===================== # +fmt-math: + aptos move fmt \ + --package-path "aave-core/aave-math" \ + --config-path ./movefmt.toml \ + --emit-mode "overwrite" \ + -v -compile-oracle: +# ===================== PACKAGE AAVE-RATE ===================== # + +compile-rate: cd aave-core && aptos move compile \ --included-artifacts $(ARTIFACTS_LEVEL) \ - --save-metadata \ - --package-dir "aave-oracle" \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" + --save-metadata \ + --package-dir "aave-rate" \ + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" -publish-oracle: +publish-rate: cd aave-core && aptos move publish --assume-yes \ - --package-dir "aave-oracle" \ + --package-dir "aave-rate" \ --included-artifacts $(ARTIFACTS_LEVEL) \ - --sender-account aave_oracle \ - --profile aave_oracle \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" - -test-oracle: + --sender-account aave_rate \ + --profile aave_rate \ + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" \ + --gas-unit-price 100 \ + --max-gas 20000 + +test-rate: cd aave-core && aptos move test \ --ignore-compile-warnings \ --skip-attribute-checks \ - --package-dir "aave-oracle" \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" \ + --package-dir "aave-rate" \ + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" \ --coverage -doc-oracle: +doc-rate: cd aave-core && aptos move document \ --skip-attribute-checks \ - --package-dir "aave-oracle" \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" + --package-dir "aave-rate" \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" + +fmt-rate: + aptos move fmt \ + --package-path "aave-core/aave-rate" \ + --config-path ./movefmt.toml \ + --emit-mode "overwrite" \ + -v + +# ===================== PACKAGE AAVE-DATA ===================== # + +compile-data: + cd aave-core && aptos move compile \ + --included-artifacts $(ARTIFACTS_LEVEL) \ + --save-metadata \ + --package-dir "aave-data" \ + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" + +publish-data: + cd aave-core && aptos move publish --assume-yes \ + --package-dir "aave-data" \ + --included-artifacts $(ARTIFACTS_LEVEL) \ + --sender-account aave_data \ + --profile aave_data \ + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" + +test-data: + cd aave-core && aptos move test \ + --ignore-compile-warnings \ + --skip-attribute-checks \ + --package-dir "aave-data" \ + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" \ + --coverage + +fmt-data: + aptos move fmt \ + --package-path "aave-core/aave-data" \ + --config-path ./movefmt.toml \ + --emit-mode "overwrite" \ + -v + +# ===================== PACKAGES CHAINLINK ===================== # + +compile-chainlink-platform: + cd aave-core && aptos move compile \ + --included-artifacts $(ARTIFACTS_LEVEL) \ + --save-metadata \ + --package-dir "chainlink-platform" \ + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" + +test-chainlink-platform: + cd aave-core && aptos move test \ + --ignore-compile-warnings \ + --skip-attribute-checks \ + --package-dir "chainlink-platform" \ + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" \ + --coverage -# ===================== PACKAGE AAVE-MOCK-ORACLE ===================== # +publish-chainlink-platform: + cd aave-core && aptos move publish --assume-yes \ + --package-dir "chainlink-platform" \ + --included-artifacts $(ARTIFACTS_LEVEL) \ + --sender-account platform \ + --profile platform \ + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" -compile-mock-oracle: +compile-chainlink-data-feeds: cd aave-core && aptos move compile \ --included-artifacts $(ARTIFACTS_LEVEL) \ --save-metadata \ - --package-dir "aave-mock-oracle" \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" + --package-dir "chainlink-data-feeds" \ + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" + +test-chainlink-data-feeds: + cd aave-core && aptos move test \ + --ignore-compile-warnings \ + --skip-attribute-checks \ + --package-dir "chainlink-data-feeds" \ + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" \ + --coverage -publish-mock-oracle: +publish-chainlink-data-feeds: cd aave-core && aptos move publish --assume-yes \ - --package-dir "aave-mock-oracle" \ + --package-dir "chainlink-data-feeds" \ --included-artifacts $(ARTIFACTS_LEVEL) \ - --sender-account aave_mock_oracle \ - --profile aave_mock_oracle \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" + --sender-account data_feeds \ + --profile data_feeds \ + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" + +# ===================== PACKAGE AAVE-ORACLE ===================== # -test-mock-oracle: +compile-oracle: + cd aave-core && aptos move compile \ + --included-artifacts $(ARTIFACTS_LEVEL) \ + --save-metadata \ + --package-dir "aave-oracle" \ + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" + +publish-oracle: + cd aave-core && aptos move publish --assume-yes \ + --package-dir "aave-oracle" \ + --included-artifacts $(ARTIFACTS_LEVEL) \ + --sender-account aave_oracle \ + --profile aave_oracle \ + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" \ + --gas-unit-price 100 \ + --max-gas 30000 + +test-oracle: cd aave-core && aptos move test \ --ignore-compile-warnings \ --skip-attribute-checks \ - --package-dir "aave-mock-oracle" \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" \ + --package-dir "aave-oracle" \ + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" \ --coverage -doc-mock-oracle: +doc-oracle: cd aave-core && aptos move document \ --skip-attribute-checks \ - --package-dir "aave-mock-oracle" \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" + --package-dir "aave-oracle" \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" + +fmt-oracle: + aptos move fmt \ + --package-path "aave-core/aave-oracle" \ + --config-path ./movefmt.toml \ + --emit-mode "overwrite" \ + -v # ===================== PACKAGE AAVE-POOL ===================== # @@ -313,7 +534,8 @@ compile-pool: cd aave-core && aptos move compile \ --included-artifacts $(ARTIFACTS_LEVEL) \ --save-metadata \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" publish-pool: cd aave-core && aptos move publish --assume-yes \ @@ -321,7 +543,10 @@ publish-pool: --chunked-publish \ --sender-account aave_pool \ --profile aave_pool \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" + --skip-fetch-latest-git-deps \ + --large-packages-module-address "$(LARGE_PACKAGE_ADDRESS)" \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" \ + --chunk-size 45000 publish-pool-local: cd test-suites && \ @@ -331,82 +556,178 @@ test-pool: cd aave-core && aptos move test \ --ignore-compile-warnings \ --skip-attribute-checks \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" \ + --skip-fetch-latest-git-deps \ + --named-addresses "${AAVE_NAMED_ADDRESSES}" \ --coverage doc-pool: cd aave-core && aptos move document \ --skip-attribute-checks \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" + --named-addresses "${AAVE_NAMED_ADDRESSES}" -# ===================== PACKAGE AAVE-SCRIPTS ===================== # +fmt-pool: + aptos move fmt \ + --package-path "aave-core" \ + --config-path ./movefmt.toml \ + --emit-mode "overwrite" \ + -v -compile-scripts: - cd aave-core && aptos move compile \ - --included-artifacts $(ARTIFACTS_LEVEL) \ - --save-metadata \ - --package-dir "aave-scripts" \ - --named-addresses "${APTOS_NAMED_ADDRESSES}" - -run-script-post-publish: - cd aave-core && \ - aptos move run-script \ - --assume-yes \ - --compiled-script-path aave-scripts/build/AaveScripts/bytecode_scripts/post_publish.mv \ - --sender-account=aave_acl \ - --profile=aave_acl +# ===================== AAVE-SCRIPTS ===================== # -run-script-xxx: - cd aave-core && \ - aptos move run-script \ - --assume-yes \ - --script-path aave-scripts/sources/post-publish.move \ +configure-acl: + aptos move run-script \ + --assume-yes \ + --compiled-script-path aave-scripts/build/AaveScripts/bytecode_scripts/configure_acl.mv \ --sender-account=aave_acl \ --profile=aave_acl +create-reserves: + aptos move run-script \ + --assume-yes \ + --compiled-script-path aave-scripts/build/AaveScripts/bytecode_scripts/create_reserves.mv \ + --sender-account=aave_pool \ + --profile=aave_pool + +create-emodes: + aptos move run-script \ + --assume-yes \ + --compiled-script-path aave-scripts/build/AaveScripts/bytecode_scripts/create_emodes.mv \ + --sender-account=aave_pool \ + --profile=aave_pool + +configure-reserves: + aptos move run-script \ + --assume-yes \ + --compiled-script-path aave-scripts/build/AaveScripts/bytecode_scripts/configure_reserves.mv \ + --sender-account=aave_pool \ + --profile=aave_pool + +configure-interest-rates: + aptos move run-script \ + --assume-yes \ + --compiled-script-path aave-scripts/build/AaveScripts/bytecode_scripts/configure_interest_rates.mv \ + --sender-account=aave_pool \ + --profile=aave_pool + +configure-price-feeds: + aptos move run-script \ + --assume-yes \ + --compiled-script-path aave-scripts/build/AaveScripts/bytecode_scripts/configure_price_feeds.mv \ + --sender-account=aave_pool \ + --profile=aave_pool + +fmt-scripts: + aptos move fmt \ + --package-path "aave-core/aave-scripts" \ + --config-path ./movefmt.toml \ + --emit-mode "overwrite" \ + -v + # ===================== GLOBAL COMMANDS ===================== # +ifeq ($(APTOS_NETWORK), local) +COMPILE_CHAINLINK_TARGETS := compile-chainlink-platform compile-chainlink-data-feeds +PUBLISH_CHAINLINK_TARGETS := publish-chainlink-platform publish-chainlink-data-feeds +else +COMPILE_CHAINLINK_TARGETS := +PUBLISH_CHAINLINK_TARGETS := +endif + compile-all: - make compile-acl make compile-config - @if [ "$(APTOS_NETWORK)" = "local" ]; then \ - make compile-large-packages; \ - else \ - echo "Skipping compile-large-packages for APTOS_NETWORK different to local"; \ - fi + make compile-acl + make compile-large-packages make compile-math - make compile-mock-oracle + make compile-rate + @for target in $(COMPILE_CHAINLINK_TARGETS); do \ + make $$target; \ + done + make compile-oracle make compile-pool + make compile-data publish-all: - make publish-acl make publish-config - @if [ "$(APTOS_NETWORK)" = "local" ]; then \ - make publish-large-packages; \ - else \ - echo "Skipping publish-large-packages for APTOS_NETWORK different than local"; \ - fi + make publish-acl + make publish-large-packages make publish-math - make publish-mock-oracle + make publish-rate + @for target in $(PUBLISH_CHAINLINK_TARGETS); do \ + make $$target; \ + done + make publish-oracle make publish-pool + make publish-data doc-all: - make doc-acl make doc-config + make doc-acl make doc-large-packages make doc-math - make doc-mock-oracle + make doc-rate + make doc-oracle make doc-pool clean-all: - make clean-package-acl make clean-package-config - make clean-large-packages + make clean-package-acl + make clean-package-large-packages make clean-package-math - make clean-package-mock-oracle + make clean-package-rate + make clean-chainlink-platform + make clean-chainlink-data-feeds make clean-package-oracle - make clean-root + make clean-core + make clean-data + +# ------------------------------------------------------------ +# Formatting +# ------------------------------------------------------------ + +fmt: fmt-move fmt-prettier fmt-markdown # fmt & lint all directories -fmt-all: - movefmt --config-path=./movefmt.toml --emit "overwrite" -v \ No newline at end of file +fmt-move: + make fmt-acl + make fmt-config + make fmt-large-packages + make fmt-math + make fmt-rate + make fmt-oracle + make fmt-pool + make fmt-data + make fmt-scripts + +fmt-prettier: + pnpm prettier:fix + +fmt-markdown: + pnpm md:fix + +# ------------------------------------------------------------ +# Validate code +# ------------------------------------------------------------ + +lint-prettier: + pnpm prettier:validate + +lint-markdown: + pnpm md:lint + +lint-codespell: ensure-codespell + codespell --skip "*.json" + +ensure-codespell: + @if ! command -v codespell &> /dev/null; then \ + echo "codespell not found. Please install it by running the command `pip install codespell` or refer to the following link for more information: https://github.com/codespell-project/codespell" \ + exit 1; \ + fi + +lint: + make lint-prettier && \ + make lint-markdown && \ + make fmt && \ + make lint-codespell + +fix-lint: + make fmt diff --git a/README.md b/README.md index 798f036..5a1745a 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,7 @@ This is the official Aptos version of the Aave V3 Protocol. ├── aave-config // Configurator Package ├── aave-flash-loan // Flash loan Package ├── aave-math // Math library Package -├── aave-oracle // Pyth Oracle Package -├── aave-mock-oracle // Mock Oracle Package +├── aave-oracle // Chainlink Oracle Package ├── aave-pool // Pool Package ├── aave-supply-borrow // Supply-Borrow Package ├── aave-tokens // Tokens Package @@ -95,63 +94,53 @@ Dependencies for all packages: ## 1. Clone the code ```bash= -git clone this-project-code && cd this-project-code +git clone (aave-aptos-v3)(https://github.com/aave/aptos-v3) && cd into it ``` Make sure you have the following installed and configured: - Aptos-Cli [see here](https://aptos.dev/tools/aptos-cli/) +- Yq tool: [see here](https://github.com/mikefarah/yq) - NodeJS/pnpm/npm/yarn [see here](https://pnpm.io/installation) +- Codespell [see here](https://pypi.org/project/codespell/) +- Pre-commit [see here](https://pre-commit.com/#install) +- Python3 [see here](https://www.python.org/) -## 2. Local Testnet (recommended for development) +## 2. Local Testnet using Makefile Local testnet commands are all bundled inside a `Makefile` at the root. -There is a `.env.local` template at the root that we recommend renaming to `.env` before executing the remaining steps. +There is a `.env.template` template at the root that we recommend renaming to `.env` and adjusting the values of before executing the remaining steps. Prior to all, run: -```shell -make set-workspace-config -``` - -to set up your aptos profiles configuration to point at the project workspace. - -Then, to run a local testnet, execute: - ```shell make local-testnet ``` +to start the local testnet without indexer. It usually takes about 10 seconds for the local testnet to be fully operational. + Once local testnet is running, in another terminal do: ```shell make init-profiles && make init-test-profiles && make fund-profiles && make fund-test-profiles ``` -This will create all needed accounts for publishing Aaave V3 and save them under a file under `.aptos/config.yaml` at the workspace root. -The accounts will be prefunded with APT too. The structure of the file is something like: -```shell - profiles: - profileX: - private_key: "..." - public_key: "..." - account: ... - rest_url: "https://fullnode.....aptoslabs.com" - faucet_url: "https://faucet.....aptoslabs.com" - profileY: - ... -``` +This will create all needed accounts for publishing Aave V3 and save them under a file under `.aptos/config.yaml` at the workspace root. +The accounts will be prefunded with APT too. + All aave packages can be now compiled using the command: ```shell make compile-all ``` + and subsequently deployed to local testnet via: ```shell make publish-all ``` + If needed one could also run all aptos unit tests via: ```shell @@ -161,53 +150,26 @@ make test-all To view transactions or query any data deployed on the local testnet you can use the following url: -https://explorer.aptoslabs.com/?network=local - - -## 3. Testnet, Devnet - -All necessary commands required for mainnet, testnet and devnet are bundled in the `Makefile` at the root. + -Before anything, for testnet or devnet, the `.env.testnet` file located at the root of this repo is to be renamed to `.env` and adjusted before compiling -and publishing depending on what network we want to deploy our packages to. The default configuration is pointing -at Aptos `testnet`, but one could also easily change the environmental variable `APTOS_NETWORK` to `devnet`. +## 3. Local Testnet using Apterly -For testnet and devnet deployment a funded with APT account (5 APT is more than enough) is required so make sure you have one and replace -its private key in `DEFAULT_FUNDER_PRIVATE_KEY`. - -The remaining steps are as similar to the local testnet, but using the `Makefile`. - -```shell -make compile-all -``` -and subsequently deployed to local testnet via: - -```shell -make publish-all -``` -If needed one could also run all aptos unit tests via: - -```shell -make test-all -``` - -**NOTE**: For mainnet and testnet deployments we would rather create the profiles which the `make init-profiles` command -does ourselves and fund them through the faucet before deployment. +Apterly is a tool that mimics some of the functionalities that Tenderly offers. You can read more about it under [Apterly](apterly/README.md). Follow the Readme if you want to deploy the protocol using docker-compose. ## 4. Checking contracts in explorer + For each published package, get the transaction id `YOUR_TX_ID` and replace it in the url below to see more data. Also make sure you are using the correct network in the url - `devnet` or `testnet`. -> https://explorer.aptoslabs.com/txn/{YOUR_TX_ID}?network=NETWORK_NAME - +> ## 5. Running Aptos Unit Tests -These tests do not require any published data and can thus be executed everytime, prerequisite being we have all named +These tests do not require any published data and can thus be executed every time, prerequisite being we have all named addresses set: ```shell - $ make test-all +make test-all ``` ## 6. Running Typescript Integration/e2e Tests @@ -215,7 +177,7 @@ addresses set: These tests are only to be run after having successfully published all packages: ```shell - $ make ts-test +make ts-test ``` ## 7. Creating Aptos Documentation @@ -223,10 +185,5 @@ These tests are only to be run after having successfully published all packages: To create extensive Aptos documentation for all modules usually generated under the `doc` folder of each package, run: ```shell - $ make doc-all +make doc-all ``` - -## 8. Business Logic (WIP) - -Please read the following readme which explains the business logic: -[Business Logic](./BusinessLogic.md) \ No newline at end of file diff --git a/aave-core/.gitignore b/aave-core/.gitignore new file mode 100644 index 0000000..0e5f3e7 --- /dev/null +++ b/aave-core/.gitignore @@ -0,0 +1,2 @@ +chainlink-data-feeds/* +chainlink-platform/* diff --git a/aave-core/Move.toml b/aave-core/Move.toml index 1cf873f..8eff480 100644 --- a/aave-core/Move.toml +++ b/aave-core/Move.toml @@ -14,6 +14,7 @@ AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir AaveAcl = { local = "./aave-acl" } AaveConfig = { local = "./aave-config" } AaveMath = { local = "./aave-math" } -AaveMockOracle = { local = "./aave-mock-oracle" } +AaveOracle = { local = "aave-oracle" } +AaveRate = { local = "./aave-rate" } [dev-dependencies] diff --git a/aave-core/aave-acl/Move.toml b/aave-core/aave-acl/Move.toml index 2dd588c..68636ab 100644 --- a/aave-core/aave-acl/Move.toml +++ b/aave-core/aave-acl/Move.toml @@ -11,5 +11,6 @@ aave_acl = '_' [dependencies] AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "mainnet" } +AaveConfig = { local = "../aave-config" } -[dev-dependencies] \ No newline at end of file +[dev-dependencies] diff --git a/aave-core/aave-acl/sources/acl_manage.move b/aave-core/aave-acl/sources/acl_manage.move index fc9f555..355eb7f 100644 --- a/aave-core/aave-acl/sources/acl_manage.move +++ b/aave-core/aave-acl/sources/acl_manage.move @@ -34,7 +34,9 @@ module aave_acl::acl_manage { use aptos_std::smart_table::{Self, SmartTable}; use aptos_framework::event; - const DEFAULT_ADMIN_ROLE: vector = b"DEFAULT_ADMIN"; + use aave_config::error_config; + + const DEFAULT_ADMIN_ROLE: vector = b""; const POOL_ADMIN_ROLE: vector = b"POOL_ADMIN"; const EMERGENCY_ADMIN_ROLE: vector = b"EMERGENCY_ADMIN"; const RISK_ADMIN_ROLE: vector = b"RISK_ADMIN"; @@ -46,17 +48,8 @@ module aave_acl::acl_manage { const ADMIN_CONTROLLED_ECOSYSTEM_RESERVE_FUNDS_ADMIN_ROLE: vector = b"ADMIN_CONTROLLED_ECOSYSTEM_RESERVE_FUNDS_ADMIN"; const REWARDS_CONTROLLER_ADMIN_ROLE: vector = b"REWARDS_CONTROLLER_ADMIN_ROLE"; - // You are not an administrator and cannot initialize resources. - const ENOT_MANAGEMENT: u64 = 1; - // Role does not exist. - const EROLE_NOT_EXISTS: u64 = 2; - // The role must be admin - const EROLE_NOT_ADMIN: u64 = 3; - // can only renounce roles for self - const EROLE_CAN_ONLY_RENOUNCE_SELF: u64 = 4; - #[event] - /// @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` + /// @dev Emitted when `new_admin_role` is set as ``role``'s admin role, replacing `previous_admin_role` /// /// `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite /// {RoleAdminChanged} not being emitted signaling this. @@ -98,15 +91,20 @@ module aave_acl::acl_manage { } #[test_only] - public fun test_init_module(user: &signer) acquires Roles { - init_module(user); - grant_default_admin_role(user); + public fun test_init_module(admin: &signer) acquires Roles { + init_module(admin); + grant_default_admin_role(admin); } fun init_module(admin: &signer) { let admin_address = signer::address_of(admin); check_super_admin(admin_address); - move_to(admin, Roles { acl_instance: smart_table::new() }); + move_to( + admin, + Roles { + acl_instance: smart_table::new() + } + ); } public entry fun grant_default_admin_role(admin: &signer) acquires Roles { @@ -116,11 +114,11 @@ module aave_acl::acl_manage { } fun check_super_admin(admin: address) { - assert!(admin == @aave_acl, ENOT_MANAGEMENT); + assert!(admin == @aave_acl, error_config::get_enot_acl_owner()); } fun only_role(role: String, user: address) acquires Roles { - assert!(has_role(role, user), EROLE_NOT_ADMIN); + assert!(has_role(role, user), error_config::get_erole_missmatch()); } #[view] @@ -133,25 +131,30 @@ module aave_acl::acl_manage { public fun get_role_admin(role: String): String acquires Roles { let roles = borrow_global(@aave_acl); if (!smart_table::contains(&roles.acl_instance, role)) { - return string::utf8(DEFAULT_ADMIN_ROLE) + return string::utf8(b"") }; smart_table::borrow(&roles.acl_instance, role).admin_role } - /// @dev Sets `adminRole` as ``role``'s admin role. + /// @dev Sets `admin_role` as ``role``'s admin role. /// Emits a {RoleAdminChanged} event. public entry fun set_role_admin( admin: &signer, role: String, admin_role: String ) acquires Roles { only_role(default_admin_role(), signer::address_of(admin)); - let previous_admin_role = get_role_admin(role); - - let role_res = borrow_global_mut(@aave_acl); - assert!(smart_table::contains(&mut role_res.acl_instance, role), EROLE_NOT_EXISTS); - let role_data = smart_table::borrow_mut(&mut role_res.acl_instance, role); - role_data.admin_role = admin_role; + let previous_admin_role = get_role_admin(role); + let roles = borrow_global_mut(@aave_acl); + + if (!smart_table::contains(&mut roles.acl_instance, role)) { + let members = smart_table::new(); + let role_data = RoleData { members, admin_role }; + smart_table::add(&mut roles.acl_instance, role, role_data); + } else { + let role_data = smart_table::borrow_mut(&mut roles.acl_instance, role); + role_data.admin_role = admin_role; + }; event::emit( RoleAdminChanged { role, previous_admin_role, new_admin_role: admin_role } @@ -159,7 +162,9 @@ module aave_acl::acl_manage { } #[view] - /// @dev Returns `true` if `account` has been granted `role`. + /// @dev Returns `true` if `user` has been granted `role`. + /// @param role The role identifier + /// @param user The account to check public fun has_role(role: String, user: address): bool acquires Roles { let role_res = borrow_global(@aave_acl); if (!smart_table::contains(&role_res.acl_instance, role)) { @@ -195,7 +200,7 @@ module aave_acl::acl_manage { if (!smart_table::contains(&role_res.acl_instance, role)) { let members = smart_table::new(); smart_table::add(&mut members, user, true); - let role_data = RoleData { members, admin_role: default_admin_role() }; + let role_data = RoleData { members, admin_role: string::utf8(b"") }; smart_table::add(&mut role_res.acl_instance, role, role_data); } else { let role_data = smart_table::borrow_mut(&mut role_res.acl_instance, role); @@ -222,7 +227,10 @@ module aave_acl::acl_manage { public entry fun renounce_role( admin: &signer, role: String, user: address ) acquires Roles { - assert!(signer::address_of(admin) == user, EROLE_CAN_ONLY_RENOUNCE_SELF); + assert!( + signer::address_of(admin) == user, + error_config::get_erole_can_only_renounce_self() + ); revoke_role_internal(admin, role, user); } @@ -349,28 +357,28 @@ module aave_acl::acl_manage { has_role(get_funds_admin_role(), admin) } - public entry fun add_emission_admin_role(admin: &signer, user: address) acquires Roles { + public entry fun add_emission_admin(admin: &signer, user: address) acquires Roles { grant_role(admin, get_emission_admin_role(), user); } - public entry fun remove_emission_admin_role( - admin: &signer, user: address - ) acquires Roles { + public entry fun remove_emission_admin(admin: &signer, user: address) acquires Roles { revoke_role(admin, get_emission_admin_role(), user); } #[view] - public fun is_emission_admin_role(admin: address): bool acquires Roles { + public fun is_emission_admin(admin: address): bool acquires Roles { has_role(get_emission_admin_role(), admin) } - public entry fun add_admin_controlled_ecosystem_reserve_funds_admin_role( + public entry fun add_admin_controlled_ecosystem_reserve_funds_admin( admin: &signer, user: address ) acquires Roles { - grant_role(admin, get_admin_controlled_ecosystem_reserve_funds_admin_role(), user); + grant_role( + admin, get_admin_controlled_ecosystem_reserve_funds_admin_role(), user + ); } - public entry fun remove_admin_controlled_ecosystem_reserve_funds_admin_role( + public entry fun remove_admin_controlled_ecosystem_reserve_funds_admin( admin: &signer, user: address ) acquires Roles { revoke_role( @@ -379,26 +387,26 @@ module aave_acl::acl_manage { } #[view] - public fun is_admin_controlled_ecosystem_reserve_funds_admin_role( + public fun is_admin_controlled_ecosystem_reserve_funds_admin( admin: address ): bool acquires Roles { has_role(get_admin_controlled_ecosystem_reserve_funds_admin_role(), admin) } - public entry fun add_rewards_controller_admin_role( + public entry fun add_rewards_controller_admin( admin: &signer, user: address ) acquires Roles { grant_role(admin, get_rewards_controller_admin_role(), user); } - public entry fun remove_rewards_controller_admin_role( + public entry fun remove_rewards_controller_admin( admin: &signer, user: address ) acquires Roles { revoke_role(admin, get_rewards_controller_admin_role(), user); } #[view] - public fun is_rewards_controller_admin_role(admin: address): bool acquires Roles { + public fun is_rewards_controller_admin(admin: address): bool acquires Roles { has_role(get_rewards_controller_admin_role(), admin) } diff --git a/aave-core/aave-acl/tests/acl_manage_tests.move b/aave-core/aave-acl/tests/acl_manage_tests.move index f0f8f30..983e4aa 100644 --- a/aave-core/aave-acl/tests/acl_manage_tests.move +++ b/aave-core/aave-acl/tests/acl_manage_tests.move @@ -4,61 +4,61 @@ module aave_acl::acl_manage_tests { use std::string::utf8; use aave_acl::acl_manage::{ - add_admin_controlled_ecosystem_reserve_funds_admin_role, + add_admin_controlled_ecosystem_reserve_funds_admin, add_asset_listing_admin, add_bridge, add_emergency_admin, - add_emission_admin_role, + add_emission_admin, add_flash_borrower, add_funds_admin, add_pool_admin, - add_rewards_controller_admin_role, + add_rewards_controller_admin, add_risk_admin, + get_admin_controlled_ecosystem_reserve_funds_admin_role, + get_admin_controlled_ecosystem_reserve_funds_admin_role_for_testing, get_asset_listing_admin_role, get_asset_listing_admin_role_for_testing, get_bridge_role, get_bridge_role_for_testing, get_emergency_admin_role, get_emergency_admin_role_for_testing, + get_emission_admin_role, + get_emissions_admin_role_for_testing, get_flash_borrower_role, get_flash_borrower_role_for_testing, + get_funds_admin_role, + get_funds_admin_role_for_testing, get_pool_admin_role, get_pool_admin_role_for_testing, + get_rewards_controller_admin_role, + get_rewards_controller_admin_role_for_testing, get_risk_admin_role, get_risk_admin_role_for_testing, grant_role, has_role, - is_admin_controlled_ecosystem_reserve_funds_admin_role, + is_admin_controlled_ecosystem_reserve_funds_admin, is_asset_listing_admin, is_bridge, is_emergency_admin, - is_emission_admin_role, + is_emission_admin, is_flash_borrower, is_funds_admin, is_pool_admin, - is_rewards_controller_admin_role, + is_rewards_controller_admin, is_risk_admin, - remove_admin_controlled_ecosystem_reserve_funds_admin_role, + remove_admin_controlled_ecosystem_reserve_funds_admin, remove_asset_listing_admin, remove_bridge, remove_emergency_admin, - remove_emission_admin_role, + remove_emission_admin, remove_flash_borrower, remove_funds_admin, remove_pool_admin, - remove_rewards_controller_admin_role, + remove_rewards_controller_admin, remove_risk_admin, revoke_role, set_role_admin, - test_init_module, - get_funds_admin_role, - get_funds_admin_role_for_testing, - get_emission_admin_role, - get_emissions_admin_role_for_testing, - get_admin_controlled_ecosystem_reserve_funds_admin_role, - get_admin_controlled_ecosystem_reserve_funds_admin_role_for_testing, - get_rewards_controller_admin_role, - get_rewards_controller_admin_role_for_testing + test_init_module }; const TEST_SUCCESS: u64 = 1; @@ -68,8 +68,9 @@ module aave_acl::acl_manage_tests { #[test] fun test_asset_listing_admin_role() { assert!( - get_asset_listing_admin_role() == get_asset_listing_admin_role_for_testing(), - TEST_SUCCESS, + get_asset_listing_admin_role() + == get_asset_listing_admin_role_for_testing(), + TEST_SUCCESS ); } @@ -82,7 +83,7 @@ module aave_acl::acl_manage_tests { fun test_get_flash_borrower_role() { assert!( get_flash_borrower_role() == get_flash_borrower_role_for_testing(), - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -95,7 +96,7 @@ module aave_acl::acl_manage_tests { fun test_get_emergency_admin_role() { assert!( get_emergency_admin_role() == get_emergency_admin_role_for_testing(), - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -115,7 +116,7 @@ module aave_acl::acl_manage_tests { fun test_emission_admin_role() { assert!( get_emission_admin_role() == get_emissions_admin_role_for_testing(), - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -124,7 +125,7 @@ module aave_acl::acl_manage_tests { assert!( get_admin_controlled_ecosystem_reserve_funds_admin_role() == get_admin_controlled_ecosystem_reserve_funds_admin_role_for_testing(), - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -133,7 +134,7 @@ module aave_acl::acl_manage_tests { assert!( get_rewards_controller_admin_role() == get_rewards_controller_admin_role_for_testing(), - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -149,7 +150,7 @@ module aave_acl::acl_manage_tests { grant_role( super_admin, get_asset_listing_admin_role_for_testing(), - signer::address_of(test_addr), + signer::address_of(test_addr) ); // check the address has the role assigned assert!(is_asset_listing_admin(signer::address_of(test_addr)), TEST_SUCCESS); @@ -175,7 +176,7 @@ module aave_acl::acl_manage_tests { grant_role( super_admin, get_flash_borrower_role_for_testing(), - signer::address_of(test_addr), + signer::address_of(test_addr) ); // check the address has the role assigned assert!(is_flash_borrower(signer::address_of(test_addr)), TEST_SUCCESS); @@ -187,7 +188,9 @@ module aave_acl::acl_manage_tests { test_init_module(super_admin); // add the asset listing role to some address grant_role( - super_admin, get_risk_admin_role_for_testing(), signer::address_of(test_addr) + super_admin, + get_risk_admin_role_for_testing(), + signer::address_of(test_addr) ); // check the address has the role assigned assert!(is_risk_admin(signer::address_of(test_addr)), TEST_SUCCESS); @@ -201,7 +204,7 @@ module aave_acl::acl_manage_tests { grant_role( super_admin, get_emergency_admin_role_for_testing(), - signer::address_of(test_addr), + signer::address_of(test_addr) ); // check the address has the role assigned assert!(is_emergency_admin(signer::address_of(test_addr)), TEST_SUCCESS); @@ -213,7 +216,9 @@ module aave_acl::acl_manage_tests { test_init_module(super_admin); // add the asset listing role to some address grant_role( - super_admin, get_pool_admin_role_for_testing(), signer::address_of(test_addr) + super_admin, + get_pool_admin_role_for_testing(), + signer::address_of(test_addr) ); // check the address has the role assigned assert!(is_pool_admin(signer::address_of(test_addr)), TEST_SUCCESS); @@ -227,7 +232,7 @@ module aave_acl::acl_manage_tests { grant_role( super_admin, get_funds_admin_role_for_testing(), - signer::address_of(test_addr), + signer::address_of(test_addr) ); // check the address has the role assigned assert!(is_funds_admin(signer::address_of(test_addr)), TEST_SUCCESS); @@ -241,10 +246,10 @@ module aave_acl::acl_manage_tests { grant_role( super_admin, get_emissions_admin_role_for_testing(), - signer::address_of(test_addr), + signer::address_of(test_addr) ); // check the address has the role assigned - assert!(is_emission_admin_role(signer::address_of(test_addr)), TEST_SUCCESS); + assert!(is_emission_admin(signer::address_of(test_addr)), TEST_SUCCESS); } #[test(super_admin = @aave_acl, test_addr = @0x01)] @@ -257,14 +262,14 @@ module aave_acl::acl_manage_tests { grant_role( super_admin, get_admin_controlled_ecosystem_reserve_funds_admin_role_for_testing(), - signer::address_of(test_addr), + signer::address_of(test_addr) ); // check the address has the role assigned assert!( - is_admin_controlled_ecosystem_reserve_funds_admin_role( + is_admin_controlled_ecosystem_reserve_funds_admin( signer::address_of(test_addr) ), - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -278,12 +283,12 @@ module aave_acl::acl_manage_tests { grant_role( super_admin, get_rewards_controller_admin_role_for_testing(), - signer::address_of(test_addr), + signer::address_of(test_addr) ); // check the address has the role assigned assert!( - is_rewards_controller_admin_role(signer::address_of(test_addr)), - TEST_SUCCESS, + is_rewards_controller_admin(signer::address_of(test_addr)), + TEST_SUCCESS ); } @@ -296,12 +301,16 @@ module aave_acl::acl_manage_tests { test_init_module(super_admin); // add the asset listing role to some address grant_role( - super_admin, get_pool_admin_role_for_testing(), signer::address_of(test_addr) + super_admin, + get_pool_admin_role_for_testing(), + signer::address_of(test_addr) ); // check the address has no longer the role assigned assert!( - !has_role(get_pool_admin_role_for_testing(), signer::address_of(other_addr)), - TEST_SUCCESS, + !has_role( + get_pool_admin_role_for_testing(), signer::address_of(other_addr) + ), + TEST_SUCCESS ); } @@ -312,7 +321,9 @@ module aave_acl::acl_manage_tests { test_init_module(super_admin); // add the asset listing role to some address grant_role( - super_admin, get_pool_admin_role_for_testing(), signer::address_of(test_addr) + super_admin, + get_pool_admin_role_for_testing(), + signer::address_of(test_addr) ); // check the address has the role assigned assert!(is_pool_admin(signer::address_of(test_addr)), TEST_SUCCESS); @@ -325,12 +336,14 @@ module aave_acl::acl_manage_tests { // now remove the role revoke_role( - test_addr, get_pool_admin_role_for_testing(), signer::address_of(test_addr) + test_addr, + get_pool_admin_role_for_testing(), + signer::address_of(test_addr) ); // check the address has no longer the role assigned assert!( !has_role(get_pool_admin_role_for_testing(), signer::address_of(test_addr)), - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -454,13 +467,13 @@ module aave_acl::acl_manage_tests { // init the module test_init_module(super_admin); // add the asset listing role to some address - add_emission_admin_role(super_admin, signer::address_of(test_addr)); + add_emission_admin(super_admin, signer::address_of(test_addr)); // check the address has the role assigned - assert!(is_emission_admin_role(signer::address_of(test_addr)), TEST_SUCCESS); + assert!(is_emission_admin(signer::address_of(test_addr)), TEST_SUCCESS); // remove pool admin - remove_emission_admin_role(super_admin, signer::address_of(test_addr)); + remove_emission_admin(super_admin, signer::address_of(test_addr)); // check the address has no longer the role assigned - assert!(!is_emission_admin_role(signer::address_of(test_addr)), TEST_SUCCESS); + assert!(!is_emission_admin(signer::address_of(test_addr)), TEST_SUCCESS); } #[test(super_admin = @aave_acl, test_addr = @0x01)] @@ -470,26 +483,26 @@ module aave_acl::acl_manage_tests { // init the module test_init_module(super_admin); // add the asset listing role to some address - add_admin_controlled_ecosystem_reserve_funds_admin_role( + add_admin_controlled_ecosystem_reserve_funds_admin( super_admin, signer::address_of(test_addr) ); // check the address has the role assigned assert!( - is_admin_controlled_ecosystem_reserve_funds_admin_role( + is_admin_controlled_ecosystem_reserve_funds_admin( signer::address_of(test_addr) ), - TEST_SUCCESS, + TEST_SUCCESS ); // remove pool admin - remove_admin_controlled_ecosystem_reserve_funds_admin_role( + remove_admin_controlled_ecosystem_reserve_funds_admin( super_admin, signer::address_of(test_addr) ); // check the address has no longer the role assigned assert!( - !is_admin_controlled_ecosystem_reserve_funds_admin_role( + !is_admin_controlled_ecosystem_reserve_funds_admin( signer::address_of(test_addr) ), - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -500,18 +513,18 @@ module aave_acl::acl_manage_tests { // init the module test_init_module(super_admin); // add the asset listing role to some address - add_rewards_controller_admin_role(super_admin, signer::address_of(test_addr)); + add_rewards_controller_admin(super_admin, signer::address_of(test_addr)); // check the address has the role assigned assert!( - is_rewards_controller_admin_role(signer::address_of(test_addr)), - TEST_SUCCESS, + is_rewards_controller_admin(signer::address_of(test_addr)), + TEST_SUCCESS ); // remove pool admin - remove_rewards_controller_admin_role(super_admin, signer::address_of(test_addr)); + remove_rewards_controller_admin(super_admin, signer::address_of(test_addr)); // check the address has no longer the role assigned assert!( - !is_rewards_controller_admin_role(signer::address_of(test_addr)), - TEST_SUCCESS, + !is_rewards_controller_admin(signer::address_of(test_addr)), + TEST_SUCCESS ); } } diff --git a/aave-core/aave-config/sources/error_config.move b/aave-core/aave-config/sources/error_config.move index 33e5bdf..55fca99 100644 --- a/aave-core/aave-config/sources/error_config.move +++ b/aave-core/aave-config/sources/error_config.move @@ -1,7 +1,7 @@ /// @title Errors library /// @author Aave /// @notice Defines the error messages emitted by the different contracts of the Aave protocol -module aave_config::error { +module aave_config::error_config { /// The caller of the function is not a pool admin const ECALLER_NOT_POOL_ADMIN: u64 = 1; /// The caller of the function is not an emergency admin @@ -164,25 +164,89 @@ module aave_config::error { const EADDRESSES_PROVIDER_ALREADY_ADDED: u64 = 86; /// The token implementation pool address and the pool address provided by the initializing pool do not match const EPOOL_ADDRESSES_DO_NOT_MATCH: u64 = 87; - /// User is trying to borrow multiple assets including a siloed one const ESILOED_BORROWING_VIOLATION: u64 = 89; /// the total debt of the reserve needs to be 0 const ERESERVE_DEBT_NOT_ZERO: u64 = 90; /// FlashLoaning for this asset is disabled const EFLASHLOAN_DISABLED: u64 = 91; - /// User is not listed - const EUSER_NOT_LISTED: u64 = 92; + /// Aptos has introduced a new business logic error code range from 1001 to 2000. + + /// aave_acl module error code range from 1001 to 1100. + /// Account is not the acl's owner. + const ENOT_ACL_OWNER: u64 = 1001; + /// Account is missing role. + const EROLE_MISSMATCH: u64 = 1002; + /// can only renounce roles for self + const EROLE_CAN_ONLY_RENOUNCE_SELF: u64 = 1003; + + /// aave_math module error code range from 1101 to 1200. + /// Calculation results in overflow + const EOVERFLOW: u64 = 1101; + /// Cannot divide by zero + const EDIVISION_BY_ZERO: u64 = 1102; + + /// aave_oracle module error code range from 1201 to 1300. + /// Account is not the oracle's owner. + const ENOT_ORACLE_OWNER: u64 = 1201; + const EORACLE_RESOURCE_NOT_FOUND: u64 = 1202; + + /// aave_oracle + /// Not an asset listing or a pool admin error + const ENOT_ASSET_LISTING_OR_POOL_ADMIN: u64 = 1203; + /// base currency not set + const EBASE_CURRENCY_NOT_SET: u64 = 1204; + /// identical base currency already added + const EIDENTICAL_BASE_CURRENCY_ALREADY_ADDED: u64 = 1205; + /// missing price feed identifier + const EMISSING_PRICE_FEED_IDENTIFIER: u64 = 1206; + /// missing price vaa + const EMISSING_PRICE_VAA: u64 = 1207; + /// not existing price feed identifier + const EPRICE_FEED_IDENTIFIER_NOT_EXIST: u64 = 1208; + + /// aave_rate module error code range from 1301 to 1400. + /// Account is not the rate's owner. + const ENOT_RATE_OWNER: u64 = 1301; + + /// aave_pool module error code range from 1401 to 1500. + /// Account is not the pool's owner. + const ENOT_POOL_OWNER: u64 = 1401; + /// User is not listed + const EUSER_NOT_LISTED: u64 = 1402; /// Mismatch of reserves count in storage - const ERESERVES_STORAGE_COUNT_MISMATCH: u64 = 93; + const ERESERVES_STORAGE_COUNT_MISMATCH: u64 = 1403; /// The person who signed must be consistent with on_behalf_of - const ESIGNER_AND_ON_BEHALF_OF_NO_SAME: u64 = 94; + const ESIGNER_AND_ON_BEHALF_OF_NO_SAME: u64 = 1404; /// Account does not exist - const EACCOUNT_DOES_NOT_EXIST: u64 = 95; - + const EACCOUNT_DOES_NOT_EXIST: u64 = 1405; /// Flashloan payer is different from the flashloan receiver - const EFLASHLOAN_PAYER_NOT_RECEIVER: u64 = 95; + const EFLASHLOAN_PAYER_NOT_RECEIVER: u64 = 1406; + /// Price oracle validation failed + const EPRICE_ORACLE_CHECK_FAILED: u64 = 1407; + /// reserve list not initialized + const ERESERVE_LIST_NOT_INITIALIZED: u64 = 1408; + + /// aave_tokens + /// Token already exists + const ETOKEN_ALREADY_EXISTS: u64 = 1409; + /// Token not exist + const ETOKEN_NOT_EXIST: u64 = 1410; + /// Resource not exist + const ERESOURCE_NOT_EXIST: u64 = 1411; + /// Token name already exist + const ETOKEN_NAME_ALREADY_EXIST: u64 = 1412; + /// Token symbol already exist + const ETOKEN_SYMBOL_ALREADY_EXIST: u64 = 1413; + + /// coin migrations + /// User has insufficient coins to wrap + const EINSUFFICIENT_COINS_TO_WRAP: u64 = 1414; + /// User has insufficient fungible assets to unwrap + const EINSUFFICIENT_FAS_TO_UNWRAP: u64 = 1415; + /// The coin has not been mapped to a fungible asset by Aptos + const EUNMAPPED_COIN_TO_FA: u64 = 1416; public fun get_ecaller_not_pool_admin(): u64 { ECALLER_NOT_POOL_ADMIN @@ -400,10 +464,6 @@ module aave_config::error { EINCONSISTENT_EMODE_CATEGORY } - public fun get_eprice_oracle_sentinel_check_failed(): u64 { - EPRICE_ORACLE_SENTINEL_CHECK_FAILED - } - public fun get_easset_not_borrowable_in_isolation(): u64 { EASSET_NOT_BORROWABLE_IN_ISOLATION } @@ -520,6 +580,62 @@ module aave_config::error { ERESERVE_DEBT_NOT_ZERO } + public fun get_enot_acl_owner(): u64 { + ENOT_ACL_OWNER + } + + public fun get_erole_missmatch(): u64 { + EROLE_MISSMATCH + } + + public fun get_erole_can_only_renounce_self(): u64 { + EROLE_CAN_ONLY_RENOUNCE_SELF + } + + public fun get_eoverflow(): u64 { + EOVERFLOW + } + + public fun get_edivision_by_zero(): u64 { + EDIVISION_BY_ZERO + } + + public fun get_enot_oracle_owner(): u64 { + ENOT_ORACLE_OWNER + } + + public fun get_eoracle_resource_not_found(): u64 { + EORACLE_RESOURCE_NOT_FOUND + } + + public fun get_enot_asset_listing_or_pool_admin(): u64 { + ENOT_ASSET_LISTING_OR_POOL_ADMIN + } + + public fun get_ebase_currency_not_set(): u64 { + EBASE_CURRENCY_NOT_SET + } + + public fun get_eidentical_base_currency_already_added(): u64 { + EIDENTICAL_BASE_CURRENCY_ALREADY_ADDED + } + + public fun get_emissing_price_feed_identifier(): u64 { + EMISSING_PRICE_FEED_IDENTIFIER + } + + public fun get_emissing_price_vaa(): u64 { + EMISSING_PRICE_VAA + } + + public fun get_eprice_feed_identifier_not_exist(): u64 { + EPRICE_FEED_IDENTIFIER_NOT_EXIST + } + + public fun get_enot_pool_owner(): u64 { + ENOT_POOL_OWNER + } + public fun get_eflashloan_disabled(): u64 { EFLASHLOAN_DISABLED } @@ -539,4 +655,48 @@ module aave_config::error { public fun get_flashloan_payer_not_receiver(): u64 { EFLASHLOAN_PAYER_NOT_RECEIVER } + + public fun get_eprice_oracle_check_failed(): u64 { + EPRICE_ORACLE_CHECK_FAILED + } + + public fun get_enot_rate_owner(): u64 { + ENOT_RATE_OWNER + } + + public fun get_ereserve_list_not_initialized(): u64 { + ERESERVE_LIST_NOT_INITIALIZED + } + + public fun get_etoken_already_exists(): u64 { + ETOKEN_ALREADY_EXISTS + } + + public fun get_etoken_not_exist(): u64 { + ETOKEN_NOT_EXIST + } + + public fun get_eresource_not_exist(): u64 { + ERESOURCE_NOT_EXIST + } + + public fun get_etoken_name_already_exist(): u64 { + ETOKEN_NAME_ALREADY_EXIST + } + + public fun get_etoken_symbol_already_exist(): u64 { + ETOKEN_SYMBOL_ALREADY_EXIST + } + + public fun get_einsufficient_coins_to_wrap(): u64 { + EINSUFFICIENT_COINS_TO_WRAP + } + + public fun get_einsufficient_fas_to_unwrap(): u64 { + EINSUFFICIENT_FAS_TO_UNWRAP + } + + public fun get_eunmapped_coin_to_fa(): u64 { + EUNMAPPED_COIN_TO_FA + } } diff --git a/aave-core/aave-config/sources/reserve_config.move b/aave-core/aave-config/sources/reserve_config.move index 6000061..9de42fa 100644 --- a/aave-core/aave-config/sources/reserve_config.move +++ b/aave-core/aave-config/sources/reserve_config.move @@ -1,8 +1,8 @@ /// @title ReserveConfiguration module /// @author Aave /// @notice Implements the bitmap logic to handle the reserve configuration -module aave_config::reserve { - use aave_config::error as error_config; +module aave_config::reserve_config { + use aave_config::error_config; use aave_config::helper; const LTV_MASK: u256 = @@ -98,7 +98,7 @@ module aave_config::reserve { /// bit 176-211 unbacked mint cap in whole tokens, unbackedMintCap == 0 => minting disabled /// bit 212-251 debt ceiling for isolation mode with (ReserveConfigurationMap::DEBT_CEILING_DECIMALS) decimals /// bit 252-255 unused - data: u256, + data: u256 } /// @notice init the reserve configuration @@ -129,10 +129,11 @@ module aave_config::reserve { ) { assert!( liquidation_threshold <= MAX_VALID_LIQUIDATION_THRESHOLD, - error_config::get_einvalid_liq_threshold(), + error_config::get_einvalid_liq_threshold() ); self.data = (self.data & LIQUIDATION_THRESHOLD_MASK) - |(liquidation_threshold << (LIQUIDATION_THRESHOLD_START_BIT_POSITION as u8)) + | (liquidation_threshold + << (LIQUIDATION_THRESHOLD_START_BIT_POSITION as u8)) } /// @notice Gets the liquidation threshold of the reserve @@ -151,10 +152,10 @@ module aave_config::reserve { ) { assert!( liquidation_bonus <= MAX_VALID_LIQUIDATION_BONUS, - error_config::get_einvalid_liq_bonus(), + error_config::get_einvalid_liq_bonus() ); self.data = (self.data & LIQUIDATION_BONUS_MASK) - |(liquidation_bonus << (LIQUIDATION_BONUS_START_BIT_POSITION as u8)) + | (liquidation_bonus << (LIQUIDATION_BONUS_START_BIT_POSITION as u8)) } /// @notice Gets the liquidation bonus of the reserve @@ -173,7 +174,7 @@ module aave_config::reserve { ) { assert!(decimals <= MAX_VALID_DECIMALS, error_config::get_einvalid_decimals()); self.data = (self.data & DECIMALS_MASK) - |(decimals << (RESERVE_DECIMALS_START_BIT_POSITION as u8)) + | (decimals << (RESERVE_DECIMALS_START_BIT_POSITION as u8)) } /// @notice Gets the decimals of the underlying asset of the reserve @@ -216,7 +217,7 @@ module aave_config::reserve { frozen_state = 1; }; self.data = (self.data & FROZEN_MASK) - |(frozen_state << (IS_FROZEN_START_BIT_POSITION as u8)) + | (frozen_state << (IS_FROZEN_START_BIT_POSITION as u8)) } /// @notice Gets the frozen state of the reserve @@ -237,7 +238,7 @@ module aave_config::reserve { paused_state = 1; }; self.data = (self.data & PAUSED_MASK) - |(paused_state << (IS_PAUSED_START_BIT_POSITION as u8)) + | (paused_state << (IS_PAUSED_START_BIT_POSITION as u8)) } /// @notice Gets the paused state of the reserve @@ -262,7 +263,7 @@ module aave_config::reserve { borrowable_state = 1; }; self.data = (self.data & BORROWABLE_IN_ISOLATION_MASK) - |(borrowable_state << (BORROWABLE_IN_ISOLATION_START_BIT_POSITION as u8)) + | (borrowable_state << (BORROWABLE_IN_ISOLATION_START_BIT_POSITION as u8)) } /// @notice Gets the borrowable in isolation flag for the reserve. @@ -328,11 +329,11 @@ module aave_config::reserve { ) { assert!( reserve_factor <= MAX_VALID_RESERVE_FACTOR, - error_config::get_einvalid_reserve_factor(), + error_config::get_einvalid_reserve_factor() ); self.data = (self.data & RESERVE_FACTOR_MASK) - |(reserve_factor << (RESERVE_FACTOR_START_BIT_POSITION as u8)) + | (reserve_factor << (RESERVE_FACTOR_START_BIT_POSITION as u8)) } /// @notice Gets the reserve factor of the reserve @@ -353,7 +354,7 @@ module aave_config::reserve { borrow_cap <= MAX_VALID_BORROW_CAP, error_config::get_einvalid_borrow_cap() ); self.data = (self.data & BORROW_CAP_MASK) - |(borrow_cap << (BORROW_CAP_START_BIT_POSITION as u8)); + | (borrow_cap << (BORROW_CAP_START_BIT_POSITION as u8)); } /// @notice Gets the borrow cap of the reserve @@ -374,7 +375,7 @@ module aave_config::reserve { supply_cap <= MAX_VALID_SUPPLY_CAP, error_config::get_einvalid_supply_cap() ); self.data = (self.data & SUPPLY_CAP_MASK) - |(supply_cap << (SUPPLY_CAP_START_BIT_POSITION as u8)) + | (supply_cap << (SUPPLY_CAP_START_BIT_POSITION as u8)) } /// @notice Gets the supply cap of the reserve @@ -393,11 +394,11 @@ module aave_config::reserve { ) { assert!( debt_ceiling <= MAX_VALID_DEBT_CEILING, - error_config::get_einvalid_debt_ceiling(), + error_config::get_einvalid_debt_ceiling() ); self.data = (self.data & DEBT_CEILING_MASK) - |(debt_ceiling << (DEBT_CEILING_START_BIT_POSITION as u8)); + | (debt_ceiling << (DEBT_CEILING_START_BIT_POSITION as u8)); } /// @notice Gets the debt ceiling for the asset if the asset is in isolation mode @@ -416,10 +417,10 @@ module aave_config::reserve { ) { assert!( liquidation_protocol_fee <= MAX_VALID_LIQUIDATION_PROTOCOL_FEE, - error_config::get_einvalid_liquidation_protocol_fee(), + error_config::get_einvalid_liquidation_protocol_fee() ); self.data = (self.data & LIQUIDATION_PROTOCOL_FEE_MASK) - |( + | ( liquidation_protocol_fee << (LIQUIDATION_PROTOCOL_FEE_START_BIT_POSITION as u8) ) @@ -443,11 +444,11 @@ module aave_config::reserve { ) { assert!( unbacked_mint_cap <= MAX_VALID_UNBACKED_MINT_CAP, - error_config::get_einvalid_unbacked_mint_cap(), + error_config::get_einvalid_unbacked_mint_cap() ); self.data = (self.data & UNBACKED_MINT_CAP_MASK) - |(unbacked_mint_cap << (UNBACKED_MINT_CAP_START_BIT_POSITION as u8)) + | (unbacked_mint_cap << (UNBACKED_MINT_CAP_START_BIT_POSITION as u8)) } /// @dev Gets the unbacked mint cap of the reserve @@ -466,10 +467,10 @@ module aave_config::reserve { ) { assert!( emode_category <= MAX_VALID_EMODE_CATEGORY, - error_config::get_einvalid_emode_category(), + error_config::get_einvalid_emode_category() ); self.data = (self.data & EMODE_CATEGORY_MASK) - |(emode_category << (EMODE_CATEGORY_START_BIT_POSITION as u8)) + | (emode_category << (EMODE_CATEGORY_START_BIT_POSITION as u8)) } /// @dev Gets the eMode asset category @@ -491,7 +492,7 @@ module aave_config::reserve { flash_loan_enabled_state = 1; }; self.data = (self.data & FLASHLOAN_ENABLED_MASK) - |(flash_loan_enabled_state << (FLASHLOAN_ENABLED_START_BIT_POSITION as u8)) + | (flash_loan_enabled_state << (FLASHLOAN_ENABLED_START_BIT_POSITION as u8)) } /// @notice Gets the flashloanable flag for the reserve @@ -509,8 +510,10 @@ module aave_config::reserve { /// @return The state flag representing paused public fun get_flags(self: &ReserveConfigurationMap): (bool, bool, bool, bool) { ( - get_active(self), get_frozen(self), get_borrowing_enabled(self), - get_paused(self), + get_active(self), + get_frozen(self), + get_borrowing_enabled(self), + get_paused(self) ) } @@ -522,14 +525,15 @@ module aave_config::reserve { /// @return The state param representing reserve decimals /// @return The state param representing reserve factor /// @return The state param representing eMode category - public fun get_params(self: &ReserveConfigurationMap): (u256, u256, u256, u256, u256, u256) { + public fun get_params(self: &ReserveConfigurationMap): + (u256, u256, u256, u256, u256, u256) { ( get_ltv(self), get_liquidation_threshold(self), get_liquidation_bonus(self), get_decimals(self), get_reserve_factor(self), - get_emode_category(self), + get_emode_category(self) ) } diff --git a/aave-core/aave-config/sources/user_config.move b/aave-core/aave-config/sources/user_config.move index f7285a2..c28c776 100644 --- a/aave-core/aave-config/sources/user_config.move +++ b/aave-core/aave-config/sources/user_config.move @@ -1,10 +1,10 @@ /// @title UserConfiguration library /// @author Aave /// @notice Implements the bitmap logic to handle the user configuration -module aave_config::user { - use aave_config::error as error_config; +module aave_config::user_config { + use aave_config::error_config; use aave_config::helper; - use aave_config::reserve as reserve_config; + use aave_config::reserve_config; const BORROWING_MASK: u256 = 0x5555555555555555555555555555555555555555555555555555555555555555; @@ -32,7 +32,7 @@ module aave_config::user { /// @dev Bitmap of the users collaterals and borrows. It is divided in pairs of bits, one pair per asset. /// The first bit indicates if an asset is used as collateral by the user, the second whether an /// asset is borrowed by the user. - data: u256, + data: u256 } /// @notice Initializes the user configuration map @@ -83,7 +83,7 @@ module aave_config::user { ) { assert!( reserve_index < (reserve_config::get_max_reserves_count() as u256), - error_config::get_einvalid_reserve_index(), + error_config::get_einvalid_reserve_index() ); let bit = 1 << ((reserve_index << 1) as u8); if (borrowing) { @@ -98,11 +98,11 @@ module aave_config::user { /// @param reserve_index The index of the reserve in the bitmap /// @param using_as_collateral True if the user is using the reserve as collateral, false otherwise public fun set_using_as_collateral( - self: &mut UserConfigurationMap, reserve_index: u256, using_as_collateral: bool, + self: &mut UserConfigurationMap, reserve_index: u256, using_as_collateral: bool ) { assert!( reserve_index < (reserve_config::get_max_reserves_count() as u256), - error_config::get_einvalid_reserve_index(), + error_config::get_einvalid_reserve_index() ); let bit: u256 = 1 << (((reserve_index << 1) + 1) as u8); if (using_as_collateral) { @@ -121,7 +121,7 @@ module aave_config::user { ): bool { assert!( reserve_index < (reserve_config::get_max_reserves_count() as u256), - error_config::get_einvalid_reserve_index(), + error_config::get_einvalid_reserve_index() ); (self.data >> ((reserve_index << 1) as u8)) & 3 != 0 @@ -136,7 +136,7 @@ module aave_config::user { ): bool { assert!( reserve_index < (reserve_config::get_max_reserves_count() as u256), - error_config::get_einvalid_reserve_index(), + error_config::get_einvalid_reserve_index() ); (self.data >> ((reserve_index << 1) as u8)) & 1 != 0 @@ -151,7 +151,7 @@ module aave_config::user { ): bool { assert!( reserve_index < (reserve_config::get_max_reserves_count() as u256), - error_config::get_einvalid_reserve_index(), + error_config::get_einvalid_reserve_index() ); (self.data >> ((reserve_index << 1) as u8) + 1) & 1 != 0 diff --git a/aave-core/aave-config/tests/error_tests.move b/aave-core/aave-config/tests/error_tests.move index 121d89c..0a9cb8b 100644 --- a/aave-core/aave-config/tests/error_tests.move +++ b/aave-core/aave-config/tests/error_tests.move @@ -1,95 +1,95 @@ #[test_only] module aave_config::error_tests { - use aave_config::error::{ - get_ecaller_not_pool_admin, - get_ecaller_not_emergency_admin, - get_ecaller_not_pool_or_emergency_admin, - get_ecaller_not_risk_or_pool_admin, + use aave_config::error_config::{ + get_eaccount_does_not_exist, + get_eacl_admin_cannot_be_zero, + get_eaddresses_provider_already_added, + get_eaddresses_provider_not_registered, + get_easset_not_borrowable_in_isolation, + get_easset_not_listed, + get_eborrow_cap_exceeded, + get_eborrowing_not_enabled, + get_ebridge_protocol_fee_invalid, + get_ecaller_must_be_pool, get_ecaller_not_asset_listing_or_pool_admin, + get_ecaller_not_atoken, get_ecaller_not_bridge, - get_eaddresses_provider_not_registered, - get_einvalid_addresses_provider_id, - get_enot_contract, + get_ecaller_not_emergency_admin, + get_ecaller_not_pool_admin, get_ecaller_not_pool_configurator, - get_ecaller_not_atoken, - get_einvalid_addresses_provider, - get_einvalid_flashloan_executor_return, - get_ereserve_already_added, - get_ereserves_storage_count_mismatch, - get_eno_more_reserves_allowed, + get_ecaller_not_pool_or_emergency_admin, + get_ecaller_not_risk_or_pool_admin, + get_ecollateral_balance_is_zero, + get_ecollateral_cannot_be_liquidated, + get_ecollateral_cannot_cover_new_borrow, + get_ecollateral_same_as_borrowing_currency, + get_edebt_ceiling_exceeded, + get_edebt_ceiling_not_zero, get_eemode_category_reserved, - get_einvalid_emode_category_assignment, - get_ereserve_liquidity_not_zero, + get_eflashloan_disabled, get_eflashloan_premium_invalid, - get_einvalid_reserve_params, - get_einvalid_emode_category_params, - get_ebridge_protocol_fee_invalid, - get_ecaller_must_be_pool, - get_einvalid_mint_amount, - get_einvalid_burn_amount, - get_einvalid_amount, - get_ereserve_inactive, - get_ereserve_frozen, - get_ereserve_paused, - get_eborrowing_not_enabled, - get_einvalid_interest_rate_mode_selected, get_ehealth_factor_lower_than_liquidation_threshold, - get_ecollateral_cannot_cover_new_borrow, - get_ecollateral_same_as_borrowing_currency, - get_eno_debt_of_selected_type, - get_eno_explicit_amount_to_repay_on_behalf, - get_eno_outstanding_variable_debt, - get_eunderlying_balance_zero, - get_einterest_rate_rebalance_conditions_not_met, get_ehealth_factor_not_below_threshold, - get_ecollateral_cannot_be_liquidated, - get_especified_currency_not_borrowed_by_user, - get_einconsistent_flashloan_params, - get_eborrow_cap_exceeded, - get_esupply_cap_exceeded, - get_eunbacked_mint_cap_exceeded, - get_edebt_ceiling_exceeded, - get_eunderlying_claimable_rights_not_zero, - get_evariable_debt_supply_not_zero, - get_enot_enough_available_user_balance, - get_ecollateral_balance_is_zero, - get_eltv_validation_failed, get_einconsistent_emode_category, - get_eprice_oracle_sentinel_check_failed, - get_easset_not_borrowable_in_isolation, - get_ereserve_already_initialized, - get_euser_in_isolation_mode_or_ltv_zero, - get_einvalid_ltv, - get_einvalid_liq_threshold, - get_einvalid_liq_bonus, - get_einvalid_decimals, + get_einconsistent_flashloan_params, + get_einconsistent_params_length, + get_einterest_rate_rebalance_conditions_not_met, + get_einvalid_addresses_provider, + get_einvalid_addresses_provider_id, + get_einvalid_amount, get_einvalid_borrow_cap, - get_einvalid_supply_cap, + get_einvalid_burn_amount, + get_einvalid_debt_ceiling, + get_einvalid_decimals, + get_einvalid_emode_category, + get_einvalid_emode_category_assignment, + get_einvalid_emode_category_params, + get_einvalid_expiration, + get_einvalid_flashloan_executor_return, + get_einvalid_interest_rate_mode_selected, + get_einvalid_liq_bonus, + get_einvalid_liq_threshold, get_einvalid_liquidation_protocol_fee, + get_einvalid_ltv, + get_einvalid_mint_amount, + get_einvalid_optimal_usage_ratio, get_einvalid_reserve_factor, - get_einvalid_emode_category, - get_einvalid_unbacked_mint_cap, - get_einvalid_debt_ceiling, get_einvalid_reserve_index, - get_eacl_admin_cannot_be_zero, - get_einconsistent_params_length, - get_ezero_address_not_valid, - get_einvalid_expiration, + get_einvalid_reserve_params, get_einvalid_signature, + get_einvalid_supply_cap, + get_einvalid_unbacked_mint_cap, + get_eltv_validation_failed, + get_eno_debt_of_selected_type, + get_eno_explicit_amount_to_repay_on_behalf, + get_eno_more_reserves_allowed, + get_eno_outstanding_variable_debt, + get_enot_contract, + get_enot_enough_available_user_balance, get_eoperation_not_supported, - get_edebt_ceiling_not_zero, - get_easset_not_listed, - get_einvalid_optimal_usage_ratio, - get_eunderlying_cannot_be_rescued, - get_eaddresses_provider_already_added, get_epool_addresses_do_not_match, - get_esiloed_borrowing_violation, + get_eprice_oracle_check_failed, + get_ereserve_already_added, + get_ereserve_already_initialized, get_ereserve_debt_not_zero, - get_eflashloan_disabled, - get_euser_not_listed, + get_ereserve_frozen, + get_ereserve_inactive, + get_ereserve_liquidity_not_zero, + get_ereserve_paused, + get_ereserves_storage_count_mismatch, get_esigner_and_on_behalf_of_no_same, - get_eaccount_does_not_exist, - get_flashloan_payer_not_receiver, + get_esiloed_borrowing_violation, + get_especified_currency_not_borrowed_by_user, + get_esupply_cap_exceeded, + get_eunbacked_mint_cap_exceeded, + get_eunderlying_balance_zero, + get_eunderlying_cannot_be_rescued, + get_eunderlying_claimable_rights_not_zero, + get_euser_in_isolation_mode_or_ltv_zero, + get_euser_not_listed, + get_evariable_debt_supply_not_zero, + get_ezero_address_not_valid, + get_flashloan_payer_not_receiver }; const TEST_SUCCESS: u64 = 1; @@ -201,8 +201,6 @@ module aave_config::error_tests { const ELTV_VALIDATION_FAILED: u64 = 57; /// Inconsistent eMode category const EINCONSISTENT_EMODE_CATEGORY: u64 = 58; - /// Price oracle sentinel validation failed - const EPRICE_ORACLE_SENTINEL_CHECK_FAILED: u64 = 59; /// Asset is not borrowable in isolation mode const EASSET_NOT_BORROWABLE_IN_ISOLATION: u64 = 60; /// Reserve has already been initialized @@ -264,18 +262,75 @@ module aave_config::error_tests { const ERESERVE_DEBT_NOT_ZERO: u64 = 90; /// FlashLoaning for this asset is disabled const EFLASHLOAN_DISABLED: u64 = 91; - /// User is not listed - const EUSER_NOT_LISTED: u64 = 92; + /// Aptos has introduced a new business logic error code range from 1001 to 2000. + + /// aave_acl module error code range from 1001 to 1100. + /// Account is not the acl's owner. + const ENOT_ACL_OWNER: u64 = 1001; + /// Account is missing role. + const EROLE_MISSMATCH: u64 = 1002; + /// can only renounce roles for self + const EROLE_CAN_ONLY_RENOUNCE_SELF: u64 = 1003; + + /// aave_math module error code range from 1101 to 1200. + /// Calculation results in overflow + const EOVERFLOW: u64 = 1101; + /// Cannot divide by zero + const EDIVISION_BY_ZERO: u64 = 1102; + + /// aave_oracle module error code range from 1201 to 1300. + /// Account is not the oracle's owner. + const ENOT_ORACLE_OWNER: u64 = 1201; + const ERESOURCE_NOT_FOUND: u64 = 1202; + + /// aave_oracle + /// Not an asset listing or a pool admin error + const ENOT_ASSET_LISTING_OR_POOL_ADMIN: u64 = 1203; + /// base currency not set + const EBASE_CURRENCY_NOT_SET: u64 = 1204; + /// identical base currency already added + const EIDENTICAL_BASE_CURRENCY_ALREADY_ADDED: u64 = 1205; + /// missing price feed identifier + const EMISSING_PRICE_FEED_IDENTIFIER: u64 = 1206; + /// missing price vaa + const EMISSING_PRICE_VAA: u64 = 1207; + /// not existing price feed identifier + const EPRICE_FEED_IDENTIFIER_NOT_EXIST: u64 = 1208; + + /// aave_rate module error code range from 1301 to 1400. + /// Account is not the rate's owner. + const ENOT_RATE_OWNER: u64 = 1301; + + /// aave_pool module error code range from 1401 to 1500. + /// Account is not the pool's owner. + const ENOT_POOL_OWNER: u64 = 1401; + /// User is not listed + const EUSER_NOT_LISTED: u64 = 1402; /// Mismatch of reserves count in storage - const ERESERVES_STORAGE_COUNT_MISMATCH: u64 = 93; + const ERESERVES_STORAGE_COUNT_MISMATCH: u64 = 1403; /// The person who signed must be consistent with on_behalf_of - const ESIGNER_AND_ON_BEHALF_OF_NO_SAME: u64 = 94; + const ESIGNER_AND_ON_BEHALF_OF_NO_SAME: u64 = 1404; /// Account does not exist - const EACCOUNT_DOES_NOT_EXIST: u64 = 95; - + const EACCOUNT_DOES_NOT_EXIST: u64 = 1405; /// Flashloan payer is different from the flashloan receiver - const EFLASHLOAN_PAYER_NOT_RECEIVER: u64 = 95; + const EFLASHLOAN_PAYER_NOT_RECEIVER: u64 = 1406; + /// Price oracle validation failed + const EPRICE_ORACLE_CHECK_FAILED: u64 = 1407; + /// reserve list not initialized + const ERESERVE_LIST_NOT_INITIALIZED: u64 = 1408; + + /// aave_tokens + /// Token already exists + const ETOKEN_ALREADY_EXISTS: u64 = 1409; + /// Token not exist + const ETOKEN_NOT_EXIST: u64 = 1410; + /// Resource not exist + const ERESOURCE_NOT_EXIST: u64 = 1411; + /// Token name already exist + const ETOKEN_NAME_ALREADY_EXIST: u64 = 1412; + /// Token symbol already exist + const ETOKEN_SYMBOL_ALREADY_EXIST: u64 = 1413; #[test] fun test_get_ecaller_not_pool_admin() { @@ -285,15 +340,17 @@ module aave_config::error_tests { #[test] fun test_get_ecaller_not_emergency_admin() { assert!( - get_ecaller_not_emergency_admin() == ECALLER_NOT_EMERGENCY_ADMIN, TEST_SUCCESS + get_ecaller_not_emergency_admin() == ECALLER_NOT_EMERGENCY_ADMIN, + TEST_SUCCESS ); } #[test] fun test_get_ecaller_not_pool_or_emergency_admin() { assert!( - get_ecaller_not_pool_or_emergency_admin() == ECALLER_NOT_POOL_OR_EMERGENCY_ADMIN, - TEST_SUCCESS, + get_ecaller_not_pool_or_emergency_admin() + == ECALLER_NOT_POOL_OR_EMERGENCY_ADMIN, + TEST_SUCCESS ); } @@ -301,7 +358,7 @@ module aave_config::error_tests { fun test_get_ecaller_not_risk_or_pool_admin() { assert!( get_ecaller_not_risk_or_pool_admin() == ECALLER_NOT_RISK_OR_POOL_ADMIN, - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -310,7 +367,7 @@ module aave_config::error_tests { assert!( get_ecaller_not_asset_listing_or_pool_admin() == ECALLER_NOT_ASSET_LISTING_OR_POOL_ADMIN, - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -322,8 +379,9 @@ module aave_config::error_tests { #[test] fun test_get_eaddresses_provider_not_registered() { assert!( - get_eaddresses_provider_not_registered() == EADDRESSES_PROVIDER_NOT_REGISTERED, - TEST_SUCCESS, + get_eaddresses_provider_not_registered() + == EADDRESSES_PROVIDER_NOT_REGISTERED, + TEST_SUCCESS ); } @@ -331,7 +389,7 @@ module aave_config::error_tests { fun test_get_einvalid_addresses_provider_id() { assert!( get_einvalid_addresses_provider_id() == EINVALID_ADDRESSES_PROVIDER_ID, - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -344,7 +402,7 @@ module aave_config::error_tests { fun test_get_ecaller_not_pool_configurator() { assert!( get_ecaller_not_pool_configurator() == ECALLER_NOT_POOL_CONFIGURATOR, - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -356,15 +414,17 @@ module aave_config::error_tests { #[test] fun test_get_einvalid_addresses_provider() { assert!( - get_einvalid_addresses_provider() == EINVALID_ADDRESSES_PROVIDER, TEST_SUCCESS + get_einvalid_addresses_provider() == EINVALID_ADDRESSES_PROVIDER, + TEST_SUCCESS ); } #[test] fun test_get_einvalid_flashloan_executor_return() { assert!( - get_einvalid_flashloan_executor_return() == EINVALID_FLASHLOAN_EXECUTOR_RETURN, - TEST_SUCCESS, + get_einvalid_flashloan_executor_return() + == EINVALID_FLASHLOAN_EXECUTOR_RETURN, + TEST_SUCCESS ); } @@ -377,7 +437,7 @@ module aave_config::error_tests { fun test_get_ereserves_storage_count_mismatch() { assert!( get_ereserves_storage_count_mismatch() == ERESERVES_STORAGE_COUNT_MISMATCH, - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -396,22 +456,25 @@ module aave_config::error_tests { #[test] fun test_get_einvalid_emode_category_assignment() { assert!( - get_einvalid_emode_category_assignment() == EINVALID_EMODE_CATEGORY_ASSIGNMENT, - TEST_SUCCESS, + get_einvalid_emode_category_assignment() + == EINVALID_EMODE_CATEGORY_ASSIGNMENT, + TEST_SUCCESS ); } #[test] fun test_get_ereserve_liquidity_not_zero() { assert!( - get_ereserve_liquidity_not_zero() == ERESERVE_LIQUIDITY_NOT_ZERO, TEST_SUCCESS + get_ereserve_liquidity_not_zero() == ERESERVE_LIQUIDITY_NOT_ZERO, + TEST_SUCCESS ); } #[test] fun test_get_eflashloan_premium_invalid() { assert!( - get_eflashloan_premium_invalid() == EFLASHLOAN_PREMIUM_INVALID, TEST_SUCCESS + get_eflashloan_premium_invalid() == EFLASHLOAN_PREMIUM_INVALID, + TEST_SUCCESS ); } @@ -424,7 +487,7 @@ module aave_config::error_tests { fun test_get_einvalid_emode_category_params() { assert!( get_einvalid_emode_category_params() == EINVALID_EMODE_CATEGORY_PARAMS, - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -432,7 +495,7 @@ module aave_config::error_tests { fun test_get_ebridge_protocol_fee_invalid() { assert!( get_ebridge_protocol_fee_invalid() == EBRIDGE_PROTOCOL_FEE_INVALID, - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -479,8 +542,9 @@ module aave_config::error_tests { #[test] fun test_get_enot_enough_available_user_balance() { assert!( - get_enot_enough_available_user_balance() == ENOT_ENOUGH_AVAILABLE_USER_BALANCE, - TEST_SUCCESS, + get_enot_enough_available_user_balance() + == ENOT_ENOUGH_AVAILABLE_USER_BALANCE, + TEST_SUCCESS ); } @@ -489,14 +553,15 @@ module aave_config::error_tests { assert!( get_einvalid_interest_rate_mode_selected() == EINVALID_INTEREST_RATE_MODE_SELECTED, - TEST_SUCCESS, + TEST_SUCCESS ); } #[test] fun test_get_ecollateral_balance_is_zero() { assert!( - get_ecollateral_balance_is_zero() == ECOLLATERAL_BALANCE_IS_ZERO, TEST_SUCCESS + get_ecollateral_balance_is_zero() == ECOLLATERAL_BALANCE_IS_ZERO, + TEST_SUCCESS ); } @@ -505,15 +570,16 @@ module aave_config::error_tests { assert!( get_ehealth_factor_lower_than_liquidation_threshold() == EHEALTH_FACTOR_LOWER_THAN_LIQUIDATION_THRESHOLD, - TEST_SUCCESS, + TEST_SUCCESS ); } #[test] fun test_get_ecollateral_cannot_cover_new_borrow() { assert!( - get_ecollateral_cannot_cover_new_borrow() == ECOLLATERAL_CANNOT_COVER_NEW_BORROW, - TEST_SUCCESS, + get_ecollateral_cannot_cover_new_borrow() + == ECOLLATERAL_CANNOT_COVER_NEW_BORROW, + TEST_SUCCESS ); } @@ -522,7 +588,7 @@ module aave_config::error_tests { assert!( get_ecollateral_same_as_borrowing_currency() == ECOLLATERAL_SAME_AS_BORROWING_CURRENCY, - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -538,7 +604,7 @@ module aave_config::error_tests { assert!( get_eno_explicit_amount_to_repay_on_behalf() == ENO_EXPLICIT_AMOUNT_TO_REPAY_ON_BEHALF, - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -546,7 +612,7 @@ module aave_config::error_tests { fun test_get_eno_outstanding_variable_debt() { assert!( get_eno_outstanding_variable_debt() == ENO_OUTSTANDING_VARIABLE_DEBT, - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -560,15 +626,16 @@ module aave_config::error_tests { assert!( get_einterest_rate_rebalance_conditions_not_met() == EINTEREST_RATE_REBALANCE_CONDITIONS_NOT_MET, - TEST_SUCCESS, + TEST_SUCCESS ); } #[test] fun test_get_ehealth_factor_not_below_threshold() { assert!( - get_ehealth_factor_not_below_threshold() == EHEALTH_FACTOR_NOT_BELOW_THRESHOLD, - TEST_SUCCESS, + get_ehealth_factor_not_below_threshold() + == EHEALTH_FACTOR_NOT_BELOW_THRESHOLD, + TEST_SUCCESS ); } @@ -576,7 +643,7 @@ module aave_config::error_tests { fun test_get_ecollateral_cannot_be_liquidated() { assert!( get_ecollateral_cannot_be_liquidated() == ECOLLATERAL_CANNOT_BE_LIQUIDATED, - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -585,7 +652,7 @@ module aave_config::error_tests { assert!( get_especified_currency_not_borrowed_by_user() == ESPECIFIED_CURRENCY_NOT_BORROWED_BY_USER, - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -593,7 +660,7 @@ module aave_config::error_tests { fun test_get_einconsistent_flashloan_params() { assert!( get_einconsistent_flashloan_params() == EINCONSISTENT_FLASHLOAN_PARAMS, - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -610,7 +677,8 @@ module aave_config::error_tests { #[test] fun test_get_eunbacked_mint_cap_exceededd() { assert!( - get_eunbacked_mint_cap_exceeded() == EUNBACKED_MINT_CAP_EXCEEDED, TEST_SUCCESS + get_eunbacked_mint_cap_exceeded() == EUNBACKED_MINT_CAP_EXCEEDED, + TEST_SUCCESS ); } @@ -624,7 +692,7 @@ module aave_config::error_tests { assert!( get_eunderlying_claimable_rights_not_zero() == EUNDERLYING_CLAIMABLE_RIGHTS_NOT_ZERO, - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -632,7 +700,7 @@ module aave_config::error_tests { fun test_get_evariable_debt_supply_not_zero() { assert!( get_evariable_debt_supply_not_zero() == EVARIABLE_DEBT_SUPPLY_NOT_ZERO, - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -645,23 +713,16 @@ module aave_config::error_tests { fun test_get_einconsistent_emode_category() { assert!( get_einconsistent_emode_category() == EINCONSISTENT_EMODE_CATEGORY, - TEST_SUCCESS, - ); - } - - #[test] - fun test_get_eprice_oracle_sentinel_check_failed() { - assert!( - get_eprice_oracle_sentinel_check_failed() == EPRICE_ORACLE_SENTINEL_CHECK_FAILED, - TEST_SUCCESS, + TEST_SUCCESS ); } #[test] fun test_get_easset_not_borrowable_in_isolation() { assert!( - get_easset_not_borrowable_in_isolation() == EASSET_NOT_BORROWABLE_IN_ISOLATION, - TEST_SUCCESS, + get_easset_not_borrowable_in_isolation() + == EASSET_NOT_BORROWABLE_IN_ISOLATION, + TEST_SUCCESS ); } @@ -669,15 +730,16 @@ module aave_config::error_tests { fun test_get_ereserve_already_initialized() { assert!( get_ereserve_already_initialized() == ERESERVE_ALREADY_INITIALIZED, - TEST_SUCCESS, + TEST_SUCCESS ); } #[test] fun test_get_euser_in_isolation_mode_or_ltv_zero() { assert!( - get_euser_in_isolation_mode_or_ltv_zero() == EUSER_IN_ISOLATION_MODE_OR_LTV_ZERO, - TEST_SUCCESS, + get_euser_in_isolation_mode_or_ltv_zero() + == EUSER_IN_ISOLATION_MODE_OR_LTV_ZERO, + TEST_SUCCESS ); } @@ -714,8 +776,9 @@ module aave_config::error_tests { #[test] fun test_get_einvalid_liquidation_protocol_fee() { assert!( - get_einvalid_liquidation_protocol_fee() == EINVALID_LIQUIDATION_PROTOCOL_FEE, - TEST_SUCCESS, + get_einvalid_liquidation_protocol_fee() + == EINVALID_LIQUIDATION_PROTOCOL_FEE, + TEST_SUCCESS ); } @@ -727,7 +790,8 @@ module aave_config::error_tests { #[test] fun test_get_einvalid_unbacked_mint_cap() { assert!( - get_einvalid_unbacked_mint_cap() == EINVALID_UNBACKED_MINT_CAP, TEST_SUCCESS + get_einvalid_unbacked_mint_cap() == EINVALID_UNBACKED_MINT_CAP, + TEST_SUCCESS ); } @@ -751,7 +815,8 @@ module aave_config::error_tests { #[test] fun test_get_einconsistent_params_length() { assert!( - get_einconsistent_params_length() == EINCONSISTENT_PARAMS_LENGTH, TEST_SUCCESS + get_einconsistent_params_length() == EINCONSISTENT_PARAMS_LENGTH, + TEST_SUCCESS ); } @@ -789,7 +854,7 @@ module aave_config::error_tests { fun test_get_einvalid_optimal_usage_ratio() { assert!( get_einvalid_optimal_usage_ratio() == EINVALID_OPTIMAL_USAGE_RATIO, - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -797,15 +862,16 @@ module aave_config::error_tests { fun test_get_eunderlying_cannot_be_rescued() { assert!( get_eunderlying_cannot_be_rescued() == EUNDERLYING_CANNOT_BE_RESCUED, - TEST_SUCCESS, + TEST_SUCCESS ); } #[test] fun test_get_eaddresses_provider_already_added() { assert!( - get_eaddresses_provider_already_added() == EADDRESSES_PROVIDER_ALREADY_ADDED, - TEST_SUCCESS, + get_eaddresses_provider_already_added() + == EADDRESSES_PROVIDER_ALREADY_ADDED, + TEST_SUCCESS ); } @@ -813,14 +879,15 @@ module aave_config::error_tests { fun test_get_epool_addresses_do_not_match() { assert!( get_epool_addresses_do_not_match() == EPOOL_ADDRESSES_DO_NOT_MATCH, - TEST_SUCCESS, + TEST_SUCCESS ); } #[test] fun test_get_esiloed_borrowing_violation() { assert!( - get_esiloed_borrowing_violation() == ESILOED_BORROWING_VIOLATION, TEST_SUCCESS + get_esiloed_borrowing_violation() == ESILOED_BORROWING_VIOLATION, + TEST_SUCCESS ); } @@ -843,7 +910,7 @@ module aave_config::error_tests { fun test_get_esigner_and_on_behalf_of_no_same() { assert!( get_esigner_and_on_behalf_of_no_same() == ESIGNER_AND_ON_BEHALF_OF_NO_SAME, - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -856,7 +923,7 @@ module aave_config::error_tests { fun test_get_flashloan_payer_not_receiver() { assert!( get_flashloan_payer_not_receiver() == EFLASHLOAN_PAYER_NOT_RECEIVER, - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -864,4 +931,12 @@ module aave_config::error_tests { fun test_get_einvalid_liq_bonus() { assert!(get_einvalid_liq_bonus() == EINVALID_LIQ_BONUS, TEST_SUCCESS); } + + #[test] + fun test_get_price_oracle_check_failed() { + assert!( + get_eprice_oracle_check_failed() == EPRICE_ORACLE_CHECK_FAILED, + TEST_SUCCESS + ); + } } diff --git a/aave-core/aave-config/tests/reserve_config_tests.move b/aave-core/aave-config/tests/reserve_config_tests.move index 49cc112..aedaa75 100644 --- a/aave-core/aave-config/tests/reserve_config_tests.move +++ b/aave-core/aave-config/tests/reserve_config_tests.move @@ -1,44 +1,45 @@ #[test_only] module aave_config::reserve_tests { - use aave_config::reserve::{ - init, - ReserveConfigurationMap, + use aave_config::reserve_config::{ get_borrow_cap, - get_ltv, - get_liquidation_threshold, - get_liquidation_bonus, + get_borrowing_enabled, + get_caps, get_decimals, + get_emode_category, + get_flags, + get_flash_loan_enabled, get_frozen, - get_borrowing_enabled, + get_liquidation_bonus, + get_liquidation_protocol_fee, + get_liquidation_threshold, + get_ltv, + get_max_valid_decimals, + get_max_valid_emode_category, + get_max_valid_liquidation_protocol_fee, + get_max_valid_liquidation_threshold, + get_max_valid_ltv, + get_max_valid_reserve_factor, + get_params, get_reserve_factor, get_supply_cap, - get_liquidation_protocol_fee, get_unbacked_mint_cap, - get_emode_category, - get_flash_loan_enabled, - get_flags, - get_params, - get_caps, - set_ltv, - set_liquidation_threshold, - set_liquidation_bonus, + init, + ReserveConfigurationMap, + set_borrow_cap, + set_borrowing_enabled, set_decimals, + set_emode_category, + set_flash_loan_enabled, set_frozen, - set_borrowing_enabled, + set_liquidation_bonus, + set_liquidation_protocol_fee, + set_liquidation_threshold, + set_ltv, set_reserve_factor, - set_borrow_cap, set_supply_cap, - set_liquidation_protocol_fee, - set_unbacked_mint_cap, - set_emode_category, - set_flash_loan_enabled, - get_max_valid_reserve_factor, - get_max_valid_liquidation_threshold, - get_max_valid_decimals, - get_max_valid_emode_category, - get_max_valid_liquidation_protocol_fee, - get_max_valid_ltv + set_unbacked_mint_cap }; + // // Test example reference link: https://github.com/aave/aave-v3-core/blob/master/test-suites/reserve-configuration.spec.ts // test functions @@ -251,12 +252,14 @@ module aave_config::reserve_tests { check_params(&reserve_config, ZERO, ZERO); set_reserve_factor(&mut reserve_config, get_max_valid_reserve_factor()); - check_params(&reserve_config, ENUM_RESERVE_FACTOR, get_max_valid_reserve_factor()); + check_params( + &reserve_config, ENUM_RESERVE_FACTOR, get_max_valid_reserve_factor() + ); } #[test] // set_reserve_factor() with reserve_factor > MAX_VALID_RESERVE_FACTOR - #[expected_failure(abort_code = 67, location = aave_config::reserve)] + #[expected_failure(abort_code = 67, location = aave_config::reserve_config)] fun test_set_reserve_factor_expected_failure() { let reserve_config = init(); check_params(&reserve_config, ZERO, ZERO); @@ -351,7 +354,7 @@ module aave_config::reserve_tests { #[test] // set_ltv() with ltv > MAX_VALID_LTV (revert expected) - #[expected_failure(abort_code = 63, location = aave_config::reserve)] + #[expected_failure(abort_code = 63, location = aave_config::reserve_config)] fun test_set_ltv_expected_failure() { let reserve_config = init(); assert!(get_ltv(&reserve_config) == ZERO, SUCCESS); @@ -373,12 +376,12 @@ module aave_config::reserve_tests { check_params( &reserve_config, ENUM_LIQUIDATION_THRESHOLD, - get_max_valid_liquidation_threshold(), + get_max_valid_liquidation_threshold() ); assert!( get_liquidation_threshold(&reserve_config) == get_max_valid_liquidation_threshold(), - SUCCESS, + SUCCESS ); set_liquidation_threshold(&mut reserve_config, ZERO); @@ -388,7 +391,7 @@ module aave_config::reserve_tests { #[test] // set_liquidation_threshold() with threshold > MAX_VALID_LIQUIDATION_THRESHOLD (revert expected) - #[expected_failure(abort_code = 64, location = aave_config::reserve)] + #[expected_failure(abort_code = 64, location = aave_config::reserve_config)] fun test_set_liquidation_threshold_expected_failure() { let reserve_config = init(); assert!(get_liquidation_threshold(&reserve_config) == ZERO, SUCCESS); @@ -417,7 +420,7 @@ module aave_config::reserve_tests { #[test] // set_decimals() with decimals > MAX_VALID_DECIMALS (revert expected) - #[expected_failure(abort_code = 66, location = aave_config::reserve)] + #[expected_failure(abort_code = 66, location = aave_config::reserve_config)] fun test_set_decimals_expected_failure() { let reserve_config = init(); assert!(get_decimals(&reserve_config) == ZERO, SUCCESS); @@ -434,7 +437,8 @@ module aave_config::reserve_tests { set_emode_category(&mut reserve_config, get_max_valid_emode_category()); assert!( - get_emode_category(&reserve_config) == get_max_valid_emode_category(), SUCCESS + get_emode_category(&reserve_config) == get_max_valid_emode_category(), + SUCCESS ); set_emode_category(&mut reserve_config, ZERO); @@ -443,7 +447,7 @@ module aave_config::reserve_tests { #[test] // set_emode_category() with category_id > MAX_VALID_EMODE_CATEGORY (revert expected) - #[expected_failure(abort_code = 71, location = aave_config::reserve)] + #[expected_failure(abort_code = 71, location = aave_config::reserve_config)] fun test_set_emode_category_expected_failure() { let reserve_config = init(); assert!(get_emode_category(&reserve_config) == ZERO, SUCCESS); @@ -464,13 +468,13 @@ module aave_config::reserve_tests { assert!( get_liquidation_protocol_fee(&reserve_config) == get_max_valid_liquidation_protocol_fee(), - SUCCESS, + SUCCESS ); } #[test] // setLiquidationProtocolFee() with liquidationProtocolFee > MAX_VALID_LIQUIDATION_PROTOCOL_FEE (revert expected) - #[expected_failure(abort_code = 70, location = aave_config::reserve)] + #[expected_failure(abort_code = 70, location = aave_config::reserve_config)] fun test_set_liquidation_protocol_fee_expected_failure() { let reserve_config = init(); assert!(get_liquidation_protocol_fee(&reserve_config) == ZERO, SUCCESS); diff --git a/aave-core/aave-config/tests/user_config_tests.move b/aave-core/aave-config/tests/user_config_tests.move index c44ee68..ef43585 100644 --- a/aave-core/aave-config/tests/user_config_tests.move +++ b/aave-core/aave-config/tests/user_config_tests.move @@ -1,7 +1,8 @@ #[test_only] module aave_config::user_tests { use aave_config::helper::Self; - use aave_config::user::{ + use aave_config::user_config::{ + get_first_asset_id_by_mask, get_health_factor_liquidation_threshold, get_health_factor_liquidation_threshold_for_testing, get_isolated_collateral_supplier_role, @@ -19,8 +20,7 @@ module aave_config::user_tests { is_using_as_collateral_or_borrowing, set_borrowing, set_using_as_collateral, - test_init_module, - get_first_asset_id_by_mask, + test_init_module }; const TEST_SUCCESS: u64 = 1; @@ -32,17 +32,17 @@ module aave_config::user_tests { assert!( get_minimum_health_factor_liquidation_threshold() == get_minimum_health_factor_liquidation_threshold_for_testing(), - TEST_SUCCESS, + TEST_SUCCESS ); assert!( get_health_factor_liquidation_threshold() == get_health_factor_liquidation_threshold_for_testing(), - TEST_SUCCESS, + TEST_SUCCESS ); assert!( get_isolated_collateral_supplier_role() == get_isolated_collateral_supplier_role_for_testing(), - TEST_SUCCESS, + TEST_SUCCESS ); // test default values let user_config_map = get_user_config_map(); @@ -58,7 +58,7 @@ module aave_config::user_tests { assert!(is_borrowing_one(&mut user_config_map), TEST_SUCCESS); assert!( is_using_as_collateral_or_borrowing(&mut user_config_map, reserve_index), - TEST_SUCCESS, + TEST_SUCCESS ); // test collateral set_using_as_collateral(&mut user_config_map, reserve_index, true); @@ -67,7 +67,7 @@ module aave_config::user_tests { assert!(is_using_as_collateral_one(&user_config_map), TEST_SUCCESS); assert!( is_using_as_collateral_or_borrowing(&user_config_map, reserve_index), - TEST_SUCCESS, + TEST_SUCCESS ); } diff --git a/aave-core/aave-mock-oracle/Move.toml b/aave-core/aave-data/Move.toml similarity index 74% rename from aave-core/aave-mock-oracle/Move.toml rename to aave-core/aave-data/Move.toml index 09a69db..871d7e1 100644 --- a/aave-core/aave-mock-oracle/Move.toml +++ b/aave-core/aave-data/Move.toml @@ -1,14 +1,17 @@ [package] -name = "AaveMockOracle" +name = "AaveData" version = "1.0.0" upgrade_policy = "compatible" authors = [] [addresses] -aave_mock_oracle = "_" +aave_data = "_" + +[dev-addresses] [dependencies] AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "mainnet" } AaveConfig = { local = "../aave-config" } -AaveAcl = { local = "../aave-acl" } +AavePool = { local = "../" } +[dev-dependencies] diff --git a/aave-core/aave-data/sources/v1.move b/aave-core/aave-data/sources/v1.move new file mode 100644 index 0000000..2f93952 --- /dev/null +++ b/aave-core/aave-data/sources/v1.move @@ -0,0 +1,125 @@ +module aave_data::v1 { + // std + use std::signer; + use std::string; + use std::string::String; + use aptos_std::string_utils; + use aptos_std::smart_table; + // locals + use aave_config::error_config; + + // prefixes + const ATOKEN_NAME_PREFIX: vector = b"AAVE_A"; + const ATOKEN_SYMBOL_PREFIX: vector = b"aaveA"; + const VARTOKEN_NAME_PREFIX: vector = b"AAVE_VAR"; + const VARTOKEN_SYMBOL_PREFIX: vector = b"aaveVar"; + + struct Data has key { + price_feeds_testnet: smart_table::SmartTable>, + price_feeds_mainnet: smart_table::SmartTable>, + underlying_assets_testnet: smart_table::SmartTable, + underlying_assets_mainnet: smart_table::SmartTable, + reserves_config_testnet: smart_table::SmartTable, + reserves_config_mainnet: smart_table::SmartTable, + interest_rate_strategy_testnet: smart_table::SmartTable, + interest_rate_strategy_mainnet: smart_table::SmartTable, + emodes_testnet: smart_table::SmartTable, + emodes_mainnet: smart_table::SmartTable + } + + fun init_module(account: &signer) { + assert!( + signer::address_of(account) == @aave_data, + error_config::get_enot_pool_owner() + ); + move_to( + account, + Data { + price_feeds_testnet: aave_data::v1_values::build_price_feeds_testnet(), + price_feeds_mainnet: aave_data::v1_values::build_price_feeds_mainnet(), + underlying_assets_testnet: aave_data::v1_values::build_underlying_assets_testnet(), + underlying_assets_mainnet: aave_data::v1_values::build_underlying_assets_mainnet(), + reserves_config_testnet: aave_data::v1_values::build_reserve_config_testnet(), + reserves_config_mainnet: aave_data::v1_values::build_reserve_config_mainnet(), + interest_rate_strategy_testnet: aave_data::v1_values::build_interest_rate_strategy_testnet(), + interest_rate_strategy_mainnet: aave_data::v1_values::build_interest_rate_strategy_mainnet(), + emodes_testnet: aave_data::v1_values::build_emodes_testnet(), + emodes_mainnet: aave_data::v1_values::build_emodes_mainnet() + } + ); + } + + public inline fun get_atoken_name(underlying_asset_symbol: String): String { + string_utils::format2(&b"{}_{}", ATOKEN_NAME_PREFIX, underlying_asset_symbol) + } + + public inline fun get_atoken_symbol(underlying_asset_symbol: String): String { + string_utils::format2(&b"{}{}", ATOKEN_SYMBOL_PREFIX, underlying_asset_symbol) + } + + public inline fun get_vartoken_name(underlying_asset_symbol: String): String { + string_utils::format2(&b"{}_{}", VARTOKEN_NAME_PREFIX, underlying_asset_symbol) + } + + public inline fun get_vartoken_symbol(underlying_asset_symbol: String): String { + string_utils::format2(&b"{}{}", VARTOKEN_SYMBOL_PREFIX, underlying_asset_symbol) + } + + public inline fun get_asset_symbols_testnet(): &vector acquires Data { + &smart_table::keys(&borrow_global(@aave_pool).price_feeds_testnet) + } + + public inline fun get_asset_symbols_mainnet(): &vector acquires Data { + &smart_table::keys(&borrow_global(@aave_pool).price_feeds_mainnet) + } + + public inline fun get_price_feeds_tesnet(): + &smart_table::SmartTable> acquires Data { + &borrow_global(@aave_pool).price_feeds_testnet + } + + public inline fun get_price_feeds_mainnet(): + &smart_table::SmartTable> acquires Data { + &borrow_global(@aave_pool).price_feeds_mainnet + } + + public inline fun get_underlying_assets_testnet(): + &smart_table::SmartTable acquires Data { + &borrow_global(@aave_pool).underlying_assets_testnet + } + + public inline fun get_underlying_assets_mainnet(): + &smart_table::SmartTable acquires Data { + &borrow_global(@aave_pool).underlying_assets_mainnet + } + + public inline fun get_reserves_config_testnet(): + &smart_table::SmartTable acquires Data { + &borrow_global(@aave_pool).reserves_config_testnet + } + + public inline fun get_reserves_config_mainnet(): + &smart_table::SmartTable acquires Data { + &borrow_global(@aave_pool).reserves_config_mainnet + } + + public inline fun get_interest_rate_strategy_testnet(): + &smart_table::SmartTable acquires Data { + &borrow_global(@aave_pool).interest_rate_strategy_testnet + } + + public inline fun get_interest_rate_strategy_mainnet(): + &smart_table::SmartTable acquires Data { + &borrow_global(@aave_pool).interest_rate_strategy_mainnet + } + + public inline fun get_emodes_mainnet(): + &smart_table::SmartTable acquires Data { + &borrow_global(@aave_pool).emodes_mainnet + } + + public inline fun get_emodes_testnet(): + &smart_table::SmartTable acquires Data { + &borrow_global(@aave_pool).emodes_testnet + } +} diff --git a/aave-core/aave-data/sources/v1_values.move b/aave-core/aave-data/sources/v1_values.move new file mode 100644 index 0000000..6984081 --- /dev/null +++ b/aave-core/aave-data/sources/v1_values.move @@ -0,0 +1,608 @@ +module aave_data::v1_values { + // std + use std::option; + use std::option::Option; + use std::string; + use std::string::{String, utf8}; + use aptos_std::smart_table; + use aptos_std::smart_table::SmartTable; + use aptos_framework::aptos_coin; + // locals + use aave_pool::coin_migrator; + + // assets + const USDT_ASSET: vector = b"USDT"; + const USDC_ASSET: vector = b"USDC"; + const AMAPT_ASSET: vector = b"amAPT"; + const THAPT_ASSET: vector = b"thAPT"; + const APT_ASSET: vector = b"APT"; + + struct ReserveConfig has store, copy, drop { + base_ltv_as_collateral: u256, + liquidation_threshold: u256, + liquidation_bonus: u256, + liquidation_protocol_fee: u256, + borrowing_enabled: bool, + flashLoan_enabled: bool, + reserve_factor: u256, + supply_cap: u256, + borrow_cap: u256, + debt_ceiling: u256, + borrowable_isolation: bool, + siloed_borrowing: bool, + emode_category: Option + } + + struct InterestRateStrategy has store, copy, drop { + optimal_usage_ratio: u256, + base_variable_borrow_rate: u256, + variable_rate_slope1: u256, + variable_rate_slope2: u256 + } + + struct EmodeConfig has store, copy, drop { + category_id: u256, + ltv: u256, + liquidation_threshold: u256, + liquidation_bonus: u256, + label: String + } + + public fun get_emode_category_id(emode_config: &EmodeConfig): u256 { + emode_config.category_id + } + + public fun get_emode_ltv(emode_config: &EmodeConfig): u256 { + emode_config.ltv + } + + public fun get_emode_liquidation_threshold(emode_config: &EmodeConfig): u256 { + emode_config.liquidation_threshold + } + + public fun get_emode_liquidation_bonus(emode_config: &EmodeConfig): u256 { + emode_config.liquidation_bonus + } + + public fun get_emode_liquidation_label(emode_config: &EmodeConfig): String { + emode_config.label + } + + public fun get_optimal_usage_ratio(ir_strategy: &InterestRateStrategy): u256 { + ir_strategy.optimal_usage_ratio + } + + public fun get_base_variable_borrow_rate( + ir_strategy: &InterestRateStrategy + ): u256 { + ir_strategy.base_variable_borrow_rate + } + + public fun get_variable_rate_slope1( + ir_strategy: &InterestRateStrategy + ): u256 { + ir_strategy.variable_rate_slope1 + } + + public fun get_variable_rate_slope2( + ir_strategy: &InterestRateStrategy + ): u256 { + ir_strategy.variable_rate_slope2 + } + + public fun get_base_ltv_as_collateral(reserve_config: &ReserveConfig): u256 { + reserve_config.base_ltv_as_collateral + } + + public fun get_liquidation_threshold(reserve_config: &ReserveConfig): u256 { + reserve_config.liquidation_threshold + } + + public fun get_liquidation_bonus(reserve_config: &ReserveConfig): u256 { + reserve_config.liquidation_bonus + } + + public fun get_liquidation_protocol_fee( + reserve_config: &ReserveConfig + ): u256 { + reserve_config.liquidation_protocol_fee + } + + public fun get_borrowing_enabled(reserve_config: &ReserveConfig): bool { + reserve_config.borrowing_enabled + } + + public fun get_flashLoan_enabled(reserve_config: &ReserveConfig): bool { + reserve_config.flashLoan_enabled + } + + public fun get_reserve_factor(reserve_config: &ReserveConfig): u256 { + reserve_config.reserve_factor + } + + public fun get_supply_cap(reserve_config: &ReserveConfig): u256 { + reserve_config.supply_cap + } + + public fun get_borrow_cap(reserve_config: &ReserveConfig): u256 { + reserve_config.borrow_cap + } + + public fun get_debt_ceiling(reserve_config: &ReserveConfig): u256 { + reserve_config.debt_ceiling + } + + public fun get_borrowable_isolation(reserve_config: &ReserveConfig): bool { + reserve_config.borrowable_isolation + } + + public fun get_siloed_borrowing(reserve_config: &ReserveConfig): bool { + reserve_config.siloed_borrowing + } + + public fun get_emode_category(reserve_config: &ReserveConfig): Option { + reserve_config.emode_category + } + + // TODO: add settings here per network + public fun build_emodes_testnet(): SmartTable { + let emodes = smart_table::new(); + smart_table::add( + &mut emodes, + 1, + EmodeConfig { + category_id: 1, + ltv: 9000, + liquidation_threshold: 9300, + liquidation_bonus: 10200, + label: string::utf8(b"ETH Correlated") + } + ); + smart_table::add( + &mut emodes, + 2, + EmodeConfig { + category_id: 2, + ltv: 9500, + liquidation_threshold: 9700, + liquidation_bonus: 10100, + label: string::utf8(b"Stablecoins") + } + ); + emodes + } + + // TODO: add settings here per network + public fun build_emodes_mainnet(): SmartTable { + let emodes = smart_table::new(); + smart_table::add( + &mut emodes, + 1, + EmodeConfig { + category_id: 1, + ltv: 9000, + liquidation_threshold: 9300, + liquidation_bonus: 10200, + label: string::utf8(b"ETH Correlated") + } + ); + smart_table::add( + &mut emodes, + 2, + EmodeConfig { + category_id: 2, + ltv: 9500, + liquidation_threshold: 9700, + liquidation_bonus: 10100, + label: string::utf8(b"Stablecoins") + } + ); + emodes + } + + // TODO: add feed id here per network + public fun build_price_feeds_testnet(): SmartTable> { + let price_feeds_testnet = smart_table::new>(); + smart_table::add( + &mut price_feeds_testnet, + string::utf8(APT_ASSET), + x"011e22d6bf000332000000000000000000000000000000000000000000000000" + ); + smart_table::add( + &mut price_feeds_testnet, + string::utf8(USDC_ASSET), + x"01a80ff216000332000000000000000000000000000000000000000000000000" + ); + smart_table::add( + &mut price_feeds_testnet, + string::utf8(USDT_ASSET), + x"016d06ebb6000332000000000000000000000000000000000000000000000000" + ); + smart_table::add( + &mut price_feeds_testnet, + string::utf8(AMAPT_ASSET), + x"01a0b4d920000332000000000000000000000000000000000000000000000000" + ); + smart_table::add( + &mut price_feeds_testnet, + string::utf8(THAPT_ASSET), + x"01d585327c000332000000000000000000000000000000000000000000000000" + ); + price_feeds_testnet + } + + // TODO: add feed id here per network + public fun build_price_feeds_mainnet(): SmartTable> { + let price_feeds_mainnet = smart_table::new>(); + smart_table::add( + &mut price_feeds_mainnet, + string::utf8(APT_ASSET), + x"011e22d6bf000332000000000000000000000000000000000000000000000000" + ); + smart_table::add( + &mut price_feeds_mainnet, + string::utf8(USDC_ASSET), + x"01a80ff216000332000000000000000000000000000000000000000000000000" + ); + smart_table::add( + &mut price_feeds_mainnet, + string::utf8(USDT_ASSET), + x"016d06ebb6000332000000000000000000000000000000000000000000000000" + ); + smart_table::add( + &mut price_feeds_mainnet, + string::utf8(AMAPT_ASSET), + x"01a0b4d920000332000000000000000000000000000000000000000000000000" + ); + smart_table::add( + &mut price_feeds_mainnet, + string::utf8(THAPT_ASSET), + x"01d585327c000332000000000000000000000000000000000000000000000000" + ); + price_feeds_mainnet + } + + // TODO: add address here per network + public fun build_underlying_assets_testnet(): SmartTable { + let apt_mapped_fa_asset = coin_migrator::get_fa_address(); + let underlying_assets_testnet = smart_table::new(); + smart_table::upsert(&mut underlying_assets_testnet, utf8(USDT_ASSET), @0x0); + smart_table::upsert(&mut underlying_assets_testnet, utf8(USDC_ASSET), @0x0); + smart_table::upsert(&mut underlying_assets_testnet, utf8(AMAPT_ASSET), @0x0); + smart_table::upsert(&mut underlying_assets_testnet, utf8(THAPT_ASSET), @0x0); + smart_table::upsert( + &mut underlying_assets_testnet, utf8(APT_ASSET), apt_mapped_fa_asset + ); + underlying_assets_testnet + } + + // TODO: add address here per network + public fun build_underlying_assets_mainnet(): SmartTable { + let apt_mapped_fa_asset = coin_migrator::get_fa_address(); + let underlying_assets_mainnet = smart_table::new(); + smart_table::upsert(&mut underlying_assets_mainnet, utf8(USDT_ASSET), @0x0); + smart_table::upsert(&mut underlying_assets_mainnet, utf8(USDC_ASSET), @0x0); + smart_table::upsert(&mut underlying_assets_mainnet, utf8(AMAPT_ASSET), @0x0); + smart_table::upsert(&mut underlying_assets_mainnet, utf8(THAPT_ASSET), @0x0); + smart_table::upsert( + &mut underlying_assets_mainnet, utf8(APT_ASSET), apt_mapped_fa_asset + ); + underlying_assets_mainnet + } + + // TODO: add data for each value + public fun build_reserve_config_testnet(): SmartTable { + let reserve_config = smart_table::new(); + smart_table::upsert( + &mut reserve_config, + utf8(USDT_ASSET), + ReserveConfig { + base_ltv_as_collateral: 8000, + liquidation_threshold: 8500, + liquidation_bonus: 10500, + liquidation_protocol_fee: 1000, + borrowing_enabled: true, + flashLoan_enabled: true, + reserve_factor: 1000, + supply_cap: 0, + borrow_cap: 0, + debt_ceiling: 0, + borrowable_isolation: true, + siloed_borrowing: true, + emode_category: option::none() + } + ); + smart_table::upsert( + &mut reserve_config, + utf8(USDC_ASSET), + ReserveConfig { + base_ltv_as_collateral: 8000, + liquidation_threshold: 8500, + liquidation_bonus: 10500, + liquidation_protocol_fee: 1000, + borrowing_enabled: true, + flashLoan_enabled: true, + reserve_factor: 1000, + supply_cap: 0, + borrow_cap: 0, + debt_ceiling: 0, + borrowable_isolation: true, + siloed_borrowing: true, + emode_category: option::none() + } + ); + smart_table::upsert( + &mut reserve_config, + utf8(AMAPT_ASSET), + ReserveConfig { + base_ltv_as_collateral: 8000, + liquidation_threshold: 8500, + liquidation_bonus: 10500, + liquidation_protocol_fee: 1000, + borrowing_enabled: true, + flashLoan_enabled: true, + reserve_factor: 1000, + supply_cap: 0, + borrow_cap: 0, + debt_ceiling: 0, + borrowable_isolation: true, + siloed_borrowing: true, + emode_category: option::none() + } + ); + smart_table::upsert( + &mut reserve_config, + utf8(THAPT_ASSET), + ReserveConfig { + base_ltv_as_collateral: 8000, + liquidation_threshold: 8500, + liquidation_bonus: 10500, + liquidation_protocol_fee: 1000, + borrowing_enabled: true, + flashLoan_enabled: true, + reserve_factor: 1000, + supply_cap: 0, + borrow_cap: 0, + debt_ceiling: 0, + borrowable_isolation: true, + siloed_borrowing: true, + emode_category: option::none() + } + ); + smart_table::upsert( + &mut reserve_config, + utf8(APT_ASSET), + ReserveConfig { + base_ltv_as_collateral: 8000, + liquidation_threshold: 8500, + liquidation_bonus: 10500, + liquidation_protocol_fee: 1000, + borrowing_enabled: true, + flashLoan_enabled: true, + reserve_factor: 1000, + supply_cap: 0, + borrow_cap: 0, + debt_ceiling: 0, + borrowable_isolation: true, + siloed_borrowing: true, + emode_category: option::none() + } + ); + reserve_config + } + + // TODO: add data for each value + public fun build_reserve_config_mainnet(): SmartTable { + let reserve_config = smart_table::new(); + smart_table::upsert( + &mut reserve_config, + utf8(USDT_ASSET), + ReserveConfig { + base_ltv_as_collateral: 8000, + liquidation_threshold: 8500, + liquidation_bonus: 10500, + liquidation_protocol_fee: 1000, + borrowing_enabled: true, + flashLoan_enabled: true, + reserve_factor: 1000, + supply_cap: 0, + borrow_cap: 0, + debt_ceiling: 0, + borrowable_isolation: true, + siloed_borrowing: true, + emode_category: option::none() + } + ); + smart_table::upsert( + &mut reserve_config, + utf8(USDC_ASSET), + ReserveConfig { + base_ltv_as_collateral: 8000, + liquidation_threshold: 8500, + liquidation_bonus: 10500, + liquidation_protocol_fee: 1000, + borrowing_enabled: true, + flashLoan_enabled: true, + reserve_factor: 1000, + supply_cap: 0, + borrow_cap: 0, + debt_ceiling: 0, + borrowable_isolation: true, + siloed_borrowing: true, + emode_category: option::none() + } + ); + smart_table::upsert( + &mut reserve_config, + utf8(AMAPT_ASSET), + ReserveConfig { + base_ltv_as_collateral: 8000, + liquidation_threshold: 8500, + liquidation_bonus: 10500, + liquidation_protocol_fee: 1000, + borrowing_enabled: true, + flashLoan_enabled: true, + reserve_factor: 1000, + supply_cap: 0, + borrow_cap: 0, + debt_ceiling: 0, + borrowable_isolation: true, + siloed_borrowing: true, + emode_category: option::none() + } + ); + smart_table::upsert( + &mut reserve_config, + utf8(THAPT_ASSET), + ReserveConfig { + base_ltv_as_collateral: 8000, + liquidation_threshold: 8500, + liquidation_bonus: 10500, + liquidation_protocol_fee: 1000, + borrowing_enabled: true, + flashLoan_enabled: true, + reserve_factor: 1000, + supply_cap: 0, + borrow_cap: 0, + debt_ceiling: 0, + borrowable_isolation: true, + siloed_borrowing: true, + emode_category: option::none() + } + ); + smart_table::upsert( + &mut reserve_config, + utf8(APT_ASSET), + ReserveConfig { + base_ltv_as_collateral: 8000, + liquidation_threshold: 8500, + liquidation_bonus: 10500, + liquidation_protocol_fee: 1000, + borrowing_enabled: true, + flashLoan_enabled: true, + reserve_factor: 1000, + supply_cap: 0, + borrow_cap: 0, + debt_ceiling: 0, + borrowable_isolation: true, + siloed_borrowing: true, + emode_category: option::none() + } + ); + reserve_config + } + + // TODO: add data for each value + public fun build_interest_rate_strategy_mainnet(): + SmartTable { + let interest_rate_config = smart_table::new(); + smart_table::upsert( + &mut interest_rate_config, + utf8(USDT_ASSET), + InterestRateStrategy { + optimal_usage_ratio: 800000000000000000000000000, + base_variable_borrow_rate: 0, + variable_rate_slope1: 40000000000000000000000000, + variable_rate_slope2: 750000000000000000000000000 + } + ); + smart_table::upsert( + &mut interest_rate_config, + utf8(USDC_ASSET), + InterestRateStrategy { + optimal_usage_ratio: 800000000000000000000000000, + base_variable_borrow_rate: 0, + variable_rate_slope1: 40000000000000000000000000, + variable_rate_slope2: 750000000000000000000000000 + } + ); + smart_table::upsert( + &mut interest_rate_config, + utf8(AMAPT_ASSET), + InterestRateStrategy { + optimal_usage_ratio: 800000000000000000000000000, + base_variable_borrow_rate: 0, + variable_rate_slope1: 40000000000000000000000000, + variable_rate_slope2: 750000000000000000000000000 + } + ); + smart_table::upsert( + &mut interest_rate_config, + utf8(THAPT_ASSET), + InterestRateStrategy { + optimal_usage_ratio: 800000000000000000000000000, + base_variable_borrow_rate: 0, + variable_rate_slope1: 40000000000000000000000000, + variable_rate_slope2: 750000000000000000000000000 + } + ); + smart_table::upsert( + &mut interest_rate_config, + utf8(APT_ASSET), + InterestRateStrategy { + optimal_usage_ratio: 800000000000000000000000000, + base_variable_borrow_rate: 0, + variable_rate_slope1: 40000000000000000000000000, + variable_rate_slope2: 750000000000000000000000000 + } + ); + interest_rate_config + } + + // TODO: add data for each value + public fun build_interest_rate_strategy_testnet(): + SmartTable { + let interest_rate_config = smart_table::new(); + smart_table::upsert( + &mut interest_rate_config, + utf8(USDT_ASSET), + InterestRateStrategy { + optimal_usage_ratio: 800000000000000000000000000, + base_variable_borrow_rate: 0, + variable_rate_slope1: 40000000000000000000000000, + variable_rate_slope2: 750000000000000000000000000 + } + ); + smart_table::upsert( + &mut interest_rate_config, + utf8(USDC_ASSET), + InterestRateStrategy { + optimal_usage_ratio: 800000000000000000000000000, + base_variable_borrow_rate: 0, + variable_rate_slope1: 40000000000000000000000000, + variable_rate_slope2: 750000000000000000000000000 + } + ); + smart_table::upsert( + &mut interest_rate_config, + utf8(AMAPT_ASSET), + InterestRateStrategy { + optimal_usage_ratio: 800000000000000000000000000, + base_variable_borrow_rate: 0, + variable_rate_slope1: 40000000000000000000000000, + variable_rate_slope2: 750000000000000000000000000 + } + ); + smart_table::upsert( + &mut interest_rate_config, + utf8(THAPT_ASSET), + InterestRateStrategy { + optimal_usage_ratio: 800000000000000000000000000, + base_variable_borrow_rate: 0, + variable_rate_slope1: 40000000000000000000000000, + variable_rate_slope2: 750000000000000000000000000 + } + ); + smart_table::upsert( + &mut interest_rate_config, + utf8(APT_ASSET), + InterestRateStrategy { + optimal_usage_ratio: 800000000000000000000000000, + base_variable_borrow_rate: 0, + variable_rate_slope1: 40000000000000000000000000, + variable_rate_slope2: 750000000000000000000000000 + } + ); + interest_rate_config + } +} diff --git a/aave-core/aave-large-packages/Move.toml b/aave-core/aave-large-packages/Move.toml index f7449a7..3eb7198 100644 --- a/aave-core/aave-large-packages/Move.toml +++ b/aave-core/aave-large-packages/Move.toml @@ -12,4 +12,4 @@ aave_large_packages = "_" [dependencies] AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "mainnet" } -[dev-dependencies] \ No newline at end of file +[dev-dependencies] diff --git a/aave-core/aave-large-packages/sources/large_packages.move b/aave-core/aave-large-packages/sources/large_packages.move index 611ca16..ca33abc 100644 --- a/aave-core/aave-large-packages/sources/large_packages.move +++ b/aave-core/aave-large-packages/sources/large_packages.move @@ -10,7 +10,6 @@ /// Any missing index in this range will cause the function to fail. module aave_large_packages::large_packages { use std::error; - use std::option::{Self, Option}; use std::signer; use std::vector; use aptos_std::smart_table::{Self, SmartTable}; @@ -27,26 +26,36 @@ module aave_large_packages::large_packages { struct StagingArea has key { metadata_serialized: vector, code: SmartTable>, - last_module_idx: u64, + last_module_idx: u64 } public entry fun stage_code_chunk( owner: &signer, metadata_chunk: vector, code_indices: vector, - code_chunks: vector>, + code_chunks: vector> ) acquires StagingArea { - stage_code_chunk_internal(owner, metadata_chunk, code_indices, code_chunks); + stage_code_chunk_internal( + owner, + metadata_chunk, + code_indices, + code_chunks + ); } public entry fun stage_code_chunk_and_publish_to_account( owner: &signer, metadata_chunk: vector, code_indices: vector, - code_chunks: vector>, + code_chunks: vector> ) acquires StagingArea { let staging_area = - stage_code_chunk_internal(owner, metadata_chunk, code_indices, code_chunks); + stage_code_chunk_internal( + owner, + metadata_chunk, + code_indices, + code_chunks + ); publish_to_account(owner, staging_area); cleanup_staging_area(owner); } @@ -55,10 +64,15 @@ module aave_large_packages::large_packages { owner: &signer, metadata_chunk: vector, code_indices: vector, - code_chunks: vector>, + code_chunks: vector> ) acquires StagingArea { let staging_area = - stage_code_chunk_internal(owner, metadata_chunk, code_indices, code_chunks); + stage_code_chunk_internal( + owner, + metadata_chunk, + code_indices, + code_chunks + ); publish_to_object(owner, staging_area); cleanup_staging_area(owner); } @@ -68,11 +82,16 @@ module aave_large_packages::large_packages { metadata_chunk: vector, code_indices: vector, code_chunks: vector>, - code_object: Option>, + code_object: Object ) acquires StagingArea { let staging_area = - stage_code_chunk_internal(owner, metadata_chunk, code_indices, code_chunks); - upgrade_object_code(owner, staging_area, option::extract(&mut code_object)); + stage_code_chunk_internal( + owner, + metadata_chunk, + code_indices, + code_chunks + ); + upgrade_object_code(owner, staging_area, code_object); cleanup_staging_area(owner); } @@ -80,11 +99,11 @@ module aave_large_packages::large_packages { owner: &signer, metadata_chunk: vector, code_indices: vector, - code_chunks: vector>, + code_chunks: vector> ): &mut StagingArea acquires StagingArea { assert!( vector::length(&code_indices) == vector::length(&code_chunks), - error::invalid_argument(ECODE_MISMATCH), + error::invalid_argument(ECODE_MISMATCH) ); let owner_address = signer::address_of(owner); @@ -95,8 +114,8 @@ module aave_large_packages::large_packages { StagingArea { metadata_serialized: vector[], code: smart_table::new(), - last_module_idx: 0, - }, + last_module_idx: 0 + } ); }; @@ -128,46 +147,51 @@ module aave_large_packages::large_packages { } inline fun publish_to_account( - publisher: &signer, staging_area: &mut StagingArea, + publisher: &signer, staging_area: &mut StagingArea ) { let code = assemble_module_code(staging_area); code::publish_package_txn(publisher, staging_area.metadata_serialized, code); } inline fun publish_to_object( - publisher: &signer, staging_area: &mut StagingArea, + publisher: &signer, staging_area: &mut StagingArea ) { let code = assemble_module_code(staging_area); - object_code_deployment::publish(publisher, staging_area.metadata_serialized, code); + object_code_deployment::publish( + publisher, staging_area.metadata_serialized, code + ); } inline fun upgrade_object_code( publisher: &signer, staging_area: &mut StagingArea, - code_object: Object, + code_object: Object ) { let code = assemble_module_code(staging_area); object_code_deployment::upgrade( publisher, staging_area.metadata_serialized, code, - code_object, + code_object ); } - inline fun assemble_module_code(staging_area: &mut StagingArea,): vector> { + inline fun assemble_module_code(staging_area: &mut StagingArea): vector> { let last_module_idx = staging_area.last_module_idx; - let code: vector> = vector[]; - let i: u64 = 0; + let code = vector[]; + let i = 0; while (i <= last_module_idx) { - vector::push_back(&mut code, *smart_table::borrow(&staging_area.code, i)); + vector::push_back( + &mut code, + *smart_table::borrow(&staging_area.code, i) + ); i = i + 1; }; code } public entry fun cleanup_staging_area(owner: &signer) acquires StagingArea { - let StagingArea { metadata_serialized: _, code, last_module_idx: _, } = + let StagingArea { metadata_serialized: _, code, last_module_idx: _ } = move_from(signer::address_of(owner)); smart_table::destroy(code); } diff --git a/aave-core/aave-math/Move.toml b/aave-core/aave-math/Move.toml index 6481278..85f1bd7 100644 --- a/aave-core/aave-math/Move.toml +++ b/aave-core/aave-math/Move.toml @@ -11,5 +11,6 @@ aave_math = '_' [dependencies] AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "mainnet" } +AaveConfig = { local = "../aave-config" } [dev-dependencies] diff --git a/aave-core/aave-math/sources/math_utils.move b/aave-core/aave-math/sources/math_utils.move index fcf695b..9c64404 100644 --- a/aave-core/aave-math/sources/math_utils.move +++ b/aave-core/aave-math/sources/math_utils.move @@ -1,6 +1,8 @@ module aave_math::math_utils { use aptos_framework::timestamp; + use aave_config::error_config; + use aave_math::wad_ray_math; const U256_MAX: u256 = @@ -15,12 +17,6 @@ module aave_math::math_utils { /// Half percentage factor (50.00%) const HALF_PERCENTAGE_FACTOR: u256 = 5 * 1000; - /// Calculation results in overflow - const EOVERFLOW: u64 = 1; - - /// Cannot divide by zero - const EDIVISION_BY_ZERO: u64 = 2; - public fun u256_max(): u256 { U256_MAX } @@ -81,7 +77,8 @@ module aave_math::math_utils { let second_term = (exp * exp_minus_one * base_power_two) / 2; let third_term = (exp * exp_minus_one * exp_minus_two * base_power_three) / 6; - wad_ray_math::ray() + (rate * exp) / SECONDS_PER_YEAR + second_term + third_term + wad_ray_math::ray() + (rate * exp) / SECONDS_PER_YEAR + second_term + + third_term } /// @dev Calculates the compounded interest between the timestamp of the last update and the current block timestamp @@ -113,7 +110,10 @@ module aave_math::math_utils { if (value == 0 || percentage == 0) { return 0 }; - assert!(value <= (U256_MAX - HALF_PERCENTAGE_FACTOR) / percentage, EOVERFLOW); + assert!( + value <= (U256_MAX - HALF_PERCENTAGE_FACTOR) / percentage, + error_config::get_eoverflow() + ); (value * percentage + HALF_PERCENTAGE_FACTOR) / PERCENTAGE_FACTOR } @@ -122,10 +122,10 @@ module aave_math::math_utils { /// @param percentage The percentage of the value to be calculated /// @return result value percentdiv percentage public fun percent_div(value: u256, percentage: u256): u256 { - assert!(percentage > 0, EDIVISION_BY_ZERO); + assert!(percentage > 0, error_config::get_edivision_by_zero()); assert!( value <= (U256_MAX - HALF_PERCENTAGE_FACTOR) / PERCENTAGE_FACTOR, - EOVERFLOW, + error_config::get_eoverflow() ); (value * PERCENTAGE_FACTOR + percentage / 2) / percentage } diff --git a/aave-core/aave-math/sources/wad_ray_math.move b/aave-core/aave-math/sources/wad_ray_math.move index 9f5e079..22cfb47 100644 --- a/aave-core/aave-math/sources/wad_ray_math.move +++ b/aave-core/aave-math/sources/wad_ray_math.move @@ -5,18 +5,21 @@ /// with 27 digits of precision) /// @dev Operations are rounded. If a value is >=.5, will be rounded up, otherwise rounded down. module aave_math::wad_ray_math { + use aave_config::error_config; + + /// u256 max const U256_MAX: u256 = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff; - const WAD: u256 = 1_000_000_000_000_000_000; // 10^18 - const HALF_WAD: u256 = 500_000_000_000_000_000; // 5 * 10^17 - const RAY: u256 = 1_000_000_000_000_000_000_000_000_000; // 10^27 - const HALF_RAY: u256 = 500_000_000_000_000_000_000_000_000; // 5 * 10^26 - const WAD_RAY_RATIO: u256 = 1_000_000_000; // 10^9 - - /// Overflow resulting from a calculation - const EOVERFLOW: u64 = 1; - /// Cannot divide by 0 - const EDIVISION_BY_ZERO: u64 = 2; + /// 10^18 + const WAD: u256 = 1_000_000_000_000_000_000; + /// 5 * 10^17 + const HALF_WAD: u256 = 500_000_000_000_000_000; + /// 10^27 + const RAY: u256 = 1_000_000_000_000_000_000_000_000_000; + /// 5 * 10^26 + const HALF_RAY: u256 = 500_000_000_000_000_000_000_000_000; + /// 10^9 + const WAD_RAY_RATIO: u256 = 1_000_000_000; public fun wad(): u256 { WAD @@ -72,7 +75,10 @@ module aave_math::wad_ray_math { if (a == 0 || b == 0) { return 0 }; - assert!(a <= (U256_MAX - HALF_WAD) / b, EOVERFLOW); + assert!( + a <= (U256_MAX - HALF_WAD) / b, + error_config::get_eoverflow() + ); (a * b + HALF_WAD) / WAD } @@ -81,11 +87,14 @@ module aave_math::wad_ray_math { /// @param b Wad /// @return c = a/b, in wad public fun wad_div(a: u256, b: u256): u256 { - assert!(b > 0, EDIVISION_BY_ZERO); + assert!(b > 0, error_config::get_edivision_by_zero()); if (a == 0) { return 0 }; - assert!(a <= (U256_MAX - b / 2) / WAD, EOVERFLOW); + assert!( + a <= (U256_MAX - b / 2) / WAD, + error_config::get_eoverflow() + ); (a * WAD + b / 2) / b } @@ -97,7 +106,10 @@ module aave_math::wad_ray_math { if (a == 0 || b == 0) { return 0 }; - assert!(a <= (U256_MAX - HALF_RAY) / b, EOVERFLOW); + assert!( + a <= (U256_MAX - HALF_RAY) / b, + error_config::get_eoverflow() + ); (a * b + HALF_RAY) / RAY } @@ -106,11 +118,14 @@ module aave_math::wad_ray_math { /// @param b Ray /// @return c = a raydiv b public fun ray_div(a: u256, b: u256): u256 { - assert!(b > 0, EDIVISION_BY_ZERO); + assert!(b > 0, error_config::get_edivision_by_zero()); if (a == 0) { return 0 }; - assert!(a <= (U256_MAX - b / 2) / RAY, EOVERFLOW); + assert!( + a <= (U256_MAX - b / 2) / RAY, + error_config::get_eoverflow() + ); (a * RAY + b / 2) / b } @@ -131,7 +146,10 @@ module aave_math::wad_ray_math { /// @return b = a converted in ray public fun wad_to_ray(a: u256): u256 { let b = a * WAD_RAY_RATIO; - assert!(b / WAD_RAY_RATIO == a, EOVERFLOW); + assert!( + b / WAD_RAY_RATIO == a, + error_config::get_eoverflow() + ); b } } diff --git a/aave-core/aave-math/tests/math_utils_tests.move b/aave-core/aave-math/tests/math_utils_tests.move index f31577e..5736084 100644 --- a/aave-core/aave-math/tests/math_utils_tests.move +++ b/aave-core/aave-math/tests/math_utils_tests.move @@ -1,27 +1,27 @@ #[test_only] module aave_math::math_utils_tests { + use aptos_framework::timestamp; use aptos_framework::timestamp::{ - set_time_has_started_for_testing, - fast_forward_seconds + fast_forward_seconds, + set_time_has_started_for_testing }; - use aave_math::wad_ray_math::ray; - use aptos_framework::timestamp; + use aave_config::error_config::{EOVERFLOW, EDIVISION_BY_ZERO}; use aave_math::math_utils::{ - pow, - percent_mul, - u256_max, calculate_compounded_interest_now, calculate_linear_interest, - get_percentage_factor, - percent_div, get_half_percentage_factor_for_testing, - get_u256_max_for_testing, - get_seconds_per_year_for_testing, + get_percentage_factor, get_percentage_factor_for_testing, + get_seconds_per_year_for_testing, + get_u256_max_for_testing, + percent_div, + percent_mul, + pow, + u256_max }; + use aave_math::wad_ray_math::ray; const TEST_SUCCESS: u64 = 1; - const TEST_FAILED: u64 = 2; #[test] fun test_power() { @@ -38,7 +38,8 @@ module aave_math::math_utils_tests { #[test] fun test_getters() { assert!( - get_percentage_factor() == get_percentage_factor_for_testing(), TEST_SUCCESS + get_percentage_factor() == get_percentage_factor_for_testing(), + TEST_SUCCESS ); assert!(u256_max() == get_u256_max_for_testing(), TEST_SUCCESS); } @@ -97,7 +98,7 @@ module aave_math::math_utils_tests { } #[test] - #[expected_failure(abort_code = 1, location = aave_math::math_utils)] + #[expected_failure(abort_code = EOVERFLOW, location = aave_math::math_utils)] fun test_percent_mul_overflow() { let percentage = get_percentage_factor_for_testing() / 5; let value = @@ -112,13 +113,14 @@ module aave_math::math_utils_tests { let percentage = get_percentage_factor_for_testing() / 5; let percentage_of_value = percent_div(value, percentage); assert!( - percentage_of_value == value * get_percentage_factor_for_testing() / percentage, - TEST_SUCCESS, + percentage_of_value + == value * get_percentage_factor_for_testing() / percentage, + TEST_SUCCESS ); } #[test] - #[expected_failure(abort_code = 1, location = aave_math::math_utils)] + #[expected_failure(abort_code = EOVERFLOW, location = aave_math::math_utils)] fun test_percent_div_overflow() { let percentage = get_percentage_factor_for_testing() / 5; let value = @@ -128,7 +130,7 @@ module aave_math::math_utils_tests { } #[test] - #[expected_failure(abort_code = 2, location = aave_math::math_utils)] + #[expected_failure(abort_code = EDIVISION_BY_ZERO, location = aave_math::math_utils)] fun test_percent_div_by_zero() { percent_div(50, 0); } diff --git a/aave-core/aave-math/tests/wad_ray_math_tests.move b/aave-core/aave-math/tests/wad_ray_math_tests.move index ed07b86..ffd526e 100644 --- a/aave-core/aave-math/tests/wad_ray_math_tests.move +++ b/aave-core/aave-math/tests/wad_ray_math_tests.move @@ -1,26 +1,26 @@ #[test_only] module aave_math::wad_ray_math_tests { + use aave_config::error_config::{EOVERFLOW, EDIVISION_BY_ZERO}; use aave_math::wad_ray_math::{ - ray, - wad, - half_wad, - half_ray, - wad_mul, - wad_div, - ray_mul, - ray_div, - ray_to_wad, - wad_to_ray, get_half_ray_for_testing, get_half_wad_for_testing, get_ray_for_testing, + get_u256_max_for_testing, get_wad_for_testing, get_wad_ray_ratio_for_testing, - get_u256_max_for_testing + half_ray, + half_wad, + ray, + ray_div, + ray_mul, + ray_to_wad, + wad, + wad_div, + wad_mul, + wad_to_ray }; const TEST_SUCCESS: u64 = 1; - const TEST_FAILED: u64 = 2; #[test] fun test_getters() { @@ -41,10 +41,11 @@ module aave_math::wad_ray_math_tests { } #[test] - #[expected_failure(abort_code = 1, location = aave_math::wad_ray_math)] + #[expected_failure(abort_code = EOVERFLOW, location = aave_math::wad_ray_math)] fun test_wad_overflow_mult() { let b = 13265462389132757665657; - let tooLargeA = (get_u256_max_for_testing() - get_half_wad_for_testing()) / b + 1; + let tooLargeA = (get_u256_max_for_testing() - get_half_wad_for_testing()) / b + + 1; wad_mul(tooLargeA, b); } @@ -58,17 +59,18 @@ module aave_math::wad_ray_math_tests { } #[test] - #[expected_failure(abort_code = 2, location = aave_math::wad_ray_math)] + #[expected_failure(abort_code = EDIVISION_BY_ZERO, location = aave_math::wad_ray_math)] fun test_wad_div_by_zero() { let a = 134534543232342353231234; wad_div(a, 0); } #[test] - #[expected_failure(abort_code = 1, location = aave_math::wad_ray_math)] + #[expected_failure(abort_code = EOVERFLOW, location = aave_math::wad_ray_math)] fun test_wad_div_overflow() { let b = 13265462389132757665657; - let tooLargeA = (get_u256_max_for_testing() - b / 2) / get_wad_for_testing() + 1; + let tooLargeA = (get_u256_max_for_testing() - b / 2) / get_wad_for_testing() + + 1; wad_div(tooLargeA, b); } @@ -83,10 +85,11 @@ module aave_math::wad_ray_math_tests { } #[test] - #[expected_failure(abort_code = 1, location = aave_math::wad_ray_math)] + #[expected_failure(abort_code = EOVERFLOW, location = aave_math::wad_ray_math)] fun test_ray_overflow_mult() { let b = 13265462389132757665657; - let tooLargeA = (get_u256_max_for_testing() - get_half_ray_for_testing()) / b + 1; + let tooLargeA = (get_u256_max_for_testing() - get_half_ray_for_testing()) / b + + 1; ray_mul(tooLargeA, b); } @@ -100,17 +103,18 @@ module aave_math::wad_ray_math_tests { } #[test] - #[expected_failure(abort_code = 2, location = aave_math::wad_ray_math)] + #[expected_failure(abort_code = EDIVISION_BY_ZERO, location = aave_math::wad_ray_math)] fun test_ray_div_by_zero() { let a = 134534543232342353231234; ray_div(a, 0); } #[test] - #[expected_failure(abort_code = 1, location = aave_math::wad_ray_math)] + #[expected_failure(abort_code = EOVERFLOW, location = aave_math::wad_ray_math)] fun test_ray_div_overflow() { let b = 13265462389132757665657; - let tooLargeA = (get_u256_max_for_testing() - b / 2) / get_ray_for_testing() + 1; + let tooLargeA = (get_u256_max_for_testing() - b / 2) / get_ray_for_testing() + + 1; ray_div(tooLargeA, b); } @@ -120,7 +124,8 @@ module aave_math::wad_ray_math_tests { let x = ray_to_wad(ray); assert!(x == 1 * get_wad_for_testing(), TEST_SUCCESS); - let round_down = get_ray_for_testing() + (get_wad_ray_ratio_for_testing() / 2) - 1; + let round_down = get_ray_for_testing() + (get_wad_ray_ratio_for_testing() / 2) + - 1; let x = ray_to_wad(round_down); assert!(x == 1000000000000000000, TEST_SUCCESS); @@ -128,12 +133,12 @@ module aave_math::wad_ray_math_tests { let x = ray_to_wad(round_up); assert!(x == 1000000000000000001, TEST_SUCCESS); - let too_large = get_u256_max_for_testing() - (get_wad_ray_ratio_for_testing() / 2) - + 1; + let too_large = get_u256_max_for_testing() + - (get_wad_ray_ratio_for_testing() / 2) + 1; let x = ray_to_wad(too_large); assert!( x == 115792089237316195423570985008687907853269984665640564039457584007913, - TEST_SUCCESS, + TEST_SUCCESS ); } @@ -147,7 +152,8 @@ module aave_math::wad_ray_math_tests { #[test] #[expected_failure] fun test_wad_to_ray_overflow() { - let too_large = get_u256_max_for_testing() / get_wad_ray_ratio_for_testing() + 1; + let too_large = get_u256_max_for_testing() / get_wad_ray_ratio_for_testing() + + 1; wad_to_ray(too_large); } } diff --git a/aave-core/aave-mock-oracle/sources/oracle.move b/aave-core/aave-mock-oracle/sources/oracle.move deleted file mode 100644 index 8ea5f16..0000000 --- a/aave-core/aave-mock-oracle/sources/oracle.move +++ /dev/null @@ -1,143 +0,0 @@ -module aave_mock_oracle::oracle { - - use std::signer; - use std::vector; - use std::option::{Self, Option}; - use aptos_std::simple_map; - use aptos_framework::event; - use aave_mock_oracle::oracle_sentinel; - - const E_ORACLE_NOT_ADMIN: u64 = 1; - const E_ASSET_ALREADY_EXISTS: u64 = 2; - const E_ASSET_NOT_EXISTS: u64 = 3; - - #[event] - struct OracleEvent has store, drop { - asset: address, - price: u256, - } - - struct AssetPriceList has key { - value: simple_map::SimpleMap, - } - - struct RewardOracle has key, store, drop, copy { - id: u256, - } - - public fun create_reward_oracle(id: u256): RewardOracle { - // TODO - RewardOracle { id } - } - - public fun decimals(_reward_oracle: RewardOracle): u8 { - // TODO - 0 - } - - public fun latest_answer(_reward_oracle: RewardOracle): u256 { - 1 - } - - public fun latest_timestamp(_reward_oracle: RewardOracle): u256 { - // TODO - 0 - } - - public fun latest_round(_reward_oracle: RewardOracle): u256 { - // TODO - 0 - } - - public fun get_answer(_reward_oracle: RewardOracle, _round_id: u256): u256 { - // TODO - 0 - } - - public fun get_timestamp( - _reward_oracle: RewardOracle, _round_id: u256 - ): u256 { - // TODO - 0 - } - - public fun base_currency_unit( - _reward_oracle: RewardOracle, _round_id: u256 - ): u64 { - // TODO - 0 - } - - fun only_oracle_admin(account: &signer) { - assert!(signer::address_of(account) == @aave_mock_oracle, E_ORACLE_NOT_ADMIN); - } - - #[test_only] - public fun test_init_oracle(account: &signer) { - init_module(account); - } - - fun init_module(account: &signer) { - only_oracle_admin(account); - oracle_sentinel::init_oracle_sentinel(account); - move_to(account, AssetPriceList { value: simple_map::new() }) - } - - #[view] - public fun get_asset_price(asset: address): u256 acquires AssetPriceList { - let asset_price_list = borrow_global(@aave_mock_oracle); - if (!simple_map::contains_key(&asset_price_list.value, &asset)) { - return 0 - }; - *simple_map::borrow(&asset_price_list.value, &asset) - } - - public fun get_base_currency_unit(): Option { - option::none() - } - - public entry fun set_asset_price( - account: &signer, asset: address, price: u256 - ) acquires AssetPriceList { - only_oracle_admin(account); - let asset_price_list = borrow_global_mut(@aave_mock_oracle); - simple_map::upsert(&mut asset_price_list.value, asset, price); - event::emit(OracleEvent { asset, price }) - } - - public entry fun batch_set_asset_price( - account: &signer, assets: vector
, prices: vector - ) acquires AssetPriceList { - only_oracle_admin(account); - let asset_price_list = borrow_global_mut(@aave_mock_oracle); - for (i in 0..vector::length(&assets)) { - let asset = *vector::borrow(&assets, i); - let price = *vector::borrow(&prices, i); - simple_map::upsert(&mut asset_price_list.value, asset, price); - event::emit(OracleEvent { asset, price }); - }; - } - - public entry fun update_asset_price( - account: &signer, asset: address, price: u256 - ) acquires AssetPriceList { - only_oracle_admin(account); - let asset_price_list = borrow_global_mut(@aave_mock_oracle); - assert!( - simple_map::contains_key(&asset_price_list.value, &asset), E_ASSET_NOT_EXISTS - ); - simple_map::upsert(&mut asset_price_list.value, asset, price); - event::emit(OracleEvent { asset, price }) - } - - public entry fun remove_asset_price(account: &signer, asset: address) acquires AssetPriceList { - only_oracle_admin(account); - let asset_price_list = borrow_global_mut(@aave_mock_oracle); - assert!( - simple_map::contains_key(&asset_price_list.value, &asset), E_ASSET_NOT_EXISTS - ); - let price = *simple_map::borrow(&asset_price_list.value, &asset); - simple_map::remove(&mut asset_price_list.value, &asset); - event::emit(OracleEvent { asset, price }) - } -} diff --git a/aave-core/aave-mock-oracle/sources/oracle_sentinel.move b/aave-core/aave-mock-oracle/sources/oracle_sentinel.move deleted file mode 100644 index b18d8e5..0000000 --- a/aave-core/aave-mock-oracle/sources/oracle_sentinel.move +++ /dev/null @@ -1,111 +0,0 @@ -/// @title PriceOracleSentinel -/// @author Aave -/// @notice It validates if operations are allowed depending on the PriceOracle health. -/// @dev Once the PriceOracle gets up after an outage/downtime, users can make their positions healthy during a grace -/// period. So the PriceOracle is considered completely up once its up and the grace period passed. -module aave_mock_oracle::oracle_sentinel { - use std::signer; - use aptos_framework::event; - use aptos_framework::timestamp; - - use aave_acl::acl_manage; - use aave_config::error as error_config; - - friend aave_mock_oracle::oracle; - - const E_ORACLE_NOT_ADMIN: u64 = 1; - const E_RESOURCE_NOT_FOUND: u64 = 2; - - #[event] - struct GracePeriodUpdated has store, drop { - new_grace_period: u256, - } - - struct OracleSentinel has key, store { - grace_period: u256, - is_down: bool, - timestamp_got_up: u256, - } - - fun only_oracle_admin(account: &signer) { - assert!(signer::address_of(account) == @aave_mock_oracle, E_ORACLE_NOT_ADMIN); - } - - /// @dev Only risk or pool admin can call functions marked by this modifier. - fun only_risk_or_pool_admin(account: &signer) { - let account_address = signer::address_of(account); - assert!( - acl_manage::is_pool_admin(account_address) - || acl_manage::is_risk_admin(account_address), - error_config::get_ecaller_not_risk_or_pool_admin(), - ); - } - - public(friend) fun init_oracle_sentinel(account: &signer) { - only_oracle_admin(account); - move_to( - account, - OracleSentinel { grace_period: 0, is_down: false, timestamp_got_up: 0, }, - ) - } - - fun exists_at(): bool { - exists(@aave_mock_oracle) - } - - public entry fun set_answer( - account: &signer, is_down: bool, timestamp: u256 - ) acquires OracleSentinel { - only_risk_or_pool_admin(account); - assert!(exists_at(), E_RESOURCE_NOT_FOUND); - let oracle_sentinel = borrow_global_mut(@aave_mock_oracle); - oracle_sentinel.is_down = is_down; - oracle_sentinel.timestamp_got_up = timestamp; - } - - #[view] - public fun latest_round_data(): (u128, u256, u256, u256, u128) acquires OracleSentinel { - assert!(exists_at(), E_RESOURCE_NOT_FOUND); - let is_down = 0; - let oracle_sentinel = borrow_global(@aave_mock_oracle); - if (oracle_sentinel.is_down) { - is_down = 1; - }; - (0, is_down, 0, oracle_sentinel.timestamp_got_up, 0) - } - - #[view] - public fun is_borrow_allowed(): bool acquires OracleSentinel { - is_up_and_grace_period_passed() - } - - #[view] - public fun is_liquidation_allowed(): bool acquires OracleSentinel { - is_up_and_grace_period_passed() - } - - #[view] - public fun is_up_and_grace_period_passed(): bool acquires OracleSentinel { - let (_, answer, _, last_update_timestamp, _) = latest_round_data(); - answer == 0 - && (timestamp::now_seconds() as u256) - last_update_timestamp - > get_grace_period() - } - - public entry fun set_grace_period( - account: &signer, new_grace_period: u256 - ) acquires OracleSentinel { - only_risk_or_pool_admin(account); - assert!(exists_at(), E_RESOURCE_NOT_FOUND); - let oracle_sentinel = borrow_global_mut(@aave_mock_oracle); - oracle_sentinel.grace_period = new_grace_period; - event::emit(GracePeriodUpdated { new_grace_period }); - } - - #[view] - public fun get_grace_period(): u256 acquires OracleSentinel { - assert!(exists_at(), E_RESOURCE_NOT_FOUND); - let oracle_sentinel = borrow_global(@aave_mock_oracle); - oracle_sentinel.grace_period - } -} diff --git a/aave-core/aave-mock-oracle/tests/oracle_sentinel_tests.move b/aave-core/aave-mock-oracle/tests/oracle_sentinel_tests.move deleted file mode 100644 index 10daf06..0000000 --- a/aave-core/aave-mock-oracle/tests/oracle_sentinel_tests.move +++ /dev/null @@ -1,77 +0,0 @@ -#[test_only] -module aave_mock_oracle::oracle_sentinel_tests { - use std::signer; - use aave_acl::acl_manage::{test_init_module, add_pool_admin, add_asset_listing_admin}; - use aptos_framework::timestamp::set_time_has_started_for_testing; - use aptos_framework::timestamp::{fast_forward_seconds}; - use aave_mock_oracle::oracle::test_init_oracle; - use aave_mock_oracle::oracle_sentinel::{ - is_liquidation_allowed, - is_borrow_allowed, - get_grace_period, - is_up_and_grace_period_passed, - set_answer, - set_grace_period, - latest_round_data - }; - - const TEST_SUCCESS: u64 = 1; - const TEST_FAILED: u64 = 2; - - #[test(aptos_framework = @0x1, super_admin = @aave_acl, oracle_admin = @0x01, aave_mock_oracle = @aave_mock_oracle)] - fun test_mock_oracle_sentinel_functionalities( - aptos_framework: &signer, - super_admin: &signer, - oracle_admin: &signer, - aave_mock_oracle: &signer - ) { - // init the acl module - test_init_module(super_admin); - - // add the roles for the oracle admin - add_pool_admin(super_admin, signer::address_of(oracle_admin)); - add_asset_listing_admin(super_admin, signer::address_of(oracle_admin)); - - // init the oracle module incl. the sentinel - test_init_oracle(aave_mock_oracle); - - // start the timer - set_time_has_started_for_testing(aptos_framework); - - // check initial grace period and latest round data - assert!(get_grace_period() == 0, TEST_SUCCESS); - let (_, is_down, _, last_update_timestamp, _) = latest_round_data(); - assert!(is_down == 0, TEST_SUCCESS); - assert!(last_update_timestamp == 0, TEST_SUCCESS); - - assert!(!is_up_and_grace_period_passed(), TEST_SUCCESS); - assert!(!is_borrow_allowed(), TEST_SUCCESS); - assert!(!is_liquidation_allowed(), TEST_SUCCESS); - - // set new grace period - let grace_period = 1000; - - set_grace_period(oracle_admin, grace_period); - - // assert set grace period - assert!(get_grace_period() == 1000, TEST_SUCCESS); - - // fast forward grace_period - fast_forward_seconds(((grace_period + 5) as u64)); - - // assert borrow and liquidation are not allowed now - assert!(is_up_and_grace_period_passed(), TEST_SUCCESS); - assert!(is_borrow_allowed(), TEST_SUCCESS); - assert!(is_liquidation_allowed(), TEST_SUCCESS); - - // now mark the oracle as down - set_answer(oracle_admin, true, 0); - let (_, is_down, _, _last_update_timestamp, _) = latest_round_data(); - assert!(is_down == 1, TEST_SUCCESS); - - // assert that nothing is currently allowed - assert!(!is_up_and_grace_period_passed(), TEST_SUCCESS); - assert!(!is_borrow_allowed(), TEST_SUCCESS); - assert!(!is_liquidation_allowed(), TEST_SUCCESS); - } -} diff --git a/aave-core/aave-mock-oracle/tests/oracle_tests.move b/aave-core/aave-mock-oracle/tests/oracle_tests.move deleted file mode 100644 index a48ffa5..0000000 --- a/aave-core/aave-mock-oracle/tests/oracle_tests.move +++ /dev/null @@ -1,210 +0,0 @@ -#[test_only] -module aave_mock_oracle::oracle_tests { - use std::signer; - use std::vector; - use aave_mock_oracle::oracle::{ - test_init_oracle, - get_asset_price, - set_asset_price, - update_asset_price, - remove_asset_price, - batch_set_asset_price, - create_reward_oracle, - decimals, - latest_answer, - latest_timestamp, - latest_round, - get_answer, - get_timestamp, - base_currency_unit, - }; - use aave_acl::acl_manage::{test_init_module, add_pool_admin, add_asset_listing_admin}; - - const TEST_SUCCESS: u64 = 1; - const TEST_FAILED: u64 = 2; - - #[test(super_admin = @aave_acl, oracle_admin = @0x01, aave_mock_oracle = @aave_mock_oracle)] - fun test_mock_oracle_get_set_prices( - super_admin: &signer, oracle_admin: &signer, aave_mock_oracle: &signer - ) { - // init the acl module - test_init_module(super_admin); - - // add the roles for the oracle admin - add_pool_admin(super_admin, signer::address_of(oracle_admin)); - add_asset_listing_admin(super_admin, signer::address_of(oracle_admin)); - - // init the oracle - test_init_oracle(aave_mock_oracle); - - // check assets which are not added return price of 0 - let undeclared_asset = @0x0; - assert!(get_asset_price(undeclared_asset) == 0, TEST_SUCCESS); - - // now set a price for a given token - let dai_token_address = @0x42; - set_asset_price(aave_mock_oracle, dai_token_address, 150); - - // assert the set price - assert!(get_asset_price(dai_token_address) == 150, TEST_SUCCESS); - } - - #[test(super_admin = @aave_acl, oracle_admin = @0x01, aave_mock_oracle = @aave_mock_oracle)] - fun test_mock_oracle_batch_set_prices( - super_admin: &signer, oracle_admin: &signer, aave_mock_oracle: &signer - ) { - // init the acl module - test_init_module(super_admin); - - // add the roles for the oracle admin - add_pool_admin(super_admin, signer::address_of(oracle_admin)); - add_asset_listing_admin(super_admin, signer::address_of(oracle_admin)); - - // init the oracle - test_init_oracle(aave_mock_oracle); - - // check assets which are not added return price of 0 - let undeclared_asset = @0x0; - assert!(get_asset_price(undeclared_asset) == 0, TEST_SUCCESS); - - // now set a price for a given token - let dai_token_address = @0x42; - let token_addres_43 = @0x43; - - let tokens = vector::empty
(); - vector::push_back(&mut tokens, dai_token_address); - vector::push_back(&mut tokens, token_addres_43); - - let prices = vector::empty(); - vector::push_back(&mut prices, 150); - vector::push_back(&mut prices, 89); - - batch_set_asset_price(aave_mock_oracle, tokens, prices); - - // assert the set price - assert!(get_asset_price(dai_token_address) == 150, TEST_SUCCESS); - assert!(get_asset_price(token_addres_43) == 89, TEST_SUCCESS); - } - - #[test(super_admin = @aave_acl, oracle_admin = @0x01, aave_mock_oracle = @aave_mock_oracle)] - fun test_mock_oracle_update_prices( - super_admin: &signer, oracle_admin: &signer, aave_mock_oracle: &signer - ) { - // init the acl module - test_init_module(super_admin); - - // add the roles for the oracle admin - add_pool_admin(super_admin, signer::address_of(oracle_admin)); - add_asset_listing_admin(super_admin, signer::address_of(oracle_admin)); - - // init the oracle - test_init_oracle(aave_mock_oracle); - - // check assets which are not added return price of 0 - let undeclared_asset = @0x0; - let dai_token_address = @0x42; - - assert!(get_asset_price(undeclared_asset) == 0, TEST_SUCCESS); - set_asset_price(aave_mock_oracle, dai_token_address, 150); - - // update the oracle price - update_asset_price(aave_mock_oracle, dai_token_address, 90); - - // assert the updated asset price - assert!(get_asset_price(dai_token_address) == 90, TEST_SUCCESS); - } - - #[test(super_admin = @aave_acl, oracle_admin = @0x01, aave_mock_oracle = @aave_mock_oracle)] - fun test_mock_oracle_remove_price( - super_admin: &signer, oracle_admin: &signer, aave_mock_oracle: &signer - ) { - // init the acl module - test_init_module(super_admin); - - // add the roles for the oracle admin - add_pool_admin(super_admin, signer::address_of(oracle_admin)); - add_asset_listing_admin(super_admin, signer::address_of(oracle_admin)); - - // init the oracle - test_init_oracle(aave_mock_oracle); - - let dai_token_address = @0x42; - set_asset_price(aave_mock_oracle, dai_token_address, 150); - - // remove the asset price - remove_asset_price(aave_mock_oracle, dai_token_address); - - // check the asset price which should now be 0 - assert!(get_asset_price(dai_token_address) == 0, TEST_SUCCESS); - } - - #[test(super_admin = @aave_acl, oracle_admin = @0x01, aave_mock_oracle = @aave_mock_oracle)] - fun test_mock_oracle_decimals( - super_admin: &signer, oracle_admin: &signer, aave_mock_oracle: &signer - ) { - let reward_oracle = create_reward_oracle(1); - - // check the decimals which should now be 0 - assert!(decimals(reward_oracle) == 0, TEST_SUCCESS); - } - - #[test(super_admin = @aave_acl, oracle_admin = @0x01, aave_mock_oracle = @aave_mock_oracle)] - fun test_mock_oracle_latest_answer( - super_admin: &signer, oracle_admin: &signer, aave_mock_oracle: &signer - ) { - let reward_oracle = create_reward_oracle(1); - - // check the latest_answer which should now be 1 - assert!(latest_answer(reward_oracle) == 1, TEST_SUCCESS); - } - - #[test(super_admin = @aave_acl, oracle_admin = @0x01, aave_mock_oracle = @aave_mock_oracle)] - fun test_mock_oracle_latest_timestamp( - super_admin: &signer, oracle_admin: &signer, aave_mock_oracle: &signer - ) { - let reward_oracle = create_reward_oracle(1); - - // check the latest_timestamp which should now be 0 - assert!(latest_timestamp(reward_oracle) == 0, TEST_SUCCESS); - } - - #[test(super_admin = @aave_acl, oracle_admin = @0x01, aave_mock_oracle = @aave_mock_oracle)] - fun test_mock_oracle_latest_round( - super_admin: &signer, oracle_admin: &signer, aave_mock_oracle: &signer - ) { - let reward_oracle = create_reward_oracle(1); - - // check the latest_round which should now be 0 - assert!(latest_round(reward_oracle) == 0, TEST_SUCCESS); - } - - #[test(super_admin = @aave_acl, oracle_admin = @0x01, aave_mock_oracle = @aave_mock_oracle)] - fun test_mock_oracle_get_answer( - super_admin: &signer, oracle_admin: &signer, aave_mock_oracle: &signer - ) { - let reward_oracle = create_reward_oracle(1); - - // check the get_answer which should now be 0 - assert!(get_answer(reward_oracle, 1) == 0, TEST_SUCCESS); - } - - #[test(super_admin = @aave_acl, oracle_admin = @0x01, aave_mock_oracle = @aave_mock_oracle)] - fun test_mock_oracle_get_timestamp( - super_admin: &signer, oracle_admin: &signer, aave_mock_oracle: &signer - ) { - let reward_oracle = create_reward_oracle(1); - - // check the get_timestamp which should now be 0 - assert!(get_timestamp(reward_oracle, 1) == 0, TEST_SUCCESS); - } - - #[test(super_admin = @aave_acl, oracle_admin = @0x01, aave_mock_oracle = @aave_mock_oracle)] - fun test_mock_oracle_base_currency_unit( - super_admin: &signer, oracle_admin: &signer, aave_mock_oracle: &signer - ) { - let reward_oracle = create_reward_oracle(1); - - // check the base_currency_unit which should now be 0 - assert!(base_currency_unit(reward_oracle, 1) == 0, TEST_SUCCESS); - } -} diff --git a/aave-core/aave-oracle/.gitignore b/aave-core/aave-oracle/.gitignore deleted file mode 100644 index cbca19a..0000000 --- a/aave-core/aave-oracle/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -pyth-crosschain/* -wormhole/* diff --git a/aave-core/aave-oracle/Move.toml b/aave-core/aave-oracle/Move.toml index e9cebc6..3ec1473 100644 --- a/aave-core/aave-oracle/Move.toml +++ b/aave-core/aave-oracle/Move.toml @@ -6,56 +6,9 @@ authors = [] [addresses] aave_oracle = "_" -# On deployment, these should be overridden with --named-addresses using the addresses -# documented at https://docs.pyth.network/documentation/pythnet-price-feeds/aptos#addresses -# both mainnet and testnet addresses are the same (cf.https://docs.pyth.network/price-feeds/contract-addresses/aptos) -pyth = "_" -deployer = "_" -wormhole = "_" [dependencies] AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "mainnet" } -# The Pyth package, and the Wormhole package upon which it dependes, specify assorted -# Aptos dependency revisions that conflict with the revisions specified in this and -# other Aave packages, so to build this package for testing, you'll need to clone -# both the Pyth and Wormohole packages and manually update revisions. Note that the -# .gitignore in this directory excludes both packages, so you can easily clone them. -# -# 1. In this directory, run -# -# git clone https://github.com/wormhole-foundation/wormhole.git -# git clone https://github.com/pyth-network/pyth-crosschain.git -# -# 2. Update pyth-crosschain/target_chains/aptos/contract/Move.toml to specify: -# -# AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "main" } -# MoveStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/move-stdlib/", rev = "main" } -# AptosStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-stdlib/", rev = "main" } -# AptosToken = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-token/", rev = "main" } -# Wormhole = { local = "../../../../wormhole/aptos/wormhole" } -# Deployer = { local = "../../../../wormhole/aptos/deployer" } -# -# 3. Update wormhole/aptos/wormhole/Move.toml to specify: -# -# AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "main" } -# MoveStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/move-stdlib/", rev = "main" } -# AptosStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-stdlib/", rev = "main" } -# AptosToken = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-token/", rev = "main" } -# Deployer = { local = "../deployer/" } -# -# 4. Update wormhole/aptos/deployer/Move.toml to specify: -# -# [dependencies.AptosFramework] -# git = 'https://github.com/aptos-labs/aptos-core.git' -# rev = 'main' -# subdir = 'aptos-move/framework/aptos-framework' -# -# 5. Update the below line to: -# -# Pyth = { local = "pyth-crosschain/target_chains/aptos/contracts" } -# -# 6. Then you should be able to run aptos move test -Pyth = { git = "https://github.com/pyth-network/pyth-crosschain.git", subdir = "target_chains/aptos/contracts", rev = "mainnet" } AaveConfig = { local = "../aave-config" } AaveAcl = { local = "../aave-acl" } - +ChainlinkDataFeeds = { local = "../chainlink-data-feeds" } diff --git a/aave-core/aave-mock-oracle/doc/oracle.md b/aave-core/aave-oracle/doc/oracle.md similarity index 100% rename from aave-core/aave-mock-oracle/doc/oracle.md rename to aave-core/aave-oracle/doc/oracle.md diff --git a/aave-core/aave-mock-oracle/doc/oracle_sentinel.md b/aave-core/aave-oracle/doc/oracle_sentinel.md similarity index 100% rename from aave-core/aave-mock-oracle/doc/oracle_sentinel.md rename to aave-core/aave-oracle/doc/oracle_sentinel.md diff --git a/aave-core/aave-oracle/sources/oracle.move b/aave-core/aave-oracle/sources/oracle.move index 47bb362..06da45f 100644 --- a/aave-core/aave-oracle/sources/oracle.move +++ b/aave-core/aave-oracle/sources/oracle.move @@ -1,45 +1,14 @@ module aave_oracle::oracle { + use std::vector; + use aave_oracle::oracle_base::Self; + use data_feeds::router::{Self as chainlink_router}; + use data_feeds::registry::{Self as chainlink}; - use std::option::{Self, Option}; - use std::signer; - use std::string::{String}; + // friends + friend aave_oracle::price_cap_stable_adapter; - use aptos_std::string_utils::{Self}; - use aptos_framework::coin; - use aptos_framework::aptos_coin; - use aptos_framework::timestamp::now_seconds; - - use aave_acl::acl_manage::{is_asset_listing_admin, is_pool_admin}; - use pyth::pyth; - use pyth::price_identifier; - use pyth::i64; - use pyth::price::{Self, Price}; - - use aptos_std::math64::pow; - use aptos_std::smart_table::{Self, SmartTable}; - - // Not an asset listing or a pool admin error - const NOT_ASSET_LISTING_OR_POOL_ADMIN: u64 = 1; - // base currency not set - const BASE_CURRENCY_NOT_SET: u64 = 2; - // identical base currency already added - const IDENTICAL_BASE_CURRENCY_ALREADY_ADDED: u64 = 3; - // missing price feed identifier - const MISSING_PRICE_FEED_IDENTIFIER: u64 = 4; - // missing price vaa - const MISSING_PRICE_VAA: u64 = 5; - // not existing price feed identifier - const PRICE_FEED_IDENTIFIER_NOT_EXIST: u64 = 6; - - struct BaseCurrency has copy, key, store, drop { - asset: String, - unit: u64, - } - - struct OracleData has key, store { - pairs_to_indentifiers: SmartTable>, - pairs_to_vaas: SmartTable>>, - base_currency: Option, + fun init_module(account: &signer) { + oracle_base::init_oracle(account); } #[test_only] @@ -47,269 +16,78 @@ module aave_oracle::oracle { init_module(account); } - fun init_module(account: &signer) { - move_to( - account, - OracleData { - pairs_to_indentifiers: smart_table::new>(), - pairs_to_vaas: smart_table::new>>(), - base_currency: option::none() - }, - ) - } - - fun check_base_currency_set(base_currency: &Option) { - assert!(option::is_some(base_currency), BASE_CURRENCY_NOT_SET); - } - - fun check_is_asset_listing_or_pool_admin(account: address) { - assert!( - is_asset_listing_admin(account) || is_pool_admin(account), - NOT_ASSET_LISTING_OR_POOL_ADMIN, - ); - } - #[view] - public fun get_pyth_oracle_address(): address { - @pyth - } - - /// sets oracle base currency - public entry fun set_oracle_base_currency( - account: &signer, base_currency_asset: String, base_currency_unit: u64 - ) acquires OracleData { - // ensure only admins can call this method - check_is_asset_listing_or_pool_admin(signer::address_of(account)); - let oracle_data = borrow_global_mut(@aave_oracle); - oracle_data.base_currency = option::some( - BaseCurrency { asset: base_currency_asset, unit: base_currency_unit, }, - ) - } - - /// Gets the oracle base currency - fun get_oracle_base_currency(): Option acquires OracleData { - // get the oracle data - let oracle_data = borrow_global_mut(@aave_oracle); - // check and return if exists - if (option::is_some(&oracle_data.base_currency)) { - option::some(*option::borrow(&oracle_data.base_currency)) - } else { - option::none() - } + public fun get_asset_price(asset: address): u256 { + let feed_id = oracle_base::assert_asset_feed_id_exists(asset); + let benchmarks = + chainlink_router::get_benchmarks( + &oracle_base::get_resource_account_signer(), + vector[feed_id], + vector[] + ); + oracle_base::assert_benchmarks_match_assets(vector::length(&benchmarks), 1); + let benchmark = vector::borrow(&benchmarks, 0); + chainlink::get_benchmark_value(benchmark) } - /// Adds an asset with its identifier - public entry fun add_asset_identifier( - account: &signer, asset: String, price_feed_identifier: vector - ) acquires OracleData { - // ensure only admins can call this method - check_is_asset_listing_or_pool_admin(signer::address_of(account)); - let oracle_data = borrow_global_mut(@aave_oracle); - // check the base currency is set - check_base_currency_set(&oracle_data.base_currency); - // check the base currency is different than the asset being added - assert!( - (*option::borrow(&oracle_data.base_currency)).asset != asset, - IDENTICAL_BASE_CURRENCY_ALREADY_ADDED, - ); - // check the price_feed identifier exists - assert!( - pyth::price_feed_exists( - price_identifier::from_byte_vec(price_feed_identifier) - ), - PRICE_FEED_IDENTIFIER_NOT_EXIST, - ); - // build the asset pair - let asset_pair = - string_utils::format2( - &b"{}_{}", - asset, - (*option::borrow(&oracle_data.base_currency)).asset, + #[view] + public fun get_assets_prices(assets: vector
): vector { + let feed_ids: vector> = vector[]; + for (i in 0..vector::length(&assets)) { + let asset = *vector::borrow(&assets, i); + let feed_id = oracle_base::assert_asset_feed_id_exists(asset); + vector::push_back(&mut feed_ids, feed_id); + }; + let benchmarks = + chainlink_router::get_benchmarks( + &oracle_base::get_resource_account_signer(), feed_ids, vector[] ); - // store the identifier for the asset pair - smart_table::upsert( - &mut oracle_data.pairs_to_indentifiers, asset_pair, price_feed_identifier + oracle_base::assert_benchmarks_match_assets( + vector::length(&benchmarks), vector::length(&assets) ); - } - - /// Adds an asset with its vaa - public entry fun add_asset_vaa( - account: &signer, asset: String, vaa: vector> - ) acquires OracleData { - // ensure only admins can call this method - check_is_asset_listing_or_pool_admin(signer::address_of(account)); - let oracle_data = borrow_global_mut(@aave_oracle); - // check the base currency is set - check_base_currency_set(&oracle_data.base_currency); - // check the base currency is different than the asset being added - assert!( - (*option::borrow(&oracle_data.base_currency)).asset != asset, - IDENTICAL_BASE_CURRENCY_ALREADY_ADDED, + let prices = vector::map_ref( + &benchmarks, + |benchmark| { chainlink::get_benchmark_value(benchmark) } ); - // build the asset pair - let asset_pair = - string_utils::format2( - &b"{}_{}", - asset, - (*option::borrow(&oracle_data.base_currency)).asset, - ); - // store the vaa for the asset pair - smart_table::upsert(&mut oracle_data.pairs_to_vaas, asset_pair, vaa); - } - - /// Gets asset identifier if recorded for the current base currency - fun get_asset_identifier(asset: String): Option> acquires OracleData { - // check the asset is not the base currency - let oracle_data = borrow_global_mut(@aave_oracle); - // construct the asset pair - let asset_pair = - string_utils::format2( - &b"{}_{}", - asset, - (*option::borrow(&oracle_data.base_currency)).asset, - ); - // check and return if listed - if (smart_table::contains(&oracle_data.pairs_to_indentifiers, asset_pair)) { - option::some( - *smart_table::borrow(&oracle_data.pairs_to_indentifiers, asset_pair) - ) - } else { - option::none>() - } - } - - /// Gets asset vaa if recorded for the current base currency - fun get_asset_vaa(asset: String): Option>> acquires OracleData { - // check the asset is not the base currency - let oracle_data = borrow_global_mut(@aave_oracle); - // construct the asset pair - let asset_pair = - string_utils::format2( - &b"{}_{}", - asset, - (*option::borrow(&oracle_data.base_currency)).asset, - ); - // check and return if listed - if (smart_table::contains(&oracle_data.pairs_to_vaas, asset_pair)) { - option::some(*smart_table::borrow(&oracle_data.pairs_to_vaas, asset_pair)) - } else { - option::none>>() - } - } - - /// Get the price for a given vaas and a price feed - fun get_price(oracle_fee_payer: &signer, asset: String): (u64, u64, u64) acquires OracleData { - // get the price feed identifier - let price_feed_identifier = get_asset_identifier(asset); - // assert the identifier is found - assert!(option::is_some(&price_feed_identifier), MISSING_PRICE_FEED_IDENTIFIER); - // get the vaa for the asset and the base currency - let price_vaa = get_asset_vaa(asset); - // assert the identifier is found - assert!(option::is_some(&price_vaa), MISSING_PRICE_VAA); - // using the identifier fetch the price - let price = - update_and_fetch_price( - oracle_fee_payer, - *option::borrow(&price_vaa), - *option::borrow(&price_feed_identifier), - ); - // construct the price - let price_positive = - if (i64::get_is_negative(&price::get_price(&price))) { - i64::get_magnitude_if_negative(&price::get_price(&price)) - } else { - i64::get_magnitude_if_positive(&price::get_price(&price)) - }; - let expo_magnitude = - if (i64::get_is_negative(&price::get_expo(&price))) { - i64::get_magnitude_if_negative(&price::get_expo(&price)) - } else { - i64::get_magnitude_if_positive(&price::get_expo(&price)) - }; - ( - price_positive * pow(10, expo_magnitude), - price::get_conf(&price), - price::get_timestamp(&price) - ) - } - - /// Returns a constant for a mocked price - fun get_price_mock(): (u64, u64, u64) { - (1000, 80, now_seconds()) - } - - /// Updates the price feeds by paying in aptos coins and fetches the price from the oracle for the asset pair - fun update_and_fetch_price( - oracle_fee_payer: &signer, - vaas: vector>, - price_feed_identifier: vector - ): Price { - // See https://docs.pyth.network/documentation/pythnet-price-feeds for reference - let coins = - coin::withdraw( - oracle_fee_payer, pyth::get_update_fee(&vaas) - ); // Get aptos coins to pay for the update - pyth::update_price_feeds(vaas, coins); // Update price feed with the provided vaas - pyth::get_price(price_identifier::from_byte_vec(price_feed_identifier)) // Get recent price (will fail if price is too old) - } - - #[test_only] - public fun get_pyth_oracle_address_for_testing(): address { - get_pyth_oracle_address() - } - - // sets oracle base currency - #[test_only] - public entry fun set_oracle_base_currency_for_testing( - account: &signer, base_currency_asset: String, base_currency_unit: u64 - ) acquires OracleData { - set_oracle_base_currency(account, base_currency_asset, base_currency_unit) - } - - // Gets the oracle base currency - #[test_only] - public fun get_oracle_base_currency_for_testing(): Option acquires OracleData { - get_oracle_base_currency() - } - - // Adds an asset with its identifier - #[test_only] - public entry fun add_asset_identifier_for_testing( - account: &signer, asset: String, price_feed_identifier: vector - ) acquires OracleData { - add_asset_identifier(account, asset, price_feed_identifier) - } - - // Adds an asset with its vaa - #[test_only] - public entry fun add_asset_vaa_for_testing( - account: &signer, asset: String, vaa: vector> - ) acquires OracleData { - add_asset_vaa(account, asset, vaa); - } - - // Gets asset identifier if recorded for the current base currency - #[test_only] - public fun get_asset_identifier_for_testing(asset: String): Option> acquires OracleData { - get_asset_identifier(asset) - } - - // Gets asset vaa if recorded for the current base currency - #[test_only] - public fun get_asset_vaa_for_testing(asset: String): Option>> acquires OracleData { - get_asset_vaa(asset) - } - - // Get a mocked price - #[test_only] - public fun get_price_mock_for_testing(): (u64, u64, u64) { - get_price_mock() - } - - // Get a mocked price - #[test_only] - public fun create_base_currency(asset: String, unit: u64,): BaseCurrency { - BaseCurrency { asset, unit, } + prices + } + + public entry fun set_asset_feed_id( + account: &signer, asset: address, feed_id: vector + ) { + oracle_base::only_risk_or_pool_admin(account); + oracle_base::set_asset_feed_id(asset, feed_id); + oracle_base::emit_asset_price_feed_updated(asset, feed_id); + } + + public entry fun batch_set_asset_feed_ids( + account: &signer, assets: vector
, feed_ids: vector> + ) { + oracle_base::only_risk_or_pool_admin(account); + for (i in 0..vector::length(&assets)) { + let asset = *vector::borrow(&assets, i); + let feed_id = *vector::borrow(&feed_ids, i); + oracle_base::set_asset_feed_id(asset, feed_id); + oracle_base::emit_asset_price_feed_updated(asset, feed_id); + }; + } + + public entry fun remove_asset_feed_id(account: &signer, asset: address) { + oracle_base::only_risk_or_pool_admin(account); + let feed_id = oracle_base::assert_asset_feed_id_exists(asset); + oracle_base::remove_feed_id(asset); + oracle_base::emit_asset_price_feed_removed(asset, feed_id); + } + + public entry fun batch_remove_asset_feed_ids( + account: &signer, assets: vector
+ ) { + oracle_base::only_risk_or_pool_admin(account); + for (i in 0..vector::length(&assets)) { + let asset = *vector::borrow(&assets, i); + let feed_id = oracle_base::assert_asset_feed_id_exists(asset); + oracle_base::remove_feed_id(asset); + oracle_base::emit_asset_price_feed_removed(asset, feed_id); + }; } } diff --git a/aave-core/aave-oracle/sources/oracle_base.move b/aave-core/aave-oracle/sources/oracle_base.move new file mode 100644 index 0000000..4ade755 --- /dev/null +++ b/aave-core/aave-oracle/sources/oracle_base.move @@ -0,0 +1,198 @@ +module aave_oracle::oracle_base { + + use std::signer; + use aptos_std::smart_table; + use aptos_framework::event; + use std::option::{Self, Option}; + use std::string::String; + use aave_acl::acl_manage; + use aptos_framework::account::{Self, SignerCapability}; + use aave_config::error_config::Self; + + // friends + friend aave_oracle::price_cap_stable_adapter; + friend aave_oracle::oracle; + + // consts + const AAVE_ORACLE_SEED: vector = b"AAVE_ORACLE"; + + // errors + const E_ORACLE_NOT_ADMIN: u64 = 1; + const E_ASSET_ALREADY_EXISTS: u64 = 2; + const E_NO_ASSET_FEED: u64 = 3; + const E_ORACLE_BENCHMARK_LENGHT_MISMATCH: u64 = 4; + + #[event] + struct AssetPriceFeedUpdated has store, drop { + asset: address, + feed_id: vector + } + + #[event] + struct AssetPriceFeedRemoved has store, drop { + asset: address, + feed_id: vector + } + + struct BaseCurrency has copy, key, store, drop { + asset: String, + unit: u64 + } + + struct PriceOracleData has key { + asset_feed_ids: smart_table::SmartTable>, + signer_cap: SignerCapability, + base_currency: Option + } + + public fun only_oracle_admin(account: &signer) { + assert!(signer::address_of(account) == @aave_oracle, E_ORACLE_NOT_ADMIN); + } + + /// @dev Only risk or pool admin can call functions marked by this modifier. + public(friend) fun only_risk_or_pool_admin(account: &signer) { + let account_address = signer::address_of(account); + assert!( + acl_manage::is_pool_admin(account_address) + || acl_manage::is_risk_admin(account_address), + error_config::get_ecaller_not_risk_or_pool_admin() + ); + } + + #[test_only] + public fun test_only_risk_or_pool_admin(account: &signer) { + only_risk_or_pool_admin(account); + } + + #[test_only] + public fun test_init_oracle(account: &signer) { + init_oracle(account); + } + + public(friend) fun init_oracle(account: &signer) { + only_oracle_admin(account); + + // create a resource account + let (resource_signer, signer_cap) = + account::create_resource_account(account, AAVE_ORACLE_SEED); + + move_to( + &resource_signer, + PriceOracleData { + asset_feed_ids: smart_table::new(), + signer_cap, + base_currency: option::none() + } + ) + } + + public fun get_base_currency_unit(base_currency: &BaseCurrency): u64 { + base_currency.unit + } + + public fun get_base_currency_asset(base_currency: &BaseCurrency): String { + base_currency.asset + } + + #[view] + public fun get_oracle_base_currency(): Option acquires PriceOracleData { + // get the oracle data + let oracle_data = borrow_global_mut(oracle_address()); + // check and return if exists + if (option::is_some(&oracle_data.base_currency)) { + option::some(*option::borrow(&oracle_data.base_currency)) + } else { + option::none() + } + } + + #[view] + public fun get_oracle_resource_account(): address acquires PriceOracleData { + let collector_data = borrow_global(oracle_address()); + let account_signer = + account::create_signer_with_capability(&collector_data.signer_cap); + signer::address_of(&account_signer) + } + + #[view] + public fun oracle_address(): address { + account::create_resource_address(&@aave_oracle, AAVE_ORACLE_SEED) + } + + public(friend) fun get_resource_account_signer(): signer acquires PriceOracleData { + let oracle_data = borrow_global(oracle_address()); + account::create_signer_with_capability(&oracle_data.signer_cap) + } + + #[test_only] + public fun get_resource_account_signer_for_testing(): signer acquires PriceOracleData { + get_resource_account_signer() + } + + public(friend) fun set_asset_feed_id( + asset: address, feed_id: vector + ) acquires PriceOracleData { + let asset_price_list = borrow_global_mut(oracle_address()); + smart_table::upsert(&mut asset_price_list.asset_feed_ids, asset, feed_id); + } + + #[test_only] + public fun test_set_asset_feed_id( + asset: address, feed_id: vector + ) acquires PriceOracleData { + set_asset_feed_id(asset, feed_id); + } + + public(friend) fun assert_asset_feed_id_exists( + asset: address + ): vector acquires PriceOracleData { + let asset_price_list = borrow_global(oracle_address()); + assert!( + smart_table::contains(&asset_price_list.asset_feed_ids, asset), + E_NO_ASSET_FEED + ); + *smart_table::borrow(&asset_price_list.asset_feed_ids, asset) + } + + public(friend) fun get_feed_id(asset: address): vector acquires PriceOracleData { + let asset_price_list = borrow_global(oracle_address()); + let feed_id = *smart_table::borrow(&asset_price_list.asset_feed_ids, asset); + feed_id + } + + #[test_only] + public fun test_get_feed_id(asset: address): vector acquires PriceOracleData { + get_feed_id(asset) + } + + public(friend) fun remove_feed_id(asset: address) acquires PriceOracleData { + let asset_price_list = borrow_global_mut(oracle_address()); + smart_table::remove(&mut asset_price_list.asset_feed_ids, asset); + } + + #[test_only] + public fun test_remove_feed_id(asset: address) acquires PriceOracleData { + remove_feed_id(asset) + } + + public(friend) fun emit_asset_price_feed_updated( + asset: address, feed_id: vector + ) { + event::emit(AssetPriceFeedUpdated { asset, feed_id }) + } + + public(friend) fun emit_asset_price_feed_removed( + asset: address, feed_id: vector + ) { + event::emit(AssetPriceFeedRemoved { asset, feed_id }) + } + + public(friend) fun assert_benchmarks_match_assets( + benchmarks_len: u64, requested_assets: u64 + ) { + assert!( + benchmarks_len == requested_assets, + E_ORACLE_BENCHMARK_LENGHT_MISMATCH + ); + } +} diff --git a/aave-core/aave-oracle/sources/price_cap_stable_adapter.move b/aave-core/aave-oracle/sources/price_cap_stable_adapter.move new file mode 100644 index 0000000..2bd4f9b --- /dev/null +++ b/aave-core/aave-oracle/sources/price_cap_stable_adapter.move @@ -0,0 +1,97 @@ +module aave_oracle::price_cap_stable_adapter { + use aptos_framework::event::Self; + use std::signer; + use aave_acl::acl_manage; + use aave_config::error_config::Self; + use std::string::String; + use aptos_framework::fungible_asset; + use aptos_framework::fungible_asset::Metadata; + use aptos_framework::object::address_to_object; + use aave_oracle::oracle::Self; + + // errors + const E_ORACLE_NOT_ADMIN: u64 = 1; + const E_CAP_LOWER_THAN_ACTUAL_PRICE: u64 = 2; + + // events + #[event] + struct PriceCapUpdated has store, drop { + price_cap: u256 + } + + struct InternalData has key { + asset: address, + decimals: u8, + description: String, + price_cap: u256 + } + + fun only_oracle_admin(account: &signer) { + assert!(signer::address_of(account) == @aave_oracle, E_ORACLE_NOT_ADMIN); + } + + fun only_risk_or_pool_admin(account: &signer) { + let account_address = signer::address_of(account); + assert!( + acl_manage::is_pool_admin(account_address) + || acl_manage::is_risk_admin(account_address), + error_config::get_ecaller_not_risk_or_pool_admin() + ); + } + + public fun init_price_cap_stable_adaptor( + account: &signer, + asset: address, + description: String, + price_cap: u256 + ) { + only_oracle_admin(account); + let base_price = oracle::get_asset_price(asset); + assert!(price_cap >= base_price, E_CAP_LOWER_THAN_ACTUAL_PRICE); + event::emit(PriceCapUpdated { price_cap }); + + move_to( + account, + InternalData { + asset, + decimals: fungible_asset::decimals(address_to_object(asset)), + description, + price_cap + } + ) + } + + public entry fun set_price_cap(account: &signer, price_cap: u256) acquires InternalData { + only_risk_or_pool_admin(account); + set_price_cap_internal(price_cap); + } + + fun set_price_cap_internal(price_cap: u256) acquires InternalData { + let internal_data = borrow_global_mut(@aave_oracle); + let base_price = oracle::get_asset_price(internal_data.asset); + assert!(price_cap >= base_price, E_CAP_LOWER_THAN_ACTUAL_PRICE); + internal_data.price_cap = price_cap; + event::emit(PriceCapUpdated { price_cap }) + } + + #[view] + public fun is_capped(): bool acquires InternalData { + let internal_data = borrow_global(@aave_oracle); + oracle::get_asset_price(internal_data.asset) > latestAnswer() + } + + #[view] + public fun latestAnswer(): u256 acquires InternalData { + let internal_data = borrow_global(@aave_oracle); + let base_price = oracle::get_asset_price(internal_data.asset); + if (base_price > internal_data.price_cap) { + return internal_data.price_cap + }; + base_price + } + + #[view] + public fun get_price_cap(): u256 acquires InternalData { + borrow_global(@aave_oracle).price_cap + } +} diff --git a/aave-core/aave-oracle/sources/reward_oracle.move b/aave-core/aave-oracle/sources/reward_oracle.move new file mode 100644 index 0000000..43178dd --- /dev/null +++ b/aave-core/aave-oracle/sources/reward_oracle.move @@ -0,0 +1,50 @@ +module aave_oracle::reward_oracle { + + // TODO: this is unfinished + struct RewardOracle has key, store, drop, copy { + id: u256 + } + + public fun create_reward_oracle(id: u256): RewardOracle { + // TODO + RewardOracle { id } + } + + public fun decimals(_reward_oracle: RewardOracle): u8 { + // TODO + 0 + } + + public fun latest_answer(_reward_oracle: RewardOracle): u256 { + 1 + } + + public fun latest_timestamp(_reward_oracle: RewardOracle): u256 { + // TODO + 0 + } + + public fun latest_round(_reward_oracle: RewardOracle): u256 { + // TODO + 0 + } + + public fun get_answer(_reward_oracle: RewardOracle, _round_id: u256): u256 { + // TODO + 0 + } + + public fun get_timestamp( + _reward_oracle: RewardOracle, _round_id: u256 + ): u256 { + // TODO + 0 + } + + public fun base_currency_unit( + _reward_oracle: RewardOracle, _round_id: u256 + ): u64 { + // TODO + 0 + } +} diff --git a/aave-core/aave-oracle/tests/oracle_tests.move b/aave-core/aave-oracle/tests/oracle_tests.move index 16dbbe3..85fb058 100644 --- a/aave-core/aave-oracle/tests/oracle_tests.move +++ b/aave-core/aave-oracle/tests/oracle_tests.move @@ -1,73 +1,401 @@ #[test_only] module aave_oracle::oracle_tests { use std::signer; - use aave_acl::acl_manage::{Self, add_pool_admin, add_asset_listing_admin}; - use std::string; - use std::option::{Self}; - use aave_oracle::oracle::{ - set_oracle_base_currency, - get_pyth_oracle_address, - add_asset_vaa, - create_base_currency, - get_oracle_base_currency_for_testing, - get_asset_identifier_for_testing, - get_asset_vaa_for_testing, - test_init_module - }; + use std::vector; + use std::string::Self; + use aave_oracle::oracle::Self; + use aave_oracle::oracle_base::Self; + use aave_acl::acl_manage::Self; + use aptos_framework::timestamp::{set_time_has_started_for_testing}; + use data_feeds::registry::Self; + use aptos_framework::event::emitted_events; + use data_feeds::router; const TEST_SUCCESS: u64 = 1; const TEST_FAILED: u64 = 2; + const TEST_ASSET: address = @0x444; + const TEST_FEED_ID: vector = x"0003fbba4fce42f65d6032b18aee53efdf526cc734ad296cb57565979d883bdd"; + const TEST_FEED_PRICE: u256 = 63762090573356116000000; - #[test(super_admin = @aave_acl, oracle_admin = @0x01, aave_oracle = @aave_oracle)] - fun test_oracle_offchain_functionalities( - super_admin: &signer, oracle_admin: &signer, aave_oracle: &signer + public fun get_test_feed_id(): vector { + TEST_FEED_ID + } + + public fun config_oracle( + aave_oracle: &signer, data_feeds: &signer, platform: &signer + ) { + oracle::test_init_module(aave_oracle); + set_up_chainlink_oracle(data_feeds, platform); + set_chainlink_test_data(&oracle_base::get_resource_account_signer_for_testing()); + } + + fun set_up_chainlink_oracle(data_feeds: &signer, platform: &signer) { + use aptos_framework::account::{Self}; + account::create_account_for_test(signer::address_of(data_feeds)); + account::create_account_for_test(signer::address_of(platform)); + + platform::forwarder::init_module_for_testing(platform); + platform::storage::init_module_for_testing(platform); + router::init_module_for_testing(data_feeds); + + registry::init_module_for_testing(data_feeds); + } + + fun set_chainlink_test_data(owner: &signer) { + let report_data = TEST_FEED_ID; + vector::append( + &mut report_data, + x"0000000000000000000000000000000000000000000000000000000066ed173e0000000000000000000000000000000000000000000000000000000066ed174200000000000000007fffffffffffffffffffffffffffffffffffffffffffffff00000000000000007fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000066ee68c2000000000000000000000000000000000000000000000d808cc35e6ed670bd00000000000000000000000000000000000000000000000d808590c35425347980000000000000000000000000000000000000000000000d8093f5f989878e7c00" + ); + let config_id = vector[1]; + registry::set_feeds( + owner, + vector[TEST_FEED_ID], + vector[string::utf8(b"description")], + config_id + ); + registry::perform_update_for_testing(TEST_FEED_ID, report_data); + } + + #[ + test( + super_admin = @aave_acl, + oracle_admin = @0x06, + aave_oracle = @aave_oracle, + data_feeds = @data_feeds, + platform = @platform, + aptos = @aptos_framework + ) + ] + #[expected_failure(abort_code = 3)] + fun test_oracle_price_unknown_asset( + super_admin: &signer, + oracle_admin: &signer, + aave_oracle: &signer, + data_feeds: &signer, + platform: &signer, + aptos: &signer + ) { + // start the timer + set_time_has_started_for_testing(aptos); + + // init the acl module + acl_manage::test_init_module(super_admin); + + // add the roles for the oracle admin + acl_manage::add_pool_admin(super_admin, signer::address_of(oracle_admin)); + assert!( + acl_manage::is_pool_admin(signer::address_of(oracle_admin)), TEST_SUCCESS + ); + acl_manage::add_asset_listing_admin( + super_admin, signer::address_of(oracle_admin) + ); + assert!( + acl_manage::is_asset_listing_admin(signer::address_of(oracle_admin)), + TEST_SUCCESS + ); + + // init aave oracle + config_oracle(aave_oracle, data_feeds, platform); + + // check assets which are not known fail to return a price + let undeclared_asset = @0x0; + oracle::get_asset_price(undeclared_asset); + } + + #[ + test( + super_admin = @aave_acl, + oracle_admin = @0x06, + aave_oracle = @aave_oracle, + data_feeds = @data_feeds, + platform = @platform, + aptos = @aptos_framework + ) + ] + fun test_oracle_set_single_price( + super_admin: &signer, + oracle_admin: &signer, + aave_oracle: &signer, + data_feeds: &signer, + platform: &signer, + aptos: &signer + ) { + // start the timer + set_time_has_started_for_testing(aptos); + + // init the acl module + acl_manage::test_init_module(super_admin); + + // add the roles for the oracle admin + acl_manage::add_pool_admin(super_admin, signer::address_of(oracle_admin)); + assert!( + acl_manage::is_pool_admin(signer::address_of(oracle_admin)), TEST_SUCCESS + ); + acl_manage::add_asset_listing_admin( + super_admin, signer::address_of(oracle_admin) + ); + assert!( + acl_manage::is_asset_listing_admin(signer::address_of(oracle_admin)), + TEST_SUCCESS + ); + + // init aave oracle + config_oracle(aave_oracle, data_feeds, platform); + + // now set a feed for a given token + oracle::set_asset_feed_id(oracle_admin, TEST_ASSET, TEST_FEED_ID); + + // check for specific events + let emitted_events = emitted_events(); + assert!(vector::length(&emitted_events) == 1, TEST_SUCCESS); + + // assert the set price + assert!(oracle::get_asset_price(TEST_ASSET) == TEST_FEED_PRICE, TEST_SUCCESS); + } + + #[ + test( + super_admin = @aave_acl, + oracle_admin = @0x06, + aave_oracle = @aave_oracle, + data_feeds = @data_feeds, + platform = @platform, + aptos = @aptos_framework + ) + ] + fun test_oracle_set_batch_prices( + super_admin: &signer, + oracle_admin: &signer, + aave_oracle: &signer, + data_feeds: &signer, + platform: &signer, + aptos: &signer + ) { + // start the timer + set_time_has_started_for_testing(aptos); + + // init the acl module + acl_manage::test_init_module(super_admin); + + // add the roles for the oracle admin + acl_manage::add_pool_admin(super_admin, signer::address_of(oracle_admin)); + assert!( + acl_manage::is_pool_admin(signer::address_of(oracle_admin)), TEST_SUCCESS + ); + acl_manage::add_asset_listing_admin( + super_admin, signer::address_of(oracle_admin) + ); + assert!( + acl_manage::is_asset_listing_admin(signer::address_of(oracle_admin)), + TEST_SUCCESS + ); + + // init aave oracle + config_oracle(aave_oracle, data_feeds, platform); + + // define assets and feedids + let asset_addresses = vector[@0x0, @0x1, @0x2, @0x3]; + let asset_feed_ids = vector[TEST_FEED_ID, TEST_FEED_ID, TEST_FEED_ID, TEST_FEED_ID]; + + // set in batch mode assets and feed ids + oracle::batch_set_asset_feed_ids(oracle_admin, asset_addresses, asset_feed_ids); + + // check for specific events + let emitted_events = emitted_events(); + assert!( + vector::length(&emitted_events) == vector::length(&asset_addresses), + TEST_SUCCESS + ); + + // get prices and ensure they are all > 0 since mocked + let prices = oracle::get_assets_prices(asset_addresses); + assert!(!vector::any(&prices, |price| *price != TEST_FEED_PRICE), TEST_SUCCESS); + } + + #[ + test( + super_admin = @aave_acl, + oracle_admin = @0x06, + aave_oracle = @aave_oracle, + data_feeds = @data_feeds, + platform = @platform, + aptos = @aptos_framework + ) + ] + #[expected_failure(abort_code = 3)] + fun test_oracle_remove_single_price( + super_admin: &signer, + oracle_admin: &signer, + aave_oracle: &signer, + data_feeds: &signer, + platform: &signer, + aptos: &signer ) { + // start the timer + set_time_has_started_for_testing(aptos); + // init the acl module acl_manage::test_init_module(super_admin); // add the roles for the oracle admin - add_pool_admin(super_admin, signer::address_of(oracle_admin)); - add_asset_listing_admin(super_admin, signer::address_of(oracle_admin)); + acl_manage::add_pool_admin(super_admin, signer::address_of(oracle_admin)); + assert!( + acl_manage::is_pool_admin(signer::address_of(oracle_admin)), TEST_SUCCESS + ); + acl_manage::add_asset_listing_admin( + super_admin, signer::address_of(oracle_admin) + ); + assert!( + acl_manage::is_asset_listing_admin(signer::address_of(oracle_admin)), + TEST_SUCCESS + ); - // init the oracle - test_init_module(aave_oracle); + // init aave oracle + config_oracle(aave_oracle, data_feeds, platform); - // check pyth address - assert!(get_pyth_oracle_address() == @pyth, TEST_SUCCESS); + // now set the chainlink feed for a given token + let test_token_address = TEST_ASSET; + oracle::set_asset_feed_id(oracle_admin, test_token_address, TEST_FEED_ID); + + // assert the set price + assert!( + oracle::get_asset_price(test_token_address) == TEST_FEED_PRICE, + TEST_SUCCESS + ); - // check the base currency is not set at the beginning - assert!(get_oracle_base_currency_for_testing() == option::none(), TEST_SUCCESS); + // remove the feed for dai + oracle::remove_asset_feed_id(oracle_admin, test_token_address); - // now set oracle base currency - set_oracle_base_currency(oracle_admin, string::utf8(b"USD"), 1); + // check for specific events + let emitted_events = emitted_events(); + assert!(vector::length(&emitted_events) == 1, TEST_SUCCESS); - // assert oracle base currency - let expected_base_currency = create_base_currency(string::utf8(b"USD"), 1); + // try to query the price again + oracle::get_asset_price(test_token_address); + } + + #[ + test( + super_admin = @aave_acl, + oracle_admin = @0x06, + aave_oracle = @aave_oracle, + data_feeds = @data_feeds, + platform = @platform, + aptos = @aptos_framework + ) + ] + #[expected_failure(abort_code = 3)] + fun test_oracle_remove_batch_prices( + super_admin: &signer, + oracle_admin: &signer, + aave_oracle: &signer, + data_feeds: &signer, + platform: &signer, + aptos: &signer + ) { + // start the timer + set_time_has_started_for_testing(aptos); + + // init the acl module + acl_manage::test_init_module(super_admin); + + // add the roles for the oracle admin + acl_manage::add_pool_admin(super_admin, signer::address_of(oracle_admin)); assert!( - get_oracle_base_currency_for_testing() == option::some( - expected_base_currency - ), - TEST_SUCCESS, + acl_manage::is_pool_admin(signer::address_of(oracle_admin)), TEST_SUCCESS ); + acl_manage::add_asset_listing_admin( + super_admin, signer::address_of(oracle_admin) + ); + assert!( + acl_manage::is_asset_listing_admin(signer::address_of(oracle_admin)), + TEST_SUCCESS + ); + + // init aave oracle + config_oracle(aave_oracle, data_feeds, platform); + + // define assets and feed ids which chainlink does not support + let asset_addresses = vector[@0x0, @0x1, @0x2, @0x3]; + let asset_feed_ids = vector[TEST_FEED_ID, TEST_FEED_ID, TEST_FEED_ID, TEST_FEED_ID]; + + // set in batch mode assets and feed ids + oracle::batch_set_asset_feed_ids(oracle_admin, asset_addresses, asset_feed_ids); + + // remove assets as a batch + oracle::batch_remove_asset_feed_ids(oracle_admin, asset_addresses); + + // check for specific events + let emitted_events = emitted_events(); + assert!( + vector::length(&emitted_events) == vector::length(&asset_addresses), + TEST_SUCCESS + ); + + // try to get prices - this would fail as a batch + oracle::get_assets_prices(asset_addresses); + } + + #[ + test( + super_admin = @aave_acl, + oracle_admin = @0x06, + aave_oracle = @aave_oracle, + data_feeds = @data_feeds, + platform = @platform, + aptos = @aptos_framework + ) + ] + fun test_oracle_remove_one_in_batch_price( + super_admin: &signer, + oracle_admin: &signer, + aave_oracle: &signer, + data_feeds: &signer, + platform: &signer, + aptos: &signer + ) { + // start the timer + set_time_has_started_for_testing(aptos); - // asset price feed identifier + // init the acl module + acl_manage::test_init_module(super_admin); + + // add the roles for the oracle admin + acl_manage::add_pool_admin(super_admin, signer::address_of(oracle_admin)); assert!( - get_asset_identifier_for_testing(string::utf8(b"BTC")) - == option::none>(), - TEST_SUCCESS, + acl_manage::is_pool_admin(signer::address_of(oracle_admin)), TEST_SUCCESS + ); + acl_manage::add_asset_listing_admin( + super_admin, signer::address_of(oracle_admin) ); assert!( - get_asset_vaa_for_testing(string::utf8(b"BTC")) - == option::none>>(), - TEST_SUCCESS, + acl_manage::is_asset_listing_admin(signer::address_of(oracle_admin)), + TEST_SUCCESS ); - let vaa = vector[vector[0, 1, 2], vector[3, 4, 5]]; - add_asset_vaa(oracle_admin, string::utf8(b"BTC"), vaa); + // init aave oracle + config_oracle(aave_oracle, data_feeds, platform); + + // define assets and feed ids which chainlink does not support + let asset_addresses = vector[@0x0, @0x1, @0x2, @0x3]; + let asset_feed_ids = vector[TEST_FEED_ID, TEST_FEED_ID, TEST_FEED_ID, TEST_FEED_ID]; + + // set in batch mode assets and feed ids + oracle::batch_set_asset_feed_ids(oracle_admin, asset_addresses, asset_feed_ids); + + // remove assets as a batch + let end = vector::length(&asset_addresses); + let truncated = vector::slice(&mut asset_addresses, 1, end); + oracle::batch_remove_asset_feed_ids(oracle_admin, truncated); + + // check for specific events + let emitted_events = emitted_events(); assert!( - get_asset_vaa_for_testing(string::utf8(b"BTC")) - == option::some>>(vaa), - TEST_SUCCESS, + vector::length(&emitted_events) == vector::length(&truncated), TEST_SUCCESS ); + + // try to get price for the unremoved asset, should work + assert!(oracle::get_asset_price(@0x0) == TEST_FEED_PRICE, TEST_SUCCESS); } } diff --git a/aave-core/aave-oracle/tests/reward_oracle_tests.move b/aave-core/aave-oracle/tests/reward_oracle_tests.move new file mode 100644 index 0000000..2e1338d --- /dev/null +++ b/aave-core/aave-oracle/tests/reward_oracle_tests.move @@ -0,0 +1,56 @@ +#[test_only] +module aave_oracle::reward_oracle_tests { + use aave_oracle::reward_oracle::Self; + + const TEST_SUCCESS: u64 = 1; + const TEST_FAILED: u64 = 2; + + #[test()] + fun test_mocked_reward_oracle_decimals() { + let reward_oracle = reward_oracle::create_reward_oracle(1); + // check the decimals which should now be 0 + assert!(reward_oracle::decimals(reward_oracle) == 0, TEST_SUCCESS); + } + + #[test()] + fun test_mocked_reward_oracle_latest_answer() { + let reward_oracle = reward_oracle::create_reward_oracle(1); + // check the latest_answer which should now be 1 + assert!(reward_oracle::latest_answer(reward_oracle) == 1, TEST_SUCCESS); + } + + #[test()] + fun test_mocked_reward_oracle_latest_timestamp() { + let reward_oracle = reward_oracle::create_reward_oracle(1); + // check the latest_timestamp which should now be 0 + assert!(reward_oracle::latest_timestamp(reward_oracle) == 0, TEST_SUCCESS); + } + + #[test()] + fun test_mocked_reward_oracle_latest_round() { + let reward_oracle = reward_oracle::create_reward_oracle(1); + // check the latest_round which should now be 0 + assert!(reward_oracle::latest_round(reward_oracle) == 0, TEST_SUCCESS); + } + + #[test()] + fun test_mocked_reward_oracle_get_answer() { + let reward_oracle = reward_oracle::create_reward_oracle(1); + // check the get_answer which should now be 0 + assert!(reward_oracle::get_answer(reward_oracle, 1) == 0, TEST_SUCCESS); + } + + #[test()] + fun test_mocked_reward_oracle_get_timestamp() { + let reward_oracle = reward_oracle::create_reward_oracle(1); + // check the get_timestamp which should now be 0 + assert!(reward_oracle::get_timestamp(reward_oracle, 1) == 0, TEST_SUCCESS); + } + + #[test()] + fun test_mocked_reward_oracle_base_currency_unit() { + let reward_oracle = reward_oracle::create_reward_oracle(1); + // check the base_currency_unit which should now be 0 + assert!(reward_oracle::base_currency_unit(reward_oracle, 1) == 0, TEST_SUCCESS); + } +} diff --git a/aave-core/aave-rate/Move.toml b/aave-core/aave-rate/Move.toml new file mode 100644 index 0000000..c3310d9 --- /dev/null +++ b/aave-core/aave-rate/Move.toml @@ -0,0 +1,16 @@ +[package] +name = "AaveRate" +version = "1.0.0" +authors = [] + +[addresses] +aave_rate = '_' +[dev-addresses] + +[dependencies] +AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "mainnet" } +AaveAcl = { local = "../aave-acl" } +AaveConfig = { local = "../aave-config" } +AaveMath = { local = "../aave-math" } + +[dev-dependencies] diff --git a/aave-core/sources/aave-pool/default_reserve_interest_rate_strategy.move b/aave-core/aave-rate/sources/default_reserve_interest_rate_strategy.move similarity index 61% rename from aave-core/sources/aave-pool/default_reserve_interest_rate_strategy.move rename to aave-core/aave-rate/sources/default_reserve_interest_rate_strategy.move index 3095afb..666426f 100644 --- a/aave-core/sources/aave-pool/default_reserve_interest_rate_strategy.move +++ b/aave-core/aave-rate/sources/default_reserve_interest_rate_strategy.move @@ -3,25 +3,17 @@ /// @notice Implements the calculation of the interest rates depending on the reserve state /// @dev The model of interest rate is based on 2 slopes, one before the `OPTIMAL_USAGE_RATIO` /// point of usage and another from that one to 100%. -module aave_pool::default_reserve_interest_rate_strategy { - +module aave_rate::default_reserve_interest_rate_strategy { use std::signer; use aptos_std::smart_table; use aptos_std::smart_table::SmartTable; use aptos_framework::event; use aave_acl::acl_manage; - use aave_config::error; + use aave_config::error_config; use aave_math::math_utils; use aave_math::wad_ray_math::{Self, wad_to_ray}; - - use aave_pool::a_token_factory; - use aave_pool::mock_underlying_token_factory; - - friend aave_pool::pool_configurator; - - #[test_only] - friend aave_pool::default_reserve_interest_rate_strategy_tests; + friend aave_rate::interest_rate_strategy; #[event] struct ReserveInterestRateStrategy has store, drop { @@ -44,12 +36,12 @@ module aave_pool::default_reserve_interest_rate_strategy { // Slope of the variable interest curve when usage ratio > 0 and <= OPTIMAL_USAGE_RATIO. Expressed in ray variable_rate_slope1: u256, // Slope of the variable interest curve when usage ratio > OPTIMAL_USAGE_RATIO. Expressed in ray - variable_rate_slope2: u256, + variable_rate_slope2: u256 } // List of reserves as a map (underlying_asset => DefaultReserveInterestRateStrategy) struct ReserveInterestRateStrategyMap has key { - vaule: SmartTable + value: SmartTable } struct CalcInterestRatesLocalVars has drop { @@ -59,24 +51,28 @@ module aave_pool::default_reserve_interest_rate_strategy { current_liquidity_rate: u256, borrow_usage_ratio: u256, supply_usage_ratio: u256, - available_liquidity_plus_debt: u256, + available_liquidity_plus_debt: u256 } /// @notice Initializes the interest rate strategy - public(friend) fun init_interest_rate_strategy(account: &signer) { + /// @dev Only callable by the interest_rate_strategy module + /// @param account The signer account of the caller + public fun init_interest_rate_strategy(account: &signer) { assert!( - (signer::address_of(account) == @aave_pool), - error::get_ecaller_not_pool_admin(), + signer::address_of(account) == @aave_rate, + error_config::get_enot_rate_owner() ); + move_to( account, ReserveInterestRateStrategyMap { - vaule: smart_table::new() - }, - ) + value: smart_table::new() + } + ); } /// @notice Sets the interest rate strategy of a reserve + /// @param account The signer account of the caller /// @param asset The address of the reserve /// @param optimal_usage_ratio The optimal usage ratio /// @param base_variable_borrow_rate The base variable borrow rate @@ -88,29 +84,30 @@ module aave_pool::default_reserve_interest_rate_strategy { optimal_usage_ratio: u256, base_variable_borrow_rate: u256, variable_rate_slope1: u256, - variable_rate_slope2: u256, + variable_rate_slope2: u256 ) acquires ReserveInterestRateStrategyMap { let account_address = signer::address_of(account); assert!( only_risk_or_pool_admins(account_address), - error::get_ecaller_not_risk_or_pool_admin(), + error_config::get_ecaller_not_risk_or_pool_admin() ); assert!( wad_ray_math::ray() >= optimal_usage_ratio, - error::get_einvalid_optimal_usage_ratio(), + error_config::get_einvalid_optimal_usage_ratio() ); - let rate_strategy = borrow_global_mut(@aave_pool); + let max_excess_usage_ratio = wad_ray_math::ray() - optimal_usage_ratio; let reserve_interest_rate_strategy = DefaultReserveInterestRateStrategy { optimal_usage_ratio, max_excess_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 }; + let rate_strategy = borrow_global_mut(@aave_rate); smart_table::upsert( - &mut rate_strategy.vaule, asset, reserve_interest_rate_strategy + &mut rate_strategy.value, asset, reserve_interest_rate_strategy ); event::emit( @@ -120,81 +117,79 @@ module aave_pool::default_reserve_interest_rate_strategy { max_excess_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, - }, + variable_rate_slope2 + } ) } public fun asset_interest_rate_exists(asset: address) acquires ReserveInterestRateStrategyMap { - let rate_strategy = borrow_global(@aave_pool); + let rate_strategy = borrow_global(@aave_rate); assert!( - smart_table::contains(&rate_strategy.vaule, asset), - error::get_easset_not_listed(), + smart_table::contains(&rate_strategy.value, asset), + error_config::get_easset_not_listed() ); } #[view] - public fun get_reserve_interest_rate_strategy(asset: address) - : DefaultReserveInterestRateStrategy acquires ReserveInterestRateStrategyMap { - asset_interest_rate_exists(asset); - let rate_strategy = borrow_global(@aave_pool); - *smart_table::borrow(&rate_strategy.vaule, asset) + public fun get_reserve_interest_rate_strategy( + asset: address + ): DefaultReserveInterestRateStrategy acquires ReserveInterestRateStrategyMap { + let rate_strategy_map = borrow_global(@aave_rate); + if (!smart_table::contains(&rate_strategy_map.value, asset)) { + // If rate do not exist, return zero as default values, to be 1:1 with Solidity + return DefaultReserveInterestRateStrategy { + optimal_usage_ratio: 0, + max_excess_usage_ratio: 0, + base_variable_borrow_rate: 0, + variable_rate_slope1: 0, + variable_rate_slope2: 0 + } + }; + + *smart_table::borrow(&rate_strategy_map.value, asset) } #[view] public fun get_optimal_usage_ratio(asset: address): u256 acquires ReserveInterestRateStrategyMap { - let rate_strategy_map = borrow_global(@aave_pool); - if (!smart_table::contains(&rate_strategy_map.vaule, asset)) - return 0; - - smart_table::borrow(&rate_strategy_map.vaule, asset).optimal_usage_ratio + get_reserve_interest_rate_strategy(asset).optimal_usage_ratio } #[view] - public fun get_max_excess_usage_ratio(asset: address): u256 acquires ReserveInterestRateStrategyMap { - let rate_strategy_map = borrow_global(@aave_pool); - if (!smart_table::contains(&rate_strategy_map.vaule, asset)) - return 0; - - smart_table::borrow(&rate_strategy_map.vaule, asset).max_excess_usage_ratio + public fun get_max_excess_usage_ratio( + asset: address + ): u256 acquires ReserveInterestRateStrategyMap { + get_reserve_interest_rate_strategy(asset).max_excess_usage_ratio } #[view] - public fun get_variable_rate_slope1(asset: address): u256 acquires ReserveInterestRateStrategyMap { - let rate_strategy_map = borrow_global(@aave_pool); - if (!smart_table::contains(&rate_strategy_map.vaule, asset)) - return 0; - - smart_table::borrow(&rate_strategy_map.vaule, asset).variable_rate_slope1 + public fun get_variable_rate_slope1( + asset: address + ): u256 acquires ReserveInterestRateStrategyMap { + get_reserve_interest_rate_strategy(asset).variable_rate_slope1 } #[view] - public fun get_variable_rate_slope2(asset: address): u256 acquires ReserveInterestRateStrategyMap { - let rate_strategy_map = borrow_global(@aave_pool); - if (!smart_table::contains(&rate_strategy_map.vaule, asset)) - return 0; - - smart_table::borrow(&rate_strategy_map.vaule, asset).variable_rate_slope2 + public fun get_variable_rate_slope2( + asset: address + ): u256 acquires ReserveInterestRateStrategyMap { + get_reserve_interest_rate_strategy(asset).variable_rate_slope2 } #[view] - public fun get_base_variable_borrow_rate(asset: address): u256 acquires ReserveInterestRateStrategyMap { - let rate_strategy_map = borrow_global(@aave_pool); - if (!smart_table::contains(&rate_strategy_map.vaule, asset)) - return 0; - - smart_table::borrow(&rate_strategy_map.vaule, asset).base_variable_borrow_rate + public fun get_base_variable_borrow_rate( + asset: address + ): u256 acquires ReserveInterestRateStrategyMap { + get_reserve_interest_rate_strategy(asset).base_variable_borrow_rate } #[view] - public fun get_max_variable_borrow_rate(asset: address): u256 acquires ReserveInterestRateStrategyMap { - let rate_strategy_map = borrow_global(@aave_pool); - if (!smart_table::contains(&rate_strategy_map.vaule, asset)) - return 0; - - let strategy = smart_table::borrow(&rate_strategy_map.vaule, asset); - strategy.base_variable_borrow_rate + strategy.variable_rate_slope1 - + strategy.variable_rate_slope2 + public fun get_max_variable_borrow_rate( + asset: address + ): u256 acquires ReserveInterestRateStrategyMap { + let rate_data = get_reserve_interest_rate_strategy(asset); + + rate_data.base_variable_borrow_rate + rate_data.variable_rate_slope1 + + rate_data.variable_rate_slope2 } #[view] @@ -205,7 +200,7 @@ module aave_pool::default_reserve_interest_rate_strategy { /// @param total_variable_debt The total variable debt of the reserve /// @param reserve_factor The reserve factor /// @param reserve The address of the reserve - /// @param a_token_address The address of the aToken + /// @param a_token_underlying_balance The underlying token balance corresponding to the aToken /// @return current_liquidity_rate The liquidity rate expressed in rays /// @return current_variable_borrow_rate The variable borrow rate expressed in rays public fun calculate_interest_rates( @@ -215,51 +210,47 @@ module aave_pool::default_reserve_interest_rate_strategy { total_variable_debt: u256, reserve_factor: u256, reserve: address, - a_token_address: address + a_token_underlying_balance: u256 ): (u256, u256) acquires ReserveInterestRateStrategyMap { + let rate_data = get_reserve_interest_rate_strategy(reserve); let vars = create_calc_interest_rates_local_vars(); vars.total_debt = total_variable_debt; vars.current_liquidity_rate = 0; - vars.current_variable_borrow_rate = get_base_variable_borrow_rate(reserve); - + vars.current_variable_borrow_rate = rate_data.base_variable_borrow_rate; if (vars.total_debt != 0) { - let balance = - ( - mock_underlying_token_factory::balance_of( - a_token_factory::get_token_account_address(a_token_address), - reserve, - ) as u256 - ); - vars.available_liquidity = balance + liquidity_added - liquidity_taken; - vars.available_liquidity_plus_debt = vars.available_liquidity + vars.total_debt; + vars.available_liquidity = a_token_underlying_balance + liquidity_added + - liquidity_taken; + vars.available_liquidity_plus_debt = vars.available_liquidity + + vars.total_debt; vars.borrow_usage_ratio = wad_ray_math::ray_div( vars.total_debt, vars.available_liquidity_plus_debt ); vars.supply_usage_ratio = wad_ray_math::ray_div( - vars.total_debt, (vars.available_liquidity_plus_debt + unbacked) + vars.total_debt, + (vars.available_liquidity_plus_debt + unbacked) ); }; - let rate_strategy = get_reserve_interest_rate_strategy(reserve); - if (vars.borrow_usage_ratio > rate_strategy.optimal_usage_ratio) { + if (vars.borrow_usage_ratio > rate_data.optimal_usage_ratio) { let excess_borrow_usage_ratio = wad_ray_math::ray_div( - (vars.borrow_usage_ratio - rate_strategy.optimal_usage_ratio), - rate_strategy.max_excess_usage_ratio, + (vars.borrow_usage_ratio - rate_data.optimal_usage_ratio), + rate_data.max_excess_usage_ratio ); vars.current_variable_borrow_rate = vars.current_variable_borrow_rate - + rate_strategy.variable_rate_slope1 + + rate_data.variable_rate_slope1 + wad_ray_math::ray_mul( - rate_strategy.variable_rate_slope2, excess_borrow_usage_ratio + rate_data.variable_rate_slope2, + excess_borrow_usage_ratio ); } else { vars.current_variable_borrow_rate = vars.current_variable_borrow_rate + wad_ray_math::ray_div( wad_ray_math::ray_mul( - rate_strategy.variable_rate_slope1, vars.borrow_usage_ratio + rate_data.variable_rate_slope1, vars.borrow_usage_ratio ), - rate_strategy.optimal_usage_ratio, + rate_data.optimal_usage_ratio ); }; @@ -268,9 +259,9 @@ module aave_pool::default_reserve_interest_rate_strategy { get_overall_borrow_rate( total_variable_debt, vars.current_variable_borrow_rate ), - vars.supply_usage_ratio, + vars.supply_usage_ratio ), - (math_utils::get_percentage_factor() - reserve_factor), + (math_utils::get_percentage_factor() - reserve_factor) ); return (vars.current_liquidity_rate, vars.current_variable_borrow_rate) @@ -284,7 +275,7 @@ module aave_pool::default_reserve_interest_rate_strategy { current_liquidity_rate: 0, borrow_usage_ratio: 0, supply_usage_ratio: 0, - available_liquidity_plus_debt: 0, + available_liquidity_plus_debt: 0 } } @@ -293,14 +284,15 @@ module aave_pool::default_reserve_interest_rate_strategy { /// @param current_variable_borrow_rate The current variable borrow rate of the reserve /// @return The weighted averaged borrow rate fun get_overall_borrow_rate( - total_variable_debt: u256, current_variable_borrow_rate: u256, + total_variable_debt: u256, current_variable_borrow_rate: u256 ): u256 { let totalDebt = total_variable_debt; if (totalDebt == 0) return 0; let weighted_variable_rate = wad_ray_math::ray_mul( - wad_to_ray(total_variable_debt), current_variable_borrow_rate + wad_to_ray(total_variable_debt), + current_variable_borrow_rate ); let overall_borrow_rate = diff --git a/aave-core/aave-rate/sources/gho_interest_rate_strategy.move b/aave-core/aave-rate/sources/gho_interest_rate_strategy.move new file mode 100644 index 0000000..45278ed --- /dev/null +++ b/aave-core/aave-rate/sources/gho_interest_rate_strategy.move @@ -0,0 +1,174 @@ +/// @title gho_interest_rate_strategy module +/// @author Aave +/// @notice Implements the calculation of GHO interest rates, which defines a fixed variable borrow rate. +/// @dev The variable borrow interest rate is fixed at deployment time. The rest of parameters are zeroed. +module aave_rate::gho_interest_rate_strategy { + use std::signer; + use aptos_std::smart_table; + use aptos_std::smart_table::SmartTable; + use aptos_framework::event; + + use aave_acl::acl_manage; + use aave_config::error_config; + + /// the usage ratio at which the pool aims to obtain most competitive borrow rates. + const OPTIMAL_USAGE_RATIO: u256 = 0; + + /// the excess usage ratio above the optimal. + const MAX_EXCESS_USAGE_RATIO: u256 = 0; + + #[event] + struct ReserveInterestRateStrategy has store, drop { + asset: address, + optimal_usage_ratio: u256, + max_excess_usage_ratio: u256, + // Base variable borrow rate when usage rate = 0. Expressed in ray + base_variable_borrow_rate: u256, + // Slope of the variable interest curve when usage ratio > 0 and <= OPTIMAL_USAGE_RATIO. Expressed in ray + variable_rate_slope1: u256, + // Slope of the variable interest curve when usage ratio > OPTIMAL_USAGE_RATIO. Expressed in ray + variable_rate_slope2: u256 + } + + struct GHOReserveInterestRateStrategy has key, store, copy, drop { + // Base variable borrow rate when usage rate = 0. Expressed in ray + base_variable_borrow_rate: u256 + } + + // List of reserves as a map (underlying_asset => GHOReserveInterestRateStrategy) + struct ReserveInterestRateStrategyMap has key { + value: SmartTable + } + + /// @notice Initializes the interest rate strategy + /// @dev Only callable by the interest_rate_strategy module + /// @param account The account signer of the caller + public fun init_interest_rate_strategy(account: &signer) { + assert!( + signer::address_of(account) == @aave_rate, + error_config::get_enot_rate_owner() + ); + + move_to( + account, + ReserveInterestRateStrategyMap { + value: smart_table::new() + } + ); + } + + /// @notice Sets the interest rate strategy of a reserve + /// @param account The account signer of the caller + /// @param asset The address of the reserve + /// @param base_variable_borrow_rate The base variable borrow rate + public entry fun set_reserve_interest_rate_strategy( + account: &signer, asset: address, base_variable_borrow_rate: u256 + ) acquires ReserveInterestRateStrategyMap { + let account_address = signer::address_of(account); + assert!( + only_risk_or_pool_admins(account_address), + error_config::get_ecaller_not_risk_or_pool_admin() + ); + + let reserve_interest_rate_strategy = GHOReserveInterestRateStrategy { + base_variable_borrow_rate + }; + + let rate_strategy = borrow_global_mut(@aave_rate); + smart_table::upsert( + &mut rate_strategy.value, asset, reserve_interest_rate_strategy + ); + + event::emit( + ReserveInterestRateStrategy { + asset, + optimal_usage_ratio: OPTIMAL_USAGE_RATIO, + max_excess_usage_ratio: MAX_EXCESS_USAGE_RATIO, + base_variable_borrow_rate, + variable_rate_slope1: 0, + variable_rate_slope2: 0 + } + ) + } + + public fun asset_interest_rate_exists(asset: address) acquires ReserveInterestRateStrategyMap { + let rate_strategy = borrow_global(@aave_rate); + assert!( + smart_table::contains(&rate_strategy.value, asset), + error_config::get_easset_not_listed() + ); + } + + #[view] + public fun get_reserve_interest_rate_strategy( + asset: address + ): GHOReserveInterestRateStrategy acquires ReserveInterestRateStrategyMap { + let rate_strategy_map = borrow_global(@aave_rate); + if (!smart_table::contains(&rate_strategy_map.value, asset)) { + // If rate do not exist, return zero as default values, to be 1:1 with Solidity + return GHOReserveInterestRateStrategy { base_variable_borrow_rate: 0 } + }; + *smart_table::borrow(&rate_strategy_map.value, asset) + } + + #[view] + public fun get_optimal_usage_ratio(_asset: address): u256 { + OPTIMAL_USAGE_RATIO + } + + #[view] + public fun get_max_excess_usage_ratio(_asset: address): u256 { + MAX_EXCESS_USAGE_RATIO + } + + #[view] + public fun get_variable_rate_slope1(_asset: address): u256 { + 0 + } + + #[view] + public fun get_variable_rate_slope2(_asset: address): u256 { + 0 + } + + #[view] + public fun get_base_variable_borrow_rate( + asset: address + ): u256 acquires ReserveInterestRateStrategyMap { + get_reserve_interest_rate_strategy(asset).base_variable_borrow_rate + } + + #[view] + public fun get_max_variable_borrow_rate( + asset: address + ): u256 acquires ReserveInterestRateStrategyMap { + get_base_variable_borrow_rate(asset) + } + + #[view] + /// @notice Calculates the interest rates depending on the reserve's state and configurations + /// @param _unbacked The amount of unbacked liquidity + /// @param _liquidity_added The amount of liquidity added + /// @param _liquidity_taken The amount of liquidity taken + /// @param _total_variable_debt The total variable debt of the reserve + /// @param _reserve_factor The reserve factor + /// @param reserve The address of the reserve + /// @param _a_token_underlying_balance The underlying token balance corresponding to the aToken + /// @return current_liquidity_rate The liquidity rate expressed in rays + /// @return current_variable_borrow_rate The variable borrow rate expressed in rays + public fun calculate_interest_rates( + _unbacked: u256, + _liquidity_added: u256, + _liquidity_taken: u256, + _total_variable_debt: u256, + _reserve_factor: u256, + reserve: address, + _a_token_underlying_balance: u256 + ): (u256, u256) acquires ReserveInterestRateStrategyMap { + (0, get_base_variable_borrow_rate(reserve)) + } + + fun only_risk_or_pool_admins(account: address): bool { + acl_manage::is_risk_admin(account) || acl_manage::is_pool_admin(account) + } +} diff --git a/aave-core/aave-rate/sources/interest_rate_strategy.move b/aave-core/aave-rate/sources/interest_rate_strategy.move new file mode 100644 index 0000000..07edca8 --- /dev/null +++ b/aave-core/aave-rate/sources/interest_rate_strategy.move @@ -0,0 +1,92 @@ +/// @title interest_rate_strategy module +/// @author Aave +/// This module provides unified methods for managing asset interest rate strategies +/// offering two main functions: +/// 1. asset_interest_rate_exists to check if an interest rate strategy exists for a given asset +/// 2. calculate_interest_rates to compute the interest rates. +module aave_rate::interest_rate_strategy { + use std::signer; + use std::string::{String, utf8}; + + use aave_config::error_config; + + use aave_rate::default_reserve_interest_rate_strategy; + use aave_rate::gho_interest_rate_strategy; + + fun init_module(account: &signer) { + assert!( + signer::address_of(account) == @aave_rate, + error_config::get_enot_rate_owner() + ); + default_reserve_interest_rate_strategy::init_interest_rate_strategy(account); + gho_interest_rate_strategy::init_interest_rate_strategy(account); + } + + #[test_only] + public fun test_init_module(account: &signer) { + init_module(account) + } + + /// @notice Checks if an interest rate strategy exists for a given asset + /// @param asset The address of the underlying asset + /// @param reserve_symbol The symbol of the reserve + /// @return true if the interest rate strategy exists, false otherwise + public fun asset_interest_rate_exists( + asset: address, reserve_symbol: String + ) { + if (reserve_symbol == utf8(b"GHO")) { + gho_interest_rate_strategy::asset_interest_rate_exists(asset) + } else { + default_reserve_interest_rate_strategy::asset_interest_rate_exists(asset) + } + } + + /// @notice Calculates the interest rates depending on the reserve's state and configurations + /// @param unbacked The amount of unbacked liquidity + /// @param liquidity_added The amount of liquidity added + /// @param liquidity_taken The amount of liquidity taken + /// @param total_variable_debt The total variable debt of the reserve + /// @param reserve_factor The reserve factor + /// @param reserve The address of the reserve + /// @param reserve_symbol The symbol of the reserve + /// @param a_token_underlying_balance The underlying token balance corresponding to the aToken + /// @return current_liquidity_rate The liquidity rate expressed in rays + /// @return current_variable_borrow_rate The variable borrow rate expressed in rays + public fun calculate_interest_rates( + unbacked: u256, + liquidity_added: u256, + liquidity_taken: u256, + total_variable_debt: u256, + reserve_factor: u256, + reserve: address, + reserve_symbol: String, + a_token_underlying_balance: u256 + ): (u256, u256) { + let next_liquidity_rate: u256; + let next_variable_rate: u256; + + if (reserve_symbol == utf8(b"GHO")) { + (next_liquidity_rate, next_variable_rate) = gho_interest_rate_strategy::calculate_interest_rates( + unbacked, + liquidity_added, + liquidity_taken, + total_variable_debt, + reserve_factor, + reserve, + a_token_underlying_balance + ) + } else { + (next_liquidity_rate, next_variable_rate) = default_reserve_interest_rate_strategy::calculate_interest_rates( + unbacked, + liquidity_added, + liquidity_taken, + total_variable_debt, + reserve_factor, + reserve, + a_token_underlying_balance + ) + }; + + (next_liquidity_rate, next_variable_rate) + } +} diff --git a/aave-core/tests/aave-pool/default_reserve_interest_rate_strategy_tests.move b/aave-core/aave-rate/tests/default_reserve_interest_rate_strategy_tests.move similarity index 76% rename from aave-core/tests/aave-pool/default_reserve_interest_rate_strategy_tests.move rename to aave-core/aave-rate/tests/default_reserve_interest_rate_strategy_tests.move index f2b38ed..dfb326f 100644 --- a/aave-core/tests/aave-pool/default_reserve_interest_rate_strategy_tests.move +++ b/aave-core/aave-rate/tests/default_reserve_interest_rate_strategy_tests.move @@ -1,29 +1,38 @@ #[test_only] -module aave_pool::default_reserve_interest_rate_strategy_tests { - use aptos_framework::timestamp::set_time_has_started_for_testing; +module aave_rate::default_reserve_interest_rate_strategy_tests { use std::features::change_feature_flags_for_testing; - use aave_acl::acl_manage::{Self, test_init_module}; - use aave_pool::default_reserve_interest_rate_strategy::{ + use aptos_framework::timestamp::set_time_has_started_for_testing; + + use aave_acl::acl_manage::Self; + use aave_math::wad_ray_math::Self; + + use aave_rate::default_reserve_interest_rate_strategy::{ get_base_variable_borrow_rate, + get_max_excess_usage_ratio, get_max_variable_borrow_rate, + get_optimal_usage_ratio, get_variable_rate_slope1, get_variable_rate_slope2, init_interest_rate_strategy, - set_reserve_interest_rate_strategy, - get_optimal_usage_ratio, - get_max_excess_usage_ratio, + set_reserve_interest_rate_strategy }; - use aave_math::wad_ray_math::{Self}; const TEST_SUCCESS: u64 = 1; const TEST_FAILED: u64 = 2; - #[test(pool = @aave_pool, aave_role_super_admin = @aave_acl, aave_std = @std, aptos_framework = @0x1,)] + #[ + test( + pool = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_std = @std, + aptos_framework = @0x1 + ) + ] fun test_default_reserve_interest_rate_strategy( pool: &signer, aave_role_super_admin: &signer, aave_std: &signer, - aptos_framework: &signer, + aptos_framework: &signer ) { // start the timer set_time_has_started_for_testing(aptos_framework); @@ -31,9 +40,9 @@ module aave_pool::default_reserve_interest_rate_strategy_tests { // add the test events feature flag change_feature_flags_for_testing(aave_std, vector[26], vector[]); - test_init_module(aave_role_super_admin); - acl_manage::add_risk_admin(aave_role_super_admin, @aave_pool); - acl_manage::add_pool_admin(aave_role_super_admin, @aave_pool); + acl_manage::test_init_module(aave_role_super_admin); + acl_manage::add_risk_admin(aave_role_super_admin, @aave_rate); + acl_manage::add_pool_admin(aave_role_super_admin, @aave_rate); // init the interest rate strategy module init_interest_rate_strategy(pool); @@ -51,40 +60,51 @@ module aave_pool::default_reserve_interest_rate_strategy_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); // assertions on getters assert!( get_max_excess_usage_ratio(asset_address) == max_excess_usage_ratio, - TEST_SUCCESS, + TEST_SUCCESS ); assert!( - get_optimal_usage_ratio(asset_address) == optimal_usage_ratio, TEST_SUCCESS + get_optimal_usage_ratio(asset_address) == optimal_usage_ratio, + TEST_SUCCESS ); assert!( - get_variable_rate_slope1(asset_address) == variable_rate_slope1, TEST_SUCCESS + get_variable_rate_slope1(asset_address) == variable_rate_slope1, + TEST_SUCCESS ); assert!( - get_variable_rate_slope2(asset_address) == variable_rate_slope2, TEST_SUCCESS + get_variable_rate_slope2(asset_address) == variable_rate_slope2, + TEST_SUCCESS ); assert!( get_base_variable_borrow_rate(asset_address) == base_variable_borrow_rate, - TEST_SUCCESS, + TEST_SUCCESS ); assert!( get_max_variable_borrow_rate(asset_address) - == base_variable_borrow_rate + variable_rate_slope1 + variable_rate_slope2, - TEST_SUCCESS, + == base_variable_borrow_rate + variable_rate_slope1 + + variable_rate_slope2, + TEST_SUCCESS ); } - #[test(pool = @aave_pool, aave_role_super_admin = @aave_acl, aave_std = @std, aptos_framework = @0x1,)] + #[ + test( + pool = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_std = @std, + aptos_framework = @0x1 + ) + ] fun test_interest_rate_strategy_for_unset_asset( pool: &signer, aave_role_super_admin: &signer, aave_std: &signer, - aptos_framework: &signer, + aptos_framework: &signer ) { // start the timer set_time_has_started_for_testing(aptos_framework); @@ -92,9 +112,9 @@ module aave_pool::default_reserve_interest_rate_strategy_tests { // add the test events feature flag change_feature_flags_for_testing(aave_std, vector[26], vector[]); - test_init_module(aave_role_super_admin); - acl_manage::add_risk_admin(aave_role_super_admin, @aave_pool); - acl_manage::add_pool_admin(aave_role_super_admin, @aave_pool); + acl_manage::test_init_module(aave_role_super_admin); + acl_manage::add_risk_admin(aave_role_super_admin, @aave_rate); + acl_manage::add_pool_admin(aave_role_super_admin, @aave_rate); // init the interest rate strategy module init_interest_rate_strategy(pool); diff --git a/aave-core/aave-scripts/Move.toml b/aave-core/aave-scripts/Move.toml index 339c85e..2187d33 100644 --- a/aave-core/aave-scripts/Move.toml +++ b/aave-core/aave-scripts/Move.toml @@ -9,13 +9,15 @@ authors = [] [dev-addresses] [dependencies] -AptosStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-stdlib", rev = "main" } -AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework", rev = "main" } -AptosToken = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-token", rev = "main" } -AptosTokenObjects = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-token-objects", rev = "main" } +AptosStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-stdlib", rev = "mainnet" } +AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework", rev = "mainnet" } +AptosToken = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-token", rev = "mainnet" } +AptosTokenObjects = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-token-objects", rev = "mainnet" } AaveAcl = { local = "../aave-acl" } AaveConfig = { local = "../aave-config" } -AaveMockOracle = { local = "../aave-mock-oracle" } -AavePool = { local = ".." } +AaveRate = { local = "../aave-rate" } +AaveOracle = { local = "../aave-oracle" } +AaveData = { local = "../aave-data" } +AavePool = { local = "../" } -[dev-dependencies] \ No newline at end of file +[dev-dependencies] diff --git a/aave-core/aave-scripts/sources/configure_acl.move b/aave-core/aave-scripts/sources/configure_acl.move new file mode 100644 index 0000000..7022dca --- /dev/null +++ b/aave-core/aave-scripts/sources/configure_acl.move @@ -0,0 +1,115 @@ +script { + // std + use std::option::{Self, Option}; + use std::signer; + use std::vector; + // locals + use aave_acl::acl_manage::Self; + + fun main( + account: &signer, + pool_admins: vector>, + asset_listing_admins: vector>, + risk_admins: vector>, + fund_admins: vector>, + emergency_admins: vector>, + flash_borrower_admins: vector>, + bridge_admins: vector>, + emission_admins: vector>, + admin_controlled_ecosystem_reserve_funds_admins: vector>, + rewards_controller_admins: vector> + ) { + assert!(signer::address_of(account) == @aave_acl); + + acl_manage::grant_default_admin_role(account); + vector::for_each( + pool_admins, + |admin| { + acl_manage::add_pool_admin( + account, option::destroy_with_default(admin, @aave_pool) + ); + } + ); + + vector::for_each( + asset_listing_admins, + |admin| { + acl_manage::add_asset_listing_admin( + account, option::destroy_with_default(admin, @aave_pool) + ); + } + ); + + vector::for_each( + risk_admins, + |admin| { + acl_manage::add_risk_admin( + account, option::destroy_with_default(admin, @aave_pool) + ); + } + ); + + vector::for_each( + fund_admins, + |admin| { + acl_manage::add_funds_admin( + account, option::destroy_with_default(admin, @aave_pool) + ); + } + ); + + vector::for_each( + emergency_admins, + |admin| { + acl_manage::add_emergency_admin( + account, option::destroy_with_default(admin, @aave_pool) + ); + } + ); + + vector::for_each( + flash_borrower_admins, + |admin| { + acl_manage::add_flash_borrower( + account, option::destroy_with_default(admin, @aave_pool) + ); + } + ); + + vector::for_each( + bridge_admins, + |admin| { + acl_manage::add_bridge( + account, option::destroy_with_default(admin, @aave_pool) + ); + } + ); + + vector::for_each( + emission_admins, + |admin| { + acl_manage::add_emission_admin( + account, option::destroy_with_default(admin, @aave_pool) + ); + } + ); + + vector::for_each( + admin_controlled_ecosystem_reserve_funds_admins, + |admin| { + acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin( + account, option::destroy_with_default(admin, @aave_pool) + ); + } + ); + + vector::for_each( + rewards_controller_admins, + |admin| { + acl_manage::add_rewards_controller_admin( + account, option::destroy_with_default(admin, @aave_pool) + ); + } + ); + } +} diff --git a/aave-core/aave-scripts/sources/configure_interest_rates.move b/aave-core/aave-scripts/sources/configure_interest_rates.move new file mode 100644 index 0000000..be29b11 --- /dev/null +++ b/aave-core/aave-scripts/sources/configure_interest_rates.move @@ -0,0 +1,89 @@ +script { + // std + use std::signer; + use std::string::{String, utf8}; + use std::vector; + use aptos_std::debug::print; + use aptos_std::smart_table; + use aptos_framework::fungible_asset; + use aptos_framework::fungible_asset::Metadata; + use aptos_framework::object::Self; + // locals + use aave_rate::default_reserve_interest_rate_strategy::Self; + use aave_acl::acl_manage::Self; + use aave_config::error_config; + + const APTOS_MAINNET: vector = b"mainnet"; + const APTOS_TESTNET: vector = b"testnet"; + + fun main(account: &signer, network: String) { + assert!( + acl_manage::is_asset_listing_admin(signer::address_of(account)) + || acl_manage::is_pool_admin(signer::address_of(account)), + error_config::get_ecaller_not_asset_listing_or_pool_admin() + ); + + // get all underlying assets + let underlying_assets_map = + if (network == utf8(APTOS_MAINNET)) { + aave_data::v1::get_underlying_assets_mainnet() + } else if (network == utf8(APTOS_TESTNET)) { + aave_data::v1::get_underlying_assets_testnet() + } else { + print(&b"Unknown network"); + assert!(false, 1); + }; + + // fetch for each underlying asset the ir strategy config + for (i in 0..smart_table::length(underlying_assets_map)) { + let underlying_asset_name = + *vector::borrow(&smart_table::keys(underlying_assets_map), i); + let underlying_asset_address = + *smart_table::borrow(underlying_assets_map, underlying_asset_name); + let underlying_asset_metadata = + object::address_to_object(underlying_asset_address); + let underlying_asset_symbol = + fungible_asset::symbol(underlying_asset_metadata); + + let interest_rate_strategy_map = + if (network == utf8(APTOS_MAINNET)) { + smart_table::borrow( + aave_data::v1::get_interest_rate_strategy_mainnet(), + underlying_asset_symbol + ) + } else if (network == utf8(APTOS_TESTNET)) { + smart_table::borrow( + aave_data::v1::get_interest_rate_strategy_testnet(), + underlying_asset_symbol + ) + } else { + smart_table::borrow( + aave_data::v1::get_interest_rate_strategy_testnet(), + underlying_asset_symbol + ) + }; + + // init the default interest rate strategy for each underlying_asset_address + let optimal_usage_ratio = + aave_data::v1_values::get_optimal_usage_ratio(interest_rate_strategy_map); + let base_variable_borrow_rate = + aave_data::v1_values::get_base_variable_borrow_rate( + interest_rate_strategy_map + ); + let variable_rate_slope1 = + aave_data::v1_values::get_variable_rate_slope1(interest_rate_strategy_map); + let variable_rate_slope2: u256 = + aave_data::v1_values::get_variable_rate_slope2(interest_rate_strategy_map); + + // set the default ir strategy per underlying asset + default_reserve_interest_rate_strategy::set_reserve_interest_rate_strategy( + account, + underlying_asset_address, + optimal_usage_ratio, + base_variable_borrow_rate, + variable_rate_slope1, + variable_rate_slope2 + ); + }; + } +} diff --git a/aave-core/aave-scripts/sources/configure_price_feeds.move b/aave-core/aave-scripts/sources/configure_price_feeds.move new file mode 100644 index 0000000..9a437e5 --- /dev/null +++ b/aave-core/aave-scripts/sources/configure_price_feeds.move @@ -0,0 +1,79 @@ +script { + // std + use std::signer; + use std::string::{String, utf8}; + use std::vector; + use aptos_std::debug::print; + use aptos_std::smart_table; + use aptos_framework::fungible_asset; + use aptos_framework::fungible_asset::Metadata; + use aptos_framework::object::Self; + // locals + use aave_acl::acl_manage::Self; + use aave_config::error_config; + use aave_oracle::oracle::Self; + use aave_pool::pool; + + const APTOS_MAINNET: vector = b"mainnet"; + const APTOS_TESTNET: vector = b"testnet"; + + fun main(account: &signer, network: String) { + assert!( + acl_manage::is_risk_admin(signer::address_of(account)) + || acl_manage::is_pool_admin(signer::address_of(account)), + error_config::get_ecaller_not_asset_listing_or_pool_admin() + ); + + // get all underlying assets + let underlying_assets_map = + if (network == utf8(APTOS_MAINNET)) { + aave_data::v1::get_underlying_assets_mainnet() + } else if (network == utf8(APTOS_TESTNET)) { + aave_data::v1::get_underlying_assets_testnet() + } else { + print(&b"Unknown network"); + assert!(false, 1); + }; + + // set feed ids for underlying assets, atokens and vartokens + for (i in 0..smart_table::length(underlying_assets_map)) { + // get all underlying data + let underlying_asset_name = + *vector::borrow(&smart_table::keys(underlying_assets_map), i); + let underlying_asset_address = + *smart_table::borrow(underlying_assets_map, underlying_asset_name); + let underlying_asset_metadata = + object::address_to_object(underlying_asset_address); + let underlying_asset_symbol = + fungible_asset::symbol(underlying_asset_metadata); + let reserve_data = pool::get_reserve_data(underlying_asset_address); + + let price_feed = + if (network == utf8(APTOS_MAINNET)) { + smart_table::borrow( + aave_data::v1::get_price_feeds_mainnet(), + underlying_asset_symbol + ) + } else if (network == utf8(APTOS_TESTNET)) { + smart_table::borrow( + aave_data::v1::get_price_feeds_tesnet(), + underlying_asset_symbol + ) + } else { + smart_table::borrow( + aave_data::v1::get_price_feeds_tesnet(), + underlying_asset_symbol + ) + }; + oracle::set_asset_feed_id(account, underlying_asset_address, *price_feed); + oracle::set_asset_feed_id( + account, pool::get_reserve_a_token_address(&reserve_data), *price_feed + ); + oracle::set_asset_feed_id( + account, + pool::get_reserve_variable_debt_token_address(&reserve_data), + *price_feed + ); + }; + } +} diff --git a/aave-core/aave-scripts/sources/configure_reserves.move b/aave-core/aave-scripts/sources/configure_reserves.move new file mode 100644 index 0000000..3d89a87 --- /dev/null +++ b/aave-core/aave-scripts/sources/configure_reserves.move @@ -0,0 +1,134 @@ +script { + // std + use std::option; + use std::signer; + use std::string::{String, utf8}; + use std::vector; + use aptos_std::debug::print; + use aptos_std::smart_table; + use aptos_framework::fungible_asset; + use aptos_framework::fungible_asset::Metadata; + use aptos_framework::object::Self; + // locals + use aave_config::reserve_config; + use aave_acl::acl_manage::Self; + use aave_config::error_config; + + const APTOS_MAINNET: vector = b"mainnet"; + const APTOS_TESTNET: vector = b"testnet"; + + fun main(account: &signer, network: String) { + assert!( + acl_manage::is_asset_listing_admin(signer::address_of(account)) + || acl_manage::is_pool_admin(signer::address_of(account)), + error_config::get_ecaller_not_asset_listing_or_pool_admin() + ); + + // get all underlying assets + let underlying_assets_map = + if (network == utf8(APTOS_MAINNET)) { + aave_data::v1::get_underlying_assets_mainnet() + } else if (network == utf8(APTOS_TESTNET)) { + aave_data::v1::get_underlying_assets_testnet() + } else { + print(&b"Unknown network"); + assert!(false, 1); + }; + + // assemble each reserve's configuration + for (i in 0..smart_table::length(underlying_assets_map)) { + // get all underlying data + let underlying_asset_name = + *vector::borrow(&smart_table::keys(underlying_assets_map), i); + let underlying_asset_address = + *smart_table::borrow(underlying_assets_map, underlying_asset_name); + let underlying_asset_metadata = + object::address_to_object(underlying_asset_address); + let underlying_asset_symbol = + fungible_asset::symbol(underlying_asset_metadata); + let underlying_asset_decimals = + fungible_asset::decimals(underlying_asset_metadata); + + let reserve_config = + if (network == utf8(APTOS_MAINNET)) { + smart_table::borrow( + aave_data::v1::get_reserves_config_mainnet(), + underlying_asset_symbol + ) + } else if (network == utf8(APTOS_TESTNET)) { + smart_table::borrow( + aave_data::v1::get_reserves_config_testnet(), + underlying_asset_symbol + ) + } else { + smart_table::borrow( + aave_data::v1::get_reserves_config_testnet(), + underlying_asset_symbol + ) + }; + let debt_ceiling = aave_data::v1_values::get_debt_ceiling(reserve_config); + let flashLoan_enabled = + aave_data::v1_values::get_flashLoan_enabled(reserve_config); + let borrowable_isolation = + aave_data::v1_values::get_borrowable_isolation(reserve_config); + let supply_cap = aave_data::v1_values::get_supply_cap(reserve_config); + let borrow_cap = aave_data::v1_values::get_borrow_cap(reserve_config); + let ltv = aave_data::v1_values::get_base_ltv_as_collateral(reserve_config); + let borrowing_enabled = + aave_data::v1_values::get_borrowing_enabled(reserve_config); + let reserve_factor = aave_data::v1_values::get_reserve_factor(reserve_config); + let liquidation_threshold = + aave_data::v1_values::get_liquidation_threshold(reserve_config); + let liquidation_bonus = + aave_data::v1_values::get_liquidation_bonus(reserve_config); + let liquidation_protocol_fee = + aave_data::v1_values::get_liquidation_protocol_fee(reserve_config); + let siloed_borrowing = + aave_data::v1_values::get_siloed_borrowing(reserve_config); + + let reserve_config_new = reserve_config::init(); + reserve_config::set_decimals( + &mut reserve_config_new, (underlying_asset_decimals as u256) + ); + reserve_config::set_liquidation_threshold( + &mut reserve_config_new, liquidation_threshold + ); + reserve_config::set_liquidation_bonus( + &mut reserve_config_new, liquidation_bonus + ); + reserve_config::set_liquidation_protocol_fee( + &mut reserve_config_new, liquidation_protocol_fee + ); + reserve_config::set_frozen(&mut reserve_config_new, false); + reserve_config::set_paused(&mut reserve_config_new, false); + reserve_config::set_reserve_factor(&mut reserve_config_new, reserve_factor); + reserve_config::set_active(&mut reserve_config_new, true); + reserve_config::set_flash_loan_enabled( + &mut reserve_config_new, flashLoan_enabled + ); + reserve_config::set_ltv(&mut reserve_config_new, ltv); + reserve_config::set_debt_ceiling(&mut reserve_config_new, debt_ceiling); + reserve_config::set_supply_cap(&mut reserve_config_new, supply_cap); + reserve_config::set_borrow_cap(&mut reserve_config_new, borrow_cap); + reserve_config::set_borrowable_in_isolation( + &mut reserve_config_new, borrowable_isolation + ); + reserve_config::set_siloed_borrowing( + &mut reserve_config_new, siloed_borrowing + ); + reserve_config::set_borrowing_enabled( + &mut reserve_config_new, borrowing_enabled + ); + let emode_category = aave_data::v1_values::get_emode_category(reserve_config); + if (option::is_some(&emode_category)) { + reserve_config::set_emode_category( + &mut reserve_config_new, *option::borrow(&emode_category) + ) + }; + // attach the config to the reserve + aave_pool::pool::set_reserve_configuration_with_guard( + account, underlying_asset_address, reserve_config_new + ); + }; + } +} diff --git a/aave-core/aave-scripts/sources/create_emodes.move b/aave-core/aave-scripts/sources/create_emodes.move new file mode 100644 index 0000000..f27dc78 --- /dev/null +++ b/aave-core/aave-scripts/sources/create_emodes.move @@ -0,0 +1,62 @@ +script { + // std + use std::signer; + use std::string::{String, utf8}; + use std::vector; + use aptos_std::debug::print; + use aptos_std::smart_table; + // locals + use aave_pool::pool_configurator; + use aave_acl::acl_manage::Self; + use aave_config::error_config; + use aave_oracle::oracle_base; + + const APTOS_MAINNET: vector = b"mainnet"; + const APTOS_TESTNET: vector = b"testnet"; + + fun main(account: &signer, network: String) { + assert!( + acl_manage::is_risk_admin(signer::address_of(account)) + || acl_manage::is_pool_admin(signer::address_of(account)), + error_config::get_ecaller_not_asset_listing_or_pool_admin() + ); + + // get all underlying assets + let emodes_map = + if (network == utf8(APTOS_MAINNET)) { + aave_data::v1::get_emodes_mainnet() + } else if (network == utf8(APTOS_TESTNET)) { + aave_data::v1::get_emodes_testnet() + } else { + print(&b"Unknown network"); + assert!(false, 1); + }; + + for (i in 0..smart_table::length(emodes_map)) { + let emode_category_id = *vector::borrow(&smart_table::keys(emodes_map), i); + let emode_config = *smart_table::borrow(emodes_map, emode_category_id); + + let emode_category_id = + aave_data::v1_values::get_emode_category_id(&emode_config); + let emode_liquidation_label = + aave_data::v1_values::get_emode_liquidation_label(&emode_config); + let emode_liquidation_threshold = + aave_data::v1_values::get_emode_liquidation_threshold(&emode_config); + let emode_liquidation_bonus = + aave_data::v1_values::get_emode_liquidation_bonus(&emode_config); + let emode_ltv = aave_data::v1_values::get_emode_ltv(&emode_config); + + // create the emode + pool_configurator::set_emode_category( + account, + (emode_category_id as u8), + (emode_ltv as u16), + (emode_liquidation_threshold as u16), + (emode_liquidation_bonus as u16), + oracle_base::oracle_address(), + emode_liquidation_label + ); + }; + + } +} diff --git a/aave-core/aave-scripts/sources/create_reserves.move b/aave-core/aave-scripts/sources/create_reserves.move new file mode 100644 index 0000000..346e19d --- /dev/null +++ b/aave-core/aave-scripts/sources/create_reserves.move @@ -0,0 +1,94 @@ +script { + // std + use std::signer; + use std::string::{String, utf8}; + use std::vector; + use aptos_std::debug::print; + use aptos_std::smart_table; + use aptos_framework::fungible_asset; + use aptos_framework::fungible_asset::Metadata; + use aptos_framework::object::Self; + // locals + use aave_pool::collector; + use aave_pool::pool_configurator; + use aave_acl::acl_manage::Self; + use aave_config::error_config; + + const APTOS_MAINNET: vector = b"mainnet"; + const APTOS_TESTNET: vector = b"testnet"; + + fun main(account: &signer, network: String) { + assert!( + acl_manage::is_asset_listing_admin(signer::address_of(account)) + || acl_manage::is_pool_admin(signer::address_of(account)), + error_config::get_ecaller_not_asset_listing_or_pool_admin() + ); + + // get all underlying assets + let underlying_assets_map = + if (network == utf8(APTOS_MAINNET)) { + aave_data::v1::get_underlying_assets_mainnet() + } else if (network == utf8(APTOS_TESTNET)) { + aave_data::v1::get_underlying_assets_testnet() + } else { + print(&b"Unknown network"); + assert!(false, 1); + }; + + // prepare pool reserves + let treasuries: vector
= vector[]; + let underlying_assets: vector
= vector[]; + let underlying_asset_decimals: vector = vector[]; + let atokens_names: vector = vector[]; + let atokens_symbols: vector = vector[]; + let var_tokens_names: vector = vector[]; + let var_tokens_symbols: vector = vector[]; + let collector_address = collector::collector_address(); + + for (i in 0..smart_table::length(underlying_assets_map)) { + // get underlying asset data + let underlying_asset_name = + *vector::borrow(&smart_table::keys(underlying_assets_map), i); + let underlying_asset_address = + *smart_table::borrow(underlying_assets_map, underlying_asset_name); + let underlying_asset_metadata = + object::address_to_object(underlying_asset_address); + let underlying_asset_symbol = + fungible_asset::symbol(underlying_asset_metadata); + + // prepare the data for reserves' atokens and variable tokens + vector::push_back(&mut underlying_assets, underlying_asset_address); + vector::push_back( + &mut underlying_asset_decimals, + fungible_asset::decimals(underlying_asset_metadata) + ); + vector::push_back(&mut treasuries, collector_address); + vector::push_back( + &mut atokens_names, + aave_data::v1::get_atoken_name(underlying_asset_symbol) + ); + vector::push_back( + &mut atokens_symbols, + aave_data::v1::get_atoken_symbol(underlying_asset_symbol) + ); + vector::push_back( + &mut var_tokens_names, + aave_data::v1::get_vartoken_name(underlying_asset_symbol) + ); + vector::push_back( + &mut var_tokens_symbols, + aave_data::v1::get_vartoken_symbol(underlying_asset_symbol) + ); + }; + // create pool reserves in one go + pool_configurator::init_reserves( + account, + underlying_assets, + treasuries, + atokens_names, + atokens_symbols, + var_tokens_names, + var_tokens_symbols + ); + } +} diff --git a/aave-core/aave-scripts/sources/post-publish.move b/aave-core/aave-scripts/sources/post-publish.move deleted file mode 100644 index 0b1ff2d..0000000 --- a/aave-core/aave-scripts/sources/post-publish.move +++ /dev/null @@ -1,48 +0,0 @@ -script { - // std - use std::debug::{Self}; - use std::string_utils::{Self}; - // locals - use aave_pool::pool_addresses_provider::{Self}; - - fun init_pool_addresses_provider(account: &signer) { - pool_addresses_provider::set_acl_admin(account, @aave_acl); - debug::print( - &string_utils::format1(&b">>>> Acl Admin set at address: {}", @aave_acl) - ); - pool_addresses_provider::set_acl_manager(account, @aave_acl); - debug::print( - &string_utils::format1(&b">>>> Acl Manager set at address: {}", @aave_acl) - ); - pool_addresses_provider::set_pool_configurator(account, @aave_pool); - debug::print( - &string_utils::format1( - &b">>>> Pool Configurator set at address: {}", @aave_pool - ) - ); - pool_addresses_provider::set_pool_data_provider(account, @aave_pool); - debug::print( - &string_utils::format1( - &b">>>> Pool Data Provider set at address: {}", @aave_pool - ) - ); - pool_addresses_provider::set_pool_impl(account, @aave_pool); - debug::print( - &string_utils::format1( - &b">>>> Pool Implementation set at address: {}", @aave_pool - ), - ); - pool_addresses_provider::set_price_oracle(account, @aave_mock_oracle); - debug::print( - &string_utils::format1( - &b">>>> Mock Oracle set at address: {}", @aave_mock_oracle - ) - ); - pool_addresses_provider::set_price_oracle_sentinel(account, @aave_mock_oracle); - debug::print( - &string_utils::format1( - &b">>>> Mock Oracle Sentinel set at address: {}", @aave_mock_oracle - ), - ); - } -} diff --git a/aave-core/chainlink-data-feeds/Move.toml b/aave-core/chainlink-data-feeds/Move.toml new file mode 100644 index 0000000..48414a9 --- /dev/null +++ b/aave-core/chainlink-data-feeds/Move.toml @@ -0,0 +1,20 @@ +[package] +name = "ChainlinkDataFeeds" +version = "1.0.0" +authors = [] + +[addresses] +data_feeds = "_" +aave_oracle_racc_address = "_" +platform = "_" + +#[dev-addresses] +#data_feeds = "0x100" +#aave_oracle_racc_address = "0xcafe" +#platform = "0xbaba" + +[dependencies] +AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "mainnet", subdir = "aptos-move/framework/aptos-framework" } +ChainlinkPlatform = { local = "../chainlink-platform" } + +[dev-dependencies] diff --git a/aave-core/chainlink-data-feeds/sources/registry.move b/aave-core/chainlink-data-feeds/sources/registry.move new file mode 100644 index 0000000..ffc76ff --- /dev/null +++ b/aave-core/chainlink-data-feeds/sources/registry.move @@ -0,0 +1,825 @@ +module data_feeds::registry { + use std::error; + use std::event; + use std::option; + use std::signer; + use std::simple_map::{Self, SimpleMap}; + use std::string::{Self, String}; + use std::vector; + + use aptos_framework::object::{Self, ExtendRef, TransferRef, Object}; + + friend data_feeds::router; + + const APP_OBJECT_SEED: vector = b"REGISTRY"; + + struct Registry has key, store, drop { + extend_ref: ExtendRef, + transfer_ref: TransferRef, + owner_address: address, + pending_owner_address: address, + feeds: SimpleMap, Feed>, + allowed_workflow_owners: vector>, + allowed_workflow_names: vector> + } + + struct Feed has key, store, drop, copy { + description: String, + config_id: vector, + benchmark: u256, + report: vector, + observation_timestamp: u256 + } + + struct Benchmark has store, drop { + benchmark: u256, + observation_timestamp: u256 + } + + struct Report has store, drop { + report: vector, + observation_timestamp: u256 + } + + struct FeedMetadata has store, drop, key { + description: String, + config_id: vector + } + + struct WorkflowConfig { + allowed_workflow_owners: vector>, + allowed_workflow_names: vector> + } + + struct FeedConfig { + feed_id: vector, + feed: Feed + } + + #[event] + struct FeedDescriptionUpdated has drop, store { + feed_id: vector, + description: String + } + + #[event] + struct FeedRemoved has drop, store { + feed_id: vector + } + + #[event] + struct FeedSet has drop, store { + feed_id: vector, + description: String, + config_id: vector + } + + #[event] + struct FeedUpdated has drop, store { + feed_id: vector, + timestamp: u256, + benchmark: u256, + report: vector + } + + #[event] + struct StaleReport has drop, store { + feed_id: vector, + latest_timestamp: u256, + report_timestamp: u256 + } + + #[event] + struct OwnershipTransferRequested has drop, store { + from: address, + to: address + } + + #[event] + struct OwnershipTransferred has drop, store { + from: address, + to: address + } + + // Errors + const ENOT_OWNER: u64 = 1; + const EDUPLICATE_ELEMENTS: u64 = 2; + const EFEED_EXISTS: u64 = 3; + const EFEED_NOT_CONFIGURED: u64 = 4; + const ECONFIG_NOT_CONFIGURED: u64 = 5; + const EUNEQUAL_ARRAY_LENGTHS: u64 = 6; + const EINVALID_REPORT: u64 = 7; + const EUNAUTHORIZED_WORKFLOW_NAME: u64 = 8; + const EUNAUTHORIZED_WORKFLOW_OWNER: u64 = 9; + const ECANNOT_TRANSFER_TO_SELF: u64 = 10; + const ENOT_PROPOSED_OWNER: u64 = 11; + const EEMPTY_WORKFLOW_OWNERS: u64 = 12; + + // Schema types + const SCHEMA_V3: u16 = 3; + const SCHEMA_V4: u16 = 4; + + inline fun assert_is_owner( + registry: &Registry, target_address: address + ) { + assert!( + registry.owner_address == target_address, + error::permission_denied(ENOT_OWNER) + ); + } + + fun assert_no_duplicates(a: &vector) { + let len = vector::length(a); + for (i in 0..len) { + for (j in (i + 1)..len) { + assert!( + vector::borrow(a, i) != vector::borrow(a, j), + error::invalid_argument(EDUPLICATE_ELEMENTS) + ); + } + } + } + + #[test_only] + public fun init_module_for_testing(publisher: &signer) { + init_module(publisher); + } + + fun init_module(publisher: &signer) { + assert!(signer::address_of(publisher) == @data_feeds, 1); + + let constructor_ref = object::create_named_object(publisher, APP_OBJECT_SEED); + + let extend_ref = object::generate_extend_ref(&constructor_ref); + let transfer_ref = object::generate_transfer_ref(&constructor_ref); + let object_signer = object::generate_signer(&constructor_ref); + + // register to receive platform::forwarder reports + let cb = + aptos_framework::function_info::new_function_info( + publisher, + string::utf8(b"registry"), + string::utf8(b"on_report") + ); + platform::storage::register(publisher, cb, new_proof()); + + move_to( + &object_signer, + Registry { + owner_address: @aave_oracle_racc_address, + pending_owner_address: @0x0, + extend_ref, + transfer_ref, + feeds: simple_map::new(), + allowed_workflow_names: vector[], + allowed_workflow_owners: vector[] + } + ); + } + + inline fun get_state_addr(): address { + object::create_object_address(&@data_feeds, APP_OBJECT_SEED) + } + + public entry fun set_feeds( + authority: &signer, + feed_ids: vector>, + descriptions: vector, + config_id: vector + ) acquires Registry { + let registry = borrow_global_mut(get_state_addr()); + assert_is_owner(registry, signer::address_of(authority)); + set_feeds_internal(registry, feed_ids, descriptions, config_id); + } + + public(friend) fun set_feeds_unchecked( + feed_ids: vector>, + descriptions: vector, + config_id: vector + ) acquires Registry { + let registry = borrow_global_mut(get_state_addr()); + set_feeds_internal(registry, feed_ids, descriptions, config_id); + } + + fun set_feeds_internal( + registry: &mut Registry, + feed_ids: vector>, + descriptions: vector, + config_id: vector + ) { + assert_no_duplicates(&feed_ids); + + assert!( + vector::length(&feed_ids) == vector::length(&descriptions), + error::invalid_argument(EUNEQUAL_ARRAY_LENGTHS) + ); + + vector::zip_ref( + &feed_ids, + &descriptions, + |feed_id, description| { + assert!( + !simple_map::contains_key(®istry.feeds, feed_id), + error::invalid_argument(EFEED_EXISTS) + ); + + let feed = Feed { + description: *description, + config_id, + benchmark: 0, + report: vector::empty(), + observation_timestamp: 0 + }; + simple_map::add(&mut registry.feeds, *feed_id, feed); + + event::emit( + FeedSet { feed_id: *feed_id, description: *description, config_id } + ); + } + ); + } + + public entry fun remove_feeds( + authority: &signer, feed_ids: vector> + ) acquires Registry { + let registry = borrow_global_mut(get_state_addr()); + assert_is_owner(registry, signer::address_of(authority)); + + assert_no_duplicates(&feed_ids); + + vector::for_each( + feed_ids, + |feed_id| { + assert!( + simple_map::contains_key(®istry.feeds, &feed_id), + error::invalid_argument(EFEED_NOT_CONFIGURED) + ); + simple_map::remove(&mut registry.feeds, &feed_id); + } + ); + } + + public entry fun update_descriptions( + authority: &signer, feed_ids: vector>, descriptions: vector + ) acquires Registry { + let registry = borrow_global_mut(get_state_addr()); + assert_is_owner(registry, signer::address_of(authority)); + + assert!( + vector::length(&feed_ids) == vector::length(&descriptions), + error::invalid_argument(EUNEQUAL_ARRAY_LENGTHS) + ); + + vector::zip_ref( + &feed_ids, + &descriptions, + |feed_id, description| { + assert!( + simple_map::contains_key(®istry.feeds, feed_id), + error::invalid_argument(EFEED_NOT_CONFIGURED) + ); + + let feed = simple_map::borrow_mut(&mut registry.feeds, feed_id); + feed.description = *description; + + event::emit( + FeedDescriptionUpdated { feed_id: *feed_id, description: *description } + ); + } + ); + } + + inline fun to_u16be(data: vector): u16 { + // reverse big endian to little endian + vector::reverse(&mut data); + aptos_std::from_bcs::to_u16(data) + } + + inline fun to_u32be(data: vector): u32 { + // reverse big endian to little endian + vector::reverse(&mut data); + aptos_std::from_bcs::to_u32(data) + } + + inline fun to_u256be(data: vector): u256 { + // reverse big endian to little endian + vector::reverse(&mut data); + aptos_std::from_bcs::to_u256(data) + } + + /// Serves as a proof type for the dispatch engine, used to authenticate and handle incoming message callbacks. + /// This identifier links callback registration with the `on_report` event and enables secure retrieval of callback data. + /// Only has the `drop` ability to prevent copying and persisting in global storage. + struct OnReceive has drop {} + + /// Creates a new OnReceive object. + inline fun new_proof(): OnReceive { + OnReceive {} + } + + // Platform receiver function interface + public fun on_report(_metadata: Object): option::Option acquires Registry { + let registry = borrow_global_mut(get_state_addr()); + + let (metadata, data) = platform::storage::retrieve(new_proof()); + + let parsed_metadata = platform::storage::parse_report_metadata(metadata); + + let workflow_owner = + platform::storage::get_report_metadata_workflow_owner(&parsed_metadata); + assert!( + vector::contains(®istry.allowed_workflow_owners, &workflow_owner), + EUNAUTHORIZED_WORKFLOW_OWNER + ); + + let workflow_name = + platform::storage::get_report_metadata_workflow_name(&parsed_metadata); + assert!( + vector::is_empty(®istry.allowed_workflow_names) + || vector::contains(®istry.allowed_workflow_names, &workflow_name), + EUNAUTHORIZED_WORKFLOW_NAME + ); + + let (feed_ids, reports) = parse_raw_report(data); + vector::zip_ref( + &feed_ids, + &reports, + |feed_id, report| { + perform_update(registry, *feed_id, *report); + } + ); + + option::none() + } + + public entry fun set_workflow_config( + authority: &signer, + allowed_workflow_owners: vector>, + allowed_workflow_names: vector> + ) acquires Registry { + let registry = borrow_global_mut(get_state_addr()); + assert_is_owner(registry, signer::address_of(authority)); + assert!( + !vector::is_empty(&allowed_workflow_owners), + error::invalid_argument(EEMPTY_WORKFLOW_OWNERS) + ); + + registry.allowed_workflow_owners = allowed_workflow_owners; + registry.allowed_workflow_names = allowed_workflow_names; + } + + #[view] + public fun get_workflow_config(): WorkflowConfig acquires Registry { + let registry = borrow_global(get_state_addr()); + + WorkflowConfig { + allowed_workflow_owners: registry.allowed_workflow_owners, + allowed_workflow_names: registry.allowed_workflow_names + } + } + + #[view] + public fun get_feeds(): vector acquires Registry { + let registry = borrow_global(get_state_addr()); + let feed_configs = vector[]; + let (feed_ids, feeds) = simple_map::to_vec_pair(registry.feeds); + vector::zip_ref( + &feed_ids, + &feeds, + |feed_id, feed| { + vector::push_back( + &mut feed_configs, + FeedConfig { feed_id: *feed_id, feed: *feed } + ); + } + ); + feed_configs + } + + // Parse ETH ABI encoded raw data into multiple reports + fun parse_raw_report(data: vector): (vector>, vector>) { + let offset = 0; + assert!( + to_u256be(vector::slice(&data, offset, offset + 32)) == 32, + 32 + ); + offset = offset + 32; + + let count = to_u256be(vector::slice(&data, offset, offset + 32)); + offset = offset + 32; + + for (i in 0..count) { + // skip len * offsets table + offset = offset + 32; + }; + + let feed_ids = vector[]; + let reports = vector[]; + + for (i in 0..count) { + let feed_id = vector::slice(&data, offset, offset + 32); + vector::push_back(&mut feed_ids, feed_id); + offset = offset + 32; + + assert!( + to_u256be(vector::slice(&data, offset, offset + 32)) == 64, + 64 + ); + offset = offset + 32; + + let len = (to_u256be(vector::slice(&data, offset, offset + 32)) as u64); + offset = offset + 32; + + let report = vector::slice(&data, offset, offset + len); + vector::push_back(&mut reports, report); + offset = offset + len; + }; + + (feed_ids, reports) + } + + #[test_only] + public fun perform_update_for_testing( + feed_id: vector, report_data: vector + ) acquires Registry { + let registry = borrow_global_mut(get_state_addr()); + perform_update(registry, feed_id, report_data); + } + + fun perform_update( + registry: &mut Registry, feed_id: vector, report_data: vector + ) { + assert!( + simple_map::contains_key(®istry.feeds, &feed_id), + error::invalid_argument(EFEED_NOT_CONFIGURED) + ); + let feed = simple_map::borrow_mut(&mut registry.feeds, &feed_id); + + let report_feed_id = vector::slice(&report_data, 0, 32); + // schema is based on first two bytes of the feed id + let schema = to_u16be(vector::slice(&report_feed_id, 0, 2)); + + let observation_timestamp: u256; + let benchmark_price: u256; + if (schema == SCHEMA_V3 || schema == SCHEMA_V4) { + // offsets are the same for timestamp and benchmark in v3 and v4. + observation_timestamp = ( + to_u32be(vector::slice(&report_data, 3 * 32 - 4, 3 * 32)) as u256 + ); + // NOTE: aptos has no signed integer types, so can't parse as i196, this is a raw representation + benchmark_price = to_u256be(vector::slice(&report_data, 6 * 32, 7 * 32)); + } else { + abort error::invalid_argument(EINVALID_REPORT) + }; + + if (feed.observation_timestamp >= observation_timestamp) { + event::emit( + StaleReport { + feed_id, + latest_timestamp: feed.observation_timestamp, + report_timestamp: observation_timestamp + } + ); + }; + + feed.observation_timestamp = observation_timestamp; + feed.benchmark = benchmark_price; + feed.report = report_data; + + event::emit( + FeedUpdated { + feed_id, + timestamp: observation_timestamp, + benchmark: benchmark_price, + report: report_data + } + ); + } + + // Getters + + public fun get_benchmarks( + authority: &signer, feed_ids: vector> + ): vector acquires Registry { + let registry = borrow_global(get_state_addr()); + assert_is_owner(registry, signer::address_of(authority)); + get_benchmarks_internal(registry, feed_ids) + } + + public(friend) fun get_benchmarks_unchecked( + feed_ids: vector> + ): vector acquires Registry { + let registry = borrow_global(get_state_addr()); + get_benchmarks_internal(registry, feed_ids) + } + + fun get_benchmarks_internal( + registry: &Registry, feed_ids: vector> + ): vector { + vector::map( + feed_ids, + |feed_id| { + assert!( + simple_map::contains_key(®istry.feeds, &feed_id), + error::invalid_argument(EFEED_NOT_CONFIGURED) + ); + let feed = simple_map::borrow(®istry.feeds, &feed_id); + Benchmark { + benchmark: feed.benchmark, + observation_timestamp: feed.observation_timestamp + } + } + ) + } + + public fun get_reports( + authority: &signer, feed_ids: vector> + ): vector acquires Registry { + let registry = borrow_global(get_state_addr()); + assert_is_owner(registry, signer::address_of(authority)); + get_reports_internal(registry, feed_ids) + } + + public(friend) fun get_reports_unchecked( + feed_ids: vector> + ): vector acquires Registry { + let registry = borrow_global(get_state_addr()); + get_reports_internal(registry, feed_ids) + } + + fun get_reports_internal( + registry: &Registry, feed_ids: vector> + ): vector { + vector::map( + feed_ids, + |feed_id| { + assert!( + simple_map::contains_key(®istry.feeds, &feed_id), + error::invalid_argument(EFEED_NOT_CONFIGURED) + ); + + let feed = simple_map::borrow(®istry.feeds, &feed_id); + Report { + report: feed.report, + observation_timestamp: feed.observation_timestamp + } + } + ) + } + + #[view] + public fun get_feed_metadata( + feed_ids: vector> + ): vector acquires Registry { + let registry = borrow_global(get_state_addr()); + + vector::map( + feed_ids, + |feed_id| { + assert!( + simple_map::contains_key(®istry.feeds, &feed_id), + error::invalid_argument(EFEED_NOT_CONFIGURED) + ); + + let feed = simple_map::borrow(®istry.feeds, &feed_id); + + FeedMetadata { description: feed.description, config_id: feed.config_id } + } + ) + } + + // Ownership functions + + #[view] + public fun get_owner(): address acquires Registry { + let registry = borrow_global(get_state_addr()); + registry.owner_address + } + + public entry fun transfer_ownership(authority: &signer, to: address) acquires Registry { + let registry = borrow_global_mut(get_state_addr()); + assert_is_owner(registry, signer::address_of(authority)); + assert!( + registry.owner_address != to, + error::invalid_argument(ECANNOT_TRANSFER_TO_SELF) + ); + + registry.pending_owner_address = to; + + event::emit(OwnershipTransferRequested { from: registry.owner_address, to }); + } + + public entry fun accept_ownership(authority: &signer) acquires Registry { + let registry = borrow_global_mut(get_state_addr()); + assert!( + registry.pending_owner_address == signer::address_of(authority), + error::permission_denied(ENOT_PROPOSED_OWNER) + ); + + let old_owner_address = registry.owner_address; + registry.owner_address = registry.pending_owner_address; + registry.pending_owner_address = @0x0; + + event::emit( + OwnershipTransferred { from: old_owner_address, to: registry.owner_address } + ); + } + + // Struct accessors + + public fun get_benchmark_value(result: &Benchmark): u256 { + result.benchmark + } + + public fun get_benchmark_timestamp(result: &Benchmark): u256 { + result.observation_timestamp + } + + public fun get_report_value(result: &Report): vector { + result.report + } + + public fun get_report_timestamp(result: &Report): u256 { + result.observation_timestamp + } + + public fun get_feed_metadata_description(result: &FeedMetadata): String { + result.description + } + + public fun get_feed_metadata_config_id(result: &FeedMetadata): vector { + result.config_id + } + + #[test] + fun test_parse_raw_report() { + // request_context = 00018463f564e082c55b7237add2a03bd6b3c35789d38be0f6964d9aba82f1a8000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000 + // metadata = 1019256d85b84c7ba85cd9b7bb94fe15b73d7ec99e3cc0f470ee5dd2a1eaac88c000000000000000000000000bc3a8582cc08d3df797ab13a6c567eadb2517b3f0f931b7145b218016bf9dde43030303045544842544300000000000000000000000000000000000000aa00010 + // 0000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001c + // raw report = + // 0000000000000000000000000000000000000000000000000000000000000020 32 + // 0000000000000000000000000000000000000000000000000000000000000002 len=2 + // 0000000000000000000000000000000000000000000000000000000000000040 offset + // 00000000000000000000000000000000000000000000000000000000000001c0 offset + // 0003111111111111111100000000000000000000000000000000000000000000 feed_id + // 0000000000000000000000000000000000000000000000000000000000000040 offset + // 0000000000000000000000000000000000000000000000000000000000000120 len=228 + // 0003111111111111111100000000000000000000000000000000000000000000 + // 0000000000000000000000000000000000000000000000000000000066b3a12c + // 0000000000000000000000000000000000000000000000000000000066b3a12c + // 00000000000000000000000000000000000000000000000000000000000494a8 + // 00000000000000000000000000000000000000000000000000000000000494a8 + // 0000000000000000000000000000000000000000000000000000000066c2e36c + // 00000000000000000000000000000000000000000000000000000000000494a8 + // 00000000000000000000000000000000000000000000000000000000000494a8 + // 00000000000000000000000000000000000000000000000000000000000494a8 + // 0003222222222222222200000000000000000000000000000000000000000000 feed_id + // 0000000000000000000000000000000000000000000000000000000000000040 offset + // 0000000000000000000000000000000000000000000000000000000000000120 len=228 + // 0003222222222222222200000000000000000000000000000000000000000000 + // 0000000000000000000000000000000000000000000000000000000066b3a12c + // 0000000000000000000000000000000000000000000000000000000066b3a12c + // 00000000000000000000000000000000000000000000000000000000000494a8 + // 00000000000000000000000000000000000000000000000000000000000494a8 + // 0000000000000000000000000000000000000000000000000000000066c2e36c + // 00000000000000000000000000000000000000000000000000000000000494a8 + // 00000000000000000000000000000000000000000000000000000000000494a8 + // 00000000000000000000000000000000000000000000000000000000000494a8 + + let data = + x"00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001c000031111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000012000031111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000066b3a12c0000000000000000000000000000000000000000000000000000000066b3a12c00000000000000000000000000000000000000000000000000000000000494a800000000000000000000000000000000000000000000000000000000000494a80000000000000000000000000000000000000000000000000000000066c2e36c00000000000000000000000000000000000000000000000000000000000494a800000000000000000000000000000000000000000000000000000000000494a800000000000000000000000000000000000000000000000000000000000494a800032222222222222222000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000012000032222222222222222000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000066b3a12c0000000000000000000000000000000000000000000000000000000066b3a12c00000000000000000000000000000000000000000000000000000000000494a800000000000000000000000000000000000000000000000000000000000494a80000000000000000000000000000000000000000000000000000000066c2e36c00000000000000000000000000000000000000000000000000000000000494a800000000000000000000000000000000000000000000000000000000000494a800000000000000000000000000000000000000000000000000000000000494a8"; + + let (feed_ids, reports) = parse_raw_report(data); + std::debug::print(&feed_ids); + std::debug::print(&reports); + + assert!( + feed_ids + == vector[ + x"0003111111111111111100000000000000000000000000000000000000000000", + x"0003222222222222222200000000000000000000000000000000000000000000" + ], + 1 + ); + + let expected_reports = vector[ + x"00031111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000066b3a12c0000000000000000000000000000000000000000000000000000000066b3a12c00000000000000000000000000000000000000000000000000000000000494a800000000000000000000000000000000000000000000000000000000000494a80000000000000000000000000000000000000000000000000000000066c2e36c00000000000000000000000000000000000000000000000000000000000494a800000000000000000000000000000000000000000000000000000000000494a800000000000000000000000000000000000000000000000000000000000494a8", + x"00032222222222222222000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000066b3a12c0000000000000000000000000000000000000000000000000000000066b3a12c00000000000000000000000000000000000000000000000000000000000494a800000000000000000000000000000000000000000000000000000000000494a80000000000000000000000000000000000000000000000000000000066c2e36c00000000000000000000000000000000000000000000000000000000000494a800000000000000000000000000000000000000000000000000000000000494a800000000000000000000000000000000000000000000000000000000000494a8" + ]; + assert!(reports == expected_reports, 1); + } + + #[test_only] + fun set_up_test(publisher: &signer, platform: &signer) { + use aptos_framework::account::{Self}; + account::create_account_for_test(signer::address_of(publisher)); + + platform::forwarder::init_module_for_testing(platform); + platform::storage::init_module_for_testing(platform); + + init_module(publisher); + } + + #[test(owner = @aave_oracle_racc_address, publisher = @data_feeds, platform = @platform)] + fun test_perform_update_v3( + owner: &signer, publisher: &signer, platform: &signer + ) acquires Registry { + set_up_test(publisher, platform); + + let report_data = + x"0003fbba4fce42f65d6032b18aee53efdf526cc734ad296cb57565979d883bdd0000000000000000000000000000000000000000000000000000000066ed173e0000000000000000000000000000000000000000000000000000000066ed174200000000000000007fffffffffffffffffffffffffffffffffffffffffffffff00000000000000007fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000066ee68c2000000000000000000000000000000000000000000000d808cc35e6ed670bd00000000000000000000000000000000000000000000000d808590c35425347980000000000000000000000000000000000000000000000d8093f5f989878e7c00"; + let feed_id = vector::slice(&report_data, 0, 32); + let expected_timestamp = 0x000066ed1742; + let expected_benchmark = 0x000d808cc35e6ed670bd00; + + let config_id = vector[1]; + + set_feeds( + owner, + vector[feed_id], + vector[string::utf8(b"description")], + config_id + ); + + let registry = borrow_global_mut(get_state_addr()); + perform_update(registry, feed_id, report_data); + + let benchmarks = get_benchmarks(owner, vector[feed_id]); + assert!(vector::length(&benchmarks) == 1, 1); + + let benchmark = vector::borrow(&benchmarks, 0); + assert!(benchmark.benchmark == expected_benchmark, 1); + assert!(benchmark.observation_timestamp == expected_timestamp, 1); + } + + #[ + test( + owner = @aave_oracle_racc_address, + publisher = @data_feeds, + platform = @platform, + new_owner = @0xbeef + ) + ] + fun test_transfer_ownership_success( + owner: &signer, + publisher: &signer, + platform: &signer, + new_owner: &signer + ) acquires Registry { + set_up_test(publisher, platform); + + assert!(get_owner() == @aave_oracle_racc_address, 1); + + transfer_ownership(owner, signer::address_of(new_owner)); + accept_ownership(new_owner); + + assert!(get_owner() == signer::address_of(new_owner), 2); + } + + #[test(publisher = @data_feeds, platform = @platform, unknown_user = @0xbeef)] + #[expected_failure(abort_code = 327681, location = data_feeds::registry)] + fun test_transfer_ownership_failure_not_owner( + publisher: &signer, platform: &signer, unknown_user: &signer + ) acquires Registry { + set_up_test(publisher, platform); + + assert!(get_owner() == @aave_oracle_racc_address, 1); + + transfer_ownership(unknown_user, signer::address_of(unknown_user)); + } + + #[test(owner = @aave_oracle_racc_address, publisher = @data_feeds, platform = @platform)] + #[expected_failure(abort_code = 65546, location = data_feeds::registry)] + fun test_transfer_ownership_failure_transfer_to_self( + owner: &signer, publisher: &signer, platform: &signer + ) acquires Registry { + set_up_test(publisher, platform); + + assert!(get_owner() == @aave_oracle_racc_address, 1); + + transfer_ownership(owner, signer::address_of(owner)); + } + + #[ + test( + owner = @aave_oracle_racc_address, + publisher = @data_feeds, + platform = @platform, + new_owner = @0xbeef + ) + ] + #[expected_failure(abort_code = 327691, location = data_feeds::registry)] + fun test_transfer_ownership_failure_not_proposed_owner( + owner: &signer, + publisher: &signer, + platform: &signer, + new_owner: &signer + ) acquires Registry { + set_up_test(publisher, platform); + + assert!(get_owner() == @aave_oracle_racc_address, 1); + + transfer_ownership(owner, @0xfeeb); + accept_ownership(new_owner); + } +} diff --git a/aave-core/chainlink-data-feeds/sources/router.move b/aave-core/chainlink-data-feeds/sources/router.move new file mode 100644 index 0000000..9c4360a --- /dev/null +++ b/aave-core/chainlink-data-feeds/sources/router.move @@ -0,0 +1,202 @@ +module data_feeds::router { + use std::error; + use std::event; + use std::signer; + use std::string::String; + use std::vector; + + use aptos_framework::object::{Self, ExtendRef, TransferRef}; + + use data_feeds::registry::{Self, Benchmark, Report}; + + const APP_OBJECT_SEED: vector = b"ROUTER"; + + struct Router has key, store, drop { + owner_address: address, + pending_owner_address: address, + extend_ref: ExtendRef, + transfer_ref: TransferRef + } + + #[event] + struct OwnershipTransferRequested has drop, store { + from: address, + to: address + } + + #[event] + struct OwnershipTransferred has drop, store { + from: address, + to: address + } + + const ENOT_OWNER: u64 = 0; + const ECANNOT_TRANSFER_TO_SELF: u64 = 1; + const ENOT_PROPOSED_OWNER: u64 = 2; + + fun assert_is_owner(router: &Router, target_address: address) { + assert!( + router.owner_address == target_address, error::invalid_argument(ENOT_OWNER) + ); + } + + #[test_only] + public fun init_module_for_testing(publisher: &signer) { + init_module(publisher); + } + + fun init_module(publisher: &signer) { + assert!(signer::address_of(publisher) == @data_feeds, 1); + + let constructor_ref = object::create_named_object(publisher, APP_OBJECT_SEED); + + let extend_ref = object::generate_extend_ref(&constructor_ref); + let transfer_ref = object::generate_transfer_ref(&constructor_ref); + let object_signer = object::generate_signer(&constructor_ref); + + move_to( + &object_signer, + Router { + owner_address: @aave_oracle_racc_address, + pending_owner_address: @0x0, + extend_ref, + transfer_ref + } + ); + } + + inline fun get_state_addr(): address { + object::create_object_address(&@data_feeds, APP_OBJECT_SEED) + } + + public fun get_benchmarks( + _authority: &signer, feed_ids: vector>, _billing_data: vector + ): vector acquires Router { + let _router = borrow_global(get_state_addr()); + + registry::get_benchmarks_unchecked(feed_ids) + } + + public fun get_reports( + _authority: &signer, feed_ids: vector>, _billing_data: vector + ): vector acquires Router { + let _router = borrow_global(get_state_addr()); + + registry::get_reports_unchecked(feed_ids) + } + + #[view] + public fun get_descriptions(feed_ids: vector>): vector acquires Router { + let _router = borrow_global(get_state_addr()); + + let results = registry::get_feed_metadata(feed_ids); + vector::map( + results, |metadata| registry::get_feed_metadata_description(&metadata) + ) + } + + public entry fun configure_feeds( + authority: &signer, + feed_ids: vector>, + descriptions: vector, + config_id: vector, + _fee_config_id: vector + ) acquires Router { + let router = borrow_global(get_state_addr()); + assert_is_owner(router, signer::address_of(authority)); + + registry::set_feeds_unchecked(feed_ids, descriptions, config_id); + } + + // Ownership functions + #[view] + public fun get_owner(): address acquires Router { + let router = borrow_global(get_state_addr()); + router.owner_address + } + + public entry fun transfer_ownership(authority: &signer, to: address) acquires Router { + let router = borrow_global_mut(get_state_addr()); + assert_is_owner(router, signer::address_of(authority)); + assert!( + router.owner_address != to, + error::invalid_argument(ECANNOT_TRANSFER_TO_SELF) + ); + + router.pending_owner_address = to; + + event::emit(OwnershipTransferRequested { from: router.owner_address, to }); + } + + public entry fun accept_ownership(authority: &signer) acquires Router { + let router = borrow_global_mut(get_state_addr()); + assert!( + router.pending_owner_address == signer::address_of(authority), + error::permission_denied(ENOT_PROPOSED_OWNER) + ); + + let old_owner_address = router.owner_address; + router.owner_address = router.pending_owner_address; + router.pending_owner_address = @0x0; + + event::emit( + OwnershipTransferred { from: old_owner_address, to: router.owner_address } + ); + } + + #[test_only] + fun set_up_test(publisher: &signer) { + init_module(publisher); + } + + #[test(owner = @aave_oracle_racc_address, publisher = @data_feeds, new_owner = @0xbeef)] + fun test_transfer_ownership_success( + owner: &signer, publisher: &signer, new_owner: &signer + ) acquires Router { + set_up_test(publisher); + + assert!(get_owner() == @aave_oracle_racc_address, 1); + + transfer_ownership(owner, signer::address_of(new_owner)); + accept_ownership(new_owner); + + assert!(get_owner() == signer::address_of(new_owner), 2); + } + + #[test(publisher = @data_feeds, unknown_user = @0xbeef)] + #[expected_failure(abort_code = 65536, location = data_feeds::router)] + fun test_transfer_ownership_failure_not_owner( + publisher: &signer, unknown_user: &signer + ) acquires Router { + set_up_test(publisher); + + assert!(get_owner() == @aave_oracle_racc_address, 1); + + transfer_ownership(unknown_user, signer::address_of(unknown_user)); + } + + #[test(owner = @aave_oracle_racc_address, publisher = @data_feeds)] + #[expected_failure(abort_code = 65537, location = data_feeds::router)] + fun test_transfer_ownership_failure_transfer_to_self( + owner: &signer, publisher: &signer + ) acquires Router { + set_up_test(publisher); + + assert!(get_owner() == @aave_oracle_racc_address, 1); + + transfer_ownership(owner, signer::address_of(owner)); + } + + #[test(owner = @aave_oracle_racc_address, publisher = @data_feeds, new_owner = @0xbeef)] + #[expected_failure(abort_code = 327682, location = data_feeds::router)] + fun test_transfer_ownership_failure_not_proposed_owner( + owner: &signer, publisher: &signer, new_owner: &signer + ) acquires Router { + set_up_test(publisher); + + assert!(get_owner() == @aave_oracle_racc_address, 1); + + transfer_ownership(owner, @0xfeeb); + accept_ownership(new_owner); + } +} diff --git a/aave-core/chainlink-platform/Move.toml b/aave-core/chainlink-platform/Move.toml new file mode 100644 index 0000000..44221c6 --- /dev/null +++ b/aave-core/chainlink-platform/Move.toml @@ -0,0 +1,17 @@ +[package] +name = "ChainlinkPlatform" +version = "1.0.0" +authors = [] + +[addresses] +platform = "_" +aave_oracle_racc_address = "_" + +#[dev-addresses] +#platform = "0x100" +#aave_oracle_racc_address = "0xcafe" + +[dependencies] +AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "mainnet", subdir = "aptos-move/framework/aptos-framework" } + +[dev-dependencies] diff --git a/aave-core/chainlink-platform/sources/forwarder.move b/aave-core/chainlink-platform/sources/forwarder.move new file mode 100644 index 0000000..fc3e41b --- /dev/null +++ b/aave-core/chainlink-platform/sources/forwarder.move @@ -0,0 +1,571 @@ +module platform::forwarder { + use aptos_framework::object::{Self, ExtendRef, TransferRef}; + use aptos_std::smart_table::{SmartTable, Self}; + + use std::error; + use std::event; + use std::vector; + use std::bit_vector; + use std::option::{Self, Option}; + use std::signer; + use std::bcs; + + const E_INVALID_DATA_LENGTH: u64 = 1; + const E_INVALID_SIGNER: u64 = 2; + const E_DUPLICATE_SIGNER: u64 = 3; + const E_INVALID_SIGNATURE_COUNT: u64 = 4; + const E_INVALID_SIGNATURE: u64 = 5; + const E_ALREADY_PROCESSED: u64 = 6; + const E_NOT_OWNER: u64 = 7; + const E_MALFORMED_SIGNATURE: u64 = 8; + const E_FAULT_TOLERANCE_MUST_BE_POSITIVE: u64 = 9; + const E_EXCESS_SIGNERS: u64 = 10; + const E_INSUFFICIENT_SIGNERS: u64 = 11; + const E_CALLBACK_DATA_NOT_CONSUMED: u64 = 12; + const E_CANNOT_TRANSFER_TO_SELF: u64 = 13; + const E_NOT_PROPOSED_OWNER: u64 = 14; + const E_CONFIG_ID_NOT_FOUND: u64 = 15; + const E_INVALID_REPORT_VERSION: u64 = 16; + + const MAX_ORACLES: u64 = 31; + + const APP_OBJECT_SEED: vector = b"FORWARDER"; + + struct ConfigId has key, store, drop, copy { + don_id: u32, + config_version: u32 + } + + struct State has key { + owner_address: address, + pending_owner_address: address, + extend_ref: ExtendRef, + transfer_ref: TransferRef, + + // (don_id, config_version) => config + configs: SmartTable, + reports: SmartTable, address> + } + + struct Config has key, store, drop, copy { + f: u8, + // oracles: SimpleMap, + oracles: vector + } + + #[event] + struct ConfigSet has drop, store { + don_id: u32, + config_version: u32, + f: u8, + signers: vector> + } + + #[event] + struct ReportProcessed has drop, store { + receiver: address, + workflow_execution_id: vector, + report_id: u16 + } + + #[event] + struct OwnershipTransferRequested has drop, store { + from: address, + to: address + } + + #[event] + struct OwnershipTransferred has drop, store { + from: address, + to: address + } + + inline fun assert_is_owner(state: &State, target_address: address) { + assert!( + state.owner_address == target_address, + error::permission_denied(E_NOT_OWNER) + ); + } + + fun init_module(publisher: &signer) { + assert!(signer::address_of(publisher) == @platform, 1); + + let constructor_ref = object::create_named_object(publisher, APP_OBJECT_SEED); + + let extend_ref = object::generate_extend_ref(&constructor_ref); + let transfer_ref = object::generate_transfer_ref(&constructor_ref); + let app_signer = &object::generate_signer(&constructor_ref); + + move_to( + app_signer, + State { + owner_address: @aave_oracle_racc_address, + pending_owner_address: @0x0, + configs: smart_table::new(), + reports: smart_table::new(), + extend_ref, + transfer_ref + } + ); + } + + inline fun get_state_addr(): address { + object::create_object_address(&@platform, APP_OBJECT_SEED) + } + + public entry fun set_config( + authority: &signer, + don_id: u32, + config_version: u32, + f: u8, + oracles: vector> + ) acquires State { + let state = borrow_global_mut(get_state_addr()); + + assert_is_owner(state, signer::address_of(authority)); + + assert!(f != 0, error::invalid_argument(E_FAULT_TOLERANCE_MUST_BE_POSITIVE)); + assert!( + vector::length(&oracles) <= MAX_ORACLES, + error::invalid_argument(E_EXCESS_SIGNERS) + ); + assert!( + vector::length(&oracles) >= 3 * (f as u64) + 1, + error::invalid_argument(E_INSUFFICIENT_SIGNERS) + ); + + smart_table::upsert( + &mut state.configs, + ConfigId { don_id, config_version }, + Config { + f, + oracles: vector::map( + oracles, + |oracle| { ed25519::new_unvalidated_public_key_from_bytes(oracle) } + ) + } + ); + + event::emit( + ConfigSet { don_id, config_version, f, signers: oracles } + ); + } + + public entry fun clear_config( + authority: &signer, don_id: u32, config_version: u32 + ) acquires State { + let state = borrow_global_mut(get_state_addr()); + + assert_is_owner(state, signer::address_of(authority)); + + smart_table::remove(&mut state.configs, ConfigId { don_id, config_version }); + + event::emit( + ConfigSet { don_id, config_version, f: 0, signers: vector::empty() } + ); + } + + use aptos_std::aptos_hash::blake2b_256; + use aptos_std::ed25519; + + struct Signature has drop { + public_key: ed25519::UnvalidatedPublicKey, // TODO: pass signer index rather than key to save on space and gas? + sig: ed25519::Signature + } + + public fun signature_from_bytes(bytes: vector): Signature { + assert!( + vector::length(&bytes) == 96, + error::invalid_argument(E_MALFORMED_SIGNATURE) + ); + let public_key = + ed25519::new_unvalidated_public_key_from_bytes(vector::slice(&bytes, 0, 32)); + let sig = ed25519::new_signature_from_bytes(vector::slice(&bytes, 32, 96)); + Signature { sig, public_key } + } + + inline fun transmission_id( + receiver: address, workflow_execution_id: vector, report_id: u16 + ): vector { + let id = bcs::to_bytes(&receiver); + vector::append(&mut id, workflow_execution_id); + vector::append(&mut id, bcs::to_bytes(&report_id)); + id + } + + /// The dispatch call knows both storage and indirectly the callback, thus the separate module. + fun dispatch( + receiver: address, metadata: vector, data: vector + ) { + let meta = platform::storage::insert(receiver, metadata, data); + aptos_framework::dispatchable_fungible_asset::derived_supply(meta); + let obj_address = + object::object_address(&meta); + assert!( + !platform::storage::storage_exists(obj_address), + E_CALLBACK_DATA_NOT_CONSUMED + ); + } + + entry fun report( + transmitter: &signer, + receiver: address, + raw_report: vector, + signatures: vector> + ) acquires State { + let signatures = vector::map( + signatures, |signature| signature_from_bytes(signature) + ); + + let (metadata, data) = + validate_and_process_report(transmitter, receiver, raw_report, signatures); + // NOTE: unable to catch failure here + dispatch(receiver, metadata, data); + } + + inline fun to_u16be(data: vector): u16 { + // reverse big endian to little endian + vector::reverse(&mut data); + aptos_std::from_bcs::to_u16(data) + } + + inline fun to_u32be(data: vector): u32 { + // reverse big endian to little endian + vector::reverse(&mut data); + aptos_std::from_bcs::to_u32(data) + } + + fun validate_and_process_report( + transmitter: &signer, + receiver: address, + raw_report: vector, + signatures: vector + ): (vector, vector) acquires State { + let state = borrow_global_mut(get_state_addr()); + + // report_context = vector::slice(&raw_report, 0, 96); + let report = vector::slice(&raw_report, 96, vector::length(&raw_report)); + + // parse out report metadata + // version | workflow_execution_id | timestamp | don_id | config_version | ... + let report_version = *vector::borrow(&report, 0); + assert!(report_version == 1, E_INVALID_REPORT_VERSION); + + let workflow_execution_id = vector::slice(&report, 1, 33); + // _timestamp + let don_id = vector::slice(&report, 37, 41); + let don_id = to_u32be(don_id); + let config_version = vector::slice(&report, 41, 45); + let config_version = to_u32be(config_version); + let report_id = vector::slice(&report, 107, 109); + let report_id = to_u16be(report_id); + let metadata = vector::slice(&report, 45, 109); + let data = vector::slice(&report, 109, vector::length(&report)); + + let config_id = ConfigId { don_id, config_version }; + assert!(smart_table::contains(&state.configs, config_id), E_CONFIG_ID_NOT_FOUND); + let config = smart_table::borrow(&state.configs, config_id); + + // check if report was already delivered + let transmission_id = transmission_id(receiver, workflow_execution_id, report_id); + let processed = smart_table::contains(&state.reports, transmission_id); + assert!(!processed, E_ALREADY_PROCESSED); + + let required_signatures = (config.f as u64) + 1; + assert!( + vector::length(&signatures) == required_signatures, + error::invalid_argument(E_INVALID_SIGNATURE_COUNT) + ); + + // blake2b(report_context | report) + let msg = blake2b_256(raw_report); + + let signed = bit_vector::new(vector::length(&config.oracles)); + + vector::for_each_ref( + &signatures, + |signature| { + let signature: &Signature = signature; // some compiler versions can't infer the type here + + let (valid, index) = vector::index_of( + &config.oracles, &signature.public_key + ); + assert!(valid, error::invalid_argument(E_INVALID_SIGNER)); + + // check for duplicate signers + let duplicate = bit_vector::is_index_set(&signed, index); + assert!(!duplicate, error::invalid_argument(E_DUPLICATE_SIGNER)); + bit_vector::set(&mut signed, index); + + let result = + ed25519::signature_verify_strict( + &signature.sig, &signature.public_key, msg + ); + assert!(result, error::invalid_argument(E_INVALID_SIGNATURE)); + } + ); + + // mark as delivered + smart_table::add( + &mut state.reports, transmission_id, signer::address_of(transmitter) + ); + + event::emit(ReportProcessed { receiver, workflow_execution_id, report_id }); + + (metadata, data) + } + + #[view] + public fun get_transmission_state( + receiver: address, workflow_execution_id: vector, report_id: u16 + ): bool acquires State { + let state = borrow_global(get_state_addr()); + let transmission_id = transmission_id(receiver, workflow_execution_id, report_id); + + return smart_table::contains(&state.reports, transmission_id) + } + + #[view] + public fun get_transmitter( + receiver: address, workflow_execution_id: vector, report_id: u16 + ): Option
acquires State { + let state = borrow_global(get_state_addr()); + let transmission_id = transmission_id(receiver, workflow_execution_id, report_id); + + if (!smart_table::contains(&state.reports, transmission_id)) { + return option::none() + }; + option::some(*smart_table::borrow(&state.reports, transmission_id)) + } + + // Ownership functions + + #[view] + public fun get_owner(): address acquires State { + let state = borrow_global(get_state_addr()); + state.owner_address + } + + #[view] + public fun get_config(don_id: u32, config_version: u32): Config acquires State { + let state = borrow_global(get_state_addr()); + let config_id = ConfigId { don_id, config_version }; + *smart_table::borrow(&state.configs, config_id) + } + + public entry fun transfer_ownership(authority: &signer, to: address) acquires State { + let state = borrow_global_mut(get_state_addr()); + assert_is_owner(state, signer::address_of(authority)); + assert!( + state.owner_address != to, + error::invalid_argument(E_CANNOT_TRANSFER_TO_SELF) + ); + + state.pending_owner_address = to; + + event::emit(OwnershipTransferRequested { from: state.owner_address, to }); + } + + public entry fun accept_ownership(authority: &signer) acquires State { + let state = borrow_global_mut(get_state_addr()); + assert!( + state.pending_owner_address == signer::address_of(authority), + error::permission_denied(E_NOT_PROPOSED_OWNER) + ); + + let old_owner_address = state.owner_address; + state.owner_address = state.pending_owner_address; + state.pending_owner_address = @0x0; + + event::emit( + OwnershipTransferred { from: old_owner_address, to: state.owner_address } + ); + } + + #[test_only] + public fun init_module_for_testing(publisher: &signer) { + init_module(publisher); + } + + #[test_only] + public entry fun set_up_test(owner: &signer, publisher: &signer) { + use aptos_framework::account::{Self}; + account::create_account_for_test(signer::address_of(owner)); + account::create_account_for_test(signer::address_of(publisher)); + + init_module(publisher); + } + + #[test_only] + struct OracleSet has drop { + don_id: u32, + config_version: u32, + f: u8, + oracles: vector>, + signers: vector + } + + #[test_only] + fun generate_oracle_set(): OracleSet { + let don_id = 0; + let f = 1; + + let signers = vector[]; + let oracles = vector[]; + for (i in 0..31) { + let (sk, pk) = ed25519::generate_keys(); + vector::push_back(&mut signers, sk); + vector::push_back(&mut oracles, ed25519::validated_public_key_to_bytes(&pk)); + }; + OracleSet { don_id, config_version: 1, f, oracles, signers } + } + + #[test_only] + fun sign_report( + config: &OracleSet, report: vector, report_context: vector + ): vector { + // blake2b(report_context, report) + let msg = report_context; + vector::append(&mut msg, report); + let msg = blake2b_256(msg); + + let signatures = vector[]; + let required_signatures = config.f + 1; + for (i in 0..required_signatures) { + let config_signer = vector::borrow(&config.signers, (i as u64)); + let public_key = + ed25519::new_unvalidated_public_key_from_bytes( + *vector::borrow(&config.oracles, (i as u64)) + ); + let sig = ed25519::sign_arbitrary_bytes(config_signer, msg); + vector::push_back(&mut signatures, Signature { sig, public_key }); + }; + signatures + } + + #[test(owner = @aave_oracle_racc_address, publisher = @platform)] + public entry fun test_happy_path(owner: &signer, publisher: &signer) acquires State { + set_up_test(owner, publisher); + + let config = generate_oracle_set(); + + // configure DON + set_config( + owner, + config.don_id, + config.config_version, + config.f, + config.oracles + ); + + // generate report + let version = 1; + let timestamp: u32 = 1; + let workflow_id = + x"6d795f6964000000000000000000000000000000000000000000000000000000"; + let workflow_name = x"000000000000DEADBEEF"; + let workflow_owner = x"0000000000000000000000000000000000000051"; + let report_id = x"0001"; + let execution_id = + x"6d795f657865637574696f6e5f69640000000000000000000000000000000000"; + let mercury_reports = vector[x"010203", x"aabbcc"]; + + let report = vector[]; + // header + vector::push_back(&mut report, version); + vector::append(&mut report, execution_id); + + let bytes = bcs::to_bytes(×tamp); + // convert little-endian to big-endian + vector::reverse(&mut bytes); + vector::append(&mut report, bytes); + + let bytes = bcs::to_bytes(&config.don_id); + // convert little-endian to big-endian + vector::reverse(&mut bytes); + vector::append(&mut report, bytes); + + let bytes = bcs::to_bytes(&config.config_version); + // convert little-endian to big-endian + vector::reverse(&mut bytes); + vector::append(&mut report, bytes); + + // metadata + vector::append(&mut report, workflow_id); + vector::append(&mut report, workflow_name); + vector::append(&mut report, workflow_owner); + vector::append(&mut report, report_id); + // report + vector::append(&mut report, bcs::to_bytes(&mercury_reports)); + + let report_context = + x"a0b000000000000000000000000000000000000000000000000000000000000a0b000000000000000000000000000000000000000000000000000000000000a0b000000000000000000000000000000000000000000000000000000000000000"; + assert!(vector::length(&report_context) == 96, 1); + + let raw_report = vector[]; + vector::append(&mut raw_report, report_context); + vector::append(&mut raw_report, report); + + // sign report + let signatures = sign_report(&config, report, report_context); + + // call entrypoint + validate_and_process_report( + owner, + signer::address_of(publisher), + raw_report, + signatures + ); + } + + #[test(owner = @aave_oracle_racc_address, publisher = @platform, new_owner = @0xbeef)] + fun test_transfer_ownership_success( + owner: &signer, publisher: &signer, new_owner: &signer + ) acquires State { + set_up_test(owner, publisher); + + assert!(get_owner() == @aave_oracle_racc_address, 1); + + transfer_ownership(owner, signer::address_of(new_owner)); + accept_ownership(new_owner); + + assert!(get_owner() == signer::address_of(new_owner), 2); + } + + #[test(owner = @aave_oracle_racc_address, publisher = @platform, unknown_user = @0xbeef)] + #[expected_failure(abort_code = 327687, location = platform::forwarder)] + fun test_transfer_ownership_failure_not_owner( + owner: &signer, publisher: &signer, unknown_user: &signer + ) acquires State { + set_up_test(owner, publisher); + + assert!(get_owner() == @aave_oracle_racc_address, 1); + + transfer_ownership(unknown_user, signer::address_of(unknown_user)); + } + + #[test(owner = @aave_oracle_racc_address, publisher = @platform)] + #[expected_failure(abort_code = 65549, location = platform::forwarder)] + fun test_transfer_ownership_failure_transfer_to_self( + owner: &signer, publisher: &signer + ) acquires State { + set_up_test(owner, publisher); + + assert!(get_owner() == @aave_oracle_racc_address, 1); + + transfer_ownership(owner, signer::address_of(owner)); + } + + #[test(owner = @aave_oracle_racc_address, publisher = @platform, new_owner = @0xbeef)] + #[expected_failure(abort_code = 327694, location = platform::forwarder)] + fun test_transfer_ownership_failure_not_proposed_owner( + owner: &signer, publisher: &signer, new_owner: &signer + ) acquires State { + set_up_test(owner, publisher); + + assert!(get_owner() == @aave_oracle_racc_address, 1); + + transfer_ownership(owner, @0xfeeb); + accept_ownership(new_owner); + } +} diff --git a/aave-core/chainlink-platform/sources/storage.move b/aave-core/chainlink-platform/sources/storage.move new file mode 100644 index 0000000..3e32e98 --- /dev/null +++ b/aave-core/chainlink-platform/sources/storage.move @@ -0,0 +1,220 @@ +/// The storage module stores all the state associated with the dispatch service. +module platform::storage { + use std::option; + use std::string; + use std::signer; + use std::vector; + + use aptos_std::table::{Self, Table}; + use aptos_std::type_info::{Self, TypeInfo}; + + use aptos_framework::dispatchable_fungible_asset; + use aptos_framework::function_info::FunctionInfo; + use aptos_framework::fungible_asset::{Self, Metadata}; + use aptos_framework::object::{Self, ExtendRef, TransferRef, Object}; + + const APP_OBJECT_SEED: vector = b"STORAGE"; + + friend platform::forwarder; + + const E_UNKNOWN_RECEIVER: u64 = 1; + const E_INVALID_METADATA_LENGTH: u64 = 2; + + struct Entry has key, store, drop { + metadata: Object, + extend_ref: ExtendRef + } + + struct Dispatcher has key { + /// Tracks the input type to the dispatch handler. + dispatcher: Table, + address_to_typeinfo: Table, + /// Used to store temporary data for dispatching. + extend_ref: ExtendRef, + transfer_ref: TransferRef + } + + /// Store the data to dispatch here. + struct Storage has drop, key { + metadata: vector, + data: vector + } + + struct ReportMetadata has key, store, drop { + workflow_cid: vector, + workflow_name: vector, + workflow_owner: vector, + report_id: vector + } + + /// Registers an account and callback for future dispatching, and a proof type `T` + /// for the callback function to retrieve arguments. Note that the function will + /// abort if the account has already been registered. + /// + /// The address of `account` is used to represent the callback by the dispatcher. + /// See the `dispatch` function in `forwarder.move`. + /// + /// Providing an instance of `T` guarantees that only a privileged module can call `register` for that type. + /// The type `T` should ideally only have the `drop` ability and no other abilities to prevent + /// copying and persisting in global storage. + public fun register( + account: &signer, callback: FunctionInfo, _proof: T + ) acquires Dispatcher { + let typename = type_info::type_name(); + let constructor_ref = + object::create_named_object(&storage_signer(), *string::bytes(&typename)); + let extend_ref = object::generate_extend_ref(&constructor_ref); + let metadata = + fungible_asset::add_fungibility( + &constructor_ref, + option::none(), + // this was `typename` but it fails due to ENAME_TOO_LONG + string::utf8(b"storage"), + string::utf8(b"dis"), + 0, + string::utf8(b""), + string::utf8(b"") + ); + dispatchable_fungible_asset::register_derive_supply_dispatch_function( + &constructor_ref, option::some(callback) + ); + + let dispatcher = borrow_global_mut(storage_address()); + table::add( + &mut dispatcher.dispatcher, + type_info::type_of(), + Entry { metadata, extend_ref } + ); + table::add( + &mut dispatcher.address_to_typeinfo, + signer::address_of(account), + type_info::type_of() + ); + } + + /// Insert into this module as the callback needs to retrieve and avoid a cyclical dependency: + /// engine -> storage and then engine -> callback -> storage + public(friend) fun insert( + receiver: address, callback_metadata: vector, callback_data: vector + ): Object acquires Dispatcher { + let dispatcher = borrow_global(storage_address()); + let typeinfo = *table::borrow(&dispatcher.address_to_typeinfo, receiver); + assert!(table::contains(&dispatcher.dispatcher, typeinfo), E_UNKNOWN_RECEIVER); + let Entry { metadata: asset_metadata, extend_ref } = + table::borrow(&dispatcher.dispatcher, typeinfo); + let obj_signer = object::generate_signer_for_extending(extend_ref); + move_to(&obj_signer, Storage { data: callback_data, metadata: callback_metadata }); + *asset_metadata + } + + public(friend) fun storage_exists(obj_address: address): bool { + object::object_exists(obj_address) + } + + /// Second half of the process for retrieving. This happens outside engine to prevent the + /// cyclical dependency. + public fun retrieve(_proof: T): (vector, vector) acquires Dispatcher, Storage { + let dispatcher = borrow_global(storage_address()); + let typeinfo = type_info::type_of(); + let Entry { metadata: _, extend_ref } = + table::borrow(&dispatcher.dispatcher, typeinfo); + let obj_address = object::address_from_extend_ref(extend_ref); + let data = move_from(obj_address); + (data.metadata, data.data) + } + + #[view] + public fun parse_report_metadata(metadata: vector): ReportMetadata { + // workflow_cid // offset 0, size 32 + // workflow_name // offset 32, size 10 + // workflow_owner // offset 42, size 20 + // report_id // offset 62, size 2 + assert!(vector::length(&metadata) == 64, E_INVALID_METADATA_LENGTH); + + let workflow_cid = vector::slice(&metadata, 0, 32); + let workflow_name = vector::slice(&metadata, 32, 42); + let workflow_owner = vector::slice(&metadata, 42, 62); + let report_id = vector::slice(&metadata, 62, 64); + + ReportMetadata { workflow_cid, workflow_name, workflow_owner, report_id } + } + + /// Prepares the dispatch table. + fun init_module(publisher: &signer) { + assert!(signer::address_of(publisher) == @platform, 1); + + let constructor_ref = object::create_named_object(publisher, APP_OBJECT_SEED); + + let extend_ref = object::generate_extend_ref(&constructor_ref); + let transfer_ref = object::generate_transfer_ref(&constructor_ref); + let object_signer = object::generate_signer(&constructor_ref); + + move_to( + &object_signer, + Dispatcher { + dispatcher: table::new(), + address_to_typeinfo: table::new(), + extend_ref, + transfer_ref + } + ); + } + + inline fun storage_address(): address acquires Dispatcher { + object::create_object_address(&@platform, APP_OBJECT_SEED) + } + + inline fun storage_signer(): signer acquires Dispatcher { + object::generate_signer_for_extending( + &borrow_global(storage_address()).extend_ref + ) + } + + // Struct accessors + + public fun get_report_metadata_workflow_cid( + report_metadata: &ReportMetadata + ): vector { + report_metadata.workflow_cid + } + + public fun get_report_metadata_workflow_name( + report_metadata: &ReportMetadata + ): vector { + report_metadata.workflow_name + } + + public fun get_report_metadata_workflow_owner( + report_metadata: &ReportMetadata + ): vector { + report_metadata.workflow_owner + } + + public fun get_report_metadata_report_id( + report_metadata: &ReportMetadata + ): vector { + report_metadata.report_id + } + + #[test_only] + public fun init_module_for_testing(publisher: &signer) { + init_module(publisher); + } + + #[test] + fun test_parse_report_metadata() { + let metadata = + x"6d795f6964000000000000000000000000000000000000000000000000000000000000000000deadbeef00000000000000000000000000000000000000510001"; + let expected_workflow_cid = + x"6d795f6964000000000000000000000000000000000000000000000000000000"; + let expected_workflow_name = x"000000000000DEADBEEF"; + let expected_workflow_owner = x"0000000000000000000000000000000000000051"; + let expected_report_id = x"0001"; + + let parsed_metadata = parse_report_metadata(metadata); + assert!(parsed_metadata.workflow_cid == expected_workflow_cid, 1); + assert!(parsed_metadata.workflow_name == expected_workflow_name, 1); + assert!(parsed_metadata.workflow_owner == expected_workflow_owner, 1); + assert!(parsed_metadata.report_id == expected_report_id, 1); + } +} diff --git a/aave-core/doc/a_token_factory.md b/aave-core/doc/a_token_factory.md deleted file mode 100644 index e5e457e..0000000 --- a/aave-core/doc/a_token_factory.md +++ /dev/null @@ -1,437 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::a_token_factory` - - - -- [Struct `Initialized`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_Initialized) -- [Struct `BalanceTransfer`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_BalanceTransfer) -- [Constants](#@Constants_0) -- [Function `create_token`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_create_token) -- [Function `rescue_tokens`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_rescue_tokens) -- [Function `mint`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_mint) -- [Function `burn`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_burn) -- [Function `mint_to_treasury`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_mint_to_treasury) -- [Function `transfer_underlying_to`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_transfer_underlying_to) -- [Function `transfer_on_liquidation`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_transfer_on_liquidation) -- [Function `handle_repayment`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_handle_repayment) -- [Function `get_revision`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_get_revision) -- [Function `get_token_account_address`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_get_token_account_address) -- [Function `get_metadata_by_symbol`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_get_metadata_by_symbol) -- [Function `token_address`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_token_address) -- [Function `asset_metadata`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_asset_metadata) -- [Function `get_reserve_treasury_address`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_get_reserve_treasury_address) -- [Function `get_underlying_asset_address`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_get_underlying_asset_address) -- [Function `get_previous_index`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_get_previous_index) -- [Function `get_scaled_user_balance_and_supply`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_get_scaled_user_balance_and_supply) -- [Function `scaled_balance_of`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_scaled_balance_of) -- [Function `scaled_total_supply`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_scaled_total_supply) -- [Function `name`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_name) -- [Function `symbol`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_symbol) -- [Function `decimals`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_a_token_factory_decimals) - - -
use 0x1::account;
-use 0x1::aptos_account;
-use 0x1::event;
-use 0x1::fungible_asset;
-use 0x1::object;
-use 0x1::resource_account;
-use 0x1::signer;
-use 0x1::string;
-use 0x9efefdec8fe22b7447931b81745048182594ef72653dfbf8e05b815ecc355f7c::wad_ray_math;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::mock_underlying_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::token_base;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::error;
-
- - - - - -## Struct `Initialized` - -@dev Emitted when an aToken is initialized -@param underlyingAsset The address of the underlying asset -@param treasury The address of the treasury -@param a_token_decimals The decimals of the underlying -@param a_token_name The name of the aToken -@param a_token_symbol The symbol of the aToken - - -
#[event]
-struct Initialized has drop, store
-
- - - - - -## Struct `BalanceTransfer` - -@dev Emitted during the transfer action -@param from The user whose tokens are being transferred -@param to The recipient -@param value The scaled amount being transferred -@param index The next liquidity index of the reserve - - -
#[event]
-struct BalanceTransfer has drop, store
-
- - - - - -## Constants - - - - - - -
const ATOKEN_REVISION: u256 = 1;
-
- - - - - - - -
const E_NOT_A_TOKEN_ADMIN: u64 = 1;
-
- - - - - -## Function `create_token` - -@notice Creates a new aToken -@param signer The signer of the transaction -@param name The name of the aToken -@param symbol The symbol of the aToken -@param decimals The decimals of the aToken -@param icon_uri The icon URI of the aToken -@param project_uri The project URI of the aToken -@param underlying_asset The address of the underlying asset -@param treasury The address of the treasury - - -
public(friend) fun create_token(signer: &signer, name: string::String, symbol: string::String, decimals: u8, icon_uri: string::String, project_uri: string::String, underlying_asset: address, treasury: address)
-
- - - - - -## Function `rescue_tokens` - -@notice Rescue and transfer tokens locked in this contract -@param token The address of the token -@param to The address of the recipient -@param amount The amount of token to transfer - - -
public entry fun rescue_tokens(account: &signer, token: address, to: address, amount: u256)
-
- - - - - -## Function `mint` - -@notice Mints amount aTokens to user -@param caller The address performing the mint -@param on_behalf_of The address of the user that will receive the minted aTokens -@param amount The amount of tokens getting minted -@param index The next liquidity index of the reserve -@param metadata_address The address of the aToken - - -
public(friend) fun mint(caller: address, on_behalf_of: address, amount: u256, index: u256, metadata_address: address)
-
- - - - - -## Function `burn` - -@notice Burns aTokens from user and sends the equivalent amount of underlying to receiverOfUnderlying -@dev In some instances, the mint event could be emitted from a burn transaction -if the amount to burn is less than the interest that the user accrued -@param from The address from which the aTokens will be burned -@param receiver_of_underlying The address that will receive the underlying -@param amount The amount being burned -@param index The next liquidity index of the reserve -@param metadata_address The address of the aToken - - -
public(friend) fun burn(from: address, receiver_of_underlying: address, amount: u256, index: u256, metadata_address: address)
-
- - - - - -## Function `mint_to_treasury` - -@notice Mints aTokens to the reserve treasury -@param amount The amount of tokens getting minted -@param index The next liquidity index of the reserve -@param metadata_address The address of the aToken - - -
public(friend) fun mint_to_treasury(amount: u256, index: u256, metadata_address: address)
-
- - - - - -## Function `transfer_underlying_to` - -@notice Transfers the underlying asset to target. -@dev Used by the Pool to transfer assets in borrow(), withdraw() and flashLoan() -@param to The recipient of the underlying -@param amount The amount getting transferred -@param metadata_address The address of the aToken - - -
public(friend) fun transfer_underlying_to(to: address, amount: u256, metadata_address: address)
-
- - - - - -## Function `transfer_on_liquidation` - -@notice Transfers aTokens in the event of a borrow being liquidated, in case the liquidators reclaims the aToken -@param from The address getting liquidated, current owner of the aTokens -@param to The recipient -@param amount The amount of tokens getting transferred -@param index The next liquidity index of the reserve -@param metadata_address The address of the aToken - - -
public(friend) fun transfer_on_liquidation(from: address, to: address, amount: u256, index: u256, metadata_address: address)
-
- - - - - -## Function `handle_repayment` - -@notice Handles the underlying received by the aToken after the transfer has been completed. -@dev The default implementation is empty as with standard ERC20 tokens, nothing needs to be done after the -transfer is concluded. However in the future there may be aTokens that allow for example to stake the underlying -to receive LM rewards. In that case, handleRepayment() would perform the staking of the underlying asset. -@param user The user executing the repayment -@param on_behalf_of The address of the user who will get his debt reduced/removed -@param amount The amount getting repaid -@param metadata_address The address of the aToken - - -
public fun handle_repayment(_user: address, _onBehalfOf: address, _amount: u256, _metadata_address: address)
-
- - - - - -## Function `get_revision` - - - -
#[view]
-public fun get_revision(): u256
-
- - - - - -## Function `get_token_account_address` - -@notice Return the address of the managed fungible asset that's created resource account. -@param metadata_address The address of the aToken - - -
#[view]
-public fun get_token_account_address(metadata_address: address): address
-
- - - - - -## Function `get_metadata_by_symbol` - - - -
#[view]
-public fun get_metadata_by_symbol(owner: address, symbol: string::String): object::Object<fungible_asset::Metadata>
-
- - - - - -## Function `token_address` - - - -
#[view]
-public fun token_address(owner: address, symbol: string::String): address
-
- - - - - -## Function `asset_metadata` - - - -
#[view]
-public fun asset_metadata(owner: address, symbol: string::String): object::Object<fungible_asset::Metadata>
-
- - - - - -## Function `get_reserve_treasury_address` - -@notice Returns the address of the Aave treasury, receiving the fees on this aToken. -@param metadata_address The address of the aToken -@return Address of the Aave treasury - - -
#[view]
-public fun get_reserve_treasury_address(metadata_address: address): address
-
- - - - - -## Function `get_underlying_asset_address` - -@notice Returns the address of the underlying asset of this aToken (E.g. WETH for aWETH) -@param metadata_address The address of the aToken -@return The address of the underlying asset - - -
#[view]
-public fun get_underlying_asset_address(metadata_address: address): address
-
- - - - - -## Function `get_previous_index` - -@notice Returns last index interest was accrued to the user's balance -@param user The address of the user -@param metadata_address The address of the aToken -@return The last index interest was accrued to the user's balance, expressed in ray - - -
#[view]
-public fun get_previous_index(user: address, metadata_address: address): u256
-
- - - - - -## Function `get_scaled_user_balance_and_supply` - -@notice Returns the scaled balance of the user and the scaled total supply. -@param owner The address of the user -@param metadata_address The address of the aToken -@return The scaled balance of the user -@return The scaled total supply - - -
#[view]
-public fun get_scaled_user_balance_and_supply(owner: address, metadata_address: address): (u256, u256)
-
- - - - - -## Function `scaled_balance_of` - -@notice Returns the scaled balance of the user. -@dev The scaled balance is the sum of all the updated stored balance divided by the reserve's liquidity index -at the moment of the update -@param owner The user whose balance is calculated -@param metadata_address The address of the aToken -@return The scaled balance of the user - - -
#[view]
-public fun scaled_balance_of(owner: address, metadata_address: address): u256
-
- - - - - -## Function `scaled_total_supply` - -@notice Returns the scaled total supply of the scaled balance token. Represents sum(debt/index) -@param metadata_address The address of the aToken -@return The scaled total supply - - -
#[view]
-public fun scaled_total_supply(metadata_address: address): u256
-
- - - - - -## Function `name` - - - -
#[view]
-public fun name(metadata_address: address): string::String
-
- - - - - -## Function `symbol` - - - -
#[view]
-public fun symbol(metadata_address: address): string::String
-
- - - - - -## Function `decimals` - - - -
#[view]
-public fun decimals(metadata_address: address): u8
-
diff --git a/aave-core/doc/admin_controlled_ecosystem_reserve.md b/aave-core/doc/admin_controlled_ecosystem_reserve.md deleted file mode 100644 index 97353bc..0000000 --- a/aave-core/doc/admin_controlled_ecosystem_reserve.md +++ /dev/null @@ -1,188 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::admin_controlled_ecosystem_reserve` - - - -- [Struct `NewFundsAdmin`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_admin_controlled_ecosystem_reserve_NewFundsAdmin) -- [Resource `AdminControlledEcosystemReserveData`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_admin_controlled_ecosystem_reserve_AdminControlledEcosystemReserveData) -- [Constants](#@Constants_0) -- [Function `initialize`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_admin_controlled_ecosystem_reserve_initialize) -- [Function `check_is_funds_admin`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_admin_controlled_ecosystem_reserve_check_is_funds_admin) -- [Function `get_revision`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_admin_controlled_ecosystem_reserve_get_revision) -- [Function `get_funds_admin`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_admin_controlled_ecosystem_reserve_get_funds_admin) -- [Function `admin_controlled_ecosystem_reserve_address`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_admin_controlled_ecosystem_reserve_admin_controlled_ecosystem_reserve_address) -- [Function `admin_controlled_ecosystem_reserve_object`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_admin_controlled_ecosystem_reserve_admin_controlled_ecosystem_reserve_object) -- [Function `transfer_out`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_admin_controlled_ecosystem_reserve_transfer_out) - - -
use 0x1::event;
-use 0x1::fungible_asset;
-use 0x1::object;
-use 0x1::primary_fungible_store;
-use 0x1::signer;
-use 0x1::smart_table;
-use 0xd329b8b371bf56fdbfbb66f441a8463f3605ecb27ee0c484f85a4cf88883d2f9::acl_manage;
-
- - - - - -## Struct `NewFundsAdmin` - - - -
#[event]
-struct NewFundsAdmin has drop, store
-
- - - - - -## Resource `AdminControlledEcosystemReserveData` - - - -
struct AdminControlledEcosystemReserveData has key
-
- - - - - -## Constants - - - - - - -
const ADMIN_CONTROLLED_ECOSYSTEM_RESERVE: vector<u8> = [65, 68, 77, 73, 78, 95, 67, 79, 78, 84, 82, 79, 76, 76, 69, 68, 95, 69, 67, 79, 83, 89, 83, 84, 69, 77, 95, 82, 69, 83, 69, 82, 86, 69];
-
- - - - - - - -
const NOT_FUNDS_ADMIN: u64 = 1;
-
- - - - - - - -
const ONLY_BY_FUNDS_ADMIN: u64 = 3;
-
- - - - - - - -
const REVISION: u256 = 2;
-
- - - - - - - -
const TEST_FAILED: u64 = 2;
-
- - - - - - - -
const TEST_SUCCESS: u64 = 1;
-
- - - - - -## Function `initialize` - - - -
public fun initialize(sender: &signer)
-
- - - - - -## Function `check_is_funds_admin` - - - -
public fun check_is_funds_admin(account: address)
-
- - - - - -## Function `get_revision` - - - -
public fun get_revision(): u256
-
- - - - - -## Function `get_funds_admin` - - - -
public fun get_funds_admin(): address
-
- - - - - -## Function `admin_controlled_ecosystem_reserve_address` - - - -
#[view]
-public fun admin_controlled_ecosystem_reserve_address(): address
-
- - - - - -## Function `admin_controlled_ecosystem_reserve_object` - - - -
#[view]
-public fun admin_controlled_ecosystem_reserve_object(): object::Object<admin_controlled_ecosystem_reserve::AdminControlledEcosystemReserveData>
-
- - - - - -## Function `transfer_out` - - - -
public fun transfer_out(sender: &signer, asset_metadata: object::Object<fungible_asset::Metadata>, receiver: address, amount: u64)
-
diff --git a/aave-core/doc/borrow_logic.md b/aave-core/doc/borrow_logic.md deleted file mode 100644 index 3cf0183..0000000 --- a/aave-core/doc/borrow_logic.md +++ /dev/null @@ -1,176 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::borrow_logic` - -@title borrow_logic module -@author Aave -@notice Implements the base logic for all the actions related to borrowing - - -- [Struct `Borrow`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_borrow_logic_Borrow) -- [Struct `Repay`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_borrow_logic_Repay) -- [Struct `IsolationModeTotalDebtUpdated`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_borrow_logic_IsolationModeTotalDebtUpdated) -- [Function `borrow`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_borrow_logic_borrow) -- [Function `internal_borrow`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_borrow_logic_internal_borrow) -- [Function `repay`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_borrow_logic_repay) -- [Function `repay_with_a_tokens`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_borrow_logic_repay_with_a_tokens) - - -
use 0x1::event;
-use 0x1::signer;
-use 0x9efefdec8fe22b7447931b81745048182594ef72653dfbf8e05b815ecc355f7c::math_utils;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::a_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::emode_logic;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::isolation_mode_logic;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::mock_underlying_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::validation_logic;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::variable_debt_token_factory;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::error;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::reserve;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::user;
-
- - - - - -## Struct `Borrow` - -@dev Emitted on borrow() and flashLoan() when debt needs to be opened -@param reserve The address of the underlying asset being borrowed -@param user The address of the user initiating the borrow(), receiving the funds on borrow() or just -initiator of the transaction on flashLoan() -@param on_behalf_of The address that will be getting the debt -@param amount The amount borrowed out -@param interest_rate_mode The rate mode: 2 for Variable -@param borrow_rate The numeric rate at which the user has borrowed, expressed in ray -@param referral_code The referral code used - - -
#[event]
-struct Borrow has copy, drop, store
-
- - - - - -## Struct `Repay` - -@dev Emitted on repay() -@param reserve The address of the underlying asset of the reserve -@param user The beneficiary of the repayment, getting his debt reduced -@param repayer The address of the user initiating the repay(), providing the funds -@param amount The amount repaid -@param use_a_tokens True if the repayment is done using aTokens, false if done with underlying asset directly - - -
#[event]
-struct Repay has drop, store
-
- - - - - -## Struct `IsolationModeTotalDebtUpdated` - -@dev Emitted on borrow(), repay() and liquidationCall() when using isolated assets -@param asset The address of the underlying asset of the reserve -@param totalDebt The total isolation mode debt for the reserve - - -
#[event]
-struct IsolationModeTotalDebtUpdated has drop, store
-
- - - - - -## Function `borrow` - -@notice Allows users to borrow a specific amount of the reserve underlying asset, provided that the borrower -already supplied enough collateral, or he was given enough allowance by a credit delegator on the -corresponding debt token VariableDebtToken -- E.g. User borrows 100 USDC passing as on_behalf_of his own address, receiving the 100 USDC in his wallet -and 100 stable/variable debt tokens, depending on the interest_rate_mode -@param asset The address of the underlying asset to borrow -@param amount The amount to be borrowed -@param interest_rate_mode The interest rate mode at which the user wants to borrow: 2 for Variable -@param referral_code The code used to register the integrator originating the operation, for potential rewards. -0 if the action is executed directly by the user, without any middle-man -@param on_behalf_of The address of the user who will receive the debt. Should be the address of the borrower itself -calling the function if he wants to borrow against his own collateral, or the address of the credit delegator -if he has been given credit delegation allowance - - -
public entry fun borrow(account: &signer, asset: address, amount: u256, interest_rate_mode: u8, referral_code: u16, on_behalf_of: address)
-
- - - - - -## Function `internal_borrow` - -@notice Implements the borrow feature. Borrowing allows users that provided collateral to draw liquidity from the -Aave protocol proportionally to their collateralization power. For isolated positions, it also increases the -isolated debt. -@dev Emits the Borrow() event -@param account The signer account -@param asset The address of the underlying asset to borrow -@param amount The amount to be borrowed -@param interest_rate_mode The interest rate mode at which the user wants to borrow: 2 for Variable -@param referral_code The code used to register the integrator originating the operation, for potential rewards. -0 if the action is executed directly by the user, without any middle -@param on_behalf_of The address of the user who will receive the debt. Should be the address of the borrower itself -calling the function if he wants to borrow against his own collateral, or the address of the credit delegator -if he has been given credit delegation allowance -@param release_underlying If true, the underlying asset will be transferred to the user, otherwise it will stay - - -
public(friend) fun internal_borrow(account: &signer, asset: address, amount: u256, interest_rate_mode: u8, referral_code: u16, on_behalf_of: address, release_underlying: bool)
-
- - - - - -## Function `repay` - -@notice Repays a borrowed amount on a specific reserve, burning the equivalent debt tokens owned -- E.g. User repays 100 USDC, burning 100 variable debt tokens of the on_behalf_of address -@param asset The address of the borrowed underlying asset previously borrowed -@param amount The amount to repay -- Send the value math_utils::u256_max() in order to repay the whole debt for asset on the specific debtMode -@param interest_rate_mode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable -@param on_behalf_of The address of the user who will get his debt reduced/removed. Should be the address of the -user calling the function if he wants to reduce/remove his own debt, or the address of any other -other borrower whose debt should be removed - - -
public entry fun repay(account: &signer, asset: address, amount: u256, interest_rate_mode: u8, on_behalf_of: address)
-
- - - - - -## Function `repay_with_a_tokens` - -@notice Repays a borrowed amount on a specific reserve using the reserve aTokens, burning the -equivalent debt tokens -- E.g. User repays 100 USDC using 100 aUSDC, burning 100 variable debt tokens -@dev Passing math_utils::u256_max() as amount will clean up any residual aToken dust balance, if the user aToken -balance is not enough to cover the whole debt -@param account The signer account -@param asset The address of the borrowed underlying asset previously borrowed -@param amount The amount to repay -@param interest_rate_mode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable - - -
public entry fun repay_with_a_tokens(account: &signer, asset: address, amount: u256, interest_rate_mode: u8)
-
diff --git a/aave-core/doc/bridge_logic.md b/aave-core/doc/bridge_logic.md deleted file mode 100644 index faa6545..0000000 --- a/aave-core/doc/bridge_logic.md +++ /dev/null @@ -1,116 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::bridge_logic` - - - -- [Struct `ReserveUsedAsCollateralEnabled`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_bridge_logic_ReserveUsedAsCollateralEnabled) -- [Struct `MintUnbacked`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_bridge_logic_MintUnbacked) -- [Struct `BackUnbacked`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_bridge_logic_BackUnbacked) -- [Function `mint_unbacked`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_bridge_logic_mint_unbacked) -- [Function `back_unbacked`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_bridge_logic_back_unbacked) - - -
use 0x1::event;
-use 0x1::signer;
-use 0x9efefdec8fe22b7447931b81745048182594ef72653dfbf8e05b815ecc355f7c::math_utils;
-use 0x9efefdec8fe22b7447931b81745048182594ef72653dfbf8e05b815ecc355f7c::wad_ray_math;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::a_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::mock_underlying_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool_validation;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::validation_logic;
-use 0xd329b8b371bf56fdbfbb66f441a8463f3605ecb27ee0c484f85a4cf88883d2f9::acl_manage;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::error;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::reserve;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::user;
-
- - - - - -## Struct `ReserveUsedAsCollateralEnabled` - -@dev Emitted on setUserUseReserveAsCollateral() -@param reserve The address of the underlying asset of the reserve -@param user The address of the user enabling the usage as collateral - - -
#[event]
-struct ReserveUsedAsCollateralEnabled has drop, store
-
- - - - - -## Struct `MintUnbacked` - -@dev Emitted on mint_unbacked() -@param reserve The address of the underlying asset of the reserve -@param user The address initiating the supply -@param on_behalf_of The beneficiary of the supplied assets, receiving the aTokens -@param amount The amount of supplied assets -@param referral_code The referral code used - - -
#[event]
-struct MintUnbacked has drop, store
-
- - - - - -## Struct `BackUnbacked` - -@dev Emitted on back_unbacked() -@param reserve The address of the underlying asset of the reserve -@param backer The address paying for the backing -@param amount The amount added as backing -@param fee The amount paid in fees - - -
#[event]
-struct BackUnbacked has drop, store
-
- - - - - -## Function `mint_unbacked` - -@notice Mint unbacked aTokens to a user and updates the unbacked for the reserve. -@dev Essentially a supply without transferring the underlying. -@dev Emits the MintUnbacked event -@dev Emits the ReserveUsedAsCollateralEnabled if asset is set as collateral -@param asset The address of the underlying asset to mint aTokens of -@param amount The amount to mint -@param on_behalf_of The address that will receive the aTokens -@param referral_code Code used to register the integrator originating the operation, for potential rewards. -0 if the action is executed directly by the user, without any middle-man - - -
public entry fun mint_unbacked(account: &signer, asset: address, amount: u256, on_behalf_of: address, referral_code: u16)
-
- - - - - -## Function `back_unbacked` - -@notice Back the current unbacked with amount and pay fee. -@dev It is not possible to back more than the existing unbacked amount of the reserve -@dev Emits the BackUnbacked event -@param asset The address of the underlying asset to repay -@param amount The amount to back -@param fee The amount paid in fees -@return The backed amount - - -
public entry fun back_unbacked(account: &signer, asset: address, amount: u256, fee: u256)
-
diff --git a/aave-core/doc/coin_wrapper.md b/aave-core/doc/coin_wrapper.md deleted file mode 100644 index d306c0a..0000000 --- a/aave-core/doc/coin_wrapper.md +++ /dev/null @@ -1,236 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::coin_wrapper` - - - -- [Struct `FungibleAssetData`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_coin_wrapper_FungibleAssetData) -- [Resource `WrapperAccount`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_coin_wrapper_WrapperAccount) -- [Constants](#@Constants_0) -- [Function `initialize`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_coin_wrapper_initialize) -- [Function `is_initialized`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_coin_wrapper_is_initialized) -- [Function `wrapper_address`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_coin_wrapper_wrapper_address) -- [Function `is_supported`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_coin_wrapper_is_supported) -- [Function `is_wrapper`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_coin_wrapper_is_wrapper) -- [Function `get_coin_type`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_coin_wrapper_get_coin_type) -- [Function `get_wrapper`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_coin_wrapper_get_wrapper) -- [Function `get_original`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_coin_wrapper_get_original) -- [Function `format_fungible_asset`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_coin_wrapper_format_fungible_asset) -- [Function `wrap`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_coin_wrapper_wrap) -- [Function `unwrap`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_coin_wrapper_unwrap) -- [Function `create_fungible_asset`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_coin_wrapper_create_fungible_asset) - - -
use 0x1::account;
-use 0x1::aptos_account;
-use 0x1::coin;
-use 0x1::fungible_asset;
-use 0x1::object;
-use 0x1::option;
-use 0x1::primary_fungible_store;
-use 0x1::signer;
-use 0x1::smart_table;
-use 0x1::string;
-use 0x1::string_utils;
-use 0x1::type_info;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::package_manager;
-
- - - - - -## Struct `FungibleAssetData` - -Stores the refs for a specific fungible asset wrapper for wrapping and unwrapping. - - -
struct FungibleAssetData has store
-
- - - - - -## Resource `WrapperAccount` - -The resource stored in the main resource account to track all the fungible asset wrappers. -This main resource account will also be the one holding all the deposited coins, each of which in a separate -CoinStore resource. See coin_wrapper.move in the Aptos Framework for more details. - - -
struct WrapperAccount has key
-
- - - - - -## Constants - - - - - - -
const COIN_WRAPPER_NAME: vector<u8> = [67, 79, 73, 78, 95, 87, 82, 65, 80, 80, 69, 82];
-
- - - - - -## Function `initialize` - -Create the coin wrapper account to host all the deposited coins. - - -
public entry fun initialize()
-
- - - - - -## Function `is_initialized` - - - -
#[view]
-public fun is_initialized(): bool
-
- - - - - -## Function `wrapper_address` - -Return the address of the resource account that stores all deposited coins. - - -
#[view]
-public fun wrapper_address(): address
-
- - - - - -## Function `is_supported` - -Return whether a specific CoinType has a wrapper fungible asset. This is only the case if at least one wrap() -call has been made for that CoinType. - - -
#[view]
-public fun is_supported<CoinType>(): bool
-
- - - - - -## Function `is_wrapper` - -Return true if the given fungible asset is a wrapper fungible asset. - - -
#[view]
-public fun is_wrapper(metadata: object::Object<fungible_asset::Metadata>): bool
-
- - - - - -## Function `get_coin_type` - -Return the original CoinType for a specific wrapper fungible asset. This errors out if there's no such wrapper. - - -
#[view]
-public fun get_coin_type(metadata: object::Object<fungible_asset::Metadata>): string::String
-
- - - - - -## Function `get_wrapper` - -Return the wrapper fungible asset for a specific CoinType. This errors out if there's no such wrapper. - - -
#[view]
-public fun get_wrapper<CoinType>(): object::Object<fungible_asset::Metadata>
-
- - - - - -## Function `get_original` - -Return the original CoinType if the given fungible asset is a wrapper fungible asset. Otherwise, return the -given fungible asset itself, which means it's a native fungible asset (not wrapped). -The return value is a String such as "0x1::aptos_coin::AptosCoin" for an original coin or "0x12345" for a native -fungible asset. - - -
#[view]
-public fun get_original(fungible_asset: object::Object<fungible_asset::Metadata>): string::String
-
- - - - - -## Function `format_fungible_asset` - -Return the address string of a fungible asset (e.g. "0x1234"). - - -
#[view]
-public fun format_fungible_asset(fungible_asset: object::Object<fungible_asset::Metadata>): string::String
-
- - - - - -## Function `wrap` - -Wrap the given coins into fungible asset. This will also create the fungible asset wrapper if it doesn't exist -yet. The coins will be deposited into the main resource account. - - -
public(friend) fun wrap<CoinType>(coins: coin::Coin<CoinType>): fungible_asset::FungibleAsset
-
- - - - - -## Function `unwrap` - -Unwrap the given fungible asset into coins. This will burn the fungible asset and withdraw&return the coins from -the main resource account. -This errors out if the given fungible asset is not a wrapper fungible asset. - - -
public(friend) fun unwrap<CoinType>(fa: fungible_asset::FungibleAsset): coin::Coin<CoinType>
-
- - - - - -## Function `create_fungible_asset` - -Create the fungible asset wrapper for the given CoinType if it doesn't exist yet. - - -
public(friend) fun create_fungible_asset<CoinType>(): object::Object<fungible_asset::Metadata>
-
diff --git a/aave-core/doc/collector.md b/aave-core/doc/collector.md deleted file mode 100644 index 0d68ec8..0000000 --- a/aave-core/doc/collector.md +++ /dev/null @@ -1,164 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::collector` - - - -- [Resource `CollectorData`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_collector_CollectorData) -- [Constants](#@Constants_0) -- [Function `check_is_funds_admin`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_collector_check_is_funds_admin) -- [Function `get_revision`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_collector_get_revision) -- [Function `collector_address`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_collector_collector_address) -- [Function `collector_object`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_collector_collector_object) -- [Function `deposit`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_collector_deposit) -- [Function `withdraw`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_collector_withdraw) -- [Function `get_collected_fees`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_collector_get_collected_fees) - - -
use 0x1::fungible_asset;
-use 0x1::object;
-use 0x1::primary_fungible_store;
-use 0x1::signer;
-use 0x1::smart_table;
-use 0xd329b8b371bf56fdbfbb66f441a8463f3605ecb27ee0c484f85a4cf88883d2f9::acl_manage;
-
- - - - - -## Resource `CollectorData` - - - -
#[resource_group_member(#[group = 0x1::object::ObjectGroup])]
-struct CollectorData has key
-
- - - - - -## Constants - - - - - - -
const NOT_FUNDS_ADMIN: u64 = 1;
-
- - - - - -Contract revision - - -
const REVISION: u64 = 1;
-
- - - - - -Collector name - - -
const COLLECTOR_NAME: vector<u8> = [65, 65, 86, 69, 95, 67, 79, 76, 76, 69, 67, 84, 79, 82];
-
- - - - - -Only fungible asset metadata owner can make changes. - - -
const ERR_NOT_OWNER: u64 = 1;
-
- - - - - -## Function `check_is_funds_admin` - - - -
#[view]
-public fun check_is_funds_admin(account: address): bool
-
- - - - - -## Function `get_revision` - -Return the revision of the aave token implementation - - -
#[view]
-public fun get_revision(): u64
-
- - - - - -## Function `collector_address` - - - -
#[view]
-public fun collector_address(): address
-
- - - - - -## Function `collector_object` - - - -
#[view]
-public fun collector_object(): object::Object<collector::CollectorData>
-
- - - - - -## Function `deposit` - - - -
public fun deposit(sender: &signer, fa: fungible_asset::FungibleAsset)
-
- - - - - -## Function `withdraw` - - - -
public fun withdraw(sender: &signer, asset_metadata: object::Object<fungible_asset::Metadata>, receiver: address, amount: u64)
-
- - - - - -## Function `get_collected_fees` - - - -
#[view]
-public fun get_collected_fees(asset_metadata: object::Object<fungible_asset::Metadata>): u64
-
diff --git a/aave-core/doc/default_reserve_interest_rate_strategy.md b/aave-core/doc/default_reserve_interest_rate_strategy.md deleted file mode 100644 index 5e0a89f..0000000 --- a/aave-core/doc/default_reserve_interest_rate_strategy.md +++ /dev/null @@ -1,230 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::default_reserve_interest_rate_strategy` - -@title default_reserve_interest_rate_strategy module -@author Aave -@notice Implements the calculation of the interest rates depending on the reserve state -@dev The model of interest rate is based on 2 slopes, one before the OPTIMAL_USAGE_RATIO -point of usage and another from that one to 100%. - - -- [Struct `ReserveInterestRateStrategy`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_default_reserve_interest_rate_strategy_ReserveInterestRateStrategy) -- [Resource `DefaultReserveInterestRateStrategy`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_default_reserve_interest_rate_strategy_DefaultReserveInterestRateStrategy) -- [Resource `ReserveInterestRateStrategyMap`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_default_reserve_interest_rate_strategy_ReserveInterestRateStrategyMap) -- [Struct `CalcInterestRatesLocalVars`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_default_reserve_interest_rate_strategy_CalcInterestRatesLocalVars) -- [Function `init_interest_rate_strategy`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_default_reserve_interest_rate_strategy_init_interest_rate_strategy) -- [Function `set_reserve_interest_rate_strategy`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_default_reserve_interest_rate_strategy_set_reserve_interest_rate_strategy) -- [Function `asset_interest_rate_exists`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_default_reserve_interest_rate_strategy_asset_interest_rate_exists) -- [Function `get_reserve_interest_rate_strategy`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_default_reserve_interest_rate_strategy_get_reserve_interest_rate_strategy) -- [Function `get_optimal_usage_ratio`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_default_reserve_interest_rate_strategy_get_optimal_usage_ratio) -- [Function `get_max_excess_usage_ratio`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_default_reserve_interest_rate_strategy_get_max_excess_usage_ratio) -- [Function `get_variable_rate_slope1`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_default_reserve_interest_rate_strategy_get_variable_rate_slope1) -- [Function `get_variable_rate_slope2`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_default_reserve_interest_rate_strategy_get_variable_rate_slope2) -- [Function `get_base_variable_borrow_rate`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_default_reserve_interest_rate_strategy_get_base_variable_borrow_rate) -- [Function `get_max_variable_borrow_rate`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_default_reserve_interest_rate_strategy_get_max_variable_borrow_rate) -- [Function `calculate_interest_rates`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_default_reserve_interest_rate_strategy_calculate_interest_rates) - - -
use 0x1::event;
-use 0x1::signer;
-use 0x1::smart_table;
-use 0x9efefdec8fe22b7447931b81745048182594ef72653dfbf8e05b815ecc355f7c::math_utils;
-use 0x9efefdec8fe22b7447931b81745048182594ef72653dfbf8e05b815ecc355f7c::wad_ray_math;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::a_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::mock_underlying_token_factory;
-use 0xd329b8b371bf56fdbfbb66f441a8463f3605ecb27ee0c484f85a4cf88883d2f9::acl_manage;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::error;
-
- - - - - -## Struct `ReserveInterestRateStrategy` - - - -
#[event]
-struct ReserveInterestRateStrategy has drop, store
-
- - - - - -## Resource `DefaultReserveInterestRateStrategy` - - - -
struct DefaultReserveInterestRateStrategy has copy, drop, store, key
-
- - - - - -## Resource `ReserveInterestRateStrategyMap` - - - -
struct ReserveInterestRateStrategyMap has key
-
- - - - - -## Struct `CalcInterestRatesLocalVars` - - - -
struct CalcInterestRatesLocalVars has drop
-
- - - - - -## Function `init_interest_rate_strategy` - -@notice Initializes the interest rate strategy - - -
public(friend) fun init_interest_rate_strategy(account: &signer)
-
- - - - - -## Function `set_reserve_interest_rate_strategy` - -@notice Sets the interest rate strategy of a reserve -@param asset The address of the reserve -@param optimal_usage_ratio The optimal usage ratio -@param base_variable_borrow_rate The base variable borrow rate -@param variable_rate_slope1 The variable rate slope below optimal usage ratio -@param variable_rate_slope2 The variable rate slope above optimal usage ratio - - -
public entry fun set_reserve_interest_rate_strategy(account: &signer, asset: address, optimal_usage_ratio: u256, base_variable_borrow_rate: u256, variable_rate_slope1: u256, variable_rate_slope2: u256)
-
- - - - - -## Function `asset_interest_rate_exists` - - - -
public fun asset_interest_rate_exists(asset: address)
-
- - - - - -## Function `get_reserve_interest_rate_strategy` - - - -
#[view]
-public fun get_reserve_interest_rate_strategy(asset: address): default_reserve_interest_rate_strategy::DefaultReserveInterestRateStrategy
-
- - - - - -## Function `get_optimal_usage_ratio` - - - -
#[view]
-public fun get_optimal_usage_ratio(asset: address): u256
-
- - - - - -## Function `get_max_excess_usage_ratio` - - - -
#[view]
-public fun get_max_excess_usage_ratio(asset: address): u256
-
- - - - - -## Function `get_variable_rate_slope1` - - - -
#[view]
-public fun get_variable_rate_slope1(asset: address): u256
-
- - - - - -## Function `get_variable_rate_slope2` - - - -
#[view]
-public fun get_variable_rate_slope2(asset: address): u256
-
- - - - - -## Function `get_base_variable_borrow_rate` - - - -
#[view]
-public fun get_base_variable_borrow_rate(asset: address): u256
-
- - - - - -## Function `get_max_variable_borrow_rate` - - - -
#[view]
-public fun get_max_variable_borrow_rate(asset: address): u256
-
- - - - - -## Function `calculate_interest_rates` - -@notice Calculates the interest rates depending on the reserve's state and configurations -@param unbacked The amount of unbacked liquidity -@param liquidity_added The amount of liquidity added -@param liquidity_taken The amount of liquidity taken -@param total_variable_debt The total variable debt of the reserve -@param reserve_factor The reserve factor -@param reserve The address of the reserve -@param a_token_address The address of the aToken -@return current_liquidity_rate The liquidity rate expressed in rays -@return current_variable_borrow_rate The variable borrow rate expressed in rays - - -
#[view]
-public fun calculate_interest_rates(unbacked: u256, liquidity_added: u256, liquidity_taken: u256, total_variable_debt: u256, reserve_factor: u256, reserve: address, a_token_address: address): (u256, u256)
-
diff --git a/aave-core/doc/eac_aggregator_proxy.md b/aave-core/doc/eac_aggregator_proxy.md deleted file mode 100644 index 1fa2bce..0000000 --- a/aave-core/doc/eac_aggregator_proxy.md +++ /dev/null @@ -1,84 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::eac_aggregator_proxy` - - - -- [Resource `MockEacAggregatorProxy`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_eac_aggregator_proxy_MockEacAggregatorProxy) -- [Struct `AnswerUpdated`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_eac_aggregator_proxy_AnswerUpdated) -- [Struct `NewRound`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_eac_aggregator_proxy_NewRound) -- [Function `decimals`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_eac_aggregator_proxy_decimals) -- [Function `latest_answer`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_eac_aggregator_proxy_latest_answer) -- [Function `create_eac_aggregator_proxy`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_eac_aggregator_proxy_create_eac_aggregator_proxy) - - -
- - - - - -## Resource `MockEacAggregatorProxy` - - - -
struct MockEacAggregatorProxy has copy, drop, store, key
-
- - - - - -## Struct `AnswerUpdated` - - - -
#[event]
-struct AnswerUpdated has drop, store
-
- - - - - -## Struct `NewRound` - - - -
#[event]
-struct NewRound has drop, store
-
- - - - - -## Function `decimals` - - - -
public fun decimals(): u8
-
- - - - - -## Function `latest_answer` - - - -
public fun latest_answer(): u256
-
- - - - - -## Function `create_eac_aggregator_proxy` - - - -
public fun create_eac_aggregator_proxy(): eac_aggregator_proxy::MockEacAggregatorProxy
-
diff --git a/aave-core/doc/ecosystem_reserve_v2.md b/aave-core/doc/ecosystem_reserve_v2.md deleted file mode 100644 index cfa5adb..0000000 --- a/aave-core/doc/ecosystem_reserve_v2.md +++ /dev/null @@ -1,274 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::ecosystem_reserve_v2` - - - -- [Resource `EcosystemReserveV2Data`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ecosystem_reserve_v2_EcosystemReserveV2Data) -- [Struct `CreateStream`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ecosystem_reserve_v2_CreateStream) -- [Struct `WithdrawFromStream`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ecosystem_reserve_v2_WithdrawFromStream) -- [Struct `CancelStream`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ecosystem_reserve_v2_CancelStream) -- [Constants](#@Constants_0) -- [Function `initialize`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ecosystem_reserve_v2_initialize) -- [Function `ecosystem_reserve_v2_data_address`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ecosystem_reserve_v2_ecosystem_reserve_v2_data_address) -- [Function `ecosystem_reserve_v2_data_object`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ecosystem_reserve_v2_ecosystem_reserve_v2_data_object) -- [Function `delta_of`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ecosystem_reserve_v2_delta_of) -- [Function `balance_of`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ecosystem_reserve_v2_balance_of) - - -
use 0x1::event;
-use 0x1::object;
-use 0x1::signer;
-use 0x1::smart_table;
-use 0x1::timestamp;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::admin_controlled_ecosystem_reserve;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::mock_underlying_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::stream;
-use 0xd329b8b371bf56fdbfbb66f441a8463f3605ecb27ee0c484f85a4cf88883d2f9::acl_manage;
-
- - - - - -## Resource `EcosystemReserveV2Data` - - - -
struct EcosystemReserveV2Data has key
-
- - - - - -## Struct `CreateStream` - - - -
#[event]
-struct CreateStream has drop, store
-
- - - - - -## Struct `WithdrawFromStream` - - - -
#[event]
-struct WithdrawFromStream has drop, store
-
- - - - - -## Struct `CancelStream` - - - -
#[event]
-struct CancelStream has drop, store
-
- - - - - -## Constants - - - - - - -
const EROLE_NOT_EXISTS: u64 = 1;
-
- - - - - - - -
const NOT_FUNDS_ADMIN: u64 = 3;
-
- - - - - - - -
const TEST_FAILED: u64 = 2;
-
- - - - - - - -
const TEST_SUCCESS: u64 = 1;
-
- - - - - - - -
const EAMOUNT_EXCEEDS_THE_AVAILABLE_BALANCE: u64 = 12;
-
- - - - - - - -
const EAMOUNT_IS_ZERO: u64 = 11;
-
- - - - - - - -
const ECOSYSTEM_RESERVE_V2_NAME: vector<u8> = [65, 65, 86, 69, 95, 69, 67, 79, 83, 89, 83, 84, 69, 77, 95, 82, 69, 83, 69, 82, 86, 69, 95, 86, 50];
-
- - - - - - - -
const EDEPOSIT_IS_ZERO: u64 = 6;
-
- - - - - - - -
const EDEPOSIT_NOT_MULTIPLE_OF_TIME_DELTA: u64 = 10;
-
- - - - - - - -
const EDEPOSIT_SMALLER_THAN_TIME_DELTA: u64 = 9;
-
- - - - - - - -
const ESTART_TIME_BEFORE_BLOCK_TIMESTAMP: u64 = 7;
-
- - - - - - - -
const ESTOP_TIME_BEFORE_THE_START_TIME: u64 = 8;
-
- - - - - - - -
const ESTREAM_NOT_EXISTS: u64 = 2;
-
- - - - - - - -
const ESTREAM_TO_THE_CALLER: u64 = 5;
-
- - - - - - - -
const ESTREAM_TO_THE_CONTRACT_ITSELF: u64 = 4;
-
- - - - - -## Function `initialize` - - - -
public fun initialize(sender: &signer)
-
- - - - - -## Function `ecosystem_reserve_v2_data_address` - - - -
#[view]
-public fun ecosystem_reserve_v2_data_address(): address
-
- - - - - -## Function `ecosystem_reserve_v2_data_object` - - - -
#[view]
-public fun ecosystem_reserve_v2_data_object(): object::Object<ecosystem_reserve_v2::EcosystemReserveV2Data>
-
- - - - - -## Function `delta_of` - - - -
#[view]
-public fun delta_of(stream_id: u256): u256
-
- - - - - -## Function `balance_of` - - - -
public fun balance_of(stream_id: u256, who: address): u256
-
diff --git a/aave-core/doc/emission_manager.md b/aave-core/doc/emission_manager.md deleted file mode 100644 index 038226b..0000000 --- a/aave-core/doc/emission_manager.md +++ /dev/null @@ -1,255 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::emission_manager` - - - -- [Resource `EmissionManagerData`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emission_manager_EmissionManagerData) -- [Struct `EmissionAdminUpdated`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emission_manager_EmissionAdminUpdated) -- [Constants](#@Constants_0) -- [Function `initialize`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emission_manager_initialize) -- [Function `emission_manager_address`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emission_manager_emission_manager_address) -- [Function `emission_manager_object`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emission_manager_emission_manager_object) -- [Function `configure_assets`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emission_manager_configure_assets) -- [Function `set_pull_rewards_transfer_strategy`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emission_manager_set_pull_rewards_transfer_strategy) -- [Function `set_staked_token_transfer_strategy`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emission_manager_set_staked_token_transfer_strategy) -- [Function `set_reward_oracle`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emission_manager_set_reward_oracle) -- [Function `set_distribution_end`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emission_manager_set_distribution_end) -- [Function `set_emission_per_second`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emission_manager_set_emission_per_second) -- [Function `set_claimer`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emission_manager_set_claimer) -- [Function `set_emission_admin`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emission_manager_set_emission_admin) -- [Function `set_rewards_controller`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emission_manager_set_rewards_controller) -- [Function `get_rewards_controller`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emission_manager_get_rewards_controller) -- [Function `get_emission_admin`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emission_manager_get_emission_admin) - - -
use 0x1::event;
-use 0x1::object;
-use 0x1::signer;
-use 0x1::smart_table;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::rewards_controller;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::transfer_strategy;
-use 0xe02c89369099ad99993cbe3d4c3c80b299df006885854178a8acdb6ab6afb6e::oracle;
-
- - - - - -## Resource `EmissionManagerData` - - - -
#[resource_group_member(#[group = 0x1::object::ObjectGroup])]
-struct EmissionManagerData has key
-
- - - - - -## Struct `EmissionAdminUpdated` - - - -
#[event]
-struct EmissionAdminUpdated has drop, store
-
- - - - - -## Constants - - - - - - -
const ENOT_MANAGEMENT: u64 = 1;
-
- - - - - - - -
const EMISSION_MANAGER_NAME: vector<u8> = [69, 77, 73, 83, 83, 73, 79, 78, 95, 77, 65, 78, 65, 71, 69, 82];
-
- - - - - - - -
const NOT_EMISSION_ADMIN: u64 = 2;
-
- - - - - - - -
const ONLY_EMISSION_ADMIN: u64 = 3;
-
- - - - - -## Function `initialize` - - - -
public fun initialize(sender: &signer, rewards_controller: address)
-
- - - - - -## Function `emission_manager_address` - - - -
#[view]
-public fun emission_manager_address(): address
-
- - - - - -## Function `emission_manager_object` - - - -
#[view]
-public fun emission_manager_object(): object::Object<emission_manager::EmissionManagerData>
-
- - - - - -## Function `configure_assets` - - - -
public fun configure_assets(account: &signer, config: vector<transfer_strategy::RewardsConfigInput>)
-
- - - - - -## Function `set_pull_rewards_transfer_strategy` - - - -
public fun set_pull_rewards_transfer_strategy(caller: &signer, reward: address, pull_rewards_transfer_strategy: transfer_strategy::PullRewardsTransferStrategy)
-
- - - - - -## Function `set_staked_token_transfer_strategy` - - - -
public fun set_staked_token_transfer_strategy(caller: &signer, reward: address, staked_token_transfer_strategy: transfer_strategy::StakedTokenTransferStrategy)
-
- - - - - -## Function `set_reward_oracle` - - - -
public fun set_reward_oracle(caller: &signer, reward: address, reward_oracle: oracle::RewardOracle)
-
- - - - - -## Function `set_distribution_end` - - - -
public fun set_distribution_end(caller: &signer, asset: address, reward: address, new_distribution_end: u32)
-
- - - - - -## Function `set_emission_per_second` - - - -
public fun set_emission_per_second(caller: &signer, asset: address, rewards: vector<address>, new_emissions_per_second: vector<u128>)
-
- - - - - -## Function `set_claimer` - - - -
public fun set_claimer(account: &signer, user: address, claimer: address)
-
- - - - - -## Function `set_emission_admin` - - - -
public fun set_emission_admin(account: &signer, reward: address, new_admin: address)
-
- - - - - -## Function `set_rewards_controller` - - - -
public fun set_rewards_controller(account: &signer, controller: address)
-
- - - - - -## Function `get_rewards_controller` - - - -
public fun get_rewards_controller(): address
-
- - - - - -## Function `get_emission_admin` - - - -
public fun get_emission_admin(reward: address): address
-
diff --git a/aave-core/doc/emode_logic.md b/aave-core/doc/emode_logic.md deleted file mode 100644 index 4b3981a..0000000 --- a/aave-core/doc/emode_logic.md +++ /dev/null @@ -1,327 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::emode_logic` - -@title emode_logic module -@author Aave -@notice Implements the base logic for all the actions related to the eMode - - -- [Struct `UserEModeSet`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emode_logic_UserEModeSet) -- [Struct `EModeCategory`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emode_logic_EModeCategory) -- [Resource `EModeCategoryList`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emode_logic_EModeCategoryList) -- [Resource `UsersEmodeCategory`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emode_logic_UsersEmodeCategory) -- [Constants](#@Constants_0) -- [Function `init_emode`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emode_logic_init_emode) -- [Function `set_user_emode`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emode_logic_set_user_emode) -- [Function `get_user_emode`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emode_logic_get_user_emode) -- [Function `get_emode_e_mode_price_source`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emode_logic_get_emode_e_mode_price_source) -- [Function `get_emode_configuration`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emode_logic_get_emode_configuration) -- [Function `get_emode_e_mode_label`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emode_logic_get_emode_e_mode_label) -- [Function `get_emode_e_mode_liquidation_bonus`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emode_logic_get_emode_e_mode_liquidation_bonus) -- [Function `configure_emode_category`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emode_logic_configure_emode_category) -- [Function `is_in_emode_category`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emode_logic_is_in_emode_category) -- [Function `get_emode_category_data`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emode_logic_get_emode_category_data) -- [Function `get_emode_category_ltv`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emode_logic_get_emode_category_ltv) -- [Function `get_emode_category_liquidation_threshold`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emode_logic_get_emode_category_liquidation_threshold) -- [Function `get_emode_category_liquidation_bonus`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emode_logic_get_emode_category_liquidation_bonus) -- [Function `get_emode_category_price_source`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emode_logic_get_emode_category_price_source) -- [Function `get_emode_category_label`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_emode_logic_get_emode_category_label) - - -
use 0x1::event;
-use 0x1::signer;
-use 0x1::smart_table;
-use 0x1::string;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool_validation;
-use 0xe02c89369099ad99993cbe3d4c3c80b299df006885854178a8acdb6ab6afb6e::oracle;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::error;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::user;
-
- - - - - -## Struct `UserEModeSet` - -@dev Emitted when the user selects a certain asset category for eMode -@param user The address of the user -@param category_id The category id - - -
#[event]
-struct UserEModeSet has drop, store
-
- - - - - -## Struct `EModeCategory` - - - -
struct EModeCategory has copy, drop, store
-
- - - - - -## Resource `EModeCategoryList` - -List of eMode categories as a map (emode_category_id => EModeCategory). - - -
struct EModeCategoryList has key
-
- - - - - -## Resource `UsersEmodeCategory` - -Map of users address and their eMode category (user_address => emode_category_id) - - -
struct UsersEmodeCategory has store, key
-
- - - - - -## Constants - - - - - - -
const EMPTY_STRING: vector<u8> = [];
-
- - - - - -## Function `init_emode` - -@notice Initializes the eMode - - -
public(friend) fun init_emode(account: &signer)
-
- - - - - -## Function `set_user_emode` - -@notice Updates the user efficiency mode category -@dev Will revert if user is borrowing non-compatible asset or change will drop HF < HEALTH_FACTOR_LIQUIDATION_THRESHOLD -@dev Emits the UserEModeSet event -@param category_id The state of all users efficiency mode category - - -
public entry fun set_user_emode(account: &signer, category_id: u8)
-
- - - - - -## Function `get_user_emode` - -@notice Returns the eMode the user is using -@param user The address of the user -@return The eMode id - - -
#[view]
-public fun get_user_emode(user: address): u256
-
- - - - - -## Function `get_emode_e_mode_price_source` - -@notice Get the price source of the eMode category -@param user_emode_category The user eMode category -@return The price source of the eMode category - - -
public fun get_emode_e_mode_price_source(user_emode_category: u8): address
-
- - - - - -## Function `get_emode_configuration` - -@notice Gets the eMode configuration and calculates the eMode asset price if a custom oracle is configured -@dev The eMode asset price returned is 0 if no oracle is specified -@param category The user eMode category -@return The eMode ltv -@return The eMode liquidation threshold -@return The eMode asset price - - -
public fun get_emode_configuration(user_emode_category: u8): (u256, u256, u256)
-
- - - - - -## Function `get_emode_e_mode_label` - -@notice Gets the eMode category label -@param user_emode_category The user eMode category -@return The label of the eMode category - - -
public fun get_emode_e_mode_label(user_emode_category: u8): string::String
-
- - - - - -## Function `get_emode_e_mode_liquidation_bonus` - -@notice Gets the eMode category liquidation_bonus -@param user_emode_category The user eMode category -@return The liquidation bonus of the eMode category - - -
public fun get_emode_e_mode_liquidation_bonus(user_emode_category: u8): u16
-
- - - - - -## Function `configure_emode_category` - -@notice Configures a new category for the eMode. -@dev In eMode, the protocol allows very high borrowing power to borrow assets of the same category. -The category 0 is reserved as it's the default for volatile assets -@param id The id of the category -@param ltv The loan to value ratio -@param liquidation_threshold The liquidation threshold -@param liquidation_bonus The liquidation bonus -@param price_source The address of the oracle to override the individual assets price oracles -@param label The label of the category - - -
public(friend) fun configure_emode_category(id: u8, ltv: u16, liquidation_threshold: u16, liquidation_bonus: u16, price_source: address, label: string::String)
-
- - - - - -## Function `is_in_emode_category` - -@notice Checks if eMode is active for a user and if yes, if the asset belongs to the eMode category chosen -@param emode_user_category The user eMode category -@param emode_asset_category The asset eMode category -@return True if eMode is active and the asset belongs to the eMode category chosen by the user, false otherwise - - -
public fun is_in_emode_category(emode_user_category: u256, emode_assert_category: u256): bool
-
- - - - - -## Function `get_emode_category_data` - -@notice Returns the data of an eMode category -@param id The id of the category -@return The configuration data of the category - - -
#[view]
-public fun get_emode_category_data(id: u8): emode_logic::EModeCategory
-
- - - - - -## Function `get_emode_category_ltv` - -@notice Get the ltv of the eMode category -@param emode_category The eMode category -@return The ltv of the eMode category - - -
public fun get_emode_category_ltv(emode_category: &emode_logic::EModeCategory): u16
-
- - - - - -## Function `get_emode_category_liquidation_threshold` - -@notice Get the liquidation threshold of the eMode category -@param emode_category The eMode category -@return The liquidation threshold of the eMode category - - -
public fun get_emode_category_liquidation_threshold(emode_category: &emode_logic::EModeCategory): u16
-
- - - - - -## Function `get_emode_category_liquidation_bonus` - -@notice Get the liquidation bonus of the eMode category -@param emode_category The eMode category -@return The liquidation bonus of the eMode category - - -
public fun get_emode_category_liquidation_bonus(emode_category: &emode_logic::EModeCategory): u16
-
- - - - - -## Function `get_emode_category_price_source` - -@notice Get the price source of the eMode category -@param emode_category The eMode category -@return The price source of the eMode category - - -
public fun get_emode_category_price_source(emode_category: &emode_logic::EModeCategory): address
-
- - - - - -## Function `get_emode_category_label` - -@notice Get the label of the eMode category -@param emode_category The eMode category -@return The label of the eMode category - - -
public fun get_emode_category_label(emode_category: &emode_logic::EModeCategory): string::String
-
diff --git a/aave-core/doc/flash_loan.md b/aave-core/doc/flash_loan.md deleted file mode 100644 index c5cc34c..0000000 --- a/aave-core/doc/flash_loan.md +++ /dev/null @@ -1,167 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::flashloan_logic` - -@title flashloan_logic module -@author Aave -@notice Implements the logic for the flash loans - - -- [Struct `FlashLoan`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_flashloan_logic_FlashLoan) -- [Struct `FlashLoanLocalVars`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_flashloan_logic_FlashLoanLocalVars) -- [Struct `SimpleFlashLoansReceipt`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_flashloan_logic_SimpleFlashLoansReceipt) -- [Struct `ComplexFlashLoansReceipt`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_flashloan_logic_ComplexFlashLoansReceipt) -- [Struct `FlashLoanRepaymentParams`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_flashloan_logic_FlashLoanRepaymentParams) -- [Function `flashloan`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_flashloan_logic_flashloan) -- [Function `pay_flash_loan_complex`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_flashloan_logic_pay_flash_loan_complex) -- [Function `flash_loan_simple`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_flashloan_logic_flash_loan_simple) -- [Function `pay_flash_loan_simple`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_flashloan_logic_pay_flash_loan_simple) - - -
use 0x1::event;
-use 0x1::option;
-use 0x1::signer;
-use 0x1::vector;
-use 0x9efefdec8fe22b7447931b81745048182594ef72653dfbf8e05b815ecc355f7c::math_utils;
-use 0x9efefdec8fe22b7447931b81745048182594ef72653dfbf8e05b815ecc355f7c::wad_ray_math;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::a_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::borrow_logic;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::mock_underlying_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::validation_logic;
-use 0xd329b8b371bf56fdbfbb66f441a8463f3605ecb27ee0c484f85a4cf88883d2f9::acl_manage;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::error;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::user;
-
- - - - - -## Struct `FlashLoan` - -@dev Emitted on flashLoan() -@param target The address of the flash loan receiver contract -@param initiator The address initiating the flash loan -@param asset The address of the asset being flash borrowed -@param amount The amount flash borrowed -@param interest_rate_mode The flashloan mode: 0 for regular flashloan, 2 for Variable debt -@param premium The fee flash borrowed -@param referral_code The referral code used - - -
#[event]
-struct FlashLoan has drop, store
-
- - - - - -## Struct `FlashLoanLocalVars` - -Helper struct for internal variables used in the executeFlashLoan function - - -
struct FlashLoanLocalVars has copy, drop
-
- - - - - -## Struct `SimpleFlashLoansReceipt` - - - -
struct SimpleFlashLoansReceipt
-
- - - - - -## Struct `ComplexFlashLoansReceipt` - - - -
struct ComplexFlashLoansReceipt
-
- - - - - -## Struct `FlashLoanRepaymentParams` - - - -
struct FlashLoanRepaymentParams has drop
-
- - - - - -## Function `flashloan` - -@notice Allows smartcontracts to access the liquidity of the pool within one transaction, -as long as the amount taken plus a fee is returned. -@dev IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept -into consideration. For further details please visit https://docs.aave.com/developers/ -@param receiver_address The address of the contract receiving the funds -@param assets The addresses of the assets being flash-borrowed -@param amounts The amounts of the assets being flash-borrowed -@param interest_rate_modes Types of the debt to open if the flash loan is not returned: -0 -> Don't open any debt, just revert if funds can't be transferred from the receiver -2 -> Open debt at variable rate for the value of the amount flash-borrowed to the onBehalfOf address -@param on_behalf_of The address that will receive the debt in the case of using on modes 2 -@param referral_code The code used to register the integrator originating the operation, for potential rewards. -0 if the action is executed directly by the user, without any middle-man - - -
public fun flashloan(account: &signer, receiver_address: address, assets: vector<address>, amounts: vector<u256>, interest_rate_modes: vector<u8>, on_behalf_of: address, referral_code: u16): vector<flashloan_logic::ComplexFlashLoansReceipt>
-
- - - - - -## Function `pay_flash_loan_complex` - - - -
public fun pay_flash_loan_complex(account: &signer, flashloan_receipts: vector<flashloan_logic::ComplexFlashLoansReceipt>)
-
- - - - - -## Function `flash_loan_simple` - -@notice Allows smartcontracts to access the liquidity of the pool within one transaction, -as long as the amount taken plus a fee is returned. -@dev IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept -into consideration. For further details please visit https://docs.aave.com/developers/ -@param receiver_address The address of the contract receiving the funds -@param asset The address of the asset being flash-borrowed -@param amount The amount of the asset being flash-borrowed -@param referral_code The code used to register the integrator originating the operation, for potential rewards. -0 if the action is executed directly by the user, without any middle-man - - -
public fun flash_loan_simple(account: &signer, receiver_address: address, asset: address, amount: u256, referral_code: u16): flashloan_logic::SimpleFlashLoansReceipt
-
- - - - - -## Function `pay_flash_loan_simple` - - - -
public fun pay_flash_loan_simple(account: &signer, flashloan_receipt: flashloan_logic::SimpleFlashLoansReceipt)
-
diff --git a/aave-core/doc/generic_logic.md b/aave-core/doc/generic_logic.md deleted file mode 100644 index 565f5c3..0000000 --- a/aave-core/doc/generic_logic.md +++ /dev/null @@ -1,79 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::generic_logic` - -@title GenericLogic module -@author Aave -@notice Implements protocol-level logic to calculate and validate the state of a user - - -- [Struct `CalculateUserAccountDataVars`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_generic_logic_CalculateUserAccountDataVars) -- [Function `calculate_user_account_data`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_generic_logic_calculate_user_account_data) -- [Function `calculate_available_borrows`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_generic_logic_calculate_available_borrows) - - -
use 0x9efefdec8fe22b7447931b81745048182594ef72653dfbf8e05b815ecc355f7c::math_utils;
-use 0x9efefdec8fe22b7447931b81745048182594ef72653dfbf8e05b815ecc355f7c::wad_ray_math;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::a_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::variable_debt_token_factory;
-use 0xe02c89369099ad99993cbe3d4c3c80b299df006885854178a8acdb6ab6afb6e::oracle;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::reserve;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::user;
-
- - - - - -## Struct `CalculateUserAccountDataVars` - - - -
struct CalculateUserAccountDataVars has drop
-
- - - - - -## Function `calculate_user_account_data` - -@notice Calculates the user data across the reserves. -@dev It includes the total liquidity/collateral/borrow balances in the base currency used by the price feed, -the average Loan To Value, the average Liquidation Ratio, and the Health factor. -@param params reserves_count The number of reserves -@param params user_config_map The user configuration map -@param params user The address of the user -@param params user_emode_category The category of the user in the emode -@param params emode_ltv The ltv of the user in the emode -@param params emode_liq_threshold The liquidation threshold of the user in the emode -@param params emode_asset_price The price of the asset in the emode -@return The total collateral of the user in the base currency used by the price feed -@return The total debt of the user in the base currency used by the price feed -@return The average ltv of the user -@return The average liquidation threshold of the user -@return The health factor of the user -@return True if the ltv is zero, false otherwise - - -
public fun calculate_user_account_data(reserves_count: u256, user_config_map: &user::UserConfigurationMap, user: address, user_emode_category: u8, emode_ltv: u256, emode_liq_threshold: u256, emode_asset_price: u256): (u256, u256, u256, u256, u256, bool)
-
- - - - - -## Function `calculate_available_borrows` - -@notice Calculates the maximum amount that can be borrowed depending on the available collateral, the total debt -and the average Loan To Value -@param total_collateral_in_base_currency The total collateral in the base currency used by the price feed -@param total_debt_in_base_currency The total borrow balance in the base currency used by the price feed -@param ltv The average loan to value -@return The amount available to borrow in the base currency of the used by the price feed - - -
public fun calculate_available_borrows(total_collateral_in_base_currency: u256, total_debt_in_base_currency: u256, ltv: u256): u256
-
diff --git a/aave-core/doc/isolation_mode_logic.md b/aave-core/doc/isolation_mode_logic.md deleted file mode 100644 index 15429fa..0000000 --- a/aave-core/doc/isolation_mode_logic.md +++ /dev/null @@ -1,47 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::isolation_mode_logic` - - - -- [Struct `IsolationModeTotalDebtUpdated`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_isolation_mode_logic_IsolationModeTotalDebtUpdated) -- [Function `update_isolated_debt_if_isolated`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_isolation_mode_logic_update_isolated_debt_if_isolated) - - -
use 0x1::event;
-use 0x9efefdec8fe22b7447931b81745048182594ef72653dfbf8e05b815ecc355f7c::math_utils;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::reserve;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::user;
-
- - - - - -## Struct `IsolationModeTotalDebtUpdated` - -@dev Emitted on borrow(), repay() and liquidation_call() when using isolated assets -@param asset The address of the underlying asset of the reserve -@param total_debt The total isolation mode debt for the reserve - - -
#[event]
-struct IsolationModeTotalDebtUpdated has drop, store
-
- - - - - -## Function `update_isolated_debt_if_isolated` - -@notice updated the isolated debt whenever a position collateralized by an isolated asset is repaid or liquidated -@param user_config_map The user configuration map -@param reserve_data The reserve data -@param repay_amount The amount being repaid - - -
public(friend) fun update_isolated_debt_if_isolated(user_config_map: &user::UserConfigurationMap, reserve_data: &pool::ReserveData, repay_amount: u256)
-
diff --git a/aave-core/doc/liquidation_logic.md b/aave-core/doc/liquidation_logic.md deleted file mode 100644 index 994b1f9..0000000 --- a/aave-core/doc/liquidation_logic.md +++ /dev/null @@ -1,186 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::liquidation_logic` - -@title liquidation_logic module -@author Aave -@notice Implements actions involving management of collateral in the protocol, the main one being the liquidations - - -- [Struct `ReserveUsedAsCollateralEnabled`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_liquidation_logic_ReserveUsedAsCollateralEnabled) -- [Struct `ReserveUsedAsCollateralDisabled`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_liquidation_logic_ReserveUsedAsCollateralDisabled) -- [Struct `LiquidationCall`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_liquidation_logic_LiquidationCall) -- [Struct `LiquidationCallLocalVars`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_liquidation_logic_LiquidationCallLocalVars) -- [Struct `ExecuteLiquidationCallParams`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_liquidation_logic_ExecuteLiquidationCallParams) -- [Struct `AvailableCollateralToLiquidateLocalVars`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_liquidation_logic_AvailableCollateralToLiquidateLocalVars) -- [Constants](#@Constants_0) -- [Function `liquidation_call`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_liquidation_logic_liquidation_call) - - -
use 0x1::event;
-use 0x1::signer;
-use 0x9efefdec8fe22b7447931b81745048182594ef72653dfbf8e05b815ecc355f7c::math_utils;
-use 0x9efefdec8fe22b7447931b81745048182594ef72653dfbf8e05b815ecc355f7c::wad_ray_math;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::a_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::emode_logic;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::generic_logic;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::isolation_mode_logic;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::mock_underlying_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool_validation;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::validation_logic;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::variable_debt_token_factory;
-use 0xe02c89369099ad99993cbe3d4c3c80b299df006885854178a8acdb6ab6afb6e::oracle;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::reserve;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::user;
-
- - - - - -## Struct `ReserveUsedAsCollateralEnabled` - -@dev Emitted on setUserUseReserveAsCollateral() -@param reserve The address of the underlying asset of the reserve -@param user The address of the user enabling the usage as collateral - - -
#[event]
-struct ReserveUsedAsCollateralEnabled has drop, store
-
- - - - - -## Struct `ReserveUsedAsCollateralDisabled` - -@dev Emitted on setUserUseReserveAsCollateral() -@param reserve The address of the underlying asset of the reserve -@param user The address of the user enabling the usage as collateral - - -
#[event]
-struct ReserveUsedAsCollateralDisabled has drop, store
-
- - - - - -## Struct `LiquidationCall` - -@dev Emitted when a borrower is liquidated. -@param collateral_asset The address of the underlying asset used as collateral, to receive as result of the liquidation -@param debt_asset The address of the underlying borrowed asset to be repaid with the liquidation -@param user The address of the borrower getting liquidated -@param debt_to_cover The debt amount of borrowed asset the liquidator wants to cover -@param liquidated_collateral_amount The amount of collateral received by the liquidator -@param liquidator The address of the liquidator -@param receive_a_token True if the liquidators wants to receive the collateral aTokens, false if he wants -to receive the underlying collateral asset directly - - -
#[event]
-struct LiquidationCall has drop, store
-
- - - - - -## Struct `LiquidationCallLocalVars` - - - -
struct LiquidationCallLocalVars has drop
-
- - - - - -## Struct `ExecuteLiquidationCallParams` - - - -
struct ExecuteLiquidationCallParams has drop
-
- - - - - -## Struct `AvailableCollateralToLiquidateLocalVars` - - - -
struct AvailableCollateralToLiquidateLocalVars has drop
-
- - - - - -## Constants - - - - -@dev This constant represents below which health factor value it is possible to liquidate -an amount of debt corresponding to MAX_LIQUIDATION_CLOSE_FACTOR. -A value of 0.95e18 results in 0.95 -0.95 * 10 ** 18 - - -
const CLOSE_FACTOR_HF_THRESHOLD: u256 = 950000000000000000;
-
- - - - - -@dev Default percentage of borrower's debt to be repaid in a liquidation. -@dev Percentage applied when the users health factor is above CLOSE_FACTOR_HF_THRESHOLD -Expressed in bps, a value of 0.5e4 results in 50.00% -5 * 10 ** 3 - - -
const DEFAULT_LIQUIDATION_CLOSE_FACTOR: u256 = 5000;
-
- - - - - -@dev Maximum percentage of borrower's debt to be repaid in a liquidation -@dev Percentage applied when the users health factor is below CLOSE_FACTOR_HF_THRESHOLD -Expressed in bps, a value of 1e4 results in 100.00% -1 * 10 ** 4 - - -
const MAX_LIQUIDATION_CLOSE_FACTOR: u256 = 10000;
-
- - - - - -## Function `liquidation_call` - -@notice Function to liquidate a non-healthy position collateral-wise, with Health Factor below 1 -- The caller (liquidator) covers debt_to_cover amount of debt of the user getting liquidated, and receives -a proportionally amount of the collateral_asset plus a bonus to cover market risk -@dev Emits the LiquidationCall() event -@param collateral_asset The address of the underlying asset used as collateral, to receive as result of the liquidation -@param debt_asset The address of the underlying borrowed asset to be repaid with the liquidation -@param user The address of the borrower getting liquidated -@param debt_to_cover The debt amount of borrowed asset the liquidator wants to cover -@param receive_a_token True if the liquidators wants to receive the collateral aTokens, false if he wants -to receive the underlying collateral asset directly - - -
public entry fun liquidation_call(account: &signer, collateral_asset: address, debt_asset: address, user: address, debt_to_cover: u256, receive_a_token: bool)
-
diff --git a/aave-core/doc/mock_underlying_token_factory.md b/aave-core/doc/mock_underlying_token_factory.md deleted file mode 100644 index 8b0879f..0000000 --- a/aave-core/doc/mock_underlying_token_factory.md +++ /dev/null @@ -1,272 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::mock_underlying_token_factory` - - - -- [Resource `ManagedFungibleAsset`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_mock_underlying_token_factory_ManagedFungibleAsset) -- [Resource `CoinList`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_mock_underlying_token_factory_CoinList) -- [Constants](#@Constants_0) -- [Function `create_token`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_mock_underlying_token_factory_create_token) -- [Function `assert_token_exists`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_mock_underlying_token_factory_assert_token_exists) -- [Function `get_metadata_by_symbol`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_mock_underlying_token_factory_get_metadata_by_symbol) -- [Function `get_token_account_address`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_mock_underlying_token_factory_get_token_account_address) -- [Function `mint`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_mock_underlying_token_factory_mint) -- [Function `transfer_from`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_mock_underlying_token_factory_transfer_from) -- [Function `burn`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_mock_underlying_token_factory_burn) -- [Function `supply`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_mock_underlying_token_factory_supply) -- [Function `maximum`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_mock_underlying_token_factory_maximum) -- [Function `name`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_mock_underlying_token_factory_name) -- [Function `symbol`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_mock_underlying_token_factory_symbol) -- [Function `decimals`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_mock_underlying_token_factory_decimals) -- [Function `balance_of`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_mock_underlying_token_factory_balance_of) -- [Function `token_address`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_mock_underlying_token_factory_token_address) - - -
use 0x1::error;
-use 0x1::fungible_asset;
-use 0x1::object;
-use 0x1::option;
-use 0x1::primary_fungible_store;
-use 0x1::signer;
-use 0x1::smart_table;
-use 0x1::string;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::token_base;
-
- - - - - -## Resource `ManagedFungibleAsset` - -Hold refs to control the minting, transfer and burning of fungible assets. - - -
#[resource_group_member(#[group = 0x1::object::ObjectGroup])]
-struct ManagedFungibleAsset has key
-
- - - - - -## Resource `CoinList` - -mapping (underlying token address => bool) - - -
struct CoinList has key
-
- - - - - -## Constants - - - - -Only fungible asset metadata owner can make changes. - - -
const ENOT_OWNER: u64 = 1;
-
- - - - - - - -
const E_ACCOUNT_NOT_EXISTS: u64 = 3;
-
- - - - - - - -
const E_TOKEN_ALREADY_EXISTS: u64 = 2;
-
- - - - - -## Function `create_token` - -@notice Creates a new underlying token. -@param signer The signer of the transaction -@param name The name of the aToken -@param symbol The symbol of the aToken -@param decimals The decimals of the aToken -@param icon_uri The icon URI of the aToken -@param project_uri The project URI of the aToken - - -
public entry fun create_token(signer: &signer, maximum_supply: u128, name: string::String, symbol: string::String, decimals: u8, icon_uri: string::String, project_uri: string::String)
-
- - - - - -## Function `assert_token_exists` - - - -
public fun assert_token_exists(token_metadata_address: address)
-
- - - - - -## Function `get_metadata_by_symbol` - - - -
#[view]
-public fun get_metadata_by_symbol(symbol: string::String): object::Object<fungible_asset::Metadata>
-
- - - - - -## Function `get_token_account_address` - - - -
#[view]
-public fun get_token_account_address(): address
-
- - - - - -## Function `mint` - -Mint as the owner of metadata object. - - -
public entry fun mint(admin: &signer, to: address, amount: u64, metadata_address: address)
-
- - - - - -## Function `transfer_from` - - - -
public(friend) fun transfer_from(from: address, to: address, amount: u64, metadata_address: address)
-
- - - - - -## Function `burn` - -Burn fungible assets as the owner of metadata object. - - -
public(friend) fun burn(from: address, amount: u64, metadata_address: address)
-
- - - - - -## Function `supply` - -Get the current supply from the metadata object. - - -
#[view]
-public fun supply(metadata_address: address): option::Option<u128>
-
- - - - - -## Function `maximum` - -Get the maximum supply from the metadata object. - - -
#[view]
-public fun maximum(metadata_address: address): option::Option<u128>
-
- - - - - -## Function `name` - -Get the name of the fungible asset from the metadata object. - - -
#[view]
-public fun name(metadata_address: address): string::String
-
- - - - - -## Function `symbol` - -Get the symbol of the fungible asset from the metadata object. - - -
#[view]
-public fun symbol(metadata_address: address): string::String
-
- - - - - -## Function `decimals` - -Get the decimals from the metadata object. - - -
#[view]
-public fun decimals(metadata_address: address): u8
-
- - - - - -## Function `balance_of` - -Get the balance of a given store. - - -
#[view]
-public fun balance_of(owner: address, metadata_address: address): u64
-
- - - - - -## Function `token_address` - - - -
#[view]
-public fun token_address(symbol: string::String): address
-
diff --git a/aave-core/doc/package-manager.md b/aave-core/doc/package-manager.md deleted file mode 100644 index fcef833..0000000 --- a/aave-core/doc/package-manager.md +++ /dev/null @@ -1,77 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::package_manager` - - - -- [Resource `PermissionConfig`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_package_manager_PermissionConfig) -- [Function `get_signer`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_package_manager_get_signer) -- [Function `add_address`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_package_manager_add_address) -- [Function `address_exists`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_package_manager_address_exists) -- [Function `get_address`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_package_manager_get_address) - - -
use 0x1::account;
-use 0x1::resource_account;
-use 0x1::smart_table;
-use 0x1::string;
-
- - - - - -## Resource `PermissionConfig` - -Stores permission config such as SignerCapability for controlling the resource account. - - -
struct PermissionConfig has key
-
- - - - - -## Function `get_signer` - -Can be called by friended modules to obtain the resource account signer. - - -
public(friend) fun get_signer(): signer
-
- - - - - -## Function `add_address` - -Can be called by friended modules to keep track of a system address. - - -
public(friend) fun add_address(name: string::String, object: address)
-
- - - - - -## Function `address_exists` - - - -
public(friend) fun address_exists(name: string::String): bool
-
- - - - - -## Function `get_address` - - - -
public(friend) fun get_address(name: string::String): address
-
diff --git a/aave-core/doc/pool.md b/aave-core/doc/pool.md deleted file mode 100644 index 4d29b96..0000000 --- a/aave-core/doc/pool.md +++ /dev/null @@ -1,884 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool` - - - -- [Struct `ReserveInitialized`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_ReserveInitialized) -- [Struct `ReserveDataUpdated`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_ReserveDataUpdated) -- [Struct `MintedToTreasury`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_MintedToTreasury) -- [Struct `IsolationModeTotalDebtUpdated`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_IsolationModeTotalDebtUpdated) -- [Resource `ReserveExtendConfiguration`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_ReserveExtendConfiguration) -- [Resource `ReserveData`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_ReserveData) -- [Resource `ReserveList`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_ReserveList) -- [Resource `ReserveAddressesList`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_ReserveAddressesList) -- [Resource `UsersConfig`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_UsersConfig) -- [Constants](#@Constants_0) -- [Function `init_pool`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_init_pool) -- [Function `get_revision`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_revision) -- [Function `init_reserve`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_init_reserve) -- [Function `drop_reserve`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_drop_reserve) -- [Function `get_reserve_data`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_reserve_data) -- [Function `get_reserve_data_and_reserves_count`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_reserve_data_and_reserves_count) -- [Function `get_reserve_configuration`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_reserve_configuration) -- [Function `get_reserves_count`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_reserves_count) -- [Function `get_reserve_configuration_by_reserve_data`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_reserve_configuration_by_reserve_data) -- [Function `get_reserve_last_update_timestamp`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_reserve_last_update_timestamp) -- [Function `get_reserve_id`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_reserve_id) -- [Function `get_reserve_a_token_address`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_reserve_a_token_address) -- [Function `set_reserve_accrued_to_treasury`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_set_reserve_accrued_to_treasury) -- [Function `get_reserve_accrued_to_treasury`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_reserve_accrued_to_treasury) -- [Function `get_reserve_variable_borrow_index`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_reserve_variable_borrow_index) -- [Function `get_reserve_liquidity_index`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_reserve_liquidity_index) -- [Function `get_reserve_current_liquidity_rate`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_reserve_current_liquidity_rate) -- [Function `get_reserve_current_variable_borrow_rate`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_reserve_current_variable_borrow_rate) -- [Function `get_reserve_variable_debt_token_address`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_reserve_variable_debt_token_address) -- [Function `set_reserve_unbacked`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_set_reserve_unbacked) -- [Function `get_reserve_unbacked`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_reserve_unbacked) -- [Function `set_reserve_isolation_mode_total_debt`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_set_reserve_isolation_mode_total_debt) -- [Function `get_reserve_isolation_mode_total_debt`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_reserve_isolation_mode_total_debt) -- [Function `set_reserve_configuration`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_set_reserve_configuration) -- [Function `get_user_configuration`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_user_configuration) -- [Function `set_user_configuration`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_set_user_configuration) -- [Function `get_reserve_normalized_income`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_reserve_normalized_income) -- [Function `get_normalized_income_by_reserve_data`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_normalized_income_by_reserve_data) -- [Function `update_state`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_update_state) -- [Function `get_reserve_normalized_variable_debt`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_reserve_normalized_variable_debt) -- [Function `get_normalized_debt_by_reserve_data`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_normalized_debt_by_reserve_data) -- [Function `get_reserves_list`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_reserves_list) -- [Function `get_reserve_address_by_id`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_reserve_address_by_id) -- [Function `mint_to_treasury`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_mint_to_treasury) -- [Function `get_bridge_protocol_fee`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_bridge_protocol_fee) -- [Function `set_bridge_protocol_fee`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_set_bridge_protocol_fee) -- [Function `get_flashloan_premium_total`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_flashloan_premium_total) -- [Function `update_flashloan_premiums`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_update_flashloan_premiums) -- [Function `get_flashloan_premium_to_protocol`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_flashloan_premium_to_protocol) -- [Function `max_number_reserves`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_max_number_reserves) -- [Function `update_interest_rates`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_update_interest_rates) -- [Function `get_isolation_mode_state`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_isolation_mode_state) -- [Function `get_siloed_borrowing_state`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_get_siloed_borrowing_state) -- [Function `cumulate_to_liquidity_index`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_cumulate_to_liquidity_index) -- [Function `reset_isolation_mode_total_debt`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_reset_isolation_mode_total_debt) -- [Function `rescue_tokens`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_rescue_tokens) -- [Function `scaled_a_token_total_supply`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_scaled_a_token_total_supply) -- [Function `scaled_a_token_balance_of`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_scaled_a_token_balance_of) -- [Function `scaled_variable_token_total_supply`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_scaled_variable_token_total_supply) -- [Function `scaled_variable_token_balance_of`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_scaled_variable_token_balance_of) - - -
use 0x1::event;
-use 0x1::signer;
-use 0x1::smart_table;
-use 0x1::string;
-use 0x1::timestamp;
-use 0x1::vector;
-use 0x9efefdec8fe22b7447931b81745048182594ef72653dfbf8e05b815ecc355f7c::math_utils;
-use 0x9efefdec8fe22b7447931b81745048182594ef72653dfbf8e05b815ecc355f7c::wad_ray_math;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::a_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::default_reserve_interest_rate_strategy;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::mock_underlying_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::variable_debt_token_factory;
-use 0xd329b8b371bf56fdbfbb66f441a8463f3605ecb27ee0c484f85a4cf88883d2f9::acl_manage;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::error;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::reserve;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::user;
-
- - - - - -## Struct `ReserveInitialized` - -@dev Emitted when a reserve is initialized. -@param asset The address of the underlying asset of the reserve -@param a_token The address of the associated aToken contract -@param variable_debt_token The address of the associated variable rate debt token - - -
#[event]
-struct ReserveInitialized has drop, store
-
- - - - - -## Struct `ReserveDataUpdated` - -@dev Emitted when the state of a reserve is updated. -@param reserve The address of the underlying asset of the reserve -@param liquidity_rate The next liquidity rate -@param variable_borrow_rate The next variable borrow rate -@param liquidity_index The next liquidity index -@param variable_borrow_index The next variable borrow index - - -
#[event]
-struct ReserveDataUpdated has drop, store
-
- - - - - -## Struct `MintedToTreasury` - -@dev Emitted when the protocol treasury receives minted aTokens from the accrued interest. -@param reserve The address of the reserve -@param amount_minted The amount minted to the treasury - - -
#[event]
-struct MintedToTreasury has drop, store
-
- - - - - -## Struct `IsolationModeTotalDebtUpdated` - -@dev Emitted on borrow(), repay() and liquidation_call() when using isolated assets -@param asset The address of the underlying asset of the reserve -@param totalDebt The total isolation mode debt for the reserve - - -
#[event]
-struct IsolationModeTotalDebtUpdated has drop, store
-
- - - - - -## Resource `ReserveExtendConfiguration` - - - -
struct ReserveExtendConfiguration has drop, store, key
-
- - - - - -## Resource `ReserveData` - - - -
struct ReserveData has copy, drop, store, key
-
- - - - - -## Resource `ReserveList` - -Map of reserves and their data (underlying_asset_of_reserve => reserveData) - - -
struct ReserveList has key
-
- - - - - -## Resource `ReserveAddressesList` - -List of reserves as a map (reserveId => reserve). -It is structured as a mapping for gas savings reasons, using the reserve id as index - - -
struct ReserveAddressesList has key
-
- - - - - -## Resource `UsersConfig` - -Map of users address and their configuration data (user_address => UserConfigurationMap) - - -
struct UsersConfig has key
-
- - - - - -## Constants - - - - - - -
const POOL_REVISION: u256 = 1;
-
- - - - - -## Function `init_pool` - -@notice init pool - - -
public(friend) fun init_pool(account: &signer)
-
- - - - - -## Function `get_revision` - -@notice Returns the revision number of the contract -@dev Needs to be defined in the inherited class as a constant. -@return The revision number - - -
#[view]
-public fun get_revision(): u256
-
- - - - - -## Function `init_reserve` - -@notice Initializes a reserve, activating it, assigning an aToken and debt tokens and an -interest rate strategy -@dev Only callable by the pool_configurator contract -@param account The address of the caller -@param underlying_asset The address of the underlying asset of the reserve -@param underlying_asset_decimals The decimals of the underlying asset -@param treasury The address of the treasury -@param a_token_name The name of the aToken -@param a_token_symbol The symbol of the aToken -@param variable_debt_token_name The name of the variable debt token -@param variable_debt_token_symbol The symbol of the variable debt token - - -
public(friend) fun init_reserve(account: &signer, underlying_asset: address, underlying_asset_decimals: u8, treasury: address, a_token_name: string::String, a_token_symbol: string::String, variable_debt_token_name: string::String, variable_debt_token_symbol: string::String)
-
- - - - - -## Function `drop_reserve` - -@notice Drop a reserve -@dev Only callable by the pool_configurator contract -@param asset The address of the underlying asset of the reserve - - -
public(friend) fun drop_reserve(asset: address)
-
- - - - - -## Function `get_reserve_data` - -@notice Returns the state and configuration of the reserve -@param asset The address of the underlying asset of the reserve -@return The state and configuration data of the reserve - - -
#[view]
-public fun get_reserve_data(asset: address): pool::ReserveData
-
- - - - - -## Function `get_reserve_data_and_reserves_count` - - - -
#[view]
-public fun get_reserve_data_and_reserves_count(asset: address): (pool::ReserveData, u256)
-
- - - - - -## Function `get_reserve_configuration` - -@notice Returns the configuration of the reserve -@param asset The address of the underlying asset of the reserve -@return The configuration of the reserve - - -
#[view]
-public fun get_reserve_configuration(asset: address): reserve::ReserveConfigurationMap
-
- - - - - -## Function `get_reserves_count` - - - -
#[view]
-public fun get_reserves_count(): u256
-
- - - - - -## Function `get_reserve_configuration_by_reserve_data` - - - -
public fun get_reserve_configuration_by_reserve_data(reserve_data: &pool::ReserveData): reserve::ReserveConfigurationMap
-
- - - - - -## Function `get_reserve_last_update_timestamp` - - - -
public fun get_reserve_last_update_timestamp(reserve: &pool::ReserveData): u64
-
- - - - - -## Function `get_reserve_id` - - - -
public fun get_reserve_id(reserve: &pool::ReserveData): u16
-
- - - - - -## Function `get_reserve_a_token_address` - - - -
public fun get_reserve_a_token_address(reserve: &pool::ReserveData): address
-
- - - - - -## Function `set_reserve_accrued_to_treasury` - - - -
public(friend) fun set_reserve_accrued_to_treasury(asset: address, accrued_to_treasury: u256)
-
- - - - - -## Function `get_reserve_accrued_to_treasury` - - - -
public fun get_reserve_accrued_to_treasury(reserve: &pool::ReserveData): u256
-
- - - - - -## Function `get_reserve_variable_borrow_index` - - - -
public fun get_reserve_variable_borrow_index(reserve: &pool::ReserveData): u128
-
- - - - - -## Function `get_reserve_liquidity_index` - - - -
public fun get_reserve_liquidity_index(reserve: &pool::ReserveData): u128
-
- - - - - -## Function `get_reserve_current_liquidity_rate` - - - -
public fun get_reserve_current_liquidity_rate(reserve: &pool::ReserveData): u128
-
- - - - - -## Function `get_reserve_current_variable_borrow_rate` - - - -
public fun get_reserve_current_variable_borrow_rate(reserve: &pool::ReserveData): u128
-
- - - - - -## Function `get_reserve_variable_debt_token_address` - - - -
public fun get_reserve_variable_debt_token_address(reserve: &pool::ReserveData): address
-
- - - - - -## Function `set_reserve_unbacked` - - - -
public(friend) fun set_reserve_unbacked(asset: address, reserve_data_mut: &mut pool::ReserveData, unbacked: u128)
-
- - - - - -## Function `get_reserve_unbacked` - - - -
public fun get_reserve_unbacked(reserve: &pool::ReserveData): u128
-
- - - - - -## Function `set_reserve_isolation_mode_total_debt` - - - -
public(friend) fun set_reserve_isolation_mode_total_debt(asset: address, isolation_mode_total_debt: u128)
-
- - - - - -## Function `get_reserve_isolation_mode_total_debt` - - - -
public fun get_reserve_isolation_mode_total_debt(reserve: &pool::ReserveData): u128
-
- - - - - -## Function `set_reserve_configuration` - -@notice Sets the configuration bitmap of the reserve as a whole -@dev Only callable by the pool_configurator and pool contract -@param asset The address of the underlying asset of the reserve -@param reserve_config_map The new configuration bitmap - - -
public(friend) fun set_reserve_configuration(asset: address, reserve_config_map: reserve::ReserveConfigurationMap)
-
- - - - - -## Function `get_user_configuration` - - - -
#[view]
-public fun get_user_configuration(user: address): user::UserConfigurationMap
-
- - - - - -## Function `set_user_configuration` - - - -
public(friend) fun set_user_configuration(user: address, user_config_map: user::UserConfigurationMap)
-
- - - - - -## Function `get_reserve_normalized_income` - -@notice Returns the normalized income of the reserve -@param asset The address of the underlying asset of the reserve -@return The reserve's normalized income - - -
#[view]
-public fun get_reserve_normalized_income(asset: address): u256
-
- - - - - -## Function `get_normalized_income_by_reserve_data` - -@notice Returns the ongoing normalized income for the reserve. -@dev A value of 1e27 means there is no income. As time passes, the income is accrued -@dev A value of 2*1e27 means for each unit of asset one unit of income has been accrued -@param reserve_data The reserve object -@return The normalized income, expressed in ray - - -
public fun get_normalized_income_by_reserve_data(reserve_data: &pool::ReserveData): u256
-
- - - - - -## Function `update_state` - -@notice Updates the liquidity cumulative index and the variable borrow index. -@param asset The address of the underlying asset of the reserve -@param reserve_data The reserve data - - -
public(friend) fun update_state(asset: address, reserve_data: &mut pool::ReserveData)
-
- - - - - -## Function `get_reserve_normalized_variable_debt` - -@notice Returns the normalized variable debt per unit of asset -@dev WARNING: This function is intended to be used primarily by the protocol itself to get a -"dynamic" variable index based on time, current stored index and virtual rate at the current -moment (approx. a borrower would get if opening a position). This means that is always used in -combination with variable debt supply/balances. -If using this function externally, consider that is possible to have an increasing normalized -variable debt that is not equivalent to how the variable debt index would be updated in storage -(e.g. only updates with non-zero variable debt supply) -@param asset The address of the underlying asset of the reserve -@return The reserve normalized variable debt - - -
#[view]
-public fun get_reserve_normalized_variable_debt(asset: address): u256
-
- - - - - -## Function `get_normalized_debt_by_reserve_data` - -@notice Returns the ongoing normalized variable debt for the reserve. -@dev A value of 1e27 means there is no debt. As time passes, the debt is accrued -@dev A value of 2*1e27 means that for each unit of debt, one unit worth of interest has been accumulated -@param reserve_data The reserve object -@return The normalized variable debt, expressed in ray - - -
public fun get_normalized_debt_by_reserve_data(reserve_data: &pool::ReserveData): u256
-
- - - - - -## Function `get_reserves_list` - -@notice Returns the list of the underlying assets of all the initialized reserves -@dev It does not include dropped reserves -@return The addresses of the underlying assets of the initialized reserves - - -
#[view]
-public fun get_reserves_list(): vector<address>
-
- - - - - -## Function `get_reserve_address_by_id` - -@notice Returns the address of the underlying asset of a reserve by the reserve id as stored in the ReserveData struct -@param id The id of the reserve as stored in the ReserveData struct -@return The address of the reserve associated with id - - -
#[view]
-public fun get_reserve_address_by_id(id: u256): address
-
- - - - - -## Function `mint_to_treasury` - -@notice Mints the assets accrued through the reserve factor to the treasury in the form of aTokens -@param assets The list of reserves for which the minting needs to be executed - - -
public entry fun mint_to_treasury(assets: vector<address>)
-
- - - - - -## Function `get_bridge_protocol_fee` - - - -
#[view]
-public fun get_bridge_protocol_fee(): u256
-
- - - - - -## Function `set_bridge_protocol_fee` - - - -
public(friend) fun set_bridge_protocol_fee(protocol_fee: u256)
-
- - - - - -## Function `get_flashloan_premium_total` - - - -
#[view]
-public fun get_flashloan_premium_total(): u128
-
- - - - - -## Function `update_flashloan_premiums` - -@notice Updates flash loan premiums. Flash loan premium consists of two parts: -- A part is sent to aToken holders as extra, one time accumulated interest -- A part is collected by the protocol treasury -@dev The total premium is calculated on the total borrowed amount -@dev The premium to protocol is calculated on the total premium, being a percentage of flashLoanPremiumTotal -@dev Only callable by the pool_configurator contract -@param flash_loan_premium_total The total premium, expressed in bps -@param flash_loan_premium_to_protocol The part of the premium sent to the protocol treasury, expressed in bps - - -
public(friend) fun update_flashloan_premiums(flash_loan_premium_total: u128, flash_loan_premium_to_protocol: u128)
-
- - - - - -## Function `get_flashloan_premium_to_protocol` - - - -
#[view]
-public fun get_flashloan_premium_to_protocol(): u128
-
- - - - - -## Function `max_number_reserves` - -@notice Returns the maximum number of reserves supported to be listed in this Pool -@return The maximum number of reserves supported - - -
#[view]
-public fun max_number_reserves(): u16
-
- - - - - -## Function `update_interest_rates` - -@notice Updates the reserve the current variable borrow rate and the current liquidity rate. -@param reserve_data The reserve data reserve to be updated -@param reserve_address The address of the reserve to be updated -@param liquidity_added The amount of liquidity added to the protocol (supply or repay) in the previous action -@param liquidity_taken The amount of liquidity taken from the protocol (redeem or borrow) - - -
public(friend) fun update_interest_rates(reserve_data: &mut pool::ReserveData, reserve_address: address, liquidity_added: u256, liquidity_taken: u256)
-
- - - - - -## Function `get_isolation_mode_state` - -@notice Returns the Isolation Mode state of the user -@param user_config_map The configuration of the user -@return True if the user is in isolation mode, false otherwise -@return The address of the only asset used as collateral -@return The debt ceiling of the reserve - - -
public fun get_isolation_mode_state(user_config_map: &user::UserConfigurationMap): (bool, address, u256)
-
- - - - - -## Function `get_siloed_borrowing_state` - -@notice Returns the siloed borrowing state for the user -@param account The address of the user -@return True if the user has borrowed a siloed asset, false otherwise -@return The address of the only borrowed asset - - -
public fun get_siloed_borrowing_state(account: address): (bool, address)
-
- - - - - -## Function `cumulate_to_liquidity_index` - - - -
public(friend) fun cumulate_to_liquidity_index(asset: address, reserve_data: &mut pool::ReserveData, total_liquidity: u256, amount: u256): u256
-
- - - - - -## Function `reset_isolation_mode_total_debt` - -@notice Resets the isolation mode total debt of the given asset to zero -@dev It requires the given asset has zero debt ceiling -@param asset The address of the underlying asset to reset the isolation_mode_total_debt - - -
public(friend) fun reset_isolation_mode_total_debt(asset: address)
-
- - - - - -## Function `rescue_tokens` - -@notice Rescue and transfer tokens locked in this contract -@param token The address of the token -@param to The address of the recipient -@param amount The amount of token to transfer - - -
public entry fun rescue_tokens(account: &signer, token: address, to: address, amount: u256)
-
- - - - - -## Function `scaled_a_token_total_supply` - - - -
#[view]
-public fun scaled_a_token_total_supply(a_token_address: address): u256
-
- - - - - -## Function `scaled_a_token_balance_of` - - - -
#[view]
-public fun scaled_a_token_balance_of(owner: address, a_token_address: address): u256
-
- - - - - -## Function `scaled_variable_token_total_supply` - - - -
#[view]
-public fun scaled_variable_token_total_supply(variable_debt_token_address: address): u256
-
- - - - - -## Function `scaled_variable_token_balance_of` - - - -
#[view]
-public fun scaled_variable_token_balance_of(owner: address, variable_debt_token_address: address): u256
-
diff --git a/aave-core/doc/pool_addresses_provider.md b/aave-core/doc/pool_addresses_provider.md deleted file mode 100644 index 6b8cf71..0000000 --- a/aave-core/doc/pool_addresses_provider.md +++ /dev/null @@ -1,465 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool_addresses_provider` - - - -- [Struct `MarketIdSet`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_MarketIdSet) -- [Struct `PoolUpdated`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_PoolUpdated) -- [Struct `PoolConfiguratorUpdated`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_PoolConfiguratorUpdated) -- [Struct `PriceOracleUpdated`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_PriceOracleUpdated) -- [Struct `ACLManagerUpdated`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_ACLManagerUpdated) -- [Struct `ACLAdminUpdated`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_ACLAdminUpdated) -- [Struct `PriceOracleSentinelUpdated`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_PriceOracleSentinelUpdated) -- [Struct `PoolDataProviderUpdated`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_PoolDataProviderUpdated) -- [Resource `Provider`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_Provider) -- [Constants](#@Constants_0) -- [Function `has_id_mapped_account`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_has_id_mapped_account) -- [Function `get_market_id`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_get_market_id) -- [Function `set_market_id`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_set_market_id) -- [Function `get_address`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_get_address) -- [Function `set_address`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_set_address) -- [Function `get_pool`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_get_pool) -- [Function `set_pool_impl`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_set_pool_impl) -- [Function `get_pool_configurator`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_get_pool_configurator) -- [Function `set_pool_configurator`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_set_pool_configurator) -- [Function `get_price_oracle`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_get_price_oracle) -- [Function `set_price_oracle`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_set_price_oracle) -- [Function `get_acl_manager`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_get_acl_manager) -- [Function `set_acl_manager`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_set_acl_manager) -- [Function `get_acl_admin`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_get_acl_admin) -- [Function `set_acl_admin`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_set_acl_admin) -- [Function `get_price_oracle_sentinel`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_get_price_oracle_sentinel) -- [Function `set_price_oracle_sentinel`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_set_price_oracle_sentinel) -- [Function `get_pool_data_provider`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_get_pool_data_provider) -- [Function `set_pool_data_provider`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_addresses_provider_set_pool_data_provider) - - -
use 0x1::event;
-use 0x1::option;
-use 0x1::signer;
-use 0x1::smart_table;
-use 0x1::string;
-
- - - - - -## Struct `MarketIdSet` - - - -
#[event]
-struct MarketIdSet has drop, store
-
- - - - - -## Struct `PoolUpdated` - - - -
#[event]
-struct PoolUpdated has drop, store
-
- - - - - -## Struct `PoolConfiguratorUpdated` - - - -
#[event]
-struct PoolConfiguratorUpdated has drop, store
-
- - - - - -## Struct `PriceOracleUpdated` - - - -
#[event]
-struct PriceOracleUpdated has drop, store
-
- - - - - -## Struct `ACLManagerUpdated` - - - -
#[event]
-struct ACLManagerUpdated has drop, store
-
- - - - - -## Struct `ACLAdminUpdated` - - - -
#[event]
-struct ACLAdminUpdated has drop, store
-
- - - - - -## Struct `PriceOracleSentinelUpdated` - - - -
#[event]
-struct PriceOracleSentinelUpdated has drop, store
-
- - - - - -## Struct `PoolDataProviderUpdated` - - - -
#[event]
-struct PoolDataProviderUpdated has drop, store
-
- - - - - -## Resource `Provider` - - - -
struct Provider has store, key
-
- - - - - -## Constants - - - - - - -
const ENOT_MANAGEMENT: u64 = 1;
-
- - - - - - - -
const ACL_ADMIN: vector<u8> = [65, 67, 76, 95, 65, 68, 77, 73, 78];
-
- - - - - - - -
const ACL_MANAGER: vector<u8> = [65, 67, 76, 95, 77, 65, 78, 65, 71, 69, 82];
-
- - - - - - - -
const DATA_PROVIDER: vector<u8> = [68, 65, 84, 65, 95, 80, 82, 79, 86, 73, 68, 69, 82];
-
- - - - - - - -
const EID_ALREADY_EXISTS: u64 = 2;
-
- - - - - - - -
const EID_NOT_EXISTS: u64 = 3;
-
- - - - - - - -
const POOL: vector<u8> = [80, 79, 79, 76];
-
- - - - - - - -
const POOL_CONFIGURATOR: vector<u8> = [80, 79, 79, 76, 95, 67, 79, 78, 70, 73, 71, 85, 82, 65, 84, 79, 82];
-
- - - - - - - -
const PRICE_ORACLE: vector<u8> = [80, 82, 73, 67, 69, 95, 79, 82, 65, 67, 76, 69];
-
- - - - - - - -
const PRICE_ORACLE_SENTINEL: vector<u8> = [80, 82, 73, 67, 69, 95, 79, 82, 65, 67, 76, 69, 95, 83, 69, 78, 84, 73, 78, 69, 76];
-
- - - - - -## Function `has_id_mapped_account` - - - -
#[view]
-public fun has_id_mapped_account(id: string::String): bool
-
- - - - - -## Function `get_market_id` - - - -
#[view]
-public fun get_market_id(): option::Option<string::String>
-
- - - - - -## Function `set_market_id` - - - -
public entry fun set_market_id(account: &signer, new_market_id: string::String)
-
- - - - - -## Function `get_address` - - - -
#[view]
-public fun get_address(id: string::String): option::Option<address>
-
- - - - - -## Function `set_address` - - - -
public entry fun set_address(account: &signer, id: string::String, addr: address)
-
- - - - - -## Function `get_pool` - - - -
#[view]
-public fun get_pool(): option::Option<address>
-
- - - - - -## Function `set_pool_impl` - - - -
public entry fun set_pool_impl(account: &signer, new_pool_impl: address)
-
- - - - - -## Function `get_pool_configurator` - - - -
#[view]
-public fun get_pool_configurator(): option::Option<address>
-
- - - - - -## Function `set_pool_configurator` - - - -
public entry fun set_pool_configurator(account: &signer, new_pool_configurator_impl: address)
-
- - - - - -## Function `get_price_oracle` - - - -
#[view]
-public fun get_price_oracle(): option::Option<address>
-
- - - - - -## Function `set_price_oracle` - - - -
public entry fun set_price_oracle(account: &signer, new_price_oracle_impl: address)
-
- - - - - -## Function `get_acl_manager` - - - -
#[view]
-public fun get_acl_manager(): option::Option<address>
-
- - - - - -## Function `set_acl_manager` - - - -
public entry fun set_acl_manager(account: &signer, new_acl_manager_impl: address)
-
- - - - - -## Function `get_acl_admin` - - - -
#[view]
-public fun get_acl_admin(): option::Option<address>
-
- - - - - -## Function `set_acl_admin` - - - -
public entry fun set_acl_admin(account: &signer, new_acl_admin_impl: address)
-
- - - - - -## Function `get_price_oracle_sentinel` - - - -
#[view]
-public fun get_price_oracle_sentinel(): option::Option<address>
-
- - - - - -## Function `set_price_oracle_sentinel` - - - -
public entry fun set_price_oracle_sentinel(account: &signer, new_price_oracle_sentinel_impl: address)
-
- - - - - -## Function `get_pool_data_provider` - - - -
#[view]
-public fun get_pool_data_provider(): option::Option<address>
-
- - - - - -## Function `set_pool_data_provider` - - - -
public entry fun set_pool_data_provider(account: &signer, new_pool_data_provider_impl: address)
-
diff --git a/aave-core/doc/pool_configurator.md b/aave-core/doc/pool_configurator.md deleted file mode 100644 index 8703d4d..0000000 --- a/aave-core/doc/pool_configurator.md +++ /dev/null @@ -1,752 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool_configurator` - - - -- [Struct `ReserveBorrowing`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_ReserveBorrowing) -- [Struct `ReserveFlashLoaning`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_ReserveFlashLoaning) -- [Struct `CollateralConfigurationChanged`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_CollateralConfigurationChanged) -- [Struct `ReserveActive`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_ReserveActive) -- [Struct `ReserveFrozen`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_ReserveFrozen) -- [Struct `ReservePaused`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_ReservePaused) -- [Struct `ReserveDropped`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_ReserveDropped) -- [Struct `ReserveFactorChanged`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_ReserveFactorChanged) -- [Struct `BorrowCapChanged`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_BorrowCapChanged) -- [Struct `SupplyCapChanged`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_SupplyCapChanged) -- [Struct `LiquidationProtocolFeeChanged`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_LiquidationProtocolFeeChanged) -- [Struct `UnbackedMintCapChanged`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_UnbackedMintCapChanged) -- [Struct `EModeAssetCategoryChanged`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_EModeAssetCategoryChanged) -- [Struct `EModeCategoryAdded`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_EModeCategoryAdded) -- [Struct `DebtCeilingChanged`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_DebtCeilingChanged) -- [Struct `SiloedBorrowingChanged`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_SiloedBorrowingChanged) -- [Struct `BridgeProtocolFeeUpdated`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_BridgeProtocolFeeUpdated) -- [Struct `FlashloanPremiumTotalUpdated`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_FlashloanPremiumTotalUpdated) -- [Struct `FlashloanPremiumToProtocolUpdated`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_FlashloanPremiumToProtocolUpdated) -- [Struct `BorrowableInIsolationChanged`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_BorrowableInIsolationChanged) -- [Constants](#@Constants_0) -- [Function `get_revision`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_get_revision) -- [Function `init_reserves`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_init_reserves) -- [Function `drop_reserve`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_drop_reserve) -- [Function `set_reserve_borrowing`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_set_reserve_borrowing) -- [Function `configure_reserve_as_collateral`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_configure_reserve_as_collateral) -- [Function `set_reserve_flash_loaning`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_set_reserve_flash_loaning) -- [Function `set_reserve_active`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_set_reserve_active) -- [Function `set_reserve_freeze`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_set_reserve_freeze) -- [Function `set_borrowable_in_isolation`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_set_borrowable_in_isolation) -- [Function `set_reserve_pause`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_set_reserve_pause) -- [Function `set_reserve_factor`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_set_reserve_factor) -- [Function `set_debt_ceiling`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_set_debt_ceiling) -- [Function `set_siloed_borrowing`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_set_siloed_borrowing) -- [Function `set_borrow_cap`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_set_borrow_cap) -- [Function `set_supply_cap`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_set_supply_cap) -- [Function `set_liquidation_protocol_fee`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_set_liquidation_protocol_fee) -- [Function `set_emode_category`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_set_emode_category) -- [Function `set_asset_emode_category`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_set_asset_emode_category) -- [Function `set_unbacked_mint_cap`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_set_unbacked_mint_cap) -- [Function `set_pool_pause`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_set_pool_pause) -- [Function `update_bridge_protocol_fee`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_update_bridge_protocol_fee) -- [Function `update_flashloan_premium_total`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_update_flashloan_premium_total) -- [Function `update_flashloan_premium_to_protocol`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_update_flashloan_premium_to_protocol) -- [Function `configure_reserves`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_configurator_configure_reserves) - - -
use 0x1::event;
-use 0x1::signer;
-use 0x1::string;
-use 0x9efefdec8fe22b7447931b81745048182594ef72653dfbf8e05b815ecc355f7c::math_utils;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::default_reserve_interest_rate_strategy;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::emode_logic;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool;
-use 0xd329b8b371bf56fdbfbb66f441a8463f3605ecb27ee0c484f85a4cf88883d2f9::acl_manage;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::error;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::reserve;
-
- - - - - -## Struct `ReserveBorrowing` - -@dev Emitted when borrowing is enabled or disabled on a reserve. -@param asset The address of the underlying asset of the reserve -@param enabled True if borrowing is enabled, false otherwise - - -
#[event]
-struct ReserveBorrowing has drop, store
-
- - - - - -## Struct `ReserveFlashLoaning` - -@dev Emitted when flashloans are enabled or disabled on a reserve. -@param asset The address of the underlying asset of the reserve -@param enabled True if flashloans are enabled, false otherwise - - -
#[event]
-struct ReserveFlashLoaning has drop, store
-
- - - - - -## Struct `CollateralConfigurationChanged` - -@dev Emitted when the collateralization risk parameters for the specified asset are updated. -@param asset The address of the underlying asset of the reserve -@param ltv The loan to value of the asset when used as collateral -@param liquidation_threshold The threshold at which loans using this asset as collateral will be considered undercollateralized -@param liquidation_bonus The bonus liquidators receive to liquidate this asset - - -
#[event]
-struct CollateralConfigurationChanged has drop, store
-
- - - - - -## Struct `ReserveActive` - -@dev Emitted when a reserve is activated or deactivated -@param asset The address of the underlying asset of the reserve -@param active True if reserve is active, false otherwise - - -
#[event]
-struct ReserveActive has drop, store
-
- - - - - -## Struct `ReserveFrozen` - -@dev Emitted when a reserve is frozen or unfrozen -@param asset The address of the underlying asset of the reserve -@param frozen True if reserve is frozen, false otherwise - - -
#[event]
-struct ReserveFrozen has drop, store
-
- - - - - -## Struct `ReservePaused` - -@dev Emitted when a reserve is paused or unpaused -@param asset The address of the underlying asset of the reserve -@param paused True if reserve is paused, false otherwise - - -
#[event]
-struct ReservePaused has drop, store
-
- - - - - -## Struct `ReserveDropped` - -@dev Emitted when a reserve is dropped. -@param asset The address of the underlying asset of the reserve - - -
#[event]
-struct ReserveDropped has drop, store
-
- - - - - -## Struct `ReserveFactorChanged` - -@dev Emitted when a reserve factor is updated. -@param asset The address of the underlying asset of the reserve -@param old_reserve_factor The old reserve factor, expressed in bps -@param new_reserve_factor The new reserve factor, expressed in bps - - -
#[event]
-struct ReserveFactorChanged has drop, store
-
- - - - - -## Struct `BorrowCapChanged` - -@dev Emitted when the borrow cap of a reserve is updated. -@param asset The address of the underlying asset of the reserve -@param old_borrow_cap The old borrow cap -@param new_borrow_cap The new borrow cap - - -
#[event]
-struct BorrowCapChanged has drop, store
-
- - - - - -## Struct `SupplyCapChanged` - -@dev Emitted when the supply cap of a reserve is updated. -@param asset The address of the underlying asset of the reserve -@param old_supply_cap The old supply cap -@param new_supply_cap The new supply cap - - -
#[event]
-struct SupplyCapChanged has drop, store
-
- - - - - -## Struct `LiquidationProtocolFeeChanged` - -@dev Emitted when the liquidation protocol fee of a reserve is updated. -@param asset The address of the underlying asset of the reserve -@param old_fee The old liquidation protocol fee, expressed in bps -@param new_fee The new liquidation protocol fee, expressed in bps - - -
#[event]
-struct LiquidationProtocolFeeChanged has drop, store
-
- - - - - -## Struct `UnbackedMintCapChanged` - -@dev Emitted when the unbacked mint cap of a reserve is updated. -@param asset The address of the underlying asset of the reserve -@param old_unbacked_mint_cap The old unbacked mint cap -@param new_unbacked_mint_cap The new unbacked mint cap - - -
#[event]
-struct UnbackedMintCapChanged has drop, store
-
- - - - - -## Struct `EModeAssetCategoryChanged` - -@dev Emitted when the category of an asset in eMode is changed. -@param asset The address of the underlying asset of the reserve -@param old_category_id The old eMode asset category -@param new_category_id The new eMode asset category - - -
#[event]
-struct EModeAssetCategoryChanged has drop, store
-
- - - - - -## Struct `EModeCategoryAdded` - -@dev Emitted when a new eMode category is added. -@param category_id The new eMode category id -@param ltv The ltv for the asset category in eMode -@param liquidation_threshold The liquidationThreshold for the asset category in eMode -@param liquidation_bonus The liquidationBonus for the asset category in eMode -@param oracle The optional address of the price oracle specific for this category -@param label A human readable identifier for the category - - -
#[event]
-struct EModeCategoryAdded has drop, store
-
- - - - - -## Struct `DebtCeilingChanged` - -@dev Emitted when the debt ceiling of an asset is set. -@param asset The address of the underlying asset of the reserve -@param old_debt_ceiling The old debt ceiling -@param new_debt_ceiling The new debt ceiling - - -
#[event]
-struct DebtCeilingChanged has drop, store
-
- - - - - -## Struct `SiloedBorrowingChanged` - -@dev Emitted when the the siloed borrowing state for an asset is changed. -@param asset The address of the underlying asset of the reserve -@param old_state The old siloed borrowing state -@param new_state The new siloed borrowing state - - -
#[event]
-struct SiloedBorrowingChanged has drop, store
-
- - - - - -## Struct `BridgeProtocolFeeUpdated` - -@dev Emitted when the bridge protocol fee is updated. -@param old_bridge_protocol_fee The old protocol fee, expressed in bps -@param new_bridge_protocol_fee The new protocol fee, expressed in bps - - -
#[event]
-struct BridgeProtocolFeeUpdated has drop, store
-
- - - - - -## Struct `FlashloanPremiumTotalUpdated` - -@dev Emitted when the total premium on flashloans is updated. -@param old_flashloan_premium_total The old premium, expressed in bps -@param new_flashloan_premium_total The new premium, expressed in bps - - -
#[event]
-struct FlashloanPremiumTotalUpdated has drop, store
-
- - - - - -## Struct `FlashloanPremiumToProtocolUpdated` - -@dev Emitted when the part of the premium that goes to protocol is updated. -@param old_flashloan_premium_to_protocol The old premium, expressed in bps -@param new_flashloan_premium_to_protocol The new premium, expressed in bps - - -
#[event]
-struct FlashloanPremiumToProtocolUpdated has drop, store
-
- - - - - -## Struct `BorrowableInIsolationChanged` - -@dev Emitted when the reserve is set as borrowable/non borrowable in isolation mode. -@param asset The address of the underlying asset of the reserve -@param borrowable True if the reserve is borrowable in isolation, false otherwise - - -
#[event]
-struct BorrowableInIsolationChanged has drop, store
-
- - - - - -## Constants - - - - - - -
const CONFIGURATOR_REVISION: u256 = 1;
-
- - - - - -## Function `get_revision` - -@notice Returns the revision of the configurator - - -
#[view]
-public fun get_revision(): u256
-
- - - - - -## Function `init_reserves` - -@notice Initializes multiple reserves. -@param account The address of the caller -@param underlying_asset The list of the underlying assets of the reserves -@param underlying_asset_decimals The list of the decimals of the underlying assets -@param treasury The list of the treasury addresses of the reserves -@param a_token_name The list of the aToken names of the reserves -@param a_token_symbol The list of the aToken symbols of the reserves -@param variable_debt_token_name The list of the variable debt token names of the reserves -@param variable_debt_token_symbol The list of the variable debt token symbols of the reserves -@dev The caller needs to be an asset listing or pool admin - - -
public entry fun init_reserves(account: &signer, underlying_asset: vector<address>, underlying_asset_decimals: vector<u8>, treasury: vector<address>, a_token_name: vector<string::String>, a_token_symbol: vector<string::String>, variable_debt_token_name: vector<string::String>, variable_debt_token_symbol: vector<string::String>)
-
- - - - - -## Function `drop_reserve` - -@notice Drops a reserve entirely. -@param account The address of the caller -@param asset The address of the reserve to drop - - -
public entry fun drop_reserve(account: &signer, asset: address)
-
- - - - - -## Function `set_reserve_borrowing` - -@notice Configures borrowing on a reserve. -@dev Can only be disabled (set to false) -@param asset The address of the underlying asset of the reserve -@param enabled True if borrowing needs to be enabled, false otherwise - - -
public entry fun set_reserve_borrowing(account: &signer, asset: address, enabled: bool)
-
- - - - - -## Function `configure_reserve_as_collateral` - -@notice Configures the reserve collateralization parameters. -@dev All the values are expressed in bps. A value of 10000, results in 100.00% -@dev The liquidation_bonus is always above 100%. A value of 105% means the liquidator will receive a 5% bonus -@param asset The address of the underlying asset of the reserve -@param ltv The loan to value of the asset when used as collateral -@param liquidation_threshold The threshold at which loans using this asset as collateral will be considered undercollateralized -@param liquidation_bonus The bonus liquidators receive to liquidate this asset - - -
public entry fun configure_reserve_as_collateral(account: &signer, asset: address, ltv: u256, liquidation_threshold: u256, liquidation_bonus: u256)
-
- - - - - -## Function `set_reserve_flash_loaning` - -@notice Enable or disable flashloans on a reserve -@param asset The address of the underlying asset of the reserve -@param enabled True if flashloans need to be enabled, false otherwise - - -
public entry fun set_reserve_flash_loaning(account: &signer, asset: address, enabled: bool)
-
- - - - - -## Function `set_reserve_active` - -@notice Activate or deactivate a reserve -@param asset The address of the underlying asset of the reserve -@param active True if the reserve needs to be active, false otherwise - - -
public entry fun set_reserve_active(account: &signer, asset: address, active: bool)
-
- - - - - -## Function `set_reserve_freeze` - -@notice Freeze or unfreeze a reserve. A frozen reserve doesn't allow any new supply, borrow -or rate swap but allows repayments, liquidations, rate rebalances and withdrawals. -@param asset The address of the underlying asset of the reserve -@param freeze True if the reserve needs to be frozen, false otherwise - - -
public entry fun set_reserve_freeze(account: &signer, asset: address, freeze: bool)
-
- - - - - -## Function `set_borrowable_in_isolation` - -@notice Sets the borrowable in isolation flag for the reserve. -@dev When this flag is set to true, the asset will be borrowable against isolated collaterals and the -borrowed amount will be accumulated in the isolated collateral's total debt exposure -@dev Only assets of the same family (e.g. USD stablecoins) should be borrowable in isolation mode to keep -consistency in the debt ceiling calculations -@param asset The address of the underlying asset of the reserve -@param borrowable True if the asset should be borrowable in isolation, false otherwise - - -
public entry fun set_borrowable_in_isolation(account: &signer, asset: address, borrowable: bool)
-
- - - - - -## Function `set_reserve_pause` - -@notice Pauses a reserve. A paused reserve does not allow any interaction (supply, borrow, repay, -swap interest rate, liquidate, atoken transfers). -@param asset The address of the underlying asset of the reserve -@param paused True if pausing the reserve, false if unpausing - - -
public entry fun set_reserve_pause(account: &signer, asset: address, paused: bool)
-
- - - - - -## Function `set_reserve_factor` - -@notice Updates the reserve factor of a reserve. -@param asset The address of the underlying asset of the reserve -@param new_reserve_factor The new reserve factor of the reserve - - -
public entry fun set_reserve_factor(account: &signer, asset: address, new_reserve_factor: u256)
-
- - - - - -## Function `set_debt_ceiling` - -@notice Sets the debt ceiling for an asset. -@param new_debt_ceiling The new debt ceiling - - -
public entry fun set_debt_ceiling(account: &signer, asset: address, new_debt_ceiling: u256)
-
- - - - - -## Function `set_siloed_borrowing` - -@notice Sets siloed borrowing for an asset -@param new_siloed The new siloed borrowing state - - -
public entry fun set_siloed_borrowing(account: &signer, asset: address, new_siloed: bool)
-
- - - - - -## Function `set_borrow_cap` - -@notice Updates the borrow cap of a reserve. -@param asset The address of the underlying asset of the reserve -@param new_borrow_cap The new borrow cap of the reserve - - -
public entry fun set_borrow_cap(account: &signer, asset: address, new_borrow_cap: u256)
-
- - - - - -## Function `set_supply_cap` - -@notice Updates the supply cap of a reserve. -@param asset The address of the underlying asset of the reserve -@param new_supply_cap The new supply cap of the reserve - - -
public entry fun set_supply_cap(account: &signer, asset: address, new_supply_cap: u256)
-
- - - - - -## Function `set_liquidation_protocol_fee` - -@notice Updates the liquidation protocol fee of reserve. -@param asset The address of the underlying asset of the reserve -@param new_fee The new liquidation protocol fee of the reserve, expressed in bps - - -
public entry fun set_liquidation_protocol_fee(account: &signer, asset: address, new_fee: u256)
-
- - - - - -## Function `set_emode_category` - -@notice Adds a new efficiency mode (eMode) category. -@dev If zero is provided as oracle address, the default asset oracles will be used to compute the overall debt and -overcollateralization of the users using this category. -@dev The new ltv and liquidation threshold must be greater than the base -ltvs and liquidation thresholds of all assets within the eMode category -@param category_id The id of the category to be configured -@param ltv The ltv associated with the category -@param liquidation_threshold The liquidation threshold associated with the category -@param liquidation_bonus The liquidation bonus associated with the category -@param oracle The oracle associated with the category -@param label A label identifying the category - - -
public entry fun set_emode_category(account: &signer, category_id: u8, ltv: u16, liquidation_threshold: u16, liquidation_bonus: u16, oracle: address, label: string::String)
-
- - - - - -## Function `set_asset_emode_category` - -@notice Assign an efficiency mode (eMode) category to asset. -@param asset The address of the underlying asset of the reserve -@param new_category_id The new category id of the asset - - -
public entry fun set_asset_emode_category(account: &signer, asset: address, new_category_id: u8)
-
- - - - - -## Function `set_unbacked_mint_cap` - -@notice Updates the unbacked mint cap of reserve. -@param asset The address of the underlying asset of the reserve -@param new_unbacked_mint_cap The new unbacked mint cap of the reserve - - -
public entry fun set_unbacked_mint_cap(account: &signer, asset: address, new_unbacked_mint_cap: u256)
-
- - - - - -## Function `set_pool_pause` - -@notice Pauses or unpauses all the protocol reserves. In the paused state all the protocol interactions -are suspended. -@param paused True if protocol needs to be paused, false otherwise - - -
public entry fun set_pool_pause(account: &signer, paused: bool)
-
- - - - - -## Function `update_bridge_protocol_fee` - -@notice Updates the protocol fee on the bridging -@param new_bridge_protocol_fee The part of the premium sent to the protocol treasury - - -
public entry fun update_bridge_protocol_fee(account: &signer, new_bridge_protocol_fee: u256)
-
- - - - - -## Function `update_flashloan_premium_total` - -@notice Updates the total flash loan premium. -Total flash loan premium consists of two parts: -- A part is sent to aToken holders as extra balance -- A part is collected by the protocol reserves -@dev Expressed in bps -@dev The premium is calculated on the total amount borrowed -@param new_flashloan_premium_total The total flashloan premium - - -
public entry fun update_flashloan_premium_total(account: &signer, new_flashloan_premium_total: u128)
-
- - - - - -## Function `update_flashloan_premium_to_protocol` - -@notice Updates the flash loan premium collected by protocol reserves -@dev Expressed in bps -@dev The premium to protocol is calculated on the total flashloan premium -@param new_flashloan_premium_to_protocol The part of the flashloan premium sent to the protocol treasury - - -
public entry fun update_flashloan_premium_to_protocol(account: &signer, new_flashloan_premium_to_protocol: u128)
-
- - - - - -## Function `configure_reserves` - - - -
public entry fun configure_reserves(account: &signer, asset: vector<address>, base_ltv: vector<u256>, liquidation_threshold: vector<u256>, liquidation_bonus: vector<u256>, reserve_factor: vector<u256>, borrow_cap: vector<u256>, supply_cap: vector<u256>, borrowing_enabled: vector<bool>, flash_loan_enabled: vector<bool>)
-
diff --git a/aave-core/doc/pool_data_provider.md b/aave-core/doc/pool_data_provider.md deleted file mode 100644 index 8a4f7e0..0000000 --- a/aave-core/doc/pool_data_provider.md +++ /dev/null @@ -1,263 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool_data_provider` - - - -- [Struct `TokenData`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_data_provider_TokenData) -- [Function `get_all_reserves_tokens`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_data_provider_get_all_reserves_tokens) -- [Function `get_all_a_tokens`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_data_provider_get_all_a_tokens) -- [Function `get_all_var_tokens`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_data_provider_get_all_var_tokens) -- [Function `get_reserve_configuration_data`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_data_provider_get_reserve_configuration_data) -- [Function `get_reserve_emode_category`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_data_provider_get_reserve_emode_category) -- [Function `get_reserve_caps`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_data_provider_get_reserve_caps) -- [Function `get_paused`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_data_provider_get_paused) -- [Function `get_siloed_borrowing`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_data_provider_get_siloed_borrowing) -- [Function `get_liquidation_protocol_fee`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_data_provider_get_liquidation_protocol_fee) -- [Function `get_unbacked_mint_cap`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_data_provider_get_unbacked_mint_cap) -- [Function `get_debt_ceiling`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_data_provider_get_debt_ceiling) -- [Function `get_debt_ceiling_decimals`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_data_provider_get_debt_ceiling_decimals) -- [Function `get_reserve_data`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_data_provider_get_reserve_data) -- [Function `get_a_token_total_supply`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_data_provider_get_a_token_total_supply) -- [Function `get_total_debt`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_data_provider_get_total_debt) -- [Function `get_user_reserve_data`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_data_provider_get_user_reserve_data) -- [Function `get_reserve_tokens_addresses`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_data_provider_get_reserve_tokens_addresses) -- [Function `get_flash_loan_enabled`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_data_provider_get_flash_loan_enabled) - - -
use 0x1::string;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::a_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::mock_underlying_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::variable_debt_token_factory;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::reserve;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::user;
-
- - - - - -## Struct `TokenData` - - - -
struct TokenData has drop
-
- - - - - -## Function `get_all_reserves_tokens` - - - -
#[view]
-public fun get_all_reserves_tokens(): vector<pool_data_provider::TokenData>
-
- - - - - -## Function `get_all_a_tokens` - - - -
#[view]
-public fun get_all_a_tokens(): vector<pool_data_provider::TokenData>
-
- - - - - -## Function `get_all_var_tokens` - - - -
#[view]
-public fun get_all_var_tokens(): vector<pool_data_provider::TokenData>
-
- - - - - -## Function `get_reserve_configuration_data` - - - -
#[view]
-public fun get_reserve_configuration_data(asset: address): (u256, u256, u256, u256, u256, bool, bool, bool, bool)
-
- - - - - -## Function `get_reserve_emode_category` - - - -
#[view]
-public fun get_reserve_emode_category(asset: address): u256
-
- - - - - -## Function `get_reserve_caps` - - - -
#[view]
-public fun get_reserve_caps(asset: address): (u256, u256)
-
- - - - - -## Function `get_paused` - - - -
#[view]
-public fun get_paused(asset: address): bool
-
- - - - - -## Function `get_siloed_borrowing` - - - -
#[view]
-public fun get_siloed_borrowing(asset: address): bool
-
- - - - - -## Function `get_liquidation_protocol_fee` - - - -
#[view]
-public fun get_liquidation_protocol_fee(asset: address): u256
-
- - - - - -## Function `get_unbacked_mint_cap` - - - -
#[view]
-public fun get_unbacked_mint_cap(asset: address): u256
-
- - - - - -## Function `get_debt_ceiling` - - - -
#[view]
-public fun get_debt_ceiling(asset: address): u256
-
- - - - - -## Function `get_debt_ceiling_decimals` - - - -
#[view]
-public fun get_debt_ceiling_decimals(): u256
-
- - - - - -## Function `get_reserve_data` - - - -
#[view]
-public fun get_reserve_data(asset: address): (u256, u256, u256, u256, u256, u256, u256, u256, u64)
-
- - - - - -## Function `get_a_token_total_supply` - - - -
#[view]
-public fun get_a_token_total_supply(asset: address): u256
-
- - - - - -## Function `get_total_debt` - - - -
#[view]
-public fun get_total_debt(asset: address): u256
-
- - - - - -## Function `get_user_reserve_data` - - - -
#[view]
-public fun get_user_reserve_data(asset: address, user: address): (u256, u256, u256, u256, bool)
-
- - - - - -## Function `get_reserve_tokens_addresses` - - - -
#[view]
-public fun get_reserve_tokens_addresses(asset: address): (address, address)
-
- - - - - -## Function `get_flash_loan_enabled` - - - -
#[view]
-public fun get_flash_loan_enabled(asset: address): bool
-
diff --git a/aave-core/doc/rewards_controller.md b/aave-core/doc/rewards_controller.md deleted file mode 100644 index a33cadd..0000000 --- a/aave-core/doc/rewards_controller.md +++ /dev/null @@ -1,646 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::rewards_controller` - - - -- [Resource `RewardsControllerData`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_RewardsControllerData) -- [Resource `AssetData`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_AssetData) -- [Resource `RewardData`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_RewardData) -- [Resource `UserData`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_UserData) -- [Struct `UserAssetBalance`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_UserAssetBalance) -- [Struct `ClaimerSet`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_ClaimerSet) -- [Struct `Accrued`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_Accrued) -- [Struct `AssetConfigUpdated`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_AssetConfigUpdated) -- [Struct `RewardsClaimed`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_RewardsClaimed) -- [Struct `RewardOracleUpdated`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_RewardOracleUpdated) -- [Struct `PullRewardsTransferStrategyInstalled`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_PullRewardsTransferStrategyInstalled) -- [Struct `StakedTokenTransferStrategyInstalled`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_StakedTokenTransferStrategyInstalled) -- [Constants](#@Constants_0) -- [Function `initialize`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_initialize) -- [Function `create_asset_data`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_create_asset_data) -- [Function `rewards_controller_address`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_rewards_controller_address) -- [Function `rewards_controller_object`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_rewards_controller_object) -- [Function `get_claimer`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_get_claimer) -- [Function `get_revision`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_get_revision) -- [Function `get_reward_oracle`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_get_reward_oracle) -- [Function `get_pull_rewards_transfer_strategy`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_get_pull_rewards_transfer_strategy) -- [Function `get_staked_token_transfer_strategy`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_get_staked_token_transfer_strategy) -- [Function `configure_assets`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_configure_assets) -- [Function `set_pull_rewards_transfer_strategy`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_set_pull_rewards_transfer_strategy) -- [Function `set_staked_token_transfer_strategy`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_set_staked_token_transfer_strategy) -- [Function `set_reward_oracle`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_set_reward_oracle) -- [Function `claim_rewards`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_claim_rewards) -- [Function `claim_all_rewards`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_claim_all_rewards) -- [Function `set_claimer`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_set_claimer) -- [Function `set_reward_oracle_internal`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_set_reward_oracle_internal) -- [Function `get_rewards_data`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_get_rewards_data) -- [Function `get_asset_index`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_get_asset_index) -- [Function `get_distribution_end`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_get_distribution_end) -- [Function `get_rewards_by_asset`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_get_rewards_by_asset) -- [Function `get_rewards_list`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_get_rewards_list) -- [Function `get_user_asset_index`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_get_user_asset_index) -- [Function `get_user_accrued_rewards`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_get_user_accrued_rewards) -- [Function `get_user_rewards`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_get_user_rewards) -- [Function `get_all_user_rewards`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_get_all_user_rewards) -- [Function `set_distribution_end`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_set_distribution_end) -- [Function `set_emission_per_second`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_set_emission_per_second) -- [Function `get_asset_decimals`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_get_asset_decimals) -- [Function `get_emission_manager`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_rewards_controller_get_emission_manager) - - -
use 0x1::event;
-use 0x1::object;
-use 0x1::signer;
-use 0x1::simple_map;
-use 0x1::smart_table;
-use 0x1::timestamp;
-use 0x1::vector;
-use 0x9efefdec8fe22b7447931b81745048182594ef72653dfbf8e05b815ecc355f7c::math_utils;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::a_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::transfer_strategy;
-use 0xd329b8b371bf56fdbfbb66f441a8463f3605ecb27ee0c484f85a4cf88883d2f9::acl_manage;
-use 0xe02c89369099ad99993cbe3d4c3c80b299df006885854178a8acdb6ab6afb6e::oracle;
-
- - - - - -## Resource `RewardsControllerData` - - - -
#[resource_group_member(#[group = 0x1::object::ObjectGroup])]
-struct RewardsControllerData has key
-
- - - - - -## Resource `AssetData` - - - -
struct AssetData has drop, store, key
-
- - - - - -## Resource `RewardData` - - - -
struct RewardData has drop, store, key
-
- - - - - -## Resource `UserData` - - - -
struct UserData has copy, drop, store, key
-
- - - - - -## Struct `UserAssetBalance` - - - -
struct UserAssetBalance has copy, drop, store
-
- - - - - -## Struct `ClaimerSet` - - - -
#[event]
-struct ClaimerSet has drop, store
-
- - - - - -## Struct `Accrued` - - - -
#[event]
-struct Accrued has drop, store
-
- - - - - -## Struct `AssetConfigUpdated` - - - -
#[event]
-struct AssetConfigUpdated has drop, store
-
- - - - - -## Struct `RewardsClaimed` - - - -
#[event]
-struct RewardsClaimed has drop, store
-
- - - - - -## Struct `RewardOracleUpdated` - - - -
#[event]
-struct RewardOracleUpdated has drop, store
-
- - - - - -## Struct `PullRewardsTransferStrategyInstalled` - - - -
#[event]
-struct PullRewardsTransferStrategyInstalled has drop, store
-
- - - - - -## Struct `StakedTokenTransferStrategyInstalled` - - - -
#[event]
-struct StakedTokenTransferStrategyInstalled has drop, store
-
- - - - - -## Constants - - - - - - -
const REVISION: u64 = 1;
-
- - - - - - - -
const CLAIMER_UNAUTHORIZED: u64 = 1;
-
- - - - - - - -
const DISTRIBUTION_DOES_NOT_EXIST: u64 = 5;
-
- - - - - - - -
const INDEX_OVERFLOW: u64 = 2;
-
- - - - - - - -
const INVALID_INPUT: u64 = 4;
-
- - - - - - - -
const NOT_REWARDS_CONTROLLER_ADMIN: u64 = 8;
-
- - - - - - - -
const ONLY_EMISSION_MANAGER: u64 = 3;
-
- - - - - - - -
const ORACLE_MUST_RETURN_PRICE: u64 = 6;
-
- - - - - - - -
const REWARDS_CONTROLLER_NAME: vector<u8> = [82, 69, 87, 65, 82, 68, 83, 95, 67, 79, 78, 84, 82, 79, 76, 76, 69, 82, 95, 78, 65, 77, 69];
-
- - - - - - - -
const TRANSFER_ERROR: u64 = 7;
-
- - - - - -## Function `initialize` - - - -
public fun initialize(sender: &signer, emission_manager: address)
-
- - - - - -## Function `create_asset_data` - - - -
public fun create_asset_data(rewards: simple_map::SimpleMap<address, rewards_controller::RewardData>, available_rewards: simple_map::SimpleMap<u128, address>, available_rewards_count: u128, decimals: u8): rewards_controller::AssetData
-
- - - - - -## Function `rewards_controller_address` - - - -
#[view]
-public fun rewards_controller_address(): address
-
- - - - - -## Function `rewards_controller_object` - - - -
#[view]
-public fun rewards_controller_object(): object::Object<rewards_controller::RewardsControllerData>
-
- - - - - -## Function `get_claimer` - - - -
#[view]
-public fun get_claimer(user: address, rewards_controller_address: address): address
-
- - - - - -## Function `get_revision` - - - -
#[view]
-public fun get_revision(): u64
-
- - - - - -## Function `get_reward_oracle` - - - -
#[view]
-public fun get_reward_oracle(reward: address, rewards_controller_address: address): oracle::RewardOracle
-
- - - - - -## Function `get_pull_rewards_transfer_strategy` - - - -
public fun get_pull_rewards_transfer_strategy(reward: address, rewards_controller_address: address): transfer_strategy::PullRewardsTransferStrategy
-
- - - - - -## Function `get_staked_token_transfer_strategy` - - - -
public fun get_staked_token_transfer_strategy(reward: address, rewards_controller_address: address): transfer_strategy::StakedTokenTransferStrategy
-
- - - - - -## Function `configure_assets` - - - -
public fun configure_assets(caller: &signer, config: vector<transfer_strategy::RewardsConfigInput>, rewards_controller_address: address)
-
- - - - - -## Function `set_pull_rewards_transfer_strategy` - - - -
public fun set_pull_rewards_transfer_strategy(caller: &signer, reward: address, pull_rewards_transfer_strategy: transfer_strategy::PullRewardsTransferStrategy, rewards_controller_address: address)
-
- - - - - -## Function `set_staked_token_transfer_strategy` - - - -
public fun set_staked_token_transfer_strategy(caller: &signer, reward: address, staked_token_transfer_strategy: transfer_strategy::StakedTokenTransferStrategy, rewards_controller_address: address)
-
- - - - - -## Function `set_reward_oracle` - - - -
public fun set_reward_oracle(caller: &signer, reward: address, reward_oracle: oracle::RewardOracle, rewards_controller_address: address)
-
- - - - - -## Function `claim_rewards` - - - -
public fun claim_rewards(caller: &signer, assets: vector<address>, amount: u256, to: address, reward: address, rewards_controller_address: address): u256
-
- - - - - -## Function `claim_all_rewards` - - - -
public fun claim_all_rewards(caller: &signer, assets: vector<address>, to: address, rewards_controller_address: address): (vector<address>, vector<u256>)
-
- - - - - -## Function `set_claimer` - - - -
public fun set_claimer(user: address, claimer: address, rewards_controller_address: address)
-
- - - - - -## Function `set_reward_oracle_internal` - - - -
public fun set_reward_oracle_internal(reward: address, reward_oracle: oracle::RewardOracle)
-
- - - - - -## Function `get_rewards_data` - - - -
#[view]
-public fun get_rewards_data(asset: address, reward: address, rewards_controller_address: address): (u256, u256, u256, u256)
-
- - - - - -## Function `get_asset_index` - - - -
#[view]
-public fun get_asset_index(asset: address, reward: address, rewards_controller_address: address): (u256, u256)
-
- - - - - -## Function `get_distribution_end` - - - -
#[view]
-public fun get_distribution_end(asset: address, reward: address, rewards_controller_address: address): u256
-
- - - - - -## Function `get_rewards_by_asset` - - - -
#[view]
-public fun get_rewards_by_asset(asset: address, rewards_controller_address: address): vector<address>
-
- - - - - -## Function `get_rewards_list` - - - -
#[view]
-public fun get_rewards_list(rewards_controller_address: address): vector<address>
-
- - - - - -## Function `get_user_asset_index` - - - -
#[view]
-public fun get_user_asset_index(user: address, asset: address, reward: address, rewards_controller_address: address): u256
-
- - - - - -## Function `get_user_accrued_rewards` - - - -
#[view]
-public fun get_user_accrued_rewards(user: address, reward: address, rewards_controller_address: address): u256
-
- - - - - -## Function `get_user_rewards` - - - -
#[view]
-public fun get_user_rewards(assets: vector<address>, user: address, reward: address, rewards_controller_address: address): u256
-
- - - - - -## Function `get_all_user_rewards` - - - -
#[view]
-public fun get_all_user_rewards(assets: vector<address>, user: address, rewards_controller_address: address): (vector<address>, vector<u256>)
-
- - - - - -## Function `set_distribution_end` - - - -
public fun set_distribution_end(caller: &signer, asset: address, reward: address, new_distribution_end: u32, rewards_controller_address: address)
-
- - - - - -## Function `set_emission_per_second` - - - -
public fun set_emission_per_second(caller: &signer, asset: address, rewards: vector<address>, new_emissions_per_second: vector<u128>, rewards_controller_address: address)
-
- - - - - -## Function `get_asset_decimals` - - - -
#[view]
-public fun get_asset_decimals(asset: address, rewards_controller_address: address): u8
-
- - - - - -## Function `get_emission_manager` - - - -
#[view]
-public fun get_emission_manager(rewards_controller_address: address): address
-
diff --git a/aave-core/doc/staked_token.md b/aave-core/doc/staked_token.md deleted file mode 100644 index be03d6d..0000000 --- a/aave-core/doc/staked_token.md +++ /dev/null @@ -1,58 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::staked_token` - - - -- [Resource `MockStakedToken`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_staked_token_MockStakedToken) -- [Function `staked_token`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_staked_token_staked_token) -- [Function `stake`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_staked_token_stake) -- [Function `create_mock_staked_token`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_staked_token_create_mock_staked_token) - - -
- - - - - -## Resource `MockStakedToken` - - - -
struct MockStakedToken has copy, drop, store, key
-
- - - - - -## Function `staked_token` - - - -
public fun staked_token(mock_staked_token: &staked_token::MockStakedToken): address
-
- - - - - -## Function `stake` - - - -
public fun stake(_mock_staked_token: &staked_token::MockStakedToken, _to: address, _amount: u256)
-
- - - - - -## Function `create_mock_staked_token` - - - -
public fun create_mock_staked_token(addr: address): staked_token::MockStakedToken
-
diff --git a/aave-core/doc/standard_token.md b/aave-core/doc/standard_token.md deleted file mode 100644 index bd4f6f8..0000000 --- a/aave-core/doc/standard_token.md +++ /dev/null @@ -1,317 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::standard_token` - - - -- [Resource `ManagingRefs`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_standard_token_ManagingRefs) -- [Struct `AaveTokenInitialized`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_standard_token_AaveTokenInitialized) -- [Constants](#@Constants_0) -- [Function `initialize`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_standard_token_initialize) -- [Function `get_revision`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_standard_token_get_revision) -- [Function `mint_to_primary_stores`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_standard_token_mint_to_primary_stores) -- [Function `mint`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_standard_token_mint) -- [Function `transfer_between_primary_stores`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_standard_token_transfer_between_primary_stores) -- [Function `transfer`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_standard_token_transfer) -- [Function `burn_from_primary_stores`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_standard_token_burn_from_primary_stores) -- [Function `burn`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_standard_token_burn) -- [Function `set_primary_stores_frozen_status`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_standard_token_set_primary_stores_frozen_status) -- [Function `set_frozen_status`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_standard_token_set_frozen_status) -- [Function `withdraw_from_primary_stores`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_standard_token_withdraw_from_primary_stores) -- [Function `withdraw`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_standard_token_withdraw) -- [Function `deposit_to_primary_stores`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_standard_token_deposit_to_primary_stores) -- [Function `deposit`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_standard_token_deposit) - - -
use 0x1::error;
-use 0x1::event;
-use 0x1::fungible_asset;
-use 0x1::object;
-use 0x1::option;
-use 0x1::primary_fungible_store;
-use 0x1::signer;
-use 0x1::string;
-use 0x1::vector;
-
- - - - - -## Resource `ManagingRefs` - -Hold refs to control the minting, transfer and burning of fungible assets. - - -
#[resource_group_member(#[group = 0x1::object::ObjectGroup])]
-struct ManagingRefs has key
-
- - - - - -## Struct `AaveTokenInitialized` - - - -
#[event]
-struct AaveTokenInitialized has drop, store
-
- - - - - -## Constants - - - - - - -
const E_NOT_A_TOKEN_ADMIN: u64 = 1;
-
- - - - - - - -
const REVISION: u64 = 1;
-
- - - - - -Only fungible asset metadata owner can make changes. - - -
const ERR_NOT_OWNER: u64 = 1;
-
- - - - - -BurnRef error. - - -
const ERR_BURN_REF: u64 = 6;
-
- - - - - -The length of ref_flags is not 3. - - -
const ERR_INVALID_REF_FLAGS_LENGTH: u64 = 2;
-
- - - - - -MintRef error. - - -
const ERR_MINT_REF: u64 = 4;
-
- - - - - -TransferRef error. - - -
const ERR_TRANSFER_REF: u64 = 5;
-
- - - - - -The lengths of two vector do not equal. - - -
const ERR_VECTORS_LENGTH_MISMATCH: u64 = 3;
-
- - - - - -## Function `initialize` - -Initialize metadata object and store the refs specified by ref_flags. - - -
public fun initialize(creator: &signer, maximum_supply: u128, name: string::String, symbol: string::String, decimals: u8, icon_uri: string::String, project_uri: string::String, ref_flags: vector<bool>, underlying_asset_address: address, is_coin_underlying: bool)
-
- - - - - -## Function `get_revision` - -Return the revision of the aave token implementation - - -
#[view]
-public fun get_revision(): u64
-
- - - - - -## Function `mint_to_primary_stores` - -Mint as the owner of metadata object to the primary fungible stores of the accounts with amounts of FAs. - - -
public entry fun mint_to_primary_stores(admin: &signer, asset: object::Object<fungible_asset::Metadata>, to: vector<address>, amounts: vector<u64>)
-
- - - - - -## Function `mint` - -Mint as the owner of metadata object to multiple fungible stores with amounts of FAs. - - -
public entry fun mint(admin: &signer, asset: object::Object<fungible_asset::Metadata>, stores: vector<object::Object<fungible_asset::FungibleStore>>, amounts: vector<u64>)
-
- - - - - -## Function `transfer_between_primary_stores` - -Transfer as the owner of metadata object ignoring frozen field from primary stores to primary stores of -accounts. - - -
public entry fun transfer_between_primary_stores(admin: &signer, asset: object::Object<fungible_asset::Metadata>, from: vector<address>, to: vector<address>, amounts: vector<u64>)
-
- - - - - -## Function `transfer` - -Transfer as the owner of metadata object ignoring frozen field between fungible stores. - - -
public entry fun transfer(admin: &signer, asset: object::Object<fungible_asset::Metadata>, sender_stores: vector<object::Object<fungible_asset::FungibleStore>>, receiver_stores: vector<object::Object<fungible_asset::FungibleStore>>, amounts: vector<u64>)
-
- - - - - -## Function `burn_from_primary_stores` - -Burn fungible assets as the owner of metadata object from the primary stores of accounts. - - -
public entry fun burn_from_primary_stores(admin: &signer, asset: object::Object<fungible_asset::Metadata>, from: vector<address>, amounts: vector<u64>)
-
- - - - - -## Function `burn` - -Burn fungible assets as the owner of metadata object from fungible stores. - - -
public entry fun burn(admin: &signer, asset: object::Object<fungible_asset::Metadata>, stores: vector<object::Object<fungible_asset::FungibleStore>>, amounts: vector<u64>)
-
- - - - - -## Function `set_primary_stores_frozen_status` - -Freeze/unfreeze the primary stores of accounts so they cannot transfer or receive fungible assets. - - -
public entry fun set_primary_stores_frozen_status(admin: &signer, asset: object::Object<fungible_asset::Metadata>, accounts: vector<address>, frozen: bool)
-
- - - - - -## Function `set_frozen_status` - -Freeze/unfreeze the fungible stores so they cannot transfer or receive fungible assets. - - -
public entry fun set_frozen_status(admin: &signer, asset: object::Object<fungible_asset::Metadata>, stores: vector<object::Object<fungible_asset::FungibleStore>>, frozen: bool)
-
- - - - - -## Function `withdraw_from_primary_stores` - -Withdraw as the owner of metadata object ignoring frozen field from primary fungible stores of accounts. - - -
public fun withdraw_from_primary_stores(admin: &signer, asset: object::Object<fungible_asset::Metadata>, from: vector<address>, amounts: vector<u64>): fungible_asset::FungibleAsset
-
- - - - - -## Function `withdraw` - -Withdraw as the owner of metadata object ignoring frozen field from fungible stores. -return a fungible asset fa where fa.amount = sum(amounts). - - -
public fun withdraw(admin: &signer, asset: object::Object<fungible_asset::Metadata>, stores: vector<object::Object<fungible_asset::FungibleStore>>, amounts: vector<u64>): fungible_asset::FungibleAsset
-
- - - - - -## Function `deposit_to_primary_stores` - -Deposit as the owner of metadata object ignoring frozen field to primary fungible stores of accounts from a -single source of fungible asset. - - -
public fun deposit_to_primary_stores(admin: &signer, fa: &mut fungible_asset::FungibleAsset, from: vector<address>, amounts: vector<u64>)
-
- - - - - -## Function `deposit` - -Deposit as the owner of metadata object ignoring frozen field from fungible stores. The amount left in fa -is fa.amount - sum(amounts). - - -
public fun deposit(admin: &signer, fa: &mut fungible_asset::FungibleAsset, stores: vector<object::Object<fungible_asset::FungibleStore>>, amounts: vector<u64>)
-
diff --git a/aave-core/doc/stream.md b/aave-core/doc/stream.md deleted file mode 100644 index 0cdc3c3..0000000 --- a/aave-core/doc/stream.md +++ /dev/null @@ -1,106 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::stream` - - - -- [Resource `Stream`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_stream_Stream) -- [Constants](#@Constants_0) -- [Function `recipient`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_stream_recipient) -- [Function `is_entity`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_stream_is_entity) -- [Function `get_stream`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_stream_get_stream) -- [Function `set_remaining_balance`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_stream_set_remaining_balance) -- [Function `create_stream`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_stream_create_stream) - - -
- - - - - -## Resource `Stream` - - - -
struct Stream has drop, store, key
-
- - - - - -## Constants - - - - - - -
const TEST_FAILED: u64 = 2;
-
- - - - - - - -
const TEST_SUCCESS: u64 = 1;
-
- - - - - -## Function `recipient` - - - -
public fun recipient(stream: &stream::Stream): address
-
- - - - - -## Function `is_entity` - - - -
public fun is_entity(stream: &stream::Stream): bool
-
- - - - - -## Function `get_stream` - - - -
public fun get_stream(stream: &stream::Stream): (address, address, u256, address, u256, u256, u256, u256)
-
- - - - - -## Function `set_remaining_balance` - - - -
public fun set_remaining_balance(stream: &mut stream::Stream, remaining_balance: u256)
-
- - - - - -## Function `create_stream` - - - -
public fun create_stream(deposit: u256, rate_per_second: u256, remaining_balance: u256, start_time: u256, stop_time: u256, recipient: address, sender: address, token_address: address, is_entity: bool): stream::Stream
-
diff --git a/aave-core/doc/supply_logic.md b/aave-core/doc/supply_logic.md deleted file mode 100644 index 1655040..0000000 --- a/aave-core/doc/supply_logic.md +++ /dev/null @@ -1,169 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::supply_logic` - - - -- [Struct `Supply`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_supply_logic_Supply) -- [Struct `Withdraw`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_supply_logic_Withdraw) -- [Struct `ReserveUsedAsCollateralEnabled`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_supply_logic_ReserveUsedAsCollateralEnabled) -- [Struct `ReserveUsedAsCollateralDisabled`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_supply_logic_ReserveUsedAsCollateralDisabled) -- [Function `supply`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_supply_logic_supply) -- [Function `withdraw`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_supply_logic_withdraw) -- [Function `finalize_transfer`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_supply_logic_finalize_transfer) -- [Function `set_user_use_reserve_as_collateral`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_supply_logic_set_user_use_reserve_as_collateral) - - -
use 0x1::event;
-use 0x1::signer;
-use 0x9efefdec8fe22b7447931b81745048182594ef72653dfbf8e05b815ecc355f7c::math_utils;
-use 0x9efefdec8fe22b7447931b81745048182594ef72653dfbf8e05b815ecc355f7c::wad_ray_math;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::a_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::emode_logic;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::mock_underlying_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool_validation;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::validation_logic;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::error;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::reserve;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::user;
-
- - - - - -## Struct `Supply` - -@dev Emitted on supply() -@param reserve The address of the underlying asset of the reserve -@param user The address initiating the supply -@param on_behalf_of The beneficiary of the supply, receiving the aTokens -@param amount The amount supplied -@param referral_code The referral code used - - -
#[event]
-struct Supply has copy, drop, store
-
- - - - - -## Struct `Withdraw` - -@dev Emitted on withdraw() -@param reserve The address of the underlying asset being withdrawn -@param user The address initiating the withdrawal, owner of aTokens -@param to The address that will receive the underlying -@param amount The amount to be withdrawn - - -
#[event]
-struct Withdraw has drop, store
-
- - - - - -## Struct `ReserveUsedAsCollateralEnabled` - -@dev Emitted on setUserUseReserveAsCollateral() -@param reserve The address of the underlying asset of the reserve -@param user The address of the user enabling the usage as collateral - - -
#[event]
-struct ReserveUsedAsCollateralEnabled has drop, store
-
- - - - - -## Struct `ReserveUsedAsCollateralDisabled` - -@dev Emitted on setUserUseReserveAsCollateral() -@param reserve The address of the underlying asset of the reserve -@param user The address of the user enabling the usage as collateral - - -
#[event]
-struct ReserveUsedAsCollateralDisabled has drop, store
-
- - - - - -## Function `supply` - -@notice Supplies an amount of underlying asset into the reserve, receiving in return overlying aTokens. -- E.g. User supplies 100 USDC and gets in return 100 aUSDC -@param account The account that will supply the asset -@param asset The address of the underlying asset to supply -@param amount The amount to be supplied -@param on_behalf_of The address that will receive the aTokens, same as msg.sender if the user -wants to receive them on his own wallet, or a different address if the beneficiary of aTokens -is a different wallet -@param referral_code Code used to register the integrator originating the operation, for potential rewards. -0 if the action is executed directly by the user, without any middle-man - - -
public entry fun supply(account: &signer, asset: address, amount: u256, on_behalf_of: address, referral_code: u16)
-
- - - - - -## Function `withdraw` - -@notice Withdraws an amount of underlying asset from the reserve, burning the equivalent aTokens owned -E.g. User has 100 aUSDC, calls withdraw() and receives 100 USDC, burning the 100 aUSDC -@param asset The address of the underlying asset to withdraw -@param amount The underlying amount to be withdrawn -- Send the value type(uint256).max in order to withdraw the whole aToken balance -@param to The address that will receive the underlying, same as msg.sender if the user -wants to receive it on his own wallet, or a different address if the beneficiary is a -different wallet - - -
public entry fun withdraw(account: &signer, asset: address, amount: u256, to: address)
-
- - - - - -## Function `finalize_transfer` - -@notice Validates and finalizes an aToken transfer -@dev Only callable by the overlying aToken of the asset -@param asset The address of the underlying asset of the aToken -@param from The user from which the aTokens are transferred -@param to The user receiving the aTokens -@param amount The amount being transferred/withdrawn -@param balance_from_before The aToken balance of the from user before the transfer -@param balance_to_before The aToken balance of the to user before the transfer - - -
public entry fun finalize_transfer(account: &signer, asset: address, from: address, to: address, amount: u256, balance_from_before: u256, balance_to_before: u256)
-
- - - - - -## Function `set_user_use_reserve_as_collateral` - -@notice Allows suppliers to enable/disable a specific supplied asset as collateral -@param asset The address of the underlying asset supplied -@param use_as_collateral True if the user wants to use the supply as collateral, false otherwise - - -
public entry fun set_user_use_reserve_as_collateral(account: &signer, asset: address, use_as_collateral: bool)
-
diff --git a/aave-core/doc/token_base.md b/aave-core/doc/token_base.md deleted file mode 100644 index bc55180..0000000 --- a/aave-core/doc/token_base.md +++ /dev/null @@ -1,435 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::token_base` - - - -- [Struct `Transfer`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_Transfer) -- [Struct `Mint`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_Mint) -- [Struct `Burn`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_Burn) -- [Struct `UserState`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_UserState) -- [Resource `UserStateMap`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_UserStateMap) -- [Struct `TokenData`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_TokenData) -- [Resource `TokenMap`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_TokenMap) -- [Resource `ManagedFungibleAsset`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_ManagedFungibleAsset) -- [Constants](#@Constants_0) -- [Function `get_user_state`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_get_user_state) -- [Function `get_token_data`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_get_token_data) -- [Function `get_underlying_asset`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_get_underlying_asset) -- [Function `get_treasury_address`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_get_treasury_address) -- [Function `get_resource_account`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_get_resource_account) -- [Function `get_previous_index`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_get_previous_index) -- [Function `get_scaled_total_supply`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_get_scaled_total_supply) -- [Function `create_a_token`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_create_a_token) -- [Function `create_variable_token`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_create_variable_token) -- [Function `mint_scaled`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_mint_scaled) -- [Function `burn_scaled`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_burn_scaled) -- [Function `transfer`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_transfer) -- [Function `transfer_internal`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_transfer_internal) -- [Function `scaled_balance_of`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_scaled_balance_of) -- [Function `scaled_total_supply`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_scaled_total_supply) -- [Function `get_scaled_user_balance_and_supply`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_get_scaled_user_balance_and_supply) -- [Function `name`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_name) -- [Function `symbol`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_symbol) -- [Function `decimals`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_decimals) -- [Function `only_pool_admin`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_only_pool_admin) -- [Function `only_token_admin`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_token_base_only_token_admin) - - -
use 0x1::event;
-use 0x1::fungible_asset;
-use 0x1::object;
-use 0x1::option;
-use 0x1::primary_fungible_store;
-use 0x1::signer;
-use 0x1::smart_table;
-use 0x1::string;
-use 0x1::string_utils;
-use 0x9efefdec8fe22b7447931b81745048182594ef72653dfbf8e05b815ecc355f7c::wad_ray_math;
-use 0xd329b8b371bf56fdbfbb66f441a8463f3605ecb27ee0c484f85a4cf88883d2f9::acl_manage;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::error;
-
- - - - - -## Struct `Transfer` - -@dev Emitted when value tokens are moved from one account (from) to -another (to). - -Note that value may be zero. - - -
#[event]
-struct Transfer has drop, store
-
- - - - - -## Struct `Mint` - -@dev Emitted after the mint action -@param caller The address performing the mint -@param on_behalf_of The address of the user that will receive the minted tokens -@param value The scaled-up amount being minted (based on user entered amount and balance increase from interest) -@param balance_increase The increase in scaled-up balance since the last action of 'onBehalfOf' -@param index The next liquidity index of the reserve - - -
#[event]
-struct Mint has drop, store
-
- - - - - -## Struct `Burn` - -@dev Emitted after the burn action -@dev If the burn function does not involve a transfer of the underlying asset, the target defaults to zero address -@param from The address from which the tokens will be burned -@param target The address that will receive the underlying, if any -@param value The scaled-up amount being burned (user entered amount - balance increase from interest) -@param balance_increase The increase in scaled-up balance since the last action of 'from' -@param index The next liquidity index of the reserve - - -
#[event]
-struct Burn has drop, store
-
- - - - - -## Struct `UserState` - - - -
struct UserState has copy, drop, store
-
- - - - - -## Resource `UserStateMap` - - - -
struct UserStateMap has key
-
- - - - - -## Struct `TokenData` - - - -
struct TokenData has copy, drop, store
-
- - - - - -## Resource `TokenMap` - - - -
struct TokenMap has key
-
- - - - - -## Resource `ManagedFungibleAsset` - -Hold refs to control the minting, transfer and burning of fungible assets. - - -
#[resource_group_member(#[group = 0x1::object::ObjectGroup])]
-struct ManagedFungibleAsset has key
-
- - - - - -## Constants - - - - -Only fungible asset metadata owner can make changes. - - -
const ENOT_OWNER: u64 = 1;
-
- - - - - - - -
const E_ACCOUNT_NOT_EXISTS: u64 = 3;
-
- - - - - - - -
const E_TOKEN_ALREADY_EXISTS: u64 = 2;
-
- - - - - - - -
const E_TOKEN_NOT_EXISTS: u64 = 4;
-
- - - - - -## Function `get_user_state` - - - -
public fun get_user_state(user: address, token_metadata_address: address): token_base::UserState
-
- - - - - -## Function `get_token_data` - - - -
public fun get_token_data(token_metadata_address: address): token_base::TokenData
-
- - - - - -## Function `get_underlying_asset` - - - -
public fun get_underlying_asset(token_data: &token_base::TokenData): address
-
- - - - - -## Function `get_treasury_address` - - - -
public fun get_treasury_address(token_data: &token_base::TokenData): address
-
- - - - - -## Function `get_resource_account` - - - -
public fun get_resource_account(token_data: &token_base::TokenData): address
-
- - - - - -## Function `get_previous_index` - - - -
public fun get_previous_index(user: address, metadata_address: address): u256
-
- - - - - -## Function `get_scaled_total_supply` - - - -
public fun get_scaled_total_supply(token_data: &token_base::TokenData): u256
-
- - - - - -## Function `create_a_token` - - - -
public(friend) fun create_a_token(signer: &signer, name: string::String, symbol: string::String, decimals: u8, icon_uri: string::String, project_uri: string::String, underlying_asset: address, treasury: address, resource_account: address)
-
- - - - - -## Function `create_variable_token` - - - -
public(friend) fun create_variable_token(signer: &signer, name: string::String, symbol: string::String, decimals: u8, icon_uri: string::String, project_uri: string::String, underlying_asset: address)
-
- - - - - -## Function `mint_scaled` - - - -
public(friend) fun mint_scaled(caller: address, on_behalf_of: address, amount: u256, index: u256, metadata_address: address)
-
- - - - - -## Function `burn_scaled` - - - -
public(friend) fun burn_scaled(user: address, target: address, amount: u256, index: u256, metadata_address: address)
-
- - - - - -## Function `transfer` - - - -
public(friend) fun transfer(sender: address, recipient: address, amount: u256, index: u256, metadata_address: address)
-
- - - - - -## Function `transfer_internal` - - - -
public(friend) fun transfer_internal(from: address, to: address, amount: u64, metadata_address: address)
-
- - - - - -## Function `scaled_balance_of` - - - -
public fun scaled_balance_of(owner: address, metadata_address: address): u256
-
- - - - - -## Function `scaled_total_supply` - - - -
public fun scaled_total_supply(metadata_address: address): u256
-
- - - - - -## Function `get_scaled_user_balance_and_supply` - - - -
public fun get_scaled_user_balance_and_supply(owner: address, metadata_address: address): (u256, u256)
-
- - - - - -## Function `name` - - - -
public fun name(metadata_address: address): string::String
-
- - - - - -## Function `symbol` - - - -
public fun symbol(metadata_address: address): string::String
-
- - - - - -## Function `decimals` - - - -
public fun decimals(metadata_address: address): u8
-
- - - - - -## Function `only_pool_admin` - - - -
public fun only_pool_admin(account: &signer)
-
- - - - - -## Function `only_token_admin` - - - -
public fun only_token_admin(account: &signer)
-
diff --git a/aave-core/doc/transfer_strategy.md b/aave-core/doc/transfer_strategy.md deleted file mode 100644 index 5a4d656..0000000 --- a/aave-core/doc/transfer_strategy.md +++ /dev/null @@ -1,414 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::transfer_strategy` - - - -- [Resource `PullRewardsTransferStrategy`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_PullRewardsTransferStrategy) -- [Resource `StakedTokenTransferStrategy`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_StakedTokenTransferStrategy) -- [Struct `RewardsConfigInput`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_RewardsConfigInput) -- [Struct `EmergencyWithdrawal`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_EmergencyWithdrawal) -- [Constants](#@Constants_0) -- [Function `check_is_emission_admin`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_check_is_emission_admin) -- [Function `create_pull_rewards_transfer_strategy`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_create_pull_rewards_transfer_strategy) -- [Function `pull_rewards_transfer_strategy_perform_transfer`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_pull_rewards_transfer_strategy_perform_transfer) -- [Function `pull_rewards_transfer_strategy_get_rewards_vault`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_pull_rewards_transfer_strategy_get_rewards_vault) -- [Function `pull_rewards_transfer_strategy_get_incentives_controller`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_pull_rewards_transfer_strategy_get_incentives_controller) -- [Function `pull_rewards_transfer_strategy_get_rewards_admin`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_pull_rewards_transfer_strategy_get_rewards_admin) -- [Function `create_staked_token_transfer_strategy`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_create_staked_token_transfer_strategy) -- [Function `staked_token_transfer_strategy_perform_transfer`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_staked_token_transfer_strategy_perform_transfer) -- [Function `staked_token_transfer_strategy_get_stake_contract`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_staked_token_transfer_strategy_get_stake_contract) -- [Function `staked_token_transfer_strategy_get_underlying_token`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_staked_token_transfer_strategy_get_underlying_token) -- [Function `staked_token_transfer_strategy_get_incentives_controller`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_staked_token_transfer_strategy_get_incentives_controller) -- [Function `staked_token_transfer_strategy_get_rewards_admin`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_staked_token_transfer_strategy_get_rewards_admin) -- [Function `get_reward`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_get_reward) -- [Function `get_reward_oracle`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_get_reward_oracle) -- [Function `get_asset`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_get_asset) -- [Function `get_total_supply`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_get_total_supply) -- [Function `get_emission_per_second`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_get_emission_per_second) -- [Function `get_distribution_end`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_get_distribution_end) -- [Function `set_total_supply`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_set_total_supply) -- [Function `pull_rewards_transfer_strategy_get_strategy`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_pull_rewards_transfer_strategy_get_strategy) -- [Function `staked_token_transfer_strategy_get_strategy`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_staked_token_transfer_strategy_get_strategy) -- [Function `validate_rewards_config_input`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_validate_rewards_config_input) -- [Function `has_pull_rewards_transfer_strategy`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_has_pull_rewards_transfer_strategy) -- [Function `emit_emergency_withdrawal_event`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_transfer_strategy_emit_emergency_withdrawal_event) - - -
use 0x1::event;
-use 0x1::option;
-use 0x1::signer;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::mock_underlying_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::staked_token;
-use 0xd329b8b371bf56fdbfbb66f441a8463f3605ecb27ee0c484f85a4cf88883d2f9::acl_manage;
-use 0xe02c89369099ad99993cbe3d4c3c80b299df006885854178a8acdb6ab6afb6e::oracle;
-
- - - - - -## Resource `PullRewardsTransferStrategy` - - - -
struct PullRewardsTransferStrategy has copy, drop, store, key
-
- - - - - -## Resource `StakedTokenTransferStrategy` - - - -
struct StakedTokenTransferStrategy has copy, drop, store, key
-
- - - - - -## Struct `RewardsConfigInput` - - - -
struct RewardsConfigInput has drop, store
-
- - - - - -## Struct `EmergencyWithdrawal` - - - -
#[event]
-struct EmergencyWithdrawal has drop, store
-
- - - - - -## Constants - - - - - - -
const CALLER_NOT_INCENTIVES_CONTROLLER: u64 = 1;
-
- - - - - - - -
const EMISSION_MANAGER_NAME: vector<u8> = [69, 77, 73, 83, 83, 73, 79, 78, 95, 77, 65, 78, 65, 71, 69, 82];
-
- - - - - - - -
const NOT_EMISSION_ADMIN: u64 = 1;
-
- - - - - - - -
const ONLY_REWARDS_ADMIN: u64 = 1;
-
- - - - - - - -
const REWARD_TOKEN_NOT_STAKE_CONTRACT: u64 = 1;
-
- - - - - - - -
const TOO_MANY_STRATEGIES: u64 = 1;
-
- - - - - -## Function `check_is_emission_admin` - - - -
public fun check_is_emission_admin(account: address)
-
- - - - - -## Function `create_pull_rewards_transfer_strategy` - - - -
public fun create_pull_rewards_transfer_strategy(rewards_admin: address, incentives_controller: address, rewards_vault: address): transfer_strategy::PullRewardsTransferStrategy
-
- - - - - -## Function `pull_rewards_transfer_strategy_perform_transfer` - - - -
public fun pull_rewards_transfer_strategy_perform_transfer(caller: &signer, to: address, reward: address, amount: u256, pull_rewards_transfer_strategy: transfer_strategy::PullRewardsTransferStrategy): bool
-
- - - - - -## Function `pull_rewards_transfer_strategy_get_rewards_vault` - - - -
public fun pull_rewards_transfer_strategy_get_rewards_vault(pull_rewards_transfer_strategy: transfer_strategy::PullRewardsTransferStrategy): address
-
- - - - - -## Function `pull_rewards_transfer_strategy_get_incentives_controller` - - - -
public fun pull_rewards_transfer_strategy_get_incentives_controller(pull_rewards_transfer_strategy: transfer_strategy::PullRewardsTransferStrategy): address
-
- - - - - -## Function `pull_rewards_transfer_strategy_get_rewards_admin` - - - -
public fun pull_rewards_transfer_strategy_get_rewards_admin(pull_rewards_transfer_strategy: transfer_strategy::PullRewardsTransferStrategy): address
-
- - - - - -## Function `create_staked_token_transfer_strategy` - - - -
public fun create_staked_token_transfer_strategy(rewards_admin: address, incentives_controller: address, stake_contract: staked_token::MockStakedToken, underlying_token: address): transfer_strategy::StakedTokenTransferStrategy
-
- - - - - -## Function `staked_token_transfer_strategy_perform_transfer` - - - -
public fun staked_token_transfer_strategy_perform_transfer(caller: &signer, to: address, reward: address, amount: u256, staked_token_transfer_strategy: transfer_strategy::StakedTokenTransferStrategy): bool
-
- - - - - -## Function `staked_token_transfer_strategy_get_stake_contract` - - - -
public fun staked_token_transfer_strategy_get_stake_contract(staked_token_transfer_strategy: transfer_strategy::StakedTokenTransferStrategy): address
-
- - - - - -## Function `staked_token_transfer_strategy_get_underlying_token` - - - -
public fun staked_token_transfer_strategy_get_underlying_token(staked_token_transfer_strategy: transfer_strategy::StakedTokenTransferStrategy): address
-
- - - - - -## Function `staked_token_transfer_strategy_get_incentives_controller` - - - -
public fun staked_token_transfer_strategy_get_incentives_controller(staked_token_transfer_strategy: transfer_strategy::StakedTokenTransferStrategy): address
-
- - - - - -## Function `staked_token_transfer_strategy_get_rewards_admin` - - - -
public fun staked_token_transfer_strategy_get_rewards_admin(staked_token_transfer_strategy: transfer_strategy::StakedTokenTransferStrategy): address
-
- - - - - -## Function `get_reward` - - - -
public fun get_reward(rewards_config_input: &transfer_strategy::RewardsConfigInput): address
-
- - - - - -## Function `get_reward_oracle` - - - -
public fun get_reward_oracle(rewards_config_input: &transfer_strategy::RewardsConfigInput): oracle::RewardOracle
-
- - - - - -## Function `get_asset` - - - -
public fun get_asset(rewards_config_input: &transfer_strategy::RewardsConfigInput): address
-
- - - - - -## Function `get_total_supply` - - - -
public fun get_total_supply(rewards_config_input: &transfer_strategy::RewardsConfigInput): u256
-
- - - - - -## Function `get_emission_per_second` - - - -
public fun get_emission_per_second(rewards_config_input: &transfer_strategy::RewardsConfigInput): u128
-
- - - - - -## Function `get_distribution_end` - - - -
public fun get_distribution_end(rewards_config_input: &transfer_strategy::RewardsConfigInput): u32
-
- - - - - -## Function `set_total_supply` - - - -
public fun set_total_supply(rewards_config_input: &mut transfer_strategy::RewardsConfigInput, total_supply: u256)
-
- - - - - -## Function `pull_rewards_transfer_strategy_get_strategy` - - - -
public fun pull_rewards_transfer_strategy_get_strategy(rewards_config_input: &transfer_strategy::RewardsConfigInput): transfer_strategy::PullRewardsTransferStrategy
-
- - - - - -## Function `staked_token_transfer_strategy_get_strategy` - - - -
public fun staked_token_transfer_strategy_get_strategy(rewards_config_input: &transfer_strategy::RewardsConfigInput): transfer_strategy::StakedTokenTransferStrategy
-
- - - - - -## Function `validate_rewards_config_input` - - - -
public fun validate_rewards_config_input(rewards_config_input: &transfer_strategy::RewardsConfigInput)
-
- - - - - -## Function `has_pull_rewards_transfer_strategy` - - - -
public fun has_pull_rewards_transfer_strategy(rewards_config_input: &transfer_strategy::RewardsConfigInput): bool
-
- - - - - -## Function `emit_emergency_withdrawal_event` - - - -
public fun emit_emergency_withdrawal_event(caller: &signer, token: address, to: address, amount: u256)
-
diff --git a/aave-core/doc/ui_incentive_data_provider_v3.md b/aave-core/doc/ui_incentive_data_provider_v3.md deleted file mode 100644 index 612ea5e..0000000 --- a/aave-core/doc/ui_incentive_data_provider_v3.md +++ /dev/null @@ -1,189 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::ui_incentive_data_provider_v3` - - - -- [Resource `UiIncentiveDataProviderV3Data`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ui_incentive_data_provider_v3_UiIncentiveDataProviderV3Data) -- [Struct `AggregatedReserveIncentiveData`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ui_incentive_data_provider_v3_AggregatedReserveIncentiveData) -- [Struct `IncentiveData`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ui_incentive_data_provider_v3_IncentiveData) -- [Struct `RewardInfo`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ui_incentive_data_provider_v3_RewardInfo) -- [Struct `UserReserveIncentiveData`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ui_incentive_data_provider_v3_UserReserveIncentiveData) -- [Struct `UserIncentiveData`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ui_incentive_data_provider_v3_UserIncentiveData) -- [Struct `UserRewardInfo`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ui_incentive_data_provider_v3_UserRewardInfo) -- [Constants](#@Constants_0) -- [Function `ui_incentive_data_provider_v3_data_address`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ui_incentive_data_provider_v3_ui_incentive_data_provider_v3_data_address) -- [Function `ui_incentive_data_provider_v3_data_object`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ui_incentive_data_provider_v3_ui_incentive_data_provider_v3_data_object) -- [Function `get_full_reserves_incentive_data`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ui_incentive_data_provider_v3_get_full_reserves_incentive_data) -- [Function `get_reserves_incentives_data`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ui_incentive_data_provider_v3_get_reserves_incentives_data) -- [Function `get_user_reserves_incentives_data`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ui_incentive_data_provider_v3_get_user_reserves_incentives_data) - - -
use 0x1::object;
-use 0x1::string;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::a_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::eac_aggregator_proxy;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::rewards_controller;
-
- - - - - -## Resource `UiIncentiveDataProviderV3Data` - - - -
struct UiIncentiveDataProviderV3Data has key
-
- - - - - -## Struct `AggregatedReserveIncentiveData` - - - -
struct AggregatedReserveIncentiveData has drop, store
-
- - - - - -## Struct `IncentiveData` - - - -
struct IncentiveData has drop, store
-
- - - - - -## Struct `RewardInfo` - - - -
struct RewardInfo has drop, store
-
- - - - - -## Struct `UserReserveIncentiveData` - - - -
struct UserReserveIncentiveData has drop, store
-
- - - - - -## Struct `UserIncentiveData` - - - -
struct UserIncentiveData has drop, store
-
- - - - - -## Struct `UserRewardInfo` - - - -
struct UserRewardInfo has drop, store
-
- - - - - -## Constants - - - - - - -
const EMPTY_ADDRESS: address = 0x0;
-
- - - - - - - -
const UI_INCENTIVE_DATA_PROVIDER_V3_NAME: vector<u8> = [65, 65, 86, 69, 95, 85, 73, 95, 73, 78, 67, 69, 78, 84, 73, 86, 69, 95, 68, 65, 84, 65, 95, 80, 82, 79, 86, 73, 68, 69, 82, 95, 86, 51];
-
- - - - - -## Function `ui_incentive_data_provider_v3_data_address` - - - -
#[view]
-public fun ui_incentive_data_provider_v3_data_address(): address
-
- - - - - -## Function `ui_incentive_data_provider_v3_data_object` - - - -
#[view]
-public fun ui_incentive_data_provider_v3_data_object(): object::Object<ui_incentive_data_provider_v3::UiIncentiveDataProviderV3Data>
-
- - - - - -## Function `get_full_reserves_incentive_data` - - - -
#[view]
-public fun get_full_reserves_incentive_data(user: address): (vector<ui_incentive_data_provider_v3::AggregatedReserveIncentiveData>, vector<ui_incentive_data_provider_v3::UserReserveIncentiveData>)
-
- - - - - -## Function `get_reserves_incentives_data` - - - -
#[view]
-public fun get_reserves_incentives_data(): vector<ui_incentive_data_provider_v3::AggregatedReserveIncentiveData>
-
- - - - - -## Function `get_user_reserves_incentives_data` - - - -
#[view]
-public fun get_user_reserves_incentives_data(user: address): vector<ui_incentive_data_provider_v3::UserReserveIncentiveData>
-
diff --git a/aave-core/doc/ui_pool_data_provider_v3.md b/aave-core/doc/ui_pool_data_provider_v3.md deleted file mode 100644 index 4f327da..0000000 --- a/aave-core/doc/ui_pool_data_provider_v3.md +++ /dev/null @@ -1,278 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::ui_pool_data_provider_v3` - - - -- [Resource `UiPoolDataProviderV3Data`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ui_pool_data_provider_v3_UiPoolDataProviderV3Data) -- [Resource `AggregatedReserveData`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ui_pool_data_provider_v3_AggregatedReserveData) -- [Resource `UserReserveData`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ui_pool_data_provider_v3_UserReserveData) -- [Resource `BaseCurrencyInfo`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ui_pool_data_provider_v3_BaseCurrencyInfo) -- [Constants](#@Constants_0) -- [Function `ui_pool_data_provider_v3_data_address`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ui_pool_data_provider_v3_ui_pool_data_provider_v3_data_address) -- [Function `ui_pool_data_provider_v3_data_object`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ui_pool_data_provider_v3_ui_pool_data_provider_v3_data_object) -- [Function `get_reserves_list`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ui_pool_data_provider_v3_get_reserves_list) -- [Function `get_reserves_data`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ui_pool_data_provider_v3_get_reserves_data) -- [Function `get_user_reserves_data`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_ui_pool_data_provider_v3_get_user_reserves_data) - - -
use 0x1::object;
-use 0x1::option;
-use 0x1::string;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::a_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::default_reserve_interest_rate_strategy;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::eac_aggregator_proxy;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::emode_logic;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::mock_underlying_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::token_base;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::variable_debt_token_factory;
-use 0xe02c89369099ad99993cbe3d4c3c80b299df006885854178a8acdb6ab6afb6e::oracle;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::reserve;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::user;
-
- - - - - -## Resource `UiPoolDataProviderV3Data` - - - -
struct UiPoolDataProviderV3Data has key
-
- - - - - -## Resource `AggregatedReserveData` - - - -
struct AggregatedReserveData has drop, store, key
-
- - - - - -## Resource `UserReserveData` - - - -
struct UserReserveData has drop, store, key
-
- - - - - -## Resource `BaseCurrencyInfo` - - - -
struct BaseCurrencyInfo has drop, store, key
-
- - - - - -## Constants - - - - - - -
const EROLE_NOT_EXISTS: u64 = 1;
-
- - - - - - - -
const NOT_FUNDS_ADMIN: u64 = 3;
-
- - - - - - - -
const EAMOUNT_EXCEEDS_THE_AVAILABLE_BALANCE: u64 = 12;
-
- - - - - - - -
const EAMOUNT_IS_ZERO: u64 = 11;
-
- - - - - - - -
const EDEPOSIT_IS_ZERO: u64 = 6;
-
- - - - - - - -
const EDEPOSIT_NOT_MULTIPLE_OF_TIME_DELTA: u64 = 10;
-
- - - - - - - -
const EDEPOSIT_SMALLER_THAN_TIME_DELTA: u64 = 9;
-
- - - - - - - -
const ESTART_TIME_BEFORE_BLOCK_TIMESTAMP: u64 = 7;
-
- - - - - - - -
const ESTOP_TIME_BEFORE_THE_START_TIME: u64 = 8;
-
- - - - - - - -
const ESTREAM_NOT_EXISTS: u64 = 2;
-
- - - - - - - -
const ESTREAM_TO_THE_CALLER: u64 = 5;
-
- - - - - - - -
const ESTREAM_TO_THE_CONTRACT_ITSELF: u64 = 4;
-
- - - - - - - -
const EMPTY_ADDRESS: address = 0x0;
-
- - - - - - - -
const ETH_CURRENCY_UNIT: u256 = 1;
-
- - - - - - - -
const UI_POOL_DATA_PROVIDER_V3_NAME: vector<u8> = [65, 65, 86, 69, 95, 85, 73, 95, 80, 79, 79, 76, 95, 68, 65, 84, 65, 95, 80, 82, 79, 86, 73, 68, 69, 82, 95, 86, 51];
-
- - - - - -## Function `ui_pool_data_provider_v3_data_address` - - - -
#[view]
-public fun ui_pool_data_provider_v3_data_address(): address
-
- - - - - -## Function `ui_pool_data_provider_v3_data_object` - - - -
#[view]
-public fun ui_pool_data_provider_v3_data_object(): object::Object<ui_pool_data_provider_v3::UiPoolDataProviderV3Data>
-
- - - - - -## Function `get_reserves_list` - - - -
#[view]
-public fun get_reserves_list(): vector<address>
-
- - - - - -## Function `get_reserves_data` - - - -
#[view]
-public fun get_reserves_data(): (vector<ui_pool_data_provider_v3::AggregatedReserveData>, ui_pool_data_provider_v3::BaseCurrencyInfo)
-
- - - - - -## Function `get_user_reserves_data` - - - -
#[view]
-public fun get_user_reserves_data(user: address): (vector<ui_pool_data_provider_v3::UserReserveData>, u8)
-
diff --git a/aave-core/doc/underlying_token_factory.md b/aave-core/doc/underlying_token_factory.md deleted file mode 100644 index 2ef6a04..0000000 --- a/aave-core/doc/underlying_token_factory.md +++ /dev/null @@ -1,266 +0,0 @@ - - - -# Module `0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529::underlying_token_factory` - - - -- [Resource `ManagedFungibleAsset`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_underlying_token_factory_ManagedFungibleAsset) -- [Resource `CoinList`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_underlying_token_factory_CoinList) -- [Constants](#@Constants_0) -- [Function `create_token`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_underlying_token_factory_create_token) -- [Function `assert_token_exists`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_underlying_token_factory_assert_token_exists) -- [Function `get_metadata_by_symbol`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_underlying_token_factory_get_metadata_by_symbol) -- [Function `get_token_account_address`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_underlying_token_factory_get_token_account_address) -- [Function `mint`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_underlying_token_factory_mint) -- [Function `transfer_from`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_underlying_token_factory_transfer_from) -- [Function `burn`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_underlying_token_factory_burn) -- [Function `supply`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_underlying_token_factory_supply) -- [Function `maximum`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_underlying_token_factory_maximum) -- [Function `name`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_underlying_token_factory_name) -- [Function `symbol`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_underlying_token_factory_symbol) -- [Function `decimals`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_underlying_token_factory_decimals) -- [Function `balance_of`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_underlying_token_factory_balance_of) -- [Function `token_address`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_underlying_token_factory_token_address) - - -
use 0x1::error;
-use 0x1::fungible_asset;
-use 0x1::object;
-use 0x1::option;
-use 0x1::primary_fungible_store;
-use 0x1::signer;
-use 0x1::smart_table;
-use 0x1::string;
-use 0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529::token_base;
-
- - - - - -## Resource `ManagedFungibleAsset` - -Hold refs to control the minting, transfer and burning of fungible assets. - - -
#[resource_group_member(#[group = 0x1::object::ObjectGroup])]
-struct ManagedFungibleAsset has key
-
- - - - - -## Resource `CoinList` - - - -
struct CoinList has key
-
- - - - - -## Constants - - - - -Only fungible asset metadata owner can make changes. - - -
const ENOT_OWNER: u64 = 1;
-
- - - - - - - -
const E_ACCOUNT_NOT_EXISTS: u64 = 3;
-
- - - - - - - -
const E_TOKEN_ALREADY_EXISTS: u64 = 2;
-
- - - - - -## Function `create_token` - -Initialize metadata object and store the refs. - - -
public entry fun create_token(signer: &signer, maximum_supply: u128, name: string::String, symbol: string::String, decimals: u8, icon_uri: string::String, project_uri: string::String)
-
- - - - - -## Function `assert_token_exists` - - - -
public fun assert_token_exists(token_metadata_address: address)
-
- - - - - -## Function `get_metadata_by_symbol` - -Return the address of the managed fungible asset that's created when this module is deployed. - - -
#[view]
-public fun get_metadata_by_symbol(symbol: string::String): object::Object<fungible_asset::Metadata>
-
- - - - - -## Function `get_token_account_address` - - - -
#[view]
-public fun get_token_account_address(): address
-
- - - - - -## Function `mint` - -Mint as the owner of metadata object. - - -
public entry fun mint(admin: &signer, to: address, amount: u64, metadata_address: address)
-
- - - - - -## Function `transfer_from` - - - -
public(friend) fun transfer_from(from: address, to: address, amount: u64, metadata_address: address)
-
- - - - - -## Function `burn` - -Burn fungible assets as the owner of metadata object. - - -
public(friend) fun burn(from: address, amount: u64, metadata_address: address)
-
- - - - - -## Function `supply` - -Get the current supply from the metadata object. - - -
#[view]
-public fun supply(metadata_address: address): option::Option<u128>
-
- - - - - -## Function `maximum` - -Get the maximum supply from the metadata object. - - -
#[view]
-public fun maximum(metadata_address: address): option::Option<u128>
-
- - - - - -## Function `name` - -Get the name of the fungible asset from the metadata object. - - -
#[view]
-public fun name(metadata_address: address): string::String
-
- - - - - -## Function `symbol` - -Get the symbol of the fungible asset from the metadata object. - - -
#[view]
-public fun symbol(metadata_address: address): string::String
-
- - - - - -## Function `decimals` - -Get the decimals from the metadata object. - - -
#[view]
-public fun decimals(metadata_address: address): u8
-
- - - - - -## Function `balance_of` - -Get the balance of a given store. - - -
#[view]
-public fun balance_of(owner: address, metadata_address: address): u64
-
- - - - - -## Function `token_address` - - - -
#[view]
-public fun token_address(symbol: string::String): address
-
diff --git a/aave-core/doc/user_logic.md b/aave-core/doc/user_logic.md deleted file mode 100644 index 28125f6..0000000 --- a/aave-core/doc/user_logic.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::user_logic` - - - -- [Function `get_user_account_data`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_user_logic_get_user_account_data) - - -
use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::emode_logic;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::generic_logic;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::user;
-
- - - - - -## Function `get_user_account_data` - -@notice Returns the user account data across all the reserves -@param user The address of the user -@return total_collateral_base The total collateral of the user in the base currency used by the price feed -@return total_debt_base The total debt of the user in the base currency used by the price feed -@return available_borrows_base The borrowing power left of the user in the base currency used by the price feed -@return current_liquidation_threshold The liquidation threshold of the user -@return ltv The loan to value of The user -@return health_factor The current health factor of the user - - -
#[view]
-public fun get_user_account_data(user: address): (u256, u256, u256, u256, u256, u256)
-
diff --git a/aave-core/doc/validation_logic.md b/aave-core/doc/validation_logic.md deleted file mode 100644 index d3de629..0000000 --- a/aave-core/doc/validation_logic.md +++ /dev/null @@ -1,303 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool_validation` - - - -- [Function `validate_hf_and_ltv`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_validation_validate_hf_and_ltv) -- [Function `validate_automatic_use_as_collateral`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_validation_validate_automatic_use_as_collateral) -- [Function `validate_use_as_collateral`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_validation_validate_use_as_collateral) -- [Function `validate_health_factor`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_validation_validate_health_factor) -- [Function `validate_set_user_emode`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_pool_validation_validate_set_user_emode) - - -
use 0x1::string;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::generic_logic;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool;
-use 0xd329b8b371bf56fdbfbb66f441a8463f3605ecb27ee0c484f85a4cf88883d2f9::acl_manage;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::error;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::reserve;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::user;
-
- - - - - -## Function `validate_hf_and_ltv` - -@notice Validates the health factor of a user and the ltv of the asset being withdrawn. -@param reserves_data The reserve data of reserve -@param reserves_count The number of available reserves -@param user_config_map the user configuration map -@param from The user from which the aTokens are being transferred -@param user_emode_category The users active efficiency mode category -@param emode_ltv The ltv of the efficiency mode category -@param emode_liq_threshold The liquidation threshold of the efficiency mode category -@param emode_asset_price The price of the efficiency mode category - - -
public fun validate_hf_and_ltv(reserve_data: &mut pool::ReserveData, reserves_count: u256, user_config_map: &user::UserConfigurationMap, from: address, user_emode_category: u8, emode_ltv: u256, emode_liq_threshold: u256, emode_asset_price: u256)
-
- - - - - -## Function `validate_automatic_use_as_collateral` - -@notice Validates if an asset should be automatically activated as collateral in the following actions: supply, -transfer, mint unbacked, and liquidate -@dev This is used to ensure that isolated assets are not enabled as collateral automatically -@param user_config_map the user configuration map -@param reserve_config_map The reserve configuration map -@return True if the asset can be activated as collateral, false otherwise - - -
public fun validate_automatic_use_as_collateral(account: address, user_config_map: &user::UserConfigurationMap, reserve_config_map: &reserve::ReserveConfigurationMap): bool
-
- - - - - -## Function `validate_use_as_collateral` - -@notice Validates the action of activating the asset as collateral. -@dev Only possible if the asset has non-zero LTV and the user is not in isolation mode -@param user_config_map the user configuration map -@param reserve_config_map The reserve configuration map -@return True if the asset can be activated as collateral, false otherwise - - -
public fun validate_use_as_collateral(user_config_map: &user::UserConfigurationMap, reserve_config_map: &reserve::ReserveConfigurationMap): bool
-
- - - - - -## Function `validate_health_factor` - -notice Validates the health factor of a user. -@param reserves_count The number of available reserves -@param user_config_map the user configuration map -@param user The user to validate health factor of -@param user_emode_category The users active efficiency mode category -@param emode_ltv The ltv of the efficiency mode category -@param emode_liq_threshold The liquidation threshold of the efficiency mode category -@param emode_asset_price The price of the efficiency mode category - - -
public fun validate_health_factor(reserves_count: u256, user_config_map: &user::UserConfigurationMap, user: address, user_emode_category: u8, emode_ltv: u256, emode_liq_threshold: u256, emode_asset_price: u256): (u256, bool)
-
- - - - - -## Function `validate_set_user_emode` - -@notice Validates the action of setting efficiency mode. -@param user_config_map the user configuration map -@param reserves_count The total number of valid reserves -@param category_id The id of the category -@param liquidation_threshold The liquidation threshold - - -
public fun validate_set_user_emode(user_config_map: &user::UserConfigurationMap, reserves_count: u256, category_id: u8, liquidation_threshold: u16)
-
- - - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::validation_logic` - - - -- [Struct `ValidateBorrowLocalVars`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_validation_logic_ValidateBorrowLocalVars) -- [Function `validate_flashloan_complex`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_validation_logic_validate_flashloan_complex) -- [Function `validate_flashloan_simple`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_validation_logic_validate_flashloan_simple) -- [Function `validate_supply`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_validation_logic_validate_supply) -- [Function `validate_withdraw`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_validation_logic_validate_withdraw) -- [Function `validate_transfer`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_validation_logic_validate_transfer) -- [Function `validate_set_use_reserve_as_collateral`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_validation_logic_validate_set_use_reserve_as_collateral) -- [Function `validate_borrow`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_validation_logic_validate_borrow) -- [Function `validate_repay`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_validation_logic_validate_repay) -- [Function `validate_liquidation_call`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_validation_logic_validate_liquidation_call) - - -
use 0x1::signer;
-use 0x9efefdec8fe22b7447931b81745048182594ef72653dfbf8e05b815ecc355f7c::math_utils;
-use 0x9efefdec8fe22b7447931b81745048182594ef72653dfbf8e05b815ecc355f7c::wad_ray_math;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::a_token_factory;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::emode_logic;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::generic_logic;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::pool;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::variable_debt_token_factory;
-use 0xe02c89369099ad99993cbe3d4c3c80b299df006885854178a8acdb6ab6afb6e::oracle;
-use 0xe02c89369099ad99993cbe3d4c3c80b299df006885854178a8acdb6ab6afb6e::oracle_sentinel;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::error;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::reserve;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::user;
-
- - - - - -## Struct `ValidateBorrowLocalVars` - - -* ---------------------------- -* Borrow Validate -* ---------------------------- - - - -
struct ValidateBorrowLocalVars has drop
-
- - - - - -## Function `validate_flashloan_complex` - -@notice Validates a flashloan action. -@param reserves_data The data of all the reserves -@param assets The assets being flash-borrowed -@param amounts The amounts for each asset being borrowed - - -
public fun validate_flashloan_complex(reserves_data: &vector<pool::ReserveData>, assets: &vector<address>, amounts: &vector<u256>)
-
- - - - - -## Function `validate_flashloan_simple` - -@notice Validates a flashloan action. -@param reserve_data The reserve data the reserve - - -
public fun validate_flashloan_simple(reserve_data: &pool::ReserveData)
-
- - - - - -## Function `validate_supply` - -@notice Validates a supply action. -@param reserve_data The reserve data the reserve -@param amount The amount to be supplied - - -
public fun validate_supply(reserve_data: &pool::ReserveData, amount: u256)
-
- - - - - -## Function `validate_withdraw` - -@notice Validates a withdraw action. -@param reserve_data The reserve data the reserve -@param amount The amount to be withdrawn -@param user_balance The balance of the user - - -
public fun validate_withdraw(reserve_data: &pool::ReserveData, amount: u256, user_balance: u256)
-
- - - - - -## Function `validate_transfer` - -@notice Validates a transfer action. -@param reserve_data The reserve data the reserve - - -
public fun validate_transfer(reserve_data: &pool::ReserveData)
-
- - - - - -## Function `validate_set_use_reserve_as_collateral` - -@notice Validates the action of setting an asset as collateral. -@param reserve_data The reserve data the reserve -@param user_balance The balance of the user - - -
public fun validate_set_use_reserve_as_collateral(reserve_data: &pool::ReserveData, user_balance: u256)
-
- - - - - -## Function `validate_borrow` - -@notice Validates a borrow action. -@param reserve_data The reserve data the reserve -@param user_config_map The UserConfigurationMap object -@param asset The address of the asset to be borrowed -@param user_address The address of the user -@param amount The amount to be borrowed -@param interest_rate_mode The interest rate mode -@param reserves_count The number of reserves -@param user_emode_category The user's eMode category -@param isolation_mode_active The isolation mode state -@param isolation_mode_collateral_address The address of the collateral reserve in isolation mode -@param isolation_mode_debt_ceiling The debt ceiling in isolation mode - - -
public fun validate_borrow(reserve_data: &pool::ReserveData, user_config_map: &user::UserConfigurationMap, asset: address, user_address: address, amount: u256, interest_rate_mode: u8, reserves_count: u256, user_emode_category: u8, isolation_mode_active: bool, isolation_mode_collateral_address: address, isolation_mode_debt_ceiling: u256)
-
- - - - - -## Function `validate_repay` - -@notice Validates a repay action. -@param account The address of the user -@param reserve_data The reserve data the reserve -@param amount_sent The amount sent for the repayment. Can be an actual value or uint(-1) -@param interest_rate_mode The interest rate mode of the debt being repaid -@param on_behalf_of The address of the user msg.sender is repaying for -@param variable_debt The borrow balance of the user - - -
public fun validate_repay(account: &signer, reserve_data: &pool::ReserveData, amount_sent: u256, interest_rate_mode: u8, on_behalf_of: address, variable_debt: u256)
-
- - - - - -## Function `validate_liquidation_call` - -@notice Validates the liquidation action. -@param user_config_map The user configuration mapping -@param collateral_reserve The reserve data of the collateral -@param debt_reserve The reserve data of the debt -@param total_debt The total debt of the user -@param health_factor The health factor of the user - - -
public fun validate_liquidation_call(user_config_map: &user::UserConfigurationMap, collateral_reserve: &pool::ReserveData, debt_reserve: &pool::ReserveData, total_debt: u256, health_factor: u256)
-
diff --git a/aave-core/doc/variable_debt_token_factory.md b/aave-core/doc/variable_debt_token_factory.md deleted file mode 100644 index f3bbdec..0000000 --- a/aave-core/doc/variable_debt_token_factory.md +++ /dev/null @@ -1,285 +0,0 @@ - - - -# Module `0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::variable_debt_token_factory` - - - -- [Struct `Initialized`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_variable_debt_token_factory_Initialized) -- [Constants](#@Constants_0) -- [Function `create_token`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_variable_debt_token_factory_create_token) -- [Function `mint`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_variable_debt_token_factory_mint) -- [Function `burn`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_variable_debt_token_factory_burn) -- [Function `get_revision`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_variable_debt_token_factory_get_revision) -- [Function `get_underlying_asset_address`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_variable_debt_token_factory_get_underlying_asset_address) -- [Function `get_metadata_by_symbol`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_variable_debt_token_factory_get_metadata_by_symbol) -- [Function `token_address`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_variable_debt_token_factory_token_address) -- [Function `asset_metadata`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_variable_debt_token_factory_asset_metadata) -- [Function `get_previous_index`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_variable_debt_token_factory_get_previous_index) -- [Function `scaled_balance_of`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_variable_debt_token_factory_scaled_balance_of) -- [Function `scaled_total_supply`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_variable_debt_token_factory_scaled_total_supply) -- [Function `get_scaled_user_balance_and_supply`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_variable_debt_token_factory_get_scaled_user_balance_and_supply) -- [Function `name`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_variable_debt_token_factory_name) -- [Function `symbol`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_variable_debt_token_factory_symbol) -- [Function `decimals`](#0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370_variable_debt_token_factory_decimals) - - -
use 0x1::event;
-use 0x1::fungible_asset;
-use 0x1::object;
-use 0x1::signer;
-use 0x1::string;
-use 0xaaeecbeff5c135e527602a0fd44e242efbed5ebec8f911e1e3f4933f62ed2370::token_base;
-use 0xd329b8b371bf56fdbfbb66f441a8463f3605ecb27ee0c484f85a4cf88883d2f9::acl_manage;
-use 0xe984b3b024d14e7aac51fb0aec8d0fbfbc23a230fe3bd8a87f575d243bc0cedd::error;
-
- - - - - -## Struct `Initialized` - - - -
#[event]
-struct Initialized has drop, store
-
- - - - - -## Constants - - - - - - -
const DEBT_TOKEN_REVISION: u256 = 1;
-
- - - - - - - -
const E_NOT_V_TOKEN_ADMIN: u64 = 1;
-
- - - - - -## Function `create_token` - - - -
public(friend) fun create_token(signer: &signer, name: string::String, symbol: string::String, decimals: u8, icon_uri: string::String, project_uri: string::String, underlying_asset: address)
-
- - - - - -## Function `mint` - -@notice Mints debt token to the on_behalf_of address -@param caller The address receiving the borrowed underlying, being the delegatee in case -of credit delegate, or same as on_behalf_of otherwise -@param on_behalf_of The address receiving the debt tokens -@param amount The amount of debt being minted -@param index The variable debt index of the reserve -@param metadata_address The address of the metadata object - - -
public(friend) fun mint(caller: address, on_behalf_of: address, amount: u256, index: u256, metadata_address: address)
-
- - - - - -## Function `burn` - -@notice Burns user variable debt -@dev In some instances, a burn transaction will emit a mint event -if the amount to burn is less than the interest that the user accrued -@param from The address from which the debt will be burned -@param amount The amount getting burned -@param index The variable debt index of the reserve -@param metadata_address The address of the metadata object - - -
public(friend) fun burn(from: address, amount: u256, index: u256, metadata_address: address)
-
- - - - - -## Function `get_revision` - - - -
#[view]
-public fun get_revision(): u256
-
- - - - - -## Function `get_underlying_asset_address` - -@notice Returns the address of the underlying asset of this debtToken (E.g. WETH for variableDebtWETH) -@param metadata_address The address of the metadata object -@return The address of the underlying asset - - -
#[view]
-public fun get_underlying_asset_address(metadata_address: address): address
-
- - - - - -## Function `get_metadata_by_symbol` - - - -
#[view]
-public fun get_metadata_by_symbol(owner: address, symbol: string::String): object::Object<fungible_asset::Metadata>
-
- - - - - -## Function `token_address` - - - -
#[view]
-public fun token_address(owner: address, symbol: string::String): address
-
- - - - - -## Function `asset_metadata` - - - -
#[view]
-public fun asset_metadata(owner: address, symbol: string::String): object::Object<fungible_asset::Metadata>
-
- - - - - -## Function `get_previous_index` - -@notice Returns last index interest was accrued to the user's balance -@param user The address of the user -@param metadata_address The address of the variable debt token -@return The last index interest was accrued to the user's balance, expressed in ray - - -
#[view]
-public fun get_previous_index(user: address, metadata_address: address): u256
-
- - - - - -## Function `scaled_balance_of` - -@notice Returns the scaled balance of the user. -@dev The scaled balance is the sum of all the updated stored balance divided by the reserve's liquidity index -at the moment of the update -@param owner The user whose balance is calculated -@param metadata_address The address of the variable debt token -@return The scaled balance of the user - - -
#[view]
-public fun scaled_balance_of(owner: address, metadata_address: address): u256
-
- - - - - -## Function `scaled_total_supply` - -@notice Returns the scaled total supply of the scaled balance token. Represents sum(debt/index) -@param metadata_address The address of the variable debt token -@return The scaled total supply - - -
#[view]
-public fun scaled_total_supply(metadata_address: address): u256
-
- - - - - -## Function `get_scaled_user_balance_and_supply` - -@notice Returns the scaled balance of the user and the scaled total supply. -@param owner The address of the user -@param metadata_address The address of the variable debt token -@return The scaled balance of the user -@return The scaled total supply - - -
#[view]
-public fun get_scaled_user_balance_and_supply(owner: address, metadata_address: address): (u256, u256)
-
- - - - - -## Function `name` - -Get the name of the fungible asset from the metadata object. - - -
#[view]
-public fun name(metadata_address: address): string::String
-
- - - - - -## Function `symbol` - -Get the symbol of the fungible asset from the metadata object. - - -
#[view]
-public fun symbol(metadata_address: address): string::String
-
- - - - - -## Function `decimals` - -Get the decimals from the metadata object. - - -
#[view]
-public fun decimals(metadata_address: address): u8
-
diff --git a/aave-core/doc/variable_token_factory.md b/aave-core/doc/variable_token_factory.md deleted file mode 100644 index 2bedd85..0000000 --- a/aave-core/doc/variable_token_factory.md +++ /dev/null @@ -1,292 +0,0 @@ - - - -# Module `0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529::variable_token_factory` - - - -- [Struct `Initialized`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_variable_token_factory_Initialized) -- [Constants](#@Constants_0) -- [Function `create_token`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_variable_token_factory_create_token) -- [Function `mint`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_variable_token_factory_mint) -- [Function `burn`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_variable_token_factory_burn) -- [Function `get_revision`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_variable_token_factory_get_revision) -- [Function `get_underlying_asset_address`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_variable_token_factory_get_underlying_asset_address) -- [Function `get_metadata_by_symbol`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_variable_token_factory_get_metadata_by_symbol) -- [Function `token_address`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_variable_token_factory_token_address) -- [Function `asset_metadata`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_variable_token_factory_asset_metadata) -- [Function `get_previous_index`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_variable_token_factory_get_previous_index) -- [Function `scale_balance_of`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_variable_token_factory_scale_balance_of) -- [Function `balance_of`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_variable_token_factory_balance_of) -- [Function `scale_total_supply`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_variable_token_factory_scale_total_supply) -- [Function `supply`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_variable_token_factory_supply) -- [Function `get_scaled_user_balance_and_supply`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_variable_token_factory_get_scaled_user_balance_and_supply) -- [Function `maximum`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_variable_token_factory_maximum) -- [Function `name`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_variable_token_factory_name) -- [Function `symbol`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_variable_token_factory_symbol) -- [Function `decimals`](#0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529_variable_token_factory_decimals) - - -
use 0x1::event;
-use 0x1::fungible_asset;
-use 0x1::object;
-use 0x1::option;
-use 0x1::signer;
-use 0x1::string;
-use 0x1c0b45bb18cf14bcb0b4caaa8e875dfb5eff6d9d8f5b181de3d3e0107f099753::acl_manage;
-use 0x2b375fc8da759f1f7c198ffa5a0bf4466a5eb25564272115a1fa2c30b22657a2::error;
-use 0x671a571aefb734eac5263967388f8611f2b11f603b0f9c90bc77851d18928529::token_base;
-
- - - - - -## Struct `Initialized` - - - -
#[event]
-struct Initialized has drop, store
-
- - - - - -## Constants - - - - - - -
const ATOKEN_REVISION: u256 = 1;
-
- - - - - - - -
const E_NOT_V_TOKEN_ADMIN: u64 = 1;
-
- - - - - -## Function `create_token` - - - -
public(friend) fun create_token(signer: &signer, name: string::String, symbol: string::String, decimals: u8, icon_uri: string::String, project_uri: string::String, underlying_asset: address)
-
- - - - - -## Function `mint` - - - -
public(friend) fun mint(caller: address, on_behalf_of: address, amount: u256, index: u256, metadata_address: address)
-
- - - - - -## Function `burn` - - - -
public(friend) fun burn(from: address, amount: u256, index: u256, metadata_address: address)
-
- - - - - -## Function `get_revision` - - - -
#[view]
-public fun get_revision(): u256
-
- - - - - -## Function `get_underlying_asset_address` - - - -
#[view]
-public fun get_underlying_asset_address(metadata_address: address): address
-
- - - - - -## Function `get_metadata_by_symbol` - -Return the address of the managed fungible asset that's created when this module is deployed. - - -
#[view]
-public fun get_metadata_by_symbol(owner: address, symbol: string::String): object::Object<fungible_asset::Metadata>
-
- - - - - -## Function `token_address` - - - -
#[view]
-public fun token_address(owner: address, symbol: string::String): address
-
- - - - - -## Function `asset_metadata` - - - -
#[view]
-public fun asset_metadata(owner: address, symbol: string::String): object::Object<fungible_asset::Metadata>
-
- - - - - -## Function `get_previous_index` - - - -
#[view]
-public fun get_previous_index(user: address, metadata_address: address): u256
-
- - - - - -## Function `scale_balance_of` - - - -
#[view]
-public fun scale_balance_of(owner: address, metadata_address: address): u256
-
- - - - - -## Function `balance_of` - - - -
#[view]
-public fun balance_of(owner: address, metadata_address: address): u256
-
- - - - - -## Function `scale_total_supply` - - - -
#[view]
-public fun scale_total_supply(metadata_address: address): u256
-
- - - - - -## Function `supply` - - - -
#[view]
-public fun supply(metadata_address: address): u256
-
- - - - - -## Function `get_scaled_user_balance_and_supply` - - - -
#[view]
-public fun get_scaled_user_balance_and_supply(owner: address, metadata_address: address): (u256, u256)
-
- - - - - -## Function `maximum` - -Get the maximum supply from the metadata object. - - -
#[view]
-public fun maximum(metadata_address: address): option::Option<u128>
-
- - - - - -## Function `name` - -Get the name of the fungible asset from the metadata object. - - -
#[view]
-public fun name(metadata_address: address): string::String
-
- - - - - -## Function `symbol` - -Get the symbol of the fungible asset from the metadata object. - - -
#[view]
-public fun symbol(metadata_address: address): string::String
-
- - - - - -## Function `decimals` - -Get the decimals from the metadata object. - - -
#[view]
-public fun decimals(metadata_address: address): u8
-
diff --git a/aave-core/sources/aave-supply-borrow/borrow_logic.move b/aave-core/sources/aave-logic/borrow_logic.move similarity index 70% rename from aave-core/sources/aave-supply-borrow/borrow_logic.move rename to aave-core/sources/aave-logic/borrow_logic.move index b4cb661..334bf9f 100644 --- a/aave-core/sources/aave-supply-borrow/borrow_logic.move +++ b/aave-core/sources/aave-logic/borrow_logic.move @@ -5,15 +5,15 @@ module aave_pool::borrow_logic { use std::signer; use aptos_framework::event; - use aave_config::error as error_config; - use aave_config::reserve as reserve_config; - use aave_config::user as user_config; + use aave_config::error_config; + use aave_config::reserve_config; + use aave_config::user_config; use aave_math::math_utils; use aave_pool::a_token_factory; use aave_pool::emode_logic; + use aave_pool::fungible_asset_manager; use aave_pool::isolation_mode_logic; - use aave_pool::mock_underlying_token_factory; use aave_pool::pool; use aave_pool::validation_logic; use aave_pool::variable_debt_token_factory; @@ -21,10 +21,10 @@ module aave_pool::borrow_logic { friend aave_pool::flashloan_logic; #[event] - /// @dev Emitted on borrow() and flashLoan() when debt needs to be opened + /// @dev Emitted on borrow() and flash_loan() when debt needs to be opened /// @param reserve The address of the underlying asset being borrowed /// @param user The address of the user initiating the borrow(), receiving the funds on borrow() or just - /// initiator of the transaction on flashLoan() + /// initiator of the transaction on flash_loan() /// @param on_behalf_of The address that will be getting the debt /// @param amount The amount borrowed out /// @param interest_rate_mode The rate mode: 2 for Variable @@ -37,7 +37,7 @@ module aave_pool::borrow_logic { amount: u256, interest_rate_mode: u8, borrow_rate: u256, - referral_code: u16, + referral_code: u16 } #[event] @@ -52,82 +52,80 @@ module aave_pool::borrow_logic { user: address, repayer: address, amount: u256, - use_a_tokens: bool, + use_a_tokens: bool } #[event] - /// @dev Emitted on borrow(), repay() and liquidationCall() when using isolated assets + /// @dev Emitted on borrow(), repay() and liquidation_call() when using isolated assets /// @param asset The address of the underlying asset of the reserve /// @param totalDebt The total isolation mode debt for the reserve struct IsolationModeTotalDebtUpdated has store, drop { asset: address, - total_debt: u256, + total_debt: u256 } /// @notice Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower - /// already supplied enough collateral, or he was given enough allowance by a credit delegator on the - /// corresponding debt token VariableDebtToken + /// already supplied enough collateral /// - E.g. User borrows 100 USDC passing as `on_behalf_of` his own address, receiving the 100 USDC in his wallet - /// and 100 stable/variable debt tokens, depending on the `interest_rate_mode` + /// and 100 variable debt tokens, depending on the `interest_rate_mode` + /// @dev Emits the `Borrow()` event + /// @param account The signer account of the caller /// @param asset The address of the underlying asset to borrow /// @param amount The amount to be borrowed /// @param interest_rate_mode The interest rate mode at which the user wants to borrow: 2 for Variable /// @param referral_code The code used to register the integrator originating the operation, for potential rewards. /// 0 if the action is executed directly by the user, without any middle-man /// @param on_behalf_of The address of the user who will receive the debt. Should be the address of the borrower itself - /// calling the function if he wants to borrow against his own collateral, or the address of the credit delegator - /// if he has been given credit delegation allowance public entry fun borrow( account: &signer, asset: address, amount: u256, interest_rate_mode: u8, referral_code: u16, - on_behalf_of: address, + on_behalf_of: address ) { internal_borrow( - account, + signer::address_of(account), asset, amount, interest_rate_mode, referral_code, on_behalf_of, - true, + true ); } /// @notice Implements the borrow feature. Borrowing allows users that provided collateral to draw liquidity from the /// Aave protocol proportionally to their collateralization power. For isolated positions, it also increases the /// isolated debt. + /// @dev Only callable by the borrow_logic and flashloan_logic module /// @dev Emits the `Borrow()` event - /// @param account The signer account + /// @param user The address of the caller /// @param asset The address of the underlying asset to borrow /// @param amount The amount to be borrowed /// @param interest_rate_mode The interest rate mode at which the user wants to borrow: 2 for Variable /// @param referral_code The code used to register the integrator originating the operation, for potential rewards. /// 0 if the action is executed directly by the user, without any middle /// @param on_behalf_of The address of the user who will receive the debt. Should be the address of the borrower itself - /// calling the function if he wants to borrow against his own collateral, or the address of the credit delegator - /// if he has been given credit delegation allowance /// @param release_underlying If true, the underlying asset will be transferred to the user, otherwise it will stay public(friend) fun internal_borrow( - account: &signer, + user: address, asset: address, amount: u256, interest_rate_mode: u8, referral_code: u16, on_behalf_of: address, - release_underlying: bool, + release_underlying: bool ) { - let user = signer::address_of(account); assert!( user == on_behalf_of, error_config::get_esigner_and_on_behalf_of_no_same() ); let (reserve_data, reserves_count) = pool::get_reserve_data_and_reserves_count(asset); + let reserve_cache = pool::cache(&reserve_data); // update pool state - pool::update_state(asset, &mut reserve_data); + pool::update_state(asset, &mut reserve_data, &mut reserve_cache); let user_config_map = pool::get_user_configuration(on_behalf_of); let ( @@ -136,34 +134,53 @@ module aave_pool::borrow_logic { isolation_mode_debt_ceiling ) = pool::get_isolation_mode_state(&user_config_map); + let user_emode_category = (emode_logic::get_user_emode(on_behalf_of) as u8); + let (emode_ltv, emode_liq_threshold, emode_asset_price) = + emode_logic::get_emode_configuration(user_emode_category); + + let emode_category_data = + emode_logic::get_emode_category_data(user_emode_category); + let emode_price_source = + emode_logic::get_emode_category_price_source(&emode_category_data); // validate borrow validation_logic::validate_borrow( - &reserve_data, + &reserve_cache, &user_config_map, asset, on_behalf_of, amount, interest_rate_mode, reserves_count, - (emode_logic::get_user_emode(on_behalf_of) as u8), + user_emode_category, + emode_ltv, + emode_liq_threshold, + emode_asset_price, + emode_price_source, isolation_mode_active, isolation_mode_collateral_address, - isolation_mode_debt_ceiling, + isolation_mode_debt_ceiling ); - let variable_token_address = - pool::get_reserve_variable_debt_token_address(&reserve_data); - let is_first_borrowing: bool = + let variable_debt_token_address = + pool::get_variable_debt_token_address(&reserve_cache); + let is_first_borrowing = variable_debt_token_factory::scaled_balance_of( - on_behalf_of, variable_token_address + on_behalf_of, variable_debt_token_address ) == 0; variable_debt_token_factory::mint( user, on_behalf_of, amount, - (pool::get_reserve_variable_borrow_index(&reserve_data) as u256), - variable_token_address, + pool::get_next_variable_borrow_index(&reserve_cache), + variable_debt_token_address + ); + + let next_scaled_variable_debt = + variable_debt_token_factory::scaled_total_supply(variable_debt_token_address); + // update reserve cache next_scaled_variable_debt + pool::set_next_scaled_variable_debt( + &mut reserve_cache, next_scaled_variable_debt ); if (is_first_borrowing) { @@ -180,35 +197,45 @@ module aave_pool::borrow_logic { &isolation_mode_collateral_reserve_data ); let reserve_configuration_map = - pool::get_reserve_configuration_by_reserve_data(&reserve_data); + pool::get_reserve_cache_configuration(&reserve_cache); let decimals = reserve_config::get_decimals(&reserve_configuration_map) - reserve_config::get_debt_ceiling_decimals(); + let next_isolation_mode_total_debt = - (isolation_mode_total_debt as u256) + ( - amount / math_utils::pow(10, decimals) - ); + (isolation_mode_total_debt as u256) + + (amount / math_utils::pow(10, decimals)); // update isolation_mode_total_debt pool::set_reserve_isolation_mode_total_debt( isolation_mode_collateral_address, - (next_isolation_mode_total_debt as u128), + &mut isolation_mode_collateral_reserve_data, + (next_isolation_mode_total_debt as u128) ); event::emit( IsolationModeTotalDebtUpdated { asset: isolation_mode_collateral_address, total_debt: next_isolation_mode_total_debt - }, + } ); }; // update pool interest rate let liquidity_taken = if (release_underlying) { amount } else { 0 }; - pool::update_interest_rates(&mut reserve_data, asset, 0, liquidity_taken); + pool::update_interest_rates( + &mut reserve_data, + &reserve_cache, + asset, + 0, + liquidity_taken + ); + if (release_underlying) { a_token_factory::transfer_underlying_to( - user, amount, pool::get_reserve_a_token_address(&reserve_data) + user, + amount, + pool::get_a_token_address(&reserve_cache) ); }; @@ -223,17 +250,18 @@ module aave_pool::borrow_logic { borrow_rate: ( pool::get_reserve_current_variable_borrow_rate(&reserve_data) as u256 ), - referral_code, - }, + referral_code + } ); } /// @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned /// - E.g. User repays 100 USDC, burning 100 variable debt tokens of the `on_behalf_of` address + /// @param account The signer account of the caller /// @param asset The address of the borrowed underlying asset previously borrowed /// @param amount The amount to repay - /// - Send the value math_utils::u256_max() in order to repay the whole debt for `asset` on the specific `debtMode` - /// @param interest_rate_mode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable + /// - Send the value math_utils::u256_max() in order to repay the whole debt for `asset` on the specific `interest_rate_mode` + /// @param interest_rate_mode The interest rate mode at of the debt the user wants to repay: 2 for Variable /// @param on_behalf_of The address of the user who will get his debt reduced/removed. Should be the address of the /// user calling the function if he wants to reduce/remove his own debt, or the address of any other /// other borrower whose debt should be removed @@ -242,16 +270,23 @@ module aave_pool::borrow_logic { asset: address, amount: u256, interest_rate_mode: u8, - on_behalf_of: address, + on_behalf_of: address ) { - internal_repay(account, asset, amount, interest_rate_mode, on_behalf_of, false) + internal_repay( + account, + asset, + amount, + interest_rate_mode, + on_behalf_of, + false + ) } /// @notice Implements the repay feature. Repaying transfers the underlying back to the aToken and clears the /// equivalent amount of debt for the user by burning the corresponding debt token. For isolated positions, it also /// reduces the isolated debt. /// @dev Emits the `Repay()` event - /// @param account The signer account + /// @param account The signer account of the caller /// @param asset The address of the underlying asset to repay /// @param amount The amount to be repaid. Can be `math_utils::u256_max()` to repay the whole debt /// @param interest_rate_mode The interest rate mode at which the user wants to repay: 2 for Variable @@ -268,47 +303,50 @@ module aave_pool::borrow_logic { use_a_tokens: bool ) { let account_address = signer::address_of(account); - assert!( - account_address == on_behalf_of, - error_config::get_esigner_and_on_behalf_of_no_same(), - ); - let reserve_data = pool::get_reserve_data(asset); + let reserve_cache = pool::cache(&reserve_data); // update pool state - pool::update_state(asset, &mut reserve_data); + pool::update_state(asset, &mut reserve_data, &mut reserve_cache); let variable_debt_token_address = - pool::get_reserve_variable_debt_token_address(&reserve_data); + pool::get_variable_debt_token_address(&reserve_cache); let variable_debt = - pool::scaled_variable_token_balance_of( + pool::variable_debt_token_balance_of( on_behalf_of, variable_debt_token_address ); // validate repay validation_logic::validate_repay( - account, - &reserve_data, + account_address, + &reserve_cache, amount, interest_rate_mode, on_behalf_of, - variable_debt, + variable_debt ); let payback_amount = variable_debt; // Allows a user to repay with aTokens without leaving dust from interest. - let a_token_address = pool::get_reserve_a_token_address(&reserve_data); + let a_token_address = pool::get_a_token_address(&reserve_cache); if (use_a_tokens && amount == math_utils::u256_max()) { - amount = pool::scaled_a_token_balance_of(account_address, a_token_address) + amount = pool::a_token_balance_of(account_address, a_token_address) }; if (amount < payback_amount) { payback_amount = amount; }; + variable_debt_token_factory::burn( on_behalf_of, payback_amount, - (pool::get_reserve_variable_borrow_index(&reserve_data) as u256), - pool::get_reserve_variable_debt_token_address(&reserve_data), + pool::get_next_variable_borrow_index(&reserve_cache), + variable_debt_token_address + ); + // update reserve cache next_scaled_variable_debt + let next_scaled_variable_debt = + variable_debt_token_factory::scaled_total_supply(variable_debt_token_address); + pool::set_next_scaled_variable_debt( + &mut reserve_cache, next_scaled_variable_debt ); // update pool interest rate @@ -316,20 +354,29 @@ module aave_pool::borrow_logic { else { payback_amount }; - pool::update_interest_rates(&mut reserve_data, asset, liquidity_added, 0); + pool::update_interest_rates( + &mut reserve_data, + &reserve_cache, + asset, + liquidity_added, + 0 + ); let user_config_map = pool::get_user_configuration(on_behalf_of); - // set borrowing if (variable_debt - payback_amount == 0) { user_config::set_borrowing( - &mut user_config_map, (pool::get_reserve_id(&reserve_data) as u256), true + &mut user_config_map, + (pool::get_reserve_id(&reserve_data) as u256), + false ); pool::set_user_configuration(on_behalf_of, user_config_map); }; // update reserve_data.isolation_mode_total_debt field isolation_mode_logic::update_isolated_debt_if_isolated( - &user_config_map, &reserve_data, payback_amount + &user_config_map, + &reserve_cache, + payback_amount ); // If you choose to repay with AToken, burn Atoken @@ -338,21 +385,21 @@ module aave_pool::borrow_logic { account_address, a_token_factory::get_token_account_address(a_token_address), payback_amount, - (pool::get_reserve_liquidity_index(&reserve_data) as u256), - a_token_address, + pool::get_next_liquidity_index(&reserve_cache), + a_token_address ); } else { - mock_underlying_token_factory::transfer_from( - account_address, + fungible_asset_manager::transfer( + account, a_token_factory::get_token_account_address(a_token_address), (payback_amount as u64), - asset, + asset ); a_token_factory::handle_repayment( account_address, on_behalf_of, payback_amount, - pool::get_reserve_a_token_address(&reserve_data), + a_token_address ); }; @@ -363,8 +410,8 @@ module aave_pool::borrow_logic { user: on_behalf_of, repayer: account_address, amount: payback_amount, - use_a_tokens, - }, + use_a_tokens + } ); } @@ -373,14 +420,24 @@ module aave_pool::borrow_logic { /// - E.g. User repays 100 USDC using 100 aUSDC, burning 100 variable debt tokens /// @dev Passing math_utils::u256_max() as amount will clean up any residual aToken dust balance, if the user aToken /// balance is not enough to cover the whole debt - /// @param account The signer account + /// @param account The signer account of the caller /// @param asset The address of the borrowed underlying asset previously borrowed /// @param amount The amount to repay - /// @param interest_rate_mode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable + /// @param interest_rate_mode The interest rate mode at of the debt the user wants to repay: 2 for Variable public entry fun repay_with_a_tokens( - account: &signer, asset: address, amount: u256, interest_rate_mode: u8 + account: &signer, + asset: address, + amount: u256, + interest_rate_mode: u8 ) { let account_address = signer::address_of(account); - internal_repay(account, asset, amount, interest_rate_mode, account_address, true) + internal_repay( + account, + asset, + amount, + interest_rate_mode, + account_address, + true + ) } } diff --git a/aave-core/sources/aave-bridge/bridge_logic.move b/aave-core/sources/aave-logic/bridge_logic.move similarity index 71% rename from aave-core/sources/aave-bridge/bridge_logic.move rename to aave-core/sources/aave-logic/bridge_logic.move index 749ae79..f81386f 100644 --- a/aave-core/sources/aave-bridge/bridge_logic.move +++ b/aave-core/sources/aave-logic/bridge_logic.move @@ -3,20 +3,19 @@ module aave_pool::bridge_logic { use aptos_framework::event; use aave_acl::acl_manage; - use aave_config::error as error_config; - use aave_config::reserve as reserve_config; - use aave_config::user as user_config; + use aave_config::error_config; + use aave_config::reserve_config; + use aave_config::user_config; use aave_math::math_utils; use aave_math::wad_ray_math; use aave_pool::a_token_factory; - use aave_pool::mock_underlying_token_factory; + use aave_pool::fungible_asset_manager; use aave_pool::pool::Self; - use aave_pool::pool_validation; use aave_pool::validation_logic; #[event] - /// @dev Emitted on setUserUseReserveAsCollateral() + /// @dev Emitted on mint_unbacked() /// @param reserve The address of the underlying asset of the reserve /// @param user The address of the user enabling the usage as collateral struct ReserveUsedAsCollateralEnabled has store, drop { @@ -56,6 +55,7 @@ module aave_pool::bridge_logic { /// @dev Essentially a supply without transferring the underlying. /// @dev Emits the `MintUnbacked` event /// @dev Emits the `ReserveUsedAsCollateralEnabled` if asset is set as collateral + /// @param account The account signer of the caller /// @param asset The address of the underlying asset to mint aTokens of /// @param amount The amount to mint /// @param on_behalf_of The address that will receive the aTokens @@ -69,16 +69,17 @@ module aave_pool::bridge_logic { referral_code: u16 ) { let account_address = signer::address_of(account); - assert!(only_brigde(account_address), error_config::get_ecaller_not_bridge()); + assert!(only_bridge(account_address), error_config::get_ecaller_not_bridge()); let reserve_data = pool::get_reserve_data(asset); + let reserve_cache = pool::cache(&reserve_data); // update pool state - pool::update_state(asset, &mut reserve_data); + pool::update_state(asset, &mut reserve_data, &mut reserve_cache); + // validate supply - validation_logic::validate_supply(&reserve_data, amount); + validation_logic::validate_supply(&reserve_cache, &reserve_data, amount); // validate unbacked mint cap - let reserve_config_map = - pool::get_reserve_configuration_by_reserve_data(&reserve_data); + let reserve_config_map = pool::get_reserve_cache_configuration(&reserve_cache); let unbacked_mint_cap = reserve_config::get_unbacked_mint_cap(&reserve_config_map); let reserve_decimals = reserve_config::get_decimals(&reserve_config_map); @@ -88,38 +89,41 @@ module aave_pool::bridge_logic { assert!( unbacked <= unbacked_mint_cap * (math_utils::pow(10, reserve_decimals)), - error_config::get_eunbacked_mint_cap_exceeded(), + error_config::get_eunbacked_mint_cap_exceeded() ); - - let token_a_address = pool::get_reserve_a_token_address(&reserve_data); // update pool interest rates - pool::update_interest_rates(&mut reserve_data, asset, 0, 0); - let is_first_supply: bool = - a_token_factory::scaled_balance_of(on_behalf_of, token_a_address) == 0; + pool::update_interest_rates(&mut reserve_data, &reserve_cache, asset, 0, 0); + let token_a_address = pool::get_a_token_address(&reserve_cache); + let is_first_supply = + a_token_factory::scaled_balance_of(on_behalf_of, token_a_address) == 0; a_token_factory::mint( account_address, on_behalf_of, amount, - (pool::get_reserve_liquidity_index(&reserve_data) as u256), - token_a_address, + pool::get_next_liquidity_index(&reserve_cache), + token_a_address ); if (is_first_supply) { let user_config_map = pool::get_user_configuration(on_behalf_of); - let reserve_id = pool::get_reserve_id(&reserve_data); - if (pool_validation::validate_automatic_use_as_collateral( - account_address, &user_config_map, &reserve_config_map - )) { + if (validation_logic::validate_automatic_use_as_collateral( + account_address, + &user_config_map, + &reserve_config_map + )) { + let reserve_id = pool::get_reserve_id(&reserve_data); user_config::set_using_as_collateral( &mut user_config_map, (reserve_id as u256), true ); pool::set_user_configuration(on_behalf_of, user_config_map); + event::emit( ReserveUsedAsCollateralEnabled { reserve: asset, user: on_behalf_of } ); } }; + event::emit( MintUnbacked { reserve: asset, @@ -127,13 +131,14 @@ module aave_pool::bridge_logic { on_behalf_of, amount, referral_code - }, + } ); } /// @notice Back the current unbacked with `amount` and pay `fee`. /// @dev It is not possible to back more than the existing unbacked amount of the reserve /// @dev Emits the `BackUnbacked` event + /// @param account The account signer of the caller /// @param asset The address of the underlying asset to repay /// @param amount The amount to back /// @param fee The amount paid in fees @@ -142,13 +147,15 @@ module aave_pool::bridge_logic { account: &signer, asset: address, amount: u256, - fee: u256, + fee: u256 ) { let account_address = signer::address_of(account); - assert!(only_brigde(account_address), error_config::get_ecaller_not_bridge()); + assert!(only_bridge(account_address), error_config::get_ecaller_not_bridge()); + let reserve_data = pool::get_reserve_data(asset); + let reserve_cache = pool::cache(&reserve_data); // update pool state - pool::update_state(asset, &mut reserve_data); + pool::update_state(asset, &mut reserve_data, &mut reserve_cache); let unbacked = (pool::get_reserve_unbacked(&reserve_data) as u256); let backing_amount = if (amount < unbacked) { amount } @@ -161,41 +168,51 @@ module aave_pool::bridge_logic { let fee_to_lp = fee - fee_to_protocol; let added = backing_amount + fee; - let token_a_address = pool::get_reserve_a_token_address(&reserve_data); + let a_token_address = pool::get_a_token_address(&reserve_cache); let accrued_to_treasury = pool::get_reserve_accrued_to_treasury(&reserve_data); - let token_a_supply_and_treasury = - pool::scaled_a_token_total_supply(token_a_address) + let total_liquidity = + pool::a_token_total_supply(a_token_address) + wad_ray_math::ray_mul( accrued_to_treasury, - (pool::get_reserve_liquidity_index(&reserve_data) as u256), + pool::get_next_liquidity_index(&reserve_cache) ); let next_liquidity_index = pool::cumulate_to_liquidity_index( asset, &mut reserve_data, - token_a_supply_and_treasury, - fee_to_lp, + total_liquidity, + fee_to_lp ); + // update reserve cache next liquidity index + pool::set_next_liquidity_index(&mut reserve_cache, next_liquidity_index); - let accrued_to_treasury_amount = + let new_accrued_to_treasury = accrued_to_treasury + wad_ray_math::ray_div(fee_to_protocol, next_liquidity_index); // update pool accrue to treasury - pool::set_reserve_accrued_to_treasury(asset, accrued_to_treasury_amount); + pool::set_reserve_accrued_to_treasury( + asset, &mut reserve_data, new_accrued_to_treasury + ); // update pool unbacked pool::set_reserve_unbacked( asset, &mut reserve_data, ((unbacked - backing_amount) as u128) ); // update pool interest rates - pool::update_interest_rates(&mut reserve_data, asset, added, 0); + pool::update_interest_rates( + &mut reserve_data, + &reserve_cache, + asset, + added, + 0 + ); - mock_underlying_token_factory::transfer_from( - account_address, - a_token_factory::get_token_account_address(token_a_address), + fungible_asset_manager::transfer( + account, + a_token_factory::get_token_account_address(a_token_address), (added as u64), - asset, + asset ); event::emit( @@ -203,12 +220,12 @@ module aave_pool::bridge_logic { reserve: asset, backer: account_address, amount: backing_amount, - fee, - }, + fee + } ) } - fun only_brigde(brigde: address): bool { - acl_manage::is_bridge(brigde) + fun only_bridge(bridge: address): bool { + acl_manage::is_bridge(bridge) } } diff --git a/aave-core/sources/aave-pool/emode_logic.move b/aave-core/sources/aave-logic/emode_logic.move similarity index 81% rename from aave-core/sources/aave-pool/emode_logic.move rename to aave-core/sources/aave-logic/emode_logic.move index d82e127..02a8668 100644 --- a/aave-core/sources/aave-pool/emode_logic.move +++ b/aave-core/sources/aave-logic/emode_logic.move @@ -8,11 +8,10 @@ module aave_pool::emode_logic { use aptos_std::smart_table::{Self, SmartTable}; use aptos_framework::event; - use aave_config::error; - use aave_mock_oracle::oracle; - + use aave_config::error_config; + use aave_oracle::oracle; use aave_pool::pool; - use aave_pool::pool_validation; + use aave_pool::validation_logic; friend aave_pool::pool_configurator; friend aave_pool::supply_logic; @@ -24,6 +23,8 @@ module aave_pool::emode_logic { friend aave_pool::supply_logic_tests; #[test_only] friend aave_pool::borrow_logic_tests; + #[test_only] + friend aave_pool::ui_pool_data_provider_v3; const EMPTY_STRING: vector = b""; @@ -33,7 +34,7 @@ module aave_pool::emode_logic { /// @param category_id The category id struct UserEModeSet has store, drop { user: address, - category_id: u8, + category_id: u8 } struct EModeCategory has store, copy, drop { @@ -42,47 +43,59 @@ module aave_pool::emode_logic { liquidation_bonus: u16, /// each eMode category may or may not have a custom oracle to override the individual assets price oracles price_source: address, - label: String, + label: String } /// List of eMode categories as a map (emode_category_id => EModeCategory). struct EModeCategoryList has key { - value: SmartTable, + value: SmartTable } /// Map of users address and their eMode category (user_address => emode_category_id) struct UsersEmodeCategory has key, store { - value: SmartTable, + value: SmartTable } /// @notice Initializes the eMode + /// @dev Only callable by the pool_configurator module + /// @param account The account signer of the caller public(friend) fun init_emode(account: &signer) { assert!( (signer::address_of(account) == @aave_pool), - error::get_ecaller_not_pool_admin(), + error_config::get_enot_pool_owner() ); move_to( account, - EModeCategoryList { value: smart_table::new(), }, + EModeCategoryList { + value: smart_table::new() + } ); - move_to(account, UsersEmodeCategory { value: smart_table::new(), }) + move_to( + account, + UsersEmodeCategory { + value: smart_table::new() + } + ) } /// @notice Updates the user efficiency mode category /// @dev Will revert if user is borrowing non-compatible asset or change will drop HF < HEALTH_FACTOR_LIQUIDATION_THRESHOLD /// @dev Emits the `UserEModeSet` event + /// @param account The account signer of the caller /// @param category_id The state of all users efficiency mode category - public entry fun set_user_emode(account: &signer, category_id: u8) acquires UsersEmodeCategory, EModeCategoryList { + public entry fun set_user_emode( + account: &signer, category_id: u8 + ) acquires UsersEmodeCategory, EModeCategoryList { // validate set user emode let account_address = signer::address_of(account); let user_config_map = pool::get_user_configuration(account_address); let reserves_count = pool::get_reserves_count(); let emode_configuration = get_emode_category_data(category_id); - pool_validation::validate_set_user_emode( + validation_logic::validate_set_user_emode( &user_config_map, reserves_count, category_id, - emode_configuration.liquidation_threshold, + emode_configuration.liquidation_threshold ); let prev_category_id = get_user_emode(account_address); @@ -90,15 +103,16 @@ module aave_pool::emode_logic { smart_table::upsert(&mut user_emode_category.value, account_address, category_id); let (emode_ltv, emode_liq_threshold, emode_asset_price) = get_emode_configuration(category_id); + if (prev_category_id != 0) { - pool_validation::validate_health_factor( - reserves_count, + validation_logic::validate_health_factor( &user_config_map, account_address, category_id, + reserves_count, emode_ltv, emode_liq_threshold, - emode_asset_price, + emode_asset_price ); }; event::emit(UserEModeSet { user: account_address, category_id }); @@ -120,7 +134,9 @@ module aave_pool::emode_logic { /// @notice Get the price source of the eMode category /// @param user_emode_category The user eMode category /// @return The price source of the eMode category - public fun get_emode_e_mode_price_source(user_emode_category: u8): address acquires EModeCategoryList { + public fun get_emode_e_mode_price_source( + user_emode_category: u8 + ): address acquires EModeCategoryList { let emode_category_list = borrow_global(@aave_pool); if (!smart_table::contains(&emode_category_list.value, user_emode_category)) { return @0x0 @@ -132,11 +148,13 @@ module aave_pool::emode_logic { /// @notice Gets the eMode configuration and calculates the eMode asset price if a custom oracle is configured /// @dev The eMode asset price returned is 0 if no oracle is specified - /// @param category The user eMode category + /// @param user_emode_category The user eMode category /// @return The eMode ltv /// @return The eMode liquidation threshold /// @return The eMode asset price - public fun get_emode_configuration(user_emode_category: u8): (u256, u256, u256) acquires EModeCategoryList { + public fun get_emode_configuration( + user_emode_category: u8 + ): (u256, u256, u256) acquires EModeCategoryList { let emode_asset_price = 0; let emode_category_list = borrow_global(@aave_pool); if (!smart_table::contains(&emode_category_list.value, user_emode_category)) { @@ -146,13 +164,12 @@ module aave_pool::emode_logic { smart_table::borrow(&emode_category_list.value, user_emode_category); let emode_price_source = emode_category.price_source; if (emode_price_source != @0x0) { + // TODO Waiting for Chainlink oracle functionality emode_asset_price = oracle::get_asset_price(emode_price_source); }; - return ( - (emode_category.ltv as u256), - (emode_category.liquidation_threshold as u256), - emode_asset_price - ) + return ((emode_category.ltv as u256), + (emode_category.liquidation_threshold as u256), + emode_asset_price) } /// @notice Gets the eMode category label @@ -171,7 +188,9 @@ module aave_pool::emode_logic { /// @notice Gets the eMode category liquidation_bonus /// @param user_emode_category The user eMode category /// @return The liquidation bonus of the eMode category - public fun get_emode_e_mode_liquidation_bonus(user_emode_category: u8): u16 acquires EModeCategoryList { + public fun get_emode_e_mode_liquidation_bonus( + user_emode_category: u8 + ): u16 acquires EModeCategoryList { let emode_category_list = borrow_global(@aave_pool); if (!smart_table::contains(&emode_category_list.value, user_emode_category)) { return 0 @@ -182,6 +201,7 @@ module aave_pool::emode_logic { } /// @notice Configures a new category for the eMode. + /// @dev Only callable by the pool_configurator module /// @dev In eMode, the protocol allows very high borrowing power to borrow assets of the same category. /// The category 0 is reserved as it's the default for volatile assets /// @param id The id of the category @@ -198,7 +218,10 @@ module aave_pool::emode_logic { price_source: address, label: String ) acquires EModeCategoryList { - assert!(id != 0, error::get_eemode_category_reserved()); + assert!(id != 0, error_config::get_eemode_category_reserved()); + // Currently, custom oracle is not supported. Only a unified oracle is used. Therefore, the price_source is equal to @0x0 + price_source = @0x0; + let emode_category_list = borrow_global_mut(@aave_pool); smart_table::upsert( &mut emode_category_list.value, @@ -208,8 +231,8 @@ module aave_pool::emode_logic { liquidation_threshold, liquidation_bonus, price_source, - label, - }, + label + } ); } @@ -218,9 +241,9 @@ module aave_pool::emode_logic { /// @param emode_asset_category The asset eMode category /// @return True if eMode is active and the asset belongs to the eMode category chosen by the user, false otherwise public fun is_in_emode_category( - emode_user_category: u256, emode_assert_category: u256 + emode_user_category: u256, emode_asset_category: u256 ): bool { - emode_user_category != 0 && emode_assert_category == emode_user_category + emode_user_category != 0 && emode_asset_category == emode_user_category } #[view] @@ -236,7 +259,7 @@ module aave_pool::emode_logic { liquidation_bonus: 0, // each eMode category may or may not have a custom oracle to override the individual assets price oracles price_source: @0x0, - label: string::utf8(EMPTY_STRING), + label: string::utf8(EMPTY_STRING) } }; diff --git a/aave-core/sources/aave-flash-loan/flash_loan.move b/aave-core/sources/aave-logic/flashloan_logic.move similarity index 76% rename from aave-core/sources/aave-flash-loan/flash_loan.move rename to aave-core/sources/aave-logic/flashloan_logic.move index fe314e4..0edffbb 100644 --- a/aave-core/sources/aave-flash-loan/flash_loan.move +++ b/aave-core/sources/aave-logic/flashloan_logic.move @@ -9,22 +9,21 @@ module aave_pool::flashloan_logic { use aptos_framework::event; use aave_acl::acl_manage; - use aave_config::error as error_config; - use aave_config::error::{Self}; - use aave_config::user as user_config; + use aave_config::error_config::Self; + use aave_config::user_config::Self; use aave_math::math_utils; use aave_math::wad_ray_math; use aave_pool::a_token_factory; use aave_pool::borrow_logic; - use aave_pool::mock_underlying_token_factory::Self; + use aave_pool::fungible_asset_manager; use aave_pool::pool; use aave_pool::pool::ReserveData; use aave_pool::validation_logic::Self; //// ================= STRUCTS ==================== /// #[event] - /// @dev Emitted on flashLoan() + /// @dev Emitted on pay_flash_loan_complex() and handle_flash_loan_repayment() /// @param target The address of the flash loan receiver contract /// @param initiator The address initiating the flash loan /// @param asset The address of the asset being flash borrowed @@ -39,10 +38,10 @@ module aave_pool::flashloan_logic { amount: u256, interest_rate_mode: u8, premium: u256, - referral_code: u16, + referral_code: u16 } - /// Helper struct for internal variables used in the `executeFlashLoan` function + /// Helper struct for internal variables used in the `execute_flash_loan_complex` and `execute_flash_loan_simple` function struct FlashLoanLocalVars has copy, drop { sender: address, receiver: address, @@ -51,7 +50,7 @@ module aave_pool::flashloan_logic { current_amount: u256, total_premium: u256, flashloan_premium_total: u256, - flashloan_premium_to_protocol: u256, + flashloan_premium_to_protocol: u256 } struct SimpleFlashLoansReceipt { @@ -65,7 +64,7 @@ module aave_pool::flashloan_logic { flashloan_premium_to_protocol: u256, referral_code: u16, interest_rate_mode: Option, - on_behalf_of: address, + on_behalf_of: address } struct ComplexFlashLoansReceipt { @@ -79,7 +78,7 @@ module aave_pool::flashloan_logic { flashloan_premium_to_protocol: u256, referral_code: u16, interest_rate_mode: Option, - on_behalf_of: address, + on_behalf_of: address } struct FlashLoanRepaymentParams has drop { @@ -88,7 +87,7 @@ module aave_pool::flashloan_logic { flashloan_premium_to_protocol: u256, asset: address, receiver_address: address, - referral_code: u16, + referral_code: u16 } //// ================= METHODS ==================== /// @@ -96,26 +95,27 @@ module aave_pool::flashloan_logic { /// as long as the amount taken plus a fee is returned. /// @dev IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept /// into consideration. For further details please visit https://docs.aave.com/developers/ + /// @param initiator The signer account of the flash loan initiator /// @param receiver_address The address of the contract receiving the funds /// @param assets The addresses of the assets being flash-borrowed /// @param amounts The amounts of the assets being flash-borrowed /// @param interest_rate_modes Types of the debt to open if the flash loan is not returned: /// 0 -> Don't open any debt, just revert if funds can't be transferred from the receiver - /// 2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `onBehalfOf` address - /// @param on_behalf_of The address that will receive the debt in the case of using on `modes` 2 + /// 2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `on_behalf_of` address + /// @param on_behalf_of The address that will receive the debt in the case of using on `interest_rate_modes` 2, on_behalf_of Should be the account address /// @param referral_code The code used to register the integrator originating the operation, for potential rewards. /// 0 if the action is executed directly by the user, without any middle-man - public fun flashloan( - account: &signer, + public fun flash_loan( + initiator: &signer, receiver_address: address, assets: vector
, amounts: vector, interest_rate_modes: vector, on_behalf_of: address, - referral_code: u16, + referral_code: u16 ): vector { execute_flash_loan_complex( - account, + initiator, receiver_address, assets, amounts, @@ -124,12 +124,12 @@ module aave_pool::flashloan_logic { referral_code, (pool::get_flashloan_premium_to_protocol() as u256), (pool::get_flashloan_premium_total() as u256), - acl_manage::is_flash_borrower(signer::address_of(account)), + acl_manage::is_flash_borrower(signer::address_of(initiator)) ) } fun execute_flash_loan_complex( - account: &signer, + initiator: &signer, receiver_address: address, assets: vector
, amounts: vector, @@ -138,13 +138,13 @@ module aave_pool::flashloan_logic { referral_code: u16, flash_loan_premium_to_protocol: u256, flash_loan_premium_total: u256, - is_authorized_flash_borrower: bool, + is_authorized_flash_borrower: bool ): vector { // get signer account - let account_address = signer::address_of(account); + let initiator_address = signer::address_of(initiator); assert!( - account_address == on_behalf_of, - error_config::get_esigner_and_on_behalf_of_no_same(), + initiator_address == on_behalf_of, + error_config::get_esigner_and_on_behalf_of_no_same() ); // get all reserves data let reservesData = vector::map_ref( @@ -152,11 +152,16 @@ module aave_pool::flashloan_logic { |asset| { let reserve_data = pool::get_reserve_data(*asset); reserve_data - }, + } ); // validate flashloans logic - validation_logic::validate_flashloan_complex(&reservesData, &assets, &amounts); + validation_logic::validate_flashloan_complex( + &reservesData, + &assets, + &amounts, + &interest_rate_modes + ); // validate interest rates assert!( @@ -168,9 +173,9 @@ module aave_pool::flashloan_logic { || *interest_rate == user_config::get_interest_rate_mode_variable(); !legitimate_interes_rate - }, + } ), - error::get_einvalid_interest_rate_mode_selected(), + error_config::get_einvalid_interest_rate_mode_selected() ); let flashloan_premium_total = @@ -189,21 +194,21 @@ module aave_pool::flashloan_logic { // calculate premiums let total_premium = if (*vector::borrow(&interest_rate_modes, i) - == user_config::get_interest_rate_mode_none()) { + == user_config::get_interest_rate_mode_none()) { math_utils::percent_mul( *vector::borrow(&amounts, i), flashloan_premium_total ) } else { 0 }; let flashloan_vars = FlashLoanLocalVars { - sender: account_address, + sender: initiator_address, receiver: receiver_address, i: (i as u256), current_asset: *vector::borrow(&assets, i), current_amount: *vector::borrow(&amounts, i), total_premium, flashloan_premium_total, - flashloan_premium_to_protocol, + flashloan_premium_to_protocol }; // transfer the underlying to the receiver @@ -221,29 +226,33 @@ module aave_pool::flashloan_logic { *vector::borrow(&interest_rate_modes, (flashloan.i as u64)); create_complex_flashloan_receipt( &flashloan, - account_address, + initiator_address, referral_code, on_behalf_of, - option::some(interest_rate_mode), + option::some(interest_rate_mode) ) - }, + } ); flashloan_receipts } + /// @notice Repays flashloaned assets + premium + /// @dev Will pull the amount + premium from the receiver + /// @param flash_loan_receiver The signer account of the flash loan receiver + /// @param flashloan_receipts The receipts of the flashloaned assets public fun pay_flash_loan_complex( - account: &signer, flashloan_receipts: vector + flash_loan_receiver: &signer, flashloan_receipts: vector ) { // get the payer account - let account_address = signer::address_of(account); + let flash_loan_receiver_address = signer::address_of(flash_loan_receiver); // destroy all receipts and handle their repayment vector::destroy( flashloan_receipts, |flashloan| { let ComplexFlashLoansReceipt { - sender: _, + sender, receiver, i: _, current_asset, @@ -258,12 +267,12 @@ module aave_pool::flashloan_logic { // check the signer is the receiver that the receipt was issued for assert!( - signer::address_of(account) == receiver, - error::get_flashloan_payer_not_receiver(), + flash_loan_receiver_address == receiver, + error_config::get_flashloan_payer_not_receiver() ); if (*option::borrow(&interest_rate_mode) - == user_config::get_interest_rate_mode_none()) { + == user_config::get_interest_rate_mode_none()) { // do flashloan repayment let repayment_params = FlashLoanRepaymentParams { amount: current_amount, @@ -271,34 +280,36 @@ module aave_pool::flashloan_logic { flashloan_premium_to_protocol, asset: current_asset, receiver_address: receiver, - referral_code, + referral_code }; - handle_flash_loan_repayment(account, &repayment_params); + handle_flash_loan_repayment( + flash_loan_receiver, &repayment_params, sender + ); } else { // If the user chose to not return the funds, the system checks if there is enough collateral and // eventually opens a debt position borrow_logic::internal_borrow( - account, // account + sender, // flash loan initiator current_asset, // asset current_amount, // amount *option::borrow(&interest_rate_mode), //interest_rate_mode referral_code, // referral_code on_behalf_of, // on behalf of, - false, // release_underlying + false // release_underlying ); event::emit( FlashLoan { target: receiver, - initiator: account_address, + initiator: sender, asset: current_asset, amount: current_amount, interest_rate_mode: *option::borrow(&interest_rate_mode), premium: 0, - referral_code, - }, + referral_code + } ); }; - }, + } ) } @@ -320,7 +331,7 @@ module aave_pool::flashloan_logic { flashloan_premium_to_protocol: flashloan.flashloan_premium_to_protocol, referral_code, on_behalf_of, - interest_rate_mode, + interest_rate_mode } } @@ -342,7 +353,7 @@ module aave_pool::flashloan_logic { flashloan_premium_to_protocol: flashloan.flashloan_premium_to_protocol, referral_code, on_behalf_of, - interest_rate_mode, + interest_rate_mode } } @@ -358,31 +369,32 @@ module aave_pool::flashloan_logic { /// as long as the amount taken plus a fee is returned. /// @dev IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept /// into consideration. For further details please visit https://docs.aave.com/developers/ + /// @param initiator The signer account of the flash loan initiator /// @param receiver_address The address of the contract receiving the funds /// @param asset The address of the asset being flash-borrowed /// @param amount The amount of the asset being flash-borrowed /// @param referral_code The code used to register the integrator originating the operation, for potential rewards. /// 0 if the action is executed directly by the user, without any middle-man public fun flash_loan_simple( - account: &signer, + initiator: &signer, receiver_address: address, asset: address, amount: u256, referral_code: u16 ): SimpleFlashLoansReceipt { execute_flash_loan_simple( - account, + initiator, receiver_address, asset, amount, referral_code, (pool::get_flashloan_premium_to_protocol() as u256), - (pool::get_flashloan_premium_total() as u256), + (pool::get_flashloan_premium_total() as u256) ) } fun execute_flash_loan_simple( - account: &signer, + initiator: &signer, receiver_address: address, asset: address, amount: u256, @@ -391,7 +403,7 @@ module aave_pool::flashloan_logic { flashloan_premium_total: u256 ): SimpleFlashLoansReceipt { // sender account address - let account_address = signer::address_of(account); + let initiator_address = signer::address_of(initiator); // get the reserve data let reserve_data = pool::get_reserve_data(asset); @@ -401,14 +413,14 @@ module aave_pool::flashloan_logic { // create flashloan let flashloan = FlashLoanLocalVars { - sender: account_address, + sender: initiator_address, receiver: receiver_address, i: 0, current_asset: asset, current_amount: amount, total_premium: math_utils::percent_mul(amount, flashloan_premium_total), flashloan_premium_total, - flashloan_premium_to_protocol, + flashloan_premium_to_protocol }; // transfer the underlying to the receiver @@ -418,21 +430,25 @@ module aave_pool::flashloan_logic { let flashloan_receipt = create_simple_flashloan_receipt( &flashloan, - account_address, + initiator_address, referral_code, receiver_address, - option::none(), + option::none() ); flashloan_receipt } + /// @notice Repays flashloaned assets + premium + /// @dev Will pull the amount + premium from the receiver + /// @param flash_loan_receiver The signer account of flash loan receiver + /// @param flashloan_receipt The receipt of the flashloaned asset public fun pay_flash_loan_simple( - account: &signer, flashloan_receipt: SimpleFlashLoansReceipt + flash_loan_receiver: &signer, flashloan_receipt: SimpleFlashLoansReceipt ) { // destructure the receipt let SimpleFlashLoansReceipt { - sender: _, + sender, receiver, i: _, current_asset, @@ -447,8 +463,8 @@ module aave_pool::flashloan_logic { // check the signer is the receiver that the receipt was issued for assert!( - signer::address_of(account) == receiver, - error::get_flashloan_payer_not_receiver(), + signer::address_of(flash_loan_receiver) == receiver, + error_config::get_flashloan_payer_not_receiver() ); // do flashloan repayment @@ -458,75 +474,84 @@ module aave_pool::flashloan_logic { flashloan_premium_to_protocol, asset: current_asset, receiver_address: receiver, - referral_code, + referral_code }; - handle_flash_loan_repayment(account, &repayment_params); + handle_flash_loan_repayment(flash_loan_receiver, &repayment_params, sender); } /// @notice Handles repayment of flashloaned assets + premium /// @dev Will pull the amount + premium from the receiver, so must have approved pool - /// @param params The additional parameters needed to execute the repayment function + /// @param flash_loan_receiver The signer account of flash loan receiver + /// @param repayment_params The additional parameters needed to execute the repayment function + /// @param sender Flash loan initiators. fun handle_flash_loan_repayment( - account: &signer, repayment_params: &FlashLoanRepaymentParams + flash_loan_receiver: &signer, + repayment_params: &FlashLoanRepaymentParams, + sender: address ) { // get the reserve data let reserve_data = pool::get_reserve_data(repayment_params.asset); + let reserve_cache = pool::cache(&reserve_data); let a_token_address = pool::get_reserve_a_token_address(&reserve_data); // compute amount plus premiums let premium_to_protocol = math_utils::percent_mul( repayment_params.total_premium, - repayment_params.flashloan_premium_to_protocol, + repayment_params.flashloan_premium_to_protocol ); let premium_to_lp = repayment_params.total_premium - premium_to_protocol; - let amount_plus_premium = repayment_params.amount + repayment_params.total_premium; + let amount_plus_premium = repayment_params.amount + + repayment_params.total_premium; // update the pool state - pool::update_state(repayment_params.asset, &mut reserve_data); + pool::update_state(repayment_params.asset, &mut reserve_data, &mut reserve_cache); // update liquidity index - let a_token_supply = pool::scaled_a_token_total_supply(a_token_address); + let a_token_total_supply = pool::a_token_total_supply(a_token_address); let reserve_accrued_to_treasury = pool::get_reserve_accrued_to_treasury(&reserve_data); - let reserve_liquidity_index = pool::get_reserve_liquidity_index(&reserve_data); - let total_liq = - a_token_supply + let total_liquidity = + a_token_total_supply + wad_ray_math::ray_mul( - reserve_accrued_to_treasury, (reserve_liquidity_index as u256) + reserve_accrued_to_treasury, + pool::get_next_liquidity_index(&reserve_cache) ); let next_liquidity_index = pool::cumulate_to_liquidity_index( repayment_params.asset, &mut reserve_data, - total_liq, - premium_to_lp, + total_liquidity, + premium_to_lp ); + // update reserve cache next liquidity index + pool::set_next_liquidity_index(&mut reserve_cache, next_liquidity_index); // update accrued to treasury let new_reserve_accrued_to_treasury = reserve_accrued_to_treasury + wad_ray_math::ray_div(premium_to_protocol, next_liquidity_index); pool::set_reserve_accrued_to_treasury( - repayment_params.asset, new_reserve_accrued_to_treasury + repayment_params.asset, &mut reserve_data, new_reserve_accrued_to_treasury ); // update pool interest rates pool::update_interest_rates( &mut reserve_data, + &reserve_cache, repayment_params.asset, amount_plus_premium, - 0, + 0 ); // transfer underlying tokens let a_token_account_address = a_token_factory::get_token_account_address(a_token_address); - mock_underlying_token_factory::transfer_from( - repayment_params.receiver_address, + fungible_asset_manager::transfer( + flash_loan_receiver, a_token_account_address, (amount_plus_premium as u64), - repayment_params.asset, + repayment_params.asset ); // handle the a token repayment @@ -534,19 +559,19 @@ module aave_pool::flashloan_logic { repayment_params.receiver_address, repayment_params.receiver_address, amount_plus_premium, - a_token_address, + a_token_address ); event::emit( FlashLoan { target: repayment_params.receiver_address, - initiator: signer::address_of(account), + initiator: sender, asset: repayment_params.asset, amount: repayment_params.amount, interest_rate_mode: user_config::get_interest_rate_mode_none(), premium: repayment_params.total_premium, - referral_code: repayment_params.referral_code, - }, + referral_code: repayment_params.referral_code + } ) } } diff --git a/aave-core/sources/aave-pool/generic_logic.move b/aave-core/sources/aave-logic/generic_logic.move similarity index 89% rename from aave-core/sources/aave-pool/generic_logic.move rename to aave-core/sources/aave-logic/generic_logic.move index bb7bc02..5ebfc5d 100644 --- a/aave-core/sources/aave-pool/generic_logic.move +++ b/aave-core/sources/aave-logic/generic_logic.move @@ -3,11 +3,11 @@ /// @notice Implements protocol-level logic to calculate and validate the state of a user module aave_pool::generic_logic { - use aave_config::reserve as reserve_config; - use aave_config::user::{Self as user_config, UserConfigurationMap}; + use aave_config::reserve_config; + use aave_config::user_config::{Self, UserConfigurationMap}; use aave_math::math_utils; use aave_math::wad_ray_math; - use aave_mock_oracle::oracle; + use aave_oracle::oracle; use aave_pool::a_token_factory; use aave_pool::pool::{Self, ReserveData}; @@ -32,7 +32,7 @@ module aave_pool::generic_logic { emode_asset_category: u256, current_reserve_address: address, has_zero_ltv_collateral: bool, - is_in_emode_category: bool, + is_in_emode_category: bool } fun create_calculate_user_account_data_vars(): CalculateUserAccountDataVars { @@ -55,15 +55,15 @@ module aave_pool::generic_logic { emode_asset_category: 0, current_reserve_address: @0x0, has_zero_ltv_collateral: false, - is_in_emode_category: false, + is_in_emode_category: false } } /// @notice Calculates the user data across the reserves. /// @dev It includes the total liquidity/collateral/borrow balances in the base currency used by the price feed, /// the average Loan To Value, the average Liquidation Ratio, and the Health factor. - /// @param params reserves_count The number of reserves /// @param params user_config_map The user configuration map + /// @param params reserves_count The number of reserves /// @param params user The address of the user /// @param params user_emode_category The category of the user in the emode /// @param params emode_ltv The ltv of the user in the emode @@ -76,13 +76,13 @@ module aave_pool::generic_logic { /// @return The health factor of the user /// @return True if the ltv is zero, false otherwise public fun calculate_user_account_data( - reserves_count: u256, user_config_map: &UserConfigurationMap, + reserves_count: u256, user: address, user_emode_category: u8, emode_ltv: u256, emode_liq_threshold: u256, - emode_asset_price: u256, + emode_asset_price: u256 ): (u256, u256, u256, u256, u256, bool) { if (user_config::is_empty(user_config_map)) { return (0, 0, 0, 0, math_utils::u256_max(), false) @@ -96,7 +96,9 @@ module aave_pool::generic_logic { }; while (vars.i < reserves_count) { - if (!user_config::is_using_as_collateral_or_borrowing(user_config_map, vars.i)) { + if (!user_config::is_using_as_collateral_or_borrowing( + user_config_map, vars.i + )) { vars.i = vars.i + 1; continue }; @@ -120,19 +122,19 @@ module aave_pool::generic_logic { vars.asset_unit = math_utils::pow(10, vars.decimals); vars.asset_price = if (vars.emode_asset_price != 0 - && user_emode_category == (vars.emode_asset_category as u8)) { + && user_emode_category == (vars.emode_asset_category as u8)) { vars.emode_asset_price } else { oracle::get_asset_price(vars.current_reserve_address) }; if (vars.liquidation_threshold != 0 - && user_config::is_using_as_collateral(user_config_map, vars.i)) { + && user_config::is_using_as_collateral(user_config_map, vars.i)) { vars.user_balance_in_base_currency = get_user_balance_in_base_currency( user, ¤t_reserve, vars.asset_price, - vars.asset_unit, + vars.asset_unit ); vars.total_collateral_in_base_currency = vars.total_collateral_in_base_currency @@ -147,7 +149,8 @@ module aave_pool::generic_logic { } else { vars.ltv }; - vars.avg_ltv = vars.avg_ltv + vars.user_balance_in_base_currency * ltv; + vars.avg_ltv = vars.avg_ltv + + vars.user_balance_in_base_currency * ltv; } else { vars.has_zero_ltv_collateral = true }; @@ -168,7 +171,7 @@ module aave_pool::generic_logic { user, ¤t_reserve, vars.asset_price, - vars.asset_unit, + vars.asset_unit ); vars.total_debt_in_base_currency = vars.total_debt_in_base_currency + user_debt_in_base_currency; @@ -181,7 +184,8 @@ module aave_pool::generic_logic { vars.avg_ltv / vars.total_collateral_in_base_currency } else { 0 }; - vars.avg_liquidation_threshold = if (vars.total_collateral_in_base_currency != 0) { + vars.avg_liquidation_threshold = if (vars.total_collateral_in_base_currency + != 0) { vars.avg_liquidation_threshold / vars.total_collateral_in_base_currency } else { 0 }; @@ -191,9 +195,9 @@ module aave_pool::generic_logic { wad_ray_math::wad_div( math_utils::percent_mul( vars.total_collateral_in_base_currency, - vars.avg_liquidation_threshold, + vars.avg_liquidation_threshold ), - vars.total_debt_in_base_currency, + vars.total_debt_in_base_currency ) }; @@ -216,7 +220,7 @@ module aave_pool::generic_logic { public fun calculate_available_borrows( total_collateral_in_base_currency: u256, total_debt_in_base_currency: u256, - ltv: u256, + ltv: u256 ): u256 { let available_borrows_in_base_currency = math_utils::percent_mul(total_collateral_in_base_currency, ltv); @@ -229,15 +233,17 @@ module aave_pool::generic_logic { } /// @notice Calculates total debt of the user in the based currency used to normalize the values of the assets - /// the variable debt balance is calculated by fetching `scaledBalancesOf` normalized debt, which is cheaper than - /// fetching `balanceOf` + /// the variable debt balance is calculated by fetching `scaled_balance_of` normalized debt /// @param user The address of the user /// @param reserve_data The data of the reserve for which the total debt of the user is being calculated /// @param asset_price The price of the asset for which the total debt of the user is being calculated /// @param asset_unit The value representing one full unit of the asset (10^decimals) /// @return The total debt of the user normalized to the base currency fun get_user_debt_in_base_currency( - user: address, reserve_data: &ReserveData, asset_price: u256, asset_unit: u256 + user: address, + reserve_data: &ReserveData, + asset_price: u256, + asset_unit: u256 ): u256 { let user_total_debt = variable_debt_token_factory::scaled_balance_of( @@ -255,15 +261,17 @@ module aave_pool::generic_logic { } /// @notice Calculates total aToken balance of the user in the based currency used by the price oracle - /// @dev For gas reasons, the aToken balance is calculated by fetching `scaledBalancesOf` normalized debt, which - /// is cheaper than fetching `balanceOf` + /// @dev the aToken balance is calculated by fetching `scaled_balance_of` normalized debt /// @param user The address of the user /// @param reserve_data The data of the reserve for which the total aToken balance of the user is being calculated /// @param asset_price The price of the asset for which the total aToken balance of the user is being calculated /// @param asset_unit The value representing one full unit of the asset (10^decimals) /// @return The total aToken balance of the user normalized to the base currency of the price oracle fun get_user_balance_in_base_currency( - user: address, reserve_data: &ReserveData, asset_price: u256, asset_unit: u256 + user: address, + reserve_data: &ReserveData, + asset_price: u256, + asset_unit: u256 ): u256 { let normalized_income = pool::get_normalized_income_by_reserve_data(reserve_data); let balance = @@ -271,7 +279,7 @@ module aave_pool::generic_logic { a_token_factory::scaled_balance_of( user, pool::get_reserve_a_token_address(reserve_data) ), - normalized_income, + normalized_income ) * asset_price; balance / asset_unit } diff --git a/aave-core/sources/aave-pool/isolation_mode_logic.move b/aave-core/sources/aave-logic/isolation_mode_logic.move similarity index 74% rename from aave-core/sources/aave-pool/isolation_mode_logic.move rename to aave-core/sources/aave-logic/isolation_mode_logic.move index 892b7c5..62e2ea5 100644 --- a/aave-core/sources/aave-pool/isolation_mode_logic.move +++ b/aave-core/sources/aave-logic/isolation_mode_logic.move @@ -1,11 +1,11 @@ module aave_pool::isolation_mode_logic { use aptos_framework::event; - use aave_config::reserve as reserve_config; - use aave_config::user::UserConfigurationMap; + use aave_config::reserve_config; + use aave_config::user_config::UserConfigurationMap; use aave_math::math_utils; - use aave_pool::pool::{Self, ReserveData}; + use aave_pool::pool::{Self, ReserveCache}; friend aave_pool::borrow_logic; friend aave_pool::liquidation_logic; @@ -16,20 +16,22 @@ module aave_pool::isolation_mode_logic { /// @param total_debt The total isolation mode debt for the reserve struct IsolationModeTotalDebtUpdated has store, drop { asset: address, - total_debt: u256, + total_debt: u256 } /// @notice updated the isolated debt whenever a position collateralized by an isolated asset is repaid or liquidated + /// @dev Only callable by the borrow_logic and liquidation_logic module /// @param user_config_map The user configuration map - /// @param reserve_data The reserve data + /// @param reserve_cache The reserve cache /// @param repay_amount The amount being repaid public(friend) fun update_isolated_debt_if_isolated( user_config_map: &UserConfigurationMap, - reserve_data: &ReserveData, + reserve_cache: &ReserveCache, repay_amount: u256 ) { let (isolation_mode_active, isolation_mode_collateral_address, _) = pool::get_isolation_mode_state(user_config_map); + if (isolation_mode_active) { let isolation_mode_debt_reserve_data = pool::get_reserve_data(isolation_mode_collateral_address); @@ -37,36 +39,41 @@ module aave_pool::isolation_mode_logic { pool::get_reserve_isolation_mode_total_debt( &isolation_mode_debt_reserve_data ); - let reserve_config_map = - pool::get_reserve_configuration_by_reserve_data(reserve_data); + let reserve_config_map = pool::get_reserve_cache_configuration(reserve_cache); let debt_decimals = reserve_config::get_decimals(&reserve_config_map) - reserve_config::get_debt_ceiling_decimals(); - let isolated_debt_repaid = (repay_amount / math_utils::pow(10, debt_decimals)); + + let isolated_debt_repaid = (repay_amount + / math_utils::pow(10, debt_decimals)); // since the debt ceiling does not take into account the interest accrued, it might happen that amount // repaid > debt in isolation mode if (isolation_mode_total_debt <= (isolated_debt_repaid as u128)) { pool::set_reserve_isolation_mode_total_debt( - isolation_mode_collateral_address, 0 + isolation_mode_collateral_address, + &mut isolation_mode_debt_reserve_data, + 0 ); event::emit( IsolationModeTotalDebtUpdated { asset: isolation_mode_collateral_address, total_debt: 0 - }, + } ) } else { let next_isolation_mode_total_debt = isolation_mode_total_debt - (isolated_debt_repaid as u128); pool::set_reserve_isolation_mode_total_debt( - isolation_mode_collateral_address, next_isolation_mode_total_debt + isolation_mode_collateral_address, + &mut isolation_mode_debt_reserve_data, + next_isolation_mode_total_debt ); event::emit( IsolationModeTotalDebtUpdated { asset: isolation_mode_collateral_address, total_debt: (next_isolation_mode_total_debt as u256) - }, + } ) } } diff --git a/aave-core/sources/aave-supply-borrow/liquidation_logic.move b/aave-core/sources/aave-logic/liquidation_logic.move similarity index 77% rename from aave-core/sources/aave-supply-borrow/liquidation_logic.move rename to aave-core/sources/aave-logic/liquidation_logic.move index 6bb7811..994ab84 100644 --- a/aave-core/sources/aave-supply-borrow/liquidation_logic.move +++ b/aave-core/sources/aave-logic/liquidation_logic.move @@ -5,24 +5,23 @@ module aave_pool::liquidation_logic { use std::signer; use aptos_framework::event; - use aave_config::reserve as reserve_config; - use aave_config::user as user_config; + use aave_config::reserve_config; + use aave_config::user_config; use aave_math::math_utils; use aave_math::wad_ray_math; - use aave_mock_oracle::oracle; + use aave_oracle::oracle; use aave_pool::a_token_factory; use aave_pool::emode_logic; + use aave_pool::fungible_asset_manager; use aave_pool::generic_logic; use aave_pool::isolation_mode_logic; - use aave_pool::mock_underlying_token_factory; - use aave_pool::pool::{Self, ReserveData}; - use aave_pool::pool_validation; + use aave_pool::pool::{Self, ReserveCache, ReserveData}; use aave_pool::validation_logic; use aave_pool::variable_debt_token_factory; #[event] - /// @dev Emitted on setUserUseReserveAsCollateral() + /// @dev Emitted on liquidate_a_tokens() /// @param reserve The address of the underlying asset of the reserve /// @param user The address of the user enabling the usage as collateral struct ReserveUsedAsCollateralEnabled has store, drop { @@ -31,9 +30,9 @@ module aave_pool::liquidation_logic { } #[event] - /// @dev Emitted on setUserUseReserveAsCollateral() + /// @dev Emitted on liquidation_call() /// @param reserve The address of the underlying asset of the reserve - /// @param user The address of the user enabling the usage as collateral + /// @param user The address of the user disabling the usage as collateral struct ReserveUsedAsCollateralDisabled has store, drop { reserve: address, user: address @@ -88,7 +87,7 @@ module aave_pool::liquidation_logic { liquidation_protocol_fee_amount: u256, collateral_price_source: address, debt_price_source: address, - collateral_a_token: address, + collateral_a_token: address } fun create_liquidation_call_local_vars(): LiquidationCallLocalVars { @@ -103,7 +102,7 @@ module aave_pool::liquidation_logic { liquidation_protocol_fee_amount: 0, collateral_price_source: @0x0, debt_price_source: @0x0, - collateral_a_token: @0x0, + collateral_a_token: @0x0 } } @@ -114,7 +113,7 @@ module aave_pool::liquidation_logic { debt_asset: address, user: address, receive_a_token: bool, - user_emode_category: u8, + user_emode_category: u8 } fun create_execute_liquidation_call_params( @@ -132,7 +131,7 @@ module aave_pool::liquidation_logic { debt_asset, user, receive_a_token, - user_emode_category: (emode_logic::get_user_emode(user) as u8), + user_emode_category: (emode_logic::get_user_emode(user) as u8) } } @@ -140,6 +139,7 @@ module aave_pool::liquidation_logic { /// - The caller (liquidator) covers `debt_to_cover` amount of debt of the user getting liquidated, and receives /// a proportionally amount of the `collateral_asset` plus a bonus to cover market risk /// @dev Emits the `LiquidationCall()` event + /// @param account The account signer of the caller /// @param collateral_asset The address of the underlying asset used as collateral, to receive as result of the liquidation /// @param debt_asset The address of the underlying borrowed asset to be repaid with the liquidation /// @param user The address of the borrower getting liquidated @@ -152,7 +152,7 @@ module aave_pool::liquidation_logic { debt_asset: address, user: address, debt_to_cover: u256, - receive_a_token: bool, + receive_a_token: bool ) { let reserves_count = pool::get_reserves_count(); let account_address = signer::address_of(account); @@ -164,29 +164,32 @@ module aave_pool::liquidation_logic { debt_asset, user, debt_to_cover, - receive_a_token, + receive_a_token ); - let collateral_reserve = pool::get_reserve_data(collateral_asset); - let debt_reserve = pool::get_reserve_data(debt_asset); - let user_config_map = pool::get_user_configuration(user); + let collateral_reserve = pool::get_reserve_data(params.collateral_asset); + let debt_reserve = pool::get_reserve_data(params.debt_asset); + let debt_reserve_cache = pool::cache(&debt_reserve); // update debt reserve state - pool::update_state(debt_asset, &mut debt_reserve); + pool::update_state(debt_asset, &mut debt_reserve, &mut debt_reserve_cache); + + let user_config_map = pool::get_user_configuration(user); let (emode_ltv, emode_liq_threshold, emode_asset_price) = emode_logic::get_emode_configuration(params.user_emode_category); + let (_, _, _, _, health_factor, _) = generic_logic::calculate_user_account_data( - reserves_count, &user_config_map, - user, + params.reserves_count, + params.user, params.user_emode_category, emode_ltv, emode_liq_threshold, - emode_asset_price, + emode_asset_price ); vars.health_factor = health_factor; let (user_variable_debt, user_total_debt, actual_debt_to_liquidate) = - calculate_debt(&debt_reserve, ¶ms, health_factor); + calculate_debt(&debt_reserve_cache, ¶ms, health_factor); vars.user_variable_debt = user_variable_debt; vars.user_total_debt = user_total_debt; vars.actual_debt_to_liquidate = actual_debt_to_liquidate; @@ -195,22 +198,25 @@ module aave_pool::liquidation_logic { validation_logic::validate_liquidation_call( &user_config_map, &collateral_reserve, - &debt_reserve, + &debt_reserve_cache, vars.user_total_debt, - vars.health_factor, + vars.health_factor ); // get configuration data let ( - collateral_a_token, collateral_price_source, debt_price_source, + collateral_a_token, + collateral_price_source, + debt_price_source, liquidation_bonus ) = get_configuration_data(&collateral_reserve, ¶ms); vars.collateral_a_token = collateral_a_token; vars.collateral_price_source = collateral_price_source; vars.debt_price_source = debt_price_source; + vars.liquidation_bonus = liquidation_bonus; - vars.user_collateral_balance = pool::scaled_a_token_balance_of( + vars.user_collateral_balance = pool::a_token_balance_of( params.user, collateral_a_token ); @@ -221,12 +227,12 @@ module aave_pool::liquidation_logic { ) = calculate_available_collateral_to_liquidate( &collateral_reserve, - &debt_reserve, - vars.collateral_price_source, - vars.debt_price_source, + &debt_reserve_cache, + vars.collateral_price_source, // Currently, custom oracle is not supported. Only a unified oracle is used. Therefore, the price is obtained by calling the oracle directly with the collateral_asset. + vars.debt_price_source, // Currently, custom oracle is not supported. Only a unified oracle is used. Therefore, the price is obtained by calling the oracle directly with the debt_asset. vars.actual_debt_to_liquidate, vars.user_collateral_balance, - liquidation_bonus, + vars.liquidation_bonus ); vars.actual_collateral_to_liquidate = actual_collateral_to_liquidate; vars.actual_debt_to_liquidate = actual_debt_to_liquidate; @@ -243,38 +249,55 @@ module aave_pool::liquidation_logic { // If the collateral being liquidated is equal to the user balance, // we set the currency as not being used as collateral anymore if (vars.actual_collateral_to_liquidate + vars.liquidation_protocol_fee_amount - == vars.user_collateral_balance) { + == vars.user_collateral_balance) { let collateral_reserve_id = pool::get_reserve_id(&collateral_reserve); user_config::set_using_as_collateral( - &mut user_config_map, (collateral_reserve_id as u256), false + &mut user_config_map, + (collateral_reserve_id as u256), + false ); pool::set_user_configuration(params.user, user_config_map); event::emit( ReserveUsedAsCollateralDisabled { reserve: params.collateral_asset, user: params.user - }, + } ); }; // burn debt tokens - burn_debt_tokens(&debt_reserve, ¶ms, &vars); + burn_debt_tokens(&mut debt_reserve_cache, ¶ms, &vars); // update pool interest rates pool::update_interest_rates( &mut debt_reserve, + &debt_reserve_cache, params.debt_asset, vars.actual_debt_to_liquidate, - 0, + 0 ); isolation_mode_logic::update_isolated_debt_if_isolated( - &user_config_map, &debt_reserve, vars.actual_debt_to_liquidate + &user_config_map, + &debt_reserve_cache, + vars.actual_debt_to_liquidate ); + + let collateral_reserve = pool::get_reserve_data(params.collateral_asset); if (params.receive_a_token) { - liquidate_a_tokens(account, &collateral_reserve, ¶ms, &vars); + liquidate_a_tokens( + account_address, + &collateral_reserve, + ¶ms, + &vars + ); } else { - burn_collateral_a_tokens(account, collateral_reserve, ¶ms, &vars) + burn_collateral_a_tokens( + account_address, + &mut collateral_reserve, + ¶ms, + &vars + ) }; // Transfer fee to treasury if it is non-zero @@ -283,7 +306,8 @@ module aave_pool::liquidation_logic { pool::get_normalized_income_by_reserve_data(&collateral_reserve); let scaled_down_liquidation_protocol_fee = wad_ray_math::ray_div( - vars.liquidation_protocol_fee_amount, liquidity_index + vars.liquidation_protocol_fee_amount, + liquidity_index ); let scaled_down_user_balance = @@ -295,34 +319,31 @@ module aave_pool::liquidation_logic { ) }; - let underlying_asset_address = - a_token_factory::get_underlying_asset_address(vars.collateral_a_token); - let index = pool::get_reserve_normalized_income(underlying_asset_address); let a_token_treasury = a_token_factory::get_reserve_treasury_address(vars.collateral_a_token); a_token_factory::transfer_on_liquidation( params.user, a_token_treasury, vars.liquidation_protocol_fee_amount, - index, - vars.collateral_a_token, + liquidity_index, + vars.collateral_a_token ); }; // Transfers the debt asset being repaid to the aToken, where the liquidity is kept - let a_token_address = pool::get_reserve_a_token_address(&debt_reserve); - mock_underlying_token_factory::transfer_from( - account_address, + let a_token_address = pool::get_a_token_address(&debt_reserve_cache); + fungible_asset_manager::transfer( + account, a_token_factory::get_token_account_address(a_token_address), (vars.actual_debt_to_liquidate as u64), - debt_asset, + debt_asset ); a_token_factory::handle_repayment( account_address, params.user, vars.actual_debt_to_liquidate, - a_token_address, + a_token_address ); event::emit( @@ -334,118 +355,145 @@ module aave_pool::liquidation_logic { liquidated_collateral_amount: vars.actual_collateral_to_liquidate, liquidator: account_address, receive_a_token - }, + } ); } /// @notice Burns the collateral aTokens and transfers the underlying to the liquidator. - /// @dev The function also updates the state and the interest rate of the collateral reserve. + /// @param account_address The liquidator account address /// @param collateral_reserve The data of the collateral reserve /// @param params The additional parameters needed to execute the liquidation function - /// @param vars The executeLiquidationCall() function local vars + /// @param vars The liquidation_call() function local vars fun burn_collateral_a_tokens( - account: &signer, - collateral_reserve: ReserveData, + account_address: address, + collateral_reserve: &mut ReserveData, params: &ExecuteLiquidationCallParams, vars: &LiquidationCallLocalVars ) { + let collateral_reserve_cache = pool::cache(collateral_reserve); // update pool state - pool::update_state(params.collateral_asset, &mut collateral_reserve); + pool::update_state( + params.collateral_asset, collateral_reserve, &mut collateral_reserve_cache + ); // update pool interest rates pool::update_interest_rates( - &mut collateral_reserve, + collateral_reserve, + &collateral_reserve_cache, params.collateral_asset, 0, - vars.actual_collateral_to_liquidate, + vars.actual_collateral_to_liquidate ); // Burn the equivalent amount of aToken, sending the underlying to the liquidator a_token_factory::burn( params.user, - signer::address_of(account), + account_address, vars.actual_collateral_to_liquidate, - (pool::get_reserve_liquidity_index(&collateral_reserve) as u256), - pool::get_reserve_a_token_address(&collateral_reserve), + pool::get_next_liquidity_index(&collateral_reserve_cache), + pool::get_a_token_address(&collateral_reserve_cache) ) } /// @notice Liquidates the user aTokens by transferring them to the liquidator. /// @dev The function also checks the state of the liquidator and activates the aToken as collateral /// as in standard transfers if the isolation mode constraints are respected. - /// @param account The liquidator account + /// @param account_address The liquidator account address /// @param collateral_reserve The data of the collateral reserve /// @param params The additional parameters needed to execute the liquidation function /// @param vars The liquidation_call() function local vars fun liquidate_a_tokens( - account: &signer, + account_address: address, collateral_reserve: &ReserveData, params: &ExecuteLiquidationCallParams, vars: &LiquidationCallLocalVars ) { - let account_address = signer::address_of(account); let liquidator_previous_a_token_balance = - pool::scaled_a_token_balance_of(account_address, vars.collateral_a_token); + pool::a_token_balance_of(account_address, vars.collateral_a_token); - let underlying_asset_address = + let underlying_asset = a_token_factory::get_underlying_asset_address(vars.collateral_a_token); - let index = pool::get_reserve_normalized_income(underlying_asset_address); + let index = pool::get_reserve_normalized_income(underlying_asset); + a_token_factory::transfer_on_liquidation( params.user, account_address, vars.actual_collateral_to_liquidate, index, - vars.collateral_a_token, + vars.collateral_a_token ); if (liquidator_previous_a_token_balance == 0) { let liquidator_config = pool::get_user_configuration(account_address); let reserve_config_map = pool::get_reserve_configuration_by_reserve_data(collateral_reserve); - if (pool_validation::validate_automatic_use_as_collateral( - account_address, &liquidator_config, &reserve_config_map - )) { + if (validation_logic::validate_automatic_use_as_collateral( + account_address, + &liquidator_config, + &reserve_config_map + )) { user_config::set_using_as_collateral( &mut liquidator_config, (pool::get_reserve_id(collateral_reserve) as u256), - true, + true ); pool::set_user_configuration(account_address, liquidator_config); + event::emit( ReserveUsedAsCollateralEnabled { reserve: params.collateral_asset, user: account_address - }, + } ); }; } } /// @notice Burns the debt tokens of the user up to the amount being repaid by the liquidator. - /// @dev The function alters the `debt_reserve` state in `vars` to update the debt related data. + /// @param debt_reserve_cache The reserve cache object of the debt reserve cache /// @param params The additional parameters needed to execute the liquidation function /// @param vars the liquidation_call() function local vars fun burn_debt_tokens( - debt_reserve: &ReserveData, + debt_reserve_cache: &mut ReserveCache, params: &ExecuteLiquidationCallParams, vars: &LiquidationCallLocalVars ) { + let variable_debt_token_address = + pool::get_variable_debt_token_address(debt_reserve_cache); + let next_variable_borrow_index = + pool::get_next_variable_borrow_index(debt_reserve_cache); if (vars.user_variable_debt >= vars.actual_debt_to_liquidate) { variable_debt_token_factory::burn( params.user, vars.actual_debt_to_liquidate, - (pool::get_reserve_variable_borrow_index(debt_reserve) as u256), - pool::get_reserve_variable_debt_token_address(debt_reserve), - ) + next_variable_borrow_index, + variable_debt_token_address + ); + let next_scaled_variable_debt = + variable_debt_token_factory::scaled_total_supply( + variable_debt_token_address + ); + pool::set_next_scaled_variable_debt( + debt_reserve_cache, + next_scaled_variable_debt + ); } else { // If the user doesn't have variable debt, no need to try to burn variable debt tokens if (vars.user_variable_debt != 0) { variable_debt_token_factory::burn( params.user, vars.user_variable_debt, - (pool::get_reserve_variable_borrow_index(debt_reserve) as u256), - pool::get_reserve_variable_debt_token_address(debt_reserve), - ) + next_variable_borrow_index, + variable_debt_token_address + ); + let next_scaled_variable_debt = + variable_debt_token_factory::scaled_total_supply( + variable_debt_token_address + ); + pool::set_next_scaled_variable_debt( + debt_reserve_cache, + next_scaled_variable_debt + ); } } } @@ -453,20 +501,21 @@ module aave_pool::liquidation_logic { /// @notice Calculates the total debt of the user and the actual amount to liquidate depending on the health factor /// and corresponding close factor. /// @dev If the Health Factor is below CLOSE_FACTOR_HF_THRESHOLD, the close factor is increased to MAX_LIQUIDATION_CLOSE_FACTOR - /// @param debt_reserve The reserve data object of the debt reserve + /// @param debt_reserve_cache The reserve cache object of the debt reserve cache /// @param params The additional parameters needed to execute the liquidation function /// @param health_factor The health factor of the position /// @return The variable debt of the user /// @return The total debt of the user /// @return The actual debt to liquidate as a function of the closeFactor fun calculate_debt( - debt_reserve: &ReserveData, + debt_reserve_cache: &ReserveCache, params: &ExecuteLiquidationCallParams, health_factor: u256 ): (u256, u256, u256) { let user_variable_debt = - pool::scaled_variable_token_balance_of( - params.user, pool::get_reserve_variable_debt_token_address(debt_reserve) + pool::variable_debt_token_balance_of( + params.user, + pool::get_variable_debt_token_address(debt_reserve_cache) ); let user_total_debt = user_variable_debt; @@ -476,7 +525,10 @@ module aave_pool::liquidation_logic { } else { MAX_LIQUIDATION_CLOSE_FACTOR }; - let max_liquidatable_debt = math_utils::percent_mul(user_total_debt, close_factor); + + let max_liquidatable_debt = math_utils::percent_mul( + user_total_debt, close_factor + ); let actual_debt_to_liquidate = if (params.debt_to_cover > max_liquidatable_debt) { @@ -484,6 +536,7 @@ module aave_pool::liquidation_logic { } else { params.debt_to_cover }; + (user_variable_debt, user_total_debt, actual_debt_to_liquidate) } @@ -513,9 +566,9 @@ module aave_pool::liquidation_logic { emode_logic::get_emode_category_price_source(&emode_category_data); if (emode_logic::is_in_emode_category( - (params.user_emode_category as u256), - reserve_config::get_emode_category(&collateral_config_map), - )) { + (params.user_emode_category as u256), + reserve_config::get_emode_category(&collateral_config_map) + )) { liquidation_bonus = ( emode_logic::get_emode_category_liquidation_bonus( &emode_category_data @@ -531,7 +584,12 @@ module aave_pool::liquidation_logic { debt_price_source = emode_price_source; }; }; - (collateral_a_token, collateral_price_source, debt_price_source, liquidation_bonus) + ( + collateral_a_token, + collateral_price_source, + debt_price_source, + liquidation_bonus + ) } struct AvailableCollateralToLiquidateLocalVars has drop { @@ -547,11 +605,11 @@ module aave_pool::liquidation_logic { collateral_amount: u256, debt_amount_needed: u256, liquidation_protocol_fee_percentage: u256, - liquidation_protocol_fee: u256, + liquidation_protocol_fee: u256 } - fun create_available_collateral_to_liquidate_local_vars() - : AvailableCollateralToLiquidateLocalVars { + fun create_available_collateral_to_liquidate_local_vars(): + AvailableCollateralToLiquidateLocalVars { AvailableCollateralToLiquidateLocalVars { collateral_price: 0, debt_asset_price: 0, @@ -565,7 +623,7 @@ module aave_pool::liquidation_logic { collateral_amount: 0, debt_amount_needed: 0, liquidation_protocol_fee_percentage: 0, - liquidation_protocol_fee: 0, + liquidation_protocol_fee: 0 } } @@ -574,7 +632,7 @@ module aave_pool::liquidation_logic { /// @dev This function needs to be called after all the checks to validate the liquidation have been performed, /// otherwise it might fail. /// @param collateral_reserve The data of the collateral reserve - /// @param debt_reserve The data of the debt reserve + /// @param debt_reserve_cache The data of the debt reserve cache /// @param collateral_asset The address of the underlying asset used as collateral, to receive as result of the liquidation /// @param debt_asset The address of the underlying borrowed asset to be repaid with the liquidation /// @param debt_to_cover The debt amount of borrowed `asset` the liquidator wants to cover @@ -585,14 +643,15 @@ module aave_pool::liquidation_logic { /// @return The fee taken from the liquidation bonus amount to be paid to the protocol fun calculate_available_collateral_to_liquidate( collateral_reserve: &ReserveData, - debt_reserve: &ReserveData, + debt_reserve_cache: &ReserveCache, collateral_asset: address, debt_asset: address, debt_to_cover: u256, user_collateral_balance: u256, - liquidation_bonus: u256, + liquidation_bonus: u256 ): (u256, u256, u256) { let vars = create_available_collateral_to_liquidate_local_vars(); + // TODO Waiting for Chainlink oracle functionality vars.collateral_price = oracle::get_asset_price(collateral_asset); vars.debt_asset_price = oracle::get_asset_price(debt_asset); @@ -601,8 +660,9 @@ module aave_pool::liquidation_logic { vars.collateral_decimals = reserve_config::get_decimals( &collateral_reserve_config ); + let debt_reserve_config = - pool::get_reserve_configuration_by_reserve_data(debt_reserve); + pool::get_reserve_cache_configuration(debt_reserve_cache); vars.debt_asset_decimals = reserve_config::get_decimals(&debt_reserve_config); vars.collateral_asset_unit = math_utils::pow(10, vars.collateral_decimals); @@ -624,11 +684,9 @@ module aave_pool::liquidation_logic { if (vars.max_collateral_to_liquidate > user_collateral_balance) { vars.collateral_amount = user_collateral_balance; vars.debt_amount_needed = math_utils::percent_div( - ( - (vars.collateral_price * vars.collateral_amount * vars.debt_asset_unit) - / (vars.debt_asset_price * vars.collateral_asset_unit) - ), - liquidation_bonus, + ((vars.collateral_price * vars.collateral_amount * vars.debt_asset_unit) + / (vars.debt_asset_price * vars.collateral_asset_unit)), + liquidation_bonus ); } else { vars.collateral_amount = vars.max_collateral_to_liquidate; @@ -638,9 +696,12 @@ module aave_pool::liquidation_logic { if (vars.liquidation_protocol_fee_percentage != 0) { vars.bonus_collateral = vars.collateral_amount - math_utils::percent_div(vars.collateral_amount, liquidation_bonus); + vars.liquidation_protocol_fee = math_utils::percent_mul( - vars.bonus_collateral, vars.liquidation_protocol_fee_percentage + vars.bonus_collateral, + vars.liquidation_protocol_fee_percentage ); + ( vars.collateral_amount - vars.liquidation_protocol_fee, vars.debt_amount_needed, diff --git a/aave-core/sources/aave-supply-borrow/supply_logic.move b/aave-core/sources/aave-logic/supply_logic.move similarity index 65% rename from aave-core/sources/aave-supply-borrow/supply_logic.move rename to aave-core/sources/aave-logic/supply_logic.move index b8a2dbc..1049ba3 100644 --- a/aave-core/sources/aave-supply-borrow/supply_logic.move +++ b/aave-core/sources/aave-logic/supply_logic.move @@ -2,18 +2,19 @@ module aave_pool::supply_logic { use std::signer; use aptos_framework::event; - use aave_config::error as error_config; - use aave_config::user as user_config; + use aave_config::error_config; + use aave_config::user_config; use aave_math::math_utils; use aave_math::wad_ray_math; use aave_pool::a_token_factory; use aave_pool::emode_logic; - use aave_pool::mock_underlying_token_factory; + use aave_pool::fungible_asset_manager; use aave_pool::pool; - use aave_pool::pool_validation; use aave_pool::validation_logic; + friend aave_pool::user_logic; + #[event] /// @dev Emitted on supply() /// @param reserve The address of the underlying asset of the reserve @@ -26,7 +27,7 @@ module aave_pool::supply_logic { user: address, on_behalf_of: address, amount: u256, - referral_code: u16, + referral_code: u16 } #[event] @@ -39,11 +40,11 @@ module aave_pool::supply_logic { reserve: address, user: address, to: address, - amount: u256, + amount: u256 } #[event] - /// @dev Emitted on setUserUseReserveAsCollateral() + /// @dev Emitted on supply(), finalize_transfer(), set_user_use_reserve_as_collateral() /// @param reserve The address of the underlying asset of the reserve /// @param user The address of the user enabling the usage as collateral struct ReserveUsedAsCollateralEnabled has store, drop { @@ -52,9 +53,9 @@ module aave_pool::supply_logic { } #[event] - /// @dev Emitted on setUserUseReserveAsCollateral() + /// @dev Emitted on withdraw(), finalize_transfer(), set_user_use_reserve_as_collateral() /// @param reserve The address of the underlying asset of the reserve - /// @param user The address of the user enabling the usage as collateral + /// @param user The address of the user disabling the usage as collateral struct ReserveUsedAsCollateralDisabled has store, drop { reserve: address, user: address @@ -62,10 +63,10 @@ module aave_pool::supply_logic { /// @notice Supplies an `amount` of underlying asset into the reserve, receiving in return overlying aTokens. /// - E.g. User supplies 100 USDC and gets in return 100 aUSDC - /// @param account The account that will supply the asset + /// @param account The account signer that will supply the asset /// @param asset The address of the underlying asset to supply /// @param amount The amount to be supplied - /// @param on_behalf_of The address that will receive the aTokens, same as msg.sender if the user + /// @param on_behalf_of The address that will receive the aTokens, same as account address if the user /// wants to receive them on his own wallet, or a different address if the beneficiary of aTokens /// is a different wallet /// @param referral_code Code used to register the integrator originating the operation, for potential rewards. @@ -78,41 +79,57 @@ module aave_pool::supply_logic { referral_code: u16 ) { let account_address = signer::address_of(account); - assert!( - account_address == on_behalf_of, - error_config::get_esigner_and_on_behalf_of_no_same(), - ); let reserve_data = pool::get_reserve_data(asset); - pool::update_state(asset, &mut reserve_data); - validation_logic::validate_supply(&reserve_data, amount); - pool::update_interest_rates(&mut reserve_data, asset, amount, 0); + let reserve_cache = pool::cache(&reserve_data); + // update pool state + pool::update_state(asset, &mut reserve_data, &mut reserve_cache); + + // validate supply + validation_logic::validate_supply(&reserve_cache, &reserve_data, amount); + + // update interest rates + pool::update_interest_rates( + &mut reserve_data, + &reserve_cache, + asset, + amount, + 0 + ); - let token_a_address = pool::get_reserve_a_token_address(&reserve_data); - let a_token_account = a_token_factory::get_token_account_address(token_a_address); + let token_a_address = pool::get_a_token_address(&reserve_cache); + let a_token_resource_account = + a_token_factory::get_token_account_address(token_a_address); // transfer the asset to the a_token address - mock_underlying_token_factory::transfer_from( - account_address, a_token_account, (amount as u64), asset + fungible_asset_manager::transfer( + account, + a_token_resource_account, + (amount as u64), + asset ); - let is_first_supply: bool = + + let is_first_supply = a_token_factory::scaled_balance_of(on_behalf_of, token_a_address) == 0; a_token_factory::mint( account_address, on_behalf_of, amount, - (pool::get_reserve_liquidity_index(&reserve_data) as u256), - token_a_address, + pool::get_next_liquidity_index(&reserve_cache), + token_a_address ); + if (is_first_supply) { let user_config_map = pool::get_user_configuration(on_behalf_of); let reserve_config_map = - pool::get_reserve_configuration_by_reserve_data(&reserve_data); - if (pool_validation::validate_automatic_use_as_collateral( - account_address, &user_config_map, &reserve_config_map - )) { + pool::get_reserve_cache_configuration(&reserve_cache); + if (validation_logic::validate_automatic_use_as_collateral( + account_address, + &user_config_map, + &reserve_config_map + )) { user_config::set_using_as_collateral( &mut user_config_map, (pool::get_reserve_id(&reserve_data) as u256), - true, + true ); pool::set_user_configuration(on_behalf_of, user_config_map); event::emit( @@ -127,39 +144,38 @@ module aave_pool::supply_logic { user: account_address, on_behalf_of, amount, - referral_code, - }, + referral_code + } ); } /// @notice Withdraws an `amount` of underlying asset from the reserve, burning the equivalent aTokens owned /// E.g. User has 100 aUSDC, calls withdraw() and receives 100 USDC, burning the 100 aUSDC + /// @param account The account signer that will withdraw the asset /// @param asset The address of the underlying asset to withdraw /// @param amount The underlying amount to be withdrawn /// - Send the value type(uint256).max in order to withdraw the whole aToken balance - /// @param to The address that will receive the underlying, same as msg.sender if the user + /// @param to The address that will receive the underlying, same as account address if the user /// wants to receive it on his own wallet, or a different address if the beneficiary is a /// different wallet public entry fun withdraw( account: &signer, asset: address, amount: u256, - to: address, + to: address ) { let account_address = signer::address_of(account); - assert!( - account_address == to, error_config::get_esigner_and_on_behalf_of_no_same() - ); let (reserve_data, reserves_count) = pool::get_reserve_data_and_reserves_count(asset); + let reserve_cache = pool::cache(&reserve_data); // update pool state - pool::update_state(asset, &mut reserve_data); + pool::update_state(asset, &mut reserve_data, &mut reserve_cache); + + let a_token_address = pool::get_a_token_address(&reserve_cache); let user_balance = wad_ray_math::ray_mul( - a_token_factory::scaled_balance_of( - account_address, pool::get_reserve_a_token_address(&reserve_data) - ), - (pool::get_reserve_liquidity_index(&reserve_data) as u256), + a_token_factory::scaled_balance_of(account_address, a_token_address), + pool::get_next_liquidity_index(&reserve_cache) ); let amount_to_withdraw = amount; if (amount == math_utils::u256_max()) { @@ -168,11 +184,17 @@ module aave_pool::supply_logic { // validate withdraw validation_logic::validate_withdraw( - &reserve_data, amount_to_withdraw, user_balance + &reserve_cache, amount_to_withdraw, user_balance ); // update interest rates - pool::update_interest_rates(&mut reserve_data, asset, 0, amount_to_withdraw); + pool::update_interest_rates( + &mut reserve_data, + &reserve_cache, + asset, + 0, + amount_to_withdraw + ); let user_config_map = pool::get_user_configuration(account_address); let reserve_id = pool::get_reserve_id(&reserve_data); @@ -181,9 +203,12 @@ module aave_pool::supply_logic { if (is_collateral && amount_to_withdraw == user_balance) { user_config::set_using_as_collateral( - &mut user_config_map, (reserve_id as u256), false + &mut user_config_map, + (reserve_id as u256), + false ); pool::set_user_configuration(account_address, user_config_map); + event::emit( ReserveUsedAsCollateralDisabled { reserve: asset, user: account_address } ); @@ -194,23 +219,24 @@ module aave_pool::supply_logic { account_address, to, amount_to_withdraw, - (pool::get_reserve_liquidity_index(&reserve_data) as u256), - pool::get_reserve_a_token_address(&reserve_data), + pool::get_next_liquidity_index(&reserve_cache), + a_token_address ); if (is_collateral && user_config::is_borrowing_any(&user_config_map)) { let user_emode_category = (emode_logic::get_user_emode(account_address) as u8); let (emode_ltv, emode_liq_threshold, emode_asset_price) = emode_logic::get_emode_configuration(user_emode_category); - pool_validation::validate_hf_and_ltv( - &mut reserve_data, - reserves_count, + // validate health factor and ltv + validation_logic::validate_hf_and_ltv( &user_config_map, + asset, account_address, + reserves_count, user_emode_category, emode_ltv, emode_liq_threshold, - emode_asset_price, + emode_asset_price ); }; // Emit a withdraw event @@ -220,37 +246,31 @@ module aave_pool::supply_logic { user: account_address, to, amount: amount_to_withdraw - }, + } ); } /// @notice Validates and finalizes an aToken transfer - /// @dev Only callable by the overlying aToken of the `asset` + /// @dev Only callable by the overlying user_logic module of the `asset` + /// @param account The account signer that will finalize the transfer /// @param asset The address of the underlying asset of the aToken /// @param from The user from which the aTokens are transferred /// @param to The user receiving the aTokens /// @param amount The amount being transferred/withdrawn /// @param balance_from_before The aToken balance of the `from` user before the transfer /// @param balance_to_before The aToken balance of the `to` user before the transfer - public entry fun finalize_transfer( + public(friend) fun finalize_transfer( account: &signer, asset: address, from: address, to: address, amount: u256, balance_from_before: u256, - balance_to_before: u256, + balance_to_before: u256 ) { let account_address = signer::address_of(account); let (reserve_data, reserves_count) = pool::get_reserve_data_and_reserves_count(asset); - let a_token_address = pool::get_reserve_a_token_address(&reserve_data); - assert!( - account_address == a_token_factory::get_token_account_address( - a_token_address - ), - error_config::get_ecaller_not_atoken(), - ); // validate transfer validation_logic::validate_transfer(&reserve_data); @@ -262,15 +282,16 @@ module aave_pool::supply_logic { let user_emode_category = (emode_logic::get_user_emode(from) as u8); let (emode_ltv, emode_liq_threshold, emode_asset_price) = emode_logic::get_emode_configuration(user_emode_category); - pool_validation::validate_hf_and_ltv( - &mut reserve_data, - reserves_count, + + validation_logic::validate_hf_and_ltv( &from_config, + asset, from, + reserves_count, user_emode_category, emode_ltv, emode_liq_threshold, - emode_asset_price, + emode_asset_price ); }; @@ -289,9 +310,11 @@ module aave_pool::supply_logic { let to_config = pool::get_user_configuration(to); let reserve_config_map = pool::get_reserve_configuration_by_reserve_data(&reserve_data); - if (pool_validation::validate_automatic_use_as_collateral( - account_address, &to_config, &reserve_config_map - )) { + if (validation_logic::validate_automatic_use_as_collateral( + account_address, + &to_config, + &reserve_config_map + )) { user_config::set_using_as_collateral(&mut to_config, reserve_id, true); pool::set_user_configuration(to, to_config); event::emit( @@ -303,6 +326,9 @@ module aave_pool::supply_logic { } /// @notice Allows suppliers to enable/disable a specific supplied asset as collateral + /// @dev Emits the `ReserveUsedAsCollateralEnabled()` event if the asset can be activated as collateral. + /// @dev In case the asset is being deactivated as collateral, `ReserveUsedAsCollateralDisabled()` is emitted. + /// @param account The account signer that will enable/disable the usage of the asset as collateral /// @param asset The address of the underlying asset supplied /// @param use_as_collateral True if the user wants to use the supply as collateral, false otherwise public entry fun set_user_use_reserve_as_collateral( @@ -311,63 +337,58 @@ module aave_pool::supply_logic { let account_address = signer::address_of(account); let (reserve_data, reserves_count) = pool::get_reserve_data_and_reserves_count(asset); + let reserve_cache = pool::cache(&reserve_data); + let user_balance = - pool::scaled_a_token_balance_of( - account_address, pool::get_reserve_a_token_address(&reserve_data) + pool::a_token_balance_of( + account_address, + pool::get_a_token_address(&reserve_cache) ); // validate set use reserve as collateral validation_logic::validate_set_use_reserve_as_collateral( - &reserve_data, user_balance + &reserve_cache, user_balance ); let user_config_map = pool::get_user_configuration(account_address); - let reserve_id = (pool::get_reserve_id(&reserve_data) as u256); if (use_as_collateral - != user_config::is_using_as_collateral(&user_config_map, reserve_id)) { - if (use_as_collateral) { - let reserve_config_map = - pool::get_reserve_configuration_by_reserve_data(&reserve_data); - assert!( - pool_validation::validate_use_as_collateral( - &user_config_map, &reserve_config_map - ), - error_config::get_euser_in_isolation_mode_or_ltv_zero(), - ); - user_config::set_using_as_collateral( - &mut user_config_map, reserve_id, true - ); - pool::set_user_configuration(account_address, user_config_map); - event::emit( - ReserveUsedAsCollateralEnabled { reserve: asset, user: account_address } - ); - } else { - user_config::set_using_as_collateral( - &mut user_config_map, reserve_id, false - ); - pool::set_user_configuration(account_address, user_config_map); - let user_emode_category = - (emode_logic::get_user_emode(account_address) as u8); - let (emode_ltv, emode_liq_threshold, emode_asset_price) = - emode_logic::get_emode_configuration(user_emode_category); - pool_validation::validate_hf_and_ltv( - &mut reserve_data, - reserves_count, - &user_config_map, - account_address, - user_emode_category, - emode_ltv, - emode_liq_threshold, - emode_asset_price, - ); + == user_config::is_using_as_collateral(&user_config_map, reserve_id)) { return }; - event::emit( - ReserveUsedAsCollateralDisabled { - reserve: asset, - user: account_address - }, - ); - } + if (use_as_collateral) { + let reserve_config_map = + pool::get_reserve_cache_configuration(&reserve_cache); + assert!( + validation_logic::validate_use_as_collateral( + &user_config_map, &reserve_config_map + ), + error_config::get_euser_in_isolation_mode_or_ltv_zero() + ); + user_config::set_using_as_collateral(&mut user_config_map, reserve_id, true); + pool::set_user_configuration(account_address, user_config_map); + event::emit( + ReserveUsedAsCollateralEnabled { reserve: asset, user: account_address } + ); + } else { + user_config::set_using_as_collateral(&mut user_config_map, reserve_id, false); + pool::set_user_configuration(account_address, user_config_map); + let user_emode_category = (emode_logic::get_user_emode(account_address) as u8); + let (emode_ltv, emode_liq_threshold, emode_asset_price) = + emode_logic::get_emode_configuration(user_emode_category); + + validation_logic::validate_hf_and_ltv( + &user_config_map, + asset, + account_address, + reserves_count, + user_emode_category, + emode_ltv, + emode_liq_threshold, + emode_asset_price + ); + + event::emit( + ReserveUsedAsCollateralDisabled { reserve: asset, user: account_address } + ); } } } diff --git a/aave-core/sources/aave-logic/user_logic.move b/aave-core/sources/aave-logic/user_logic.move new file mode 100644 index 0000000..159fd04 --- /dev/null +++ b/aave-core/sources/aave-logic/user_logic.move @@ -0,0 +1,131 @@ +module aave_pool::user_logic { + + use std::signer; + use aptos_framework::event; + + use aave_math::wad_ray_math; + + use aave_pool::a_token_factory; + use aave_pool::emode_logic; + use aave_pool::generic_logic; + use aave_pool::pool; + use aave_pool::supply_logic; + use aave_pool::token_base; + + #[event] + /// @dev Emitted during the transfer action + /// @param from The user whose tokens are being transferred + /// @param to The recipient + /// @param value The scaled amount being transferred + /// @param index The next liquidity index of the reserve + struct BalanceTransfer has store, drop { + from: address, + to: address, + value: u256, + index: u256 + } + + /// @notice Transfers aTokens from the user to the recipient + /// @param account The account signer of the caller + /// @param to The recipient of the aTokens + /// @param amount The amount of aTokens to transfer + /// @param a_token_address The address of the aToken + public entry fun transfer_a_token( + account: &signer, + to: address, + amount: u256, + a_token_address: address + ) { + let account_address = signer::address_of(account); + + let underlying_asset = + a_token_factory::get_underlying_asset_address(a_token_address); + let index = pool::get_reserve_normalized_income(underlying_asset); + let from_balance_before = + wad_ray_math::ray_mul( + a_token_factory::scaled_balance_of(account_address, a_token_address), + index + ); + let to_balance_before = + wad_ray_math::ray_mul( + a_token_factory::scaled_balance_of(to, a_token_address), + index + ); + token_base::transfer( + account_address, + to, + amount, + index, + a_token_address + ); + + // finalize transfer validate + supply_logic::finalize_transfer( + account, + underlying_asset, + account_address, + to, + amount, + from_balance_before, + to_balance_before + ); + + // send balance transfer event + event::emit( + BalanceTransfer { + from: account_address, + to, + value: wad_ray_math::ray_div(amount, index), + index + } + ); + } + + #[view] + /// @notice Returns the user account data across all the reserves + /// @param user The address of the user + /// @return total_collateral_base The total collateral of the user in the base currency used by the price feed + /// @return total_debt_base The total debt of the user in the base currency used by the price feed + /// @return available_borrows_base The borrowing power left of the user in the base currency used by the price feed + /// @return current_liquidation_threshold The liquidation threshold of the user + /// @return ltv The loan to value of The user + /// @return health_factor The current health factor of the user + public fun get_user_account_data(user: address): (u256, u256, u256, u256, u256, u256) { + let user_config_map = pool::get_user_configuration(user); + let reserves_count = pool::get_reserves_count(); + let user_emode_category = (emode_logic::get_user_emode(user) as u8); + let (emode_ltv, emode_liq_threshold, emode_asset_price) = + emode_logic::get_emode_configuration(user_emode_category); + let ( + total_collateral_base, + total_debt_base, + ltv, + current_liquidation_threshold, + health_factor, + _ + ) = + generic_logic::calculate_user_account_data( + &user_config_map, + reserves_count, + user, + user_emode_category, + emode_ltv, + emode_liq_threshold, + emode_asset_price + ); + + let available_borrows_base = + generic_logic::calculate_available_borrows( + total_collateral_base, total_debt_base, ltv + ); + + ( + total_collateral_base, + total_debt_base, + available_borrows_base, + current_liquidation_threshold, + ltv, + health_factor + ) + } +} diff --git a/aave-core/sources/aave-supply-borrow/validation_logic.move b/aave-core/sources/aave-logic/validation_logic.move similarity index 54% rename from aave-core/sources/aave-supply-borrow/validation_logic.move rename to aave-core/sources/aave-logic/validation_logic.move index c8d1deb..b05daa1 100644 --- a/aave-core/sources/aave-supply-borrow/validation_logic.move +++ b/aave-core/sources/aave-logic/validation_logic.move @@ -1,20 +1,18 @@ module aave_pool::validation_logic { - use std::signer; + use std::string; use std::vector; - use aave_config::error as error_config; - use aave_config::reserve as reserve_config; - use aave_config::user::{Self as user_config, UserConfigurationMap}; + use aave_acl::acl_manage; + use aave_config::error_config; + use aave_config::reserve_config::{Self, ReserveConfigurationMap}; + use aave_config::user_config::{Self, UserConfigurationMap}; use aave_math::math_utils; use aave_math::wad_ray_math; - use aave_mock_oracle::oracle; - use aave_mock_oracle::oracle_sentinel; + use aave_oracle::oracle; use aave_pool::a_token_factory; - use aave_pool::emode_logic; use aave_pool::generic_logic; - use aave_pool::pool::{Self, ReserveData}; - use aave_pool::variable_debt_token_factory; + use aave_pool::pool::{Self, ReserveCache, ReserveData}; /// @notice Validates a flashloan action. /// @param reserves_data The data of all the reserves @@ -24,10 +22,12 @@ module aave_pool::validation_logic { reserves_data: &vector, assets: &vector
, amounts: &vector, + interest_rate_modes: &vector ) { assert!( - vector::length(assets) == vector::length(amounts), - error_config::get_einconsistent_flashloan_params(), + vector::length(assets) == vector::length(amounts) + && vector::length(assets) == vector::length(interest_rate_modes), + error_config::get_einconsistent_flashloan_params() ); for (i in 0..vector::length(assets)) { validate_flashloan_simple(vector::borrow(reserves_data, i)); @@ -49,59 +49,71 @@ module aave_pool::validation_logic { } /// @notice Validates a supply action. - /// @param reserve_data The reserve data the reserve + /// @param reserve_cache The reserve cache of the reserve + /// @param reserve_data The reserve data of the reserve /// @param amount The amount to be supplied - public fun validate_supply(reserve_data: &ReserveData, amount: u256) { + public fun validate_supply( + reserve_cache: &ReserveCache, reserve_data: &ReserveData, amount: u256 + ) { assert!(amount != 0, error_config::get_einvalid_amount()); - let reserve_configuration = - pool::get_reserve_configuration_by_reserve_data(reserve_data); + + let reserve_configuration_map = + pool::get_reserve_cache_configuration(reserve_cache); let (is_active, is_frozen, _, is_paused) = - reserve_config::get_flags(&reserve_configuration); + reserve_config::get_flags(&reserve_configuration_map); + assert!(is_active, error_config::get_ereserve_inactive()); assert!(!is_paused, error_config::get_ereserve_paused()); assert!(!is_frozen, error_config::get_ereserve_frozen()); - let supply_cap = reserve_config::get_supply_cap(&reserve_configuration); - let a_token_supply = + let supply_cap = reserve_config::get_supply_cap(&reserve_configuration_map); + let a_token_scaled_total_supply = a_token_factory::scaled_total_supply( - pool::get_reserve_a_token_address(reserve_data) + pool::get_a_token_address(reserve_cache) ); - let accrued_to_treasury_liquidity = + let total_supply_liquidity = wad_ray_math::ray_mul( - (a_token_supply + pool::get_reserve_accrued_to_treasury(reserve_data)), - (pool::get_reserve_liquidity_index(reserve_data) as u256), + ( + a_token_scaled_total_supply + + pool::get_reserve_accrued_to_treasury(reserve_data) + ), + pool::get_next_liquidity_index(reserve_cache) ); - let total_supply = accrued_to_treasury_liquidity + amount; - let max_supply = + + let total_supply = total_supply_liquidity + amount; + let max_supply_cap = supply_cap * ( math_utils::pow( - 10, reserve_config::get_decimals(&reserve_configuration) + 10, + reserve_config::get_decimals(&reserve_configuration_map) ) ); assert!( - supply_cap == 0 || total_supply <= max_supply, - error_config::get_esupply_cap_exceeded(), + supply_cap == 0 || total_supply <= max_supply_cap, + error_config::get_esupply_cap_exceeded() ); } /// @notice Validates a withdraw action. - /// @param reserve_data The reserve data the reserve + /// @param reserve_cache The reserve cache of the reserve /// @param amount The amount to be withdrawn /// @param user_balance The balance of the user public fun validate_withdraw( - reserve_data: &ReserveData, amount: u256, user_balance: u256 + reserve_cache: &ReserveCache, amount: u256, user_balance: u256 ) { assert!(amount != 0, error_config::get_einvalid_amount()); assert!( - amount <= user_balance, error_config::get_enot_enough_available_user_balance() + amount <= user_balance, + error_config::get_enot_enough_available_user_balance() ); - let reserve_configuration = - pool::get_reserve_configuration_by_reserve_data(reserve_data); + + let reserve_configuration_map = + pool::get_reserve_cache_configuration(reserve_cache); let (is_active, _, _, is_paused) = - reserve_config::get_flags(&reserve_configuration); + reserve_config::get_flags(&reserve_configuration_map); assert!(is_active, error_config::get_ereserve_inactive()); assert!(!is_paused, error_config::get_ereserve_paused()); } @@ -113,19 +125,19 @@ module aave_pool::validation_logic { pool::get_reserve_configuration_by_reserve_data(reserve_data); assert!( !reserve_config::get_paused(&reserve_config_map), - error_config::get_ereserve_paused(), + error_config::get_ereserve_paused() ) } /// @notice Validates the action of setting an asset as collateral. - /// @param reserve_data The reserve data the reserve + /// @param reserve_cache The reserve cache of the reserve /// @param user_balance The balance of the user public fun validate_set_use_reserve_as_collateral( - reserve_data: &ReserveData, user_balance: u256 + reserve_cache: &ReserveCache, user_balance: u256 ) { assert!(user_balance != 0, error_config::get_eunderlying_balance_zero()); let reserve_configuration_map = - pool::get_reserve_configuration_by_reserve_data(reserve_data); + pool::get_reserve_cache_configuration(reserve_cache); let (is_active, _, _, is_paused) = reserve_config::get_flags(&reserve_configuration_map); assert!(is_active, error_config::get_ereserve_inactive()); @@ -156,7 +168,7 @@ module aave_pool::validation_logic { is_frozen: bool, is_paused: bool, borrowing_enabled: bool, - siloed_borrowing_enabled: bool, + siloed_borrowing_enabled: bool } fun create_validate_borrow_local_vars(): ValidateBorrowLocalVars { @@ -179,12 +191,12 @@ module aave_pool::validation_logic { is_frozen: false, is_paused: false, borrowing_enabled: false, - siloed_borrowing_enabled: false, + siloed_borrowing_enabled: false } } /// @notice Validates a borrow action. - /// @param reserve_data The reserve data the reserve + /// @param reserve_cache The reserve cache of the reserve /// @param user_config_map The UserConfigurationMap object /// @param asset The address of the asset to be borrowed /// @param user_address The address of the user @@ -192,11 +204,15 @@ module aave_pool::validation_logic { /// @param interest_rate_mode The interest rate mode /// @param reserves_count The number of reserves /// @param user_emode_category The user's eMode category + /// @param emode_ltv The eMode LTV + /// @param emode_liq_threshold The eMode liquidation threshold + /// @param emode_asset_price The eMode asset price + /// @param emode_source_price The eMode price source /// @param isolation_mode_active The isolation mode state /// @param isolation_mode_collateral_address The address of the collateral reserve in isolation mode /// @param isolation_mode_debt_ceiling The debt ceiling in isolation mode public fun validate_borrow( - reserve_data: &ReserveData, + reserve_cache: &ReserveCache, user_config_map: &UserConfigurationMap, asset: address, user_address: address, @@ -204,15 +220,19 @@ module aave_pool::validation_logic { interest_rate_mode: u8, reserves_count: u256, user_emode_category: u8, + emode_ltv: u256, + emode_liq_threshold: u256, + emode_asset_price: u256, + emode_source_price: address, isolation_mode_active: bool, isolation_mode_collateral_address: address, - isolation_mode_debt_ceiling: u256, + isolation_mode_debt_ceiling: u256 ) { assert!(amount != 0, error_config::get_einvalid_amount()); let vars = create_validate_borrow_local_vars(); - let reserve_configuration_map = - pool::get_reserve_configuration_by_reserve_data(reserve_data); + pool::get_reserve_cache_configuration(reserve_cache); + let (is_active, is_frozen, borrowing_enabled, is_paused) = reserve_config::get_flags(&reserve_configuration_map); @@ -221,36 +241,24 @@ module aave_pool::validation_logic { assert!(!is_frozen, error_config::get_ereserve_frozen()); assert!(borrowing_enabled, error_config::get_eborrowing_not_enabled()); - assert!( - oracle_sentinel::is_borrow_allowed(), - error_config::get_eprice_oracle_sentinel_check_failed(), - ); - + // validate interest rate mode assert!( interest_rate_mode == user_config::get_interest_rate_mode_variable(), - error_config::get_einvalid_interest_rate_mode_selected(), + error_config::get_einvalid_interest_rate_mode_selected() ); - vars.reserve_decimals = reserve_config::get_decimals(&reserve_configuration_map); vars.borrow_cap = reserve_config::get_borrow_cap(&reserve_configuration_map); - vars.asset_unit = math_utils::pow(10, vars.reserve_decimals); - if (vars.borrow_cap != 0) { - let total_supply_variable_debt = - variable_debt_token_factory::scaled_total_supply( - pool::get_reserve_variable_debt_token_address(reserve_data) - ); vars.total_supply_variable_debt = wad_ray_math::ray_mul( - total_supply_variable_debt, - (pool::get_reserve_variable_borrow_index(reserve_data) as u256), + pool::get_curr_scaled_variable_debt(reserve_cache), + pool::get_next_variable_borrow_index(reserve_cache) ); vars.total_debt = vars.total_supply_variable_debt + amount; - assert!( vars.total_debt <= vars.borrow_cap * vars.asset_unit, - error_config::get_eborrow_cap_exceeded(), - ) + error_config::get_eborrow_cap_exceeded() + ); }; if (isolation_mode_active) { @@ -258,7 +266,7 @@ module aave_pool::validation_logic { // the total exposure is no bigger than the collateral debt ceiling assert!( reserve_config::get_borrowable_in_isolation(&reserve_configuration_map), - error_config::get_easset_not_borrowable_in_isolation(), + error_config::get_easset_not_borrowable_in_isolation() ); let mode_collateral_reserve_data = @@ -269,7 +277,6 @@ module aave_pool::validation_logic { &mode_collateral_reserve_data ) as u256 ); - let total_debt = isolation_mode_total_debt + ( @@ -279,12 +286,12 @@ module aave_pool::validation_logic { ( vars.reserve_decimals - reserve_config::get_debt_ceiling_decimals() - ), + ) ) ); assert!( total_debt <= isolation_mode_debt_ceiling, - error_config::get_edebt_ceiling_exceeded(), + error_config::get_edebt_ceiling_exceeded() ); }; @@ -292,16 +299,10 @@ module aave_pool::validation_logic { assert!( reserve_config::get_emode_category(&reserve_configuration_map) == (user_emode_category as u256), - error_config::get_einconsistent_emode_category(), + error_config::get_einconsistent_emode_category() ); - let emode_category_data = - emode_logic::get_emode_category_data(user_emode_category); - vars.emode_price_source = emode_logic::get_emode_category_price_source( - &emode_category_data - ) + vars.emode_price_source = emode_source_price; }; - let (emode_ltv, emode_liq_threshold, emode_asset_price) = - emode_logic::get_emode_configuration(user_emode_category); let ( user_collateral_in_base_currency, @@ -312,113 +313,116 @@ module aave_pool::validation_logic { _ ) = generic_logic::calculate_user_account_data( - reserves_count, user_config_map, + reserves_count, user_address, user_emode_category, emode_ltv, emode_liq_threshold, - emode_asset_price, + emode_asset_price ); vars.user_collateral_in_base_currency = user_collateral_in_base_currency; vars.user_debt_in_base_currency = user_debt_in_base_currency; vars.current_ltv = current_ltv; vars.health_factor = health_factor; + assert!( vars.user_collateral_in_base_currency != 0, - error_config::get_ecollateral_balance_is_zero(), + error_config::get_ecollateral_balance_is_zero() ); assert!(vars.current_ltv != 0, error_config::get_eltv_validation_failed()); assert!( vars.health_factor > user_config::get_health_factor_liquidation_threshold(), - error_config::get_ehealth_factor_lower_than_liquidation_threshold(), + error_config::get_ehealth_factor_lower_than_liquidation_threshold() ); + // Currently, custom oracle is not supported. Only a unified oracle is used. Therefore, the price is obtained by calling the oracle directly with the asset. let asset_address = if (vars.emode_price_source != @0x0) { vars.emode_price_source } else { asset }; vars.amount_in_base_currency = oracle::get_asset_price(asset_address) * amount; - vars.amount_in_base_currency = vars.amount_in_base_currency / vars.asset_unit; //add the current already borrowed amount to the amount requested to calculate the total collateral needed. vars.collateral_needed_in_base_currency = math_utils::percent_div( (vars.user_debt_in_base_currency + vars.amount_in_base_currency), - vars.current_ltv, + vars.current_ltv //LTV is calculated in percentage ); + assert!( - vars.collateral_needed_in_base_currency <= vars.user_collateral_in_base_currency, - error_config::get_ecollateral_cannot_cover_new_borrow(), + vars.collateral_needed_in_base_currency + <= vars.user_collateral_in_base_currency, + error_config::get_ecollateral_cannot_cover_new_borrow() ); if (user_config::is_borrowing_any(user_config_map)) { let (siloed_borrowing_enabled, siloed_borrowing_address) = pool::get_siloed_borrowing_state(user_address); + vars.siloed_borrowing_enabled = siloed_borrowing_enabled; vars.siloed_borrowing_address = siloed_borrowing_address; + if (vars.siloed_borrowing_enabled) { assert!( vars.siloed_borrowing_address == asset, - error_config::get_esiloed_borrowing_violation(), + error_config::get_esiloed_borrowing_violation() ) } else { assert!( !reserve_config::get_siloed_borrowing(&reserve_configuration_map), - error_config::get_esiloed_borrowing_violation(), + error_config::get_esiloed_borrowing_violation() ) } } } /// @notice Validates a repay action. - /// @param account The address of the user - /// @param reserve_data The reserve data the reserve + /// @param account_address The address of the user repaying the debt + /// @param reserve_cache The reserve cache of the reserve /// @param amount_sent The amount sent for the repayment. Can be an actual value or uint(-1) /// @param interest_rate_mode The interest rate mode of the debt being repaid - /// @param on_behalf_of The address of the user msg.sender is repaying for + /// @param on_behalf_of The address of the user account_address is repaying for /// @param variable_debt The borrow balance of the user public fun validate_repay( - account: &signer, - reserve_data: &ReserveData, + account_address: address, + reserve_cache: &ReserveCache, amount_sent: u256, interest_rate_mode: u8, on_behalf_of: address, variable_debt: u256 ) { - let account_address = signer::address_of(account); assert!(amount_sent != 0, error_config::get_einvalid_amount()); assert!( amount_sent != math_utils::u256_max() || account_address == on_behalf_of, - error_config::get_eno_explicit_amount_to_repay_on_behalf(), + error_config::get_eno_explicit_amount_to_repay_on_behalf() + ); + let reserve_configuration = pool::get_reserve_cache_configuration( + reserve_cache ); - - let reserve_configuration = - pool::get_reserve_configuration_by_reserve_data(reserve_data); let (is_active, _, _, is_paused) = reserve_config::get_flags(&reserve_configuration); assert!(is_active, error_config::get_ereserve_inactive()); assert!(!is_paused, error_config::get_ereserve_paused()); - // check debt selected type assert!( variable_debt != 0 && interest_rate_mode == user_config::get_interest_rate_mode_variable(), - error_config::get_eno_debt_of_selected_type(), + error_config::get_eno_debt_of_selected_type() ); } /// @notice Validates the liquidation action. /// @param user_config_map The user configuration mapping /// @param collateral_reserve The reserve data of the collateral - /// @param debt_reserve The reserve data of the debt + /// @param debt_reserve_cache The reserve cache of the debt reserve /// @param total_debt The total debt of the user /// @param health_factor The health factor of the user public fun validate_liquidation_call( user_config_map: &UserConfigurationMap, collateral_reserve: &ReserveData, - debt_reserve: &ReserveData, + debt_reserve_cache: &ReserveCache, total_debt: u256, health_factor: u256 ) { @@ -428,26 +432,28 @@ module aave_pool::validation_logic { reserve_config::get_flags(&collateral_reserve_config); let debt_reserve_config = - pool::get_reserve_configuration_by_reserve_data(debt_reserve); + pool::get_reserve_cache_configuration(debt_reserve_cache); let (principal_reserve_active, _, _, principal_reserve_paused) = reserve_config::get_flags(&debt_reserve_config); + assert!( collateral_reserve_active && principal_reserve_active, - error_config::get_ereserve_inactive(), + error_config::get_ereserve_inactive() ); assert!( !collateral_reserve_paused && !principal_reserve_paused, - error_config::get_ereserve_paused(), + error_config::get_ereserve_paused() ); assert!( - health_factor < user_config::get_minimum_health_factor_liquidation_threshold() || oracle_sentinel::is_liquidation_allowed(), - error_config::get_eprice_oracle_sentinel_check_failed(), + health_factor + < user_config::get_minimum_health_factor_liquidation_threshold(), + error_config::get_ehealth_factor_lower_than_liquidation_threshold() ); assert!( health_factor < user_config::get_health_factor_liquidation_threshold(), - error_config::get_ehealth_factor_not_below_threshold(), + error_config::get_ehealth_factor_not_below_threshold() ); let collateral_reserve_id = pool::get_reserve_id(collateral_reserve); @@ -457,12 +463,176 @@ module aave_pool::validation_logic { user_config_map, (collateral_reserve_id as u256) ); - // if collateral isn't enabled as collateral by user, it cannot be liquidated + //if collateral isn't enabled as collateral by user, it cannot be liquidated + assert!( + is_collateral_enabled, + error_config::get_ecollateral_cannot_be_liquidated() + ); + assert!( + total_debt != 0, + error_config::get_especified_currency_not_borrowed_by_user() + ); + } + + /// @notice Validates the health factor of a user and the ltv of the asset being withdrawn. + /// @param user_config_map the user configuration map + /// @param asset The address of the underlying asset of the reserve + /// @param from The user from which the aTokens are being transferred + /// @param reserves_count The number of available reserves + /// @param user_emode_category The users active efficiency mode category + /// @param emode_ltv The ltv of the efficiency mode category + /// @param emode_liq_threshold The liquidation threshold of the efficiency mode category + /// @param emode_asset_price The price of the efficiency mode category + public fun validate_hf_and_ltv( + user_config_map: &UserConfigurationMap, + asset: address, + from: address, + reserves_count: u256, + user_emode_category: u8, + emode_ltv: u256, + emode_liq_threshold: u256, + emode_asset_price: u256 + ) { + let reserve_data = pool::get_reserve_data(asset); + let (_, has_zero_ltv_collateral) = + validate_health_factor( + user_config_map, + from, + user_emode_category, + reserves_count, + emode_ltv, + emode_liq_threshold, + emode_asset_price + ); + let reserve_configuration_map = + pool::get_reserve_configuration_by_reserve_data(&reserve_data); assert!( - is_collateral_enabled, error_config::get_ecollateral_cannot_be_liquidated() + !has_zero_ltv_collateral + || reserve_config::get_ltv(&reserve_configuration_map) == 0, + error_config::get_eltv_validation_failed() ); + } + + /// @notice Validates if an asset should be automatically activated as collateral in the following actions: supply, + /// transfer, mint unbacked, and liquidate + /// @dev This is used to ensure that isolated assets are not enabled as collateral automatically + /// @param user_config_map the user configuration map + /// @param reserve_config_map The reserve configuration map + /// @return True if the asset can be activated as collateral, false otherwise + public fun validate_automatic_use_as_collateral( + account_address: address, + user_config_map: &UserConfigurationMap, + reserve_config_map: &ReserveConfigurationMap + ): bool { + if (reserve_config::get_debt_ceiling(reserve_config_map) != 0) { + // ensures only the ISOLATED_COLLATERAL_SUPPLIER_ROLE can enable collateral as side-effect of an action + if (!acl_manage::has_role( + string::utf8(user_config::get_isolated_collateral_supplier_role()), + account_address + )) { + return false + }; + }; + + return validate_use_as_collateral(user_config_map, reserve_config_map) + } + + /// @notice Validates the action of activating the asset as collateral. + /// @dev Only possible if the asset has non-zero LTV and the user is not in isolation mode + /// @param user_config_map the user configuration map + /// @param reserve_config_map The reserve configuration map + /// @return True if the asset can be activated as collateral, false otherwise + public fun validate_use_as_collateral( + user_config_map: &UserConfigurationMap, + reserve_config_map: &ReserveConfigurationMap + ): bool { + if (reserve_config::get_ltv(reserve_config_map) == 0) { + return false + }; + if (!user_config::is_using_as_collateral_any(user_config_map)) { + return true + }; + + let (isolation_mode_active, _, _) = + pool::get_isolation_mode_state(user_config_map); + + ( + !isolation_mode_active + && reserve_config::get_debt_ceiling(reserve_config_map) == 0 + ) + } + + /// @notice Validates the health factor of a user. + /// @param user_config_map the user configuration map + /// @param user The user to validate health factor of + /// @param user_emode_category The users active efficiency mode category + /// @param reserves_count The number of available reserves + /// @param emode_ltv The ltv of the efficiency mode category + /// @param emode_liq_threshold The liquidation threshold of the efficiency mode category + /// @param emode_asset_price The price of the efficiency mode category + public fun validate_health_factor( + user_config_map: &UserConfigurationMap, + user: address, + user_emode_category: u8, + reserves_count: u256, + emode_ltv: u256, + emode_liq_threshold: u256, + emode_asset_price: u256 + ): (u256, bool) { + let (_, _, _, _, health_factor, has_zero_ltv_collateral) = + generic_logic::calculate_user_account_data( + user_config_map, + reserves_count, + user, + user_emode_category, + emode_ltv, + emode_liq_threshold, + emode_asset_price + ); + + assert!( + health_factor >= user_config::get_health_factor_liquidation_threshold(), + error_config::get_ehealth_factor_lower_than_liquidation_threshold() + ); + + (health_factor, has_zero_ltv_collateral) + } + + /// @notice Validates the action of setting efficiency mode. + /// @param user_config_map the user configuration map + /// @param reserves_count The total number of valid reserves + /// @param category_id The id of the category + /// @param liquidation_threshold The liquidation threshold + public fun validate_set_user_emode( + user_config_map: &UserConfigurationMap, + reserves_count: u256, + category_id: u8, + liquidation_threshold: u16 + ) { + // category is invalid if the liq threshold is not set assert!( - total_debt != 0, error_config::get_especified_currency_not_borrowed_by_user() + category_id == 0 || liquidation_threshold != 0, + error_config::get_einconsistent_emode_category() ); + + // eMode can always be enabled if the user hasn't supplied anything + if (!user_config::is_empty(user_config_map)) { + // if user is trying to set another category than default we require that + // either the user is not borrowing, or it's borrowing assets of category_id + if (category_id != 0) { + for (i in 0..reserves_count) { + if (user_config::is_borrowing(user_config_map, i)) { + let reserve_address = pool::get_reserve_address_by_id(i); + let reserve_configuration = + pool::get_reserve_configuration(reserve_address); + assert!( + reserve_config::get_emode_category(&reserve_configuration) + == (category_id as u256), + error_config::get_einconsistent_emode_category() + ); + }; + } + } + } } } diff --git a/aave-core/sources/aave-tokens/mock_underlying_token_factory.move b/aave-core/sources/aave-mocks/mock_underlying_token_factory.move similarity index 89% rename from aave-core/sources/aave-tokens/mock_underlying_token_factory.move rename to aave-core/sources/aave-mocks/mock_underlying_token_factory.move index b460f05..3d0a593 100644 --- a/aave-core/sources/aave-tokens/mock_underlying_token_factory.move +++ b/aave-core/sources/aave-mocks/mock_underlying_token_factory.move @@ -21,7 +21,7 @@ module aave_pool::mock_underlying_token_factory { friend aave_pool::ecosystem_reserve_v2; #[test_only] - friend aave_pool::underlying_token_factory_tests; + friend aave_pool::mock_underlying_token_factory_tests; /// Only fungible asset metadata owner can make changes. const ENOT_OWNER: u64 = 1; @@ -33,12 +33,12 @@ module aave_pool::mock_underlying_token_factory { struct ManagedFungibleAsset has key { mint_ref: MintRef, transfer_ref: TransferRef, - burn_ref: BurnRef, + burn_ref: BurnRef } /// mapping (underlying token address => bool) struct CoinList has key { - value: SmartTable, + value: SmartTable } fun init_module(signer: &signer) { @@ -48,11 +48,11 @@ module aave_pool::mock_underlying_token_factory { /// @notice Creates a new underlying token. /// @param signer The signer of the transaction - /// @param name The name of the aToken - /// @param symbol The symbol of the aToken - /// @param decimals The decimals of the aToken - /// @param icon_uri The icon URI of the aToken - /// @param project_uri The project URI of the aToken + /// @param name The name of the underlying token + /// @param symbol The symbol of the underlying token + /// @param decimals The decimals of the underlying token + /// @param icon_uri The icon URI of the underlying token + /// @param project_uri The project URI of the underlying token public entry fun create_token( signer: &signer, maximum_supply: u128, @@ -60,18 +60,21 @@ module aave_pool::mock_underlying_token_factory { symbol: String, decimals: u8, icon_uri: String, - project_uri: String, + project_uri: String ) acquires CoinList { only_token_admin(signer); let token_metadata_address = object::create_object_address( - &signer::address_of(signer), *string::bytes(&symbol) + &signer::address_of(signer), + *string::bytes(&symbol) ); let coin_list = borrow_global_mut(@aave_pool); + assert!( !smart_table::contains(&coin_list.value, token_metadata_address), - E_TOKEN_ALREADY_EXISTS, + E_TOKEN_ALREADY_EXISTS ); + smart_table::add(&mut coin_list.value, token_metadata_address, true); let max_supply = @@ -80,6 +83,7 @@ module aave_pool::mock_underlying_token_factory { } else { option::none() }; + let constructor_ref = &object::create_named_object(signer, *string::bytes(&symbol)); primary_fungible_store::create_primary_store_enabled_fungible_asset( @@ -89,7 +93,7 @@ module aave_pool::mock_underlying_token_factory { symbol, decimals, icon_uri, - project_uri, + project_uri ); // Create mint/burn/transfer refs to allow creator to manage the fungible asset. @@ -97,9 +101,10 @@ module aave_pool::mock_underlying_token_factory { let burn_ref = fungible_asset::generate_burn_ref(constructor_ref); let transfer_ref = fungible_asset::generate_transfer_ref(constructor_ref); let metadata_object_signer = object::generate_signer(constructor_ref); + move_to( &metadata_object_signer, - ManagedFungibleAsset { mint_ref, transfer_ref, burn_ref }, + ManagedFungibleAsset { mint_ref, transfer_ref, burn_ref } ); } @@ -107,7 +112,7 @@ module aave_pool::mock_underlying_token_factory { let coin_list = borrow_global(@aave_pool); assert!( smart_table::contains(&coin_list.value, token_metadata_address), - E_TOKEN_ALREADY_EXISTS, + E_TOKEN_ALREADY_EXISTS ); } @@ -130,7 +135,10 @@ module aave_pool::mock_underlying_token_factory { /// Mint as the owner of metadata object. public entry fun mint( - admin: &signer, to: address, amount: u64, metadata_address: address + admin: &signer, + to: address, + amount: u64, + metadata_address: address ) acquires ManagedFungibleAsset { let asset = get_metadata(metadata_address); let managed_fungible_asset = authorized_borrow_refs(admin, asset); @@ -141,9 +149,12 @@ module aave_pool::mock_underlying_token_factory { ); } - // Internal transfer from + // <:!:mint public(friend) fun transfer_from( - from: address, to: address, amount: u64, metadata_address: address + from: address, + to: address, + amount: u64, + metadata_address: address ) acquires ManagedFungibleAsset { let asset = get_metadata(metadata_address); let transfer_ref = &authorized_borrow_refs_without_permission(asset).transfer_ref; @@ -212,17 +223,18 @@ module aave_pool::mock_underlying_token_factory { /// Borrow the immutable reference of the refs of `metadata`. /// This validates that the signer is the metadata object's owner. inline fun authorized_borrow_refs( - owner: &signer, asset: Object, + owner: &signer, asset: Object ): &ManagedFungibleAsset acquires ManagedFungibleAsset { assert!( object::is_owner(asset, signer::address_of(owner)), - error::permission_denied(ENOT_OWNER), + error::permission_denied(ENOT_OWNER) ); + borrow_global(object::object_address(&asset)) } inline fun authorized_borrow_refs_without_permission( - asset: Object, + asset: Object ): &ManagedFungibleAsset acquires ManagedFungibleAsset { borrow_global(object::object_address(&asset)) } diff --git a/aave-core/sources/aave-periphery/admin_controlled_ecosystem_reserve.move b/aave-core/sources/aave-periphery/admin_controlled_ecosystem_reserve.move index 98418fe..31c5627 100644 --- a/aave-core/sources/aave-periphery/admin_controlled_ecosystem_reserve.move +++ b/aave-core/sources/aave-periphery/admin_controlled_ecosystem_reserve.move @@ -8,7 +8,7 @@ module aave_pool::admin_controlled_ecosystem_reserve { Self, Object, ExtendRef as ObjExtendRef, - TransferRef as ObjectTransferRef, + TransferRef as ObjectTransferRef }; use aptos_framework::event; @@ -22,17 +22,17 @@ module aave_pool::admin_controlled_ecosystem_reserve { #[event] struct NewFundsAdmin has store, drop { - funds_admin: address, + funds_admin: address } struct AdminControlledEcosystemReserveData has key { fungible_assets: SmartTable, Object>, extend_ref: ObjExtendRef, transfer_ref: ObjectTransferRef, - funds_admin: address, + funds_admin: address } - public fun initialize(sender: &signer,) { + public fun initialize(sender: &signer) { let state_object_constructor_ref = &object::create_named_object(sender, ADMIN_CONTROLLED_ECOSYSTEM_RESERVE); let state_object_signer = &object::generate_signer(state_object_constructor_ref); @@ -43,15 +43,15 @@ module aave_pool::admin_controlled_ecosystem_reserve { fungible_assets: smart_table::new, Object>(), transfer_ref: object::generate_transfer_ref(state_object_constructor_ref), extend_ref: object::generate_extend_ref(state_object_constructor_ref), - funds_admin: signer::address_of(sender), - }, + funds_admin: signer::address_of(sender) + } ); } public fun check_is_funds_admin(account: address) { assert!( - acl_manage::is_admin_controlled_ecosystem_reserve_funds_admin_role(account), - NOT_FUNDS_ADMIN, + acl_manage::is_admin_controlled_ecosystem_reserve_funds_admin(account), + NOT_FUNDS_ADMIN ); } @@ -75,31 +75,34 @@ module aave_pool::admin_controlled_ecosystem_reserve { } #[view] - public fun admin_controlled_ecosystem_reserve_object() - : Object { + public fun admin_controlled_ecosystem_reserve_object(): + Object { object::address_to_object( admin_controlled_ecosystem_reserve_address() ) } - fun set_funds_admin_internal(admin: &signer, account: address) acquires AdminControlledEcosystemReserveData { + fun set_funds_admin_internal( + admin: &signer, account: address + ) acquires AdminControlledEcosystemReserveData { let admin_controlled_ecosystem_reserve_data = borrow_global_mut( admin_controlled_ecosystem_reserve_address() ); - acl_manage::remove_admin_controlled_ecosystem_reserve_funds_admin_role( + acl_manage::remove_admin_controlled_ecosystem_reserve_funds_admin( admin, admin_controlled_ecosystem_reserve_data.funds_admin ); - acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin_role( - admin, account - ); + acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin(admin, account); admin_controlled_ecosystem_reserve_data.funds_admin = account; event::emit(NewFundsAdmin { funds_admin: account }); } public fun transfer_out( - sender: &signer, asset_metadata: Object, receiver: address, amount: u64 + sender: &signer, + asset_metadata: Object, + receiver: address, + amount: u64 ) acquires AdminControlledEcosystemReserveData { check_is_funds_admin(signer::address_of(sender)); @@ -109,12 +112,12 @@ module aave_pool::admin_controlled_ecosystem_reserve { ); if (smart_table::contains( - &admin_controlled_ecosystem_reserve_data.fungible_assets, asset_metadata - )) { + &admin_controlled_ecosystem_reserve_data.fungible_assets, asset_metadata + )) { let collector_fungible_store = smart_table::borrow( &admin_controlled_ecosystem_reserve_data.fungible_assets, - asset_metadata, + asset_metadata ); let collector_fungible_store_signer = object::generate_signer_for_extending( @@ -129,7 +132,7 @@ module aave_pool::admin_controlled_ecosystem_reserve { &collector_fungible_store_signer, *collector_fungible_store, receiver_fungible_store, - amount, + amount ); } } @@ -155,25 +158,33 @@ module aave_pool::admin_controlled_ecosystem_reserve { utf8(b"http://example.com"), vector[true, true, true], @0x1, - false, + false ); let metadata_address = object::create_object_address(&signer::address_of(creator), test_symbol); object::address_to_object(metadata_address) } - #[test(fa_creator = @aave_pool, aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, acl_fund_admin = @0x111, user_account = @0x222)] + #[ + test( + fa_creator = @aave_pool, + aave_role_super_admin = @aave_acl, + periphery_account = @aave_pool, + acl_fund_admin = @0x111, + user_account = @0x222 + ) + ] fun test_basic_flow( fa_creator: &signer, aave_role_super_admin: &signer, periphery_account: &signer, acl_fund_admin: &signer, - user_account: &signer, + user_account: &signer ) acquires AdminControlledEcosystemReserveData { // init acl acl_manage::test_init_module(aave_role_super_admin); // set fund admin - acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin_role( + acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin( aave_role_super_admin, signer::address_of(acl_fund_admin) ); // assert role is granted @@ -186,7 +197,10 @@ module aave_pool::admin_controlled_ecosystem_reserve { let _creator_address = signer::address_of(fa_creator); let user_address = signer::address_of(user_account); standard_token::mint_to_primary_stores( - fa_creator, metadata, vector[user_address], vector[100] + fa_creator, + metadata, + vector[user_address], + vector[100] ); assert!( primary_fungible_store::balance(user_address, metadata) == 100, TEST_SUCCESS @@ -198,7 +212,7 @@ module aave_pool::admin_controlled_ecosystem_reserve { fa_creator, metadata, vector[user_address], - vector[100], + vector[100] ); assert!(fungible_asset::amount(&fa) == 100, TEST_SUCCESS); @@ -221,9 +235,87 @@ module aave_pool::admin_controlled_ecosystem_reserve { smart_table::upsert( &mut admin_controlled_ecosystem_reserve_data.fungible_assets, asset_metadata, - collector_fungible_store, + collector_fungible_store ); transfer_out(acl_fund_admin, metadata, user_address, 50); } + + #[ + test( + fa_creator = @aave_pool, + aave_role_super_admin = @aave_acl, + periphery_account = @aave_pool, + acl_fund_admin = @0x111, + user_account = @0x222 + ) + ] + fun test_set_funds_admin_internal( + fa_creator: &signer, + aave_role_super_admin: &signer, + periphery_account: &signer, + acl_fund_admin: &signer, + user_account: &signer + ) acquires AdminControlledEcosystemReserveData { + // init acl + acl_manage::test_init_module(aave_role_super_admin); + // set fund admin + acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin( + aave_role_super_admin, signer::address_of(acl_fund_admin) + ); + // assert role is granted + check_is_funds_admin(signer::address_of(acl_fund_admin)); + + // create test token + let metadata = create_test_fa(fa_creator); + + // mint coins to user + let _creator_address = signer::address_of(fa_creator); + let user_address = signer::address_of(user_account); + standard_token::mint_to_primary_stores( + fa_creator, + metadata, + vector[user_address], + vector[100] + ); + assert!( + primary_fungible_store::balance(user_address, metadata) == 100, TEST_SUCCESS + ); + + // user withdraws all fas he has + let fa = + standard_token::withdraw_from_primary_stores( + fa_creator, + metadata, + vector[user_address], + vector[100] + ); + assert!(fungible_asset::amount(&fa) == 100, TEST_SUCCESS); + + initialize(periphery_account); + + let asset_metadata = fungible_asset::metadata_from_asset(&fa); + + let admin_controlled_ecosystem_reserve_data = + borrow_global_mut( + admin_controlled_ecosystem_reserve_address() + ); + + let asset_object_constructor_ref = + object::create_object(admin_controlled_ecosystem_reserve_address()); + let collector_fungible_store = + fungible_asset::create_store(&asset_object_constructor_ref, asset_metadata); + + fungible_asset::deposit(collector_fungible_store, fa); + + smart_table::upsert( + &mut admin_controlled_ecosystem_reserve_data.fungible_assets, + asset_metadata, + collector_fungible_store + ); + + transfer_out(acl_fund_admin, metadata, user_address, 50); + + set_funds_admin_internal(aave_role_super_admin, user_address); + } } diff --git a/aave-core/sources/aave-periphery/coin_migrator.move b/aave-core/sources/aave-periphery/coin_migrator.move new file mode 100644 index 0000000..a91d028 --- /dev/null +++ b/aave-core/sources/aave-periphery/coin_migrator.move @@ -0,0 +1,107 @@ +module aave_pool::coin_migrator { + use std::signer; + use std::option; + use std::string::String; + use aptos_std::type_info::Self; + use aptos_framework::fungible_asset::Self; + use aptos_framework::primary_fungible_store; + use aptos_framework::object; + use aptos_framework::coin::{Self}; + use aptos_framework::event; + use aave_config::error_config; + + #[event] + struct CointToFaConvertion has store, drop { + user: address, + amount: u64, + name: String, + symbol: String, + decimals: u8, + coin_address: address, + fa_address: address + } + + #[event] + struct FaToCointConvertion has store, drop { + user: address, + amount: u64, + name: String, + symbol: String, + decimals: u8, + coin_address: address, + fa_address: address + } + + public entry fun coin_to_fa(account: &signer, amount: u64) { + assert!( + coin::balance(signer::address_of(account)) >= amount, + error_config::get_einsufficient_coins_to_wrap() + ); + let coin_type = type_info::type_of(); + let coin_to_wrap = coin::withdraw(account, amount); + let wrapped_fa = coin::coin_to_fungible_asset(coin_to_wrap); + let wrapped_fa_meta = fungible_asset::metadata_from_asset(&wrapped_fa); + let wrapped_fa_address = object::object_address(&wrapped_fa_meta); + let account_wallet = + primary_fungible_store::ensure_primary_store_exists( + signer::address_of(account), wrapped_fa_meta + ); + fungible_asset::deposit(account_wallet, wrapped_fa); + + event::emit( + CointToFaConvertion { + user: signer::address_of(account), + amount, + name: fungible_asset::name(wrapped_fa_meta), + symbol: fungible_asset::symbol(wrapped_fa_meta), + decimals: fungible_asset::decimals(wrapped_fa_meta), + coin_address: type_info::account_address(&coin_type), + fa_address: wrapped_fa_address + } + ); + } + + public entry fun fa_to_coin(user: &signer, amount: u64) { + let coin_type = type_info::type_of(); + let wrapped_fa_meta = coin::paired_metadata(); + assert!( + option::is_some(&wrapped_fa_meta), + error_config::get_eunmapped_coin_to_fa() + ); + let wrapped_fa_meta = option::destroy_some(wrapped_fa_meta); + let user_fa_store = + primary_fungible_store::ensure_primary_store_exists( + signer::address_of(user), wrapped_fa_meta + ); + assert!( + fungible_asset::balance(user_fa_store) >= amount, + error_config::get_einsufficient_fas_to_unwrap() + ); + let wrapped_fa_address = object::object_address(&wrapped_fa_meta); + let withdrawn_coins = coin::withdraw(user, amount); + coin::deposit(signer::address_of(user), withdrawn_coins); + + event::emit( + FaToCointConvertion { + user: signer::address_of(user), + amount, + name: fungible_asset::name(wrapped_fa_meta), + symbol: fungible_asset::symbol(wrapped_fa_meta), + decimals: fungible_asset::decimals(wrapped_fa_meta), + coin_address: type_info::account_address(&coin_type), + fa_address: wrapped_fa_address + } + ); + } + + #[view] + public fun get_fa_address(): address { + let wrapped_fa_meta = coin::paired_metadata(); + assert!( + option::is_some(&wrapped_fa_meta), + error_config::get_eunmapped_coin_to_fa() + ); + let wrapped_fa_meta = option::destroy_some(wrapped_fa_meta); + object::object_address(&wrapped_fa_meta) + } +} diff --git a/aave-core/sources/aave-periphery/coin_wrapper.move b/aave-core/sources/aave-periphery/coin_wrapper.move index d526174..4b1c2f6 100644 --- a/aave-core/sources/aave-periphery/coin_wrapper.move +++ b/aave-core/sources/aave-periphery/coin_wrapper.move @@ -22,7 +22,7 @@ module aave_pool::coin_wrapper { // Reference to the metadata object. metadata: Object, // Used during wrapping to mint the internal fungible assets. - mint_ref: MintRef, + mint_ref: MintRef } /// The resource stored in the main resource account to track all the fungible asset wrappers. @@ -36,7 +36,7 @@ module aave_pool::coin_wrapper { // corresponding fungible asset wrapper. coin_to_fungible_asset: SmartTable, // Map from a fungible asset wrapper to the original coin type. - fungible_asset_to_coin: SmartTable, String>, + fungible_asset_to_coin: SmartTable, String> } /// Create the coin wrapper account to host all the deposited coins. @@ -54,8 +54,8 @@ module aave_pool::coin_wrapper { WrapperAccount { signer_cap, coin_to_fungible_asset: smart_table::new(), - fungible_asset_to_coin: smart_table::new(), - }, + fungible_asset_to_coin: smart_table::new() + } ); } @@ -153,9 +153,7 @@ module aave_pool::coin_wrapper { &account::create_signer_with_capability(&wrapper_account.signer_cap); if (!smart_table::contains(coin_to_fungible_asset, coin_type)) { let metadata_constructor_ref = - &object::create_named_object( - wrapper_signer, *string::bytes(&coin_type) - ); + &object::create_named_object(wrapper_signer, *string::bytes(&coin_type)); primary_fungible_store::create_primary_store_enabled_fungible_asset( metadata_constructor_ref, option::none(), @@ -163,19 +161,17 @@ module aave_pool::coin_wrapper { coin::symbol(), coin::decimals(), string::utf8(b""), - string::utf8(b""), + string::utf8(b"") ); let mint_ref = fungible_asset::generate_mint_ref(metadata_constructor_ref); let burn_ref = fungible_asset::generate_burn_ref(metadata_constructor_ref); let metadata = - object::object_from_constructor_ref( - metadata_constructor_ref - ); + object::object_from_constructor_ref(metadata_constructor_ref); smart_table::add( coin_to_fungible_asset, coin_type, - FungibleAssetData { metadata, mint_ref, burn_ref, }, + FungibleAssetData { metadata, mint_ref, burn_ref } ); smart_table::add( &mut wrapper_account.fungible_asset_to_coin, metadata, coin_type diff --git a/aave-core/sources/aave-periphery/collector.move b/aave-core/sources/aave-periphery/collector.move index e3d2940..e449805 100644 --- a/aave-core/sources/aave-periphery/collector.move +++ b/aave-core/sources/aave-periphery/collector.move @@ -27,7 +27,7 @@ module aave_pool::collector { // this smart table only keeps track of objects references (does not store them) fungible_assets: SmartTable, Object>, extend_ref: ObjExtendRef, - transfer_ref: ObjectTransferRef, + transfer_ref: ObjectTransferRef } fun is_funds_admin(account: address) { @@ -52,8 +52,8 @@ module aave_pool::collector { CollectorData { fungible_assets: smart_table::new, Object>(), transfer_ref: object::generate_transfer_ref(state_object_constructor_ref), - extend_ref: object::generate_extend_ref(state_object_constructor_ref), - }, + extend_ref: object::generate_extend_ref(state_object_constructor_ref) + } ); } @@ -107,7 +107,7 @@ module aave_pool::collector { smart_table::upsert( &mut collector_data.fungible_assets, asset_metadata, - collector_fungible_store, + collector_fungible_store ); } else { let collector_fungible_store = @@ -117,7 +117,10 @@ module aave_pool::collector { } public fun withdraw( - sender: &signer, asset_metadata: Object, receiver: address, amount: u64 + sender: &signer, + asset_metadata: Object, + receiver: address, + amount: u64 ) acquires CollectorData { // check sender is the fund admin is_funds_admin(signer::address_of(sender)); @@ -141,7 +144,7 @@ module aave_pool::collector { &collector_fungible_store_signer, *collector_fungible_store, receiver_fungible_store, - amount, + amount ); } } diff --git a/aave-core/sources/aave-periphery/eac_aggregator_proxy.move b/aave-core/sources/aave-periphery/eac_aggregator_proxy.move index 95ff733..8c85ad4 100644 --- a/aave-core/sources/aave-periphery/eac_aggregator_proxy.move +++ b/aave-core/sources/aave-periphery/eac_aggregator_proxy.move @@ -5,7 +5,7 @@ module aave_pool::eac_aggregator_proxy { struct AnswerUpdated has store, drop { current: u256, round_id: u256, - timestamp: u256, + timestamp: u256 } #[event] @@ -41,4 +41,53 @@ module aave_pool::eac_aggregator_proxy { public fun create_eac_aggregator_proxy(): MockEacAggregatorProxy { MockEacAggregatorProxy {} } + + #[test_only] + const TEST_SUCCESS: u64 = 1; + #[test_only] + const TEST_FAILED: u64 = 2; + + #[test()] + fun test_decimals() { + // check the decimals which should now be 0 + assert!(decimals() == 0, TEST_SUCCESS); + } + + #[test()] + fun test_latest_answer() { + // check the latest_answer which should now be 0 + assert!(latest_answer() == 0, TEST_SUCCESS); + } + + #[test()] + fun test_latest_timestamp() { + // check the latest_timestamp which should now be 0 + assert!(latest_timestamp() == 0, TEST_SUCCESS); + } + + #[test()] + fun test_latest_round() { + // check the latest_round which should now be 0 + assert!(latest_round() == 0, TEST_SUCCESS); + } + + #[test()] + fun test_get_answer() { + let round_id = 0; + // check the get_answer which should now be 0 + assert!(get_answer(round_id) == 0, TEST_SUCCESS); + } + + #[test()] + fun test_get_timestamp() { + let round_id = 0; + // check the get_timestamp which should now be 0 + assert!(get_timestamp(round_id) == 0, TEST_SUCCESS); + } + + #[test()] + fun test_create_eac_aggregator_proxy() { + // check the create_eac_aggregator_proxy which should now return MockEacAggregatorProxy {} + assert!(create_eac_aggregator_proxy() == MockEacAggregatorProxy {}, TEST_SUCCESS); + } } diff --git a/aave-core/sources/aave-periphery/ecosystem_reserve_v2.move b/aave-core/sources/aave-periphery/ecosystem_reserve_v2.move index 6c32752..a387fa5 100644 --- a/aave-core/sources/aave-periphery/ecosystem_reserve_v2.move +++ b/aave-core/sources/aave-periphery/ecosystem_reserve_v2.move @@ -2,13 +2,12 @@ module aave_pool::ecosystem_reserve_v2 { use std::signer; use aptos_std::smart_table::{Self, SmartTable}; use aptos_framework::event; - use aptos_framework::object::{Self, Object,}; + use aptos_framework::object::{Self, Object}; use aptos_framework::timestamp; use aave_acl::acl_manage::Self; use aave_pool::admin_controlled_ecosystem_reserve::check_is_funds_admin; - use aave_pool::mock_underlying_token_factory; use aave_pool::stream::{Self, Stream}; #[test_only] @@ -33,7 +32,7 @@ module aave_pool::ecosystem_reserve_v2 { struct EcosystemReserveV2Data has key { next_stream_id: u256, - streams: SmartTable, + streams: SmartTable } #[event] @@ -44,14 +43,14 @@ module aave_pool::ecosystem_reserve_v2 { deposit: u256, token_address: address, start_time: u256, - stop_time: u256, + stop_time: u256 } #[event] struct WithdrawFromStream has store, drop { stream_id: u256, recipient: address, - amount: u256, + amount: u256 } #[event] @@ -60,13 +59,13 @@ module aave_pool::ecosystem_reserve_v2 { sender: address, recipient: address, sender_balance: u256, - recipient_balance: u256, + recipient_balance: u256 } fun only_admin_or_recipient(account: address, stream_id: u256) acquires EcosystemReserveV2Data { assert!( acl_manage::is_funds_admin(account) || is_recipient(account, stream_id), - NOT_FUNDS_ADMIN, + NOT_FUNDS_ADMIN ); } @@ -90,7 +89,7 @@ module aave_pool::ecosystem_reserve_v2 { assert!( smart_table::contains(&ecosystem_reserve_v2_data.streams, stream_id), - ESTREAM_NOT_EXISTS, + ESTREAM_NOT_EXISTS ); let stream_item = smart_table::borrow(&ecosystem_reserve_v2_data.streams, stream_id); @@ -103,7 +102,7 @@ module aave_pool::ecosystem_reserve_v2 { ecosystem_reserve_v2_data.next_stream_id } - public fun initialize(sender: &signer,) { + public fun initialize(sender: &signer) { let state_object_constructor_ref = &object::create_named_object(sender, ECOSYSTEM_RESERVE_V2_NAME); let state_object_signer = &object::generate_signer(state_object_constructor_ref); @@ -112,8 +111,8 @@ module aave_pool::ecosystem_reserve_v2 { state_object_signer, EcosystemReserveV2Data { streams: smart_table::new(), - next_stream_id: 1, - }, + next_stream_id: 1 + } ); } @@ -129,7 +128,9 @@ module aave_pool::ecosystem_reserve_v2 { ) } - fun get_stream(stream_id: u256): (address, address, u256, address, u256, u256, u256, u256) acquires EcosystemReserveV2Data { + fun get_stream( + stream_id: u256 + ): (address, address, u256, address, u256, u256, u256, u256) acquires EcosystemReserveV2Data { stream_exists(stream_id); let ecosystem_reserve_v2_data = @@ -205,7 +206,7 @@ module aave_pool::ecosystem_reserve_v2 { assert!( recipient != ecosystem_reserve_v2_data_address(), - ESTREAM_TO_THE_CONTRACT_ITSELF, + ESTREAM_TO_THE_CONTRACT_ITSELF ); assert!(recipient != signer::address_of(sender), ESTREAM_TO_THE_CALLER); assert!(deposit > 0, EDEPOSIT_IS_ZERO); @@ -217,7 +218,10 @@ module aave_pool::ecosystem_reserve_v2 { assert!(deposit >= duration, EDEPOSIT_SMALLER_THAN_TIME_DELTA); - assert!(deposit % duration == 0, EDEPOSIT_NOT_MULTIPLE_OF_TIME_DELTA); + assert!( + deposit % duration == 0, + EDEPOSIT_NOT_MULTIPLE_OF_TIME_DELTA + ); let rate_per_second = deposit / duration; @@ -237,7 +241,7 @@ module aave_pool::ecosystem_reserve_v2 { recipient, signer::address_of(sender), token_address, - true, + true ); smart_table::upsert( @@ -256,7 +260,7 @@ module aave_pool::ecosystem_reserve_v2 { token_address, start_time, stop_time - }, + } ); stream_id @@ -296,7 +300,7 @@ module aave_pool::ecosystem_reserve_v2 { smart_table::remove(&mut ecosystem_reserve_v2_data.streams, stream_id); }; - event::emit(WithdrawFromStream { stream_id, recipient, amount, }); + event::emit(WithdrawFromStream { stream_id, recipient, amount }); true } @@ -309,7 +313,7 @@ module aave_pool::ecosystem_reserve_v2 { let stream_item = smart_table::borrow(&ecosystem_reserve_v2_data.streams, stream_id); - let (stream_sender, recipient, _, token_address, _, _, _, _) = + let (stream_sender, recipient, _, _token_address, _, _, _, _) = stream::get_stream(stream_item); let sender_balance = balance_of(stream_id, stream_sender); @@ -323,12 +327,12 @@ module aave_pool::ecosystem_reserve_v2 { smart_table::remove(&mut ecosystem_reserve_v2_data.streams, stream_id); if (recipient_balance > 0) { - mock_underlying_token_factory::transfer_from( - stream_sender, - recipient, - (recipient_balance as u64), - token_address, - ); + // mock_underlying_token_factory::transfer_from( + // stream_sender, + // recipient, + // (recipient_balance as u64), + // token_address + // ); }; event::emit( @@ -337,8 +341,8 @@ module aave_pool::ecosystem_reserve_v2 { sender: stream_sender, recipient, sender_balance, - recipient_balance, - }, + recipient_balance + } ); true @@ -347,13 +351,21 @@ module aave_pool::ecosystem_reserve_v2 { const TEST_SUCCESS: u64 = 1; const TEST_FAILED: u64 = 2; - #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, acl_fund_admin = @0x111, user_account = @0x222, creator = @0x1)] + #[ + test( + aave_role_super_admin = @aave_acl, + periphery_account = @aave_pool, + acl_fund_admin = @0x111, + user_account = @0x222, + creator = @0x1 + ) + ] fun test_basic_flow( aave_role_super_admin: &signer, periphery_account: &signer, acl_fund_admin: &signer, user_account: &signer, - creator: &signer, + creator: &signer ) acquires EcosystemReserveV2Data { // init acl acl_manage::test_init_module(aave_role_super_admin); @@ -367,13 +379,13 @@ module aave_pool::ecosystem_reserve_v2 { let _ts_one_hour_ago = timestamp::now_seconds() - one_hour_in_secs; // set fund admin - acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin_role( + acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin( aave_role_super_admin, signer::address_of(acl_fund_admin) ); // assert role is granted acl_manage::is_funds_admin(signer::address_of(acl_fund_admin)); - acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin_role( + acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin( aave_role_super_admin, signer::address_of(periphery_account) ); @@ -396,19 +408,27 @@ module aave_pool::ecosystem_reserve_v2 { deposit, token_address, start_time, - stop_time, + stop_time ); assert!(stream_id == 1, TEST_SUCCESS); } - #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, acl_fund_admin = @0x111, user_account = @0x222, creator = @0x1)] + #[ + test( + aave_role_super_admin = @aave_acl, + periphery_account = @aave_pool, + acl_fund_admin = @0x111, + user_account = @0x222, + creator = @0x1 + ) + ] fun test_only_admin_or_recipient( aave_role_super_admin: &signer, periphery_account: &signer, acl_fund_admin: &signer, user_account: &signer, - creator: &signer, + creator: &signer ) acquires EcosystemReserveV2Data { // init acl acl_manage::test_init_module(aave_role_super_admin); @@ -422,13 +442,13 @@ module aave_pool::ecosystem_reserve_v2 { let _ts_one_hour_ago = timestamp::now_seconds() - one_hour_in_secs; // set fund admin - acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin_role( + acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin( aave_role_super_admin, signer::address_of(acl_fund_admin) ); // assert role is granted acl_manage::is_funds_admin(signer::address_of(acl_fund_admin)); - acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin_role( + acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin( aave_role_super_admin, signer::address_of(periphery_account) ); @@ -451,7 +471,7 @@ module aave_pool::ecosystem_reserve_v2 { deposit, token_address, start_time, - stop_time, + stop_time ); assert!(stream_id == 1, TEST_SUCCESS); @@ -459,13 +479,21 @@ module aave_pool::ecosystem_reserve_v2 { only_admin_or_recipient(token_address, 1); } - #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, acl_fund_admin = @0x111, user_account = @0x222, creator = @0x1)] + #[ + test( + aave_role_super_admin = @aave_acl, + periphery_account = @aave_pool, + acl_fund_admin = @0x111, + user_account = @0x222, + creator = @0x1 + ) + ] fun test_cancel_stream( aave_role_super_admin: &signer, periphery_account: &signer, acl_fund_admin: &signer, user_account: &signer, - creator: &signer, + creator: &signer ) acquires EcosystemReserveV2Data { // init acl acl_manage::test_init_module(aave_role_super_admin); @@ -479,13 +507,13 @@ module aave_pool::ecosystem_reserve_v2 { let _ts_one_hour_ago = timestamp::now_seconds() - one_hour_in_secs; // set fund admin - acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin_role( + acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin( aave_role_super_admin, signer::address_of(acl_fund_admin) ); // assert role is granted acl_manage::is_funds_admin(signer::address_of(acl_fund_admin)); - acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin_role( + acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin( aave_role_super_admin, signer::address_of(periphery_account) ); @@ -508,7 +536,7 @@ module aave_pool::ecosystem_reserve_v2 { deposit, token_address, start_time, - stop_time, + stop_time ); assert!(stream_id == 1, 1); @@ -516,13 +544,21 @@ module aave_pool::ecosystem_reserve_v2 { cancel_stream(periphery_account, stream_id); } - #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, acl_fund_admin = @0x111, user_account = @0x222, creator = @0x1)] + #[ + test( + aave_role_super_admin = @aave_acl, + periphery_account = @aave_pool, + acl_fund_admin = @0x111, + user_account = @0x222, + creator = @0x1 + ) + ] fun test_balance_of( aave_role_super_admin: &signer, periphery_account: &signer, acl_fund_admin: &signer, user_account: &signer, - creator: &signer, + creator: &signer ) acquires EcosystemReserveV2Data { // init acl acl_manage::test_init_module(aave_role_super_admin); @@ -536,13 +572,13 @@ module aave_pool::ecosystem_reserve_v2 { let _ts_one_hour_ago = timestamp::now_seconds() - one_hour_in_secs; // set fund admin - acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin_role( + acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin( aave_role_super_admin, signer::address_of(acl_fund_admin) ); // assert role is granted acl_manage::is_funds_admin(signer::address_of(acl_fund_admin)); - acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin_role( + acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin( aave_role_super_admin, signer::address_of(periphery_account) ); @@ -565,7 +601,7 @@ module aave_pool::ecosystem_reserve_v2 { deposit, token_address, start_time, - stop_time, + stop_time ); assert!(stream_id == 1, 1); @@ -576,13 +612,21 @@ module aave_pool::ecosystem_reserve_v2 { assert!(res == 7200, 1); } - #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, acl_fund_admin = @0x111, user_account = @0x222, creator = @0x1)] + #[ + test( + aave_role_super_admin = @aave_acl, + periphery_account = @aave_pool, + acl_fund_admin = @0x111, + user_account = @0x222, + creator = @0x1 + ) + ] fun test_withdraw_from_stream( aave_role_super_admin: &signer, periphery_account: &signer, acl_fund_admin: &signer, user_account: &signer, - creator: &signer, + creator: &signer ) acquires EcosystemReserveV2Data { // init acl acl_manage::test_init_module(aave_role_super_admin); @@ -596,13 +640,13 @@ module aave_pool::ecosystem_reserve_v2 { let _ts_one_hour_ago = timestamp::now_seconds() - one_hour_in_secs; // set fund admin - acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin_role( + acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin( aave_role_super_admin, signer::address_of(acl_fund_admin) ); // assert role is granted acl_manage::is_funds_admin(signer::address_of(acl_fund_admin)); - acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin_role( + acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin( aave_role_super_admin, signer::address_of(periphery_account) ); @@ -625,7 +669,7 @@ module aave_pool::ecosystem_reserve_v2 { deposit, token_address, start_time, - stop_time, + stop_time ); assert!(stream_id == 1, 1); @@ -638,13 +682,21 @@ module aave_pool::ecosystem_reserve_v2 { assert!(res == true, 1); } - #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, acl_fund_admin = @0x111, user_account = @0x222, creator = @0x1)] + #[ + test( + aave_role_super_admin = @aave_acl, + periphery_account = @aave_pool, + acl_fund_admin = @0x111, + user_account = @0x222, + creator = @0x1 + ) + ] fun test_get_stream( aave_role_super_admin: &signer, periphery_account: &signer, acl_fund_admin: &signer, user_account: &signer, - creator: &signer, + creator: &signer ) acquires EcosystemReserveV2Data { // init acl acl_manage::test_init_module(aave_role_super_admin); @@ -658,13 +710,13 @@ module aave_pool::ecosystem_reserve_v2 { let _ts_one_hour_ago = timestamp::now_seconds() - one_hour_in_secs; // set fund admin - acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin_role( + acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin( aave_role_super_admin, signer::address_of(acl_fund_admin) ); // assert role is granted acl_manage::is_funds_admin(signer::address_of(acl_fund_admin)); - acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin_role( + acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin( aave_role_super_admin, signer::address_of(periphery_account) ); @@ -687,7 +739,7 @@ module aave_pool::ecosystem_reserve_v2 { deposit, token_address, start_time, - stop_time, + stop_time ); assert!(stream_id == 1, 1); @@ -713,13 +765,21 @@ module aave_pool::ecosystem_reserve_v2 { assert!(stream_rate_per_second == 2, 1); } - #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, acl_fund_admin = @0x111, user_account = @0x222, creator = @0x1)] + #[ + test( + aave_role_super_admin = @aave_acl, + periphery_account = @aave_pool, + acl_fund_admin = @0x111, + user_account = @0x222, + creator = @0x1 + ) + ] fun test_delta_of( aave_role_super_admin: &signer, periphery_account: &signer, acl_fund_admin: &signer, user_account: &signer, - creator: &signer, + creator: &signer ) acquires EcosystemReserveV2Data { // init acl acl_manage::test_init_module(aave_role_super_admin); @@ -733,13 +793,13 @@ module aave_pool::ecosystem_reserve_v2 { let _ts_one_hour_ago = timestamp::now_seconds() - one_hour_in_secs; // set fund admin - acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin_role( + acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin( aave_role_super_admin, signer::address_of(acl_fund_admin) ); // assert role is granted acl_manage::is_funds_admin(signer::address_of(acl_fund_admin)); - acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin_role( + acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin( aave_role_super_admin, signer::address_of(periphery_account) ); @@ -762,7 +822,7 @@ module aave_pool::ecosystem_reserve_v2 { deposit, token_address, start_time, - stop_time, + stop_time ); assert!(stream_id == 1, 1); @@ -776,13 +836,21 @@ module aave_pool::ecosystem_reserve_v2 { assert!(res == 3600, 1); } - #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, acl_fund_admin = @0x111, user_account = @0x222, creator = @0x1)] + #[ + test( + aave_role_super_admin = @aave_acl, + periphery_account = @aave_pool, + acl_fund_admin = @0x111, + user_account = @0x222, + creator = @0x1 + ) + ] fun test_get_next_stream_id( aave_role_super_admin: &signer, periphery_account: &signer, acl_fund_admin: &signer, user_account: &signer, - creator: &signer, + creator: &signer ) acquires EcosystemReserveV2Data { // init acl acl_manage::test_init_module(aave_role_super_admin); @@ -796,13 +864,13 @@ module aave_pool::ecosystem_reserve_v2 { let _ts_one_hour_ago = timestamp::now_seconds() - one_hour_in_secs; // set fund admin - acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin_role( + acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin( aave_role_super_admin, signer::address_of(acl_fund_admin) ); // assert role is granted acl_manage::is_funds_admin(signer::address_of(acl_fund_admin)); - acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin_role( + acl_manage::add_admin_controlled_ecosystem_reserve_funds_admin( aave_role_super_admin, signer::address_of(periphery_account) ); @@ -825,7 +893,7 @@ module aave_pool::ecosystem_reserve_v2 { deposit, token_address, start_time, - stop_time, + stop_time ); assert!(stream_id == 1, 1); diff --git a/aave-core/sources/aave-periphery/emission_manager.move b/aave-core/sources/aave-periphery/emission_manager.move index 4945714..8cf14bf 100644 --- a/aave-core/sources/aave-periphery/emission_manager.move +++ b/aave-core/sources/aave-periphery/emission_manager.move @@ -8,9 +8,9 @@ module aave_pool::emission_manager { ExtendRef as ObjExtendRef, Object, ObjectGroup, - TransferRef as ObjectTransferRef, + TransferRef as ObjectTransferRef }; - use aave_mock_oracle::oracle::RewardOracle; + use aave_oracle::reward_oracle::RewardOracle; use aave_pool::rewards_controller::Self; use aave_pool::transfer_strategy::{ check_is_emission_admin, @@ -31,7 +31,7 @@ module aave_pool::emission_manager { emission_admins: SmartTable, extend_ref: ObjExtendRef, transfer_ref: ObjectTransferRef, - rewards_controller: address, + rewards_controller: address } #[event] @@ -45,7 +45,7 @@ module aave_pool::emission_manager { assert!(account == @aave_acl, ENOT_MANAGEMENT); } - public fun initialize(sender: &signer, rewards_controller: address,) { + public fun initialize(sender: &signer, rewards_controller: address) { let state_object_constructor_ref = &object::create_named_object(sender, EMISSION_MANAGER_NAME); let state_object_signer = &object::generate_signer(state_object_constructor_ref); @@ -56,8 +56,8 @@ module aave_pool::emission_manager { emission_admins: smart_table::new(), transfer_ref: object::generate_transfer_ref(state_object_constructor_ref), extend_ref: object::generate_extend_ref(state_object_constructor_ref), - rewards_controller, - }, + rewards_controller + } ); } @@ -82,7 +82,7 @@ module aave_pool::emission_manager { assert!( *smart_table::borrow(&emission_manager_data.emission_admins, reward) == signer::address_of(account), - ONLY_EMISSION_ADMIN, + ONLY_EMISSION_ADMIN ); }; rewards_controller::configure_assets( @@ -93,7 +93,7 @@ module aave_pool::emission_manager { public fun set_pull_rewards_transfer_strategy( caller: &signer, reward: address, - pull_rewards_transfer_strategy: PullRewardsTransferStrategy, + pull_rewards_transfer_strategy: PullRewardsTransferStrategy ) acquires EmissionManagerData { check_is_emission_admin(reward); @@ -103,14 +103,14 @@ module aave_pool::emission_manager { caller, reward, pull_rewards_transfer_strategy, - emission_manager_data.rewards_controller, + emission_manager_data.rewards_controller ); } public fun set_staked_token_transfer_strategy( caller: &signer, reward: address, - staked_token_transfer_strategy: StakedTokenTransferStrategy, + staked_token_transfer_strategy: StakedTokenTransferStrategy ) acquires EmissionManagerData { check_is_emission_admin(reward); @@ -120,7 +120,7 @@ module aave_pool::emission_manager { caller, reward, staked_token_transfer_strategy, - emission_manager_data.rewards_controller, + emission_manager_data.rewards_controller ); } @@ -134,12 +134,15 @@ module aave_pool::emission_manager { caller, reward, reward_oracle, - emission_manager_data.rewards_controller, + emission_manager_data.rewards_controller ); } public fun set_distribution_end( - caller: &signer, asset: address, reward: address, new_distribution_end: u32 + caller: &signer, + asset: address, + reward: address, + new_distribution_end: u32 ) acquires EmissionManagerData { check_is_emission_admin(reward); @@ -150,7 +153,7 @@ module aave_pool::emission_manager { asset, reward, new_distribution_end, - emission_manager_data.rewards_controller, + emission_manager_data.rewards_controller ); } @@ -158,7 +161,7 @@ module aave_pool::emission_manager { caller: &signer, asset: address, rewards: vector
, - new_emissions_per_second: vector, + new_emissions_per_second: vector ) acquires EmissionManagerData { let emission_manager_data = borrow_global_mut(emission_manager_address()); @@ -166,9 +169,9 @@ module aave_pool::emission_manager { assert!( *smart_table::borrow( &emission_manager_data.emission_admins, - *vector::borrow(&rewards, i), + *vector::borrow(&rewards, i) ) == signer::address_of(caller), - ONLY_EMISSION_ADMIN, + ONLY_EMISSION_ADMIN ); }; rewards_controller::set_emission_per_second( @@ -176,7 +179,7 @@ module aave_pool::emission_manager { asset, rewards, new_emissions_per_second, - emission_manager_data.rewards_controller, + emission_manager_data.rewards_controller ); } @@ -200,8 +203,12 @@ module aave_pool::emission_manager { borrow_global_mut(emission_manager_address()); let old_admin = - *smart_table::borrow(&emission_manager_data.emission_admins, reward); - smart_table::upsert(&mut emission_manager_data.emission_admins, reward, new_admin); + *smart_table::borrow_with_default( + &emission_manager_data.emission_admins, reward, &new_admin + ); + smart_table::upsert( + &mut emission_manager_data.emission_admins, reward, new_admin + ); event::emit(EmissionAdminUpdated { reward, old_admin, new_admin }); } diff --git a/aave-core/sources/aave-periphery/package-manager.move b/aave-core/sources/aave-periphery/package-manager.move index 72f6383..6011d55 100644 --- a/aave-core/sources/aave-periphery/package-manager.move +++ b/aave-core/sources/aave-periphery/package-manager.move @@ -1,37 +1,58 @@ module aave_pool::package_manager { use aptos_framework::account::{Self, SignerCapability}; - use aptos_framework::resource_account; + use std::string::{Self, String}; use aptos_std::smart_table::{Self, SmartTable}; - use std::string::String; + use aptos_framework::object::Self; friend aave_pool::coin_wrapper; + const PACKAGE_MANAGER: vector = b"PACKAGE_MANAGER"; + /// Stores permission config such as SignerCapability for controlling the resource account. struct PermissionConfig has key { /// Required to obtain the resource account signer. signer_cap: SignerCapability, /// Track the addresses created by the modules in this package. - addresses: SmartTable, + addresses: SmartTable } /// Initialize PermissionConfig to establish control over the resource account. /// This function is invoked only when this package is deployed the first time. fun initialize(sender: &signer) { - let signer_cap = - resource_account::retrieve_resource_account_cap(sender, @deployer_pm); - initialize_helper(sender, signer_cap); + let state_object_constructor_ref = + &object::create_named_object(sender, PACKAGE_MANAGER); + let state_object_signer = &object::generate_signer(state_object_constructor_ref); + let seed = *string::bytes(&string::utf8(PACKAGE_MANAGER)); + let (_resource_signer, signer_cap) = + account::create_resource_account(sender, seed); + + initialize_helper(state_object_signer, signer_cap); + } + + #[view] + public fun package_manager_address(): address { + object::create_object_address(&@aave_pool, PACKAGE_MANAGER) + } + + fun get_resource_account_signer(): signer acquires PermissionConfig { + let oracle_data = borrow_global(package_manager_address()); + account::create_signer_with_capability(&oracle_data.signer_cap) } fun initialize_helper(sender: &signer, signer_cap: SignerCapability) { move_to( sender, - PermissionConfig { addresses: smart_table::new(), signer_cap, }, + PermissionConfig { + addresses: smart_table::new(), + signer_cap + } ); } /// Can be called by friended modules to obtain the resource account signer. public(friend) fun get_signer(): signer acquires PermissionConfig { - let signer_cap = &borrow_global(@resource_pm).signer_cap; + let signer_cap = + &borrow_global(package_manager_address()).signer_cap; account::create_signer_with_capability(signer_cap) } @@ -42,7 +63,8 @@ module aave_pool::package_manager { /// Can be called by friended modules to keep track of a system address. public(friend) fun add_address(name: String, object: address) acquires PermissionConfig { - let addresses = &mut borrow_global_mut(@resource_pm).addresses; + let addresses = + &mut borrow_global_mut(package_manager_address()).addresses; smart_table::add(addresses, name, object); } @@ -56,7 +78,8 @@ module aave_pool::package_manager { } public(friend) fun get_address(name: String): address acquires PermissionConfig { - let addresses = &borrow_global(@resource_pm).addresses; + let addresses = + &borrow_global(package_manager_address()).addresses; *smart_table::borrow(addresses, name) } @@ -66,7 +89,7 @@ module aave_pool::package_manager { } inline fun safe_permission_config(): &PermissionConfig acquires PermissionConfig { - borrow_global(@resource_pm) + borrow_global(package_manager_address()) } #[test_only] diff --git a/aave-core/sources/aave-periphery/rewards_controller.move b/aave-core/sources/aave-periphery/rewards_controller.move index 93887cc..4e865c2 100644 --- a/aave-core/sources/aave-periphery/rewards_controller.move +++ b/aave-core/sources/aave-periphery/rewards_controller.move @@ -9,7 +9,7 @@ module aave_pool::rewards_controller { use aave_acl::acl_manage::Self; use aave_math::math_utils; - use aave_mock_oracle::oracle::{Self, RewardOracle}; + use aave_oracle::reward_oracle::{Self, RewardOracle}; use aave_pool::a_token_factory; use aave_pool::transfer_strategy::check_is_emission_admin; @@ -52,17 +52,17 @@ module aave_pool::rewards_controller { assets: SmartTable, is_reward_enabled: SmartTable, rewards_list: vector
, - assets_list: vector
, + assets_list: vector
} fun assert_access(account: address) { assert!( - acl_manage::is_rewards_controller_admin_role(account), - NOT_REWARDS_CONTROLLER_ADMIN, + acl_manage::is_rewards_controller_admin(account), + NOT_REWARDS_CONTROLLER_ADMIN ); } - public fun initialize(sender: &signer, emission_manager: address,) { + public fun initialize(sender: &signer, emission_manager: address) { let state_object_constructor_ref = &object::create_named_object(sender, REWARDS_CONTROLLER_NAME); let state_object_signer = &object::generate_signer(state_object_constructor_ref); @@ -78,8 +78,8 @@ module aave_pool::rewards_controller { assets: smart_table::new(), is_reward_enabled: smart_table::new(), rewards_list: vector[], - assets_list: vector[], - }, + assets_list: vector[] + } ); } @@ -99,12 +99,28 @@ module aave_pool::rewards_controller { AssetData { rewards, available_rewards, available_rewards_count, decimals } } - struct RewardData has key, store, drop { + struct RewardData has key, store, drop, copy { index: u128, emission_per_second: u128, last_update_timestamp: u32, distribution_end: u32, - users_data: std::simple_map::SimpleMap, + users_data: std::simple_map::SimpleMap + } + + public fun create_reward_data( + index: u128, + emission_per_second: u128, + last_update_timestamp: u32, + distribution_end: u32, + users_data: std::simple_map::SimpleMap + ): RewardData { + RewardData { + index, + emission_per_second, + last_update_timestamp, + distribution_end, + users_data + } } struct UserData has key, store, copy, drop { @@ -112,6 +128,11 @@ module aave_pool::rewards_controller { accrued: u128 } + #[test_only] + public fun create_user_data(index: u128, accrued: u128): UserData { + UserData { index, accrued } + } + struct UserAssetBalance has store, drop, copy { asset: address, user_balance: u256, @@ -186,10 +207,29 @@ module aave_pool::rewards_controller { claimer: address, user: address, rewards_controller_address: address ) acquires RewardsControllerData { assert!( - get_claimer(user, rewards_controller_address) == claimer, CLAIMER_UNAUTHORIZED + get_claimer(user, rewards_controller_address) == claimer, + CLAIMER_UNAUTHORIZED ); } + #[test_only] + public fun add_asset( + rewards_controller_address: address, asset_addr: address, asset: AssetData + ) acquires RewardsControllerData { + let rewards_controller_data = + borrow_global_mut(rewards_controller_address); + smart_table::add(&mut rewards_controller_data.assets, asset_addr, asset); + } + + #[test_only] + public fun enable_reward( + rewards_controller_address: address, reward: address + ) acquires RewardsControllerData { + let rewards_controller_data = + borrow_global_mut(rewards_controller_address); + smart_table::add(&mut rewards_controller_data.is_reward_enabled, reward, true); + } + #[view] public fun get_claimer( user: address, rewards_controller_address: address @@ -255,13 +295,13 @@ module aave_pool::rewards_controller { install_pull_rewards_transfer_strategy( reward, pull_rewards_transfer_strategy_get_strategy(config_el), - rewards_controller_address, + rewards_controller_address ); } else { install_staked_token_transfer_strategy( reward, staked_token_transfer_strategy_get_strategy(config_el), - rewards_controller_address, + rewards_controller_address ); }; @@ -271,7 +311,7 @@ module aave_pool::rewards_controller { aave_pool::transfer_strategy::get_reward_oracle( vector::borrow(&config, i) ), - rewards_controller_address, + rewards_controller_address ); }; configure_assets_internal(config, rewards_controller_address); @@ -312,6 +352,23 @@ module aave_pool::rewards_controller { set_reward_oracle_internal(reward, reward_oracle); } + #[test_only] + public fun test_handle_action( + caller: &signer, + user: address, + total_supply: u256, + user_balance: u256, + rewards_controller_address: address + ) acquires RewardsControllerData { + handle_action( + caller, + user, + total_supply, + user_balance, + rewards_controller_address + ) + } + fun handle_action( caller: &signer, user: address, @@ -320,7 +377,13 @@ module aave_pool::rewards_controller { rewards_controller_address: address ) acquires RewardsControllerData { let addr = signer::address_of(caller); - update_data(addr, user, user_balance, total_supply, rewards_controller_address); + update_data( + addr, + user, + user_balance, + total_supply, + rewards_controller_address + ); } public fun claim_rewards( @@ -340,7 +403,28 @@ module aave_pool::rewards_controller { addr, to, reward, - rewards_controller_address, + rewards_controller_address + ) + } + + #[test_only] + public fun test_claim_rewards_on_behalf( + caller: &signer, + assets: vector
, + amount: u256, + user: address, + to: address, + reward: address, + rewards_controller_address: address + ): u256 acquires RewardsControllerData { + claim_rewards_on_behalf( + caller, + assets, + amount, + user, + to, + reward, + rewards_controller_address ) } @@ -364,7 +448,24 @@ module aave_pool::rewards_controller { user, to, reward, - rewards_controller_address, + rewards_controller_address + ) + } + + #[test_only] + public fun test_claim_rewards_to_self( + caller: &signer, + assets: vector
, + amount: u256, + reward: address, + rewards_controller_address: address + ): u256 acquires RewardsControllerData { + claim_rewards_to_self( + caller, + assets, + amount, + reward, + rewards_controller_address ) } @@ -384,7 +485,7 @@ module aave_pool::rewards_controller { addr, addr, reward, - rewards_controller_address, + rewards_controller_address ) } @@ -401,7 +502,24 @@ module aave_pool::rewards_controller { addr, addr, to, - rewards_controller_address, + rewards_controller_address + ) + } + + #[test_only] + public fun test_claim_all_rewards_on_behalf( + caller: &signer, + assets: vector
, + user: address, + to: address, + rewards_controller_address: address + ): (vector
, vector) acquires RewardsControllerData { + claim_all_rewards_on_behalf( + caller, + assets, + user, + to, + rewards_controller_address ) } @@ -421,10 +539,17 @@ module aave_pool::rewards_controller { addr, user, to, - rewards_controller_address, + rewards_controller_address ) } + #[test_only] + public fun test_claim_all_rewards_to_self( + caller: &signer, assets: vector
, rewards_controller_address: address + ): (vector
, vector) acquires RewardsControllerData { + claim_all_rewards_to_self(caller, assets, rewards_controller_address) + } + fun claim_all_rewards_to_self( caller: &signer, assets: vector
, rewards_controller_address: address ): (vector
, vector) acquires RewardsControllerData { @@ -435,7 +560,7 @@ module aave_pool::rewards_controller { addr, addr, addr, - rewards_controller_address, + rewards_controller_address ) } @@ -452,8 +577,8 @@ module aave_pool::rewards_controller { event::emit(ClaimerSet { user, claimer }); } - fun get_user_asset_balances(assets: vector
, user: address) - : vector { + fun get_user_asset_balances(assets: vector
, user: address): + vector { let user_asset_balances = vector[]; for (i in 0..vector::length(&assets)) { let asset = *vector::borrow(&assets, i); @@ -462,7 +587,7 @@ module aave_pool::rewards_controller { vector::push_back( &mut user_asset_balances, - UserAssetBalance { asset, user_balance, total_supply }, + UserAssetBalance { asset, user_balance, total_supply } ); }; user_asset_balances @@ -486,7 +611,7 @@ module aave_pool::rewards_controller { update_data_multiple( user, get_user_asset_balances(assets, user), - rewards_controller_address, + rewards_controller_address ); let rewards_controller_data = @@ -518,28 +643,28 @@ module aave_pool::rewards_controller { }; if (smart_table::contains( - &rewards_controller_data.pull_rewards_transfer_strategy_table, reward - )) { + &rewards_controller_data.pull_rewards_transfer_strategy_table, reward + )) { transfer_pull_rewards_transfer_strategy_rewards( caller, to, reward, total_rewards, - rewards_controller_data, + rewards_controller_data ) } else if (smart_table::contains( - &rewards_controller_data.pull_rewards_transfer_strategy_table, reward - )) { + &rewards_controller_data.pull_rewards_transfer_strategy_table, reward + )) { transfer_staked_token_transfer_strategy_rewards( caller, to, reward, total_rewards, - rewards_controller_data, + rewards_controller_data ) }; event::emit( - RewardsClaimed { user, reward: claimer, to, claimer, amount: total_rewards }, + RewardsClaimed { user, reward: claimer, to, claimer, amount: total_rewards } ); total_rewards @@ -553,19 +678,19 @@ module aave_pool::rewards_controller { to: address, rewards_controller_address: address ): (vector
, vector) acquires RewardsControllerData { - let rewards_list = vector[]; - let claimed_amounts = vector[]; - update_data_multiple( user, get_user_asset_balances(assets, user), - rewards_controller_address, + rewards_controller_address ); let rewards_controller_data = borrow_global_mut(rewards_controller_address); let rewards_list_length = vector::length(&rewards_controller_data.rewards_list); + let rewards_list = rewards_controller_data.rewards_list; + let claimed_amounts = vector[]; + for (i in 0..vector::length(&assets)) { let asset = *vector::borrow(&assets, i); let asset_el = @@ -581,10 +706,15 @@ module aave_pool::rewards_controller { let reward_amount = (user_data.accrued as u256); if (reward_amount != 0) { - let claimed_amounts_j = *vector::borrow_mut(&mut claimed_amounts, j); - vector::insert( - &mut claimed_amounts, j, claimed_amounts_j + reward_amount - ); + if (vector::length(&claimed_amounts) > 0) { + let claimed_amounts_j = + *vector::borrow_mut(&mut claimed_amounts, j); + vector::insert( + &mut claimed_amounts, j, claimed_amounts_j + reward_amount + ); + } else { + vector::insert(&mut claimed_amounts, j, reward_amount); + }; user_data.accrued = 0; }; }; @@ -592,26 +722,26 @@ module aave_pool::rewards_controller { for (i in 0..rewards_list_length) { if (smart_table::contains( - &rewards_controller_data.pull_rewards_transfer_strategy_table, - *vector::borrow(&rewards_list, i), - )) { + &rewards_controller_data.pull_rewards_transfer_strategy_table, + *vector::borrow(&rewards_list, i) + )) { transfer_pull_rewards_transfer_strategy_rewards( caller, to, *vector::borrow(&rewards_list, i), *vector::borrow(&claimed_amounts, i), - rewards_controller_data, + rewards_controller_data ) } else if (smart_table::contains( - &rewards_controller_data.pull_rewards_transfer_strategy_table, - *vector::borrow(&rewards_list, i), - )) { + &rewards_controller_data.pull_rewards_transfer_strategy_table, + *vector::borrow(&rewards_list, i) + )) { transfer_staked_token_transfer_strategy_rewards( caller, to, *vector::borrow(&rewards_list, i), *vector::borrow(&claimed_amounts, i), - rewards_controller_data, + rewards_controller_data ) }; event::emit( @@ -621,7 +751,7 @@ module aave_pool::rewards_controller { to, claimer, amount: *vector::borrow(&claimed_amounts, i) - }, + } ); }; (rewards_list, claimed_amounts) @@ -644,7 +774,7 @@ module aave_pool::rewards_controller { to, reward, amount, - pull_rewards_transfer_strategy, + pull_rewards_transfer_strategy ); assert!(success, TRANSFER_ERROR); @@ -667,7 +797,7 @@ module aave_pool::rewards_controller { to, reward, amount, - staked_token_transfer_strategy, + staked_token_transfer_strategy ); assert!(success, TRANSFER_ERROR); @@ -683,11 +813,11 @@ module aave_pool::rewards_controller { smart_table::upsert( &mut rewards_controller_data.pull_rewards_transfer_strategy_table, reward, - pull_rewards_transfer_strategy, + pull_rewards_transfer_strategy ); event::emit( - PullRewardsTransferStrategyInstalled { reward, pull_rewards_transfer_strategy }, + PullRewardsTransferStrategyInstalled { reward, pull_rewards_transfer_strategy } ); } @@ -701,18 +831,20 @@ module aave_pool::rewards_controller { smart_table::upsert( &mut rewards_controller_data.staked_token_transfer_strategy_table, reward, - staked_token_transfer_strategy, + staked_token_transfer_strategy ); event::emit( - StakedTokenTransferStrategyInstalled { reward, staked_token_transfer_strategy }, + StakedTokenTransferStrategyInstalled { reward, staked_token_transfer_strategy } ); } public fun set_reward_oracle_internal( reward: address, reward_oracle: RewardOracle ) acquires RewardsControllerData { - assert!(oracle::latest_answer(reward_oracle) > 0, ORACLE_MUST_RETURN_PRICE); + assert!( + reward_oracle::latest_answer(reward_oracle) > 0, ORACLE_MUST_RETURN_PRICE + ); let rewards_controller_data = borrow_global_mut(rewards_controller_address()); @@ -730,7 +862,7 @@ module aave_pool::rewards_controller { borrow_global(rewards_controller_address); assert!( signer::address_of(sender) == rewards_controller_data.emission_manager, - ONLY_EMISSION_MANAGER, + ONLY_EMISSION_MANAGER ); } @@ -746,10 +878,23 @@ module aave_pool::rewards_controller { (rewards_data.index as u256), (rewards_data.emission_per_second as u256), (rewards_data.last_update_timestamp as u256), - (rewards_data.distribution_end as u256), + (rewards_data.distribution_end as u256) ) } + #[test_only] + public fun add_rewards_data( + asset: address, + reward: address, + rewards_controller_address: address, + reward_data: RewardData + ) acquires RewardsControllerData { + let rewards_controller_data = + borrow_global_mut(rewards_controller_address); + let asset = smart_table::borrow_mut(&mut rewards_controller_data.assets, asset); + simple_map::upsert(&mut asset.rewards, reward, reward_data); + } + #[view] public fun get_asset_index( asset: address, reward: address, rewards_controller_address: address @@ -761,7 +906,7 @@ module aave_pool::rewards_controller { get_asset_index_internal( rewards_data, a_token_factory::scaled_total_supply(asset), - math_utils::pow(10, (asset_el.decimals as u256)), + math_utils::pow(10, (asset_el.decimals as u256)) ) } @@ -794,8 +939,25 @@ module aave_pool::rewards_controller { available_rewards } + #[test_only] + public fun add_rewards_by_asset( + asset: address, + rewards_controller_address: address, + i: u128, + addr: address + ) acquires RewardsControllerData { + let rewards_controller_data = + borrow_global_mut(rewards_controller_address); + let asset = smart_table::borrow_mut(&mut rewards_controller_data.assets, asset); + // asset.available_rewards_count = asset.available_rewards_count + 1; + + simple_map::upsert(&mut asset.available_rewards, i, addr); + } + #[view] - public fun get_rewards_list(rewards_controller_address: address): vector
acquires RewardsControllerData { + public fun get_rewards_list( + rewards_controller_address: address + ): vector
acquires RewardsControllerData { let rewards_controller_data = borrow_global(rewards_controller_address); rewards_controller_data.rewards_list @@ -803,7 +965,10 @@ module aave_pool::rewards_controller { #[view] public fun get_user_asset_index( - user: address, asset: address, reward: address, rewards_controller_address: address + user: address, + asset: address, + reward: address, + rewards_controller_address: address ): u256 acquires RewardsControllerData { let rewards_controller_data = borrow_global(rewards_controller_address); @@ -813,6 +978,21 @@ module aave_pool::rewards_controller { (user_data.index as u256) } + public fun add_user_asset_index( + user: address, + asset: address, + reward: address, + rewards_controller_address: address, + user_data: UserData + ) acquires RewardsControllerData { + let rewards_controller_data = + borrow_global_mut(rewards_controller_address); + let asset = smart_table::borrow_mut(&mut rewards_controller_data.assets, asset); + let reward_data: &mut RewardData = + simple_map::borrow_mut(&mut asset.rewards, &reward); + simple_map::upsert(&mut reward_data.users_data, user, user_data); + } + #[view] public fun get_user_accrued_rewards( user: address, reward: address, rewards_controller_address: address @@ -828,10 +1008,12 @@ module aave_pool::rewards_controller { let asset = smart_table::borrow( &rewards_controller_data.assets, - *vector::borrow(&assets_list, i), + *vector::borrow(&assets_list, i) ); let reward_data: &RewardData = simple_map::borrow(&asset.rewards, &reward); - let user_data: &UserData = simple_map::borrow(&reward_data.users_data, &user); + let user_data: &UserData = simple_map::borrow( + &reward_data.users_data, &user + ); total_accrued = total_accrued + (user_data.accrued as u256); }; @@ -850,10 +1032,34 @@ module aave_pool::rewards_controller { user, reward, get_user_asset_balances(assets, user), - rewards_controller_address, + rewards_controller_address ) } + #[test_only] + public fun add_to_rewards_list( + reward: address, rewards_controller_address: address + ) acquires RewardsControllerData { + let rewards_controller_data = + borrow_global_mut(rewards_controller_address); + vector::push_back( + &mut rewards_controller_data.rewards_list, + reward + ); + } + + #[test_only] + public fun add_to_assets_list( + asset: address, rewards_controller_address: address + ) acquires RewardsControllerData { + let rewards_controller_data = + borrow_global_mut(rewards_controller_address); + vector::push_back( + &mut rewards_controller_data.assets_list, + asset + ); + } + #[view] public fun get_all_user_rewards( assets: vector
, user: address, rewards_controller_address: address @@ -870,12 +1076,12 @@ module aave_pool::rewards_controller { for (r in 0..rewards_list_len) { vector::push_back( &mut rewards_list, - *vector::borrow(&rewards_controller_data.rewards_list, r), + *vector::borrow(&rewards_controller_data.rewards_list, r) ); let asset_el = smart_table::borrow( &rewards_controller_data.assets, - vector::borrow(&user_asset_balances, r).asset, + vector::borrow(&user_asset_balances, r).asset ); let rewards_el = simple_map::borrow( @@ -895,8 +1101,8 @@ module aave_pool::rewards_controller { user, *vector::borrow(&rewards_list, r), vector::borrow(&user_asset_balances, i), - rewards_controller_data, - ), + rewards_controller_data + ) ); }; }; @@ -931,7 +1137,7 @@ module aave_pool::rewards_controller { old_distribution_end, new_distribution_end: (new_distribution_end as u256), asset_index: (reward_data.index as u256) - }, + } ); } @@ -962,14 +1168,14 @@ module aave_pool::rewards_controller { let decimals = asset_config.decimals; assert!( decimals != 0 && reward_config.last_update_timestamp != 0, - DISTRIBUTION_DOES_NOT_EXIST, + DISTRIBUTION_DOES_NOT_EXIST ); let (new_index, _) = update_reward_data( reward_config, a_token_factory::scaled_total_supply(asset), - math_utils::pow(10, (decimals as u256)), + math_utils::pow(10, (decimals as u256)) ); let old_emission_per_second = (reward_config.emission_per_second as u256); @@ -986,7 +1192,7 @@ module aave_pool::rewards_controller { old_distribution_end: (reward_config.distribution_end as u256), new_distribution_end: (reward_config.distribution_end as u256), asset_index: new_index - }, + } ); } } @@ -1035,7 +1241,7 @@ module aave_pool::rewards_controller { update_reward_data( reward_config, total_supply, - math_utils::pow(10, (decimals as u256)), + math_utils::pow(10, (decimals as u256)) ); let old_emissions_per_second = reward_config.emission_per_second; @@ -1054,7 +1260,7 @@ module aave_pool::rewards_controller { old_distribution_end: (old_distribution_end as u256), new_distribution_end: (reward_config.distribution_end as u256), asset_index: new_index - }, + } ); } } @@ -1096,7 +1302,7 @@ module aave_pool::rewards_controller { user_balance, new_asset_index, (user_index as u256), - asset_unit, + asset_unit ); user.accrued = user.accrued + (rewards_accrued as u128); @@ -1114,14 +1320,18 @@ module aave_pool::rewards_controller { ) acquires RewardsControllerData { let rewards_controller_data = borrow_global_mut(rewards_controller_address); - let asset_el = smart_table::borrow_mut(&mut rewards_controller_data.assets, asset); + let asset_el = smart_table::borrow_mut( + &mut rewards_controller_data.assets, asset + ); let num_available_rewards = asset_el.available_rewards_count; let asset_unit = math_utils::pow(10, (asset_el.decimals as u256)); if (num_available_rewards == 0) { return }; for (r in 0..num_available_rewards) { - let reward: address = *simple_map::borrow(&mut asset_el.available_rewards, &r); + let reward: address = *simple_map::borrow( + &mut asset_el.available_rewards, &r + ); let reward_data: &mut RewardData = simple_map::borrow_mut(&mut asset_el.rewards, &reward); @@ -1134,7 +1344,7 @@ module aave_pool::rewards_controller { user, user_balance, new_asset_index, - asset_unit, + asset_unit ); if (reward_data_updated || user_data_updated) { @@ -1146,7 +1356,7 @@ module aave_pool::rewards_controller { asset_index: new_asset_index, user_index: new_asset_index, rewards_accrued - }, + } ) }; }; @@ -1164,7 +1374,7 @@ module aave_pool::rewards_controller { user, user_asset_balances_i.user_balance, user_asset_balances_i.total_supply, - rewards_controller_address, + rewards_controller_address ); }; } @@ -1186,7 +1396,9 @@ module aave_pool::rewards_controller { &rewards_controller_data.assets, user_asset_balances_i.asset ); let reward_data: &RewardData = simple_map::borrow(&asset.rewards, &reward); - let user_data: &UserData = simple_map::borrow(&reward_data.users_data, &user); + let user_data: &UserData = simple_map::borrow( + &reward_data.users_data, &user + ); if (user_asset_balances_i.user_balance == 0) { unclaimed_rewards = unclaimed_rewards + (user_data.accrued as u256); @@ -1196,7 +1408,7 @@ module aave_pool::rewards_controller { user, reward, user_asset_balances_i, - rewards_controller_data, + rewards_controller_data ); unclaimed_rewards = unclaimed_rewards + pending_rewards + (user_data.accrued as u256); @@ -1232,11 +1444,19 @@ module aave_pool::rewards_controller { let user_data: &UserData = simple_map::borrow(&reward_data.users_data, &user); let index = (user_data.index as u256); - get_rewards(user_asset_balance.user_balance, next_index, index, asset_unit) + get_rewards( + user_asset_balance.user_balance, + next_index, + index, + asset_unit + ) } fun get_rewards( - user_balance: u256, reserve_index: u256, user_index: u256, asset_unit: u256 + user_balance: u256, + reserve_index: u256, + user_index: u256, + asset_unit: u256 ): u256 { let result = user_balance * (reserve_index - user_index); result / asset_unit @@ -1280,7 +1500,9 @@ module aave_pool::rewards_controller { } #[view] - public fun get_emission_manager(rewards_controller_address: address): address acquires RewardsControllerData { + public fun get_emission_manager( + rewards_controller_address: address + ): address acquires RewardsControllerData { let rewards_controller_data = borrow_global(rewards_controller_address); rewards_controller_data.emission_manager diff --git a/aave-core/sources/aave-periphery/staked_token.move b/aave-core/sources/aave-periphery/staked_token.move index ca9ef1e..0f8fa8a 100644 --- a/aave-core/sources/aave-periphery/staked_token.move +++ b/aave-core/sources/aave-periphery/staked_token.move @@ -1,6 +1,6 @@ module aave_pool::staked_token { struct MockStakedToken has key, drop, store, copy { - addr: address, + addr: address } public fun staked_token(mock_staked_token: &MockStakedToken): address { @@ -25,7 +25,7 @@ module aave_pool::staked_token { use std::signer; #[test(account = @aave_pool)] - fun test_create_mock_staked_token(account: &signer,) { + fun test_create_mock_staked_token(account: &signer) { let addr = signer::address_of(account); let mock_staked_token = create_mock_staked_token(addr); @@ -33,20 +33,20 @@ module aave_pool::staked_token { assert!(mock_staked_token.addr == addr, 0); } - #[test(account = @aave_pool)] - fun test_cooldown(account: &signer,) { + #[test(_account = @aave_pool)] + fun test_cooldown(_account: &signer) { cooldown(); } #[test(account = @aave_pool)] - fun test_redeem(account: &signer,) { + fun test_redeem(account: &signer) { let to = signer::address_of(account); let amount = 1; redeem(to, amount); } #[test(account = @aave_pool)] - fun test_claim_rewards(account: &signer,) { + fun test_claim_rewards(account: &signer) { let to = signer::address_of(account); let amount = 1; claim_rewards(to, amount); diff --git a/aave-core/sources/aave-periphery/stream.move b/aave-core/sources/aave-periphery/stream.move index 5be1368..cba08b1 100644 --- a/aave-core/sources/aave-periphery/stream.move +++ b/aave-core/sources/aave-periphery/stream.move @@ -9,7 +9,7 @@ module aave_pool::stream { recipient: address, sender: address, token_address: address, - is_entity: bool, + is_entity: bool } public fun recipient(stream: &Stream): address { @@ -20,8 +20,8 @@ module aave_pool::stream { stream.is_entity } - public fun get_stream(stream: &Stream) - : ( + public fun get_stream(stream: &Stream): + ( address, address, u256, address, u256, u256, u256, u256 ) { ( @@ -62,7 +62,7 @@ module aave_pool::stream { recipient, sender, token_address, - is_entity, + is_entity } } @@ -73,7 +73,7 @@ module aave_pool::stream { const TEST_FAILED: u64 = 2; #[test(account = @aave_pool)] - fun test_create_stream(account: &signer,) { + fun test_create_stream(account: &signer) { let deposit = 1; let rate_per_second = 1; let remaining_balance = 1; @@ -94,7 +94,7 @@ module aave_pool::stream { recipient, sender, token_address, - is_entity, + is_entity ); assert!(stream.deposit == deposit, TEST_SUCCESS); @@ -109,7 +109,7 @@ module aave_pool::stream { } #[test(account = @aave_pool)] - fun test_is_entity(account: &signer,) { + fun test_is_entity(account: &signer) { let deposit = 1; let rate_per_second = 1; let remaining_balance = 1; @@ -130,7 +130,7 @@ module aave_pool::stream { recipient, sender, token_address, - true, + true ); assert!(is_entity(&stream_true) == true, TEST_SUCCESS); @@ -145,14 +145,14 @@ module aave_pool::stream { recipient, sender, token_address, - false, + false ); assert!(is_entity(&stream_false) == false, TEST_SUCCESS); } #[test(account = @aave_pool)] - fun test_recipient(account: &signer,) { + fun test_recipient(account: &signer) { let deposit = 1; let rate_per_second = 1; let remaining_balance = 1; @@ -173,14 +173,14 @@ module aave_pool::stream { recipient, sender, token_address, - is_entity, + is_entity ); assert!(recipient(&stream_true) == recipient, TEST_SUCCESS); } #[test(account = @aave_pool)] - fun test_get_stream(account: &signer,) { + fun test_get_stream(account: &signer) { let arg_deposit = 1; let arg_rate_per_second = 1; let arg_remaining_balance = 1; @@ -201,7 +201,7 @@ module aave_pool::stream { arg_recipient, arg_sender, arg_token_address, - arg_is_entity, + arg_is_entity ); let ( @@ -227,7 +227,7 @@ module aave_pool::stream { } #[test(account = @aave_pool)] - fun test_set_remaining_balance(account: &signer,) { + fun test_set_remaining_balance(account: &signer) { let arg_deposit = 1; let arg_rate_per_second = 1; let arg_remaining_balance = 1; @@ -248,7 +248,7 @@ module aave_pool::stream { arg_recipient, arg_sender, arg_token_address, - arg_is_entity, + arg_is_entity ); let ( diff --git a/aave-core/sources/aave-periphery/transfer_strategy.move b/aave-core/sources/aave-periphery/transfer_strategy.move index adf2926..35b51df 100644 --- a/aave-core/sources/aave-periphery/transfer_strategy.move +++ b/aave-core/sources/aave-periphery/transfer_strategy.move @@ -4,32 +4,29 @@ module aave_pool::transfer_strategy { use aptos_framework::event; use aave_acl::acl_manage::Self; - use aave_mock_oracle::oracle::RewardOracle; + use aave_oracle::reward_oracle::RewardOracle; - use aave_pool::mock_underlying_token_factory; use aave_pool::staked_token::{MockStakedToken, stake, staked_token}; #[test_only] use std::string::utf8; - // friend aave_pool::underlying_token_factory; - const ONLY_REWARDS_ADMIN: u64 = 1; - const CALLER_NOT_INCENTIVES_CONTROLLER: u64 = 1; - const REWARD_TOKEN_NOT_STAKE_CONTRACT: u64 = 1; - const TOO_MANY_STRATEGIES: u64 = 1; - const NOT_EMISSION_ADMIN: u64 = 1; + const CALLER_NOT_INCENTIVES_CONTROLLER: u64 = 2; + const REWARD_TOKEN_NOT_STAKE_CONTRACT: u64 = 3; + const TOO_MANY_STRATEGIES: u64 = 4; + const NOT_EMISSION_ADMIN: u64 = 5; const EMISSION_MANAGER_NAME: vector = b"EMISSION_MANAGER"; public fun check_is_emission_admin(account: address) { - assert!(acl_manage::is_emission_admin_role(account), NOT_EMISSION_ADMIN); + assert!(acl_manage::is_emission_admin(account), NOT_EMISSION_ADMIN); } struct PullRewardsTransferStrategy has key, drop, store, copy { rewards_admin: address, incentives_controller: address, - rewards_vault: address, + rewards_vault: address } public fun create_pull_rewards_transfer_strategy( @@ -40,21 +37,21 @@ module aave_pool::transfer_strategy { public fun pull_rewards_transfer_strategy_perform_transfer( caller: &signer, - to: address, - reward: address, - amount: u256, + _to: address, + _reward: address, + _amount: u256, pull_rewards_transfer_strategy: PullRewardsTransferStrategy ): bool { pull_rewards_transfer_strategy_only_incentives_controller( caller, &pull_rewards_transfer_strategy ); - mock_underlying_token_factory::transfer_from( - pull_rewards_transfer_strategy.rewards_vault, - to, - (amount as u64), - reward, - ); + // mock_underlying_token_factory::transfer_from( + // pull_rewards_transfer_strategy.rewards_vault, + // to, + // (amount as u64), + // reward + // ); true } @@ -70,7 +67,7 @@ module aave_pool::transfer_strategy { ) { assert!( signer::address_of(caller) == pull_rewards_transfer_strategy.rewards_admin, - ONLY_REWARDS_ADMIN, + ONLY_REWARDS_ADMIN ); } @@ -80,7 +77,7 @@ module aave_pool::transfer_strategy { assert!( signer::address_of(caller) == pull_rewards_transfer_strategy.incentives_controller, - CALLER_NOT_INCENTIVES_CONTROLLER, + CALLER_NOT_INCENTIVES_CONTROLLER ); } @@ -101,15 +98,18 @@ module aave_pool::transfer_strategy { token: address, to: address, amount: u256, - pull_rewards_transfer_strategy: PullRewardsTransferStrategy, + pull_rewards_transfer_strategy: PullRewardsTransferStrategy ) { pull_rewards_transfer_strategy_only_rewards_admin( caller, pull_rewards_transfer_strategy ); - mock_underlying_token_factory::transfer_from( - signer::address_of(caller), to, (amount as u64), token - ); + // mock_underlying_token_factory::transfer_from( + // signer::address_of(caller), + // to, + // (amount as u64), + // token + // ); emit_emergency_withdrawal_event(caller, token, to, amount); } @@ -118,7 +118,7 @@ module aave_pool::transfer_strategy { rewards_admin: address, incentives_controller: address, stake_contract: MockStakedToken, - underlying_token: address, + underlying_token: address } public fun create_staked_token_transfer_strategy( @@ -131,7 +131,7 @@ module aave_pool::transfer_strategy { rewards_admin, incentives_controller, stake_contract, - underlying_token, + underlying_token } } @@ -147,7 +147,7 @@ module aave_pool::transfer_strategy { ); assert!( reward == staked_token(&staked_token_transfer_strategy.stake_contract), - REWARD_TOKEN_NOT_STAKE_CONTRACT, + REWARD_TOKEN_NOT_STAKE_CONTRACT ); stake(&staked_token_transfer_strategy.stake_contract, to, amount); @@ -172,7 +172,7 @@ module aave_pool::transfer_strategy { ) { assert!( signer::address_of(caller) == staked_token_transfer_strategy.rewards_admin, - ONLY_REWARDS_ADMIN, + ONLY_REWARDS_ADMIN ); } @@ -182,7 +182,7 @@ module aave_pool::transfer_strategy { assert!( signer::address_of(caller) == staked_token_transfer_strategy.incentives_controller, - CALLER_NOT_INCENTIVES_CONTROLLER, + CALLER_NOT_INCENTIVES_CONTROLLER ); } @@ -203,15 +203,18 @@ module aave_pool::transfer_strategy { token: address, to: address, amount: u256, - staked_token_transfer_strategy: StakedTokenTransferStrategy, + staked_token_transfer_strategy: StakedTokenTransferStrategy ) { staked_token_transfer_strategy_only_rewards_admin( caller, staked_token_transfer_strategy ); - mock_underlying_token_factory::transfer_from( - signer::address_of(caller), to, (amount as u64), token - ); + // mock_underlying_token_factory::transfer_from( + // signer::address_of(caller), + // to, + // (amount as u64), + // token + // ); emit_emergency_withdrawal_event(caller, token, to, amount); } @@ -227,6 +230,28 @@ module aave_pool::transfer_strategy { reward_oracle: RewardOracle } + public fun create_rewards_config_input( + emission_per_second: u128, + total_supply: u256, + distribution_end: u32, + asset: address, + reward: address, + staked_token_transfer_strategy: Option, + pull_rewards_transfer_strategy: Option, + reward_oracle: RewardOracle + ): RewardsConfigInput { + RewardsConfigInput { + emission_per_second, + total_supply, + distribution_end, + asset, + reward, + staked_token_transfer_strategy, + pull_rewards_transfer_strategy, + reward_oracle + } + } + public fun get_reward(rewards_config_input: &RewardsConfigInput): address { rewards_config_input.reward } @@ -281,17 +306,17 @@ module aave_pool::transfer_strategy { assert!( ( option::is_some(&rewards_config_input.staked_token_transfer_strategy) - && !option::is_some( - &rewards_config_input.pull_rewards_transfer_strategy - ) + && !option::is_some( + &rewards_config_input.pull_rewards_transfer_strategy + ) ) - || ( - !option::is_some(&rewards_config_input.staked_token_transfer_strategy) - && option::is_some( - &rewards_config_input.pull_rewards_transfer_strategy - ) - ), - TOO_MANY_STRATEGIES, + || ( + !option::is_some(&rewards_config_input.staked_token_transfer_strategy) + && option::is_some( + &rewards_config_input.pull_rewards_transfer_strategy + ) + ), + TOO_MANY_STRATEGIES ); } @@ -310,14 +335,465 @@ module aave_pool::transfer_strategy { } public fun emit_emergency_withdrawal_event( - caller: &signer, token: address, to: address, amount: u256 + caller: &signer, + token: address, + to: address, + amount: u256 ) { event::emit( - EmergencyWithdrawal { caller: signer::address_of(caller), token, to, amount }, + EmergencyWithdrawal { caller: signer::address_of(caller), token, to, amount } ); } - #[test(_aave_role_super_admin = @aave_acl, _periphery_account = @aave_pool, _acl_fund_admin = @0x111, _user_account = @0x222, _creator = @0x1, underlying_tokens_admin = @underlying_tokens, aave_pool = @aave_pool)] + #[test_only] + const TEST_SUCCESS: u64 = 1; + #[test_only] + const TEST_FAILED: u64 = 2; + + #[test(underlying_tokens_admin = @underlying_tokens, _aave_pool = @aave_pool)] + fun test_get_reward( + underlying_tokens_admin: &signer, _aave_pool: &signer + ) { + let rewards_admin = signer::address_of(underlying_tokens_admin); + let incentives_controller = signer::address_of(underlying_tokens_admin); + let rewards_vault = signer::address_of(underlying_tokens_admin); + + let underlying_token = signer::address_of(underlying_tokens_admin); + + let stake_contract = + aave_pool::staked_token::create_mock_staked_token(underlying_token); + + let pull_rewards_transfer_strategy = + option::some( + create_pull_rewards_transfer_strategy( + rewards_admin, incentives_controller, rewards_vault + ) + ); + let staked_token_transfer_strategy = + option::some( + create_staked_token_transfer_strategy( + rewards_admin, + incentives_controller, + stake_contract, + underlying_token + ) + ); + + let emission_per_second = 0; + let total_supply = 0; + let distribution_end = 0; + let asset = underlying_token; + let reward = underlying_token; + + let id = 1; + let reward_oracle = aave_oracle::reward_oracle::create_reward_oracle(id); + + let rewards_config_input = RewardsConfigInput { + emission_per_second, + total_supply, + distribution_end, + asset, + reward, + staked_token_transfer_strategy, + pull_rewards_transfer_strategy, + reward_oracle + }; + + assert!( + get_reward(&rewards_config_input) == rewards_admin, + TEST_SUCCESS + ); + } + + #[test(underlying_tokens_admin = @underlying_tokens, _aave_pool = @aave_pool)] + fun test_get_reward_oracle( + underlying_tokens_admin: &signer, _aave_pool: &signer + ) { + let rewards_admin = signer::address_of(underlying_tokens_admin); + let incentives_controller = signer::address_of(underlying_tokens_admin); + let rewards_vault = signer::address_of(underlying_tokens_admin); + + let underlying_token = signer::address_of(underlying_tokens_admin); + + let stake_contract = + aave_pool::staked_token::create_mock_staked_token(underlying_token); + + let pull_rewards_transfer_strategy = + option::some( + create_pull_rewards_transfer_strategy( + rewards_admin, incentives_controller, rewards_vault + ) + ); + let staked_token_transfer_strategy = + option::some( + create_staked_token_transfer_strategy( + rewards_admin, + incentives_controller, + stake_contract, + underlying_token + ) + ); + + let emission_per_second = 0; + let total_supply = 0; + let distribution_end = 0; + let asset = underlying_token; + let reward = underlying_token; + + let id = 1; + let reward_oracle = aave_oracle::reward_oracle::create_reward_oracle(id); + + let rewards_config_input = RewardsConfigInput { + emission_per_second, + total_supply, + distribution_end, + asset, + reward, + staked_token_transfer_strategy, + pull_rewards_transfer_strategy, + reward_oracle + }; + + assert!( + get_reward_oracle(&rewards_config_input) == reward_oracle, + TEST_SUCCESS + ); + } + + #[test(underlying_tokens_admin = @underlying_tokens, _aave_pool = @aave_pool)] + fun test_get_asset( + underlying_tokens_admin: &signer, _aave_pool: &signer + ) { + let rewards_admin = signer::address_of(underlying_tokens_admin); + let incentives_controller = signer::address_of(underlying_tokens_admin); + let rewards_vault = signer::address_of(underlying_tokens_admin); + + let underlying_token = signer::address_of(underlying_tokens_admin); + + let stake_contract = + aave_pool::staked_token::create_mock_staked_token(underlying_token); + + let pull_rewards_transfer_strategy = + option::some( + create_pull_rewards_transfer_strategy( + rewards_admin, incentives_controller, rewards_vault + ) + ); + let staked_token_transfer_strategy = + option::some( + create_staked_token_transfer_strategy( + rewards_admin, + incentives_controller, + stake_contract, + underlying_token + ) + ); + + let emission_per_second = 0; + let total_supply = 0; + let distribution_end = 0; + let asset = underlying_token; + let reward = underlying_token; + + let id = 1; + let reward_oracle = aave_oracle::reward_oracle::create_reward_oracle(id); + + let rewards_config_input = RewardsConfigInput { + emission_per_second, + total_supply, + distribution_end, + asset, + reward, + staked_token_transfer_strategy, + pull_rewards_transfer_strategy, + reward_oracle + }; + + assert!( + get_asset(&rewards_config_input) == asset, + TEST_SUCCESS + ); + } + + #[test(underlying_tokens_admin = @underlying_tokens, _aave_pool = @aave_pool)] + fun test_get_total_supply( + underlying_tokens_admin: &signer, _aave_pool: &signer + ) { + let rewards_admin = signer::address_of(underlying_tokens_admin); + let incentives_controller = signer::address_of(underlying_tokens_admin); + let rewards_vault = signer::address_of(underlying_tokens_admin); + + let underlying_token = signer::address_of(underlying_tokens_admin); + + let stake_contract = + aave_pool::staked_token::create_mock_staked_token(underlying_token); + + let pull_rewards_transfer_strategy = + option::some( + create_pull_rewards_transfer_strategy( + rewards_admin, incentives_controller, rewards_vault + ) + ); + let staked_token_transfer_strategy = + option::some( + create_staked_token_transfer_strategy( + rewards_admin, + incentives_controller, + stake_contract, + underlying_token + ) + ); + + let emission_per_second = 0; + let total_supply = 0; + let distribution_end = 0; + let asset = underlying_token; + let reward = underlying_token; + + let id = 1; + let reward_oracle = aave_oracle::reward_oracle::create_reward_oracle(id); + + let rewards_config_input = RewardsConfigInput { + emission_per_second, + total_supply, + distribution_end, + asset, + reward, + staked_token_transfer_strategy, + pull_rewards_transfer_strategy, + reward_oracle + }; + + assert!( + get_total_supply(&rewards_config_input) == total_supply, + TEST_SUCCESS + ); + } + + #[test(underlying_tokens_admin = @underlying_tokens, _aave_pool = @aave_pool)] + fun test_get_emission_per_second( + underlying_tokens_admin: &signer, _aave_pool: &signer + ) { + let rewards_admin = signer::address_of(underlying_tokens_admin); + let incentives_controller = signer::address_of(underlying_tokens_admin); + let rewards_vault = signer::address_of(underlying_tokens_admin); + + let underlying_token = signer::address_of(underlying_tokens_admin); + + let stake_contract = + aave_pool::staked_token::create_mock_staked_token(underlying_token); + + let pull_rewards_transfer_strategy = + option::some( + create_pull_rewards_transfer_strategy( + rewards_admin, incentives_controller, rewards_vault + ) + ); + let staked_token_transfer_strategy = + option::some( + create_staked_token_transfer_strategy( + rewards_admin, + incentives_controller, + stake_contract, + underlying_token + ) + ); + + let emission_per_second = 0; + let total_supply = 0; + let distribution_end = 0; + let asset = underlying_token; + let reward = underlying_token; + + let id = 1; + let reward_oracle = aave_oracle::reward_oracle::create_reward_oracle(id); + + let rewards_config_input = RewardsConfigInput { + emission_per_second, + total_supply, + distribution_end, + asset, + reward, + staked_token_transfer_strategy, + pull_rewards_transfer_strategy, + reward_oracle + }; + + assert!( + get_emission_per_second(&rewards_config_input) == emission_per_second, + TEST_SUCCESS + ); + } + + #[test(underlying_tokens_admin = @underlying_tokens, _aave_pool = @aave_pool)] + fun test_get_distribution_end( + underlying_tokens_admin: &signer, _aave_pool: &signer + ) { + let rewards_admin = signer::address_of(underlying_tokens_admin); + let incentives_controller = signer::address_of(underlying_tokens_admin); + let rewards_vault = signer::address_of(underlying_tokens_admin); + + let underlying_token = signer::address_of(underlying_tokens_admin); + + let stake_contract = + aave_pool::staked_token::create_mock_staked_token(underlying_token); + + let pull_rewards_transfer_strategy = + option::some( + create_pull_rewards_transfer_strategy( + rewards_admin, incentives_controller, rewards_vault + ) + ); + let staked_token_transfer_strategy = + option::some( + create_staked_token_transfer_strategy( + rewards_admin, + incentives_controller, + stake_contract, + underlying_token + ) + ); + + let emission_per_second = 0; + let total_supply = 0; + let distribution_end = 0; + let asset = underlying_token; + let reward = underlying_token; + + let id = 1; + let reward_oracle = aave_oracle::reward_oracle::create_reward_oracle(id); + + let rewards_config_input = RewardsConfigInput { + emission_per_second, + total_supply, + distribution_end, + asset, + reward, + staked_token_transfer_strategy, + pull_rewards_transfer_strategy, + reward_oracle + }; + + assert!( + get_distribution_end(&rewards_config_input) == distribution_end, + TEST_SUCCESS + ); + } + + #[test(underlying_tokens_admin = @underlying_tokens, _aave_pool = @aave_pool)] + fun test_validate_rewards_config_input( + underlying_tokens_admin: &signer, _aave_pool: &signer + ) { + let rewards_admin = signer::address_of(underlying_tokens_admin); + let incentives_controller = signer::address_of(underlying_tokens_admin); + let rewards_vault = signer::address_of(underlying_tokens_admin); + + let underlying_token = signer::address_of(underlying_tokens_admin); + + let _stake_contract = + aave_pool::staked_token::create_mock_staked_token(underlying_token); + + let pull_rewards_transfer_strategy = + option::some( + create_pull_rewards_transfer_strategy( + rewards_admin, incentives_controller, rewards_vault + ) + ); + let staked_token_transfer_strategy = option::none(); + + let emission_per_second = 0; + let total_supply = 0; + let distribution_end = 0; + let asset = underlying_token; + let reward = underlying_token; + + let id = 1; + let reward_oracle = aave_oracle::reward_oracle::create_reward_oracle(id); + + let rewards_config_input = RewardsConfigInput { + emission_per_second, + total_supply, + distribution_end, + asset, + reward, + staked_token_transfer_strategy, + pull_rewards_transfer_strategy, + reward_oracle + }; + + validate_rewards_config_input(&rewards_config_input); + } + + #[test(underlying_tokens_admin = @underlying_tokens, _aave_pool = @aave_pool)] + fun test_set_total_supply( + underlying_tokens_admin: &signer, _aave_pool: &signer + ) { + let rewards_admin = signer::address_of(underlying_tokens_admin); + let incentives_controller = signer::address_of(underlying_tokens_admin); + let rewards_vault = signer::address_of(underlying_tokens_admin); + + let underlying_token = signer::address_of(underlying_tokens_admin); + + let stake_contract = + aave_pool::staked_token::create_mock_staked_token(underlying_token); + + let pull_rewards_transfer_strategy = + option::some( + create_pull_rewards_transfer_strategy( + rewards_admin, incentives_controller, rewards_vault + ) + ); + let staked_token_transfer_strategy = + option::some( + create_staked_token_transfer_strategy( + rewards_admin, + incentives_controller, + stake_contract, + underlying_token + ) + ); + + let emission_per_second = 0; + let total_supply = 0; + let distribution_end = 0; + let asset = underlying_token; + let reward = underlying_token; + + let id = 1; + let reward_oracle = aave_oracle::reward_oracle::create_reward_oracle(id); + + let rewards_config_input = RewardsConfigInput { + emission_per_second, + total_supply, + distribution_end, + asset, + reward, + staked_token_transfer_strategy, + pull_rewards_transfer_strategy, + reward_oracle + }; + + let new_total_supply = 10; + + set_total_supply(&mut rewards_config_input, new_total_supply); + + assert!( + rewards_config_input.total_supply == new_total_supply, + TEST_SUCCESS + ); + } + + #[ + test( + _aave_role_super_admin = @aave_acl, + _periphery_account = @aave_pool, + _acl_fund_admin = @0x111, + _user_account = @0x222, + _creator = @0x1, + underlying_tokens_admin = @underlying_tokens, + _aave_pool = @aave_pool + ) + ] fun test_pull_rewards_transfer_strategy_perform_transfer( _aave_role_super_admin: &signer, _periphery_account: &signer, @@ -325,42 +801,42 @@ module aave_pool::transfer_strategy { _user_account: &signer, _creator: &signer, underlying_tokens_admin: &signer, - aave_pool: &signer, + _aave_pool: &signer ) { let pull_rewards_transfer_strategy = PullRewardsTransferStrategy { rewards_admin: signer::address_of(underlying_tokens_admin), incentives_controller: signer::address_of(underlying_tokens_admin), - rewards_vault: signer::address_of(underlying_tokens_admin), + rewards_vault: signer::address_of(underlying_tokens_admin) }; - mock_underlying_token_factory::test_init_module(aave_pool); - let underlying_token_name = utf8(b"TOKEN_1"); - let underlying_token_symbol = utf8(b"T1"); - let underlying_token_decimals = 3; - let underlying_token_max_supply = 10000; - - mock_underlying_token_factory::create_token( - underlying_tokens_admin, - underlying_token_max_supply, - underlying_token_name, - underlying_token_symbol, - underlying_token_decimals, - utf8(b""), - utf8(b""), - ); - let underlying_token_address = - mock_underlying_token_factory::token_address(underlying_token_symbol); - - mock_underlying_token_factory::mint( - underlying_tokens_admin, - signer::address_of(underlying_tokens_admin), - 100, - underlying_token_address, - ); + // mock_underlying_token_factory::test_init_module(aave_pool); + // let underlying_token_name = utf8(b"TOKEN_1"); + // let underlying_token_symbol = utf8(b"T1"); + // let underlying_token_decimals = 3; + // let underlying_token_max_supply = 10000; + // + // mock_underlying_token_factory::create_token( + // underlying_tokens_admin, + // underlying_token_max_supply, + // underlying_token_name, + // underlying_token_symbol, + // underlying_token_decimals, + // utf8(b""), + // utf8(b"") + // ); + // let underlying_token_address = + // mock_underlying_token_factory::token_address(underlying_token_symbol); + // + // mock_underlying_token_factory::mint( + // underlying_tokens_admin, + // signer::address_of(underlying_tokens_admin), + // 100, + // underlying_token_address + // ); let caller: &signer = underlying_tokens_admin; let to: address = signer::address_of(underlying_tokens_admin); - let reward: address = underlying_token_address; + let reward: address = @0x0; let amount: u256 = 1; pull_rewards_transfer_strategy_perform_transfer( @@ -368,11 +844,266 @@ module aave_pool::transfer_strategy { to, reward, amount, - pull_rewards_transfer_strategy, + pull_rewards_transfer_strategy + ); + } + + #[test(underlying_tokens_admin = @underlying_tokens, _aave_pool = @aave_pool)] + fun test_pull_rewards_transfer_strategy_get_rewards_vault( + underlying_tokens_admin: &signer, _aave_pool: &signer + ) { + let rewards_admin = signer::address_of(underlying_tokens_admin); + let incentives_controller = signer::address_of(underlying_tokens_admin); + let rewards_vault = signer::address_of(underlying_tokens_admin); + + let pull_rewards_transfer_strategy = + create_pull_rewards_transfer_strategy( + rewards_admin, incentives_controller, rewards_vault + ); + + assert!( + pull_rewards_transfer_strategy + == PullRewardsTransferStrategy { + rewards_admin, + incentives_controller, + rewards_vault + }, + TEST_SUCCESS + ); + + assert!( + pull_rewards_transfer_strategy_get_rewards_vault( + pull_rewards_transfer_strategy + ) == rewards_vault, + TEST_SUCCESS + ); + } + + #[test(underlying_tokens_admin = @underlying_tokens, _aave_pool = @aave_pool)] + fun test_pull_rewards_transfer_strategy_get_incentives_controller( + underlying_tokens_admin: &signer, _aave_pool: &signer + ) { + let rewards_admin = signer::address_of(underlying_tokens_admin); + let incentives_controller = signer::address_of(underlying_tokens_admin); + let rewards_vault = signer::address_of(underlying_tokens_admin); + + let pull_rewards_transfer_strategy = + create_pull_rewards_transfer_strategy( + rewards_admin, incentives_controller, rewards_vault + ); + + assert!( + pull_rewards_transfer_strategy + == PullRewardsTransferStrategy { + rewards_admin, + incentives_controller, + rewards_vault + }, + TEST_SUCCESS + ); + + assert!( + pull_rewards_transfer_strategy_get_incentives_controller( + pull_rewards_transfer_strategy + ) == incentives_controller, + TEST_SUCCESS + ); + } + + #[test(underlying_tokens_admin = @underlying_tokens, _aave_pool = @aave_pool)] + fun test_pull_rewards_transfer_strategy_get_rewards_admin( + underlying_tokens_admin: &signer, _aave_pool: &signer + ) { + let rewards_admin = signer::address_of(underlying_tokens_admin); + let incentives_controller = signer::address_of(underlying_tokens_admin); + let rewards_vault = signer::address_of(underlying_tokens_admin); + + let pull_rewards_transfer_strategy = + create_pull_rewards_transfer_strategy( + rewards_admin, incentives_controller, rewards_vault + ); + + assert!( + pull_rewards_transfer_strategy + == PullRewardsTransferStrategy { + rewards_admin, + incentives_controller, + rewards_vault + }, + TEST_SUCCESS + ); + + assert!( + pull_rewards_transfer_strategy_get_rewards_admin( + pull_rewards_transfer_strategy + ) == rewards_admin, + TEST_SUCCESS ); } - #[test(_aave_role_super_admin = @aave_acl, _periphery_account = @aave_pool, _acl_fund_admin = @0x111, _user_account = @0x222, _creator = @0x1, underlying_tokens_admin = @underlying_tokens, aave_pool = @aave_pool,)] + #[test(underlying_tokens_admin = @underlying_tokens, _aave_pool = @aave_pool)] + fun test_staked_token_transfer_strategy_get_rewards_admin( + underlying_tokens_admin: &signer, _aave_pool: &signer + ) { + let rewards_admin = signer::address_of(underlying_tokens_admin); + let incentives_controller = signer::address_of(underlying_tokens_admin); + let underlying_token = signer::address_of(underlying_tokens_admin); + + let stake_contract = + aave_pool::staked_token::create_mock_staked_token(underlying_token); + + let staked_token_transfer_strategy = + create_staked_token_transfer_strategy( + rewards_admin, + incentives_controller, + stake_contract, + underlying_token + ); + + assert!( + staked_token_transfer_strategy + == StakedTokenTransferStrategy { + rewards_admin, + incentives_controller, + stake_contract, + underlying_token + }, + TEST_SUCCESS + ); + + assert!( + staked_token_transfer_strategy_get_rewards_admin( + staked_token_transfer_strategy + ) == rewards_admin, + TEST_SUCCESS + ); + } + + #[test(underlying_tokens_admin = @underlying_tokens, _aave_pool = @aave_pool)] + fun test_staked_token_transfer_strategy_get_incentives_controller( + underlying_tokens_admin: &signer, _aave_pool: &signer + ) { + let rewards_admin = signer::address_of(underlying_tokens_admin); + let incentives_controller = signer::address_of(underlying_tokens_admin); + let underlying_token = signer::address_of(underlying_tokens_admin); + + let stake_contract = + aave_pool::staked_token::create_mock_staked_token(underlying_token); + + let staked_token_transfer_strategy = + create_staked_token_transfer_strategy( + rewards_admin, + incentives_controller, + stake_contract, + underlying_token + ); + + assert!( + staked_token_transfer_strategy + == StakedTokenTransferStrategy { + rewards_admin, + incentives_controller, + stake_contract, + underlying_token + }, + TEST_SUCCESS + ); + + assert!( + staked_token_transfer_strategy_get_incentives_controller( + staked_token_transfer_strategy + ) == incentives_controller, + TEST_SUCCESS + ); + } + + #[test(underlying_tokens_admin = @underlying_tokens, _aave_pool = @aave_pool)] + fun test_staked_token_transfer_strategy_get_underlying_token( + underlying_tokens_admin: &signer, _aave_pool: &signer + ) { + let rewards_admin = signer::address_of(underlying_tokens_admin); + let incentives_controller = signer::address_of(underlying_tokens_admin); + let underlying_token = signer::address_of(underlying_tokens_admin); + + let stake_contract = + aave_pool::staked_token::create_mock_staked_token(underlying_token); + + let staked_token_transfer_strategy = + create_staked_token_transfer_strategy( + rewards_admin, + incentives_controller, + stake_contract, + underlying_token + ); + + assert!( + staked_token_transfer_strategy + == StakedTokenTransferStrategy { + rewards_admin, + incentives_controller, + stake_contract, + underlying_token + }, + TEST_SUCCESS + ); + + assert!( + staked_token_transfer_strategy_get_underlying_token( + staked_token_transfer_strategy + ) == underlying_token, + TEST_SUCCESS + ); + } + + #[test(underlying_tokens_admin = @underlying_tokens, _aave_pool = @aave_pool)] + fun test_staked_token_transfer_strategy_get_stake_contract( + underlying_tokens_admin: &signer, _aave_pool: &signer + ) { + let rewards_admin = signer::address_of(underlying_tokens_admin); + let incentives_controller = signer::address_of(underlying_tokens_admin); + let underlying_token = signer::address_of(underlying_tokens_admin); + + let stake_contract = + aave_pool::staked_token::create_mock_staked_token(underlying_token); + + let staked_token_transfer_strategy = + create_staked_token_transfer_strategy( + rewards_admin, + incentives_controller, + stake_contract, + underlying_token + ); + + assert!( + staked_token_transfer_strategy + == StakedTokenTransferStrategy { + rewards_admin, + incentives_controller, + stake_contract, + underlying_token + }, + TEST_SUCCESS + ); + + assert!( + staked_token_transfer_strategy_get_stake_contract( + staked_token_transfer_strategy + ) == staked_token(&staked_token_transfer_strategy.stake_contract), + TEST_SUCCESS + ); + } + + #[ + test( + _aave_role_super_admin = @aave_acl, + _periphery_account = @aave_pool, + _acl_fund_admin = @0x111, + _user_account = @0x222, + _creator = @0x1, + underlying_tokens_admin = @underlying_tokens, + _aave_pool = @aave_pool + ) + ] fun test_pull_rewards_transfer_strategy_emergency_withdrawal( _aave_role_super_admin: &signer, _periphery_account: &signer, @@ -380,42 +1111,42 @@ module aave_pool::transfer_strategy { _user_account: &signer, _creator: &signer, underlying_tokens_admin: &signer, - aave_pool: &signer, + _aave_pool: &signer ) { let pull_rewards_transfer_strategy = PullRewardsTransferStrategy { rewards_admin: signer::address_of(underlying_tokens_admin), incentives_controller: signer::address_of(underlying_tokens_admin), - rewards_vault: signer::address_of(underlying_tokens_admin), + rewards_vault: signer::address_of(underlying_tokens_admin) }; - mock_underlying_token_factory::test_init_module(aave_pool); - let underlying_token_name = utf8(b"TOKEN_1"); - let underlying_token_symbol = utf8(b"T1"); - let underlying_token_decimals = 3; - let underlying_token_max_supply = 10000; - - mock_underlying_token_factory::create_token( - underlying_tokens_admin, - underlying_token_max_supply, - underlying_token_name, - underlying_token_symbol, - underlying_token_decimals, - utf8(b""), - utf8(b""), - ); - let underlying_token_address = - mock_underlying_token_factory::token_address(underlying_token_symbol); - - mock_underlying_token_factory::mint( - underlying_tokens_admin, - signer::address_of(underlying_tokens_admin), - 100, - underlying_token_address, - ); + // mock_underlying_token_factory::test_init_module(aave_pool); + let _underlying_token_name = utf8(b"TOKEN_1"); + let _underlying_token_symbol = utf8(b"T1"); + let _underlying_token_decimals = 3; + let _underlying_token_max_supply = 10000; + + // mock_underlying_token_factory::create_token( + // underlying_tokens_admin, + // underlying_token_max_supply, + // underlying_token_name, + // underlying_token_symbol, + // underlying_token_decimals, + // utf8(b""), + // utf8(b"") + // ); + // let underlying_token_address = + // mock_underlying_token_factory::token_address(underlying_token_symbol); + // + // mock_underlying_token_factory::mint( + // underlying_tokens_admin, + // signer::address_of(underlying_tokens_admin), + // 100, + // underlying_token_address + // ); let caller: &signer = underlying_tokens_admin; let to: address = signer::address_of(underlying_tokens_admin); - let reward: address = underlying_token_address; + let reward: address = @0x0; let amount: u256 = 1; pull_rewards_transfer_strategy_perform_transfer( @@ -423,19 +1154,29 @@ module aave_pool::transfer_strategy { to, reward, amount, - pull_rewards_transfer_strategy, + pull_rewards_transfer_strategy ); pull_rewards_transfer_strategy_emergency_withdrawal( caller, - underlying_token_address, + @0x0, to, amount, - pull_rewards_transfer_strategy, + pull_rewards_transfer_strategy ); } - #[test(_aave_role_super_admin = @aave_acl, _periphery_account = @aave_pool, _acl_fund_admin = @0x111, _user_account = @0x222, _creator = @0x1, underlying_tokens_admin = @underlying_tokens, aave_pool = @aave_pool,)] + #[ + test( + _aave_role_super_admin = @aave_acl, + _periphery_account = @aave_pool, + _acl_fund_admin = @0x111, + _user_account = @0x222, + _creator = @0x1, + underlying_tokens_admin = @underlying_tokens, + _aave_pool = @aave_pool + ) + ] fun test_staked_token_transfer_strategy_perform_transfer( _aave_role_super_admin: &signer, _periphery_account: &signer, @@ -443,32 +1184,32 @@ module aave_pool::transfer_strategy { _user_account: &signer, _creator: &signer, underlying_tokens_admin: &signer, - aave_pool: &signer + _aave_pool: &signer ) { - mock_underlying_token_factory::test_init_module(aave_pool); - let underlying_token_name = utf8(b"TOKEN_1"); - let underlying_token_symbol = utf8(b"T1"); - let underlying_token_decimals = 3; - let underlying_token_max_supply = 10000; - - mock_underlying_token_factory::create_token( - underlying_tokens_admin, - underlying_token_max_supply, - underlying_token_name, - underlying_token_symbol, - underlying_token_decimals, - utf8(b""), - utf8(b""), - ); - let underlying_token_address = - mock_underlying_token_factory::token_address(underlying_token_symbol); - - mock_underlying_token_factory::mint( - underlying_tokens_admin, - signer::address_of(underlying_tokens_admin), - 100, - underlying_token_address, - ); + // mock_underlying_token_factory::test_init_module(aave_pool); + // let underlying_token_name = utf8(b"TOKEN_1"); + // let underlying_token_symbol = utf8(b"T1"); + // let underlying_token_decimals = 3; + // let underlying_token_max_supply = 10000; + // + // mock_underlying_token_factory::create_token( + // underlying_tokens_admin, + // underlying_token_max_supply, + // underlying_token_name, + // underlying_token_symbol, + // underlying_token_decimals, + // utf8(b""), + // utf8(b"") + // ); + // let underlying_token_address = + // mock_underlying_token_factory::token_address(underlying_token_symbol); + // + // mock_underlying_token_factory::mint( + // underlying_tokens_admin, + // signer::address_of(underlying_tokens_admin), + // 100, + // underlying_token_address + // ); let staked_token_transfer_strategy = StakedTokenTransferStrategy { rewards_admin: signer::address_of(underlying_tokens_admin), @@ -476,7 +1217,7 @@ module aave_pool::transfer_strategy { stake_contract: aave_pool::staked_token::create_mock_staked_token( signer::address_of(underlying_tokens_admin) ), - underlying_token: underlying_token_address, + underlying_token: @0x0 }; let caller: &signer = underlying_tokens_admin; @@ -489,11 +1230,21 @@ module aave_pool::transfer_strategy { to, reward, amount, - staked_token_transfer_strategy, + staked_token_transfer_strategy ); } - #[test(_aave_role_super_admin = @aave_acl, _periphery_account = @aave_pool, _acl_fund_admin = @0x111, _user_account = @0x222, _creator = @0x1, underlying_tokens_admin = @underlying_tokens, aave_pool = @aave_pool,)] + #[ + test( + _aave_role_super_admin = @aave_acl, + _periphery_account = @aave_pool, + _acl_fund_admin = @0x111, + _user_account = @0x222, + _creator = @0x1, + underlying_tokens_admin = @underlying_tokens, + _aave_pool = @aave_pool + ) + ] fun test_staked_token_transfer_strategy_emergency_withdrawal( _aave_role_super_admin: &signer, _periphery_account: &signer, @@ -501,32 +1252,32 @@ module aave_pool::transfer_strategy { _user_account: &signer, _creator: &signer, underlying_tokens_admin: &signer, - aave_pool: &signer, + _aave_pool: &signer ) { - mock_underlying_token_factory::test_init_module(aave_pool); - let underlying_token_name = utf8(b"TOKEN_1"); - let underlying_token_symbol = utf8(b"T1"); - let underlying_token_decimals = 3; - let underlying_token_max_supply = 10000; - - mock_underlying_token_factory::create_token( - underlying_tokens_admin, - underlying_token_max_supply, - underlying_token_name, - underlying_token_symbol, - underlying_token_decimals, - utf8(b""), - utf8(b""), - ); - let underlying_token_address = - mock_underlying_token_factory::token_address(underlying_token_symbol); - - mock_underlying_token_factory::mint( - underlying_tokens_admin, - signer::address_of(underlying_tokens_admin), - 100, - underlying_token_address, - ); + // mock_underlying_token_factory::test_init_module(aave_pool); + let _underlying_token_name = utf8(b"TOKEN_1"); + let _underlying_token_symbol = utf8(b"T1"); + let _underlying_token_decimals = 3; + let _underlying_token_max_supply = 10000; + + // mock_underlying_token_factory::create_token( + // underlying_tokens_admin, + // underlying_token_max_supply, + // underlying_token_name, + // underlying_token_symbol, + // underlying_token_decimals, + // utf8(b""), + // utf8(b"") + // ); + // let underlying_token_address = + // mock_underlying_token_factory::token_address(underlying_token_symbol); + // + // mock_underlying_token_factory::mint( + // underlying_tokens_admin, + // signer::address_of(underlying_tokens_admin), + // 100, + // underlying_token_address + // ); let staked_token_transfer_strategy = StakedTokenTransferStrategy { rewards_admin: signer::address_of(underlying_tokens_admin), @@ -534,7 +1285,7 @@ module aave_pool::transfer_strategy { stake_contract: aave_pool::staked_token::create_mock_staked_token( signer::address_of(underlying_tokens_admin) ), - underlying_token: underlying_token_address, + underlying_token: @0x0 }; let caller: &signer = underlying_tokens_admin; @@ -547,15 +1298,15 @@ module aave_pool::transfer_strategy { to, reward, amount, - staked_token_transfer_strategy, + staked_token_transfer_strategy ); staked_token_transfer_strategy_emergency_withdrawal( caller, - underlying_token_address, + @0x0, to, amount, - staked_token_transfer_strategy, + staked_token_transfer_strategy ); } } diff --git a/aave-core/sources/aave-periphery/ui_incentive_data_provider_v3.move b/aave-core/sources/aave-periphery/ui_incentive_data_provider_v3.move index d0bf030..4348a02 100644 --- a/aave-core/sources/aave-periphery/ui_incentive_data_provider_v3.move +++ b/aave-core/sources/aave-periphery/ui_incentive_data_provider_v3.move @@ -4,7 +4,7 @@ module aave_pool::ui_incentive_data_provider_v3 { use aptos_framework::object::{Self, Object}; use aave_pool::rewards_controller::Self; use aave_pool::eac_aggregator_proxy::Self; - use aave_pool::pool::{Self,}; + use aave_pool::pool::{Self}; use aave_pool::a_token_factory::Self; const EMPTY_ADDRESS: address = @0x0; @@ -16,13 +16,13 @@ module aave_pool::ui_incentive_data_provider_v3 { struct AggregatedReserveIncentiveData has store, drop { underlying_asset: address, a_incentive_data: IncentiveData, - v_incentive_data: IncentiveData, + v_incentive_data: IncentiveData } struct IncentiveData has store, drop { token_address: address, incentive_controller_address: address, - rewards_token_information: vector, + rewards_token_information: vector } struct RewardInfo has store, drop { @@ -36,13 +36,13 @@ module aave_pool::ui_incentive_data_provider_v3 { reward_price_feed: u256, reward_token_decimals: u8, precision: u8, - price_feed_decimals: u8, + price_feed_decimals: u8 } struct UserReserveIncentiveData has store, drop { underlying_asset: address, a_token_incentives_user_data: UserIncentiveData, - v_token_incentives_user_data: UserIncentiveData, + v_token_incentives_user_data: UserIncentiveData } struct UserIncentiveData has store, drop { @@ -59,17 +59,17 @@ module aave_pool::ui_incentive_data_provider_v3 { token_incentives_user_index: u256, reward_price_feed: u256, price_feed_decimals: u8, - reward_token_decimals: u8, + reward_token_decimals: u8 } - fun init_module(sender: &signer,) { + fun init_module(sender: &signer) { let state_object_constructor_ref = &object::create_named_object(sender, UI_INCENTIVE_DATA_PROVIDER_V3_NAME); let state_object_signer = &object::generate_signer(state_object_constructor_ref); move_to( state_object_signer, - UiIncentiveDataProviderV3Data {}, + UiIncentiveDataProviderV3Data {} ); } @@ -84,18 +84,17 @@ module aave_pool::ui_incentive_data_provider_v3 { } #[view] - public fun ui_incentive_data_provider_v3_data_object() - : Object { + public fun ui_incentive_data_provider_v3_data_object(): + Object { object::address_to_object( ui_incentive_data_provider_v3_data_address() ) } #[view] - public fun get_full_reserves_incentive_data(user: address) - : ( - vector, vector - ) { + public fun get_full_reserves_incentive_data( + user: address + ): (vector, vector) { (get_reserves_incentives_data(), get_user_reserves_incentives_data(user)) } @@ -110,7 +109,7 @@ module aave_pool::ui_incentive_data_provider_v3 { let rewards_controller_address = rewards_controller::rewards_controller_address(); // TODO Waiting for Chainlink oracle functionality - let reward_oracle_address = @aave_mock_oracle; + let reward_oracle_address = @aave_oracle; if (rewards_controller_address != EMPTY_ADDRESS) { @@ -118,8 +117,7 @@ module aave_pool::ui_incentive_data_provider_v3 { let a_token_address = pool::get_reserve_a_token_address(&base_data); let a_token_reward_addresses = rewards_controller::get_rewards_by_asset( - a_token_address, - rewards_controller_address, + a_token_address, rewards_controller_address ); let reward_information: vector = vector[]; @@ -136,7 +134,7 @@ module aave_pool::ui_incentive_data_provider_v3 { rewards_controller::get_rewards_data( a_token_address, reward_token_address, - rewards_controller_address, + rewards_controller_address ); let precision = @@ -164,15 +162,15 @@ module aave_pool::ui_incentive_data_provider_v3 { reward_price_feed, reward_token_decimals, precision, - price_feed_decimals, - }, + price_feed_decimals + } ); }; let a_incentive_data = IncentiveData { token_address: a_token_address, incentive_controller_address: rewards_controller_address, - rewards_token_information: reward_information, + rewards_token_information: reward_information }; // ===================== variable debt token ==================== @@ -181,7 +179,7 @@ module aave_pool::ui_incentive_data_provider_v3 { let var_debt_token_reward_addresses = rewards_controller::get_rewards_by_asset( variable_debt_token_address, - rewards_controller_address, + rewards_controller_address ); let reward_information: vector = vector[]; @@ -198,7 +196,7 @@ module aave_pool::ui_incentive_data_provider_v3 { rewards_controller::get_rewards_data( variable_debt_token_address, reward_token_address, - rewards_controller_address, + rewards_controller_address ); let precision = @@ -226,15 +224,15 @@ module aave_pool::ui_incentive_data_provider_v3 { reward_price_feed, reward_token_decimals, precision, - price_feed_decimals, - }, + price_feed_decimals + } ); }; let v_incentive_data = IncentiveData { token_address: variable_debt_token_address, incentive_controller_address: rewards_controller_address, - rewards_token_information: reward_information, + rewards_token_information: reward_information }; vector::push_back( @@ -242,8 +240,8 @@ module aave_pool::ui_incentive_data_provider_v3 { AggregatedReserveIncentiveData { underlying_asset, a_incentive_data, - v_incentive_data, - }, + v_incentive_data + } ) }; }; @@ -251,8 +249,8 @@ module aave_pool::ui_incentive_data_provider_v3 { } #[view] - public fun get_user_reserves_incentives_data(user: address) - : vector { + public fun get_user_reserves_incentives_data(user: address): + vector { let reserves = pool::get_reserves_list(); let user_reserves_incentives_data = vector::empty(); @@ -262,7 +260,7 @@ module aave_pool::ui_incentive_data_provider_v3 { let rewards_controller_address = rewards_controller::rewards_controller_address(); // TODO Waiting for Chainlink oracle functionality - let reward_oracle_address = @aave_mock_oracle; + let reward_oracle_address = @aave_oracle; if (rewards_controller_address != EMPTY_ADDRESS) { @@ -270,8 +268,7 @@ module aave_pool::ui_incentive_data_provider_v3 { let a_token_address = pool::get_reserve_a_token_address(&base_data); let a_token_reward_addresses = rewards_controller::get_rewards_by_asset( - a_token_address, - rewards_controller_address, + a_token_address, rewards_controller_address ); let user_rewards_information: vector = vector[]; @@ -284,7 +281,7 @@ module aave_pool::ui_incentive_data_provider_v3 { user, a_token_address, reward_token_address, - rewards_controller_address, + rewards_controller_address ); let user_unclaimed_rewards = @@ -309,15 +306,15 @@ module aave_pool::ui_incentive_data_provider_v3 { token_incentives_user_index, reward_price_feed, price_feed_decimals, - reward_token_decimals, - }, + reward_token_decimals + } ); }; let a_incentive_data = UserIncentiveData { token_address: a_token_address, incentive_controller_address: rewards_controller_address, - user_rewards_information, + user_rewards_information }; // ===================== variable debt token ==================== @@ -326,7 +323,7 @@ module aave_pool::ui_incentive_data_provider_v3 { let var_debt_token_reward_addresses = rewards_controller::get_rewards_by_asset( variable_debt_token_address, - rewards_controller_address, + rewards_controller_address ); let user_rewards_information: vector = vector[]; @@ -339,7 +336,7 @@ module aave_pool::ui_incentive_data_provider_v3 { user, variable_debt_token_address, reward_token_address, - rewards_controller_address, + rewards_controller_address ); let user_unclaimed_rewards = @@ -364,15 +361,15 @@ module aave_pool::ui_incentive_data_provider_v3 { token_incentives_user_index, reward_price_feed, price_feed_decimals, - reward_token_decimals, - }, + reward_token_decimals + } ); }; let v_incentive_data = UserIncentiveData { token_address: variable_debt_token_address, incentive_controller_address: rewards_controller_address, - user_rewards_information, + user_rewards_information }; vector::push_back( @@ -380,11 +377,307 @@ module aave_pool::ui_incentive_data_provider_v3 { UserReserveIncentiveData { underlying_asset, a_token_incentives_user_data: a_incentive_data, - v_token_incentives_user_data: v_incentive_data, - }, + v_token_incentives_user_data: v_incentive_data + } ) }; }; user_reserves_incentives_data } + + #[test_only] + use std::signer; + #[test_only] + use std::string::{Self, utf8}; + #[test_only] + use aptos_std::string_utils::{Self}; + + #[test_only] + const TEST_SUCCESS: u64 = 1; + #[test_only] + const TEST_FAILED: u64 = 2; + + #[test(aave_pool = @aave_pool)] + fun test_ui_incentive_data_provider_v3_data_address( + aave_pool: &signer + ) { + init_module_test(aave_pool); + assert!( + ui_incentive_data_provider_v3_data_address() + == object::create_object_address( + &@aave_pool, UI_INCENTIVE_DATA_PROVIDER_V3_NAME + ), + TEST_SUCCESS + ); + } + + #[test(aave_pool = @aave_pool)] + fun test_ui_incentive_data_provider_v3_data_object( + aave_pool: &signer + ) { + // init acl + init_module_test(aave_pool); + assert!( + ui_incentive_data_provider_v3_data_object() + == object::address_to_object( + ui_incentive_data_provider_v3_data_address() + ), + TEST_SUCCESS + ); + } + + #[ + test( + aave_pool = @aave_pool, + aave_acl = @aave_acl, + underlying_tokens = @underlying_tokens, + aave_rate = @aave_rate + ) + ] + fun test_get_full_reserves_incentive_data( + aave_pool: &signer, + aave_acl: &signer, + underlying_tokens: &signer, + aave_rate: &signer + ) { + aptos_framework::account::create_account_for_test( + signer::address_of(aave_pool) + ); + + // init current module + init_module_test(aave_pool); + + // init rewards controller + aave_pool::rewards_controller::initialize( + aave_pool, signer::address_of(aave_pool) + ); + + // init acl + aave_acl::acl_manage::test_init_module(aave_acl); + + let role_admin = aave_acl::acl_manage::get_pool_admin_role(); + aave_acl::acl_manage::grant_role( + aave_acl, + aave_acl::acl_manage::get_pool_admin_role_for_testing(), + signer::address_of(aave_pool) + ); + aave_acl::acl_manage::grant_role( + aave_acl, + aave_acl::acl_manage::get_pool_admin_role_for_testing(), + signer::address_of(aave_acl) + ); + aave_acl::acl_manage::set_role_admin( + aave_acl, + aave_acl::acl_manage::get_pool_admin_role_for_testing(), + role_admin + ); + + // init the rate module - default strategy + aave_rate::default_reserve_interest_rate_strategy::init_interest_rate_strategy( + aave_rate + ); + + // init tokens base + aave_pool::token_base::test_init_module(aave_pool); + + // init a token factory + aave_pool::a_token_factory::test_init_module(aave_pool); + + // init debt token factory + aave_pool::variable_debt_token_factory::test_init_module(aave_pool); + + // init underlyings token factory + aave_pool::mock_underlying_token_factory::test_init_module(aave_pool); + + // create mocked underlying tokens + let i = 0; + let treasury = signer::address_of(underlying_tokens); + let a_token_name = string::utf8(b"a"); + let a_token_symbol = string::utf8(b"a"); + let variable_debt_token_name = string::utf8(b"BTC"); + let variable_debt_token_symbol = string::utf8(b"BTC"); + + let name = string_utils::format1(&b"APTOS_UNDERLYING_{}", i); + let symbol = string_utils::format1(&b"U_{}", i); + let decimals = 6; + let max_supply = 10000; + aave_pool::mock_underlying_token_factory::create_token( + underlying_tokens, + max_supply, + name, + symbol, + decimals, + utf8(b""), + utf8(b"") + ); + + let underlying_asset_address = @0x033; + let treasury_address = @0x034; + + // create atokens + aave_pool::a_token_factory::create_token( + aave_pool, + name, + symbol, + decimals, + utf8(b""), + utf8(b""), + underlying_asset_address, + treasury_address + ); + + let underlying_token_address = + aave_pool::mock_underlying_token_factory::token_address(symbol); + + // init the pool + aave_pool::pool::test_init_pool(aave_pool); + + // set reserve interest rate using the pool admin + let optimal_usage_ratio: u256 = + aave_math::wad_ray_math::get_half_ray_for_testing(); + let base_variable_borrow_rate: u256 = 0; + let variable_rate_slope1: u256 = 0; + let variable_rate_slope2: u256 = 0; + aave_rate::default_reserve_interest_rate_strategy::set_reserve_interest_rate_strategy( + aave_pool, + underlying_token_address, + optimal_usage_ratio, + base_variable_borrow_rate, + variable_rate_slope1, + variable_rate_slope2 + ); + + // create reserves using the pool admin + aave_pool::pool::init_reserve( + aave_pool, + underlying_token_address, + treasury, + a_token_name, + a_token_symbol, + variable_debt_token_name, + variable_debt_token_symbol + ); + + let index = 0; + let emission_per_second = 0; + let last_update_timestamp = 0; + let distribution_end = 0; + + let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); + + let name_2 = string_utils::format1(&b"APTOS_UNDERLYING_2_{}", i); + let symbol_2 = string_utils::format1(&b"U_2_{}", i); + let decimals_2 = 2 + i; + + aave_pool::a_token_factory::create_token( + aave_pool, + name_2, + symbol_2, + decimals_2, + utf8(b"2"), + utf8(b"2"), + rewards_addr, + treasury_address + ); + + let a_token_address_2 = + a_token_factory::token_address(signer::address_of(aave_pool), symbol_2); + + let users_data = std::simple_map::new(); + + let reward_data = + aave_pool::rewards_controller::create_reward_data( + index, + emission_per_second, + last_update_timestamp, + distribution_end, + users_data + ); + + let rewards_map = std::simple_map::new(); + + std::simple_map::upsert(&mut rewards_map, a_token_address_2, reward_data); + + let available_rewards_count = 1; + let decimals = 2; + let available_rewards = std::simple_map::new(); + std::simple_map::upsert(&mut available_rewards, 0, a_token_address_2); + + let asset_data = + aave_pool::rewards_controller::create_asset_data( + rewards_map, + available_rewards, + available_rewards_count, + decimals + ); + + let base_data = aave_pool::pool::get_reserve_data(underlying_token_address); + let asset = aave_pool::pool::get_reserve_a_token_address(&base_data); + + aave_pool::rewards_controller::add_asset(rewards_addr, asset, asset_data); + + aave_pool::rewards_controller::add_rewards_by_asset( + asset, rewards_addr, 0, a_token_address_2 + ); + + let rewards_map_2 = std::simple_map::new(); + let reward_data_2 = + aave_pool::rewards_controller::create_reward_data( + index, + emission_per_second, + last_update_timestamp, + distribution_end, + users_data + ); + std::simple_map::upsert(&mut rewards_map_2, a_token_address_2, reward_data_2); + + let available_rewards_2 = std::simple_map::new(); + std::simple_map::upsert(&mut available_rewards_2, 0, a_token_address_2); + + let asset_data_2 = + aave_pool::rewards_controller::create_asset_data( + rewards_map_2, + available_rewards_2, + available_rewards_count, + decimals + ); + + let variable_debt_token_address = + pool::get_reserve_variable_debt_token_address(&base_data); + aave_pool::rewards_controller::add_asset( + rewards_addr, variable_debt_token_address, asset_data_2 + ); + aave_pool::rewards_controller::add_rewards_by_asset( + variable_debt_token_address, + rewards_addr, + 0, + a_token_address_2 + ); + + let user_data = aave_pool::rewards_controller::create_user_data(0, 0); + aave_pool::rewards_controller::add_user_asset_index( + rewards_addr, + asset, + a_token_address_2, + rewards_addr, + user_data + ); + + aave_pool::rewards_controller::add_user_asset_index( + rewards_addr, + variable_debt_token_address, + a_token_address_2, + rewards_addr, + user_data + ); + + aave_pool::rewards_controller::add_to_assets_list(asset, rewards_addr); + + let (reserves_incentives_data, _user_reserves_incentives_data) = + get_full_reserves_incentive_data(rewards_addr); + assert!( + vector::length(&reserves_incentives_data) != 0, + TEST_SUCCESS + ); + } } diff --git a/aave-core/sources/aave-periphery/ui_pool_data_provider_v3.move b/aave-core/sources/aave-periphery/ui_pool_data_provider_v3.move index 3f2fd84..031ffa4 100644 --- a/aave-core/sources/aave-periphery/ui_pool_data_provider_v3.move +++ b/aave-core/sources/aave-periphery/ui_pool_data_provider_v3.move @@ -3,17 +3,18 @@ module aave_pool::ui_pool_data_provider_v3 { use std::string::String; use std::vector; use aptos_framework::object::{Self, Object}; - - use aave_config::reserve as reserve_config; - use aave_config::user::Self as user_config; - use aave_mock_oracle::oracle::{get_asset_price, get_base_currency_unit}; - use aave_pool::mock_underlying_token_factory::Self; + use aptos_framework::primary_fungible_store; + use aptos_framework::fungible_asset::{Self, Metadata}; + use aave_config::reserve_config; + use aave_config::user_config; + use aave_oracle::oracle::{get_asset_price}; + use aave_oracle::oracle_base::{get_oracle_base_currency, get_base_currency_unit}; use aave_pool::a_token_factory; - use aave_pool::default_reserve_interest_rate_strategy::{ + use aave_rate::default_reserve_interest_rate_strategy::{ get_base_variable_borrow_rate, get_optimal_usage_ratio, get_variable_rate_slope1, - get_variable_rate_slope2, + get_variable_rate_slope2 }; use aave_pool::eac_aggregator_proxy::{ create_eac_aggregator_proxy, @@ -40,7 +41,7 @@ module aave_pool::ui_pool_data_provider_v3 { const EMPTY_ADDRESS: address = @0x0; - const ETH_CURRENCY_UNIT: u256 = 1; + const APT_CURRENCY_UNIT: u256 = 100000000; const EROLE_NOT_EXISTS: u64 = 1; const ESTREAM_NOT_EXISTS: u64 = 2; @@ -59,7 +60,7 @@ module aave_pool::ui_pool_data_provider_v3 { struct UiPoolDataProviderV3Data has key { network_base_token_price_in_usd_proxy_aggregator: MockEacAggregatorProxy, - market_reference_currency_price_in_usd_proxy_aggregator: MockEacAggregatorProxy, + market_reference_currency_price_in_usd_proxy_aggregator: MockEacAggregatorProxy } struct AggregatedReserveData has key, store, drop { @@ -99,7 +100,7 @@ module aave_pool::ui_pool_data_provider_v3 { unbacked: u128, isolation_mode_total_debt: u128, flash_loan_enabled: bool, - // + // debts debt_ceiling: u256, debt_ceiling_decimals: u256, e_mode_category_id: u8, @@ -114,21 +115,27 @@ module aave_pool::ui_pool_data_provider_v3 { borrowable_in_isolation: bool } + #[test_only] + public fun get_available_liquidity(self: &AggregatedReserveData): u256 { + self.available_liquidity + } + struct UserReserveData has key, store, drop { + decimals: u256, underlying_asset: address, scaled_a_token_balance: u256, usage_as_collateral_enabled_on_user: bool, - scaled_variable_debt: u256, + scaled_variable_debt: u256 } struct BaseCurrencyInfo has key, store, drop { market_reference_currency_unit: u256, market_reference_currency_price_in_usd: u256, network_base_token_price_in_usd: u256, - network_base_token_price_decimals: u8, + network_base_token_price_decimals: u8 } - fun init_module(sender: &signer,) { + fun init_module(sender: &signer) { let state_object_constructor_ref = &object::create_named_object(sender, UI_POOL_DATA_PROVIDER_V3_NAME); let state_object_signer = &object::generate_signer(state_object_constructor_ref); @@ -137,8 +144,8 @@ module aave_pool::ui_pool_data_provider_v3 { state_object_signer, UiPoolDataProviderV3Data { network_base_token_price_in_usd_proxy_aggregator: create_eac_aggregator_proxy(), - market_reference_currency_price_in_usd_proxy_aggregator: create_eac_aggregator_proxy(), - }, + market_reference_currency_price_in_usd_proxy_aggregator: create_eac_aggregator_proxy() + } ); } @@ -166,8 +173,7 @@ module aave_pool::ui_pool_data_provider_v3 { #[view] public fun get_reserves_data(): (vector, BaseCurrencyInfo) { - // TODO Waiting for Chainlink oracle functionality - let oracle = @aave_mock_oracle; + let oracle = @aave_oracle; let reserves = pool::get_reserves_list(); @@ -191,16 +197,22 @@ module aave_pool::ui_pool_data_provider_v3 { let price_oracle = oracle; + let atoken_accunt_address = + a_token_factory::get_token_account_address(a_token_address); + + let underlying_asset_metadata = + object::address_to_object(underlying_asset); + let available_liquidity = - mock_underlying_token_factory::balance_of( - a_token_address, underlying_asset + primary_fungible_store::balance( + atoken_accunt_address, underlying_asset_metadata ); let total_scaled_variable_debt = token_base::scaled_total_supply(variable_debt_token_address); - let symbol = mock_underlying_token_factory::symbol(underlying_asset); - let name = mock_underlying_token_factory::name(underlying_asset); + let symbol = fungible_asset::symbol(underlying_asset_metadata); + let name = fungible_asset::name(underlying_asset_metadata); let reserve_configuration_map = pool::get_reserve_configuration_by_reserve_data(&base_data); @@ -307,27 +319,20 @@ module aave_pool::ui_pool_data_provider_v3 { let network_base_token_price_in_usd = latest_answer(); let network_base_token_price_decimals = decimals(); - let opt_base_currency_unit = get_base_currency_unit(); - - let market_reference_currency_unit = - if (option::is_some(&opt_base_currency_unit)) { - *option::borrow(&opt_base_currency_unit) - } else { - ETH_CURRENCY_UNIT - }; - - let market_reference_currency_price_in_usd = - if (option::is_some(&opt_base_currency_unit)) { - *option::borrow(&opt_base_currency_unit) + let opt_base_currency = get_oracle_base_currency(); + let (market_reference_currency_unit, market_reference_currency_price_in_usd) = + if (option::is_some(&opt_base_currency)) { + let unit = get_base_currency_unit(&*option::borrow(&opt_base_currency)); + ((unit as u256), (unit as u256)) } else { - latest_answer() + (APT_CURRENCY_UNIT, latest_answer()) }; let base_currency_info = BaseCurrencyInfo { market_reference_currency_unit, market_reference_currency_price_in_usd, network_base_token_price_in_usd, - network_base_token_price_decimals, + network_base_token_price_decimals }; (reserves_data, base_currency_info) } @@ -345,6 +350,11 @@ module aave_pool::ui_pool_data_provider_v3 { let underlying_asset = *vector::borrow(&reserves, i); let base_data = pool::get_reserve_data(underlying_asset); + let reserve_index = pool::get_reserve_id(&base_data); + let decimals = + fungible_asset::decimals( + object::address_to_object(underlying_asset) + ); let scaled_a_token_balance = a_token_factory::scaled_balance_of( @@ -352,26 +362,399 @@ module aave_pool::ui_pool_data_provider_v3 { ); let usage_as_collateral_enabled_on_user = - user_config::is_using_as_collateral(&user_config, (i as u256)); + user_config::is_using_as_collateral(&user_config, (reserve_index as u256)); let scaled_variable_debt = 0; - if (user_config::is_borrowing(&user_config, (i as u256))) { + if (user_config::is_borrowing(&user_config, (reserve_index as u256))) { scaled_variable_debt = variable_debt_token_factory::scaled_balance_of( - pool::get_reserve_variable_debt_token_address(&base_data), user + user, pool::get_reserve_variable_debt_token_address(&base_data) ); }; vector::push_back( &mut user_reserves_data, UserReserveData { + decimals: (decimals as u256), underlying_asset, scaled_a_token_balance, usage_as_collateral_enabled_on_user, - scaled_variable_debt, - }, + scaled_variable_debt + } ); }; (user_reserves_data, (user_emode_category_id as u8)) } + + #[test_only] + const TEST_SUCCESS: u64 = 1; + #[test_only] + const TEST_FAILED: u64 = 2; + + #[test_only] + use std::string::{Self, utf8}; + #[test_only] + use std::signer; + #[test_only] + use aptos_std::string_utils; + #[test_only] + use aave_rate::default_reserve_interest_rate_strategy::Self; + #[test_only] + use aave_math::wad_ray_math; + #[test_only] + use aptos_framework::account; + + #[test] + fun test_ui_pool_data_provider_v3_data_address() { + assert!( + ui_pool_data_provider_v3_data_address() + == object::create_object_address( + &@aave_pool, UI_POOL_DATA_PROVIDER_V3_NAME + ), + TEST_SUCCESS + ); + } + + #[test(aave_role_super_admin = @aave_pool)] + fun test_ui_pool_data_provider_v3_data_object( + aave_role_super_admin: &signer + ) { + init_module_test(aave_role_super_admin); + assert!( + ui_pool_data_provider_v3_data_object() + == object::address_to_object( + ui_pool_data_provider_v3_data_address() + ), + TEST_SUCCESS + ); + } + + #[ + test( + aave_pool = @aave_pool, + aave_acl = @aave_acl, + underlying_tokens = @underlying_tokens, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + aave_rate = @aave_rate + ) + ] + fun test_get_reserves_data( + aave_pool: &signer, + aave_acl: &signer, + underlying_tokens: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, + aave_rate: &signer + ) { + use aave_pool::mock_underlying_token_factory::Self; + + account::create_account_for_test(signer::address_of(aave_pool)); + + // init current module + init_module_test(aave_pool); + + // init acl + aave_acl::acl_manage::test_init_module(aave_acl); + let role_admin = aave_acl::acl_manage::get_pool_admin_role(); + aave_acl::acl_manage::grant_role( + aave_acl, + aave_acl::acl_manage::get_pool_admin_role_for_testing(), + signer::address_of(aave_pool) + ); + + aave_acl::acl_manage::grant_role( + aave_acl, + aave_acl::acl_manage::get_pool_admin_role_for_testing(), + signer::address_of(aave_acl) + ); + // set role admin + aave_acl::acl_manage::set_role_admin( + aave_acl, + aave_acl::acl_manage::get_pool_admin_role_for_testing(), + role_admin + ); + + aave_acl::acl_manage::add_pool_admin( + aave_acl, signer::address_of(underlying_tokens) + ); + + // init tokens base + token_base::test_init_module(aave_pool); + + // init a token factory + aave_pool::a_token_factory::test_init_module(aave_pool); + + // init debt token factory + aave_pool::variable_debt_token_factory::test_init_module(aave_pool); + + // init underlyings token factory + aave_pool::mock_underlying_token_factory::test_init_module(aave_pool); + + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); + + // create mocked underlying tokens + let i = 0; + let treasury = signer::address_of(underlying_tokens); + let a_token_name = string::utf8(b"a"); + let a_token_symbol = string::utf8(b"a"); + let variable_debt_token_name = string::utf8(b"BTC"); + let variable_debt_token_symbol = string::utf8(b"BTC"); + + let name = string_utils::format1(&b"APTOS_UNDERLYING_{}", i); + let symbol = string_utils::format1(&b"U_{}", i); + let decimals = 6; + let max_supply = 10000; + mock_underlying_token_factory::create_token( + underlying_tokens, + max_supply, + name, + symbol, + decimals, + utf8(b""), + utf8(b"") + ); + + let underlying_asset_address = @0x033; + let treasury_address = @0x034; + + a_token_factory::create_token( + aave_pool, + name, + symbol, + decimals, + utf8(b""), + utf8(b""), + underlying_asset_address, + treasury_address + ); + + aave_rate::default_reserve_interest_rate_strategy::init_interest_rate_strategy( + aave_rate + ); + + let underlying_token_address = + mock_underlying_token_factory::token_address(symbol); + + // register asset with oracle + aave_oracle::oracle::set_asset_feed_id( + underlying_tokens, + underlying_token_address, + aave_oracle::oracle_tests::get_test_feed_id() + ); + + // init the pool + aave_pool::pool::test_init_pool(aave_pool); + + // set reserve interest rate using the pool admin + let optimal_usage_ratio: u256 = wad_ray_math::get_half_ray_for_testing(); + let base_variable_borrow_rate: u256 = 0; + let variable_rate_slope1: u256 = 0; + let variable_rate_slope2: u256 = 0; + default_reserve_interest_rate_strategy::set_reserve_interest_rate_strategy( + aave_acl, + underlying_token_address, + optimal_usage_ratio, + base_variable_borrow_rate, + variable_rate_slope1, + variable_rate_slope2 + ); + + // create reserves using the pool admin + aave_pool::pool::test_init_reserve( + aave_pool, + underlying_token_address, + treasury, + a_token_name, + a_token_symbol, + variable_debt_token_name, + variable_debt_token_symbol + ); + + // init emode + aave_pool::emode_logic::init_emode(aave_pool); + + let (_vector_aggregated_reserve_data, base_currency_info) = get_reserves_data(); + + let network_base_token_price_in_usd = latest_answer(); + let network_base_token_price_decimals = decimals(); + + let opt_base_currency = get_oracle_base_currency(); + let (market_reference_currency_unit, market_reference_currency_price_in_usd) = + if (option::is_some(&opt_base_currency)) { + let unit = get_base_currency_unit(&*option::borrow(&opt_base_currency)); + ((unit as u256), (unit as u256)) + } else { + (APT_CURRENCY_UNIT, latest_answer()) + }; + + let base_currency_info_exp = BaseCurrencyInfo { + market_reference_currency_unit, + market_reference_currency_price_in_usd, + network_base_token_price_in_usd, + network_base_token_price_decimals + }; + + assert!( + base_currency_info == base_currency_info_exp, + TEST_SUCCESS + ); + } + + #[ + test( + aave_pool = @aave_pool, + aave_acl = @aave_acl, + underlying_tokens = @underlying_tokens, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + aave_rate = @aave_rate + ) + ] + fun test_get_user_reserves_data( + aave_pool: &signer, + aave_acl: &signer, + underlying_tokens: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, + aave_rate: &signer + ) { + use aave_pool::mock_underlying_token_factory::Self; + + account::create_account_for_test(signer::address_of(aave_pool)); + + // init current module + init_module_test(aave_pool); + + // init acl + aave_acl::acl_manage::test_init_module(aave_acl); + let role_admin = aave_acl::acl_manage::get_pool_admin_role(); + aave_acl::acl_manage::grant_role( + aave_acl, + aave_acl::acl_manage::get_pool_admin_role_for_testing(), + signer::address_of(aave_pool) + ); + + aave_acl::acl_manage::grant_role( + aave_acl, + aave_acl::acl_manage::get_pool_admin_role_for_testing(), + signer::address_of(aave_acl) + ); + // set role admin + aave_acl::acl_manage::set_role_admin( + aave_acl, + aave_acl::acl_manage::get_pool_admin_role_for_testing(), + role_admin + ); + + aave_acl::acl_manage::add_pool_admin( + aave_acl, signer::address_of(underlying_tokens) + ); + + // init tokens base + token_base::test_init_module(aave_pool); + + // init a token factory + aave_pool::a_token_factory::test_init_module(aave_pool); + + // init debt token factory + aave_pool::variable_debt_token_factory::test_init_module(aave_pool); + + // init underlyings token factory + aave_pool::mock_underlying_token_factory::test_init_module(aave_pool); + + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); + + // create mocked underlying tokens + let i = 0; + let treasury = signer::address_of(underlying_tokens); + let a_token_name = string::utf8(b"a"); + let a_token_symbol = string::utf8(b"a"); + let variable_debt_token_name = string::utf8(b"BTC"); + let variable_debt_token_symbol = string::utf8(b"BTC"); + + let name = string_utils::format1(&b"APTOS_UNDERLYING_{}", i); + let symbol = string_utils::format1(&b"U_{}", i); + let decimals = 6; + let max_supply = 10000; + mock_underlying_token_factory::create_token( + underlying_tokens, + max_supply, + name, + symbol, + decimals, + utf8(b""), + utf8(b"") + ); + + let underlying_asset_address = @0x033; + let treasury_address = @0x034; + + a_token_factory::create_token( + aave_pool, + name, + symbol, + decimals, + utf8(b""), + utf8(b""), + underlying_asset_address, + treasury_address + ); + + // init rate strategy - default strategy + aave_rate::default_reserve_interest_rate_strategy::init_interest_rate_strategy( + aave_rate + ); + + let underlying_token_address = + mock_underlying_token_factory::token_address(symbol); + + // init the pool + aave_pool::pool::test_init_pool(aave_pool); + + // set reserve interest rate using the pool admin + let optimal_usage_ratio: u256 = wad_ray_math::get_half_ray_for_testing(); + let base_variable_borrow_rate: u256 = 0; + let variable_rate_slope1: u256 = 0; + let variable_rate_slope2: u256 = 0; + default_reserve_interest_rate_strategy::set_reserve_interest_rate_strategy( + aave_acl, + underlying_token_address, + optimal_usage_ratio, + base_variable_borrow_rate, + variable_rate_slope1, + variable_rate_slope2 + ); + + // create reserves using the pool admin + aave_pool::pool::test_init_reserve( + aave_pool, + underlying_token_address, + treasury, + a_token_name, + a_token_symbol, + variable_debt_token_name, + variable_debt_token_symbol + ); + + // init emode + aave_pool::emode_logic::init_emode(aave_pool); + + let (_vector_aggregated_reserve_data, user_emode_category) = + get_user_reserves_data(signer::address_of(aave_pool)); + + let user_emode_category_id = + emode_logic::get_user_emode(signer::address_of(aave_pool)); + + assert!( + user_emode_category == (user_emode_category_id as u8), + TEST_SUCCESS + ); + } } diff --git a/aave-core/sources/aave-pool/pool.move b/aave-core/sources/aave-pool/pool.move index 048770d..1571c1c 100644 --- a/aave-core/sources/aave-pool/pool.move +++ b/aave-core/sources/aave-pool/pool.move @@ -7,15 +7,15 @@ module aave_pool::pool { use aptos_framework::timestamp; use aave_acl::acl_manage; - use aave_config::error as error_config; - use aave_config::reserve::{Self as reserve_config, ReserveConfigurationMap}; - use aave_config::user::{Self as user_config, UserConfigurationMap}; + use aave_config::error_config; + use aave_config::reserve_config::{Self, ReserveConfigurationMap}; + use aave_config::user_config::{Self, UserConfigurationMap}; use aave_math::math_utils; use aave_math::wad_ray_math; + use aave_rate::interest_rate_strategy; use aave_pool::a_token_factory; - use aave_pool::default_reserve_interest_rate_strategy; - use aave_pool::mock_underlying_token_factory; + use aave_pool::fungible_asset_manager; use aave_pool::variable_debt_token_factory; friend aave_pool::pool_configurator; @@ -28,6 +28,8 @@ module aave_pool::pool { #[test_only] friend aave_pool::pool_tests; + #[test_only] + friend aave_pool::ui_incentive_data_provider_v3; const POOL_REVISION: u256 = 0x1; @@ -57,7 +59,7 @@ module aave_pool::pool { liquidity_rate: u256, variable_borrow_rate: u256, liquidity_index: u256, - variable_borrow_index: u256, + variable_borrow_index: u256 } #[event] @@ -66,16 +68,16 @@ module aave_pool::pool { /// @param amount_minted The amount minted to the treasury struct MintedToTreasury has store, drop { reserve: address, - amount_minted: u256, + amount_minted: u256 } #[event] /// @dev Emitted on borrow(), repay() and liquidation_call() when using isolated assets /// @param asset The address of the underlying asset of the reserve - /// @param totalDebt The total isolation mode debt for the reserve + /// @param total_debt The total isolation mode debt for the reserve struct IsolationModeTotalDebtUpdated has store, drop { asset: address, - total_debt: u256, + total_debt: u256 } struct ReserveExtendConfiguration has key, store, drop { @@ -84,7 +86,7 @@ module aave_pool::pool { /// Total FlashLoan Premium, expressed in bps flash_loan_premium_total: u128, /// FlashLoan premium paid to protocol treasury, expressed in bps - flash_loan_premium_to_protocol: u128, + flash_loan_premium_to_protocol: u128 } struct ReserveData has key, store, copy, drop { @@ -111,7 +113,7 @@ module aave_pool::pool { /// the outstanding unbacked aTokens minted through the bridging feature unbacked: u128, /// the outstanding debt borrowed against this asset in isolation mode - isolation_mode_total_debt: u128, + isolation_mode_total_debt: u128 } /// Map of reserves and their data (underlying_asset_of_reserve => reserveData) @@ -119,45 +121,58 @@ module aave_pool::pool { /// SmartTable to store reserve data with asset addresses as keys value: SmartTable, /// Maximum number of active reserves there have been in the protocol. It is the upper bound of the reserves list - count: u16, + count: u16 } /// List of reserves as a map (reserveId => reserve). /// It is structured as a mapping for gas savings reasons, using the reserve id as index struct ReserveAddressesList has key { - value: SmartTable, + value: SmartTable } /// Map of users address and their configuration data (user_address => UserConfigurationMap) struct UsersConfig has key { - value: SmartTable, + value: SmartTable } - /// @notice init pool + /// @notice Initializes the pool + /// @dev Only callable by the pool_configurator module + /// @param account The account signer of the caller public(friend) fun init_pool(account: &signer) { assert!( (signer::address_of(account) == @aave_pool), - error_config::get_ecaller_not_pool_admin(), + error_config::get_enot_pool_owner() ); + move_to( account, - ReserveList { value: smart_table::new(), count: 0, }, + ReserveList { + value: smart_table::new(), + count: 0 + } ); + move_to( account, - ReserveAddressesList { value: smart_table::new(), }, + ReserveAddressesList { + value: smart_table::new() + } ); + move_to( account, - UsersConfig { value: smart_table::new(), }, + UsersConfig { + value: smart_table::new() + } ); + move_to( account, ReserveExtendConfiguration { bridge_protocol_fee: 0, flash_loan_premium_total: 0, - flash_loan_premium_to_protocol: 0, - }, + flash_loan_premium_to_protocol: 0 + } ); } @@ -176,10 +191,9 @@ module aave_pool::pool { /// @notice Initializes a reserve, activating it, assigning an aToken and debt tokens and an /// interest rate strategy - /// @dev Only callable by the pool_configurator contract + /// @dev Only callable by the pool_configurator module /// @param account The address of the caller /// @param underlying_asset The address of the underlying asset of the reserve - /// @param underlying_asset_decimals The decimals of the underlying asset /// @param treasury The address of the treasury /// @param a_token_name The name of the aToken /// @param a_token_symbol The symbol of the aToken @@ -188,19 +202,19 @@ module aave_pool::pool { public(friend) fun init_reserve( account: &signer, underlying_asset: address, - underlying_asset_decimals: u8, treasury: address, a_token_name: String, a_token_symbol: String, variable_debt_token_name: String, - variable_debt_token_symbol: String, + variable_debt_token_symbol: String ) acquires ReserveList, ReserveAddressesList { // Check if underlying_asset exists - mock_underlying_token_factory::assert_token_exists(underlying_asset); + fungible_asset_manager::assert_token_exists(underlying_asset); + let asset_symbol = fungible_asset_manager::symbol(underlying_asset); // Check whether the asset interest rate parameters are configured - default_reserve_interest_rate_strategy::asset_interest_rate_exists( - underlying_asset + interest_rate_strategy::asset_interest_rate_exists( + underlying_asset, asset_symbol ); // Borrow the ReserveList resource @@ -209,36 +223,34 @@ module aave_pool::pool { // Assert that the asset is not already added assert!( !smart_table::contains(&reserve_data_list.value, underlying_asset), - error_config::get_ereserve_already_added(), + error_config::get_ereserve_already_added() ); + let underlying_asset_decimals = + fungible_asset_manager::decimals(underlying_asset); // Create a token for the underlying asset - a_token_factory::create_token( - account, - a_token_name, - a_token_symbol, - underlying_asset_decimals, - utf8(b""), - utf8(b""), - underlying_asset, - treasury, - ); let a_token_address = - a_token_factory::token_address(signer::address_of(account), a_token_symbol); + a_token_factory::create_token( + account, + a_token_name, + a_token_symbol, + underlying_asset_decimals, + utf8(b""), + utf8(b""), + underlying_asset, + treasury + ); // Create variable debt token for the underlying asset - variable_debt_token_factory::create_token( - account, - variable_debt_token_name, - variable_debt_token_symbol, - underlying_asset_decimals, - utf8(b""), - utf8(b""), - underlying_asset, - ); let variable_debt_token_address = - variable_debt_token_factory::token_address( - signer::address_of(account), variable_debt_token_symbol + variable_debt_token_factory::create_token( + account, + variable_debt_token_name, + variable_debt_token_symbol, + underlying_asset_decimals, + utf8(b""), + utf8(b""), + underlying_asset ); // Create Pool @@ -254,7 +266,7 @@ module aave_pool::pool { variable_debt_token_address, accrued_to_treasury: 0, unbacked: 0, - isolation_mode_total_debt: 0, + isolation_mode_total_debt: 0 }; // Add the ReserveData in the smart table @@ -281,7 +293,7 @@ module aave_pool::pool { // Assert that the maximum number of reserves hasn't been reached assert!( reserve_count < max_number_reserves(), - error_config::get_eno_more_reserves_allowed(), + error_config::get_eno_more_reserves_allowed() ); // update reserve id set_reserve_id(reserve_data_list, underlying_asset, reserve_count); @@ -312,8 +324,8 @@ module aave_pool::pool { ReserveInitialized { asset: underlying_asset, a_token: a_token_address, - variable_debt_token: variable_debt_token_address, - }, + variable_debt_token: variable_debt_token_address + } ) } @@ -321,27 +333,25 @@ module aave_pool::pool { public fun test_init_reserve( account: &signer, underlying_asset: address, - underlying_asset_decimals: u8, treasury: address, a_token_name: String, a_token_symbol: String, variable_debt_token_name: String, - variable_debt_token_symbol: String, + variable_debt_token_symbol: String ) acquires ReserveList, ReserveAddressesList { init_reserve( account, underlying_asset, - underlying_asset_decimals, treasury, a_token_name, a_token_symbol, variable_debt_token_name, - variable_debt_token_symbol, + variable_debt_token_symbol ); } /// @notice Drop a reserve - /// @dev Only callable by the pool_configurator contract + /// @dev Only callable by the pool_configurator module /// @param asset The address of the underlying asset of the reserve public(friend) fun drop_reserve(asset: address) acquires ReserveList, ReserveAddressesList { assert!(asset != @0x0, error_config::get_ezero_address_not_valid()); @@ -349,17 +359,16 @@ module aave_pool::pool { let reserve_data = get_reserve_data(asset); let variable_debt_token_total_supply = - scaled_variable_token_total_supply(reserve_data.variable_debt_token_address); + variable_debt_token_total_supply(reserve_data.variable_debt_token_address); assert!( variable_debt_token_total_supply == 0, - error_config::get_evariable_debt_supply_not_zero(), + error_config::get_evariable_debt_supply_not_zero() ); - let a_token_total_supply = - scaled_a_token_total_supply(reserve_data.a_token_address); + let a_token_total_supply = a_token_total_supply(reserve_data.a_token_address); assert!( a_token_total_supply == 0 && reserve_data.accrued_to_treasury == 0, - error_config::get_eunderlying_claimable_rights_not_zero(), + error_config::get_eunderlying_claimable_rights_not_zero() ); // Borrow the ReserveList resource @@ -379,12 +388,16 @@ module aave_pool::pool { assert!( smart_table::length(&reserve_address_list.value) == smart_table::length(&reserve_data_list.value), - error_config::get_ereserves_storage_count_mismatch(), + error_config::get_ereserves_storage_count_mismatch() ); + + // drop a token and variable debt token associated data + a_token_factory::drop_token(reserve_data.a_token_address); + variable_debt_token_factory::drop_token(reserve_data.variable_debt_token_address); } #[test_only] - public fun test_drop_reserve(asset: address,) acquires ReserveList, ReserveAddressesList { + public fun test_drop_reserve(asset: address) acquires ReserveList, ReserveAddressesList { drop_reserve(asset); } @@ -399,7 +412,7 @@ module aave_pool::pool { // Assert that the signer has created a list assert!( exists(signer_address), - error_config::get_eaccount_does_not_exist(), + error_config::get_ereserve_list_not_initialized() ); // Get the ReserveList resource @@ -408,7 +421,7 @@ module aave_pool::pool { // Assert that the asset is listed assert!( smart_table::contains(&reserve_list.value, asset), - error_config::get_easset_not_listed(), + error_config::get_easset_not_listed() ); // Borrow the ReserveData for the specified asset @@ -420,20 +433,16 @@ module aave_pool::pool { } #[view] - public fun get_reserve_data_and_reserves_count(asset: address,): (ReserveData, u256) acquires ReserveList { - // Get the signer address - let signer_address = @aave_pool; - - // Assert that the signer has created a list - assert!(exists(signer_address), error_config::get_euser_not_listed()); - + public fun get_reserve_data_and_reserves_count( + asset: address + ): (ReserveData, u256) acquires ReserveList { // Get the ReserveList resource - let reserve_list = borrow_global(signer_address); + let reserve_list = borrow_global(@aave_pool); // Assert that the asset is listed assert!( smart_table::contains(&reserve_list.value, asset), - error_config::get_easset_not_listed(), + error_config::get_easset_not_listed() ); // Borrow the ReserveData for the specified asset @@ -448,15 +457,19 @@ module aave_pool::pool { /// @notice Returns the configuration of the reserve /// @param asset The address of the underlying asset of the reserve /// @return The configuration of the reserve - public fun get_reserve_configuration(asset: address): ReserveConfigurationMap acquires ReserveList { + public fun get_reserve_configuration( + asset: address + ): ReserveConfigurationMap acquires ReserveList { let reserve_list = borrow_global(@aave_pool); + assert!( smart_table::contains(&reserve_list.value, asset), - error_config::get_easset_not_listed(), + error_config::get_easset_not_listed() ); - let reserve_info = + + let reserve_data = smart_table::borrow(&reserve_list.value, asset); - reserve_info.configuration + reserve_data.configuration } #[view] @@ -484,17 +497,18 @@ module aave_pool::pool { } fun set_reserve_last_update_timestamp( - asset: address, last_update_timestamp: u64 + asset: address, reserve_data_mut: &mut ReserveData, last_update_timestamp: u64 ) acquires ReserveList { let reserve_list = borrow_global_mut(@aave_pool); + assert!( smart_table::contains(&reserve_list.value, asset), - error_config::get_easset_not_listed(), + error_config::get_easset_not_listed() ); + let reserve_data = - smart_table::borrow_mut( - &mut reserve_list.value, asset - ); + smart_table::borrow_mut(&mut reserve_list.value, asset); + reserve_data_mut.last_update_timestamp = last_update_timestamp; reserve_data.last_update_timestamp = last_update_timestamp } @@ -506,19 +520,26 @@ module aave_pool::pool { reserve.a_token_address } + /// @notice Update accrued_to_treasury of the reserve + /// @dev Only callable by the pool, bridge_logic and flashloan_logic module + /// @param asset The address of the underlying asset of the reserve + /// @param reserve_data_mut The mutable reference of the reserve data + /// @accrued_to_treasury The new accrued_to_treasury value public(friend) fun set_reserve_accrued_to_treasury( - asset: address, accrued_to_treasury: u256 + asset: address, reserve_data_mut: &mut ReserveData, accrued_to_treasury: u256 ) acquires ReserveList { let reserve_list = borrow_global_mut(@aave_pool); + assert!( smart_table::contains(&reserve_list.value, asset), - error_config::get_easset_not_listed(), + error_config::get_easset_not_listed() ); + let reserve_data = - smart_table::borrow_mut( - &mut reserve_list.value, asset - ); - reserve_data.accrued_to_treasury = accrued_to_treasury + smart_table::borrow_mut(&mut reserve_list.value, asset); + + reserve_data.accrued_to_treasury = accrued_to_treasury; + reserve_data_mut.accrued_to_treasury = accrued_to_treasury; } public fun get_reserve_accrued_to_treasury(reserve: &ReserveData): u256 { @@ -526,17 +547,18 @@ module aave_pool::pool { } fun set_reserve_variable_borrow_index( - asset: address, variable_borrow_index: u128 + asset: address, reserve_data_mut: &mut ReserveData, variable_borrow_index: u128 ) acquires ReserveList { let reserve_list = borrow_global_mut(@aave_pool); + assert!( smart_table::contains(&reserve_list.value, asset), - error_config::get_easset_not_listed(), + error_config::get_easset_not_listed() ); + let reserve_data = - smart_table::borrow_mut( - &mut reserve_list.value, asset - ); + smart_table::borrow_mut(&mut reserve_list.value, asset); + reserve_data_mut.variable_borrow_index = variable_borrow_index; reserve_data.variable_borrow_index = variable_borrow_index } @@ -545,17 +567,18 @@ module aave_pool::pool { } fun set_reserve_liquidity_index( - asset: address, liquidity_index: u128 + asset: address, reserve_data_mut: &mut ReserveData, liquidity_index: u128 ) acquires ReserveList { let reserve_list = borrow_global_mut(@aave_pool); + assert!( smart_table::contains(&reserve_list.value, asset), - error_config::get_easset_not_listed(), + error_config::get_easset_not_listed() ); + let reserve_data = - smart_table::borrow_mut( - &mut reserve_list.value, asset - ); + smart_table::borrow_mut(&mut reserve_list.value, asset); + reserve_data_mut.liquidity_index = liquidity_index; reserve_data.liquidity_index = liquidity_index } @@ -564,17 +587,18 @@ module aave_pool::pool { } fun set_reserve_current_liquidity_rate( - asset: address, current_liquidity_rate: u128 + asset: address, reserve_data_mut: &mut ReserveData, current_liquidity_rate: u128 ) acquires ReserveList { let reserve_list = borrow_global_mut(@aave_pool); + assert!( smart_table::contains(&reserve_list.value, asset), - error_config::get_easset_not_listed(), + error_config::get_easset_not_listed() ); + let reserve_data = - smart_table::borrow_mut( - &mut reserve_list.value, asset - ); + smart_table::borrow_mut(&mut reserve_list.value, asset); + reserve_data_mut.current_liquidity_rate = current_liquidity_rate; reserve_data.current_liquidity_rate = current_liquidity_rate } @@ -583,17 +607,21 @@ module aave_pool::pool { } fun set_reserve_current_variable_borrow_rate( - asset: address, current_variable_borrow_rate: u128 + asset: address, + reserve_data_mut: &mut ReserveData, + current_variable_borrow_rate: u128 ) acquires ReserveList { let reserve_list = borrow_global_mut(@aave_pool); + assert!( smart_table::contains(&reserve_list.value, asset), - error_config::get_easset_not_listed(), + error_config::get_easset_not_listed() ); + let reserve_data = - smart_table::borrow_mut( - &mut reserve_list.value, asset - ); + smart_table::borrow_mut(&mut reserve_list.value, asset); + + reserve_data_mut.current_variable_borrow_rate = current_variable_borrow_rate; reserve_data.current_variable_borrow_rate = current_variable_borrow_rate } @@ -609,39 +637,47 @@ module aave_pool::pool { reserve.variable_debt_token_address } + /// @notice Updates unbacked of the reserve + /// @dev Only callable by the bridge_logic module + /// @param asset The address of the underlying asset of the reserve + /// @param reserve_data_mut The mutable reference of the reserve data + /// @param unbacked The new unbacked value public(friend) fun set_reserve_unbacked( asset: address, reserve_data_mut: &mut ReserveData, unbacked: u128 ) acquires ReserveList { let reserve_list = borrow_global_mut(@aave_pool); + assert!( smart_table::contains(&reserve_list.value, asset), - error_config::get_easset_not_listed(), + error_config::get_easset_not_listed() ); + let reserve_data = - smart_table::borrow_mut( - &mut reserve_list.value, asset - ); + smart_table::borrow_mut(&mut reserve_list.value, asset); + reserve_data_mut.unbacked = unbacked; reserve_data.unbacked = unbacked; - reserve_data_mut.unbacked = unbacked } public fun get_reserve_unbacked(reserve: &ReserveData): u128 { reserve.unbacked } + /// @notice Updates isolation_mode_total_debt of the reserve + /// @dev Only callable by the borrow_logic and isolation_mode_logic module + /// @param asset The address of the underlying asset of the reserve + /// @param reserve_data_mut The mutable reference of the reserve data + /// @param isolation_mode_total_debt The new isolation_mode_total_debt value public(friend) fun set_reserve_isolation_mode_total_debt( - asset: address, isolation_mode_total_debt: u128 + asset: address, reserve_data_mut: &mut ReserveData, isolation_mode_total_debt: u128 ) acquires ReserveList { let reserve_list = borrow_global_mut(@aave_pool); assert!( smart_table::contains(&reserve_list.value, asset), - error_config::get_easset_not_listed(), + error_config::get_easset_not_listed() ); let reserve_data = - smart_table::borrow_mut( - &mut reserve_list.value, asset - ); - + smart_table::borrow_mut(&mut reserve_list.value, asset); + reserve_data_mut.isolation_mode_total_debt = isolation_mode_total_debt; reserve_data.isolation_mode_total_debt = isolation_mode_total_debt } @@ -651,23 +687,35 @@ module aave_pool::pool { reserve.isolation_mode_total_debt } + public fun set_reserve_configuration_with_guard( + account: &signer, asset: address, reserve_config_map: ReserveConfigurationMap + ) acquires ReserveList { + assert!( + acl_manage::is_asset_listing_admin(signer::address_of(account)) + || acl_manage::is_pool_admin(signer::address_of(account)), + error_config::get_ecaller_not_asset_listing_or_pool_admin() + ); + set_reserve_configuration(asset, reserve_config_map); + } + /// @notice Sets the configuration bitmap of the reserve as a whole - /// @dev Only callable by the pool_configurator and pool contract + /// @dev Only callable by the pool_configurator and pool module /// @param asset The address of the underlying asset of the reserve /// @param reserve_config_map The new configuration bitmap public(friend) fun set_reserve_configuration( asset: address, reserve_config_map: ReserveConfigurationMap ) acquires ReserveList { let reserve_list = borrow_global_mut(@aave_pool); + assert!( smart_table::contains(&reserve_list.value, asset), - error_config::get_easset_not_listed(), + error_config::get_easset_not_listed() ); - let reserve_info = - smart_table::borrow_mut( - &mut reserve_list.value, asset - ); - reserve_info.configuration = reserve_config_map; + + let reserve_dara = + smart_table::borrow_mut(&mut reserve_list.value, asset); + + reserve_dara.configuration = reserve_config_map; } #[test_only] @@ -680,6 +728,7 @@ module aave_pool::pool { #[view] public fun get_user_configuration(user: address): UserConfigurationMap acquires UsersConfig { let user_config_obj = borrow_global(@aave_pool); + if (smart_table::contains(&user_config_obj.value, user)) { let user_config_map = smart_table::borrow(&user_config_obj.value, user); return *user_config_map @@ -688,6 +737,10 @@ module aave_pool::pool { user_config::init() } + /// @notice Sets the configuration bitmap of the user + /// @dev Only callable by the supply_logic, borrow_logic, bridge_logic and liquidation_logic module + /// @param user The address of the user + /// @param user_config_map The new configuration bitmap public(friend) fun set_user_configuration( user: address, user_config_map: UserConfigurationMap ) acquires UsersConfig { @@ -708,7 +761,7 @@ module aave_pool::pool { /// @notice Returns the ongoing normalized income for the reserve. /// @dev A value of 1e27 means there is no income. As time passes, the income is accrued /// @dev A value of 2*1e27 means for each unit of asset one unit of income has been accrued - /// @param reserve_data The reserve object + /// @param reserve_data The reserve data /// @return The normalized income, expressed in ray public fun get_normalized_income_by_reserve_data( reserve_data: &ReserveData @@ -718,111 +771,146 @@ module aave_pool::pool { //if the index was updated in the same block, no need to perform any calculation return (reserve_data.liquidity_index as u256) }; + wad_ray_math::ray_mul( math_utils::calculate_linear_interest( (reserve_data.current_liquidity_rate as u256), last_update_timestamp ), - (reserve_data.liquidity_index as u256), + (reserve_data.liquidity_index as u256) ) } /// @notice Updates the liquidity cumulative index and the variable borrow index. + /// @dev Only callable by the supply_logic, borrow_logic, bridge_logic, flashloan_logic and liquidation_logic module /// @param asset The address of the underlying asset of the reserve - /// @param reserve_data The reserve data + /// @param reserve_data_mut The mutable reference of the reserve data + /// @param reserve_cache The reserve cache public(friend) fun update_state( - asset: address, reserve_data: &mut ReserveData, + asset: address, + reserve_data_mut: &mut ReserveData, + reserve_cache: &mut ReserveCache ) acquires ReserveList { - if (reserve_data.last_update_timestamp == timestamp::now_seconds()) { return }; + let current_timestamp = timestamp::now_seconds(); + if (reserve_data_mut.last_update_timestamp == current_timestamp) { return }; - update_indexes(asset, reserve_data); - accrue_to_treasury(asset, reserve_data); + update_indexes(asset, reserve_data_mut, reserve_cache); + accrue_to_treasury(asset, reserve_data_mut, reserve_cache); - reserve_data.last_update_timestamp = timestamp::now_seconds(); - set_reserve_last_update_timestamp(asset, reserve_data.last_update_timestamp) + set_reserve_last_update_timestamp(asset, reserve_data_mut, current_timestamp) } /// @notice Updates the reserve indexes and the timestamp of the update. /// @param asset The address of the underlying asset of the reserve - /// @param reserve_data The reserve data reserve to be updated - inline fun update_indexes( - asset: address, reserve_data: &mut ReserveData, - ) { - if (reserve_data.current_liquidity_rate != 0) { + /// @param reserve_data_mut The mutable reference of the reserve data + /// @param reserve_cache The reserve cache + fun update_indexes( + asset: address, + reserve_data_mut: &mut ReserveData, + reserve_cache: &mut ReserveCache + ) acquires ReserveList { + // Only cumulating on the supply side if there is any income being produced + // The case of Reserve Factor 100% is not a problem (currentLiquidityRate == 0), + // as liquidity index should not be updated + if (reserve_cache.curr_liquidity_rate != 0) { let cumulated_liquidity_interest = math_utils::calculate_linear_interest( - (reserve_data.current_liquidity_rate as u256), - reserve_data.last_update_timestamp, + reserve_cache.curr_liquidity_rate, + reserve_cache.reserve_last_update_timestamp ); let next_liquidity_index = - ( - wad_ray_math::ray_mul( - cumulated_liquidity_interest, - (reserve_data.liquidity_index as u256), - ) as u128 + wad_ray_math::ray_mul( + cumulated_liquidity_interest, + reserve_cache.curr_liquidity_index ); - reserve_data.liquidity_index = next_liquidity_index; - set_reserve_liquidity_index(asset, next_liquidity_index) + reserve_cache.next_liquidity_index = next_liquidity_index; + + set_reserve_liquidity_index( + asset, reserve_data_mut, (next_liquidity_index as u128) + ) }; - let curr_scaled_variable_debt = - variable_debt_token_factory::scaled_total_supply( - reserve_data.variable_debt_token_address - ); - if (curr_scaled_variable_debt != 0) { + // Variable borrow index only gets updated if there is any variable debt. + // reserve_cache.curr_variable_borrow_rate != 0 is not a correct validation, + // because a positive base variable rate can be stored on + // reserve_cache.curr_variable_borrow_rate, but the index should not increase + if (reserve_cache.curr_scaled_variable_debt != 0) { let cumulated_variable_borrow_interest = math_utils::calculate_compounded_interest_now( - (reserve_data.current_variable_borrow_rate as u256), - reserve_data.last_update_timestamp, + reserve_cache.curr_variable_borrow_rate, + reserve_cache.reserve_last_update_timestamp ); - let next_variable_borrow_index = - ( - wad_ray_math::ray_mul( - cumulated_variable_borrow_interest, - (reserve_data.variable_borrow_index as u256), - ) as u128 - ); - reserve_data.variable_borrow_index = next_variable_borrow_index; - set_reserve_variable_borrow_index(asset, next_variable_borrow_index) + reserve_cache.next_variable_borrow_index = wad_ray_math::ray_mul( + cumulated_variable_borrow_interest, + reserve_cache.curr_variable_borrow_index + ); + // update reserve data + set_reserve_variable_borrow_index( + asset, + reserve_data_mut, + (reserve_cache.next_variable_borrow_index as u128) + ) } } - /// @notice Mints part of the repaid interest to the reserve treasury as a function of the reserve factor for the + struct AccrueToTreasuryLocalVars has drop { + prev_total_variable_debt: u256, + curr_total_variable_debt: u256, + total_debt_accrued: u256, + amount_to_mint: u256 + } + + fun create_accrue_to_treasury_local_vars(): AccrueToTreasuryLocalVars { + AccrueToTreasuryLocalVars { + prev_total_variable_debt: 0, + curr_total_variable_debt: 0, + total_debt_accrued: 0, + amount_to_mint: 0 + } + } + + /// @notice Update part of the repaid interest to the reserve treasury as a function of the reserve factor for the /// specific asset. /// @param asset The address of the underlying asset of the reserve - /// @param reserve_data The reserve data to be updated - inline fun accrue_to_treasury( - asset: address, reserve_data: &mut ReserveData, - ) { - let reserve_factor = - reserve_config::get_reserve_factor(&reserve_data.configuration); - if (reserve_factor != 0) { - let curr_scaled_variable_debt = - variable_debt_token_factory::scaled_total_supply( - reserve_data.variable_debt_token_address - ); - let prev_total_variable_debt = - wad_ray_math::ray_mul( - curr_scaled_variable_debt, - (reserve_data.variable_borrow_index as u256), - ); + /// @param reserve_data_mut The mutable reference of the reserve data + /// @param reserve_cache The reserve cache + fun accrue_to_treasury( + asset: address, + reserve_data_mut: &mut ReserveData, + reserve_cache: &mut ReserveCache + ) acquires ReserveList { + let vars = create_accrue_to_treasury_local_vars(); + if (reserve_cache.reserve_factor == 0) { return }; - let curr_total_variable_debt = - wad_ray_math::ray_mul( - curr_scaled_variable_debt, - (reserve_data.variable_borrow_index as u256), - ); + //calculate the total variable debt at moment of the last interaction + vars.prev_total_variable_debt = wad_ray_math::ray_mul( + reserve_cache.curr_scaled_variable_debt, + reserve_cache.curr_variable_borrow_index + ); + + //calculate the new total variable debt after accumulation of the interest on the index + vars.curr_total_variable_debt = wad_ray_math::ray_mul( + reserve_cache.curr_scaled_variable_debt, + reserve_cache.next_variable_borrow_index + ); + + let total_debt_accrued = + vars.curr_total_variable_debt - vars.prev_total_variable_debt; + vars.amount_to_mint = math_utils::percent_mul( + total_debt_accrued, reserve_cache.reserve_factor + ); - let total_debt_accrued = curr_total_variable_debt - prev_total_variable_debt; - let amount_to_mint = - math_utils::percent_mul(total_debt_accrued, reserve_factor); - if (amount_to_mint != 0) { - reserve_data.accrued_to_treasury = reserve_data.accrued_to_treasury + if (vars.amount_to_mint != 0) { + let new_accrued_to_treasury = + reserve_data_mut.accrued_to_treasury + wad_ray_math::ray_div( - amount_to_mint, (reserve_data.liquidity_index as u256) + vars.amount_to_mint, + reserve_cache.next_liquidity_index ); - set_reserve_accrued_to_treasury(asset, reserve_data.accrued_to_treasury) - } + + set_reserve_accrued_to_treasury( + asset, reserve_data_mut, new_accrued_to_treasury + ) } } @@ -845,7 +933,7 @@ module aave_pool::pool { /// @notice Returns the ongoing normalized variable debt for the reserve. /// @dev A value of 1e27 means there is no debt. As time passes, the debt is accrued /// @dev A value of 2*1e27 means that for each unit of debt, one unit worth of interest has been accumulated - /// @param reserve_data The reserve object + /// @param reserve_data The reserve data /// @return The normalized variable debt, expressed in ray public fun get_normalized_debt_by_reserve_data( reserve_data: &ReserveData @@ -857,9 +945,10 @@ module aave_pool::pool { }; wad_ray_math::ray_mul( math_utils::calculate_compounded_interest_now( - (reserve_data.current_variable_borrow_rate as u256), last_update_timestamp + (reserve_data.current_variable_borrow_rate as u256), + last_update_timestamp ), - (reserve_data.variable_borrow_index as u256), + (reserve_data.variable_borrow_index as u256) ) } @@ -871,8 +960,9 @@ module aave_pool::pool { } else { assert!( !smart_table::contains(&mut reserve_address_list.value, index), - error_config::get_ereserve_already_added(), + error_config::get_ereserve_already_added() ); + smart_table::add(&mut reserve_address_list.value, index, asset); } } @@ -883,25 +973,21 @@ module aave_pool::pool { /// @return The addresses of the underlying assets of the initialized reserves public fun get_reserves_list(): vector
acquires ReserveAddressesList, ReserveList { let reserves_list_count = get_reserves_count(); - let dropped_reserves_count = 0; let address_list = vector::empty
(); + if (reserves_list_count == 0) { return address_list }; let reserve_address_list = borrow_global(@aave_pool); - for (i in 0..reserves_list_count) { - if (smart_table::contains(&reserve_address_list.value, i)) { - let reserve_address = *smart_table::borrow(&reserve_address_list.value, i); - vector::insert( - &mut address_list, - ((i - dropped_reserves_count) as u64), - reserve_address, - ); - } else { - dropped_reserves_count = dropped_reserves_count + 1; - }; - }; + + smart_table::for_each_ref( + &reserve_address_list.value, + |_k, v| { + vector::push_back(&mut address_list, *v); + } + ); + address_list } @@ -911,6 +997,7 @@ module aave_pool::pool { /// @return The address of the reserve associated with id public fun get_reserve_address_by_id(id: u256): address acquires ReserveAddressesList { let reserve_address_list = borrow_global(@aave_pool); + if (!smart_table::contains(&reserve_address_list.value, id)) { return @0x0 }; @@ -934,18 +1021,23 @@ module aave_pool::pool { let accrued_to_treasury = reserve_data.accrued_to_treasury; if (accrued_to_treasury != 0) { - set_reserve_accrued_to_treasury(asset_address, 0); + set_reserve_accrued_to_treasury(asset_address, reserve_data, 0); + let normalized_income = get_reserve_normalized_income(asset_address); let amount_to_mint = wad_ray_math::ray_mul(accrued_to_treasury, normalized_income); + a_token_factory::mint_to_treasury( - amount_to_mint, normalized_income, reserve_data.a_token_address + amount_to_mint, + normalized_income, + reserve_data.a_token_address ); + event::emit( MintedToTreasury { reserve: asset_address, amount_minted: amount_to_mint - }, + } ); }; } @@ -958,7 +1050,12 @@ module aave_pool::pool { reserve_extend_configuration.bridge_protocol_fee } - public(friend) fun set_bridge_protocol_fee(protocol_fee: u256) acquires ReserveExtendConfiguration { + /// @notice Sets the bridge protocol fee + /// @dev Only callable by the pool_configurator module + /// @param protocol_fee The new bridge protocol fee + public(friend) fun set_bridge_protocol_fee( + protocol_fee: u256 + ) acquires ReserveExtendConfiguration { let reserve_extend_configuration = borrow_global_mut(@aave_pool); reserve_extend_configuration.bridge_protocol_fee = protocol_fee @@ -984,8 +1081,8 @@ module aave_pool::pool { /// - A part is sent to aToken holders as extra, one time accumulated interest /// - A part is collected by the protocol treasury /// @dev The total premium is calculated on the total borrowed amount - /// @dev The premium to protocol is calculated on the total premium, being a percentage of `flashLoanPremiumTotal` - /// @dev Only callable by the pool_configurator contract + /// @dev The premium to protocol is calculated on the total premium, being a percentage of `flash_loan_premium_total` + /// @dev Only callable by the pool_configurator module /// @param flash_loan_premium_total The total premium, expressed in bps /// @param flash_loan_premium_to_protocol The part of the premium sent to the protocol treasury, expressed in bps public(friend) fun update_flashloan_premiums( @@ -993,6 +1090,7 @@ module aave_pool::pool { ) acquires ReserveExtendConfiguration { let reserve_extend_configuration = borrow_global_mut(@aave_pool); + reserve_extend_configuration.flash_loan_premium_total = flash_loan_premium_total; reserve_extend_configuration.flash_loan_premium_to_protocol = flash_loan_premium_to_protocol } @@ -1012,42 +1110,52 @@ module aave_pool::pool { } /// @notice Updates the reserve the current variable borrow rate and the current liquidity rate. - /// @param reserve_data The reserve data reserve to be updated + /// @dev Only callable by the supply_logic, borrow_logic, bridge_logic, flashloan_logic and liquidation_logic module + /// @param reserve_data_mut The mutable reference of the reserve data + /// @param reserve_cache The reserve cache /// @param reserve_address The address of the reserve to be updated /// @param liquidity_added The amount of liquidity added to the protocol (supply or repay) in the previous action /// @param liquidity_taken The amount of liquidity taken from the protocol (redeem or borrow) public(friend) fun update_interest_rates( - reserve_data: &mut ReserveData, + reserve_data_mut: &mut ReserveData, + reserve_cache: &ReserveCache, reserve_address: address, liquidity_added: u256, liquidity_taken: u256 ) acquires ReserveList { - let variable_token_scaled_total_supply = - variable_debt_token_factory::scaled_total_supply( - reserve_data.variable_debt_token_address - ); let total_variable_debt = wad_ray_math::ray_mul( - variable_token_scaled_total_supply, - (reserve_data.variable_borrow_index as u256), + reserve_cache.next_scaled_variable_debt, + reserve_cache.next_variable_borrow_index ); - + // The underlying token balance corresponding to the aToken + let a_token_underlying_balance = + ( + fungible_asset_manager::balance_of( + a_token_factory::get_token_account_address( + reserve_cache.a_token_address + ), + reserve_address + ) as u256 + ); + let reserve_symbol = fungible_asset_manager::symbol(reserve_address); let (next_liquidity_rate, next_variable_rate) = - default_reserve_interest_rate_strategy::calculate_interest_rates( - (reserve_data.unbacked as u256), + interest_rate_strategy::calculate_interest_rates( + (reserve_data_mut.unbacked as u256), liquidity_added, liquidity_taken, total_variable_debt, - reserve_config::get_reserve_factor(&reserve_data.configuration), + reserve_cache.reserve_factor, reserve_address, - reserve_data.a_token_address, + reserve_symbol, + a_token_underlying_balance ); - reserve_data.current_liquidity_rate = (next_liquidity_rate as u128); - reserve_data.current_variable_borrow_rate = (next_variable_rate as u128); - set_reserve_current_liquidity_rate(reserve_address, (next_liquidity_rate as u128)); + set_reserve_current_liquidity_rate( + reserve_address, reserve_data_mut, (next_liquidity_rate as u128) + ); set_reserve_current_variable_borrow_rate( - reserve_address, (next_variable_rate as u128) + reserve_address, reserve_data_mut, (next_variable_rate as u128) ); event::emit( @@ -1055,9 +1163,9 @@ module aave_pool::pool { reserve: reserve_address, liquidity_rate: next_liquidity_rate, variable_borrow_rate: next_variable_rate, - liquidity_index: (reserve_data.liquidity_index as u256), - variable_borrow_index: (reserve_data.variable_borrow_index as u256), - }, + liquidity_index: reserve_cache.next_liquidity_index, + variable_borrow_index: reserve_cache.next_variable_borrow_index + } ) } @@ -1072,7 +1180,8 @@ module aave_pool::pool { if (user_config::is_using_as_collateral_one(user_config_map)) { let asset_id: u256 = user_config::get_first_asset_id_by_mask( - user_config_map, user_config::get_collateral_mask() + user_config_map, + user_config::get_collateral_mask() ); let asset_address = get_reserve_address_by_id(asset_id); let reserves_config_map = get_reserve_configuration(asset_address); @@ -1088,12 +1197,16 @@ module aave_pool::pool { /// @param account The address of the user /// @return True if the user has borrowed a siloed asset, false otherwise /// @return The address of the only borrowed asset - public fun get_siloed_borrowing_state(account: address): (bool, address) acquires ReserveAddressesList, ReserveList, UsersConfig { + public fun get_siloed_borrowing_state( + account: address + ): (bool, address) acquires ReserveAddressesList, ReserveList, UsersConfig { let user_configuration = get_user_configuration(account); + if (user_config::is_borrowing_one(&user_configuration)) { let asset_id: u256 = user_config::get_first_asset_id_by_mask( - &user_configuration, user_config::get_borrowing_mask() + &user_configuration, + user_config::get_borrowing_mask() ); let asset_address = get_reserve_address_by_id(asset_id); let reserves_config_map = get_reserve_configuration(asset_address); @@ -1105,65 +1218,233 @@ module aave_pool::pool { (false, @0x0) } + /// @notice Accumulates a predefined amount of asset to the reserve as a fixed, instantaneous income. Used for example + /// to accumulate the flashloan fee to the reserve, and spread it between all the suppliers. + /// @dev Only callable by the flashloan_logic and bridge_logic module + /// @param asset The address of the underlying asset of the reserve + /// @param reserve_data_mut The mutable reference of the reserve data + /// @param total_liquidity The total liquidity available in the reserve + /// @param amount The amount to accumulate + /// @return The next liquidity index of the reserve public(friend) fun cumulate_to_liquidity_index( - asset: address, reserve_data: &mut ReserveData, total_liquidity: u256, amount: u256 + asset: address, + reserve_data_mut: &mut ReserveData, + total_liquidity: u256, + amount: u256 ): u256 acquires ReserveList { + //next liquidity index is calculated this way: `((amount / totalLiquidity) + 1) * liquidityIndex` + //division `amount / totalLiquidity` done in ray for precision let result = wad_ray_math::ray_mul( ( wad_ray_math::ray_div( wad_ray_math::wad_to_ray(amount), - wad_ray_math::wad_to_ray(total_liquidity), + wad_ray_math::wad_to_ray(total_liquidity) ) + wad_ray_math::ray() ), - (reserve_data.liquidity_index as u256), + (reserve_data_mut.liquidity_index as u256) ); - reserve_data.liquidity_index = (result as u128); - set_reserve_liquidity_index(asset, reserve_data.liquidity_index); + + set_reserve_liquidity_index(asset, reserve_data_mut, (result as u128)); result } /// @notice Resets the isolation mode total debt of the given asset to zero + /// @dev Only callable by the pool_configurator module /// @dev It requires the given asset has zero debt ceiling /// @param asset The address of the underlying asset to reset the isolation_mode_total_debt public(friend) fun reset_isolation_mode_total_debt(asset: address) acquires ReserveList { let reserve_config_map = get_reserve_configuration(asset); assert!( reserve_config::get_debt_ceiling(&reserve_config_map) == 0, - error_config::get_edebt_ceiling_not_zero(), + error_config::get_edebt_ceiling_not_zero() ); + let reserve_list = borrow_global_mut(@aave_pool); assert!( smart_table::contains(&reserve_list.value, asset), - error_config::get_easset_not_listed(), + error_config::get_easset_not_listed() ); + let reserve_data = - smart_table::borrow_mut( - &mut reserve_list.value, asset - ); + smart_table::borrow_mut(&mut reserve_list.value, asset); reserve_data.isolation_mode_total_debt = 0; + event::emit(IsolationModeTotalDebtUpdated { asset, total_debt: 0 }) } - /// @notice Rescue and transfer tokens locked in this contract - /// @param token The address of the token - /// @param to The address of the recipient - /// @param amount The amount of token to transfer - public entry fun rescue_tokens( - account: &signer, token: address, to: address, amount: u256 - ) { - assert!( - only_pool_admin(signer::address_of(account)), - error_config::get_ecaller_not_pool_admin(), + /// ====== Pool Cache ====== + /// pool cache data + struct ReserveCache has drop { + curr_scaled_variable_debt: u256, + next_scaled_variable_debt: u256, + curr_liquidity_index: u256, + next_liquidity_index: u256, + curr_variable_borrow_index: u256, + next_variable_borrow_index: u256, + curr_liquidity_rate: u256, + curr_variable_borrow_rate: u256, + reserve_factor: u256, + reserve_configuration: ReserveConfigurationMap, + a_token_address: address, + variable_debt_token_address: address, + reserve_last_update_timestamp: u64 + } + + fun init_cache(): ReserveCache { + ReserveCache { + curr_scaled_variable_debt: 0, + next_scaled_variable_debt: 0, + curr_liquidity_index: 0, + next_liquidity_index: 0, + curr_variable_borrow_index: 0, + next_variable_borrow_index: 0, + curr_liquidity_rate: 0, + curr_variable_borrow_rate: 0, + reserve_factor: 0, + reserve_configuration: reserve_config::init(), + a_token_address: @0x0, + variable_debt_token_address: @0x0, + reserve_last_update_timestamp: 0 + } + } + + public fun cache(reserve_data: &ReserveData): ReserveCache { + let reserve_cache = init_cache(); + reserve_cache.reserve_configuration = reserve_data.configuration; + reserve_cache.reserve_factor = reserve_config::get_reserve_factor( + &reserve_cache.reserve_configuration ); - mock_underlying_token_factory::transfer_from( - signer::address_of(account), to, (amount as u64), token + + let liquidity_index = (reserve_data.liquidity_index as u256); + reserve_cache.curr_liquidity_index = liquidity_index; + reserve_cache.next_liquidity_index = liquidity_index; + + let variable_borrow_index = (reserve_data.variable_borrow_index as u256); + reserve_cache.curr_variable_borrow_index = variable_borrow_index; + reserve_cache.next_variable_borrow_index = variable_borrow_index; + + reserve_cache.curr_liquidity_rate = (reserve_data.current_liquidity_rate as u256); + reserve_cache.curr_variable_borrow_rate = ( + reserve_data.current_variable_borrow_rate as u256 ); + + reserve_cache.a_token_address = reserve_data.a_token_address; + reserve_cache.variable_debt_token_address = reserve_data.variable_debt_token_address; + + reserve_cache.reserve_last_update_timestamp = reserve_data.last_update_timestamp; + + let scaled_total_debt = + variable_debt_token_factory::scaled_total_supply( + reserve_cache.variable_debt_token_address + ); + reserve_cache.curr_scaled_variable_debt = scaled_total_debt; + reserve_cache.next_scaled_variable_debt = scaled_total_debt; + + reserve_cache + } + + public fun get_reserve_cache_configuration( + reserve_cache: &ReserveCache + ): ReserveConfigurationMap { + reserve_cache.reserve_configuration + } + + public fun get_reserve_factor(reserve_cache: &ReserveCache): u256 { + reserve_cache.reserve_factor + } + + public fun get_curr_liquidity_index(reserve_cache: &ReserveCache): u256 { + reserve_cache.curr_liquidity_index + } + + public fun set_curr_liquidity_index( + reserve_cache: &mut ReserveCache, index: u256 + ) { + reserve_cache.curr_liquidity_index = index; + } + + public fun get_next_liquidity_index(reserve_cache: &ReserveCache): u256 { + reserve_cache.next_liquidity_index + } + + public fun set_next_liquidity_index( + reserve_cache: &mut ReserveCache, index: u256 + ) { + reserve_cache.next_liquidity_index = index; + } + + public fun get_curr_variable_borrow_index( + reserve_cache: &ReserveCache + ): u256 { + reserve_cache.curr_variable_borrow_index + } + + public fun get_next_variable_borrow_index( + reserve_cache: &ReserveCache + ): u256 { + reserve_cache.next_variable_borrow_index + } + + public fun set_next_variable_borrow_index( + reserve_cache: &mut ReserveCache, index: u256 + ) { + reserve_cache.next_variable_borrow_index = index; + } + + public fun get_curr_liquidity_rate(reserve_cache: &ReserveCache): u256 { + reserve_cache.curr_liquidity_rate + } + + public fun set_curr_liquidity_rate( + reserve_cache: &mut ReserveCache, rate: u256 + ) { + reserve_cache.curr_liquidity_rate = rate; + } + + public fun get_curr_variable_borrow_rate(reserve_cache: &ReserveCache): u256 { + reserve_cache.curr_variable_borrow_rate + } + + public fun set_curr_variable_borrow_rate( + reserve_cache: &mut ReserveCache, rate: u256 + ) { + reserve_cache.curr_variable_borrow_rate = rate; + } + + public fun get_a_token_address(reserve_cache: &ReserveCache): address { + reserve_cache.a_token_address + } + + public fun get_variable_debt_token_address( + reserve_cache: &ReserveCache + ): address { + reserve_cache.variable_debt_token_address + } + + public fun get_curr_scaled_variable_debt(reserve_cache: &ReserveCache): u256 { + reserve_cache.curr_scaled_variable_debt + } + + public fun get_next_scaled_variable_debt(reserve_cache: &ReserveCache): u256 { + reserve_cache.next_scaled_variable_debt + } + + public fun set_next_scaled_variable_debt( + reserve_cache: &mut ReserveCache, scaled_debt: u256 + ) { + reserve_cache.next_scaled_variable_debt = scaled_debt; } #[view] - public fun scaled_a_token_total_supply(a_token_address: address): u256 acquires ReserveList { + /// @notice Computes the total supply of aTokens for a specific aToken address, adjusted by the reserve's normalized income. + /// @dev Retrieves the scaled total supply of aTokens for the specified aToken address. + /// @dev Converts the scaled total supply into the underlying token denomination using the reserve's normalized income. + /// @dev Returns 0 if the scaled total supply is zero. + /// @param a_token_address The address of the aToken contract for which the total supply is being queried. + /// @return The adjusted total supply of the aTokens in the underlying token, considering the reserve's normalized income. + public fun a_token_total_supply(a_token_address: address): u256 acquires ReserveList { let current_supply_scaled = a_token_factory::scaled_total_supply(a_token_address); if (current_supply_scaled == 0) { return 0 @@ -1172,12 +1453,19 @@ module aave_pool::pool { a_token_factory::get_underlying_asset_address(a_token_address); wad_ray_math::ray_mul( current_supply_scaled, - get_reserve_normalized_income(underlying_token_address), + get_reserve_normalized_income(underlying_token_address) ) } #[view] - public fun scaled_a_token_balance_of( + /// @notice Computes the current balance of aTokens for a specific owner, adjusted by the reserve's normalized income. + /// @dev Retrieves the scaled balance of aTokens for the specified owner and aToken address. + /// @dev Converts the scaled balance into the underlying token denomination using the reserve's normalized income. + /// @dev Returns 0 if the scaled balance is zero. + /// @param owner The address of the account whose aToken balance is to be queried. + /// @param a_token_address The address of the aToken contract for which the balance is being queried. + /// @return The adjusted balance of the owner in the underlying token, considering the reserve's normalized income. + public fun a_token_balance_of( owner: address, a_token_address: address ): u256 acquires ReserveList { let current_balance_scale = @@ -1189,12 +1477,18 @@ module aave_pool::pool { a_token_factory::get_underlying_asset_address(a_token_address); wad_ray_math::ray_mul( current_balance_scale, - get_reserve_normalized_income(underlying_token_address), + get_reserve_normalized_income(underlying_token_address) ) } #[view] - public fun scaled_variable_token_total_supply( + /// @notice Computes the total supply of variable debt tokens for a specific address, adjusted by the reserve's normalized variable debt. + /// @dev Retrieves the scaled total supply of variable debt tokens for the specified variable debt token address. + /// @dev Converts the scaled total supply into the underlying token denomination using the reserve's normalized variable debt. + /// @dev Returns 0 if the scaled total supply is zero. + /// @param variable_debt_token_address The address of the variable debt token contract for which the total supply is being queried. + /// @return The adjusted total supply of the variable debt tokens in the underlying token, considering the reserve's normalized variable debt. + public fun variable_debt_token_total_supply( variable_debt_token_address: address ): u256 acquires ReserveList { let current_supply_scaled = @@ -1209,12 +1503,19 @@ module aave_pool::pool { wad_ray_math::ray_mul( current_supply_scaled, - get_reserve_normalized_variable_debt(underlying_token_address), + get_reserve_normalized_variable_debt(underlying_token_address) ) } #[view] - public fun scaled_variable_token_balance_of( + /// @notice Computes the balance of variable debt tokens for a specific owner, adjusted by the reserve's normalized variable debt. + /// @dev Retrieves the scaled balance of variable debt tokens for the specified owner and variable debt token address. + /// @dev Converts the scaled balance into the underlying token denomination using the reserve's normalized variable debt. + /// @dev Returns 0 if the scaled balance is zero. + /// @param owner The address of the account whose variable debt token balance is being queried. + /// @param variable_debt_token_address The address of the variable debt token contract for which the balance is being queried. + /// @return The adjusted balance of the owner in variable debt tokens, considering the reserve's normalized variable debt. + public fun variable_debt_token_balance_of( owner: address, variable_debt_token_address: address ): u256 acquires ReserveList { let current_balance_scale = @@ -1230,7 +1531,7 @@ module aave_pool::pool { ); wad_ray_math::ray_mul( current_balance_scale, - get_reserve_normalized_variable_debt(underlying_token_address), + get_reserve_normalized_variable_debt(underlying_token_address) ) } @@ -1242,27 +1543,37 @@ module aave_pool::pool { public fun set_reserve_current_liquidity_rate_for_testing( asset: address, current_liquidity_rate: u128 ) acquires ReserveList { - set_reserve_current_liquidity_rate(asset, current_liquidity_rate) + let reserve_data = get_reserve_data(asset); + set_reserve_current_liquidity_rate( + asset, &mut reserve_data, current_liquidity_rate + ) } #[test_only] public fun set_reserve_current_variable_borrow_rate_for_testing( asset: address, current_variable_borrow_rate: u128 ) acquires ReserveList { - set_reserve_current_variable_borrow_rate(asset, current_variable_borrow_rate); + let reserve_data = get_reserve_data(asset); + set_reserve_current_variable_borrow_rate( + asset, &mut reserve_data, current_variable_borrow_rate + ); } #[test_only] public fun set_reserve_liquidity_index_for_testing( asset: address, liquidity_index: u128 ) acquires ReserveList { - set_reserve_liquidity_index(asset, liquidity_index) + let reserve_data = get_reserve_data(asset); + set_reserve_liquidity_index(asset, &mut reserve_data, liquidity_index) } #[test_only] public fun set_reserve_variable_borrow_index_for_testing( asset: address, variable_borrow_index: u128 ) acquires ReserveList { - set_reserve_variable_borrow_index(asset, variable_borrow_index) + let reserve_data = get_reserve_data(asset); + set_reserve_variable_borrow_index( + asset, &mut reserve_data, variable_borrow_index + ) } } diff --git a/aave-core/sources/aave-pool/pool_addresses_provider.move b/aave-core/sources/aave-pool/pool_addresses_provider.move deleted file mode 100644 index 68c9874..0000000 --- a/aave-core/sources/aave-pool/pool_addresses_provider.move +++ /dev/null @@ -1,256 +0,0 @@ -module aave_pool::pool_addresses_provider { - use std::option; - use std::option::Option; - use std::signer; - use std::string::{Self, String}; - use aptos_std::smart_table::{Self, SmartTable}; - use aptos_framework::event; - - const POOL: vector = b"POOL"; - const POOL_CONFIGURATOR: vector = b"POOL_CONFIGURATOR"; - const PRICE_ORACLE: vector = b"PRICE_ORACLE"; - const ACL_MANAGER: vector = b"ACL_MANAGER"; - const ACL_ADMIN: vector = b"ACL_ADMIN"; - const PRICE_ORACLE_SENTINEL: vector = b"PRICE_ORACLE_SENTINEL"; - const DATA_PROVIDER: vector = b"DATA_PROVIDER"; - - // You are not an administrator and cannot change resources. - const ENOT_MANAGEMENT: u64 = 1; - // Id already exists. - const EID_ALREADY_EXISTS: u64 = 2; - // Id does not exist. - const EID_NOT_EXISTS: u64 = 3; - - #[event] - struct MarketIdSet has store, drop { - old_market_id: Option, - new_market_id: String, - } - - #[event] - struct PoolUpdated has store, drop { - old_pool_impl: Option
, - new_pool_impl: address, - } - - #[event] - struct PoolConfiguratorUpdated has store, drop { - old_pool_configurator_impl: Option
, - new_pool_configurator_impl: address, - } - - #[event] - struct PriceOracleUpdated has store, drop { - old_price_oracle_impl: Option
, - new_price_oracle_impl: address, - } - - #[event] - struct ACLManagerUpdated has store, drop { - old_acl_manager_impl: Option
, - new_acl_manager_impl: address, - } - - #[event] - struct ACLAdminUpdated has store, drop { - old_acl_admin_impl: Option
, - new_acl_admin_impl: address, - } - - #[event] - struct PriceOracleSentinelUpdated has store, drop { - old_price_oracle_sentinel_impl: Option
, - new_price_oracle_sentinel_impl: address, - } - - #[event] - struct PoolDataProviderUpdated has store, drop { - old_pool_data_provider_impl: Option
, - new_pool_data_provider_impl: address, - } - - struct Provider has key, store { - market_id: Option, - addresses: SmartTable - } - - #[test_only] - public fun test_init_module(account: &signer) { - init_module(account) - } - - fun init_module(account: &signer) { - assert!(signer::address_of(account) == @aave_pool, ENOT_MANAGEMENT); - move_to( - account, - Provider { - market_id: option::none(), - addresses: smart_table::new() - }, - ) - } - - fun check_admin(account: address) { - assert!(account == @aave_acl, ENOT_MANAGEMENT); - } - - fun update_impl(id: String, new_pool_impl: address) acquires Provider { - let provider = borrow_global_mut(@aave_pool); - smart_table::upsert(&mut provider.addresses, id, new_pool_impl); - } - - #[view] - public fun has_id_mapped_account(id: String): bool acquires Provider { - let provider = borrow_global_mut(@aave_pool); - if (!smart_table::contains(&provider.addresses, id)) { - return false - }; - true - } - - #[view] - public fun get_market_id(): Option acquires Provider { - let provider = borrow_global(@aave_pool); - provider.market_id - } - - public entry fun set_market_id(account: &signer, new_market_id: String) acquires Provider { - check_admin(signer::address_of(account)); - let provider = borrow_global_mut(@aave_pool); - let old_market_id = provider.market_id; - provider.market_id = option::some(new_market_id); - event::emit(MarketIdSet { old_market_id, new_market_id, }); - } - - #[view] - public fun get_address(id: String): Option
acquires Provider { - if (!has_id_mapped_account(id)) { - return option::none
() - }; - let provider = borrow_global_mut(@aave_pool); - let address = smart_table::borrow(&mut provider.addresses, id); - option::some(*address) - } - - public entry fun set_address( - account: &signer, id: String, addr: address - ) acquires Provider { - check_admin(signer::address_of(account)); - let provider = borrow_global_mut(@aave_pool); - smart_table::upsert(&mut provider.addresses, id, addr); - } - - #[view] - public fun get_pool(): Option
acquires Provider { - get_address(string::utf8(POOL)) - } - - public entry fun set_pool_impl( - account: &signer, new_pool_impl: address - ) acquires Provider { - check_admin(signer::address_of(account)); - let old_pool_impl = get_address(string::utf8(POOL)); - update_impl(string::utf8(POOL), new_pool_impl); - event::emit(PoolUpdated { old_pool_impl, new_pool_impl }); - } - - #[view] - public fun get_pool_configurator(): Option
acquires Provider { - get_address(string::utf8(POOL_CONFIGURATOR)) - } - - public entry fun set_pool_configurator( - account: &signer, new_pool_configurator_impl: address - ) acquires Provider { - check_admin(signer::address_of(account)); - let old_pool_configurator_impl = get_address(string::utf8(POOL_CONFIGURATOR)); - update_impl(string::utf8(POOL_CONFIGURATOR), new_pool_configurator_impl); - event::emit( - PoolConfiguratorUpdated { - old_pool_configurator_impl, - new_pool_configurator_impl - }, - ); - } - - #[view] - public fun get_price_oracle(): Option
acquires Provider { - get_address(string::utf8(PRICE_ORACLE)) - } - - public entry fun set_price_oracle( - account: &signer, new_price_oracle_impl: address - ) acquires Provider { - check_admin(signer::address_of(account)); - let old_price_oracle_impl = get_address(string::utf8(PRICE_ORACLE)); - update_impl(string::utf8(PRICE_ORACLE), new_price_oracle_impl); - event::emit(PriceOracleUpdated { old_price_oracle_impl, new_price_oracle_impl }); - } - - #[view] - public fun get_acl_manager(): Option
acquires Provider { - get_address(string::utf8(ACL_MANAGER)) - } - - public entry fun set_acl_manager( - account: &signer, new_acl_manager_impl: address - ) acquires Provider { - check_admin(signer::address_of(account)); - let old_acl_manager_impl = get_address(string::utf8(ACL_MANAGER)); - update_impl(string::utf8(ACL_MANAGER), new_acl_manager_impl); - event::emit(ACLManagerUpdated { old_acl_manager_impl, new_acl_manager_impl }); - } - - #[view] - public fun get_acl_admin(): Option
acquires Provider { - get_address(string::utf8(ACL_ADMIN)) - } - - public entry fun set_acl_admin( - account: &signer, new_acl_admin_impl: address - ) acquires Provider { - check_admin(signer::address_of(account)); - let old_acl_admin_impl = get_address(string::utf8(ACL_ADMIN)); - update_impl(string::utf8(ACL_ADMIN), new_acl_admin_impl); - event::emit(ACLAdminUpdated { old_acl_admin_impl, new_acl_admin_impl }); - } - - #[view] - public fun get_price_oracle_sentinel(): Option
acquires Provider { - get_address(string::utf8(PRICE_ORACLE_SENTINEL)) - } - - public entry fun set_price_oracle_sentinel( - account: &signer, new_price_oracle_sentinel_impl: address - ) acquires Provider { - check_admin(signer::address_of(account)); - let old_price_oracle_sentinel_impl = - get_address(string::utf8(PRICE_ORACLE_SENTINEL)); - update_impl(string::utf8(PRICE_ORACLE_SENTINEL), new_price_oracle_sentinel_impl); - event::emit( - PriceOracleSentinelUpdated { - old_price_oracle_sentinel_impl, - new_price_oracle_sentinel_impl - }, - ); - } - - #[view] - public fun get_pool_data_provider(): Option
acquires Provider { - get_address(string::utf8(DATA_PROVIDER)) - } - - public entry fun set_pool_data_provider( - account: &signer, new_pool_data_provider_impl: address - ) acquires Provider { - check_admin(signer::address_of(account)); - let old_pool_data_provider_impl = get_address(string::utf8(DATA_PROVIDER)); - update_impl(string::utf8(DATA_PROVIDER), new_pool_data_provider_impl); - event::emit( - PoolDataProviderUpdated { - old_pool_data_provider_impl, - new_pool_data_provider_impl - }, - ); - } -} diff --git a/aave-core/sources/aave-pool/pool_configurator.move b/aave-core/sources/aave-pool/pool_configurator.move index 8384110..a04497c 100644 --- a/aave-core/sources/aave-pool/pool_configurator.move +++ b/aave-core/sources/aave-pool/pool_configurator.move @@ -5,11 +5,10 @@ module aave_pool::pool_configurator { use aptos_framework::event; use aave_acl::acl_manage; - use aave_config::error as error_config; - use aave_config::reserve as reserve_config; + use aave_config::error_config; + use aave_config::reserve_config; use aave_math::math_utils; - use aave_pool::default_reserve_interest_rate_strategy; use aave_pool::emode_logic; use aave_pool::pool; @@ -77,7 +76,7 @@ module aave_pool::pool_configurator { /// @dev Emitted when a reserve is dropped. /// @param asset The address of the underlying asset of the reserve struct ReserveDropped has store, drop { - asset: address, + asset: address } #[event] @@ -233,20 +232,20 @@ module aave_pool::pool_configurator { } /// @notice Initializes the pool configurator + /// @param account The account signer of the caller fun init_module(account: &signer) { assert!( - (signer::address_of(account) == @aave_pool), - error_config::get_ecaller_not_pool_admin(), + signer::address_of(account) == @aave_pool, + error_config::get_enot_pool_owner() ); + pool::init_pool(account); emode_logic::init_emode(account); - default_reserve_interest_rate_strategy::init_interest_rate_strategy(account); } /// @notice Initializes multiple reserves. - /// @param account The address of the caller + /// @param account The account signer of the caller /// @param underlying_asset The list of the underlying assets of the reserves - /// @param underlying_asset_decimals The list of the decimals of the underlying assets /// @param treasury The list of the treasury addresses of the reserves /// @param a_token_name The list of the aToken names of the reserves /// @param a_token_symbol The list of the aToken symbols of the reserves @@ -256,46 +255,49 @@ module aave_pool::pool_configurator { public entry fun init_reserves( account: &signer, underlying_asset: vector
, - underlying_asset_decimals: vector, treasury: vector
, a_token_name: vector, a_token_symbol: vector, variable_debt_token_name: vector, - variable_debt_token_symbol: vector, + variable_debt_token_symbol: vector ) { assert!( only_asset_listing_or_pool_admins(signer::address_of(account)), - error_config::get_ecaller_not_asset_listing_or_pool_admin(), + error_config::get_ecaller_not_asset_listing_or_pool_admin() ); + for (i in 0..vector::length(&underlying_asset)) { pool::init_reserve( account, *vector::borrow(&underlying_asset, i), - *vector::borrow(&underlying_asset_decimals, i), *vector::borrow(&treasury, i), *vector::borrow(&a_token_name, i), *vector::borrow(&a_token_symbol, i), *vector::borrow(&variable_debt_token_name, i), - *vector::borrow(&variable_debt_token_symbol, i), + *vector::borrow(&variable_debt_token_symbol, i) ); }; } /// @notice Drops a reserve entirely. - /// @param account The address of the caller + /// @dev Emits the `ReserveDropped` event + /// @param account The account signer of the caller /// @param asset The address of the reserve to drop - public entry fun drop_reserve(account: &signer, asset: address,) { + public entry fun drop_reserve(account: &signer, asset: address) { assert!( only_pool_admin(signer::address_of(account)), - error_config::get_ecaller_not_pool_admin(), + error_config::get_ecaller_not_pool_admin() ); // Call the `drop_reserve` function in the `pool` module pool::drop_reserve(asset); + event::emit(ReserveDropped { asset }); } /// @notice Configures borrowing on a reserve. + /// @dev Emits the ReserveBorrowing event /// @dev Can only be disabled (set to false) + /// @param account The account signer of the caller /// @param asset The address of the underlying asset of the reserve /// @param enabled True if borrowing needs to be enabled, false otherwise public entry fun set_reserve_borrowing( @@ -303,8 +305,9 @@ module aave_pool::pool_configurator { ) { assert!( only_risk_or_pool_admins(signer::address_of(account)), - error_config::get_ecaller_not_risk_or_pool_admin(), + error_config::get_ecaller_not_risk_or_pool_admin() ); + let reserve_config_map = pool::get_reserve_configuration(asset); reserve_config::set_borrowing_enabled(&mut reserve_config_map, enabled); pool::set_reserve_configuration(asset, reserve_config_map); @@ -313,8 +316,10 @@ module aave_pool::pool_configurator { } /// @notice Configures the reserve collateralization parameters. + /// @dev Emits the CollateralConfigurationChanged event /// @dev All the values are expressed in bps. A value of 10000, results in 100.00% /// @dev The `liquidation_bonus` is always above 100%. A value of 105% means the liquidator will receive a 5% bonus + /// @param account The account signer of the caller /// @param asset The address of the underlying asset of the reserve /// @param ltv The loan to value of the asset when used as collateral /// @param liquidation_threshold The threshold at which loans using this asset as collateral will be considered undercollateralized @@ -328,16 +333,23 @@ module aave_pool::pool_configurator { ) { assert!( only_risk_or_pool_admins(signer::address_of(account)), - error_config::get_ecaller_not_risk_or_pool_admin(), + error_config::get_ecaller_not_risk_or_pool_admin() ); - assert!(ltv <= liquidation_threshold, error_config::get_einvalid_reserve_params()); + // validation of the parameters: the LTV can + // only be lower or equal than the liquidation threshold + // (otherwise a loan against the asset would cause instantaneous liquidation) + assert!( + ltv <= liquidation_threshold, error_config::get_einvalid_reserve_params() + ); + let reserve_config_map = pool::get_reserve_configuration(asset); + if (liquidation_threshold != 0) { //liquidation bonus must be bigger than 100.00%, otherwise the liquidator would receive less //collateral than needed to cover the debt assert!( liquidation_bonus > math_utils::get_percentage_factor(), - error_config::get_einvalid_reserve_params(), + error_config::get_einvalid_reserve_params() ); //if threshold * bonus is less than PERCENTAGE_FACTOR, it's guaranteed that at the moment @@ -345,7 +357,7 @@ module aave_pool::pool_configurator { assert!( math_utils::percent_mul(liquidation_threshold, liquidation_bonus) <= math_utils::get_percentage_factor(), - error_config::get_einvalid_reserve_params(), + error_config::get_einvalid_reserve_params() ); } else { assert!(liquidation_bonus == 0, error_config::get_einvalid_reserve_params()); @@ -369,11 +381,13 @@ module aave_pool::pool_configurator { ltv, liquidation_threshold, liquidation_bonus - }, + } ) } /// @notice Enable or disable flashloans on a reserve + /// @dev Emits the ReserveFlashLoaning event + /// @param account The account signer of the caller /// @param asset The address of the underlying asset of the reserve /// @param enabled True if flashloans need to be enabled, false otherwise public entry fun set_reserve_flash_loaning( @@ -381,7 +395,7 @@ module aave_pool::pool_configurator { ) { assert!( only_risk_or_pool_admins(signer::address_of(account)), - error_config::get_ecaller_not_risk_or_pool_admin(), + error_config::get_ecaller_not_risk_or_pool_admin() ); let reserve_config_map = pool::get_reserve_configuration(asset); @@ -392,6 +406,8 @@ module aave_pool::pool_configurator { } /// @notice Activate or deactivate a reserve + /// @dev Emits the ReserveActive event + /// @param account The account signer of the caller /// @param asset The address of the underlying asset of the reserve /// @param active True if the reserve needs to be active, false otherwise public entry fun set_reserve_active( @@ -399,8 +415,9 @@ module aave_pool::pool_configurator { ) { assert!( only_pool_admin(signer::address_of(account)), - error_config::get_ecaller_not_pool_admin(), + error_config::get_ecaller_not_pool_admin() ); + if (!active) { check_no_suppliers(asset); }; @@ -414,6 +431,8 @@ module aave_pool::pool_configurator { /// @notice Freeze or unfreeze a reserve. A frozen reserve doesn't allow any new supply, borrow /// or rate swap but allows repayments, liquidations, rate rebalances and withdrawals. + /// @dev Emits the ReserveFrozen event + /// @param account The account signer of the caller /// @param asset The address of the underlying asset of the reserve /// @param freeze True if the reserve needs to be frozen, false otherwise public entry fun set_reserve_freeze( @@ -421,7 +440,7 @@ module aave_pool::pool_configurator { ) { assert!( only_risk_or_pool_admins(signer::address_of(account)), - error_config::get_ecaller_not_risk_or_pool_admin(), + error_config::get_ecaller_not_risk_or_pool_admin() ); let reserve_config_map = pool::get_reserve_configuration(asset); @@ -436,6 +455,8 @@ module aave_pool::pool_configurator { /// borrowed amount will be accumulated in the isolated collateral's total debt exposure /// @dev Only assets of the same family (e.g. USD stablecoins) should be borrowable in isolation mode to keep /// consistency in the debt ceiling calculations + /// @dev Emits the BorrowableInIsolationChanged event + /// @param account The account signer of the caller /// @param asset The address of the underlying asset of the reserve /// @param borrowable True if the asset should be borrowable in isolation, false otherwise public entry fun set_borrowable_in_isolation( @@ -443,7 +464,7 @@ module aave_pool::pool_configurator { ) { assert!( only_risk_or_pool_admins(signer::address_of(account)), - error_config::get_ecaller_not_risk_or_pool_admin(), + error_config::get_ecaller_not_risk_or_pool_admin() ); let reserve_config_map = pool::get_reserve_configuration(asset); @@ -455,6 +476,8 @@ module aave_pool::pool_configurator { /// @notice Pauses a reserve. A paused reserve does not allow any interaction (supply, borrow, repay, /// swap interest rate, liquidate, atoken transfers). + /// @dev Emits the ReservePaused event + /// @param account The account signer of the caller /// @param asset The address of the underlying asset of the reserve /// @param paused True if pausing the reserve, false if unpausing public entry fun set_reserve_pause( @@ -462,8 +485,9 @@ module aave_pool::pool_configurator { ) { assert!( only_pool_or_emergency_admin(signer::address_of(account)), - error_config::get_ecaller_not_pool_or_emergency_admin(), + error_config::get_ecaller_not_pool_or_emergency_admin() ); + let reserve_config_map = pool::get_reserve_configuration(asset); reserve_config::set_paused(&mut reserve_config_map, paused); @@ -473,6 +497,8 @@ module aave_pool::pool_configurator { } /// @notice Updates the reserve factor of a reserve. + /// @dev Emits the ReserveFactorChanged event + /// @param account The account signer of the caller /// @param asset The address of the underlying asset of the reserve /// @param new_reserve_factor The new reserve factor of the reserve public entry fun set_reserve_factor( @@ -480,11 +506,12 @@ module aave_pool::pool_configurator { ) { assert!( only_risk_or_pool_admins(signer::address_of(account)), - error_config::get_ecaller_not_risk_or_pool_admin(), + error_config::get_ecaller_not_risk_or_pool_admin() ); + assert!( new_reserve_factor <= math_utils::get_percentage_factor(), - error_config::get_einvalid_reserve_factor(), + error_config::get_einvalid_reserve_factor() ); let reserve_config_map = pool::get_reserve_configuration(asset); @@ -498,22 +525,28 @@ module aave_pool::pool_configurator { } /// @notice Sets the debt ceiling for an asset. + /// @dev Emits the DebtCeilingChanged event + /// @param account The account signer of the caller + /// @param asset The address of the underlying asset of the reserve /// @param new_debt_ceiling The new debt ceiling public entry fun set_debt_ceiling( account: &signer, asset: address, new_debt_ceiling: u256 ) { assert!( only_risk_or_pool_admins(signer::address_of(account)), - error_config::get_ecaller_not_risk_or_pool_admin(), + error_config::get_ecaller_not_risk_or_pool_admin() ); let reserve_config_map = pool::get_reserve_configuration(asset); let old_debt_ceiling: u256 = reserve_config::get_debt_ceiling(&reserve_config_map); + if (old_debt_ceiling == 0) { check_no_suppliers(asset); }; + reserve_config::set_debt_ceiling(&mut reserve_config_map, new_debt_ceiling); pool::set_reserve_configuration(asset, reserve_config_map); + if (new_debt_ceiling == 0) { pool::reset_isolation_mode_total_debt(asset) }; @@ -522,17 +555,22 @@ module aave_pool::pool_configurator { } /// @notice Sets siloed borrowing for an asset + /// @dev Emits the SiloedBorrowingChanged event + /// @param account The account signer of the caller + /// @param asset The address of the underlying asset of the reserve /// @param new_siloed The new siloed borrowing state public entry fun set_siloed_borrowing( account: &signer, asset: address, new_siloed: bool ) { assert!( only_risk_or_pool_admins(signer::address_of(account)), - error_config::get_ecaller_not_risk_or_pool_admin(), + error_config::get_ecaller_not_risk_or_pool_admin() ); + if (new_siloed) { check_no_borrowers(asset); }; + let reserve_config_map = pool::get_reserve_configuration(asset); let old_siloed: bool = reserve_config::get_siloed_borrowing(&reserve_config_map); reserve_config::set_siloed_borrowing(&mut reserve_config_map, new_siloed); @@ -544,6 +582,8 @@ module aave_pool::pool_configurator { } /// @notice Updates the borrow cap of a reserve. + /// @dev Emits the BorrowCapChanged event + /// @param account The account signer of the caller /// @param asset The address of the underlying asset of the reserve /// @param new_borrow_cap The new borrow cap of the reserve public entry fun set_borrow_cap( @@ -551,7 +591,7 @@ module aave_pool::pool_configurator { ) { assert!( only_risk_or_pool_admins(signer::address_of(account)), - error_config::get_ecaller_not_risk_or_pool_admin(), + error_config::get_ecaller_not_risk_or_pool_admin() ); let reserve_config_map = pool::get_reserve_configuration(asset); @@ -564,6 +604,8 @@ module aave_pool::pool_configurator { } /// @notice Updates the supply cap of a reserve. + /// @dev Emits the SupplyCapChanged event + /// @param account The account signer of the caller /// @param asset The address of the underlying asset of the reserve /// @param new_supply_cap The new supply cap of the reserve public entry fun set_supply_cap( @@ -571,7 +613,7 @@ module aave_pool::pool_configurator { ) { assert!( only_risk_or_pool_admins(signer::address_of(account)), - error_config::get_ecaller_not_risk_or_pool_admin(), + error_config::get_ecaller_not_risk_or_pool_admin() ); let reserve_config_map = pool::get_reserve_configuration(asset); @@ -584,6 +626,8 @@ module aave_pool::pool_configurator { } /// @notice Updates the liquidation protocol fee of reserve. + /// @dev Emits the LiquidationProtocolFeeChanged event + /// @param account The account signer of the caller /// @param asset The address of the underlying asset of the reserve /// @param new_fee The new liquidation protocol fee of the reserve, expressed in bps public entry fun set_liquidation_protocol_fee( @@ -591,16 +635,16 @@ module aave_pool::pool_configurator { ) { assert!( only_risk_or_pool_admins(signer::address_of(account)), - error_config::get_ecaller_not_risk_or_pool_admin(), + error_config::get_ecaller_not_risk_or_pool_admin() ); + assert!( new_fee <= math_utils::get_percentage_factor(), - error_config::get_einvalid_liquidation_protocol_fee(), + error_config::get_einvalid_liquidation_protocol_fee() ); let reserve_config_map = pool::get_reserve_configuration(asset); - let old_fee: u256 = - reserve_config::get_liquidation_protocol_fee(&reserve_config_map); + let old_fee = reserve_config::get_liquidation_protocol_fee(&reserve_config_map); reserve_config::set_liquidation_protocol_fee(&mut reserve_config_map, new_fee); pool::set_reserve_configuration(asset, reserve_config_map); @@ -613,6 +657,8 @@ module aave_pool::pool_configurator { /// overcollateralization of the users using this category. /// @dev The new ltv and liquidation threshold must be greater than the base /// ltvs and liquidation thresholds of all assets within the eMode category + /// @dev Emits the EModeCategoryAdded event + /// @param account The account signer of the caller /// @param category_id The id of the category to be configured /// @param ltv The ltv associated with the category /// @param liquidation_threshold The liquidation threshold associated with the category @@ -630,12 +676,14 @@ module aave_pool::pool_configurator { ) { assert!( only_risk_or_pool_admins(signer::address_of(account)), - error_config::get_ecaller_not_risk_or_pool_admin(), + error_config::get_ecaller_not_risk_or_pool_admin() ); + assert!(ltv != 0, error_config::get_einvalid_emode_category_params()); assert!( - liquidation_threshold != 0, error_config::get_einvalid_emode_category_params() + liquidation_threshold != 0, + error_config::get_einvalid_emode_category_params() ); // validation of the parameters: the LTV can @@ -643,21 +691,22 @@ module aave_pool::pool_configurator { // (otherwise a loan against the asset would cause instantaneous liquidation) assert!( ltv <= liquidation_threshold, - error_config::get_einvalid_emode_category_params(), + error_config::get_einvalid_emode_category_params() ); assert!( liquidation_bonus > (math_utils::get_percentage_factor() as u16), - error_config::get_einvalid_emode_category_params(), + error_config::get_einvalid_emode_category_params() ); // if threshold * bonus is less than PERCENTAGE_FACTOR, it's guaranteed that at the moment // a loan is taken there is enough collateral available to cover the liquidation bonus assert!( math_utils::percent_mul( - (liquidation_threshold as u256), (liquidation_bonus as u256) + (liquidation_threshold as u256), + (liquidation_bonus as u256) ) <= math_utils::get_percentage_factor(), - error_config::get_einvalid_emode_category_params(), + error_config::get_einvalid_emode_category_params() ); let reserves = pool::get_reserves_list(); @@ -665,17 +714,15 @@ module aave_pool::pool_configurator { let reserve_config_map = pool::get_reserve_configuration(*vector::borrow(&reserves, i)); if ((category_id as u256) - == reserve_config::get_emode_category(&reserve_config_map)) { + == reserve_config::get_emode_category(&reserve_config_map)) { assert!( (ltv as u256) > reserve_config::get_ltv(&reserve_config_map), - error_config::get_einvalid_emode_category_params(), + error_config::get_einvalid_emode_category_params() ); assert!( (liquidation_threshold as u256) - > reserve_config::get_liquidation_threshold( - &reserve_config_map - ), - error_config::get_einvalid_emode_category_params(), + > reserve_config::get_liquidation_threshold(&reserve_config_map), + error_config::get_einvalid_emode_category_params() ); }; }; @@ -686,7 +733,7 @@ module aave_pool::pool_configurator { liquidation_threshold, liquidation_bonus, oracle, - label, + label ); event::emit( @@ -697,11 +744,13 @@ module aave_pool::pool_configurator { liquidation_bonus, oracle, label - }, + } ) } /// @notice Assign an efficiency mode (eMode) category to asset. + /// @dev Emits the EModeAssetCategoryChanged event + /// @param account The account signer of the caller /// @param asset The address of the underlying asset of the reserve /// @param new_category_id The new category id of the asset public entry fun set_asset_emode_category( @@ -709,21 +758,24 @@ module aave_pool::pool_configurator { ) { assert!( only_risk_or_pool_admins(signer::address_of(account)), - error_config::get_ecaller_not_risk_or_pool_admin(), + error_config::get_ecaller_not_risk_or_pool_admin() ); + let reserve_config_map = pool::get_reserve_configuration(asset); if (new_category_id != 0) { let emode_category = emode_logic::get_emode_category_data(new_category_id); let liquidation_threshold = emode_logic::get_emode_category_liquidation_threshold(&emode_category); + assert!( liquidation_threshold > ( reserve_config::get_liquidation_threshold(&reserve_config_map) as u16 ), - error_config::get_einvalid_emode_category_assignment(), + error_config::get_einvalid_emode_category_assignment() ); }; + let old_category_id = reserve_config::get_emode_category(&reserve_config_map); reserve_config::set_emode_category( &mut reserve_config_map, (new_category_id as u256) @@ -735,11 +787,13 @@ module aave_pool::pool_configurator { asset, old_category_id, new_category_id: (new_category_id as u256) - }, + } ) } /// @notice Updates the unbacked mint cap of reserve. + /// @dev Emits the UnbackedMintCapChanged event + /// @param account The account signer of the caller /// @param asset The address of the underlying asset of the reserve /// @param new_unbacked_mint_cap The new unbacked mint cap of the reserve public entry fun set_unbacked_mint_cap( @@ -747,8 +801,9 @@ module aave_pool::pool_configurator { ) { assert!( only_risk_or_pool_admins(signer::address_of(account)), - error_config::get_ecaller_not_risk_or_pool_admin(), + error_config::get_ecaller_not_risk_or_pool_admin() ); + let reserve_config_map = pool::get_reserve_configuration(asset); let old_unbacked_mint_cap: u256 = reserve_config::get_unbacked_mint_cap(&reserve_config_map); @@ -759,38 +814,48 @@ module aave_pool::pool_configurator { pool::set_reserve_configuration(asset, reserve_config_map); event::emit( - UnbackedMintCapChanged { asset, old_unbacked_mint_cap, new_unbacked_mint_cap }, + UnbackedMintCapChanged { asset, old_unbacked_mint_cap, new_unbacked_mint_cap } ) } /// @notice Pauses or unpauses all the protocol reserves. In the paused state all the protocol interactions /// are suspended. + /// @dev Emits the ReservePaused event for each reserve + /// @param account The account signer of the caller /// @param paused True if protocol needs to be paused, false otherwise public entry fun set_pool_pause(account: &signer, paused: bool) { assert!( only_emergency_admin(signer::address_of(account)), - error_config::get_ecaller_not_emergency_admin(), + error_config::get_ecaller_not_emergency_admin() ); + let reserves_address = pool::get_reserves_list(); for (i in 0..vector::length(&reserves_address)) { - set_reserve_pause(account, *vector::borrow(&reserves_address, i), paused); + set_reserve_pause( + account, + *vector::borrow(&reserves_address, i), + paused + ); }; } /// @notice Updates the protocol fee on the bridging + /// @dev Emits the BridgeProtocolFeeUpdated event + /// @param account The account signer of the caller /// @param new_bridge_protocol_fee The part of the premium sent to the protocol treasury public entry fun update_bridge_protocol_fee( account: &signer, new_bridge_protocol_fee: u256 ) { assert!( only_pool_admin(signer::address_of(account)), - error_config::get_ecaller_not_pool_admin(), + error_config::get_ecaller_not_pool_admin() ); assert!( new_bridge_protocol_fee <= math_utils::get_percentage_factor(), - error_config::get_ebridge_protocol_fee_invalid(), + error_config::get_ebridge_protocol_fee_invalid() ); + let old_bridge_protocol_fee = pool::get_bridge_protocol_fee(); pool::set_bridge_protocol_fee(new_bridge_protocol_fee); @@ -805,57 +870,68 @@ module aave_pool::pool_configurator { /// - A part is collected by the protocol reserves /// @dev Expressed in bps /// @dev The premium is calculated on the total amount borrowed + /// @dev Emits the FlashloanPremiumTotalUpdated event + /// @param account The account signer of the caller /// @param new_flashloan_premium_total The total flashloan premium public entry fun update_flashloan_premium_total( account: &signer, new_flashloan_premium_total: u128 ) { assert!( only_pool_admin(signer::address_of(account)), - error_config::get_ecaller_not_pool_admin(), + error_config::get_ecaller_not_pool_admin() ); assert!( - new_flashloan_premium_total <= (math_utils::get_percentage_factor() as u128), - error_config::get_eflashloan_premium_invalid(), + new_flashloan_premium_total + <= (math_utils::get_percentage_factor() as u128), + error_config::get_eflashloan_premium_invalid() ); let old_flashloan_premium_total = pool::get_flashloan_premium_total(); pool::update_flashloan_premiums( - new_flashloan_premium_total, pool::get_flashloan_premium_to_protocol() + new_flashloan_premium_total, + pool::get_flashloan_premium_to_protocol() ); + event::emit( FlashloanPremiumTotalUpdated { old_flashloan_premium_total, new_flashloan_premium_total - }, + } ); } /// @notice Updates the flash loan premium collected by protocol reserves /// @dev Expressed in bps /// @dev The premium to protocol is calculated on the total flashloan premium + /// @dev Emits the FlashloanPremiumToProtocolUpdated event + /// @param account The account signer of the caller /// @param new_flashloan_premium_to_protocol The part of the flashloan premium sent to the protocol treasury public entry fun update_flashloan_premium_to_protocol( account: &signer, new_flashloan_premium_to_protocol: u128 ) { assert!( only_pool_admin(signer::address_of(account)), - error_config::get_ecaller_not_pool_admin(), + error_config::get_ecaller_not_pool_admin() ); + assert!( new_flashloan_premium_to_protocol <= (math_utils::get_percentage_factor() as u128), - error_config::get_eflashloan_premium_invalid(), + error_config::get_eflashloan_premium_invalid() ); + let old_flashloan_premium_to_protocol = pool::get_flashloan_premium_to_protocol(); pool::update_flashloan_premiums( - pool::get_flashloan_premium_total(), new_flashloan_premium_to_protocol + pool::get_flashloan_premium_total(), + new_flashloan_premium_to_protocol ); + event::emit( FlashloanPremiumToProtocolUpdated { old_flashloan_premium_to_protocol, new_flashloan_premium_to_protocol - }, + } ) } @@ -864,10 +940,11 @@ module aave_pool::pool_configurator { let a_token_address = pool::get_reserve_a_token_address(&reserve_data); let reserve_accrued_to_treasury = pool::get_reserve_accrued_to_treasury(&reserve_data); - let a_token_total_supply = pool::scaled_a_token_total_supply(a_token_address); + let a_token_total_supply = pool::a_token_total_supply(a_token_address); + assert!( a_token_total_supply == 0 && reserve_accrued_to_treasury == 0, - error_config::get_ereserve_liquidity_not_zero(), + error_config::get_ereserve_liquidity_not_zero() ); } @@ -876,7 +953,8 @@ module aave_pool::pool_configurator { let variable_debt_token_address = pool::get_reserve_variable_debt_token_address(&reserve_data); let total_debt = - pool::scaled_variable_token_total_supply(variable_debt_token_address); + pool::variable_debt_token_total_supply(variable_debt_token_address); + assert!(total_debt == 0, error_config::get_ereserve_debt_not_zero()) } @@ -893,49 +971,11 @@ module aave_pool::pool_configurator { } fun only_asset_listing_or_pool_admins(account: address): bool { - acl_manage::is_asset_listing_admin(account) || acl_manage::is_pool_admin(account) + acl_manage::is_asset_listing_admin(account) + || acl_manage::is_pool_admin(account) } fun only_risk_or_pool_admins(account: address): bool { acl_manage::is_risk_admin(account) || acl_manage::is_pool_admin(account) } - - public entry fun configure_reserves( - account: &signer, - asset: vector
, - base_ltv: vector, - liquidation_threshold: vector, - liquidation_bonus: vector, - reserve_factor: vector, - borrow_cap: vector, - supply_cap: vector, - borrowing_enabled: vector, - flash_loan_enabled: vector - ) { - for (i in 0..vector::length(&asset)) { - let asset_address = *vector::borrow(&asset, i); - let ltv = *vector::borrow(&base_ltv, i); - let threshold = *vector::borrow(&liquidation_threshold, i); - let bonus = *vector::borrow(&liquidation_bonus, i); - configure_reserve_as_collateral(account, asset_address, ltv, threshold, bonus); - - let is_borrowing_enabled = *vector::borrow(&borrowing_enabled, i); - if (is_borrowing_enabled) { - set_reserve_borrowing(account, asset_address, true); - set_borrow_cap(account, asset_address, *vector::borrow(&borrow_cap, i)); - }; - - set_reserve_flash_loaning( - account, - asset_address, - *vector::borrow(&flash_loan_enabled, i), - ); - set_supply_cap(account, asset_address, *vector::borrow(&supply_cap, i)); - set_reserve_factor( - account, - asset_address, - *vector::borrow(&reserve_factor, i), - ); - } - } } diff --git a/aave-core/sources/aave-pool/pool_data_provider.move b/aave-core/sources/aave-pool/pool_data_provider.move index 97a8c95..f137bb8 100644 --- a/aave-core/sources/aave-pool/pool_data_provider.move +++ b/aave-core/sources/aave-pool/pool_data_provider.move @@ -2,11 +2,11 @@ module aave_pool::pool_data_provider { use std::string::String; use std::vector; - use aave_config::reserve as reserve_config; - use aave_config::user as user_config; + use aave_config::reserve_config; + use aave_config::user_config; use aave_pool::a_token_factory; - use aave_pool::mock_underlying_token_factory; + use aave_pool::fungible_asset_manager; use aave_pool::pool; use aave_pool::variable_debt_token_factory; @@ -26,75 +26,99 @@ module aave_pool::pool_data_provider { } #[view] + /// @notice Returns the list of the existing reserves in the pool. + /// @return The list of reserves, pairs of symbols and addresses public fun get_all_reserves_tokens(): vector { let reserves = pool::get_reserves_list(); let reserves_tokens = vector::empty(); + for (i in 0..vector::length(&reserves)) { let reserve_address = *vector::borrow(&reserves, i); + vector::push_back( &mut reserves_tokens, TokenData { - symbol: mock_underlying_token_factory::symbol(reserve_address), + symbol: fungible_asset_manager::symbol(reserve_address), token_address: reserve_address - }, + } ); }; + reserves_tokens } #[view] + /// @notice Returns the list of the existing ATokens in the pool. + /// @return The list of ATokens, pairs of symbols and addresses public fun get_all_a_tokens(): vector { let reserves = pool::get_reserves_list(); let a_tokens = vector::empty(); + for (i in 0..vector::length(&reserves)) { let reserve_address = *vector::borrow(&reserves, i); let reserve_data = pool::get_reserve_data(reserve_address); let a_token_address = pool::get_reserve_a_token_address(&reserve_data); + vector::push_back( &mut a_tokens, TokenData { symbol: a_token_factory::symbol(a_token_address), token_address: a_token_address - }, + } ); }; + a_tokens } #[view] + /// @notice Returns the list of the existing variable debt Tokens in the pool. + /// @return The list of variableDebtTokens, pairs of symbols and addresses public fun get_all_var_tokens(): vector { let reserves = pool::get_reserves_list(); let var_tokens = vector::empty(); - let i = 0; - while (i < vector::length(&reserves)) { + + for (i in 0..vector::length(&reserves)) { let reserve_address = *vector::borrow(&reserves, i); let reserve_data = pool::get_reserve_data(reserve_address); let var_token_address = pool::get_reserve_variable_debt_token_address(&reserve_data); + vector::push_back( &mut var_tokens, TokenData { symbol: variable_debt_token_factory::symbol(var_token_address), token_address: var_token_address - }, + } ); - - i = i + 1 }; + var_tokens } #[view] - public fun get_reserve_configuration_data(asset: address) - : ( - u256, u256, u256, u256, u256, bool, bool, bool, bool - ) { + /// @notice Returns the configuration data of the reserve + /// @dev Not returning borrow and supply caps for compatibility, nor pause flag + /// @param asset The address of the underlying asset of the reserve + /// @return decimals The number of decimals of the reserve + /// @return ltv The ltv of the reserve + /// @return liquidation_threshold The liquidationThreshold of the reserve + /// @return liquidation_bonus The liquidationBonus of the reserve + /// @return reserve_factor The reserveFactor of the reserve + /// @return usage_as_collateral_enabled True if the usage as collateral is enabled, false otherwise + /// @return borrowing_enabled True if borrowing is enabled, false otherwise + /// @return is_active True if it is active, false otherwise + /// @return is_frozen True if it is frozen, false otherwise + public fun get_reserve_configuration_data( + asset: address + ): (u256, u256, u256, u256, u256, bool, bool, bool, bool) { let reserve_configuration = pool::get_reserve_configuration(asset); - let (ltv, liquidation_threshold, liquidation_bonus, decimals, reserve_factor, _) = reserve_config::get_params(&reserve_configuration); + let (is_active, is_frozen, borrowing_enabled, _) = reserve_config::get_flags(&reserve_configuration); + let usage_as_collateral_enabled = liquidation_threshold != 0; ( @@ -111,103 +135,158 @@ module aave_pool::pool_data_provider { } #[view] + /// @notice Returns the efficiency mode category of the reserve + /// @param asset The address of the underlying asset of the reserve + /// @return The eMode id of the reserve public fun get_reserve_emode_category(asset: address): u256 { let reserve_configuration = pool::get_reserve_configuration(asset); + reserve_config::get_emode_category(&reserve_configuration) } #[view] + /// @notice Returns the caps parameters of the reserve + /// @param asset The address of the underlying asset of the reserve + /// @return borrow_cap The borrow cap of the reserve + /// @return supply_cap The supply cap of the reserve public fun get_reserve_caps(asset: address): (u256, u256) { let reserve_configuration = pool::get_reserve_configuration(asset); reserve_config::get_caps(&reserve_configuration) } #[view] + /// @notice Returns if the pool is paused + /// @param asset The address of the underlying asset of the reserve + /// @return isPaused True if the pool is paused, false otherwise public fun get_paused(asset: address): bool { let reserve_configuration = pool::get_reserve_configuration(asset); + reserve_config::get_paused(&reserve_configuration) } #[view] + /// @notice Returns the siloed borrowing flag + /// @param asset The address of the underlying asset of the reserve + /// @return True if the asset is siloed for borrowing public fun get_siloed_borrowing(asset: address): bool { let reserve_configuration = pool::get_reserve_configuration(asset); + reserve_config::get_siloed_borrowing(&reserve_configuration) } #[view] + /// @notice Returns the protocol fee on the liquidation bonus + /// @param asset The address of the underlying asset of the reserve + /// @return The protocol fee on liquidation public fun get_liquidation_protocol_fee(asset: address): u256 { let reserve_configuration = pool::get_reserve_configuration(asset); + reserve_config::get_liquidation_protocol_fee(&reserve_configuration) } #[view] + /// @notice Returns the unbacked mint cap of the reserve + /// @param asset The address of the underlying asset of the reserve + /// @return The unbacked mint cap of the reserve public fun get_unbacked_mint_cap(asset: address): u256 { let reserve_configuration = pool::get_reserve_configuration(asset); + reserve_config::get_unbacked_mint_cap(&reserve_configuration) } #[view] + /// @notice Returns the debt ceiling of the reserve + /// @param asset The address of the underlying asset of the reserve + /// @return The debt ceiling of the reserve public fun get_debt_ceiling(asset: address): u256 { let reserve_configuration = pool::get_reserve_configuration(asset); + reserve_config::get_debt_ceiling(&reserve_configuration) } #[view] + /// @notice Returns the debt ceiling decimals + /// @return The debt ceiling decimals public fun get_debt_ceiling_decimals(): u256 { reserve_config::get_debt_ceiling_decimals() } #[view] - public fun get_reserve_data(asset: address) - : ( + /// @notice Returns the reserve data + /// @param asset The address of the underlying asset of the reserve + /// @return unbacked The amount of unbacked tokens + /// @return accrued_to_treasury_scaled The scaled amount of tokens accrued to treasury that is to be minted + /// @return total_a_token The total supply of the aToken + /// @return total_variable_debt The total variable debt of the reserve + /// @return liquidity_rate The liquidity rate of the reserve + /// @return variable_borrow_rate The variable borrow rate of the reserve + /// @return liquidity_index The liquidity index of the reserve + /// @return variable_borrow_index The variable borrow index of the reserve + /// @return last_update_timestamp The timestamp of the last update of the reserve + public fun get_reserve_data(asset: address): + ( u256, u256, u256, u256, u256, u256, u256, u256, u64 ) { let reserve_data = pool::get_reserve_data(asset); let a_token_address = pool::get_reserve_a_token_address(&reserve_data); let variable_token_address = pool::get_reserve_variable_debt_token_address(&reserve_data); + ( (pool::get_reserve_unbacked(&reserve_data) as u256), pool::get_reserve_accrued_to_treasury(&reserve_data), - pool::scaled_a_token_total_supply(a_token_address), - pool::scaled_variable_token_total_supply(variable_token_address), + pool::a_token_total_supply(a_token_address), + pool::variable_debt_token_total_supply(variable_token_address), (pool::get_reserve_current_liquidity_rate(&reserve_data) as u256), (pool::get_reserve_current_variable_borrow_rate(&reserve_data) as u256), (pool::get_reserve_liquidity_index(&reserve_data) as u256), (pool::get_reserve_variable_borrow_index(&reserve_data) as u256), - pool::get_reserve_last_update_timestamp(&reserve_data), + pool::get_reserve_last_update_timestamp(&reserve_data) ) } #[view] + /// @notice Returns the total supply of aTokens for a given asset + /// @param asset The address of the underlying asset of the reserve + /// @return The total supply of the aToken public fun get_a_token_total_supply(asset: address): u256 { let reserve_data = pool::get_reserve_data(asset); let a_token_address = pool::get_reserve_a_token_address(&reserve_data); - pool::scaled_a_token_total_supply(a_token_address) + pool::a_token_total_supply(a_token_address) } #[view] + /// @notice Returns the total debt for a given asset + /// @param asset The address of the underlying asset of the reserve + /// @return The total debt for asset public fun get_total_debt(asset: address): u256 { let reserve_data = pool::get_reserve_data(asset); let variable_token_address = pool::get_reserve_variable_debt_token_address(&reserve_data); - pool::scaled_variable_token_total_supply(variable_token_address) + pool::variable_debt_token_total_supply(variable_token_address) } #[view] - public fun get_user_reserve_data(asset: address, user: address) - : (u256, u256, u256, u256, bool) { + /// @notice Returns the user data in a reserve + /// @param asset The address of the underlying asset of the reserve + /// @param user The address of the user + /// @return current_a_token_balance The current AToken balance of the user + /// @return current_variable_debt The current variable debt of the user + /// @return scaled_variable_debt The scaled variable debt of the user + /// @return liquidity_rate The liquidity rate of the reserve + /// @return usage_as_collateral_enabled True if the user is using the asset as collateral, false otherwise + public fun get_user_reserve_data(asset: address, user: address): + (u256, u256, u256, u256, bool) { let reserve_data = pool::get_reserve_data(asset); let a_token_address = pool::get_reserve_a_token_address(&reserve_data); let variable_token_address = pool::get_reserve_variable_debt_token_address(&reserve_data); - let current_a_token_balance = - pool::scaled_a_token_balance_of(user, a_token_address); + let current_a_token_balance = pool::a_token_balance_of(user, a_token_address); let current_variable_debt = - pool::scaled_variable_token_balance_of(user, variable_token_address); + pool::variable_debt_token_balance_of(user, variable_token_address); let scaled_variable_debt = variable_debt_token_factory::scaled_balance_of(user, variable_token_address); let liquidity_rate = @@ -216,7 +295,8 @@ module aave_pool::pool_data_provider { let user_configuration = pool::get_user_configuration(user); let usage_as_collateral_enabled = user_config::is_using_as_collateral( - &user_configuration, (pool::get_reserve_id(&reserve_data) as u256) + &user_configuration, + (pool::get_reserve_id(&reserve_data) as u256) ); ( @@ -229,17 +309,26 @@ module aave_pool::pool_data_provider { } #[view] + /// @notice Returns the token addresses of the reserve + /// @param asset The address of the underlying asset of the reserve + /// @return a_token_address The AToken address of the reserve + /// @return variable_debt_token_address The VariableDebtToken address of the reserve public fun get_reserve_tokens_addresses(asset: address): (address, address) { let reserve_data = pool::get_reserve_data(asset); + ( pool::get_reserve_a_token_address(&reserve_data), - pool::get_reserve_variable_debt_token_address(&reserve_data), + pool::get_reserve_variable_debt_token_address(&reserve_data) ) } #[view] + /// @notice Returns whether the reserve has FlashLoans enabled or disabled + /// @param asset The address of the underlying asset of the reserve + /// @return True if FlashLoans are enabled, false otherwise public fun get_flash_loan_enabled(asset: address): bool { let reserve_configuration = pool::get_reserve_configuration(asset); + reserve_config::get_flash_loan_enabled(&reserve_configuration) } } diff --git a/aave-core/sources/aave-pool/validation_logic.move b/aave-core/sources/aave-pool/validation_logic.move deleted file mode 100644 index 9fd2d31..0000000 --- a/aave-core/sources/aave-pool/validation_logic.move +++ /dev/null @@ -1,169 +0,0 @@ -module aave_pool::pool_validation { - use std::string::Self; - - use aave_acl::acl_manage; - use aave_config::error as error_config; - use aave_config::reserve as reserve_config; - use aave_config::reserve::ReserveConfigurationMap; - use aave_config::user::{Self as user_config, UserConfigurationMap}; - - use aave_pool::generic_logic; - use aave_pool::pool::{Self, ReserveData}; - - /// @notice Validates the health factor of a user and the ltv of the asset being withdrawn. - /// @param reserves_data The reserve data of reserve - /// @param reserves_count The number of available reserves - /// @param user_config_map the user configuration map - /// @param from The user from which the aTokens are being transferred - /// @param user_emode_category The users active efficiency mode category - /// @param emode_ltv The ltv of the efficiency mode category - /// @param emode_liq_threshold The liquidation threshold of the efficiency mode category - /// @param emode_asset_price The price of the efficiency mode category - public fun validate_hf_and_ltv( - reserve_data: &mut ReserveData, - reserves_count: u256, - user_config_map: &UserConfigurationMap, - from: address, - user_emode_category: u8, - emode_ltv: u256, - emode_liq_threshold: u256, - emode_asset_price: u256, - ) { - let (_, has_zero_ltv_collateral) = - validate_health_factor( - reserves_count, - user_config_map, - from, - user_emode_category, - emode_ltv, - emode_liq_threshold, - emode_asset_price, - ); - let reserve_configuration = - pool::get_reserve_configuration_by_reserve_data(reserve_data); - assert!( - !has_zero_ltv_collateral || reserve_config::get_ltv(&reserve_configuration) == - 0, - error_config::get_eltv_validation_failed(), - ); - } - - /// @notice Validates if an asset should be automatically activated as collateral in the following actions: supply, - /// transfer, mint unbacked, and liquidate - /// @dev This is used to ensure that isolated assets are not enabled as collateral automatically - /// @param user_config_map the user configuration map - /// @param reserve_config_map The reserve configuration map - /// @return True if the asset can be activated as collateral, false otherwise - public fun validate_automatic_use_as_collateral( - account: address, - user_config_map: &UserConfigurationMap, - reserve_config_map: &ReserveConfigurationMap - ): bool { - if (reserve_config::get_debt_ceiling(reserve_config_map) != 0) { - // ensures only the ISOLATED_COLLATERAL_SUPPLIER_ROLE can enable collateral as side-effect of an action - if (!acl_manage::has_role( - string::utf8(user_config::get_isolated_collateral_supplier_role()), - account, - )) { - return false - }; - }; - return validate_use_as_collateral(user_config_map, reserve_config_map) - } - - /// @notice Validates the action of activating the asset as collateral. - /// @dev Only possible if the asset has non-zero LTV and the user is not in isolation mode - /// @param user_config_map the user configuration map - /// @param reserve_config_map The reserve configuration map - /// @return True if the asset can be activated as collateral, false otherwise - public fun validate_use_as_collateral( - user_config_map: &UserConfigurationMap, - reserve_config_map: &ReserveConfigurationMap - ): bool { - if (reserve_config::get_ltv(reserve_config_map) == 0) { - return false - }; - if (!user_config::is_using_as_collateral_any(user_config_map)) { - return true - }; - let (isolation_mode_active, _, _) = - pool::get_isolation_mode_state(user_config_map); - ( - !isolation_mode_active - && reserve_config::get_debt_ceiling(reserve_config_map) == 0 - ) - } - - /// notice Validates the health factor of a user. - /// @param reserves_count The number of available reserves - /// @param user_config_map the user configuration map - /// @param user The user to validate health factor of - /// @param user_emode_category The users active efficiency mode category - /// @param emode_ltv The ltv of the efficiency mode category - /// @param emode_liq_threshold The liquidation threshold of the efficiency mode category - /// @param emode_asset_price The price of the efficiency mode category - public fun validate_health_factor( - reserves_count: u256, - user_config_map: &UserConfigurationMap, - user: address, - user_emode_category: u8, - emode_ltv: u256, - emode_liq_threshold: u256, - emode_asset_price: u256, - ): (u256, bool) { - let (_, _, _, _, health_factor, has_zero_ltv_collateral) = - generic_logic::calculate_user_account_data( - reserves_count, - user_config_map, - user, - user_emode_category, - emode_ltv, - emode_liq_threshold, - emode_asset_price, - ); - assert!( - health_factor >= user_config::get_health_factor_liquidation_threshold(), - error_config::get_ehealth_factor_lower_than_liquidation_threshold(), - ); - - (health_factor, has_zero_ltv_collateral) - } - - /// @notice Validates the action of setting efficiency mode. - /// @param user_config_map the user configuration map - /// @param reserves_count The total number of valid reserves - /// @param category_id The id of the category - /// @param liquidation_threshold The liquidation threshold - public fun validate_set_user_emode( - user_config_map: &UserConfigurationMap, - reserves_count: u256, - category_id: u8, - liquidation_threshold: u16 - ) { - // category is invalid if the liq threshold is not set - assert!( - category_id != 0 || liquidation_threshold != 0, - error_config::get_einconsistent_emode_category(), - ); - - // eMode can always be enabled if the user hasn't supplied anything - if (!user_config::is_empty(user_config_map)) { - // if user is trying to set another category than default we require that - // either the user is not borrowing, or it's borrowing assets of category_id - if (category_id != 0) { - for (i in 0..reserves_count) { - if (user_config::is_borrowing(user_config_map, i)) { - let reserve_address = pool::get_reserve_address_by_id(i); - let reserve_configuration = - pool::get_reserve_configuration(reserve_address); - assert!( - reserve_config::get_emode_category(&reserve_configuration) - == (category_id as u256), - error_config::get_einconsistent_emode_category(), - ); - }; - } - } - } - } -} diff --git a/aave-core/sources/aave-supply-borrow/user_logic.move b/aave-core/sources/aave-supply-borrow/user_logic.move deleted file mode 100644 index 06b1115..0000000 --- a/aave-core/sources/aave-supply-borrow/user_logic.move +++ /dev/null @@ -1,54 +0,0 @@ -module aave_pool::user_logic { - - use aave_pool::emode_logic; - use aave_pool::generic_logic; - use aave_pool::pool; - - #[view] - /// @notice Returns the user account data across all the reserves - /// @param user The address of the user - /// @return total_collateral_base The total collateral of the user in the base currency used by the price feed - /// @return total_debt_base The total debt of the user in the base currency used by the price feed - /// @return available_borrows_base The borrowing power left of the user in the base currency used by the price feed - /// @return current_liquidation_threshold The liquidation threshold of the user - /// @return ltv The loan to value of The user - /// @return health_factor The current health factor of the user - public fun get_user_account_data(user: address): (u256, u256, u256, u256, u256, u256) { - let user_config_map = pool::get_user_configuration(user); - let reserves_count = pool::get_reserves_count(); - let user_emode_category = (emode_logic::get_user_emode(user) as u8); - let (emode_ltv, emode_liq_threshold, emode_asset_price) = - emode_logic::get_emode_configuration(user_emode_category); - let ( - total_collateral_base, - total_debt_base, - ltv, - current_liquidation_threshold, - health_factor, - _ - ) = - generic_logic::calculate_user_account_data( - reserves_count, - &user_config_map, - user, - user_emode_category, - emode_ltv, - emode_liq_threshold, - emode_asset_price, - ); - - let available_borrows_base = - generic_logic::calculate_available_borrows( - total_collateral_base, total_debt_base, ltv - ); - - ( - total_collateral_base, - total_debt_base, - available_borrows_base, - current_liquidation_threshold, - ltv, - health_factor - ) - } -} diff --git a/aave-core/sources/aave-tokens/a_token_factory.move b/aave-core/sources/aave-tokens/a_token_factory.move index 158c9b7..c4bfde6 100644 --- a/aave-core/sources/aave-tokens/a_token_factory.move +++ b/aave-core/sources/aave-tokens/a_token_factory.move @@ -1,17 +1,22 @@ module aave_pool::a_token_factory { + use std::option; use std::signer; use std::string::{Self, String}; - use std::vector; + use aptos_std::smart_table; + use aptos_std::smart_table::SmartTable; + use aptos_std::string_utils::format2; use aptos_framework::account; + use aptos_framework::account::SignerCapability; use aptos_framework::event::Self; + use aptos_framework::fungible_asset; use aptos_framework::fungible_asset::Metadata; use aptos_framework::object::{Self, Object}; - use aptos_framework::resource_account; - use aave_config::error as error_config; + use aave_acl::acl_manage; + use aave_config::error_config; use aave_math::wad_ray_math; - use aave_pool::mock_underlying_token_factory::Self; + use aave_pool::fungible_asset_manager; use aave_pool::token_base; friend aave_pool::pool; @@ -25,14 +30,20 @@ module aave_pool::a_token_factory { friend aave_pool::a_token_factory_tests; #[test_only] friend aave_pool::pool_configurator_tests; + #[test_only] + friend aave_pool::ui_incentive_data_provider_v3; + #[test_only] + friend aave_pool::ui_pool_data_provider_v3; + // #[test_only] + // friend aave_pool::emission_manager_tests; + // #[test_only] + // friend aave_pool::rewards_controller_tests; const ATOKEN_REVISION: u256 = 0x1; - // error config - const E_NOT_A_TOKEN_ADMIN: u64 = 1; #[event] /// @dev Emitted when an aToken is initialized - /// @param underlyingAsset The address of the underlying asset + /// @param underlying_asset The address of the underlying asset /// @param treasury The address of the treasury /// @param a_token_decimals The decimals of the underlying /// @param a_token_name The name of the aToken @@ -42,7 +53,7 @@ module aave_pool::a_token_factory { treasury: address, a_token_decimals: u8, a_token_name: String, - a_token_symbol: String, + a_token_symbol: String } #[event] @@ -55,14 +66,46 @@ module aave_pool::a_token_factory { from: address, to: address, value: u256, - index: u256, + index: u256 + } + + struct TokenData has store, drop { + underlying_asset: address, + treasury: address, + signer_cap: SignerCapability + } + + // Atoken metadata_address => TokenData + struct TokenMap has key { + value: SmartTable, + count: u256 + } + + fun init_module(signer: &signer) { + token_base::only_token_admin(signer); + move_to( + signer, + TokenMap { + value: smart_table::new(), + count: 0 + } + ) + } + + fun assert_token_exists(metadata_address: address) acquires TokenMap { + let token_map = borrow_global(@aave_pool); + assert!( + smart_table::contains(&token_map.value, metadata_address), + error_config::get_etoken_not_exist() + ); } // // Entry Functions // /// @notice Creates a new aToken - /// @param signer The signer of the transaction + /// @dev Only callable by the pool module + /// @param signer The signer of the caller /// @param name The name of the aToken /// @param symbol The symbol of the aToken /// @param decimals The decimals of the aToken @@ -70,6 +113,7 @@ module aave_pool::a_token_factory { /// @param project_uri The project URI of the aToken /// @param underlying_asset The address of the underlying asset /// @param treasury The address of the treasury + /// @return The address of the aToken public(friend) fun create_token( signer: &signer, name: String, @@ -78,61 +122,90 @@ module aave_pool::a_token_factory { icon_uri: String, project_uri: String, underlying_asset: address, - treasury: address, - ) { - let user_addr = signer::address_of(signer); - if (!account::exists_at(user_addr)) { - aptos_framework::aptos_account::create_account(user_addr); - }; - let seed = *string::bytes(&symbol); - resource_account::create_resource_account(signer, seed, vector::empty()); - let resource_account = - account::create_resource_address(&signer::address_of(signer), seed); + treasury: address + ): address acquires TokenMap { + only_asset_listing_or_pool_admins(signer); - token_base::create_a_token( - signer, + let token_map = borrow_global_mut(@aave_pool); + validate_unique_token(token_map, name, symbol); + + let token_count = token_map.count + 1; + let seed = *string::bytes(&format2(&b"{}_{}", symbol, token_count)); + let user_signer_addr = signer::address_of(signer); + let metadata_address = object::create_object_address(&user_signer_addr, seed); + + assert!( + !smart_table::contains(&token_map.value, metadata_address), + error_config::get_etoken_already_exists() + ); + + let (_resource_signer, signer_cap) = + account::create_resource_account(signer, seed); + + let token_data = TokenData { underlying_asset, treasury, signer_cap }; + smart_table::add(&mut token_map.value, metadata_address, token_data); + + let constructor_ref = &object::create_named_object(signer, seed); + token_base::create_token( + constructor_ref, name, symbol, decimals, icon_uri, - project_uri, - underlying_asset, - treasury, - resource_account, + project_uri ); + token_map.count = token_count; + event::emit( Initialized { underlying_asset, treasury, a_token_decimals: decimals, a_token_name: name, - a_token_symbol: symbol, - }, - ) + a_token_symbol: symbol + } + ); + + metadata_address } /// @notice Rescue and transfer tokens locked in this contract - /// @param token The address of the token + /// @param account The account signer of the caller + /// @param token The address of the underlying token /// @param to The address of the recipient /// @param amount The amount of token to transfer + /// @param meadata_address The address of the aToken public entry fun rescue_tokens( - account: &signer, token: address, to: address, amount: u256 - ) { + account: &signer, + token: address, + to: address, + amount: u256, + metadata_address: address + ) acquires TokenMap { token_base::only_pool_admin(account); + assert_token_exists(metadata_address); + assert!( - token != get_underlying_asset_address(token), - error_config::get_eunderlying_cannot_be_rescued(), + token != get_underlying_asset_address(metadata_address), + error_config::get_eunderlying_cannot_be_rescued() + ); + + let a_token_resource_account = get_token_account_with_signer(metadata_address); + fungible_asset_manager::transfer( + &a_token_resource_account, + to, + (amount as u64), + token ); - let account_address = signer::address_of(account); - token_base::transfer_internal(account_address, to, (amount as u64), token); } // // Functions Call between contracts // - /// @notice Mints `amount` aTokens to `user` + /// @notice Mints `amount` aTokens to `on_behalf_of` + /// @dev Only callable by the bridge_logic and supply_logic module /// @param caller The address performing the mint /// @param on_behalf_of The address of the user that will receive the minted aTokens /// @param amount The amount of tokens getting minted @@ -144,11 +217,19 @@ module aave_pool::a_token_factory { amount: u256, index: u256, metadata_address: address - ) { - token_base::mint_scaled(caller, on_behalf_of, amount, index, metadata_address); + ) acquires TokenMap { + assert_token_exists(metadata_address); + token_base::mint_scaled( + caller, + on_behalf_of, + amount, + index, + metadata_address + ); } - /// @notice Burns aTokens from `user` and sends the equivalent amount of underlying to `receiverOfUnderlying` + /// @notice Burns aTokens from `from` and sends the equivalent amount of underlying to `receiver_of_underlying` + /// @dev Only callable by the supply_logic, borrow_logic and liquidation_logic module /// @dev In some instances, the mint event could be emitted from a burn transaction /// if the amount to burn is less than the interest that the user accrued /// @param from The address from which the aTokens will be burned @@ -162,60 +243,68 @@ module aave_pool::a_token_factory { amount: u256, index: u256, metadata_address: address - ) { + ) acquires TokenMap { + assert_token_exists(metadata_address); + token_base::burn_scaled( from, receiver_of_underlying, amount, index, - metadata_address, + metadata_address ); - if (receiver_of_underlying != get_token_account_address(metadata_address)) { - mock_underlying_token_factory::transfer_from( - get_token_account_address(metadata_address), + + let a_token_resource_account = get_token_account_address(metadata_address); + if (receiver_of_underlying != a_token_resource_account) { + fungible_asset_manager::transfer( + &get_token_account_with_signer(metadata_address), receiver_of_underlying, (amount as u64), - get_underlying_asset_address(metadata_address), + get_underlying_asset_address(metadata_address) ) } } /// @notice Mints aTokens to the reserve treasury + /// @dev Only callable by the pool module /// @param amount The amount of tokens getting minted /// @param index The next liquidity index of the reserve /// @param metadata_address The address of the aToken public(friend) fun mint_to_treasury( amount: u256, index: u256, metadata_address: address - ) { + ) acquires TokenMap { + assert_token_exists(metadata_address); if (amount != 0) { - let token_data = token_base::get_token_data(metadata_address); + let token_data = get_token_data(metadata_address); token_base::mint_scaled( @aave_pool, - token_base::get_treasury_address(&token_data), + token_data.treasury, amount, index, - metadata_address, + metadata_address ) } } - /// @notice Transfers the underlying asset to `target`. - /// @dev Used by the Pool to transfer assets in borrow(), withdraw() and flashLoan() + /// @notice Transfers the underlying asset to `to`. + /// @dev Only callable by the borrow_logic and flashloan_logic module /// @param to The recipient of the underlying /// @param amount The amount getting transferred /// @param metadata_address The address of the aToken public(friend) fun transfer_underlying_to( to: address, amount: u256, metadata_address: address - ) { - mock_underlying_token_factory::transfer_from( - get_token_account_address(metadata_address), + ) acquires TokenMap { + assert_token_exists(metadata_address); + fungible_asset_manager::transfer( + &get_token_account_with_signer(metadata_address), to, (amount as u64), - get_underlying_asset_address(metadata_address), + get_underlying_asset_address(metadata_address) ) } /// @notice Transfers aTokens in the event of a borrow being liquidated, in case the liquidators reclaims the aToken + /// @dev Only callable by the liquidation_logic module /// @param from The address getting liquidated, current owner of the aTokens /// @param to The recipient /// @param amount The amount of tokens getting transferred @@ -227,24 +316,28 @@ module aave_pool::a_token_factory { amount: u256, index: u256, metadata_address: address - ) { + ) acquires TokenMap { + assert_token_exists(metadata_address); token_base::transfer(from, to, amount, index, metadata_address); // send balance transfer event event::emit( - BalanceTransfer { from, to, value: wad_ray_math::ray_div(amount, index), index }, + BalanceTransfer { from, to, value: wad_ray_math::ray_div(amount, index), index } ); } /// @notice Handles the underlying received by the aToken after the transfer has been completed. - /// @dev The default implementation is empty as with standard ERC20 tokens, nothing needs to be done after the - /// transfer is concluded. However in the future there may be aTokens that allow for example to stake the underlying - /// to receive LM rewards. In that case, `handleRepayment()` would perform the staking of the underlying asset. - /// @param user The user executing the repayment - /// @param on_behalf_of The address of the user who will get his debt reduced/removed - /// @param amount The amount getting repaid - /// @param metadata_address The address of the aToken + /// @dev The default implementation is empty, nothing needs to be done after the transfer is concluded. + /// However in the future there may be aTokens that allow for example to stake the underlying + /// to receive LM rewards. In that case, `handle_repayment()` would perform the staking of the underlying asset. + /// @param _user The user executing the repayment + /// @param _on_behalf_of The address of the user who will get his debt reduced/removed + /// @param _amount The amount getting repaid + /// @param _metadata_address The address of the aToken public fun handle_repayment( - _user: address, _onBehalfOf: address, _amount: u256, _metadata_address: address + _user: address, + _on_behalf_of: address, + _amount: u256, + _metadata_address: address ) { // Intentionally left blank } @@ -253,52 +346,58 @@ module aave_pool::a_token_factory { // View functions // - #[view] - public fun get_revision(): u256 { - ATOKEN_REVISION - } + inline fun get_token_data(metadata_address: address): &TokenData acquires TokenMap { + let token_map = borrow_global(@aave_pool); + assert!( + smart_table::contains(&token_map.value, metadata_address), + error_config::get_etoken_not_exist() + ); - #[view] - /// @notice Return the address of the managed fungible asset that's created resource account. - /// @param metadata_address The address of the aToken - public fun get_token_account_address(metadata_address: address): address { - let token_data = token_base::get_token_data(metadata_address); - token_base::get_resource_account(&token_data) + smart_table::borrow(&token_map.value, metadata_address) } #[view] - public fun get_metadata_by_symbol(owner: address, symbol: String): Object { - let metadata_address = - object::create_object_address(&owner, *string::bytes(&symbol)); - object::address_to_object(metadata_address) + public fun get_revision(): u256 { + ATOKEN_REVISION } #[view] - public fun token_address(owner: address, symbol: String): address { - object::create_object_address(&owner, *string::bytes(&symbol)) + /// @notice Retrieves the account address of the managed fungible asset associated with a specific aToken. + /// @dev Creates a signer capability for the resource account managing the fungible asset and then retrieves its address. + /// @param metadata_address The address of the aToken + /// @return The address of the managed fungible asset account. + public fun get_token_account_address(metadata_address: address): address acquires TokenMap { + let token_data = get_token_data(metadata_address); + let account_signer = + account::create_signer_with_capability(&token_data.signer_cap); + signer::address_of(&account_signer) } - #[view] - public fun asset_metadata(owner: address, symbol: String): Object { - object::address_to_object(token_address(owner, symbol)) + /// @notice Retrieves the signer of the managed fungible asset associated with a specific aToken. + /// @dev Creates a signer capability for the resource account that manages the fungible asset. + /// @param metadata_address The address of the aToken. + /// @return The signer of the managed fungible asset. + fun get_token_account_with_signer(metadata_address: address): signer acquires TokenMap { + let token_data = get_token_data(metadata_address); + account::create_signer_with_capability(&token_data.signer_cap) } #[view] /// @notice Returns the address of the Aave treasury, receiving the fees on this aToken. /// @param metadata_address The address of the aToken /// @return Address of the Aave treasury - public fun get_reserve_treasury_address(metadata_address: address): address { - let token_data = token_base::get_token_data(metadata_address); - token_base::get_treasury_address(&token_data) + public fun get_reserve_treasury_address(metadata_address: address): address acquires TokenMap { + let token_data = get_token_data(metadata_address); + token_data.treasury } #[view] /// @notice Returns the address of the underlying asset of this aToken (E.g. WETH for aWETH) /// @param metadata_address The address of the aToken /// @return The address of the underlying asset - public fun get_underlying_asset_address(metadata_address: address): address { - let token_data = token_base::get_token_data(metadata_address); - token_base::get_underlying_asset(&token_data) + public fun get_underlying_asset_address(metadata_address: address): address acquires TokenMap { + let token_data = get_token_data(metadata_address); + token_data.underlying_asset } #[view] @@ -359,4 +458,87 @@ module aave_pool::a_token_factory { public fun decimals(metadata_address: address): u8 { token_base::decimals(metadata_address) } + + /// @notice Validates that the aToken name and symbol are unique + /// @param token_map The aToken map + /// @param name The name of the aToken + /// @param symbol The symbol of the aToken + fun validate_unique_token( + token_map: &TokenMap, name: String, symbol: String + ) { + smart_table::for_each_ref( + &token_map.value, + |metadata_address, _token_data| { + let asset_name = name(*metadata_address); + let asset_symbol = symbol(*metadata_address); + assert!( + asset_name != name, error_config::get_etoken_name_already_exist() + ); + assert!( + asset_symbol != symbol, + error_config::get_etoken_symbol_already_exist() + ); + } + ); + } + + /// @notice Drops the a token associated data + /// @dev Only callable by the pool module + /// @param metadata_address The address of the metadata object + public(friend) fun drop_token(metadata_address: address) acquires TokenMap { + assert_token_exists(metadata_address); + // Remove metadata_address from token map + let token_map = borrow_global_mut(@aave_pool); + smart_table::remove(&mut token_map.value, metadata_address); + + // Remove metadata_address from token_base module's token map + token_base::drop_token(metadata_address); + } + + fun only_asset_listing_or_pool_admins(account: &signer) { + let account_address = signer::address_of(account); + assert!( + acl_manage::is_asset_listing_admin(account_address) + || acl_manage::is_pool_admin(account_address), + error_config::get_ecaller_not_asset_listing_or_pool_admin() + ) + } + + #[view] + public fun token_address(owner: address, symbol: String): address acquires TokenMap { + let token_map = borrow_global(@aave_pool); + + let address_found = option::none
(); + smart_table::for_each_ref( + &token_map.value, + |metadata_address, _token_data| { + let token_metadata = + object::address_to_object(*metadata_address); + if (object::owner(token_metadata) == owner) { + let token_symbol = fungible_asset::symbol(token_metadata); + if (token_symbol == symbol) { + if (std::option::is_some(&address_found)) { + abort(error_config::get_etoken_already_exists()) + }; + std::option::fill(&mut address_found, *metadata_address); + }; + } + } + ); + + if (std::option::is_none(&address_found)) { + abort(error_config::get_etoken_not_exist()) + }; + std::option::destroy_some(address_found) + } + + #[view] + public fun asset_metadata(owner: address, symbol: String): Object acquires TokenMap { + object::address_to_object(token_address(owner, symbol)) + } + + #[test_only] + public fun test_init_module(signer: &signer) { + init_module(signer); + } } diff --git a/aave-core/sources/aave-tokens/fungible_asset_manager.move b/aave-core/sources/aave-tokens/fungible_asset_manager.move new file mode 100644 index 0000000..8ce007c --- /dev/null +++ b/aave-core/sources/aave-tokens/fungible_asset_manager.move @@ -0,0 +1,86 @@ +module aave_pool::fungible_asset_manager { + use std::option::Option; + use std::string::String; + use aptos_framework::fungible_asset::{Self, Metadata}; + use aptos_framework::object::{Self, Object}; + use aptos_framework::primary_fungible_store; + + use aave_config::error_config; + + friend aave_pool::a_token_factory; + friend aave_pool::supply_logic; + friend aave_pool::borrow_logic; + friend aave_pool::liquidation_logic; + friend aave_pool::bridge_logic; + friend aave_pool::flashloan_logic; + + /// @notice Transfer a given amount of the asset to a recipient. + /// @dev Only callable by the supply_logic, borrow_logic, liquidation_logic, bridge_logic, flashloan_logic and a_token_factory module. + /// @param from The account signer of the caller + /// @param to The recipient of the asset + /// @param amount The amount to transfer + /// @param metadata_address The address of the metadata object + public(friend) fun transfer( + from: &signer, + to: address, + amount: u64, + metadata_address: address + ) { + let asset_metadata = get_metadata(metadata_address); + primary_fungible_store::transfer(from, asset_metadata, to, amount); + } + + /// Return the address of the managed fungible asset that's created when this module is deployed. + fun get_metadata(metadata_address: address): Object { + object::address_to_object(metadata_address) + } + + public fun assert_token_exists(metadata_address: address) { + assert!( + object::object_exists(metadata_address), + error_config::get_eresource_not_exist() + ) + } + + #[view] + /// Get the balance of a given store. + public fun balance_of(owner: address, metadata_address: address): u64 { + let metadata = get_metadata(metadata_address); + primary_fungible_store::balance(owner, metadata) + } + + #[view] + /// Get the current supply from the `metadata` object. + public fun supply(metadata_address: address): Option { + let asset = get_metadata(metadata_address); + fungible_asset::supply(asset) + } + + #[view] + /// Get the maximum supply from the `metadata` object. + public fun maximum(metadata_address: address): Option { + let asset = get_metadata(metadata_address); + fungible_asset::maximum(asset) + } + + #[view] + /// Get the name of the fungible asset from the `metadata` object. + public fun name(metadata_address: address): String { + let asset = get_metadata(metadata_address); + fungible_asset::name(asset) + } + + #[view] + /// Get the symbol of the fungible asset from the `metadata` object. + public fun symbol(metadata_address: address): String { + let asset = get_metadata(metadata_address); + fungible_asset::symbol(asset) + } + + #[view] + /// Get the decimals from the `metadata` object. + public fun decimals(metadata_address: address): u8 { + let asset = get_metadata(metadata_address); + fungible_asset::decimals(asset) + } +} diff --git a/aave-core/sources/aave-tokens/standard_token.move b/aave-core/sources/aave-tokens/standard_token.move index 8e3468b..0cf8b4b 100644 --- a/aave-core/sources/aave-tokens/standard_token.move +++ b/aave-core/sources/aave-tokens/standard_token.move @@ -40,7 +40,7 @@ module aave_pool::standard_token { struct ManagingRefs has key { mint_ref: Option, transfer_ref: Option, - burn_ref: Option, + burn_ref: Option } #[event] @@ -52,7 +52,7 @@ module aave_pool::standard_token { icon_uri: String, project_uri: String, underlying_asset_address: address, - is_coin_underlying: bool, + is_coin_underlying: bool } /// Initialize metadata object and store the refs specified by `ref_flags`. @@ -66,12 +66,12 @@ module aave_pool::standard_token { project_uri: String, ref_flags: vector, underlying_asset_address: address, - is_coin_underlying: bool, + is_coin_underlying: bool ) { only_token_admin(creator); assert!( vector::length(&ref_flags) == 3, - error::invalid_argument(ERR_INVALID_REF_FLAGS_LENGTH), + error::invalid_argument(ERR_INVALID_REF_FLAGS_LENGTH) ); let supply = if (maximum_supply != 0) { @@ -89,7 +89,7 @@ module aave_pool::standard_token { symbol, decimals, icon_uri, - project_uri, + project_uri ); // Optionally create mint/burn/transfer refs to allow creator to manage the fungible asset. @@ -116,7 +116,7 @@ module aave_pool::standard_token { // save the managing refs move_to( &metadata_object_signer, - ManagingRefs { mint_ref, transfer_ref, burn_ref }, + ManagingRefs { mint_ref, transfer_ref, burn_ref } ); event::emit( @@ -128,8 +128,8 @@ module aave_pool::standard_token { icon_uri, project_uri, underlying_asset_address, - is_coin_underlying, - }, + is_coin_underlying + } ) } @@ -141,7 +141,10 @@ module aave_pool::standard_token { /// Mint as the owner of metadata object to the primary fungible stores of the accounts with amounts of FAs. public entry fun mint_to_primary_stores( - admin: &signer, asset: Object, to: vector
, amounts: vector + admin: &signer, + asset: Object, + to: vector
, + amounts: vector ) acquires ManagingRefs { let receiver_primary_stores = vector::map( to, |addr| primary_fungible_store::ensure_primary_store_exists(addr, asset) @@ -154,19 +157,19 @@ module aave_pool::standard_token { admin: &signer, asset: Object, stores: vector>, - amounts: vector, + amounts: vector ) acquires ManagingRefs { let length = vector::length(&stores); assert!( length == vector::length(&amounts), - error::invalid_argument(ERR_VECTORS_LENGTH_MISMATCH), + error::invalid_argument(ERR_VECTORS_LENGTH_MISMATCH) ); let mint_ref = authorized_borrow_mint_ref(admin, asset); for (i in 0..length) { fungible_asset::mint_to( mint_ref, *vector::borrow(&stores, i), - *vector::borrow(&amounts, i), + *vector::borrow(&amounts, i) ); } } @@ -191,7 +194,7 @@ module aave_pool::standard_token { asset, sender_primary_stores, receiver_primary_stores, - amounts, + amounts ); } @@ -201,16 +204,16 @@ module aave_pool::standard_token { asset: Object, sender_stores: vector>, receiver_stores: vector>, - amounts: vector, + amounts: vector ) acquires ManagingRefs { let length = vector::length(&sender_stores); assert!( length == vector::length(&receiver_stores), - error::invalid_argument(ERR_VECTORS_LENGTH_MISMATCH), + error::invalid_argument(ERR_VECTORS_LENGTH_MISMATCH) ); assert!( length == vector::length(&amounts), - error::invalid_argument(ERR_VECTORS_LENGTH_MISMATCH), + error::invalid_argument(ERR_VECTORS_LENGTH_MISMATCH) ); let transfer_ref = authorized_borrow_transfer_ref(admin, asset); for (i in 0..length) { @@ -218,7 +221,7 @@ module aave_pool::standard_token { transfer_ref, *vector::borrow(&sender_stores, i), *vector::borrow(&receiver_stores, i), - *vector::borrow(&amounts, i), + *vector::borrow(&amounts, i) ); } } @@ -246,25 +249,28 @@ module aave_pool::standard_token { let length = vector::length(&stores); assert!( length == vector::length(&amounts), - error::invalid_argument(ERR_VECTORS_LENGTH_MISMATCH), + error::invalid_argument(ERR_VECTORS_LENGTH_MISMATCH) ); let burn_ref = authorized_borrow_burn_ref(admin, asset); for (i in 0..length) { fungible_asset::burn_from( burn_ref, *vector::borrow(&stores, i), - *vector::borrow(&amounts, i), + *vector::borrow(&amounts, i) ); }; } /// Freeze/unfreeze the primary stores of accounts so they cannot transfer or receive fungible assets. public entry fun set_primary_stores_frozen_status( - admin: &signer, asset: Object, accounts: vector
, frozen: bool + admin: &signer, + asset: Object, + accounts: vector
, + frozen: bool ) acquires ManagingRefs { let primary_stores = vector::map( accounts, - |acct| { primary_fungible_store::ensure_primary_store_exists(acct, asset) }, + |acct| { primary_fungible_store::ensure_primary_store_exists(acct, asset) } ); set_frozen_status(admin, asset, primary_stores, frozen); } @@ -281,7 +287,7 @@ module aave_pool::standard_token { stores, |store| { fungible_asset::set_frozen_flag(transfer_ref, store, frozen); - }, + } ); } @@ -309,7 +315,7 @@ module aave_pool::standard_token { let length = vector::length(&stores); assert!( length == vector::length(&amounts), - error::invalid_argument(ERR_VECTORS_LENGTH_MISMATCH), + error::invalid_argument(ERR_VECTORS_LENGTH_MISMATCH) ); let transfer_ref = authorized_borrow_transfer_ref(admin, asset); let sum = fungible_asset::zero(asset); @@ -318,7 +324,7 @@ module aave_pool::standard_token { fungible_asset::withdraw_with_ref( transfer_ref, *vector::borrow(&stores, i), - *vector::borrow(&amounts, i), + *vector::borrow(&amounts, i) ); fungible_asset::merge(&mut sum, fa); }; @@ -331,13 +337,13 @@ module aave_pool::standard_token { admin: &signer, fa: &mut FungibleAsset, from: vector
, - amounts: vector, + amounts: vector ) acquires ManagingRefs { let primary_stores = vector::map( from, |addr| primary_fungible_store::ensure_primary_store_exists( addr, fungible_asset::asset_metadata(fa) - ), + ) ); deposit(admin, fa, primary_stores, amounts); } @@ -353,7 +359,7 @@ module aave_pool::standard_token { let length = vector::length(&stores); assert!( length == vector::length(&amounts), - error::invalid_argument(ERR_VECTORS_LENGTH_MISMATCH), + error::invalid_argument(ERR_VECTORS_LENGTH_MISMATCH) ); let transfer_ref = authorized_borrow_transfer_ref(admin, fungible_asset::asset_metadata(fa)); @@ -362,7 +368,7 @@ module aave_pool::standard_token { fungible_asset::deposit_with_ref( transfer_ref, *vector::borrow(&stores, i), - split_fa, + split_fa ); }; } @@ -370,18 +376,18 @@ module aave_pool::standard_token { /// Borrow the immutable reference of the refs of `metadata`. /// This validates that the signer is the metadata object's owner. inline fun authorized_borrow_refs( - owner: &signer, asset: Object, + owner: &signer, asset: Object ): &ManagingRefs acquires ManagingRefs { assert!( object::is_owner(asset, signer::address_of(owner)), - error::permission_denied(ERR_NOT_OWNER), + error::permission_denied(ERR_NOT_OWNER) ); borrow_global(object::object_address(&asset)) } /// Check the existence and borrow `MintRef`. inline fun authorized_borrow_mint_ref( - owner: &signer, asset: Object, + owner: &signer, asset: Object ): &MintRef acquires ManagingRefs { let refs = authorized_borrow_refs(owner, asset); assert!(option::is_some(&refs.mint_ref), error::not_found(ERR_MINT_REF)); @@ -390,16 +396,18 @@ module aave_pool::standard_token { /// Check the existence and borrow `TransferRef`. inline fun authorized_borrow_transfer_ref( - owner: &signer, asset: Object, + owner: &signer, asset: Object ): &TransferRef acquires ManagingRefs { let refs = authorized_borrow_refs(owner, asset); - assert!(option::is_some(&refs.transfer_ref), error::not_found(ERR_TRANSFER_REF)); + assert!( + option::is_some(&refs.transfer_ref), error::not_found(ERR_TRANSFER_REF) + ); option::borrow(&refs.transfer_ref) } /// Check the existence and borrow `BurnRef`. inline fun authorized_borrow_burn_ref( - owner: &signer, asset: Object, + owner: &signer, asset: Object ): &BurnRef acquires ManagingRefs { let refs = authorized_borrow_refs(owner, asset); assert!(option::is_some(&refs.mint_ref), error::not_found(ERR_BURN_REF)); diff --git a/aave-core/sources/aave-tokens/token_base.move b/aave-core/sources/aave-tokens/token_base.move index f373368..06fa9db 100644 --- a/aave-core/sources/aave-tokens/token_base.move +++ b/aave-core/sources/aave-tokens/token_base.move @@ -1,26 +1,21 @@ module aave_pool::token_base { use std::option::Self; use std::signer; - use std::string::{Self, String}; + use std::string::String; use aptos_std::smart_table::{Self, SmartTable}; use aptos_std::string_utils::format2; use aptos_framework::event; use aptos_framework::fungible_asset::{Self, BurnRef, Metadata, MintRef, TransferRef}; - use aptos_framework::object::{Self, Object}; + use aptos_framework::object::{Self, ConstructorRef, Object}; use aptos_framework::primary_fungible_store; use aave_acl::acl_manage; - use aave_config::error as error_config; + use aave_config::error_config; use aave_math::wad_ray_math; friend aave_pool::a_token_factory; friend aave_pool::variable_debt_token_factory; - - /// Only fungible asset metadata owner can make changes. - const ENOT_OWNER: u64 = 1; - const E_TOKEN_ALREADY_EXISTS: u64 = 2; - const E_ACCOUNT_NOT_EXISTS: u64 = 3; - const E_TOKEN_NOT_EXISTS: u64 = 4; + friend aave_pool::user_logic; #[event] /// @dev Emitted when `value` tokens are moved from one account (`from`) to @@ -38,14 +33,14 @@ module aave_pool::token_base { /// @param caller The address performing the mint /// @param on_behalf_of The address of the user that will receive the minted tokens /// @param value The scaled-up amount being minted (based on user entered amount and balance increase from interest) - /// @param balance_increase The increase in scaled-up balance since the last action of 'onBehalfOf' + /// @param balance_increase The increase in scaled-up balance since the last action of 'on_behalf_of' /// @param index The next liquidity index of the reserve struct Mint has store, drop { caller: address, on_behalf_of: address, value: u256, balance_increase: u256, - index: u256, + index: u256 } #[event] @@ -61,29 +56,26 @@ module aave_pool::token_base { target: address, value: u256, balance_increase: u256, - index: u256, + index: u256 } struct UserState has store, copy, drop { balance: u128, - additional_data: u128, + additional_data: u128 } - // Map of users address and their state data (key = user_address_atoken_address => UserState) + // Map of users address and their state data (key = user_address_token_address => UserState) struct UserStateMap has key { - value: SmartTable, + value: SmartTable } struct TokenData has store, copy, drop { - underlying_asset: address, - treasury: address, - scaled_total_supply: u256, - resource_account: address + scaled_total_supply: u256 } - // Atoken metadata_address => TokenData + // token metadata_address => TokenData struct TokenMap has key { - value: SmartTable, + value: SmartTable } #[resource_group_member(group = aptos_framework::object::ObjectGroup)] @@ -91,78 +83,78 @@ module aave_pool::token_base { struct ManagedFungibleAsset has key { mint_ref: MintRef, transfer_ref: TransferRef, - burn_ref: BurnRef, + burn_ref: BurnRef } fun init_module(signer: &signer) { only_token_admin(signer); - move_to(signer, UserStateMap { value: smart_table::new() }); - move_to(signer, TokenMap { value: smart_table::new() }) + move_to( + signer, + UserStateMap { + value: smart_table::new() + } + ); + move_to( + signer, + TokenMap { + value: smart_table::new() + } + ) + } + + fun assert_token_exists(metadata_address: address) acquires TokenMap { + let token_map = borrow_global(@aave_pool); + assert!( + smart_table::contains(&token_map.value, metadata_address), + error_config::get_etoken_not_exist() + ); } public fun get_user_state( - user: address, token_metadata_address: address + user: address, metadata_address: address ): UserState acquires UserStateMap { let user_state_map = borrow_global(@aave_pool); - let key = format2(&b"{}_{}", user, token_metadata_address); + let key = format2(&b"{}_{}", user, metadata_address); if (!smart_table::contains(&user_state_map.value, key)) { - return UserState { balance: 0, additional_data: 0, } + return UserState { balance: 0, additional_data: 0 } }; *smart_table::borrow(&user_state_map.value, key) } fun set_user_state( user: address, - token_metadata_address: address, + metadata_address: address, balance: u128, additional_data: u128 ) acquires UserStateMap { let user_state_map = borrow_global_mut(@aave_pool); - let key = format2(&b"{}_{}", user, token_metadata_address); - if (!smart_table::contains(&user_state_map.value, key)) { - smart_table::upsert( - &mut user_state_map.value, - key, - UserState { balance, additional_data }, - ) - } else { - let user_state = smart_table::borrow_mut(&mut user_state_map.value, key); - user_state.balance = balance; - user_state.additional_data = additional_data; - } + let key = format2(&b"{}_{}", user, metadata_address); + + smart_table::upsert( + &mut user_state_map.value, + key, + UserState { balance, additional_data } + ); } - public fun get_token_data(token_metadata_address: address): TokenData acquires TokenMap { + public fun get_token_data(metadata_address: address): TokenData acquires TokenMap { let token_map = borrow_global(@aave_pool); assert!( - smart_table::contains(&token_map.value, token_metadata_address), - E_TOKEN_NOT_EXISTS, + smart_table::contains(&token_map.value, metadata_address), + error_config::get_etoken_not_exist() ); - *smart_table::borrow(&token_map.value, token_metadata_address) + *smart_table::borrow(&token_map.value, metadata_address) } fun set_scaled_total_supply( - token_metadata_address: address, scaled_total_supply: u256 + metadata_address: address, scaled_total_supply: u256 ) acquires TokenMap { - let a_token_map = borrow_global_mut(@aave_pool); - let token_data = - smart_table::borrow_mut(&mut a_token_map.value, token_metadata_address); + let token_map = borrow_global_mut(@aave_pool); + let token_data = smart_table::borrow_mut(&mut token_map.value, metadata_address); token_data.scaled_total_supply = scaled_total_supply; } - public fun get_underlying_asset(token_data: &TokenData): address { - token_data.underlying_asset - } - - public fun get_treasury_address(token_data: &TokenData): address { - token_data.treasury - } - - public fun get_resource_account(token_data: &TokenData): address { - token_data.resource_account - } - public fun get_previous_index( user: address, metadata_address: address ): u256 acquires UserStateMap { @@ -174,35 +166,31 @@ module aave_pool::token_base { token_data.scaled_total_supply } - public(friend) fun create_a_token( - signer: &signer, + /// @notice Creates a new FA Token + /// @dev Only callable by the a_token_factory and variable_debt_token_factory module + /// @param constructor_ref The constructor reference of the Token + /// @param name The name of the Token + /// @param symbol The symbol of the Token + /// @param decimals The decimals of the Token + /// @param icon_uri The icon URI of the Token + /// @param project_uri The project URI of the Token + public(friend) fun create_token( + constructor_ref: &ConstructorRef, name: String, symbol: String, decimals: u8, icon_uri: String, - project_uri: String, - underlying_asset: address, - treasury: address, - resource_account: address + project_uri: String ) acquires TokenMap { - let account_address = signer::address_of(signer); - let token_metadata_address = - object::create_object_address(&account_address, *string::bytes(&symbol)); let token_map = borrow_global_mut(@aave_pool); + let metadata_address = object::address_from_constructor_ref(constructor_ref); assert!( - !smart_table::contains(&token_map.value, token_metadata_address), - E_TOKEN_ALREADY_EXISTS, + !smart_table::contains(&token_map.value, metadata_address), + error_config::get_etoken_already_exists() ); - let token_data = TokenData { - underlying_asset, - treasury, - scaled_total_supply: 0, - resource_account - }; - smart_table::add(&mut token_map.value, token_metadata_address, token_data); + let token_data = TokenData { scaled_total_supply: 0 }; + smart_table::add(&mut token_map.value, metadata_address, token_data); - let constructor_ref = - &object::create_named_object(signer, *string::bytes(&symbol)); primary_fungible_store::create_primary_store_enabled_fungible_asset( constructor_ref, option::none(), @@ -210,7 +198,7 @@ module aave_pool::token_base { symbol, decimals, icon_uri, - project_uri, + project_uri ); // Create mint/burn/transfer refs to allow creator to manage the fungible asset. @@ -218,68 +206,27 @@ module aave_pool::token_base { let burn_ref = fungible_asset::generate_burn_ref(constructor_ref); let transfer_ref = fungible_asset::generate_transfer_ref(constructor_ref); let metadata_object_signer = object::generate_signer(constructor_ref); - move_to( - &metadata_object_signer, - ManagedFungibleAsset { mint_ref, transfer_ref, burn_ref }, - ); - } - - public(friend) fun create_variable_token( - signer: &signer, - name: String, - symbol: String, - decimals: u8, - icon_uri: String, - project_uri: String, - underlying_asset: address, - ) acquires TokenMap { - let account_address = signer::address_of(signer); - let token_metadata_address = - object::create_object_address(&account_address, *string::bytes(&symbol)); - let token_map = borrow_global_mut(@aave_pool); - assert!( - !smart_table::contains(&token_map.value, token_metadata_address), - E_TOKEN_ALREADY_EXISTS, - ); - let token_data = TokenData { - underlying_asset, - treasury: @0x0, - scaled_total_supply: 0, - resource_account: @0x0 - }; - smart_table::add(&mut token_map.value, token_metadata_address, token_data); - let constructor_ref = - &object::create_named_object(signer, *string::bytes(&symbol)); - primary_fungible_store::create_primary_store_enabled_fungible_asset( - constructor_ref, - option::none(), - name, - symbol, - decimals, - icon_uri, - project_uri, - ); - - // Create mint/burn/transfer refs to allow creator to manage the fungible asset. - let mint_ref = fungible_asset::generate_mint_ref(constructor_ref); - let burn_ref = fungible_asset::generate_burn_ref(constructor_ref); - let transfer_ref = fungible_asset::generate_transfer_ref(constructor_ref); - let metadata_object_signer = object::generate_signer(constructor_ref); move_to( &metadata_object_signer, - ManagedFungibleAsset { mint_ref, transfer_ref, burn_ref }, + ManagedFungibleAsset { mint_ref, transfer_ref, burn_ref } ); } + /// @notice Mints `amount` tokens to `on_behalf_of` + /// @dev Only callable by the a_token_factory and variable_debt_token_factory module + /// @param caller The address performing the mint + /// @param on_behalf_of The address of the user that will receive the minted Tokens + /// @param amount The amount of tokens getting minted + /// @param index The next liquidity index of the reserve + /// @param metadata_address The address of the Token public(friend) fun mint_scaled( caller: address, on_behalf_of: address, amount: u256, index: u256, - metadata_address: address, + metadata_address: address ) acquires ManagedFungibleAsset, UserStateMap, TokenMap { - assert_token_exists(metadata_address); let amount_scaled = wad_ray_math::ray_div(amount, index); assert!(amount_scaled != 0, error_config::get_einvalid_mint_amount()); let scaled_balance = scaled_balance_of(on_behalf_of, metadata_address); @@ -291,7 +238,12 @@ module aave_pool::token_base { scaled_balance, (user_state.additional_data as u256) ); let new_balance = user_state.balance + (amount_scaled as u128); - set_user_state(on_behalf_of, metadata_address, new_balance, (index as u128)); + set_user_state( + on_behalf_of, + metadata_address, + new_balance, + (index as u128) + ); // update scale total supply let token_data = get_token_data(metadata_address); @@ -304,44 +256,49 @@ module aave_pool::token_base { let to_wallet = primary_fungible_store::ensure_primary_store_exists(on_behalf_of, asset); // freeze account - fungible_asset::set_frozen_flag( - &managed_fungible_asset.transfer_ref, to_wallet, true - ); + if (!fungible_asset::is_frozen(to_wallet)) { + fungible_asset::set_frozen_flag( + &managed_fungible_asset.transfer_ref, to_wallet, true + ); + }; - let fa = fungible_asset::mint(&managed_fungible_asset.mint_ref, (amount as u64)); + let fa = + fungible_asset::mint( + &managed_fungible_asset.mint_ref, (amount_scaled as u64) + ); fungible_asset::deposit_with_ref( &managed_fungible_asset.transfer_ref, to_wallet, fa ); let amount_to_mint = amount + balance_increase; - event::emit(Transfer { from: @0x0, to: on_behalf_of, value: amount_to_mint, }); + event::emit(Transfer { from: @0x0, to: on_behalf_of, value: amount_to_mint }); event::emit( Mint { caller, on_behalf_of, value: amount_to_mint, balance_increase, - index, - }, - ); - } - - fun assert_token_exists(token_metadata_address: address) acquires TokenMap { - let a_token_map = borrow_global(@aave_pool); - assert!( - smart_table::contains(&a_token_map.value, token_metadata_address), - E_TOKEN_ALREADY_EXISTS, + index + } ); } + /// @notice Burns Tokens from `user` + /// @dev Only callable by the a_token_factory and variable_debt_token_factory module + /// @dev In some instances, the mint event could be emitted from a burn transaction + /// if the amount to burn is less than the interest that the user accrued + /// @param user The address from which the Tokens will be burned + /// @param target The address that will receive the underlying + /// @param amount The amount being burned + /// @param index The next liquidity index of the reserve + /// @param metadata_address The address of the Token public(friend) fun burn_scaled( user: address, target: address, amount: u256, index: u256, - metadata_address: address, + metadata_address: address ) acquires ManagedFungibleAsset, UserStateMap, TokenMap { - assert_token_exists(metadata_address); let amount_scaled = wad_ray_math::ray_div(amount, index); assert!(amount_scaled != 0, error_config::get_einvalid_mint_amount()); // get scale balance @@ -354,7 +311,12 @@ module aave_pool::token_base { scaled_balance, (user_state.additional_data as u256) ); let new_balance = user_state.balance - (amount_scaled as u128); - set_user_state(user, metadata_address, new_balance, (index as u128)); + set_user_state( + user, + metadata_address, + new_balance, + (index as u128) + ); // update scale total supply let token_data = get_token_data(metadata_address); @@ -365,41 +327,48 @@ module aave_pool::token_base { let asset = get_metadata(metadata_address); let burn_ref = &obtain_managed_asset_refs(asset).burn_ref; let from_wallet = primary_fungible_store::primary_store(user, asset); - fungible_asset::burn_from(burn_ref, from_wallet, (amount as u64)); + fungible_asset::burn_from(burn_ref, from_wallet, (amount_scaled as u64)); if (balance_increase > amount) { let amount_to_mint = balance_increase - amount; - event::emit(Transfer { from: @0x0, to: user, value: amount_to_mint, }); + event::emit(Transfer { from: @0x0, to: user, value: amount_to_mint }); event::emit( Mint { caller: user, on_behalf_of: user, value: amount_to_mint, balance_increase, - index, - }, + index + } ); } else { let amount_to_burn = amount - balance_increase; - event::emit(Transfer { from: user, to: @0x0, value: amount_to_burn, }); + event::emit(Transfer { from: user, to: @0x0, value: amount_to_burn }); event::emit( Burn { from: user, target, value: amount_to_burn, balance_increase, - index, - }, + index + } ); } } + /// @notice Transfers Tokens from `sender` to `recipient` + /// @dev Only callable by the a_token_factory and user_logic module + /// @param sender The address from which the Tokens will be transferred + /// @param recipient The address that will receive the Tokens + /// @param amount The amount being transferred + /// @param index The next liquidity index of the reserve + /// @param metadata_address The address of the Token public(friend) fun transfer( sender: address, recipient: address, amount: u256, index: u256, - metadata_address: address, + metadata_address: address ) acquires ManagedFungibleAsset, UserStateMap { let sender_scaled_balance = scaled_balance_of(sender, metadata_address); let sender_user_state = get_user_state(sender, metadata_address); @@ -411,7 +380,12 @@ module aave_pool::token_base { let amount_ray_div = wad_ray_math::ray_div(amount, index); let new_sender_balance = sender_user_state.balance - (amount_ray_div as u128); - set_user_state(sender, metadata_address, new_sender_balance, (index as u128)); + set_user_state( + sender, + metadata_address, + new_sender_balance, + (index as u128) + ); let recipient_scaled_balance = scaled_balance_of(recipient, metadata_address); let recipient_user_state = get_user_state(recipient, metadata_address); @@ -419,15 +393,16 @@ module aave_pool::token_base { wad_ray_math::ray_mul(recipient_scaled_balance, index) - wad_ray_math::ray_mul( recipient_scaled_balance, - (recipient_user_state.additional_data as u256), + (recipient_user_state.additional_data as u256) ); - let new_recipient_balance = recipient_user_state.balance + (amount_ray_div as u128); + let new_recipient_balance = recipient_user_state.balance + + (amount_ray_div as u128); set_user_state( recipient, metadata_address, new_recipient_balance, - (index as u128), + (index as u128) ); // transfer fungible asset let asset = get_metadata(metadata_address); @@ -435,13 +410,22 @@ module aave_pool::token_base { let from_wallet = primary_fungible_store::primary_store(sender, asset); let to_wallet = primary_fungible_store::ensure_primary_store_exists(recipient, asset); + + // freeze account + if (!fungible_asset::is_frozen(to_wallet)) { + fungible_asset::set_frozen_flag(transfer_ref, to_wallet, true); + }; + fungible_asset::transfer_with_ref( - transfer_ref, from_wallet, to_wallet, (amount as u64) + transfer_ref, + from_wallet, + to_wallet, + (amount_ray_div as u64) ); if (sender_balance_increase > 0) { event::emit( - Transfer { from: @0x0, to: sender, value: sender_balance_increase, }, + Transfer { from: @0x0, to: sender, value: sender_balance_increase } ); event::emit( Mint { @@ -449,14 +433,15 @@ module aave_pool::token_base { on_behalf_of: sender, value: sender_balance_increase, balance_increase: sender_balance_increase, - index, - }, + index + } ); }; + // if sender == recipient, the following logic will not execute, the event will not be emitted if (sender != recipient && recipient_balance_increase > 0) { event::emit( - Transfer { from: @0x0, to: recipient, value: recipient_balance_increase, }, + Transfer { from: @0x0, to: recipient, value: recipient_balance_increase } ); event::emit( Mint { @@ -464,22 +449,12 @@ module aave_pool::token_base { on_behalf_of: recipient, value: recipient_balance_increase, balance_increase: recipient_balance_increase, - index, - }, + index + } ); }; - event::emit(Transfer { from: sender, to: recipient, value: amount, }); - } - - public(friend) fun transfer_internal( - from: address, to: address, amount: u64, metadata_address: address - ) acquires ManagedFungibleAsset { - let asset = get_metadata(metadata_address); - let transfer_ref = &obtain_managed_asset_refs(asset).transfer_ref; - let from_wallet = primary_fungible_store::primary_store(from, asset); - let to_wallet = primary_fungible_store::ensure_primary_store_exists(to, asset); - fungible_asset::transfer_with_ref(transfer_ref, from_wallet, to_wallet, amount); + event::emit(Transfer { from: sender, to: recipient, value: amount }); } public fun scaled_balance_of( @@ -497,7 +472,8 @@ module aave_pool::token_base { public fun get_scaled_user_balance_and_supply( owner: address, metadata_address: address ): (u256, u256) acquires UserStateMap, TokenMap { - (scaled_balance_of(owner, metadata_address), scaled_total_supply(metadata_address)) + (scaled_balance_of(owner, metadata_address), + scaled_total_supply(metadata_address)) } public fun name(metadata_address: address): String { @@ -515,23 +491,38 @@ module aave_pool::token_base { fungible_asset::decimals(asset) } - inline fun get_metadata(metadata_address: address): Object { + fun get_metadata(metadata_address: address): Object { object::address_to_object(metadata_address) } - inline fun obtain_managed_asset_refs(asset: Object,): &ManagedFungibleAsset acquires ManagedFungibleAsset { + inline fun obtain_managed_asset_refs( + asset: Object + ): &ManagedFungibleAsset acquires ManagedFungibleAsset { borrow_global(object::object_address(&asset)) } + /// @notice Drops the token data from the token map + /// @dev Only callable by the a_token_factory and variable_debt_token_factory module + /// @param metadata_address The address of the Token + public(friend) fun drop_token(metadata_address: address) acquires TokenMap { + assert_token_exists(metadata_address); + + let token_map = borrow_global_mut(@aave_pool); + smart_table::remove(&mut token_map.value, metadata_address); + } + public fun only_pool_admin(account: &signer) { assert!( acl_manage::is_pool_admin(signer::address_of(account)), - error_config::get_ecaller_not_pool_admin(), + error_config::get_ecaller_not_pool_admin() ); } public fun only_token_admin(account: &signer) { - assert!(signer::address_of(account) == @aave_pool, ENOT_OWNER) + assert!( + signer::address_of(account) == @aave_pool, + error_config::get_enot_pool_owner() + ) } #[test_only] diff --git a/aave-core/sources/aave-tokens/variable_debt_token_factory.move b/aave-core/sources/aave-tokens/variable_debt_token_factory.move index e1df11c..89bcb65 100644 --- a/aave-core/sources/aave-tokens/variable_debt_token_factory.move +++ b/aave-core/sources/aave-tokens/variable_debt_token_factory.move @@ -1,14 +1,19 @@ module aave_pool::variable_debt_token_factory { + use std::option; use std::signer; use std::string; use std::string::String; + use aptos_std::smart_table; + use aptos_std::smart_table::SmartTable; + use aptos_std::string_utils::format2; use aptos_framework::event; + use aptos_framework::fungible_asset; use aptos_framework::fungible_asset::Metadata; use aptos_framework::object; use aptos_framework::object::Object; use aave_acl::acl_manage; - use aave_config::error as error_config; + use aave_config::error_config; use aave_pool::token_base; @@ -26,17 +31,58 @@ module aave_pool::variable_debt_token_factory { const DEBT_TOKEN_REVISION: u256 = 0x1; - // error config - const E_NOT_V_TOKEN_ADMIN: u64 = 1; - #[event] + /// @dev Emitted when a debt token is initialized + /// @param underlying_asset The address of the underlying asset + /// @param debt_token_decimals The decimals of the debt token + /// @param debt_token_name The name of the debt token + /// @param debt_token_symbol The symbol of the debt token struct Initialized has store, drop { underlying_asset: address, debt_token_decimals: u8, debt_token_name: String, - debt_token_symbol: String, + debt_token_symbol: String + } + + struct TokenData has store, copy, drop { + underlying_asset: address + } + + // variable debt token metadata_address => TokenData + struct TokenMap has key { + value: SmartTable, + count: u256 + } + + fun init_module(signer: &signer) { + token_base::only_token_admin(signer); + move_to( + signer, + TokenMap { + value: smart_table::new(), + count: 0 + } + ) } + fun assert_token_exists(metadata_address: address) acquires TokenMap { + let token_map = borrow_global(@aave_pool); + assert!( + smart_table::contains(&token_map.value, metadata_address), + error_config::get_etoken_not_exist() + ); + } + + /// @notice Creates a new variable debt token. + /// @dev Only callable by the pool module + /// @param signer The signer of the caller + /// @param name The name of the variable debt token + /// @param symbol The symbol of the variable debt token + /// @param decimals The decimals of the variable debt token + /// @param icon_uri The icon URI of the variable debt token + /// @param project_uri The project URI of the variable debt token + /// @param underlying_asset The address of the underlying asset + /// @return The address of the variable debt token public(friend) fun create_token( signer: &signer, name: String, @@ -44,17 +90,35 @@ module aave_pool::variable_debt_token_factory { decimals: u8, icon_uri: String, project_uri: String, - underlying_asset: address, - ) { - only_token_admin(signer); - token_base::create_variable_token( - signer, + underlying_asset: address + ): address acquires TokenMap { + only_asset_listing_or_pool_admins(signer); + + let token_map = borrow_global_mut(@aave_pool); + validate_unique_token(token_map, name, symbol); + + let token_count = token_map.count + 1; + let seed = *string::bytes(&format2(&b"{}_{}", symbol, token_count)); + let user_signer_addr = signer::address_of(signer); + let metadata_address = object::create_object_address(&user_signer_addr, seed); + + assert!( + !smart_table::contains(&token_map.value, metadata_address), + error_config::get_etoken_already_exists() + ); + + let token_data = TokenData { underlying_asset }; + smart_table::add(&mut token_map.value, metadata_address, token_data); + + let constructor_ref = &object::create_named_object(signer, seed); + // create token + token_base::create_token( + constructor_ref, name, symbol, decimals, icon_uri, - project_uri, - underlying_asset, + project_uri ); event::emit( @@ -62,12 +126,15 @@ module aave_pool::variable_debt_token_factory { underlying_asset, debt_token_decimals: decimals, debt_token_name: name, - debt_token_symbol: symbol, - }, - ) + debt_token_symbol: symbol + } + ); + + metadata_address } /// @notice Mints debt token to the `on_behalf_of` address + /// @dev Only callable by the borrow_logic module /// @param caller The address receiving the borrowed underlying, being the delegatee in case /// of credit delegate, or same as `on_behalf_of` otherwise /// @param on_behalf_of The address receiving the debt tokens @@ -80,11 +147,20 @@ module aave_pool::variable_debt_token_factory { amount: u256, index: u256, metadata_address: address - ) { - token_base::mint_scaled(caller, on_behalf_of, amount, index, metadata_address); + ) acquires TokenMap { + assert_token_exists(metadata_address); + + token_base::mint_scaled( + caller, + on_behalf_of, + amount, + index, + metadata_address + ); } /// @notice Burns user variable debt + /// @dev Only callable by the borrow_logic and liquidation_logic module /// @dev In some instances, a burn transaction will emit a mint event /// if the amount to burn is less than the interest that the user accrued /// @param from The address from which the debt will be burned @@ -92,11 +168,26 @@ module aave_pool::variable_debt_token_factory { /// @param index The variable debt index of the reserve /// @param metadata_address The address of the metadata object public(friend) fun burn( - from: address, amount: u256, index: u256, metadata_address: address - ) { + from: address, + amount: u256, + index: u256, + metadata_address: address + ) acquires TokenMap { + assert_token_exists(metadata_address); + token_base::burn_scaled(from, @0x0, amount, index, metadata_address); } + public fun get_token_data(metadata_address: address): TokenData acquires TokenMap { + let token_map = borrow_global(@aave_pool); + assert!( + smart_table::contains(&token_map.value, metadata_address), + error_config::get_etoken_not_exist() + ); + + *smart_table::borrow(&token_map.value, metadata_address) + } + #[view] public fun get_revision(): u256 { DEBT_TOKEN_REVISION @@ -106,26 +197,9 @@ module aave_pool::variable_debt_token_factory { /// @notice Returns the address of the underlying asset of this debtToken (E.g. WETH for variableDebtWETH) /// @param metadata_address The address of the metadata object /// @return The address of the underlying asset - public fun get_underlying_asset_address(metadata_address: address): address { - let token_data = token_base::get_token_data(metadata_address); - token_base::get_underlying_asset(&token_data) - } - - #[view] - public fun get_metadata_by_symbol(owner: address, symbol: String): Object { - let metadata_address = - object::create_object_address(&owner, *string::bytes(&symbol)); - object::address_to_object(metadata_address) - } - - #[view] - public fun token_address(owner: address, symbol: String): address { - object::create_object_address(&owner, *string::bytes(&symbol)) - } - - #[view] - public fun asset_metadata(owner: address, symbol: String): Object { - object::address_to_object(token_address(owner, symbol)) + public fun get_underlying_asset_address(metadata_address: address): address acquires TokenMap { + let token_data = get_token_data(metadata_address); + token_data.underlying_asset } #[view] @@ -190,12 +264,87 @@ module aave_pool::variable_debt_token_factory { token_base::decimals(metadata_address) } - fun only_token_admin(account: &signer) { + /// @notice Validates that the variable debt token name and symbol are unique + /// @param token_map The variable debt token token map + /// @param name The name of the variable debt token + /// @param symbol The symbol of the variable debt token + fun validate_unique_token( + token_map: &TokenMap, name: String, symbol: String + ) { + smart_table::for_each_ref( + &token_map.value, + |metadata_address, _token_data| { + let asset_name = name(*metadata_address); + let asset_symbol = symbol(*metadata_address); + assert!( + asset_name != name, error_config::get_etoken_name_already_exist() + ); + assert!( + asset_symbol != symbol, + error_config::get_etoken_symbol_already_exist() + ); + } + ); + } + + /// @notice Drops the variable debt token associated data + /// @dev Only callable by the pool module + /// @param metadata_address The address of the metadata object + public(friend) fun drop_token(metadata_address: address) acquires TokenMap { + assert_token_exists(metadata_address); + + // Remove metadata_address from variable debt token map + let token_map = borrow_global_mut(@aave_pool); + smart_table::remove(&mut token_map.value, metadata_address); + + // Remove metadata_address from token_base module's token map + token_base::drop_token(metadata_address); + } + + fun only_asset_listing_or_pool_admins(account: &signer) { let account_address = signer::address_of(account); assert!( acl_manage::is_asset_listing_admin(account_address) || acl_manage::is_pool_admin(account_address), - error_config::get_ecaller_not_asset_listing_or_pool_admin(), + error_config::get_ecaller_not_asset_listing_or_pool_admin() ) } + + #[view] + public fun token_address(owner: address, symbol: String): address acquires TokenMap { + let token_map = borrow_global(@aave_pool); + + let address_found = option::none
(); + smart_table::for_each_ref( + &token_map.value, + |metadata_address, _token_data| { + let token_metadata = + object::address_to_object(*metadata_address); + if (object::owner(token_metadata) == owner) { + let token_symbol = fungible_asset::symbol(token_metadata); + if (token_symbol == symbol) { + if (std::option::is_some(&address_found)) { + abort(error_config::get_etoken_already_exists()) + }; + std::option::fill(&mut address_found, *metadata_address); + }; + } + } + ); + + if (std::option::is_none(&address_found)) { + abort(error_config::get_etoken_not_exist()) + }; + std::option::destroy_some(address_found) + } + + #[view] + public fun asset_metadata(owner: address, symbol: String): Object acquires TokenMap { + object::address_to_object(token_address(owner, symbol)) + } + + #[test_only] + public fun test_init_module(signer: &signer) { + init_module(signer); + } } diff --git a/aave-core/tests/aave-supply-borrow/borrow_logic_tests.move b/aave-core/tests/aave-logic/borrow_logic_tests.move similarity index 74% rename from aave-core/tests/aave-supply-borrow/borrow_logic_tests.move rename to aave-core/tests/aave-logic/borrow_logic_tests.move index 4232ba1..2e5fc69 100644 --- a/aave-core/tests/aave-supply-borrow/borrow_logic_tests.move +++ b/aave-core/tests/aave-logic/borrow_logic_tests.move @@ -5,50 +5,61 @@ module aave_pool::borrow_logic_tests { use std::signer; use std::string::{utf8, String}; use std::vector; - use aptos_std::debug::print; use aptos_std::string_utils; use aptos_framework::account; use aptos_framework::event::emitted_events; - use aptos_framework::timestamp::{ - set_time_has_started_for_testing, - fast_forward_seconds - }; - use aave_acl::acl_manage::{Self}; - use aave_config::reserve; - use aave_config::user::is_using_as_collateral_or_borrowing; + use aptos_framework::timestamp::{set_time_has_started_for_testing}; + use aave_acl::acl_manage::Self; + use aave_config::reserve_config; + use aave_config::user_config::is_using_as_collateral_or_borrowing; use aave_math::wad_ray_math; - use aave_mock_oracle::oracle::Self; - use aave_mock_oracle::oracle_sentinel::Self; + use aave_rate::default_reserve_interest_rate_strategy::Self; + use aave_rate::interest_rate_strategy; + use aave_pool::a_token_factory::Self; + use aave_pool::borrow_logic::Self; use aave_pool::collector; - use aave_pool::pool_configurator; + use aave_pool::mock_underlying_token_factory::Self; use aave_pool::pool::{ - get_reserve_id, get_reserve_data, - test_set_reserve_configuration, + get_reserve_id, get_reserve_liquidity_index, get_user_configuration, + test_set_reserve_configuration }; - use aave_pool::a_token_factory::Self; - use aave_pool::default_reserve_interest_rate_strategy::Self; + use aave_pool::pool_configurator; use aave_pool::supply_logic::Self; - use aave_pool::borrow_logic::Self; use aave_pool::token_base::Self; - use aave_pool::mock_underlying_token_factory::Self; + use aave_pool::variable_debt_token_factory; const TEST_SUCCESS: u64 = 1; const TEST_FAILED: u64 = 2; - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, mock_oracle = @aave_mock_oracle, aptos_std = @aptos_std, supply_user = @0x042, underlying_tokens_admin = @underlying_tokens)] + #[ + test( + aave_pool = @aave_pool, + aave_rate = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + aptos_std = @aptos_std, + supply_user = @0x042, + underlying_tokens_admin = @underlying_tokens + ) + ] /// Reserve allows borrowing and being used as collateral. /// User config allows only borrowing for the reserve. /// User supplies and withdraws parts of the supplied amount fun test_supply_borrow( aave_pool: &signer, + aave_rate: &signer, aave_role_super_admin: &signer, - mock_oracle: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, aptos_std: &signer, supply_user: &signer, - underlying_tokens_admin: &signer, + underlying_tokens_admin: &signer ) { // start the timer set_time_has_started_for_testing(aptos_std); @@ -63,6 +74,9 @@ module aave_pool::borrow_logic_tests { acl_manage::test_init_module(aave_role_super_admin); acl_manage::add_asset_listing_admin(aave_role_super_admin, @aave_pool); acl_manage::add_pool_admin(aave_role_super_admin, @aave_pool); + acl_manage::add_risk_admin( + aave_role_super_admin, signer::address_of(aave_oracle) + ); // init collector collector::init_module_test(aave_pool); @@ -71,20 +85,30 @@ module aave_pool::borrow_logic_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); + // init a token factory + a_token_factory::test_init_module(aave_pool); + + // init debt token factory + variable_debt_token_factory::test_init_module(aave_pool); + // init underlying tokens mock_underlying_token_factory::test_init_module(aave_pool); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); + // init rate + interest_rate_strategy::test_init_module(aave_rate); + // init input data for creating pool reserves let treasuries: vector
= vector[]; // prepare pool reserves let underlying_assets: vector
= vector[]; + let underlying_assets_symbols: vector = vector[]; let underlying_asset_decimals: vector = vector[]; let atokens_names: vector = vector[]; let atokens_symbols: vector = vector[]; @@ -103,7 +127,7 @@ module aave_pool::borrow_logic_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -120,10 +144,11 @@ module aave_pool::borrow_logic_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); // prepare the data for reserve's atokens and variable tokens + vector::push_back(&mut underlying_assets_symbols, symbol); vector::push_back(&mut underlying_assets, underlying_token_address); vector::push_back(&mut underlying_asset_decimals, decimals); vector::push_back(&mut treasuries, collector_address); @@ -134,38 +159,39 @@ module aave_pool::borrow_logic_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; // create pool reserves pool_configurator::init_reserves( aave_pool, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); // create reserve configurations for (j in 0..num_assets) { - let reserve_config_new = reserve::init(); + let reserve_config_new = reserve_config::init(); let decimals = ( *vector::borrow(&underlying_asset_decimals, (j as u64)) as u256 ); - reserve::set_decimals(&mut reserve_config_new, decimals); - reserve::set_active(&mut reserve_config_new, true); - reserve::set_frozen(&mut reserve_config_new, false); - reserve::set_paused(&mut reserve_config_new, false); - reserve::set_ltv(&mut reserve_config_new, 5000); // NOTE: set ltv - reserve::set_debt_ceiling(&mut reserve_config_new, 0); // NOTE: set no debt_ceiling - reserve::set_borrowable_in_isolation(&mut reserve_config_new, false); // NOTE: no borrowing in isolation - reserve::set_siloed_borrowing(&mut reserve_config_new, false); // NOTE: no siloed borrowing - reserve::set_flash_loan_enabled(&mut reserve_config_new, false); // NOTE: no flashloans - reserve::set_borrowing_enabled(&mut reserve_config_new, true); // NOTE: enable borrowing - reserve::set_liquidation_threshold(&mut reserve_config_new, 4000); // NOTE: enable liq. threshold + reserve_config::set_decimals(&mut reserve_config_new, decimals); + reserve_config::set_active(&mut reserve_config_new, true); + reserve_config::set_frozen(&mut reserve_config_new, false); + reserve_config::set_paused(&mut reserve_config_new, false); + reserve_config::set_ltv(&mut reserve_config_new, 5000); // NOTE: set ltv + reserve_config::set_debt_ceiling(&mut reserve_config_new, 0); // NOTE: set no debt_ceiling + reserve_config::set_borrowable_in_isolation(&mut reserve_config_new, false); // NOTE: no borrowing in isolation + reserve_config::set_siloed_borrowing(&mut reserve_config_new, false); // NOTE: no siloed borrowing + reserve_config::set_flash_loan_enabled(&mut reserve_config_new, false); // NOTE: no flashloans + reserve_config::set_borrowing_enabled(&mut reserve_config_new, true); // NOTE: enable borrowing + reserve_config::set_liquidation_threshold(&mut reserve_config_new, 4000); // NOTE: enable liq. threshold test_set_reserve_configuration( *vector::borrow(&underlying_assets, (j as u64)), reserve_config_new ); @@ -185,7 +211,7 @@ module aave_pool::borrow_logic_tests { underlying_tokens_admin, mint_receiver_address, mint_amount, - underlying_token_address, + underlying_token_address ); let initial_user_balance = mock_underlying_token_factory::balance_of( @@ -197,7 +223,7 @@ module aave_pool::borrow_logic_tests { assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some((mint_amount as u128)), - TEST_SUCCESS, + TEST_SUCCESS ); // init user config for reserve index @@ -209,7 +235,7 @@ module aave_pool::borrow_logic_tests { underlying_token_address, (supplied_amount as u256), supply_receiver_address, - 0, + 0 ); let user_config_map = get_user_configuration(signer::address_of(supply_user)); @@ -217,7 +243,7 @@ module aave_pool::borrow_logic_tests { is_using_as_collateral_or_borrowing( &user_config_map, (get_reserve_id(&reserve_data) as u256) ), - TEST_SUCCESS, + TEST_SUCCESS ); // check supplier balance of underlying @@ -227,21 +253,21 @@ module aave_pool::borrow_logic_tests { ); assert!( supplier_balance == initial_user_balance - supplied_amount, - TEST_SUCCESS, + TEST_SUCCESS ); // check underlying supply (must not have changed) assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some((mint_amount as u128)), - TEST_SUCCESS, + TEST_SUCCESS ); // check a_token underlying balance let a_token_address = a_token_factory::token_address( signer::address_of(aave_pool), - *vector::borrow(&atokens_symbols, i), + *vector::borrow(&atokens_symbols, i) ); let atoken_account_address = a_token_factory::get_token_account_address(a_token_address); @@ -254,7 +280,7 @@ module aave_pool::borrow_logic_tests { let supplied_amount_scaled = wad_ray_math::ray_div( (supplied_amount as u256), - (get_reserve_liquidity_index(&reserve_data) as u256), + (get_reserve_liquidity_index(&reserve_data) as u256) ); let supplier_a_token_balance = a_token_factory::scaled_balance_of( @@ -263,21 +289,14 @@ module aave_pool::borrow_logic_tests { assert!(supplier_a_token_balance == supplied_amount_scaled, TEST_SUCCESS); }; - // =============== ADJUST ORACLE TO ALLOW BORROW ================= // - // set new grace period - let grace_period = 1000; - oracle_sentinel::set_grace_period(aave_pool, grace_period); - // assert set grace period - assert!(oracle_sentinel::get_grace_period() == 1000, TEST_SUCCESS); - // fast forward grace_period - fast_forward_seconds(((grace_period + 5) as u64)); - // assert borrow is not allowed - assert!(oracle_sentinel::is_borrow_allowed(), TEST_SUCCESS); - - // set oracle asset prices + // register assets with oracle feed_ids for (i in 0..vector::length(&underlying_assets)) { let underlying_token_address = *vector::borrow(&underlying_assets, i); - oracle::set_asset_price(mock_oracle, underlying_token_address, 100); + aave_oracle::oracle::set_asset_feed_id( + aave_pool, + underlying_token_address, + aave_oracle::oracle_tests::get_test_feed_id() + ); }; // =============== USER BORROWS FIRST TWO ASSETS ================= // @@ -292,7 +311,7 @@ module aave_pool::borrow_logic_tests { (borrowed_amount as u256), 2, // variable interest rate mode 0, // referral - borrow_receiver_address, + borrow_receiver_address ); }; diff --git a/aave-core/tests/aave-bridge/bridge_logic_tests.move b/aave-core/tests/aave-logic/bridge_logic_tests.move similarity index 78% rename from aave-core/tests/aave-bridge/bridge_logic_tests.move rename to aave-core/tests/aave-logic/bridge_logic_tests.move index 8f22330..0b89377 100644 --- a/aave-core/tests/aave-bridge/bridge_logic_tests.move +++ b/aave-core/tests/aave-logic/bridge_logic_tests.move @@ -3,48 +3,65 @@ module aave_pool::bridge_logic_tests { use std::features::change_feature_flags_for_testing; use std::option::Self; use std::signer; - use std::string::{utf8, String}; + use std::string::{String, utf8}; use std::vector; use aptos_std::string_utils; use aptos_framework::account; use aptos_framework::event::emitted_events; use aptos_framework::timestamp::set_time_has_started_for_testing; - use aave_acl::acl_manage::{Self}; - use aave_config::reserve; + use aave_acl::acl_manage::Self; + use aave_config::reserve_config; + use aave_config::user_config::is_using_as_collateral_or_borrowing; use aave_math::wad_ray_math; - use aave_mock_oracle::oracle; - use aave_pool::pool; + use aave_rate::default_reserve_interest_rate_strategy::Self; + use aave_rate::interest_rate_strategy; + use aave_pool::a_token_factory::Self; + use aave_pool::bridge_logic::Self; use aave_pool::collector; - use aave_pool::pool_configurator; + use aave_pool::mock_underlying_token_factory::Self; + use aave_pool::pool; use aave_pool::pool::{ - get_reserve_id, get_reserve_data, - test_set_reserve_configuration, - get_reserve_liquidity_index + get_reserve_id, + get_reserve_liquidity_index, + test_set_reserve_configuration }; - use aave_config::user::is_using_as_collateral_or_borrowing; - use aave_pool::a_token_factory::Self; - use aave_pool::default_reserve_interest_rate_strategy::Self; + use aave_pool::pool_configurator; use aave_pool::pool_tests::create_user_config_for_reserve; use aave_pool::supply_logic::Self; use aave_pool::token_base::Self; - use aave_pool::mock_underlying_token_factory::Self; - use aave_pool::bridge_logic::{Self}; + use aave_pool::variable_debt_token_factory; const TEST_SUCCESS: u64 = 1; const TEST_FAILED: u64 = 2; - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, mock_oracle = @aave_mock_oracle, aptos_std = @aptos_std, supply_user = @0x042, underlying_tokens_admin = @underlying_tokens, unbacked_tokens_minter = @0x43,)] + #[ + test( + aave_pool = @aave_pool, + aave_rate = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + aptos_std = @aptos_std, + supply_user = @0x042, + underlying_tokens_admin = @underlying_tokens, + unbacked_tokens_minter = @0x43 + ) + ] /// Mint unbacked a-tokens (no underlyings behind them) for a user /// The user has already supplied hence not a first supply fun test_minting_backed_after_supply( aave_pool: &signer, + aave_rate: &signer, aave_role_super_admin: &signer, - mock_oracle: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, aptos_std: &signer, supply_user: &signer, underlying_tokens_admin: &signer, - unbacked_tokens_minter: &signer, + unbacked_tokens_minter: &signer ) { // start the timer set_time_has_started_for_testing(aptos_std); @@ -70,15 +87,24 @@ module aave_pool::bridge_logic_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); + // init a token factory + a_token_factory::test_init_module(aave_pool); + + // init debt token factory + variable_debt_token_factory::test_init_module(aave_pool); + // init underlying tokens mock_underlying_token_factory::test_init_module(aave_pool); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); + // init rate + interest_rate_strategy::test_init_module(aave_rate); + // init input data for creating pool reserves let treasuries: vector
= vector[]; @@ -102,7 +128,7 @@ module aave_pool::bridge_logic_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -119,7 +145,7 @@ module aave_pool::bridge_logic_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); // prepare the data for reserve's atokens and variable tokens @@ -133,34 +159,35 @@ module aave_pool::bridge_logic_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; // create pool reserves pool_configurator::init_reserves( aave_pool, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); // create reserve configurations let reserve_unbacked_mint_cap = 1000; for (j in 0..num_assets) { - let reserve_config_new = reserve::init(); + let reserve_config_new = reserve_config::init(); let decimals = ( *vector::borrow(&underlying_asset_decimals, (j as u64)) as u256 ); - reserve::set_decimals(&mut reserve_config_new, decimals); - reserve::set_active(&mut reserve_config_new, true); - reserve::set_frozen(&mut reserve_config_new, false); - reserve::set_paused(&mut reserve_config_new, false); - reserve::set_flash_loan_enabled(&mut reserve_config_new, true); - reserve::set_unbacked_mint_cap( + reserve_config::set_decimals(&mut reserve_config_new, decimals); + reserve_config::set_active(&mut reserve_config_new, true); + reserve_config::set_frozen(&mut reserve_config_new, false); + reserve_config::set_paused(&mut reserve_config_new, false); + reserve_config::set_flash_loan_enabled(&mut reserve_config_new, true); + reserve_config::set_unbacked_mint_cap( &mut reserve_config_new, reserve_unbacked_mint_cap ); test_set_reserve_configuration( @@ -182,7 +209,7 @@ module aave_pool::bridge_logic_tests { signer::address_of(supply_user), (get_reserve_id(&reserve_data) as u256), option::some(false), - option::some(true), + option::some(true) ); // =============== MINT UNDERLYING FOR A SUPPLY USER ================= // @@ -193,7 +220,7 @@ module aave_pool::bridge_logic_tests { underlying_tokens_admin, mint_receiver_address, underlying_tokens_to_mint, - underlying_token_address, + underlying_token_address ); let initial_user_balance = mock_underlying_token_factory::balance_of( @@ -205,7 +232,7 @@ module aave_pool::bridge_logic_tests { assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some((underlying_tokens_to_mint as u128)), - TEST_SUCCESS, + TEST_SUCCESS ); // =============== USER SUPPLY ================= // @@ -217,7 +244,7 @@ module aave_pool::bridge_logic_tests { underlying_token_address, (supplied_amount as u256), supply_receiver_address, - 0, + 0 ); // > check emitted events @@ -229,20 +256,23 @@ module aave_pool::bridge_logic_tests { mock_underlying_token_factory::balance_of( mint_receiver_address, underlying_token_address ); - assert!(supplier_balance == initial_user_balance - supplied_amount, TEST_SUCCESS); + assert!( + supplier_balance == initial_user_balance - supplied_amount, + TEST_SUCCESS + ); // check underlying supply assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some((underlying_tokens_to_mint as u128)), - TEST_SUCCESS, + TEST_SUCCESS ); // check a_token underlying balance let a_token_address = a_token_factory::token_address( signer::address_of(aave_pool), - *vector::borrow(&atokens_symbols, 0), + *vector::borrow(&atokens_symbols, 0) ); let atoken_acocunt_address = a_token_factory::get_token_account_address(a_token_address); @@ -256,7 +286,7 @@ module aave_pool::bridge_logic_tests { let supplied_amount_scaled = wad_ray_math::ray_div( (supplied_amount as u256), - (get_reserve_liquidity_index(&reserve_data) as u256), + (get_reserve_liquidity_index(&reserve_data) as u256) ); let supplier_a_token_balance = a_token_factory::scaled_balance_of( @@ -266,12 +296,13 @@ module aave_pool::bridge_logic_tests { // =============== MINT UNBACKED ATOKENS FOR A SUPPLY USER ================= // let mint_unbacked_amount = 50; + let on_behalf_of = signer::address_of(unbacked_tokens_minter); bridge_logic::mint_unbacked( unbacked_tokens_minter, underlying_token_address, mint_unbacked_amount, - signer::address_of(supply_user), - 0, + on_behalf_of, + 0 ); // check emitted events @@ -285,43 +316,60 @@ module aave_pool::bridge_logic_tests { // check supplier a token balance let supplier_a_token_balance = - a_token_factory::scaled_balance_of( - signer::address_of(supply_user), a_token_address - ); - let supplied_a_token_amount_scaled = - wad_ray_math::ray_div( - mint_unbacked_amount + (supplied_amount as u256), - (get_reserve_liquidity_index(&reserve_data) as u256), - ); - assert!(supplier_a_token_balance == supplied_a_token_amount_scaled, TEST_SUCCESS); + a_token_factory::scaled_balance_of(on_behalf_of, a_token_address); + // let supplied_a_token_amount_scaled = + // wad_ray_math::ray_div( + // mint_unbacked_amount + (supplied_amount as u256), + // (get_reserve_liquidity_index(&reserve_data) as u256), + // ); + assert!(supplier_a_token_balance == mint_unbacked_amount, TEST_SUCCESS); // check supplier underlying token balance let supplier_balance = mock_underlying_token_factory::balance_of( mint_receiver_address, underlying_token_address ); - assert!(supplier_balance == initial_user_balance - supplied_amount, TEST_SUCCESS); + assert!( + supplier_balance == initial_user_balance - supplied_amount, + TEST_SUCCESS + ); // check underlying supply assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some((underlying_tokens_to_mint as u128)), - TEST_SUCCESS, + TEST_SUCCESS ); } - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, mock_oracle = @aave_mock_oracle, aptos_std = @aptos_std, supply_user = @0x042, underlying_tokens_admin = @underlying_tokens, unbacked_tokens_minter = @0x43,)] + #[ + test( + aave_pool = @aave_pool, + aave_rate = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + aptos_std = @aptos_std, + supply_user = @0x042, + underlying_tokens_admin = @underlying_tokens, + unbacked_tokens_minter = @0x43 + ) + ] #[expected_failure(abort_code = 6)] /// Mint unbacked a-tokens (no underlyings behind them) for a user /// The user has already supplied hence not a first supply fun test_minting_backed_none_bridge_failure( aave_pool: &signer, + aave_rate: &signer, aave_role_super_admin: &signer, - mock_oracle: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, aptos_std: &signer, supply_user: &signer, underlying_tokens_admin: &signer, - unbacked_tokens_minter: &signer, + unbacked_tokens_minter: &signer ) { // start the timer set_time_has_started_for_testing(aptos_std); @@ -347,14 +395,22 @@ module aave_pool::bridge_logic_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); + // init a token factory + a_token_factory::test_init_module(aave_pool); + + // init debt token factory + variable_debt_token_factory::test_init_module(aave_pool); + // init underlying tokens mock_underlying_token_factory::test_init_module(aave_pool); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); + // init rate + interest_rate_strategy::test_init_module(aave_rate); // init input data for creating pool reserves let treasuries: vector
= vector[]; @@ -379,7 +435,7 @@ module aave_pool::bridge_logic_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -396,7 +452,7 @@ module aave_pool::bridge_logic_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); // prepare the data for reserve's atokens and variable tokens @@ -410,34 +466,35 @@ module aave_pool::bridge_logic_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; // create pool reserves pool_configurator::init_reserves( aave_pool, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); // create reserve configurations let reserve_unbacked_mint_cap = 1000; for (j in 0..num_assets) { - let reserve_config_new = reserve::init(); + let reserve_config_new = reserve_config::init(); let decimals = ( *vector::borrow(&underlying_asset_decimals, (j as u64)) as u256 ); - reserve::set_decimals(&mut reserve_config_new, decimals); - reserve::set_active(&mut reserve_config_new, true); - reserve::set_frozen(&mut reserve_config_new, false); - reserve::set_paused(&mut reserve_config_new, false); - reserve::set_flash_loan_enabled(&mut reserve_config_new, true); - reserve::set_unbacked_mint_cap( + reserve_config::set_decimals(&mut reserve_config_new, decimals); + reserve_config::set_active(&mut reserve_config_new, true); + reserve_config::set_frozen(&mut reserve_config_new, false); + reserve_config::set_paused(&mut reserve_config_new, false); + reserve_config::set_flash_loan_enabled(&mut reserve_config_new, true); + reserve_config::set_unbacked_mint_cap( &mut reserve_config_new, reserve_unbacked_mint_cap ); test_set_reserve_configuration( @@ -459,7 +516,7 @@ module aave_pool::bridge_logic_tests { signer::address_of(supply_user), (get_reserve_id(&reserve_data) as u256), option::some(false), - option::some(true), + option::some(true) ); // =============== MINT UNDERLYING FOR A SUPPLY USER ================= // @@ -470,7 +527,7 @@ module aave_pool::bridge_logic_tests { underlying_tokens_admin, mint_receiver_address, underlying_tokens_to_mint, - underlying_token_address, + underlying_token_address ); let initial_user_balance = mock_underlying_token_factory::balance_of( @@ -482,7 +539,7 @@ module aave_pool::bridge_logic_tests { assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some((underlying_tokens_to_mint as u128)), - TEST_SUCCESS, + TEST_SUCCESS ); // =============== USER SUPPLY ================= // @@ -494,7 +551,7 @@ module aave_pool::bridge_logic_tests { underlying_token_address, (supplied_amount as u256), supply_receiver_address, - 0, + 0 ); // > check emitted events @@ -506,20 +563,23 @@ module aave_pool::bridge_logic_tests { mock_underlying_token_factory::balance_of( mint_receiver_address, underlying_token_address ); - assert!(supplier_balance == initial_user_balance - supplied_amount, TEST_SUCCESS); + assert!( + supplier_balance == initial_user_balance - supplied_amount, + TEST_SUCCESS + ); // check underlying supply assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some((underlying_tokens_to_mint as u128)), - TEST_SUCCESS, + TEST_SUCCESS ); // check a_token underlying balance let a_token_address = a_token_factory::token_address( signer::address_of(aave_pool), - *vector::borrow(&atokens_symbols, 0), + *vector::borrow(&atokens_symbols, 0) ); let atoken_acocunt_address = a_token_factory::get_token_account_address(a_token_address); @@ -533,7 +593,7 @@ module aave_pool::bridge_logic_tests { let supplied_amount_scaled = wad_ray_math::ray_div( (supplied_amount as u256), - (get_reserve_liquidity_index(&reserve_data) as u256), + (get_reserve_liquidity_index(&reserve_data) as u256) ); let supplier_a_token_balance = a_token_factory::scaled_balance_of( @@ -548,21 +608,37 @@ module aave_pool::bridge_logic_tests { underlying_token_address, mint_unbacked_amount, signer::address_of(supply_user), - 0, + 0 ); } - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, mock_oracle = @aave_mock_oracle, aptos_std = @aptos_std, supply_user = @0x042, underlying_tokens_admin = @underlying_tokens, unbacked_tokens_minter = @0x43,)] + #[ + test( + aave_pool = @aave_pool, + aave_rate = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + aptos_std = @aptos_std, + supply_user = @0x042, + underlying_tokens_admin = @underlying_tokens, + unbacked_tokens_minter = @0x43 + ) + ] /// Mint unbacked a-tokens (no underlyings behind them) for a user /// The user has not supplied before fun test_minting_backed_first_supply( aave_pool: &signer, + aave_rate: &signer, aave_role_super_admin: &signer, - mock_oracle: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, aptos_std: &signer, supply_user: &signer, underlying_tokens_admin: &signer, - unbacked_tokens_minter: &signer, + unbacked_tokens_minter: &signer ) { // start the timer set_time_has_started_for_testing(aptos_std); @@ -588,15 +664,24 @@ module aave_pool::bridge_logic_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); + // init a token factory + a_token_factory::test_init_module(aave_pool); + + // init debt token factory + variable_debt_token_factory::test_init_module(aave_pool); + // init underlying tokens mock_underlying_token_factory::test_init_module(aave_pool); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); + // init rate + interest_rate_strategy::test_init_module(aave_rate); + // init input data for creating pool reserves let treasuries: vector
= vector[]; @@ -620,7 +705,7 @@ module aave_pool::bridge_logic_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -637,7 +722,7 @@ module aave_pool::bridge_logic_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); // prepare the data for reserve's atokens and variable tokens @@ -651,37 +736,38 @@ module aave_pool::bridge_logic_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; // create pool reserves pool_configurator::init_reserves( aave_pool, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); // create reserve configurations let reserve_unbacked_mint_cap = 1000; for (j in 0..num_assets) { - let reserve_config_new = reserve::init(); + let reserve_config_new = reserve_config::init(); let decimals = ( *vector::borrow(&underlying_asset_decimals, (j as u64)) as u256 ); - reserve::set_decimals(&mut reserve_config_new, decimals); - reserve::set_active(&mut reserve_config_new, true); - reserve::set_frozen(&mut reserve_config_new, false); - reserve::set_paused(&mut reserve_config_new, false); - reserve::set_flash_loan_enabled(&mut reserve_config_new, true); - reserve::set_unbacked_mint_cap( + reserve_config::set_decimals(&mut reserve_config_new, decimals); + reserve_config::set_active(&mut reserve_config_new, true); + reserve_config::set_frozen(&mut reserve_config_new, false); + reserve_config::set_paused(&mut reserve_config_new, false); + reserve_config::set_flash_loan_enabled(&mut reserve_config_new, true); + reserve_config::set_unbacked_mint_cap( &mut reserve_config_new, reserve_unbacked_mint_cap ); - reserve::set_ltv(&mut reserve_config_new, 10000); // NOTE: set ltv here! + reserve_config::set_ltv(&mut reserve_config_new, 10000); // NOTE: set ltv here! test_set_reserve_configuration( *vector::borrow(&underlying_assets, (j as u64)), reserve_config_new ); @@ -701,7 +787,7 @@ module aave_pool::bridge_logic_tests { signer::address_of(supply_user), (get_reserve_id(&reserve_data) as u256), option::some(false), - option::some(false), // NOTE: user is not yet using as collateral + option::some(false) // NOTE: user is not yet using as collateral ); // =============== MINT UNDERLYING FOR A SUPPLY USER ================= // @@ -712,7 +798,7 @@ module aave_pool::bridge_logic_tests { underlying_tokens_admin, mint_receiver_address, underlying_tokens_to_mint, - underlying_token_address, + underlying_token_address ); let initial_user_balance = mock_underlying_token_factory::balance_of( @@ -726,14 +812,14 @@ module aave_pool::bridge_logic_tests { assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some((underlying_tokens_to_mint as u128)), - TEST_SUCCESS, + TEST_SUCCESS ); // check a_token underlying balance let a_token_address = a_token_factory::token_address( signer::address_of(aave_pool), - *vector::borrow(&atokens_symbols, 0), + *vector::borrow(&atokens_symbols, 0) ); let atoken_acocunt_address = a_token_factory::get_token_account_address(a_token_address); @@ -752,12 +838,13 @@ module aave_pool::bridge_logic_tests { // =============== MINT UNBACKED ATOKENS FOR A SUPPLY USER ================= // let mint_unbacked_amount = 50; + let on_behalf_of = signer::address_of(unbacked_tokens_minter); bridge_logic::mint_unbacked( unbacked_tokens_minter, underlying_token_address, mint_unbacked_amount, - signer::address_of(supply_user), - 0, + on_behalf_of, + 0 ); // check emitted events @@ -766,7 +853,8 @@ module aave_pool::bridge_logic_tests { let emitted_reserve_used_as_collateral_events = emitted_events(); assert!( - vector::length(&emitted_reserve_used_as_collateral_events) == 1, TEST_SUCCESS + vector::length(&emitted_reserve_used_as_collateral_events) == 1, + TEST_SUCCESS ); // check reserve @@ -776,14 +864,12 @@ module aave_pool::bridge_logic_tests { // check supplier a token balance let supplier_a_token_balance = - a_token_factory::scaled_balance_of( - signer::address_of(supply_user), a_token_address - ); - let supplied_a_token_amount_scaled = - wad_ray_math::ray_div( - mint_unbacked_amount, (get_reserve_liquidity_index(&reserve_data) as u256) - ); - assert!(supplier_a_token_balance == supplied_a_token_amount_scaled, TEST_SUCCESS); + a_token_factory::scaled_balance_of(on_behalf_of, a_token_address); + // let supplied_a_token_amount_scaled = + // wad_ray_math::ray_div( + // mint_unbacked_amount, (get_reserve_liquidity_index(&reserve_data) as u256) + // ); + assert!(supplier_a_token_balance == mint_unbacked_amount, TEST_SUCCESS); // check supplier underlying token balance let supplier_balance = @@ -796,16 +882,16 @@ module aave_pool::bridge_logic_tests { assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some((underlying_tokens_to_mint as u128)), - TEST_SUCCESS, + TEST_SUCCESS ); // check the set using as collateral or borrowing flat is now set - let user_config = pool::get_user_configuration(mint_receiver_address); + let user_config = pool::get_user_configuration(on_behalf_of); assert!( is_using_as_collateral_or_borrowing( &user_config, (get_reserve_id(&reserve_data) as u256) ) == true, - TEST_SUCCESS, + TEST_SUCCESS ); } } diff --git a/aave-core/tests/aave-pool/emode_logic_tests.move b/aave-core/tests/aave-logic/emode_logic_tests.move similarity index 78% rename from aave-core/tests/aave-pool/emode_logic_tests.move rename to aave-core/tests/aave-logic/emode_logic_tests.move index 59aba4e..f5a89a1 100644 --- a/aave-core/tests/aave-pool/emode_logic_tests.move +++ b/aave-core/tests/aave-logic/emode_logic_tests.move @@ -3,22 +3,17 @@ module aave_pool::emode_logic_tests { use std::features::change_feature_flags_for_testing; use std::option::Self; use std::signer; - use std::string::{utf8, String}; + use std::string::{String, utf8}; use std::vector; use aptos_std::string_utils; use aptos_framework::account; use aptos_framework::event::emitted_events; use aave_acl::acl_manage; use aave_math::wad_ray_math; - use aave_mock_oracle::oracle; - - use aave_mock_oracle::oracle::test_init_oracle; - use aave_pool::default_reserve_interest_rate_strategy; - use aave_pool::pool_configurator; - use aave_pool::mock_underlying_token_factory; - use aave_pool::token_base; + use aave_rate::default_reserve_interest_rate_strategy; + use aave_rate::interest_rate_strategy; + use aave_pool::a_token_factory; use aave_pool::collector; - use aave_pool::emode_logic::{ configure_emode_category, get_emode_category_data, @@ -30,15 +25,19 @@ module aave_pool::emode_logic_tests { init_emode, is_in_emode_category, set_user_emode, - UserEModeSet, + UserEModeSet }; + use aave_pool::mock_underlying_token_factory; use aave_pool::pool::{get_reserve_data, get_reserve_id}; - use aave_pool::pool_tests::{create_user_config_for_reserve}; + use aave_pool::pool_configurator; + use aave_pool::pool_tests::create_user_config_for_reserve; + use aave_pool::token_base; + use aave_pool::variable_debt_token_factory; const TEST_SUCCESS: u64 = 1; const TEST_FAILED: u64 = 2; - #[test(pool = @aave_pool,)] + #[test(pool = @aave_pool)] #[expected_failure(abort_code = 16)] fun zero_emode_id_failure(pool: &signer) { // init the emode @@ -57,11 +56,11 @@ module aave_pool::emode_logic_tests { liquidation_threshold, liquidation_bonus, price_source, - label, + label ); } - #[test(pool = @aave_pool,)] + #[test(pool = @aave_pool)] fun get_nonexisting_emode_category(pool: &signer) { // init the emode init_emode(pool); @@ -74,20 +73,32 @@ module aave_pool::emode_logic_tests { assert!(emode_asset_price == 0, TEST_SUCCESS); } - #[test(pool = @aave_pool, mock_oracle = @aave_mock_oracle,)] - fun test_emode_config(pool: &signer, mock_oracle: &signer,) { - // init oracle - test_init_oracle(mock_oracle); + #[ + test( + aave_pool = @aave_pool, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform + ) + ] + fun test_emode_config( + aave_pool: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer + ) { + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init the emode - init_emode(pool); + init_emode(aave_pool); // configure and assert two emode categories let id1: u8 = 1; let ltv1: u16 = 100; let liquidation_threshold1: u16 = 200; let liquidation_bonus1: u16 = 300; - let price_source1: address = @0x01; + let price_source1: address = signer::address_of(aave_oracle); let label1 = utf8(b"MODE1"); configure_emode_category( id1, @@ -95,20 +106,19 @@ module aave_pool::emode_logic_tests { liquidation_threshold1, liquidation_bonus1, price_source1, - label1, + label1 ); let emode_data1 = get_emode_category_data(id1); assert!( get_emode_category_liquidation_bonus(&emode_data1) == liquidation_bonus1, - TEST_SUCCESS, + TEST_SUCCESS ); assert!( - get_emode_category_liquidation_threshold(&emode_data1) == liquidation_threshold1, - TEST_SUCCESS, - ); - assert!( - get_emode_category_price_source(&emode_data1) == price_source1, TEST_SUCCESS + get_emode_category_liquidation_threshold(&emode_data1) + == liquidation_threshold1, + TEST_SUCCESS ); + assert!(get_emode_category_price_source(&emode_data1) == @0x0, TEST_SUCCESS); let (ltv, liquidation_threshold, _emode_asset_price) = get_emode_configuration(id1); assert!(ltv == (ltv1 as u256), TEST_SUCCESS); @@ -118,7 +128,7 @@ module aave_pool::emode_logic_tests { let ltv2: u16 = 101; let liquidation_threshold2: u16 = 201; let liquidation_bonus2: u16 = 301; - let price_source2: address = @0x02; + let price_source2: address = signer::address_of(aave_oracle); let label2 = utf8(b"MODE2"); configure_emode_category( id2, @@ -126,34 +136,48 @@ module aave_pool::emode_logic_tests { liquidation_threshold2, liquidation_bonus2, price_source2, - label2, + label2 ); let emode_data2 = get_emode_category_data(id2); assert!( get_emode_category_liquidation_bonus(&emode_data2) == liquidation_bonus2, - TEST_SUCCESS, - ); - assert!( - get_emode_category_liquidation_threshold(&emode_data2) == liquidation_threshold2, - TEST_SUCCESS, + TEST_SUCCESS ); assert!( - get_emode_category_price_source(&emode_data2) == price_source2, TEST_SUCCESS + get_emode_category_liquidation_threshold(&emode_data2) + == liquidation_threshold2, + TEST_SUCCESS ); + assert!(get_emode_category_price_source(&emode_data2) == @0x0, TEST_SUCCESS); let (ltv, liquidation_threshold, _emode_asset_price) = get_emode_configuration(id2); assert!(ltv == (ltv2 as u256), TEST_SUCCESS); assert!(liquidation_threshold == (liquidation_threshold2 as u256), TEST_SUCCESS); } - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, aave_std = @std, mock_oracle = @aave_mock_oracle, underlying_tokens_admin = @underlying_tokens, user = @0x042,)] + #[ + test( + aave_pool = @aave_pool, + aave_rate = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_std = @std, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + underlying_tokens_admin = @underlying_tokens, + user = @0x042 + ) + ] fun test_legitimate_user_emode( aave_pool: &signer, + aave_rate: &signer, aave_role_super_admin: &signer, aave_std: &signer, - mock_oracle: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, underlying_tokens_admin: &signer, - user: &signer, + user: &signer ) { // add the test events feature flag change_feature_flags_for_testing(aave_std, vector[26], vector[]); @@ -173,15 +197,24 @@ module aave_pool::emode_logic_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); + // init a token factory + a_token_factory::test_init_module(aave_pool); + + // init debt token factory + variable_debt_token_factory::test_init_module(aave_pool); + // init underlying tokens mock_underlying_token_factory::test_init_module(aave_pool); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); + // init rate + interest_rate_strategy::test_init_module(aave_rate); + // init input data for creating pool reserves let treasuries: vector
= vector[]; @@ -207,7 +240,7 @@ module aave_pool::emode_logic_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -224,7 +257,7 @@ module aave_pool::emode_logic_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); // prepare a and var tokens @@ -238,19 +271,20 @@ module aave_pool::emode_logic_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; // create pool reserves pool_configurator::init_reserves( aave_pool, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); // define an emode cat for reserve and user @@ -259,7 +293,7 @@ module aave_pool::emode_logic_tests { let ltv: u16 = 100; let liquidation_threshold: u16 = 200; let liquidation_bonus: u16 = 300; - let price_source: address = signer::address_of(mock_oracle); + let price_source: address = signer::address_of(aave_oracle); let label = utf8(b"MODE1"); configure_emode_category( emode_cat_id, @@ -267,7 +301,7 @@ module aave_pool::emode_logic_tests { liquidation_threshold, liquidation_bonus, price_source, - label, + label ); // get the reserve config @@ -282,7 +316,7 @@ module aave_pool::emode_logic_tests { signer::address_of(user), (get_reserve_id(&reserve_data) as u256), option::some(true), - option::some(true), + option::some(true) ); // set user emode @@ -303,15 +337,30 @@ module aave_pool::emode_logic_tests { assert!(vector::length(&emitted_events) == 1, TEST_SUCCESS); } - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, aave_std = @std, mock_oracle = @aave_mock_oracle, underlying_tokens_admin = @underlying_tokens, user = @0x042,)] + #[ + test( + aave_pool = @aave_pool, + aave_rate = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_std = @std, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + underlying_tokens_admin = @underlying_tokens, + user = @0x042 + ) + ] #[expected_failure(abort_code = 58)] fun test_user_emode_with_non_existing_user_emode( aave_pool: &signer, + aave_rate: &signer, aave_role_super_admin: &signer, aave_std: &signer, - mock_oracle: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, underlying_tokens_admin: &signer, - user: &signer, + user: &signer ) { // add the test events feature flag change_feature_flags_for_testing(aave_std, vector[26], vector[]); @@ -331,15 +380,24 @@ module aave_pool::emode_logic_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); + // init a token factory + a_token_factory::test_init_module(aave_pool); + + // init debt token factory + variable_debt_token_factory::test_init_module(aave_pool); + // init underlying tokens mock_underlying_token_factory::test_init_module(aave_pool); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); + // init rate + interest_rate_strategy::test_init_module(aave_rate); + // init input data for creating pool reserves let treasuries: vector
= vector[]; @@ -363,7 +421,7 @@ module aave_pool::emode_logic_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -380,7 +438,7 @@ module aave_pool::emode_logic_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); // prep a and var tokens @@ -394,19 +452,20 @@ module aave_pool::emode_logic_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; // create pool reserves pool_configurator::init_reserves( aave_pool, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); // define an emode cat for reserve and user @@ -415,7 +474,7 @@ module aave_pool::emode_logic_tests { let ltv: u16 = 100; let liquidation_threshold: u16 = 200; let liquidation_bonus: u16 = 300; - let price_source: address = signer::address_of(mock_oracle); + let price_source: address = signer::address_of(aave_oracle); let label = utf8(b"MODE1"); configure_emode_category( emode_cat_id, @@ -423,7 +482,7 @@ module aave_pool::emode_logic_tests { liquidation_threshold, liquidation_bonus, price_source, - label, + label ); // get the reserve config @@ -438,7 +497,7 @@ module aave_pool::emode_logic_tests { signer::address_of(user), (get_reserve_id(&reserve_data) as u256), option::some(true), - option::some(true), + option::some(true) ); // set user emode diff --git a/aave-core/tests/aave-flash-loan/flash_loan_tests.move b/aave-core/tests/aave-logic/flash_loan_tests.move similarity index 80% rename from aave-core/tests/aave-flash-loan/flash_loan_tests.move rename to aave-core/tests/aave-logic/flash_loan_tests.move index 104858c..852c59a 100644 --- a/aave-core/tests/aave-flash-loan/flash_loan_tests.move +++ b/aave-core/tests/aave-logic/flash_loan_tests.move @@ -3,46 +3,62 @@ module aave_pool::flashloan_logic_tests { use std::features::change_feature_flags_for_testing; use std::option::Self; use std::signer; - use std::string::{utf8, String}; + use std::string::{String, utf8}; use std::vector; use aptos_std::string_utils; + use aptos_framework::account; use aptos_framework::event::emitted_events; use aptos_framework::timestamp::set_time_has_started_for_testing; - use aptos_framework::account; - use aave_acl::acl_manage::{Self}; + use aave_acl::acl_manage::Self; + use aave_config::reserve_config::Self; + use aave_config::user_config; + use aave_math::math_utils::get_percentage_factor; use aave_math::wad_ray_math; - use aave_pool::default_reserve_interest_rate_strategy::Self; - use aave_pool::pool_tests::create_user_config_for_reserve; + use aave_rate::default_reserve_interest_rate_strategy::Self; + use aave_rate::interest_rate_strategy; use aave_pool::a_token_factory::Self; - use aave_pool::token_base::Self; + use aave_pool::collector; + use aave_pool::flashloan_logic::Self; use aave_pool::mock_underlying_token_factory::Self; - use aave_pool::supply_logic::Self; use aave_pool::pool::{ Self, - test_set_reserve_configuration, - get_reserve_liquidity_index + get_reserve_liquidity_index, + test_set_reserve_configuration }; - use aave_pool::flashloan_logic::{Self}; - use aave_math::math_utils::get_percentage_factor; - use aave_config::user as user_config; - use aave_config::reserve::{Self}; - use aave_mock_oracle::oracle; - use aave_pool::pool::{get_reserve_id, get_reserve_data}; + use aave_pool::pool::{get_reserve_data, get_reserve_id}; use aave_pool::pool_configurator; - use aave_pool::collector; + use aave_pool::pool_tests::create_user_config_for_reserve; + use aave_pool::supply_logic::Self; + use aave_pool::token_base::Self; + use aave_pool::variable_debt_token_factory; const TEST_SUCCESS: u64 = 1; const TEST_FAILED: u64 = 2; - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, mock_oracle = @aave_mock_oracle, aptos_std = @aptos_std, flashloan_user = @0x042, underlying_tokens_admin = @underlying_tokens)] + #[ + test( + aave_pool = @aave_pool, + aave_rate = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + aptos_std = @aptos_std, + flashloan_user = @0x042, + underlying_tokens_admin = @underlying_tokens + ) + ] /// User takes and repays a single asset flashloan fun simple_flashloan_same_payer_receiver( aave_pool: &signer, + aave_rate: &signer, aave_role_super_admin: &signer, - mock_oracle: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, aptos_std: &signer, flashloan_user: &signer, - underlying_tokens_admin: &signer, + underlying_tokens_admin: &signer ) { // start the timer set_time_has_started_for_testing(aptos_std); @@ -65,15 +81,24 @@ module aave_pool::flashloan_logic_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); + // init a token factory + a_token_factory::test_init_module(aave_pool); + + // init debt token factory + variable_debt_token_factory::test_init_module(aave_pool); + // init underlying tokens mock_underlying_token_factory::test_init_module(aave_pool); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); + // init rate + interest_rate_strategy::test_init_module(aave_rate); + // init input data for creating pool reserves let treasuries: vector
= vector[]; @@ -97,7 +122,7 @@ module aave_pool::flashloan_logic_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -114,7 +139,7 @@ module aave_pool::flashloan_logic_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); // prepare the data for reserve's atokens and variable tokens @@ -128,32 +153,33 @@ module aave_pool::flashloan_logic_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; // create pool reserves pool_configurator::init_reserves( aave_pool, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); // create reserve configurations for (j in 0..num_assets) { - let reserve_config_new = reserve::init(); + let reserve_config_new = reserve_config::init(); let decimals = ( *vector::borrow(&underlying_asset_decimals, (j as u64)) as u256 ); - reserve::set_decimals(&mut reserve_config_new, decimals); - reserve::set_active(&mut reserve_config_new, true); - reserve::set_frozen(&mut reserve_config_new, false); - reserve::set_paused(&mut reserve_config_new, false); - reserve::set_flash_loan_enabled(&mut reserve_config_new, true); + reserve_config::set_decimals(&mut reserve_config_new, decimals); + reserve_config::set_active(&mut reserve_config_new, true); + reserve_config::set_frozen(&mut reserve_config_new, false); + reserve_config::set_paused(&mut reserve_config_new, false); + reserve_config::set_flash_loan_enabled(&mut reserve_config_new, true); test_set_reserve_configuration( *vector::borrow(&underlying_assets, (j as u64)), reserve_config_new ); @@ -177,7 +203,7 @@ module aave_pool::flashloan_logic_tests { signer::address_of(flashloan_user), (get_reserve_id(&reserve_data) as u256), option::some(false), - option::some(true), + option::some(true) ); // ----> mint underlying for the flashloan user @@ -187,7 +213,7 @@ module aave_pool::flashloan_logic_tests { underlying_tokens_admin, mint_receiver_address, 100, - underlying_token_address, + underlying_token_address ); let initial_user_balance = mock_underlying_token_factory::balance_of( @@ -199,7 +225,7 @@ module aave_pool::flashloan_logic_tests { assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some(100), - TEST_SUCCESS, + TEST_SUCCESS ); // ----> flashloan user supplies @@ -211,7 +237,7 @@ module aave_pool::flashloan_logic_tests { underlying_token_address, (supplied_amount as u256), supply_receiver_address, - 0, + 0 ); // > check emitted events @@ -223,12 +249,15 @@ module aave_pool::flashloan_logic_tests { mock_underlying_token_factory::balance_of( mint_receiver_address, underlying_token_address ); - assert!(supplier_balance == initial_user_balance - supplied_amount, TEST_SUCCESS); + assert!( + supplier_balance == initial_user_balance - supplied_amount, + TEST_SUCCESS + ); // > check underlying supply assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some(100), - TEST_SUCCESS, + TEST_SUCCESS ); // ----> flashloan user takes a flashloan @@ -239,7 +268,7 @@ module aave_pool::flashloan_logic_tests { signer::address_of(flashloan_user), underlying_token_address, (flashloan_amount as u256), - 0, // referal code + 0 // referral code ); // check intermediate underlying balance @@ -249,7 +278,7 @@ module aave_pool::flashloan_logic_tests { ); assert!( flashloan_taker_underlying_balance == supplier_balance + flashloan_amount, - TEST_SUCCESS, + TEST_SUCCESS ); // ----> flashloan user repays flashloan + premium @@ -262,8 +291,9 @@ module aave_pool::flashloan_logic_tests { ); let flashloan_paid_premium = 3; // 10% * 25 = 2.5 = 3 assert!( - flashloan_taken_underlying_balance == supplier_balance - flashloan_paid_premium, - TEST_SUCCESS, + flashloan_taken_underlying_balance + == supplier_balance - flashloan_paid_premium, + TEST_SUCCESS ); // check emitted events @@ -271,16 +301,32 @@ module aave_pool::flashloan_logic_tests { assert!(vector::length(&emitted_withdraw_events) == 1, TEST_SUCCESS); } - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, mock_oracle = @aave_mock_oracle, aptos_std = @std, flashloan_payer = @0x042, flashloan_receiver = @0x043, underlying_tokens_admin = @underlying_tokens)] + #[ + test( + aave_pool = @aave_pool, + aave_rate = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + aptos_std = @std, + flashloan_payer = @0x042, + flashloan_receiver = @0x043, + underlying_tokens_admin = @underlying_tokens + ) + ] /// User takes a flashloan which is received by someone else. Either user or taker then repays a single asset flashloan fun simple_flashloan_different_payer_receiver( aave_pool: &signer, + aave_rate: &signer, aave_role_super_admin: &signer, - mock_oracle: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, aptos_std: &signer, flashloan_payer: &signer, flashloan_receiver: &signer, - underlying_tokens_admin: &signer, + underlying_tokens_admin: &signer ) { // start the timer set_time_has_started_for_testing(aptos_std); @@ -303,15 +349,24 @@ module aave_pool::flashloan_logic_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); + // init a token factory + a_token_factory::test_init_module(aave_pool); + + // init debt token factory + variable_debt_token_factory::test_init_module(aave_pool); + // init underlying tokens mock_underlying_token_factory::test_init_module(aave_pool); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); + // init rate + interest_rate_strategy::test_init_module(aave_rate); + // init input data for creating pool reserves let treasuries: vector
= vector[]; @@ -335,7 +390,7 @@ module aave_pool::flashloan_logic_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -352,7 +407,7 @@ module aave_pool::flashloan_logic_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); // prepare the data for reserve's atokens and variable tokens @@ -366,32 +421,33 @@ module aave_pool::flashloan_logic_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; // create pool reserves pool_configurator::init_reserves( aave_pool, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); // create reserve configurations for (j in 0..num_assets) { - let reserve_config_new = reserve::init(); + let reserve_config_new = reserve_config::init(); let decimals = ( *vector::borrow(&underlying_asset_decimals, (j as u64)) as u256 ); - reserve::set_decimals(&mut reserve_config_new, decimals); - reserve::set_active(&mut reserve_config_new, true); - reserve::set_frozen(&mut reserve_config_new, false); - reserve::set_paused(&mut reserve_config_new, false); - reserve::set_flash_loan_enabled(&mut reserve_config_new, true); + reserve_config::set_decimals(&mut reserve_config_new, decimals); + reserve_config::set_active(&mut reserve_config_new, true); + reserve_config::set_frozen(&mut reserve_config_new, false); + reserve_config::set_paused(&mut reserve_config_new, false); + reserve_config::set_flash_loan_enabled(&mut reserve_config_new, true); test_set_reserve_configuration( *vector::borrow(&underlying_assets, (j as u64)), reserve_config_new ); @@ -415,14 +471,14 @@ module aave_pool::flashloan_logic_tests { signer::address_of(flashloan_payer), (get_reserve_id(&reserve_data) as u256), option::some(false), - option::some(true), + option::some(true) ); create_user_config_for_reserve( signer::address_of(flashloan_receiver), (get_reserve_id(&reserve_data) as u256), option::some(false), - option::some(true), + option::some(true) ); // ----> mint underlying for flashloan payer and receiver @@ -430,13 +486,14 @@ module aave_pool::flashloan_logic_tests { let mint_amount: u64 = 100; let users = vector[ signer::address_of(flashloan_payer), - signer::address_of(flashloan_receiver)]; + signer::address_of(flashloan_receiver) + ]; for (i in 0..vector::length(&users)) { mock_underlying_token_factory::mint( underlying_tokens_admin, *vector::borrow(&users, i), mint_amount, - underlying_token_address, + underlying_token_address ); let initial_user_balance = mock_underlying_token_factory::balance_of( @@ -455,7 +512,7 @@ module aave_pool::flashloan_logic_tests { underlying_token_address, (supplied_amount as u256), supply_receiver_address, - 0, + 0 ); // > check flashloan payer balance of underlying @@ -463,12 +520,15 @@ module aave_pool::flashloan_logic_tests { mock_underlying_token_factory::balance_of( signer::address_of(flashloan_payer), underlying_token_address ); - assert!(initial_payer_balance == mint_amount - supplied_amount, TEST_SUCCESS); + assert!( + initial_payer_balance == mint_amount - supplied_amount, + TEST_SUCCESS + ); // > check flashloan payer a_token balance after supply let a_token_address = a_token_factory::token_address( signer::address_of(aave_pool), - *vector::borrow(&atokens_symbols, 0), + *vector::borrow(&atokens_symbols, 0) ); let supplier_a_token_balance = a_token_factory::scaled_balance_of( @@ -477,7 +537,7 @@ module aave_pool::flashloan_logic_tests { let supplied_amount_scaled = wad_ray_math::ray_div( (supplied_amount as u256), - (get_reserve_liquidity_index(&reserve_data) as u256), + (get_reserve_liquidity_index(&reserve_data) as u256) ); assert!(supplier_a_token_balance == supplied_amount_scaled, TEST_SUCCESS); @@ -494,7 +554,7 @@ module aave_pool::flashloan_logic_tests { signer::address_of(flashloan_receiver), // now the receiver expects to receive the flashloan underlying_token_address, (flashloan_amount as u256), - 0, // referal code + 0 // referral code ); // check intermediate underlying balance for flashloan payer @@ -502,7 +562,9 @@ module aave_pool::flashloan_logic_tests { mock_underlying_token_factory::balance_of( signer::address_of(flashloan_payer), underlying_token_address ); - assert!(flashloan_payer_underlying_balance == initial_payer_balance, TEST_SUCCESS); // same balance as before + assert!( + flashloan_payer_underlying_balance == initial_payer_balance, TEST_SUCCESS + ); // same balance as before // check intermediate underlying balance for flashloan receiver let flashloan_receiver_underlying_balance = @@ -512,7 +574,7 @@ module aave_pool::flashloan_logic_tests { assert!( flashloan_receiver_underlying_balance == initial_receiver_balance + flashloan_amount, - TEST_SUCCESS, + TEST_SUCCESS ); // increased balance due to flashloan // ----> receiver repays flashloan + premium @@ -523,7 +585,9 @@ module aave_pool::flashloan_logic_tests { mock_underlying_token_factory::balance_of( signer::address_of(flashloan_payer), underlying_token_address ); - assert!(flashloan_payer_underlying_balance == initial_payer_balance, TEST_SUCCESS); + assert!( + flashloan_payer_underlying_balance == initial_payer_balance, TEST_SUCCESS + ); // check intermediate underlying balance for flashloan receiver let flashloan_receiver_underlying_balance = @@ -534,7 +598,7 @@ module aave_pool::flashloan_logic_tests { assert!( flashloan_receiver_underlying_balance == initial_receiver_balance - flashloan_paid_premium, - TEST_SUCCESS, + TEST_SUCCESS ); // check emitted events @@ -542,15 +606,30 @@ module aave_pool::flashloan_logic_tests { assert!(vector::length(&emitted_withdraw_events) == 1, TEST_SUCCESS); } - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, mock_oracle = @aave_mock_oracle, aptos_std = @aptos_std, flashloan_user = @0x042, underlying_tokens_admin = @underlying_tokens)] + #[ + test( + aave_pool = @aave_pool, + aave_rate = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + aptos_std = @aptos_std, + flashloan_user = @0x042, + underlying_tokens_admin = @underlying_tokens + ) + ] /// User takes and repays a single asset flashloan fun complex_flashloan_same_payer_receiver( aave_pool: &signer, + aave_rate: &signer, aave_role_super_admin: &signer, - mock_oracle: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, aptos_std: &signer, flashloan_user: &signer, - underlying_tokens_admin: &signer, + underlying_tokens_admin: &signer ) { // start the timer set_time_has_started_for_testing(aptos_std); @@ -573,15 +652,24 @@ module aave_pool::flashloan_logic_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); + // init a token factory + a_token_factory::test_init_module(aave_pool); + + // init debt token factory + variable_debt_token_factory::test_init_module(aave_pool); + // init underlying tokens mock_underlying_token_factory::test_init_module(aave_pool); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); + // init rate + interest_rate_strategy::test_init_module(aave_rate); + // init input data for creating pool reserves let treasuries: vector
= vector[]; @@ -605,7 +693,7 @@ module aave_pool::flashloan_logic_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -622,7 +710,7 @@ module aave_pool::flashloan_logic_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); // prepare the data for reserve's atokens and variable tokens @@ -636,32 +724,33 @@ module aave_pool::flashloan_logic_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; // create pool reserves pool_configurator::init_reserves( aave_pool, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); // create reserve configurations for (j in 0..num_assets) { - let reserve_config_new = reserve::init(); + let reserve_config_new = reserve_config::init(); let decimals = ( *vector::borrow(&underlying_asset_decimals, (j as u64)) as u256 ); - reserve::set_decimals(&mut reserve_config_new, decimals); - reserve::set_active(&mut reserve_config_new, true); - reserve::set_frozen(&mut reserve_config_new, false); - reserve::set_paused(&mut reserve_config_new, false); - reserve::set_flash_loan_enabled(&mut reserve_config_new, true); + reserve_config::set_decimals(&mut reserve_config_new, decimals); + reserve_config::set_active(&mut reserve_config_new, true); + reserve_config::set_frozen(&mut reserve_config_new, false); + reserve_config::set_paused(&mut reserve_config_new, false); + reserve_config::set_flash_loan_enabled(&mut reserve_config_new, true); test_set_reserve_configuration( *vector::borrow(&underlying_assets, (j as u64)), reserve_config_new ); @@ -685,7 +774,7 @@ module aave_pool::flashloan_logic_tests { signer::address_of(flashloan_user), (get_reserve_id(&reserve_data) as u256), option::some(false), - option::some(true), + option::some(true) ); // ----> mint underlying for the flashloan user @@ -695,7 +784,7 @@ module aave_pool::flashloan_logic_tests { underlying_tokens_admin, mint_receiver_address, 100, - underlying_token_address, + underlying_token_address ); let initial_user_balance = mock_underlying_token_factory::balance_of( @@ -707,7 +796,7 @@ module aave_pool::flashloan_logic_tests { assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some(100), - TEST_SUCCESS, + TEST_SUCCESS ); // ----> flashloan user supplies @@ -719,7 +808,7 @@ module aave_pool::flashloan_logic_tests { underlying_token_address, (supplied_amount as u256), supply_receiver_address, - 0, + 0 ); // > check emitted events @@ -731,25 +820,28 @@ module aave_pool::flashloan_logic_tests { mock_underlying_token_factory::balance_of( mint_receiver_address, underlying_token_address ); - assert!(supplier_balance == initial_user_balance - supplied_amount, TEST_SUCCESS); + assert!( + supplier_balance == initial_user_balance - supplied_amount, + TEST_SUCCESS + ); // > check underlying supply assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some(100), - TEST_SUCCESS, + TEST_SUCCESS ); // ----> flashloan user takes a flashloan let flashloan_amount = supplied_amount / 2; // half of the pool = 50/2 = 25 let flashloan_receipts = - flashloan_logic::flashloan( + flashloan_logic::flash_loan( flashloan_user, signer::address_of(flashloan_user), vector[underlying_token_address], vector[(flashloan_amount as u256)], vector[user_config::get_interest_rate_mode_none()], // interest rate modes signer::address_of(flashloan_user), - 0, // referral code + 0 // referral code ); // check intermediate underlying balance @@ -759,7 +851,7 @@ module aave_pool::flashloan_logic_tests { ); assert!( flashloan_taker_underlying_balance == supplier_balance + flashloan_amount, - TEST_SUCCESS, + TEST_SUCCESS ); // ----> flashloan user repays flashloan + premium @@ -772,8 +864,9 @@ module aave_pool::flashloan_logic_tests { ); let flashloan_paid_premium = 3; // 10% * 25 = 2.5 = 3 assert!( - flashloan_taken_underlying_balance == supplier_balance - flashloan_paid_premium, - TEST_SUCCESS, + flashloan_taken_underlying_balance + == supplier_balance - flashloan_paid_premium, + TEST_SUCCESS ); // check emitted events @@ -781,15 +874,30 @@ module aave_pool::flashloan_logic_tests { assert!(vector::length(&emitted_flashloan_events) == 1, TEST_SUCCESS); } - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, mock_oracle = @aave_mock_oracle, aptos_std = @aptos_std, flashloan_user = @0x042, underlying_tokens_admin = @underlying_tokens)] + #[ + test( + aave_pool = @aave_pool, + aave_rate = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + aptos_std = @aptos_std, + flashloan_user = @0x042, + underlying_tokens_admin = @underlying_tokens + ) + ] /// User takes and repays a single asset flashloan being authorized fun complex_flashloan_same_payer_receiver_authorized( aave_pool: &signer, + aave_rate: &signer, aave_role_super_admin: &signer, - mock_oracle: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, aptos_std: &signer, flashloan_user: &signer, - underlying_tokens_admin: &signer, + underlying_tokens_admin: &signer ) { // start the timer set_time_has_started_for_testing(aptos_std); @@ -817,15 +925,24 @@ module aave_pool::flashloan_logic_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); + // init a token factory + a_token_factory::test_init_module(aave_pool); + + // init debt token factory + variable_debt_token_factory::test_init_module(aave_pool); + // init underlying tokens mock_underlying_token_factory::test_init_module(aave_pool); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); + // init rate + interest_rate_strategy::test_init_module(aave_rate); + // init input data for creating pool reserves let treasuries: vector
= vector[]; @@ -849,7 +966,7 @@ module aave_pool::flashloan_logic_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -866,7 +983,7 @@ module aave_pool::flashloan_logic_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); // prepare the data for reserve's atokens and variable tokens @@ -880,32 +997,33 @@ module aave_pool::flashloan_logic_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; // create pool reserves pool_configurator::init_reserves( aave_pool, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); // create reserve configurations for (j in 0..num_assets) { - let reserve_config_new = reserve::init(); + let reserve_config_new = reserve_config::init(); let decimals = ( *vector::borrow(&underlying_asset_decimals, (j as u64)) as u256 ); - reserve::set_decimals(&mut reserve_config_new, decimals); - reserve::set_active(&mut reserve_config_new, true); - reserve::set_frozen(&mut reserve_config_new, false); - reserve::set_paused(&mut reserve_config_new, false); - reserve::set_flash_loan_enabled(&mut reserve_config_new, true); + reserve_config::set_decimals(&mut reserve_config_new, decimals); + reserve_config::set_active(&mut reserve_config_new, true); + reserve_config::set_frozen(&mut reserve_config_new, false); + reserve_config::set_paused(&mut reserve_config_new, false); + reserve_config::set_flash_loan_enabled(&mut reserve_config_new, true); test_set_reserve_configuration( *vector::borrow(&underlying_assets, (j as u64)), reserve_config_new ); @@ -929,7 +1047,7 @@ module aave_pool::flashloan_logic_tests { signer::address_of(flashloan_user), (get_reserve_id(&reserve_data) as u256), option::some(false), - option::some(true), + option::some(true) ); // ----> mint underlying for the flashloan user @@ -939,7 +1057,7 @@ module aave_pool::flashloan_logic_tests { underlying_tokens_admin, mint_receiver_address, 100, - underlying_token_address, + underlying_token_address ); let initial_user_balance = mock_underlying_token_factory::balance_of( @@ -951,7 +1069,7 @@ module aave_pool::flashloan_logic_tests { assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some(100), - TEST_SUCCESS, + TEST_SUCCESS ); // ----> flashloan user supplies @@ -963,7 +1081,7 @@ module aave_pool::flashloan_logic_tests { underlying_token_address, (supplied_amount as u256), supply_receiver_address, - 0, + 0 ); // > check emitted events @@ -975,25 +1093,28 @@ module aave_pool::flashloan_logic_tests { mock_underlying_token_factory::balance_of( mint_receiver_address, underlying_token_address ); - assert!(supplier_balance == initial_user_balance - supplied_amount, TEST_SUCCESS); + assert!( + supplier_balance == initial_user_balance - supplied_amount, + TEST_SUCCESS + ); // > check underlying supply assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some(100), - TEST_SUCCESS, + TEST_SUCCESS ); // ----> flashloan user takes a flashloan let flashloan_amount = supplied_amount / 2; // half of the pool = 50/2 = 25 let flashloan_receipts = - flashloan_logic::flashloan( + flashloan_logic::flash_loan( flashloan_user, signer::address_of(flashloan_user), vector[underlying_token_address], vector[(flashloan_amount as u256)], vector[user_config::get_interest_rate_mode_none()], // interest rate modes signer::address_of(flashloan_user), - 0, // referral code + 0 // referral code ); // check intermediate underlying balance @@ -1003,7 +1124,7 @@ module aave_pool::flashloan_logic_tests { ); assert!( flashloan_taker_underlying_balance == supplier_balance + flashloan_amount, - TEST_SUCCESS, + TEST_SUCCESS ); // ----> flashloan user repays flashloan + premium @@ -1016,8 +1137,9 @@ module aave_pool::flashloan_logic_tests { ); let flashloan_paid_premium = 0; // because the user is authorized flash borrower assert!( - flashloan_taken_underlying_balance == supplier_balance - flashloan_paid_premium, - TEST_SUCCESS, + flashloan_taken_underlying_balance + == supplier_balance - flashloan_paid_premium, + TEST_SUCCESS ); // check emitted events @@ -1025,16 +1147,32 @@ module aave_pool::flashloan_logic_tests { assert!(vector::length(&emitted_flashloan_events) == 1, TEST_SUCCESS); } - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, mock_oracle = @aave_mock_oracle, aptos_std = @std, flashloan_payer = @0x042, flashloan_receiver = @0x043, underlying_tokens_admin = @underlying_tokens)] + #[ + test( + aave_pool = @aave_pool, + aave_rate = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + aptos_std = @std, + flashloan_payer = @0x042, + flashloan_receiver = @0x043, + underlying_tokens_admin = @underlying_tokens + ) + ] /// User takes a complex flashloan which is received by someone else. Either user or taker then repays the complex flashloan fun complex_flashloan_different_payer_receiver( aave_pool: &signer, + aave_rate: &signer, aave_role_super_admin: &signer, - mock_oracle: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, aptos_std: &signer, flashloan_payer: &signer, flashloan_receiver: &signer, - underlying_tokens_admin: &signer, + underlying_tokens_admin: &signer ) { // start the timer set_time_has_started_for_testing(aptos_std); @@ -1057,15 +1195,24 @@ module aave_pool::flashloan_logic_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); + // init a token factory + a_token_factory::test_init_module(aave_pool); + + // init debt token factory + variable_debt_token_factory::test_init_module(aave_pool); + // init underlying tokens mock_underlying_token_factory::test_init_module(aave_pool); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); + // init rate + interest_rate_strategy::test_init_module(aave_rate); + // init input data for creating pool reserves let treasuries: vector
= vector[]; @@ -1089,7 +1236,7 @@ module aave_pool::flashloan_logic_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -1106,7 +1253,7 @@ module aave_pool::flashloan_logic_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); // prepare the data for reserve's atokens and variable tokens @@ -1120,32 +1267,33 @@ module aave_pool::flashloan_logic_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; // create pool reserves pool_configurator::init_reserves( aave_pool, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); // create reserve configurations for (j in 0..num_assets) { - let reserve_config_new = reserve::init(); + let reserve_config_new = reserve_config::init(); let decimals = ( *vector::borrow(&underlying_asset_decimals, (j as u64)) as u256 ); - reserve::set_decimals(&mut reserve_config_new, decimals); - reserve::set_active(&mut reserve_config_new, true); - reserve::set_frozen(&mut reserve_config_new, false); - reserve::set_paused(&mut reserve_config_new, false); - reserve::set_flash_loan_enabled(&mut reserve_config_new, true); + reserve_config::set_decimals(&mut reserve_config_new, decimals); + reserve_config::set_active(&mut reserve_config_new, true); + reserve_config::set_frozen(&mut reserve_config_new, false); + reserve_config::set_paused(&mut reserve_config_new, false); + reserve_config::set_flash_loan_enabled(&mut reserve_config_new, true); test_set_reserve_configuration( *vector::borrow(&underlying_assets, (j as u64)), reserve_config_new ); @@ -1169,14 +1317,14 @@ module aave_pool::flashloan_logic_tests { signer::address_of(flashloan_payer), (get_reserve_id(&reserve_data) as u256), option::some(false), - option::some(true), + option::some(true) ); create_user_config_for_reserve( signer::address_of(flashloan_receiver), (get_reserve_id(&reserve_data) as u256), option::some(false), - option::some(true), + option::some(true) ); // ----> mint underlying for flashloan payer and receiver @@ -1184,13 +1332,14 @@ module aave_pool::flashloan_logic_tests { let mint_amount: u64 = 100; let users = vector[ signer::address_of(flashloan_payer), - signer::address_of(flashloan_receiver)]; + signer::address_of(flashloan_receiver) + ]; for (i in 0..vector::length(&users)) { mock_underlying_token_factory::mint( underlying_tokens_admin, *vector::borrow(&users, i), mint_amount, - underlying_token_address, + underlying_token_address ); let initial_user_balance = mock_underlying_token_factory::balance_of( @@ -1209,7 +1358,7 @@ module aave_pool::flashloan_logic_tests { underlying_token_address, (supplied_amount as u256), supply_receiver_address, - 0, + 0 ); // > check flashloan payer balance of underlying @@ -1217,12 +1366,15 @@ module aave_pool::flashloan_logic_tests { mock_underlying_token_factory::balance_of( signer::address_of(flashloan_payer), underlying_token_address ); - assert!(initial_payer_balance == mint_amount - supplied_amount, TEST_SUCCESS); + assert!( + initial_payer_balance == mint_amount - supplied_amount, + TEST_SUCCESS + ); // > check flashloan payer a_token balance after supply let a_token_address = a_token_factory::token_address( signer::address_of(aave_pool), - *vector::borrow(&atokens_symbols, 0), + *vector::borrow(&atokens_symbols, 0) ); let supplier_a_token_balance = a_token_factory::scaled_balance_of( @@ -1231,7 +1383,7 @@ module aave_pool::flashloan_logic_tests { let supplied_amount_scaled = wad_ray_math::ray_div( (supplied_amount as u256), - (get_reserve_liquidity_index(&reserve_data) as u256), + (get_reserve_liquidity_index(&reserve_data) as u256) ); assert!(supplier_a_token_balance == supplied_amount_scaled, TEST_SUCCESS); @@ -1243,14 +1395,14 @@ module aave_pool::flashloan_logic_tests { // ----> flashloan payer takes a flashloan but receiver is different let flashloan_amount = supplied_amount / 2; // half of the pool = 50/2 = 25 let flashloan_receipts = - flashloan_logic::flashloan( + flashloan_logic::flash_loan( flashloan_payer, signer::address_of(flashloan_receiver), vector[underlying_token_address], vector[(flashloan_amount as u256)], vector[user_config::get_interest_rate_mode_none()], // interest rate modes signer::address_of(flashloan_payer), // on behalf of - 0, // referal code + 0 // referral code ); // check intermediate underlying balance for flashloan payer @@ -1258,7 +1410,9 @@ module aave_pool::flashloan_logic_tests { mock_underlying_token_factory::balance_of( signer::address_of(flashloan_payer), underlying_token_address ); - assert!(flashloan_payer_underlying_balance == initial_payer_balance, TEST_SUCCESS); // same balance as before + assert!( + flashloan_payer_underlying_balance == initial_payer_balance, TEST_SUCCESS + ); // same balance as before // check intermediate underlying balance for flashloan receiver let flashloan_receiver_underlying_balance = @@ -1268,7 +1422,7 @@ module aave_pool::flashloan_logic_tests { assert!( flashloan_receiver_underlying_balance == initial_receiver_balance + flashloan_amount, - TEST_SUCCESS, + TEST_SUCCESS ); // increased balance due to flashloan // ----> receiver repays flashloan + premium @@ -1279,7 +1433,9 @@ module aave_pool::flashloan_logic_tests { mock_underlying_token_factory::balance_of( signer::address_of(flashloan_payer), underlying_token_address ); - assert!(flashloan_payer_underlying_balance == initial_payer_balance, TEST_SUCCESS); + assert!( + flashloan_payer_underlying_balance == initial_payer_balance, TEST_SUCCESS + ); // check intermediate underlying balance for flashloan receiver let flashloan_receiver_underlying_balance = @@ -1290,7 +1446,7 @@ module aave_pool::flashloan_logic_tests { assert!( flashloan_receiver_underlying_balance == initial_receiver_balance - flashloan_paid_premium, - TEST_SUCCESS, + TEST_SUCCESS ); // check emitted events diff --git a/aave-core/tests/aave-pool/generic_logic_tests.move b/aave-core/tests/aave-logic/generic_logic_tests.move similarity index 97% rename from aave-core/tests/aave-pool/generic_logic_tests.move rename to aave-core/tests/aave-logic/generic_logic_tests.move index fa35b2f..e0b81d9 100644 --- a/aave-core/tests/aave-pool/generic_logic_tests.move +++ b/aave-core/tests/aave-logic/generic_logic_tests.move @@ -6,9 +6,9 @@ module aave_pool::generic_logic_tests { const TEST_SUCCESS: u64 = 1; const TEST_FAILED: u64 = 2; - #[test(_pool = @aave_pool, aave_std = @std, aptos_framework = @0x1,)] + #[test(_pool = @aave_pool, aave_std = @std, aptos_framework = @0x1)] fun test_generic_logic( - _pool: &signer, aave_std: &signer, aptos_framework: &signer, + _pool: &signer, aave_std: &signer, aptos_framework: &signer ) { // start the timer set_time_has_started_for_testing(aptos_framework); diff --git a/aave-core/tests/aave-pool/isolation_mode_logic_tests.move b/aave-core/tests/aave-logic/isolation_mode_logic_tests.move similarity index 97% rename from aave-core/tests/aave-pool/isolation_mode_logic_tests.move rename to aave-core/tests/aave-logic/isolation_mode_logic_tests.move index ea12712..81e6fd4 100644 --- a/aave-core/tests/aave-pool/isolation_mode_logic_tests.move +++ b/aave-core/tests/aave-logic/isolation_mode_logic_tests.move @@ -6,9 +6,9 @@ module aave_pool::isolation_mode_logic_tests { const TEST_SUCCESS: u64 = 1; const TEST_FAILED: u64 = 2; - #[test(_pool = @aave_pool, aave_std = @std, aptos_framework = @0x1,)] + #[test(_pool = @aave_pool, aave_std = @std, aptos_framework = @0x1)] fun test_isolation_mode_logic( - _pool: &signer, aave_std: &signer, aptos_framework: &signer, + _pool: &signer, aave_std: &signer, aptos_framework: &signer ) { // start the timer set_time_has_started_for_testing(aptos_framework); diff --git a/aave-core/tests/aave-supply-borrow/liquidation_logic_tests.move b/aave-core/tests/aave-logic/liquidation_logic_tests.move similarity index 95% rename from aave-core/tests/aave-supply-borrow/liquidation_logic_tests.move rename to aave-core/tests/aave-logic/liquidation_logic_tests.move index ec9efd0..0004391 100644 --- a/aave-core/tests/aave-supply-borrow/liquidation_logic_tests.move +++ b/aave-core/tests/aave-logic/liquidation_logic_tests.move @@ -6,9 +6,9 @@ module aave_pool::liquidation_logic_tests { const TEST_SUCCESS: u64 = 1; const TEST_FAILED: u64 = 2; - #[test(signer_account = @aave_pool, aave_std = @std, aptos_framework = @0x1,)] + #[test(signer_account = @aave_pool, aave_std = @std, aptos_framework = @0x1)] fun test_liquidation_logic( - signer_account: &signer, aave_std: &signer, aptos_framework: &signer, + signer_account: &signer, aave_std: &signer, aptos_framework: &signer ) { // start the timer set_time_has_started_for_testing(aptos_framework); diff --git a/aave-core/tests/aave-supply-borrow/supply_logic_tests.move b/aave-core/tests/aave-logic/supply_logic_tests.move similarity index 77% rename from aave-core/tests/aave-supply-borrow/supply_logic_tests.move rename to aave-core/tests/aave-logic/supply_logic_tests.move index b48efea..e59a43c 100644 --- a/aave-core/tests/aave-supply-borrow/supply_logic_tests.move +++ b/aave-core/tests/aave-logic/supply_logic_tests.move @@ -3,46 +3,62 @@ module aave_pool::supply_logic_tests { use std::features::change_feature_flags_for_testing; use std::option::Self; use std::signer; - use std::string::{utf8, String}; + use std::string::{String, utf8}; use std::vector; use aptos_std::string_utils; use aptos_framework::account; use aptos_framework::event::emitted_events; use aptos_framework::timestamp::set_time_has_started_for_testing; - use aave_acl::acl_manage::{Self}; - use aave_config::reserve; + use aave_acl::acl_manage::Self; + use aave_config::reserve_config; use aave_math::wad_ray_math; - use aave_mock_oracle::oracle; + use aave_rate::default_reserve_interest_rate_strategy::Self; + use aave_rate::interest_rate_strategy; + use aave_pool::a_token_factory::Self; use aave_pool::collector; - use aave_pool::pool_configurator; + use aave_pool::emode_logic::{Self, configure_emode_category}; + use aave_pool::mock_underlying_token_factory::Self; use aave_pool::pool::{ - get_reserve_id, get_reserve_data, - test_set_reserve_configuration, - get_reserve_liquidity_index + get_reserve_id, + get_reserve_liquidity_index, + test_set_reserve_configuration }; - use aave_pool::a_token_factory::Self; - use aave_pool::default_reserve_interest_rate_strategy::Self; - use aave_pool::emode_logic::{Self, configure_emode_category}; + use aave_pool::pool_configurator; use aave_pool::pool_tests::create_user_config_for_reserve; use aave_pool::supply_logic::Self; use aave_pool::token_base::Self; - use aave_pool::mock_underlying_token_factory::Self; + use aave_pool::variable_debt_token_factory; const TEST_SUCCESS: u64 = 1; const TEST_FAILED: u64 = 2; - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, mock_oracle = @aave_mock_oracle, aptos_std = @aptos_std, supply_user = @0x042, underlying_tokens_admin = @underlying_tokens)] + #[ + test( + aave_pool = @aave_pool, + aave_rate = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + aptos_std = @aptos_std, + supply_user = @0x042, + underlying_tokens_admin = @underlying_tokens + ) + ] /// Reserve allows borrowing and being used as collateral. /// User config allows only borrowing for the reserve. /// User supplies and withdraws parts of the supplied amount fun test_supply_partial_withdraw( aave_pool: &signer, + aave_rate: &signer, aave_role_super_admin: &signer, - mock_oracle: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, aptos_std: &signer, supply_user: &signer, - underlying_tokens_admin: &signer, + underlying_tokens_admin: &signer ) { // start the timer set_time_has_started_for_testing(aptos_std); @@ -65,15 +81,24 @@ module aave_pool::supply_logic_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); + // init a token factory + a_token_factory::test_init_module(aave_pool); + + // init debt token factory + variable_debt_token_factory::test_init_module(aave_pool); + // init underlying tokens mock_underlying_token_factory::test_init_module(aave_pool); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); + // init rate + interest_rate_strategy::test_init_module(aave_rate); + // init input data for creating pool reserves let treasuries: vector
= vector[]; @@ -97,7 +122,7 @@ module aave_pool::supply_logic_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -114,7 +139,7 @@ module aave_pool::supply_logic_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); // prepare the data for reserve's atokens and variable tokens @@ -128,37 +153,38 @@ module aave_pool::supply_logic_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; // create pool reserves pool_configurator::init_reserves( aave_pool, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); // create reserve configurations for (j in 0..num_assets) { - let reserve_config_new = reserve::init(); + let reserve_config_new = reserve_config::init(); let decimals = ( *vector::borrow(&underlying_asset_decimals, (j as u64)) as u256 ); - reserve::set_decimals(&mut reserve_config_new, decimals); - reserve::set_active(&mut reserve_config_new, true); - reserve::set_frozen(&mut reserve_config_new, false); - reserve::set_paused(&mut reserve_config_new, false); - reserve::set_flash_loan_enabled(&mut reserve_config_new, false); // NOTE: disable flashloan enabled - reserve::set_ltv(&mut reserve_config_new, 5000); // NOTE: set ltv - reserve::set_debt_ceiling(&mut reserve_config_new, 0); // NOTE: set no debt ceiling - reserve::set_borrowable_in_isolation(&mut reserve_config_new, false); // NOTE: set no borrowable in isolation - reserve::set_siloed_borrowing(&mut reserve_config_new, false); // NOTE: set no sillowed borrowing - reserve::set_borrowing_enabled(&mut reserve_config_new, true); // NOTE: set borrowing enabled + reserve_config::set_decimals(&mut reserve_config_new, decimals); + reserve_config::set_active(&mut reserve_config_new, true); + reserve_config::set_frozen(&mut reserve_config_new, false); + reserve_config::set_paused(&mut reserve_config_new, false); + reserve_config::set_flash_loan_enabled(&mut reserve_config_new, false); // NOTE: disable flashloan enabled + reserve_config::set_ltv(&mut reserve_config_new, 5000); // NOTE: set ltv + reserve_config::set_debt_ceiling(&mut reserve_config_new, 0); // NOTE: set no debt ceiling + reserve_config::set_borrowable_in_isolation(&mut reserve_config_new, false); // NOTE: set no borrowable in isolation + reserve_config::set_siloed_borrowing(&mut reserve_config_new, false); // NOTE: set no sillowed borrowing + reserve_config::set_borrowing_enabled(&mut reserve_config_new, true); // NOTE: set borrowing enabled test_set_reserve_configuration( *vector::borrow(&underlying_assets, (j as u64)), reserve_config_new ); @@ -175,7 +201,7 @@ module aave_pool::supply_logic_tests { signer::address_of(supply_user), (get_reserve_id(&reserve_data) as u256), option::some(false), - option::some(true), + option::some(true) ); // =============== MINT UNDERLYING FOR USER ================= // @@ -185,7 +211,7 @@ module aave_pool::supply_logic_tests { underlying_tokens_admin, mint_receiver_address, 100, - underlying_token_address, + underlying_token_address ); let initial_user_balance = mock_underlying_token_factory::balance_of( @@ -197,7 +223,7 @@ module aave_pool::supply_logic_tests { assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some(100), - TEST_SUCCESS, + TEST_SUCCESS ); // =============== USER SUPPLY ================= // @@ -209,7 +235,7 @@ module aave_pool::supply_logic_tests { underlying_token_address, (supplied_amount as u256), supply_receiver_address, - 0, + 0 ); // > check emitted events @@ -220,18 +246,21 @@ module aave_pool::supply_logic_tests { mock_underlying_token_factory::balance_of( mint_receiver_address, underlying_token_address ); - assert!(supplier_balance == initial_user_balance - supplied_amount, TEST_SUCCESS); + assert!( + supplier_balance == initial_user_balance - supplied_amount, + TEST_SUCCESS + ); // > check underlying supply assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some(100), - TEST_SUCCESS, + TEST_SUCCESS ); // > check a_token underlying balance let a_token_address = a_token_factory::token_address( signer::address_of(aave_pool), - *vector::borrow(&atokens_symbols, 0), + *vector::borrow(&atokens_symbols, 0) ); let atoken_acocunt_address = a_token_factory::get_token_account_address(a_token_address); @@ -244,7 +273,7 @@ module aave_pool::supply_logic_tests { let supplied_amount_scaled = wad_ray_math::ray_div( (supplied_amount as u256), - (get_reserve_liquidity_index(&reserve_data) as u256), + (get_reserve_liquidity_index(&reserve_data) as u256) ); let supplier_a_token_balance = a_token_factory::scaled_balance_of( @@ -259,7 +288,7 @@ module aave_pool::supply_logic_tests { supply_user, underlying_token_address, (amount_to_withdraw as u256), - supply_receiver_address, + supply_receiver_address ); // > check a_token balance of underlying @@ -269,19 +298,19 @@ module aave_pool::supply_logic_tests { ); assert!( atoken_acocunt_balance == supplied_amount - amount_to_withdraw, - TEST_SUCCESS, + TEST_SUCCESS ); // > check underlying supply assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some(100), - TEST_SUCCESS, + TEST_SUCCESS ); // > check user a_token balance after withdrawal let supplied_amount_scaled = wad_ray_math::ray_div( (supplied_amount - amount_to_withdraw as u256), - (get_reserve_liquidity_index(&reserve_data) as u256), + (get_reserve_liquidity_index(&reserve_data) as u256) ); let supplier_a_token_balance = a_token_factory::scaled_balance_of( @@ -296,7 +325,7 @@ module aave_pool::supply_logic_tests { assert!( supplier_underlying_balance_after_withdraw == initial_user_balance - supplied_amount + amount_to_withdraw, - TEST_SUCCESS, + TEST_SUCCESS ); // > check emitted events let emitted_withdraw_events = emitted_events(); @@ -305,21 +334,36 @@ module aave_pool::supply_logic_tests { emitted_events(); assert!( vector::length(&emitted_reserve_collecteral_disabled_events) == 0, - TEST_SUCCESS, + TEST_SUCCESS ); } - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, mock_oracle = @aave_mock_oracle, aptos_std = @aptos_std, supply_user = @0x042, underlying_tokens_admin = @underlying_tokens)] + #[ + test( + aave_pool = @aave_pool, + aave_rate = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + aptos_std = @aptos_std, + supply_user = @0x042, + underlying_tokens_admin = @underlying_tokens + ) + ] /// Reserve allows borrowing and being used as collateral. /// User config allows borrowing and collateral. /// User supplies and withdraws the entire amount fun test_supply_full_collateral_withdraw( aave_pool: &signer, + aave_rate: &signer, aave_role_super_admin: &signer, - mock_oracle: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, aptos_std: &signer, supply_user: &signer, - underlying_tokens_admin: &signer, + underlying_tokens_admin: &signer ) { // start the timer set_time_has_started_for_testing(aptos_std); @@ -342,15 +386,24 @@ module aave_pool::supply_logic_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); + // init a token factory + a_token_factory::test_init_module(aave_pool); + + // init debt token factory + variable_debt_token_factory::test_init_module(aave_pool); + // init underlying tokens mock_underlying_token_factory::test_init_module(aave_pool); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); + // init rate + interest_rate_strategy::test_init_module(aave_rate); + // init input data for creating pool reserves let treasuries: vector
= vector[]; @@ -360,7 +413,7 @@ module aave_pool::supply_logic_tests { let ltv: u16 = 100; let liquidation_threshold: u16 = 200; let liquidation_bonus: u16 = 300; - let price_source: address = signer::address_of(mock_oracle); + let price_source: address = signer::address_of(aave_oracle); let label = utf8(b"MODE1"); configure_emode_category( emode_cat_id, @@ -368,7 +421,7 @@ module aave_pool::supply_logic_tests { liquidation_threshold, liquidation_bonus, price_source, - label, + label ); // prepare pool reserves @@ -391,7 +444,7 @@ module aave_pool::supply_logic_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -408,7 +461,7 @@ module aave_pool::supply_logic_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); // prepare the data for reserve's atokens and variable tokens @@ -422,37 +475,38 @@ module aave_pool::supply_logic_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; // create pool reserves pool_configurator::init_reserves( aave_pool, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); // create reserve configurations for (j in 0..num_assets) { - let reserve_config_new = reserve::init(); + let reserve_config_new = reserve_config::init(); let decimals = ( *vector::borrow(&underlying_asset_decimals, (j as u64)) as u256 ); - reserve::set_decimals(&mut reserve_config_new, decimals); - reserve::set_active(&mut reserve_config_new, true); - reserve::set_frozen(&mut reserve_config_new, false); - reserve::set_paused(&mut reserve_config_new, false); - reserve::set_flash_loan_enabled(&mut reserve_config_new, false); // NOTE: disable flashloan enabled - reserve::set_ltv(&mut reserve_config_new, 5000); // NOTE: set ltv - reserve::set_debt_ceiling(&mut reserve_config_new, 0); // NOTE: set no debt ceiling - reserve::set_borrowable_in_isolation(&mut reserve_config_new, false); // NOTE: set no borrowable in isolation - reserve::set_siloed_borrowing(&mut reserve_config_new, false); // NOTE: set no sillowed borrowing - reserve::set_borrowing_enabled(&mut reserve_config_new, true); // NOTE: set borrowing enabled + reserve_config::set_decimals(&mut reserve_config_new, decimals); + reserve_config::set_active(&mut reserve_config_new, true); + reserve_config::set_frozen(&mut reserve_config_new, false); + reserve_config::set_paused(&mut reserve_config_new, false); + reserve_config::set_flash_loan_enabled(&mut reserve_config_new, false); // NOTE: disable flashloan enabled + reserve_config::set_ltv(&mut reserve_config_new, 5000); // NOTE: set ltv + reserve_config::set_debt_ceiling(&mut reserve_config_new, 0); // NOTE: set no debt ceiling + reserve_config::set_borrowable_in_isolation(&mut reserve_config_new, false); // NOTE: set no borrowable in isolation + reserve_config::set_siloed_borrowing(&mut reserve_config_new, false); // NOTE: set no sillowed borrowing + reserve_config::set_borrowing_enabled(&mut reserve_config_new, true); // NOTE: set borrowing enabled test_set_reserve_configuration( *vector::borrow(&underlying_assets, (j as u64)), reserve_config_new ); @@ -461,6 +515,13 @@ module aave_pool::supply_logic_tests { // get one underlying asset data let underlying_token_address = *vector::borrow(&underlying_assets, 0); + // register asset with oracle feed_id + aave_oracle::oracle::set_asset_feed_id( + aave_pool, + underlying_token_address, + aave_oracle::oracle_tests::get_test_feed_id() + ); + // set underlying emode category pool_configurator::set_asset_emode_category( aave_pool, underlying_token_address, emode_cat_id @@ -474,7 +535,7 @@ module aave_pool::supply_logic_tests { signer::address_of(supply_user), (get_reserve_id(&reserve_data) as u256), option::some(true), - option::some(true), + option::some(true) ); // =============== MINT UNDERLYING FOR USER ================= // @@ -487,7 +548,7 @@ module aave_pool::supply_logic_tests { underlying_tokens_admin, mint_receiver_address, 100, - underlying_token_address, + underlying_token_address ); let initial_user_balance = mock_underlying_token_factory::balance_of( @@ -495,11 +556,11 @@ module aave_pool::supply_logic_tests { ); // assert user balance of underlying assert!(initial_user_balance == 100, TEST_SUCCESS); - // asser underlying supply + // assert underlying supply assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some(100), - TEST_SUCCESS, + TEST_SUCCESS ); // =============== USER SUPPLY ================= // @@ -511,7 +572,7 @@ module aave_pool::supply_logic_tests { underlying_token_address, (supplied_amount as u256), supply_receiver_address, - 0, + 0 ); // > check emitted events @@ -522,18 +583,21 @@ module aave_pool::supply_logic_tests { mock_underlying_token_factory::balance_of( mint_receiver_address, underlying_token_address ); - assert!(supplier_balance == initial_user_balance - supplied_amount, TEST_SUCCESS); + assert!( + supplier_balance == initial_user_balance - supplied_amount, + TEST_SUCCESS + ); // > check underlying supply assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some(100), - TEST_SUCCESS, + TEST_SUCCESS ); // > check underlying balance of atoken let a_token_address = a_token_factory::token_address( signer::address_of(aave_pool), - *vector::borrow(&atokens_symbols, 0), + *vector::borrow(&atokens_symbols, 0) ); let atoken_account_address = a_token_factory::get_token_account_address(a_token_address); @@ -546,7 +610,7 @@ module aave_pool::supply_logic_tests { let supplied_amount_scaled = wad_ray_math::ray_div( (supplied_amount as u256), - (get_reserve_liquidity_index(&reserve_data) as u256), + (get_reserve_liquidity_index(&reserve_data) as u256) ); let supplier_a_token_balance = a_token_factory::scaled_balance_of( @@ -561,7 +625,7 @@ module aave_pool::supply_logic_tests { supply_user, underlying_token_address, (amount_to_withdraw as u256), - supply_receiver_address, + supply_receiver_address ); // > check underlying balance of a_token account @@ -574,7 +638,7 @@ module aave_pool::supply_logic_tests { assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some(100), - TEST_SUCCESS, + TEST_SUCCESS ); // > check user a_token balance after withdrawal let supplier_a_token_balance = @@ -590,7 +654,7 @@ module aave_pool::supply_logic_tests { assert!( supplier_underlying_balance_after_withdraw == initial_user_balance - supplied_amount + amount_to_withdraw, - TEST_SUCCESS, + TEST_SUCCESS ); // > check emitted events let emitted_withdraw_events = emitted_events(); @@ -599,22 +663,37 @@ module aave_pool::supply_logic_tests { emitted_events(); assert!( vector::length(&emitted_reserve_collecteral_disabled_events) == 1, - TEST_SUCCESS, + TEST_SUCCESS ); } - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, mock_oracle = @aave_mock_oracle, aptos_std = @aptos_std, supply_user = @0x042, underlying_tokens_admin = @underlying_tokens)] + #[ + test( + aave_pool = @aave_pool, + aave_rate = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + aptos_std = @aptos_std, + supply_user = @0x042, + underlying_tokens_admin = @underlying_tokens + ) + ] /// Reserve allows borrowing and being used as collateral. /// User config allows borrowing and collateral. /// User supplies and withdraws the entire amount /// with ltv and no debt ceiling, and not using as collateral already fun test_supply_use_as_collateral( aave_pool: &signer, + aave_rate: &signer, aave_role_super_admin: &signer, - mock_oracle: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, aptos_std: &signer, supply_user: &signer, - underlying_tokens_admin: &signer, + underlying_tokens_admin: &signer ) { // start the timer set_time_has_started_for_testing(aptos_std); @@ -637,15 +716,24 @@ module aave_pool::supply_logic_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); + // init a token factory + a_token_factory::test_init_module(aave_pool); + + // init debt token factory + variable_debt_token_factory::test_init_module(aave_pool); + // init underlying tokens mock_underlying_token_factory::test_init_module(aave_pool); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); + // init rate + interest_rate_strategy::test_init_module(aave_rate); + // init input data for creating pool reserves let treasuries: vector
= vector[]; @@ -655,7 +743,7 @@ module aave_pool::supply_logic_tests { let ltv: u16 = 100; let liquidation_threshold: u16 = 200; let liquidation_bonus: u16 = 300; - let price_source: address = signer::address_of(mock_oracle); + let price_source: address = signer::address_of(aave_oracle); let label = utf8(b"MODE1"); configure_emode_category( emode_cat_id, @@ -663,7 +751,7 @@ module aave_pool::supply_logic_tests { liquidation_threshold, liquidation_bonus, price_source, - label, + label ); // prepare pool reserves @@ -686,7 +774,7 @@ module aave_pool::supply_logic_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -703,7 +791,7 @@ module aave_pool::supply_logic_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); // prepare the data for reserve's atokens and variable tokens @@ -717,37 +805,38 @@ module aave_pool::supply_logic_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; // create pool reserves pool_configurator::init_reserves( aave_pool, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); // create reserve configurations for (j in 0..num_assets) { - let reserve_config_new = reserve::init(); + let reserve_config_new = reserve_config::init(); let decimals = ( *vector::borrow(&underlying_asset_decimals, (j as u64)) as u256 ); - reserve::set_decimals(&mut reserve_config_new, decimals); - reserve::set_active(&mut reserve_config_new, true); - reserve::set_frozen(&mut reserve_config_new, false); - reserve::set_paused(&mut reserve_config_new, false); - reserve::set_flash_loan_enabled(&mut reserve_config_new, false); // NOTE: disable flashloan enabled - reserve::set_ltv(&mut reserve_config_new, 5000); // NOTE: set ltv - reserve::set_debt_ceiling(&mut reserve_config_new, 0); // NOTE: set no debt ceiling - reserve::set_borrowable_in_isolation(&mut reserve_config_new, false); // NOTE: set no borrowable in isolation - reserve::set_siloed_borrowing(&mut reserve_config_new, false); // NOTE: set no sillowed borrowing - reserve::set_borrowing_enabled(&mut reserve_config_new, true); // NOTE: set borrowing enabled + reserve_config::set_decimals(&mut reserve_config_new, decimals); + reserve_config::set_active(&mut reserve_config_new, true); + reserve_config::set_frozen(&mut reserve_config_new, false); + reserve_config::set_paused(&mut reserve_config_new, false); + reserve_config::set_flash_loan_enabled(&mut reserve_config_new, false); // NOTE: disable flashloan enabled + reserve_config::set_ltv(&mut reserve_config_new, 5000); // NOTE: set ltv + reserve_config::set_debt_ceiling(&mut reserve_config_new, 0); // NOTE: set no debt ceiling + reserve_config::set_borrowable_in_isolation(&mut reserve_config_new, false); // NOTE: set no borrowable in isolation + reserve_config::set_siloed_borrowing(&mut reserve_config_new, false); // NOTE: set no sillowed borrowing + reserve_config::set_borrowing_enabled(&mut reserve_config_new, true); // NOTE: set borrowing enabled test_set_reserve_configuration( *vector::borrow(&underlying_assets, (j as u64)), reserve_config_new ); @@ -769,7 +858,7 @@ module aave_pool::supply_logic_tests { signer::address_of(supply_user), (get_reserve_id(&reserve_data) as u256), option::some(true), - option::some(false), // NOTE: not using any as collateral already + option::some(false) // NOTE: not using any as collateral already ); // =============== MINT UNDERLYING FOR USER ================= // @@ -779,7 +868,7 @@ module aave_pool::supply_logic_tests { underlying_tokens_admin, mint_receiver_address, 100, - underlying_token_address, + underlying_token_address ); let initial_user_balance = mock_underlying_token_factory::balance_of( @@ -787,11 +876,11 @@ module aave_pool::supply_logic_tests { ); // assert user balance of underlying assert!(initial_user_balance == 100, TEST_SUCCESS); - // asser underlying supply + // assert underlying supply assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some(100), - TEST_SUCCESS, + TEST_SUCCESS ); // =============== USER SUPPLY ================= // @@ -803,7 +892,7 @@ module aave_pool::supply_logic_tests { underlying_token_address, (supplied_amount as u256), supply_receiver_address, - 0, + 0 ); // > check emitted events @@ -812,25 +901,29 @@ module aave_pool::supply_logic_tests { let emitted_reserve_used_as_collateral_events = emitted_events(); assert!( - vector::length(&emitted_reserve_used_as_collateral_events) == 1, TEST_SUCCESS + vector::length(&emitted_reserve_used_as_collateral_events) == 1, + TEST_SUCCESS ); // > check supplier balance of underlying let supplier_balance = mock_underlying_token_factory::balance_of( mint_receiver_address, underlying_token_address ); - assert!(supplier_balance == initial_user_balance - supplied_amount, TEST_SUCCESS); + assert!( + supplier_balance == initial_user_balance - supplied_amount, + TEST_SUCCESS + ); // > check underlying supply assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some(100), - TEST_SUCCESS, + TEST_SUCCESS ); // > check a_token balance of underlying let a_token_address = a_token_factory::token_address( signer::address_of(aave_pool), - *vector::borrow(&atokens_symbols, 0), + *vector::borrow(&atokens_symbols, 0) ); let atoken_account_address = a_token_factory::get_token_account_address(a_token_address); @@ -843,7 +936,7 @@ module aave_pool::supply_logic_tests { let supplied_amount_scaled = wad_ray_math::ray_div( (supplied_amount as u256), - (get_reserve_liquidity_index(&reserve_data) as u256), + (get_reserve_liquidity_index(&reserve_data) as u256) ); let supplier_a_token_balance = a_token_factory::scaled_balance_of( diff --git a/aave-core/tests/aave-supply-borrow/user_logic_tests.move b/aave-core/tests/aave-logic/user_logic_tests.move similarity index 94% rename from aave-core/tests/aave-supply-borrow/user_logic_tests.move rename to aave-core/tests/aave-logic/user_logic_tests.move index 87695f6..52d16c0 100644 --- a/aave-core/tests/aave-supply-borrow/user_logic_tests.move +++ b/aave-core/tests/aave-logic/user_logic_tests.move @@ -6,9 +6,9 @@ module aave_pool::user_logic_tests { const TEST_SUCCESS: u64 = 1; const TEST_FAILED: u64 = 2; - #[test(_signer_account = @aave_pool, aave_std = @std, aptos_framework = @0x1,)] + #[test(_signer_account = @aave_pool, aave_std = @std, aptos_framework = @0x1)] fun test_user_logic( - _signer_account: &signer, aave_std: &signer, aptos_framework: &signer, + _signer_account: &signer, aave_std: &signer, aptos_framework: &signer ) { // start the timer set_time_has_started_for_testing(aptos_framework); diff --git a/aave-core/tests/aave-periphery/coin_migrator_tests.move b/aave-core/tests/aave-periphery/coin_migrator_tests.move new file mode 100644 index 0000000..0802567 --- /dev/null +++ b/aave-core/tests/aave-periphery/coin_migrator_tests.move @@ -0,0 +1,295 @@ +#[test_only] +module aave_pool::coin_migrator_tests { + use std::signer; + use std::option; + use std::string::{Self, String}; + use aptos_framework::account::{Self}; + use aptos_framework::coin::{Self}; + use aptos_framework::fungible_asset::{Self, Metadata}; + use aptos_framework::aggregator_factory::initialize_aggregator_factory_for_test; + use aptos_framework::object; + use aptos_framework::primary_fungible_store; + use aave_pool::coin_migrator::Self; + + const TEST_SUCCESS: u64 = 1; + const TEST_FAILED: u64 = 2; + + struct GenericAptosCoin {} + + struct GenericAptosCoinRefs has key { + burn_ref: coin::BurnCapability, + freeze_ref: coin::FreezeCapability, + mint_ref: coin::MintCapability + } + + public fun initialize_aptos_coin( + framework: &signer, + coin_creator: &signer, + decimals: u8, + monitor_supply: bool, + coin_name: String, + coin_symbol: String + ) { + initialize_aggregator_factory_for_test(framework); + + let (burn_ref, freeze_ref, mint_ref) = + coin::initialize( + coin_creator, + coin_name, + coin_symbol, + decimals, + monitor_supply + ); + move_to( + coin_creator, + GenericAptosCoinRefs { burn_ref, freeze_ref, mint_ref } + ); + } + + inline fun get_coin_refs(account: &signer): &GenericAptosCoinRefs { + borrow_global(signer::address_of(account)) + } + + #[ + test( + framework = @aptos_framework, + aave_pool = @aave_pool, + alice = @0x123, + bob = @0x234 + ) + ] + fun test_coin_fa_conversion( + framework: &signer, + aave_pool: &signer, + alice: &signer, + bob: &signer + ) acquires GenericAptosCoinRefs { + // init a coin conversion map + coin::create_coin_conversion_map(framework); + + // create test accounts + account::create_account_for_test(signer::address_of(alice)); + account::create_account_for_test(signer::address_of(bob)); + + // initialize old-style aptos coin + let coin_name = string::utf8(b"Generic Coin"); + let coin_symbol = string::utf8(b"GCC"); + let coin_decimals = 2; + + initialize_aptos_coin( + framework, + aave_pool, + coin_decimals, + true, + coin_name, + coin_symbol + ); + + // register the alice and bob + coin::register(alice); + coin::register(bob); + + // mint some coins + let alice_init_balance = 100; + let coins_minted = + coin::mint( + alice_init_balance, &get_coin_refs(aave_pool).mint_ref + ); + + // deposit to alice + coin::deposit(signer::address_of(alice), coins_minted); + + // now alice withdraws + let withdrawn_amount = 10; + let coin_to_wrap = coin::withdraw(alice, withdrawn_amount); + assert!(coin::value(&coin_to_wrap) == withdrawn_amount, TEST_SUCCESS); + // assert Alice balance: before we have converted the coins to fa, the coins balance is correctly displayed + assert!( + coin::balance(signer::address_of(alice)) + == alice_init_balance - withdrawn_amount, + TEST_SUCCESS + ); + + // ...and converts the coins into a fa + let wrapped_fa = coin::coin_to_fungible_asset(coin_to_wrap); + assert!(fungible_asset::amount(&wrapped_fa) == withdrawn_amount, TEST_SUCCESS); + + // get the metadata needed for the new fa, do assertions + let wrapped_fa_meta = + option::destroy_some(coin::paired_metadata()); + let wrapped_fa_address = object::object_address(&wrapped_fa_meta); + let wrapped_fa_meta2 = fungible_asset::metadata_from_asset(&wrapped_fa); + assert!(wrapped_fa_meta == wrapped_fa_meta2, TEST_SUCCESS); + let fa_supply = fungible_asset::supply(wrapped_fa_meta); + let fa_decimals = fungible_asset::decimals(wrapped_fa_meta); + let fa_symbol = fungible_asset::symbol(wrapped_fa_meta); + let fa_name = fungible_asset::name(wrapped_fa_meta); + let fa_balance = fungible_asset::balance(wrapped_fa_meta); + assert!(fa_supply == option::some((withdrawn_amount as u128)), TEST_SUCCESS); + assert!(fa_decimals == coin_decimals, TEST_SUCCESS); + assert!(fa_symbol == coin_symbol, TEST_SUCCESS); + assert!(fa_name == coin_name, TEST_SUCCESS); + assert!(fa_balance == 0, TEST_SUCCESS); + + // get data for alice and bob wallet for the FungibleAsset + let alice_wallet = + primary_fungible_store::ensure_primary_store_exists( + signer::address_of(alice), wrapped_fa_meta + ); + let bob_wallet = + primary_fungible_store::ensure_primary_store_exists( + signer::address_of(bob), wrapped_fa_meta + ); + + // deposit the wrapped FungibleAsset into Alice wallet + fungible_asset::deposit(alice_wallet, wrapped_fa); + + // assert alice has both init balance coins and the converted fas + assert!( + coin::balance(signer::address_of(alice)) + == alice_init_balance, + TEST_SUCCESS + ); + assert!( + fungible_asset::balance(alice_wallet) == withdrawn_amount, + TEST_SUCCESS + ); + + // move 1 fa from Alice to bob wallet + let transfer_amount = 1; + fungible_asset::transfer( + alice, + alice_wallet, + bob_wallet, + transfer_amount + ); + + // assert alice has both 99 coins and 1 fa + assert!( + coin::balance(signer::address_of(alice)) + == alice_init_balance - transfer_amount, + TEST_SUCCESS + ); + assert!( + fungible_asset::balance(alice_wallet) == withdrawn_amount - transfer_amount, + TEST_SUCCESS + ); + + // assert bob has both 1 coin and 1 fa + assert!( + coin::balance(signer::address_of(bob)) == transfer_amount, + TEST_SUCCESS + ); + assert!( + fungible_asset::balance(bob_wallet) == transfer_amount, + TEST_SUCCESS + ); + + // now bob transfers his 1 coin + // let coins_back = coin::withdraw(bob, 1); + // print(&coin::balance(signer::address_of(bob))); + // print(&fungible_asset::balance(bob_wallet)); + // coin::deposit(signer::address_of(alice), coins_back); + // print(&coin::balance(signer::address_of(alice))); + // print(&fungible_asset::balance(alice_wallet)); + + // now bob transfers his 1 fa + fungible_asset::transfer(bob, bob_wallet, alice_wallet, 1); + assert!( + coin::balance(signer::address_of(bob)) == 0, + TEST_SUCCESS + ); + assert!(fungible_asset::balance(bob_wallet) == 0, TEST_SUCCESS); + assert!( + coin::balance(signer::address_of(alice)) + == alice_init_balance, + TEST_SUCCESS + ); + assert!(fungible_asset::balance(alice_wallet) == withdrawn_amount, TEST_SUCCESS); + } + + #[ + test( + framework = @aptos_framework, + aave_pool = @aave_pool, + alice = @0x123, + bob = @0x234 + ) + ] + fun test_coin_migrator( + framework: &signer, + aave_pool: &signer, + alice: &signer, + bob: &signer + ) acquires GenericAptosCoinRefs { + + // init a coin conversion map + coin::create_coin_conversion_map(framework); + + // create test accounts + account::create_account_for_test(signer::address_of(alice)); + account::create_account_for_test(signer::address_of(bob)); + + // initialize old-style aptos coin + let coin_name = string::utf8(b"Generic Coin"); + let coin_symbol = string::utf8(b"GCC"); + let coin_decimals = 2; + + initialize_aptos_coin( + framework, + aave_pool, + coin_decimals, + true, + coin_name, + coin_symbol + ); + + // register the alice and bob + coin::register(alice); + coin::register(bob); + + // mint some coins + let alice_init_balance = 100; + let coins_minted = + coin::mint( + alice_init_balance, &get_coin_refs(aave_pool).mint_ref + ); + + // deposit to alice + coin::deposit(signer::address_of(alice), coins_minted); + + // Alice converts her coins for fas + coin_migrator::coin_to_fa(alice, alice_init_balance); + + // use coin migrator to obtain the fa address + let fa_address = coin_migrator::get_fa_address(); + + // get metadata and alice fung. asset store + let wrapped_fa_meta = object::address_to_object(fa_address); + let alice_wallet = + primary_fungible_store::ensure_primary_store_exists( + signer::address_of(alice), wrapped_fa_meta + ); + + // assert + assert!( + coin::balance(signer::address_of(alice)) + == alice_init_balance, + TEST_SUCCESS + ); + assert!( + fungible_asset::balance(alice_wallet) == alice_init_balance, TEST_SUCCESS + ); + + // now alice converts her fas back to coins + coin_migrator::fa_to_coin(alice, alice_init_balance); + + // assert + assert!( + coin::balance(signer::address_of(alice)) + == alice_init_balance, + TEST_SUCCESS + ); + assert!(fungible_asset::balance(alice_wallet) == 0, TEST_SUCCESS); + } +} diff --git a/aave-core/tests/aave-periphery/coin_wrapper_tests.move b/aave-core/tests/aave-periphery/coin_wrapper_tests.move index 196c9b6..88820a4 100644 --- a/aave-core/tests/aave-periphery/coin_wrapper_tests.move +++ b/aave-core/tests/aave-periphery/coin_wrapper_tests.move @@ -1,242 +1,242 @@ -#[test_only] -module aave_pool::coin_wrapper_tests { - use std::signer; - use aptos_framework::account::{Self}; - use aptos_framework::aptos_account; - use aptos_framework::coin::{Self}; - use aptos_framework::fungible_asset::{Self}; - use aptos_framework::aggregator_factory::initialize_aggregator_factory_for_test; - use std::string::{Self, String}; - use aave_pool::package_manager::Self; - use std::option; - use aave_pool::coin_wrapper::{ - initialize, - test_unwrap, - test_wrap, - wrapper_address, - test_get_original, - }; - - const TEST_SUCCESS: u64 = 1; - const TEST_FAILED: u64 = 2; - - struct GenericAptosCoin {} - - struct GenericAptosCoinRefs has key { - burn_ref: coin::BurnCapability, - freeze_ref: coin::FreezeCapability, - mint_ref: coin::MintCapability, - } - - public fun initialize_aptos_coin( - framework: &signer, - coin_creator: &signer, - decimals: u8, - monitor_supply: bool, - _coin_name: String, - _coin_symbol: String, - ) { - initialize_aggregator_factory_for_test(framework); - - let (burn_ref, freeze_ref, mint_ref) = - coin::initialize( - coin_creator, - string::utf8(b"Generic Coin"), - string::utf8(b"GCC"), - decimals, - monitor_supply, - ); - move_to( - coin_creator, - GenericAptosCoinRefs { burn_ref, freeze_ref, mint_ref, }, - ); - } - - inline fun get_coin_refs(account: &signer,): &GenericAptosCoinRefs { - borrow_global(signer::address_of(account)) - } - - #[test(deployer = @resource_pm)] - fun test_can_get_signer_package_manager(deployer: &signer) { - package_manager::initialize_for_test(deployer); - let package_deployer_address = - signer::address_of(&package_manager::get_signer_test()); - assert!(package_deployer_address == signer::address_of(deployer), TEST_SUCCESS); - } - - #[test(deployer = @resource_pm)] - public fun test_can_set_get_signer_package_manager(deployer: &signer) { - package_manager::initialize_for_test(deployer); - package_manager::add_address_test(string::utf8(b"test"), @0xdeadbeef); - assert!( - package_manager::get_address_test(string::utf8(b"test")) == @0xdeadbeef, - TEST_SUCCESS, - ); - } - - #[test(framework = @aptos_framework, aave_periphery = @aave_pool, deployer = @resource_pm, _aave_pool = @aave_pool, coin_holder = @0x123, _receiver = @0x234)] - fun test_coin_wrapper( - framework: &signer, - aave_periphery: &signer, - deployer: &signer, - _aave_pool: &signer, - coin_holder: &signer, - _receiver: &signer - ) acquires GenericAptosCoinRefs { - // init the package manager - package_manager::initialize_for_test(deployer); - - // init the coin wrapper package - initialize(); - - // initialize old-style aptos coin - let coinholder_addr = signer::address_of(coin_holder); - account::create_account_for_test(coinholder_addr); - let coin_name = string::utf8(b"Generic Coin"); - let coin_symbol = string::utf8(b"GCC"); - let coin_decimals = 2; - - initialize_aptos_coin( - framework, - aave_periphery, - coin_decimals, - true, - coin_name, - coin_symbol, - ); - - // register the holder - coin::register(coin_holder); - - // mint some coins - let token_holder_initial_balance = 100; - let coins_minted = - coin::mint( - token_holder_initial_balance, &get_coin_refs(aave_periphery).mint_ref - ); - - // deposit to holder - coin::deposit(coinholder_addr, coins_minted); - - // withdraw some of the generic coin - let coin_withdraw_amount = 20; - let withdrawn_coins = - coin::withdraw(coin_holder, coin_withdraw_amount); - // check the coin balance - assert!(coin::value(&withdrawn_coins) == coin_withdraw_amount, TEST_SUCCESS); - assert!( - coin::balance(signer::address_of(coin_holder)) - == token_holder_initial_balance - coin_withdraw_amount, - TEST_SUCCESS, - ); - - // coin holder now warps the coin using the wrapper and gets an equivalent fa - let wrapped_fa = test_wrap(withdrawn_coins); - // check the wrapper address balance - assert!( - coin::balance(wrapper_address()) == coin_withdraw_amount, - TEST_SUCCESS, - ); - - // run assertions on the generated equivalent fa - assert!(fungible_asset::amount(&wrapped_fa) == coin_withdraw_amount, TEST_SUCCESS); - let fa_metadata = fungible_asset::metadata_from_asset(&wrapped_fa); - let fa_supply = fungible_asset::supply(fa_metadata); - let fa_decimals = fungible_asset::decimals(fa_metadata); - let fa_symbol = fungible_asset::symbol(fa_metadata); - assert!(fa_supply == option::some((coin_withdraw_amount as u128)), TEST_SUCCESS); - assert!(fa_decimals == coin_decimals, TEST_SUCCESS); - assert!(fa_symbol == coin_symbol, TEST_SUCCESS); - - // now unwrap the fa and get back the coin - let unwrapped_coins = test_unwrap(wrapped_fa); - - // check the wrapper address balance - assert!(coin::balance(wrapper_address()) == 0, TEST_SUCCESS); - - // run assertions on the coin - assert!(coin::value(&unwrapped_coins) == coin_withdraw_amount, TEST_SUCCESS); - assert!(coin::decimals() == coin_decimals, TEST_SUCCESS); - assert!(coin::symbol() == coin_symbol, TEST_SUCCESS); - assert!( - coin::supply() - == option::some((token_holder_initial_balance as u128)), - TEST_SUCCESS, - ); - - // send the coins back to the original coin holder - aptos_account::deposit_coins(signer::address_of(coin_holder), unwrapped_coins); - // check the original coin holder balance - assert!( - coin::balance(signer::address_of(coin_holder)) - == token_holder_initial_balance, - TEST_SUCCESS, - ); - } - - #[test(framework = @aptos_framework, aave_periphery = @aave_pool, deployer = @resource_pm, _aave_pool = @aave_pool, coin_holder = @0x123, _receiver = @0x234)] - fun test_get_orig( - framework: &signer, - aave_periphery: &signer, - deployer: &signer, - _aave_pool: &signer, - coin_holder: &signer, - _receiver: &signer - ) acquires GenericAptosCoinRefs { - // init the package manager - package_manager::initialize_for_test(deployer); - - // init the coin wrapper package - initialize(); - - // initialize old-style aptos coin - let coinholder_addr = signer::address_of(coin_holder); - account::create_account_for_test(coinholder_addr); - let coin_name = string::utf8(b"Generic Coin"); - let coin_symbol = string::utf8(b"GCC"); - let coin_decimals = 2; - - initialize_aptos_coin( - framework, - aave_periphery, - coin_decimals, - true, - coin_name, - coin_symbol, - ); - - // register the holder - coin::register(coin_holder); - - // mint some coins - let token_holder_initial_balance = 100; - let coins_minted = - coin::mint( - token_holder_initial_balance, - &get_coin_refs(aave_periphery).mint_ref, - ); - - // deposit to holder - coin::deposit(coinholder_addr, coins_minted); - - // withdraw some of the generic coin - let coin_withdraw_amount = 20; - let withdrawn_coins = - coin::withdraw(coin_holder, coin_withdraw_amount); - // check the coin balance - assert!(coin::value(&withdrawn_coins) == coin_withdraw_amount, TEST_SUCCESS); - assert!( - coin::balance(signer::address_of(coin_holder)) - == token_holder_initial_balance - coin_withdraw_amount, - TEST_SUCCESS, - ); - - // coin holder now warps the coin using the wrapper and gets an equivalent fa - let wrapped_fa = test_wrap(withdrawn_coins); - let fa_metadata = fungible_asset::metadata_from_asset(&wrapped_fa); - - test_get_original(fa_metadata); - let unwrapped_coins = test_unwrap(wrapped_fa); - aptos_account::deposit_coins(signer::address_of(coin_holder), unwrapped_coins); - } -} +// #[test_only] +// module aave_pool::coin_wrapper_tests { +// use std::signer; +// use aptos_framework::account::{Self}; +// use aptos_framework::aptos_account; +// use aptos_framework::coin::{Self}; +// use aptos_framework::fungible_asset::{Self}; +// use aptos_framework::aggregator_factory::initialize_aggregator_factory_for_test; +// use std::string::{Self, String}; +// use aave_pool::package_manager::Self; +// use std::option; +// use aave_pool::coin_wrapper::{ +// initialize, +// test_unwrap, +// test_wrap, +// wrapper_address, +// test_get_original, +// }; +// +// const TEST_SUCCESS: u64 = 1; +// const TEST_FAILED: u64 = 2; +// +// struct GenericAptosCoin {} +// +// struct GenericAptosCoinRefs has key { +// burn_ref: coin::BurnCapability, +// freeze_ref: coin::FreezeCapability, +// mint_ref: coin::MintCapability, +// } +// +// public fun initialize_aptos_coin( +// framework: &signer, +// coin_creator: &signer, +// decimals: u8, +// monitor_supply: bool, +// _coin_name: String, +// _coin_symbol: String, +// ) { +// initialize_aggregator_factory_for_test(framework); +// +// let (burn_ref, freeze_ref, mint_ref) = +// coin::initialize( +// coin_creator, +// string::utf8(b"Generic Coin"), +// string::utf8(b"GCC"), +// decimals, +// monitor_supply, +// ); +// move_to( +// coin_creator, +// GenericAptosCoinRefs { burn_ref, freeze_ref, mint_ref, }, +// ); +// } +// +// inline fun get_coin_refs(account: &signer,): &GenericAptosCoinRefs { +// borrow_global(signer::address_of(account)) +// } +// +// #[test(deployer = @resource_pm)] +// fun test_can_get_signer_package_manager(deployer: &signer) { +// package_manager::initialize_for_test(deployer); +// let package_deployer_address = +// signer::address_of(&package_manager::get_signer_test()); +// assert!(package_deployer_address == signer::address_of(deployer), TEST_SUCCESS); +// } +// +// #[test(deployer = @resource_pm)] +// public fun test_can_set_get_signer_package_manager(deployer: &signer) { +// package_manager::initialize_for_test(deployer); +// package_manager::add_address_test(string::utf8(b"test"), @0xdeadbeef); +// assert!( +// package_manager::get_address_test(string::utf8(b"test")) == @0xdeadbeef, +// TEST_SUCCESS, +// ); +// } +// +// #[test(framework = @aptos_framework, aave_periphery = @aave_pool, deployer = @resource_pm, _aave_pool = @aave_pool, coin_holder = @0x123, _receiver = @0x234)] +// fun test_coin_wrapper( +// framework: &signer, +// aave_periphery: &signer, +// deployer: &signer, +// _aave_pool: &signer, +// coin_holder: &signer, +// _receiver: &signer +// ) acquires GenericAptosCoinRefs { +// // init the package manager +// package_manager::initialize_for_test(deployer); +// +// // init the coin wrapper package +// initialize(); +// +// // initialize old-style aptos coin +// let coinholder_addr = signer::address_of(coin_holder); +// account::create_account_for_test(coinholder_addr); +// let coin_name = string::utf8(b"Generic Coin"); +// let coin_symbol = string::utf8(b"GCC"); +// let coin_decimals = 2; +// +// initialize_aptos_coin( +// framework, +// aave_periphery, +// coin_decimals, +// true, +// coin_name, +// coin_symbol, +// ); +// +// // register the holder +// coin::register(coin_holder); +// +// // mint some coins +// let token_holder_initial_balance = 100; +// let coins_minted = +// coin::mint( +// token_holder_initial_balance, &get_coin_refs(aave_periphery).mint_ref +// ); +// +// // deposit to holder +// coin::deposit(coinholder_addr, coins_minted); +// +// // withdraw some of the generic coin +// let coin_withdraw_amount = 20; +// let withdrawn_coins = +// coin::withdraw(coin_holder, coin_withdraw_amount); +// // check the coin balance +// assert!(coin::value(&withdrawn_coins) == coin_withdraw_amount, TEST_SUCCESS); +// assert!( +// coin::balance(signer::address_of(coin_holder)) +// == token_holder_initial_balance - coin_withdraw_amount, +// TEST_SUCCESS, +// ); +// +// // coin holder now warps the coin using the wrapper and gets an equivalent fa +// let wrapped_fa = test_wrap(withdrawn_coins); +// // check the wrapper address balance +// assert!( +// coin::balance(wrapper_address()) == coin_withdraw_amount, +// TEST_SUCCESS, +// ); +// +// // run assertions on the generated equivalent fa +// assert!(fungible_asset::amount(&wrapped_fa) == coin_withdraw_amount, TEST_SUCCESS); +// let fa_metadata = fungible_asset::metadata_from_asset(&wrapped_fa); +// let fa_supply = fungible_asset::supply(fa_metadata); +// let fa_decimals = fungible_asset::decimals(fa_metadata); +// let fa_symbol = fungible_asset::symbol(fa_metadata); +// assert!(fa_supply == option::some((coin_withdraw_amount as u128)), TEST_SUCCESS); +// assert!(fa_decimals == coin_decimals, TEST_SUCCESS); +// assert!(fa_symbol == coin_symbol, TEST_SUCCESS); +// +// // now unwrap the fa and get back the coin +// let unwrapped_coins = test_unwrap(wrapped_fa); +// +// // check the wrapper address balance +// assert!(coin::balance(wrapper_address()) == 0, TEST_SUCCESS); +// +// // run assertions on the coin +// assert!(coin::value(&unwrapped_coins) == coin_withdraw_amount, TEST_SUCCESS); +// assert!(coin::decimals() == coin_decimals, TEST_SUCCESS); +// assert!(coin::symbol() == coin_symbol, TEST_SUCCESS); +// assert!( +// coin::supply() +// == option::some((token_holder_initial_balance as u128)), +// TEST_SUCCESS, +// ); +// +// // send the coins back to the original coin holder +// aptos_account::deposit_coins(signer::address_of(coin_holder), unwrapped_coins); +// // check the original coin holder balance +// assert!( +// coin::balance(signer::address_of(coin_holder)) +// == token_holder_initial_balance, +// TEST_SUCCESS, +// ); +// } +// +// #[test(framework = @aptos_framework, aave_periphery = @aave_pool, deployer = @resource_pm, _aave_pool = @aave_pool, coin_holder = @0x123, _receiver = @0x234)] +// fun test_get_orig( +// framework: &signer, +// aave_periphery: &signer, +// deployer: &signer, +// _aave_pool: &signer, +// coin_holder: &signer, +// _receiver: &signer +// ) acquires GenericAptosCoinRefs { +// // init the package manager +// package_manager::initialize_for_test(deployer); +// +// // init the coin wrapper package +// initialize(); +// +// // initialize old-style aptos coin +// let coinholder_addr = signer::address_of(coin_holder); +// account::create_account_for_test(coinholder_addr); +// let coin_name = string::utf8(b"Generic Coin"); +// let coin_symbol = string::utf8(b"GCC"); +// let coin_decimals = 2; +// +// initialize_aptos_coin( +// framework, +// aave_periphery, +// coin_decimals, +// true, +// coin_name, +// coin_symbol, +// ); +// +// // register the holder +// coin::register(coin_holder); +// +// // mint some coins +// let token_holder_initial_balance = 100; +// let coins_minted = +// coin::mint( +// token_holder_initial_balance, +// &get_coin_refs(aave_periphery).mint_ref, +// ); +// +// // deposit to holder +// coin::deposit(coinholder_addr, coins_minted); +// +// // withdraw some of the generic coin +// let coin_withdraw_amount = 20; +// let withdrawn_coins = +// coin::withdraw(coin_holder, coin_withdraw_amount); +// // check the coin balance +// assert!(coin::value(&withdrawn_coins) == coin_withdraw_amount, TEST_SUCCESS); +// assert!( +// coin::balance(signer::address_of(coin_holder)) +// == token_holder_initial_balance - coin_withdraw_amount, +// TEST_SUCCESS, +// ); +// +// // coin holder now warps the coin using the wrapper and gets an equivalent fa +// let wrapped_fa = test_wrap(withdrawn_coins); +// let fa_metadata = fungible_asset::metadata_from_asset(&wrapped_fa); +// +// test_get_original(fa_metadata); +// let unwrapped_coins = test_unwrap(wrapped_fa); +// aptos_account::deposit_coins(signer::address_of(coin_holder), unwrapped_coins); +// } +// } diff --git a/aave-core/tests/aave-periphery/collector_tests.move b/aave-core/tests/aave-periphery/collector_tests.move index c707e01..b71ccbd 100644 --- a/aave-core/tests/aave-periphery/collector_tests.move +++ b/aave-core/tests/aave-periphery/collector_tests.move @@ -1,151 +1,151 @@ -#[test_only] -module aave_pool::collector_tests { - use aptos_framework::fungible_asset::{Self, Metadata}; - use aptos_framework::object::{Self, Object}; - use aptos_framework::primary_fungible_store; - use aave_acl::acl_manage::{Self}; - use std::string::utf8; - use aave_pool::standard_token::{Self}; - use std::signer; - use aave_pool::collector::{ - Self, - withdraw, - init_module_test, - deposit, - get_collected_fees, - }; - - const TEST_SUCCESS: u64 = 1; - const TEST_FAILED: u64 = 2; - - fun create_test_fa(creator: &signer): Object { - let test_symbol = b"TEST"; - standard_token::initialize( - creator, - 0, - utf8(b"Test Token"), - utf8(test_symbol), - 8, - utf8(b"http://example.com/favicon.ico"), - utf8(b"http://example.com"), - vector[true, true, true], - @0x1, - false, - ); - let metadata_address = - object::create_object_address(&signer::address_of(creator), test_symbol); - object::address_to_object(metadata_address) - } - - #[test(fa_creator = @aave_pool, aave_role_super_admin = @aave_acl, collector_account = @aave_pool, acl_fund_admin = @0x111, user_account = @0x222)] - fun test_basic_flow( - fa_creator: &signer, - aave_role_super_admin: &signer, - collector_account: &signer, - acl_fund_admin: &signer, - user_account: &signer, - ) { - // init acl - acl_manage::test_init_module(aave_role_super_admin); - // set fund admin - acl_manage::add_funds_admin( - aave_role_super_admin, signer::address_of(acl_fund_admin) - ); - // assert role is granted - assert!( - acl_manage::is_funds_admin(signer::address_of(acl_fund_admin)), TEST_SUCCESS - ); - - // create test token - let metadata = create_test_fa(fa_creator); - - // mint coins to user - let _creator_address = signer::address_of(fa_creator); - let user_address = signer::address_of(user_account); - standard_token::mint_to_primary_stores( - fa_creator, metadata, vector[user_address], vector[100] - ); - assert!( - primary_fungible_store::balance(user_address, metadata) == 100, TEST_SUCCESS - ); - - // user withdraws all fees he has - let fa = - standard_token::withdraw_from_primary_stores( - fa_creator, - metadata, - vector[user_address], - vector[100], - ); - assert!(fungible_asset::amount(&fa) == 100, TEST_SUCCESS); - - // initialize the collector - init_module_test(collector_account); - - // deposit the fee - deposit(acl_fund_admin, fa); - - // assert the fees are in the secondary store - assert!(get_collected_fees(metadata) == 100, TEST_SUCCESS); - - // transfer back half of the fees to the user - withdraw(acl_fund_admin, metadata, user_address, 50); - - // check user and collectpr's store balances - assert!(get_collected_fees(metadata) == 50, 5); - assert!( - primary_fungible_store::balance(user_address, metadata) == 50, TEST_SUCCESS - ); - } - - #[test(aave_role_super_admin = @aave_acl, collector_account = @aave_pool, acl_fund_admin = @0x111)] - fun test_is_funds_admin_pass( - aave_role_super_admin: &signer, - collector_account: &signer, - acl_fund_admin: &signer, - ) { - // init acl - acl_manage::test_init_module(aave_role_super_admin); - // set fund admin - acl_manage::add_funds_admin( - aave_role_super_admin, signer::address_of(acl_fund_admin) - ); - // assert role is granted - assert!( - acl_manage::is_funds_admin(signer::address_of(acl_fund_admin)), TEST_SUCCESS - ); - - // initialize the collector - init_module_test(collector_account); - - // assert funds admin role is granted - assert!( - collector::check_is_funds_admin(signer::address_of(acl_fund_admin)), - TEST_SUCCESS, - ); - } - - #[test(aave_role_super_admin = @aave_acl, collector_account = @aave_pool, acl_fund_admin = @0x111)] - fun test_is_funds_admin_fail( - aave_role_super_admin: &signer, - collector_account: &signer, - acl_fund_admin: &signer, - ) { - // init acl - acl_manage::test_init_module(aave_role_super_admin); - // set fund admin - let some_acl_funds_admin = @0x222; - acl_manage::add_funds_admin(aave_role_super_admin, some_acl_funds_admin); - // assert role is granted - assert!(acl_manage::is_funds_admin(some_acl_funds_admin), TEST_SUCCESS); - - // initialize the collector - init_module_test(collector_account); - - // assert funds admin role is granted - assert!( - !collector::check_is_funds_admin(signer::address_of(acl_fund_admin)), - TEST_SUCCESS, - ); - } -} +// #[test_only] +// module aave_pool::collector_tests { +// use aptos_framework::fungible_asset::{Self, Metadata}; +// use aptos_framework::object::{Self, Object}; +// use aptos_framework::primary_fungible_store; +// use aave_acl::acl_manage::{Self}; +// use std::string::utf8; +// use aave_pool::standard_token::{Self}; +// use std::signer; +// use aave_pool::collector::{ +// Self, +// withdraw, +// init_module_test, +// deposit, +// get_collected_fees, +// }; +// +// const TEST_SUCCESS: u64 = 1; +// const TEST_FAILED: u64 = 2; +// +// fun create_test_fa(creator: &signer): Object { +// let test_symbol = b"TEST"; +// standard_token::initialize( +// creator, +// 0, +// utf8(b"Test Token"), +// utf8(test_symbol), +// 8, +// utf8(b"http://example.com/favicon.ico"), +// utf8(b"http://example.com"), +// vector[true, true, true], +// @0x1, +// false, +// ); +// let metadata_address = +// object::create_object_address(&signer::address_of(creator), test_symbol); +// object::address_to_object(metadata_address) +// } +// +// #[test(fa_creator = @aave_pool, aave_role_super_admin = @aave_acl, collector_account = @aave_pool, acl_fund_admin = @0x111, user_account = @0x222)] +// fun test_basic_flow( +// fa_creator: &signer, +// aave_role_super_admin: &signer, +// collector_account: &signer, +// acl_fund_admin: &signer, +// user_account: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// // set fund admin +// acl_manage::add_funds_admin( +// aave_role_super_admin, signer::address_of(acl_fund_admin) +// ); +// // assert role is granted +// assert!( +// acl_manage::is_funds_admin(signer::address_of(acl_fund_admin)), TEST_SUCCESS +// ); +// +// // create test token +// let metadata = create_test_fa(fa_creator); +// +// // mint coins to user +// let _creator_address = signer::address_of(fa_creator); +// let user_address = signer::address_of(user_account); +// standard_token::mint_to_primary_stores( +// fa_creator, metadata, vector[user_address], vector[100] +// ); +// assert!( +// primary_fungible_store::balance(user_address, metadata) == 100, TEST_SUCCESS +// ); +// +// // user withdraws all fees he has +// let fa = +// standard_token::withdraw_from_primary_stores( +// fa_creator, +// metadata, +// vector[user_address], +// vector[100], +// ); +// assert!(fungible_asset::amount(&fa) == 100, TEST_SUCCESS); +// +// // initialize the collector +// init_module_test(collector_account); +// +// // deposit the fee +// deposit(acl_fund_admin, fa); +// +// // assert the fees are in the secondary store +// assert!(get_collected_fees(metadata) == 100, TEST_SUCCESS); +// +// // transfer back half of the fees to the user +// withdraw(acl_fund_admin, metadata, user_address, 50); +// +// // check user and collectpr's store balances +// assert!(get_collected_fees(metadata) == 50, 5); +// assert!( +// primary_fungible_store::balance(user_address, metadata) == 50, TEST_SUCCESS +// ); +// } +// +// #[test(aave_role_super_admin = @aave_acl, collector_account = @aave_pool, acl_fund_admin = @0x111)] +// fun test_is_funds_admin_pass( +// aave_role_super_admin: &signer, +// collector_account: &signer, +// acl_fund_admin: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// // set fund admin +// acl_manage::add_funds_admin( +// aave_role_super_admin, signer::address_of(acl_fund_admin) +// ); +// // assert role is granted +// assert!( +// acl_manage::is_funds_admin(signer::address_of(acl_fund_admin)), TEST_SUCCESS +// ); +// +// // initialize the collector +// init_module_test(collector_account); +// +// // assert funds admin role is granted +// assert!( +// collector::check_is_funds_admin(signer::address_of(acl_fund_admin)), +// TEST_SUCCESS, +// ); +// } +// +// #[test(aave_role_super_admin = @aave_acl, collector_account = @aave_pool, acl_fund_admin = @0x111)] +// fun test_is_funds_admin_fail( +// aave_role_super_admin: &signer, +// collector_account: &signer, +// acl_fund_admin: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// // set fund admin +// let some_acl_funds_admin = @0x222; +// acl_manage::add_funds_admin(aave_role_super_admin, some_acl_funds_admin); +// // assert role is granted +// assert!(acl_manage::is_funds_admin(some_acl_funds_admin), TEST_SUCCESS); +// +// // initialize the collector +// init_module_test(collector_account); +// +// // assert funds admin role is granted +// assert!( +// !collector::check_is_funds_admin(signer::address_of(acl_fund_admin)), +// TEST_SUCCESS, +// ); +// } +// } diff --git a/aave-core/tests/aave-periphery/emission_manager_tests.move b/aave-core/tests/aave-periphery/emission_manager_tests.move index d484d2d..e17c606 100644 --- a/aave-core/tests/aave-periphery/emission_manager_tests.move +++ b/aave-core/tests/aave-periphery/emission_manager_tests.move @@ -1,108 +1,932 @@ -#[test_only] -module aave_pool::emission_manager_tests { - use aave_acl::acl_manage::{Self}; - use std::signer; - use aave_pool::emission_manager::{ - initialize, - set_pull_rewards_transfer_strategy, - set_staked_token_transfer_strategy - }; - - #[test(aave_role_super_admin = @aave_acl, _periphery_account = @aave_pool, _acl_fund_admin = @0x111, _user_account = @0x222, _creator = @0x1,)] - fun test_initialize( - aave_role_super_admin: &signer, - _periphery_account: &signer, - _acl_fund_admin: &signer, - _user_account: &signer, - _creator: &signer, - ) { - // init acl - acl_manage::test_init_module(aave_role_super_admin); - - let rewards_addr = signer::address_of(aave_role_super_admin); - - initialize(aave_role_super_admin, rewards_addr); - } - - #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] - fun test_set_pull_rewards_transfer_strategy( - aave_role_super_admin: &signer, - periphery_account: &signer, - _acl_fund_admin: &signer, - user_account: &signer, - _creator: &signer, - ) { - // init acl - acl_manage::test_init_module(aave_role_super_admin); - - aave_pool::rewards_controller::initialize( - periphery_account, signer::address_of(periphery_account) - ); - - let user_account_addr = signer::address_of(user_account); - - let pull_rewards_transfer_strategy = - aave_pool::transfer_strategy::create_pull_rewards_transfer_strategy( - user_account_addr, user_account_addr, user_account_addr - ); - - let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); - - acl_manage::add_emission_admin_role( - aave_role_super_admin, signer::address_of(periphery_account) - ); - - initialize(periphery_account, rewards_addr); - - set_pull_rewards_transfer_strategy( - periphery_account, - signer::address_of(periphery_account), - pull_rewards_transfer_strategy, - ); - - } - - #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] - fun test_set_staked_token_transfer_strategy( - aave_role_super_admin: &signer, - periphery_account: &signer, - _acl_fund_admin: &signer, - user_account: &signer, - _creator: &signer, - ) { - // init acl - acl_manage::test_init_module(aave_role_super_admin); - - aave_pool::rewards_controller::initialize( - periphery_account, signer::address_of(periphery_account) - ); - - let user_account_addr = signer::address_of(user_account); - - let mock_staked_token = - aave_pool::staked_token::create_mock_staked_token(user_account_addr); - - let staked_token_transfer_strategy = - aave_pool::transfer_strategy::create_staked_token_transfer_strategy( - user_account_addr, - user_account_addr, - mock_staked_token, - user_account_addr, - ); - - let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); - - acl_manage::add_emission_admin_role( - aave_role_super_admin, signer::address_of(periphery_account) - ); - - initialize(periphery_account, rewards_addr); - - set_staked_token_transfer_strategy( - periphery_account, - signer::address_of(periphery_account), - staked_token_transfer_strategy, - ); - - } -} +// #[test_only] +// module aave_pool::emission_manager_tests { +// use aave_acl::acl_manage::{Self}; +// use std::signer; +// use aave_pool::emission_manager::{ +// initialize, +// set_pull_rewards_transfer_strategy, +// set_staked_token_transfer_strategy, +// set_emission_admin, +// get_emission_admin, +// set_rewards_controller, +// get_rewards_controller, +// configure_assets, +// set_distribution_end, +// set_emission_per_second, +// set_claimer +// }; +// use std::vector; +// use std::string; +// use std::option::{Self, Option}; +// use aave_pool::token_base::Self; +// use aave_pool::mock_underlying_token_factory::Self; +// use std::string::utf8; +// use aptos_std::string_utils::{Self}; +// +// const TEST_SUCCESS: u64 = 1; +// const TEST_FAILED: u64 = 2; +// +// #[test(aave_role_super_admin = @aave_acl, _periphery_account = @aave_pool, _acl_fund_admin = @0x111, _user_account = @0x222, _creator = @0x1,)] +// fun test_initialize( +// aave_role_super_admin: &signer, +// _periphery_account: &signer, +// _acl_fund_admin: &signer, +// _user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// +// let rewards_addr = signer::address_of(aave_role_super_admin); +// +// initialize(aave_role_super_admin, rewards_addr); +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_set_pull_rewards_transfer_strategy( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let pull_rewards_transfer_strategy = +// aave_pool::transfer_strategy::create_pull_rewards_transfer_strategy( +// user_account_addr, user_account_addr, user_account_addr +// ); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// acl_manage::add_emission_admin_role( +// aave_role_super_admin, signer::address_of(periphery_account) +// ); +// +// initialize(periphery_account, rewards_addr); +// +// set_pull_rewards_transfer_strategy( +// periphery_account, +// signer::address_of(periphery_account), +// pull_rewards_transfer_strategy, +// ); +// +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_set_staked_token_transfer_strategy( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let mock_staked_token = +// aave_pool::staked_token::create_mock_staked_token(user_account_addr); +// +// let staked_token_transfer_strategy = +// aave_pool::transfer_strategy::create_staked_token_transfer_strategy( +// user_account_addr, +// user_account_addr, +// mock_staked_token, +// user_account_addr, +// ); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// acl_manage::add_emission_admin_role( +// aave_role_super_admin, signer::address_of(periphery_account) +// ); +// +// initialize(periphery_account, rewards_addr); +// +// set_staked_token_transfer_strategy( +// periphery_account, +// signer::address_of(periphery_account), +// staked_token_transfer_strategy, +// ); +// +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, reward = @0x111, user_account = @0x222, new_admin = @0x1,)] +// fun test_set_get_emission_admin( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// reward: &signer, +// user_account: &signer, +// new_admin: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let mock_staked_token = +// aave_pool::staked_token::create_mock_staked_token(user_account_addr); +// +// let staked_token_transfer_strategy = +// aave_pool::transfer_strategy::create_staked_token_transfer_strategy( +// user_account_addr, +// user_account_addr, +// mock_staked_token, +// user_account_addr, +// ); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// acl_manage::add_emission_admin_role( +// aave_role_super_admin, signer::address_of(periphery_account) +// ); +// +// initialize(periphery_account, rewards_addr); +// +// set_staked_token_transfer_strategy( +// periphery_account, +// signer::address_of(periphery_account), +// staked_token_transfer_strategy, +// ); +// +// let new_admin = signer::address_of(new_admin); +// +// set_emission_admin(aave_role_super_admin, rewards_addr, new_admin); +// +// assert!( +// get_emission_admin(rewards_addr) == new_admin, +// TEST_SUCCESS, +// ); +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, reward = @0x111, user_account = @0x222, new_admin = @0x1,)] +// fun test_set_get_rewards_controller( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// reward: &signer, +// user_account: &signer, +// new_admin: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let mock_staked_token = +// aave_pool::staked_token::create_mock_staked_token(user_account_addr); +// +// let staked_token_transfer_strategy = +// aave_pool::transfer_strategy::create_staked_token_transfer_strategy( +// user_account_addr, +// user_account_addr, +// mock_staked_token, +// user_account_addr, +// ); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// acl_manage::add_emission_admin_role( +// aave_role_super_admin, signer::address_of(periphery_account) +// ); +// +// initialize(periphery_account, rewards_addr); +// +// set_staked_token_transfer_strategy( +// periphery_account, +// signer::address_of(periphery_account), +// staked_token_transfer_strategy, +// ); +// +// let rewards_controller = signer::address_of(reward); +// +// set_rewards_controller(aave_role_super_admin, rewards_controller); +// +// assert!( +// get_rewards_controller() == rewards_controller, +// TEST_SUCCESS, +// ); +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, reward = @0x111, user_account = @0x222, new_admin = @0x1, underlying_tokens_admin = @aave_acl, underlying_tokens_admin_2 = @underlying_tokens, aptos_framework = @0x1,)] +// fun test_configure_assets( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// reward: &signer, +// user_account: &signer, +// new_admin: &signer, +// underlying_tokens_admin: &signer, +// underlying_tokens_admin_2: &signer, +// aptos_framework: &signer, +// ) { +// aptos_framework::timestamp::set_time_has_started_for_testing(aptos_framework); +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// +// // mock_underlying_token_factory::test_init_module(periphery_account); +// token_base::test_init_module(periphery_account); +// +// let i = 0; +// +// let name = string_utils::format1(&b"APTOS_UNDERLYING_{}", i); +// let symbol = string_utils::format1(&b"U_{}", i); +// let decimals = 2 + i; +// let max_supply = 10000; +// +// // create a tokens admin account +// aptos_framework::account::create_account_for_test( +// signer::address_of(underlying_tokens_admin_2) +// ); +// +// aave_pool::a_token_factory::create_token( +// underlying_tokens_admin_2, +// name, +// symbol, +// decimals, +// utf8(b""), +// utf8(b""), +// signer::address_of(underlying_tokens_admin_2), +// signer::address_of(underlying_tokens_admin_2), +// ); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let mock_staked_token = +// aave_pool::staked_token::create_mock_staked_token(user_account_addr); +// +// let staked_token_transfer_strategy = +// aave_pool::transfer_strategy::create_staked_token_transfer_strategy( +// user_account_addr, +// user_account_addr, +// mock_staked_token, +// user_account_addr, +// ); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// acl_manage::add_emission_admin_role( +// aave_role_super_admin, signer::address_of(periphery_account) +// ); +// +// initialize(periphery_account, rewards_addr); +// +// let new_admin = signer::address_of(periphery_account); +// +// set_emission_admin(aave_role_super_admin, rewards_addr, new_admin); +// +// assert!( +// get_emission_admin(rewards_addr) == new_admin, +// TEST_SUCCESS, +// ); +// +// let rewards_admin = signer::address_of(underlying_tokens_admin_2); +// let incentives_controller = signer::address_of(underlying_tokens_admin_2); +// let rewards_vault = signer::address_of(underlying_tokens_admin_2); +// +// let underlying_token = signer::address_of(underlying_tokens_admin_2); +// +// let stake_contract = +// aave_pool::staked_token::create_mock_staked_token(underlying_token); +// +// let pull_rewards_transfer_strategy = +// option::some( +// aave_pool::transfer_strategy::create_pull_rewards_transfer_strategy( +// rewards_admin, incentives_controller, rewards_vault +// ), +// ); +// // let staked_token_transfer_strategy = option::some(aave_pool::transfer_strategy::create_staked_token_transfer_strategy(rewards_admin, incentives_controller, stake_contract, underlying_token)); +// let staked_token_transfer_strategy = option::none(); +// +// let emission_per_second = 0; +// let total_supply = 0; +// let distribution_end = 0; +// +// let reward = rewards_addr; +// +// let rewards_map = std::simple_map::new(); +// +// let available_rewards_count = 0; +// +// let index = 0; +// let emission_per_second = 0; +// let last_update_timestamp = 0; +// let distribution_end = 0; +// +// let users_data = std::simple_map::new(); +// +// let reward_data = +// aave_pool::rewards_controller::create_reward_data( +// index, +// emission_per_second, +// last_update_timestamp, +// distribution_end, +// users_data, +// ); +// +// std::simple_map::upsert(&mut rewards_map, reward, reward_data); +// +// let asset_data = +// aave_pool::rewards_controller::create_asset_data( +// rewards_map, +// std::simple_map::new(), +// available_rewards_count, +// decimals, +// ); +// let asset = +// aptos_framework::object::create_object_address( +// &signer::address_of(underlying_tokens_admin_2), *string::bytes(&symbol) +// ); +// +// let id = 1; +// let reward_oracle = aave_oracle::reward_oracle::create_reward_oracle(id); +// +// let config = vector::empty(); +// let rewards_config_input = +// aave_pool::transfer_strategy::create_rewards_config_input( +// emission_per_second, +// total_supply, +// distribution_end, +// asset, +// reward, +// staked_token_transfer_strategy, +// pull_rewards_transfer_strategy, +// reward_oracle, +// ); +// vector::push_back(&mut config, rewards_config_input); +// +// aave_acl::acl_manage::grant_role( +// aave_role_super_admin, +// aave_acl::acl_manage::get_rewards_controller_admin_role_for_testing(), +// signer::address_of(periphery_account), +// ); +// +// aave_pool::rewards_controller::add_asset(rewards_addr, asset, asset_data); +// aave_pool::rewards_controller::enable_reward(rewards_addr, reward); +// +// configure_assets(periphery_account, config); +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, reward = @0x111, user_account = @0x222, new_admin = @0x1, underlying_tokens_admin = @aave_acl, underlying_tokens_admin_2 = @underlying_tokens, aptos_framework = @0x1,)] +// fun test_set_distribution_end( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// reward: &signer, +// user_account: &signer, +// new_admin: &signer, +// underlying_tokens_admin: &signer, +// underlying_tokens_admin_2: &signer, +// aptos_framework: &signer, +// ) { +// aptos_framework::timestamp::set_time_has_started_for_testing(aptos_framework); +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// +// // mock_underlying_token_factory::test_init_module(periphery_account); +// token_base::test_init_module(periphery_account); +// +// let i = 0; +// +// let name = string_utils::format1(&b"APTOS_UNDERLYING_{}", i); +// let symbol = string_utils::format1(&b"U_{}", i); +// let decimals = 2 + i; +// let max_supply = 10000; +// +// // create a tokens admin account +// aptos_framework::account::create_account_for_test( +// signer::address_of(underlying_tokens_admin_2) +// ); +// +// aave_pool::a_token_factory::create_token( +// underlying_tokens_admin_2, +// name, +// symbol, +// decimals, +// utf8(b""), +// utf8(b""), +// signer::address_of(underlying_tokens_admin_2), +// signer::address_of(underlying_tokens_admin_2), +// ); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let mock_staked_token = +// aave_pool::staked_token::create_mock_staked_token(user_account_addr); +// +// let staked_token_transfer_strategy = +// aave_pool::transfer_strategy::create_staked_token_transfer_strategy( +// user_account_addr, +// user_account_addr, +// mock_staked_token, +// user_account_addr, +// ); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// acl_manage::add_emission_admin_role( +// aave_role_super_admin, signer::address_of(periphery_account) +// ); +// +// initialize(periphery_account, rewards_addr); +// +// let new_admin = signer::address_of(periphery_account); +// +// set_emission_admin(aave_role_super_admin, rewards_addr, new_admin); +// +// let rewards_admin = signer::address_of(underlying_tokens_admin_2); +// let incentives_controller = signer::address_of(underlying_tokens_admin_2); +// let rewards_vault = signer::address_of(underlying_tokens_admin_2); +// +// let underlying_token = signer::address_of(underlying_tokens_admin_2); +// +// let stake_contract = +// aave_pool::staked_token::create_mock_staked_token(underlying_token); +// +// let pull_rewards_transfer_strategy = +// option::some( +// aave_pool::transfer_strategy::create_pull_rewards_transfer_strategy( +// rewards_admin, incentives_controller, rewards_vault +// ), +// ); +// // let staked_token_transfer_strategy = option::some(aave_pool::transfer_strategy::create_staked_token_transfer_strategy(rewards_admin, incentives_controller, stake_contract, underlying_token)); +// let staked_token_transfer_strategy = option::none(); +// +// let emission_per_second = 0; +// let total_supply = 0; +// let distribution_end = 0; +// +// let reward = rewards_addr; +// +// let rewards_map = std::simple_map::new(); +// +// let available_rewards_count = 0; +// +// let index = 0; +// let emission_per_second = 0; +// let last_update_timestamp = 0; +// let distribution_end = 0; +// +// let users_data = std::simple_map::new(); +// +// let reward_data = +// aave_pool::rewards_controller::create_reward_data( +// index, +// emission_per_second, +// last_update_timestamp, +// distribution_end, +// users_data, +// ); +// +// std::simple_map::upsert(&mut rewards_map, reward, reward_data); +// +// let asset_data = +// aave_pool::rewards_controller::create_asset_data( +// rewards_map, +// std::simple_map::new(), +// available_rewards_count, +// decimals, +// ); +// let asset = +// aptos_framework::object::create_object_address( +// &signer::address_of(underlying_tokens_admin_2), *string::bytes(&symbol) +// ); +// +// let id = 1; +// let reward_oracle = aave_oracle::reward_oracle::create_reward_oracle(id); +// +// let config = vector::empty(); +// let rewards_config_input = +// aave_pool::transfer_strategy::create_rewards_config_input( +// emission_per_second, +// total_supply, +// distribution_end, +// asset, +// reward, +// staked_token_transfer_strategy, +// pull_rewards_transfer_strategy, +// reward_oracle, +// ); +// vector::push_back(&mut config, rewards_config_input); +// +// aave_acl::acl_manage::grant_role( +// aave_role_super_admin, +// aave_acl::acl_manage::get_rewards_controller_admin_role_for_testing(), +// signer::address_of(periphery_account), +// ); +// +// aave_acl::acl_manage::grant_role( +// aave_role_super_admin, +// aave_acl::acl_manage::get_rewards_controller_admin_role_for_testing(), +// reward, +// ); +// +// aave_pool::rewards_controller::add_asset(rewards_addr, asset, asset_data); +// aave_pool::rewards_controller::enable_reward(rewards_addr, rewards_addr); +// +// set_emission_admin(aave_role_super_admin, rewards_addr, rewards_addr); +// +// aave_acl::acl_manage::grant_role( +// aave_role_super_admin, +// aave_acl::acl_manage::get_emission_admin_role(), +// rewards_addr, +// ); +// +// set_distribution_end( +// periphery_account, +// asset, +// rewards_addr, +// 10, +// ); +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, reward = @0x111, user_account = @0x222, new_admin = @0x1, underlying_tokens_admin = @aave_acl, underlying_tokens_admin_2 = @underlying_tokens, aptos_framework = @0x1,)] +// fun test_set_emission_per_second( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// reward: &signer, +// user_account: &signer, +// new_admin: &signer, +// underlying_tokens_admin: &signer, +// underlying_tokens_admin_2: &signer, +// aptos_framework: &signer, +// ) { +// aptos_framework::timestamp::set_time_has_started_for_testing(aptos_framework); +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// +// // mock_underlying_token_factory::test_init_module(periphery_account); +// token_base::test_init_module(periphery_account); +// +// let i = 0; +// +// let name = string_utils::format1(&b"APTOS_UNDERLYING_{}", i); +// let symbol = string_utils::format1(&b"U_{}", i); +// let decimals = 2 + i; +// let max_supply = 10000; +// +// // create a tokens admin account +// aptos_framework::account::create_account_for_test( +// signer::address_of(underlying_tokens_admin_2) +// ); +// +// aave_pool::a_token_factory::create_token( +// underlying_tokens_admin_2, +// name, +// symbol, +// decimals, +// utf8(b""), +// utf8(b""), +// signer::address_of(underlying_tokens_admin_2), +// signer::address_of(underlying_tokens_admin_2), +// ); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let mock_staked_token = +// aave_pool::staked_token::create_mock_staked_token(user_account_addr); +// +// let staked_token_transfer_strategy = +// aave_pool::transfer_strategy::create_staked_token_transfer_strategy( +// user_account_addr, +// user_account_addr, +// mock_staked_token, +// user_account_addr, +// ); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// acl_manage::add_emission_admin_role( +// aave_role_super_admin, signer::address_of(periphery_account) +// ); +// +// initialize(periphery_account, rewards_addr); +// +// let new_admin = signer::address_of(periphery_account); +// +// set_emission_admin(aave_role_super_admin, rewards_addr, new_admin); +// +// let rewards_admin = signer::address_of(underlying_tokens_admin_2); +// let incentives_controller = signer::address_of(underlying_tokens_admin_2); +// let rewards_vault = signer::address_of(underlying_tokens_admin_2); +// +// let underlying_token = signer::address_of(underlying_tokens_admin_2); +// +// let stake_contract = +// aave_pool::staked_token::create_mock_staked_token(underlying_token); +// +// let pull_rewards_transfer_strategy = +// option::some( +// aave_pool::transfer_strategy::create_pull_rewards_transfer_strategy( +// rewards_admin, incentives_controller, rewards_vault +// ), +// ); +// // let staked_token_transfer_strategy = option::some(aave_pool::transfer_strategy::create_staked_token_transfer_strategy(rewards_admin, incentives_controller, stake_contract, underlying_token)); +// let staked_token_transfer_strategy = option::none(); +// +// let emission_per_second = 0; +// let total_supply = 0; +// let distribution_end = 0; +// +// let reward = rewards_addr; +// +// let rewards_map = std::simple_map::new(); +// +// let available_rewards_count = 0; +// +// let index = 0; +// let emission_per_second = 0; +// let last_update_timestamp = 1; +// let distribution_end = 0; +// +// let users_data = std::simple_map::new(); +// +// let reward_data = +// aave_pool::rewards_controller::create_reward_data( +// index, +// emission_per_second, +// last_update_timestamp, +// distribution_end, +// users_data, +// ); +// +// std::simple_map::upsert(&mut rewards_map, reward, reward_data); +// +// let asset_data = +// aave_pool::rewards_controller::create_asset_data( +// rewards_map, +// std::simple_map::new(), +// available_rewards_count, +// decimals, +// ); +// let asset = +// aptos_framework::object::create_object_address( +// &signer::address_of(underlying_tokens_admin_2), *string::bytes(&symbol) +// ); +// +// let id = 1; +// let reward_oracle = aave_oracle::reward_oracle::create_reward_oracle(id); +// +// let config = vector::empty(); +// let rewards_config_input = +// aave_pool::transfer_strategy::create_rewards_config_input( +// emission_per_second, +// total_supply, +// distribution_end, +// asset, +// reward, +// staked_token_transfer_strategy, +// pull_rewards_transfer_strategy, +// reward_oracle, +// ); +// vector::push_back(&mut config, rewards_config_input); +// +// aave_acl::acl_manage::grant_role( +// aave_role_super_admin, +// aave_acl::acl_manage::get_rewards_controller_admin_role_for_testing(), +// signer::address_of(periphery_account), +// ); +// +// aave_acl::acl_manage::grant_role( +// aave_role_super_admin, +// aave_acl::acl_manage::get_rewards_controller_admin_role_for_testing(), +// reward, +// ); +// +// aave_pool::rewards_controller::add_asset(rewards_addr, asset, asset_data); +// aave_pool::rewards_controller::enable_reward(rewards_addr, rewards_addr); +// +// aave_acl::acl_manage::grant_role( +// aave_role_super_admin, +// aave_acl::acl_manage::get_emission_admin_role(), +// rewards_addr, +// ); +// +// let rewards_arg = vector[rewards_addr]; +// let new_emissions_per_second_arg = vector[0]; +// +// set_emission_per_second( +// periphery_account, +// asset, +// rewards_arg, +// new_emissions_per_second_arg, +// ); +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, reward = @0x111, user_account = @0x222, new_admin = @0x1, underlying_tokens_admin = @aave_acl, underlying_tokens_admin_2 = @underlying_tokens, aptos_framework = @0x1,)] +// fun test_set_claimer( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// reward: &signer, +// user_account: &signer, +// new_admin: &signer, +// underlying_tokens_admin: &signer, +// underlying_tokens_admin_2: &signer, +// aptos_framework: &signer, +// ) { +// aptos_framework::timestamp::set_time_has_started_for_testing(aptos_framework); +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// +// // mock_underlying_token_factory::test_init_module(periphery_account); +// token_base::test_init_module(periphery_account); +// +// let i = 0; +// +// let name = string_utils::format1(&b"APTOS_UNDERLYING_{}", i); +// let symbol = string_utils::format1(&b"U_{}", i); +// let decimals = 2 + i; +// let max_supply = 10000; +// +// // create a tokens admin account +// aptos_framework::account::create_account_for_test( +// signer::address_of(underlying_tokens_admin_2) +// ); +// +// aave_pool::a_token_factory::create_token( +// underlying_tokens_admin_2, +// name, +// symbol, +// decimals, +// utf8(b""), +// utf8(b""), +// signer::address_of(underlying_tokens_admin_2), +// signer::address_of(underlying_tokens_admin_2), +// ); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let mock_staked_token = +// aave_pool::staked_token::create_mock_staked_token(user_account_addr); +// +// let staked_token_transfer_strategy = +// aave_pool::transfer_strategy::create_staked_token_transfer_strategy( +// user_account_addr, +// user_account_addr, +// mock_staked_token, +// user_account_addr, +// ); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// acl_manage::add_emission_admin_role( +// aave_role_super_admin, signer::address_of(periphery_account) +// ); +// +// initialize(periphery_account, rewards_addr); +// +// let new_admin = signer::address_of(periphery_account); +// +// set_emission_admin(aave_role_super_admin, rewards_addr, new_admin); +// +// let rewards_admin = signer::address_of(underlying_tokens_admin_2); +// let incentives_controller = signer::address_of(underlying_tokens_admin_2); +// let rewards_vault = signer::address_of(underlying_tokens_admin_2); +// +// let underlying_token = signer::address_of(underlying_tokens_admin_2); +// +// let stake_contract = +// aave_pool::staked_token::create_mock_staked_token(underlying_token); +// +// let pull_rewards_transfer_strategy = +// option::some( +// aave_pool::transfer_strategy::create_pull_rewards_transfer_strategy( +// rewards_admin, incentives_controller, rewards_vault +// ), +// ); +// // let staked_token_transfer_strategy = option::some(aave_pool::transfer_strategy::create_staked_token_transfer_strategy(rewards_admin, incentives_controller, stake_contract, underlying_token)); +// let staked_token_transfer_strategy = option::none(); +// +// let emission_per_second = 0; +// let total_supply = 0; +// let distribution_end = 0; +// +// let reward = rewards_addr; +// +// let rewards_map = std::simple_map::new(); +// +// let available_rewards_count = 0; +// +// let index = 0; +// let emission_per_second = 0; +// let last_update_timestamp = 1; +// let distribution_end = 0; +// +// let users_data = std::simple_map::new(); +// +// let reward_data = +// aave_pool::rewards_controller::create_reward_data( +// index, +// emission_per_second, +// last_update_timestamp, +// distribution_end, +// users_data, +// ); +// +// std::simple_map::upsert(&mut rewards_map, reward, reward_data); +// +// let asset_data = +// aave_pool::rewards_controller::create_asset_data( +// rewards_map, +// std::simple_map::new(), +// available_rewards_count, +// decimals, +// ); +// let asset = +// aptos_framework::object::create_object_address( +// &signer::address_of(underlying_tokens_admin_2), *string::bytes(&symbol) +// ); +// +// let id = 1; +// let reward_oracle = aave_oracle::reward_oracle::create_reward_oracle(id); +// +// let config = vector::empty(); +// let rewards_config_input = +// aave_pool::transfer_strategy::create_rewards_config_input( +// emission_per_second, +// total_supply, +// distribution_end, +// asset, +// reward, +// staked_token_transfer_strategy, +// pull_rewards_transfer_strategy, +// reward_oracle, +// ); +// vector::push_back(&mut config, rewards_config_input); +// +// aave_acl::acl_manage::grant_role( +// aave_role_super_admin, +// aave_acl::acl_manage::get_rewards_controller_admin_role_for_testing(), +// signer::address_of(periphery_account), +// ); +// +// aave_acl::acl_manage::grant_role( +// aave_role_super_admin, +// aave_acl::acl_manage::get_rewards_controller_admin_role_for_testing(), +// reward, +// ); +// +// aave_pool::rewards_controller::add_asset(rewards_addr, asset, asset_data); +// aave_pool::rewards_controller::enable_reward(rewards_addr, rewards_addr); +// +// aave_acl::acl_manage::grant_role( +// aave_role_super_admin, +// aave_acl::acl_manage::get_emission_admin_role(), +// rewards_addr, +// ); +// +// let rewards_arg = vector[rewards_addr]; +// let new_emissions_per_second_arg = vector[0]; +// +// set_emission_per_second( +// periphery_account, +// asset, +// rewards_arg, +// new_emissions_per_second_arg, +// ); +// +// aave_acl::acl_manage::add_emission_admin_role( +// aave_role_super_admin, signer::address_of(aave_role_super_admin) +// ); +// +// set_claimer( +// aave_role_super_admin, +// signer::address_of(aave_role_super_admin), +// signer::address_of(aave_role_super_admin), +// ); +// } +// } diff --git a/aave-core/tests/aave-periphery/rewards_controller_tests.move b/aave-core/tests/aave-periphery/rewards_controller_tests.move index 70af0da..2106128 100644 --- a/aave-core/tests/aave-periphery/rewards_controller_tests.move +++ b/aave-core/tests/aave-periphery/rewards_controller_tests.move @@ -1,210 +1,2075 @@ -#[test_only] -module aave_pool::rewards_controller_tests { - use aave_acl::acl_manage::{Self}; - use std::signer; - use aave_mock_oracle::oracle::{create_reward_oracle}; - use aave_pool::rewards_controller::{ - initialize, - set_pull_rewards_transfer_strategy, - set_staked_token_transfer_strategy, - get_emission_manager, - get_rewards_list, - set_reward_oracle_internal - }; - - #[test(aave_role_super_admin = @aave_acl, _periphery_account = @aave_pool, _acl_fund_admin = @0x111, _user_account = @0x222, _creator = @0x1,)] - fun test_initialize( - aave_role_super_admin: &signer, - _periphery_account: &signer, - _acl_fund_admin: &signer, - _user_account: &signer, - _creator: &signer, - ) { - // init acl - acl_manage::test_init_module(aave_role_super_admin); - - let rewards_addr = signer::address_of(aave_role_super_admin); - - initialize(aave_role_super_admin, rewards_addr); - - } - - #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] - fun test_set_pull_rewards_transfer_strategy( - aave_role_super_admin: &signer, - periphery_account: &signer, - _acl_fund_admin: &signer, - user_account: &signer, - _creator: &signer, - ) { - // init acl - acl_manage::test_init_module(aave_role_super_admin); - - aave_pool::rewards_controller::initialize( - periphery_account, signer::address_of(periphery_account) - ); - - let user_account_addr = signer::address_of(user_account); - - let pull_rewards_transfer_strategy = - aave_pool::transfer_strategy::create_pull_rewards_transfer_strategy( - user_account_addr, user_account_addr, user_account_addr - ); - - let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); - - set_pull_rewards_transfer_strategy( - periphery_account, - signer::address_of(periphery_account), - pull_rewards_transfer_strategy, - rewards_addr, - ); - - } - - #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] - fun test_set_staked_token_transfer_strategy( - aave_role_super_admin: &signer, - periphery_account: &signer, - _acl_fund_admin: &signer, - user_account: &signer, - _creator: &signer, - ) { - // init acl - acl_manage::test_init_module(aave_role_super_admin); - - aave_pool::rewards_controller::initialize( - periphery_account, signer::address_of(periphery_account) - ); - - let user_account_addr = signer::address_of(user_account); - - let mock_staked_token = - aave_pool::staked_token::create_mock_staked_token(user_account_addr); - - let staked_token_transfer_strategy = - aave_pool::transfer_strategy::create_staked_token_transfer_strategy( - user_account_addr, - user_account_addr, - mock_staked_token, - user_account_addr, - ); - - let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); - - set_staked_token_transfer_strategy( - periphery_account, - signer::address_of(periphery_account), - staked_token_transfer_strategy, - rewards_addr, - ); - - } - - #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] - fun test_get_emission_manager( - aave_role_super_admin: &signer, - periphery_account: &signer, - _acl_fund_admin: &signer, - user_account: &signer, - _creator: &signer, - ) { - // init acl - acl_manage::test_init_module(aave_role_super_admin); - - aave_pool::rewards_controller::initialize( - periphery_account, signer::address_of(periphery_account) - ); - - let user_account_addr = signer::address_of(user_account); - - let mock_staked_token = - aave_pool::staked_token::create_mock_staked_token(user_account_addr); - - let _staked_token_transfer_strategy = - aave_pool::transfer_strategy::create_staked_token_transfer_strategy( - user_account_addr, - user_account_addr, - mock_staked_token, - user_account_addr, - ); - - let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); - - let emission_manager = get_emission_manager(rewards_addr); - - assert!(emission_manager == signer::address_of(periphery_account), 1); - } - - #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] - fun test_get_rewards_list( - aave_role_super_admin: &signer, - periphery_account: &signer, - _acl_fund_admin: &signer, - user_account: &signer, - _creator: &signer, - ) { - // init acl - acl_manage::test_init_module(aave_role_super_admin); - - aave_pool::rewards_controller::initialize( - periphery_account, signer::address_of(periphery_account) - ); - - let user_account_addr = signer::address_of(user_account); - - let mock_staked_token = - aave_pool::staked_token::create_mock_staked_token(user_account_addr); - - let _staked_token_transfer_strategy = - aave_pool::transfer_strategy::create_staked_token_transfer_strategy( - user_account_addr, - user_account_addr, - mock_staked_token, - user_account_addr, - ); - - let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); - - let rewards_list = get_rewards_list(rewards_addr); - - assert!(rewards_list == vector[], 1); - - } - - #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] - fun test_set_reward_oracle_internal( - aave_role_super_admin: &signer, - periphery_account: &signer, - _acl_fund_admin: &signer, - user_account: &signer, - _creator: &signer, - ) { - // init acl - acl_manage::test_init_module(aave_role_super_admin); - - aave_pool::rewards_controller::initialize( - periphery_account, signer::address_of(periphery_account) - ); - - let user_account_addr = signer::address_of(user_account); - - let mock_staked_token = - aave_pool::staked_token::create_mock_staked_token(user_account_addr); - - let _staked_token_transfer_strategy = - aave_pool::transfer_strategy::create_staked_token_transfer_strategy( - user_account_addr, - user_account_addr, - mock_staked_token, - user_account_addr, - ); - - let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); - - let reward_oracle = create_reward_oracle(1); - - set_reward_oracle_internal(rewards_addr, reward_oracle); - - } -} +// #[test_only] +// module aave_pool::rewards_controller_tests { +// use aave_acl::acl_manage::{Self}; +// use std::signer; +// use std::vector; +// use std::option::{Self, Option}; +// use std::string::utf8; +// use aptos_std::string_utils::{Self}; +// use aptos_std::simple_map; +// use aptos_framework::object::{Self, Object}; +// use aave_oracle::reward_oracle::{create_reward_oracle}; +// use aptos_framework::timestamp::set_time_has_started_for_testing; +// use aave_pool::transfer_strategy::{ +// RewardsConfigInput, +// create_staked_token_transfer_strategy, +// create_pull_rewards_transfer_strategy, +// create_rewards_config_input +// }; +// use aave_pool::rewards_controller::{ +// initialize, +// set_pull_rewards_transfer_strategy, +// set_staked_token_transfer_strategy, +// get_emission_manager, +// get_rewards_list, +// set_reward_oracle_internal, +// get_asset_decimals, +// add_asset, +// create_asset_data, +// configure_assets, +// claim_rewards, +// get_all_user_rewards, +// claim_all_rewards, +// rewards_controller_object, +// rewards_controller_address, +// RewardsControllerData, +// get_revision, +// get_reward_oracle, +// get_pull_rewards_transfer_strategy, +// get_staked_token_transfer_strategy, +// set_reward_oracle, +// set_emission_per_second, +// get_asset_index, +// set_claimer, +// get_claimer, +// test_claim_rewards_on_behalf, +// test_claim_rewards_to_self, +// get_user_rewards, +// set_distribution_end, +// get_distribution_end, +// test_claim_all_rewards_on_behalf, +// test_claim_all_rewards_to_self, +// add_to_rewards_list, +// test_handle_action +// }; +// +// #[test(aave_role_super_admin = @aave_acl, _periphery_account = @aave_pool, _acl_fund_admin = @0x111, _user_account = @0x222, _creator = @0x1,)] +// fun test_initialize( +// aave_role_super_admin: &signer, +// _periphery_account: &signer, +// _acl_fund_admin: &signer, +// _user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// +// let rewards_addr = signer::address_of(aave_role_super_admin); +// +// initialize(aave_role_super_admin, rewards_addr); +// +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_get_distribution_end( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// aptos_framework::account::create_account_for_test( +// signer::address_of(periphery_account) +// ); +// aave_pool::token_base::test_init_module(periphery_account); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// let new_distribution_end = 10; +// +// let asset_addr = signer::address_of(periphery_account); +// +// let i = 0; +// +// let name = string_utils::format1(&b"APTOS_UNDERLYING_{}", i); +// let symbol = string_utils::format1(&b"U_{}", i); +// let decimals = 2 + i; +// let max_supply = 10000; +// +// let treasury_address = @0x034; +// +// aave_pool::a_token_factory::create_token( +// periphery_account, +// name, +// symbol, +// decimals, +// utf8(b""), +// utf8(b""), +// asset_addr, +// treasury_address, +// ); +// +// let a_token_address = +// aave_pool::a_token_factory::token_address( +// signer::address_of(periphery_account), symbol +// ); +// +// let rewards = simple_map::create(); +// +// let index = 0; +// let last_update_timestamp = 1; +// let emission_per_second = 0; +// let distribution_end = 0; +// +// let users_data = std::simple_map::new(); +// +// let reward_data = +// aave_pool::rewards_controller::create_reward_data( +// index, +// emission_per_second, +// last_update_timestamp, +// distribution_end, +// users_data, +// ); +// +// std::simple_map::upsert(&mut rewards, a_token_address, reward_data); +// let available_rewards = simple_map::create(); +// let available_rewards_count = 0; +// let decimals = 10; +// +// let asset = +// create_asset_data( +// rewards, +// available_rewards, +// available_rewards_count, +// decimals, +// ); +// +// add_asset(rewards_addr, a_token_address, asset); +// +// set_distribution_end( +// periphery_account, +// a_token_address, +// a_token_address, +// new_distribution_end, +// rewards_addr, +// ); +// +// assert!( +// get_distribution_end( +// a_token_address, +// a_token_address, +// rewards_addr, +// ) == 10, +// 1, +// ); +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_set_pull_rewards_transfer_strategy( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let pull_rewards_transfer_strategy = +// aave_pool::transfer_strategy::create_pull_rewards_transfer_strategy( +// user_account_addr, user_account_addr, user_account_addr +// ); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// set_pull_rewards_transfer_strategy( +// periphery_account, +// signer::address_of(periphery_account), +// pull_rewards_transfer_strategy, +// rewards_addr, +// ); +// +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_get_pull_rewards_transfer_strategy( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let pull_rewards_transfer_strategy = +// aave_pool::transfer_strategy::create_pull_rewards_transfer_strategy( +// user_account_addr, user_account_addr, user_account_addr +// ); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// set_pull_rewards_transfer_strategy( +// periphery_account, +// signer::address_of(periphery_account), +// pull_rewards_transfer_strategy, +// rewards_addr, +// ); +// +// assert!( +// get_pull_rewards_transfer_strategy( +// signer::address_of(periphery_account), rewards_addr +// ) == pull_rewards_transfer_strategy, +// 1, +// ); +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_set_staked_token_transfer_strategy( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let mock_staked_token = +// aave_pool::staked_token::create_mock_staked_token(user_account_addr); +// +// let staked_token_transfer_strategy = +// aave_pool::transfer_strategy::create_staked_token_transfer_strategy( +// user_account_addr, +// user_account_addr, +// mock_staked_token, +// user_account_addr, +// ); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// set_staked_token_transfer_strategy( +// periphery_account, +// signer::address_of(periphery_account), +// staked_token_transfer_strategy, +// rewards_addr, +// ); +// +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_get_staked_token_transfer_strategy( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let mock_staked_token = +// aave_pool::staked_token::create_mock_staked_token(user_account_addr); +// +// let staked_token_transfer_strategy = +// aave_pool::transfer_strategy::create_staked_token_transfer_strategy( +// user_account_addr, +// user_account_addr, +// mock_staked_token, +// user_account_addr, +// ); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// set_staked_token_transfer_strategy( +// periphery_account, +// signer::address_of(periphery_account), +// staked_token_transfer_strategy, +// rewards_addr, +// ); +// +// assert!( +// get_staked_token_transfer_strategy( +// signer::address_of(periphery_account), rewards_addr +// ) == staked_token_transfer_strategy, +// 1, +// ); +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_get_emission_manager( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let mock_staked_token = +// aave_pool::staked_token::create_mock_staked_token(user_account_addr); +// +// let _staked_token_transfer_strategy = +// aave_pool::transfer_strategy::create_staked_token_transfer_strategy( +// user_account_addr, +// user_account_addr, +// mock_staked_token, +// user_account_addr, +// ); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// let emission_manager = get_emission_manager(rewards_addr); +// +// assert!(emission_manager == signer::address_of(periphery_account), 1); +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_get_rewards_list( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let mock_staked_token = +// aave_pool::staked_token::create_mock_staked_token(user_account_addr); +// +// let _staked_token_transfer_strategy = +// aave_pool::transfer_strategy::create_staked_token_transfer_strategy( +// user_account_addr, +// user_account_addr, +// mock_staked_token, +// user_account_addr, +// ); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// let rewards_list = get_rewards_list(rewards_addr); +// +// assert!(rewards_list == vector[], 1); +// +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_set_reward_oracle_internal( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let mock_staked_token = +// aave_pool::staked_token::create_mock_staked_token(user_account_addr); +// +// let _staked_token_transfer_strategy = +// aave_pool::transfer_strategy::create_staked_token_transfer_strategy( +// user_account_addr, +// user_account_addr, +// mock_staked_token, +// user_account_addr, +// ); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// let reward_oracle = create_reward_oracle(1); +// +// set_reward_oracle_internal(rewards_addr, reward_oracle); +// +// } +// +// #[test(aptos_framework = @0x1, aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_set_emission_per_second( +// aptos_framework: &signer, +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // start the timer +// set_time_has_started_for_testing(aptos_framework); +// +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// aptos_framework::account::create_account_for_test( +// signer::address_of(periphery_account) +// ); +// aave_pool::token_base::test_init_module(periphery_account); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let mock_staked_token = +// aave_pool::staked_token::create_mock_staked_token(user_account_addr); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// let reward_oracle = create_reward_oracle(1); +// +// set_reward_oracle_internal(rewards_addr, reward_oracle); +// +// let rewards = simple_map::create(); +// +// let index = 0; +// let last_update_timestamp = 1; +// let emission_per_second = 0; +// let distribution_end = 0; +// +// let users_data = std::simple_map::new(); +// +// let reward_data = +// aave_pool::rewards_controller::create_reward_data( +// index, +// emission_per_second, +// last_update_timestamp, +// distribution_end, +// users_data, +// ); +// +// let asset_addr = signer::address_of(periphery_account); +// +// let i = 0; +// +// let name = string_utils::format1(&b"APTOS_UNDERLYING_{}", i); +// let symbol = string_utils::format1(&b"U_{}", i); +// let decimals = 2 + i; +// let max_supply = 10000; +// +// let treasury_address = @0x034; +// +// aave_pool::a_token_factory::create_token( +// periphery_account, +// name, +// symbol, +// decimals, +// utf8(b""), +// utf8(b""), +// asset_addr, +// treasury_address, +// ); +// +// let a_token_address = +// aave_pool::a_token_factory::token_address( +// signer::address_of(periphery_account), symbol +// ); +// +// std::simple_map::upsert(&mut rewards, a_token_address, reward_data); +// let available_rewards = simple_map::create(); +// let available_rewards_count = 0; +// let decimals = 10; +// +// let asset = +// create_asset_data( +// rewards, +// available_rewards, +// available_rewards_count, +// decimals, +// ); +// +// add_asset(rewards_addr, a_token_address, asset); +// +// set_emission_per_second( +// periphery_account, +// a_token_address, +// vector[a_token_address], +// vector[1], +// rewards_addr, +// ) +// } +// +// #[test(aptos_framework = @0x1, aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_get_asset_index( +// aptos_framework: &signer, +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // start the timer +// set_time_has_started_for_testing(aptos_framework); +// +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// aptos_framework::account::create_account_for_test( +// signer::address_of(periphery_account) +// ); +// aave_pool::token_base::test_init_module(periphery_account); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let mock_staked_token = +// aave_pool::staked_token::create_mock_staked_token(user_account_addr); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// let reward_oracle = create_reward_oracle(1); +// +// set_reward_oracle_internal(rewards_addr, reward_oracle); +// +// let rewards = simple_map::create(); +// +// let index = 0; +// let last_update_timestamp = 1; +// let emission_per_second = 0; +// let distribution_end = 0; +// +// let users_data = std::simple_map::new(); +// +// let reward_data = +// aave_pool::rewards_controller::create_reward_data( +// index, +// emission_per_second, +// last_update_timestamp, +// distribution_end, +// users_data, +// ); +// +// let asset_addr = signer::address_of(periphery_account); +// +// let i = 0; +// +// let name = string_utils::format1(&b"APTOS_UNDERLYING_{}", i); +// let symbol = string_utils::format1(&b"U_{}", i); +// let decimals = 2 + i; +// let max_supply = 10000; +// +// let treasury_address = @0x034; +// +// aave_pool::a_token_factory::create_token( +// periphery_account, +// name, +// symbol, +// decimals, +// utf8(b""), +// utf8(b""), +// asset_addr, +// treasury_address, +// ); +// +// let a_token_address = +// aave_pool::a_token_factory::token_address( +// signer::address_of(periphery_account), symbol +// ); +// +// std::simple_map::upsert(&mut rewards, a_token_address, reward_data); +// let available_rewards = simple_map::create(); +// let available_rewards_count = 0; +// let decimals = 10; +// +// let asset = +// create_asset_data( +// rewards, +// available_rewards, +// available_rewards_count, +// decimals, +// ); +// +// add_asset(rewards_addr, a_token_address, asset); +// +// get_asset_index(a_token_address, a_token_address, rewards_addr); +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_set_reward_oracle( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let mock_staked_token = +// aave_pool::staked_token::create_mock_staked_token(user_account_addr); +// +// let _staked_token_transfer_strategy = +// aave_pool::transfer_strategy::create_staked_token_transfer_strategy( +// user_account_addr, +// user_account_addr, +// mock_staked_token, +// user_account_addr, +// ); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// let reward_oracle = create_reward_oracle(1); +// +// aave_acl::acl_manage::add_rewards_controller_admin_role( +// aave_role_super_admin, signer::address_of(periphery_account) +// ); +// +// set_reward_oracle(periphery_account, rewards_addr, reward_oracle, rewards_addr); +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_get_asset_decimals( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let mock_staked_token = +// aave_pool::staked_token::create_mock_staked_token(user_account_addr); +// +// let _staked_token_transfer_strategy = +// aave_pool::transfer_strategy::create_staked_token_transfer_strategy( +// user_account_addr, +// user_account_addr, +// mock_staked_token, +// user_account_addr, +// ); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// let reward_oracle = create_reward_oracle(1); +// +// set_reward_oracle_internal(rewards_addr, reward_oracle); +// +// let rewards = simple_map::create(); +// let available_rewards = simple_map::create(); +// let available_rewards_count = 0; +// let decimals = 10; +// +// let asset_addr = signer::address_of(periphery_account); +// +// let asset = +// create_asset_data( +// rewards, +// available_rewards, +// available_rewards_count, +// decimals, +// ); +// +// add_asset(rewards_addr, asset_addr, asset); +// +// let res = get_asset_decimals(asset_addr, rewards_addr); +// +// assert!(res == decimals, 1); +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_claim_rewards( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let mock_staked_token = +// aave_pool::staked_token::create_mock_staked_token(user_account_addr); +// +// let _staked_token_transfer_strategy = +// aave_pool::transfer_strategy::create_staked_token_transfer_strategy( +// user_account_addr, +// user_account_addr, +// mock_staked_token, +// user_account_addr, +// ); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// let reward_oracle = create_reward_oracle(1); +// +// set_reward_oracle_internal(rewards_addr, reward_oracle); +// +// let rewards = simple_map::create(); +// let available_rewards = simple_map::create(); +// let available_rewards_count = 0; +// let decimals = 10; +// +// let asset_addr = signer::address_of(periphery_account); +// +// let asset = +// create_asset_data( +// rewards, +// available_rewards, +// available_rewards_count, +// decimals, +// ); +// +// add_asset(rewards_addr, asset_addr, asset); +// +// let res = get_asset_decimals(asset_addr, rewards_addr); +// +// assert!(res == decimals, 1); +// +// claim_rewards( +// periphery_account, +// vector[asset_addr], +// 0, +// signer::address_of(periphery_account), +// signer::address_of(periphery_account), +// signer::address_of(periphery_account), +// ); +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_of_handle_action( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let mock_staked_token = +// aave_pool::staked_token::create_mock_staked_token(user_account_addr); +// +// let _staked_token_transfer_strategy = +// aave_pool::transfer_strategy::create_staked_token_transfer_strategy( +// user_account_addr, +// user_account_addr, +// mock_staked_token, +// user_account_addr, +// ); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// let reward_oracle = create_reward_oracle(1); +// +// set_reward_oracle_internal(rewards_addr, reward_oracle); +// +// let rewards = simple_map::create(); +// let available_rewards = simple_map::create(); +// let available_rewards_count = 0; +// let decimals = 10; +// +// let asset_addr = signer::address_of(periphery_account); +// +// let asset = +// create_asset_data( +// rewards, +// available_rewards, +// available_rewards_count, +// decimals, +// ); +// +// add_asset(rewards_addr, asset_addr, asset); +// +// let res = get_asset_decimals(asset_addr, rewards_addr); +// +// assert!(res == decimals, 1); +// +// test_handle_action( +// periphery_account, +// signer::address_of(periphery_account), +// 0, +// 0, +// rewards_addr, +// ); +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_get_user_rewards( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// aave_pool::token_base::test_init_module(periphery_account); +// aptos_framework::account::create_account_for_test( +// signer::address_of(periphery_account) +// ); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// let reward_oracle = create_reward_oracle(1); +// +// set_reward_oracle_internal(rewards_addr, reward_oracle); +// +// let underlying_asset_address = @0x033; +// +// let i = 0; +// +// let name = string_utils::format1(&b"APTOS_UNDERLYING_{}", i); +// let symbol = string_utils::format1(&b"U_{}", i); +// let decimals = 2 + i; +// let max_supply = 10000; +// let treasury_address = @0x034; +// +// aave_pool::a_token_factory::create_token( +// periphery_account, +// // aave_role_super_admin, +// name, +// symbol, +// decimals, +// utf8(b""), +// utf8(b""), +// underlying_asset_address, +// treasury_address, +// ); +// +// let a_token_address = +// aave_pool::a_token_factory::token_address( +// signer::address_of(periphery_account), symbol +// ); +// +// let rewards = simple_map::create(); +// let available_rewards = simple_map::create(); +// let available_rewards_count = 0; +// let decimals = 10; +// +// let users_data = std::simple_map::new(); +// +// let user_data = aave_pool::rewards_controller::create_user_data(0, 0); +// +// std::simple_map::upsert( +// &mut users_data, signer::address_of(periphery_account), user_data +// ); +// +// let index = 0; +// let last_update_timestamp = 0; +// let emission_per_second = 0; +// let distribution_end = 0; +// +// let reward_data = +// aave_pool::rewards_controller::create_reward_data( +// index, +// emission_per_second, +// last_update_timestamp, +// distribution_end, +// users_data, +// ); +// +// std::simple_map::upsert(&mut rewards, a_token_address, reward_data); +// +// let asset_addr = signer::address_of(periphery_account); +// +// let asset = +// create_asset_data( +// rewards, +// available_rewards, +// available_rewards_count, +// decimals, +// ); +// +// add_asset(rewards_addr, a_token_address, asset); +// +// get_user_rewards( +// vector[a_token_address], +// signer::address_of(periphery_account), +// a_token_address, +// rewards_addr, +// ); +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_get_all_user_rewards( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// aave_pool::token_base::test_init_module(periphery_account); +// aptos_framework::account::create_account_for_test( +// signer::address_of(periphery_account) +// ); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// let reward_oracle = create_reward_oracle(1); +// +// set_reward_oracle_internal(rewards_addr, reward_oracle); +// +// let underlying_asset_address = @0x033; +// +// let i = 0; +// +// let name = string_utils::format1(&b"APTOS_UNDERLYING_{}", i); +// let symbol = string_utils::format1(&b"U_{}", i); +// let decimals = 2 + i; +// let max_supply = 10000; +// let treasury_address = @0x034; +// +// aave_pool::a_token_factory::create_token( +// periphery_account, +// // aave_role_super_admin, +// name, +// symbol, +// decimals, +// utf8(b""), +// utf8(b""), +// underlying_asset_address, +// treasury_address, +// ); +// +// let a_token_address = +// aave_pool::a_token_factory::token_address( +// signer::address_of(periphery_account), symbol +// ); +// +// let rewards = simple_map::create(); +// let available_rewards = simple_map::create(); +// let available_rewards_count = 0; +// let decimals = 10; +// +// let asset_addr = signer::address_of(periphery_account); +// +// let users_data = std::simple_map::new(); +// +// let user_data = aave_pool::rewards_controller::create_user_data(0, 0); +// +// std::simple_map::upsert(&mut users_data, a_token_address, user_data); +// +// let index = 0; +// let last_update_timestamp = 0; +// let emission_per_second = 0; +// let distribution_end = 0; +// +// let reward_data = +// aave_pool::rewards_controller::create_reward_data( +// index, +// emission_per_second, +// last_update_timestamp, +// distribution_end, +// users_data, +// ); +// +// std::simple_map::upsert(&mut rewards, a_token_address, reward_data); +// +// let asset = +// create_asset_data( +// rewards, +// available_rewards, +// available_rewards_count, +// decimals, +// ); +// +// add_asset(rewards_addr, a_token_address, asset); +// +// add_to_rewards_list(a_token_address, rewards_addr); +// +// let (addr_vec, amount_vec) = +// get_all_user_rewards( +// vector[a_token_address], +// a_token_address, +// rewards_addr, +// ); +// +// assert!(vector::length(&addr_vec) != 0, 1); +// assert!(vector::length(&amount_vec) != 0, 1); +// } +// +// #[test(aptos_framework = @0x1, aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1, underlying_tokens_admin = @underlying_tokens,)] +// fun test_configure_assets( +// aptos_framework: &signer, +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// underlying_tokens_admin: &signer, +// ) { +// // start the timer +// set_time_has_started_for_testing(aptos_framework); +// +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// aave_pool::token_base::test_init_module(periphery_account); +// aptos_framework::account::create_account_for_test( +// signer::address_of(periphery_account) +// ); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// let reward_oracle = create_reward_oracle(1); +// +// set_reward_oracle_internal(rewards_addr, reward_oracle); +// +// let underlying_asset_address = @0x033; +// +// let underlying_token = signer::address_of(underlying_tokens_admin); +// let rewards_vault = signer::address_of(underlying_tokens_admin); +// let rewards_admin = signer::address_of(underlying_tokens_admin); +// let incentives_controller = signer::address_of(underlying_tokens_admin); +// let treasury_address = @0x034; +// +// let i = 0; +// +// let name = string_utils::format1(&b"APTOS_UNDERLYING_{}", i); +// let symbol = string_utils::format1(&b"U_{}", i); +// let decimals = 2 + i; +// let max_supply = 10000; +// let treasury_address = @0x034; +// +// aave_pool::a_token_factory::create_token( +// periphery_account, +// // aave_role_super_admin, +// name, +// symbol, +// decimals, +// utf8(b""), +// utf8(b""), +// underlying_asset_address, +// treasury_address, +// ); +// +// let a_token_address = +// aave_pool::a_token_factory::token_address( +// signer::address_of(periphery_account), symbol +// ); +// +// let pull_rewards_transfer_strategy = +// option::some( +// create_pull_rewards_transfer_strategy( +// rewards_admin, incentives_controller, rewards_vault +// ), +// ); +// +// let staked_token_transfer_strategy = option::none(); +// +// let emission_per_second = 0; +// let total_supply = 0; +// let distribution_end = 0; +// // let asset = underlying_token; +// // let reward = underlying_token; +// let asset = a_token_address; +// let reward = a_token_address; +// +// let id = 1; +// let reward_oracle = aave_oracle::reward_oracle::create_reward_oracle(id); +// +// let rewards_config_input = +// create_rewards_config_input( +// emission_per_second, +// total_supply, +// distribution_end, +// asset, +// reward, +// staked_token_transfer_strategy, +// pull_rewards_transfer_strategy, +// reward_oracle, +// ); +// +// let rewards = simple_map::create(); +// +// let users_data = std::simple_map::new(); +// +// let index = 0; +// let last_update_timestamp = 0; +// +// let reward_data = +// aave_pool::rewards_controller::create_reward_data( +// index, +// emission_per_second, +// last_update_timestamp, +// distribution_end, +// users_data, +// ); +// +// std::simple_map::upsert(&mut rewards, a_token_address, reward_data); +// +// let available_rewards = simple_map::create(); +// let available_rewards_count = 0; +// let decimals = 10; +// +// let asset_data = +// create_asset_data( +// rewards, +// available_rewards, +// available_rewards_count, +// decimals, +// ); +// +// // let asset_addr = signer::address_of(periphery_account); +// +// add_asset(rewards_addr, a_token_address, asset_data); +// +// aave_acl::acl_manage::add_rewards_controller_admin_role( +// aave_role_super_admin, signer::address_of(periphery_account) +// ); +// aave_pool::rewards_controller::enable_reward(rewards_addr, reward); +// +// configure_assets(periphery_account, vector[rewards_config_input], rewards_addr); +// } +// +// #[test(aptos_framework = @0x1, aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1, underlying_tokens_admin = @underlying_tokens,)] +// fun test_set_claimer( +// aptos_framework: &signer, +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// underlying_tokens_admin: &signer, +// ) { +// // start the timer +// set_time_has_started_for_testing(aptos_framework); +// +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// aave_pool::token_base::test_init_module(periphery_account); +// aptos_framework::account::create_account_for_test( +// signer::address_of(periphery_account) +// ); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// let reward_oracle = create_reward_oracle(1); +// +// set_reward_oracle_internal(rewards_addr, reward_oracle); +// +// let underlying_asset_address = @0x033; +// +// let underlying_token = signer::address_of(underlying_tokens_admin); +// let rewards_vault = signer::address_of(underlying_tokens_admin); +// let rewards_admin = signer::address_of(underlying_tokens_admin); +// let incentives_controller = signer::address_of(underlying_tokens_admin); +// let treasury_address = @0x034; +// +// let i = 0; +// +// let name = string_utils::format1(&b"APTOS_UNDERLYING_{}", i); +// let symbol = string_utils::format1(&b"U_{}", i); +// let decimals = 2 + i; +// let max_supply = 10000; +// let treasury_address = @0x034; +// +// aave_pool::a_token_factory::create_token( +// periphery_account, +// // aave_role_super_admin, +// name, +// symbol, +// decimals, +// utf8(b""), +// utf8(b""), +// underlying_asset_address, +// treasury_address, +// ); +// +// let a_token_address = +// aave_pool::a_token_factory::token_address( +// signer::address_of(periphery_account), symbol +// ); +// +// let pull_rewards_transfer_strategy = +// option::some( +// create_pull_rewards_transfer_strategy( +// rewards_admin, incentives_controller, rewards_vault +// ), +// ); +// +// let staked_token_transfer_strategy = option::none(); +// +// let emission_per_second = 0; +// let total_supply = 0; +// let distribution_end = 0; +// // let asset = underlying_token; +// // let reward = underlying_token; +// let asset = a_token_address; +// let reward = a_token_address; +// +// let id = 1; +// let reward_oracle = aave_oracle::reward_oracle::create_reward_oracle(id); +// +// let rewards_config_input = +// create_rewards_config_input( +// emission_per_second, +// total_supply, +// distribution_end, +// asset, +// reward, +// staked_token_transfer_strategy, +// pull_rewards_transfer_strategy, +// reward_oracle, +// ); +// +// let rewards = simple_map::create(); +// +// let users_data = std::simple_map::new(); +// +// let index = 0; +// let last_update_timestamp = 0; +// +// let reward_data = +// aave_pool::rewards_controller::create_reward_data( +// index, +// emission_per_second, +// last_update_timestamp, +// distribution_end, +// users_data, +// ); +// +// std::simple_map::upsert(&mut rewards, a_token_address, reward_data); +// +// let available_rewards = simple_map::create(); +// let available_rewards_count = 0; +// let decimals = 10; +// +// let asset_data = +// create_asset_data( +// rewards, +// available_rewards, +// available_rewards_count, +// decimals, +// ); +// +// // let asset_addr = signer::address_of(periphery_account); +// +// add_asset(rewards_addr, a_token_address, asset_data); +// +// aave_acl::acl_manage::add_rewards_controller_admin_role( +// aave_role_super_admin, signer::address_of(periphery_account) +// ); +// aave_pool::rewards_controller::enable_reward(rewards_addr, reward); +// +// acl_manage::add_emission_admin_role(aave_role_super_admin, a_token_address); +// +// set_claimer(a_token_address, a_token_address, rewards_addr); +// } +// +// #[test(aptos_framework = @0x1, aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1, underlying_tokens_admin = @underlying_tokens,)] +// fun test_get_claimer( +// aptos_framework: &signer, +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// underlying_tokens_admin: &signer, +// ) { +// // start the timer +// set_time_has_started_for_testing(aptos_framework); +// +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// aave_pool::token_base::test_init_module(periphery_account); +// aptos_framework::account::create_account_for_test( +// signer::address_of(periphery_account) +// ); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// let reward_oracle = create_reward_oracle(1); +// +// set_reward_oracle_internal(rewards_addr, reward_oracle); +// +// let underlying_asset_address = @0x033; +// +// let underlying_token = signer::address_of(underlying_tokens_admin); +// let rewards_vault = signer::address_of(underlying_tokens_admin); +// let rewards_admin = signer::address_of(underlying_tokens_admin); +// let incentives_controller = signer::address_of(underlying_tokens_admin); +// let treasury_address = @0x034; +// +// let i = 0; +// +// let name = string_utils::format1(&b"APTOS_UNDERLYING_{}", i); +// let symbol = string_utils::format1(&b"U_{}", i); +// let decimals = 2 + i; +// let max_supply = 10000; +// let treasury_address = @0x034; +// +// aave_pool::a_token_factory::create_token( +// periphery_account, +// // aave_role_super_admin, +// name, +// symbol, +// decimals, +// utf8(b""), +// utf8(b""), +// underlying_asset_address, +// treasury_address, +// ); +// +// let a_token_address = +// aave_pool::a_token_factory::token_address( +// signer::address_of(periphery_account), symbol +// ); +// +// let pull_rewards_transfer_strategy = +// option::some( +// create_pull_rewards_transfer_strategy( +// rewards_admin, incentives_controller, rewards_vault +// ), +// ); +// +// let staked_token_transfer_strategy = option::none(); +// +// let emission_per_second = 0; +// let total_supply = 0; +// let distribution_end = 0; +// // let asset = underlying_token; +// // let reward = underlying_token; +// let asset = a_token_address; +// let reward = a_token_address; +// +// let id = 1; +// let reward_oracle = aave_oracle::reward_oracle::create_reward_oracle(id); +// +// let rewards_config_input = +// create_rewards_config_input( +// emission_per_second, +// total_supply, +// distribution_end, +// asset, +// reward, +// staked_token_transfer_strategy, +// pull_rewards_transfer_strategy, +// reward_oracle, +// ); +// +// let rewards = simple_map::create(); +// +// let users_data = std::simple_map::new(); +// +// let index = 0; +// let last_update_timestamp = 0; +// +// let reward_data = +// aave_pool::rewards_controller::create_reward_data( +// index, +// emission_per_second, +// last_update_timestamp, +// distribution_end, +// users_data, +// ); +// +// std::simple_map::upsert(&mut rewards, a_token_address, reward_data); +// +// let available_rewards = simple_map::create(); +// let available_rewards_count = 0; +// let decimals = 10; +// +// let asset_data = +// create_asset_data( +// rewards, +// available_rewards, +// available_rewards_count, +// decimals, +// ); +// +// // let asset_addr = signer::address_of(periphery_account); +// +// add_asset(rewards_addr, a_token_address, asset_data); +// +// aave_acl::acl_manage::add_rewards_controller_admin_role( +// aave_role_super_admin, signer::address_of(periphery_account) +// ); +// aave_pool::rewards_controller::enable_reward(rewards_addr, reward); +// +// acl_manage::add_emission_admin_role(aave_role_super_admin, a_token_address); +// +// set_claimer(a_token_address, a_token_address, rewards_addr); +// +// assert!( +// get_claimer(a_token_address, rewards_addr) == a_token_address, +// 1, +// ); +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_claim_all_rewards( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// aave_pool::token_base::test_init_module(periphery_account); +// aptos_framework::account::create_account_for_test( +// signer::address_of(periphery_account) +// ); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// let reward_oracle = create_reward_oracle(1); +// +// let i = 0; +// +// let name_2 = string_utils::format1(&b"APTOS_UNDERLYING_2_{}", i); +// let symbol_2 = string_utils::format1(&b"U_2_{}", i); +// let decimals_2 = 2 + i; +// let max_supply_2 = 10000; +// let treasury_address = @0x034; +// +// aave_pool::a_token_factory::create_token( +// periphery_account, +// name_2, +// symbol_2, +// decimals_2, +// utf8(b"2"), +// utf8(b"2"), +// rewards_addr, +// treasury_address, +// ); +// +// let a_token_address = +// aave_pool::a_token_factory::token_address( +// signer::address_of(periphery_account), symbol_2 +// ); +// +// let index = 0; +// let last_update_timestamp = 0; +// let emission_per_second = 0; +// let total_supply = 0; +// let distribution_end = 0; +// +// let users_data = std::simple_map::new(); +// let rewards = std::simple_map::new(); +// +// let reward_data = +// aave_pool::rewards_controller::create_reward_data( +// index, +// emission_per_second, +// last_update_timestamp, +// distribution_end, +// users_data, +// ); +// +// std::simple_map::upsert(&mut rewards, a_token_address, reward_data); +// let available_rewards = simple_map::create(); +// let available_rewards_count = 0; +// let decimals = 10; +// +// let asset = +// create_asset_data( +// rewards, +// available_rewards, +// available_rewards_count, +// decimals, +// ); +// +// add_asset(rewards_addr, a_token_address, asset); +// +// claim_all_rewards( +// periphery_account, +// vector[a_token_address], +// rewards_addr, +// rewards_addr, +// ); +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_of_claim_all_rewards_on_behalf( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// aave_pool::token_base::test_init_module(periphery_account); +// aptos_framework::account::create_account_for_test( +// signer::address_of(periphery_account) +// ); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// let reward_oracle = create_reward_oracle(1); +// +// let i = 0; +// +// let name_2 = string_utils::format1(&b"APTOS_UNDERLYING_2_{}", i); +// let symbol_2 = string_utils::format1(&b"U_2_{}", i); +// let decimals_2 = 2 + i; +// let max_supply_2 = 10000; +// let treasury_address = @0x034; +// +// aave_pool::a_token_factory::create_token( +// periphery_account, +// name_2, +// symbol_2, +// decimals_2, +// utf8(b"2"), +// utf8(b"2"), +// rewards_addr, +// treasury_address, +// ); +// +// let a_token_address = +// aave_pool::a_token_factory::token_address( +// signer::address_of(periphery_account), symbol_2 +// ); +// +// let index = 0; +// let last_update_timestamp = 0; +// let emission_per_second = 0; +// let total_supply = 0; +// let distribution_end = 0; +// +// let users_data = std::simple_map::new(); +// +// let user_data = aave_pool::rewards_controller::create_user_data(0, 1); +// +// std::simple_map::upsert( +// &mut users_data, signer::address_of(periphery_account), user_data +// ); +// +// let rewards = std::simple_map::new(); +// +// let reward_data = +// aave_pool::rewards_controller::create_reward_data( +// index, +// emission_per_second, +// last_update_timestamp, +// distribution_end, +// users_data, +// ); +// +// std::simple_map::upsert(&mut rewards, a_token_address, reward_data); +// let available_rewards = simple_map::create(); +// let available_rewards_count = 0; +// let decimals = 10; +// +// let asset = +// create_asset_data( +// rewards, +// available_rewards, +// available_rewards_count, +// decimals, +// ); +// +// add_asset(rewards_addr, a_token_address, asset); +// +// acl_manage::add_emission_admin_role(aave_role_super_admin, rewards_addr); +// +// acl_manage::add_emission_admin_role( +// aave_role_super_admin, signer::address_of(periphery_account) +// ); +// +// set_claimer( +// signer::address_of(periphery_account), +// signer::address_of(periphery_account), +// rewards_addr, +// ); +// +// add_to_rewards_list(a_token_address, rewards_addr); +// +// test_claim_all_rewards_on_behalf( +// periphery_account, +// vector[a_token_address], +// signer::address_of(periphery_account), +// rewards_addr, +// rewards_addr, +// ); +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_of_test_claim_all_rewards_to_self( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// aave_pool::token_base::test_init_module(periphery_account); +// aptos_framework::account::create_account_for_test( +// signer::address_of(periphery_account) +// ); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// let reward_oracle = create_reward_oracle(1); +// +// let i = 0; +// +// let name_2 = string_utils::format1(&b"APTOS_UNDERLYING_2_{}", i); +// let symbol_2 = string_utils::format1(&b"U_2_{}", i); +// let decimals_2 = 2 + i; +// let max_supply_2 = 10000; +// let treasury_address = @0x034; +// +// aave_pool::a_token_factory::create_token( +// periphery_account, +// name_2, +// symbol_2, +// decimals_2, +// utf8(b"2"), +// utf8(b"2"), +// rewards_addr, +// treasury_address, +// ); +// +// let a_token_address = +// aave_pool::a_token_factory::token_address( +// signer::address_of(periphery_account), symbol_2 +// ); +// +// let index = 0; +// let last_update_timestamp = 0; +// let emission_per_second = 0; +// let total_supply = 0; +// let distribution_end = 0; +// +// let users_data = std::simple_map::new(); +// +// let user_data = aave_pool::rewards_controller::create_user_data(0, 1); +// +// std::simple_map::upsert( +// &mut users_data, signer::address_of(periphery_account), user_data +// ); +// +// let rewards = std::simple_map::new(); +// +// let reward_data = +// aave_pool::rewards_controller::create_reward_data( +// index, +// emission_per_second, +// last_update_timestamp, +// distribution_end, +// users_data, +// ); +// +// std::simple_map::upsert(&mut rewards, a_token_address, reward_data); +// let available_rewards = simple_map::create(); +// let available_rewards_count = 0; +// let decimals = 10; +// +// let asset = +// create_asset_data( +// rewards, +// available_rewards, +// available_rewards_count, +// decimals, +// ); +// +// add_asset(rewards_addr, a_token_address, asset); +// +// acl_manage::add_emission_admin_role(aave_role_super_admin, rewards_addr); +// +// acl_manage::add_emission_admin_role( +// aave_role_super_admin, signer::address_of(periphery_account) +// ); +// +// set_claimer( +// signer::address_of(periphery_account), +// signer::address_of(periphery_account), +// rewards_addr, +// ); +// +// add_to_rewards_list(a_token_address, rewards_addr); +// +// test_claim_all_rewards_to_self( +// periphery_account, vector[a_token_address], rewards_addr +// ); +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_of_claim_rewards_on_behalf( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// aave_pool::token_base::test_init_module(periphery_account); +// aptos_framework::account::create_account_for_test( +// signer::address_of(periphery_account) +// ); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// let reward_oracle = create_reward_oracle(1); +// +// let i = 0; +// +// let name_2 = string_utils::format1(&b"APTOS_UNDERLYING_2_{}", i); +// let symbol_2 = string_utils::format1(&b"U_2_{}", i); +// let decimals_2 = 2 + i; +// let max_supply_2 = 10000; +// let treasury_address = @0x034; +// +// aave_pool::a_token_factory::create_token( +// periphery_account, +// name_2, +// symbol_2, +// decimals_2, +// utf8(b"2"), +// utf8(b"2"), +// rewards_addr, +// treasury_address, +// ); +// +// let a_token_address = +// aave_pool::a_token_factory::token_address( +// signer::address_of(periphery_account), symbol_2 +// ); +// +// let index = 0; +// let last_update_timestamp = 0; +// let emission_per_second = 0; +// let total_supply = 0; +// let distribution_end = 0; +// +// let users_data = std::simple_map::new(); +// let rewards = std::simple_map::new(); +// +// let reward_data = +// aave_pool::rewards_controller::create_reward_data( +// index, +// emission_per_second, +// last_update_timestamp, +// distribution_end, +// users_data, +// ); +// +// std::simple_map::upsert(&mut rewards, a_token_address, reward_data); +// let available_rewards = simple_map::create(); +// let available_rewards_count = 0; +// let decimals = 10; +// +// let asset = +// create_asset_data( +// rewards, +// available_rewards, +// available_rewards_count, +// decimals, +// ); +// +// add_asset(rewards_addr, a_token_address, asset); +// +// acl_manage::add_emission_admin_role(aave_role_super_admin, rewards_addr); +// +// set_claimer(rewards_addr, signer::address_of(periphery_account), rewards_addr); +// +// test_claim_rewards_on_behalf( +// periphery_account, +// vector[a_token_address], +// 0, +// rewards_addr, +// rewards_addr, +// rewards_addr, +// rewards_addr, +// ); +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_of_claim_rewards_to_self( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// aave_pool::token_base::test_init_module(periphery_account); +// aptos_framework::account::create_account_for_test( +// signer::address_of(periphery_account) +// ); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// let reward_oracle = create_reward_oracle(1); +// +// let i = 0; +// +// let name_2 = string_utils::format1(&b"APTOS_UNDERLYING_2_{}", i); +// let symbol_2 = string_utils::format1(&b"U_2_{}", i); +// let decimals_2 = 2 + i; +// let max_supply_2 = 10000; +// let treasury_address = @0x034; +// +// aave_pool::a_token_factory::create_token( +// periphery_account, +// name_2, +// symbol_2, +// decimals_2, +// utf8(b"2"), +// utf8(b"2"), +// rewards_addr, +// treasury_address, +// ); +// +// let a_token_address = +// aave_pool::a_token_factory::token_address( +// signer::address_of(periphery_account), symbol_2 +// ); +// +// let index = 0; +// let last_update_timestamp = 0; +// let emission_per_second = 0; +// let total_supply = 0; +// let distribution_end = 0; +// +// let users_data = std::simple_map::new(); +// let rewards = std::simple_map::new(); +// +// let reward_data = +// aave_pool::rewards_controller::create_reward_data( +// index, +// emission_per_second, +// last_update_timestamp, +// distribution_end, +// users_data, +// ); +// +// std::simple_map::upsert(&mut rewards, a_token_address, reward_data); +// let available_rewards = simple_map::create(); +// let available_rewards_count = 0; +// let decimals = 10; +// +// let asset = +// create_asset_data( +// rewards, +// available_rewards, +// available_rewards_count, +// decimals, +// ); +// +// add_asset(rewards_addr, a_token_address, asset); +// +// acl_manage::add_emission_admin_role(aave_role_super_admin, rewards_addr); +// +// set_claimer(rewards_addr, signer::address_of(periphery_account), rewards_addr); +// +// test_claim_rewards_to_self( +// periphery_account, +// vector[a_token_address], +// 0, +// rewards_addr, +// rewards_addr, +// ); +// } +// +// #[test(fa_creator = @aave_pool, aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, acl_fund_admin = @0x111, user_account = @0x222)] +// fun test_rewards_controller_object( +// fa_creator: &signer, +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// acl_fund_admin: &signer, +// user_account: &signer, +// ) { +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// assert!( +// rewards_controller_object() +// == object::address_to_object( +// rewards_controller_address() +// ), +// 1, +// ); +// } +// +// #[test(fa_creator = @aave_pool, aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, acl_fund_admin = @0x111, user_account = @0x222)] +// fun test_get_revision( +// fa_creator: &signer, +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// acl_fund_admin: &signer, +// user_account: &signer, +// ) { +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// assert!(get_revision() == 1, 1); +// } +// +// #[test(aave_role_super_admin = @aave_acl, periphery_account = @aave_pool, _acl_fund_admin = @0x111, user_account = @0x222, _creator = @0x1,)] +// fun test_get_reward_oracle( +// aave_role_super_admin: &signer, +// periphery_account: &signer, +// _acl_fund_admin: &signer, +// user_account: &signer, +// _creator: &signer, +// ) { +// // init acl +// acl_manage::test_init_module(aave_role_super_admin); +// +// aave_pool::rewards_controller::initialize( +// periphery_account, signer::address_of(periphery_account) +// ); +// +// let user_account_addr = signer::address_of(user_account); +// +// let mock_staked_token = +// aave_pool::staked_token::create_mock_staked_token(user_account_addr); +// +// let _staked_token_transfer_strategy = +// aave_pool::transfer_strategy::create_staked_token_transfer_strategy( +// user_account_addr, +// user_account_addr, +// mock_staked_token, +// user_account_addr, +// ); +// +// let rewards_addr = aave_pool::rewards_controller::rewards_controller_address(); +// +// let reward_oracle = create_reward_oracle(1); +// +// set_reward_oracle_internal(rewards_addr, reward_oracle); +// +// assert!( +// get_reward_oracle(rewards_addr, rewards_addr) == reward_oracle, +// 1, +// ); +// } +// } diff --git a/aave-core/tests/aave-pool/pool_addresses_provider_tests.move b/aave-core/tests/aave-pool/pool_addresses_provider_tests.move deleted file mode 100644 index 46feacf..0000000 --- a/aave-core/tests/aave-pool/pool_addresses_provider_tests.move +++ /dev/null @@ -1,261 +0,0 @@ -#[test_only] -module aave_pool::pool_addresses_provider_tests { - use std::features::change_feature_flags_for_testing; - use std::option; - use std::signer::Self; - use std::string::Self; - use std::vector; - use aptos_framework::event::emitted_events; - - use aave_pool::pool_addresses_provider::{ - ACLAdminUpdated, - ACLManagerUpdated, - get_acl_admin, - get_acl_manager, - get_address, - get_market_id, - get_pool, - get_pool_configurator, - get_pool_data_provider, - get_price_oracle, - get_price_oracle_sentinel, - has_id_mapped_account, - MarketIdSet, - PoolConfiguratorUpdated, - PoolDataProviderUpdated, - PoolUpdated, - PriceOracleSentinelUpdated, - PriceOracleUpdated, - set_acl_admin, - set_acl_manager, - set_address, - set_market_id, - set_pool_configurator, - set_pool_data_provider, - set_pool_impl, - set_price_oracle, - set_price_oracle_sentinel, - test_init_module - }; - - const TEST_SUCCESS: u64 = 1; - const TEST_FAILED: u64 = 2; - - #[test(deployer = @aave_pool, super_admin = @aave_acl, fx = @std)] - fun test_market_id( - deployer: &signer, super_admin: &signer, fx: &signer - ) { - let new_market_id = b"MAIN_MARKET"; - // add the test events feature flag - change_feature_flags_for_testing(fx, vector[26], vector[]); - // init the module - test_init_module(deployer); - // set market id - set_market_id(super_admin, string::utf8(new_market_id)); - // check the new market id via getter - assert!( - get_market_id() == option::some(string::utf8(new_market_id)), - TEST_SUCCESS, - ); - // check emitted events - let market_id_set_events = emitted_events(); - // make sure event of type was emitted - assert!(vector::length(&market_id_set_events) == 1, TEST_SUCCESS); - } - - #[test(deployer = @aave_pool, super_admin = @aave_acl, fx = @std, new_market_id_addr = @0x3)] - fun test_set_get_address( - deployer: &signer, super_admin: &signer, fx: &signer, new_market_id_addr: &signer - ) { - let id = b"MY_ID"; - // add the test events feature flag - change_feature_flags_for_testing(fx, vector[26], vector[]); - // init the module - test_init_module(deployer); - // test get new_market_id_addr - assert!(get_address(string::utf8(id)) == option::none
(), TEST_SUCCESS); - // set market id and address - set_address(super_admin, string::utf8(id), signer::address_of(new_market_id_addr)); - // check has mapped account - assert!(has_id_mapped_account(string::utf8(id)), TEST_SUCCESS); - // test get market id address - assert!( - get_address(string::utf8(id)) - == option::some(signer::address_of(new_market_id_addr)), - TEST_SUCCESS, - ); - } - - #[test(deployer = @aave_pool, super_admin = @aave_acl, fx = @std, new_pool_impl = @0x3)] - fun test_set_get_pool( - deployer: &signer, super_admin: &signer, fx: &signer, new_pool_impl: &signer - ) { - // add the test events feature flag - change_feature_flags_for_testing(fx, vector[26], vector[]); - // init the module - test_init_module(deployer); - // test get pool address - assert!(get_pool() == option::none(), TEST_SUCCESS); - // set pool impl - set_pool_impl(super_admin, signer::address_of(new_pool_impl)); - // test get pool address - assert!( - get_pool() == option::some(signer::address_of(new_pool_impl)), - TEST_SUCCESS, - ); - // check emitted events - let events = emitted_events(); - // make sure event of type was emitted - assert!(vector::length(&events) == 1, TEST_SUCCESS); - } - - #[test(deployer = @aave_pool, super_admin = @aave_acl, fx = @std, new_pool_impl = @0x3)] - fun test_set_get_pool_configurator( - deployer: &signer, super_admin: &signer, fx: &signer, new_pool_impl: &signer - ) { - // add the test events feature flag - change_feature_flags_for_testing(fx, vector[26], vector[]); - // init the module - test_init_module(deployer); - // test get pool configurator address - assert!(get_pool_configurator() == option::none(), TEST_SUCCESS); - // set pool configurator impl - set_pool_configurator(super_admin, signer::address_of(new_pool_impl)); - // test get pool configurator address - assert!( - get_pool_configurator() == option::some(signer::address_of(new_pool_impl)), - TEST_SUCCESS, - ); - // check emitted events - let events = emitted_events(); - // make sure event of type was emitted - assert!(vector::length(&events) == 1, TEST_SUCCESS); - } - - #[test(deployer = @aave_pool, super_admin = @aave_acl, fx = @std, new_price_oracle = @0x3)] - fun test_set_get_price_oracle( - deployer: &signer, super_admin: &signer, fx: &signer, new_price_oracle: &signer - ) { - // add the test events feature flag - change_feature_flags_for_testing(fx, vector[26], vector[]); - // init the module - test_init_module(deployer); - // test get price oracle address - assert!(get_price_oracle() == option::none(), TEST_SUCCESS); - // set price oracle impl - set_price_oracle(super_admin, signer::address_of(new_price_oracle)); - // test get price oracle address - assert!( - get_price_oracle() == option::some(signer::address_of(new_price_oracle)), - TEST_SUCCESS, - ); - // check emitted events - let events = emitted_events(); - // make sure event of type was emitted - assert!(vector::length(&events) == 1, TEST_SUCCESS); - } - - #[test(deployer = @aave_pool, super_admin = @aave_acl, fx = @std, new_acl_admin = @0x3)] - fun test_set_get_acl_admin( - deployer: &signer, super_admin: &signer, fx: &signer, new_acl_admin: &signer - ) { - // add the test events feature flag - change_feature_flags_for_testing(fx, vector[26], vector[]); - // init the module - test_init_module(deployer); - // test get acl admin address - assert!(get_acl_admin() == option::none(), TEST_SUCCESS); - // set acl admin impl - set_acl_admin(super_admin, signer::address_of(new_acl_admin)); - // test acl admin address - assert!( - get_acl_admin() == option::some(signer::address_of(new_acl_admin)), - TEST_SUCCESS, - ); - // check emitted events - let events = emitted_events(); - // make sure event of type was emitted - assert!(vector::length(&events) == 1, TEST_SUCCESS); - } - - #[test(deployer = @aave_pool, super_admin = @aave_acl, fx = @std, new_acl_manager = @0x3)] - fun test_set_get_acl_manager( - deployer: &signer, super_admin: &signer, fx: &signer, new_acl_manager: &signer - ) { - // add the test events feature flag - change_feature_flags_for_testing(fx, vector[26], vector[]); - // init the module - test_init_module(deployer); - // test get acl manager address - assert!(get_acl_manager() == option::none(), TEST_SUCCESS); - // set acl manager impl - set_acl_manager(super_admin, signer::address_of(new_acl_manager)); - // test acl manager address - assert!( - get_acl_manager() == option::some(signer::address_of(new_acl_manager)), - TEST_SUCCESS, - ); - // check emitted events - let events = emitted_events(); - // make sure event of type was emitted - assert!(vector::length(&events) == 1, TEST_SUCCESS); - } - - #[test(deployer = @aave_pool, super_admin = @aave_acl, fx = @std, new_price_oracle_sentinel = @0x3)] - fun test_set_get_price_oracle_sentinel( - deployer: &signer, - super_admin: &signer, - fx: &signer, - new_price_oracle_sentinel: &signer - ) { - // add the test events feature flag - change_feature_flags_for_testing(fx, vector[26], vector[]); - // init the module - test_init_module(deployer); - // test get price oracle sentinel address - assert!(get_price_oracle_sentinel() == option::none(), TEST_SUCCESS); - // set price oracle sentinel impl - set_price_oracle_sentinel( - super_admin, signer::address_of(new_price_oracle_sentinel) - ); - // test price oracle sentinel address - assert!( - get_price_oracle_sentinel() - == option::some(signer::address_of(new_price_oracle_sentinel)), - TEST_SUCCESS, - ); - // check emitted events - let events = emitted_events(); - // make sure event of type was emitted - assert!(vector::length(&events) == 1, TEST_SUCCESS); - } - - #[test(deployer = @aave_pool, super_admin = @aave_acl, fx = @std, new_pool_data_provider_sentinel = @0x3)] - fun test_set_get_pool_data_provider_sentinel( - deployer: &signer, - super_admin: &signer, - fx: &signer, - new_pool_data_provider_sentinel: &signer - ) { - // add the test events feature flag - change_feature_flags_for_testing(fx, vector[26], vector[]); - // init the module - test_init_module(deployer); - // test get pool data provider address - assert!(get_pool_data_provider() == option::none(), TEST_SUCCESS); - // set pool data provider impl - set_pool_data_provider( - super_admin, signer::address_of(new_pool_data_provider_sentinel) - ); - // test pool data provider address - assert!( - get_pool_data_provider() - == option::some(signer::address_of(new_pool_data_provider_sentinel)), - TEST_SUCCESS, - ); - // check emitted events - let events = emitted_events(); - // make sure event of type was emitted - assert!(vector::length(&events) == 1, TEST_SUCCESS); - } -} diff --git a/aave-core/tests/aave-pool/pool_configurator_tests.move b/aave-core/tests/aave-pool/pool_configurator_tests.move index f18ef6c..93f66e4 100644 --- a/aave-core/tests/aave-pool/pool_configurator_tests.move +++ b/aave-core/tests/aave-pool/pool_configurator_tests.move @@ -2,36 +2,51 @@ module aave_pool::pool_configurator_tests { use std::features::change_feature_flags_for_testing; use std::signer; - use std::string::{utf8, String}; + use std::string::{String, utf8}; use std::vector; use aptos_std::string_utils; - use aptos_framework::event::emitted_events; use aptos_framework::account; + use aptos_framework::event::emitted_events; use aptos_framework::timestamp::set_time_has_started_for_testing; + use aave_acl::acl_manage; use aave_math::wad_ray_math; - use aave_mock_oracle::oracle::{Self}; - use aave_pool::default_reserve_interest_rate_strategy; + use aave_rate::default_reserve_interest_rate_strategy; + use aave_rate::interest_rate_strategy; use aave_pool::a_token_factory::Self; - use aave_pool::token_base; - use aave_pool::variable_debt_token_factory::Self; - use aave_pool::mock_underlying_token_factory::{Self}; - use aave_pool::collector::{Self}; + use aave_pool::collector::Self; + use aave_pool::mock_underlying_token_factory::Self; use aave_pool::pool::{get_reserves_count, ReserveInitialized}; use aave_pool::pool_configurator::Self; + use aave_pool::token_base; + use aave_pool::variable_debt_token_factory::Self; const TEST_SUCCESS: u64 = 1; const TEST_FAILED: u64 = 2; const TEST_ASSETS_COUNT: u8 = 3; - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, aave_std = @std, mock_oracle = @aave_mock_oracle, underlying_tokens_admin = @underlying_tokens,)] + #[ + test( + aave_pool = @aave_pool, + aave_rate = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_std = @std, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + underlying_tokens_admin = @underlying_tokens + ) + ] fun test_add_reserves( aave_pool: &signer, + aave_rate: &signer, aave_role_super_admin: &signer, aave_std: &signer, - mock_oracle: &signer, - underlying_tokens_admin: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, + underlying_tokens_admin: &signer ) { // create test accounts account::create_account_for_test(signer::address_of(aave_pool)); @@ -48,18 +63,27 @@ module aave_pool::pool_configurator_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); + // init a token factory + a_token_factory::test_init_module(aave_pool); + + // init debt token factory + variable_debt_token_factory::test_init_module(aave_pool); + // init underlying tokens mock_underlying_token_factory::test_init_module(aave_pool); // add the test events feature flag change_feature_flags_for_testing(aave_std, vector[26], vector[]); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); + // init rate + interest_rate_strategy::test_init_module(aave_rate); + assert!(pool_configurator::get_revision() == 1, TEST_SUCCESS); // init input data for creating pool reserves @@ -75,7 +99,7 @@ module aave_pool::pool_configurator_tests { for (i in 0..TEST_ASSETS_COUNT) { let name = string_utils::format1(&b"APTOS_UNDERLYING_{}", i); let symbol = string_utils::format1(&b"U_{}", i); - let decimals = 2 + i; + let decimals = 6; let max_supply = 10000; mock_underlying_token_factory::create_token( underlying_tokens_admin, @@ -84,7 +108,7 @@ module aave_pool::pool_configurator_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -101,7 +125,7 @@ module aave_pool::pool_configurator_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); vector::push_back(&mut underlying_assets, underlying_token_address); @@ -114,19 +138,20 @@ module aave_pool::pool_configurator_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; // create pool reserves pool_configurator::init_reserves( aave_pool, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); // check emitted events let emitted_events = emitted_events(); @@ -138,14 +163,28 @@ module aave_pool::pool_configurator_tests { assert!(get_reserves_count() == (TEST_ASSETS_COUNT as u256), TEST_SUCCESS); } - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, aave_std = @std, mock_oracle = @aave_mock_oracle, underlying_tokens_admin = @underlying_tokens,)] + #[ + test( + aave_pool = @aave_pool, + aave_rate = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_std = @std, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + underlying_tokens_admin = @underlying_tokens + ) + ] #[expected_failure(abort_code = 5)] fun test_add_reserves_wrong_sender( aave_pool: &signer, + aave_rate: &signer, aave_role_super_admin: &signer, aave_std: &signer, - mock_oracle: &signer, - underlying_tokens_admin: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, + underlying_tokens_admin: &signer ) { // create test accounts account::create_account_for_test(signer::address_of(aave_pool)); @@ -162,17 +201,25 @@ module aave_pool::pool_configurator_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); + // init a token factory + a_token_factory::test_init_module(aave_pool); + + // init debt token factory + variable_debt_token_factory::test_init_module(aave_pool); + // init underlying tokens mock_underlying_token_factory::test_init_module(aave_pool); // add the test events feature flag change_feature_flags_for_testing(aave_std, vector[26], vector[]); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); + // init rate + interest_rate_strategy::test_init_module(aave_rate); assert!(pool_configurator::get_revision() == 1, TEST_SUCCESS); @@ -189,7 +236,7 @@ module aave_pool::pool_configurator_tests { for (i in 0..TEST_ASSETS_COUNT) { let name = string_utils::format1(&b"APTOS_UNDERLYING_{}", i); let symbol = string_utils::format1(&b"U_{}", i); - let decimals = 2 + i; + let decimals = 6; let max_supply = 10000; mock_underlying_token_factory::create_token( underlying_tokens_admin, @@ -198,7 +245,7 @@ module aave_pool::pool_configurator_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -215,7 +262,7 @@ module aave_pool::pool_configurator_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); vector::push_back(&mut underlying_assets, underlying_token_address); @@ -228,29 +275,44 @@ module aave_pool::pool_configurator_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; pool_configurator::init_reserves( - mock_oracle, + aave_oracle, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); } - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, aave_std = @std, mock_oracle = @aave_mock_oracle, underlying_tokens_admin = @underlying_tokens,)] + #[ + test( + aave_pool = @aave_pool, + aave_rate = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_std = @std, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + underlying_tokens_admin = @underlying_tokens + ) + ] #[expected_failure(abort_code = 1)] fun test_drop_reserves_bad_signer( aave_pool: &signer, + aave_rate: &signer, aave_role_super_admin: &signer, aave_std: &signer, - mock_oracle: &signer, - underlying_tokens_admin: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, + underlying_tokens_admin: &signer ) { // create test accounts account::create_account_for_test(signer::address_of(aave_pool)); @@ -267,18 +329,27 @@ module aave_pool::pool_configurator_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); + // init a token factory + a_token_factory::test_init_module(aave_pool); + + // init debt token factory + variable_debt_token_factory::test_init_module(aave_pool); + // init underlying tokens mock_underlying_token_factory::test_init_module(aave_pool); // add the test events feature flag change_feature_flags_for_testing(aave_std, vector[26], vector[]); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); + // init rate + interest_rate_strategy::test_init_module(aave_rate); + assert!(pool_configurator::get_revision() == 1, TEST_SUCCESS); // init input data for creating pool reserves @@ -294,7 +365,7 @@ module aave_pool::pool_configurator_tests { for (i in 0..TEST_ASSETS_COUNT) { let name = string_utils::format1(&b"APTOS_UNDERLYING_{}", i); let symbol = string_utils::format1(&b"U_{}", i); - let decimals = 2 + i; + let decimals = 6; let max_supply = 10000; mock_underlying_token_factory::create_token( underlying_tokens_admin, @@ -303,7 +374,7 @@ module aave_pool::pool_configurator_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -320,7 +391,7 @@ module aave_pool::pool_configurator_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); vector::push_back(&mut underlying_assets, underlying_token_address); @@ -333,37 +404,52 @@ module aave_pool::pool_configurator_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; // create pool reserves pool_configurator::init_reserves( aave_pool, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); assert!(get_reserves_count() == (TEST_ASSETS_COUNT as u256), TEST_SUCCESS); // drop the first reserve pool_configurator::drop_reserve( - mock_oracle, *vector::borrow(&underlying_assets, 0) + aave_oracle, *vector::borrow(&underlying_assets, 0) ); } - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, aave_std = @std, mock_oracle = @aave_mock_oracle, underlying_tokens_admin = @underlying_tokens,)] + #[ + test( + aave_pool = @aave_pool, + aave_rate = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_std = @std, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + underlying_tokens_admin = @underlying_tokens + ) + ] #[expected_failure(abort_code = 1)] fun test_drop_reserves_with_0_supply( aave_pool: &signer, + aave_rate: &signer, aave_role_super_admin: &signer, aave_std: &signer, - mock_oracle: &signer, - underlying_tokens_admin: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, + underlying_tokens_admin: &signer ) { // create test accounts account::create_account_for_test(signer::address_of(aave_pool)); @@ -380,17 +466,25 @@ module aave_pool::pool_configurator_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); + // init a token factory + a_token_factory::test_init_module(aave_pool); + + // init debt token factory + variable_debt_token_factory::test_init_module(aave_pool); + // init underlying tokens mock_underlying_token_factory::test_init_module(aave_pool); // add the test events feature flag change_feature_flags_for_testing(aave_std, vector[26], vector[]); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); + // init rate + interest_rate_strategy::test_init_module(aave_rate); assert!(pool_configurator::get_revision() == 1, TEST_SUCCESS); @@ -407,7 +501,7 @@ module aave_pool::pool_configurator_tests { for (i in 0..TEST_ASSETS_COUNT) { let name = string_utils::format1(&b"APTOS_UNDERLYING_{}", i); let symbol = string_utils::format1(&b"U_{}", i); - let decimals = 2 + i; + let decimals = 6; let max_supply = 10000; mock_underlying_token_factory::create_token( underlying_tokens_admin, @@ -416,7 +510,7 @@ module aave_pool::pool_configurator_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -433,7 +527,7 @@ module aave_pool::pool_configurator_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); vector::push_back(&mut underlying_assets, underlying_token_address); @@ -446,42 +540,63 @@ module aave_pool::pool_configurator_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; // create pool reserves pool_configurator::init_reserves( aave_pool, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); // test reserves count assert!(get_reserves_count() == (TEST_ASSETS_COUNT as u256), TEST_SUCCESS); // drop the first reserve - pool_configurator::drop_reserve(aave_pool, *vector::borrow(&underlying_assets, 0)); + pool_configurator::drop_reserve( + aave_pool, *vector::borrow(&underlying_assets, 0) + ); // check emitted events let emitted_events = emitted_events(); // make sure event of type was emitted assert!(vector::length(&emitted_events) == 1, TEST_SUCCESS); // test reserves count - assert!(get_reserves_count() == ((TEST_ASSETS_COUNT as u256) - 1), TEST_SUCCESS); + assert!( + get_reserves_count() == ((TEST_ASSETS_COUNT as u256) - 1), + TEST_SUCCESS + ); } - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, aave_std = @std, mock_oracle = @aave_mock_oracle, underlying_tokens_admin = @underlying_tokens, caller = @0x42,)] + #[ + test( + aave_pool = @aave_pool, + aave_rate = @aave_rate, + aave_acl = @aave_acl, + aave_std = @std, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + underlying_tokens_admin = @underlying_tokens, + caller = @0x42 + ) + ] #[expected_failure(abort_code = 54)] fun test_drop_reserves_with_nonzero_supply_atokens_failure( aave_pool: &signer, - aave_role_super_admin: &signer, + aave_rate: &signer, + aave_acl: &signer, aave_std: &signer, - mock_oracle: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, underlying_tokens_admin: &signer, - caller: &signer, + caller: &signer ) { // start the timer set_time_has_started_for_testing(aave_std); @@ -490,9 +605,9 @@ module aave_pool::pool_configurator_tests { account::create_account_for_test(signer::address_of(aave_pool)); // init the acl module and make aave_pool the asset listing/pool admin - acl_manage::test_init_module(aave_role_super_admin); - acl_manage::add_asset_listing_admin(aave_role_super_admin, @aave_pool); - acl_manage::add_pool_admin(aave_role_super_admin, @aave_pool); + acl_manage::test_init_module(aave_acl); + acl_manage::add_asset_listing_admin(aave_acl, @aave_pool); + acl_manage::add_pool_admin(aave_acl, @aave_pool); // init collector collector::init_module_test(aave_pool); @@ -501,17 +616,25 @@ module aave_pool::pool_configurator_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); + // init a token factory + a_token_factory::test_init_module(aave_pool); + + // init debt token factory + variable_debt_token_factory::test_init_module(aave_pool); + // init underlying tokens mock_underlying_token_factory::test_init_module(aave_pool); // add the test events feature flag change_feature_flags_for_testing(aave_std, vector[26], vector[]); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); + // init rate + interest_rate_strategy::test_init_module(aave_rate); assert!(pool_configurator::get_revision() == 1, TEST_SUCCESS); @@ -528,7 +651,7 @@ module aave_pool::pool_configurator_tests { for (i in 0..TEST_ASSETS_COUNT) { let name = string_utils::format1(&b"APTOS_UNDERLYING_{}", i); let symbol = string_utils::format1(&b"U_{}", i); - let decimals = 2 + i; + let decimals = 6; let max_supply = 10000; mock_underlying_token_factory::create_token( underlying_tokens_admin, @@ -537,7 +660,7 @@ module aave_pool::pool_configurator_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -554,7 +677,7 @@ module aave_pool::pool_configurator_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); vector::push_back(&mut underlying_assets, underlying_token_address); @@ -567,19 +690,20 @@ module aave_pool::pool_configurator_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; // create pool reserves pool_configurator::init_reserves( aave_pool, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); // test reserves count assert!(get_reserves_count() == (TEST_ASSETS_COUNT as u256), TEST_SUCCESS); @@ -587,9 +711,11 @@ module aave_pool::pool_configurator_tests { // ============= MINT ATOKENS ============== // let a_token_symbol = *vector::borrow(&atokens_symbols, 0); let a_token_address = - a_token_factory::token_address(signer::address_of(aave_pool), a_token_symbol); + a_token_factory::token_address( + signer::address_of(aave_pool), a_token_symbol + ); let amount_to_mint: u256 = 100; - let reserve_index: u256 = 1; + let reserve_index: u256 = 1 * wad_ray_math::ray(); let amount_to_mint_scaled = wad_ray_math::ray_div(amount_to_mint, reserve_index); a_token_factory::mint( @@ -597,28 +723,46 @@ module aave_pool::pool_configurator_tests { signer::address_of(caller), amount_to_mint, reserve_index, - a_token_address, + a_token_address ); // assert a token supply assert!( - a_token_factory::scaled_total_supply(a_token_address) == amount_to_mint_scaled, - TEST_SUCCESS, + a_token_factory::scaled_total_supply(a_token_address) + == amount_to_mint_scaled, + TEST_SUCCESS ); // drop the first reserve - pool_configurator::drop_reserve(aave_pool, *vector::borrow(&underlying_assets, 0)); + pool_configurator::drop_reserve( + aave_pool, *vector::borrow(&underlying_assets, 0) + ); } - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, aave_std = @std, mock_oracle = @aave_mock_oracle, underlying_tokens_admin = @underlying_tokens, caller = @0x42,)] + #[ + test( + aave_pool = @aave_pool, + aave_rate = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_std = @std, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + underlying_tokens_admin = @underlying_tokens, + caller = @0x42 + ) + ] #[expected_failure(abort_code = 56)] fun test_drop_reserves_with_nonzero_supply_variable_tokens_failure( aave_pool: &signer, + aave_rate: &signer, aave_role_super_admin: &signer, aave_std: &signer, - mock_oracle: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, underlying_tokens_admin: &signer, - caller: &signer, + caller: &signer ) { // start the timer set_time_has_started_for_testing(aave_std); @@ -638,17 +782,25 @@ module aave_pool::pool_configurator_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); + // init a token factory + a_token_factory::test_init_module(aave_pool); + + // init debt token factory + variable_debt_token_factory::test_init_module(aave_pool); + // init underlying tokens mock_underlying_token_factory::test_init_module(aave_pool); // add the test events feature flag change_feature_flags_for_testing(aave_std, vector[26], vector[]); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); + // init rate + interest_rate_strategy::test_init_module(aave_rate); assert!(pool_configurator::get_revision() == 1, TEST_SUCCESS); @@ -665,7 +817,7 @@ module aave_pool::pool_configurator_tests { for (i in 0..TEST_ASSETS_COUNT) { let name = string_utils::format1(&b"APTOS_UNDERLYING_{}", i); let symbol = string_utils::format1(&b"U_{}", i); - let decimals = 2 + i; + let decimals = 6; let max_supply = 10000; mock_underlying_token_factory::create_token( underlying_tokens_admin, @@ -674,7 +826,7 @@ module aave_pool::pool_configurator_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -691,7 +843,7 @@ module aave_pool::pool_configurator_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); vector::push_back(&mut underlying_assets, underlying_token_address); @@ -704,19 +856,20 @@ module aave_pool::pool_configurator_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; // create pool reserves pool_configurator::init_reserves( aave_pool, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); // test reserves count assert!(get_reserves_count() == (TEST_ASSETS_COUNT as u256), TEST_SUCCESS); @@ -728,7 +881,7 @@ module aave_pool::pool_configurator_tests { signer::address_of(aave_pool), var_token_symbol ); let amount_to_mint: u256 = 100; - let reserve_index: u256 = 1; + let reserve_index: u256 = 1 * wad_ray_math::ray(); let amount_to_mint_scaled = wad_ray_math::ray_div(amount_to_mint, reserve_index); variable_debt_token_factory::mint( @@ -736,17 +889,158 @@ module aave_pool::pool_configurator_tests { signer::address_of(caller), amount_to_mint, reserve_index, - var_token_address, + var_token_address ); // assert var token supply assert!( variable_debt_token_factory::scaled_total_supply(var_token_address) == amount_to_mint_scaled, - TEST_SUCCESS, + TEST_SUCCESS ); // drop the first reserve - pool_configurator::drop_reserve(aave_pool, *vector::borrow(&underlying_assets, 0)); + pool_configurator::drop_reserve( + aave_pool, *vector::borrow(&underlying_assets, 0) + ); + } + + #[ + test( + aave_pool = @aave_pool, + aave_acl = @aave_acl, + aave_std = @std, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + underlying_tokens = @underlying_tokens, + aave_rate = @aave_rate + ) + ] + fun test_reserve_setters_getters( + aave_pool: &signer, + aave_acl: &signer, + aave_std: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, + underlying_tokens: &signer, + aave_rate: &signer + ) { + // create test accounts + account::create_account_for_test(signer::address_of(aave_pool)); + + // init the acl module and make aave_pool the asset listing/pool admin + acl_manage::test_init_module(aave_acl); + acl_manage::add_asset_listing_admin(aave_acl, @aave_pool); + acl_manage::add_pool_admin(aave_acl, @aave_pool); + + // init collector + collector::init_module_test(aave_pool); + let collector_address = collector::collector_address(); + + // init token base (a tokens and var tokens) + token_base::test_init_module(aave_pool); + + // init a token factory + aave_pool::a_token_factory::test_init_module(aave_pool); + + // init debt token factory + aave_pool::variable_debt_token_factory::test_init_module(aave_pool); + + // init underlyings token factory + aave_pool::mock_underlying_token_factory::test_init_module(aave_pool); + + // add the test events feature flag + change_feature_flags_for_testing(aave_std, vector[26], vector[]); + + // init rates - default strategy + aave_rate::default_reserve_interest_rate_strategy::init_interest_rate_strategy( + aave_rate + ); + + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); + + // init pool_configurator & reserves module + pool_configurator::test_init_module(aave_pool); + + assert!(pool_configurator::get_revision() == 1, TEST_SUCCESS); + + // init input data for creating pool reserves + let treasuries: vector
= vector[]; + + // create underlyings + let underlying_assets: vector
= vector[]; + let underlying_asset_decimals: vector = vector[]; + let atokens_names: vector = vector[]; + let atokens_symbols: vector = vector[]; + let var_tokens_names: vector = vector[]; + let var_tokens_symbols: vector = vector[]; + for (i in 0..TEST_ASSETS_COUNT) { + let name = string_utils::format1(&b"APTOS_UNDERLYING_{}", i); + let symbol = string_utils::format1(&b"U_{}", i); + let decimals = 6; + let max_supply = 10000; + mock_underlying_token_factory::create_token( + underlying_tokens, + max_supply, + name, + symbol, + decimals, + utf8(b""), + utf8(b"") + ); + + let underlying_token_address = + mock_underlying_token_factory::token_address(symbol); + + // init the default interest rate strategy for the underlying_token_address + let optimal_usage_ratio: u256 = wad_ray_math::get_half_ray_for_testing(); + let base_variable_borrow_rate: u256 = 0; + let variable_rate_slope1: u256 = 0; + let variable_rate_slope2: u256 = 0; + default_reserve_interest_rate_strategy::set_reserve_interest_rate_strategy( + aave_pool, + underlying_token_address, + optimal_usage_ratio, + base_variable_borrow_rate, + variable_rate_slope1, + variable_rate_slope2 + ); + + vector::push_back(&mut underlying_assets, underlying_token_address); + vector::push_back(&mut underlying_asset_decimals, decimals); + vector::push_back(&mut treasuries, collector_address); + vector::push_back( + &mut atokens_names, string_utils::format1(&b"APTOS_A_TOKEN_{}", i) + ); + vector::push_back(&mut atokens_symbols, string_utils::format1(&b"A_{}", i)); + vector::push_back( + &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) + ); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); + }; + + // create reserves using the pool admin + pool_configurator::init_reserves( + aave_pool, + underlying_assets, + treasuries, + atokens_names, + atokens_symbols, + var_tokens_names, + var_tokens_symbols + ); + // check emitted events + let emitted_events = emitted_events(); + // make sure event of type was emitted + assert!( + vector::length(&emitted_events) == (TEST_ASSETS_COUNT as u64), TEST_SUCCESS + ); + // test reserves count + assert!(get_reserves_count() == (TEST_ASSETS_COUNT as u256), TEST_SUCCESS); } } diff --git a/aave-core/tests/aave-pool/pool_data_provider_tests.move b/aave-core/tests/aave-pool/pool_data_provider_tests.move index 48b85e9..31aa47d 100644 --- a/aave-core/tests/aave-pool/pool_data_provider_tests.move +++ b/aave-core/tests/aave-pool/pool_data_provider_tests.move @@ -9,8 +9,7 @@ module aave_pool::pool_data_provider_tests { use aptos_framework::account; use aave_acl::acl_manage; use aave_math::wad_ray_math; - use aave_mock_oracle::oracle::{Self}; - use aave_pool::default_reserve_interest_rate_strategy; + use aave_rate::default_reserve_interest_rate_strategy; use aave_pool::a_token_factory::Self; use aave_pool::token_base; use aave_pool::variable_debt_token_factory::Self; @@ -25,13 +24,27 @@ module aave_pool::pool_data_provider_tests { const TEST_ASSETS_COUNT: u8 = 3; - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, aave_std = @std, mock_oracle = @aave_mock_oracle, underlying_tokens_admin = @underlying_tokens,)] + #[ + test( + aave_pool = @aave_pool, + aave_role_super_admin = @aave_acl, + aave_std = @std, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + underlying_tokens_admin = @underlying_tokens, + aave_rate = @aave_rate + ) + ] fun test_get_all_exposed_tokens( aave_pool: &signer, aave_role_super_admin: &signer, aave_std: &signer, - mock_oracle: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, underlying_tokens_admin: &signer, + aave_rate: &signer ) { // create test accounts account::create_account_for_test(signer::address_of(aave_pool)); @@ -48,14 +61,25 @@ module aave_pool::pool_data_provider_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); - // init underlying tokens - mock_underlying_token_factory::test_init_module(aave_pool); + // init a token factory + aave_pool::a_token_factory::test_init_module(aave_pool); + + // init debt token factory + aave_pool::variable_debt_token_factory::test_init_module(aave_pool); + + // init underlyings token factory + aave_pool::mock_underlying_token_factory::test_init_module(aave_pool); // add the test events feature flag change_feature_flags_for_testing(aave_std, vector[26], vector[]); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); + + // init rates - default strategy + aave_rate::default_reserve_interest_rate_strategy::init_interest_rate_strategy( + aave_rate + ); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); @@ -84,7 +108,7 @@ module aave_pool::pool_data_provider_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -101,7 +125,7 @@ module aave_pool::pool_data_provider_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); vector::push_back(&mut underlying_assets, underlying_token_address); @@ -114,19 +138,20 @@ module aave_pool::pool_data_provider_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; // create pool reserves pool_configurator::init_reserves( aave_pool, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); // check emitted events let emitted_events = emitted_events(); @@ -141,7 +166,7 @@ module aave_pool::pool_data_provider_tests { let all_reserve_tokens = pool_data_provider::get_all_reserves_tokens(); assert!( vector::length(&underlying_assets) == vector::length(&all_reserve_tokens), - TEST_SUCCESS, + TEST_SUCCESS ); for (i in 0..vector::length(&underlying_assets)) { let underlying_token_data = vector::borrow(&all_reserve_tokens, i); @@ -154,18 +179,19 @@ module aave_pool::pool_data_provider_tests { == mock_underlying_token_factory::token_address( underlying_token_symbol ), - TEST_SUCCESS, + TEST_SUCCESS ); assert!( - *vector::borrow(&underlying_assets, i) == underlying_token_address, - TEST_SUCCESS, + vector::contains(&underlying_assets, &underlying_token_address), + TEST_SUCCESS ); }; // get all a tokens let all_a_tokens = pool_data_provider::get_all_a_tokens(); assert!( - vector::length(&atokens_names) == vector::length(&all_a_tokens), TEST_SUCCESS + vector::length(&atokens_names) == vector::length(&all_a_tokens), + TEST_SUCCESS ); for (i in 0..vector::length(&atokens_symbols)) { let a_token_data = vector::borrow(&all_a_tokens, i); @@ -178,7 +204,7 @@ module aave_pool::pool_data_provider_tests { == a_token_factory::token_address( signer::address_of(aave_pool), a_token_symbol ), - TEST_SUCCESS, + TEST_SUCCESS ); }; @@ -186,7 +212,7 @@ module aave_pool::pool_data_provider_tests { let all_var_tokens = pool_data_provider::get_all_var_tokens(); assert!( vector::length(&var_tokens_names) == vector::length(&all_var_tokens), - TEST_SUCCESS, + TEST_SUCCESS ); for (i in 0..vector::length(&var_tokens_names)) { let var_token_data = vector::borrow(&all_var_tokens, i); @@ -199,7 +225,7 @@ module aave_pool::pool_data_provider_tests { == variable_debt_token_factory::token_address( signer::address_of(aave_pool), var_token_symbol ), - TEST_SUCCESS, + TEST_SUCCESS ); }; } diff --git a/aave-core/tests/aave-pool/pool_tests.move b/aave-core/tests/aave-pool/pool_tests.move index 712deaf..d8949a8 100644 --- a/aave-core/tests/aave-pool/pool_tests.move +++ b/aave-core/tests/aave-pool/pool_tests.move @@ -4,14 +4,14 @@ module aave_pool::pool_tests { use std::option; use std::option::Option; use std::signer::Self; - use std::string::{utf8, String}; + use std::string::{String, utf8}; use std::vector; use aptos_std::string_utils; use aptos_framework::account; use aptos_framework::event::emitted_events; use aave_acl::acl_manage::Self; - use aave_config::reserve::{ + use aave_config::reserve_config::{ get_active, get_borrow_cap, get_borrowable_in_isolation, @@ -48,9 +48,9 @@ module aave_pool::pool_tests { set_reserve_factor, set_siloed_borrowing, set_supply_cap, - set_unbacked_mint_cap, + set_unbacked_mint_cap }; - use aave_config::user::{ + use aave_config::user_config::{ is_borrowing, is_borrowing_any, is_borrowing_one, @@ -60,15 +60,14 @@ module aave_pool::pool_tests { is_using_as_collateral_one, is_using_as_collateral_or_borrowing, set_borrowing, - set_using_as_collateral, + set_using_as_collateral }; use aave_math::wad_ray_math; - use aave_mock_oracle::oracle; - use aave_pool::default_reserve_interest_rate_strategy; - use aave_pool::pool_configurator; - use aave_pool::collector; - + use aave_rate::default_reserve_interest_rate_strategy; + use aave_rate::interest_rate_strategy; use aave_pool::a_token_factory::Self; + use aave_pool::collector; + use aave_pool::mock_underlying_token_factory::Self; use aave_pool::pool::{ get_bridge_protocol_fee, get_flashloan_premium_to_protocol, @@ -93,7 +92,6 @@ module aave_pool::pool_tests { get_user_configuration, ReserveInitialized, set_bridge_protocol_fee, - update_flashloan_premiums, set_reserve_accrued_to_treasury, set_reserve_current_liquidity_rate_for_testing, set_reserve_current_variable_borrow_rate_for_testing, @@ -104,22 +102,37 @@ module aave_pool::pool_tests { set_user_configuration, test_init_reserve, test_set_reserve_configuration, + update_flashloan_premiums }; + use aave_pool::pool_configurator; use aave_pool::token_base::Self; - use aave_pool::mock_underlying_token_factory::Self; use aave_pool::variable_debt_token_factory::Self; const TEST_SUCCESS: u64 = 1; const TEST_FAILED: u64 = 2; const TEST_ASSETS_COUNT: u8 = 3; - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, aave_std = @std, mock_oracle = @aave_mock_oracle, underlying_tokens_admin = @underlying_tokens,)] + #[ + test( + aave_pool = @aave_pool, + aave_rate = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_std = @std, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + underlying_tokens = @underlying_tokens + ) + ] fun test_default_state( aave_pool: &signer, + aave_rate: &signer, aave_role_super_admin: &signer, aave_std: &signer, - mock_oracle: &signer, - underlying_tokens_admin: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, + underlying_tokens: &signer ) { // create test accounts account::create_account_for_test(signer::address_of(aave_pool)); @@ -136,18 +149,27 @@ module aave_pool::pool_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); + // init a token factory + a_token_factory::test_init_module(aave_pool); + + // init debt token factory + variable_debt_token_factory::test_init_module(aave_pool); + // init underlying tokens mock_underlying_token_factory::test_init_module(aave_pool); // add the test events feature flag change_feature_flags_for_testing(aave_std, vector[26], vector[]); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); + // init rate + interest_rate_strategy::test_init_module(aave_rate); + assert!(pool_configurator::get_revision() == 1, TEST_SUCCESS); // init input data for creating pool reserves @@ -163,16 +185,16 @@ module aave_pool::pool_tests { for (i in 0..TEST_ASSETS_COUNT) { let name = string_utils::format1(&b"APTOS_UNDERLYING_{}", i); let symbol = string_utils::format1(&b"U_{}", i); - let decimals = 2 + i; + let decimals = 6; let max_supply = 10000; mock_underlying_token_factory::create_token( - underlying_tokens_admin, + underlying_tokens, max_supply, name, symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -189,7 +211,7 @@ module aave_pool::pool_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); vector::push_back(&mut underlying_assets, underlying_token_address); @@ -202,19 +224,20 @@ module aave_pool::pool_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; // create pool reserves pool_configurator::init_reserves( aave_pool, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); // check emitted events let emitted_events = emitted_events(); @@ -225,7 +248,7 @@ module aave_pool::pool_tests { // test reserves count assert!(get_reserves_count() == (TEST_ASSETS_COUNT as u256), TEST_SUCCESS); - // get the reserve config + // get the reserve config for the first underlying and assert let underlying_asset_addr = *vector::borrow(&underlying_assets, 0); let underlying_asset_decimals = *vector::borrow(&underlying_asset_decimals, 0); let reserve_config_map = get_reserve_configuration(underlying_asset_addr); @@ -236,7 +259,7 @@ module aave_pool::pool_tests { assert!(get_liquidation_bonus(&reserve_config_map) == 0, TEST_SUCCESS); assert!( get_decimals(&reserve_config_map) == (underlying_asset_decimals as u256), - TEST_SUCCESS, + TEST_SUCCESS ); assert!(get_active(&reserve_config_map) == true, TEST_SUCCESS); assert!(get_frozen(&reserve_config_map) == false, TEST_SUCCESS); @@ -269,12 +292,15 @@ module aave_pool::pool_tests { // assert reserves list let reserves_list = get_reserves_list(); assert!(vector::length(&reserves_list) == (TEST_ASSETS_COUNT as u64), TEST_SUCCESS); - assert!(*vector::borrow(&reserves_list, 0) == underlying_asset_addr, TEST_SUCCESS); + assert!(vector::contains(&reserves_list, &underlying_asset_addr), TEST_SUCCESS); // test reserve data let a_token_symbol = *vector::borrow(&atokens_symbols, 0); let a_token_address = - a_token_factory::token_address(signer::address_of(aave_pool), a_token_symbol); + a_token_factory::token_address( + signer::address_of(aave_pool), a_token_symbol + ); + let var_token_symbol = *vector::borrow(&var_tokens_symbols, 0); let var_token_address = variable_debt_token_factory::token_address( @@ -285,14 +311,13 @@ module aave_pool::pool_tests { ); assert!(get_reserve_accrued_to_treasury(&reserve_data) == 0, TEST_SUCCESS); assert!( - get_reserve_variable_borrow_index(&reserve_data) == ( - wad_ray_math::ray() as u128 - ), - TEST_SUCCESS, + get_reserve_variable_borrow_index(&reserve_data) + == (wad_ray_math::ray() as u128), + TEST_SUCCESS ); assert!( get_reserve_liquidity_index(&reserve_data) == (wad_ray_math::ray() as u128), - TEST_SUCCESS, + TEST_SUCCESS ); assert!(get_reserve_current_liquidity_rate(&reserve_data) == 0, TEST_SUCCESS); assert!( @@ -300,7 +325,7 @@ module aave_pool::pool_tests { ); assert!( get_reserve_variable_debt_token_address(&reserve_data) == var_token_address, - TEST_SUCCESS, + TEST_SUCCESS ); assert!(get_reserve_unbacked(&reserve_data) == 0, TEST_SUCCESS); assert!(get_reserve_isolation_mode_total_debt(&reserve_data) == 0, TEST_SUCCESS); @@ -318,13 +343,27 @@ module aave_pool::pool_tests { assert!(!is_using_as_collateral_any(&user_config_map), TEST_SUCCESS); } - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, aave_std = @std, mock_oracle = @aave_mock_oracle, underlying_tokens_admin = @underlying_tokens,)] + #[ + test( + aave_pool = @aave_pool, + aave_rate = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_std = @std, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + underlying_tokens = @underlying_tokens + ) + ] fun test_modified_state( aave_pool: &signer, + aave_rate: &signer, aave_role_super_admin: &signer, aave_std: &signer, - mock_oracle: &signer, - underlying_tokens_admin: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, + underlying_tokens: &signer ) { // create test accounts account::create_account_for_test(signer::address_of(aave_pool)); @@ -341,18 +380,27 @@ module aave_pool::pool_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); + // init a token factory + a_token_factory::test_init_module(aave_pool); + + // init debt token factory + variable_debt_token_factory::test_init_module(aave_pool); + // init underlying tokens mock_underlying_token_factory::test_init_module(aave_pool); // add the test events feature flag change_feature_flags_for_testing(aave_std, vector[26], vector[]); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); + // init rate + interest_rate_strategy::test_init_module(aave_rate); + assert!(pool_configurator::get_revision() == 1, TEST_SUCCESS); // init input data for creating pool reserves @@ -371,13 +419,13 @@ module aave_pool::pool_tests { let decimals = 2 + i; let max_supply = 10000; mock_underlying_token_factory::create_token( - underlying_tokens_admin, + underlying_tokens, max_supply, name, symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -394,7 +442,7 @@ module aave_pool::pool_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); vector::push_back(&mut underlying_assets, underlying_token_address); @@ -407,26 +455,30 @@ module aave_pool::pool_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; // create pool reserves pool_configurator::init_reserves( aave_pool, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); // get tokens data let underlying_asset_addr = *vector::borrow(&underlying_assets, 0); let a_token_symbol = *vector::borrow(&atokens_symbols, 0); let a_token_address = - a_token_factory::token_address(signer::address_of(aave_pool), a_token_symbol); + a_token_factory::token_address( + signer::address_of(aave_pool), a_token_symbol + ); + let var_token_symbol = *vector::borrow(&var_tokens_symbols, 0); let var_token_address = variable_debt_token_factory::token_address( @@ -480,18 +532,23 @@ module aave_pool::pool_tests { assert!(get_flash_loan_enabled(&reserve_config_map) == true, TEST_SUCCESS); // test reserve data - set_reserve_isolation_mode_total_debt(underlying_asset_addr, 200); + set_reserve_isolation_mode_total_debt( + underlying_asset_addr, &mut reserve_data, 200 + ); set_reserve_unbacked(underlying_asset_addr, &mut reserve_data, 201); set_reserve_current_variable_borrow_rate_for_testing(underlying_asset_addr, 202); set_reserve_current_liquidity_rate_for_testing(underlying_asset_addr, 204); set_reserve_liquidity_index_for_testing(underlying_asset_addr, 205); set_reserve_variable_borrow_index_for_testing(underlying_asset_addr, 206); - set_reserve_accrued_to_treasury(underlying_asset_addr, 207); + set_reserve_accrued_to_treasury(underlying_asset_addr, &mut reserve_data, 207); let reserve_data = get_reserve_data(underlying_asset_addr); - assert!(get_reserve_isolation_mode_total_debt(&reserve_data) == 200, TEST_SUCCESS); + assert!( + get_reserve_isolation_mode_total_debt(&reserve_data) == 200, TEST_SUCCESS + ); assert!(get_reserve_unbacked(&reserve_data) == 201, TEST_SUCCESS); assert!( - get_reserve_current_variable_borrow_rate(&reserve_data) == 202, TEST_SUCCESS + get_reserve_current_variable_borrow_rate(&reserve_data) == 202, + TEST_SUCCESS ); assert!(get_reserve_current_liquidity_rate(&reserve_data) == 204, TEST_SUCCESS); assert!(get_reserve_liquidity_index(&reserve_data) == 205, TEST_SUCCESS); @@ -502,7 +559,7 @@ module aave_pool::pool_tests { ); assert!( get_reserve_variable_debt_token_address(&reserve_data) == var_token_address, - TEST_SUCCESS, + TEST_SUCCESS ); // test reserve extended config @@ -525,30 +582,44 @@ module aave_pool::pool_tests { assert!(is_borrowing_any(&user_config_map) == true, TEST_SUCCESS); assert!(is_borrowing_one(&user_config_map) == true, TEST_SUCCESS); assert!( - is_using_as_collateral_or_borrowing(&user_config_map, (reserve_index as u256)) == - true, - TEST_SUCCESS, + is_using_as_collateral_or_borrowing(&user_config_map, (reserve_index as u256)) + == true, + TEST_SUCCESS ); assert!( is_using_as_collateral(&user_config_map, (reserve_index as u256)) == true, - TEST_SUCCESS, + TEST_SUCCESS ); assert!(is_using_as_collateral_any(&user_config_map) == true, TEST_SUCCESS); assert!(is_using_as_collateral_one(&user_config_map) == true, TEST_SUCCESS); assert!( - is_using_as_collateral_or_borrowing(&user_config_map, (reserve_index as u256)) == - true, - TEST_SUCCESS, + is_using_as_collateral_or_borrowing(&user_config_map, (reserve_index as u256)) + == true, + TEST_SUCCESS ); } - #[test(aave_pool = @aave_pool, aave_role_super_admin = @aave_acl, aave_std = @std, mock_oracle = @aave_mock_oracle, underlying_tokens_admin = @underlying_tokens,)] + #[ + test( + aave_pool = @aave_pool, + aave_rate = @aave_rate, + aave_role_super_admin = @aave_acl, + aave_std = @std, + aave_oracle = @aave_oracle, + publisher = @data_feeds, + platform = @platform, + underlying_tokens = @underlying_tokens + ) + ] fun test_add_drop_reserves( aave_pool: &signer, + aave_rate: &signer, aave_role_super_admin: &signer, aave_std: &signer, - mock_oracle: &signer, - underlying_tokens_admin: &signer, + aave_oracle: &signer, + publisher: &signer, + platform: &signer, + underlying_tokens: &signer ) { // create test accounts account::create_account_for_test(signer::address_of(aave_pool)); @@ -565,18 +636,27 @@ module aave_pool::pool_tests { // init token base (a tokens and var tokens) token_base::test_init_module(aave_pool); + // init a token factory + a_token_factory::test_init_module(aave_pool); + + // init debt token factory + variable_debt_token_factory::test_init_module(aave_pool); + // init underlying tokens mock_underlying_token_factory::test_init_module(aave_pool); // add the test events feature flag change_feature_flags_for_testing(aave_std, vector[26], vector[]); - // init oracle module - oracle::test_init_oracle(mock_oracle); + // init the oracle module + aave_oracle::oracle_tests::config_oracle(aave_oracle, publisher, platform); // init pool_configurator & reserves module pool_configurator::test_init_module(aave_pool); + // init rate + interest_rate_strategy::test_init_module(aave_rate); + assert!(pool_configurator::get_revision() == 1, TEST_SUCCESS); // init input data for creating pool reserves @@ -596,13 +676,13 @@ module aave_pool::pool_tests { let decimals = 2 + i; let max_supply = 10000; mock_underlying_token_factory::create_token( - underlying_tokens_admin, + underlying_tokens, max_supply, name, symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = @@ -619,7 +699,7 @@ module aave_pool::pool_tests { optimal_usage_ratio, base_variable_borrow_rate, variable_rate_slope1, - variable_rate_slope2, + variable_rate_slope2 ); vector::push_back(&mut underlying_assets, underlying_token_address); @@ -632,27 +712,32 @@ module aave_pool::pool_tests { vector::push_back( &mut var_tokens_names, string_utils::format1(&b"APTOS_VAR_TOKEN_{}", i) ); - vector::push_back(&mut var_tokens_symbols, string_utils::format1(&b"V_{}", i)); + vector::push_back( + &mut var_tokens_symbols, string_utils::format1(&b"V_{}", i) + ); }; // create pool reserves pool_configurator::init_reserves( aave_pool, underlying_assets, - underlying_asset_decimals, treasuries, atokens_names, atokens_symbols, var_tokens_names, - var_tokens_symbols, + var_tokens_symbols ); // test reserves count assert!(get_reserves_count() == (num_reserves as u256), TEST_SUCCESS); // drop some reserves //test_drop_reserve(*vector::borrow(&underlying_assets, 0)); - pool_configurator::drop_reserve(aave_pool, *vector::borrow(&underlying_assets, 0)); - pool_configurator::drop_reserve(aave_pool, *vector::borrow(&underlying_assets, 1)); + pool_configurator::drop_reserve( + aave_pool, *vector::borrow(&underlying_assets, 0) + ); + pool_configurator::drop_reserve( + aave_pool, *vector::borrow(&underlying_assets, 1) + ); // check emitted events let emitted_events = emitted_events(); @@ -686,25 +771,25 @@ module aave_pool::pool_tests { liquidation_protocol_fee: Option, unbacked_mint_cap: Option, e_mode_category: Option, - flash_loan_enabled: Option, + flash_loan_enabled: Option ): u256 { // create a brand new reserve test_init_reserve( account, underlying_asset_addr, - (underlying_asset_decimals as u8), treasury, a_token_name, a_token_symbol, variable_debt_token_name, - variable_debt_token_symbol, + variable_debt_token_symbol ); // create reserve configuration let reserve_config_new = init(); set_ltv(&mut reserve_config_new, option::get_with_default(<v, 100)); set_liquidation_threshold( - &mut reserve_config_new, option::get_with_default(&liquidation_threshold, 101) + &mut reserve_config_new, + option::get_with_default(&liquidation_threshold, 101) ); set_liquidation_bonus( &mut reserve_config_new, option::get_with_default(&liquidation_bonus, 102) @@ -715,13 +800,14 @@ module aave_pool::pool_tests { set_paused(&mut reserve_config_new, option::get_with_default(&paused, false)); set_borrowable_in_isolation( &mut reserve_config_new, - option::get_with_default(&borrowable_in_isolation, false), + option::get_with_default(&borrowable_in_isolation, false) ); set_siloed_borrowing( &mut reserve_config_new, option::get_with_default(&siloed_borrowing, false) ); set_borrowing_enabled( - &mut reserve_config_new, option::get_with_default(&borrowing_enabled, false) + &mut reserve_config_new, + option::get_with_default(&borrowing_enabled, false) ); set_reserve_factor( &mut reserve_config_new, option::get_with_default(&reserve_factor, 104) @@ -737,7 +823,7 @@ module aave_pool::pool_tests { ); set_liquidation_protocol_fee( &mut reserve_config_new, - option::get_with_default(&liquidation_protocol_fee, 108), + option::get_with_default(&liquidation_protocol_fee, 108) ); set_unbacked_mint_cap( &mut reserve_config_new, option::get_with_default(&unbacked_mint_cap, 109) @@ -746,7 +832,8 @@ module aave_pool::pool_tests { &mut reserve_config_new, option::get_with_default(&e_mode_category, 0) ); set_flash_loan_enabled( - &mut reserve_config_new, option::get_with_default(&flash_loan_enabled, true) + &mut reserve_config_new, + option::get_with_default(&flash_loan_enabled, true) ); // set the reserve configuration @@ -761,18 +848,18 @@ module aave_pool::pool_tests { user: address, reserve_index: u256, is_borrowing: Option, - is_using_as_collateral: Option, + is_using_as_collateral: Option ) { let user_config_map = get_user_configuration(user); set_borrowing( &mut user_config_map, reserve_index, - option::get_with_default(&is_borrowing, false), + option::get_with_default(&is_borrowing, false) ); set_using_as_collateral( &mut user_config_map, reserve_index, - option::get_with_default(&is_using_as_collateral, false), + option::get_with_default(&is_using_as_collateral, false) ); // set the user configuration set_user_configuration(user, user_config_map); diff --git a/aave-core/tests/aave-tokens/a_token_factory_tests.move b/aave-core/tests/aave-tokens/a_token_factory_tests.move index f4adf32..d11601b 100644 --- a/aave-core/tests/aave-tokens/a_token_factory_tests.move +++ b/aave-core/tests/aave-tokens/a_token_factory_tests.move @@ -5,6 +5,7 @@ module aave_pool::a_token_factory_tests { use std::string; use std::string::utf8; use std::vector::Self; + use aptos_std::string_utils::format2; use aptos_framework::account; use aptos_framework::event::emitted_events; use aptos_framework::fungible_asset::Metadata; @@ -22,12 +23,21 @@ module aave_pool::a_token_factory_tests { const TEST_SUCCESS: u64 = 1; const TEST_FAILED: u64 = 2; - #[test(aave_pool = @aave_pool, a_tokens_admin = @a_tokens, aave_std = @std, aptos_framework = @0x1,)] + #[ + test( + aave_pool = @aave_pool, + a_tokens_admin = @aave_pool, + aave_acl = @aave_acl, + aave_std = @std, + aptos_framework = @0x1 + ) + ] fun test_atoken_initialization( aave_pool: &signer, a_tokens_admin: &signer, + aave_acl: &signer, aave_std: &signer, - aptos_framework: &signer, + aptos_framework: &signer ) { // start the timer set_time_has_started_for_testing(aptos_framework); @@ -41,6 +51,15 @@ module aave_pool::a_token_factory_tests { // init token base token_base::test_init_module(aave_pool); + // init a token + a_token_factory::test_init_module(aave_pool); + + // set asset listing admin + acl_manage::test_init_module(aave_acl); + acl_manage::add_asset_listing_admin( + aave_acl, signer::address_of(a_tokens_admin) + ); + // create a tokens let name = utf8(b"TEST_A_TOKEN_1"); let symbol = utf8(b"A1"); @@ -55,7 +74,7 @@ module aave_pool::a_token_factory_tests { utf8(b""), utf8(b""), underlying_asset_address, - treasury_address, + treasury_address ); // check emitted events let emitted_events = emitted_events(); @@ -65,51 +84,61 @@ module aave_pool::a_token_factory_tests { let a_token_address = a_token_factory::token_address(signer::address_of(a_tokens_admin), symbol); let a_token_metadata = - a_token_factory::get_metadata_by_symbol( - signer::address_of(a_tokens_admin), symbol - ); - let seed = *string::bytes(&symbol); + a_token_factory::asset_metadata(signer::address_of(a_tokens_admin), symbol); + let seed = *string::bytes(&format2(&b"{}_{}", symbol, 1)); let resource_account = account::create_resource_address(&signer::address_of(a_tokens_admin), seed); assert!( object::address_to_object(a_token_address) == a_token_metadata, - TEST_SUCCESS, + TEST_SUCCESS ); assert!(a_token_factory::get_revision() == 1, TEST_SUCCESS); assert!(a_token_factory::decimals(a_token_address) == decimals, TEST_SUCCESS); assert!(a_token_factory::symbol(a_token_address) == symbol, TEST_SUCCESS); assert!(a_token_factory::name(a_token_address) == name, TEST_SUCCESS); assert!( - a_token_factory::get_metadata_by_symbol( - signer::address_of(a_tokens_admin), symbol - ) == a_token_metadata, - TEST_SUCCESS, + a_token_factory::asset_metadata(signer::address_of(a_tokens_admin), symbol) + == a_token_metadata, + TEST_SUCCESS ); assert!( a_token_factory::get_underlying_asset_address(a_token_address) == underlying_asset_address, - TEST_SUCCESS, + TEST_SUCCESS ); assert!( a_token_factory::get_reserve_treasury_address(a_token_address) == treasury_address, - TEST_SUCCESS, + TEST_SUCCESS ); assert!( - a_token_factory::get_token_account_address(a_token_address) == resource_account, - TEST_SUCCESS, + a_token_factory::get_token_account_address(a_token_address) + == resource_account, + TEST_SUCCESS ); } - #[test(aave_pool = @aave_pool, a_tokens_admin = @a_tokens, aave_std = @std, aptos_framework = @0x1, token_receiver = @0x42, caller = @0x41, underlying_tokens_admin = @underlying_tokens)] + #[ + test( + aave_pool = @aave_pool, + a_tokens_admin = @aave_pool, + aave_acl = @aave_acl, + aave_std = @std, + aptos_framework = @0x1, + token_receiver = @0x42, + caller = @0x41, + underlying_tokens_admin = @underlying_tokens + ) + ] fun test_atoken_mint_burn_transfer( aave_pool: &signer, a_tokens_admin: &signer, + aave_acl: &signer, aave_std: &signer, aptos_framework: &signer, token_receiver: &signer, caller: &signer, - underlying_tokens_admin: &signer, + underlying_tokens_admin: &signer ) { // start the timer set_time_has_started_for_testing(aptos_framework); @@ -124,6 +153,15 @@ module aave_pool::a_token_factory_tests { mock_underlying_token_factory::test_init_module(aave_pool); token_base::test_init_module(aave_pool); + // init a token + a_token_factory::test_init_module(aave_pool); + + // set asset listing admin + acl_manage::test_init_module(aave_acl); + acl_manage::add_asset_listing_admin( + aave_acl, signer::address_of(a_tokens_admin) + ); + let name = utf8(b"TOKEN_1"); let symbol = utf8(b"T1"); let decimals = 3; @@ -135,23 +173,10 @@ module aave_pool::a_token_factory_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_asset_address = mock_underlying_token_factory::token_address(symbol); - let amount_to_mint: u256 = 100; - let seed = *string::bytes(&utf8(b"A2")); - let resource_account = - account::create_resource_address(&signer::address_of(a_tokens_admin), seed); - - // mint resource_account - mock_underlying_token_factory::mint( - underlying_tokens_admin, - resource_account, - // a_token_factory::get_token_account_address(a_token_address), - (amount_to_mint as u64), - underlying_asset_address, - ); // create a_tokens let name = utf8(b"TEST_A_TOKEN_2"); @@ -167,7 +192,7 @@ module aave_pool::a_token_factory_tests { utf8(b""), utf8(b""), underlying_asset_address, - treasury_address, + treasury_address ); // check emitted events let emitted_events = emitted_events(); @@ -177,43 +202,50 @@ module aave_pool::a_token_factory_tests { let a_token_address = a_token_factory::token_address(signer::address_of(a_tokens_admin), symbol); let a_token_metadata = - a_token_factory::get_metadata_by_symbol( - signer::address_of(a_tokens_admin), symbol - ); - let seed = *string::bytes(&symbol); + a_token_factory::asset_metadata(signer::address_of(a_tokens_admin), symbol); + let seed = *string::bytes(&format2(&b"{}_{}", symbol, 1)); let resource_account = account::create_resource_address(&signer::address_of(a_tokens_admin), seed); assert!( - a_token_factory::get_metadata_by_symbol( - signer::address_of(a_tokens_admin), symbol - ) == a_token_metadata, - TEST_SUCCESS, + a_token_factory::asset_metadata(signer::address_of(a_tokens_admin), symbol) + == a_token_metadata, + TEST_SUCCESS ); assert!( a_token_factory::get_underlying_asset_address(a_token_address) == underlying_asset_address, - TEST_SUCCESS, + TEST_SUCCESS ); assert!( a_token_factory::get_reserve_treasury_address(a_token_address) == treasury_address, - TEST_SUCCESS, + TEST_SUCCESS ); assert!( - a_token_factory::get_token_account_address(a_token_address) == resource_account, - TEST_SUCCESS, + a_token_factory::get_token_account_address(a_token_address) + == resource_account, + TEST_SUCCESS + ); + + // mint resource_account + let amount_to_mint: u256 = 100; + mock_underlying_token_factory::mint( + underlying_tokens_admin, + a_token_factory::get_token_account_address(a_token_address), + (amount_to_mint as u64), + underlying_asset_address ); // ============= MINT ATOKENS ============== // let amount_to_mint: u256 = 100; - let reserve_index: u256 = 1; + let reserve_index: u256 = 1 * wad_ray_math::ray(); a_token_factory::mint( signer::address_of(caller), signer::address_of(token_receiver), amount_to_mint, reserve_index, - a_token_address, + a_token_address ); // get atoken scaled amount @@ -221,8 +253,9 @@ module aave_pool::a_token_factory_tests { // assert a token supply assert!( - a_token_factory::scaled_total_supply(a_token_address) == atoken_amount_scaled, - TEST_SUCCESS, + a_token_factory::scaled_total_supply(a_token_address) + == atoken_amount_scaled, + TEST_SUCCESS ); // assert a_tokens receiver balance @@ -230,7 +263,7 @@ module aave_pool::a_token_factory_tests { a_token_factory::scaled_balance_of( signer::address_of(token_receiver), a_token_address ) == atoken_amount_scaled, - TEST_SUCCESS, + TEST_SUCCESS ); // check emitted events @@ -249,7 +282,7 @@ module aave_pool::a_token_factory_tests { signer::address_of(token_receiver), amount_to_burn, reserve_index, - a_token_address, + a_token_address ); let remaining_amount = amount_to_mint - amount_to_burn; @@ -258,8 +291,9 @@ module aave_pool::a_token_factory_tests { // assert a token supply assert!( - a_token_factory::scaled_total_supply(a_token_address) == remaining_amount_scaled, - TEST_SUCCESS, + a_token_factory::scaled_total_supply(a_token_address) + == remaining_amount_scaled, + TEST_SUCCESS ); // assert a_tokens receiver balance @@ -267,7 +301,7 @@ module aave_pool::a_token_factory_tests { a_token_factory::scaled_balance_of( signer::address_of(token_receiver), a_token_address ) == remaining_amount_scaled, - TEST_SUCCESS, + TEST_SUCCESS ); // check emitted events @@ -288,12 +322,12 @@ module aave_pool::a_token_factory_tests { transfer_receiver, 20, reserve_index, - a_token_address, + a_token_address ); assert!( a_token_factory::scaled_balance_of(transfer_receiver, a_token_address) == transfer_receiver_amount_scaled, - TEST_SUCCESS, + TEST_SUCCESS ); // assert token sender @@ -303,7 +337,7 @@ module aave_pool::a_token_factory_tests { a_token_factory::scaled_balance_of( signer::address_of(token_receiver), a_token_address ) == transfer_sender_scaled_balance, - TEST_SUCCESS, + TEST_SUCCESS ); // check emitted events @@ -311,14 +345,25 @@ module aave_pool::a_token_factory_tests { assert!(vector::length(&emitted_transfer_events) == 3, TEST_SUCCESS); } - #[test(aave_pool = @aave_pool, a_tokens_admin = @a_tokens, aave_std = @std, aptos_framework = @0x1, token_receiver = @0x42, caller = @0x41,)] + #[ + test( + aave_pool = @aave_pool, + a_tokens_admin = @aave_pool, + aave_acl = @aave_acl, + aave_std = @std, + aptos_framework = @0x1, + token_receiver = @0x42, + caller = @0x41 + ) + ] fun test_atoken_transfer_on_liquidation( aave_pool: &signer, a_tokens_admin: &signer, + aave_acl: &signer, aave_std: &signer, aptos_framework: &signer, token_receiver: &signer, - caller: &signer, + caller: &signer ) { // start the timer set_time_has_started_for_testing(aptos_framework); @@ -329,6 +374,14 @@ module aave_pool::a_token_factory_tests { // init token base token_base::test_init_module(aave_pool); + // init a token + a_token_factory::test_init_module(aave_pool); + + // set asset listing admin + acl_manage::test_init_module(aave_acl); + acl_manage::add_asset_listing_admin( + aave_acl, signer::address_of(a_tokens_admin) + ); // create a tokens admin account account::create_account_for_test(signer::address_of(a_tokens_admin)); @@ -346,7 +399,7 @@ module aave_pool::a_token_factory_tests { utf8(b""), utf8(b""), underlying_asset_address, - treasury_address, + treasury_address ); // check emitted events @@ -357,39 +410,37 @@ module aave_pool::a_token_factory_tests { // check addresses let a_token_metadata = - a_token_factory::get_metadata_by_symbol( - signer::address_of(a_tokens_admin), symbol - ); + a_token_factory::asset_metadata(signer::address_of(a_tokens_admin), symbol); let a_token_address = a_token_factory::token_address(signer::address_of(a_tokens_admin), symbol); - let seed = *string::bytes(&symbol); + let seed = *string::bytes(&format2(&b"{}_{}", symbol, 1)); let resource_account = account::create_resource_address(&signer::address_of(a_tokens_admin), seed); assert!( - a_token_factory::get_metadata_by_symbol( - signer::address_of(a_tokens_admin), symbol - ) == a_token_metadata, - TEST_SUCCESS, + a_token_factory::asset_metadata(signer::address_of(a_tokens_admin), symbol) + == a_token_metadata, + TEST_SUCCESS ); assert!( a_token_factory::get_underlying_asset_address(a_token_address) == underlying_asset_address, - TEST_SUCCESS, + TEST_SUCCESS ); assert!( a_token_factory::get_reserve_treasury_address(a_token_address) == treasury_address, - TEST_SUCCESS, + TEST_SUCCESS ); assert!( - a_token_factory::get_token_account_address(a_token_address) == resource_account, - TEST_SUCCESS, + a_token_factory::get_token_account_address(a_token_address) + == resource_account, + TEST_SUCCESS ); // ============= MINT ATOKENS ============== // let amount_to_mint: u256 = 100; - let reserve_index: u256 = 1; + let reserve_index: u256 = 1 * wad_ray_math::ray(); let amount_to_mint_scaled = wad_ray_math::ray_div(amount_to_mint, reserve_index); a_token_factory::mint( @@ -397,13 +448,14 @@ module aave_pool::a_token_factory_tests { signer::address_of(token_receiver), amount_to_mint, reserve_index, - a_token_address, + a_token_address ); // assert a token supply assert!( - a_token_factory::scaled_total_supply(a_token_address) == amount_to_mint_scaled, - TEST_SUCCESS, + a_token_factory::scaled_total_supply(a_token_address) + == amount_to_mint_scaled, + TEST_SUCCESS ); // assert a_tokens receiver balance @@ -411,13 +463,13 @@ module aave_pool::a_token_factory_tests { a_token_factory::scaled_balance_of( signer::address_of(token_receiver), a_token_address ) == amount_to_mint_scaled, - TEST_SUCCESS, + TEST_SUCCESS ); assert!( a_token_factory::scaled_balance_of( signer::address_of(token_receiver), a_token_address ) == amount_to_mint_scaled, - TEST_SUCCESS, + TEST_SUCCESS ); // check emitted events @@ -435,14 +487,14 @@ module aave_pool::a_token_factory_tests { a_token_factory::transfer_on_liquidation( signer::address_of(token_receiver), transfer_receiver, - 20, - 1, - a_token_address, + transfer_amount, + reserve_index, + a_token_address ); assert!( a_token_factory::scaled_balance_of(transfer_receiver, a_token_address) == transfer_receiver_amount_scaled, - TEST_SUCCESS, + TEST_SUCCESS ); // assert token sender @@ -452,7 +504,7 @@ module aave_pool::a_token_factory_tests { a_token_factory::scaled_balance_of( signer::address_of(token_receiver), a_token_address ) == transfer_sender_scaled_balance, - TEST_SUCCESS, + TEST_SUCCESS ); // check emitted events @@ -460,12 +512,21 @@ module aave_pool::a_token_factory_tests { assert!(vector::length(&emitted_transfer_events) == 2, TEST_SUCCESS); } - #[test(aave_pool = @aave_pool, a_tokens_admin = @a_tokens, aave_std = @std, aptos_framework = @0x1,)] + #[ + test( + aave_pool = @aave_pool, + a_tokens_admin = @aave_pool, + aave_acl = @aave_acl, + aave_std = @std, + aptos_framework = @0x1 + ) + ] fun test_atoken_mint_to_treasury( aave_pool: &signer, a_tokens_admin: &signer, + aave_acl: &signer, aave_std: &signer, - aptos_framework: &signer, + aptos_framework: &signer ) { // start the timer set_time_has_started_for_testing(aptos_framework); @@ -479,6 +540,15 @@ module aave_pool::a_token_factory_tests { // init token base token_base::test_init_module(aave_pool); + // init a token + a_token_factory::test_init_module(aave_pool); + + // set asset listing admin + acl_manage::test_init_module(aave_acl); + acl_manage::add_asset_listing_admin( + aave_acl, signer::address_of(a_tokens_admin) + ); + // create a tokens let name = utf8(b"TEST_A_TOKEN_4"); let symbol = utf8(b"A4"); @@ -493,7 +563,7 @@ module aave_pool::a_token_factory_tests { utf8(b""), utf8(b""), underlying_asset_address, - treasury_address, + treasury_address ); // check emitted events @@ -504,39 +574,49 @@ module aave_pool::a_token_factory_tests { let a_token_address = a_token_factory::token_address(signer::address_of(a_tokens_admin), symbol); let _a_token_metadata = - a_token_factory::get_metadata_by_symbol( - signer::address_of(a_tokens_admin), symbol - ); + a_token_factory::asset_metadata(signer::address_of(a_tokens_admin), symbol); // ============= MINT TO TREASURY ============== // let amount_to_mint: u256 = 100; - let reserve_index: u256 = 1; + let reserve_index: u256 = 1 * wad_ray_math::ray(); let amount_to_mint_scaled = wad_ray_math::ray_div(amount_to_mint, reserve_index); // mint to treasury - a_token_factory::mint_to_treasury(amount_to_mint, reserve_index, a_token_address); + a_token_factory::mint_to_treasury( + amount_to_mint, reserve_index, a_token_address + ); // check balances assert!( a_token_factory::scaled_balance_of(treasury_address, a_token_address) == amount_to_mint_scaled, - TEST_SUCCESS, + TEST_SUCCESS ); assert!( a_token_factory::scaled_balance_of(treasury_address, a_token_address) == amount_to_mint_scaled, - TEST_SUCCESS, + TEST_SUCCESS ); } - #[test(aave_pool = @aave_pool, a_tokens_admin = @a_tokens, aave_std = @std, aptos_framework = @0x1, underlying_tokens_admin = @underlying_tokens,)] + #[ + test( + aave_pool = @aave_pool, + a_tokens_admin = @aave_pool, + aave_acl = @aave_acl, + aave_std = @std, + aptos_framework = @0x1, + underlying_tokens_admin = @underlying_tokens + ) + ] fun test_atoken_transfer_underlying_to( aave_pool: &signer, a_tokens_admin: &signer, + aave_acl: &signer, aave_std: &signer, aptos_framework: &signer, - underlying_tokens_admin: &signer, + underlying_tokens_admin: &signer ) { // start the timer set_time_has_started_for_testing(aptos_framework); @@ -562,7 +642,7 @@ module aave_pool::a_token_factory_tests { underlying_token_symbol, underlying_token_decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = mock_underlying_token_factory::token_address(underlying_token_symbol); @@ -570,6 +650,15 @@ module aave_pool::a_token_factory_tests { // init token base token_base::test_init_module(aave_pool); + // init a token + a_token_factory::test_init_module(aave_pool); + + // set asset listing admin + acl_manage::test_init_module(aave_acl); + acl_manage::add_asset_listing_admin( + aave_acl, signer::address_of(a_tokens_admin) + ); + // create a tokens let name = utf8(b"TEST_A_TOKEN_6"); let symbol = utf8(b"A6"); @@ -583,7 +672,7 @@ module aave_pool::a_token_factory_tests { utf8(b""), utf8(b""), underlying_token_address, - treasury_address, + treasury_address ); // check emitted events @@ -594,9 +683,7 @@ module aave_pool::a_token_factory_tests { let a_token_address = a_token_factory::token_address(signer::address_of(a_tokens_admin), symbol); let _a_token_metadata = - a_token_factory::get_metadata_by_symbol( - signer::address_of(a_tokens_admin), symbol - ); + a_token_factory::asset_metadata(signer::address_of(a_tokens_admin), symbol); // =============== MINT UNDERLYING FOR ACCOUNT ================= // // mint 100 underlying tokens for some address @@ -605,7 +692,7 @@ module aave_pool::a_token_factory_tests { underlying_tokens_admin, a_token_factory::get_token_account_address(a_token_address), (underlying_amount as u64), - underlying_token_address, + underlying_token_address ); // ============= TRANSFER THE UNDERLYING TIED TO THE ATOKENS ACCOUNT TO ANOTHER ACCOUNT ============== // @@ -622,7 +709,7 @@ module aave_pool::a_token_factory_tests { underlying_receiver_address, underlying_token_address ) as u256 ) == transfer_amount, - TEST_SUCCESS, + TEST_SUCCESS ); // check the underlying account @@ -630,22 +717,36 @@ module aave_pool::a_token_factory_tests { ( mock_underlying_token_factory::balance_of( a_token_factory::get_token_account_address(a_token_address), - underlying_token_address, + underlying_token_address ) as u256 ) == underlying_amount - transfer_amount, - TEST_SUCCESS, + TEST_SUCCESS ); } - #[test(aave_pool = @aave_pool, a_tokens_admin = @a_tokens, aave_role_super_admin = @aave_acl, aave_std = @std, aptos_framework = @0x1, rescue_receiver = @0x42, caller = @0x41,)] + #[ + test( + aave_pool = @aave_pool, + a_tokens_admin = @aave_pool, + aave_acl = @aave_acl, + aave_role_super_admin = @aave_acl, + aave_std = @std, + aptos_framework = @0x1, + rescue_receiver = @0x42, + caller = @0x41, + underlying_tokens_admin = @underlying_tokens + ) + ] fun test_atoken_rescue( aave_pool: &signer, a_tokens_admin: &signer, + aave_acl: &signer, aave_role_super_admin: &signer, aave_std: &signer, aptos_framework: &signer, rescue_receiver: &signer, caller: &signer, + underlying_tokens_admin: &signer ) { // start the timer set_time_has_started_for_testing(aptos_framework); @@ -661,11 +762,24 @@ module aave_pool::a_token_factory_tests { acl_manage::add_asset_listing_admin( aave_role_super_admin, signer::address_of(aave_pool) ); - acl_manage::add_pool_admin(aave_role_super_admin, signer::address_of(aave_pool)); + acl_manage::add_pool_admin( + aave_role_super_admin, signer::address_of(aave_pool) + ); + + // init mock underlying token + mock_underlying_token_factory::test_init_module(aave_pool); // init token base token_base::test_init_module(aave_pool); + // init a token + a_token_factory::test_init_module(aave_pool); + + // set asset listing admin + acl_manage::add_asset_listing_admin( + aave_acl, signer::address_of(a_tokens_admin) + ); + // create a_tokens let name = utf8(b"TEST_A_TOKEN"); let symbol = utf8(b"A"); @@ -680,7 +794,7 @@ module aave_pool::a_token_factory_tests { utf8(b""), utf8(b""), underlying_asset_address, - treasury_address, + treasury_address ); // check emitted events @@ -691,39 +805,39 @@ module aave_pool::a_token_factory_tests { let a_token_address = a_token_factory::token_address(signer::address_of(a_tokens_admin), symbol); let a_token_metadata = - a_token_factory::get_metadata_by_symbol( - signer::address_of(a_tokens_admin), symbol - ); - let seed = *string::bytes(&symbol); + a_token_factory::asset_metadata(signer::address_of(a_tokens_admin), symbol); + let seed = *string::bytes(&format2(&b"{}_{}", symbol, 1)); let resource_account = account::create_resource_address(&signer::address_of(a_tokens_admin), seed); // check addresses assert!( - a_token_factory::get_metadata_by_symbol( - signer::address_of(a_tokens_admin), symbol - ) == a_token_metadata, - TEST_SUCCESS, + a_token_factory::asset_metadata(signer::address_of(a_tokens_admin), symbol) + == a_token_metadata, + TEST_SUCCESS ); assert!( a_token_factory::get_underlying_asset_address(a_token_address) == underlying_asset_address, - TEST_SUCCESS, + TEST_SUCCESS ); assert!( a_token_factory::get_reserve_treasury_address(a_token_address) == treasury_address, - TEST_SUCCESS, + TEST_SUCCESS ); assert!( - a_token_factory::get_token_account_address(a_token_address) == resource_account, - TEST_SUCCESS, + a_token_factory::get_token_account_address(a_token_address) + == resource_account, + TEST_SUCCESS ); // ============= RESCUE TRANSFER ATOKENS ============== // let amount_to_mint: u256 = 100; - let reserve_index: u256 = 1; - let _amount_to_mint_scaled = wad_ray_math::ray_div(amount_to_mint, reserve_index); + let reserve_index: u256 = 1 * wad_ray_math::ray(); + let _amount_to_mint_scaled = wad_ray_math::ray_div( + amount_to_mint, reserve_index + ); let rescue_amount: u256 = 20; let _rescue_amount_scaled = wad_ray_math::ray_div(rescue_amount, reserve_index); @@ -734,7 +848,7 @@ module aave_pool::a_token_factory_tests { signer::address_of(aave_pool), amount_to_mint, reserve_index, - a_token_address, + a_token_address ); // check events @@ -743,12 +857,38 @@ module aave_pool::a_token_factory_tests { let emitted_mint_events = emitted_events(); assert!(vector::length(&emitted_mint_events) == 1, TEST_SUCCESS); + // Create a new token + let name = utf8(b"TOKEN_1"); + let symbol = utf8(b"T1"); + let decimals = 3; + let max_supply = 10000000; + mock_underlying_token_factory::create_token( + underlying_tokens_admin, + max_supply, + name, + symbol, + decimals, + utf8(b""), + utf8(b"") + ); + // Transfer some tokens to the resource account + let new_underlying_asset_address = + mock_underlying_token_factory::token_address(symbol); + let mint_amount = 1000000; + mock_underlying_token_factory::mint( + underlying_tokens_admin, + a_token_factory::get_token_account_address(a_token_address), + mint_amount, + new_underlying_asset_address + ); + // do rescue transfer. Singer is pool admin = aave_pool a_token_factory::rescue_tokens( aave_pool, - a_token_address, + new_underlying_asset_address, signer::address_of(rescue_receiver), - rescue_amount, + (mint_amount as u256), + a_token_address ); // assert rescue receiver balance diff --git a/aave-core/tests/aave-tokens/underlying_token_factory_tests.move b/aave-core/tests/aave-tokens/mock_underlying_token_factory_tests.move similarity index 84% rename from aave-core/tests/aave-tokens/underlying_token_factory_tests.move rename to aave-core/tests/aave-tokens/mock_underlying_token_factory_tests.move index cd005d0..bb6602e 100644 --- a/aave-core/tests/aave-tokens/underlying_token_factory_tests.move +++ b/aave-core/tests/aave-tokens/mock_underlying_token_factory_tests.move @@ -1,19 +1,26 @@ #[test_only] -module aave_pool::underlying_token_factory_tests { +module aave_pool::mock_underlying_token_factory_tests { use std::features::change_feature_flags_for_testing; use std::option::Self; use std::signer::Self; use std::string::utf8; use aptos_framework::fungible_asset::Metadata; use aptos_framework::object::Self; + use aave_pool::mock_underlying_token_factory::Self; const TEST_SUCCESS: u64 = 1; const TEST_FAILED: u64 = 2; - #[test(aave_pool = @aave_pool, underlying_tokens_admin = @underlying_tokens, aave_std = @std,)] + #[ + test( + aave_pool = @aave_pool, + underlying_tokens_admin = @underlying_tokens, + aave_std = @std + ) + ] fun test_underlying_token_initialization( - underlying_tokens_admin: &signer, aave_pool: &signer, aave_std: &signer, + underlying_tokens_admin: &signer, aave_pool: &signer, aave_std: &signer ) { // add the test events feature flag change_feature_flags_for_testing(aave_std, vector[26], vector[]); @@ -33,7 +40,7 @@ module aave_pool::underlying_token_factory_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_metadata = mock_underlying_token_factory::get_metadata_by_symbol(symbol); @@ -42,40 +49,47 @@ module aave_pool::underlying_token_factory_tests { assert!( object::address_to_object(underlying_token_address) == underlying_token_metadata, - TEST_SUCCESS, + TEST_SUCCESS ); assert!( mock_underlying_token_factory::get_token_account_address() == signer::address_of(underlying_tokens_admin), - TEST_SUCCESS, + TEST_SUCCESS ); assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some(0), - TEST_SUCCESS, + TEST_SUCCESS ); assert!( - mock_underlying_token_factory::decimals(underlying_token_address) == decimals, - TEST_SUCCESS, + mock_underlying_token_factory::decimals(underlying_token_address) + == decimals, + TEST_SUCCESS ); assert!( mock_underlying_token_factory::maximum(underlying_token_address) == option::some(max_supply), - TEST_SUCCESS, + TEST_SUCCESS ); assert!( mock_underlying_token_factory::symbol(underlying_token_address) == symbol, - TEST_SUCCESS, + TEST_SUCCESS ); assert!( mock_underlying_token_factory::name(underlying_token_address) == name, - TEST_SUCCESS, + TEST_SUCCESS ); } - #[test(aave_pool = @aave_pool, underlying_tokens_admin = @underlying_tokens, aave_std = @std,)] + #[ + test( + aave_pool = @aave_pool, + underlying_tokens_admin = @underlying_tokens, + aave_std = @std + ) + ] fun test_underlying_token_minting_burn( - aave_pool: &signer, underlying_tokens_admin: &signer, aave_std: &signer, + aave_pool: &signer, underlying_tokens_admin: &signer, aave_std: &signer ) { // add the test events feature flag change_feature_flags_for_testing(aave_std, vector[26], vector[]); @@ -95,7 +109,7 @@ module aave_pool::underlying_token_factory_tests { symbol, decimals, utf8(b""), - utf8(b""), + utf8(b"") ); let underlying_token_address = mock_underlying_token_factory::token_address(symbol); @@ -106,7 +120,7 @@ module aave_pool::underlying_token_factory_tests { underlying_tokens_admin, receiver_address, 100, - underlying_token_address, + underlying_token_address ); let user_balance = mock_underlying_token_factory::balance_of( @@ -116,7 +130,7 @@ module aave_pool::underlying_token_factory_tests { assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some(100), - TEST_SUCCESS, + TEST_SUCCESS ); // burn half of the tokens @@ -131,7 +145,7 @@ module aave_pool::underlying_token_factory_tests { assert!( mock_underlying_token_factory::supply(underlying_token_address) == option::some(50), - TEST_SUCCESS, + TEST_SUCCESS ); } } diff --git a/aave-core/tests/aave-tokens/standard_token_tests.move b/aave-core/tests/aave-tokens/standard_token_tests.move index 325c51d..54f0561 100644 --- a/aave-core/tests/aave-tokens/standard_token_tests.move +++ b/aave-core/tests/aave-tokens/standard_token_tests.move @@ -13,7 +13,7 @@ module aave_pool::standard_token_tests { mint_to_primary_stores, set_primary_stores_frozen_status, transfer_between_primary_stores, - withdraw_from_primary_stores, + withdraw_from_primary_stores }; const TEST_SUCCESS: u64 = 1; @@ -31,7 +31,7 @@ module aave_pool::standard_token_tests { utf8(b"http://example.com"), /* project */ vector[true, true, true], @0x123, - false, + false ); let metadata_address = object::create_object_address(&signer::address_of(creator), test_symbol); @@ -39,7 +39,7 @@ module aave_pool::standard_token_tests { } #[test(creator = @aave_pool)] - fun test_basic_flow(creator: &signer,) { + fun test_basic_flow(creator: &signer) { let metadata = create_test_mfa(creator); let creator_address = signer::address_of(creator); let aaron_address = @0x111; @@ -48,10 +48,11 @@ module aave_pool::standard_token_tests { creator, metadata, vector[creator_address, aaron_address], - vector[100, 50], + vector[100, 50] ); assert!( - primary_fungible_store::balance(creator_address, metadata) == 100, TEST_SUCCESS + primary_fungible_store::balance(creator_address, metadata) == 100, + TEST_SUCCESS ); assert!( primary_fungible_store::balance(aaron_address, metadata) == 50, TEST_SUCCESS @@ -61,22 +62,25 @@ module aave_pool::standard_token_tests { creator, metadata, vector[creator_address, aaron_address], - true, + true ); assert!( primary_fungible_store::is_frozen(creator_address, metadata), TEST_SUCCESS ); - assert!(primary_fungible_store::is_frozen(aaron_address, metadata), TEST_SUCCESS); + assert!( + primary_fungible_store::is_frozen(aaron_address, metadata), TEST_SUCCESS + ); transfer_between_primary_stores( creator, metadata, vector[creator_address, aaron_address], vector[aaron_address, creator_address], - vector[10, 5], + vector[10, 5] ); assert!( - primary_fungible_store::balance(creator_address, metadata) == 95, TEST_SUCCESS + primary_fungible_store::balance(creator_address, metadata) == 95, + TEST_SUCCESS ); assert!( primary_fungible_store::balance(aaron_address, metadata) == 55, TEST_SUCCESS @@ -86,26 +90,29 @@ module aave_pool::standard_token_tests { creator, metadata, vector[creator_address, aaron_address], - false, + false + ); + assert!( + !primary_fungible_store::is_frozen(creator_address, metadata), + TEST_SUCCESS ); assert!( - !primary_fungible_store::is_frozen(creator_address, metadata), TEST_SUCCESS + !primary_fungible_store::is_frozen(aaron_address, metadata), TEST_SUCCESS ); - assert!(!primary_fungible_store::is_frozen(aaron_address, metadata), TEST_SUCCESS); let fa = withdraw_from_primary_stores( creator, metadata, vector[creator_address, aaron_address], - vector[25, 15], + vector[25, 15] ); assert!(fungible_asset::amount(&fa) == 40, TEST_SUCCESS); deposit_to_primary_stores( creator, &mut fa, vector[creator_address, aaron_address], - vector[30, 10], + vector[30, 10] ); fungible_asset::destroy_zero(fa); @@ -113,10 +120,11 @@ module aave_pool::standard_token_tests { creator, metadata, vector[creator_address, aaron_address], - vector[100, 50], + vector[100, 50] ); assert!( - primary_fungible_store::balance(creator_address, metadata) == 0, TEST_SUCCESS + primary_fungible_store::balance(creator_address, metadata) == 0, + TEST_SUCCESS ); assert!( primary_fungible_store::balance(aaron_address, metadata) == 0, TEST_SUCCESS @@ -128,6 +136,11 @@ module aave_pool::standard_token_tests { fun test_permission_denied(creator: &signer, aaron: &signer) { let metadata = create_test_mfa(creator); let creator_address = signer::address_of(creator); - mint_to_primary_stores(aaron, metadata, vector[creator_address], vector[100]); + mint_to_primary_stores( + aaron, + metadata, + vector[creator_address], + vector[100] + ); } } diff --git a/aave-core/tests/aave-tokens/variable_token_factory_tests.move b/aave-core/tests/aave-tokens/variable_token_factory_tests.move index f851cb2..0556983 100644 --- a/aave-core/tests/aave-tokens/variable_token_factory_tests.move +++ b/aave-core/tests/aave-tokens/variable_token_factory_tests.move @@ -9,23 +9,28 @@ module aave_pool::variable_debt_token_factory_tests { use aptos_framework::object::Self; use aptos_framework::timestamp::set_time_has_started_for_testing; + use aave_acl::acl_manage::Self; use aave_math::wad_ray_math; use aave_pool::token_base::Self; use aave_pool::token_base::{Burn, Mint, Transfer}; use aave_pool::variable_debt_token_factory::Self; - use aave_acl::acl_manage::{Self}; const TEST_SUCCESS: u64 = 1; const TEST_FAILED: u64 = 2; - #[test(aave_pool = @aave_pool, variable_tokens_admin = @variable_tokens, aave_acl = @aave_acl)] + #[test( + aave_pool = @aave_pool, variable_tokens_admin = @aave_pool, aave_acl = @aave_acl + )] fun test_variable_token_initialization( - aave_pool: &signer, variable_tokens_admin: &signer, aave_acl: &signer, + aave_pool: &signer, variable_tokens_admin: &signer, aave_acl: &signer ) { // init token base token_base::test_init_module(aave_pool); + // init debt token + variable_debt_token_factory::test_init_module(aave_pool); + // set asset listing admin acl_manage::test_init_module(aave_acl); acl_manage::add_asset_listing_admin( @@ -43,7 +48,7 @@ module aave_pool::variable_debt_token_factory_tests { decimals, utf8(b""), utf8(b""), - @0x033, + @0x033 ); // check emitted events let emitted_events = emitted_events(); @@ -60,28 +65,39 @@ module aave_pool::variable_debt_token_factory_tests { assert!( object::address_to_object(variable_token_address) == variable_token_metadata, - TEST_SUCCESS, + TEST_SUCCESS ); assert!(variable_debt_token_factory::get_revision() == 1, TEST_SUCCESS); assert!( - variable_debt_token_factory::scaled_total_supply(variable_token_address) == 0, - TEST_SUCCESS, + variable_debt_token_factory::scaled_total_supply(variable_token_address) + == 0, + TEST_SUCCESS ); assert!( variable_debt_token_factory::decimals(variable_token_address) == decimals, - TEST_SUCCESS, + TEST_SUCCESS ); assert!( variable_debt_token_factory::symbol(variable_token_address) == symbol, - TEST_SUCCESS, + TEST_SUCCESS ); assert!( variable_debt_token_factory::name(variable_token_address) == name, - TEST_SUCCESS, + TEST_SUCCESS ); } - #[test(aave_pool = @aave_pool, variable_tokens_admin = @variable_tokens, aave_acl = @aave_acl, aave_std = @std, aptos_framework = @0x1, token_receiver = @0x42, caller = @0x41,)] + #[ + test( + aave_pool = @aave_pool, + variable_tokens_admin = @aave_pool, + aave_acl = @aave_acl, + aave_std = @std, + aptos_framework = @0x1, + token_receiver = @0x42, + caller = @0x41 + ) + ] fun test_variable_token_mint_burn( aave_pool: &signer, variable_tokens_admin: &signer, @@ -89,7 +105,7 @@ module aave_pool::variable_debt_token_factory_tests { aave_std: &signer, aptos_framework: &signer, token_receiver: &signer, - caller: &signer, + caller: &signer ) { // start the timer set_time_has_started_for_testing(aptos_framework); @@ -100,6 +116,9 @@ module aave_pool::variable_debt_token_factory_tests { // init token base token_base::test_init_module(aave_pool); + // init debt token + variable_debt_token_factory::test_init_module(aave_pool); + // set asset listing admin acl_manage::test_init_module(aave_acl); acl_manage::add_asset_listing_admin( @@ -118,7 +137,7 @@ module aave_pool::variable_debt_token_factory_tests { decimals, utf8(b""), utf8(b""), - underlying_asset_address, + underlying_asset_address ); // check emitted events let emitted_events = emitted_events(); @@ -129,13 +148,13 @@ module aave_pool::variable_debt_token_factory_tests { signer::address_of(variable_tokens_admin), symbol ); let _var_token_metadata = - variable_debt_token_factory::get_metadata_by_symbol( + variable_debt_token_factory::asset_metadata( signer::address_of(variable_tokens_admin), symbol ); // ============= MINT ============== // let amount_to_mint: u256 = 100; - let reserve_index: u256 = 1; + let reserve_index: u256 = 1 * wad_ray_math::ray(); let amount_to_mint_scaled = wad_ray_math::ray_div(amount_to_mint, reserve_index); variable_debt_token_factory::mint( @@ -143,23 +162,25 @@ module aave_pool::variable_debt_token_factory_tests { signer::address_of(token_receiver), amount_to_mint, reserve_index, - var_token_address, + var_token_address ); // assert a token supply assert!( variable_debt_token_factory::scaled_total_supply(var_token_address) == amount_to_mint_scaled, - TEST_SUCCESS, + TEST_SUCCESS ); // assert var_tokens receiver balance - let var_token_amount_scaled = wad_ray_math::ray_div(amount_to_mint, reserve_index); + let var_token_amount_scaled = wad_ray_math::ray_div( + amount_to_mint, reserve_index + ); assert!( variable_debt_token_factory::scaled_balance_of( signer::address_of(token_receiver), var_token_address ) == var_token_amount_scaled, - TEST_SUCCESS, + TEST_SUCCESS ); // check emitted events @@ -175,7 +196,7 @@ module aave_pool::variable_debt_token_factory_tests { signer::address_of(token_receiver), amount_to_burn, reserve_index, - var_token_address, + var_token_address ); // assert var token supply @@ -184,16 +205,18 @@ module aave_pool::variable_debt_token_factory_tests { assert!( variable_debt_token_factory::scaled_total_supply(var_token_address) == expected_var_token_scaled_total_supply, - TEST_SUCCESS, + TEST_SUCCESS ); // assert var_tokens receiver balance - let var_token_amount_scaled = wad_ray_math::ray_div(amount_to_burn, reserve_index); + let var_token_amount_scaled = wad_ray_math::ray_div( + amount_to_burn, reserve_index + ); assert!( variable_debt_token_factory::scaled_balance_of( signer::address_of(token_receiver), var_token_address ) == var_token_amount_scaled, - TEST_SUCCESS, + TEST_SUCCESS ); // check emitted events diff --git a/apterly/.markdownlint.json b/apterly/.markdownlint.json new file mode 100644 index 0000000..9d5a933 --- /dev/null +++ b/apterly/.markdownlint.json @@ -0,0 +1,14 @@ +{ + "extends": "markdownlint/style/prettier", + "first-line-h1": false, + "no-inline-html": false, + "no-alt-text": false, + "MD001": false, + "MD040": false, + "MD024": false, + "MD025": false, + "MD036": false, + "MD042": false, + "MD052": false, + "MD056": false +} diff --git a/apterly/.prettierignore b/apterly/.prettierignore new file mode 100644 index 0000000..8b63442 --- /dev/null +++ b/apterly/.prettierignore @@ -0,0 +1,5 @@ +pnpm-lock.yaml +images +audit +cov-reports +aave-core diff --git a/apterly/.prettierrc.toml b/apterly/.prettierrc.toml new file mode 100644 index 0000000..a5370ca --- /dev/null +++ b/apterly/.prettierrc.toml @@ -0,0 +1,9 @@ +plugins = ["prettier-plugin-sh", "prettier-plugin-toml"] +singleQuote = false +printWidth = 100 + +[[overrides]] +files = ["**/*.md"] + +[overrides.options] +proseWrap = "preserve" diff --git a/apterly/.typos.toml b/apterly/.typos.toml new file mode 100644 index 0000000..7b30bb8 --- /dev/null +++ b/apterly/.typos.toml @@ -0,0 +1,2 @@ +[files] +extend-exclude = [] diff --git a/apterly/.yamlfix.toml b/apterly/.yamlfix.toml new file mode 100644 index 0000000..2347b77 --- /dev/null +++ b/apterly/.yamlfix.toml @@ -0,0 +1,7 @@ +explicit_start = false +section_whitelines = 1 +whitelines = 1 +line_length = 100 +preserve_quotes = true +sequence_style = "block_style" +indent_mapping = 2 diff --git a/apterly/Dockerfile b/apterly/Dockerfile new file mode 100644 index 0000000..0d238fd --- /dev/null +++ b/apterly/Dockerfile @@ -0,0 +1,50 @@ +#syntax=docker/dockerfile:1.4 + +FROM --platform=linux/amd64 debian:bullseye-slim + +# Install required packages +RUN apt-get update -y \ + && apt-get install -y python3 python3-pip curl make wget git \ + && wget https://github.com/mikefarah/yq/releases/download/v4.34.1/yq_linux_amd64 -O /usr/local/bin/yq \ + && chmod +x /usr/local/bin/yq \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Aptos CLI +RUN curl -fsSL "https://aptos.dev/scripts/install_cli.py" | python3 + +ENV HOME="/root" +ENV PATH="$PATH:${HOME}/.local/bin" + +# Set default environment variables, which can be overridden +ENV APTOS_NETWORK=local \ + UPGRADE_CONTRACTS=true \ + ARTIFACTS_LEVEL=all \ + DEFAULT_FUND_AMOUNT=100000000 \ + INIT_DATA=true \ + DEFAULT_FUNDER_PRIVATE_KEY=0x0 \ + AAVE_ACL_PRIVATE_KEY=0x0 \ + AAVE_CONFIG_PRIVATE_KEY=0x0 \ + AAVE_MATH_PRIVATE_KEY=0x0 \ + AAVE_RATE_PRIVATE_KEY=0x0 \ + AAVE_ORACLE_PRIVATE_KEY=0x0 \ + AAVE_POOL_PRIVATE_KEY=0x0 \ + A_TOKENS_PRIVATE_KEY=0x0 \ + UNDERLYING_TOKENS_PRIVATE_KEY=0x0 \ + VARIABLE_TOKENS_PRIVATE_KEY=0x0 \ + AAVE_LARGE_PACKAGES_PRIVATE_KEY=0x0 + +# Expose necessary ports +EXPOSE 8070 8080 8081 8090 9101 50051 + +# Set working directory to root, so "." can refer to root context +WORKDIR / + +# Copy files to root directory of container +COPY . . + +# Script to run the testnet and other make commands +COPY apterly/entrypoint.sh ./entrypoint.sh +RUN chmod +x ./entrypoint.sh + +# Use the script as the entry point +ENTRYPOINT ["./entrypoint.sh"] diff --git a/apterly/LICENSE b/apterly/LICENSE new file mode 100644 index 0000000..ec990dc --- /dev/null +++ b/apterly/LICENSE @@ -0,0 +1 @@ +Copyright (c) 2024 Aave. All Rights Reserved. diff --git a/apterly/README.md b/apterly/README.md new file mode 100644 index 0000000..64f228a --- /dev/null +++ b/apterly/README.md @@ -0,0 +1,35 @@ +# Apterly + +Apterly is a tool for spinning and starting a fully functional local environment with a readily deployed aave protocol. + +## 1. Install dependencies + +```bash +pnpm i +``` + +## 2. Generate a .env file using the cli with randomly generated profiles + +```bash +pnpm run generate +``` + +The latter command will generate a .env file with some randomly generated accounts and put that into the root of the project directory. If need be, you can always modify the .env file and adjust the private keys in there. + +## 2. Start the test environment + +```bash +pnpm run start +``` + +## 3. Stop the test environment + +```bash +pnpm run stop +``` + +## 4. In case you want to intiliaze the tets environment with assets, reservers etc. you can run the following commands to do that + +```bash +cd ../test-suites && pnpm i && pnpm run deploy:init-data && pnpm run deploy:core-operations +``` diff --git a/apterly/cli/index.ts b/apterly/cli/index.ts new file mode 100644 index 0000000..fd54b57 --- /dev/null +++ b/apterly/cli/index.ts @@ -0,0 +1,53 @@ +import { AAVE_PROFILES } from "@aave/aave-v3-aptos-ts-sdk"; +import { Account } from "@aptos-labs/ts-sdk"; +import { Command } from "commander"; +import { PathLike } from "fs"; +import fs from "fs"; + +const generateProfileEnvData = (profileName: string) => { + const account = Account.generate(); + console.info("=========================================================================="); + console.info(` [PROFILE]: ${profileName.toUpperCase()} `); + console.info("=========================================================================="); + console.info("Account: " + account.accountAddress.toString()); + console.info("Public Key: " + account.publicKey.toString()); + console.info("Private Key: " + account.privateKey.toString()); + console.info("\n"); + const genAccount = `${profileName.toUpperCase()}_PRIVATE_KEY=${account.privateKey.toString()}`; + return genAccount; +}; + +const program = new Command(); + +program + .name("Profiles Generator") + .description("A CLI tool for generating profiles for aave-aptos") + .version("1.0.0"); + +program + .command("generate") + .description("Generates profiles for aave-aptos and persists them as ENVs in a file") + .argument("", "path to profile file") + .action((path: PathLike, options) => { + let envContents: Array = []; + envContents.push("APTOS_NETWORK=local"); + envContents.push("UPGRADE_CONTRACTS=true"); + envContents.push("ARTIFACTS_LEVEL=all"); + envContents.push("DEFAULT_FUND_AMOUNT=100000000"); + + for (const profile of Object.values(AAVE_PROFILES)) { + envContents.push(generateProfileEnvData(profile)); + } + + envContents.push(generateProfileEnvData("DEFAULT_FUNDER")); + + if (!fs.existsSync(path)) { + console.info(`Profile file does not exist under ${path}. Creating a new one...`); + } else { + console.info(`Profile file already exists under ${path}. Contents will be overwritten!`); + } + fs.writeFileSync(path, envContents.join("\n"), { encoding: "utf8" }); + console.info(`Writing data to ${path} done!`); + }); + +program.parse(process.argv); diff --git a/apterly/docker-compose.yml b/apterly/docker-compose.yml new file mode 100644 index 0000000..2c653c5 --- /dev/null +++ b/apterly/docker-compose.yml @@ -0,0 +1,87 @@ +services: + hasura: + image: hasura/graphql-engine:v2.44.0-ce + container_name: hasura + hostname: hasura + ports: + - 8092:8080 + restart: always + depends_on: + - postgres + environment: + PG_DATABASE_URL: postgres://postgres:postgres@postgres:5432/indexer + HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://postgres:postgres@postgres:5432/indexer + INDEXER_V2_POSTGRES_URL: postgres://postgres:postgres@postgres:5432/indexer + HASURA_GRAPHQL_ENABLE_CONSOLE: true + HASURA_GRAPHQL_CONSOLE_ASSETS_DIR: /srv/console-assets + volumes: + - console-assets:/srv/console-assets + networks: + - aptos-local-testnet-network + + postgres: + image: postgres + container_name: postgres + hostname: postgres + restart: always + ports: + - 5432:5432 + environment: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: indexer + # healthcheck: + # test: ["CMD", "pg_isready", "-U", "postgres"] + # interval: 10s + # timeout: 5s + # retries: 5 + volumes: + - postgres:/var/lib/postgresql/data + - ./postgres-init:/docker-entrypoint-initdb.d + networks: + - aptos-local-testnet-network + + aave-testnet: + env_file: + - ../.env + build: + context: .. + dockerfile: apterly/Dockerfile + container_name: aave-testnet + restart: always + ports: + - 8070:8070 + - 8080:8080 + - 8081:8081 + - 8090:8090 + - 9101:9101 + - 50051:50051 + depends_on: + - postgres + - hasura + environment: + APTOS_NETWORK: local + UPGRADE_CONTRACTS: true + ARTIFACTS_LEVEL: all + DEFAULT_FUND_AMOUNT: 100000000 + DEFAULT_FUNDER_PRIVATE_KEY: 0x0 + AAVE_ACL_PRIVATE_KEY: 0x0 + AAVE_CONFIG_PRIVATE_KEY: 0x0 + AAVE_MATH_PRIVATE_KEY: 0x0 + AAVE_ORACLE_PRIVATE_KEY: 0x0 + AAVE_POOL_PRIVATE_KEY: 0x0 + A_TOKENS_PRIVATE_KEY: 0x0 + UNDERLYING_TOKENS_PRIVATE_KEY: 0x0 + VARIABLE_TOKENS_PRIVATE_KEY: 0x0 + AAVE_LARGE_PACKAGES_PRIVATE_KEY: 0x0 + networks: + - aptos-local-testnet-network + +volumes: + postgres: {} + console-assets: {} + +networks: + aptos-local-testnet-network: + name: aptos-local-testnet-network + driver: bridge diff --git a/apterly/entrypoint.sh b/apterly/entrypoint.sh new file mode 100755 index 0000000..526582f --- /dev/null +++ b/apterly/entrypoint.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +# Ensure Aptos CLI path is included +export PATH="${HOME}/.local/bin:$PATH" + +# Load environment variables from .env file +if [ -f .env ]; then + export $(grep -v '^#' .env | xargs) +else + echo ".env file not found. Please create a .env file using the '.env.sample' template and try again." + exit 1 +fi + +# Debug: Print all environment variables +echo "Environment Variables:" +env + +# Execute the passed command +exec "$@" + +# Start local Aptos testnet in the background +make local-testnet-docker & +sleep 15 + +# Run the make commands in the specified order +make set-workspace-config +make init-workspace-config +make init-profiles +make init-test-profiles +make fund-profiles +make fund-test-profiles +make publish-all + +echo "Aave aptos is running ..." + +# Keep the container alive after these steps, if needed +tail -f /dev/null diff --git a/apterly/eslint.config.js b/apterly/eslint.config.js new file mode 100644 index 0000000..e75f18a --- /dev/null +++ b/apterly/eslint.config.js @@ -0,0 +1,34 @@ +// eslint.config.js +const tsdocPlugin = require("eslint-plugin-tsdoc"); +const typescriptEslintPlugin = require("@typescript-eslint/eslint-plugin"); + +module.exports = [ + { + ignores: [ + "build/**/*", + "node_modules/**/*", + ".github", + "bundle.*", + "docs/**/*", + "dist/**/*", + "webpack.config.js", + "documentation/**/*", + "bundle.js", + "eslint.config.js", + "webpack.config.js", + "*.min.js", + "public/*", + "coverage/*", + "aave-core/**/*", + ], + plugins: { + tsdoc: tsdocPlugin, + "@typescript-eslint": typescriptEslintPlugin, + }, + rules: { + "tsdoc/syntax": "warn", + camelcase: "off", + "@typescript-eslint/no-unused-vars": "error", + }, + }, +]; diff --git a/apterly/jest.config.ts b/apterly/jest.config.ts new file mode 100644 index 0000000..8821024 --- /dev/null +++ b/apterly/jest.config.ts @@ -0,0 +1,31 @@ +import type { Config } from "jest"; + +const config: Config = { + verbose: true, + testEnvironment: "node", + preset: "ts-jest", + roots: [""], + testMatch: ["**/*.spec.ts"], + transform: { + "^.+\\.ts$": "ts-jest", + }, + moduleNameMapper: { + "@/(.*)": "/src/$1", + }, + moduleFileExtensions: ["ts", "js", "json"], + collectCoverage: true, + setupFiles: ["dotenv/config"], + // coverageThreshold: { + // global: { + // branches: 50, // 90, + // functions: 50, // 95, + // lines: 50, // 95, + // statements: 50, // 95, + // }, + // }, + testTimeout: 15000, // Add global timeout here + // To help avoid exhausting all the available fds. + maxWorkers: 4, +}; + +export default config; diff --git a/apterly/package.json b/apterly/package.json new file mode 100644 index 0000000..fb70f61 --- /dev/null +++ b/apterly/package.json @@ -0,0 +1,86 @@ +{ + "name": "apterly", + "version": "1.0.0", + "description": "Tenderly-alike adapter for aave test framework", + "main": "dist/index.js", + "scripts": { + "up": "pnpm update", + "check": "pnpm outdated", + "upgrade": "pnpm run up && pnpm run check", + "audit": "pnpm audit --audit-level=high", + "test": "jest", + "test:cov": "jest --coverage", + "check-ts": "tsc", + "lint": "eslint . --no-cache", + "lint:fix": "eslint . --fix --no-cache", + "prettier": "prettier --check .", + "prettier:fix": "prettier --write .", + "fmt": "pnpm run prettier:fix && pnpm run lint:fix", + "fmt:check": "pnpm run prettier && pnpm run lint", + "generate": "tsx cli/index.ts generate ../.env", + "build": "docker compose build --no-cache", + "start": "docker compose up --build", + "stop": "docker compose down" + }, + "author": "AAVE", + "license": "ISC", + "dependencies": { + "@aave/aave-v3-aptos-ts-sdk": "^0.0.23", + "@aptos-labs/aptos-client": "^0.1.1", + "@aptos-labs/ts-sdk": "1.31.0", + "@ethersproject/bignumber": "^5.7.0", + "bignumber.js": "^9.1.2", + "commander": "^12.1.0", + "dotenv": "^16.4.5", + "ethers": "6.13.4", + "jest-environment-jsdom": "^29.7.0", + "ref-array-di": "^1.2.2", + "toml": "^3.0.0", + "tslib": "^2.8.1", + "tsx": "^4.19.2", + "util": "^0.12.5", + "yaml": "^2.6.0" + }, + "devDependencies": { + "@aptos-labs/aptos-cli": "^1.0.2", + "@jest/globals": "^29.7.0", + "@types/bn.js": "^5.1.6", + "@types/chai": "5.0.1", + "@types/jest": "^29.5.14", + "@types/node": "^22.10.1", + "eslint": "^9.16.0", + "eslint-config-airbnb-base": "^15.0.0", + "eslint-config-airbnb-typescript": "^18.0.0", + "eslint-config-prettier": "^9.1.0", + "eslint-config-standard": "^17.1.0", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-jsdoc": "^50.6.0", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^7.2.1", + "eslint-plugin-tsdoc": "^0.4.0", + "jest": "^29.7.0", + "node-ts": "^6.1.3", + "prettier": "^3.4.1", + "prettier-eslint": "^16.3.0", + "prettier-standard": "^16.4.1", + "rimraf": "^6.0.1", + "tree-kill": "^1.2.2", + "ts-jest": "^29.2.5", + "ts-loader": "^9.5.1", + "typescript": "^5.7.2", + "typescript-eslint": "^8.16.0" + }, + "pnpm": { + "overrides": { + "trim@<0.0.3": ">=0.0.3", + "postcss@<7.0.36": ">=7.0.36", + "postcss@<8.4.31": ">=8.4.31", + "minimatch@<3.0.5": ">=3.0.5", + "minimist@>=1.0.0 <1.2.6": ">=1.2.6", + "semver@>=6.0.0 <6.3.1": ">=6.3.1", + "cross-spawn@<6.0.6": ">=6.0.6", + "cross-spawn@>=7.0.0 <7.0.5": ">=7.0.5", + "@eslint/plugin-kit@<0.2.3": ">=0.2.3" + } + } +} diff --git a/apterly/pnpm-lock.yaml b/apterly/pnpm-lock.yaml new file mode 100644 index 0000000..66a9559 --- /dev/null +++ b/apterly/pnpm-lock.yaml @@ -0,0 +1,9088 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +overrides: + trim@<0.0.3: '>=0.0.3' + postcss@<7.0.36: '>=7.0.36' + postcss@<8.4.31: '>=8.4.31' + minimatch@<3.0.5: '>=3.0.5' + minimist@>=1.0.0 <1.2.6: '>=1.2.6' + semver@>=6.0.0 <6.3.1: '>=6.3.1' + cross-spawn@<6.0.6: '>=6.0.6' + cross-spawn@>=7.0.0 <7.0.5: '>=7.0.5' + '@eslint/plugin-kit@<0.2.3': '>=0.2.3' + +importers: + + .: + dependencies: + '@aave/aave-v3-aptos-ts-sdk': + specifier: ^0.0.23 + version: 0.0.23 + '@aptos-labs/aptos-client': + specifier: ^0.1.1 + version: 0.1.1 + '@aptos-labs/ts-sdk': + specifier: 1.31.0 + version: 1.31.0 + '@ethersproject/bignumber': + specifier: ^5.7.0 + version: 5.7.0 + bignumber.js: + specifier: ^9.1.2 + version: 9.1.2 + commander: + specifier: ^12.1.0 + version: 12.1.0 + dotenv: + specifier: ^16.4.5 + version: 16.4.5 + ethers: + specifier: 6.13.4 + version: 6.13.4(bufferutil@4.0.8)(utf-8-validate@6.0.5) + jest-environment-jsdom: + specifier: ^29.7.0 + version: 29.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.5) + ref-array-di: + specifier: ^1.2.2 + version: 1.2.2 + toml: + specifier: ^3.0.0 + version: 3.0.0 + tslib: + specifier: ^2.8.1 + version: 2.8.1 + tsx: + specifier: ^4.19.2 + version: 4.19.2 + util: + specifier: ^0.12.5 + version: 0.12.5 + yaml: + specifier: ^2.6.0 + version: 2.6.1 + devDependencies: + '@aptos-labs/aptos-cli': + specifier: ^1.0.2 + version: 1.0.2 + '@jest/globals': + specifier: ^29.7.0 + version: 29.7.0 + '@types/bn.js': + specifier: ^5.1.6 + version: 5.1.6 + '@types/chai': + specifier: 5.0.1 + version: 5.0.1 + '@types/jest': + specifier: ^29.5.14 + version: 29.5.14 + '@types/node': + specifier: ^22.10.1 + version: 22.10.1 + eslint: + specifier: ^9.16.0 + version: 9.16.0 + eslint-config-airbnb-base: + specifier: ^15.0.0 + version: 15.0.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0))(eslint@9.16.0) + eslint-config-airbnb-typescript: + specifier: ^18.0.0 + version: 18.0.0(@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2))(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0))(eslint@9.16.0) + eslint-config-prettier: + specifier: ^9.1.0 + version: 9.1.0(eslint@9.16.0) + eslint-config-standard: + specifier: ^17.1.0 + version: 17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0))(eslint-plugin-n@16.6.2(eslint@9.16.0))(eslint-plugin-promise@7.2.1(eslint@9.16.0))(eslint@9.16.0) + eslint-plugin-import: + specifier: ^2.31.0 + version: 2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0) + eslint-plugin-jsdoc: + specifier: ^50.6.0 + version: 50.6.0(eslint@9.16.0) + eslint-plugin-node: + specifier: ^11.1.0 + version: 11.1.0(eslint@9.16.0) + eslint-plugin-promise: + specifier: ^7.2.1 + version: 7.2.1(eslint@9.16.0) + eslint-plugin-tsdoc: + specifier: ^0.4.0 + version: 0.4.0 + jest: + specifier: ^29.7.0 + version: 29.7.0(@types/node@22.10.1) + node-ts: + specifier: ^6.1.3 + version: 6.1.3 + prettier: + specifier: ^3.4.1 + version: 3.4.1 + prettier-eslint: + specifier: ^16.3.0 + version: 16.3.0 + prettier-standard: + specifier: ^16.4.1 + version: 16.4.1(typescript@5.7.2) + rimraf: + specifier: ^6.0.1 + version: 6.0.1 + tree-kill: + specifier: ^1.2.2 + version: 1.2.2 + ts-jest: + specifier: ^29.2.5 + version: 29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@22.10.1))(typescript@5.7.2) + ts-loader: + specifier: ^9.5.1 + version: 9.5.1(typescript@5.7.2)(webpack@5.96.1) + typescript: + specifier: ^5.7.2 + version: 5.7.2 + typescript-eslint: + specifier: ^8.16.0 + version: 8.16.0(eslint@9.16.0)(typescript@5.7.2) + +packages: + + '@aave/aave-v3-aptos-ts-sdk@0.0.23': + resolution: {integrity: sha512-fZ9Vkc10nrAnnE0XEETANuhlgd93IakNA4WBSVfksljsakvc8J30yUz0D0Ca1XRZatAYz6zTLE0p8bCfZ5ZOjg==} + + '@adraffy/ens-normalize@1.10.1': + resolution: {integrity: sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==} + + '@ampproject/remapping@2.3.0': + resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} + engines: {node: '>=6.0.0'} + + '@angular/compiler@8.2.14': + resolution: {integrity: sha512-ABZO4E7eeFA1QyJ2trDezxeQM5ZFa1dXw1Mpl/+1vuXDKNjJgNyWYwKp/NwRkLmrsuV0yv4UDCDe4kJOGbPKnw==} + + '@aptos-labs/aptos-cli@1.0.2': + resolution: {integrity: sha512-PYPsd0Kk3ynkxNfe3S4fanI3DiUICCoh4ibQderbvjPFL5A0oK6F4lPEO2t0MDsQySTk2t4vh99Xjy6Bd9y+aQ==} + hasBin: true + + '@aptos-labs/aptos-client@0.1.1': + resolution: {integrity: sha512-kJsoy4fAPTOhzVr7Vwq8s/AUg6BQiJDa7WOqRzev4zsuIS3+JCuIZ6vUd7UBsjnxtmguJJulMRs9qWCzVBt2XA==} + engines: {node: '>=15.10.0'} + + '@aptos-labs/ts-sdk@1.31.0': + resolution: {integrity: sha512-Y1jdErSMJe+2+Pm8Yrw/+TBJhGO4KX2db944QsTgqJqkbt26aSBVbeRJ7e6y12vAhsQEkTGtMm4n4Lquz2ldiA==} + engines: {node: '>=11.0.0'} + + '@aptos-labs/ts-sdk@1.33.0': + resolution: {integrity: sha512-svdlPH5r2dlSue2D9WXaaTslsmX18WLytAho6IRZJxQjEssglk64I6c1G9S8BTjRQj/ug6ahTwp6lx3eWuyd8Q==} + engines: {node: '>=11.0.0'} + + '@babel/code-frame@7.26.2': + resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} + engines: {node: '>=6.9.0'} + + '@babel/code-frame@7.8.3': + resolution: {integrity: sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==} + + '@babel/compat-data@7.26.2': + resolution: {integrity: sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg==} + engines: {node: '>=6.9.0'} + + '@babel/core@7.26.0': + resolution: {integrity: sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==} + engines: {node: '>=6.9.0'} + + '@babel/generator@7.26.2': + resolution: {integrity: sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-compilation-targets@7.25.9': + resolution: {integrity: sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-imports@7.25.9': + resolution: {integrity: sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-transforms@7.26.0': + resolution: {integrity: sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-plugin-utils@7.25.9': + resolution: {integrity: sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-string-parser@7.25.9': + resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.25.9': + resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-option@7.25.9': + resolution: {integrity: sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==} + engines: {node: '>=6.9.0'} + + '@babel/helpers@7.26.0': + resolution: {integrity: sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==} + engines: {node: '>=6.9.0'} + + '@babel/highlight@7.25.9': + resolution: {integrity: sha512-llL88JShoCsth8fF8R4SJnIn+WLvR6ccFxu1H3FlMhDontdcmZWf2HgIZ7AIqV3Xcck1idlohrN4EUBQz6klbw==} + engines: {node: '>=6.9.0'} + + '@babel/parser@7.26.2': + resolution: {integrity: sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/parser@7.9.4': + resolution: {integrity: sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/plugin-syntax-async-generators@7.8.4': + resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-bigint@7.8.3': + resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-class-properties@7.12.13': + resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-class-static-block@7.14.5': + resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-import-attributes@7.26.0': + resolution: {integrity: sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-import-meta@7.10.4': + resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-json-strings@7.8.3': + resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-jsx@7.25.9': + resolution: {integrity: sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-logical-assignment-operators@7.10.4': + resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3': + resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-numeric-separator@7.10.4': + resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-object-rest-spread@7.8.3': + resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-optional-catch-binding@7.8.3': + resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-optional-chaining@7.8.3': + resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-private-property-in-object@7.14.5': + resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-top-level-await@7.14.5': + resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-typescript@7.25.9': + resolution: {integrity: sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/runtime@7.26.0': + resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} + engines: {node: '>=6.9.0'} + + '@babel/template@7.25.9': + resolution: {integrity: sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==} + engines: {node: '>=6.9.0'} + + '@babel/traverse@7.25.9': + resolution: {integrity: sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==} + engines: {node: '>=6.9.0'} + + '@babel/types@7.26.0': + resolution: {integrity: sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==} + engines: {node: '>=6.9.0'} + + '@bcoe/v8-coverage@0.2.3': + resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} + + '@es-joy/jsdoccomment@0.49.0': + resolution: {integrity: sha512-xjZTSFgECpb9Ohuk5yMX5RhUEbfeQcuOp8IF60e+wyzWEF0M5xeSgqsfLtvPEX8BIyOX9saZqzuGPmZ8oWc+5Q==} + engines: {node: '>=16'} + + '@esbuild/aix-ppc64@0.23.1': + resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==} + engines: {node: '>=18'} + cpu: + - ppc64 + os: + - aix + + '@esbuild/android-arm64@0.23.1': + resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==} + engines: {node: '>=18'} + cpu: + - arm64 + os: + - android + + '@esbuild/android-arm@0.23.1': + resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==} + engines: {node: '>=18'} + cpu: + - arm + os: + - android + + '@esbuild/android-x64@0.23.1': + resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==} + engines: {node: '>=18'} + cpu: + - x64 + os: + - android + + '@esbuild/darwin-arm64@0.23.1': + resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==} + engines: {node: '>=18'} + cpu: + - arm64 + os: + - darwin + + '@esbuild/darwin-x64@0.23.1': + resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==} + engines: {node: '>=18'} + cpu: + - x64 + os: + - darwin + + '@esbuild/freebsd-arm64@0.23.1': + resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==} + engines: {node: '>=18'} + cpu: + - arm64 + os: + - freebsd + + '@esbuild/freebsd-x64@0.23.1': + resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==} + engines: {node: '>=18'} + cpu: + - x64 + os: + - freebsd + + '@esbuild/linux-arm64@0.23.1': + resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==} + engines: {node: '>=18'} + cpu: + - arm64 + os: + - linux + + '@esbuild/linux-arm@0.23.1': + resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==} + engines: {node: '>=18'} + cpu: + - arm + os: + - linux + + '@esbuild/linux-ia32@0.23.1': + resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==} + engines: {node: '>=18'} + cpu: + - ia32 + os: + - linux + + '@esbuild/linux-loong64@0.23.1': + resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==} + engines: {node: '>=18'} + cpu: + - loong64 + os: + - linux + + '@esbuild/linux-mips64el@0.23.1': + resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==} + engines: {node: '>=18'} + cpu: + - mips64el + os: + - linux + + '@esbuild/linux-ppc64@0.23.1': + resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==} + engines: {node: '>=18'} + cpu: + - ppc64 + os: + - linux + + '@esbuild/linux-riscv64@0.23.1': + resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==} + engines: {node: '>=18'} + cpu: + - riscv64 + os: + - linux + + '@esbuild/linux-s390x@0.23.1': + resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==} + engines: {node: '>=18'} + cpu: + - s390x + os: + - linux + + '@esbuild/linux-x64@0.23.1': + resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==} + engines: {node: '>=18'} + cpu: + - x64 + os: + - linux + + '@esbuild/netbsd-x64@0.23.1': + resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==} + engines: {node: '>=18'} + cpu: + - x64 + os: + - netbsd + + '@esbuild/openbsd-arm64@0.23.1': + resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} + engines: {node: '>=18'} + cpu: + - arm64 + os: + - openbsd + + '@esbuild/openbsd-x64@0.23.1': + resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==} + engines: {node: '>=18'} + cpu: + - x64 + os: + - openbsd + + '@esbuild/sunos-x64@0.23.1': + resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==} + engines: {node: '>=18'} + cpu: + - x64 + os: + - sunos + + '@esbuild/win32-arm64@0.23.1': + resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==} + engines: {node: '>=18'} + cpu: + - arm64 + os: + - win32 + + '@esbuild/win32-ia32@0.23.1': + resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==} + engines: {node: '>=18'} + cpu: + - ia32 + os: + - win32 + + '@esbuild/win32-x64@0.23.1': + resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==} + engines: {node: '>=18'} + cpu: + - x64 + os: + - win32 + + '@eslint-community/eslint-utils@4.4.1': + resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.12.1': + resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/config-array@0.19.0': + resolution: {integrity: sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/core@0.9.0': + resolution: {integrity: sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/eslintrc@2.1.4': + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + '@eslint/eslintrc@3.2.0': + resolution: {integrity: sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@8.57.1': + resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + '@eslint/js@9.16.0': + resolution: {integrity: sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/object-schema@2.1.4': + resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/plugin-kit@0.2.3': + resolution: {integrity: sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@ethersproject/bignumber@5.7.0': + resolution: {integrity: sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==} + + '@ethersproject/bytes@5.7.0': + resolution: {integrity: sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==} + + '@ethersproject/logger@5.7.0': + resolution: {integrity: sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==} + + '@glimmer/interfaces@0.41.4': + resolution: {integrity: sha512-MzXwMyod3MlwSZezHSaVBsCEIW/giYYfTDYARR46QnYsaFVatMVbydjsI7jkAuBCbnLCyNOIc1TrYIj71i/rpg==} + + '@glimmer/syntax@0.41.4': + resolution: {integrity: sha512-NLPNirZDbNmpZ8T/ccle22zt2rhUq5il7ST6IJk62T58QZeJsdr3m3RS4kaGSBsQhXoKELrgX048yYEX5sC+fw==} + + '@glimmer/util@0.41.4': + resolution: {integrity: sha512-DwS94K+M0vtG+cymxH0rslJr09qpdjyOLdCjmpKcG/nNiZQfMA1ybAaFEmwk9UaVlUG9STENFeQwyrLevJB+7g==} + + '@humanfs/core@0.19.1': + resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} + engines: {node: '>=18.18.0'} + + '@humanfs/node@0.16.6': + resolution: {integrity: sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==} + engines: {node: '>=18.18.0'} + + '@humanwhocodes/config-array@0.13.0': + resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} + engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/object-schema@2.0.3': + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead + + '@humanwhocodes/retry@0.3.1': + resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} + engines: {node: '>=18.18'} + + '@humanwhocodes/retry@0.4.1': + resolution: {integrity: sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==} + engines: {node: '>=18.18'} + + '@iarna/toml@2.2.3': + resolution: {integrity: sha512-FmuxfCuolpLl0AnQ2NHSzoUKWEJDFl63qXjzdoWBVyFCXzMGm1spBzk7LeHNoVCiWCF7mRVms9e6jEV9+MoPbg==} + + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@istanbuljs/load-nyc-config@1.1.0': + resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} + engines: {node: '>=8'} + + '@istanbuljs/schema@0.1.3': + resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} + engines: {node: '>=8'} + + '@jest/console@29.7.0': + resolution: {integrity: sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/core@29.7.0': + resolution: {integrity: sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + '@jest/environment@29.7.0': + resolution: {integrity: sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/expect-utils@29.7.0': + resolution: {integrity: sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/expect@29.7.0': + resolution: {integrity: sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/fake-timers@29.7.0': + resolution: {integrity: sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/globals@29.7.0': + resolution: {integrity: sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/reporters@29.7.0': + resolution: {integrity: sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + '@jest/schemas@29.6.3': + resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/source-map@29.6.3': + resolution: {integrity: sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/test-result@29.7.0': + resolution: {integrity: sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/test-sequencer@29.7.0': + resolution: {integrity: sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/transform@29.7.0': + resolution: {integrity: sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/types@29.6.3': + resolution: {integrity: sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jridgewell/gen-mapping@0.3.5': + resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} + engines: {node: '>=6.0.0'} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/set-array@1.2.1': + resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} + engines: {node: '>=6.0.0'} + + '@jridgewell/source-map@0.3.6': + resolution: {integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==} + + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + + '@jridgewell/trace-mapping@0.3.25': + resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + + '@microsoft/tsdoc-config@0.17.1': + resolution: {integrity: sha512-UtjIFe0C6oYgTnad4q1QP4qXwLhe6tIpNTRStJ2RZEPIkqQPREAwE5spzVxsdn9UaEMUqhh0AqSx3X4nWAKXWw==} + + '@microsoft/tsdoc@0.15.1': + resolution: {integrity: sha512-4aErSrCR/On/e5G2hDP0wjooqDdauzEbIq8hIkIe5pXV0rtWJZvdCEKL0ykZxex+IxIwBp0eGeV48hQN07dXtw==} + + '@noble/curves@1.2.0': + resolution: {integrity: sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==} + + '@noble/curves@1.7.0': + resolution: {integrity: sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw==} + engines: {node: ^14.21.3 || >=16} + + '@noble/hashes@1.3.2': + resolution: {integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==} + engines: {node: '>= 16'} + + '@noble/hashes@1.6.0': + resolution: {integrity: sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ==} + engines: {node: ^14.21.3 || >=16} + + '@noble/hashes@1.6.1': + resolution: {integrity: sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w==} + engines: {node: ^14.21.3 || >=16} + + '@nodelib/fs.scandir@2.1.5': + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + + '@nodelib/fs.stat@2.0.5': + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + + '@nodelib/fs.walk@1.2.8': + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + + '@pkgr/core@0.1.1': + resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + + '@rauschma/stringio@1.4.0': + resolution: {integrity: sha512-3uor2f/MXZkmX5RJf8r+OC3WvZVzpSme0yyL0rQDPEnatE02qRcqwEwnsgpgriEck0S/n4vWtUd6tTtrJwk45Q==} + + '@rtsao/scc@1.1.0': + resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} + + '@samverschueren/stream-to-observable@0.3.1': + resolution: {integrity: sha512-c/qwwcHyafOQuVQJj0IlBjf5yYgBI7YPJ77k4fOJYesb41jio65eaJODRUmfYKhTOFBrIZ66kgvGPlNbjuoRdQ==} + engines: {node: '>=6'} + peerDependencies: + rxjs: '*' + zen-observable: '*' + peerDependenciesMeta: + rxjs: + optional: true + zen-observable: + optional: true + + '@scure/base@1.2.1': + resolution: {integrity: sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ==} + + '@scure/bip32@1.6.0': + resolution: {integrity: sha512-82q1QfklrUUdXJzjuRU7iG7D7XiFx5PHYVS0+oeNKhyDLT7WPqs6pBcM2W5ZdwOwKCwoE1Vy1se+DHjcXwCYnA==} + + '@scure/bip39@1.5.0': + resolution: {integrity: sha512-Dop+ASYhnrwm9+HA/HwXg7j2ZqM6yk2fyLWb5znexjctFY3+E+eU8cIWI0Pql0Qx4hPZCijlGq4OL71g+Uz30A==} + + '@sinclair/typebox@0.27.8': + resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + + '@sindresorhus/is@4.6.0': + resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} + engines: {node: '>=10'} + + '@sinonjs/commons@3.0.1': + resolution: {integrity: sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==} + + '@sinonjs/fake-timers@10.3.0': + resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} + + '@szmarczak/http-timer@4.0.6': + resolution: {integrity: sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==} + engines: {node: '>=10'} + + '@tootallnate/once@2.0.0': + resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} + engines: {node: '>= 10'} + + '@types/babel__core@7.20.5': + resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} + + '@types/babel__generator@7.6.8': + resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} + + '@types/babel__template@7.4.4': + resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} + + '@types/babel__traverse@7.20.6': + resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} + + '@types/bn.js@5.1.6': + resolution: {integrity: sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==} + + '@types/cacheable-request@6.0.3': + resolution: {integrity: sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==} + + '@types/chai@5.0.1': + resolution: {integrity: sha512-5T8ajsg3M/FOncpLYW7sdOcD6yf4+722sze/tc4KQV0P8Z2rAr3SAuHCIkYmYpt8VbcQlnz8SxlOlPQYefe4cA==} + + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + + '@types/eslint-scope@3.7.7': + resolution: {integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==} + + '@types/eslint@9.6.1': + resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==} + + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + + '@types/glob@7.2.0': + resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} + + '@types/graceful-fs@4.1.9': + resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} + + '@types/http-cache-semantics@4.0.4': + resolution: {integrity: sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==} + + '@types/istanbul-lib-coverage@2.0.6': + resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} + + '@types/istanbul-lib-report@3.0.3': + resolution: {integrity: sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==} + + '@types/istanbul-reports@3.0.4': + resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} + + '@types/jest@29.5.14': + resolution: {integrity: sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==} + + '@types/jsdom@20.0.1': + resolution: {integrity: sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==} + + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + + '@types/json5@0.0.29': + resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} + + '@types/keyv@3.1.4': + resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} + + '@types/minimatch@5.1.2': + resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} + + '@types/node@10.17.60': + resolution: {integrity: sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==} + + '@types/node@22.10.1': + resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==} + + '@types/node@22.7.5': + resolution: {integrity: sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==} + + '@types/responselike@1.0.3': + resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==} + + '@types/stack-utils@2.0.3': + resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} + + '@types/tough-cookie@4.0.5': + resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==} + + '@types/unist@2.0.11': + resolution: {integrity: sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==} + + '@types/yargs-parser@21.0.3': + resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} + + '@types/yargs@17.0.33': + resolution: {integrity: sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==} + + '@typescript-eslint/eslint-plugin@8.16.0': + resolution: {integrity: sha512-5YTHKV8MYlyMI6BaEG7crQ9BhSc8RxzshOReKwZwRWN0+XvvTOm+L/UYLCYxFpfwYuAAqhxiq4yae0CMFwbL7Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/parser@6.21.0': + resolution: {integrity: sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/parser@8.16.0': + resolution: {integrity: sha512-D7DbgGFtsqIPIFMPJwCad9Gfi/hC0PWErRRHFnaCWoEDYi5tQUDiJCTmGUbBiLzjqAck4KcXt9Ayj0CNlIrF+w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/scope-manager@6.21.0': + resolution: {integrity: sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==} + engines: {node: ^16.0.0 || >=18.0.0} + + '@typescript-eslint/scope-manager@8.16.0': + resolution: {integrity: sha512-mwsZWubQvBki2t5565uxF0EYvG+FwdFb8bMtDuGQLdCCnGPrDEDvm1gtfynuKlnpzeBRqdFCkMf9jg1fnAK8sg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/type-utils@8.16.0': + resolution: {integrity: sha512-IqZHGG+g1XCWX9NyqnI/0CX5LL8/18awQqmkZSl2ynn8F76j579dByc0jhfVSnSnhf7zv76mKBQv9HQFKvDCgg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/types@6.21.0': + resolution: {integrity: sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==} + engines: {node: ^16.0.0 || >=18.0.0} + + '@typescript-eslint/types@8.16.0': + resolution: {integrity: sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/typescript-estree@2.6.1': + resolution: {integrity: sha512-+sTnssW6bcbDZKE8Ce7VV6LdzkQz2Bxk7jzk1J8H1rovoTxnm6iXvYIyncvNsaB/kBCOM63j/LNJfm27bNdUoA==} + engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/typescript-estree@6.21.0': + resolution: {integrity: sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/typescript-estree@8.16.0': + resolution: {integrity: sha512-E2+9IzzXMc1iaBy9zmo+UYvluE3TW7bCGWSF41hVWUE01o8nzr1rvOQYSxelxr6StUvRcTMe633eY8mXASMaNw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/utils@8.16.0': + resolution: {integrity: sha512-C1zRy/mOL8Pj157GiX4kaw7iyRLKfJXBR3L82hk5kS/GyHcOFmy4YUq/zfZti72I9wnuQtA/+xzft4wCC8PJdA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/visitor-keys@6.21.0': + resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==} + engines: {node: ^16.0.0 || >=18.0.0} + + '@typescript-eslint/visitor-keys@8.16.0': + resolution: {integrity: sha512-pq19gbaMOmFE3CbL0ZB8J8BFCo2ckfHBfaIsaOZgBIF4EoISJIdLX5xRhd0FGB0LlHReNRuzoJoMGpTjq8F2CQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@ungap/structured-clone@1.2.0': + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + + '@webassemblyjs/ast@1.14.1': + resolution: {integrity: sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==} + + '@webassemblyjs/floating-point-hex-parser@1.13.2': + resolution: {integrity: sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==} + + '@webassemblyjs/helper-api-error@1.13.2': + resolution: {integrity: sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==} + + '@webassemblyjs/helper-buffer@1.14.1': + resolution: {integrity: sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==} + + '@webassemblyjs/helper-numbers@1.13.2': + resolution: {integrity: sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==} + + '@webassemblyjs/helper-wasm-bytecode@1.13.2': + resolution: {integrity: sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==} + + '@webassemblyjs/helper-wasm-section@1.14.1': + resolution: {integrity: sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==} + + '@webassemblyjs/ieee754@1.13.2': + resolution: {integrity: sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==} + + '@webassemblyjs/leb128@1.13.2': + resolution: {integrity: sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==} + + '@webassemblyjs/utf8@1.13.2': + resolution: {integrity: sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==} + + '@webassemblyjs/wasm-edit@1.14.1': + resolution: {integrity: sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==} + + '@webassemblyjs/wasm-gen@1.14.1': + resolution: {integrity: sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==} + + '@webassemblyjs/wasm-opt@1.14.1': + resolution: {integrity: sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==} + + '@webassemblyjs/wasm-parser@1.14.1': + resolution: {integrity: sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==} + + '@webassemblyjs/wast-printer@1.14.1': + resolution: {integrity: sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==} + + '@xtuc/ieee754@1.2.0': + resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} + + '@xtuc/long@4.2.2': + resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==} + + abab@2.0.6: + resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==} + deprecated: Use your platform's native atob() and btoa() methods instead + + acorn-globals@7.0.1: + resolution: {integrity: sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==} + + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + + acorn-walk@8.3.4: + resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} + engines: {node: '>=0.4.0'} + + acorn@7.4.1: + resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} + engines: {node: '>=0.4.0'} + hasBin: true + + acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} + engines: {node: '>=0.4.0'} + hasBin: true + + aes-js@4.0.0-beta.5: + resolution: {integrity: sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==} + + agent-base@6.0.2: + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} + + aggregate-error@3.1.0: + resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} + engines: {node: '>=8'} + + ajv-keywords@3.5.2: + resolution: {integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==} + peerDependencies: + ajv: ^6.9.1 + + ajv@6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + + ajv@8.12.0: + resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} + + angular-estree-parser@1.3.1: + resolution: {integrity: sha512-jvlnNk4aoEmA6EKK12OnsOkCSdsWleBsYB+aWyH8kpfTB6Li1kxWVbHKVldH9zDCwVVi1hXfqPi/gbSv49tkbQ==} + engines: {node: '>= 6'} + peerDependencies: + '@angular/compiler': '>= 6.0.0 < 9.0.6' + + angular-html-parser@1.4.0: + resolution: {integrity: sha512-5KyzzYOeZV9g9ahXw4rbi8IIbMjUdXoarXJ0CfbWue5U1YsvMnjMZJ3oadpU8ZtnIx1zR/dsyt+FLJx2U65d2Q==} + engines: {node: '>= 6'} + + ansi-escapes@3.2.0: + resolution: {integrity: sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==} + engines: {node: '>=4'} + + ansi-escapes@4.3.2: + resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} + engines: {node: '>=8'} + + ansi-regex@2.1.1: + resolution: {integrity: sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==} + engines: {node: '>=0.10.0'} + + ansi-regex@3.0.1: + resolution: {integrity: sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==} + engines: {node: '>=4'} + + ansi-regex@4.1.1: + resolution: {integrity: sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==} + engines: {node: '>=6'} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.1.0: + resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} + engines: {node: '>=12'} + + ansi-styles@2.2.1: + resolution: {integrity: sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==} + engines: {node: '>=0.10.0'} + + ansi-styles@3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ansi-styles@5.2.0: + resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} + engines: {node: '>=10'} + + ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + + any-observable@0.3.0: + resolution: {integrity: sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog==} + engines: {node: '>=6'} + peerDependencies: + rxjs: '*' + zenObservable: '*' + peerDependenciesMeta: + rxjs: + optional: true + zenObservable: + optional: true + + anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + + are-docs-informative@0.0.2: + resolution: {integrity: sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==} + engines: {node: '>=14'} + + argparse@1.0.10: + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + array-buffer-byte-length@1.0.1: + resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} + engines: {node: '>= 0.4'} + + array-differ@2.1.0: + resolution: {integrity: sha512-KbUpJgx909ZscOc/7CLATBFam7P1Z1QRQInvgT0UztM9Q72aGKCunKASAl7WNW0tnPmPyEMeMhdsfWhfmW037w==} + engines: {node: '>=6'} + + array-includes@3.1.8: + resolution: {integrity: sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==} + engines: {node: '>= 0.4'} + + array-index@1.0.0: + resolution: {integrity: sha512-jesyNbBkLQgGZMSwA1FanaFjalb1mZUGxGeUEkSDidzgrbjBGhvizJkaItdhkt8eIHFOJC7nDsrXk+BaehTdRw==} + + array-union@1.0.2: + resolution: {integrity: sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==} + engines: {node: '>=0.10.0'} + + array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + + array-uniq@1.0.3: + resolution: {integrity: sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==} + engines: {node: '>=0.10.0'} + + array.prototype.findlastindex@1.2.5: + resolution: {integrity: sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==} + engines: {node: '>= 0.4'} + + array.prototype.flat@1.3.2: + resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} + engines: {node: '>= 0.4'} + + array.prototype.flatmap@1.3.2: + resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} + engines: {node: '>= 0.4'} + + arraybuffer.prototype.slice@1.0.3: + resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} + engines: {node: '>= 0.4'} + + arrify@1.0.1: + resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} + engines: {node: '>=0.10.0'} + + astral-regex@1.0.0: + resolution: {integrity: sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==} + engines: {node: '>=4'} + + async@3.2.6: + resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} + + asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + + available-typed-arrays@1.0.7: + resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} + engines: {node: '>= 0.4'} + + axios@1.7.4: + resolution: {integrity: sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==} + + babel-jest@29.7.0: + resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@babel/core': ^7.8.0 + + babel-plugin-istanbul@6.1.1: + resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} + engines: {node: '>=8'} + + babel-plugin-jest-hoist@29.6.3: + resolution: {integrity: sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + babel-preset-current-node-syntax@1.1.0: + resolution: {integrity: sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==} + peerDependencies: + '@babel/core': ^7.0.0 + + babel-preset-jest@29.6.3: + resolution: {integrity: sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@babel/core': ^7.0.0 + + bail@1.0.5: + resolution: {integrity: sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + + bignumber.js@9.1.2: + resolution: {integrity: sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==} + + bn.js@5.2.1: + resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} + + brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + + brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + + browserslist@4.24.2: + resolution: {integrity: sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + + bs-logger@0.2.6: + resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} + engines: {node: '>= 6'} + + bser@2.1.1: + resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} + + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + + buffer@6.0.3: + resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} + + bufferutil@4.0.8: + resolution: {integrity: sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==} + engines: {node: '>=6.14.2'} + + builtin-modules@3.3.0: + resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} + engines: {node: '>=6'} + + builtins@5.1.0: + resolution: {integrity: sha512-SW9lzGTLvWTP1AY8xeAMZimqDrIaSdLQUcVr9DMef51niJ022Ri87SwRRKYm4A6iHfkPaiVUu/Duw2Wc4J7kKg==} + + cacheable-lookup@5.0.4: + resolution: {integrity: sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==} + engines: {node: '>=10.6.0'} + + cacheable-request@7.0.4: + resolution: {integrity: sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==} + engines: {node: '>=8'} + + call-bind@1.0.7: + resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + engines: {node: '>= 0.4'} + + caller-callsite@2.0.0: + resolution: {integrity: sha512-JuG3qI4QOftFsZyOn1qq87fq5grLIyk1JYd5lJmdA+fG7aQ9pA/i3JIJGcO3q0MrRcHlOt1U+ZeHW8Dq9axALQ==} + engines: {node: '>=4'} + + caller-path@2.0.0: + resolution: {integrity: sha512-MCL3sf6nCSXOwCTzvPKhN18TU7AHTvdtam8DAogxcrJ8Rjfbbg7Lgng64H9Iy+vUV6VGFClN/TyxBkAebLRR4A==} + engines: {node: '>=4'} + + callsites@2.0.0: + resolution: {integrity: sha512-ksWePWBloaWPxJYQ8TL0JHvtci6G5QTKwQ95RcWAa/lzoAKuAOflGdAK92hpHXjkwb8zLxoLNUoNYZgVsaJzvQ==} + engines: {node: '>=4'} + + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + + camelcase@5.3.1: + resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} + engines: {node: '>=6'} + + camelcase@6.3.0: + resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} + engines: {node: '>=10'} + + caniuse-lite@1.0.30001684: + resolution: {integrity: sha512-G1LRwLIQjBQoyq0ZJGqGIJUXzJ8irpbjHLpVRXDvBEScFJ9b17sgK6vlx0GAJFE21okD7zXl08rRRUfq6HdoEQ==} + + chalk@1.1.3: + resolution: {integrity: sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==} + engines: {node: '>=0.10.0'} + + chalk@2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + + chalk@3.0.0: + resolution: {integrity: sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==} + engines: {node: '>=8'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + char-regex@1.0.2: + resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} + engines: {node: '>=10'} + + character-entities-legacy@1.1.4: + resolution: {integrity: sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==} + + character-entities@1.2.4: + resolution: {integrity: sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==} + + character-reference-invalid@1.1.4: + resolution: {integrity: sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==} + + chardet@0.7.0: + resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + + chrome-trace-event@1.0.4: + resolution: {integrity: sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==} + engines: {node: '>=6.0'} + + ci-info@2.0.0: + resolution: {integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==} + + ci-info@3.9.0: + resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} + engines: {node: '>=8'} + + cjk-regex@2.0.0: + resolution: {integrity: sha512-E4gFi2f3jC0zFVHpaAcupW+gv9OejZ2aV3DP/LlSO0dDcZJAXw7W0ivn+vN17edN/PhU4HCgs1bfx7lPK7FpdA==} + engines: {node: '>= 4'} + + cjs-module-lexer@1.4.1: + resolution: {integrity: sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==} + + clean-stack@2.2.0: + resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} + engines: {node: '>=6'} + + cli-cursor@2.1.0: + resolution: {integrity: sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw==} + engines: {node: '>=4'} + + cli-cursor@3.1.0: + resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} + engines: {node: '>=8'} + + cli-truncate@0.2.1: + resolution: {integrity: sha512-f4r4yJnbT++qUPI9NR4XLDLq41gQ+uqnPItWG0F5ZkehuNiTTa3EY0S4AqTSUOeJ7/zU41oWPQSNkW5BqPL9bg==} + engines: {node: '>=0.10.0'} + + cli-width@3.0.0: + resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} + engines: {node: '>= 10'} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + clone-response@1.0.3: + resolution: {integrity: sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==} + + co@4.6.0: + resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} + engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} + + code-point-at@1.1.0: + resolution: {integrity: sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==} + engines: {node: '>=0.10.0'} + + collapse-white-space@1.0.6: + resolution: {integrity: sha512-jEovNnrhMuqyCcjfEJA56v0Xq8SkIoPKDyaHahwo3POf4qcSXqMYuwNcOTzp74vTsR9Tn08z4MxWqAhcekogkQ==} + + collect-v8-coverage@1.0.2: + resolution: {integrity: sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==} + + color-convert@1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + + commander@12.1.0: + resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} + engines: {node: '>=18'} + + commander@2.20.3: + resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + + comment-parser@1.4.1: + resolution: {integrity: sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==} + engines: {node: '>= 12.0.0'} + + common-tags@1.8.2: + resolution: {integrity: sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==} + engines: {node: '>=4.0.0'} + + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + + confusing-browser-globals@1.0.11: + resolution: {integrity: sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==} + + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + + cosmiconfig@5.2.1: + resolution: {integrity: sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==} + engines: {node: '>=4'} + + create-jest@29.7.0: + resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + crypto-js@4.2.0: + resolution: {integrity: sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==} + + cssom@0.3.8: + resolution: {integrity: sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==} + + cssom@0.5.0: + resolution: {integrity: sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==} + + cssstyle@2.3.0: + resolution: {integrity: sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==} + engines: {node: '>=8'} + + d@1.0.2: + resolution: {integrity: sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==} + engines: {node: '>=0.12'} + + dashify@2.0.0: + resolution: {integrity: sha512-hpA5C/YrPjucXypHPPc0oJ1l9Hf6wWbiOL7Ik42cxnsUOhWiCB/fylKbKqqJalW9FgkNQCw16YO8uW9Hs0Iy1A==} + engines: {node: '>=4'} + + data-urls@3.0.2: + resolution: {integrity: sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==} + engines: {node: '>=12'} + + data-view-buffer@1.0.1: + resolution: {integrity: sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==} + engines: {node: '>= 0.4'} + + data-view-byte-length@1.0.1: + resolution: {integrity: sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==} + engines: {node: '>= 0.4'} + + data-view-byte-offset@1.0.0: + resolution: {integrity: sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==} + engines: {node: '>= 0.4'} + + date-fns@1.30.1: + resolution: {integrity: sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==} + + debug@2.6.9: + resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + debug@3.2.7: + resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + debug@4.3.7: + resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decimal.js@10.4.3: + resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} + + decompress-response@6.0.0: + resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} + engines: {node: '>=10'} + + dedent@0.7.0: + resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==} + + dedent@1.5.3: + resolution: {integrity: sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==} + peerDependencies: + babel-plugin-macros: ^3.1.0 + peerDependenciesMeta: + babel-plugin-macros: + optional: true + + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + + deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + + defer-to-connect@2.0.1: + resolution: {integrity: sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==} + engines: {node: '>=10'} + + define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + + define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} + engines: {node: '>= 0.4'} + + del@5.1.0: + resolution: {integrity: sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA==} + engines: {node: '>=8'} + + delayed-stream@1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + + detect-newline@3.1.0: + resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} + engines: {node: '>=8'} + + diff-sequences@29.6.3: + resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + diff@4.0.2: + resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} + engines: {node: '>=0.3.1'} + + dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + + dlv@1.1.3: + resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} + + doctrine@2.1.0: + resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} + engines: {node: '>=0.10.0'} + + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + + domexception@4.0.0: + resolution: {integrity: sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==} + engines: {node: '>=12'} + deprecated: Use your platform's native DOMException instead + + dotenv@16.4.5: + resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} + engines: {node: '>=12'} + + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + + editorconfig-to-prettier@0.1.1: + resolution: {integrity: sha512-MMadSSVRDb4uKdxV6bCXXN4cTsxIsXYtV4XdPu6FOCSAw6zsCIDA+QEktEU+u6h+c/mTrul5NR+pwFpPxwetiQ==} + + editorconfig@0.15.3: + resolution: {integrity: sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==} + hasBin: true + + ejs@3.1.10: + resolution: {integrity: sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==} + engines: {node: '>=0.10.0'} + hasBin: true + + electron-to-chromium@1.5.67: + resolution: {integrity: sha512-nz88NNBsD7kQSAGGJyp8hS6xSPtWwqNogA0mjtc2nUYeEf3nURK9qpV18TuBdDmEDgVWotS8Wkzf+V52dSQ/LQ==} + + elegant-spinner@1.0.1: + resolution: {integrity: sha512-B+ZM+RXvRqQaAmkMlO/oSe5nMUOaUnyfGYCEHoR8wrXsZR2mA0XVibsxV1bvTwxdRWah1PkQqso2EzhILGHtEQ==} + engines: {node: '>=0.10.0'} + + emittery@0.13.1: + resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} + engines: {node: '>=12'} + + emoji-regex@7.0.3: + resolution: {integrity: sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + + end-of-stream@1.4.4: + resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} + + enhanced-resolve@5.17.1: + resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==} + engines: {node: '>=10.13.0'} + + entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + + error-ex@1.3.2: + resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + + es-abstract@1.23.5: + resolution: {integrity: sha512-vlmniQ0WNPwXqA0BnmwV3Ng7HxiGlh6r5U6JcTMNx8OilcAGqVJBHJcPjqOMaczU9fRuRK5Px2BdVyPRnKMMVQ==} + engines: {node: '>= 0.4'} + + es-define-property@1.0.0: + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + es-module-lexer@1.5.4: + resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==} + + es-object-atoms@1.0.0: + resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} + engines: {node: '>= 0.4'} + + es-set-tostringtag@2.0.3: + resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==} + engines: {node: '>= 0.4'} + + es-shim-unscopables@1.0.2: + resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} + + es-to-primitive@1.3.0: + resolution: {integrity: sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==} + engines: {node: '>= 0.4'} + + es5-ext@0.10.64: + resolution: {integrity: sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==} + engines: {node: '>=0.10'} + + es6-iterator@2.0.3: + resolution: {integrity: sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==} + + es6-symbol@3.1.4: + resolution: {integrity: sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==} + engines: {node: '>=0.12'} + + esbuild@0.23.1: + resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} + engines: {node: '>=18'} + hasBin: true + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + + escape-string-regexp@2.0.0: + resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} + engines: {node: '>=8'} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + escodegen@2.1.0: + resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} + engines: {node: '>=6.0'} + hasBin: true + + eslint-compat-utils@0.5.1: + resolution: {integrity: sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==} + engines: {node: '>=12'} + peerDependencies: + eslint: '>=6.0.0' + + eslint-config-airbnb-base@15.0.0: + resolution: {integrity: sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==} + engines: {node: ^10.12.0 || >=12.0.0} + peerDependencies: + eslint: ^7.32.0 || ^8.2.0 + eslint-plugin-import: ^2.25.2 + + eslint-config-airbnb-typescript@18.0.0: + resolution: {integrity: sha512-oc+Lxzgzsu8FQyFVa4QFaVKiitTYiiW3frB9KYW5OWdPrqFc7FzxgB20hP4cHMlr+MBzGcLl3jnCOVOydL9mIg==} + peerDependencies: + '@typescript-eslint/eslint-plugin': ^7.0.0 + '@typescript-eslint/parser': ^7.0.0 + eslint: ^8.56.0 + + eslint-config-prettier@9.1.0: + resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} + hasBin: true + peerDependencies: + eslint: '>=7.0.0' + + eslint-config-standard@17.1.0: + resolution: {integrity: sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q==} + engines: {node: '>=12.0.0'} + peerDependencies: + eslint: ^8.0.1 + eslint-plugin-import: ^2.25.2 + eslint-plugin-n: '^15.0.0 || ^16.0.0 ' + eslint-plugin-promise: ^6.0.0 + + eslint-import-resolver-node@0.3.9: + resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} + + eslint-module-utils@2.12.0: + resolution: {integrity: sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: '*' + eslint-import-resolver-node: '*' + eslint-import-resolver-typescript: '*' + eslint-import-resolver-webpack: '*' + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + eslint: + optional: true + eslint-import-resolver-node: + optional: true + eslint-import-resolver-typescript: + optional: true + eslint-import-resolver-webpack: + optional: true + + eslint-plugin-es-x@7.8.0: + resolution: {integrity: sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + eslint: '>=8' + + eslint-plugin-es@3.0.1: + resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==} + engines: {node: '>=8.10.0'} + peerDependencies: + eslint: '>=4.19.1' + + eslint-plugin-import@2.31.0: + resolution: {integrity: sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + + eslint-plugin-jsdoc@50.6.0: + resolution: {integrity: sha512-tCNp4fR79Le3dYTPB0dKEv7yFyvGkUCa+Z3yuTrrNGGOxBlXo9Pn0PEgroOZikUQOGjxoGMVKNjrOHcYEdfszg==} + engines: {node: '>=18'} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 + + eslint-plugin-n@16.6.2: + resolution: {integrity: sha512-6TyDmZ1HXoFQXnhCTUjVFULReoBPOAjpuiKELMkeP40yffI/1ZRO+d9ug/VC6fqISo2WkuIBk3cvuRPALaWlOQ==} + engines: {node: '>=16.0.0'} + peerDependencies: + eslint: '>=7.0.0' + + eslint-plugin-node@11.1.0: + resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==} + engines: {node: '>=8.10.0'} + peerDependencies: + eslint: '>=5.16.0' + + eslint-plugin-promise@7.2.1: + resolution: {integrity: sha512-SWKjd+EuvWkYaS+uN2csvj0KoP43YTu7+phKQ5v+xw6+A0gutVX2yqCeCkC3uLCJFiPfR2dD8Es5L7yUsmvEaA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 + + eslint-plugin-tsdoc@0.4.0: + resolution: {integrity: sha512-MT/8b4aKLdDClnS8mP3R/JNjg29i0Oyqd/0ym6NnQf+gfKbJJ4ZcSh2Bs1H0YiUMTBwww5JwXGTWot/RwyJ7aQ==} + + eslint-scope@5.1.1: + resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} + engines: {node: '>=8.0.0'} + + eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-scope@8.2.0: + resolution: {integrity: sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint-utils@1.4.3: + resolution: {integrity: sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==} + engines: {node: '>=6'} + + eslint-utils@2.1.0: + resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} + engines: {node: '>=6'} + + eslint-visitor-keys@1.3.0: + resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==} + engines: {node: '>=4'} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@4.2.0: + resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@6.8.0: + resolution: {integrity: sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==} + engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for + other options. + hasBin: true + + eslint@8.57.1: + resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for + other options. + hasBin: true + + eslint@9.16.0: + resolution: {integrity: sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true + + esniff@2.0.1: + resolution: {integrity: sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==} + engines: {node: '>=0.10'} + + espree@10.3.0: + resolution: {integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + espree@6.2.1: + resolution: {integrity: sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==} + engines: {node: '>=6.0.0'} + + espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + esprima@4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + + esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} + engines: {node: '>=0.10'} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@4.3.0: + resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + + ethers@6.13.4: + resolution: {integrity: sha512-21YtnZVg4/zKkCQPjrDj38B1r4nQvTZLopUGMLQ1ePU2zV/joCfDC3t3iKQjWRzjjjbzR+mdAIoikeBRNkdllA==} + engines: {node: '>=14.0.0'} + + event-emitter@0.3.5: + resolution: {integrity: sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==} + + eventemitter3@5.0.1: + resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} + + events@3.3.0: + resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} + engines: {node: '>=0.8.x'} + + execa@2.1.0: + resolution: {integrity: sha512-Y/URAVapfbYy2Xp/gb6A0E7iR8xeqOCXsuuaoMn7A5PzrXUK84E1gyiEfq0wQd/GHA6GsoHWwhNq8anb0mleIw==} + engines: {node: ^8.12.0 || >=9.7.0} + + execa@5.1.1: + resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} + engines: {node: '>=10'} + + exit@0.1.2: + resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} + engines: {node: '>= 0.8.0'} + + expect@29.7.0: + resolution: {integrity: sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + ext@1.7.0: + resolution: {integrity: sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==} + + extend@3.0.2: + resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} + + external-editor@3.1.0: + resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} + engines: {node: '>=4'} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-glob@3.3.2: + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + engines: {node: '>=8.6.0'} + + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + + fastq@1.17.1: + resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + + fb-watchman@2.0.2: + resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} + + figures@1.7.0: + resolution: {integrity: sha512-UxKlfCRuCBxSXU4C6t9scbDyWZ4VlaFFdojKtzJuSkuOBQ5CNFum+zZXFwHjo+CxBC1t6zlYPgHIgFjL8ggoEQ==} + engines: {node: '>=0.10.0'} + + figures@2.0.0: + resolution: {integrity: sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==} + engines: {node: '>=4'} + + figures@3.2.0: + resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} + engines: {node: '>=8'} + + file-entry-cache@5.0.1: + resolution: {integrity: sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==} + engines: {node: '>=4'} + + file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} + + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} + + filelist@1.0.4: + resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} + + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + + find-parent-dir@0.3.0: + resolution: {integrity: sha512-41+Uo9lF5JNGpIMGrujNKDuqH9ofU2ISJ1XCZPLIN/Yayql599PtA0ywYtlLMYmJcSPkr4uAF14wJmKlW2Fx3g==} + + find-project-root@1.1.1: + resolution: {integrity: sha512-4+yZ013W+EZc+hvdgA2RlzlgNfP1eGdMNxU6xzw1yt518cF6/xZD3kLV+bprYX5+AD0IL76xcN28TPqYJHxrHw==} + hasBin: true + + find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat-cache@2.0.1: + resolution: {integrity: sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==} + engines: {node: '>=4'} + + flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} + + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} + + flatted@2.0.2: + resolution: {integrity: sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==} + + flatted@3.3.2: + resolution: {integrity: sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==} + + flatten@1.0.3: + resolution: {integrity: sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg==} + deprecated: flatten is deprecated in favor of utility frameworks such as lodash. + + flow-parser@0.111.3: + resolution: {integrity: sha512-iEjGZ94OBMcESxnLorXNjJmtd/JtQYXUVrQpfwvtAKkuyawRmv+2LM6nqyOsOJkISEYbyY6ziudRE0u4VyPSVA==} + engines: {node: '>=0.4.0'} + + follow-redirects@1.15.9: + resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + + for-each@0.3.3: + resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + + foreground-child@3.3.0: + resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} + engines: {node: '>=14'} + + form-data@4.0.1: + resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==} + engines: {node: '>= 6'} + + fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: + - darwin + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + function.prototype.name@1.1.6: + resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} + engines: {node: '>= 0.4'} + + functional-red-black-tree@1.0.1: + resolution: {integrity: sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==} + + functions-have-names@1.2.3: + resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + + gensync@1.0.0-beta.2: + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + get-intrinsic@1.2.4: + resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + engines: {node: '>= 0.4'} + + get-own-enumerable-property-symbols@3.0.2: + resolution: {integrity: sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==} + + get-package-type@0.1.0: + resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} + engines: {node: '>=8.0.0'} + + get-stdin@7.0.0: + resolution: {integrity: sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ==} + engines: {node: '>=8'} + + get-stream@4.1.0: + resolution: {integrity: sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==} + engines: {node: '>=6'} + + get-stream@5.2.0: + resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} + engines: {node: '>=8'} + + get-stream@6.0.1: + resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} + engines: {node: '>=10'} + + get-symbol-description@1.0.2: + resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} + engines: {node: '>= 0.4'} + + get-tsconfig@4.8.1: + resolution: {integrity: sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==} + + glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + + glob-to-regexp@0.4.1: + resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} + + glob@11.0.0: + resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==} + engines: {node: 20 || >=22} + hasBin: true + + glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported + + globals@11.12.0: + resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} + engines: {node: '>=4'} + + globals@12.4.0: + resolution: {integrity: sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==} + engines: {node: '>=8'} + + globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} + engines: {node: '>=8'} + + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + + globalthis@1.0.4: + resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} + engines: {node: '>= 0.4'} + + globby@10.0.2: + resolution: {integrity: sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==} + engines: {node: '>=8'} + + globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + + globby@6.1.0: + resolution: {integrity: sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==} + engines: {node: '>=0.10.0'} + + gopd@1.1.0: + resolution: {integrity: sha512-FQoVQnqcdk4hVM4JN1eromaun4iuS34oStkdlLENLdpULsuQcTyXj8w7ayhuUfPwEYZ1ZOooOTT6fdA9Vmx/RA==} + engines: {node: '>= 0.4'} + + got@11.8.6: + resolution: {integrity: sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==} + engines: {node: '>=10.19.0'} + + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + + graphql@14.6.0: + resolution: {integrity: sha512-VKzfvHEKybTKjQVpTFrA5yUq2S9ihcZvfJAtsDBBCuV6wauPu1xl/f9ehgVf0FcEJJs4vz6ysb/ZMkGigQZseg==} + engines: {node: '>= 6.x'} + + handlebars@4.7.8: + resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} + engines: {node: '>=0.4.7'} + hasBin: true + + has-ansi@2.0.0: + resolution: {integrity: sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==} + engines: {node: '>=0.10.0'} + + has-bigints@1.0.2: + resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} + + has-flag@3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + + has-proto@1.1.0: + resolution: {integrity: sha512-QLdzI9IIO1Jg7f9GT1gXpPpXArAn6cS31R1eEZqz08Gc+uQ8/XiqHWt17Fiw+2p6oTTIq5GXEpQkAlA88YRl/Q==} + engines: {node: '>= 0.4'} + + has-symbols@1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + + html-element-attributes@2.2.1: + resolution: {integrity: sha512-gGTgCeQu+g1OFExZKWQ1LwbFXxLJ6cGdCGj64ByEaxatr/EPVc23D6Gxngb37ao+SNInP/sGu8FXxRsSxMm7aQ==} + + html-encoding-sniffer@3.0.0: + resolution: {integrity: sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==} + engines: {node: '>=12'} + + html-escaper@2.0.2: + resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} + + html-styles@1.0.0: + resolution: {integrity: sha512-cDl5dcj73oI4Hy0DSUNh54CAwslNLJRCCoO+RNkVo+sBrjA/0+7E/xzvj3zH/GxbbBLGJhE0hBe1eg+0FINC6w==} + + html-tag-names@1.1.5: + resolution: {integrity: sha512-aI5tKwNTBzOZApHIynaAwecLBv8TlZTEy/P4Sj2SzzAhBrGuI8yGZ0UIXVPQzOHGS+to2mjb04iy6VWt/8+d8A==} + + http-cache-semantics@4.1.1: + resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==} + + http-proxy-agent@5.0.0: + resolution: {integrity: sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==} + engines: {node: '>= 6'} + + http2-wrapper@1.0.3: + resolution: {integrity: sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==} + engines: {node: '>=10.19.0'} + + https-proxy-agent@5.0.1: + resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} + engines: {node: '>= 6'} + + human-signals@2.1.0: + resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} + engines: {node: '>=10.17.0'} + + iconv-lite@0.4.24: + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} + + iconv-lite@0.6.3: + resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} + engines: {node: '>=0.10.0'} + + ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + + ignore@3.3.10: + resolution: {integrity: sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==} + + ignore@4.0.6: + resolution: {integrity: sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==} + engines: {node: '>= 4'} + + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + + import-fresh@2.0.0: + resolution: {integrity: sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg==} + engines: {node: '>=4'} + + import-fresh@3.3.0: + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} + + import-local@3.2.0: + resolution: {integrity: sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==} + engines: {node: '>=8'} + hasBin: true + + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + + indent-string@3.2.0: + resolution: {integrity: sha512-BYqTHXTGUIvg7t1r4sJNKcbDZkL92nkXA8YtRpbjFHRHGDL/NtUeiBJMeE60kIFN/Mg8ESaWQvftaYMGJzQZCQ==} + engines: {node: '>=4'} + + indent-string@4.0.0: + resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} + engines: {node: '>=8'} + + indexes-of@1.0.1: + resolution: {integrity: sha512-bup+4tap3Hympa+JBJUG7XuOsdNQ6fxt0MHyXMKuLBKn0OqsTfvUxkUrroEX1+B2VsSHvCjiIcZVxRtYa4nllA==} + + inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if + you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive + and powerful. + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + inquirer@7.3.3: + resolution: {integrity: sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==} + engines: {node: '>=8.0.0'} + + internal-slot@1.0.7: + resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} + engines: {node: '>= 0.4'} + + is-alphabetical@1.0.4: + resolution: {integrity: sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==} + + is-alphanumerical@1.0.4: + resolution: {integrity: sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==} + + is-arguments@1.1.1: + resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} + engines: {node: '>= 0.4'} + + is-array-buffer@3.0.4: + resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} + engines: {node: '>= 0.4'} + + is-arrayish@0.2.1: + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + + is-async-function@2.0.0: + resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==} + engines: {node: '>= 0.4'} + + is-bigint@1.0.4: + resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} + + is-boolean-object@1.1.2: + resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} + engines: {node: '>= 0.4'} + + is-buffer@2.0.5: + resolution: {integrity: sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==} + engines: {node: '>=4'} + + is-builtin-module@3.2.1: + resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} + engines: {node: '>=6'} + + is-callable@1.2.7: + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} + + is-ci@2.0.0: + resolution: {integrity: sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==} + hasBin: true + + is-core-module@2.15.1: + resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} + engines: {node: '>= 0.4'} + + is-data-view@1.0.1: + resolution: {integrity: sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==} + engines: {node: '>= 0.4'} + + is-date-object@1.0.5: + resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} + engines: {node: '>= 0.4'} + + is-decimal@1.0.4: + resolution: {integrity: sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==} + + is-directory@0.3.1: + resolution: {integrity: sha512-yVChGzahRFvbkscn2MlwGismPO12i9+znNruC5gVEntG3qu0xQMzsGg/JFbrsqDOHtHFPci+V5aP5T9I+yeKqw==} + engines: {node: '>=0.10.0'} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-finalizationregistry@1.1.0: + resolution: {integrity: sha512-qfMdqbAQEwBw78ZyReKnlA8ezmPdb9BemzIIip/JkjaZUhitfXDkkr+3QTboW0JrSXT1QWyYShpvnNHGZ4c4yA==} + engines: {node: '>= 0.4'} + + is-fullwidth-code-point@1.0.0: + resolution: {integrity: sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==} + engines: {node: '>=0.10.0'} + + is-fullwidth-code-point@2.0.0: + resolution: {integrity: sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==} + engines: {node: '>=4'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-generator-fn@2.1.0: + resolution: {integrity: sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==} + engines: {node: '>=6'} + + is-generator-function@1.0.10: + resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} + engines: {node: '>= 0.4'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-hexadecimal@1.0.4: + resolution: {integrity: sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==} + + is-map@2.0.3: + resolution: {integrity: sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==} + engines: {node: '>= 0.4'} + + is-negative-zero@2.0.3: + resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} + engines: {node: '>= 0.4'} + + is-number-object@1.0.7: + resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} + engines: {node: '>= 0.4'} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + is-obj@1.0.1: + resolution: {integrity: sha512-l4RyHgRqGN4Y3+9JHVrNqO+tN0rV5My76uW5/nuO4K1b6vw5G8d/cmFjP9tRfEsdhZNt0IFdZuK/c2Vr4Nb+Qg==} + engines: {node: '>=0.10.0'} + + is-observable@1.1.0: + resolution: {integrity: sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==} + engines: {node: '>=4'} + + is-path-cwd@2.2.0: + resolution: {integrity: sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==} + engines: {node: '>=6'} + + is-path-inside@3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} + + is-plain-obj@2.1.0: + resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} + engines: {node: '>=8'} + + is-potential-custom-element-name@1.0.1: + resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} + + is-promise@2.2.2: + resolution: {integrity: sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==} + + is-regex@1.2.0: + resolution: {integrity: sha512-B6ohK4ZmoftlUe+uvenXSbPJFo6U37BH7oO1B3nQH8f/7h27N56s85MhUtbFJAziz5dcmuR3i8ovUl35zp8pFA==} + engines: {node: '>= 0.4'} + + is-regexp@1.0.0: + resolution: {integrity: sha512-7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA==} + engines: {node: '>=0.10.0'} + + is-set@2.0.3: + resolution: {integrity: sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==} + engines: {node: '>= 0.4'} + + is-shared-array-buffer@1.0.3: + resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} + engines: {node: '>= 0.4'} + + is-stream@1.1.0: + resolution: {integrity: sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==} + engines: {node: '>=0.10.0'} + + is-stream@2.0.1: + resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} + engines: {node: '>=8'} + + is-string@1.0.7: + resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} + engines: {node: '>= 0.4'} + + is-symbol@1.0.4: + resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} + engines: {node: '>= 0.4'} + + is-typed-array@1.1.13: + resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} + engines: {node: '>= 0.4'} + + is-weakmap@2.0.2: + resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} + engines: {node: '>= 0.4'} + + is-weakref@1.0.2: + resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + + is-weakset@2.0.3: + resolution: {integrity: sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==} + engines: {node: '>= 0.4'} + + is-whitespace-character@1.0.4: + resolution: {integrity: sha512-SDweEzfIZM0SJV0EUga669UTKlmL0Pq8Lno0QDQsPnvECB3IM2aP0gdx5TrU0A01MAPfViaZiI2V1QMZLaKK5w==} + + is-word-character@1.0.4: + resolution: {integrity: sha512-5SMO8RVennx3nZrqtKwCGyyetPE9VDba5ugvKLaD4KopPG5kR4mQ7tNt/r7feL5yt5h3lpuBbIUmCOG2eSzXHA==} + + isarray@2.0.5: + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + istanbul-lib-coverage@3.2.2: + resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} + engines: {node: '>=8'} + + istanbul-lib-instrument@5.2.1: + resolution: {integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==} + engines: {node: '>=8'} + + istanbul-lib-instrument@6.0.3: + resolution: {integrity: sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==} + engines: {node: '>=10'} + + istanbul-lib-report@3.0.1: + resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} + engines: {node: '>=10'} + + istanbul-lib-source-maps@4.0.1: + resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} + engines: {node: '>=10'} + + istanbul-reports@3.1.7: + resolution: {integrity: sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==} + engines: {node: '>=8'} + + iterall@1.3.0: + resolution: {integrity: sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==} + + jackspeak@4.0.2: + resolution: {integrity: sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==} + engines: {node: 20 || >=22} + + jake@10.9.2: + resolution: {integrity: sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==} + engines: {node: '>=10'} + hasBin: true + + jest-changed-files@29.7.0: + resolution: {integrity: sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-circus@29.7.0: + resolution: {integrity: sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-cli@29.7.0: + resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + jest-config@29.7.0: + resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@types/node': '*' + ts-node: '>=9.0.0' + peerDependenciesMeta: + '@types/node': + optional: true + ts-node: + optional: true + + jest-diff@29.7.0: + resolution: {integrity: sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-docblock@25.3.0: + resolution: {integrity: sha512-aktF0kCar8+zxRHxQZwxMy70stc9R1mOmrLsT5VO3pIT0uzGRSDAXxSlz4NqQWpuLjPpuMhPRl7H+5FRsvIQAg==} + engines: {node: '>= 8.3'} + + jest-docblock@29.7.0: + resolution: {integrity: sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-each@29.7.0: + resolution: {integrity: sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-environment-jsdom@29.7.0: + resolution: {integrity: sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + canvas: ^2.5.0 + peerDependenciesMeta: + canvas: + optional: true + + jest-environment-node@29.7.0: + resolution: {integrity: sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-get-type@29.6.3: + resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-haste-map@29.7.0: + resolution: {integrity: sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-leak-detector@29.7.0: + resolution: {integrity: sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-matcher-utils@29.7.0: + resolution: {integrity: sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-message-util@29.7.0: + resolution: {integrity: sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-mock@29.7.0: + resolution: {integrity: sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-pnp-resolver@1.2.3: + resolution: {integrity: sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==} + engines: {node: '>=6'} + peerDependencies: + jest-resolve: '*' + peerDependenciesMeta: + jest-resolve: + optional: true + + jest-regex-util@29.6.3: + resolution: {integrity: sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-resolve-dependencies@29.7.0: + resolution: {integrity: sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-resolve@29.7.0: + resolution: {integrity: sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-runner@29.7.0: + resolution: {integrity: sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-runtime@29.7.0: + resolution: {integrity: sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-snapshot@29.7.0: + resolution: {integrity: sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-util@29.7.0: + resolution: {integrity: sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-validate@29.7.0: + resolution: {integrity: sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-watcher@29.7.0: + resolution: {integrity: sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-worker@27.5.1: + resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} + engines: {node: '>= 10.13.0'} + + jest-worker@29.7.0: + resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest@29.7.0: + resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + jju@1.4.0: + resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} + + js-base64@3.7.7: + resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==} + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + js-yaml@3.14.1: + resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} + hasBin: true + + js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + + jsdoc-type-pratt-parser@4.1.0: + resolution: {integrity: sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==} + engines: {node: '>=12.0.0'} + + jsdom@20.0.3: + resolution: {integrity: sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==} + engines: {node: '>=14'} + peerDependencies: + canvas: ^2.5.0 + peerDependenciesMeta: + canvas: + optional: true + + jsesc@3.0.2: + resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} + engines: {node: '>=6'} + hasBin: true + + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-parse-better-errors@1.0.2: + resolution: {integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==} + + json-parse-even-better-errors@2.3.1: + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + + json-stable-stringify@1.0.1: + resolution: {integrity: sha512-i/J297TW6xyj7sDFa7AmBPkQvLIxWr2kKPWI26tXydnZrzVAocNqn5DMNT1Mzk0vit1V5UkRM7C1KdVNp7Lmcg==} + + json5@1.0.2: + resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} + hasBin: true + + json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + + jsonify@0.0.1: + resolution: {integrity: sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==} + + jwt-decode@4.0.0: + resolution: {integrity: sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==} + engines: {node: '>=18'} + + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + + kleur@3.0.3: + resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} + engines: {node: '>=6'} + + leven@2.1.0: + resolution: {integrity: sha512-nvVPLpIHUxCUoRLrFqTgSxXJ614d8AgQoWl7zPe/2VadE8+1dpU3LBhowRuBAcuwruWtOdD8oYC9jDNJjXDPyA==} + engines: {node: '>=0.10.0'} + + leven@3.1.0: + resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} + engines: {node: '>=6'} + + levn@0.3.0: + resolution: {integrity: sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==} + engines: {node: '>= 0.8.0'} + + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + + lines-and-columns@1.1.6: + resolution: {integrity: sha512-8ZmlJFVK9iCmtLz19HpSsR8HaAMWBT284VMNednLwlIMDP2hJDCIhUp0IZ2xUcZ+Ob6BM0VvCSJwzASDM45NLQ==} + + lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + + linguist-languages@7.6.0: + resolution: {integrity: sha512-DBZPIWjrQmb/52UlSEN8MTiwwugrAh4NBX9/DyIG8IuO8rDLYDRM+KVPbuiPVKd3ResxYtZB5AiSuc8dTzOSog==} + + lint-staged@9.4.3: + resolution: {integrity: sha512-PejnI+rwOAmKAIO+5UuAZU9gxdej/ovSEOAY34yMfC3OS4Ac82vCBPzAWLReR9zCPOMqeVwQRaZ3bUBpAsaL2Q==} + hasBin: true + + listr-silent-renderer@1.1.1: + resolution: {integrity: sha512-L26cIFm7/oZeSNVhWB6faeorXhMg4HNlb/dS/7jHhr708jxlXrtrBWo4YUxZQkc6dGoxEAe6J/D3juTRBUzjtA==} + engines: {node: '>=4'} + + listr-update-renderer@0.5.0: + resolution: {integrity: sha512-tKRsZpKz8GSGqoI/+caPmfrypiaq+OQCbd+CovEC24uk1h952lVj5sC7SqyFUm+OaJ5HN/a1YLt5cit2FMNsFA==} + engines: {node: '>=6'} + peerDependencies: + listr: ^0.14.2 + + listr-verbose-renderer@0.5.0: + resolution: {integrity: sha512-04PDPqSlsqIOaaaGZ+41vq5FejI9auqTInicFRndCBgE3bXG8D6W1I+mWhk+1nqbHmyhla/6BUrd5OSiHwKRXw==} + engines: {node: '>=4'} + + listr@0.14.3: + resolution: {integrity: sha512-RmAl7su35BFd/xoMamRjpIE4j3v+L28o8CT5YhAXQJm1fD+1l9ngXY8JAQRJ+tFK2i5njvi0iRUKV09vPwA0iA==} + engines: {node: '>=6'} + + loader-runner@4.3.0: + resolution: {integrity: sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==} + engines: {node: '>=6.11.5'} + + locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + lodash.memoize@4.1.2: + resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} + + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + + lodash.unescape@4.0.1: + resolution: {integrity: sha512-DhhGRshNS1aX6s5YdBE3njCCouPgnG29ebyHvImlZzXZf2SHgt+J08DHgytTPnpywNbO1Y8mNUFyQuIDBq2JZg==} + + lodash.uniqby@4.7.0: + resolution: {integrity: sha512-e/zcLx6CSbmaEgFHCA7BnoQKyCtKMxnuWrJygbwPs/AIn+IMKl66L8/s+wBUn5LRw2pZx3bUHibiV1b6aTWIww==} + + lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + + log-symbols@1.0.2: + resolution: {integrity: sha512-mmPrW0Fh2fxOzdBbFv4g1m6pR72haFLPJ2G5SJEELf1y+iaQrDG6cWCPjy54RHYbZAt7X+ls690Kw62AdWXBzQ==} + engines: {node: '>=0.10.0'} + + log-symbols@3.0.0: + resolution: {integrity: sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==} + engines: {node: '>=8'} + + log-update@2.3.0: + resolution: {integrity: sha512-vlP11XfFGyeNQlmEn9tJ66rEW1coA/79m5z6BCkudjbAGE83uhAcGYrBFwfs3AdLiLzGRusRPAbSPK9xZteCmg==} + engines: {node: '>=4'} + + loglevel-colored-level-prefix@1.0.0: + resolution: {integrity: sha512-u45Wcxxc+SdAlh4yeF/uKlC1SPUPCy0gullSNKXod5I4bmifzk+Q4lSLExNEVn19tGaJipbZ4V4jbFn79/6mVA==} + + loglevel@1.9.2: + resolution: {integrity: sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==} + engines: {node: '>= 0.6.0'} + + lowercase-keys@2.0.0: + resolution: {integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==} + engines: {node: '>=8'} + + lru-cache@11.0.2: + resolution: {integrity: sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA==} + engines: {node: 20 || >=22} + + lru-cache@4.1.5: + resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} + + lru-cache@5.1.1: + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + + make-dir@4.0.0: + resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} + engines: {node: '>=10'} + + make-error@1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + + makeerror@1.0.12: + resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} + + map-age-cleaner@0.1.3: + resolution: {integrity: sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==} + engines: {node: '>=6'} + + markdown-escapes@1.0.4: + resolution: {integrity: sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg==} + + mem@5.1.1: + resolution: {integrity: sha512-qvwipnozMohxLXG1pOqoLiZKNkC4r4qqRucSoDwXowsNGDSULiqFTRUF05vcZWnwJSG22qTsynQhxbaMtnX9gw==} + engines: {node: '>=8'} + + merge-stream@2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + + merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + + mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + + mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + + mimic-fn@1.2.0: + resolution: {integrity: sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==} + engines: {node: '>=4'} + + mimic-fn@2.1.0: + resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} + engines: {node: '>=6'} + + mimic-response@1.0.1: + resolution: {integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==} + engines: {node: '>=4'} + + mimic-response@3.1.0: + resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} + engines: {node: '>=10'} + + minimatch@10.0.1: + resolution: {integrity: sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==} + engines: {node: 20 || >=22} + + minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + + minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + + minimatch@9.0.3: + resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} + engines: {node: '>=16 || 14 >=14.17'} + + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} + + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + + mkdirp@0.5.6: + resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} + hasBin: true + + mri@1.2.0: + resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} + engines: {node: '>=4'} + + ms@2.0.0: + resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + multimatch@3.0.0: + resolution: {integrity: sha512-22foS/gqQfANZ3o+W7ST2x25ueHDVNWl/b9OlGcLpy/iKxjCpvcNCM51YCenUi7Mt/jAjjqv8JwZRs8YP5sRjA==} + engines: {node: '>=6'} + + mute-stream@0.0.8: + resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} + + n-readlines@1.0.0: + resolution: {integrity: sha512-ISDqGcspVu6U3VKqtJZG1uR55SmNNF9uK0EMq1IvNVVZOui6MW6VR0+pIZhqz85ORAGp+4zW+5fJ/SE7bwEibA==} + engines: {node: '>=6.x.x'} + + nanoid@3.3.8: + resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + + neo-async@2.6.2: + resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + + next-tick@1.1.0: + resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} + + node-gyp-build@4.8.4: + resolution: {integrity: sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==} + hasBin: true + + node-int64@0.4.0: + resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} + + node-releases@2.0.18: + resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==} + + node-ts@6.1.3: + resolution: {integrity: sha512-efSBNOe7AJxg2QKmDVzzQGxYMTfR51USAlteD6UCFlR2B4nMGhJiTVsypzKFupimWj9kwYUl5faeJcuMGpcwXw==} + engines: {node: '>=18.0.0'} + + normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + + normalize-url@6.1.0: + resolution: {integrity: sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==} + engines: {node: '>=10'} + + npm-run-path@3.1.0: + resolution: {integrity: sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg==} + engines: {node: '>=8'} + + npm-run-path@4.0.1: + resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} + engines: {node: '>=8'} + + number-is-nan@1.0.1: + resolution: {integrity: sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==} + engines: {node: '>=0.10.0'} + + nwsapi@2.2.16: + resolution: {integrity: sha512-F1I/bimDpj3ncaNDhfyMWuFqmQDBwDB0Fogc2qpL3BWvkQteFD/8BzWuIRl83rq0DXfm8SGt/HFhLXZyljTXcQ==} + + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + + object-inspect@1.13.3: + resolution: {integrity: sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==} + engines: {node: '>= 0.4'} + + object-keys@1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + + object.assign@4.1.5: + resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} + engines: {node: '>= 0.4'} + + object.entries@1.1.8: + resolution: {integrity: sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==} + engines: {node: '>= 0.4'} + + object.fromentries@2.0.8: + resolution: {integrity: sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==} + engines: {node: '>= 0.4'} + + object.groupby@1.0.3: + resolution: {integrity: sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==} + engines: {node: '>= 0.4'} + + object.values@1.2.0: + resolution: {integrity: sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==} + engines: {node: '>= 0.4'} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + onetime@2.0.1: + resolution: {integrity: sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ==} + engines: {node: '>=4'} + + onetime@5.1.2: + resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} + engines: {node: '>=6'} + + optionator@0.8.3: + resolution: {integrity: sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==} + engines: {node: '>= 0.8.0'} + + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + + os-tmpdir@1.0.2: + resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} + engines: {node: '>=0.10.0'} + + p-cancelable@2.1.1: + resolution: {integrity: sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==} + engines: {node: '>=8'} + + p-defer@1.0.0: + resolution: {integrity: sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==} + engines: {node: '>=4'} + + p-finally@2.0.1: + resolution: {integrity: sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==} + engines: {node: '>=8'} + + p-is-promise@2.1.0: + resolution: {integrity: sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==} + engines: {node: '>=6'} + + p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + p-map@2.1.0: + resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} + engines: {node: '>=6'} + + p-map@3.0.0: + resolution: {integrity: sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==} + engines: {node: '>=8'} + + p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + + parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + + parse-entities@1.2.2: + resolution: {integrity: sha512-NzfpbxW/NPrzZ/yYSoQxyqUZMZXIdCfE0OIN4ESsnptHJECoUk3FZktxNuzQf4tjt5UEopnxpYJbvYuxIFDdsg==} + + parse-imports@2.2.1: + resolution: {integrity: sha512-OL/zLggRp8mFhKL0rNORUTR4yBYujK/uU+xZL+/0Rgm2QE4nLO9v8PzEweSJEbMGKmDRjJE4R3IMJlL2di4JeQ==} + engines: {node: '>= 18'} + + parse-json@4.0.0: + resolution: {integrity: sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==} + engines: {node: '>=4'} + + parse-json@5.2.0: + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} + + parse-srcset@1.0.2: + resolution: {integrity: sha512-/2qh0lav6CmI15FzA3i/2Bzk2zCgQhGMkvhOhKNcBVQ1ldgpbfiNTVslmooUmWJcADi1f1kIeynbDRVzNlfR6Q==} + + parse5@7.2.1: + resolution: {integrity: sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + + path-scurry@2.0.0: + resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} + engines: {node: 20 || >=22} + + path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + + pify@2.3.0: + resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} + engines: {node: '>=0.10.0'} + + pinkie-promise@2.0.1: + resolution: {integrity: sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==} + engines: {node: '>=0.10.0'} + + pinkie@2.0.4: + resolution: {integrity: sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==} + engines: {node: '>=0.10.0'} + + pirates@4.0.6: + resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} + engines: {node: '>= 6'} + + pkg-dir@4.2.0: + resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} + engines: {node: '>=8'} + + please-upgrade-node@3.2.0: + resolution: {integrity: sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==} + + poseidon-lite@0.2.1: + resolution: {integrity: sha512-xIr+G6HeYfOhCuswdqcFpSX47SPhm0EpisWJ6h7fHlWwaVIvH3dLnejpatrtw6Xc6HaLrpq05y7VRfvDmDGIog==} + + possible-typed-array-names@1.0.0: + resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} + engines: {node: '>= 0.4'} + + postcss-less@2.0.0: + resolution: {integrity: sha512-pPNsVnpCB13nBMOcl5GVh8JGmB0JGFjqkLUDzKdVpptFFKEe9wFdEzvh2j4lD2AD+7qcrUfw9Ta+oi5+Fw7jjQ==} + engines: {node: '>=4'} + + postcss-media-query-parser@0.2.3: + resolution: {integrity: sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig==} + + postcss-scss@2.0.0: + resolution: {integrity: sha512-um9zdGKaDZirMm+kZFKKVsnKPF7zF7qBAtIfTSnZXD1jZ0JNZIxdB6TxQOjCnlSzLRInVl2v3YdBh/M881C4ug==} + engines: {node: '>=6.0.0'} + + postcss-selector-parser@2.2.3: + resolution: {integrity: sha512-3pqyakeGhrO0BQ5+/tGTfvi5IAUAhHRayGK8WFSu06aEv2BmHoXw/Mhb+w7VY5HERIuC+QoUI7wgrCcq2hqCVA==} + + postcss-values-parser@1.5.0: + resolution: {integrity: sha512-3M3p+2gMp0AH3da530TlX8kiO1nxdTnc3C6vr8dMxRLIlh8UYkz0/wcwptSXjhtx2Fr0TySI7a+BHDQ8NL7LaQ==} + engines: {node: '>=4'} + + postcss@8.4.49: + resolution: {integrity: sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==} + engines: {node: ^10 || ^12 || >=14} + + prelude-ls@1.1.2: + resolution: {integrity: sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==} + engines: {node: '>= 0.8.0'} + + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + + prettier-eslint@16.3.0: + resolution: {integrity: sha512-Lh102TIFCr11PJKUMQ2kwNmxGhTsv/KzUg9QYF2Gkw259g/kPgndZDWavk7/ycbRvj2oz4BPZ1gCU8bhfZH/Xg==} + engines: {node: '>=16.10.0'} + peerDependencies: + prettier-plugin-svelte: ^3.0.0 + svelte-eslint-parser: '*' + peerDependenciesMeta: + prettier-plugin-svelte: + optional: true + svelte-eslint-parser: + optional: true + + prettier-standard@16.4.1: + resolution: {integrity: sha512-IW3Sct4GOdqc1s4+1HZjH2HegzLZQ6mDMl2xz6i6KHCac7kCM+obLbvm2e0zp8PytKkLQCdOpj0cWWa48Ruetw==} + engines: {node: '>=8'} + hasBin: true + + prettier@3.4.1: + resolution: {integrity: sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==} + engines: {node: '>=14'} + hasBin: true + + prettierx@0.11.3: + resolution: {integrity: sha512-Xf04LEfD3ITo26i5U/zR++hwqKPG3feR06rrjB0t2o+QFv8ZidFp4o7nPqPGLfE4UwHJgd0qwnZKwm0MsUQHUA==} + engines: {node: '>=8'} + hasBin: true + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + pretty-format@29.7.0: + resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + progress@2.0.3: + resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} + engines: {node: '>=0.4.0'} + + prompts@2.4.2: + resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} + engines: {node: '>= 6'} + + proxy-from-env@1.1.0: + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + + pseudomap@1.0.2: + resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} + + psl@1.14.0: + resolution: {integrity: sha512-Syk1bnf6fRZ9wQs03AtKJHcM12cKbOLo9L8JtCCdYj5/DTsHmTyXM4BK5ouWeG2P6kZ4nmFvuNTdtaqfobCOCg==} + + pump@3.0.2: + resolution: {integrity: sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + pure-rand@6.1.0: + resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==} + + querystringify@2.2.0: + resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} + + queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + + quick-lru@5.1.1: + resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} + engines: {node: '>=10'} + + randombytes@2.1.0: + resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + + react-is@18.3.1: + resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} + + ref-array-di@1.2.2: + resolution: {integrity: sha512-jhCmhqWa7kvCVrWhR/d7RemkppqPUdxEil1CtTtm7FkZV8LcHHCK3Or9GinUiFP5WY3k0djUkMvhBhx49Jb2iA==} + + reflect.getprototypeof@1.0.7: + resolution: {integrity: sha512-bMvFGIUKlc/eSfXNX+aZ+EL95/EgZzuwA0OBPTbZZDEJw/0AkentjMuM1oiRfwHrshqk4RzdgiTg5CcDalXN5g==} + engines: {node: '>= 0.4'} + + regenerator-runtime@0.14.1: + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} + + regexp-util@1.2.2: + resolution: {integrity: sha512-5/rl2UD18oAlLQEIuKBeiSIOp1hb5wCXcakl5yvHxlY1wyWI4D5cUKKzCibBeu741PA9JKvZhMqbkDQqPusX3w==} + engines: {node: '>= 4'} + + regexp.prototype.flags@1.5.3: + resolution: {integrity: sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==} + engines: {node: '>= 0.4'} + + regexpp@2.0.1: + resolution: {integrity: sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==} + engines: {node: '>=6.5.0'} + + regexpp@3.2.0: + resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} + engines: {node: '>=8'} + + remark-math@1.0.6: + resolution: {integrity: sha512-I43wU/QOQpXvVFXKjA4FHp5xptK65+5F6yolm8+69/JV0EqSOB64wURUZ3JK50JtnTL8FvwLiH2PZ+fvsBxviA==} + peerDependencies: + remark-parse: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 + + remark-parse@5.0.0: + resolution: {integrity: sha512-b3iXszZLH1TLoyUzrATcTQUZrwNl1rE70rVdSruJFlDaJ9z5aMkhrG43Pp68OgfHndL/ADz6V69Zow8cTQu+JA==} + + repeat-string@1.6.1: + resolution: {integrity: sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==} + engines: {node: '>=0.10'} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + + require-relative@0.8.7: + resolution: {integrity: sha512-AKGr4qvHiryxRb19m3PsLRGuKVAbJLUD7E6eOaHkfKhwc+vSgVOCY5xNvm9EkolBKTOf0GrQAZKLimOCz81Khg==} + + requires-port@1.0.0: + resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} + + resolve-alpn@1.2.1: + resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==} + + resolve-cwd@3.0.0: + resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} + engines: {node: '>=8'} + + resolve-from@3.0.0: + resolution: {integrity: sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==} + engines: {node: '>=4'} + + resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + + resolve-from@5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + + resolve.exports@2.0.2: + resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==} + engines: {node: '>=10'} + + resolve@1.15.1: + resolution: {integrity: sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==} + + resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + hasBin: true + + responselike@2.0.1: + resolution: {integrity: sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==} + + restore-cursor@2.0.0: + resolution: {integrity: sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==} + engines: {node: '>=4'} + + restore-cursor@3.1.0: + resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} + engines: {node: '>=8'} + + reusify@1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + + rimraf@2.6.3: + resolution: {integrity: sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + + rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + + rimraf@6.0.1: + resolution: {integrity: sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==} + engines: {node: 20 || >=22} + hasBin: true + + run-async@2.4.1: + resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} + engines: {node: '>=0.12.0'} + + run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + + rxjs@6.6.7: + resolution: {integrity: sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==} + engines: {npm: '>=2.0.0'} + + safe-array-concat@1.1.2: + resolution: {integrity: sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==} + engines: {node: '>=0.4'} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + safe-regex-test@1.0.3: + resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} + engines: {node: '>= 0.4'} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + saxes@6.0.0: + resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} + engines: {node: '>=v12.22.7'} + + schema-utils@3.3.0: + resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==} + engines: {node: '>= 10.13.0'} + + semver-compare@1.0.0: + resolution: {integrity: sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==} + + semver@5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} + hasBin: true + + semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} + engines: {node: '>=10'} + hasBin: true + + serialize-javascript@6.0.2: + resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} + + set-function-length@1.2.2: + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} + engines: {node: '>= 0.4'} + + set-function-name@2.0.2: + resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} + engines: {node: '>= 0.4'} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + side-channel@1.0.6: + resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} + engines: {node: '>= 0.4'} + + sigmund@1.0.1: + resolution: {integrity: sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g==} + + signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + simple-html-tokenizer@0.5.11: + resolution: {integrity: sha512-C2WEK/Z3HoSFbYq8tI7ni3eOo/NneSPRoPpcM7WdLjFOArFuyXEjAoCdOC3DgMfRyziZQ1hCNR4mrNdWEvD0og==} + + sisteransi@1.0.5: + resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + + slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + + slashes@3.0.12: + resolution: {integrity: sha512-Q9VME8WyGkc7pJf6QEkj3wE+2CnvZMI+XJhwdTPR8Z/kWQRXi7boAWLDibRPyHRTUTPx5FaU7MsyrjI3yLB4HA==} + + slice-ansi@0.0.4: + resolution: {integrity: sha512-up04hB2hR92PgjpyU3y/eg91yIBILyjVY26NvvciY3EVVPjybkMszMpXQ9QAkcS3I5rtJBDLoTxxg+qvW8c7rw==} + engines: {node: '>=0.10.0'} + + slice-ansi@2.1.0: + resolution: {integrity: sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==} + engines: {node: '>=6'} + + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + + source-map-support@0.5.13: + resolution: {integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==} + + source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + + source-map@0.7.4: + resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==} + engines: {node: '>= 8'} + + spdx-exceptions@2.5.0: + resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} + + spdx-expression-parse@4.0.0: + resolution: {integrity: sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==} + + spdx-license-ids@3.0.20: + resolution: {integrity: sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==} + + sprintf-js@1.0.3: + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + + stack-utils@2.0.6: + resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} + engines: {node: '>=10'} + + state-toggle@1.0.3: + resolution: {integrity: sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ==} + + string-argv@0.3.2: + resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} + engines: {node: '>=0.6.19'} + + string-length@4.0.2: + resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} + engines: {node: '>=10'} + + string-width@1.0.2: + resolution: {integrity: sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==} + engines: {node: '>=0.10.0'} + + string-width@2.1.1: + resolution: {integrity: sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==} + engines: {node: '>=4'} + + string-width@3.1.0: + resolution: {integrity: sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==} + engines: {node: '>=6'} + + string-width@4.2.0: + resolution: {integrity: sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==} + engines: {node: '>=8'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + + string.prototype.trim@1.2.9: + resolution: {integrity: sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==} + engines: {node: '>= 0.4'} + + string.prototype.trimend@1.0.8: + resolution: {integrity: sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==} + + string.prototype.trimstart@1.0.8: + resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} + engines: {node: '>= 0.4'} + + stringify-object@3.3.0: + resolution: {integrity: sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==} + engines: {node: '>=4'} + + strip-ansi@3.0.1: + resolution: {integrity: sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==} + engines: {node: '>=0.10.0'} + + strip-ansi@4.0.0: + resolution: {integrity: sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==} + engines: {node: '>=4'} + + strip-ansi@5.2.0: + resolution: {integrity: sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==} + engines: {node: '>=6'} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + + strip-bom@3.0.0: + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} + engines: {node: '>=4'} + + strip-bom@4.0.0: + resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} + engines: {node: '>=8'} + + strip-final-newline@2.0.0: + resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} + engines: {node: '>=6'} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + supports-color@2.0.0: + resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==} + engines: {node: '>=0.8.0'} + + supports-color@5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + + supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + + symbol-observable@1.2.0: + resolution: {integrity: sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==} + engines: {node: '>=0.10.0'} + + symbol-tree@3.2.4: + resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} + + synckit@0.9.2: + resolution: {integrity: sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==} + engines: {node: ^14.18.0 || >=16.0.0} + + table@5.4.6: + resolution: {integrity: sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==} + engines: {node: '>=6.0.0'} + + tapable@2.2.1: + resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} + engines: {node: '>=6'} + + terser-webpack-plugin@5.3.10: + resolution: {integrity: sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==} + engines: {node: '>= 10.13.0'} + peerDependencies: + '@swc/core': '*' + esbuild: '*' + uglify-js: '*' + webpack: ^5.1.0 + peerDependenciesMeta: + '@swc/core': + optional: true + esbuild: + optional: true + uglify-js: + optional: true + + terser@5.36.0: + resolution: {integrity: sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==} + engines: {node: '>=10'} + hasBin: true + + test-exclude@6.0.0: + resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} + engines: {node: '>=8'} + + text-table@0.2.0: + resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + + through@2.3.8: + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + + tmp@0.0.33: + resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} + engines: {node: '>=0.6.0'} + + tmpl@1.0.5: + resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} + + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + + toml@3.0.0: + resolution: {integrity: sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==} + + tough-cookie@4.1.4: + resolution: {integrity: sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==} + engines: {node: '>=6'} + + tr46@3.0.0: + resolution: {integrity: sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==} + engines: {node: '>=12'} + + tree-kill@1.2.2: + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true + + trim-trailing-lines@1.1.4: + resolution: {integrity: sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ==} + + trim@1.0.1: + resolution: {integrity: sha512-3JVP2YVqITUisXblCDq/Bi4P9457G/sdEamInkyvCsjbTcXLXIiG7XCb4kGMFWh6JGXesS3TKxOPtrncN/xe8w==} + deprecated: Use String.prototype.trim() instead + + trough@1.0.5: + resolution: {integrity: sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==} + + ts-api-utils@1.4.3: + resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==} + engines: {node: '>=16'} + peerDependencies: + typescript: '>=4.2.0' + + ts-jest@29.2.5: + resolution: {integrity: sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==} + engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@babel/core': '>=7.0.0-beta.0 <8' + '@jest/transform': ^29.0.0 + '@jest/types': ^29.0.0 + babel-jest: ^29.0.0 + esbuild: '*' + jest: ^29.0.0 + typescript: '>=4.3 <6' + peerDependenciesMeta: + '@babel/core': + optional: true + '@jest/transform': + optional: true + '@jest/types': + optional: true + babel-jest: + optional: true + esbuild: + optional: true + + ts-loader@9.5.1: + resolution: {integrity: sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg==} + engines: {node: '>=12.0.0'} + peerDependencies: + typescript: '*' + webpack: ^5.0.0 + + tsconfig-paths@3.15.0: + resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} + + tslib@1.14.1: + resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + + tslib@2.7.0: + resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + + tsutils@3.21.0: + resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} + engines: {node: '>= 6'} + peerDependencies: + typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev + || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + + tsx@4.19.2: + resolution: {integrity: sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==} + engines: {node: '>=18.0.0'} + hasBin: true + + type-check@0.3.2: + resolution: {integrity: sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==} + engines: {node: '>= 0.8.0'} + + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + + type-detect@4.0.8: + resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} + engines: {node: '>=4'} + + type-fest@0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + + type-fest@0.21.3: + resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} + engines: {node: '>=10'} + + type-fest@0.8.1: + resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} + engines: {node: '>=8'} + + type@2.7.3: + resolution: {integrity: sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==} + + typed-array-buffer@1.0.2: + resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} + engines: {node: '>= 0.4'} + + typed-array-byte-length@1.0.1: + resolution: {integrity: sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==} + engines: {node: '>= 0.4'} + + typed-array-byte-offset@1.0.3: + resolution: {integrity: sha512-GsvTyUHTriq6o/bHcTd0vM7OQ9JEdlvluu9YISaA7+KzDzPaIzEeDFNkTfhdE3MYcNhNi0vq/LlegYgIs5yPAw==} + engines: {node: '>= 0.4'} + + typed-array-length@1.0.7: + resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} + engines: {node: '>= 0.4'} + + typescript-eslint@8.16.0: + resolution: {integrity: sha512-wDkVmlY6O2do4V+lZd0GtRfbtXbeD0q9WygwXXSJnC1xorE8eqyC2L1tJimqpSeFrOzRlYtWnUp/uzgHQOgfBQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + typescript@5.7.2: + resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==} + engines: {node: '>=14.17'} + hasBin: true + + uglify-js@3.19.3: + resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} + engines: {node: '>=0.8.0'} + hasBin: true + + unbox-primitive@1.0.2: + resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} + + undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + + undici-types@6.20.0: + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + + unherit@1.1.3: + resolution: {integrity: sha512-Ft16BJcnapDKp0+J/rqFC3Rrk6Y/Ng4nzsC028k2jdDII/rdZ7Wd3pPT/6+vIIxRagwRc9K0IUX0Ra4fKvw+WQ==} + + unicode-regex@2.0.0: + resolution: {integrity: sha512-5nbEG2YU7loyTvPABaKb+8B0u8L7vWCsVmCSsiaO249ZdMKlvrXlxR2ex4TUVAdzv/Cne/TdoXSSaJArGXaleQ==} + engines: {node: '>= 4'} + + unicode-regex@3.0.0: + resolution: {integrity: sha512-WiDJdORsqgxkZrjC8WsIP573130HNn7KsB0IDnUccW2BG2b19QQNloNhVe6DKk3Aef0UcoIHhNVj7IkkcYWrNw==} + engines: {node: '>= 4'} + + unified@8.4.2: + resolution: {integrity: sha512-JCrmN13jI4+h9UAyKEoGcDZV+i1E7BLFuG7OsaDvTXI5P0qhHX+vZO/kOhz9jn8HGENDKbwSeB0nVOg4gVStGA==} + + uniq@1.0.1: + resolution: {integrity: sha512-Gw+zz50YNKPDKXs+9d+aKAjVwpjNwqzvNpLigIruT4HA9lMZNdMqs9x07kKHB/L9WRzqp4+DlTU5s4wG2esdoA==} + + unist-util-is@3.0.0: + resolution: {integrity: sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==} + + unist-util-remove-position@1.1.4: + resolution: {integrity: sha512-tLqd653ArxJIPnKII6LMZwH+mb5q+n/GtXQZo6S6csPRs5zB0u79Yw8ouR3wTw8wxvdJFhpP6Y7jorWdCgLO0A==} + + unist-util-stringify-position@2.0.3: + resolution: {integrity: sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==} + + unist-util-visit-parents@2.1.2: + resolution: {integrity: sha512-DyN5vD4NE3aSeB+PXYNKxzGsfocxp6asDc2XXE3b0ekO2BaRUpBicbbUygfSvYfUz1IkmjFR1YF7dPklraMZ2g==} + + unist-util-visit@1.4.1: + resolution: {integrity: sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==} + + universalify@0.2.0: + resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} + engines: {node: '>= 4.0.0'} + + update-browserslist-db@1.1.1: + resolution: {integrity: sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + + url-parse@1.5.10: + resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} + + utf-8-validate@6.0.5: + resolution: {integrity: sha512-EYZR+OpIXp9Y1eG1iueg8KRsY8TuT8VNgnanZ0uA3STqhHQTLwbl+WX76/9X5OY12yQubymBpaBSmMPkSTQcKA==} + engines: {node: '>=6.14.2'} + + util@0.12.5: + resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} + + v8-compile-cache@2.4.0: + resolution: {integrity: sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==} + + v8-to-istanbul@9.3.0: + resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} + engines: {node: '>=10.12.0'} + + vfile-location@2.0.6: + resolution: {integrity: sha512-sSFdyCP3G6Ka0CEmN83A2YCMKIieHx0EDaj5IDP4g1pa5ZJ4FJDvpO0WODLxo4LUX4oe52gmSCK7Jw4SBghqxA==} + + vfile-message@2.0.4: + resolution: {integrity: sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==} + + vfile@4.2.1: + resolution: {integrity: sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==} + + vnopts@1.0.2: + resolution: {integrity: sha512-d2rr2EFhAGHnTlURu49G7GWmiJV80HbAnkYdD9IFAtfhmxC+kSWEaZ6ZF064DJFTv9lQZQV1vuLTntyQpoanGQ==} + engines: {node: '>= 6'} + + vue-eslint-parser@9.4.3: + resolution: {integrity: sha512-2rYRLWlIpaiN8xbPiDyXZXRgLGOtWxERV7ND5fFAv5qo1D2N9Fu9MNajBNc6o13lZ+24DAWCkQCvj4klgmcITg==} + engines: {node: ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' + + w3c-xmlserializer@4.0.0: + resolution: {integrity: sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==} + engines: {node: '>=14'} + + walker@1.0.8: + resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} + + watchpack@2.4.2: + resolution: {integrity: sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==} + engines: {node: '>=10.13.0'} + + webidl-conversions@7.0.0: + resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} + engines: {node: '>=12'} + + webpack-sources@3.2.3: + resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} + engines: {node: '>=10.13.0'} + + webpack@5.96.1: + resolution: {integrity: sha512-l2LlBSvVZGhL4ZrPwyr8+37AunkcYj5qh8o6u2/2rzoPc8gxFJkLj1WxNgooi9pnoc06jh0BjuXnamM4qlujZA==} + engines: {node: '>=10.13.0'} + hasBin: true + peerDependencies: + webpack-cli: '*' + peerDependenciesMeta: + webpack-cli: + optional: true + + whatwg-encoding@2.0.0: + resolution: {integrity: sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==} + engines: {node: '>=12'} + + whatwg-mimetype@3.0.0: + resolution: {integrity: sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==} + engines: {node: '>=12'} + + whatwg-url@11.0.0: + resolution: {integrity: sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==} + engines: {node: '>=12'} + + which-boxed-primitive@1.0.2: + resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} + + which-builtin-type@1.2.0: + resolution: {integrity: sha512-I+qLGQ/vucCby4tf5HsLmGueEla4ZhwTBSqaooS+Y0BuxN4Cp+okmGuV+8mXZ84KDI9BA+oklo+RzKg0ONdSUA==} + engines: {node: '>= 0.4'} + + which-collection@1.0.2: + resolution: {integrity: sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==} + engines: {node: '>= 0.4'} + + which-typed-array@1.1.16: + resolution: {integrity: sha512-g+N+GAWiRj66DngFwHvISJd+ITsyphZvD1vChfVg6cEdnzy53GzB3oy0fUNlvhz7H7+MiqhYr26qxQShCpKTTQ==} + engines: {node: '>= 0.4'} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + + wordwrap@1.0.0: + resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} + + wrap-ansi@3.0.1: + resolution: {integrity: sha512-iXR3tDXpbnTpzjKSylUJRkLuOrEC7hwEB221cgn6wtF8wpmz28puFXAEfPT5zrjM3wahygB//VuWEr1vTkDcNQ==} + engines: {node: '>=4'} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + + write-file-atomic@4.0.2: + resolution: {integrity: sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + + write@1.0.3: + resolution: {integrity: sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==} + engines: {node: '>=4'} + + ws@8.17.1: + resolution: {integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + ws@8.18.0: + resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + xml-name-validator@4.0.0: + resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} + engines: {node: '>=12'} + + xmlchars@2.2.0: + resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} + + xtend@4.0.2: + resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} + engines: {node: '>=0.4'} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yallist@2.1.2: + resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} + + yallist@3.1.1: + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + + yaml-unist-parser@1.1.1: + resolution: {integrity: sha512-cGtqhHBlcft+rTKiPsVcSyi43Eqm5a1buYokW9VkztroKMErBSdR9ANHx+/XxNppHZTu2KMEn4yY8MdhuGoFuA==} + engines: {node: '>= 6'} + + yaml@1.8.3: + resolution: {integrity: sha512-X/v7VDnK+sxbQ2Imq4Jt2PRUsRsP7UcpSl3Llg6+NRRqWLIvxkMFYtH1FmvwNGYRKKPa+EPA4qDBlI9WVG1UKw==} + engines: {node: '>= 6'} + + yaml@2.6.1: + resolution: {integrity: sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==} + engines: {node: '>= 14'} + hasBin: true + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + +snapshots: + + '@aave/aave-v3-aptos-ts-sdk@0.0.23': + dependencies: + '@aptos-labs/ts-sdk': 1.33.0 + bignumber.js: 9.1.2 + buffer: 6.0.3 + crypto-js: 4.2.0 + dotenv: 16.4.5 + ethers: 6.13.4(bufferutil@4.0.8)(utf-8-validate@6.0.5) + events: 3.3.0 + jest-environment-jsdom: 29.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.5) + tslib: 2.8.1 + tsx: 4.19.2 + util: 0.12.5 + yaml: 2.6.1 + optionalDependencies: + bufferutil: 4.0.8 + utf-8-validate: 6.0.5 + transitivePeerDependencies: + - canvas + - debug + - supports-color + + '@adraffy/ens-normalize@1.10.1': {} + + '@ampproject/remapping@2.3.0': + dependencies: + '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/trace-mapping': 0.3.25 + + '@angular/compiler@8.2.14': + dependencies: + tslib: 1.14.1 + + '@aptos-labs/aptos-cli@1.0.2': + dependencies: + commander: 12.1.0 + + '@aptos-labs/aptos-client@0.1.1': + dependencies: + axios: 1.7.4 + got: 11.8.6 + transitivePeerDependencies: + - debug + + '@aptos-labs/ts-sdk@1.31.0': + dependencies: + '@aptos-labs/aptos-cli': 1.0.2 + '@aptos-labs/aptos-client': 0.1.1 + '@noble/curves': 1.7.0 + '@noble/hashes': 1.6.1 + '@scure/bip32': 1.6.0 + '@scure/bip39': 1.5.0 + eventemitter3: 5.0.1 + form-data: 4.0.1 + js-base64: 3.7.7 + jwt-decode: 4.0.0 + poseidon-lite: 0.2.1 + transitivePeerDependencies: + - debug + + '@aptos-labs/ts-sdk@1.33.0': + dependencies: + '@aptos-labs/aptos-cli': 1.0.2 + '@aptos-labs/aptos-client': 0.1.1 + '@noble/curves': 1.7.0 + '@noble/hashes': 1.6.1 + '@scure/bip32': 1.6.0 + '@scure/bip39': 1.5.0 + eventemitter3: 5.0.1 + form-data: 4.0.1 + js-base64: 3.7.7 + jwt-decode: 4.0.0 + poseidon-lite: 0.2.1 + transitivePeerDependencies: + - debug + + '@babel/code-frame@7.26.2': + dependencies: + '@babel/helper-validator-identifier': 7.25.9 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/code-frame@7.8.3': + dependencies: + '@babel/highlight': 7.25.9 + + '@babel/compat-data@7.26.2': {} + + '@babel/core@7.26.0': + dependencies: + '@ampproject/remapping': 2.3.0 + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.2 + '@babel/helper-compilation-targets': 7.25.9 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) + '@babel/helpers': 7.26.0 + '@babel/parser': 7.26.2 + '@babel/template': 7.25.9 + '@babel/traverse': 7.25.9 + '@babel/types': 7.26.0 + convert-source-map: 2.0.0 + debug: 4.3.7 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/generator@7.26.2': + dependencies: + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 + '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/trace-mapping': 0.3.25 + jsesc: 3.0.2 + + '@babel/helper-compilation-targets@7.25.9': + dependencies: + '@babel/compat-data': 7.26.2 + '@babel/helper-validator-option': 7.25.9 + browserslist: 4.24.2 + lru-cache: 5.1.1 + semver: 6.3.1 + + '@babel/helper-module-imports@7.25.9': + dependencies: + '@babel/traverse': 7.25.9 + '@babel/types': 7.26.0 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-transforms@7.26.0(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@babel/traverse': 7.25.9 + transitivePeerDependencies: + - supports-color + + '@babel/helper-plugin-utils@7.25.9': {} + + '@babel/helper-string-parser@7.25.9': {} + + '@babel/helper-validator-identifier@7.25.9': {} + + '@babel/helper-validator-option@7.25.9': {} + + '@babel/helpers@7.26.0': + dependencies: + '@babel/template': 7.25.9 + '@babel/types': 7.26.0 + + '@babel/highlight@7.25.9': + dependencies: + '@babel/helper-validator-identifier': 7.25.9 + chalk: 2.4.2 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/parser@7.26.2': + dependencies: + '@babel/types': 7.26.0 + + '@babel/parser@7.9.4': + dependencies: + '@babel/types': 7.26.0 + + '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-import-attributes@7.26.0(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-typescript@7.25.9(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/runtime@7.26.0': + dependencies: + regenerator-runtime: 0.14.1 + + '@babel/template@7.25.9': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 + + '@babel/traverse@7.25.9': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.2 + '@babel/parser': 7.26.2 + '@babel/template': 7.25.9 + '@babel/types': 7.26.0 + debug: 4.3.7 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + + '@babel/types@7.26.0': + dependencies: + '@babel/helper-string-parser': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + + '@bcoe/v8-coverage@0.2.3': {} + + '@es-joy/jsdoccomment@0.49.0': + dependencies: + comment-parser: 1.4.1 + esquery: 1.6.0 + jsdoc-type-pratt-parser: 4.1.0 + + '@esbuild/aix-ppc64@0.23.1': + optional: true + + '@esbuild/android-arm64@0.23.1': + optional: true + + '@esbuild/android-arm@0.23.1': + optional: true + + '@esbuild/android-x64@0.23.1': + optional: true + + '@esbuild/darwin-arm64@0.23.1': + optional: true + + '@esbuild/darwin-x64@0.23.1': + optional: true + + '@esbuild/freebsd-arm64@0.23.1': + optional: true + + '@esbuild/freebsd-x64@0.23.1': + optional: true + + '@esbuild/linux-arm64@0.23.1': + optional: true + + '@esbuild/linux-arm@0.23.1': + optional: true + + '@esbuild/linux-ia32@0.23.1': + optional: true + + '@esbuild/linux-loong64@0.23.1': + optional: true + + '@esbuild/linux-mips64el@0.23.1': + optional: true + + '@esbuild/linux-ppc64@0.23.1': + optional: true + + '@esbuild/linux-riscv64@0.23.1': + optional: true + + '@esbuild/linux-s390x@0.23.1': + optional: true + + '@esbuild/linux-x64@0.23.1': + optional: true + + '@esbuild/netbsd-x64@0.23.1': + optional: true + + '@esbuild/openbsd-arm64@0.23.1': + optional: true + + '@esbuild/openbsd-x64@0.23.1': + optional: true + + '@esbuild/sunos-x64@0.23.1': + optional: true + + '@esbuild/win32-arm64@0.23.1': + optional: true + + '@esbuild/win32-ia32@0.23.1': + optional: true + + '@esbuild/win32-x64@0.23.1': + optional: true + + '@eslint-community/eslint-utils@4.4.1(eslint@8.57.1)': + dependencies: + eslint: 8.57.1 + eslint-visitor-keys: 3.4.3 + + '@eslint-community/eslint-utils@4.4.1(eslint@9.16.0)': + dependencies: + eslint: 9.16.0 + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.1': {} + + '@eslint/config-array@0.19.0': + dependencies: + '@eslint/object-schema': 2.1.4 + debug: 4.3.7 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + + '@eslint/core@0.9.0': {} + + '@eslint/eslintrc@2.1.4': + dependencies: + ajv: 6.12.6 + debug: 4.3.7 + espree: 9.6.1 + globals: 13.24.0 + ignore: 5.3.2 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/eslintrc@3.2.0': + dependencies: + ajv: 6.12.6 + debug: 4.3.7 + espree: 10.3.0 + globals: 14.0.0 + ignore: 5.3.2 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@8.57.1': {} + + '@eslint/js@9.16.0': {} + + '@eslint/object-schema@2.1.4': {} + + '@eslint/plugin-kit@0.2.3': + dependencies: + levn: 0.4.1 + + '@ethersproject/bignumber@5.7.0': + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + bn.js: 5.2.1 + + '@ethersproject/bytes@5.7.0': + dependencies: + '@ethersproject/logger': 5.7.0 + + '@ethersproject/logger@5.7.0': {} + + '@glimmer/interfaces@0.41.4': {} + + '@glimmer/syntax@0.41.4': + dependencies: + '@glimmer/interfaces': 0.41.4 + '@glimmer/util': 0.41.4 + handlebars: 4.7.8 + simple-html-tokenizer: 0.5.11 + + '@glimmer/util@0.41.4': {} + + '@humanfs/core@0.19.1': {} + + '@humanfs/node@0.16.6': + dependencies: + '@humanfs/core': 0.19.1 + '@humanwhocodes/retry': 0.3.1 + + '@humanwhocodes/config-array@0.13.0': + dependencies: + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.3.7 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/object-schema@2.0.3': {} + + '@humanwhocodes/retry@0.3.1': {} + + '@humanwhocodes/retry@0.4.1': {} + + '@iarna/toml@2.2.3': {} + + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + + '@istanbuljs/load-nyc-config@1.1.0': + dependencies: + camelcase: 5.3.1 + find-up: 4.1.0 + get-package-type: 0.1.0 + js-yaml: 3.14.1 + resolve-from: 5.0.0 + + '@istanbuljs/schema@0.1.3': {} + + '@jest/console@29.7.0': + dependencies: + '@jest/types': 29.6.3 + '@types/node': 22.10.1 + chalk: 4.1.2 + jest-message-util: 29.7.0 + jest-util: 29.7.0 + slash: 3.0.0 + + '@jest/core@29.7.0': + dependencies: + '@jest/console': 29.7.0 + '@jest/reporters': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 22.10.1 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + ci-info: 3.9.0 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-changed-files: 29.7.0 + jest-config: 29.7.0(@types/node@22.10.1) + jest-haste-map: 29.7.0 + jest-message-util: 29.7.0 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-resolve-dependencies: 29.7.0 + jest-runner: 29.7.0 + jest-runtime: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + jest-watcher: 29.7.0 + micromatch: 4.0.8 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-ansi: 6.0.1 + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + - ts-node + + '@jest/environment@29.7.0': + dependencies: + '@jest/fake-timers': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 22.10.1 + jest-mock: 29.7.0 + + '@jest/expect-utils@29.7.0': + dependencies: + jest-get-type: 29.6.3 + + '@jest/expect@29.7.0': + dependencies: + expect: 29.7.0 + jest-snapshot: 29.7.0 + transitivePeerDependencies: + - supports-color + + '@jest/fake-timers@29.7.0': + dependencies: + '@jest/types': 29.6.3 + '@sinonjs/fake-timers': 10.3.0 + '@types/node': 22.10.1 + jest-message-util: 29.7.0 + jest-mock: 29.7.0 + jest-util: 29.7.0 + + '@jest/globals@29.7.0': + dependencies: + '@jest/environment': 29.7.0 + '@jest/expect': 29.7.0 + '@jest/types': 29.6.3 + jest-mock: 29.7.0 + transitivePeerDependencies: + - supports-color + + '@jest/reporters@29.7.0': + dependencies: + '@bcoe/v8-coverage': 0.2.3 + '@jest/console': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@jridgewell/trace-mapping': 0.3.25 + '@types/node': 22.10.1 + chalk: 4.1.2 + collect-v8-coverage: 1.0.2 + exit: 0.1.2 + glob: 7.2.3 + graceful-fs: 4.2.11 + istanbul-lib-coverage: 3.2.2 + istanbul-lib-instrument: 6.0.3 + istanbul-lib-report: 3.0.1 + istanbul-lib-source-maps: 4.0.1 + istanbul-reports: 3.1.7 + jest-message-util: 29.7.0 + jest-util: 29.7.0 + jest-worker: 29.7.0 + slash: 3.0.0 + string-length: 4.0.2 + strip-ansi: 6.0.1 + v8-to-istanbul: 9.3.0 + transitivePeerDependencies: + - supports-color + + '@jest/schemas@29.6.3': + dependencies: + '@sinclair/typebox': 0.27.8 + + '@jest/source-map@29.6.3': + dependencies: + '@jridgewell/trace-mapping': 0.3.25 + callsites: 3.1.0 + graceful-fs: 4.2.11 + + '@jest/test-result@29.7.0': + dependencies: + '@jest/console': 29.7.0 + '@jest/types': 29.6.3 + '@types/istanbul-lib-coverage': 2.0.6 + collect-v8-coverage: 1.0.2 + + '@jest/test-sequencer@29.7.0': + dependencies: + '@jest/test-result': 29.7.0 + graceful-fs: 4.2.11 + jest-haste-map: 29.7.0 + slash: 3.0.0 + + '@jest/transform@29.7.0': + dependencies: + '@babel/core': 7.26.0 + '@jest/types': 29.6.3 + '@jridgewell/trace-mapping': 0.3.25 + babel-plugin-istanbul: 6.1.1 + chalk: 4.1.2 + convert-source-map: 2.0.0 + fast-json-stable-stringify: 2.1.0 + graceful-fs: 4.2.11 + jest-haste-map: 29.7.0 + jest-regex-util: 29.6.3 + jest-util: 29.7.0 + micromatch: 4.0.8 + pirates: 4.0.6 + slash: 3.0.0 + write-file-atomic: 4.0.2 + transitivePeerDependencies: + - supports-color + + '@jest/types@29.6.3': + dependencies: + '@jest/schemas': 29.6.3 + '@types/istanbul-lib-coverage': 2.0.6 + '@types/istanbul-reports': 3.0.4 + '@types/node': 22.10.1 + '@types/yargs': 17.0.33 + chalk: 4.1.2 + + '@jridgewell/gen-mapping@0.3.5': + dependencies: + '@jridgewell/set-array': 1.2.1 + '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/trace-mapping': 0.3.25 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/set-array@1.2.1': {} + + '@jridgewell/source-map@0.3.6': + dependencies: + '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/trace-mapping': 0.3.25 + + '@jridgewell/sourcemap-codec@1.5.0': {} + + '@jridgewell/trace-mapping@0.3.25': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.0 + + '@microsoft/tsdoc-config@0.17.1': + dependencies: + '@microsoft/tsdoc': 0.15.1 + ajv: 8.12.0 + jju: 1.4.0 + resolve: 1.22.8 + + '@microsoft/tsdoc@0.15.1': {} + + '@noble/curves@1.2.0': + dependencies: + '@noble/hashes': 1.3.2 + + '@noble/curves@1.7.0': + dependencies: + '@noble/hashes': 1.6.0 + + '@noble/hashes@1.3.2': {} + + '@noble/hashes@1.6.0': {} + + '@noble/hashes@1.6.1': {} + + '@nodelib/fs.scandir@2.1.5': + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + + '@nodelib/fs.stat@2.0.5': {} + + '@nodelib/fs.walk@1.2.8': + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.17.1 + + '@pkgr/core@0.1.1': {} + + '@rauschma/stringio@1.4.0': + dependencies: + '@types/node': 10.17.60 + + '@rtsao/scc@1.1.0': {} + + '@samverschueren/stream-to-observable@0.3.1(rxjs@6.6.7)': + dependencies: + any-observable: 0.3.0(rxjs@6.6.7) + optionalDependencies: + rxjs: 6.6.7 + transitivePeerDependencies: + - zenObservable + + '@scure/base@1.2.1': {} + + '@scure/bip32@1.6.0': + dependencies: + '@noble/curves': 1.7.0 + '@noble/hashes': 1.6.1 + '@scure/base': 1.2.1 + + '@scure/bip39@1.5.0': + dependencies: + '@noble/hashes': 1.6.1 + '@scure/base': 1.2.1 + + '@sinclair/typebox@0.27.8': {} + + '@sindresorhus/is@4.6.0': {} + + '@sinonjs/commons@3.0.1': + dependencies: + type-detect: 4.0.8 + + '@sinonjs/fake-timers@10.3.0': + dependencies: + '@sinonjs/commons': 3.0.1 + + '@szmarczak/http-timer@4.0.6': + dependencies: + defer-to-connect: 2.0.1 + + '@tootallnate/once@2.0.0': {} + + '@types/babel__core@7.20.5': + dependencies: + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 + '@types/babel__generator': 7.6.8 + '@types/babel__template': 7.4.4 + '@types/babel__traverse': 7.20.6 + + '@types/babel__generator@7.6.8': + dependencies: + '@babel/types': 7.26.0 + + '@types/babel__template@7.4.4': + dependencies: + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 + + '@types/babel__traverse@7.20.6': + dependencies: + '@babel/types': 7.26.0 + + '@types/bn.js@5.1.6': + dependencies: + '@types/node': 22.10.1 + + '@types/cacheable-request@6.0.3': + dependencies: + '@types/http-cache-semantics': 4.0.4 + '@types/keyv': 3.1.4 + '@types/node': 22.10.1 + '@types/responselike': 1.0.3 + + '@types/chai@5.0.1': + dependencies: + '@types/deep-eql': 4.0.2 + + '@types/deep-eql@4.0.2': {} + + '@types/eslint-scope@3.7.7': + dependencies: + '@types/eslint': 9.6.1 + '@types/estree': 1.0.6 + + '@types/eslint@9.6.1': + dependencies: + '@types/estree': 1.0.6 + '@types/json-schema': 7.0.15 + + '@types/estree@1.0.6': {} + + '@types/glob@7.2.0': + dependencies: + '@types/minimatch': 5.1.2 + '@types/node': 22.10.1 + + '@types/graceful-fs@4.1.9': + dependencies: + '@types/node': 22.10.1 + + '@types/http-cache-semantics@4.0.4': {} + + '@types/istanbul-lib-coverage@2.0.6': {} + + '@types/istanbul-lib-report@3.0.3': + dependencies: + '@types/istanbul-lib-coverage': 2.0.6 + + '@types/istanbul-reports@3.0.4': + dependencies: + '@types/istanbul-lib-report': 3.0.3 + + '@types/jest@29.5.14': + dependencies: + expect: 29.7.0 + pretty-format: 29.7.0 + + '@types/jsdom@20.0.1': + dependencies: + '@types/node': 22.10.1 + '@types/tough-cookie': 4.0.5 + parse5: 7.2.1 + + '@types/json-schema@7.0.15': {} + + '@types/json5@0.0.29': {} + + '@types/keyv@3.1.4': + dependencies: + '@types/node': 22.10.1 + + '@types/minimatch@5.1.2': {} + + '@types/node@10.17.60': {} + + '@types/node@22.10.1': + dependencies: + undici-types: 6.20.0 + + '@types/node@22.7.5': + dependencies: + undici-types: 6.19.8 + + '@types/responselike@1.0.3': + dependencies: + '@types/node': 22.10.1 + + '@types/stack-utils@2.0.3': {} + + '@types/tough-cookie@4.0.5': {} + + '@types/unist@2.0.11': {} + + '@types/yargs-parser@21.0.3': {} + + '@types/yargs@17.0.33': + dependencies: + '@types/yargs-parser': 21.0.3 + + ? '@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2)' + : dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 8.16.0(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/scope-manager': 8.16.0 + '@typescript-eslint/type-utils': 8.16.0(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.16.0(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 8.16.0 + eslint: 9.16.0 + graphemer: 1.4.0 + ignore: 5.3.2 + natural-compare: 1.4.0 + ts-api-utils: 1.4.3(typescript@5.7.2) + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2)': + dependencies: + '@typescript-eslint/scope-manager': 6.21.0 + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 6.21.0 + debug: 4.3.7 + eslint: 8.57.1 + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2)': + dependencies: + '@typescript-eslint/scope-manager': 8.16.0 + '@typescript-eslint/types': 8.16.0 + '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 8.16.0 + debug: 4.3.7 + eslint: 9.16.0 + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/scope-manager@6.21.0': + dependencies: + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/visitor-keys': 6.21.0 + + '@typescript-eslint/scope-manager@8.16.0': + dependencies: + '@typescript-eslint/types': 8.16.0 + '@typescript-eslint/visitor-keys': 8.16.0 + + '@typescript-eslint/type-utils@8.16.0(eslint@9.16.0)(typescript@5.7.2)': + dependencies: + '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) + '@typescript-eslint/utils': 8.16.0(eslint@9.16.0)(typescript@5.7.2) + debug: 4.3.7 + eslint: 9.16.0 + ts-api-utils: 1.4.3(typescript@5.7.2) + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/types@6.21.0': {} + + '@typescript-eslint/types@8.16.0': {} + + '@typescript-eslint/typescript-estree@2.6.1(typescript@5.7.2)': + dependencies: + debug: 4.3.7 + glob: 7.2.3 + is-glob: 4.0.3 + lodash.unescape: 4.0.1 + semver: 7.6.3 + tsutils: 3.21.0(typescript@5.7.2) + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/typescript-estree@6.21.0(typescript@5.7.2)': + dependencies: + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/visitor-keys': 6.21.0 + debug: 4.3.7 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.3 + semver: 7.6.3 + ts-api-utils: 1.4.3(typescript@5.7.2) + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/typescript-estree@8.16.0(typescript@5.7.2)': + dependencies: + '@typescript-eslint/types': 8.16.0 + '@typescript-eslint/visitor-keys': 8.16.0 + debug: 4.3.7 + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.4.3(typescript@5.7.2) + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.16.0(eslint@9.16.0)(typescript@5.7.2)': + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) + '@typescript-eslint/scope-manager': 8.16.0 + '@typescript-eslint/types': 8.16.0 + '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) + eslint: 9.16.0 + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/visitor-keys@6.21.0': + dependencies: + '@typescript-eslint/types': 6.21.0 + eslint-visitor-keys: 3.4.3 + + '@typescript-eslint/visitor-keys@8.16.0': + dependencies: + '@typescript-eslint/types': 8.16.0 + eslint-visitor-keys: 4.2.0 + + '@ungap/structured-clone@1.2.0': {} + + '@webassemblyjs/ast@1.14.1': + dependencies: + '@webassemblyjs/helper-numbers': 1.13.2 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + + '@webassemblyjs/floating-point-hex-parser@1.13.2': {} + + '@webassemblyjs/helper-api-error@1.13.2': {} + + '@webassemblyjs/helper-buffer@1.14.1': {} + + '@webassemblyjs/helper-numbers@1.13.2': + dependencies: + '@webassemblyjs/floating-point-hex-parser': 1.13.2 + '@webassemblyjs/helper-api-error': 1.13.2 + '@xtuc/long': 4.2.2 + + '@webassemblyjs/helper-wasm-bytecode@1.13.2': {} + + '@webassemblyjs/helper-wasm-section@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-buffer': 1.14.1 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/wasm-gen': 1.14.1 + + '@webassemblyjs/ieee754@1.13.2': + dependencies: + '@xtuc/ieee754': 1.2.0 + + '@webassemblyjs/leb128@1.13.2': + dependencies: + '@xtuc/long': 4.2.2 + + '@webassemblyjs/utf8@1.13.2': {} + + '@webassemblyjs/wasm-edit@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-buffer': 1.14.1 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/helper-wasm-section': 1.14.1 + '@webassemblyjs/wasm-gen': 1.14.1 + '@webassemblyjs/wasm-opt': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + '@webassemblyjs/wast-printer': 1.14.1 + + '@webassemblyjs/wasm-gen@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/ieee754': 1.13.2 + '@webassemblyjs/leb128': 1.13.2 + '@webassemblyjs/utf8': 1.13.2 + + '@webassemblyjs/wasm-opt@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-buffer': 1.14.1 + '@webassemblyjs/wasm-gen': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + + '@webassemblyjs/wasm-parser@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-api-error': 1.13.2 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/ieee754': 1.13.2 + '@webassemblyjs/leb128': 1.13.2 + '@webassemblyjs/utf8': 1.13.2 + + '@webassemblyjs/wast-printer@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@xtuc/long': 4.2.2 + + '@xtuc/ieee754@1.2.0': {} + + '@xtuc/long@4.2.2': {} + + abab@2.0.6: {} + + acorn-globals@7.0.1: + dependencies: + acorn: 8.14.0 + acorn-walk: 8.3.4 + + acorn-jsx@5.3.2(acorn@7.4.1): + dependencies: + acorn: 7.4.1 + + acorn-jsx@5.3.2(acorn@8.14.0): + dependencies: + acorn: 8.14.0 + + acorn-walk@8.3.4: + dependencies: + acorn: 8.14.0 + + acorn@7.4.1: {} + + acorn@8.14.0: {} + + aes-js@4.0.0-beta.5: {} + + agent-base@6.0.2: + dependencies: + debug: 4.3.7 + transitivePeerDependencies: + - supports-color + + aggregate-error@3.1.0: + dependencies: + clean-stack: 2.2.0 + indent-string: 4.0.0 + + ajv-keywords@3.5.2(ajv@6.12.6): + dependencies: + ajv: 6.12.6 + + ajv@6.12.6: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + + ajv@8.12.0: + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js: 4.4.1 + + angular-estree-parser@1.3.1(@angular/compiler@8.2.14): + dependencies: + '@angular/compiler': 8.2.14 + lines-and-columns: 1.1.6 + tslib: 1.14.1 + + angular-html-parser@1.4.0: + dependencies: + tslib: 1.14.1 + + ansi-escapes@3.2.0: {} + + ansi-escapes@4.3.2: + dependencies: + type-fest: 0.21.3 + + ansi-regex@2.1.1: {} + + ansi-regex@3.0.1: {} + + ansi-regex@4.1.1: {} + + ansi-regex@5.0.1: {} + + ansi-regex@6.1.0: {} + + ansi-styles@2.2.1: {} + + ansi-styles@3.2.1: + dependencies: + color-convert: 1.9.3 + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + ansi-styles@5.2.0: {} + + ansi-styles@6.2.1: {} + + any-observable@0.3.0(rxjs@6.6.7): + optionalDependencies: + rxjs: 6.6.7 + + anymatch@3.1.3: + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.1 + + are-docs-informative@0.0.2: {} + + argparse@1.0.10: + dependencies: + sprintf-js: 1.0.3 + + argparse@2.0.1: {} + + array-buffer-byte-length@1.0.1: + dependencies: + call-bind: 1.0.7 + is-array-buffer: 3.0.4 + + array-differ@2.1.0: {} + + array-includes@3.1.8: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.5 + es-object-atoms: 1.0.0 + get-intrinsic: 1.2.4 + is-string: 1.0.7 + + array-index@1.0.0: + dependencies: + debug: 2.6.9 + es6-symbol: 3.1.4 + transitivePeerDependencies: + - supports-color + + array-union@1.0.2: + dependencies: + array-uniq: 1.0.3 + + array-union@2.1.0: {} + + array-uniq@1.0.3: {} + + array.prototype.findlastindex@1.2.5: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.5 + es-errors: 1.3.0 + es-object-atoms: 1.0.0 + es-shim-unscopables: 1.0.2 + + array.prototype.flat@1.3.2: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.5 + es-shim-unscopables: 1.0.2 + + array.prototype.flatmap@1.3.2: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.5 + es-shim-unscopables: 1.0.2 + + arraybuffer.prototype.slice@1.0.3: + dependencies: + array-buffer-byte-length: 1.0.1 + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.5 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + is-array-buffer: 3.0.4 + is-shared-array-buffer: 1.0.3 + + arrify@1.0.1: {} + + astral-regex@1.0.0: {} + + async@3.2.6: {} + + asynckit@0.4.0: {} + + available-typed-arrays@1.0.7: + dependencies: + possible-typed-array-names: 1.0.0 + + axios@1.7.4: + dependencies: + follow-redirects: 1.15.9 + form-data: 4.0.1 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + + babel-jest@29.7.0(@babel/core@7.26.0): + dependencies: + '@babel/core': 7.26.0 + '@jest/transform': 29.7.0 + '@types/babel__core': 7.20.5 + babel-plugin-istanbul: 6.1.1 + babel-preset-jest: 29.6.3(@babel/core@7.26.0) + chalk: 4.1.2 + graceful-fs: 4.2.11 + slash: 3.0.0 + transitivePeerDependencies: + - supports-color + + babel-plugin-istanbul@6.1.1: + dependencies: + '@babel/helper-plugin-utils': 7.25.9 + '@istanbuljs/load-nyc-config': 1.1.0 + '@istanbuljs/schema': 0.1.3 + istanbul-lib-instrument: 5.2.1 + test-exclude: 6.0.0 + transitivePeerDependencies: + - supports-color + + babel-plugin-jest-hoist@29.6.3: + dependencies: + '@babel/template': 7.25.9 + '@babel/types': 7.26.0 + '@types/babel__core': 7.20.5 + '@types/babel__traverse': 7.20.6 + + babel-preset-current-node-syntax@1.1.0(@babel/core@7.26.0): + dependencies: + '@babel/core': 7.26.0 + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.26.0) + '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.26.0) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.26.0) + '@babel/plugin-syntax-import-attributes': 7.26.0(@babel/core@7.26.0) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.26.0) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.26.0) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.26.0) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.26.0) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.26.0) + + babel-preset-jest@29.6.3(@babel/core@7.26.0): + dependencies: + '@babel/core': 7.26.0 + babel-plugin-jest-hoist: 29.6.3 + babel-preset-current-node-syntax: 1.1.0(@babel/core@7.26.0) + + bail@1.0.5: {} + + balanced-match@1.0.2: {} + + base64-js@1.5.1: {} + + bignumber.js@9.1.2: {} + + bn.js@5.2.1: {} + + brace-expansion@1.1.11: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + + brace-expansion@2.0.1: + dependencies: + balanced-match: 1.0.2 + + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + + browserslist@4.24.2: + dependencies: + caniuse-lite: 1.0.30001684 + electron-to-chromium: 1.5.67 + node-releases: 2.0.18 + update-browserslist-db: 1.1.1(browserslist@4.24.2) + + bs-logger@0.2.6: + dependencies: + fast-json-stable-stringify: 2.1.0 + + bser@2.1.1: + dependencies: + node-int64: 0.4.0 + + buffer-from@1.1.2: {} + + buffer@6.0.3: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + + bufferutil@4.0.8: + dependencies: + node-gyp-build: 4.8.4 + optional: true + + builtin-modules@3.3.0: {} + + builtins@5.1.0: + dependencies: + semver: 7.6.3 + + cacheable-lookup@5.0.4: {} + + cacheable-request@7.0.4: + dependencies: + clone-response: 1.0.3 + get-stream: 5.2.0 + http-cache-semantics: 4.1.1 + keyv: 4.5.4 + lowercase-keys: 2.0.0 + normalize-url: 6.1.0 + responselike: 2.0.1 + + call-bind@1.0.7: + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + set-function-length: 1.2.2 + + caller-callsite@2.0.0: + dependencies: + callsites: 2.0.0 + + caller-path@2.0.0: + dependencies: + caller-callsite: 2.0.0 + + callsites@2.0.0: {} + + callsites@3.1.0: {} + + camelcase@5.3.1: {} + + camelcase@6.3.0: {} + + caniuse-lite@1.0.30001684: {} + + chalk@1.1.3: + dependencies: + ansi-styles: 2.2.1 + escape-string-regexp: 1.0.5 + has-ansi: 2.0.0 + strip-ansi: 3.0.1 + supports-color: 2.0.0 + + chalk@2.4.2: + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 + + chalk@3.0.0: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + char-regex@1.0.2: {} + + character-entities-legacy@1.1.4: {} + + character-entities@1.2.4: {} + + character-reference-invalid@1.1.4: {} + + chardet@0.7.0: {} + + chrome-trace-event@1.0.4: {} + + ci-info@2.0.0: {} + + ci-info@3.9.0: {} + + cjk-regex@2.0.0: + dependencies: + regexp-util: 1.2.2 + unicode-regex: 2.0.0 + + cjs-module-lexer@1.4.1: {} + + clean-stack@2.2.0: {} + + cli-cursor@2.1.0: + dependencies: + restore-cursor: 2.0.0 + + cli-cursor@3.1.0: + dependencies: + restore-cursor: 3.1.0 + + cli-truncate@0.2.1: + dependencies: + slice-ansi: 0.0.4 + string-width: 1.0.2 + + cli-width@3.0.0: {} + + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + clone-response@1.0.3: + dependencies: + mimic-response: 1.0.1 + + co@4.6.0: {} + + code-point-at@1.1.0: {} + + collapse-white-space@1.0.6: {} + + collect-v8-coverage@1.0.2: {} + + color-convert@1.9.3: + dependencies: + color-name: 1.1.3 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.3: {} + + color-name@1.1.4: {} + + combined-stream@1.0.8: + dependencies: + delayed-stream: 1.0.0 + + commander@12.1.0: {} + + commander@2.20.3: {} + + comment-parser@1.4.1: {} + + common-tags@1.8.2: {} + + concat-map@0.0.1: {} + + confusing-browser-globals@1.0.11: {} + + convert-source-map@2.0.0: {} + + cosmiconfig@5.2.1: + dependencies: + import-fresh: 2.0.0 + is-directory: 0.3.1 + js-yaml: 3.14.1 + parse-json: 4.0.0 + + create-jest@29.7.0(@types/node@22.10.1): + dependencies: + '@jest/types': 29.6.3 + chalk: 4.1.2 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-config: 29.7.0(@types/node@22.10.1) + jest-util: 29.7.0 + prompts: 2.4.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + crypto-js@4.2.0: {} + + cssom@0.3.8: {} + + cssom@0.5.0: {} + + cssstyle@2.3.0: + dependencies: + cssom: 0.3.8 + + d@1.0.2: + dependencies: + es5-ext: 0.10.64 + type: 2.7.3 + + dashify@2.0.0: {} + + data-urls@3.0.2: + dependencies: + abab: 2.0.6 + whatwg-mimetype: 3.0.0 + whatwg-url: 11.0.0 + + data-view-buffer@1.0.1: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-data-view: 1.0.1 + + data-view-byte-length@1.0.1: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-data-view: 1.0.1 + + data-view-byte-offset@1.0.0: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-data-view: 1.0.1 + + date-fns@1.30.1: {} + + debug@2.6.9: + dependencies: + ms: 2.0.0 + + debug@3.2.7: + dependencies: + ms: 2.1.3 + + debug@4.3.7: + dependencies: + ms: 2.1.3 + + decimal.js@10.4.3: {} + + decompress-response@6.0.0: + dependencies: + mimic-response: 3.1.0 + + dedent@0.7.0: {} + + dedent@1.5.3: {} + + deep-is@0.1.4: {} + + deepmerge@4.3.1: {} + + defer-to-connect@2.0.1: {} + + define-data-property@1.1.4: + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + gopd: 1.1.0 + + define-properties@1.2.1: + dependencies: + define-data-property: 1.1.4 + has-property-descriptors: 1.0.2 + object-keys: 1.1.1 + + del@5.1.0: + dependencies: + globby: 10.0.2 + graceful-fs: 4.2.11 + is-glob: 4.0.3 + is-path-cwd: 2.2.0 + is-path-inside: 3.0.3 + p-map: 3.0.0 + rimraf: 3.0.2 + slash: 3.0.0 + + delayed-stream@1.0.0: {} + + detect-newline@3.1.0: {} + + diff-sequences@29.6.3: {} + + diff@4.0.2: {} + + dir-glob@3.0.1: + dependencies: + path-type: 4.0.0 + + dlv@1.1.3: {} + + doctrine@2.1.0: + dependencies: + esutils: 2.0.3 + + doctrine@3.0.0: + dependencies: + esutils: 2.0.3 + + domexception@4.0.0: + dependencies: + webidl-conversions: 7.0.0 + + dotenv@16.4.5: {} + + eastasianwidth@0.2.0: {} + + editorconfig-to-prettier@0.1.1: {} + + editorconfig@0.15.3: + dependencies: + commander: 2.20.3 + lru-cache: 4.1.5 + semver: 5.7.2 + sigmund: 1.0.1 + + ejs@3.1.10: + dependencies: + jake: 10.9.2 + + electron-to-chromium@1.5.67: {} + + elegant-spinner@1.0.1: {} + + emittery@0.13.1: {} + + emoji-regex@7.0.3: {} + + emoji-regex@8.0.0: {} + + emoji-regex@9.2.2: {} + + end-of-stream@1.4.4: + dependencies: + once: 1.4.0 + + enhanced-resolve@5.17.1: + dependencies: + graceful-fs: 4.2.11 + tapable: 2.2.1 + + entities@4.5.0: {} + + error-ex@1.3.2: + dependencies: + is-arrayish: 0.2.1 + + es-abstract@1.23.5: + dependencies: + array-buffer-byte-length: 1.0.1 + arraybuffer.prototype.slice: 1.0.3 + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 + data-view-buffer: 1.0.1 + data-view-byte-length: 1.0.1 + data-view-byte-offset: 1.0.0 + es-define-property: 1.0.0 + es-errors: 1.3.0 + es-object-atoms: 1.0.0 + es-set-tostringtag: 2.0.3 + es-to-primitive: 1.3.0 + function.prototype.name: 1.1.6 + get-intrinsic: 1.2.4 + get-symbol-description: 1.0.2 + globalthis: 1.0.4 + gopd: 1.1.0 + has-property-descriptors: 1.0.2 + has-proto: 1.1.0 + has-symbols: 1.0.3 + hasown: 2.0.2 + internal-slot: 1.0.7 + is-array-buffer: 3.0.4 + is-callable: 1.2.7 + is-data-view: 1.0.1 + is-negative-zero: 2.0.3 + is-regex: 1.2.0 + is-shared-array-buffer: 1.0.3 + is-string: 1.0.7 + is-typed-array: 1.1.13 + is-weakref: 1.0.2 + object-inspect: 1.13.3 + object-keys: 1.1.1 + object.assign: 4.1.5 + regexp.prototype.flags: 1.5.3 + safe-array-concat: 1.1.2 + safe-regex-test: 1.0.3 + string.prototype.trim: 1.2.9 + string.prototype.trimend: 1.0.8 + string.prototype.trimstart: 1.0.8 + typed-array-buffer: 1.0.2 + typed-array-byte-length: 1.0.1 + typed-array-byte-offset: 1.0.3 + typed-array-length: 1.0.7 + unbox-primitive: 1.0.2 + which-typed-array: 1.1.16 + + es-define-property@1.0.0: + dependencies: + get-intrinsic: 1.2.4 + + es-errors@1.3.0: {} + + es-module-lexer@1.5.4: {} + + es-object-atoms@1.0.0: + dependencies: + es-errors: 1.3.0 + + es-set-tostringtag@2.0.3: + dependencies: + get-intrinsic: 1.2.4 + has-tostringtag: 1.0.2 + hasown: 2.0.2 + + es-shim-unscopables@1.0.2: + dependencies: + hasown: 2.0.2 + + es-to-primitive@1.3.0: + dependencies: + is-callable: 1.2.7 + is-date-object: 1.0.5 + is-symbol: 1.0.4 + + es5-ext@0.10.64: + dependencies: + es6-iterator: 2.0.3 + es6-symbol: 3.1.4 + esniff: 2.0.1 + next-tick: 1.1.0 + + es6-iterator@2.0.3: + dependencies: + d: 1.0.2 + es5-ext: 0.10.64 + es6-symbol: 3.1.4 + + es6-symbol@3.1.4: + dependencies: + d: 1.0.2 + ext: 1.7.0 + + esbuild@0.23.1: + optionalDependencies: + '@esbuild/aix-ppc64': 0.23.1 + '@esbuild/android-arm': 0.23.1 + '@esbuild/android-arm64': 0.23.1 + '@esbuild/android-x64': 0.23.1 + '@esbuild/darwin-arm64': 0.23.1 + '@esbuild/darwin-x64': 0.23.1 + '@esbuild/freebsd-arm64': 0.23.1 + '@esbuild/freebsd-x64': 0.23.1 + '@esbuild/linux-arm': 0.23.1 + '@esbuild/linux-arm64': 0.23.1 + '@esbuild/linux-ia32': 0.23.1 + '@esbuild/linux-loong64': 0.23.1 + '@esbuild/linux-mips64el': 0.23.1 + '@esbuild/linux-ppc64': 0.23.1 + '@esbuild/linux-riscv64': 0.23.1 + '@esbuild/linux-s390x': 0.23.1 + '@esbuild/linux-x64': 0.23.1 + '@esbuild/netbsd-x64': 0.23.1 + '@esbuild/openbsd-arm64': 0.23.1 + '@esbuild/openbsd-x64': 0.23.1 + '@esbuild/sunos-x64': 0.23.1 + '@esbuild/win32-arm64': 0.23.1 + '@esbuild/win32-ia32': 0.23.1 + '@esbuild/win32-x64': 0.23.1 + + escalade@3.2.0: {} + + escape-string-regexp@1.0.5: {} + + escape-string-regexp@2.0.0: {} + + escape-string-regexp@4.0.0: {} + + escodegen@2.1.0: + dependencies: + esprima: 4.0.1 + estraverse: 5.3.0 + esutils: 2.0.3 + optionalDependencies: + source-map: 0.6.1 + + eslint-compat-utils@0.5.1(eslint@9.16.0): + dependencies: + eslint: 9.16.0 + semver: 7.6.3 + + ? eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0))(eslint@9.16.0) + : dependencies: + confusing-browser-globals: 1.0.11 + eslint: 9.16.0 + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0) + object.assign: 4.1.5 + object.entries: 1.1.8 + semver: 7.6.3 + + ? eslint-config-airbnb-typescript@18.0.0(@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2))(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0))(eslint@9.16.0) + : dependencies: + '@typescript-eslint/eslint-plugin': 8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/parser': 8.16.0(eslint@9.16.0)(typescript@5.7.2) + eslint: 9.16.0 + eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0))(eslint@9.16.0) + transitivePeerDependencies: + - eslint-plugin-import + + eslint-config-prettier@9.1.0(eslint@9.16.0): + dependencies: + eslint: 9.16.0 + + ? eslint-config-standard@17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0))(eslint-plugin-n@16.6.2(eslint@9.16.0))(eslint-plugin-promise@7.2.1(eslint@9.16.0))(eslint@9.16.0) + : dependencies: + eslint: 9.16.0 + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0) + eslint-plugin-n: 16.6.2(eslint@9.16.0) + eslint-plugin-promise: 7.2.1(eslint@9.16.0) + + eslint-import-resolver-node@0.3.9: + dependencies: + debug: 3.2.7 + is-core-module: 2.15.1 + resolve: 1.22.8 + transitivePeerDependencies: + - supports-color + + ? eslint-module-utils@2.12.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@9.16.0) + : dependencies: + debug: 3.2.7 + optionalDependencies: + '@typescript-eslint/parser': 8.16.0(eslint@9.16.0)(typescript@5.7.2) + eslint: 9.16.0 + eslint-import-resolver-node: 0.3.9 + transitivePeerDependencies: + - supports-color + + eslint-plugin-es-x@7.8.0(eslint@9.16.0): + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) + '@eslint-community/regexpp': 4.12.1 + eslint: 9.16.0 + eslint-compat-utils: 0.5.1(eslint@9.16.0) + + eslint-plugin-es@3.0.1(eslint@9.16.0): + dependencies: + eslint: 9.16.0 + eslint-utils: 2.1.0 + regexpp: 3.2.0 + + eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0): + dependencies: + '@rtsao/scc': 1.1.0 + array-includes: 3.1.8 + array.prototype.findlastindex: 1.2.5 + array.prototype.flat: 1.3.2 + array.prototype.flatmap: 1.3.2 + debug: 3.2.7 + doctrine: 2.1.0 + eslint: 9.16.0 + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@9.16.0) + hasown: 2.0.2 + is-core-module: 2.15.1 + is-glob: 4.0.3 + minimatch: 3.1.2 + object.fromentries: 2.0.8 + object.groupby: 1.0.3 + object.values: 1.2.0 + semver: 6.3.1 + string.prototype.trimend: 1.0.8 + tsconfig-paths: 3.15.0 + optionalDependencies: + '@typescript-eslint/parser': 8.16.0(eslint@9.16.0)(typescript@5.7.2) + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + + eslint-plugin-jsdoc@50.6.0(eslint@9.16.0): + dependencies: + '@es-joy/jsdoccomment': 0.49.0 + are-docs-informative: 0.0.2 + comment-parser: 1.4.1 + debug: 4.3.7 + escape-string-regexp: 4.0.0 + eslint: 9.16.0 + espree: 10.3.0 + esquery: 1.6.0 + parse-imports: 2.2.1 + semver: 7.6.3 + spdx-expression-parse: 4.0.0 + synckit: 0.9.2 + transitivePeerDependencies: + - supports-color + + eslint-plugin-n@16.6.2(eslint@9.16.0): + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) + builtins: 5.1.0 + eslint: 9.16.0 + eslint-plugin-es-x: 7.8.0(eslint@9.16.0) + get-tsconfig: 4.8.1 + globals: 13.24.0 + ignore: 5.3.2 + is-builtin-module: 3.2.1 + is-core-module: 2.15.1 + minimatch: 3.1.2 + resolve: 1.22.8 + semver: 7.6.3 + + eslint-plugin-node@11.1.0(eslint@9.16.0): + dependencies: + eslint: 9.16.0 + eslint-plugin-es: 3.0.1(eslint@9.16.0) + eslint-utils: 2.1.0 + ignore: 5.3.2 + minimatch: 10.0.1 + resolve: 1.22.8 + semver: 7.6.3 + + eslint-plugin-promise@7.2.1(eslint@9.16.0): + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) + eslint: 9.16.0 + + eslint-plugin-tsdoc@0.4.0: + dependencies: + '@microsoft/tsdoc': 0.15.1 + '@microsoft/tsdoc-config': 0.17.1 + + eslint-scope@5.1.1: + dependencies: + esrecurse: 4.3.0 + estraverse: 4.3.0 + + eslint-scope@7.2.2: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-scope@8.2.0: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-utils@1.4.3: + dependencies: + eslint-visitor-keys: 1.3.0 + + eslint-utils@2.1.0: + dependencies: + eslint-visitor-keys: 1.3.0 + + eslint-visitor-keys@1.3.0: {} + + eslint-visitor-keys@3.4.3: {} + + eslint-visitor-keys@4.2.0: {} + + eslint@6.8.0: + dependencies: + '@babel/code-frame': 7.26.2 + ajv: 6.12.6 + chalk: 2.4.2 + cross-spawn: 7.0.6 + debug: 4.3.7 + doctrine: 3.0.0 + eslint-scope: 5.1.1 + eslint-utils: 1.4.3 + eslint-visitor-keys: 1.3.0 + espree: 6.2.1 + esquery: 1.6.0 + esutils: 2.0.3 + file-entry-cache: 5.0.1 + functional-red-black-tree: 1.0.1 + glob-parent: 5.1.2 + globals: 12.4.0 + ignore: 4.0.6 + import-fresh: 3.3.0 + imurmurhash: 0.1.4 + inquirer: 7.3.3 + is-glob: 4.0.3 + js-yaml: 3.14.1 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.3.0 + lodash: 4.17.21 + minimatch: 10.0.1 + mkdirp: 0.5.6 + natural-compare: 1.4.0 + optionator: 0.8.3 + progress: 2.0.3 + regexpp: 2.0.1 + semver: 7.6.3 + strip-ansi: 5.2.0 + strip-json-comments: 3.1.1 + table: 5.4.6 + text-table: 0.2.0 + v8-compile-cache: 2.4.0 + transitivePeerDependencies: + - supports-color + + eslint@8.57.1: + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) + '@eslint-community/regexpp': 4.12.1 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.1 + '@humanwhocodes/config-array': 0.13.0 + '@humanwhocodes/module-importer': 1.0.1 + '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.3.7 + doctrine: 3.0.0 + escape-string-regexp: 4.0.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + esquery: 1.6.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + find-up: 5.0.0 + glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + is-path-inside: 3.0.3 + js-yaml: 4.1.0 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.4 + strip-ansi: 6.0.1 + text-table: 0.2.0 + transitivePeerDependencies: + - supports-color + + eslint@9.16.0: + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) + '@eslint-community/regexpp': 4.12.1 + '@eslint/config-array': 0.19.0 + '@eslint/core': 0.9.0 + '@eslint/eslintrc': 3.2.0 + '@eslint/js': 9.16.0 + '@eslint/plugin-kit': 0.2.3 + '@humanfs/node': 0.16.6 + '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.4.1 + '@types/estree': 1.0.6 + '@types/json-schema': 7.0.15 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.3.7 + escape-string-regexp: 4.0.0 + eslint-scope: 8.2.0 + eslint-visitor-keys: 4.2.0 + espree: 10.3.0 + esquery: 1.6.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 8.0.0 + find-up: 5.0.0 + glob-parent: 6.0.2 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + json-stable-stringify-without-jsonify: 1.0.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.4 + transitivePeerDependencies: + - supports-color + + esniff@2.0.1: + dependencies: + d: 1.0.2 + es5-ext: 0.10.64 + event-emitter: 0.3.5 + type: 2.7.3 + + espree@10.3.0: + dependencies: + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) + eslint-visitor-keys: 4.2.0 + + espree@6.2.1: + dependencies: + acorn: 7.4.1 + acorn-jsx: 5.3.2(acorn@7.4.1) + eslint-visitor-keys: 1.3.0 + + espree@9.6.1: + dependencies: + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) + eslint-visitor-keys: 3.4.3 + + esprima@4.0.1: {} + + esquery@1.6.0: + dependencies: + estraverse: 5.3.0 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@4.3.0: {} + + estraverse@5.3.0: {} + + esutils@2.0.3: {} + + ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@6.0.5): + dependencies: + '@adraffy/ens-normalize': 1.10.1 + '@noble/curves': 1.2.0 + '@noble/hashes': 1.3.2 + '@types/node': 22.7.5 + aes-js: 4.0.0-beta.5 + tslib: 2.7.0 + ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@6.0.5) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + event-emitter@0.3.5: + dependencies: + d: 1.0.2 + es5-ext: 0.10.64 + + eventemitter3@5.0.1: {} + + events@3.3.0: {} + + execa@2.1.0: + dependencies: + cross-spawn: 7.0.6 + get-stream: 5.2.0 + is-stream: 2.0.1 + merge-stream: 2.0.0 + npm-run-path: 3.1.0 + onetime: 5.1.2 + p-finally: 2.0.1 + signal-exit: 3.0.7 + strip-final-newline: 2.0.0 + + execa@5.1.1: + dependencies: + cross-spawn: 7.0.6 + get-stream: 6.0.1 + human-signals: 2.1.0 + is-stream: 2.0.1 + merge-stream: 2.0.0 + npm-run-path: 4.0.1 + onetime: 5.1.2 + signal-exit: 3.0.7 + strip-final-newline: 2.0.0 + + exit@0.1.2: {} + + expect@29.7.0: + dependencies: + '@jest/expect-utils': 29.7.0 + jest-get-type: 29.6.3 + jest-matcher-utils: 29.7.0 + jest-message-util: 29.7.0 + jest-util: 29.7.0 + + ext@1.7.0: + dependencies: + type: 2.7.3 + + extend@3.0.2: {} + + external-editor@3.1.0: + dependencies: + chardet: 0.7.0 + iconv-lite: 0.4.24 + tmp: 0.0.33 + + fast-deep-equal@3.1.3: {} + + fast-glob@3.3.2: + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.8 + + fast-json-stable-stringify@2.1.0: {} + + fast-levenshtein@2.0.6: {} + + fastq@1.17.1: + dependencies: + reusify: 1.0.4 + + fb-watchman@2.0.2: + dependencies: + bser: 2.1.1 + + figures@1.7.0: + dependencies: + escape-string-regexp: 1.0.5 + object-assign: 4.1.1 + + figures@2.0.0: + dependencies: + escape-string-regexp: 1.0.5 + + figures@3.2.0: + dependencies: + escape-string-regexp: 1.0.5 + + file-entry-cache@5.0.1: + dependencies: + flat-cache: 2.0.1 + + file-entry-cache@6.0.1: + dependencies: + flat-cache: 3.2.0 + + file-entry-cache@8.0.0: + dependencies: + flat-cache: 4.0.1 + + filelist@1.0.4: + dependencies: + minimatch: 5.1.6 + + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + + find-parent-dir@0.3.0: {} + + find-project-root@1.1.1: {} + + find-up@4.1.0: + dependencies: + locate-path: 5.0.0 + path-exists: 4.0.0 + + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat-cache@2.0.1: + dependencies: + flatted: 2.0.2 + rimraf: 2.6.3 + write: 1.0.3 + + flat-cache@3.2.0: + dependencies: + flatted: 3.3.2 + keyv: 4.5.4 + rimraf: 3.0.2 + + flat-cache@4.0.1: + dependencies: + flatted: 3.3.2 + keyv: 4.5.4 + + flatted@2.0.2: {} + + flatted@3.3.2: {} + + flatten@1.0.3: {} + + flow-parser@0.111.3: {} + + follow-redirects@1.15.9: {} + + for-each@0.3.3: + dependencies: + is-callable: 1.2.7 + + foreground-child@3.3.0: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + + form-data@4.0.1: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + mime-types: 2.1.35 + + fs.realpath@1.0.0: {} + + fsevents@2.3.3: + optional: true + + function-bind@1.1.2: {} + + function.prototype.name@1.1.6: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.5 + functions-have-names: 1.2.3 + + functional-red-black-tree@1.0.1: {} + + functions-have-names@1.2.3: {} + + gensync@1.0.0-beta.2: {} + + get-caller-file@2.0.5: {} + + get-intrinsic@1.2.4: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + has-proto: 1.1.0 + has-symbols: 1.0.3 + hasown: 2.0.2 + + get-own-enumerable-property-symbols@3.0.2: {} + + get-package-type@0.1.0: {} + + get-stdin@7.0.0: {} + + get-stream@4.1.0: + dependencies: + pump: 3.0.2 + + get-stream@5.2.0: + dependencies: + pump: 3.0.2 + + get-stream@6.0.1: {} + + get-symbol-description@1.0.2: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + + get-tsconfig@4.8.1: + dependencies: + resolve-pkg-maps: 1.0.0 + + glob-parent@5.1.2: + dependencies: + is-glob: 4.0.3 + + glob-parent@6.0.2: + dependencies: + is-glob: 4.0.3 + + glob-to-regexp@0.4.1: {} + + glob@11.0.0: + dependencies: + foreground-child: 3.3.0 + jackspeak: 4.0.2 + minimatch: 10.0.1 + minipass: 7.1.2 + package-json-from-dist: 1.0.1 + path-scurry: 2.0.0 + + glob@7.2.3: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + + globals@11.12.0: {} + + globals@12.4.0: + dependencies: + type-fest: 0.8.1 + + globals@13.24.0: + dependencies: + type-fest: 0.20.2 + + globals@14.0.0: {} + + globalthis@1.0.4: + dependencies: + define-properties: 1.2.1 + gopd: 1.1.0 + + globby@10.0.2: + dependencies: + '@types/glob': 7.2.0 + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.3.2 + glob: 7.2.3 + ignore: 5.3.2 + merge2: 1.4.1 + slash: 3.0.0 + + globby@11.1.0: + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.3.2 + ignore: 5.3.2 + merge2: 1.4.1 + slash: 3.0.0 + + globby@6.1.0: + dependencies: + array-union: 1.0.2 + glob: 7.2.3 + object-assign: 4.1.1 + pify: 2.3.0 + pinkie-promise: 2.0.1 + + gopd@1.1.0: + dependencies: + get-intrinsic: 1.2.4 + + got@11.8.6: + dependencies: + '@sindresorhus/is': 4.6.0 + '@szmarczak/http-timer': 4.0.6 + '@types/cacheable-request': 6.0.3 + '@types/responselike': 1.0.3 + cacheable-lookup: 5.0.4 + cacheable-request: 7.0.4 + decompress-response: 6.0.0 + http2-wrapper: 1.0.3 + lowercase-keys: 2.0.0 + p-cancelable: 2.1.1 + responselike: 2.0.1 + + graceful-fs@4.2.11: {} + + graphemer@1.4.0: {} + + graphql@14.6.0: + dependencies: + iterall: 1.3.0 + + handlebars@4.7.8: + dependencies: + minimist: 1.2.8 + neo-async: 2.6.2 + source-map: 0.6.1 + wordwrap: 1.0.0 + optionalDependencies: + uglify-js: 3.19.3 + + has-ansi@2.0.0: + dependencies: + ansi-regex: 2.1.1 + + has-bigints@1.0.2: {} + + has-flag@3.0.0: {} + + has-flag@4.0.0: {} + + has-property-descriptors@1.0.2: + dependencies: + es-define-property: 1.0.0 + + has-proto@1.1.0: + dependencies: + call-bind: 1.0.7 + + has-symbols@1.0.3: {} + + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.0.3 + + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 + + html-element-attributes@2.2.1: {} + + html-encoding-sniffer@3.0.0: + dependencies: + whatwg-encoding: 2.0.0 + + html-escaper@2.0.2: {} + + html-styles@1.0.0: {} + + html-tag-names@1.1.5: {} + + http-cache-semantics@4.1.1: {} + + http-proxy-agent@5.0.0: + dependencies: + '@tootallnate/once': 2.0.0 + agent-base: 6.0.2 + debug: 4.3.7 + transitivePeerDependencies: + - supports-color + + http2-wrapper@1.0.3: + dependencies: + quick-lru: 5.1.1 + resolve-alpn: 1.2.1 + + https-proxy-agent@5.0.1: + dependencies: + agent-base: 6.0.2 + debug: 4.3.7 + transitivePeerDependencies: + - supports-color + + human-signals@2.1.0: {} + + iconv-lite@0.4.24: + dependencies: + safer-buffer: 2.1.2 + + iconv-lite@0.6.3: + dependencies: + safer-buffer: 2.1.2 + + ieee754@1.2.1: {} + + ignore@3.3.10: {} + + ignore@4.0.6: {} + + ignore@5.3.2: {} + + import-fresh@2.0.0: + dependencies: + caller-path: 2.0.0 + resolve-from: 3.0.0 + + import-fresh@3.3.0: + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + + import-local@3.2.0: + dependencies: + pkg-dir: 4.2.0 + resolve-cwd: 3.0.0 + + imurmurhash@0.1.4: {} + + indent-string@3.2.0: {} + + indent-string@4.0.0: {} + + indexes-of@1.0.1: {} + + inflight@1.0.6: + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + + inherits@2.0.4: {} + + inquirer@7.3.3: + dependencies: + ansi-escapes: 4.3.2 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-width: 3.0.0 + external-editor: 3.1.0 + figures: 3.2.0 + lodash: 4.17.21 + mute-stream: 0.0.8 + run-async: 2.4.1 + rxjs: 6.6.7 + string-width: 4.2.3 + strip-ansi: 6.0.1 + through: 2.3.8 + + internal-slot@1.0.7: + dependencies: + es-errors: 1.3.0 + hasown: 2.0.2 + side-channel: 1.0.6 + + is-alphabetical@1.0.4: {} + + is-alphanumerical@1.0.4: + dependencies: + is-alphabetical: 1.0.4 + is-decimal: 1.0.4 + + is-arguments@1.1.1: + dependencies: + call-bind: 1.0.7 + has-tostringtag: 1.0.2 + + is-array-buffer@3.0.4: + dependencies: + call-bind: 1.0.7 + get-intrinsic: 1.2.4 + + is-arrayish@0.2.1: {} + + is-async-function@2.0.0: + dependencies: + has-tostringtag: 1.0.2 + + is-bigint@1.0.4: + dependencies: + has-bigints: 1.0.2 + + is-boolean-object@1.1.2: + dependencies: + call-bind: 1.0.7 + has-tostringtag: 1.0.2 + + is-buffer@2.0.5: {} + + is-builtin-module@3.2.1: + dependencies: + builtin-modules: 3.3.0 + + is-callable@1.2.7: {} + + is-ci@2.0.0: + dependencies: + ci-info: 2.0.0 + + is-core-module@2.15.1: + dependencies: + hasown: 2.0.2 + + is-data-view@1.0.1: + dependencies: + is-typed-array: 1.1.13 + + is-date-object@1.0.5: + dependencies: + has-tostringtag: 1.0.2 + + is-decimal@1.0.4: {} + + is-directory@0.3.1: {} + + is-extglob@2.1.1: {} + + is-finalizationregistry@1.1.0: + dependencies: + call-bind: 1.0.7 + + is-fullwidth-code-point@1.0.0: + dependencies: + number-is-nan: 1.0.1 + + is-fullwidth-code-point@2.0.0: {} + + is-fullwidth-code-point@3.0.0: {} + + is-generator-fn@2.1.0: {} + + is-generator-function@1.0.10: + dependencies: + has-tostringtag: 1.0.2 + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-hexadecimal@1.0.4: {} + + is-map@2.0.3: {} + + is-negative-zero@2.0.3: {} + + is-number-object@1.0.7: + dependencies: + has-tostringtag: 1.0.2 + + is-number@7.0.0: {} + + is-obj@1.0.1: {} + + is-observable@1.1.0: + dependencies: + symbol-observable: 1.2.0 + + is-path-cwd@2.2.0: {} + + is-path-inside@3.0.3: {} + + is-plain-obj@2.1.0: {} + + is-potential-custom-element-name@1.0.1: {} + + is-promise@2.2.2: {} + + is-regex@1.2.0: + dependencies: + call-bind: 1.0.7 + gopd: 1.1.0 + has-tostringtag: 1.0.2 + hasown: 2.0.2 + + is-regexp@1.0.0: {} + + is-set@2.0.3: {} + + is-shared-array-buffer@1.0.3: + dependencies: + call-bind: 1.0.7 + + is-stream@1.1.0: {} + + is-stream@2.0.1: {} + + is-string@1.0.7: + dependencies: + has-tostringtag: 1.0.2 + + is-symbol@1.0.4: + dependencies: + has-symbols: 1.0.3 + + is-typed-array@1.1.13: + dependencies: + which-typed-array: 1.1.16 + + is-weakmap@2.0.2: {} + + is-weakref@1.0.2: + dependencies: + call-bind: 1.0.7 + + is-weakset@2.0.3: + dependencies: + call-bind: 1.0.7 + get-intrinsic: 1.2.4 + + is-whitespace-character@1.0.4: {} + + is-word-character@1.0.4: {} + + isarray@2.0.5: {} + + isexe@2.0.0: {} + + istanbul-lib-coverage@3.2.2: {} + + istanbul-lib-instrument@5.2.1: + dependencies: + '@babel/core': 7.26.0 + '@babel/parser': 7.26.2 + '@istanbuljs/schema': 0.1.3 + istanbul-lib-coverage: 3.2.2 + semver: 7.6.3 + transitivePeerDependencies: + - supports-color + + istanbul-lib-instrument@6.0.3: + dependencies: + '@babel/core': 7.26.0 + '@babel/parser': 7.26.2 + '@istanbuljs/schema': 0.1.3 + istanbul-lib-coverage: 3.2.2 + semver: 7.6.3 + transitivePeerDependencies: + - supports-color + + istanbul-lib-report@3.0.1: + dependencies: + istanbul-lib-coverage: 3.2.2 + make-dir: 4.0.0 + supports-color: 7.2.0 + + istanbul-lib-source-maps@4.0.1: + dependencies: + debug: 4.3.7 + istanbul-lib-coverage: 3.2.2 + source-map: 0.6.1 + transitivePeerDependencies: + - supports-color + + istanbul-reports@3.1.7: + dependencies: + html-escaper: 2.0.2 + istanbul-lib-report: 3.0.1 + + iterall@1.3.0: {} + + jackspeak@4.0.2: + dependencies: + '@isaacs/cliui': 8.0.2 + + jake@10.9.2: + dependencies: + async: 3.2.6 + chalk: 4.1.2 + filelist: 1.0.4 + minimatch: 3.1.2 + + jest-changed-files@29.7.0: + dependencies: + execa: 5.1.1 + jest-util: 29.7.0 + p-limit: 3.1.0 + + jest-circus@29.7.0: + dependencies: + '@jest/environment': 29.7.0 + '@jest/expect': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 22.10.1 + chalk: 4.1.2 + co: 4.6.0 + dedent: 1.5.3 + is-generator-fn: 2.1.0 + jest-each: 29.7.0 + jest-matcher-utils: 29.7.0 + jest-message-util: 29.7.0 + jest-runtime: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 + p-limit: 3.1.0 + pretty-format: 29.7.0 + pure-rand: 6.1.0 + slash: 3.0.0 + stack-utils: 2.0.6 + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + + jest-cli@29.7.0(@types/node@22.10.1): + dependencies: + '@jest/core': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/types': 29.6.3 + chalk: 4.1.2 + create-jest: 29.7.0(@types/node@22.10.1) + exit: 0.1.2 + import-local: 3.2.0 + jest-config: 29.7.0(@types/node@22.10.1) + jest-util: 29.7.0 + jest-validate: 29.7.0 + yargs: 17.7.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + + jest-config@29.7.0(@types/node@22.10.1): + dependencies: + '@babel/core': 7.26.0 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.26.0) + chalk: 4.1.2 + ci-info: 3.9.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0 + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + micromatch: 4.0.8 + parse-json: 5.2.0 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 22.10.1 + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + + jest-diff@29.7.0: + dependencies: + chalk: 4.1.2 + diff-sequences: 29.6.3 + jest-get-type: 29.6.3 + pretty-format: 29.7.0 + + jest-docblock@25.3.0: + dependencies: + detect-newline: 3.1.0 + + jest-docblock@29.7.0: + dependencies: + detect-newline: 3.1.0 + + jest-each@29.7.0: + dependencies: + '@jest/types': 29.6.3 + chalk: 4.1.2 + jest-get-type: 29.6.3 + jest-util: 29.7.0 + pretty-format: 29.7.0 + + jest-environment-jsdom@29.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.5): + dependencies: + '@jest/environment': 29.7.0 + '@jest/fake-timers': 29.7.0 + '@jest/types': 29.6.3 + '@types/jsdom': 20.0.1 + '@types/node': 22.10.1 + jest-mock: 29.7.0 + jest-util: 29.7.0 + jsdom: 20.0.3(bufferutil@4.0.8)(utf-8-validate@6.0.5) + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + jest-environment-node@29.7.0: + dependencies: + '@jest/environment': 29.7.0 + '@jest/fake-timers': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 22.10.1 + jest-mock: 29.7.0 + jest-util: 29.7.0 + + jest-get-type@29.6.3: {} + + jest-haste-map@29.7.0: + dependencies: + '@jest/types': 29.6.3 + '@types/graceful-fs': 4.1.9 + '@types/node': 22.10.1 + anymatch: 3.1.3 + fb-watchman: 2.0.2 + graceful-fs: 4.2.11 + jest-regex-util: 29.6.3 + jest-util: 29.7.0 + jest-worker: 29.7.0 + micromatch: 4.0.8 + walker: 1.0.8 + optionalDependencies: + fsevents: 2.3.3 + + jest-leak-detector@29.7.0: + dependencies: + jest-get-type: 29.6.3 + pretty-format: 29.7.0 + + jest-matcher-utils@29.7.0: + dependencies: + chalk: 4.1.2 + jest-diff: 29.7.0 + jest-get-type: 29.6.3 + pretty-format: 29.7.0 + + jest-message-util@29.7.0: + dependencies: + '@babel/code-frame': 7.26.2 + '@jest/types': 29.6.3 + '@types/stack-utils': 2.0.3 + chalk: 4.1.2 + graceful-fs: 4.2.11 + micromatch: 4.0.8 + pretty-format: 29.7.0 + slash: 3.0.0 + stack-utils: 2.0.6 + + jest-mock@29.7.0: + dependencies: + '@jest/types': 29.6.3 + '@types/node': 22.10.1 + jest-util: 29.7.0 + + jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): + optionalDependencies: + jest-resolve: 29.7.0 + + jest-regex-util@29.6.3: {} + + jest-resolve-dependencies@29.7.0: + dependencies: + jest-regex-util: 29.6.3 + jest-snapshot: 29.7.0 + transitivePeerDependencies: + - supports-color + + jest-resolve@29.7.0: + dependencies: + chalk: 4.1.2 + graceful-fs: 4.2.11 + jest-haste-map: 29.7.0 + jest-pnp-resolver: 1.2.3(jest-resolve@29.7.0) + jest-util: 29.7.0 + jest-validate: 29.7.0 + resolve: 1.22.8 + resolve.exports: 2.0.2 + slash: 3.0.0 + + jest-runner@29.7.0: + dependencies: + '@jest/console': 29.7.0 + '@jest/environment': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 22.10.1 + chalk: 4.1.2 + emittery: 0.13.1 + graceful-fs: 4.2.11 + jest-docblock: 29.7.0 + jest-environment-node: 29.7.0 + jest-haste-map: 29.7.0 + jest-leak-detector: 29.7.0 + jest-message-util: 29.7.0 + jest-resolve: 29.7.0 + jest-runtime: 29.7.0 + jest-util: 29.7.0 + jest-watcher: 29.7.0 + jest-worker: 29.7.0 + p-limit: 3.1.0 + source-map-support: 0.5.13 + transitivePeerDependencies: + - supports-color + + jest-runtime@29.7.0: + dependencies: + '@jest/environment': 29.7.0 + '@jest/fake-timers': 29.7.0 + '@jest/globals': 29.7.0 + '@jest/source-map': 29.6.3 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 22.10.1 + chalk: 4.1.2 + cjs-module-lexer: 1.4.1 + collect-v8-coverage: 1.0.2 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-haste-map: 29.7.0 + jest-message-util: 29.7.0 + jest-mock: 29.7.0 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 + slash: 3.0.0 + strip-bom: 4.0.0 + transitivePeerDependencies: + - supports-color + + jest-snapshot@29.7.0: + dependencies: + '@babel/core': 7.26.0 + '@babel/generator': 7.26.2 + '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-syntax-typescript': 7.25.9(@babel/core@7.26.0) + '@babel/types': 7.26.0 + '@jest/expect-utils': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + babel-preset-current-node-syntax: 1.1.0(@babel/core@7.26.0) + chalk: 4.1.2 + expect: 29.7.0 + graceful-fs: 4.2.11 + jest-diff: 29.7.0 + jest-get-type: 29.6.3 + jest-matcher-utils: 29.7.0 + jest-message-util: 29.7.0 + jest-util: 29.7.0 + natural-compare: 1.4.0 + pretty-format: 29.7.0 + semver: 7.6.3 + transitivePeerDependencies: + - supports-color + + jest-util@29.7.0: + dependencies: + '@jest/types': 29.6.3 + '@types/node': 22.10.1 + chalk: 4.1.2 + ci-info: 3.9.0 + graceful-fs: 4.2.11 + picomatch: 2.3.1 + + jest-validate@29.7.0: + dependencies: + '@jest/types': 29.6.3 + camelcase: 6.3.0 + chalk: 4.1.2 + jest-get-type: 29.6.3 + leven: 3.1.0 + pretty-format: 29.7.0 + + jest-watcher@29.7.0: + dependencies: + '@jest/test-result': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 22.10.1 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + emittery: 0.13.1 + jest-util: 29.7.0 + string-length: 4.0.2 + + jest-worker@27.5.1: + dependencies: + '@types/node': 22.10.1 + merge-stream: 2.0.0 + supports-color: 8.1.1 + + jest-worker@29.7.0: + dependencies: + '@types/node': 22.10.1 + jest-util: 29.7.0 + merge-stream: 2.0.0 + supports-color: 8.1.1 + + jest@29.7.0(@types/node@22.10.1): + dependencies: + '@jest/core': 29.7.0 + '@jest/types': 29.6.3 + import-local: 3.2.0 + jest-cli: 29.7.0(@types/node@22.10.1) + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + + jju@1.4.0: {} + + js-base64@3.7.7: {} + + js-tokens@4.0.0: {} + + js-yaml@3.14.1: + dependencies: + argparse: 1.0.10 + esprima: 4.0.1 + + js-yaml@4.1.0: + dependencies: + argparse: 2.0.1 + + jsdoc-type-pratt-parser@4.1.0: {} + + jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@6.0.5): + dependencies: + abab: 2.0.6 + acorn: 8.14.0 + acorn-globals: 7.0.1 + cssom: 0.5.0 + cssstyle: 2.3.0 + data-urls: 3.0.2 + decimal.js: 10.4.3 + domexception: 4.0.0 + escodegen: 2.1.0 + form-data: 4.0.1 + html-encoding-sniffer: 3.0.0 + http-proxy-agent: 5.0.0 + https-proxy-agent: 5.0.1 + is-potential-custom-element-name: 1.0.1 + nwsapi: 2.2.16 + parse5: 7.2.1 + saxes: 6.0.0 + symbol-tree: 3.2.4 + tough-cookie: 4.1.4 + w3c-xmlserializer: 4.0.0 + webidl-conversions: 7.0.0 + whatwg-encoding: 2.0.0 + whatwg-mimetype: 3.0.0 + whatwg-url: 11.0.0 + ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5) + xml-name-validator: 4.0.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + jsesc@3.0.2: {} + + json-buffer@3.0.1: {} + + json-parse-better-errors@1.0.2: {} + + json-parse-even-better-errors@2.3.1: {} + + json-schema-traverse@0.4.1: {} + + json-schema-traverse@1.0.0: {} + + json-stable-stringify-without-jsonify@1.0.1: {} + + json-stable-stringify@1.0.1: + dependencies: + jsonify: 0.0.1 + + json5@1.0.2: + dependencies: + minimist: 1.2.8 + + json5@2.2.3: {} + + jsonify@0.0.1: {} + + jwt-decode@4.0.0: {} + + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + + kleur@3.0.3: {} + + leven@2.1.0: {} + + leven@3.1.0: {} + + levn@0.3.0: + dependencies: + prelude-ls: 1.1.2 + type-check: 0.3.2 + + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + + lines-and-columns@1.1.6: {} + + lines-and-columns@1.2.4: {} + + linguist-languages@7.6.0: {} + + lint-staged@9.4.3: + dependencies: + chalk: 2.4.2 + commander: 2.20.3 + cosmiconfig: 5.2.1 + debug: 4.3.7 + dedent: 0.7.0 + del: 5.1.0 + execa: 2.1.0 + listr: 0.14.3 + log-symbols: 3.0.0 + micromatch: 4.0.8 + normalize-path: 3.0.0 + please-upgrade-node: 3.2.0 + string-argv: 0.3.2 + stringify-object: 3.3.0 + transitivePeerDependencies: + - supports-color + - zen-observable + - zenObservable + + listr-silent-renderer@1.1.1: {} + + listr-update-renderer@0.5.0(listr@0.14.3): + dependencies: + chalk: 1.1.3 + cli-truncate: 0.2.1 + elegant-spinner: 1.0.1 + figures: 1.7.0 + indent-string: 3.2.0 + listr: 0.14.3 + log-symbols: 1.0.2 + log-update: 2.3.0 + strip-ansi: 3.0.1 + + listr-verbose-renderer@0.5.0: + dependencies: + chalk: 2.4.2 + cli-cursor: 2.1.0 + date-fns: 1.30.1 + figures: 2.0.0 + + listr@0.14.3: + dependencies: + '@samverschueren/stream-to-observable': 0.3.1(rxjs@6.6.7) + is-observable: 1.1.0 + is-promise: 2.2.2 + is-stream: 1.1.0 + listr-silent-renderer: 1.1.1 + listr-update-renderer: 0.5.0(listr@0.14.3) + listr-verbose-renderer: 0.5.0 + p-map: 2.1.0 + rxjs: 6.6.7 + transitivePeerDependencies: + - zen-observable + - zenObservable + + loader-runner@4.3.0: {} + + locate-path@5.0.0: + dependencies: + p-locate: 4.1.0 + + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + lodash.memoize@4.1.2: {} + + lodash.merge@4.6.2: {} + + lodash.unescape@4.0.1: {} + + lodash.uniqby@4.7.0: {} + + lodash@4.17.21: {} + + log-symbols@1.0.2: + dependencies: + chalk: 1.1.3 + + log-symbols@3.0.0: + dependencies: + chalk: 2.4.2 + + log-update@2.3.0: + dependencies: + ansi-escapes: 3.2.0 + cli-cursor: 2.1.0 + wrap-ansi: 3.0.1 + + loglevel-colored-level-prefix@1.0.0: + dependencies: + chalk: 1.1.3 + loglevel: 1.9.2 + + loglevel@1.9.2: {} + + lowercase-keys@2.0.0: {} + + lru-cache@11.0.2: {} + + lru-cache@4.1.5: + dependencies: + pseudomap: 1.0.2 + yallist: 2.1.2 + + lru-cache@5.1.1: + dependencies: + yallist: 3.1.1 + + make-dir@4.0.0: + dependencies: + semver: 7.6.3 + + make-error@1.3.6: {} + + makeerror@1.0.12: + dependencies: + tmpl: 1.0.5 + + map-age-cleaner@0.1.3: + dependencies: + p-defer: 1.0.0 + + markdown-escapes@1.0.4: {} + + mem@5.1.1: + dependencies: + map-age-cleaner: 0.1.3 + mimic-fn: 2.1.0 + p-is-promise: 2.1.0 + + merge-stream@2.0.0: {} + + merge2@1.4.1: {} + + micromatch@4.0.8: + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + + mime-db@1.52.0: {} + + mime-types@2.1.35: + dependencies: + mime-db: 1.52.0 + + mimic-fn@1.2.0: {} + + mimic-fn@2.1.0: {} + + mimic-response@1.0.1: {} + + mimic-response@3.1.0: {} + + minimatch@10.0.1: + dependencies: + brace-expansion: 2.0.1 + + minimatch@3.1.2: + dependencies: + brace-expansion: 1.1.11 + + minimatch@5.1.6: + dependencies: + brace-expansion: 2.0.1 + + minimatch@9.0.3: + dependencies: + brace-expansion: 2.0.1 + + minimatch@9.0.5: + dependencies: + brace-expansion: 2.0.1 + + minimist@1.2.8: {} + + minipass@7.1.2: {} + + mkdirp@0.5.6: + dependencies: + minimist: 1.2.8 + + mri@1.2.0: {} + + ms@2.0.0: {} + + ms@2.1.3: {} + + multimatch@3.0.0: + dependencies: + array-differ: 2.1.0 + array-union: 1.0.2 + arrify: 1.0.1 + minimatch: 10.0.1 + + mute-stream@0.0.8: {} + + n-readlines@1.0.0: {} + + nanoid@3.3.8: {} + + natural-compare@1.4.0: {} + + neo-async@2.6.2: {} + + next-tick@1.1.0: {} + + node-gyp-build@4.8.4: + optional: true + + node-int64@0.4.0: {} + + node-releases@2.0.18: {} + + node-ts@6.1.3: + dependencies: + '@rauschma/stringio': 1.4.0 + '@types/node': 22.10.1 + + normalize-path@3.0.0: {} + + normalize-url@6.1.0: {} + + npm-run-path@3.1.0: + dependencies: + path-key: 3.1.1 + + npm-run-path@4.0.1: + dependencies: + path-key: 3.1.1 + + number-is-nan@1.0.1: {} + + nwsapi@2.2.16: {} + + object-assign@4.1.1: {} + + object-inspect@1.13.3: {} + + object-keys@1.1.1: {} + + object.assign@4.1.5: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + has-symbols: 1.0.3 + object-keys: 1.1.1 + + object.entries@1.1.8: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-object-atoms: 1.0.0 + + object.fromentries@2.0.8: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.5 + es-object-atoms: 1.0.0 + + object.groupby@1.0.3: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.5 + + object.values@1.2.0: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-object-atoms: 1.0.0 + + once@1.4.0: + dependencies: + wrappy: 1.0.2 + + onetime@2.0.1: + dependencies: + mimic-fn: 1.2.0 + + onetime@5.1.2: + dependencies: + mimic-fn: 2.1.0 + + optionator@0.8.3: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.3.0 + prelude-ls: 1.1.2 + type-check: 0.3.2 + word-wrap: 1.2.5 + + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + + os-tmpdir@1.0.2: {} + + p-cancelable@2.1.1: {} + + p-defer@1.0.0: {} + + p-finally@2.0.1: {} + + p-is-promise@2.1.0: {} + + p-limit@2.3.0: + dependencies: + p-try: 2.2.0 + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@4.1.0: + dependencies: + p-limit: 2.3.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + + p-map@2.1.0: {} + + p-map@3.0.0: + dependencies: + aggregate-error: 3.1.0 + + p-try@2.2.0: {} + + package-json-from-dist@1.0.1: {} + + parent-module@1.0.1: + dependencies: + callsites: 3.1.0 + + parse-entities@1.2.2: + dependencies: + character-entities: 1.2.4 + character-entities-legacy: 1.1.4 + character-reference-invalid: 1.1.4 + is-alphanumerical: 1.0.4 + is-decimal: 1.0.4 + is-hexadecimal: 1.0.4 + + parse-imports@2.2.1: + dependencies: + es-module-lexer: 1.5.4 + slashes: 3.0.12 + + parse-json@4.0.0: + dependencies: + error-ex: 1.3.2 + json-parse-better-errors: 1.0.2 + + parse-json@5.2.0: + dependencies: + '@babel/code-frame': 7.26.2 + error-ex: 1.3.2 + json-parse-even-better-errors: 2.3.1 + lines-and-columns: 1.2.4 + + parse-srcset@1.0.2: {} + + parse5@7.2.1: + dependencies: + entities: 4.5.0 + + path-exists@4.0.0: {} + + path-is-absolute@1.0.1: {} + + path-key@3.1.1: {} + + path-parse@1.0.7: {} + + path-scurry@2.0.0: + dependencies: + lru-cache: 11.0.2 + minipass: 7.1.2 + + path-type@4.0.0: {} + + picocolors@1.1.1: {} + + picomatch@2.3.1: {} + + pify@2.3.0: {} + + pinkie-promise@2.0.1: + dependencies: + pinkie: 2.0.4 + + pinkie@2.0.4: {} + + pirates@4.0.6: {} + + pkg-dir@4.2.0: + dependencies: + find-up: 4.1.0 + + please-upgrade-node@3.2.0: + dependencies: + semver-compare: 1.0.0 + + poseidon-lite@0.2.1: {} + + possible-typed-array-names@1.0.0: {} + + postcss-less@2.0.0: + dependencies: + postcss: 8.4.49 + + postcss-media-query-parser@0.2.3: {} + + postcss-scss@2.0.0: + dependencies: + postcss: 8.4.49 + + postcss-selector-parser@2.2.3: + dependencies: + flatten: 1.0.3 + indexes-of: 1.0.1 + uniq: 1.0.1 + + postcss-values-parser@1.5.0: + dependencies: + flatten: 1.0.3 + indexes-of: 1.0.1 + uniq: 1.0.1 + + postcss@8.4.49: + dependencies: + nanoid: 3.3.8 + picocolors: 1.1.1 + source-map-js: 1.2.1 + + prelude-ls@1.1.2: {} + + prelude-ls@1.2.1: {} + + prettier-eslint@16.3.0: + dependencies: + '@typescript-eslint/parser': 6.21.0(eslint@8.57.1)(typescript@5.7.2) + common-tags: 1.8.2 + dlv: 1.1.3 + eslint: 8.57.1 + indent-string: 4.0.0 + lodash.merge: 4.6.2 + loglevel-colored-level-prefix: 1.0.0 + prettier: 3.4.1 + pretty-format: 29.7.0 + require-relative: 0.8.7 + typescript: 5.7.2 + vue-eslint-parser: 9.4.3(eslint@8.57.1) + transitivePeerDependencies: + - supports-color + + prettier-standard@16.4.1(typescript@5.7.2): + dependencies: + chalk: 2.4.2 + diff: 4.0.2 + eslint: 6.8.0 + execa: 2.1.0 + find-up: 4.1.0 + get-stdin: 7.0.0 + globby: 6.1.0 + ignore: 3.3.10 + lint-staged: 9.4.3 + mri: 1.2.0 + multimatch: 3.0.0 + prettierx: 0.11.3(typescript@5.7.2) + transitivePeerDependencies: + - supports-color + - typescript + - zen-observable + - zenObservable + + prettier@3.4.1: {} + + prettierx@0.11.3(typescript@5.7.2): + dependencies: + '@angular/compiler': 8.2.14 + '@babel/code-frame': 7.8.3 + '@babel/parser': 7.9.4 + '@glimmer/syntax': 0.41.4 + '@iarna/toml': 2.2.3 + '@typescript-eslint/typescript-estree': 2.6.1(typescript@5.7.2) + angular-estree-parser: 1.3.1(@angular/compiler@8.2.14) + angular-html-parser: 1.4.0 + camelcase: 5.3.1 + chalk: 3.0.0 + cjk-regex: 2.0.0 + cosmiconfig: 5.2.1 + dashify: 2.0.0 + dedent: 0.7.0 + diff: 4.0.2 + editorconfig: 0.15.3 + editorconfig-to-prettier: 0.1.1 + escape-string-regexp: 2.0.0 + esutils: 2.0.3 + find-parent-dir: 0.3.0 + find-project-root: 1.1.1 + flow-parser: 0.111.3 + get-stream: 4.1.0 + globby: 6.1.0 + graphql: 14.6.0 + html-element-attributes: 2.2.1 + html-styles: 1.0.0 + html-tag-names: 1.1.5 + ignore: 4.0.6 + is-ci: 2.0.0 + jest-docblock: 25.3.0 + json-stable-stringify: 1.0.1 + leven: 3.1.0 + lines-and-columns: 1.1.6 + linguist-languages: 7.6.0 + lodash.uniqby: 4.7.0 + mem: 5.1.1 + minimatch: 10.0.1 + minimist: 1.2.8 + n-readlines: 1.0.0 + normalize-path: 3.0.0 + parse-srcset: 1.0.2 + postcss-less: 2.0.0 + postcss-media-query-parser: 0.2.3 + postcss-scss: 2.0.0 + postcss-selector-parser: 2.2.3 + postcss-values-parser: 1.5.0 + regexp-util: 1.2.2 + remark-math: 1.0.6(remark-parse@5.0.0) + remark-parse: 5.0.0 + resolve: 1.15.1 + semver: 7.6.3 + string-width: 4.2.0 + unicode-regex: 3.0.0 + unified: 8.4.2 + vnopts: 1.0.2 + yaml: 1.8.3 + yaml-unist-parser: 1.1.1 + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + + pretty-format@29.7.0: + dependencies: + '@jest/schemas': 29.6.3 + ansi-styles: 5.2.0 + react-is: 18.3.1 + + progress@2.0.3: {} + + prompts@2.4.2: + dependencies: + kleur: 3.0.3 + sisteransi: 1.0.5 + + proxy-from-env@1.1.0: {} + + pseudomap@1.0.2: {} + + psl@1.14.0: + dependencies: + punycode: 2.3.1 + + pump@3.0.2: + dependencies: + end-of-stream: 1.4.4 + once: 1.4.0 + + punycode@2.3.1: {} + + pure-rand@6.1.0: {} + + querystringify@2.2.0: {} + + queue-microtask@1.2.3: {} + + quick-lru@5.1.1: {} + + randombytes@2.1.0: + dependencies: + safe-buffer: 5.2.1 + + react-is@18.3.1: {} + + ref-array-di@1.2.2: + dependencies: + array-index: 1.0.0 + debug: 3.2.7 + transitivePeerDependencies: + - supports-color + + reflect.getprototypeof@1.0.7: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.5 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + gopd: 1.1.0 + which-builtin-type: 1.2.0 + + regenerator-runtime@0.14.1: {} + + regexp-util@1.2.2: + dependencies: + tslib: 1.14.1 + + regexp.prototype.flags@1.5.3: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-errors: 1.3.0 + set-function-name: 2.0.2 + + regexpp@2.0.1: {} + + regexpp@3.2.0: {} + + remark-math@1.0.6(remark-parse@5.0.0): + dependencies: + remark-parse: 5.0.0 + trim-trailing-lines: 1.1.4 + + remark-parse@5.0.0: + dependencies: + collapse-white-space: 1.0.6 + is-alphabetical: 1.0.4 + is-decimal: 1.0.4 + is-whitespace-character: 1.0.4 + is-word-character: 1.0.4 + markdown-escapes: 1.0.4 + parse-entities: 1.2.2 + repeat-string: 1.6.1 + state-toggle: 1.0.3 + trim: 1.0.1 + trim-trailing-lines: 1.1.4 + unherit: 1.1.3 + unist-util-remove-position: 1.1.4 + vfile-location: 2.0.6 + xtend: 4.0.2 + + repeat-string@1.6.1: {} + + require-directory@2.1.1: {} + + require-from-string@2.0.2: {} + + require-relative@0.8.7: {} + + requires-port@1.0.0: {} + + resolve-alpn@1.2.1: {} + + resolve-cwd@3.0.0: + dependencies: + resolve-from: 5.0.0 + + resolve-from@3.0.0: {} + + resolve-from@4.0.0: {} + + resolve-from@5.0.0: {} + + resolve-pkg-maps@1.0.0: {} + + resolve.exports@2.0.2: {} + + resolve@1.15.1: + dependencies: + path-parse: 1.0.7 + + resolve@1.22.8: + dependencies: + is-core-module: 2.15.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + + responselike@2.0.1: + dependencies: + lowercase-keys: 2.0.0 + + restore-cursor@2.0.0: + dependencies: + onetime: 2.0.1 + signal-exit: 3.0.7 + + restore-cursor@3.1.0: + dependencies: + onetime: 5.1.2 + signal-exit: 3.0.7 + + reusify@1.0.4: {} + + rimraf@2.6.3: + dependencies: + glob: 7.2.3 + + rimraf@3.0.2: + dependencies: + glob: 7.2.3 + + rimraf@6.0.1: + dependencies: + glob: 11.0.0 + package-json-from-dist: 1.0.1 + + run-async@2.4.1: {} + + run-parallel@1.2.0: + dependencies: + queue-microtask: 1.2.3 + + rxjs@6.6.7: + dependencies: + tslib: 1.14.1 + + safe-array-concat@1.1.2: + dependencies: + call-bind: 1.0.7 + get-intrinsic: 1.2.4 + has-symbols: 1.0.3 + isarray: 2.0.5 + + safe-buffer@5.2.1: {} + + safe-regex-test@1.0.3: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-regex: 1.2.0 + + safer-buffer@2.1.2: {} + + saxes@6.0.0: + dependencies: + xmlchars: 2.2.0 + + schema-utils@3.3.0: + dependencies: + '@types/json-schema': 7.0.15 + ajv: 6.12.6 + ajv-keywords: 3.5.2(ajv@6.12.6) + + semver-compare@1.0.0: {} + + semver@5.7.2: {} + + semver@6.3.1: {} + + semver@7.6.3: {} + + serialize-javascript@6.0.2: + dependencies: + randombytes: 2.1.0 + + set-function-length@1.2.2: + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + gopd: 1.1.0 + has-property-descriptors: 1.0.2 + + set-function-name@2.0.2: + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + functions-have-names: 1.2.3 + has-property-descriptors: 1.0.2 + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + side-channel@1.0.6: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + object-inspect: 1.13.3 + + sigmund@1.0.1: {} + + signal-exit@3.0.7: {} + + signal-exit@4.1.0: {} + + simple-html-tokenizer@0.5.11: {} + + sisteransi@1.0.5: {} + + slash@3.0.0: {} + + slashes@3.0.12: {} + + slice-ansi@0.0.4: {} + + slice-ansi@2.1.0: + dependencies: + ansi-styles: 3.2.1 + astral-regex: 1.0.0 + is-fullwidth-code-point: 2.0.0 + + source-map-js@1.2.1: {} + + source-map-support@0.5.13: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + + source-map-support@0.5.21: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + + source-map@0.6.1: {} + + source-map@0.7.4: {} + + spdx-exceptions@2.5.0: {} + + spdx-expression-parse@4.0.0: + dependencies: + spdx-exceptions: 2.5.0 + spdx-license-ids: 3.0.20 + + spdx-license-ids@3.0.20: {} + + sprintf-js@1.0.3: {} + + stack-utils@2.0.6: + dependencies: + escape-string-regexp: 2.0.0 + + state-toggle@1.0.3: {} + + string-argv@0.3.2: {} + + string-length@4.0.2: + dependencies: + char-regex: 1.0.2 + strip-ansi: 6.0.1 + + string-width@1.0.2: + dependencies: + code-point-at: 1.1.0 + is-fullwidth-code-point: 1.0.0 + strip-ansi: 3.0.1 + + string-width@2.1.1: + dependencies: + is-fullwidth-code-point: 2.0.0 + strip-ansi: 4.0.0 + + string-width@3.1.0: + dependencies: + emoji-regex: 7.0.3 + is-fullwidth-code-point: 2.0.0 + strip-ansi: 5.2.0 + + string-width@4.2.0: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.0 + + string.prototype.trim@1.2.9: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.5 + es-object-atoms: 1.0.0 + + string.prototype.trimend@1.0.8: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-object-atoms: 1.0.0 + + string.prototype.trimstart@1.0.8: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-object-atoms: 1.0.0 + + stringify-object@3.3.0: + dependencies: + get-own-enumerable-property-symbols: 3.0.2 + is-obj: 1.0.1 + is-regexp: 1.0.0 + + strip-ansi@3.0.1: + dependencies: + ansi-regex: 2.1.1 + + strip-ansi@4.0.0: + dependencies: + ansi-regex: 3.0.1 + + strip-ansi@5.2.0: + dependencies: + ansi-regex: 4.1.1 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-ansi@7.1.0: + dependencies: + ansi-regex: 6.1.0 + + strip-bom@3.0.0: {} + + strip-bom@4.0.0: {} + + strip-final-newline@2.0.0: {} + + strip-json-comments@3.1.1: {} + + supports-color@2.0.0: {} + + supports-color@5.5.0: + dependencies: + has-flag: 3.0.0 + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + supports-color@8.1.1: + dependencies: + has-flag: 4.0.0 + + supports-preserve-symlinks-flag@1.0.0: {} + + symbol-observable@1.2.0: {} + + symbol-tree@3.2.4: {} + + synckit@0.9.2: + dependencies: + '@pkgr/core': 0.1.1 + tslib: 2.8.1 + + table@5.4.6: + dependencies: + ajv: 6.12.6 + lodash: 4.17.21 + slice-ansi: 2.1.0 + string-width: 3.1.0 + + tapable@2.2.1: {} + + terser-webpack-plugin@5.3.10(webpack@5.96.1): + dependencies: + '@jridgewell/trace-mapping': 0.3.25 + jest-worker: 27.5.1 + schema-utils: 3.3.0 + serialize-javascript: 6.0.2 + terser: 5.36.0 + webpack: 5.96.1 + + terser@5.36.0: + dependencies: + '@jridgewell/source-map': 0.3.6 + acorn: 8.14.0 + commander: 2.20.3 + source-map-support: 0.5.21 + + test-exclude@6.0.0: + dependencies: + '@istanbuljs/schema': 0.1.3 + glob: 7.2.3 + minimatch: 10.0.1 + + text-table@0.2.0: {} + + through@2.3.8: {} + + tmp@0.0.33: + dependencies: + os-tmpdir: 1.0.2 + + tmpl@1.0.5: {} + + to-regex-range@5.0.1: + dependencies: + is-number: 7.0.0 + + toml@3.0.0: {} + + tough-cookie@4.1.4: + dependencies: + psl: 1.14.0 + punycode: 2.3.1 + universalify: 0.2.0 + url-parse: 1.5.10 + + tr46@3.0.0: + dependencies: + punycode: 2.3.1 + + tree-kill@1.2.2: {} + + trim-trailing-lines@1.1.4: {} + + trim@1.0.1: {} + + trough@1.0.5: {} + + ts-api-utils@1.4.3(typescript@5.7.2): + dependencies: + typescript: 5.7.2 + + ? ts-jest@29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@22.10.1))(typescript@5.7.2) + : dependencies: + bs-logger: 0.2.6 + ejs: 3.1.10 + fast-json-stable-stringify: 2.1.0 + jest: 29.7.0(@types/node@22.10.1) + jest-util: 29.7.0 + json5: 2.2.3 + lodash.memoize: 4.1.2 + make-error: 1.3.6 + semver: 7.6.3 + typescript: 5.7.2 + yargs-parser: 21.1.1 + optionalDependencies: + '@babel/core': 7.26.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.26.0) + + ts-loader@9.5.1(typescript@5.7.2)(webpack@5.96.1): + dependencies: + chalk: 4.1.2 + enhanced-resolve: 5.17.1 + micromatch: 4.0.8 + semver: 7.6.3 + source-map: 0.7.4 + typescript: 5.7.2 + webpack: 5.96.1 + + tsconfig-paths@3.15.0: + dependencies: + '@types/json5': 0.0.29 + json5: 1.0.2 + minimist: 1.2.8 + strip-bom: 3.0.0 + + tslib@1.14.1: {} + + tslib@2.7.0: {} + + tslib@2.8.1: {} + + tsutils@3.21.0(typescript@5.7.2): + dependencies: + tslib: 1.14.1 + typescript: 5.7.2 + + tsx@4.19.2: + dependencies: + esbuild: 0.23.1 + get-tsconfig: 4.8.1 + optionalDependencies: + fsevents: 2.3.3 + + type-check@0.3.2: + dependencies: + prelude-ls: 1.1.2 + + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + + type-detect@4.0.8: {} + + type-fest@0.20.2: {} + + type-fest@0.21.3: {} + + type-fest@0.8.1: {} + + type@2.7.3: {} + + typed-array-buffer@1.0.2: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-typed-array: 1.1.13 + + typed-array-byte-length@1.0.1: + dependencies: + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.1.0 + has-proto: 1.1.0 + is-typed-array: 1.1.13 + + typed-array-byte-offset@1.0.3: + dependencies: + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.1.0 + has-proto: 1.1.0 + is-typed-array: 1.1.13 + reflect.getprototypeof: 1.0.7 + + typed-array-length@1.0.7: + dependencies: + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.1.0 + is-typed-array: 1.1.13 + possible-typed-array-names: 1.0.0 + reflect.getprototypeof: 1.0.7 + + typescript-eslint@8.16.0(eslint@9.16.0)(typescript@5.7.2): + dependencies: + '@typescript-eslint/eslint-plugin': 8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/parser': 8.16.0(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.16.0(eslint@9.16.0)(typescript@5.7.2) + eslint: 9.16.0 + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + + typescript@5.7.2: {} + + uglify-js@3.19.3: + optional: true + + unbox-primitive@1.0.2: + dependencies: + call-bind: 1.0.7 + has-bigints: 1.0.2 + has-symbols: 1.0.3 + which-boxed-primitive: 1.0.2 + + undici-types@6.19.8: {} + + undici-types@6.20.0: {} + + unherit@1.1.3: + dependencies: + inherits: 2.0.4 + xtend: 4.0.2 + + unicode-regex@2.0.0: + dependencies: + regexp-util: 1.2.2 + + unicode-regex@3.0.0: + dependencies: + regexp-util: 1.2.2 + + unified@8.4.2: + dependencies: + '@types/unist': 2.0.11 + bail: 1.0.5 + extend: 3.0.2 + is-plain-obj: 2.1.0 + trough: 1.0.5 + vfile: 4.2.1 + + uniq@1.0.1: {} + + unist-util-is@3.0.0: {} + + unist-util-remove-position@1.1.4: + dependencies: + unist-util-visit: 1.4.1 + + unist-util-stringify-position@2.0.3: + dependencies: + '@types/unist': 2.0.11 + + unist-util-visit-parents@2.1.2: + dependencies: + unist-util-is: 3.0.0 + + unist-util-visit@1.4.1: + dependencies: + unist-util-visit-parents: 2.1.2 + + universalify@0.2.0: {} + + update-browserslist-db@1.1.1(browserslist@4.24.2): + dependencies: + browserslist: 4.24.2 + escalade: 3.2.0 + picocolors: 1.1.1 + + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + + url-parse@1.5.10: + dependencies: + querystringify: 2.2.0 + requires-port: 1.0.0 + + utf-8-validate@6.0.5: + dependencies: + node-gyp-build: 4.8.4 + optional: true + + util@0.12.5: + dependencies: + inherits: 2.0.4 + is-arguments: 1.1.1 + is-generator-function: 1.0.10 + is-typed-array: 1.1.13 + which-typed-array: 1.1.16 + + v8-compile-cache@2.4.0: {} + + v8-to-istanbul@9.3.0: + dependencies: + '@jridgewell/trace-mapping': 0.3.25 + '@types/istanbul-lib-coverage': 2.0.6 + convert-source-map: 2.0.0 + + vfile-location@2.0.6: {} + + vfile-message@2.0.4: + dependencies: + '@types/unist': 2.0.11 + unist-util-stringify-position: 2.0.3 + + vfile@4.2.1: + dependencies: + '@types/unist': 2.0.11 + is-buffer: 2.0.5 + unist-util-stringify-position: 2.0.3 + vfile-message: 2.0.4 + + vnopts@1.0.2: + dependencies: + chalk: 2.4.2 + leven: 2.1.0 + tslib: 1.14.1 + + vue-eslint-parser@9.4.3(eslint@8.57.1): + dependencies: + debug: 4.3.7 + eslint: 8.57.1 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + esquery: 1.6.0 + lodash: 4.17.21 + semver: 7.6.3 + transitivePeerDependencies: + - supports-color + + w3c-xmlserializer@4.0.0: + dependencies: + xml-name-validator: 4.0.0 + + walker@1.0.8: + dependencies: + makeerror: 1.0.12 + + watchpack@2.4.2: + dependencies: + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.11 + + webidl-conversions@7.0.0: {} + + webpack-sources@3.2.3: {} + + webpack@5.96.1: + dependencies: + '@types/eslint-scope': 3.7.7 + '@types/estree': 1.0.6 + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/wasm-edit': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + acorn: 8.14.0 + browserslist: 4.24.2 + chrome-trace-event: 1.0.4 + enhanced-resolve: 5.17.1 + es-module-lexer: 1.5.4 + eslint-scope: 5.1.1 + events: 3.3.0 + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.11 + json-parse-even-better-errors: 2.3.1 + loader-runner: 4.3.0 + mime-types: 2.1.35 + neo-async: 2.6.2 + schema-utils: 3.3.0 + tapable: 2.2.1 + terser-webpack-plugin: 5.3.10(webpack@5.96.1) + watchpack: 2.4.2 + webpack-sources: 3.2.3 + transitivePeerDependencies: + - '@swc/core' + - esbuild + - uglify-js + + whatwg-encoding@2.0.0: + dependencies: + iconv-lite: 0.6.3 + + whatwg-mimetype@3.0.0: {} + + whatwg-url@11.0.0: + dependencies: + tr46: 3.0.0 + webidl-conversions: 7.0.0 + + which-boxed-primitive@1.0.2: + dependencies: + is-bigint: 1.0.4 + is-boolean-object: 1.1.2 + is-number-object: 1.0.7 + is-string: 1.0.7 + is-symbol: 1.0.4 + + which-builtin-type@1.2.0: + dependencies: + call-bind: 1.0.7 + function.prototype.name: 1.1.6 + has-tostringtag: 1.0.2 + is-async-function: 2.0.0 + is-date-object: 1.0.5 + is-finalizationregistry: 1.1.0 + is-generator-function: 1.0.10 + is-regex: 1.2.0 + is-weakref: 1.0.2 + isarray: 2.0.5 + which-boxed-primitive: 1.0.2 + which-collection: 1.0.2 + which-typed-array: 1.1.16 + + which-collection@1.0.2: + dependencies: + is-map: 2.0.3 + is-set: 2.0.3 + is-weakmap: 2.0.2 + is-weakset: 2.0.3 + + which-typed-array@1.1.16: + dependencies: + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.1.0 + has-tostringtag: 1.0.2 + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + word-wrap@1.2.5: {} + + wordwrap@1.0.0: {} + + wrap-ansi@3.0.1: + dependencies: + string-width: 2.1.1 + strip-ansi: 4.0.0 + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + + wrappy@1.0.2: {} + + write-file-atomic@4.0.2: + dependencies: + imurmurhash: 0.1.4 + signal-exit: 3.0.7 + + write@1.0.3: + dependencies: + mkdirp: 0.5.6 + + ws@8.17.1(bufferutil@4.0.8)(utf-8-validate@6.0.5): + optionalDependencies: + bufferutil: 4.0.8 + utf-8-validate: 6.0.5 + + ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5): + optionalDependencies: + bufferutil: 4.0.8 + utf-8-validate: 6.0.5 + + xml-name-validator@4.0.0: {} + + xmlchars@2.2.0: {} + + xtend@4.0.2: {} + + y18n@5.0.8: {} + + yallist@2.1.2: {} + + yallist@3.1.1: {} + + yaml-unist-parser@1.1.1: + dependencies: + lines-and-columns: 1.1.6 + tslib: 1.14.1 + yaml: 1.8.3 + + yaml@1.8.3: + dependencies: + '@babel/runtime': 7.26.0 + + yaml@2.6.1: {} + + yargs-parser@21.1.1: {} + + yargs@17.7.2: + dependencies: + cliui: 8.0.1 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + + yocto-queue@0.1.0: {} diff --git a/apterly/postgres-init/create_indexer_db.sql b/apterly/postgres-init/create_indexer_db.sql new file mode 100644 index 0000000..2d82b7e --- /dev/null +++ b/apterly/postgres-init/create_indexer_db.sql @@ -0,0 +1,17 @@ +DO +$$ +BEGIN + -- Terminate active connections to the database + PERFORM pg_terminate_backend(pg_stat_activity.pid) + FROM pg_stat_activity + WHERE pg_stat_activity.datname = 'indexer' + AND pid <> pg_backend_pid(); + + -- Check if the database exists + IF EXISTS (SELECT FROM pg_database WHERE datname = 'indexer') THEN + RAISE NOTICE 'Database "indexer" already exists.'; + ELSE + CREATE DATABASE indexer; + END IF; +END +$$; diff --git a/apterly/test/example.ts b/apterly/test/example.ts new file mode 100644 index 0000000..6ea31cb --- /dev/null +++ b/apterly/test/example.ts @@ -0,0 +1,5 @@ +describe("test", () => { + it("test", async () => { + expect(1 == 1).toBe(true); + }); +}); diff --git a/apterly/test/test.sh b/apterly/test/test.sh new file mode 100755 index 0000000..89c363c --- /dev/null +++ b/apterly/test/test.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# Run Jest tests +jest test/example.spec.ts diff --git a/apterly/tsconfig.commonjs.json b/apterly/tsconfig.commonjs.json new file mode 100644 index 0000000..9b3617b --- /dev/null +++ b/apterly/tsconfig.commonjs.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "declaration": true, + "module": "commonjs", + "outDir": "./dist/cmd/", + "sourceMap": true, + "inlineSources": true + }, + "exclude": ["node_modules", "**/*.spec.ts"] +} diff --git a/apterly/tsconfig.esm.json b/apterly/tsconfig.esm.json new file mode 100644 index 0000000..f71f010 --- /dev/null +++ b/apterly/tsconfig.esm.json @@ -0,0 +1,12 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "ESNext", + "target": "ESNext", + "outDir": "./dist/esm/", + "declaration": true, + "sourceMap": true, + "inlineSources": true + }, + "exclude": ["node_modules", "**/*.spec.ts"] +} diff --git a/apterly/tsconfig.json b/apterly/tsconfig.json new file mode 100644 index 0000000..dd2c86b --- /dev/null +++ b/apterly/tsconfig.json @@ -0,0 +1,80 @@ +{ + "ts-node": { + "experimentalResolver": true + }, + "compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "declaration": true, + "moduleResolution": "node", + "allowSyntheticDefaultImports": true, + "jsx": "preserve", + "strict": true, + "noEmit": true, + "allowJs": true, + "importHelpers": true, + "alwaysStrict": true, + "sourceMap": true, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "noUnusedLocals": false, + "noUnusedParameters": false, + "noImplicitAny": false, + "noImplicitThis": false, + "skipLibCheck": true, + "strictNullChecks": false, + "downlevelIteration": true, + "esModuleInterop": true, + "outDir": "dist", + "types": ["node", "jest"], + "typeRoots": ["node_modules/@types"], + "lib": [ + "es7", + "es6", + "dom", + "es2015", + "es2017", + "es2018", + "es2019", + "es2020", + "es2021", + "esnext", + "esnext.asynciterable" + ] + }, + "lib": [ + "es7", + "es6", + "dom", + "es2015", + "es2017", + "es2018", + "es2019", + "es2020", + "es2021", + "esnext", + "esnext.asynciterable" + ], + "files": ["./node_modules/@types/node/index.d.ts"], + "include": [ + "./clients/**/*.ts", + "./configs/**/*.ts", + "./helpers/**/*.ts", + "./scripts/**/*.ts", + "./test/**/*.ts", + "./wrappers/**/*.ts", + "./jest.config.ts" + ], + "exclude": [ + "./node_modules/**/*", + "typings/browser.d.ts", + "typings/browser", + "node_modules", + "typings/main", + "typings/main.d.ts", + "typings/index.d.ts", + "typings", + "./dist/**/*" + ] +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..6952e52 --- /dev/null +++ b/package.json @@ -0,0 +1,21 @@ +{ + "name": "aave-v3", + "version": "0.0.0", + "license": "MIT", + "private": true, + "scripts": { + "prettier:fix": "prettier --write \"**/*.@(json|md|sh|toml)\"", + "prettier:validate": "prettier --check \"**/*.@(json|md|sh|toml)\"", + "md:lint": "markdownlint -c .markdownlint.json \"**/*.md\" \".github/**/*.md\" -i \"target\" -i \"node_modules\" -i \"CHANGELOG.md\" -i \"aave-core/doc/**/*.md\"", + "md:fix": "pnpm md:lint --fix" + }, + "devDependencies": { + "@commitlint/config-conventional": "^19.2.2", + "commitlint": "^19.4.0", + "markdownlint": "^0.36.1", + "markdownlint-cli": "^0.43.0", + "prettier": "^3.3.3", + "prettier-plugin-sh": "^0.14.0", + "prettier-plugin-toml": "^2.0.1" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..4a45733 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,1319 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + devDependencies: + '@commitlint/config-conventional': + specifier: ^19.2.2 + version: 19.2.2 + commitlint: + specifier: ^19.4.0 + version: 19.4.0(@types/node@22.5.0)(typescript@5.5.4) + markdownlint: + specifier: ^0.36.1 + version: 0.36.1 + markdownlint-cli: + specifier: ^0.43.0 + version: 0.43.0 + prettier: + specifier: ^3.3.3 + version: 3.3.3 + prettier-plugin-sh: + specifier: ^0.14.0 + version: 0.14.0(prettier@3.3.3) + prettier-plugin-toml: + specifier: ^2.0.1 + version: 2.0.1(prettier@3.3.3) + +packages: + + '@babel/code-frame@7.24.7': + resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.24.7': + resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} + engines: {node: '>=6.9.0'} + + '@babel/highlight@7.24.7': + resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} + engines: {node: '>=6.9.0'} + + '@commitlint/cli@19.4.0': + resolution: {integrity: sha512-sJX4J9UioVwZHq7JWM9tjT5bgWYaIN3rC4FP7YwfEwBYiIO+wMyRttRvQLNkow0vCdM0D67r9NEWU0Ui03I4Eg==} + engines: {node: '>=v18'} + hasBin: true + + '@commitlint/config-conventional@19.2.2': + resolution: {integrity: sha512-mLXjsxUVLYEGgzbxbxicGPggDuyWNkf25Ht23owXIH+zV2pv1eJuzLK3t1gDY5Gp6pxdE60jZnWUY5cvgL3ufw==} + engines: {node: '>=v18'} + + '@commitlint/config-validator@19.0.3': + resolution: {integrity: sha512-2D3r4PKjoo59zBc2auodrSCaUnCSALCx54yveOFwwP/i2kfEAQrygwOleFWswLqK0UL/F9r07MFi5ev2ohyM4Q==} + engines: {node: '>=v18'} + + '@commitlint/ensure@19.0.3': + resolution: {integrity: sha512-SZEpa/VvBLoT+EFZVb91YWbmaZ/9rPH3ESrINOl0HD2kMYsjvl0tF7nMHh0EpTcv4+gTtZBAe1y/SS6/OhfZzQ==} + engines: {node: '>=v18'} + + '@commitlint/execute-rule@19.0.0': + resolution: {integrity: sha512-mtsdpY1qyWgAO/iOK0L6gSGeR7GFcdW7tIjcNFxcWkfLDF5qVbPHKuGATFqRMsxcO8OUKNj0+3WOHB7EHm4Jdw==} + engines: {node: '>=v18'} + + '@commitlint/format@19.3.0': + resolution: {integrity: sha512-luguk5/aF68HiF4H23ACAfk8qS8AHxl4LLN5oxPc24H+2+JRPsNr1OS3Gaea0CrH7PKhArBMKBz5RX9sA5NtTg==} + engines: {node: '>=v18'} + + '@commitlint/is-ignored@19.2.2': + resolution: {integrity: sha512-eNX54oXMVxncORywF4ZPFtJoBm3Tvp111tg1xf4zWXGfhBPKpfKG6R+G3G4v5CPlRROXpAOpQ3HMhA9n1Tck1g==} + engines: {node: '>=v18'} + + '@commitlint/lint@19.2.2': + resolution: {integrity: sha512-xrzMmz4JqwGyKQKTpFzlN0dx0TAiT7Ran1fqEBgEmEj+PU98crOFtysJgY+QdeSagx6EDRigQIXJVnfrI0ratA==} + engines: {node: '>=v18'} + + '@commitlint/load@19.4.0': + resolution: {integrity: sha512-I4lCWaEZYQJ1y+Y+gdvbGAx9pYPavqZAZ3/7/8BpWh+QjscAn8AjsUpLV2PycBsEx7gupq5gM4BViV9xwTIJuw==} + engines: {node: '>=v18'} + + '@commitlint/message@19.0.0': + resolution: {integrity: sha512-c9czf6lU+9oF9gVVa2lmKaOARJvt4soRsVmbR7Njwp9FpbBgste5i7l/2l5o8MmbwGh4yE1snfnsy2qyA2r/Fw==} + engines: {node: '>=v18'} + + '@commitlint/parse@19.0.3': + resolution: {integrity: sha512-Il+tNyOb8VDxN3P6XoBBwWJtKKGzHlitEuXA5BP6ir/3loWlsSqDr5aecl6hZcC/spjq4pHqNh0qPlfeWu38QA==} + engines: {node: '>=v18'} + + '@commitlint/read@19.4.0': + resolution: {integrity: sha512-r95jLOEZzKDakXtnQub+zR3xjdnrl2XzerPwm7ch1/cc5JGq04tyaNpa6ty0CRCWdVrk4CZHhqHozb8yZwy2+g==} + engines: {node: '>=v18'} + + '@commitlint/resolve-extends@19.1.0': + resolution: {integrity: sha512-z2riI+8G3CET5CPgXJPlzftH+RiWYLMYv4C9tSLdLXdr6pBNimSKukYP9MS27ejmscqCTVA4almdLh0ODD2KYg==} + engines: {node: '>=v18'} + + '@commitlint/rules@19.0.3': + resolution: {integrity: sha512-TspKb9VB6svklxNCKKwxhELn7qhtY1rFF8ls58DcFd0F97XoG07xugPjjbVnLqmMkRjZDbDIwBKt9bddOfLaPw==} + engines: {node: '>=v18'} + + '@commitlint/to-lines@19.0.0': + resolution: {integrity: sha512-vkxWo+VQU5wFhiP9Ub9Sre0FYe019JxFikrALVoD5UGa8/t3yOJEpEhxC5xKiENKKhUkTpEItMTRAjHw2SCpZw==} + engines: {node: '>=v18'} + + '@commitlint/top-level@19.0.0': + resolution: {integrity: sha512-KKjShd6u1aMGNkCkaX4aG1jOGdn7f8ZI8TR1VEuNqUOjWTOdcDSsmglinglJ18JTjuBX5I1PtjrhQCRcixRVFQ==} + engines: {node: '>=v18'} + + '@commitlint/types@19.0.3': + resolution: {integrity: sha512-tpyc+7i6bPG9mvaBbtKUeghfyZSDgWquIDfMgqYtTbmZ9Y9VzEm2je9EYcQ0aoz5o7NvGS+rcDec93yO08MHYA==} + engines: {node: '>=v18'} + + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@taplo/core@0.1.1': + resolution: {integrity: sha512-BG/zLGf5wiNXGEVPvUAAX/4ilB3PwDUY2o0MV0y47mZbDZ9ad9UK/cIQsILat3bqbPJsALVbU6k3cskNZ3vAQg==} + + '@taplo/lib@0.4.0-alpha.2': + resolution: {integrity: sha512-DV/Re3DPVY+BhBtLZ3dmP4mP6YMLSsgq9qGLXwOV38lvNF/fBlgvQswzlXmzCEefL/3q2eMoefZpOI/+GLuCNA==} + + '@types/conventional-commits-parser@5.0.0': + resolution: {integrity: sha512-loB369iXNmAZglwWATL+WRe+CRMmmBPtpolYzIebFaX4YA3x+BEfLqhUAV9WanycKI3TG1IMr5bMJDajDKLlUQ==} + + '@types/node@22.5.0': + resolution: {integrity: sha512-DkFrJOe+rfdHTqqMg0bSNlGlQ85hSoh2TPzZyhHsXnMtligRWpxUySiyw8FY14ITt24HVCiQPWxS3KO/QlGmWg==} + + JSONStream@1.3.5: + resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} + hasBin: true + + ajv@8.17.1: + resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.0.1: + resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} + engines: {node: '>=12'} + + ansi-styles@3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + array-ify@1.0.0: + resolution: {integrity: sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + + chalk@2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + + chalk@5.3.0: + resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + color-convert@1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + commander@12.1.0: + resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} + engines: {node: '>=18'} + + commitlint@19.4.0: + resolution: {integrity: sha512-aZU6Y5j918XufTVbm5fOu1xOeUgDcBiVfRpFxkOb83RMsPcYAW6maWRmm6Vs6YhSQbOEZ2+AE+IPoVFvoevQqg==} + engines: {node: '>=v18'} + hasBin: true + + compare-func@2.0.0: + resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==} + + conventional-changelog-angular@7.0.0: + resolution: {integrity: sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==} + engines: {node: '>=16'} + + conventional-changelog-conventionalcommits@7.0.2: + resolution: {integrity: sha512-NKXYmMR/Hr1DevQegFB4MwfM5Vv0m4UIxKZTTYuD98lpTknaZlSRrDOG4X7wIXpGkfsYxZTghUN+Qq+T0YQI7w==} + engines: {node: '>=16'} + + conventional-commits-parser@5.0.0: + resolution: {integrity: sha512-ZPMl0ZJbw74iS9LuX9YIAiW8pfM5p3yh2o/NbXHbkFuZzY5jvdi5jFycEOkmBW5H5I7nA+D6f3UcsCLP2vvSEA==} + engines: {node: '>=16'} + hasBin: true + + cosmiconfig-typescript-loader@5.0.0: + resolution: {integrity: sha512-+8cK7jRAReYkMwMiG+bxhcNKiHJDM6bR9FD/nGBXOWdMLuYawjF5cGrtLilJ+LGd3ZjCXnJjR5DkfWPoIVlqJA==} + engines: {node: '>=v16'} + peerDependencies: + '@types/node': '*' + cosmiconfig: '>=8.2' + typescript: '>=4' + + cosmiconfig@9.0.0: + resolution: {integrity: sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==} + engines: {node: '>=14'} + peerDependencies: + typescript: '>=4.9.5' + peerDependenciesMeta: + typescript: + optional: true + + cross-spawn@7.0.3: + resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + engines: {node: '>= 8'} + + dargs@8.1.0: + resolution: {integrity: sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw==} + engines: {node: '>=12'} + + deep-extend@0.6.0: + resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} + engines: {node: '>=4.0.0'} + + dot-prop@5.3.0: + resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} + engines: {node: '>=8'} + + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + + entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + + env-paths@2.2.1: + resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} + engines: {node: '>=6'} + + error-ex@1.3.2: + resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + + escalade@3.1.2: + resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} + engines: {node: '>=6'} + + escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + + execa@8.0.1: + resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} + engines: {node: '>=16.17'} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-uri@3.0.1: + resolution: {integrity: sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==} + + find-up@7.0.0: + resolution: {integrity: sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==} + engines: {node: '>=18'} + + foreground-child@3.3.0: + resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} + engines: {node: '>=14'} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + get-stream@8.0.1: + resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} + engines: {node: '>=16'} + + git-raw-commits@4.0.0: + resolution: {integrity: sha512-ICsMM1Wk8xSGMowkOmPrzo2Fgmfo4bMHLNX6ytHjajRJUqvHOw/TFapQ+QG75c3X/tTDDhOSRPGC52dDbNM8FQ==} + engines: {node: '>=16'} + hasBin: true + + glob@11.0.0: + resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==} + engines: {node: 20 || >=22} + hasBin: true + + global-directory@4.0.1: + resolution: {integrity: sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==} + engines: {node: '>=18'} + + has-flag@3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} + + human-signals@5.0.0: + resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} + engines: {node: '>=16.17.0'} + + ignore@6.0.2: + resolution: {integrity: sha512-InwqeHHN2XpumIkMvpl/DCJVrAHgCsG5+cn1XlnLWGwtZBm8QJfSusItfrwx81CTp5agNZqpKU2J/ccC5nGT4A==} + engines: {node: '>= 4'} + + import-fresh@3.3.0: + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} + + import-meta-resolve@4.1.0: + resolution: {integrity: sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==} + + ini@4.1.1: + resolution: {integrity: sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + + is-arrayish@0.2.1: + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-obj@2.0.0: + resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==} + engines: {node: '>=8'} + + is-stream@3.0.0: + resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + is-text-path@2.0.0: + resolution: {integrity: sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==} + engines: {node: '>=8'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + jackspeak@4.0.2: + resolution: {integrity: sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==} + engines: {node: 20 || >=22} + + jiti@1.21.6: + resolution: {integrity: sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==} + hasBin: true + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + + json-parse-even-better-errors@2.3.1: + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + + jsonc-parser@3.3.1: + resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} + + jsonparse@1.3.1: + resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} + engines: {'0': node >= 0.2.0} + + jsonpointer@5.0.1: + resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==} + engines: {node: '>=0.10.0'} + + lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + + linkify-it@5.0.0: + resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} + + locate-path@7.2.0: + resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + lodash.camelcase@4.3.0: + resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} + + lodash.isplainobject@4.0.6: + resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} + + lodash.kebabcase@4.1.1: + resolution: {integrity: sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==} + + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + + lodash.mergewith@4.6.2: + resolution: {integrity: sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==} + + lodash.snakecase@4.1.1: + resolution: {integrity: sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==} + + lodash.startcase@4.4.0: + resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} + + lodash.uniq@4.5.0: + resolution: {integrity: sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==} + + lodash.upperfirst@4.3.1: + resolution: {integrity: sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==} + + lru-cache@11.0.1: + resolution: {integrity: sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==} + engines: {node: 20 || >=22} + + markdown-it@14.1.0: + resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} + hasBin: true + + markdownlint-cli@0.43.0: + resolution: {integrity: sha512-6vwurKK4B21eyYzwgX6ph13cZS7hE6LZfcS8QyD722CyxVD2RtAvbZK2p7k+FZbbKORulEuwl+hJaEq1l6/hoQ==} + engines: {node: '>=18'} + hasBin: true + + markdownlint-micromark@0.1.12: + resolution: {integrity: sha512-RlB6EwMGgc0sxcIhOQ2+aq7Zw1V2fBnzbXKGgYK/mVWdT7cz34fteKSwfYeo4rL6+L/q2tyC9QtD/PgZbkdyJQ==} + engines: {node: '>=18'} + + markdownlint@0.36.1: + resolution: {integrity: sha512-s73fU2CQN7WCgjhaQUQ8wYESQNzGRNOKDd+3xgVqu8kuTEhmwepd/mxOv1LR2oV046ONrTLBFsM7IoKWNvmy5g==} + engines: {node: '>=18'} + + mdurl@2.0.0: + resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} + + meow@12.1.1: + resolution: {integrity: sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==} + engines: {node: '>=16.10'} + + merge-stream@2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + + mimic-fn@4.0.0: + resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} + engines: {node: '>=12'} + + minimatch@10.0.1: + resolution: {integrity: sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==} + engines: {node: 20 || >=22} + + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + + mvdan-sh@0.10.1: + resolution: {integrity: sha512-kMbrH0EObaKmK3nVRKUIIya1dpASHIEusM13S4V1ViHFuxuNxCo+arxoa6j/dbV22YBGjl7UKJm9QQKJ2Crzhg==} + + npm-run-path@5.3.0: + resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + onetime@6.0.0: + resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} + engines: {node: '>=12'} + + p-limit@4.0.0: + resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + p-locate@6.0.0: + resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + package-json-from-dist@1.0.0: + resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} + + parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + + parse-json@5.2.0: + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} + + path-exists@5.0.0: + resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-key@4.0.0: + resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} + engines: {node: '>=12'} + + path-scurry@2.0.0: + resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} + engines: {node: 20 || >=22} + + picocolors@1.0.1: + resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} + + prettier-plugin-sh@0.14.0: + resolution: {integrity: sha512-hfXulj5+zEl/ulrO5kMuuTPKmXvOg0bnLHY1hKFNN/N+/903iZbNp8NyZBTsgI8dtkSgFfAEIQq0IQTyP1ZVFQ==} + engines: {node: '>=16.0.0'} + peerDependencies: + prettier: ^3.0.3 + + prettier-plugin-toml@2.0.1: + resolution: {integrity: sha512-99z1YOkViECHtXQjGIigd3talI/ybUI1zB3yniAwUrlWBXupNXThB1hM6bwSMUEj2/+tomTlMtT98F5t4s8IWA==} + engines: {node: '>=16.0.0'} + peerDependencies: + prettier: ^3.0.3 + + prettier@3.3.3: + resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} + engines: {node: '>=14'} + hasBin: true + + punycode.js@2.3.1: + resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} + engines: {node: '>=6'} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + + resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + + resolve-from@5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + + run-con@1.3.2: + resolution: {integrity: sha512-CcfE+mYiTcKEzg0IqS08+efdnH0oJ3zV0wSUFBNrMHMuxCtXvBCLzCJHatwuXDcu/RlhjTziTo/a1ruQik6/Yg==} + hasBin: true + + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} + engines: {node: '>=10'} + hasBin: true + + sh-syntax@0.4.2: + resolution: {integrity: sha512-/l2UZ5fhGZLVZa16XQM9/Vq/hezGGbdHeVEA01uWjOL1+7Ek/gt6FquW0iKKws4a9AYPYvlz6RyVvjh3JxOteg==} + engines: {node: '>=16.0.0'} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + smol-toml@1.3.1: + resolution: {integrity: sha512-tEYNll18pPKHroYSmLLrksq233j021G0giwW7P3D24jC54pQ5W5BXMsQ/Mvw1OJCmEYDgY+lrzT+3nNUtoNfXQ==} + engines: {node: '>= 18'} + + split2@4.2.0: + resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} + engines: {node: '>= 10.x'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + + strip-final-newline@3.0.0: + resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} + engines: {node: '>=12'} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + supports-color@5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + + text-extensions@2.4.0: + resolution: {integrity: sha512-te/NtwBwfiNRLf9Ijqx3T0nlqZiQ2XrrtBvu+cLL8ZRrGkO0NHTug8MYFKyoSrv/sHTaSKfilUkizV6XhxMJ3g==} + engines: {node: '>=8'} + + through@2.3.8: + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + + tslib@2.6.3: + resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} + + typescript@5.5.4: + resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} + engines: {node: '>=14.17'} + hasBin: true + + uc.micro@2.1.0: + resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} + + undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + + unicorn-magic@0.1.0: + resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} + engines: {node: '>=18'} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + + yocto-queue@1.1.1: + resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==} + engines: {node: '>=12.20'} + +snapshots: + + '@babel/code-frame@7.24.7': + dependencies: + '@babel/highlight': 7.24.7 + picocolors: 1.0.1 + + '@babel/helper-validator-identifier@7.24.7': {} + + '@babel/highlight@7.24.7': + dependencies: + '@babel/helper-validator-identifier': 7.24.7 + chalk: 2.4.2 + js-tokens: 4.0.0 + picocolors: 1.0.1 + + '@commitlint/cli@19.4.0(@types/node@22.5.0)(typescript@5.5.4)': + dependencies: + '@commitlint/format': 19.3.0 + '@commitlint/lint': 19.2.2 + '@commitlint/load': 19.4.0(@types/node@22.5.0)(typescript@5.5.4) + '@commitlint/read': 19.4.0 + '@commitlint/types': 19.0.3 + execa: 8.0.1 + yargs: 17.7.2 + transitivePeerDependencies: + - '@types/node' + - typescript + + '@commitlint/config-conventional@19.2.2': + dependencies: + '@commitlint/types': 19.0.3 + conventional-changelog-conventionalcommits: 7.0.2 + + '@commitlint/config-validator@19.0.3': + dependencies: + '@commitlint/types': 19.0.3 + ajv: 8.17.1 + + '@commitlint/ensure@19.0.3': + dependencies: + '@commitlint/types': 19.0.3 + lodash.camelcase: 4.3.0 + lodash.kebabcase: 4.1.1 + lodash.snakecase: 4.1.1 + lodash.startcase: 4.4.0 + lodash.upperfirst: 4.3.1 + + '@commitlint/execute-rule@19.0.0': {} + + '@commitlint/format@19.3.0': + dependencies: + '@commitlint/types': 19.0.3 + chalk: 5.3.0 + + '@commitlint/is-ignored@19.2.2': + dependencies: + '@commitlint/types': 19.0.3 + semver: 7.6.3 + + '@commitlint/lint@19.2.2': + dependencies: + '@commitlint/is-ignored': 19.2.2 + '@commitlint/parse': 19.0.3 + '@commitlint/rules': 19.0.3 + '@commitlint/types': 19.0.3 + + '@commitlint/load@19.4.0(@types/node@22.5.0)(typescript@5.5.4)': + dependencies: + '@commitlint/config-validator': 19.0.3 + '@commitlint/execute-rule': 19.0.0 + '@commitlint/resolve-extends': 19.1.0 + '@commitlint/types': 19.0.3 + chalk: 5.3.0 + cosmiconfig: 9.0.0(typescript@5.5.4) + cosmiconfig-typescript-loader: 5.0.0(@types/node@22.5.0)(cosmiconfig@9.0.0(typescript@5.5.4))(typescript@5.5.4) + lodash.isplainobject: 4.0.6 + lodash.merge: 4.6.2 + lodash.uniq: 4.5.0 + transitivePeerDependencies: + - '@types/node' + - typescript + + '@commitlint/message@19.0.0': {} + + '@commitlint/parse@19.0.3': + dependencies: + '@commitlint/types': 19.0.3 + conventional-changelog-angular: 7.0.0 + conventional-commits-parser: 5.0.0 + + '@commitlint/read@19.4.0': + dependencies: + '@commitlint/top-level': 19.0.0 + '@commitlint/types': 19.0.3 + execa: 8.0.1 + git-raw-commits: 4.0.0 + minimist: 1.2.8 + + '@commitlint/resolve-extends@19.1.0': + dependencies: + '@commitlint/config-validator': 19.0.3 + '@commitlint/types': 19.0.3 + global-directory: 4.0.1 + import-meta-resolve: 4.1.0 + lodash.mergewith: 4.6.2 + resolve-from: 5.0.0 + + '@commitlint/rules@19.0.3': + dependencies: + '@commitlint/ensure': 19.0.3 + '@commitlint/message': 19.0.0 + '@commitlint/to-lines': 19.0.0 + '@commitlint/types': 19.0.3 + execa: 8.0.1 + + '@commitlint/to-lines@19.0.0': {} + + '@commitlint/top-level@19.0.0': + dependencies: + find-up: 7.0.0 + + '@commitlint/types@19.0.3': + dependencies: + '@types/conventional-commits-parser': 5.0.0 + chalk: 5.3.0 + + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + + '@taplo/core@0.1.1': {} + + '@taplo/lib@0.4.0-alpha.2': + dependencies: + '@taplo/core': 0.1.1 + + '@types/conventional-commits-parser@5.0.0': + dependencies: + '@types/node': 22.5.0 + + '@types/node@22.5.0': + dependencies: + undici-types: 6.19.8 + + JSONStream@1.3.5: + dependencies: + jsonparse: 1.3.1 + through: 2.3.8 + + ajv@8.17.1: + dependencies: + fast-deep-equal: 3.1.3 + fast-uri: 3.0.1 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + + ansi-regex@5.0.1: {} + + ansi-regex@6.0.1: {} + + ansi-styles@3.2.1: + dependencies: + color-convert: 1.9.3 + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + ansi-styles@6.2.1: {} + + argparse@2.0.1: {} + + array-ify@1.0.0: {} + + balanced-match@1.0.2: {} + + brace-expansion@2.0.1: + dependencies: + balanced-match: 1.0.2 + + callsites@3.1.0: {} + + chalk@2.4.2: + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 + + chalk@5.3.0: {} + + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + color-convert@1.9.3: + dependencies: + color-name: 1.1.3 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.3: {} + + color-name@1.1.4: {} + + commander@12.1.0: {} + + commitlint@19.4.0(@types/node@22.5.0)(typescript@5.5.4): + dependencies: + '@commitlint/cli': 19.4.0(@types/node@22.5.0)(typescript@5.5.4) + '@commitlint/types': 19.0.3 + transitivePeerDependencies: + - '@types/node' + - typescript + + compare-func@2.0.0: + dependencies: + array-ify: 1.0.0 + dot-prop: 5.3.0 + + conventional-changelog-angular@7.0.0: + dependencies: + compare-func: 2.0.0 + + conventional-changelog-conventionalcommits@7.0.2: + dependencies: + compare-func: 2.0.0 + + conventional-commits-parser@5.0.0: + dependencies: + JSONStream: 1.3.5 + is-text-path: 2.0.0 + meow: 12.1.1 + split2: 4.2.0 + + cosmiconfig-typescript-loader@5.0.0(@types/node@22.5.0)(cosmiconfig@9.0.0(typescript@5.5.4))(typescript@5.5.4): + dependencies: + '@types/node': 22.5.0 + cosmiconfig: 9.0.0(typescript@5.5.4) + jiti: 1.21.6 + typescript: 5.5.4 + + cosmiconfig@9.0.0(typescript@5.5.4): + dependencies: + env-paths: 2.2.1 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + parse-json: 5.2.0 + optionalDependencies: + typescript: 5.5.4 + + cross-spawn@7.0.3: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + dargs@8.1.0: {} + + deep-extend@0.6.0: {} + + dot-prop@5.3.0: + dependencies: + is-obj: 2.0.0 + + eastasianwidth@0.2.0: {} + + emoji-regex@8.0.0: {} + + emoji-regex@9.2.2: {} + + entities@4.5.0: {} + + env-paths@2.2.1: {} + + error-ex@1.3.2: + dependencies: + is-arrayish: 0.2.1 + + escalade@3.1.2: {} + + escape-string-regexp@1.0.5: {} + + execa@8.0.1: + dependencies: + cross-spawn: 7.0.3 + get-stream: 8.0.1 + human-signals: 5.0.0 + is-stream: 3.0.0 + merge-stream: 2.0.0 + npm-run-path: 5.3.0 + onetime: 6.0.0 + signal-exit: 4.1.0 + strip-final-newline: 3.0.0 + + fast-deep-equal@3.1.3: {} + + fast-uri@3.0.1: {} + + find-up@7.0.0: + dependencies: + locate-path: 7.2.0 + path-exists: 5.0.0 + unicorn-magic: 0.1.0 + + foreground-child@3.3.0: + dependencies: + cross-spawn: 7.0.3 + signal-exit: 4.1.0 + + get-caller-file@2.0.5: {} + + get-stream@8.0.1: {} + + git-raw-commits@4.0.0: + dependencies: + dargs: 8.1.0 + meow: 12.1.1 + split2: 4.2.0 + + glob@11.0.0: + dependencies: + foreground-child: 3.3.0 + jackspeak: 4.0.2 + minimatch: 10.0.1 + minipass: 7.1.2 + package-json-from-dist: 1.0.0 + path-scurry: 2.0.0 + + global-directory@4.0.1: + dependencies: + ini: 4.1.1 + + has-flag@3.0.0: {} + + human-signals@5.0.0: {} + + ignore@6.0.2: {} + + import-fresh@3.3.0: + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + + import-meta-resolve@4.1.0: {} + + ini@4.1.1: {} + + is-arrayish@0.2.1: {} + + is-fullwidth-code-point@3.0.0: {} + + is-obj@2.0.0: {} + + is-stream@3.0.0: {} + + is-text-path@2.0.0: + dependencies: + text-extensions: 2.4.0 + + isexe@2.0.0: {} + + jackspeak@4.0.2: + dependencies: + '@isaacs/cliui': 8.0.2 + + jiti@1.21.6: {} + + js-tokens@4.0.0: {} + + js-yaml@4.1.0: + dependencies: + argparse: 2.0.1 + + json-parse-even-better-errors@2.3.1: {} + + json-schema-traverse@1.0.0: {} + + jsonc-parser@3.3.1: {} + + jsonparse@1.3.1: {} + + jsonpointer@5.0.1: {} + + lines-and-columns@1.2.4: {} + + linkify-it@5.0.0: + dependencies: + uc.micro: 2.1.0 + + locate-path@7.2.0: + dependencies: + p-locate: 6.0.0 + + lodash.camelcase@4.3.0: {} + + lodash.isplainobject@4.0.6: {} + + lodash.kebabcase@4.1.1: {} + + lodash.merge@4.6.2: {} + + lodash.mergewith@4.6.2: {} + + lodash.snakecase@4.1.1: {} + + lodash.startcase@4.4.0: {} + + lodash.uniq@4.5.0: {} + + lodash.upperfirst@4.3.1: {} + + lru-cache@11.0.1: {} + + markdown-it@14.1.0: + dependencies: + argparse: 2.0.1 + entities: 4.5.0 + linkify-it: 5.0.0 + mdurl: 2.0.0 + punycode.js: 2.3.1 + uc.micro: 2.1.0 + + markdownlint-cli@0.43.0: + dependencies: + commander: 12.1.0 + glob: 11.0.0 + ignore: 6.0.2 + js-yaml: 4.1.0 + jsonc-parser: 3.3.1 + jsonpointer: 5.0.1 + markdownlint: 0.36.1 + minimatch: 10.0.1 + run-con: 1.3.2 + smol-toml: 1.3.1 + + markdownlint-micromark@0.1.12: {} + + markdownlint@0.36.1: + dependencies: + markdown-it: 14.1.0 + markdownlint-micromark: 0.1.12 + + mdurl@2.0.0: {} + + meow@12.1.1: {} + + merge-stream@2.0.0: {} + + mimic-fn@4.0.0: {} + + minimatch@10.0.1: + dependencies: + brace-expansion: 2.0.1 + + minimist@1.2.8: {} + + minipass@7.1.2: {} + + mvdan-sh@0.10.1: {} + + npm-run-path@5.3.0: + dependencies: + path-key: 4.0.0 + + onetime@6.0.0: + dependencies: + mimic-fn: 4.0.0 + + p-limit@4.0.0: + dependencies: + yocto-queue: 1.1.1 + + p-locate@6.0.0: + dependencies: + p-limit: 4.0.0 + + package-json-from-dist@1.0.0: {} + + parent-module@1.0.1: + dependencies: + callsites: 3.1.0 + + parse-json@5.2.0: + dependencies: + '@babel/code-frame': 7.24.7 + error-ex: 1.3.2 + json-parse-even-better-errors: 2.3.1 + lines-and-columns: 1.2.4 + + path-exists@5.0.0: {} + + path-key@3.1.1: {} + + path-key@4.0.0: {} + + path-scurry@2.0.0: + dependencies: + lru-cache: 11.0.1 + minipass: 7.1.2 + + picocolors@1.0.1: {} + + prettier-plugin-sh@0.14.0(prettier@3.3.3): + dependencies: + mvdan-sh: 0.10.1 + prettier: 3.3.3 + sh-syntax: 0.4.2 + + prettier-plugin-toml@2.0.1(prettier@3.3.3): + dependencies: + '@taplo/lib': 0.4.0-alpha.2 + prettier: 3.3.3 + + prettier@3.3.3: {} + + punycode.js@2.3.1: {} + + require-directory@2.1.1: {} + + require-from-string@2.0.2: {} + + resolve-from@4.0.0: {} + + resolve-from@5.0.0: {} + + run-con@1.3.2: + dependencies: + deep-extend: 0.6.0 + ini: 4.1.1 + minimist: 1.2.8 + strip-json-comments: 3.1.1 + + semver@7.6.3: {} + + sh-syntax@0.4.2: + dependencies: + tslib: 2.6.3 + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + signal-exit@4.1.0: {} + + smol-toml@1.3.1: {} + + split2@4.2.0: {} + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.0 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-ansi@7.1.0: + dependencies: + ansi-regex: 6.0.1 + + strip-final-newline@3.0.0: {} + + strip-json-comments@3.1.1: {} + + supports-color@5.5.0: + dependencies: + has-flag: 3.0.0 + + text-extensions@2.4.0: {} + + through@2.3.8: {} + + tslib@2.6.3: {} + + typescript@5.5.4: {} + + uc.micro@2.1.0: {} + + undici-types@6.19.8: {} + + unicorn-magic@0.1.0: {} + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + + y18n@5.0.8: {} + + yargs-parser@21.1.1: {} + + yargs@17.7.2: + dependencies: + cliui: 8.0.1 + escalade: 3.1.2 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + + yocto-queue@1.1.1: {} diff --git a/test-suites/.eslintignore b/test-suites/.eslintignore deleted file mode 100644 index 125988c..0000000 --- a/test-suites/.eslintignore +++ /dev/null @@ -1,6 +0,0 @@ -.eslintrc.js -*.config.js -coverage -*.json -*.yaml -*.yml \ No newline at end of file diff --git a/test-suites/.eslintrc.js b/test-suites/.eslintrc.js deleted file mode 100644 index f83c897..0000000 --- a/test-suites/.eslintrc.js +++ /dev/null @@ -1,46 +0,0 @@ -module.exports = { - env: { - browser: true, - es2021: true, - node: true, - }, - ignorePatterns: ["src/types/generated/**"], - extends: ["airbnb-base", "airbnb-typescript", "prettier"], - parser: "@typescript-eslint/parser", - parserOptions: { - tsconfigRootDir: __dirname, - project: "./tsconfig.json", - ecmaVersion: "latest", - sourceType: "module", - }, - plugins: ["@typescript-eslint"], - rules: { - quotes: ["error", "double"], - "max-len": ["error", 130], - "import/extensions": ["error", "never"], - "import/no-commonjs": ["error", { allowRequire: false, allowPrimitiveModules: false }], - "import/no-extraneous-dependencies": [ - "error", - { devDependencies: true, optionalDependencies: true, peerDependencies: true }, - ], - "react/jsx-filename-extension": [0], - "import/no-useless-path-segments": ["error", { noUselessIndex: true }], - "max-classes-per-file": ["error", 10], - "import/prefer-default-export": "off", - "object-curly-newline": "off", - // Replacing airbnb rule with following, to re-enable "ForOfStatement" - "no-restricted-syntax": ["error", "ForInStatement", "LabeledStatement", "WithStatement"], - "no-use-before-define": "off", - "no-unused-vars": "off", - "@typescript-eslint/no-use-before-define": ["error", { functions: false, classes: false }], - "@typescript-eslint/no-unused-vars": ["error"], - "max-len": ["error", { code: 300 }], - }, - settings: { - "import/resolver": { - node: { - extensions: [".js", ".jsx", ".ts", ".tsx"], - }, - }, - }, -}; diff --git a/test-suites/.lintstagedrc b/test-suites/.lintstagedrc new file mode 100644 index 0000000..2f6d8e3 --- /dev/null +++ b/test-suites/.lintstagedrc @@ -0,0 +1,4 @@ +{ + "*.{js,ts,jsx,tsx,json,cjs}": ["npx eslint"], + "*.ts": ["npx as-prettier --check"] +} diff --git a/test-suites/.markdownlint.json b/test-suites/.markdownlint.json new file mode 100644 index 0000000..9d5a933 --- /dev/null +++ b/test-suites/.markdownlint.json @@ -0,0 +1,14 @@ +{ + "extends": "markdownlint/style/prettier", + "first-line-h1": false, + "no-inline-html": false, + "no-alt-text": false, + "MD001": false, + "MD040": false, + "MD024": false, + "MD025": false, + "MD036": false, + "MD042": false, + "MD052": false, + "MD056": false +} diff --git a/test-suites/.pre-commit-config.yaml b/test-suites/.pre-commit-config.yaml new file mode 100644 index 0000000..c1aff3e --- /dev/null +++ b/test-suites/.pre-commit-config.yaml @@ -0,0 +1,44 @@ +default_install_hook_types: + - pre-commit + +default_stages: + - pre-commit + +exclude: | + (?x)^( + CHANGELOG.md| + pnpm-lock.yaml| + cov-reports + )$ + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-json + - id: check-toml + - id: check-added-large-files + args: + - --maxkb=3000 + - id: check-merge-conflict + - id: check-case-conflict + - id: detect-private-key + + - repo: local + hooks: + - id: format + name: format + description: Format files using different tools + entry: make fmt + language: system + pass_filenames: false + + - repo: https://github.com/lyz-code/yamlfix/ + rev: 1.17.0 + hooks: + - id: yamlfix + args: + - -c + - .yamlfix.toml diff --git a/test-suites/.prettierignore b/test-suites/.prettierignore index 49db4cc..8b63442 100644 --- a/test-suites/.prettierignore +++ b/test-suites/.prettierignore @@ -1,14 +1,5 @@ -dist/ -node_modules/ -build -.github -docs -*.json -.lintstagedrc -README.md -*.html -*.md -coverage -.aptos -*.yaml -*.yml +pnpm-lock.yaml +images +audit +cov-reports +aave-core diff --git a/test-suites/.prettierrc b/test-suites/.prettierrc deleted file mode 100644 index 3773725..0000000 --- a/test-suites/.prettierrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "trailingComma": "all", - "printWidth": 120 -} diff --git a/test-suites/.prettierrc.toml b/test-suites/.prettierrc.toml new file mode 100644 index 0000000..a5370ca --- /dev/null +++ b/test-suites/.prettierrc.toml @@ -0,0 +1,9 @@ +plugins = ["prettier-plugin-sh", "prettier-plugin-toml"] +singleQuote = false +printWidth = 100 + +[[overrides]] +files = ["**/*.md"] + +[overrides.options] +proseWrap = "preserve" diff --git a/test-suites/.typos.toml b/test-suites/.typos.toml new file mode 100644 index 0000000..7b30bb8 --- /dev/null +++ b/test-suites/.typos.toml @@ -0,0 +1,2 @@ +[files] +extend-exclude = [] diff --git a/test-suites/.yamlfix.toml b/test-suites/.yamlfix.toml new file mode 100644 index 0000000..2347b77 --- /dev/null +++ b/test-suites/.yamlfix.toml @@ -0,0 +1,7 @@ +explicit_start = false +section_whitelines = 1 +whitelines = 1 +line_length = 100 +preserve_quotes = true +sequence_style = "block_style" +indent_mapping = 2 diff --git a/test-suites/README.md b/test-suites/README.md index 1608116..163a49f 100644 --- a/test-suites/README.md +++ b/test-suites/README.md @@ -18,7 +18,12 @@ make init-test-profiles ```bash= cd test-suites -pnpm init-data +pnpm deploy:init-data +``` + +```bash= +cd test-suites +pnpm deploy:core-operations ``` ## 4. Test @@ -26,4 +31,4 @@ pnpm init-data ```bash cd test-suites pnpm test:logic -``` \ No newline at end of file +``` diff --git a/test-suites/clients/aTokensClient.ts b/test-suites/clients/aTokensClient.ts index 93f07d7..720ef19 100644 --- a/test-suites/clients/aTokensClient.ts +++ b/test-suites/clients/aTokensClient.ts @@ -1,5 +1,5 @@ import { AccountAddress, CommittedTransactionResponse, MoveFunctionId } from "@aptos-labs/ts-sdk"; -import { BigNumber } from "ethers"; +import { BigNumber } from "@ethersproject/bignumber"; import { AptosContractWrapperBaseClass } from "./baseClass"; import { ATokenAssetMetadataFuncAddr, diff --git a/test-suites/clients/baseClass.ts b/test-suites/clients/baseClass.ts index d6a869f..f856f7a 100644 --- a/test-suites/clients/baseClass.ts +++ b/test-suites/clients/baseClass.ts @@ -13,7 +13,7 @@ import { isUserTransactionResponse, Event, } from "@aptos-labs/ts-sdk"; -import { BigNumber } from "ethers"; +import { BigNumber } from "@ethersproject/bignumber"; import { AptosProvider } from "../wrappers/aptosProvider"; const GetAccountBalance = async ( diff --git a/test-suites/clients/bridgeClient.ts b/test-suites/clients/bridgeClient.ts index 512b63b..459fe1a 100644 --- a/test-suites/clients/bridgeClient.ts +++ b/test-suites/clients/bridgeClient.ts @@ -1,5 +1,5 @@ import { AccountAddress, CommittedTransactionResponse } from "@aptos-labs/ts-sdk"; -import { BigNumber } from "ethers"; +import { BigNumber } from "@ethersproject/bignumber"; import { AptosContractWrapperBaseClass } from "./baseClass"; import { BackUnbackedFuncAddr, MintUnbackedFuncAddr } from "../configs/bridge"; diff --git a/test-suites/clients/coreClient.ts b/test-suites/clients/coreClient.ts index f59b50e..fee9529 100644 --- a/test-suites/clients/coreClient.ts +++ b/test-suites/clients/coreClient.ts @@ -1,5 +1,5 @@ import { AccountAddress, CommittedTransactionResponse } from "@aptos-labs/ts-sdk"; -import { BigNumber } from "ethers"; +import { BigNumber } from "@ethersproject/bignumber"; import { AptosContractWrapperBaseClass } from "./baseClass"; import { BorrowFuncAddr, diff --git a/test-suites/clients/defaultInterestRateStrategyClient.ts b/test-suites/clients/defaultInterestRateStrategyClient.ts new file mode 100644 index 0000000..485704b --- /dev/null +++ b/test-suites/clients/defaultInterestRateStrategyClient.ts @@ -0,0 +1,90 @@ +import { AccountAddress, CommittedTransactionResponse } from "@aptos-labs/ts-sdk"; +import { BigNumber } from "@ethersproject/bignumber"; +import { AptosContractWrapperBaseClass } from "./baseClass"; +import { + CalculateInterestRatesFuncAddr, + GetBaseVariableBorrowRateFuncAddr, + GetGetMaxExcessUsageRatioFuncAddr, + GetGetOptimalUsageRatioFuncAddr, + GetMaxVariableBorrowRateFuncAddr, + GetVariableRateSlope1FuncAddr, + GetVariableRateSlope2FuncAddr, + SetReserveInterestRateStrategyFuncAddr, +} from "../configs/rates"; +import { mapToBN } from "../helpers/contractHelper"; + +export class DefaultInterestRateStrategyClient extends AptosContractWrapperBaseClass { + + public async setReserveInterestRateStrategy( + asset: AccountAddress, + optimalUsageRatio: BigNumber, + baseVariableBorrowRate: BigNumber, + variableRateSlope1: BigNumber, + variableRateSlope2: BigNumber, + ): Promise { + return this.sendTxAndAwaitResponse(SetReserveInterestRateStrategyFuncAddr, [ + asset, + optimalUsageRatio.toString(), + baseVariableBorrowRate.toString(), + variableRateSlope1.toString(), + variableRateSlope2.toString(), + ]); + } + + public async getOptimalUsageRatio(asset: AccountAddress): Promise { + const [resp] = (await this.callViewMethod(GetGetOptimalUsageRatioFuncAddr, [asset])).map(mapToBN); + return resp; + } + + public async getMaxExcessUsageRatio(asset: AccountAddress): Promise { + const [resp] = (await this.callViewMethod(GetGetMaxExcessUsageRatioFuncAddr, [asset])).map(mapToBN); + return resp; + } + + public async getVariableRateSlope1(asset: AccountAddress): Promise { + const [resp] = (await this.callViewMethod(GetVariableRateSlope1FuncAddr, [asset])).map(mapToBN); + return resp; + } + + public async getVariableRateSlope2(asset: AccountAddress): Promise { + const [resp] = (await this.callViewMethod(GetVariableRateSlope2FuncAddr, [asset])).map(mapToBN); + return resp; + } + + public async getBaseVariableBorrowRate(asset: AccountAddress): Promise { + const [resp] = (await this.callViewMethod(GetBaseVariableBorrowRateFuncAddr, [asset])).map(mapToBN); + return resp; + } + + public async getMaxVariableBorrowRate(asset: AccountAddress): Promise { + const [resp] = (await this.callViewMethod(GetMaxVariableBorrowRateFuncAddr, [asset])).map(mapToBN); + return resp; + } + + public async calculateInterestRates( + unbacked: BigNumber, + liquidityAdded: BigNumber, + liquidityTaken: BigNumber, + totalVariableDebt: BigNumber, + reserveFactor: BigNumber, + reserve: AccountAddress, + aTokenUnderlyingBalance: BigNumber, + ): Promise<{ currentLiquidityRate: BigNumber; currentVariableBorrowRate: BigNumber }> { + const [currentLiquidityRate, currentVariableBorrowRate] = await this.callViewMethod( + CalculateInterestRatesFuncAddr, + [ + unbacked.toString(), + liquidityAdded.toString(), + liquidityTaken.toString(), + totalVariableDebt.toString(), + reserveFactor.toString(), + reserve, + aTokenUnderlyingBalance.toString(), + ], + ); + return { + currentLiquidityRate: BigNumber.from(currentLiquidityRate), + currentVariableBorrowRate: BigNumber.from(currentVariableBorrowRate), + }; + } +} diff --git a/test-suites/clients/oracleClient.ts b/test-suites/clients/oracleClient.ts index b796102..ca81ac2 100644 --- a/test-suites/clients/oracleClient.ts +++ b/test-suites/clients/oracleClient.ts @@ -1,42 +1,59 @@ import { AccountAddress, CommittedTransactionResponse } from "@aptos-labs/ts-sdk"; -import { BigNumber } from "ethers"; +import { BigNumber } from "@ethersproject/bignumber"; import { AptosContractWrapperBaseClass } from "./baseClass"; import { mapToBN } from "../helpers/contractHelper"; import { GetAssetPriceFuncAddr, - GetGracePeriodFuncAddr, - IsBorrowAllowedFuncAddr, - IsLiquidationAllowedFuncAddr, - SetAssetPriceFuncAddr, - SetGracePeriodFuncAddr, + GetAssetsPricesFuncAddr, + SetAssetFeedIdFuncAddr, + BatchSetAssetFeedIdsFuncAddr, + RemoveAssetFeedIdFuncAddr, + RemoveAssetFeedIdsFuncAddr, + GetOracleResourceAccountFuncAddr, + GetOracleAddressFuncAddr, } from "../configs/oracle"; export class OracleClient extends AptosContractWrapperBaseClass { - public async setAssetPrice(asset: AccountAddress, price: BigNumber): Promise { - return this.sendTxAndAwaitResponse(SetAssetPriceFuncAddr, [asset, price.toString()]); - } public async getAssetPrice(asset: AccountAddress): Promise { const [resp] = (await this.callViewMethod(GetAssetPriceFuncAddr, [asset])).map(mapToBN); return resp; } - public async isBorrowAllowed(): Promise { - const [resp] = await this.callViewMethod(IsBorrowAllowedFuncAddr, []); - return resp as boolean; + public async getAssetsPrices(assets: Array): Promise> { + return ((await this.callViewMethod(GetAssetsPricesFuncAddr, [assets])) as Array).map((item) => + mapToBN(item) + ) + } + + public async setAssetFeedId(asset: AccountAddress, feedId: Uint8Array): Promise { + return this.sendTxAndAwaitResponse(SetAssetFeedIdFuncAddr, [asset, feedId]); + } + + public async batchSetAssetFeedIds(assets: Array, feedIds: Array): Promise { + return this.sendTxAndAwaitResponse(BatchSetAssetFeedIdsFuncAddr, [assets, feedIds]); } - public async isLiquidationAllowed(): Promise { - const [resp] = await this.callViewMethod(IsLiquidationAllowedFuncAddr, []); - return resp as boolean; + public async removeAssetFeedId(asset: AccountAddress): Promise { + return this.sendTxAndAwaitResponse(RemoveAssetFeedIdFuncAddr, [asset]); } - public async setGracePeriod(newGracePeriod: BigNumber): Promise { - return this.sendTxAndAwaitResponse(SetGracePeriodFuncAddr, [newGracePeriod.toString()]); + public async batchRemoveAssetFeedIds(assets: Array): Promise { + return this.sendTxAndAwaitResponse(RemoveAssetFeedIdsFuncAddr, [assets]); } - public async getGracePeriod(): Promise { - const [resp] = (await this.callViewMethod(GetGracePeriodFuncAddr, [])).map(mapToBN); + public async getOracleResourceAccount(): Promise { + const [resp] = (await this.callViewMethod(GetOracleResourceAccountFuncAddr, [])).map((item) => + AccountAddress.fromString(item as string), + ); return resp; } + + public async getOracleAddress(): Promise { + const [resp] = (await this.callViewMethod(GetOracleAddressFuncAddr, [])).map((item) => + AccountAddress.fromString(item as string), + ); + return resp; + } + } diff --git a/test-suites/clients/poolClient.ts b/test-suites/clients/poolClient.ts index 85e2914..ac28dcd 100644 --- a/test-suites/clients/poolClient.ts +++ b/test-suites/clients/poolClient.ts @@ -1,20 +1,15 @@ import { AccountAddress, CommittedTransactionResponse } from "@aptos-labs/ts-sdk"; -import { BigNumber } from "ethers"; +import { BigNumber } from "@ethersproject/bignumber"; import { AptosContractWrapperBaseClass } from "./baseClass"; import { - CalculateInterestRatesFuncAddr, GetATokenTotalSupplyFuncAddr, GetAllATokensFuncAddr, GetAllReservesTokensFuncAddr, GetAllVariableTokensFuncAddr, - GetBaseVariableBorrowRateFuncAddr, GetDebtCeilingDecimalsFuncAddr, GetDebtCeilingFuncAddr, GetFlashLoanEnabledFuncAddr, - GetGetMaxExcessUsageRatioFuncAddr, - GetGetOptimalUsageRatioFuncAddr, GetLiquidationProtocolFeeTokensFuncAddr, - GetMaxVariableBorrowRateFuncAddr, GetPausedFuncAddr, GetReserveCapsFuncAddr, GetReserveDataAndReservesCountFuncAddr, @@ -24,8 +19,6 @@ import { GetTotalDebtFuncAddr, GetUnbackedMintCapFuncAddr, GetUserReserveDataFuncAddr, - GetVariableRateSlope1FuncAddr, - GetVariableRateSlope2FuncAddr, PoolConfiguratorInitReservesFuncAddr, PoolConfiguratorConfigureReserveAsCollateralFuncAddr, PoolConfiguratorDropReserveFuncAddr, @@ -75,8 +68,6 @@ import { PoolSetBridgeProtocolFeeFuncAddr, PoolSetFlashloanPremiumsFuncAddr, PoolSetUserEmodeFuncAddr, - SetReserveInterestRateStrategyFuncAddr, - PoolConfiguratorConfigureReservesFuncAddr, } from "../configs/pool"; import { mapToBN } from "../helpers/contractHelper"; @@ -411,33 +402,8 @@ export class PoolClient extends AptosContractWrapperBaseClass { ]); } - public async configureReserves( - asset: Array, - base_ltv: Array, - liquidationThreshold: Array, - liquidationBonus: Array, - reserveFactor: Array, - borrowCap: Array, - supplyCap: Array, - borrowingEnabled: Array, - flashloanEnabled: Array, - ): Promise { - return this.sendTxAndAwaitResponse(PoolConfiguratorConfigureReservesFuncAddr, [ - asset, - base_ltv.map((item) => item.toString()), - liquidationThreshold.map((item) => item.toString()), - liquidationBonus.map((item) => item.toString()), - reserveFactor.map((item) => item.toString()), - borrowCap.map((item) => item.toString()), - supplyCap.map((item) => item.toString()), - borrowingEnabled, - flashloanEnabled, - ]); - } - public async initReserves( underlyingAssets: Array, - underlyingAssetDecimals: Array, treasury: Array, aTokenName: Array, aTokenSymbol: Array, @@ -446,7 +412,6 @@ export class PoolClient extends AptosContractWrapperBaseClass { ): Promise { return this.sendTxAndAwaitResponse(PoolConfiguratorInitReservesFuncAddr, [ underlyingAssets, - underlyingAssetDecimals, treasury, aTokenName, aTokenSymbol, @@ -490,79 +455,6 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp as number; } - public async setReserveInterestRateStrategy( - asset: AccountAddress, - optimalUsageRatio: BigNumber, - baseVariableBorrowRate: BigNumber, - variableRateSlope1: BigNumber, - variableRateSlope2: BigNumber, - ): Promise { - return this.sendTxAndAwaitResponse(SetReserveInterestRateStrategyFuncAddr, [ - asset, - optimalUsageRatio.toString(), - baseVariableBorrowRate.toString(), - variableRateSlope1.toString(), - variableRateSlope2.toString(), - ]); - } - - public async getOptimalUsageRatio(asset: AccountAddress): Promise { - const [resp] = (await this.callViewMethod(GetGetOptimalUsageRatioFuncAddr, [asset])).map(mapToBN); - return resp; - } - - public async getMaxExcessUsageRatio(asset: AccountAddress): Promise { - const [resp] = (await this.callViewMethod(GetGetMaxExcessUsageRatioFuncAddr, [asset])).map(mapToBN); - return resp; - } - - public async getVariableRateSlope1(asset: AccountAddress): Promise { - const [resp] = (await this.callViewMethod(GetVariableRateSlope1FuncAddr, [asset])).map(mapToBN); - return resp; - } - - public async getVariableRateSlope2(asset: AccountAddress): Promise { - const [resp] = (await this.callViewMethod(GetVariableRateSlope2FuncAddr, [asset])).map(mapToBN); - return resp; - } - - public async getBaseVariableBorrowRate(asset: AccountAddress): Promise { - const [resp] = (await this.callViewMethod(GetBaseVariableBorrowRateFuncAddr, [asset])).map(mapToBN); - return resp; - } - - public async getMaxVariableBorrowRate(asset: AccountAddress): Promise { - const [resp] = (await this.callViewMethod(GetMaxVariableBorrowRateFuncAddr, [asset])).map(mapToBN); - return resp; - } - - public async calculateInterestRates( - unbacked: BigNumber, - liquidityAdded: BigNumber, - liquidityTaken: BigNumber, - totalVariableDebt: BigNumber, - reserveFactor: BigNumber, - reserve: AccountAddress, - atokenAddress: AccountAddress, - ): Promise<{ currentLiquidityRate: BigNumber; currentVariableBorrowRate: BigNumber }> { - const [currentLiquidityRate, currentVariableBorrowRate] = await this.callViewMethod( - CalculateInterestRatesFuncAddr, - [ - unbacked.toString(), - liquidityAdded.toString(), - liquidityTaken.toString(), - totalVariableDebt.toString(), - reserveFactor.toString(), - reserve, - atokenAddress, - ], - ); - return { - currentLiquidityRate: BigNumber.from(currentLiquidityRate), - currentVariableBorrowRate: BigNumber.from(currentVariableBorrowRate), - }; - } - public async getAllReservesTokens(): Promise> { const resp = ((await this.callViewMethod(GetAllReservesTokensFuncAddr, [])).at(0) as Array).map( (item) => diff --git a/test-suites/clients/uiPoolDataProvider.ts b/test-suites/clients/uiPoolDataProvider.ts index 3591811..9b3ca96 100644 --- a/test-suites/clients/uiPoolDataProvider.ts +++ b/test-suites/clients/uiPoolDataProvider.ts @@ -69,6 +69,7 @@ export type BaseCurrencyData = { }; export type UserReserveData = { + decimals: bigint; underlyingAsset: AccountAddress; scaledATokenBalance: bigint; usageAsCollateralEnabledOnUser: boolean; @@ -175,6 +176,7 @@ export class UiPoolDataProviderClient extends AptosContractWrapperBaseClass { const userReserves = userReserveDataRaw.map( (item) => ({ + decimals: BigInt(item.decimals), underlyingAsset: AccountAddress.fromString(item.underlying_asset.toString()), scaledATokenBalance: BigInt(item.scaled_a_token_balance), usageAsCollateralEnabledOnUser: item.usage_as_collateral_enabled_on_user as boolean, diff --git a/test-suites/clients/underlyingTokensClient.ts b/test-suites/clients/underlyingTokensClient.ts index f4842cd..1d4052e 100644 --- a/test-suites/clients/underlyingTokensClient.ts +++ b/test-suites/clients/underlyingTokensClient.ts @@ -1,5 +1,5 @@ import { AccountAddress, CommittedTransactionResponse, MoveFunctionId } from "@aptos-labs/ts-sdk"; -import { BigNumber } from "ethers"; +import { BigNumber } from "@ethersproject/bignumber"; import { AptosContractWrapperBaseClass } from "./baseClass"; import { UnderlyingBalanceOfFuncAddr, diff --git a/test-suites/clients/variableTokensClient.ts b/test-suites/clients/variableTokensClient.ts index 9e233f2..e25e142 100644 --- a/test-suites/clients/variableTokensClient.ts +++ b/test-suites/clients/variableTokensClient.ts @@ -1,5 +1,5 @@ import { AccountAddress, CommittedTransactionResponse, MoveFunctionId } from "@aptos-labs/ts-sdk"; -import { BigNumber } from "ethers"; +import { BigNumber } from "@ethersproject/bignumber"; import { AptosContractWrapperBaseClass } from "./baseClass"; import { VariableCreateTokenFuncAddr, diff --git a/test-suites/configs/aclManage.ts b/test-suites/configs/aclManage.ts index d15bb34..4bc747d 100644 --- a/test-suites/configs/aclManage.ts +++ b/test-suites/configs/aclManage.ts @@ -1,14 +1,11 @@ import { Account, MoveFunctionId } from "@aptos-labs/ts-sdk"; -import path from "path"; -import dotenv from "dotenv"; import { AptosProvider } from "../wrappers/aptosProvider"; -const envPath = path.resolve(__dirname, "../../.env"); -dotenv.config({ path: envPath }); - // Resources Admin Account -const aptosProvider = new AptosProvider(); -export const AclManager = Account.fromPrivateKey({ privateKey: aptosProvider.getProfilePrivateKeyByName("aave_acl") }); +const aptosProvider = AptosProvider.fromEnvs(); +export const AclManager = Account.fromPrivateKey({ + privateKey: aptosProvider.getProfileAccountPrivateKeyByName("aave_acl"), +}); export const AclManagerAccountAddress = AclManager.accountAddress.toString(); // Resource Func Addr diff --git a/test-suites/configs/bridge.ts b/test-suites/configs/bridge.ts index 2914061..d50839e 100644 --- a/test-suites/configs/bridge.ts +++ b/test-suites/configs/bridge.ts @@ -1,15 +1,10 @@ import { Account, MoveFunctionId } from "@aptos-labs/ts-sdk"; -import path from "path"; -import dotenv from "dotenv"; import { AptosProvider } from "../wrappers/aptosProvider"; -const envPath = path.resolve(__dirname, "../../.env"); -dotenv.config({ path: envPath }); - // Resources Admin Account -const aptosProvider = new AptosProvider(); +const aptosProvider = AptosProvider.fromEnvs(); export const BridgeManager = Account.fromPrivateKey({ - privateKey: aptosProvider.getProfilePrivateKeyByName("aave_pool"), + privateKey: aptosProvider.getProfileAccountPrivateKeyByName("aave_pool"), }); export const BridgeManagerAccountAddress = BridgeManager.accountAddress.toString(); diff --git a/test-suites/configs/common.ts b/test-suites/configs/common.ts index b8c81e6..da9c389 100644 --- a/test-suites/configs/common.ts +++ b/test-suites/configs/common.ts @@ -1,12 +1,7 @@ import { Aptos, AptosConfig } from "@aptos-labs/ts-sdk"; -import path from "path"; -import dotenv from "dotenv"; import { AptosProvider } from "../wrappers/aptosProvider"; -const envPath = path.resolve(__dirname, "../../.env"); -dotenv.config({ path: envPath }); - // Initialize Aptos instance -const aptosProvider = new AptosProvider(); +const aptosProvider = AptosProvider.fromEnvs(); const config = new AptosConfig({ network: aptosProvider.getNetwork() }); export const aptos = new Aptos(config); diff --git a/test-suites/configs/config.ts b/test-suites/configs/config.ts index 92bcdff..95e3dd8 100644 --- a/test-suites/configs/config.ts +++ b/test-suites/configs/config.ts @@ -1,14 +1,10 @@ import { Account, AccountAddress, Ed25519Account } from "@aptos-labs/ts-sdk"; -import path from "path"; -import dotenv from "dotenv"; import { AAAVE, AAVE, ADAI, AUSDC, AWETH, DAI, USDC, VDAI, WETH } from "./tokens"; import { AclManager } from "./aclManage"; import { AptosProvider } from "../wrappers/aptosProvider"; import { aTokens, underlyingTokens, varTokens } from "../scripts/createTokens"; import { AclClient } from "../clients/aclClient"; -dotenv.config(); - interface TestEnv { emergencyAdmin: Ed25519Account; riskAdmin: Ed25519Account; @@ -38,30 +34,39 @@ export const testEnv: TestEnv = { aave: AccountAddress.ZERO, } as TestEnv; -const envPath = path.resolve(__dirname, "../../.env"); -dotenv.config({ path: envPath }); - -const aptosProvider = new AptosProvider(); +const aptosProvider = AptosProvider.fromEnvs(); export async function getTestAccounts(): Promise { // 1. create accounts const accounts: Ed25519Account[] = []; - const manager0 = Account.fromPrivateKey({ privateKey: aptosProvider.getProfilePrivateKeyByName("test_account_0") }); + const manager0 = Account.fromPrivateKey({ + privateKey: aptosProvider.getProfileAccountPrivateKeyByName("test_account_0"), + }); accounts.push(manager0); - const manager1 = Account.fromPrivateKey({ privateKey: aptosProvider.getProfilePrivateKeyByName("test_account_1") }); + const manager1 = Account.fromPrivateKey({ + privateKey: aptosProvider.getProfileAccountPrivateKeyByName("test_account_1"), + }); accounts.push(manager1); - const manager2 = Account.fromPrivateKey({ privateKey: aptosProvider.getProfilePrivateKeyByName("test_account_2") }); + const manager2 = Account.fromPrivateKey({ + privateKey: aptosProvider.getProfileAccountPrivateKeyByName("test_account_2"), + }); accounts.push(manager2); - const manager3 = Account.fromPrivateKey({ privateKey: aptosProvider.getProfilePrivateKeyByName("test_account_3") }); + const manager3 = Account.fromPrivateKey({ + privateKey: aptosProvider.getProfileAccountPrivateKeyByName("test_account_3"), + }); accounts.push(manager3); - const manager4 = Account.fromPrivateKey({ privateKey: aptosProvider.getProfilePrivateKeyByName("test_account_4") }); + const manager4 = Account.fromPrivateKey({ + privateKey: aptosProvider.getProfileAccountPrivateKeyByName("test_account_4"), + }); accounts.push(manager4); - const manager5 = Account.fromPrivateKey({ privateKey: aptosProvider.getProfilePrivateKeyByName("test_account_5") }); + const manager5 = Account.fromPrivateKey({ + privateKey: aptosProvider.getProfileAccountPrivateKeyByName("test_account_5"), + }); accounts.push(manager5); return accounts; } diff --git a/test-suites/configs/flashLoan.ts b/test-suites/configs/flashLoan.ts index d95c9bb..c65376f 100644 --- a/test-suites/configs/flashLoan.ts +++ b/test-suites/configs/flashLoan.ts @@ -1,15 +1,10 @@ import { Account, MoveFunctionId } from "@aptos-labs/ts-sdk"; -import path from "path"; -import dotenv from "dotenv"; import { AptosProvider } from "../wrappers/aptosProvider"; -const envPath = path.resolve(__dirname, "../../.env"); -dotenv.config({ path: envPath }); - // Resources Admin Account -const aptosProvider = new AptosProvider(); +const aptosProvider = AptosProvider.fromEnvs(); export const FlashLoanManager = Account.fromPrivateKey({ - privateKey: aptosProvider.getProfilePrivateKeyByName("aave_pool"), + privateKey: aptosProvider.getProfileAccountPrivateKeyByName("aave_pool"), }); export const FlashLoanManagerAccountAddress = FlashLoanManager.accountAddress.toString(); diff --git a/test-suites/configs/largePackages.ts b/test-suites/configs/largePackages.ts index c17148f..f118e2f 100644 --- a/test-suites/configs/largePackages.ts +++ b/test-suites/configs/largePackages.ts @@ -1,15 +1,10 @@ import { Account, MoveFunctionId } from "@aptos-labs/ts-sdk"; -import path from "path"; -import dotenv from "dotenv"; import { AptosProvider } from "../wrappers/aptosProvider"; -const envPath = path.resolve(__dirname, "../../.env"); -dotenv.config({ path: envPath }); - // Resources Admin Account -const aptosProvider = new AptosProvider(); +const aptosProvider = AptosProvider.fromEnvs(); export const LargePackagesManager = Account.fromPrivateKey({ - privateKey: aptosProvider.getProfilePrivateKeyByName("aave_large_packages"), + privateKey: aptosProvider.getProfileAccountPrivateKeyByName("aave_large_packages"), }); export const LargePackagesAccountAddress = LargePackagesManager.accountAddress.toString(); diff --git a/test-suites/configs/oracle.ts b/test-suites/configs/oracle.ts index 728fe35..3c43c8b 100644 --- a/test-suites/configs/oracle.ts +++ b/test-suites/configs/oracle.ts @@ -1,24 +1,21 @@ import { Account, MoveFunctionId } from "@aptos-labs/ts-sdk"; -import path from "path"; -import dotenv from "dotenv"; import { AptosProvider } from "../wrappers/aptosProvider"; -const envPath = path.resolve(__dirname, "../../.env"); -dotenv.config({ path: envPath }); - // Resources Admin Account -const aptosProvider = new AptosProvider(); +const aptosProvider = AptosProvider.fromEnvs(); export const OracleManager = Account.fromPrivateKey({ - privateKey: aptosProvider.getProfilePrivateKeyByName("aave_mock_oracle"), + privateKey: aptosProvider.getProfileAccountPrivateKeyByName("aave_oracle"), }); export const OracleManagerAccountAddress = OracleManager.accountAddress.toString(); // Resource Func Addr export const GetAssetPriceFuncAddr: MoveFunctionId = `${OracleManagerAccountAddress}::oracle::get_asset_price`; -export const SetAssetPriceFuncAddr: MoveFunctionId = `${OracleManagerAccountAddress}::oracle::set_asset_price`; -export const IsBorrowAllowedFuncAddr: MoveFunctionId = `${OracleManagerAccountAddress}::oracle_sentinel::is_borrow_allowed`; -export const IsLiquidationAllowedFuncAddr: MoveFunctionId = `${OracleManagerAccountAddress}::oracle_sentinel::is_liquidation_allowed`; -export const SetGracePeriodFuncAddr: MoveFunctionId = `${OracleManagerAccountAddress}::oracle_sentinel::set_grace_period`; -export const GetGracePeriodFuncAddr: MoveFunctionId = `${OracleManagerAccountAddress}::oracle_sentinel::get_grace_period`; +export const GetAssetsPricesFuncAddr: MoveFunctionId = `${OracleManagerAccountAddress}::oracle::get_assets_prices`; +export const SetAssetFeedIdFuncAddr: MoveFunctionId = `${OracleManagerAccountAddress}::oracle::set_asset_feed_id`; +export const BatchSetAssetFeedIdsFuncAddr: MoveFunctionId = `${OracleManagerAccountAddress}::oracle::batch_set_asset_feed_ids`; +export const RemoveAssetFeedIdFuncAddr: MoveFunctionId = `${OracleManagerAccountAddress}::oracle::remove_asset_feed_id`; +export const RemoveAssetFeedIdsFuncAddr: MoveFunctionId = `${OracleManagerAccountAddress}::oracle::batch_remove_asset_feed_ids`; +export const GetOracleResourceAccountFuncAddr: MoveFunctionId = `${OracleManagerAccountAddress}::oracle_base::get_oracle_resource_account`; +export const GetOracleAddressFuncAddr: MoveFunctionId = `${OracleManagerAccountAddress}::oracle_base::oracle_address`; // Mock Account diff --git a/test-suites/configs/pool.ts b/test-suites/configs/pool.ts index 2c3c8e9..d550bd4 100644 --- a/test-suites/configs/pool.ts +++ b/test-suites/configs/pool.ts @@ -1,16 +1,11 @@ import { Account, MoveFunctionId } from "@aptos-labs/ts-sdk"; -import path from "path"; -import dotenv from "dotenv"; import { AptosProvider } from "../wrappers/aptosProvider"; -const envPath = path.resolve(__dirname, "../../.env"); -dotenv.config({ path: envPath }); - // Resources Admin Account // POOL -const aptosProvider = new AptosProvider(); +const aptosProvider = AptosProvider.fromEnvs(); export const PoolManager = Account.fromPrivateKey({ - privateKey: aptosProvider.getProfilePrivateKeyByName("aave_pool"), + privateKey: aptosProvider.getProfileAccountPrivateKeyByName("aave_pool"), }); export const PoolManagerAccountAddress = PoolManager.accountAddress.toString(); @@ -74,7 +69,6 @@ export const PoolConfiguratorSetUnbackedMintCapFuncAddr: MoveFunctionId = `${Poo export const PoolConfiguratorUpdateBridgeProtocolFeeFuncAddr: MoveFunctionId = `${PoolManagerAccountAddress}::pool_configurator::update_bridge_protocol_fee`; export const PoolConfiguratorUpdateFlashloanPremiumToProtocolFuncAddr: MoveFunctionId = `${PoolManagerAccountAddress}::pool_configurator::update_flashloan_premium_to_protocol`; export const PoolConfiguratorUpdateFlashloanPremiumTotalFuncAddr: MoveFunctionId = `${PoolManagerAccountAddress}::pool_configurator::update_flashloan_premium_total`; -export const PoolConfiguratorConfigureReservesFuncAddr: MoveFunctionId = `${PoolManagerAccountAddress}::pool_configurator::configure_reserves`; // View export const PoolConfiguratorGetRevisionFuncAddr: MoveFunctionId = `${PoolManagerAccountAddress}::pool_configurator::get_revision`; @@ -102,23 +96,6 @@ export const PoolGetUserEmodeFuncAddr: MoveFunctionId = `${PoolManagerAccountAdd // Generic Logic // Internal methods are tested in other modules -/** - * ------------------------------------------------------------------------- - * default_reserve_interest_rate_strategy - * ------------------------------------------------------------------------- - */ -// Entry -export const SetReserveInterestRateStrategyFuncAddr: MoveFunctionId = `${PoolManagerAccountAddress}::default_reserve_interest_rate_strategy::set_reserve_interest_rate_strategy`; - -// View -export const GetGetOptimalUsageRatioFuncAddr: MoveFunctionId = `${PoolManagerAccountAddress}::default_reserve_interest_rate_strategy::get_optimal_usage_ratio`; -export const GetGetMaxExcessUsageRatioFuncAddr: MoveFunctionId = `${PoolManagerAccountAddress}::default_reserve_interest_rate_strategy::get_max_excess_usage_ratio`; -export const GetVariableRateSlope1FuncAddr: MoveFunctionId = `${PoolManagerAccountAddress}::default_reserve_interest_rate_strategy::get_variable_rate_slope1`; -export const GetVariableRateSlope2FuncAddr: MoveFunctionId = `${PoolManagerAccountAddress}::default_reserve_interest_rate_strategy::get_variable_rate_slope2`; -export const GetBaseVariableBorrowRateFuncAddr: MoveFunctionId = `${PoolManagerAccountAddress}::default_reserve_interest_rate_strategy::get_base_variable_borrow_rate`; -export const GetMaxVariableBorrowRateFuncAddr: MoveFunctionId = `${PoolManagerAccountAddress}::default_reserve_interest_rate_strategy::get_max_variable_borrow_rate`; -export const CalculateInterestRatesFuncAddr: MoveFunctionId = `${PoolManagerAccountAddress}::default_reserve_interest_rate_strategy::calculate_interest_rates`; - /** * ------------------------------------------------------------------------- * pool data provider diff --git a/test-suites/configs/rates.ts b/test-suites/configs/rates.ts new file mode 100644 index 0000000..aee9cbe --- /dev/null +++ b/test-suites/configs/rates.ts @@ -0,0 +1,224 @@ +import { Account, MoveFunctionId } from "@aptos-labs/ts-sdk"; +import { AptosProvider } from "../wrappers/aptosProvider"; + +// Resources Admin Account +// AAVE RATE +const aptosProvider = AptosProvider.fromEnvs(); +export const RateManager = Account.fromPrivateKey({ + privateKey: aptosProvider.getProfileAccountPrivateKeyByName("aave_rate"), +}); +export const RateManagerAccountAddress = RateManager.accountAddress.toString(); + +/** + * ------------------------------------------------------------------------- + * default_reserve_interest_rate_strategy + * ------------------------------------------------------------------------- + */ +// Entry +export const SetReserveInterestRateStrategyFuncAddr: MoveFunctionId = `${RateManagerAccountAddress}::default_reserve_interest_rate_strategy::set_reserve_interest_rate_strategy`; + +// View +export const GetGetOptimalUsageRatioFuncAddr: MoveFunctionId = `${RateManagerAccountAddress}::default_reserve_interest_rate_strategy::get_optimal_usage_ratio`; +export const GetGetMaxExcessUsageRatioFuncAddr: MoveFunctionId = `${RateManagerAccountAddress}::default_reserve_interest_rate_strategy::get_max_excess_usage_ratio`; +export const GetVariableRateSlope1FuncAddr: MoveFunctionId = `${RateManagerAccountAddress}::default_reserve_interest_rate_strategy::get_variable_rate_slope1`; +export const GetVariableRateSlope2FuncAddr: MoveFunctionId = `${RateManagerAccountAddress}::default_reserve_interest_rate_strategy::get_variable_rate_slope2`; +export const GetBaseVariableBorrowRateFuncAddr: MoveFunctionId = `${RateManagerAccountAddress}::default_reserve_interest_rate_strategy::get_base_variable_borrow_rate`; +export const GetMaxVariableBorrowRateFuncAddr: MoveFunctionId = `${RateManagerAccountAddress}::default_reserve_interest_rate_strategy::get_max_variable_borrow_rate`; +export const CalculateInterestRatesFuncAddr: MoveFunctionId = `${RateManagerAccountAddress}::default_reserve_interest_rate_strategy::calculate_interest_rates`; + +/** + * ------------------------------------------------------------------------- + * gho_interest_rate_strategy + * ------------------------------------------------------------------------- + */ + +// Asset Strategy Configurator +export const strategyDAI = { + // strategy: rateStrategies_1.rateStrategyStableTwo, + baseLTVAsCollateral: "7500", + liquidationThreshold: "8000", + liquidationBonus: "10500", + liquidationProtocolFee: "1000", + borrowingEnabled: true, + // stableBorrowRateEnabled: true, + flashLoanEnabled: true, + reserveDecimals: "8", + // aTokenImpl: types_1.eContractid.AToken, + reserveFactor: "1000", + supplyCap: "0", + borrowCap: "0", + debtCeiling: "0", + borrowableIsolation: true, +}; + +export const strategyUSDC = { + // strategy: rateStrategies_1.rateStrategyStableOne, + baseLTVAsCollateral: "8000", + liquidationThreshold: "8500", + liquidationBonus: "10500", + liquidationProtocolFee: "1000", + borrowingEnabled: true, + // stableBorrowRateEnabled: true, + flashLoanEnabled: true, + reserveDecimals: "8", + // aTokenImpl: types_1.eContractid.AToken, + reserveFactor: "1000", + supplyCap: "0", + borrowCap: "0", + debtCeiling: "0", + borrowableIsolation: true, +}; +export const strategyAAVE = { + // strategy: rateStrategies_1.rateStrategyVolatileOne, + baseLTVAsCollateral: "5000", + liquidationThreshold: "6500", + liquidationBonus: "11000", + liquidationProtocolFee: "1000", + borrowingEnabled: false, + // stableBorrowRateEnabled: false, + flashLoanEnabled: false, + reserveDecimals: "8", + // aTokenImpl: types_1.eContractid.AToken, + reserveFactor: "0", + supplyCap: "0", + borrowCap: "0", + debtCeiling: "0", + borrowableIsolation: false, +}; + +export const strategyWETH = { + // strategy: rateStrategies_1.rateStrategyVolatileOne, + baseLTVAsCollateral: "8000", + liquidationThreshold: "8250", + liquidationBonus: "10500", + liquidationProtocolFee: "1000", + borrowingEnabled: true, + // stableBorrowRateEnabled: true, + flashLoanEnabled: true, + reserveDecimals: "8", + // aTokenImpl: types_1.eContractid.AToken, + reserveFactor: "1000", + supplyCap: "0", + borrowCap: "0", + debtCeiling: "0", + borrowableIsolation: false, +}; + +export const strategyLINK = { + // strategy: rateStrategies_1.rateStrategyVolatileOne, + baseLTVAsCollateral: "7000", + liquidationThreshold: "7500", + liquidationBonus: "11000", + liquidationProtocolFee: "1000", + borrowingEnabled: true, + // stableBorrowRateEnabled: true, + flashLoanEnabled: true, + reserveDecimals: "18", + // aTokenImpl: types_1.eContractid.AToken, + reserveFactor: "2000", + supplyCap: "0", + borrowCap: "0", + debtCeiling: "0", + borrowableIsolation: false, +}; + +export const strategyWBTC = { + // strategy: rateStrategies_1.rateStrategyVolatileOne, + baseLTVAsCollateral: "7000", + liquidationThreshold: "7500", + liquidationBonus: "11000", + liquidationProtocolFee: "1000", + borrowingEnabled: true, + // stableBorrowRateEnabled: true, + flashLoanEnabled: true, + reserveDecimals: "8", + // aTokenImpl: types_1.eContractid.AToken, + reserveFactor: "2000", + supplyCap: "0", + borrowCap: "0", + debtCeiling: "0", + borrowableIsolation: false, +}; + +export const strategyUSDT = { + // strategy: rateStrategies_1.rateStrategyStableOne, + baseLTVAsCollateral: "7500", + liquidationThreshold: "8000", + liquidationBonus: "10500", + liquidationProtocolFee: "1000", + borrowingEnabled: true, + // stableBorrowRateEnabled: true, + flashLoanEnabled: true, + reserveDecimals: "6", + // aTokenImpl: types_1.eContractid.AToken, + reserveFactor: "1000", + supplyCap: "0", + borrowCap: "0", + debtCeiling: "1000000", + borrowableIsolation: true, +}; + +export const strategyEURS = { + // strategy: rateStrategies_1.rateStrategyStableOne, + baseLTVAsCollateral: "8000", + liquidationThreshold: "8500", + liquidationBonus: "10500", + liquidationProtocolFee: "1000", + borrowingEnabled: true, + // stableBorrowRateEnabled: true, + flashLoanEnabled: true, + reserveDecimals: "2", + // aTokenImpl: types_1.eContractid.AToken, + reserveFactor: "1000", + supplyCap: "0", + borrowCap: "0", + debtCeiling: "1000000", + borrowableIsolation: false, +}; + +// rate Strategy +export const rateStrategyStableTwo = { + name: "rateStrategyStableTwo", + optimalUsageRatio: "800000000000000000000000000", + baseVariableBorrowRate: "0", + variableRateSlope1: "40000000000000000000000000", + variableRateSlope2: "750000000000000000000000000", + stableRateSlope1: "20000000000000000000000000", + stableRateSlope2: "750000000000000000000000000", + baseStableRateOffset: "20000000000000000000000000", + stableRateExcessOffset: "50000000000000000000000000", + optimalStableToTotalDebtRatio: "200000000000000000000000000", +}; + +export type ReserveData = { + /// stores the reserve configuration + configuration: { data: Number }; + /// the liquidity index. Expressed in ray + liquidity_index: Number; + /// the current supply rate. Expressed in ray + current_liquidity_rate: Number; + /// variable borrow index. Expressed in ray + variable_borrow_index: Number; + /// the current variable borrow rate. Expressed in ray + current_variable_borrow_rate: Number; + /// the current stable borrow rate. Expressed in ray + current_stable_borrow_rate: Number; + /// timestamp of last update (u40 -> u64) + last_update_timestamp: Number; + /// the id of the reserve. Represents the position in the list of the active reserves + id: Number; + /// aToken address + a_token_address: string; + /// stableDebtToken address + stable_debt_token_address: string; + /// variableDebtToken address + variable_debt_token_address: string; + /// address of the interest rate strategy + interest_rate_strategy_address: string; + /// the current treasury balance, scaled + accrued_to_treasury: Number; + /// the outstanding unbacked aTokens minted through the bridging feature + unbacked: Number; + /// the outstanding debt borrowed against this asset in isolation mode + isolation_mode_total_debt: Number; +}; diff --git a/test-suites/configs/supplyBorrow.ts b/test-suites/configs/supplyBorrow.ts index db2309d..6106bdc 100644 --- a/test-suites/configs/supplyBorrow.ts +++ b/test-suites/configs/supplyBorrow.ts @@ -1,15 +1,10 @@ import { Account, MoveFunctionId } from "@aptos-labs/ts-sdk"; -import path from "path"; -import dotenv from "dotenv"; import { AptosProvider } from "../wrappers/aptosProvider"; -const envPath = path.resolve(__dirname, "../../.env"); -dotenv.config({ path: envPath }); - // Resources Admin Account -const aptosProvider = new AptosProvider(); +const aptosProvider = AptosProvider.fromEnvs(); export const SupplyBorrowManager = Account.fromPrivateKey({ - privateKey: aptosProvider.getProfilePrivateKeyByName("aave_pool"), + privateKey: aptosProvider.getProfileAccountPrivateKeyByName("aave_pool"), }); export const SupplyBorrowManagerAccountAddress = SupplyBorrowManager.accountAddress.toString(); diff --git a/test-suites/configs/tokens.ts b/test-suites/configs/tokens.ts index 7eeba66..0d6a062 100644 --- a/test-suites/configs/tokens.ts +++ b/test-suites/configs/tokens.ts @@ -1,37 +1,32 @@ import { Account, AccountAddress, MoveFunctionId } from "@aptos-labs/ts-sdk"; -import path from "path"; -import dotenv from "dotenv"; import { View } from "../helpers/helper"; import { aptos } from "./common"; import { AptosProvider } from "../wrappers/aptosProvider"; -const envPath = path.resolve(__dirname, "../../.env"); -dotenv.config({ path: envPath }); - // Resources Admin Account // Underlying Token -const aptosProvider = new AptosProvider(); +const aptosProvider = AptosProvider.fromEnvs(); export const AaveTokensManager = Account.fromPrivateKey({ - privateKey: aptosProvider.getProfilePrivateKeyByName("aave_pool"), + privateKey: aptosProvider.getProfileAccountPrivateKeyByName("aave_pool"), }); export const AaveTokensManagerAccountAddress = AaveTokensManager.accountAddress.toString(); export const UnderlyingManager = Account.fromPrivateKey({ - privateKey: aptosProvider.getProfilePrivateKeyByName("underlying_tokens"), + privateKey: aptosProvider.getProfileAccountPrivateKeyByName("underlying_tokens"), }); export const UnderlyingManagerAccountAddress = UnderlyingManager.accountAddress.toString(); // A Token export const ATokenManager = Account.fromPrivateKey({ - privateKey: aptosProvider.getProfilePrivateKeyByName("a_tokens"), + privateKey: aptosProvider.getProfileAccountPrivateKeyByName("a_tokens"), }); export const ATokenManagerAccountAddress = ATokenManager.accountAddress.toString(); // Variable Token export const VariableManager = Account.fromPrivateKey({ - privateKey: aptosProvider.getProfilePrivateKeyByName("variable_tokens"), + privateKey: aptosProvider.getProfileAccountPrivateKeyByName("variable_tokens"), }); export const VariableManagerAccountAddress = VariableManager.accountAddress.toString(); @@ -51,7 +46,7 @@ export const UnderlyingTokenAddressFuncAddr: MoveFunctionId = `${AaveTokensManag // A Token export const ATokenCreateTokenFuncAddr: MoveFunctionId = `${AaveTokensManagerAccountAddress}::a_token_factory::create_token`; -export const ATokenGetMetadataBySymbolFuncAddr: MoveFunctionId = `${AaveTokensManagerAccountAddress}::a_token_factory::get_metadata_by_symbol`; +export const ATokenGetMetadataBySymbolFuncAddr: MoveFunctionId = `${AaveTokensManagerAccountAddress}::a_token_factory::asset_metadata`; export const ATokenGetTokenAccountAddressFuncAddr: MoveFunctionId = `${AaveTokensManagerAccountAddress}::a_token_factory::get_token_account_address`; export const ATokenGetReserveTreasuryAddressFuncAddr: MoveFunctionId = `${AaveTokensManagerAccountAddress}::a_token_factory::get_reserve_treasury_address`; export const ATokenGetUnderlyingAssetAddressFuncAddr: MoveFunctionId = `${AaveTokensManagerAccountAddress}::a_token_factory::get_underlying_asset_address`; @@ -69,7 +64,7 @@ export const ATokenAssetMetadataFuncAddr: MoveFunctionId = `${AaveTokensManagerA // Variable Token export const VariableCreateTokenFuncAddr: MoveFunctionId = `${AaveTokensManagerAccountAddress}::variable_debt_token_factory::create_token`; -export const VariableGetMetadataBySymbolFuncAddr: MoveFunctionId = `${AaveTokensManagerAccountAddress}::variable_debt_token_factory::get_metadata_by_symbol`; +export const VariableGetMetadataBySymbolFuncAddr: MoveFunctionId = `${AaveTokensManagerAccountAddress}::variable_debt_token_factory::asset_metadata`; export const VariableGetTokenAddressFuncAddr: MoveFunctionId = `${AaveTokensManagerAccountAddress}::variable_debt_token_factory::token_address`; export const VariableGetAssetMetadataFuncAddr: MoveFunctionId = `${AaveTokensManagerAccountAddress}::variable_debt_token_factory::asset_metadata`; export const VariableGetUnderlyingAddressFuncAddr: MoveFunctionId = `${AaveTokensManagerAccountAddress}::variable_debt_token_factory::get_underlying_asset_address`; diff --git a/test-suites/eslint.config.js b/test-suites/eslint.config.js new file mode 100644 index 0000000..191dcd3 --- /dev/null +++ b/test-suites/eslint.config.js @@ -0,0 +1,33 @@ +// eslint.config.js +const tsdocPlugin = require("eslint-plugin-tsdoc"); +const typescriptEslintPlugin = require("@typescript-eslint/eslint-plugin"); + +module.exports = [ + { + ignores: [ + "build/**/*", + "node_modules/**/*", + ".github", + "bundle.*", + "docs/**/*", + "dist/**/*", + "webpack.config.js", + "documentation/**/*", + "bundle.js", + "eslint.config.js", + "webpack.config.js", + "*.min.js", + "public/*", + "coverage/*", + ], + plugins: { + tsdoc: tsdocPlugin, + "@typescript-eslint": typescriptEslintPlugin, + }, + rules: { + "tsdoc/syntax": "warn", + camelcase: "off", + "@typescript-eslint/no-unused-vars": "error", + }, + }, +]; diff --git a/test-suites/helpers/common.ts b/test-suites/helpers/common.ts index 2dedd3d..be93c01 100644 --- a/test-suites/helpers/common.ts +++ b/test-suites/helpers/common.ts @@ -3,3 +3,10 @@ export const stringToUint8Array = (data: string): Uint8Array => new Uint8Array(B export const stringToHex = (data: string): string => Buffer.from(data).toString("hex"); export const uint8ArrayToString = (data: Uint8Array): string => Buffer.from(data).toString("utf8"); + +export const hexToUint8Array = (hexString: string): Uint8Array => { + if (hexString.startsWith("0x")) { + hexString = hexString.slice(2); + } + return Uint8Array.from(Buffer.from(hexString, "hex")); +}; diff --git a/test-suites/helpers/constants.ts b/test-suites/helpers/constants.ts index 3a9ece9..2b2dba4 100644 --- a/test-suites/helpers/constants.ts +++ b/test-suites/helpers/constants.ts @@ -2,8 +2,8 @@ // MATH // ---------------- -import { BigNumber } from "ethers"; -import { parseUnits } from "ethers/lib/utils"; +import { BigNumber } from "@ethersproject/bignumber"; +import { parseUnits } from "ethers"; export const PERCENTAGE_FACTOR = "10000"; export const HALF_PERCENTAGE = BigNumber.from(PERCENTAGE_FACTOR).div(2).toString(); diff --git a/test-suites/helpers/contractHelper.ts b/test-suites/helpers/contractHelper.ts index 75753c0..dedcea3 100644 --- a/test-suites/helpers/contractHelper.ts +++ b/test-suites/helpers/contractHelper.ts @@ -6,7 +6,7 @@ import { isUserTransactionResponse, MoveValue, } from "@aptos-labs/ts-sdk"; -import { BigNumber } from "ethers"; +import { BigNumber } from "@ethersproject/bignumber"; import { ReserveData, UserReserveData } from "./interfaces"; import { aptos } from "../configs/common"; import { View } from "./helper"; diff --git a/test-suites/helpers/helper.ts b/test-suites/helpers/helper.ts index dde27c6..8d952e3 100644 --- a/test-suites/helpers/helper.ts +++ b/test-suites/helpers/helper.ts @@ -7,7 +7,7 @@ import { SimpleEntryFunctionArgumentTypes, UserTransactionResponse, } from "@aptos-labs/ts-sdk"; -import { BigNumber } from "ethers"; +import { BigNumber } from "@ethersproject/bignumber"; export const GetAccountBalance = async ( aptos: Aptos, diff --git a/test-suites/helpers/priceFeeds.ts b/test-suites/helpers/priceFeeds.ts new file mode 100644 index 0000000..522aefb --- /dev/null +++ b/test-suites/helpers/priceFeeds.ts @@ -0,0 +1,15 @@ +import { AAVE, DAI, USDC, WETH } from "../configs/tokens"; +import { hexToUint8Array } from "./common"; + +export const priceFeeds: Map = new Map(); + +// Chainlink price feeds for testnet +priceFeeds.set("APT", hexToUint8Array("0x011e22d6bf000332000000000000000000000000000000000000000000000000")); +priceFeeds.set(USDC, hexToUint8Array("0x01a80ff216000332000000000000000000000000000000000000000000000000")); +priceFeeds.set("USDT", hexToUint8Array("0x016d06ebb6000332000000000000000000000000000000000000000000000000")); +priceFeeds.set("BTC", hexToUint8Array("0x01a0b4d920000332000000000000000000000000000000000000000000000000")); +priceFeeds.set(WETH, hexToUint8Array("0x01d585327c000332000000000000000000000000000000000000000000000000")); // same as for ETH +priceFeeds.set("LINK", hexToUint8Array("0x0101199b3b000332000000000000000000000000000000000000000000000000")); + +priceFeeds.set(AAVE, hexToUint8Array("0x011e22d6bf000332000000000000000000000000000000000000000000000000")); // same as APT +priceFeeds.set(DAI, hexToUint8Array("0x011e22d6bf000332000000000000000000000000000000000000000000000000")); // same as APT diff --git a/test-suites/package.json b/test-suites/package.json index e85ea36..7c0cc8f 100644 --- a/test-suites/package.json +++ b/test-suites/package.json @@ -1,21 +1,24 @@ { "name": "ts-test", "version": "1.0.0", - "description": "A test suite for the aave V3 protocol", + "description": "Typescript test suite & scripts for the Aave V3 protocol", "main": "dist/index.js", "scripts": { + "audit": "pnpm audit --audit-level=high", "test": "jest", "test:cov": "jest --coverage", - "init-data": "ts-node scripts/initData.ts", - "publish-pool-package": "ts-node scripts/publishLargePackage.ts --module=../aave-core --profile=aave_pool", - "publish-acl-package": "ts-node scripts/publishLargePackage.ts --module=../aave-core/aave-acl --profile=aave_acl", - "core-operations": "ts-node scripts/coreOperations.ts", - "lint": "eslint .", - "lint:fix": "eslint --fix --ext=.js,.jsx,.ts .", + "deploy:init-data": "tsx scripts/initData.ts", + "deploy:core-operations": "tsx scripts/coreOperations.ts", + "check-ts": "tsc", + "lint": "eslint . --no-cache", + "lint:fix": "eslint . --fix --no-cache", "prettier": "prettier --check .", - "prettier:fix": "prettier --write .", - "fmt": "npm run prettier:fix && npm run lint:fix", - "fmt:check": "npm run prettier && npm run lint", + "prettier:fix": "prettier --write \"**/*.@(json|md|sh|toml)\"", + "prettier:validate": "prettier --check \"**/*.@(json|md|sh|toml)\"", + "fmt": "pnpm run prettier:fix && pnpm run lint:fix", + "fmt:check": "pnpm run prettier && pnpm run lint", + "md:lint": "markdownlint -c .markdownlint.json \"**/*.md\" \".github/**/*.md\" -i \"target\" -i \"node_modules\" -i \"CHANGELOG.md\" -i \"aave-core/doc/**/*.md\"", + "md:fix": "pnpm md:lint --fix", "test:standalone": "jest test/aave-oracle.spec.ts test/acl-manager.spec.ts test/rate-strategy.spec.ts pool-drop-reserve.spec.ts pool-get-reserve-address-by-id.spec.ts wadraymath.spec.ts", "test:pool-edge": "jest pool-edge.spec.ts", "test:config-edge": "jest configurator-edge.spec.ts", @@ -29,63 +32,86 @@ "test:liquidation": "jest liquidation.spec.ts", "test:liquidation-underlying": "jest liquidation-underlying.spec.ts", "test:logic": "pnpm test:standalone && pnpm test:pool-edge && pnpm test:config-edge && pnpm test:config && pnpm test:rescue-tokens && pnpm test:supply && pnpm test:withdraw && pnpm test:borrow && pnpm test:repay && pnpm test:repay-atoken && pnpm test:liquidation && pnpm test:liquidation-underlying", - "test:samples": "jest test/aave-oracle.spec.ts test/acl-manager.spec.ts test/atoken-delegation-aware.spec.ts test/atoken-event-accounting.spec.ts test/atoken-events.spec.ts test/atoken-modifiers.spec.ts test/atoken-permit.spec.ts test/configurator.spec.ts test/liquidation-atoken.spec.ts test/liquidation-edge.spec.ts test/liquidation-emode-interest.spec.ts test/liquidation-emode.spec.ts test/liquidation-with-fee.spec.ts test/liquidity-indexes.spec.ts test/ltv-validation.spec.ts test/mint-to-treasury.spec.ts test/pool-drop-reserve.spec.ts test/pool-edge.spec.ts test/pool-get-reserve-address-by-id.spec.ts test/rate-strategy.spec.ts test/supply.spec.ts test/variable-debt-token-events.spec.ts test/variable-debt-token.spec.ts test/wadraymath.spec.ts", - "test:xxx": "jest test/acl-manager.spec.ts" + "test:samples": "jest test/aave-oracle.spec.ts test/acl-manager.spec.ts test/atoken-delegation-aware.spec.ts test/atoken-event-accounting.spec.ts test/atoken-events.spec.ts test/atoken-modifiers.spec.ts test/atoken-permit.spec.ts test/configurator.spec.ts test/liquidation-atoken.spec.ts test/liquidation-edge.spec.ts test/liquidation-emode-interest.spec.ts test/liquidation-emode.spec.ts test/liquidation-with-fee.spec.ts test/liquidity-indexes.spec.ts test/ltv-validation.spec.ts test/mint-to-treasury.spec.ts test/pool-drop-reserve.spec.ts test/pool-edge.spec.ts test/pool-get-reserve-address-by-id.spec.ts test/rate-strategy.spec.ts test/supply.spec.ts test/variable-debt-token-events.spec.ts test/variable-debt-token.spec.ts test/wadraymath.spec.ts" }, "author": "AAVE", "license": "ISC", "dependencies": { "@aptos-labs/aptos-client": "^0.1.0", - "@aptos-labs/ts-sdk": "1.20.0", + "@aptos-labs/ts-sdk": "1.26.0", "@ethersproject/bignumber": "^5.7.0", "bignumber.js": "^9.1.2", - "chalk": "^4.1.0", + "chalk": "^5.3.0", + "ci": "^2.3.0", "dotenv": "^16.4.5", - "ethers": "5.7.2", + "ethers": "6.13.4", "jest-environment-jsdom": "^29.7.0", "ref-array-di": "^1.2.2", "toml": "^3.0.0", - "tslib": "^2.6.2", + "tslib": "^2.6.3", + "tsx": "^4.19.2", "util": "^0.12.5", - "yaml": "^2.4.2" + "yaml": "^2.5.0" }, "devDependencies": { "@aave/deploy-v3": "^1.56.2", - "@aptos-labs/aptos-cli": "^0.1.8", - "@babel/core": "^7.24.6", - "@babel/preset-env": "^7.24.6", - "@babel/preset-typescript": "^7.24.6", + "@aptos-labs/aptos-cli": "^1.0.2", + "@babel/core": "^7.26.0", + "@babel/preset-env": "^7.25.3", + "@babel/preset-typescript": "^7.26.0", "@jest/globals": "^29.7.0", - "@types/bn.js": "^5.1.5", - "@types/jest": "^29.5.12", - "@types/node": "^20.12.12", + "@types/bn.js": "^5.1.6", + "@types/jest": "^29.5.14", + "@types/node": "^22.10.1", "babel-jest": "^29.7.0", - "chalk": "^4.1.0", - "eslint": "^8.34.0", + "chalk": "^5.3.0", + "eslint": "^9.16.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-config-airbnb-typescript": "^18.0.0", "eslint-config-prettier": "^9.1.0", "eslint-config-standard": "^17.1.0", - "eslint-plugin-import": "^2.29.1", - "eslint-plugin-jsdoc": "^48.2.6", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-jsdoc": "^50.6.0", + "eslint-plugin-tsdoc": "^0.4.0", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^6.2.0", + "eslint-plugin-promise": "^7.2.1", "jest": "^29.7.0", - "jsdom": "^24.1.0", - "node-ts": "^6.0.1", - "npm-run-all": "4.1.5", - "ora": "^8.0.1", - "prettier": "^3.2.5", + "node-ts": "^6.1.3", + "ora": "^8.1.1", + "prettier": "^3.4.1", "prettier-eslint": "^16.3.0", "prettier-standard": "^16.4.1", - "rimraf": "^5.0.7", - "tree-kill": "^1.2.2", - "ts-jest": "^29.1.3", + "rimraf": "^6.0.1", + "ts-jest": "^29.2.5", "ts-loader": "^9.5.1", - "ts-node": "^10.9.1", - "typescript": "^5.4.5", - "typescript-eslint": "^7.11.0", - "webpack": "^5.91.0", + "typescript": "^5.7.2", + "typescript-eslint": "^8.16.0", + "webpack": "^5.96.1", "webpack-cli": "^5.1.4" + }, + "pnpm": { + "overrides": { + "trim@<0.0.3": ">=0.0.3", + "postcss@<7.0.36": ">=7.0.36", + "postcss@<8.4.31": ">=8.4.31", + "minimatch@<3.0.5": ">=3.0.5", + "minimist@>=1.0.0 <1.2.6": ">=1.2.6", + "braces@<3.0.3": ">=3.0.3", + "ws@>=8.0.0 <8.17.1": ">=8.17.1", + "ws@>=7.0.0 <7.5.10": ">=7.5.10", + "semver@>=6.0.0 <6.3.1": ">=6.3.1", + "axios@>=1.3.2 <=1.7.3": ">=1.7.4", + "elliptic@>=4.0.0 <=6.5.6": ">=6.5.7", + "elliptic@>=2.0.0 <=6.5.6": ">=6.5.7", + "elliptic@>=5.2.1 <=6.5.6": ">=6.5.7", + "micromatch@<4.0.8": ">=4.0.8", + "webpack@>=5.0.0-alpha.0 <5.94.0": ">=5.94.0", + "cookie@<0.7.0": ">=0.7.0", + "elliptic@<6.5.6": ">=6.5.6", + "secp256k1@>=4.0.0 <4.0.4": ">=4.0.4", + "elliptic@<6.6.0": ">=6.6.0", + "cross-spawn@<6.0.6": ">=6.0.6", + "cross-spawn@>=7.0.0 <7.0.5": ">=7.0.5" + } } -} \ No newline at end of file +} diff --git a/test-suites/pnpm-lock.yaml b/test-suites/pnpm-lock.yaml index bb99ae3..81645a6 100644 --- a/test-suites/pnpm-lock.yaml +++ b/test-suites/pnpm-lock.yaml @@ -4,16 +4,39 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +overrides: + trim@<0.0.3: '>=0.0.3' + postcss@<7.0.36: '>=7.0.36' + postcss@<8.4.31: '>=8.4.31' + minimatch@<3.0.5: '>=3.0.5' + minimist@>=1.0.0 <1.2.6: '>=1.2.6' + braces@<3.0.3: '>=3.0.3' + ws@>=8.0.0 <8.17.1: '>=8.17.1' + ws@>=7.0.0 <7.5.10: '>=7.5.10' + semver@>=6.0.0 <6.3.1: '>=6.3.1' + axios@>=1.3.2 <=1.7.3: '>=1.7.4' + elliptic@>=4.0.0 <=6.5.6: '>=6.5.7' + elliptic@>=2.0.0 <=6.5.6: '>=6.5.7' + elliptic@>=5.2.1 <=6.5.6: '>=6.5.7' + micromatch@<4.0.8: '>=4.0.8' + webpack@>=5.0.0-alpha.0 <5.94.0: '>=5.94.0' + cookie@<0.7.0: '>=0.7.0' + elliptic@<6.5.6: '>=6.5.6' + secp256k1@>=4.0.0 <4.0.4: '>=4.0.4' + elliptic@<6.6.0: '>=6.6.0' + cross-spawn@<6.0.6: '>=6.0.6' + cross-spawn@>=7.0.0 <7.0.5: '>=7.0.5' + importers: .: dependencies: '@aptos-labs/aptos-client': specifier: ^0.1.0 - version: 0.1.0 + version: 0.1.1 '@aptos-labs/ts-sdk': - specifier: 1.20.0 - version: 1.20.0 + specifier: 1.26.0 + version: 1.26.0 '@ethersproject/bignumber': specifier: ^5.7.0 version: 5.7.0 @@ -21,14 +44,17 @@ importers: specifier: ^9.1.2 version: 9.1.2 chalk: - specifier: ^4.1.0 - version: 4.1.2 + specifier: ^5.3.0 + version: 5.3.0 + ci: + specifier: ^2.3.0 + version: 2.3.0 dotenv: specifier: ^16.4.5 version: 16.4.5 ethers: - specifier: 5.7.2 - version: 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: 6.13.4 + version: 6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) jest-environment-jsdom: specifier: ^29.7.0 version: 29.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -39,123 +65,117 @@ importers: specifier: ^3.0.0 version: 3.0.0 tslib: - specifier: ^2.6.2 - version: 2.6.2 + specifier: ^2.6.3 + version: 2.8.1 + tsx: + specifier: ^4.19.2 + version: 4.19.2 util: specifier: ^0.12.5 version: 0.12.5 yaml: - specifier: ^2.4.2 - version: 2.4.2 + specifier: ^2.5.0 + version: 2.6.1 devDependencies: '@aave/deploy-v3': specifier: ^1.56.2 - version: 1.56.2(@aave/core-v3@1.19.3)(@aave/periphery-v3@2.5.2)(@ethersproject/abstract-provider@5.7.0)(@ethersproject/abstract-signer@5.7.0)(@ethersproject/hash@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@ethersproject/transactions@5.7.0)(hardhat@2.22.3(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5))(typescript@5.4.5)(utf-8-validate@5.0.10))(web3-core-helpers@1.10.4)(web3-core@1.10.4) + version: 1.56.2(@aave/core-v3@1.19.3)(@aave/periphery-v3@2.5.2)(@ethersproject/abstract-provider@5.7.0)(@ethersproject/abstract-signer@5.7.0)(@ethersproject/hash@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@ethersproject/transactions@5.7.0)(hardhat@2.22.16(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))(web3-core-helpers@1.10.3)(web3-core@1.10.4) '@aptos-labs/aptos-cli': - specifier: ^0.1.8 - version: 0.1.8 + specifier: ^1.0.2 + version: 1.0.2 '@babel/core': - specifier: ^7.24.6 - version: 7.24.6 + specifier: ^7.26.0 + version: 7.26.0 '@babel/preset-env': - specifier: ^7.24.6 - version: 7.24.6(@babel/core@7.24.6) + specifier: ^7.25.3 + version: 7.26.0(@babel/core@7.26.0) '@babel/preset-typescript': - specifier: ^7.24.6 - version: 7.24.6(@babel/core@7.24.6) + specifier: ^7.26.0 + version: 7.26.0(@babel/core@7.26.0) '@jest/globals': specifier: ^29.7.0 version: 29.7.0 '@types/bn.js': - specifier: ^5.1.5 - version: 5.1.5 + specifier: ^5.1.6 + version: 5.1.6 '@types/jest': - specifier: ^29.5.12 - version: 29.5.12 + specifier: ^29.5.14 + version: 29.5.14 '@types/node': - specifier: ^20.12.12 - version: 20.12.12 + specifier: ^22.10.1 + version: 22.10.1 babel-jest: specifier: ^29.7.0 - version: 29.7.0(@babel/core@7.24.6) + version: 29.7.0(@babel/core@7.26.0) eslint: - specifier: ^8.34.0 - version: 8.57.0 + specifier: ^9.16.0 + version: 9.16.0 eslint-config-airbnb-base: specifier: ^15.0.0 - version: 15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0) + version: 15.0.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0))(eslint@9.16.0) eslint-config-airbnb-typescript: specifier: ^18.0.0 - version: 18.0.0(@typescript-eslint/eslint-plugin@7.11.0(@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0) + version: 18.0.0(@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2))(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0))(eslint@9.16.0) eslint-config-prettier: specifier: ^9.1.0 - version: 9.1.0(eslint@8.57.0) + version: 9.1.0(eslint@9.16.0) eslint-config-standard: specifier: ^17.1.0 - version: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@6.2.0(eslint@8.57.0))(eslint@8.57.0) + version: 17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0))(eslint-plugin-n@16.6.2(eslint@9.16.0))(eslint-plugin-promise@7.2.1(eslint@9.16.0))(eslint@9.16.0) eslint-plugin-import: - specifier: ^2.29.1 - version: 2.29.1(@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0) + specifier: ^2.31.0 + version: 2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0) eslint-plugin-jsdoc: - specifier: ^48.2.6 - version: 48.2.6(eslint@8.57.0) + specifier: ^50.6.0 + version: 50.6.0(eslint@9.16.0) eslint-plugin-node: specifier: ^11.1.0 - version: 11.1.0(eslint@8.57.0) + version: 11.1.0(eslint@9.16.0) eslint-plugin-promise: - specifier: ^6.2.0 - version: 6.2.0(eslint@8.57.0) + specifier: ^7.2.1 + version: 7.2.1(eslint@9.16.0) + eslint-plugin-tsdoc: + specifier: ^0.4.0 + version: 0.4.0 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@20.12.12)(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5)) - jsdom: - specifier: ^24.1.0 - version: 24.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + version: 29.7.0(@types/node@22.10.1) node-ts: - specifier: ^6.0.1 - version: 6.0.1 - npm-run-all: - specifier: 4.1.5 - version: 4.1.5 + specifier: ^6.1.3 + version: 6.1.3 ora: - specifier: ^8.0.1 - version: 8.0.1 + specifier: ^8.1.1 + version: 8.1.1 prettier: - specifier: ^3.2.5 - version: 3.2.5 + specifier: ^3.4.1 + version: 3.4.1 prettier-eslint: specifier: ^16.3.0 version: 16.3.0 prettier-standard: specifier: ^16.4.1 - version: 16.4.1(typescript@5.4.5) + version: 16.4.1(typescript@5.7.2) rimraf: - specifier: ^5.0.7 - version: 5.0.7 - tree-kill: - specifier: ^1.2.2 - version: 1.2.2 + specifier: ^6.0.1 + version: 6.0.1 ts-jest: - specifier: ^29.1.3 - version: 29.1.3(@babel/core@7.24.6)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.6))(jest@29.7.0(@types/node@20.12.12)(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5)))(typescript@5.4.5) + specifier: ^29.2.5 + version: 29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@22.10.1))(typescript@5.7.2) ts-loader: specifier: ^9.5.1 - version: 9.5.1(typescript@5.4.5)(webpack@5.91.0(webpack-cli@5.1.4)) - ts-node: - specifier: ^10.9.1 - version: 10.9.2(@types/node@20.12.12)(typescript@5.4.5) + version: 9.5.1(typescript@5.7.2)(webpack@5.96.1) typescript: - specifier: ^5.4.5 - version: 5.4.5 + specifier: ^5.7.2 + version: 5.7.2 typescript-eslint: - specifier: ^7.11.0 - version: 7.11.0(eslint@8.57.0)(typescript@5.4.5) + specifier: ^8.16.0 + version: 8.16.0(eslint@9.16.0)(typescript@5.7.2) webpack: - specifier: ^5.91.0 - version: 5.91.0(webpack-cli@5.1.4) + specifier: ^5.96.1 + version: 5.96.1(webpack-cli@5.1.4) webpack-cli: specifier: ^5.1.4 - version: 5.1.4(webpack@5.91.0) + version: 5.1.4(webpack@5.96.1) packages: @@ -174,6 +194,9 @@ packages: '@aave/periphery-v3@2.5.2': resolution: {integrity: sha512-Csqqi5gIxdzUMoOqtYpAzm9KTJ1aIK19RS49U9F/pLAE60bRth3Az/yANWiVS+WtlUTT/aAu5hjL7h5smmiXfg==} + '@adraffy/ens-normalize@1.10.1': + resolution: {integrity: sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==} + '@ampproject/remapping@2.3.0': resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} @@ -181,16 +204,20 @@ packages: '@angular/compiler@8.2.14': resolution: {integrity: sha512-ABZO4E7eeFA1QyJ2trDezxeQM5ZFa1dXw1Mpl/+1vuXDKNjJgNyWYwKp/NwRkLmrsuV0yv4UDCDe4kJOGbPKnw==} - '@aptos-labs/aptos-cli@0.1.8': - resolution: {integrity: sha512-xSWDchqoDR4aR74xNoJZgOzIFtn+EKFGGFLG0vOb+6Ce8Jgg1Ui0Pqhvwbx6Z36dDxfKv0F4M7bnurvWpwAjXA==} + '@aptos-labs/aptos-cli@0.1.9': + resolution: {integrity: sha512-76uPNZ6JrpruN9H8bEU37GVhAHwdhmvp7ZXpMTFnlFOJnBYt0LHCxR3x+HCk4WZ1CRrPQ57lmO+5A58PiGuweA==} + hasBin: true + + '@aptos-labs/aptos-cli@1.0.2': + resolution: {integrity: sha512-PYPsd0Kk3ynkxNfe3S4fanI3DiUICCoh4ibQderbvjPFL5A0oK6F4lPEO2t0MDsQySTk2t4vh99Xjy6Bd9y+aQ==} hasBin: true - '@aptos-labs/aptos-client@0.1.0': - resolution: {integrity: sha512-q3s6pPq8H2buGp+tPuIRInWsYOuhSEwuNJPwd2YnsiID3YSLihn2ug39ktDJAcSOprUcp7Nid8WK7hKqnUmSdA==} + '@aptos-labs/aptos-client@0.1.1': + resolution: {integrity: sha512-kJsoy4fAPTOhzVr7Vwq8s/AUg6BQiJDa7WOqRzev4zsuIS3+JCuIZ6vUd7UBsjnxtmguJJulMRs9qWCzVBt2XA==} engines: {node: '>=15.10.0'} - '@aptos-labs/ts-sdk@1.20.0': - resolution: {integrity: sha512-JUrajux9nIXGhbWrB6UbiZebZsopCmD+V1v7+rGs2uK9td/LgZjPfty1UhTdP54zgBgji0RwrJJIi9NW7xnxQA==} + '@aptos-labs/ts-sdk@1.26.0': + resolution: {integrity: sha512-zScAiEuvADE9PsxgpqR7JAZOMdbTyl5AvgbsGGn56Mc8moa8Y7nyyPDxs83HQnqmZ0V/mghLVAaJ1pa7N+V3IQ==} engines: {node: '>=11.0.0'} '@aws-crypto/sha256-js@1.2.2': @@ -199,184 +226,129 @@ packages: '@aws-crypto/util@1.2.2': resolution: {integrity: sha512-H8PjG5WJ4wz0UXAFXeJjWCW1vkvIJ3qUUD+rGRwJ2/hj+xT58Qle2MTql/2MGzkU+1JLAFuR6aJpLAjHwhmwwg==} - '@aws-sdk/types@3.567.0': - resolution: {integrity: sha512-JBznu45cdgQb8+T/Zab7WpBmfEAh77gsk99xuF4biIb2Sw1mdseONdoGDjEJX57a25TzIv/WUJ2oABWumckz1A==} + '@aws-sdk/types@3.696.0': + resolution: {integrity: sha512-9rTvUJIAj5d3//U5FDPWGJ1nFJLuWb30vugGOrWk7aNZ6y9tuA3PI7Cc9dP8WEXKVyK1vuuk8rSFP2iqXnlgrw==} engines: {node: '>=16.0.0'} '@aws-sdk/util-utf8-browser@3.259.0': resolution: {integrity: sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==} - '@babel/code-frame@7.24.2': - resolution: {integrity: sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==} - engines: {node: '>=6.9.0'} - - '@babel/code-frame@7.24.6': - resolution: {integrity: sha512-ZJhac6FkEd1yhG2AHOmfcXG4ceoLltoCVJjN5XsWN9BifBQr+cHJbWi0h68HZuSORq+3WtJ2z0hwF2NG1b5kcA==} + '@babel/code-frame@7.26.2': + resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} engines: {node: '>=6.9.0'} '@babel/code-frame@7.8.3': resolution: {integrity: sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==} - '@babel/compat-data@7.24.6': - resolution: {integrity: sha512-aC2DGhBq5eEdyXWqrDInSqQjO0k8xtPRf5YylULqx8MCd6jBtzqfta/3ETMRpuKIc5hyswfO80ObyA1MvkCcUQ==} - engines: {node: '>=6.9.0'} - - '@babel/core@7.24.6': - resolution: {integrity: sha512-qAHSfAdVyFmIvl0VHELib8xar7ONuSHrE2hLnsaWkYNTI68dmi1x8GYDhJjMI/e7XWal9QBlZkwbOnkcw7Z8gQ==} - engines: {node: '>=6.9.0'} - - '@babel/generator@7.24.5': - resolution: {integrity: sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA==} - engines: {node: '>=6.9.0'} - - '@babel/generator@7.24.6': - resolution: {integrity: sha512-S7m4eNa6YAPJRHmKsLHIDJhNAGNKoWNiWefz1MBbpnt8g9lvMDl1hir4P9bo/57bQEmuwEhnRU/AMWsD0G/Fbg==} + '@babel/compat-data@7.26.2': + resolution: {integrity: sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg==} engines: {node: '>=6.9.0'} - '@babel/helper-annotate-as-pure@7.22.5': - resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==} + '@babel/core@7.26.0': + resolution: {integrity: sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==} engines: {node: '>=6.9.0'} - '@babel/helper-annotate-as-pure@7.24.6': - resolution: {integrity: sha512-DitEzDfOMnd13kZnDqns1ccmftwJTS9DMkyn9pYTxulS7bZxUxpMly3Nf23QQ6NwA4UB8lAqjbqWtyvElEMAkg==} + '@babel/generator@7.26.2': + resolution: {integrity: sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==} engines: {node: '>=6.9.0'} - '@babel/helper-builder-binary-assignment-operator-visitor@7.24.6': - resolution: {integrity: sha512-+wnfqc5uHiMYtvRX7qu80Toef8BXeh4HHR1SPeonGb1SKPniNEd4a/nlaJJMv/OIEYvIVavvo0yR7u10Gqz0Iw==} + '@babel/helper-annotate-as-pure@7.25.9': + resolution: {integrity: sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==} engines: {node: '>=6.9.0'} - '@babel/helper-compilation-targets@7.24.6': - resolution: {integrity: sha512-VZQ57UsDGlX/5fFA7GkVPplZhHsVc+vuErWgdOiysI9Ksnw0Pbbd6pnPiR/mmJyKHgyIW0c7KT32gmhiF+cirg==} + '@babel/helper-builder-binary-assignment-operator-visitor@7.25.9': + resolution: {integrity: sha512-C47lC7LIDCnz0h4vai/tpNOI95tCd5ZT3iBt/DBH5lXKHZsyNQv18yf1wIIg2ntiQNgmAvA+DgZ82iW8Qdym8g==} engines: {node: '>=6.9.0'} - '@babel/helper-create-class-features-plugin@7.24.6': - resolution: {integrity: sha512-djsosdPJVZE6Vsw3kk7IPRWethP94WHGOhQTc67SNXE0ZzMhHgALw8iGmYS0TD1bbMM0VDROy43od7/hN6WYcA==} + '@babel/helper-compilation-targets@7.25.9': + resolution: {integrity: sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - '@babel/helper-create-regexp-features-plugin@7.22.15': - resolution: {integrity: sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w==} + '@babel/helper-create-class-features-plugin@7.25.9': + resolution: {integrity: sha512-UTZQMvt0d/rSz6KI+qdu7GQze5TIajwTS++GUozlw8VBJDEOAqSXwm1WvmYEZwqdqSGQshRocPDqrt4HBZB3fQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-create-regexp-features-plugin@7.24.6': - resolution: {integrity: sha512-C875lFBIWWwyv6MHZUG9HmRrlTDgOsLWZfYR0nW69gaKJNe0/Mpxx5r0EID2ZdHQkdUmQo2t0uNckTL08/1BgA==} + '@babel/helper-create-regexp-features-plugin@7.25.9': + resolution: {integrity: sha512-ORPNZ3h6ZRkOyAa/SaHU+XsLZr0UQzRwuDQ0cczIA17nAzZ+85G5cVkOJIj7QavLZGSe8QXUmNFxSZzjcZF9bw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-define-polyfill-provider@0.6.2': - resolution: {integrity: sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ==} + '@babel/helper-define-polyfill-provider@0.6.3': + resolution: {integrity: sha512-HK7Bi+Hj6H+VTHA3ZvBis7V/6hu9QuTrnMXNybfUf2iiuU/N97I8VjB+KbhFF8Rld/Lx5MzoCwPCpPjfK+n8Cg==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - '@babel/helper-environment-visitor@7.24.6': - resolution: {integrity: sha512-Y50Cg3k0LKLMjxdPjIl40SdJgMB85iXn27Vk/qbHZCFx/o5XO3PSnpi675h1KEmmDb6OFArfd5SCQEQ5Q4H88g==} - engines: {node: '>=6.9.0'} - - '@babel/helper-function-name@7.24.6': - resolution: {integrity: sha512-xpeLqeeRkbxhnYimfr2PC+iA0Q7ljX/d1eZ9/inYbmfG2jpl8Lu3DyXvpOAnrS5kxkfOWJjioIMQsaMBXFI05w==} - engines: {node: '>=6.9.0'} - - '@babel/helper-hoist-variables@7.24.6': - resolution: {integrity: sha512-SF/EMrC3OD7dSta1bLJIlrsVxwtd0UpjRJqLno6125epQMJ/kyFmpTT4pbvPbdQHzCHg+biQ7Syo8lnDtbR+uA==} - engines: {node: '>=6.9.0'} - - '@babel/helper-member-expression-to-functions@7.24.6': - resolution: {integrity: sha512-OTsCufZTxDUsv2/eDXanw/mUZHWOxSbEmC3pP8cgjcy5rgeVPWWMStnv274DV60JtHxTk0adT0QrCzC4M9NWGg==} + '@babel/helper-member-expression-to-functions@7.25.9': + resolution: {integrity: sha512-wbfdZ9w5vk0C0oyHqAJbc62+vet5prjj01jjJ8sKn3j9h3MQQlflEdXYvuqRWjHnM12coDEqiC1IRCi0U/EKwQ==} engines: {node: '>=6.9.0'} - '@babel/helper-module-imports@7.24.6': - resolution: {integrity: sha512-a26dmxFJBF62rRO9mmpgrfTLsAuyHk4e1hKTUkD/fcMfynt8gvEKwQPQDVxWhca8dHoDck+55DFt42zV0QMw5g==} + '@babel/helper-module-imports@7.25.9': + resolution: {integrity: sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==} engines: {node: '>=6.9.0'} - '@babel/helper-module-transforms@7.24.6': - resolution: {integrity: sha512-Y/YMPm83mV2HJTbX1Qh2sjgjqcacvOlhbzdCCsSlblOKjSYmQqEbO6rUniWQyRo9ncyfjT8hnUjlG06RXDEmcA==} + '@babel/helper-module-transforms@7.26.0': + resolution: {integrity: sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-optimise-call-expression@7.24.6': - resolution: {integrity: sha512-3SFDJRbx7KuPRl8XDUr8O7GAEB8iGyWPjLKJh/ywP/Iy9WOmEfMrsWbaZpvBu2HSYn4KQygIsz0O7m8y10ncMA==} - engines: {node: '>=6.9.0'} - - '@babel/helper-plugin-utils@7.24.5': - resolution: {integrity: sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ==} + '@babel/helper-optimise-call-expression@7.25.9': + resolution: {integrity: sha512-FIpuNaz5ow8VyrYcnXQTDRGvV6tTjkNtCK/RYNDXGSLlUD6cBuQTSw43CShGxjvfBTfcUA/r6UhUCbtYqkhcuQ==} engines: {node: '>=6.9.0'} - '@babel/helper-plugin-utils@7.24.6': - resolution: {integrity: sha512-MZG/JcWfxybKwsA9N9PmtF2lOSFSEMVCpIRrbxccZFLJPrJciJdG/UhSh5W96GEteJI2ARqm5UAHxISwRDLSNg==} + '@babel/helper-plugin-utils@7.25.9': + resolution: {integrity: sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==} engines: {node: '>=6.9.0'} - '@babel/helper-remap-async-to-generator@7.24.6': - resolution: {integrity: sha512-1Qursq9ArRZPAMOZf/nuzVW8HgJLkTB9y9LfP4lW2MVp4e9WkLJDovfKBxoDcCk6VuzIxyqWHyBoaCtSRP10yg==} + '@babel/helper-remap-async-to-generator@7.25.9': + resolution: {integrity: sha512-IZtukuUeBbhgOcaW2s06OXTzVNJR0ybm4W5xC1opWFFJMZbwRj5LCk+ByYH7WdZPZTt8KnFwA8pvjN2yqcPlgw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-replace-supers@7.24.6': - resolution: {integrity: sha512-mRhfPwDqDpba8o1F8ESxsEkJMQkUF8ZIWrAc0FtWhxnjfextxMWxr22RtFizxxSYLjVHDeMgVsRq8BBZR2ikJQ==} + '@babel/helper-replace-supers@7.25.9': + resolution: {integrity: sha512-IiDqTOTBQy0sWyeXyGSC5TBJpGFXBkRynjBeXsvbhQFKj2viwJC76Epz35YLU1fpe/Am6Vppb7W7zM4fPQzLsQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-simple-access@7.24.6': - resolution: {integrity: sha512-nZzcMMD4ZhmB35MOOzQuiGO5RzL6tJbsT37Zx8M5L/i9KSrukGXWTjLe1knIbb/RmxoJE9GON9soq0c0VEMM5g==} - engines: {node: '>=6.9.0'} - - '@babel/helper-skip-transparent-expression-wrappers@7.24.6': - resolution: {integrity: sha512-jhbbkK3IUKc4T43WadP96a27oYti9gEf1LdyGSP2rHGH77kwLwfhO7TgwnWvxxQVmke0ImmCSS47vcuxEMGD3Q==} - engines: {node: '>=6.9.0'} - - '@babel/helper-split-export-declaration@7.24.6': - resolution: {integrity: sha512-CvLSkwXGWnYlF9+J3iZUvwgAxKiYzK3BWuo+mLzD/MDGOZDj7Gq8+hqaOkMxmJwmlv0iu86uH5fdADd9Hxkymw==} - engines: {node: '>=6.9.0'} - - '@babel/helper-string-parser@7.24.1': - resolution: {integrity: sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==} - engines: {node: '>=6.9.0'} - - '@babel/helper-string-parser@7.24.6': - resolution: {integrity: sha512-WdJjwMEkmBicq5T9fm/cHND3+UlFa2Yj8ALLgmoSQAJZysYbBjw+azChSGPN4DSPLXOcooGRvDwZWMcF/mLO2Q==} + '@babel/helper-simple-access@7.25.9': + resolution: {integrity: sha512-c6WHXuiaRsJTyHYLJV75t9IqsmTbItYfdj99PnzYGQZkYKvan5/2jKJ7gu31J3/BJ/A18grImSPModuyG/Eo0Q==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.24.5': - resolution: {integrity: sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==} + '@babel/helper-skip-transparent-expression-wrappers@7.25.9': + resolution: {integrity: sha512-K4Du3BFa3gvyhzgPcntrkDgZzQaq6uozzcpGbOO1OEJaI+EJdqWIMTLgFgQf6lrfiDFo5FU+BxKepI9RmZqahA==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.24.6': - resolution: {integrity: sha512-4yA7s865JHaqUdRbnaxarZREuPTHrjpDT+pXoAZ1yhyo6uFnIEpS8VMu16siFOHDpZNKYv5BObhsB//ycbICyw==} + '@babel/helper-string-parser@7.25.9': + resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-option@7.24.6': - resolution: {integrity: sha512-Jktc8KkF3zIkePb48QO+IapbXlSapOW9S+ogZZkcO6bABgYAxtZcjZ/O005111YLf+j4M84uEgwYoidDkXbCkQ==} + '@babel/helper-validator-identifier@7.25.9': + resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} engines: {node: '>=6.9.0'} - '@babel/helper-wrap-function@7.24.6': - resolution: {integrity: sha512-f1JLrlw/jbiNfxvdrfBgio/gRBk3yTAEJWirpAkiJG2Hb22E7cEYKHWo0dFPTv/niPovzIdPdEDetrv6tC6gPQ==} + '@babel/helper-validator-option@7.25.9': + resolution: {integrity: sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==} engines: {node: '>=6.9.0'} - '@babel/helpers@7.24.6': - resolution: {integrity: sha512-V2PI+NqnyFu1i0GyTd/O/cTpxzQCYioSkUIRmgo7gFEHKKCg5w46+r/A6WeUR1+P3TeQ49dspGPNd/E3n9AnnA==} + '@babel/helper-wrap-function@7.25.9': + resolution: {integrity: sha512-ETzz9UTjQSTmw39GboatdymDq4XIQbR8ySgVrylRhPOFpsd+JrKHIuF0de7GCWmem+T4uC5z7EZguod7Wj4A4g==} engines: {node: '>=6.9.0'} - '@babel/highlight@7.24.5': - resolution: {integrity: sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==} + '@babel/helpers@7.26.0': + resolution: {integrity: sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==} engines: {node: '>=6.9.0'} - '@babel/highlight@7.24.6': - resolution: {integrity: sha512-2YnuOp4HAk2BsBrJJvYCbItHx0zWscI1C3zgWkz+wDyD9I7GIVrfnLyrR4Y1VR+7p+chAEcrgRQYZAGIKMV7vQ==} + '@babel/highlight@7.25.9': + resolution: {integrity: sha512-llL88JShoCsth8fF8R4SJnIn+WLvR6ccFxu1H3FlMhDontdcmZWf2HgIZ7AIqV3Xcck1idlohrN4EUBQz6klbw==} engines: {node: '>=6.9.0'} - '@babel/parser@7.24.5': - resolution: {integrity: sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==} - engines: {node: '>=6.0.0'} - hasBin: true - - '@babel/parser@7.24.6': - resolution: {integrity: sha512-eNZXdfU35nJC2h24RznROuOpO94h6x8sg9ju0tT9biNtLZ2vuP8SduLqqV+/8+cebSLV9SJEAN5Z3zQbJG/M+Q==} + '@babel/parser@7.26.2': + resolution: {integrity: sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==} engines: {node: '>=6.0.0'} hasBin: true @@ -385,26 +357,32 @@ packages: engines: {node: '>=6.0.0'} hasBin: true - '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.24.6': - resolution: {integrity: sha512-bYndrJ6Ph6Ar+GaB5VAc0JPoP80bQCm4qon6JEzXfRl5QZyQ8Ur1K6k7htxWmPA5z+k7JQvaMUrtXlqclWYzKw==} + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.9': + resolution: {integrity: sha512-ZkRyVkThtxQ/J6nv3JFYv1RYY+JT5BvU0y3k5bWrmuG4woXypRa4PXmm9RhOwodRkYFWqC0C0cqcJ4OqR7kW+g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.24.6': - resolution: {integrity: sha512-iVuhb6poq5ikqRq2XWU6OQ+R5o9wF+r/or9CeUyovgptz0UlnK4/seOQ1Istu/XybYjAhQv1FRSSfHHufIku5Q==} + '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.9': + resolution: {integrity: sha512-MrGRLZxLD/Zjj0gdU15dfs+HH/OXvnw/U4jJD8vpcP2CJQapPEv1IWwjc/qMg7ItBlPwSv1hRBbb7LeuANdcnw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.24.6': - resolution: {integrity: sha512-c8TER5xMDYzzFcGqOEp9l4hvB7dcbhcGjcLVwxWfe4P5DOafdwjsBJZKsmv+o3aXh7NhopvayQIovHrh2zSRUQ==} + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.9': + resolution: {integrity: sha512-2qUwwfAFpJLZqxd02YW9btUCZHl+RFvdDkNfZwaIJrvB8Tesjsk8pEQkTvGwZXLqXUx/2oyY3ySRhm6HOXuCug==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.25.9': + resolution: {integrity: sha512-6xWgLZTJXwilVjlnV7ospI3xi+sl8lN8rXXbBD6vYn3UYDlGsag8wrZkKcSI8G6KgqKP7vNFaDgeDnfAABq61g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.13.0 - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.24.6': - resolution: {integrity: sha512-z8zEjYmwBUHN/pCF3NuWBhHQjJCrd33qAi8MgANfMrAvn72k2cImT8VjK9LJFu4ysOLJqhfkYYb3MvwANRUNZQ==} + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.9': + resolution: {integrity: sha512-aLnMXYPnzwwqhYSCyXfKkIkYgJ8zv9RK+roo9DkTXz38ynIhd9XCbN08s3MGvqL2MYGVUGdRQLL/JqBIeJhJBg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -436,24 +414,14 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-dynamic-import@7.8.3': - resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-export-namespace-from@7.8.3': - resolution: {integrity: sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-import-assertions@7.24.6': - resolution: {integrity: sha512-BE6o2BogJKJImTmGpkmOic4V0hlRRxVtzqxiSPa8TIFxyhi4EFjHm08nq1M4STK4RytuLMgnSz0/wfflvGFNOg==} + '@babel/plugin-syntax-import-assertions@7.26.0': + resolution: {integrity: sha512-QCWT5Hh830hK5EQa7XzuqIkQU9tT/whqbDz7kuaZMHFl1inRRg7JnuAEOQ0Ur0QUl0NufCk1msK2BeY79Aj/eg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-import-attributes@7.24.6': - resolution: {integrity: sha512-D+CfsVZousPXIdudSII7RGy52+dYRtbyKAZcvtQKq/NpsivyMVduepzcLqG5pMBugtMdedxdC8Ramdpcne9ZWQ==} + '@babel/plugin-syntax-import-attributes@7.26.0': + resolution: {integrity: sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -468,14 +436,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-jsx@7.24.1': - resolution: {integrity: sha512-2eCtxZXf+kbkMIsXS4poTvT4Yu5rXiRa+9xGVT56raghjmBTKMpFNc9R4IDiB4emao9eO22Ox7CxuJG7BgExqA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-jsx@7.24.6': - resolution: {integrity: sha512-lWfvAIFNWMlCsU0DRUun2GpFwZdGTukLaHJqRh1JRb80NdAP5Sb1HDHB5X9P9OtgZHQl089UzQkpYlBq2VTPRw==} + '@babel/plugin-syntax-jsx@7.25.9': + resolution: {integrity: sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -522,14 +484,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-typescript@7.24.1': - resolution: {integrity: sha512-Yhnmvy5HZEnHUty6i++gcfH1/l68AHnItFHnaCv6hn9dNh0hQvvQJsxpi4BMBFN5DLeHBuucT/0DgzXif/OyRw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-typescript@7.24.6': - resolution: {integrity: sha512-TzCtxGgVTEJWWwcYwQhCIQ6WaKlo80/B+Onsk4RRCcYqpYGFcG9etPW94VToGte5AAcxRrhjPUFvUS3Y2qKi4A==} + '@babel/plugin-syntax-typescript@7.25.9': + resolution: {integrity: sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -540,302 +496,314 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-transform-arrow-functions@7.24.6': - resolution: {integrity: sha512-jSSSDt4ZidNMggcLx8SaKsbGNEfIl0PHx/4mFEulorE7bpYLbN0d3pDW3eJ7Y5Z3yPhy3L3NaPCYyTUY7TuugQ==} + '@babel/plugin-transform-arrow-functions@7.25.9': + resolution: {integrity: sha512-6jmooXYIwn9ca5/RylZADJ+EnSxVUS5sjeJ9UPk6RWRzXCmOJCy6dqItPJFpw2cuCangPK4OYr5uhGKcmrm5Qg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-async-generator-functions@7.24.6': - resolution: {integrity: sha512-VEP2o4iR2DqQU6KPgizTW2mnMx6BG5b5O9iQdrW9HesLkv8GIA8x2daXBQxw1MrsIkFQGA/iJ204CKoQ8UcnAA==} + '@babel/plugin-transform-async-generator-functions@7.25.9': + resolution: {integrity: sha512-RXV6QAzTBbhDMO9fWwOmwwTuYaiPbggWQ9INdZqAYeSHyG7FzQ+nOZaUUjNwKv9pV3aE4WFqFm1Hnbci5tBCAw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-async-to-generator@7.24.6': - resolution: {integrity: sha512-NTBA2SioI3OsHeIn6sQmhvXleSl9T70YY/hostQLveWs0ic+qvbA3fa0kwAwQ0OA/XGaAerNZRQGJyRfhbJK4g==} + '@babel/plugin-transform-async-to-generator@7.25.9': + resolution: {integrity: sha512-NT7Ejn7Z/LjUH0Gv5KsBCxh7BH3fbLTV0ptHvpeMvrt3cPThHfJfst9Wrb7S8EvJ7vRTFI7z+VAvFVEQn/m5zQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-block-scoped-functions@7.24.6': - resolution: {integrity: sha512-XNW7jolYHW9CwORrZgA/97tL/k05qe/HL0z/qqJq1mdWhwwCM6D4BJBV7wAz9HgFziN5dTOG31znkVIzwxv+vw==} + '@babel/plugin-transform-block-scoped-functions@7.25.9': + resolution: {integrity: sha512-toHc9fzab0ZfenFpsyYinOX0J/5dgJVA2fm64xPewu7CoYHWEivIWKxkK2rMi4r3yQqLnVmheMXRdG+k239CgA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-block-scoping@7.24.6': - resolution: {integrity: sha512-S/t1Xh4ehW7sGA7c1j/hiOBLnEYCp/c2sEG4ZkL8kI1xX9tW2pqJTCHKtdhe/jHKt8nG0pFCrDHUXd4DvjHS9w==} + '@babel/plugin-transform-block-scoping@7.25.9': + resolution: {integrity: sha512-1F05O7AYjymAtqbsFETboN1NvBdcnzMerO+zlMyJBEz6WkMdejvGWw9p05iTSjC85RLlBseHHQpYaM4gzJkBGg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-class-properties@7.24.6': - resolution: {integrity: sha512-j6dZ0Z2Z2slWLR3kt9aOmSIrBvnntWjMDN/TVcMPxhXMLmJVqX605CBRlcGI4b32GMbfifTEsdEjGjiE+j/c3A==} + '@babel/plugin-transform-class-properties@7.25.9': + resolution: {integrity: sha512-bbMAII8GRSkcd0h0b4X+36GksxuheLFjP65ul9w6C3KgAamI3JqErNgSrosX6ZPj+Mpim5VvEbawXxJCyEUV3Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-class-static-block@7.24.6': - resolution: {integrity: sha512-1QSRfoPI9RoLRa8Mnakc6v3e0gJxiZQTYrMfLn+mD0sz5+ndSzwymp2hDcYJTyT0MOn0yuWzj8phlIvO72gTHA==} + '@babel/plugin-transform-class-static-block@7.26.0': + resolution: {integrity: sha512-6J2APTs7BDDm+UMqP1useWqhcRAXo0WIoVj26N7kPFB6S73Lgvyka4KTZYIxtgYXiN5HTyRObA72N2iu628iTQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.12.0 - '@babel/plugin-transform-classes@7.24.6': - resolution: {integrity: sha512-+fN+NO2gh8JtRmDSOB6gaCVo36ha8kfCW1nMq2Gc0DABln0VcHN4PrALDvF5/diLzIRKptC7z/d7Lp64zk92Fg==} + '@babel/plugin-transform-classes@7.25.9': + resolution: {integrity: sha512-mD8APIXmseE7oZvZgGABDyM34GUmK45Um2TXiBUt7PnuAxrgoSVf123qUzPxEr/+/BHrRn5NMZCdE2m/1F8DGg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-computed-properties@7.24.6': - resolution: {integrity: sha512-cRzPobcfRP0ZtuIEkA8QzghoUpSB3X3qSH5W2+FzG+VjWbJXExtx0nbRqwumdBN1x/ot2SlTNQLfBCnPdzp6kg==} + '@babel/plugin-transform-computed-properties@7.25.9': + resolution: {integrity: sha512-HnBegGqXZR12xbcTHlJ9HGxw1OniltT26J5YpfruGqtUHlz/xKf/G2ak9e+t0rVqrjXa9WOhvYPz1ERfMj23AA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-destructuring@7.24.6': - resolution: {integrity: sha512-YLW6AE5LQpk5npNXL7i/O+U9CE4XsBCuRPgyjl1EICZYKmcitV+ayuuUGMJm2lC1WWjXYszeTnIxF/dq/GhIZQ==} + '@babel/plugin-transform-destructuring@7.25.9': + resolution: {integrity: sha512-WkCGb/3ZxXepmMiX101nnGiU+1CAdut8oHyEOHxkKuS1qKpU2SMXE2uSvfz8PBuLd49V6LEsbtyPhWC7fnkgvQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-dotall-regex@7.24.6': - resolution: {integrity: sha512-rCXPnSEKvkm/EjzOtLoGvKseK+dS4kZwx1HexO3BtRtgL0fQ34awHn34aeSHuXtZY2F8a1X8xqBBPRtOxDVmcA==} + '@babel/plugin-transform-dotall-regex@7.25.9': + resolution: {integrity: sha512-t7ZQ7g5trIgSRYhI9pIJtRl64KHotutUJsh4Eze5l7olJv+mRSg4/MmbZ0tv1eeqRbdvo/+trvJD/Oc5DmW2cA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-duplicate-keys@7.24.6': - resolution: {integrity: sha512-/8Odwp/aVkZwPFJMllSbawhDAO3UJi65foB00HYnK/uXvvCPm0TAXSByjz1mpRmp0q6oX2SIxpkUOpPFHk7FLA==} + '@babel/plugin-transform-duplicate-keys@7.25.9': + resolution: {integrity: sha512-LZxhJ6dvBb/f3x8xwWIuyiAHy56nrRG3PeYTpBkkzkYRRQ6tJLu68lEF5VIqMUZiAV7a8+Tb78nEoMCMcqjXBw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-dynamic-import@7.24.6': - resolution: {integrity: sha512-vpq8SSLRTBLOHUZHSnBqVo0AKX3PBaoPs2vVzYVWslXDTDIpwAcCDtfhUcHSQQoYoUvcFPTdC8TZYXu9ZnLT/w==} + '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.9': + resolution: {integrity: sha512-0UfuJS0EsXbRvKnwcLjFtJy/Sxc5J5jhLHnFhy7u4zih97Hz6tJkLU+O+FMMrNZrosUPxDi6sYxJ/EA8jDiAog==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/plugin-transform-dynamic-import@7.25.9': + resolution: {integrity: sha512-GCggjexbmSLaFhqsojeugBpeaRIgWNTcgKVq/0qIteFEqY2A+b9QidYadrWlnbWQUrW5fn+mCvf3tr7OeBFTyg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-exponentiation-operator@7.24.6': - resolution: {integrity: sha512-EemYpHtmz0lHE7hxxxYEuTYOOBZ43WkDgZ4arQ4r+VX9QHuNZC+WH3wUWmRNvR8ECpTRne29aZV6XO22qpOtdA==} + '@babel/plugin-transform-exponentiation-operator@7.25.9': + resolution: {integrity: sha512-KRhdhlVk2nObA5AYa7QMgTMTVJdfHprfpAk4DjZVtllqRg9qarilstTKEhpVjyt+Npi8ThRyiV8176Am3CodPA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-export-namespace-from@7.24.6': - resolution: {integrity: sha512-inXaTM1SVrIxCkIJ5gqWiozHfFMStuGbGJAxZFBoHcRRdDP0ySLb3jH6JOwmfiinPwyMZqMBX+7NBDCO4z0NSA==} + '@babel/plugin-transform-export-namespace-from@7.25.9': + resolution: {integrity: sha512-2NsEz+CxzJIVOPx2o9UsW1rXLqtChtLoVnwYHHiB04wS5sgn7mrV45fWMBX0Kk+ub9uXytVYfNP2HjbVbCB3Ww==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-for-of@7.24.6': - resolution: {integrity: sha512-n3Sf72TnqK4nw/jziSqEl1qaWPbCRw2CziHH+jdRYvw4J6yeCzsj4jdw8hIntOEeDGTmHVe2w4MVL44PN0GMzg==} + '@babel/plugin-transform-for-of@7.25.9': + resolution: {integrity: sha512-LqHxduHoaGELJl2uhImHwRQudhCM50pT46rIBNvtT/Oql3nqiS3wOwP+5ten7NpYSXrrVLgtZU3DZmPtWZo16A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-function-name@7.24.6': - resolution: {integrity: sha512-sOajCu6V0P1KPljWHKiDq6ymgqB+vfo3isUS4McqW1DZtvSVU2v/wuMhmRmkg3sFoq6GMaUUf8W4WtoSLkOV/Q==} + '@babel/plugin-transform-function-name@7.25.9': + resolution: {integrity: sha512-8lP+Yxjv14Vc5MuWBpJsoUCd3hD6V9DgBon2FVYL4jJgbnVQ9fTgYmonchzZJOVNgzEgbxp4OwAf6xz6M/14XA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-json-strings@7.24.6': - resolution: {integrity: sha512-Uvgd9p2gUnzYJxVdBLcU0KurF8aVhkmVyMKW4MIY1/BByvs3EBpv45q01o7pRTVmTvtQq5zDlytP3dcUgm7v9w==} + '@babel/plugin-transform-json-strings@7.25.9': + resolution: {integrity: sha512-xoTMk0WXceiiIvsaquQQUaLLXSW1KJ159KP87VilruQm0LNNGxWzahxSS6T6i4Zg3ezp4vA4zuwiNUR53qmQAw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-literals@7.24.6': - resolution: {integrity: sha512-f2wHfR2HF6yMj+y+/y07+SLqnOSwRp8KYLpQKOzS58XLVlULhXbiYcygfXQxJlMbhII9+yXDwOUFLf60/TL5tw==} + '@babel/plugin-transform-literals@7.25.9': + resolution: {integrity: sha512-9N7+2lFziW8W9pBl2TzaNht3+pgMIRP74zizeCSrtnSKVdUl8mAjjOP2OOVQAfZ881P2cNjDj1uAMEdeD50nuQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-logical-assignment-operators@7.24.6': - resolution: {integrity: sha512-EKaWvnezBCMkRIHxMJSIIylzhqK09YpiJtDbr2wsXTwnO0TxyjMUkaw4RlFIZMIS0iDj0KyIg7H7XCguHu/YDA==} + '@babel/plugin-transform-logical-assignment-operators@7.25.9': + resolution: {integrity: sha512-wI4wRAzGko551Y8eVf6iOY9EouIDTtPb0ByZx+ktDGHwv6bHFimrgJM/2T021txPZ2s4c7bqvHbd+vXG6K948Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-member-expression-literals@7.24.6': - resolution: {integrity: sha512-9g8iV146szUo5GWgXpRbq/GALTnY+WnNuRTuRHWWFfWGbP9ukRL0aO/jpu9dmOPikclkxnNsjY8/gsWl6bmZJQ==} + '@babel/plugin-transform-member-expression-literals@7.25.9': + resolution: {integrity: sha512-PYazBVfofCQkkMzh2P6IdIUaCEWni3iYEerAsRWuVd8+jlM1S9S9cz1dF9hIzyoZ8IA3+OwVYIp9v9e+GbgZhA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-amd@7.24.6': - resolution: {integrity: sha512-eAGogjZgcwqAxhyFgqghvoHRr+EYRQPFjUXrTYKBRb5qPnAVxOOglaxc4/byHqjvq/bqO2F3/CGwTHsgKJYHhQ==} + '@babel/plugin-transform-modules-amd@7.25.9': + resolution: {integrity: sha512-g5T11tnI36jVClQlMlt4qKDLlWnG5pP9CSM4GhdRciTNMRgkfpo5cR6b4rGIOYPgRRuFAvwjPQ/Yk+ql4dyhbw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-commonjs@7.24.6': - resolution: {integrity: sha512-JEV8l3MHdmmdb7S7Cmx6rbNEjRCgTQMZxllveHO0mx6uiclB0NflCawlQQ6+o5ZrwjUBYPzHm2XoK4wqGVUFuw==} + '@babel/plugin-transform-modules-commonjs@7.25.9': + resolution: {integrity: sha512-dwh2Ol1jWwL2MgkCzUSOvfmKElqQcuswAZypBSUsScMXvgdT8Ekq5YA6TtqpTVWH+4903NmboMuH1o9i8Rxlyg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-systemjs@7.24.6': - resolution: {integrity: sha512-xg1Z0J5JVYxtpX954XqaaAT6NpAY6LtZXvYFCJmGFJWwtlz2EmJoR8LycFRGNE8dBKizGWkGQZGegtkV8y8s+w==} + '@babel/plugin-transform-modules-systemjs@7.25.9': + resolution: {integrity: sha512-hyss7iIlH/zLHaehT+xwiymtPOpsiwIIRlCAOwBB04ta5Tt+lNItADdlXw3jAWZ96VJ2jlhl/c+PNIQPKNfvcA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-umd@7.24.6': - resolution: {integrity: sha512-esRCC/KsSEUvrSjv5rFYnjZI6qv4R1e/iHQrqwbZIoRJqk7xCvEUiN7L1XrmW5QSmQe3n1XD88wbgDTWLbVSyg==} + '@babel/plugin-transform-modules-umd@7.25.9': + resolution: {integrity: sha512-bS9MVObUgE7ww36HEfwe6g9WakQ0KF07mQF74uuXdkoziUPfKyu/nIm663kz//e5O1nPInPFx36z7WJmJ4yNEw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-named-capturing-groups-regex@7.24.6': - resolution: {integrity: sha512-6DneiCiu91wm3YiNIGDWZsl6GfTTbspuj/toTEqLh9d4cx50UIzSdg+T96p8DuT7aJOBRhFyaE9ZvTHkXrXr6Q==} + '@babel/plugin-transform-named-capturing-groups-regex@7.25.9': + resolution: {integrity: sha512-oqB6WHdKTGl3q/ItQhpLSnWWOpjUJLsOCLVyeFgeTktkBSCiurvPOsyt93gibI9CmuKvTUEtWmG5VhZD+5T/KA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-transform-new-target@7.24.6': - resolution: {integrity: sha512-f8liz9JG2Va8A4J5ZBuaSdwfPqN6axfWRK+y66fjKYbwf9VBLuq4WxtinhJhvp1w6lamKUwLG0slK2RxqFgvHA==} + '@babel/plugin-transform-new-target@7.25.9': + resolution: {integrity: sha512-U/3p8X1yCSoKyUj2eOBIx3FOn6pElFOKvAAGf8HTtItuPyB+ZeOqfn+mvTtg9ZlOAjsPdK3ayQEjqHjU/yLeVQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-nullish-coalescing-operator@7.24.6': - resolution: {integrity: sha512-+QlAiZBMsBK5NqrBWFXCYeXyiU1y7BQ/OYaiPAcQJMomn5Tyg+r5WuVtyEuvTbpV7L25ZSLfE+2E9ywj4FD48A==} + '@babel/plugin-transform-nullish-coalescing-operator@7.25.9': + resolution: {integrity: sha512-ENfftpLZw5EItALAD4WsY/KUWvhUlZndm5GC7G3evUsVeSJB6p0pBeLQUnRnBCBx7zV0RKQjR9kCuwrsIrjWog==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-numeric-separator@7.24.6': - resolution: {integrity: sha512-6voawq8T25Jvvnc4/rXcWZQKKxUNZcKMS8ZNrjxQqoRFernJJKjE3s18Qo6VFaatG5aiX5JV1oPD7DbJhn0a4Q==} + '@babel/plugin-transform-numeric-separator@7.25.9': + resolution: {integrity: sha512-TlprrJ1GBZ3r6s96Yq8gEQv82s8/5HnCVHtEJScUj90thHQbwe+E5MLhi2bbNHBEJuzrvltXSru+BUxHDoog7Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-object-rest-spread@7.24.6': - resolution: {integrity: sha512-OKmi5wiMoRW5Smttne7BwHM8s/fb5JFs+bVGNSeHWzwZkWXWValR1M30jyXo1s/RaqgwwhEC62u4rFH/FBcBPg==} + '@babel/plugin-transform-object-rest-spread@7.25.9': + resolution: {integrity: sha512-fSaXafEE9CVHPweLYw4J0emp1t8zYTXyzN3UuG+lylqkvYd7RMrsOQ8TYx5RF231be0vqtFC6jnx3UmpJmKBYg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-object-super@7.24.6': - resolution: {integrity: sha512-N/C76ihFKlZgKfdkEYKtaRUtXZAgK7sOY4h2qrbVbVTXPrKGIi8aww5WGe/+Wmg8onn8sr2ut6FXlsbu/j6JHg==} + '@babel/plugin-transform-object-super@7.25.9': + resolution: {integrity: sha512-Kj/Gh+Rw2RNLbCK1VAWj2U48yxxqL2x0k10nPtSdRa0O2xnHXalD0s+o1A6a0W43gJ00ANo38jxkQreckOzv5A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-optional-catch-binding@7.24.6': - resolution: {integrity: sha512-L5pZ+b3O1mSzJ71HmxSCmTVd03VOT2GXOigug6vDYJzE5awLI7P1g0wFcdmGuwSDSrQ0L2rDOe/hHws8J1rv3w==} + '@babel/plugin-transform-optional-catch-binding@7.25.9': + resolution: {integrity: sha512-qM/6m6hQZzDcZF3onzIhZeDHDO43bkNNlOX0i8n3lR6zLbu0GN2d8qfM/IERJZYauhAHSLHy39NF0Ctdvcid7g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-optional-chaining@7.24.6': - resolution: {integrity: sha512-cHbqF6l1QP11OkYTYQ+hhVx1E017O5ZcSPXk9oODpqhcAD1htsWG2NpHrrhthEO2qZomLK0FXS+u7NfrkF5aOQ==} + '@babel/plugin-transform-optional-chaining@7.25.9': + resolution: {integrity: sha512-6AvV0FsLULbpnXeBjrY4dmWF8F7gf8QnvTEoO/wX/5xm/xE1Xo8oPuD3MPS+KS9f9XBEAWN7X1aWr4z9HdOr7A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-parameters@7.24.6': - resolution: {integrity: sha512-ST7guE8vLV+vI70wmAxuZpIKzVjvFX9Qs8bl5w6tN/6gOypPWUmMQL2p7LJz5E63vEGrDhAiYetniJFyBH1RkA==} + '@babel/plugin-transform-parameters@7.25.9': + resolution: {integrity: sha512-wzz6MKwpnshBAiRmn4jR8LYz/g8Ksg0o80XmwZDlordjwEk9SxBzTWC7F5ef1jhbrbOW2DJ5J6ayRukrJmnr0g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-private-methods@7.24.6': - resolution: {integrity: sha512-T9LtDI0BgwXOzyXrvgLTT8DFjCC/XgWLjflczTLXyvxbnSR/gpv0hbmzlHE/kmh9nOvlygbamLKRo6Op4yB6aw==} + '@babel/plugin-transform-private-methods@7.25.9': + resolution: {integrity: sha512-D/JUozNpQLAPUVusvqMxyvjzllRaF8/nSrP1s2YGQT/W4LHK4xxsMcHjhOGTS01mp9Hda8nswb+FblLdJornQw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-private-property-in-object@7.24.6': - resolution: {integrity: sha512-Qu/ypFxCY5NkAnEhCF86Mvg3NSabKsh/TPpBVswEdkGl7+FbsYHy1ziRqJpwGH4thBdQHh8zx+z7vMYmcJ7iaQ==} + '@babel/plugin-transform-private-property-in-object@7.25.9': + resolution: {integrity: sha512-Evf3kcMqzXA3xfYJmZ9Pg1OvKdtqsDMSWBDzZOPLvHiTt36E75jLDQo5w1gtRU95Q4E5PDttrTf25Fw8d/uWLw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-property-literals@7.24.6': - resolution: {integrity: sha512-oARaglxhRsN18OYsnPTpb8TcKQWDYNsPNmTnx5++WOAsUJ0cSC/FZVlIJCKvPbU4yn/UXsS0551CFKJhN0CaMw==} + '@babel/plugin-transform-property-literals@7.25.9': + resolution: {integrity: sha512-IvIUeV5KrS/VPavfSM/Iu+RE6llrHrYIKY1yfCzyO/lMXHQ+p7uGhonmGVisv6tSBSVgWzMBohTcvkC9vQcQFA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-regenerator@7.24.6': - resolution: {integrity: sha512-SMDxO95I8WXRtXhTAc8t/NFQUT7VYbIWwJCJgEli9ml4MhqUMh4S6hxgH6SmAC3eAQNWCDJFxcFeEt9w2sDdXg==} + '@babel/plugin-transform-regenerator@7.25.9': + resolution: {integrity: sha512-vwDcDNsgMPDGP0nMqzahDWE5/MLcX8sv96+wfX7as7LoF/kr97Bo/7fI00lXY4wUXYfVmwIIyG80fGZ1uvt2qg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-reserved-words@7.24.6': - resolution: {integrity: sha512-DcrgFXRRlK64dGE0ZFBPD5egM2uM8mgfrvTMOSB2yKzOtjpGegVYkzh3s1zZg1bBck3nkXiaOamJUqK3Syk+4A==} + '@babel/plugin-transform-regexp-modifiers@7.26.0': + resolution: {integrity: sha512-vN6saax7lrA2yA/Pak3sCxuD6F5InBjn9IcrIKQPjpsLvuHYLVroTxjdlVRHjjBWxKOqIwpTXDkOssYT4BFdRw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/plugin-transform-reserved-words@7.25.9': + resolution: {integrity: sha512-7DL7DKYjn5Su++4RXu8puKZm2XBPHyjWLUidaPEkCUBbE7IPcsrkRHggAOOKydH1dASWdcUBxrkOGNxUv5P3Jg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-shorthand-properties@7.24.6': - resolution: {integrity: sha512-xnEUvHSMr9eOWS5Al2YPfc32ten7CXdH7Zwyyk7IqITg4nX61oHj+GxpNvl+y5JHjfN3KXE2IV55wAWowBYMVw==} + '@babel/plugin-transform-shorthand-properties@7.25.9': + resolution: {integrity: sha512-MUv6t0FhO5qHnS/W8XCbHmiRWOphNufpE1IVxhK5kuN3Td9FT1x4rx4K42s3RYdMXCXpfWkGSbCSd0Z64xA7Ng==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-spread@7.24.6': - resolution: {integrity: sha512-h/2j7oIUDjS+ULsIrNZ6/TKG97FgmEk1PXryk/HQq6op4XUUUwif2f69fJrzK0wza2zjCS1xhXmouACaWV5uPA==} + '@babel/plugin-transform-spread@7.25.9': + resolution: {integrity: sha512-oNknIB0TbURU5pqJFVbOOFspVlrpVwo2H1+HUIsVDvp5VauGGDP1ZEvO8Nn5xyMEs3dakajOxlmkNW7kNgSm6A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-sticky-regex@7.24.6': - resolution: {integrity: sha512-fN8OcTLfGmYv7FnDrsjodYBo1DhPL3Pze/9mIIE2MGCT1KgADYIOD7rEglpLHZj8PZlC/JFX5WcD+85FLAQusw==} + '@babel/plugin-transform-sticky-regex@7.25.9': + resolution: {integrity: sha512-WqBUSgeVwucYDP9U/xNRQam7xV8W5Zf+6Eo7T2SRVUFlhRiMNFdFz58u0KZmCVVqs2i7SHgpRnAhzRNmKfi2uA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-template-literals@7.24.6': - resolution: {integrity: sha512-BJbEqJIcKwrqUP+KfUIkxz3q8VzXe2R8Wv8TaNgO1cx+nNavxn/2+H8kp9tgFSOL6wYPPEgFvU6IKS4qoGqhmg==} + '@babel/plugin-transform-template-literals@7.25.9': + resolution: {integrity: sha512-o97AE4syN71M/lxrCtQByzphAdlYluKPDBzDVzMmfCobUjjhAryZV0AIpRPrxN0eAkxXO6ZLEScmt+PNhj2OTw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-typeof-symbol@7.24.6': - resolution: {integrity: sha512-IshCXQ+G9JIFJI7bUpxTE/oA2lgVLAIK8q1KdJNoPXOpvRaNjMySGuvLfBw/Xi2/1lLo953uE8hyYSDW3TSYig==} + '@babel/plugin-transform-typeof-symbol@7.25.9': + resolution: {integrity: sha512-v61XqUMiueJROUv66BVIOi0Fv/CUuZuZMl5NkRoCVxLAnMexZ0A3kMe7vvZ0nulxMuMp0Mk6S5hNh48yki08ZA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-typescript@7.24.6': - resolution: {integrity: sha512-H0i+hDLmaYYSt6KU9cZE0gb3Cbssa/oxWis7PX4ofQzbvsfix9Lbh8SRk7LCPDlLWJHUiFeHU0qRRpF/4Zv7mQ==} + '@babel/plugin-transform-typescript@7.25.9': + resolution: {integrity: sha512-7PbZQZP50tzv2KGGnhh82GSyMB01yKY9scIjf1a+GfZCtInOWqUH5+1EBU4t9fyR5Oykkkc9vFTs4OHrhHXljQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-unicode-escapes@7.24.6': - resolution: {integrity: sha512-bKl3xxcPbkQQo5eX9LjjDpU2xYHeEeNQbOhj0iPvetSzA+Tu9q/o5lujF4Sek60CM6MgYvOS/DJuwGbiEYAnLw==} + '@babel/plugin-transform-unicode-escapes@7.25.9': + resolution: {integrity: sha512-s5EDrE6bW97LtxOcGj1Khcx5AaXwiMmi4toFWRDP9/y0Woo6pXC+iyPu/KuhKtfSrNFd7jJB+/fkOtZy6aIC6Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-unicode-property-regex@7.24.6': - resolution: {integrity: sha512-8EIgImzVUxy15cZiPii9GvLZwsy7Vxc+8meSlR3cXFmBIl5W5Tn9LGBf7CDKkHj4uVfNXCJB8RsVfnmY61iedA==} + '@babel/plugin-transform-unicode-property-regex@7.25.9': + resolution: {integrity: sha512-Jt2d8Ga+QwRluxRQ307Vlxa6dMrYEMZCgGxoPR8V52rxPyldHu3hdlHspxaqYmE7oID5+kB+UKUB/eWS+DkkWg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-unicode-regex@7.24.6': - resolution: {integrity: sha512-pssN6ExsvxaKU638qcWb81RrvvgZom3jDgU/r5xFZ7TONkZGFf4MhI2ltMb8OcQWhHyxgIavEU+hgqtbKOmsPA==} + '@babel/plugin-transform-unicode-regex@7.25.9': + resolution: {integrity: sha512-yoxstj7Rg9dlNn9UQxzk4fcNivwv4nUYz7fYXBaKxvw/lnmPuOm/ikoELygbYq68Bls3D/D+NBPHiLwZdZZ4HA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-unicode-sets-regex@7.24.6': - resolution: {integrity: sha512-quiMsb28oXWIDK0gXLALOJRXLgICLiulqdZGOaPPd0vRT7fQp74NtdADAVu+D8s00C+0Xs0MxVP0VKF/sZEUgw==} + '@babel/plugin-transform-unicode-sets-regex@7.25.9': + resolution: {integrity: sha512-8BYqO3GeVNHtx69fdPshN3fnzUNLrWdHhk/icSwigksJGczKSizZ+Z6SBCxTs723Fr5VSNorTIK7a+R2tISvwQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/preset-env@7.24.6': - resolution: {integrity: sha512-CrxEAvN7VxfjOG8JNF2Y/eMqMJbZPZ185amwGUBp8D9USK90xQmv7dLdFSa+VbD7fdIqcy/Mfv7WtzG8+/qxKg==} + '@babel/preset-env@7.26.0': + resolution: {integrity: sha512-H84Fxq0CQJNdPFT2DrfnylZ3cf5K43rGfWK4LJGPpjKHiZlk0/RzwEus3PDDZZg+/Er7lCA03MVacueUuXdzfw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -845,72 +813,273 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 || ^8.0.0-0 <8.0.0 - '@babel/preset-typescript@7.24.6': - resolution: {integrity: sha512-U10aHPDnokCFRXgyT/MaIRTivUu2K/mu0vJlwRS9LxJmJet+PFQNKpggPyFCUtC6zWSBPjvxjnpNkAn3Uw2m5w==} + '@babel/preset-typescript@7.26.0': + resolution: {integrity: sha512-NMk1IGZ5I/oHhoXEElcm+xUnL/szL6xflkFZmoEU9xj1qSJXpiS7rsspYo92B4DRCDvZn2erT5LdsCeXAKNCkg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/regjsgen@0.8.0': - resolution: {integrity: sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==} - - '@babel/runtime@7.24.5': - resolution: {integrity: sha512-Nms86NXrsaeU9vbBJKni6gXiEXZ4CVpYVzEjDH9Sb8vmZ3UljyA1GSOJl/6LGPO8EHLuSF9H+IxNXHPX8QHJ4g==} - engines: {node: '>=6.9.0'} - - '@babel/template@7.24.0': - resolution: {integrity: sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==} - engines: {node: '>=6.9.0'} - - '@babel/template@7.24.6': - resolution: {integrity: sha512-3vgazJlLwNXi9jhrR1ef8qiB65L1RK90+lEQwv4OxveHnqC3BfmnHdgySwRLzf6akhlOYenT+b7AfWq+a//AHw==} + '@babel/runtime@7.26.0': + resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.24.6': - resolution: {integrity: sha512-OsNjaJwT9Zn8ozxcfoBc+RaHdj3gFmCmYoQLUII1o6ZrUwku0BMg80FoOTPx+Gi6XhcQxAYE4xyjPTo4SxEQqw==} + '@babel/template@7.25.9': + resolution: {integrity: sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==} engines: {node: '>=6.9.0'} - '@babel/types@7.24.5': - resolution: {integrity: sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==} + '@babel/traverse@7.25.9': + resolution: {integrity: sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==} engines: {node: '>=6.9.0'} - '@babel/types@7.24.6': - resolution: {integrity: sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ==} + '@babel/types@7.26.0': + resolution: {integrity: sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==} engines: {node: '>=6.9.0'} '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} - '@cspotcode/source-map-support@0.8.1': - resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} - engines: {node: '>=12'} - '@discoveryjs/json-ext@0.5.7': resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} engines: {node: '>=10.0.0'} - '@es-joy/jsdoccomment@0.43.0': - resolution: {integrity: sha512-Q1CnsQrytI3TlCB1IVWXWeqUIPGVEKGaE7IbVdt13Nq/3i0JESAkQQERrfiQkmlpijl+++qyqPgaS31Bvc1jRQ==} + '@es-joy/jsdoccomment@0.49.0': + resolution: {integrity: sha512-xjZTSFgECpb9Ohuk5yMX5RhUEbfeQcuOp8IF60e+wyzWEF0M5xeSgqsfLtvPEX8BIyOX9saZqzuGPmZ8oWc+5Q==} engines: {node: '>=16'} - '@eslint-community/eslint-utils@4.4.0': - resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} + '@esbuild/aix-ppc64@0.23.1': + resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==} + engines: {node: '>=18'} + cpu: + - ppc64 + os: + - aix + + '@esbuild/android-arm64@0.23.1': + resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==} + engines: {node: '>=18'} + cpu: + - arm64 + os: + - android + + '@esbuild/android-arm@0.23.1': + resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==} + engines: {node: '>=18'} + cpu: + - arm + os: + - android + + '@esbuild/android-x64@0.23.1': + resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==} + engines: {node: '>=18'} + cpu: + - x64 + os: + - android + + '@esbuild/darwin-arm64@0.23.1': + resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==} + engines: {node: '>=18'} + cpu: + - arm64 + os: + - darwin + + '@esbuild/darwin-x64@0.23.1': + resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==} + engines: {node: '>=18'} + cpu: + - x64 + os: + - darwin + + '@esbuild/freebsd-arm64@0.23.1': + resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==} + engines: {node: '>=18'} + cpu: + - arm64 + os: + - freebsd + + '@esbuild/freebsd-x64@0.23.1': + resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==} + engines: {node: '>=18'} + cpu: + - x64 + os: + - freebsd + + '@esbuild/linux-arm64@0.23.1': + resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==} + engines: {node: '>=18'} + cpu: + - arm64 + os: + - linux + + '@esbuild/linux-arm@0.23.1': + resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==} + engines: {node: '>=18'} + cpu: + - arm + os: + - linux + + '@esbuild/linux-ia32@0.23.1': + resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==} + engines: {node: '>=18'} + cpu: + - ia32 + os: + - linux + + '@esbuild/linux-loong64@0.23.1': + resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==} + engines: {node: '>=18'} + cpu: + - loong64 + os: + - linux + + '@esbuild/linux-mips64el@0.23.1': + resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==} + engines: {node: '>=18'} + cpu: + - mips64el + os: + - linux + + '@esbuild/linux-ppc64@0.23.1': + resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==} + engines: {node: '>=18'} + cpu: + - ppc64 + os: + - linux + + '@esbuild/linux-riscv64@0.23.1': + resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==} + engines: {node: '>=18'} + cpu: + - riscv64 + os: + - linux + + '@esbuild/linux-s390x@0.23.1': + resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==} + engines: {node: '>=18'} + cpu: + - s390x + os: + - linux + + '@esbuild/linux-x64@0.23.1': + resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==} + engines: {node: '>=18'} + cpu: + - x64 + os: + - linux + + '@esbuild/netbsd-x64@0.23.1': + resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==} + engines: {node: '>=18'} + cpu: + - x64 + os: + - netbsd + + '@esbuild/openbsd-arm64@0.23.1': + resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} + engines: {node: '>=18'} + cpu: + - arm64 + os: + - openbsd + + '@esbuild/openbsd-x64@0.23.1': + resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==} + engines: {node: '>=18'} + cpu: + - x64 + os: + - openbsd + + '@esbuild/sunos-x64@0.23.1': + resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==} + engines: {node: '>=18'} + cpu: + - x64 + os: + - sunos + + '@esbuild/win32-arm64@0.23.1': + resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==} + engines: {node: '>=18'} + cpu: + - arm64 + os: + - win32 + + '@esbuild/win32-ia32@0.23.1': + resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==} + engines: {node: '>=18'} + cpu: + - ia32 + os: + - win32 + + '@esbuild/win32-x64@0.23.1': + resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==} + engines: {node: '>=18'} + cpu: + - x64 + os: + - win32 + + '@eslint-community/eslint-utils@4.4.1': + resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.10.0': - resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} + '@eslint-community/regexpp@4.12.1': + resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + '@eslint/config-array@0.19.0': + resolution: {integrity: sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/core@0.9.0': + resolution: {integrity: sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/eslintrc@2.1.4': resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@8.57.0': - resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} + '@eslint/eslintrc@3.2.0': + resolution: {integrity: sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@8.57.1': + resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/js@9.16.0': + resolution: {integrity: sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/object-schema@2.1.4': + resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/plugin-kit@0.2.3': + resolution: {integrity: sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ethereumjs/rlp@4.0.1': resolution: {integrity: sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==} engines: {node: '>=14'} @@ -947,18 +1116,9 @@ packages: '@ethersproject/constants@5.7.0': resolution: {integrity: sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==} - '@ethersproject/contracts@5.7.0': - resolution: {integrity: sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==} - '@ethersproject/hash@5.7.0': resolution: {integrity: sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==} - '@ethersproject/hdnode@5.7.0': - resolution: {integrity: sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==} - - '@ethersproject/json-wallets@5.7.0': - resolution: {integrity: sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==} - '@ethersproject/keccak256@5.7.0': resolution: {integrity: sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==} @@ -968,9 +1128,6 @@ packages: '@ethersproject/networks@5.7.1': resolution: {integrity: sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==} - '@ethersproject/pbkdf2@5.7.0': - resolution: {integrity: sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==} - '@ethersproject/properties@5.7.0': resolution: {integrity: sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==} @@ -989,27 +1146,15 @@ packages: '@ethersproject/signing-key@5.7.0': resolution: {integrity: sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==} - '@ethersproject/solidity@5.7.0': - resolution: {integrity: sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==} - '@ethersproject/strings@5.7.0': resolution: {integrity: sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==} '@ethersproject/transactions@5.7.0': resolution: {integrity: sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==} - '@ethersproject/units@5.7.0': - resolution: {integrity: sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==} - - '@ethersproject/wallet@5.7.0': - resolution: {integrity: sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==} - '@ethersproject/web@5.7.1': resolution: {integrity: sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==} - '@ethersproject/wordlists@5.7.0': - resolution: {integrity: sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==} - '@fastify/busboy@2.1.1': resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} engines: {node: '>=14'} @@ -1023,9 +1168,18 @@ packages: '@glimmer/util@0.41.4': resolution: {integrity: sha512-DwS94K+M0vtG+cymxH0rslJr09qpdjyOLdCjmpKcG/nNiZQfMA1ybAaFEmwk9UaVlUG9STENFeQwyrLevJB+7g==} - '@humanwhocodes/config-array@0.11.14': - resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} + '@humanfs/core@0.19.1': + resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} + engines: {node: '>=18.18.0'} + + '@humanfs/node@0.16.6': + resolution: {integrity: sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==} + engines: {node: '>=18.18.0'} + + '@humanwhocodes/config-array@0.13.0': + resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} @@ -1033,6 +1187,15 @@ packages: '@humanwhocodes/object-schema@2.0.3': resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead + + '@humanwhocodes/retry@0.3.1': + resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} + engines: {node: '>=18.18'} + + '@humanwhocodes/retry@0.4.1': + resolution: {integrity: sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==} + engines: {node: '>=18.18'} '@iarna/toml@2.2.3': resolution: {integrity: sha512-FmuxfCuolpLl0AnQ2NHSzoUKWEJDFl63qXjzdoWBVyFCXzMGm1spBzk7LeHNoVCiWCF7mRVms9e6jEV9+MoPbg==} @@ -1130,36 +1293,51 @@ packages: '@jridgewell/source-map@0.3.6': resolution: {integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==} - '@jridgewell/sourcemap-codec@1.4.15': - resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} - '@jridgewell/trace-mapping@0.3.9': - resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - '@metamask/eth-sig-util@4.0.1': resolution: {integrity: sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ==} engines: {node: '>=12.0.0'} - '@noble/curves@1.3.0': - resolution: {integrity: sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==} + '@microsoft/tsdoc-config@0.17.1': + resolution: {integrity: sha512-UtjIFe0C6oYgTnad4q1QP4qXwLhe6tIpNTRStJ2RZEPIkqQPREAwE5spzVxsdn9UaEMUqhh0AqSx3X4nWAKXWw==} - '@noble/curves@1.4.0': - resolution: {integrity: sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg==} + '@microsoft/tsdoc@0.15.1': + resolution: {integrity: sha512-4aErSrCR/On/e5G2hDP0wjooqDdauzEbIq8hIkIe5pXV0rtWJZvdCEKL0ykZxex+IxIwBp0eGeV48hQN07dXtw==} + + '@noble/curves@1.2.0': + resolution: {integrity: sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==} + + '@noble/curves@1.4.2': + resolution: {integrity: sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==} + + '@noble/curves@1.7.0': + resolution: {integrity: sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw==} + engines: {node: ^14.21.3 || >=16} '@noble/hashes@1.2.0': resolution: {integrity: sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==} - '@noble/hashes@1.3.3': - resolution: {integrity: sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==} + '@noble/hashes@1.3.2': + resolution: {integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==} engines: {node: '>= 16'} '@noble/hashes@1.4.0': resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==} engines: {node: '>= 16'} + '@noble/hashes@1.6.0': + resolution: {integrity: sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ==} + engines: {node: ^14.21.3 || >=16} + + '@noble/hashes@1.6.1': + resolution: {integrity: sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w==} + engines: {node: ^14.21.3 || >=16} + '@noble/secp256k1@1.7.1': resolution: {integrity: sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==} @@ -1175,50 +1353,36 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@nomicfoundation/edr-darwin-arm64@0.3.7': - resolution: {integrity: sha512-6tK9Lv/lSfyBvpEQ4nsTfgxyDT1y1Uv/x8Wa+aB+E8qGo3ToexQ1BMVjxJk6PChXCDOWxB3B4KhqaZFjdhl3Ow==} + '@nomicfoundation/edr-darwin-arm64@0.6.5': + resolution: {integrity: sha512-A9zCCbbNxBpLgjS1kEJSpqxIvGGAX4cYbpDYCU2f3jVqOwaZ/NU761y1SvuCRVpOwhoCXqByN9b7HPpHi0L4hw==} engines: {node: '>= 18'} - cpu: [arm64] - os: [darwin] - '@nomicfoundation/edr-darwin-x64@0.3.7': - resolution: {integrity: sha512-1RrQ/1JPwxrYO69e0tglFv5H+ggour5Ii3bb727+yBpBShrxtOTQ7fZyfxA5h62LCN+0Z9wYOPeQ7XFcVurMaQ==} + '@nomicfoundation/edr-darwin-x64@0.6.5': + resolution: {integrity: sha512-x3zBY/v3R0modR5CzlL6qMfFMdgwd6oHrWpTkuuXnPFOX8SU31qq87/230f4szM+ukGK8Hi+mNq7Ro2VF4Fj+w==} engines: {node: '>= 18'} - cpu: [x64] - os: [darwin] - '@nomicfoundation/edr-linux-arm64-gnu@0.3.7': - resolution: {integrity: sha512-ds/CKlBoVXIihjhflhgPn13EdKWed6r5bgvMs/YwRqT5wldQAQJZWAfA2+nYm0Yi2gMGh1RUpBcfkyl4pq7G+g==} + '@nomicfoundation/edr-linux-arm64-gnu@0.6.5': + resolution: {integrity: sha512-HGpB8f1h8ogqPHTyUpyPRKZxUk2lu061g97dOQ/W4CxevI0s/qiw5DB3U3smLvSnBHKOzYS1jkxlMeGN01ky7A==} engines: {node: '>= 18'} - cpu: [arm64] - os: [linux] - '@nomicfoundation/edr-linux-arm64-musl@0.3.7': - resolution: {integrity: sha512-e29udiRaPujhLkM3+R6ju7QISrcyOqpcaxb2FsDWBkuD7H8uU9JPZEyyUIpEp5uIY0Jh1eEJPKZKIXQmQAEAuw==} + '@nomicfoundation/edr-linux-arm64-musl@0.6.5': + resolution: {integrity: sha512-ESvJM5Y9XC03fZg9KaQg3Hl+mbx7dsSkTIAndoJS7X2SyakpL9KZpOSYrDk135o8s9P9lYJdPOyiq+Sh+XoCbQ==} engines: {node: '>= 18'} - cpu: [arm64] - os: [linux] - '@nomicfoundation/edr-linux-x64-gnu@0.3.7': - resolution: {integrity: sha512-/xkjmTyv+bbJ4akBCW0qzFKxPOV4AqLOmqurov+s9umHb16oOv72osSa3SdzJED2gHDaKmpMITT4crxbar4Axg==} + '@nomicfoundation/edr-linux-x64-gnu@0.6.5': + resolution: {integrity: sha512-HCM1usyAR1Ew6RYf5AkMYGvHBy64cPA5NMbaeY72r0mpKaH3txiMyydcHibByOGdQ8iFLWpyUdpl1egotw+Tgg==} engines: {node: '>= 18'} - cpu: [x64] - os: [linux] - '@nomicfoundation/edr-linux-x64-musl@0.3.7': - resolution: {integrity: sha512-QwBP9xlmsbf/ldZDGLcE4QiAb8Zt46E/+WLpxHBATFhGa7MrpJh6Zse+h2VlrT/SYLPbh2cpHgSmoSlqVxWG9g==} + '@nomicfoundation/edr-linux-x64-musl@0.6.5': + resolution: {integrity: sha512-nB2uFRyczhAvWUH7NjCsIO6rHnQrof3xcCe6Mpmnzfl2PYcGyxN7iO4ZMmRcQS7R1Y670VH6+8ZBiRn8k43m7A==} engines: {node: '>= 18'} - cpu: [x64] - os: [linux] - '@nomicfoundation/edr-win32-x64-msvc@0.3.7': - resolution: {integrity: sha512-j/80DEnkxrF2ewdbk/gQ2EOPvgF0XSsg8D0o4+6cKhUVAW6XwtWKzIphNL6dyD2YaWEPgIrNvqiJK/aln0ww4Q==} + '@nomicfoundation/edr-win32-x64-msvc@0.6.5': + resolution: {integrity: sha512-B9QD/4DSSCFtWicO8A3BrsnitO1FPv7axB62wq5Q+qeJ50yJlTmyeGY3cw62gWItdvy2mh3fRM6L1LpnHiB77A==} engines: {node: '>= 18'} - cpu: [x64] - os: [win32] - '@nomicfoundation/edr@0.3.7': - resolution: {integrity: sha512-v2JFWnFKRsnOa6PDUrD+sr8amcdhxnG/YbL7LzmgRGU1odWEyOF4/EwNeUajQr4ZNKVWrYnJ6XjydXtUge5OBQ==} + '@nomicfoundation/edr@0.6.5': + resolution: {integrity: sha512-tAqMslLP+/2b2sZP4qe9AuGxG3OkQ5gGgHE4isUuq6dUVjwCRPFhAOhpdFl+OjY5P3yEv3hmq9HjUGRa2VNjng==} engines: {node: '>= 18'} '@nomicfoundation/ethereumjs-common@4.0.4': @@ -1247,75 +1411,47 @@ packages: c-kzg: optional: true - '@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.1': - resolution: {integrity: sha512-KcTodaQw8ivDZyF+D76FokN/HdpgGpfjc/gFCImdLUyqB6eSWVaZPazMbeAjmfhx3R0zm/NYVzxwAokFKgrc0w==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - - '@nomicfoundation/solidity-analyzer-darwin-x64@0.1.1': - resolution: {integrity: sha512-XhQG4BaJE6cIbjAVtzGOGbK3sn1BO9W29uhk9J8y8fZF1DYz0Doj8QDMfpMu+A6TjPDs61lbsmeYodIDnfveSA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - - '@nomicfoundation/solidity-analyzer-freebsd-x64@0.1.1': - resolution: {integrity: sha512-GHF1VKRdHW3G8CndkwdaeLkVBi5A9u2jwtlS7SLhBc8b5U/GcoL39Q+1CSO3hYqePNP+eV5YI7Zgm0ea6kMHoA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [freebsd] - - '@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.1': - resolution: {integrity: sha512-g4Cv2fO37ZsUENQ2vwPnZc2zRenHyAxHcyBjKcjaSmmkKrFr64yvzeNO8S3GBFCo90rfochLs99wFVGT/0owpg==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] + '@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.2': + resolution: {integrity: sha512-JaqcWPDZENCvm++lFFGjrDd8mxtf+CtLd2MiXvMNTBD33dContTZ9TWETwNFwg7JTJT5Q9HEecH7FA+HTSsIUw==} + engines: {node: '>= 12'} - '@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.1': - resolution: {integrity: sha512-WJ3CE5Oek25OGE3WwzK7oaopY8xMw9Lhb0mlYuJl/maZVo+WtP36XoQTb7bW/i8aAdHW5Z+BqrHMux23pvxG3w==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] + '@nomicfoundation/solidity-analyzer-darwin-x64@0.1.2': + resolution: {integrity: sha512-fZNmVztrSXC03e9RONBT+CiksSeYcxI1wlzqyr0L7hsQlK1fzV+f04g2JtQ1c/Fe74ZwdV6aQBdd6Uwl1052sw==} + engines: {node: '>= 12'} - '@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.1': - resolution: {integrity: sha512-5WN7leSr5fkUBBjE4f3wKENUy9HQStu7HmWqbtknfXkkil+eNWiBV275IOlpXku7v3uLsXTOKpnnGHJYI2qsdA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] + '@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.2': + resolution: {integrity: sha512-3d54oc+9ZVBuB6nbp8wHylk4xh0N0Gc+bk+/uJae+rUgbOBwQSfuGIbAZt1wBXs5REkSmynEGcqx6DutoK0tPA==} + engines: {node: '>= 12'} - '@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.1': - resolution: {integrity: sha512-KdYMkJOq0SYPQMmErv/63CwGwMm5XHenEna9X9aB8mQmhDBrYrlAOSsIPgFCUSL0hjxE3xHP65/EPXR/InD2+w==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] + '@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.2': + resolution: {integrity: sha512-iDJfR2qf55vgsg7BtJa7iPiFAsYf2d0Tv/0B+vhtnI16+wfQeTbP7teookbGvAo0eJo7aLLm0xfS/GTkvHIucA==} + engines: {node: '>= 12'} - '@nomicfoundation/solidity-analyzer-win32-arm64-msvc@0.1.1': - resolution: {integrity: sha512-VFZASBfl4qiBYwW5xeY20exWhmv6ww9sWu/krWSesv3q5hA0o1JuzmPHR4LPN6SUZj5vcqci0O6JOL8BPw+APg==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] + '@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.2': + resolution: {integrity: sha512-9dlHMAt5/2cpWyuJ9fQNOUXFB/vgSFORg1jpjX1Mh9hJ/MfZXlDdHQ+DpFCs32Zk5pxRBb07yGvSHk9/fezL+g==} + engines: {node: '>= 12'} - '@nomicfoundation/solidity-analyzer-win32-ia32-msvc@0.1.1': - resolution: {integrity: sha512-JnFkYuyCSA70j6Si6cS1A9Gh1aHTEb8kOTBApp/c7NRTFGNMH8eaInKlyuuiIbvYFhlXW4LicqyYuWNNq9hkpQ==} - engines: {node: '>= 10'} - cpu: [ia32] - os: [win32] + '@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.2': + resolution: {integrity: sha512-GzzVeeJob3lfrSlDKQw2bRJ8rBf6mEYaWY+gW0JnTDHINA0s2gPR4km5RLIj1xeZZOYz4zRw+AEeYgLRqB2NXg==} + engines: {node: '>= 12'} - '@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.1': - resolution: {integrity: sha512-HrVJr6+WjIXGnw3Q9u6KQcbZCtk0caVWhCdFADySvRyUxJ8PnzlaP+MhwNE8oyT8OZ6ejHBRrrgjSqDCFXGirw==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] + '@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.2': + resolution: {integrity: sha512-Fdjli4DCcFHb4Zgsz0uEJXZ2K7VEO+w5KVv7HmT7WO10iODdU9csC2az4jrhEsRtiR9Gfd74FlG0NYlw1BMdyA==} + engines: {node: '>= 12'} - '@nomicfoundation/solidity-analyzer@0.1.1': - resolution: {integrity: sha512-1LMtXj1puAxyFusBgUIy5pZk3073cNXYnXUpuNKFghHbIit/xZgbk0AokpUADbNm3gyD6bFWl3LRFh3dhVdREg==} + '@nomicfoundation/solidity-analyzer@0.1.2': + resolution: {integrity: sha512-q4n32/FNKIhQ3zQGGw5CvPF6GTvDCpYwIf7bEY/dZTZbgfDsHyjJwURxUJf3VQuuJj+fDIFl4+KkBVbw4Ef6jA==} engines: {node: '>= 12'} - '@openzeppelin/defender-base-client@1.54.1': - resolution: {integrity: sha512-DRGz/7KN3ZQwu28YWMOaojrC7jjPkz/uCwkC8/C8B11qwZhA5qIVvyhYHhhFOCl0J84+E3TNdvkPD2q3p2WaJw==} + '@openzeppelin/defender-base-client@1.54.6': + resolution: {integrity: sha512-PTef+rMxkM5VQ7sLwLKSjp2DBakYQd661ZJiSRywx+q/nIpm3B/HYGcz5wPZCA5O/QcEP6TatXXDoeMwimbcnw==} + deprecated: This package has been deprecated and will no longer be maintained, please use @openzeppelin/defender-sdk + package instead. - '@openzeppelin/defender-relay-client@1.54.1': - resolution: {integrity: sha512-v8VK0OEPfeK81EfzfQA8ieWrXPXY38EA3fXcOrBBFkFTDMJib2zno7Ust9gnyjItvd1o5MyCY1VdxEtamAwyHw==} + '@openzeppelin/defender-relay-client@1.54.6': + resolution: {integrity: sha512-eLmR8RPqkwo8TIFVLdyi0GhHZAF+5pDHR1iI2uP4YVyknUl6s5yIz+OsGCX539WA2HgJtp6ct2ufBaEQ4tIaCA==} + deprecated: This package has been deprecated and will no longer be maintained, please use @openzeppelin/defender-sdk + package instead. peerDependencies: '@ethersproject/abstract-provider': ^5.6.1 '@ethersproject/abstract-signer': ^5.6.2 @@ -1325,13 +1461,16 @@ packages: web3-core: ^1.8.2 web3-core-helpers: ^1.8.2 - '@pkgjs/parseargs@0.11.0': - resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} - engines: {node: '>=14'} + '@pkgr/core@0.1.1': + resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} '@rauschma/stringio@1.4.0': resolution: {integrity: sha512-3uor2f/MXZkmX5RJf8r+OC3WvZVzpSme0yyL0rQDPEnatE02qRcqwEwnsgpgriEck0S/n4vWtUd6tTtrJwk45Q==} + '@rtsao/scc@1.1.0': + resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} + '@samverschueren/stream-to-observable@0.3.1': resolution: {integrity: sha512-c/qwwcHyafOQuVQJj0IlBjf5yYgBI7YPJ77k4fOJYesb41jio65eaJODRUmfYKhTOFBrIZ66kgvGPlNbjuoRdQ==} engines: {node: '>=6'} @@ -1344,27 +1483,30 @@ packages: zen-observable: optional: true - '@scure/base@1.1.6': - resolution: {integrity: sha512-ok9AWwhcgYuGG3Zfhyqg+zwl+Wn5uE+dwC0NV/2qQkx4dABbb/bx96vWu8NSj+BNjjSjno+JRYRjle1jV08k3g==} + '@scure/base@1.1.9': + resolution: {integrity: sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==} + + '@scure/base@1.2.1': + resolution: {integrity: sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ==} '@scure/bip32@1.1.5': resolution: {integrity: sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==} - '@scure/bip32@1.3.3': - resolution: {integrity: sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ==} - '@scure/bip32@1.4.0': resolution: {integrity: sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==} + '@scure/bip32@1.6.0': + resolution: {integrity: sha512-82q1QfklrUUdXJzjuRU7iG7D7XiFx5PHYVS0+oeNKhyDLT7WPqs6pBcM2W5ZdwOwKCwoE1Vy1se+DHjcXwCYnA==} + '@scure/bip39@1.1.1': resolution: {integrity: sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==} - '@scure/bip39@1.2.2': - resolution: {integrity: sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==} - '@scure/bip39@1.3.0': resolution: {integrity: sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==} + '@scure/bip39@1.5.0': + resolution: {integrity: sha512-Dop+ASYhnrwm9+HA/HwXg7j2ZqM6yk2fyLWb5znexjctFY3+E+eU8cIWI0Pql0Qx4hPZCijlGq4OL71g+Uz30A==} + '@sentry/core@5.30.0': resolution: {integrity: sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==} engines: {node: '>=6'} @@ -1406,9 +1548,9 @@ packages: '@sinonjs/fake-timers@10.3.0': resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} - '@smithy/types@2.12.0': - resolution: {integrity: sha512-QwYgloJ0sVNBeBuBs65cIkTbfzV/Q6ZNPCJ99EICFEdJYG50nGIY/uYXp+TbsdJReIuPr0a0kXmCvren3MbRRw==} - engines: {node: '>=14.0.0'} + '@smithy/types@3.7.1': + resolution: {integrity: sha512-XKLcLXZY7sUQgvvWyeaL/qwNPp6V3dWcUjqrQKjSb+tzYiCy340R/c64LV5j+Tnb2GhmunEX0eou+L+m2hJNYA==} + engines: {node: '>=16.0.0'} '@szmarczak/http-timer@4.0.6': resolution: {integrity: sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==} @@ -1418,18 +1560,6 @@ packages: resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} engines: {node: '>= 10'} - '@tsconfig/node10@1.0.11': - resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} - - '@tsconfig/node12@1.0.11': - resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} - - '@tsconfig/node14@1.0.3': - resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} - - '@tsconfig/node16@1.0.4': - resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} - '@types/babel__core@7.20.5': resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} @@ -1439,14 +1569,14 @@ packages: '@types/babel__template@7.4.4': resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} - '@types/babel__traverse@7.20.5': - resolution: {integrity: sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==} + '@types/babel__traverse@7.20.6': + resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} '@types/bn.js@4.11.6': resolution: {integrity: sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==} - '@types/bn.js@5.1.5': - resolution: {integrity: sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==} + '@types/bn.js@5.1.6': + resolution: {integrity: sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==} '@types/cacheable-request@6.0.3': resolution: {integrity: sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==} @@ -1454,11 +1584,11 @@ packages: '@types/eslint-scope@3.7.7': resolution: {integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==} - '@types/eslint@8.56.10': - resolution: {integrity: sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==} + '@types/eslint@9.6.1': + resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==} - '@types/estree@1.0.5': - resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} '@types/glob@7.2.0': resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} @@ -1478,8 +1608,8 @@ packages: '@types/istanbul-reports@3.0.4': resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} - '@types/jest@29.5.12': - resolution: {integrity: sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==} + '@types/jest@29.5.14': + resolution: {integrity: sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==} '@types/jsdom@20.0.1': resolution: {integrity: sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==} @@ -1505,8 +1635,11 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@20.12.12': - resolution: {integrity: sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==} + '@types/node@22.10.1': + resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==} + + '@types/node@22.7.5': + resolution: {integrity: sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==} '@types/pbkdf2@3.1.2': resolution: {integrity: sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew==} @@ -1523,21 +1656,21 @@ packages: '@types/tough-cookie@4.0.5': resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==} - '@types/unist@2.0.10': - resolution: {integrity: sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==} + '@types/unist@2.0.11': + resolution: {integrity: sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==} '@types/yargs-parser@21.0.3': resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} - '@types/yargs@17.0.32': - resolution: {integrity: sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==} + '@types/yargs@17.0.33': + resolution: {integrity: sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==} - '@typescript-eslint/eslint-plugin@7.11.0': - resolution: {integrity: sha512-P+qEahbgeHW4JQ/87FuItjBj8O3MYv5gELDzr8QaQ7fsll1gSMTYb6j87MYyxwf3DtD7uGFB9ShwgmCJB5KmaQ==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/eslint-plugin@8.16.0': + resolution: {integrity: sha512-5YTHKV8MYlyMI6BaEG7crQ9BhSc8RxzshOReKwZwRWN0+XvvTOm+L/UYLCYxFpfwYuAAqhxiq4yae0CMFwbL7Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^7.0.0 - eslint: ^8.56.0 + '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 typescript: '*' peerDependenciesMeta: typescript: @@ -1553,11 +1686,11 @@ packages: typescript: optional: true - '@typescript-eslint/parser@7.11.0': - resolution: {integrity: sha512-yimw99teuaXVWsBcPO1Ais02kwJ1jmNA1KxE7ng0aT7ndr1pT1wqj0OJnsYVGKKlc4QJai86l/025L6z8CljOg==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/parser@8.16.0': + resolution: {integrity: sha512-D7DbgGFtsqIPIFMPJwCad9Gfi/hC0PWErRRHFnaCWoEDYi5tQUDiJCTmGUbBiLzjqAck4KcXt9Ayj0CNlIrF+w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 + eslint: ^8.57.0 || ^9.0.0 typescript: '*' peerDependenciesMeta: typescript: @@ -1567,15 +1700,15 @@ packages: resolution: {integrity: sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/scope-manager@7.11.0': - resolution: {integrity: sha512-27tGdVEiutD4POirLZX4YzT180vevUURJl4wJGmm6TrQoiYwuxTIY98PBp6L2oN+JQxzE0URvYlzJaBHIekXAw==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/scope-manager@8.16.0': + resolution: {integrity: sha512-mwsZWubQvBki2t5565uxF0EYvG+FwdFb8bMtDuGQLdCCnGPrDEDvm1gtfynuKlnpzeBRqdFCkMf9jg1fnAK8sg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@7.11.0': - resolution: {integrity: sha512-WmppUEgYy+y1NTseNMJ6mCFxt03/7jTOy08bcg7bxJJdsM4nuhnchyBbE8vryveaJUf62noH7LodPSo5Z0WUCg==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/type-utils@8.16.0': + resolution: {integrity: sha512-IqZHGG+g1XCWX9NyqnI/0CX5LL8/18awQqmkZSl2ynn8F76j579dByc0jhfVSnSnhf7zv76mKBQv9HQFKvDCgg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 + eslint: ^8.57.0 || ^9.0.0 typescript: '*' peerDependenciesMeta: typescript: @@ -1585,13 +1718,9 @@ packages: resolution: {integrity: sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/types@7.11.0': - resolution: {integrity: sha512-MPEsDRZTyCiXkD4vd3zywDCifi7tatc4K37KqTprCvaXptP7Xlpdw0NR2hRJTetG5TxbWDB79Ys4kLmHliEo/w==} - engines: {node: ^18.18.0 || >=20.0.0} - - '@typescript-eslint/types@7.8.0': - resolution: {integrity: sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/types@8.16.0': + resolution: {integrity: sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/typescript-estree@2.6.1': resolution: {integrity: sha512-+sTnssW6bcbDZKE8Ce7VV6LdzkQz2Bxk7jzk1J8H1rovoTxnm6iXvYIyncvNsaB/kBCOM63j/LNJfm27bNdUoA==} @@ -1611,96 +1740,100 @@ packages: typescript: optional: true - '@typescript-eslint/typescript-estree@7.11.0': - resolution: {integrity: sha512-cxkhZ2C/iyi3/6U9EPc5y+a6csqHItndvN/CzbNXTNrsC3/ASoYQZEt9uMaEp+xFNjasqQyszp5TumAVKKvJeQ==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/typescript-estree@8.16.0': + resolution: {integrity: sha512-E2+9IzzXMc1iaBy9zmo+UYvluE3TW7bCGWSF41hVWUE01o8nzr1rvOQYSxelxr6StUvRcTMe633eY8mXASMaNw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true - '@typescript-eslint/utils@7.11.0': - resolution: {integrity: sha512-xlAWwPleNRHwF37AhrZurOxA1wyXowW4PqVXZVUNCLjB48CqdPJoJWkrpH2nij9Q3Lb7rtWindtoXwxjxlKKCA==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/utils@8.16.0': + resolution: {integrity: sha512-C1zRy/mOL8Pj157GiX4kaw7iyRLKfJXBR3L82hk5kS/GyHcOFmy4YUq/zfZti72I9wnuQtA/+xzft4wCC8PJdA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true '@typescript-eslint/visitor-keys@6.21.0': resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/visitor-keys@7.11.0': - resolution: {integrity: sha512-7syYk4MzjxTEk0g/w3iqtgxnFQspDJfn6QKD36xMuuhTzjcxY7F8EmBLnALjVyaOF1/bVocu3bS/2/F7rXrveQ==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/visitor-keys@8.16.0': + resolution: {integrity: sha512-pq19gbaMOmFE3CbL0ZB8J8BFCo2ckfHBfaIsaOZgBIF4EoISJIdLX5xRhd0FGB0LlHReNRuzoJoMGpTjq8F2CQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - '@webassemblyjs/ast@1.12.1': - resolution: {integrity: sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==} + '@webassemblyjs/ast@1.14.1': + resolution: {integrity: sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==} - '@webassemblyjs/floating-point-hex-parser@1.11.6': - resolution: {integrity: sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==} + '@webassemblyjs/floating-point-hex-parser@1.13.2': + resolution: {integrity: sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==} - '@webassemblyjs/helper-api-error@1.11.6': - resolution: {integrity: sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==} + '@webassemblyjs/helper-api-error@1.13.2': + resolution: {integrity: sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==} - '@webassemblyjs/helper-buffer@1.12.1': - resolution: {integrity: sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==} + '@webassemblyjs/helper-buffer@1.14.1': + resolution: {integrity: sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==} - '@webassemblyjs/helper-numbers@1.11.6': - resolution: {integrity: sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==} + '@webassemblyjs/helper-numbers@1.13.2': + resolution: {integrity: sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==} - '@webassemblyjs/helper-wasm-bytecode@1.11.6': - resolution: {integrity: sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==} + '@webassemblyjs/helper-wasm-bytecode@1.13.2': + resolution: {integrity: sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==} - '@webassemblyjs/helper-wasm-section@1.12.1': - resolution: {integrity: sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==} + '@webassemblyjs/helper-wasm-section@1.14.1': + resolution: {integrity: sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==} - '@webassemblyjs/ieee754@1.11.6': - resolution: {integrity: sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==} + '@webassemblyjs/ieee754@1.13.2': + resolution: {integrity: sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==} - '@webassemblyjs/leb128@1.11.6': - resolution: {integrity: sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==} + '@webassemblyjs/leb128@1.13.2': + resolution: {integrity: sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==} - '@webassemblyjs/utf8@1.11.6': - resolution: {integrity: sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==} + '@webassemblyjs/utf8@1.13.2': + resolution: {integrity: sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==} - '@webassemblyjs/wasm-edit@1.12.1': - resolution: {integrity: sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==} + '@webassemblyjs/wasm-edit@1.14.1': + resolution: {integrity: sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==} - '@webassemblyjs/wasm-gen@1.12.1': - resolution: {integrity: sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==} + '@webassemblyjs/wasm-gen@1.14.1': + resolution: {integrity: sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==} - '@webassemblyjs/wasm-opt@1.12.1': - resolution: {integrity: sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==} + '@webassemblyjs/wasm-opt@1.14.1': + resolution: {integrity: sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==} - '@webassemblyjs/wasm-parser@1.12.1': - resolution: {integrity: sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==} + '@webassemblyjs/wasm-parser@1.14.1': + resolution: {integrity: sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==} - '@webassemblyjs/wast-printer@1.12.1': - resolution: {integrity: sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==} + '@webassemblyjs/wast-printer@1.14.1': + resolution: {integrity: sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==} '@webpack-cli/configtest@2.1.1': resolution: {integrity: sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==} engines: {node: '>=14.15.0'} peerDependencies: - webpack: 5.x.x + webpack: '>=5.94.0' webpack-cli: 5.x.x '@webpack-cli/info@2.0.2': resolution: {integrity: sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==} engines: {node: '>=14.15.0'} peerDependencies: - webpack: 5.x.x + webpack: '>=5.94.0' webpack-cli: 5.x.x '@webpack-cli/serve@2.0.5': resolution: {integrity: sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==} engines: {node: '>=14.15.0'} peerDependencies: - webpack: 5.x.x + webpack: '>=5.94.0' webpack-cli: 5.x.x webpack-dev-server: '*' peerDependenciesMeta: @@ -1717,24 +1850,19 @@ packages: resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==} deprecated: Use your platform's native atob() and btoa() methods instead - abortcontroller-polyfill@1.7.5: - resolution: {integrity: sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ==} + abortcontroller-polyfill@1.7.6: + resolution: {integrity: sha512-Zypm+LjYdWAzvuypZvDN0smUJrhOurcuBWhhMRBExqVLRvdjp3Z9mASxKyq19K+meZMshwjjy5S0lkm388zE4Q==} acorn-globals@7.0.1: resolution: {integrity: sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==} - acorn-import-assertions@1.9.0: - resolution: {integrity: sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==} - peerDependencies: - acorn: ^8 - acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - acorn-walk@8.3.2: - resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} + acorn-walk@8.3.4: + resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} engines: {node: '>=0.4.0'} acorn@7.4.1: @@ -1742,8 +1870,8 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - acorn@8.11.3: - resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} + acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} engines: {node: '>=0.4.0'} hasBin: true @@ -1751,17 +1879,13 @@ packages: resolution: {integrity: sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==} engines: {node: '>=0.3.0'} - aes-js@3.0.0: - resolution: {integrity: sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==} + aes-js@4.0.0-beta.5: + resolution: {integrity: sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==} agent-base@6.0.2: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} - agent-base@7.1.1: - resolution: {integrity: sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==} - engines: {node: '>= 14'} - aggregate-error@3.1.0: resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} engines: {node: '>=8'} @@ -1774,6 +1898,9 @@ packages: ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + ajv@8.12.0: + resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} + amazon-cognito-identity-js@6.3.12: resolution: {integrity: sha512-s7NKDZgx336cp+oDeUtB2ZzT8jWJp/v2LWuYl+LQtMEODe22RF1IJ4nRiDATp+rp1pTffCZcm44Quw4jx2bqNg==} @@ -1790,10 +1917,6 @@ packages: ansi-align@3.0.1: resolution: {integrity: sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==} - ansi-colors@4.1.1: - resolution: {integrity: sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==} - engines: {node: '>=6'} - ansi-colors@4.1.3: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} engines: {node: '>=6'} @@ -1822,8 +1945,8 @@ packages: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} - ansi-regex@6.0.1: - resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} + ansi-regex@6.1.0: + resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} engines: {node: '>=12'} ansi-styles@2.2.1: @@ -1866,9 +1989,6 @@ packages: resolution: {integrity: sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==} engines: {node: '>=14'} - arg@4.1.3: - resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} - argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} @@ -1929,6 +2049,9 @@ packages: async-retry@1.3.3: resolution: {integrity: sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw==} + async@3.2.6: + resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} + asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} @@ -1936,11 +2059,11 @@ packages: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} - axios@1.6.2: - resolution: {integrity: sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==} + axios@1.7.4: + resolution: {integrity: sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==} - axios@1.6.8: - resolution: {integrity: sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==} + axios@1.7.8: + resolution: {integrity: sha512-Uu0wb7KNqK2t5K+YQyVCLM76prD5sRFjKHbJYCP1J7JFGEQ6nN7HWn9+04LAeiJ3ji54lgS/gZCH1oxyrf1SPw==} babel-jest@29.7.0: resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} @@ -1956,23 +2079,23 @@ packages: resolution: {integrity: sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - babel-plugin-polyfill-corejs2@0.4.11: - resolution: {integrity: sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q==} + babel-plugin-polyfill-corejs2@0.4.12: + resolution: {integrity: sha512-CPWT6BwvhrTO2d8QVorhTCQw9Y43zOu7G9HigcfxvepOU6b8o3tcWad6oVgZIsZCTt42FFv97aA7ZJsbM4+8og==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - babel-plugin-polyfill-corejs3@0.10.4: - resolution: {integrity: sha512-25J6I8NGfa5YkCDogHRID3fVCadIR8/pGl1/spvCkzb6lVn6SR3ojpx9nOn9iEBcUsjY24AmdKm5khcfKdylcg==} + babel-plugin-polyfill-corejs3@0.10.6: + resolution: {integrity: sha512-b37+KR2i/khY5sKmWNVQAnitvquQbNdWy6lJdsr0kmquCKEEUgMKK4SboVM3HtfnZilfjr4MMQ7vY58FVWDtIA==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - babel-plugin-polyfill-regenerator@0.6.2: - resolution: {integrity: sha512-2R25rQZWP63nGwaAswvDazbPXfrM3HwVoBXK6HcqeKrSrL/JqcC/rDcf95l4r7LXLyxDXc8uQDa064GubtCABg==} + babel-plugin-polyfill-regenerator@0.6.3: + resolution: {integrity: sha512-LiWSbl4CRSIa5x/JAU6jZiG9eit9w6mz+yVMFwDE83LAWvt0AfGBoZ7HS/mkhrKuh2ZlzfVZYKoLjXdqw6Yt7Q==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - babel-preset-current-node-syntax@1.0.1: - resolution: {integrity: sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==} + babel-preset-current-node-syntax@1.1.0: + resolution: {integrity: sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==} peerDependencies: '@babel/core': ^7.0.0 @@ -1988,8 +2111,8 @@ packages: balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - base-x@3.0.9: - resolution: {integrity: sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==} + base-x@3.0.10: + resolution: {integrity: sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==} base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} @@ -2010,8 +2133,8 @@ packages: bn.js@4.11.6: resolution: {integrity: sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==} - bn.js@4.12.0: - resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} + bn.js@4.12.1: + resolution: {integrity: sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==} bn.js@5.2.1: resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} @@ -2026,8 +2149,8 @@ packages: brace-expansion@2.0.1: resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} - braces@3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} brorand@1.1.0: @@ -2039,8 +2162,8 @@ packages: browserify-aes@1.2.0: resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} - browserslist@4.23.0: - resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==} + browserslist@4.24.2: + resolution: {integrity: sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -2117,8 +2240,8 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001616: - resolution: {integrity: sha512-RHVYKov7IcdNjVHJFNY/78RdG4oGVjbayxv8u5IO74Wv7Hlq4PnJE6mo/OjFijjVFNy5ijnCt6H3IIo4t+wfEw==} + caniuse-lite@1.0.30001684: + resolution: {integrity: sha512-G1LRwLIQjBQoyq0ZJGqGIJUXzJ8irpbjHLpVRXDvBEScFJ9b17sgK6vlx0GAJFE21okD7zXl08rRRUfq6HdoEQ==} chalk@1.1.3: resolution: {integrity: sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==} @@ -2156,16 +2279,16 @@ packages: chardet@0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} - chokidar@3.5.3: - resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} - engines: {node: '>= 8.10.0'} - chokidar@3.6.0: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} - chrome-trace-event@1.0.3: - resolution: {integrity: sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==} + chokidar@4.0.1: + resolution: {integrity: sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==} + engines: {node: '>= 14.16.0'} + + chrome-trace-event@1.0.4: + resolution: {integrity: sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==} engines: {node: '>=6.0'} ci-info@2.0.0: @@ -2175,15 +2298,20 @@ packages: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} - cipher-base@1.0.4: - resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} + ci@2.3.0: + resolution: {integrity: sha512-0MGXkzJKkwV3enG7RUxjJKdiAkbaZ7visCjitfpCN2BQjv02KGRMxCHLv4RPokkjJ4xR33FLMAXweS+aQ0pFSQ==} + hasBin: true + + cipher-base@1.0.6: + resolution: {integrity: sha512-3Ek9H3X6pj5TgenXYtNWdaBon1tgYCaebd+XPg0keyjEbEfkD4KkmAxkQ/i1vYvxdcT5nscLBfq9VJRmCBcFSw==} + engines: {node: '>= 0.10'} cjk-regex@2.0.0: resolution: {integrity: sha512-E4gFi2f3jC0zFVHpaAcupW+gv9OejZ2aV3DP/LlSO0dDcZJAXw7W0ivn+vN17edN/PhU4HCgs1bfx7lPK7FpdA==} engines: {node: '>= 4'} - cjs-module-lexer@1.3.1: - resolution: {integrity: sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==} + cjs-module-lexer@1.4.1: + resolution: {integrity: sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==} clean-stack@2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} @@ -2201,9 +2329,9 @@ packages: resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} engines: {node: '>=8'} - cli-cursor@4.0.0: - resolution: {integrity: sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + cli-cursor@5.0.0: + resolution: {integrity: sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==} + engines: {node: '>=18'} cli-spinners@2.9.2: resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} @@ -2272,11 +2400,16 @@ packages: resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} engines: {node: '>=14'} + commander@12.1.0: + resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} + engines: {node: '>=18'} + commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - commander@3.0.2: - resolution: {integrity: sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==} + commander@8.3.0: + resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} + engines: {node: '>= 12'} comment-parser@1.4.1: resolution: {integrity: sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==} @@ -2295,12 +2428,12 @@ packages: convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} - cookie@0.4.2: - resolution: {integrity: sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==} - engines: {node: '>= 0.6'} + cookie@1.0.2: + resolution: {integrity: sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==} + engines: {node: '>=18'} - core-js-compat@3.37.0: - resolution: {integrity: sha512-vYq4L+T8aS5UuFg4UwDhc7YNRWVeVZwltad9C/jV3R2LgVOpS9BDr7l/WL6BN0dbV3k1XejPTHqqEzJgsa0frA==} + core-js-compat@3.39.0: + resolution: {integrity: sha512-VgEUx3VwlExr5no0tXlBt+silBvhTryPwCXRI2Id1PN8WTKu7MreethvddqOubrYxkFdv/RnYrqlv1sFNAUelw==} cosmiconfig@5.2.1: resolution: {integrity: sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==} @@ -2317,18 +2450,11 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true - create-require@1.1.1: - resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} - cross-fetch@4.0.0: resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==} - cross-spawn@6.0.5: - resolution: {integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==} - engines: {node: '>=4.8'} - - cross-spawn@7.0.3: - resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} cssom@0.3.8: @@ -2341,10 +2467,6 @@ packages: resolution: {integrity: sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==} engines: {node: '>=8'} - cssstyle@4.0.1: - resolution: {integrity: sha512-8ZYiJ3A/3OkDd093CBT/0UKDWry7ak4BdPTFP2+QEP7cmhouyq/Up709ASSj2cK02BbZiMgk7kYjZNS4QP5qrQ==} - engines: {node: '>=18'} - d@1.0.2: resolution: {integrity: sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==} engines: {node: '>=0.12'} @@ -2357,10 +2479,6 @@ packages: resolution: {integrity: sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==} engines: {node: '>=12'} - data-urls@5.0.0: - resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==} - engines: {node: '>=18'} - data-view-buffer@1.0.1: resolution: {integrity: sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==} engines: {node: '>= 0.4'} @@ -2392,8 +2510,8 @@ packages: supports-color: optional: true - debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + debug@4.3.7: + resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} engines: {node: '>=6.0'} peerDependencies: supports-color: '*' @@ -2466,8 +2584,8 @@ packages: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} - diff@5.0.0: - resolution: {integrity: sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==} + diff@5.2.0: + resolution: {integrity: sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==} engines: {node: '>=0.3.1'} dir-glob@3.0.1: @@ -2504,25 +2622,27 @@ packages: resolution: {integrity: sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==} hasBin: true - electron-to-chromium@1.4.757: - resolution: {integrity: sha512-jftDaCknYSSt/+KKeXzH3LX5E2CvRLm75P3Hj+J/dv3CL0qUYcOt13d5FN1NiL5IJbbhzHrb3BomeG2tkSlZmw==} + ejs@3.1.10: + resolution: {integrity: sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==} + engines: {node: '>=0.10.0'} + hasBin: true + + electron-to-chromium@1.5.67: + resolution: {integrity: sha512-nz88NNBsD7kQSAGGJyp8hS6xSPtWwqNogA0mjtc2nUYeEf3nURK9qpV18TuBdDmEDgVWotS8Wkzf+V52dSQ/LQ==} elegant-spinner@1.0.1: resolution: {integrity: sha512-B+ZM+RXvRqQaAmkMlO/oSe5nMUOaUnyfGYCEHoR8wrXsZR2mA0XVibsxV1bvTwxdRWah1PkQqso2EzhILGHtEQ==} engines: {node: '>=0.10.0'} - elliptic@6.5.4: - resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} - - elliptic@6.5.5: - resolution: {integrity: sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw==} + elliptic@6.6.1: + resolution: {integrity: sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==} emittery@0.13.1: resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} engines: {node: '>=12'} - emoji-regex@10.3.0: - resolution: {integrity: sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==} + emoji-regex@10.4.0: + resolution: {integrity: sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==} emoji-regex@7.0.3: resolution: {integrity: sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==} @@ -2536,8 +2656,8 @@ packages: end-of-stream@1.4.4: resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} - enhanced-resolve@5.16.0: - resolution: {integrity: sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==} + enhanced-resolve@5.17.1: + resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==} engines: {node: '>=10.13.0'} enquirer@2.4.1: @@ -2552,16 +2672,16 @@ packages: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} - envinfo@7.13.0: - resolution: {integrity: sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q==} + envinfo@7.14.0: + resolution: {integrity: sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==} engines: {node: '>=4'} hasBin: true error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} - es-abstract@1.23.3: - resolution: {integrity: sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==} + es-abstract@1.23.5: + resolution: {integrity: sha512-vlmniQ0WNPwXqA0BnmwV3Ng7HxiGlh6r5U6JcTMNx8OilcAGqVJBHJcPjqOMaczU9fRuRK5Px2BdVyPRnKMMVQ==} engines: {node: '>= 0.4'} es-define-property@1.0.0: @@ -2572,8 +2692,8 @@ packages: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} - es-module-lexer@1.5.2: - resolution: {integrity: sha512-l60ETUTmLqbVbVHv1J4/qj+M8nq7AwMzEcg3kmJDt9dCNrTk+yHcYFf/Kw75pMDwd9mPcIGCG5LcS20SxYRzFA==} + es-module-lexer@1.5.4: + resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==} es-object-atoms@1.0.0: resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} @@ -2586,8 +2706,8 @@ packages: es-shim-unscopables@1.0.2: resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} - es-to-primitive@1.2.1: - resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} + es-to-primitive@1.3.0: + resolution: {integrity: sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==} engines: {node: '>= 0.4'} es5-ext@0.10.64: @@ -2604,8 +2724,13 @@ packages: resolution: {integrity: sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==} engines: {node: '>=0.12'} - escalade@3.1.2: - resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} + esbuild@0.23.1: + resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} + engines: {node: '>=18'} + hasBin: true + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} escape-string-regexp@1.0.5: @@ -2625,8 +2750,8 @@ packages: engines: {node: '>=6.0'} hasBin: true - eslint-compat-utils@0.5.0: - resolution: {integrity: sha512-dc6Y8tzEcSYZMHa+CMPLi/hyo1FzNeonbhJL7Ol0ccuKQkwopJcJBA9YL/xmMTLU1eKigXo9vj9nALElWYSowg==} + eslint-compat-utils@0.5.1: + resolution: {integrity: sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==} engines: {node: '>=12'} peerDependencies: eslint: '>=6.0.0' @@ -2663,8 +2788,8 @@ packages: eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} - eslint-module-utils@2.8.1: - resolution: {integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==} + eslint-module-utils@2.12.0: + resolution: {integrity: sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -2684,8 +2809,8 @@ packages: eslint-import-resolver-webpack: optional: true - eslint-plugin-es-x@7.6.0: - resolution: {integrity: sha512-I0AmeNgevgaTR7y2lrVCJmGYF0rjoznpDvqV/kIkZSZbZ8Rw3eu4cGlvBBULScfkSOCzqKbff5LR4CNrV7mZHA==} + eslint-plugin-es-x@7.8.0: + resolution: {integrity: sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: eslint: '>=8' @@ -2696,18 +2821,18 @@ packages: peerDependencies: eslint: '>=4.19.1' - eslint-plugin-import@2.29.1: - resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} + eslint-plugin-import@2.31.0: + resolution: {integrity: sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 peerDependenciesMeta: '@typescript-eslint/parser': optional: true - eslint-plugin-jsdoc@48.2.6: - resolution: {integrity: sha512-GNk9jtpYmoEVeD/U6yYYmd6T8vSOoPs7CL8ZeX85iD8P3qifDdLQGze6+cw9boobDthmYnnxvIoHrhuSffj09g==} + eslint-plugin-jsdoc@50.6.0: + resolution: {integrity: sha512-tCNp4fR79Le3dYTPB0dKEv7yFyvGkUCa+Z3yuTrrNGGOxBlXo9Pn0PEgroOZikUQOGjxoGMVKNjrOHcYEdfszg==} engines: {node: '>=18'} peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 @@ -2724,12 +2849,15 @@ packages: peerDependencies: eslint: '>=5.16.0' - eslint-plugin-promise@6.2.0: - resolution: {integrity: sha512-QmAqwizauvnKOlifxyDj2ObfULpHQawlg/zQdgEixur9vl0CvZGv/LCJV2rtj3210QCoeGBzVMfMXqGAOr/4fA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-plugin-promise@7.2.1: + resolution: {integrity: sha512-SWKjd+EuvWkYaS+uN2csvj0KoP43YTu7+phKQ5v+xw6+A0gutVX2yqCeCkC3uLCJFiPfR2dD8Es5L7yUsmvEaA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 + eslint-plugin-tsdoc@0.4.0: + resolution: {integrity: sha512-MT/8b4aKLdDClnS8mP3R/JNjg29i0Oyqd/0ym6NnQf+gfKbJJ4ZcSh2Bs1H0YiUMTBwww5JwXGTWot/RwyJ7aQ==} + eslint-scope@5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} @@ -2738,6 +2866,10 @@ packages: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-scope@8.2.0: + resolution: {integrity: sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-utils@1.4.3: resolution: {integrity: sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==} engines: {node: '>=6'} @@ -2754,20 +2886,42 @@ packages: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-visitor-keys@4.2.0: + resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint@6.8.0: resolution: {integrity: sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==} engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for + other options. hasBin: true - eslint@8.57.0: - resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} + eslint@8.57.1: + resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for + other options. + hasBin: true + + eslint@9.16.0: + resolution: {integrity: sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true esniff@2.0.1: resolution: {integrity: sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==} engines: {node: '>=0.10'} + espree@10.3.0: + resolution: {integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@6.2.1: resolution: {integrity: sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==} engines: {node: '>=6.0.0'} @@ -2781,8 +2935,8 @@ packages: engines: {node: '>=4'} hasBin: true - esquery@1.5.0: - resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} + esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} engines: {node: '>=0.10'} esrecurse@4.3.0: @@ -2801,8 +2955,8 @@ packages: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} - ethereum-bloom-filters@1.1.0: - resolution: {integrity: sha512-J1gDRkLpuGNvWYzWslBQR9cDV4nd4kfvVTE/Wy4Kkm4yb3EYRSlyi0eB/inTsSTTVyA0+HyzHgbr95Fn/Z1fSw==} + ethereum-bloom-filters@1.2.0: + resolution: {integrity: sha512-28hyiE7HVsWubqhpVLVmZXFd4ITeHi+BUu05o9isf0GUpMtzBUi+8/gFrGaGYzvGAJQmJ3JKj77Mk9G98T84rA==} ethereum-cryptography@0.1.3: resolution: {integrity: sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==} @@ -2810,17 +2964,19 @@ packages: ethereum-cryptography@1.2.0: resolution: {integrity: sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==} - ethereum-cryptography@2.1.3: - resolution: {integrity: sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA==} + ethereum-cryptography@2.2.1: + resolution: {integrity: sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==} ethereumjs-abi@0.6.8: resolution: {integrity: sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==} + deprecated: This library has been deprecated and usage is discouraged. ethereumjs-util@6.2.1: resolution: {integrity: sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==} - ethers@5.7.2: - resolution: {integrity: sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==} + ethers@6.13.4: + resolution: {integrity: sha512-21YtnZVg4/zKkCQPjrDj38B1r4nQvTZLopUGMLQ1ePU2zV/joCfDC3t3iKQjWRzjjjbzR+mdAIoikeBRNkdllA==} + engines: {node: '>=14.0.0'} ethjs-unit@0.1.6: resolution: {integrity: sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==} @@ -2898,6 +3054,14 @@ packages: fb-watchman@2.0.2: resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} + fdir@6.4.2: + resolution: {integrity: sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + figures@1.7.0: resolution: {integrity: sha512-UxKlfCRuCBxSXU4C6t9scbDyWZ4VlaFFdojKtzJuSkuOBQ5CNFum+zZXFwHjo+CxBC1t6zlYPgHIgFjL8ggoEQ==} engines: {node: '>=0.10.0'} @@ -2918,8 +3082,15 @@ packages: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} - fill-range@7.0.1: - resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} + + filelist@1.0.4: + resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} + + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} find-parent-dir@0.3.0: @@ -2929,10 +3100,6 @@ packages: resolution: {integrity: sha512-4+yZ013W+EZc+hvdgA2RlzlgNfP1eGdMNxU6xzw1yt518cF6/xZD3kLV+bprYX5+AD0IL76xcN28TPqYJHxrHw==} hasBin: true - find-up@2.1.0: - resolution: {integrity: sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==} - engines: {node: '>=4'} - find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} @@ -2949,6 +3116,10 @@ packages: resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} engines: {node: ^10.12.0 || >=12.0.0} + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} + flat@5.0.2: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true @@ -2956,8 +3127,8 @@ packages: flatted@2.0.2: resolution: {integrity: sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==} - flatted@3.3.1: - resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} + flatted@3.3.2: + resolution: {integrity: sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==} flatten@1.0.3: resolution: {integrity: sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg==} @@ -2967,8 +3138,8 @@ packages: resolution: {integrity: sha512-iEjGZ94OBMcESxnLorXNjJmtd/JtQYXUVrQpfwvtAKkuyawRmv+2LM6nqyOsOJkISEYbyY6ziudRE0u4VyPSVA==} engines: {node: '>=0.4.0'} - follow-redirects@1.15.6: - resolution: {integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==} + follow-redirects@1.15.9: + resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==} engines: {node: '>=4.0'} peerDependencies: debug: '*' @@ -2979,20 +3150,17 @@ packages: for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} - foreground-child@3.1.1: - resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} + foreground-child@3.3.0: + resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} engines: {node: '>=14'} - form-data@4.0.0: - resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} + form-data@4.0.1: + resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==} engines: {node: '>= 6'} fp-ts@1.19.3: resolution: {integrity: sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==} - fs-extra@0.30.0: - resolution: {integrity: sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA==} - fs-extra@7.0.1: resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} engines: {node: '>=6 <7 || >=8'} @@ -3003,7 +3171,8 @@ packages: fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] + os: + - darwin function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} @@ -3026,8 +3195,8 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - get-east-asian-width@1.2.0: - resolution: {integrity: sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==} + get-east-asian-width@1.3.0: + resolution: {integrity: sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==} engines: {node: '>=18'} get-intrinsic@1.2.4: @@ -3061,8 +3230,8 @@ packages: resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} engines: {node: '>= 0.4'} - get-tsconfig@4.7.4: - resolution: {integrity: sha512-ofbkKj+0pjXjhejr007J/fLf+sW+8H7K5GCm+msC8q3IpvgjobpyPqSRFemNyIMxklC0zeJpi7VDFna19FacvQ==} + get-tsconfig@4.8.1: + resolution: {integrity: sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==} glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} @@ -3075,17 +3244,14 @@ packages: glob-to-regexp@0.4.1: resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} - glob@10.3.12: - resolution: {integrity: sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==} - engines: {node: '>=16 || 14 >=14.17'} + glob@11.0.0: + resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==} + engines: {node: 20 || >=22} hasBin: true - glob@7.2.0: - resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} - deprecated: Glob versions prior to v9 are no longer supported - glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported glob@8.1.0: resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} @@ -3104,6 +3270,10 @@ packages: resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} @@ -3120,8 +3290,9 @@ packages: resolution: {integrity: sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==} engines: {node: '>=0.10.0'} - gopd@1.0.1: - resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + gopd@1.1.0: + resolution: {integrity: sha512-FQoVQnqcdk4hVM4JN1eromaun4iuS34oStkdlLENLdpULsuQcTyXj8w7ayhuUfPwEYZ1ZOooOTT6fdA9Vmx/RA==} + engines: {node: '>= 0.4'} got@11.8.6: resolution: {integrity: sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==} @@ -3142,8 +3313,8 @@ packages: engines: {node: '>=0.4.7'} hasBin: true - hardhat@2.22.3: - resolution: {integrity: sha512-k8JV2ECWNchD6ahkg2BR5wKVxY0OiKot7fuxiIpRK0frRqyOljcR2vKwgWSLw6YIeDcNNA4xybj7Og7NSxr2hA==} + hardhat@2.22.16: + resolution: {integrity: sha512-d52yQZ09u0roL6GlgJSvtknsBtIuj9JrJ/U8VMzr/wue+gO5v2tQayvOX6llerlR57Zw2EOTQjLAt6RpHvjwHA==} hasBin: true peerDependencies: ts-node: '*' @@ -3161,10 +3332,6 @@ packages: has-bigints@1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} - has-flag@1.0.0: - resolution: {integrity: sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==} - engines: {node: '>=0.10.0'} - has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} @@ -3176,8 +3343,8 @@ packages: has-property-descriptors@1.0.2: resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} - has-proto@1.0.3: - resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} + has-proto@1.1.0: + resolution: {integrity: sha512-QLdzI9IIO1Jg7f9GT1gXpPpXArAn6cS31R1eEZqz08Gc+uQ8/XiqHWt17Fiw+2p6oTTIq5GXEpQkAlA88YRl/Q==} engines: {node: '>= 0.4'} has-symbols@1.0.3: @@ -3206,9 +3373,6 @@ packages: hmac-drbg@1.0.1: resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} - hosted-git-info@2.8.9: - resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} - html-element-attributes@2.2.1: resolution: {integrity: sha512-gGTgCeQu+g1OFExZKWQ1LwbFXxLJ6cGdCGj64ByEaxatr/EPVc23D6Gxngb37ao+SNInP/sGu8FXxRsSxMm7aQ==} @@ -3216,10 +3380,6 @@ packages: resolution: {integrity: sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==} engines: {node: '>=12'} - html-encoding-sniffer@4.0.0: - resolution: {integrity: sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==} - engines: {node: '>=18'} - html-escaper@2.0.2: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} @@ -3243,10 +3403,6 @@ packages: resolution: {integrity: sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==} engines: {node: '>= 6'} - http-proxy-agent@7.0.2: - resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} - engines: {node: '>= 14'} - http2-wrapper@1.0.3: resolution: {integrity: sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==} engines: {node: '>=10.19.0'} @@ -3255,10 +3411,6 @@ packages: resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} engines: {node: '>= 6'} - https-proxy-agent@7.0.4: - resolution: {integrity: sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==} - engines: {node: '>= 14'} - human-signals@2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} @@ -3281,12 +3433,12 @@ packages: resolution: {integrity: sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==} engines: {node: '>= 4'} - ignore@5.3.1: - resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} - immutable@4.3.5: - resolution: {integrity: sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw==} + immutable@4.3.7: + resolution: {integrity: sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==} import-fresh@2.0.0: resolution: {integrity: sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg==} @@ -3296,8 +3448,8 @@ packages: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} - import-local@3.1.0: - resolution: {integrity: sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==} + import-local@3.2.0: + resolution: {integrity: sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==} engines: {node: '>=8'} hasBin: true @@ -3318,6 +3470,9 @@ packages: inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if + you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive + and powerful. inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -3354,6 +3509,10 @@ packages: is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + is-async-function@2.0.0: + resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==} + engines: {node: '>= 0.4'} + is-bigint@1.0.4: resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} @@ -3381,8 +3540,9 @@ packages: resolution: {integrity: sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==} hasBin: true - is-core-module@2.13.1: - resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} + is-core-module@2.15.1: + resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} + engines: {node: '>= 0.4'} is-data-view@1.0.1: resolution: {integrity: sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==} @@ -3403,6 +3563,10 @@ packages: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} + is-finalizationregistry@1.1.0: + resolution: {integrity: sha512-qfMdqbAQEwBw78ZyReKnlA8ezmPdb9BemzIIip/JkjaZUhitfXDkkr+3QTboW0JrSXT1QWyYShpvnNHGZ4c4yA==} + engines: {node: '>= 0.4'} + is-fullwidth-code-point@1.0.0: resolution: {integrity: sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==} engines: {node: '>=0.10.0'} @@ -3438,6 +3602,10 @@ packages: resolution: {integrity: sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==} engines: {node: '>=12'} + is-map@2.0.3: + resolution: {integrity: sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==} + engines: {node: '>= 0.4'} + is-negative-zero@2.0.3: resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} engines: {node: '>= 0.4'} @@ -3480,14 +3648,18 @@ packages: is-promise@2.2.2: resolution: {integrity: sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==} - is-regex@1.1.4: - resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} + is-regex@1.2.0: + resolution: {integrity: sha512-B6ohK4ZmoftlUe+uvenXSbPJFo6U37BH7oO1B3nQH8f/7h27N56s85MhUtbFJAziz5dcmuR3i8ovUl35zp8pFA==} engines: {node: '>= 0.4'} is-regexp@1.0.0: resolution: {integrity: sha512-7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA==} engines: {node: '>=0.10.0'} + is-set@2.0.3: + resolution: {integrity: sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==} + engines: {node: '>= 0.4'} + is-shared-array-buffer@1.0.3: resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} engines: {node: '>= 0.4'} @@ -3523,13 +3695,21 @@ packages: resolution: {integrity: sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==} engines: {node: '>=12'} - is-unicode-supported@2.0.0: - resolution: {integrity: sha512-FRdAyx5lusK1iHG0TWpVtk9+1i+GjrzRffhDg4ovQ7mcidMQ6mj+MhKPmvh7Xwyv5gIS06ns49CA7Sqg7lC22Q==} + is-unicode-supported@2.1.0: + resolution: {integrity: sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==} engines: {node: '>=18'} + is-weakmap@2.0.2: + resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} + engines: {node: '>= 0.4'} + is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + is-weakset@2.0.3: + resolution: {integrity: sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==} + engines: {node: '>= 0.4'} + is-whitespace-character@1.0.4: resolution: {integrity: sha512-SDweEzfIZM0SJV0EUga669UTKlmL0Pq8Lno0QDQsPnvECB3IM2aP0gdx5TrU0A01MAPfViaZiI2V1QMZLaKK5w==} @@ -3560,8 +3740,8 @@ packages: resolution: {integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==} engines: {node: '>=8'} - istanbul-lib-instrument@6.0.2: - resolution: {integrity: sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==} + istanbul-lib-instrument@6.0.3: + resolution: {integrity: sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==} engines: {node: '>=10'} istanbul-lib-report@3.0.1: @@ -3579,9 +3759,14 @@ packages: iterall@1.3.0: resolution: {integrity: sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==} - jackspeak@2.3.6: - resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} - engines: {node: '>=14'} + jackspeak@4.0.2: + resolution: {integrity: sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==} + engines: {node: 20 || >=22} + + jake@10.9.2: + resolution: {integrity: sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==} + engines: {node: '>=10'} + hasBin: true jest-changed-files@29.7.0: resolution: {integrity: sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==} @@ -3729,8 +3914,8 @@ packages: node-notifier: optional: true - js-base64@2.6.4: - resolution: {integrity: sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==} + jju@1.4.0: + resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} js-base64@3.7.7: resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==} @@ -3752,8 +3937,8 @@ packages: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true - jsdoc-type-pratt-parser@4.0.0: - resolution: {integrity: sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==} + jsdoc-type-pratt-parser@4.1.0: + resolution: {integrity: sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==} engines: {node: '>=12.0.0'} jsdom@20.0.3: @@ -3765,22 +3950,9 @@ packages: canvas: optional: true - jsdom@24.1.0: - resolution: {integrity: sha512-6gpM7pRXCwIOKxX47cgOyvyQDN/Eh0f1MeKySBV2xGdKtqJBLj8P25eY3EVCWo2mglDDzozR2r2MW4T+JiNUZA==} - engines: {node: '>=18'} - peerDependencies: - canvas: ^2.11.2 - peerDependenciesMeta: - canvas: - optional: true - - jsesc@0.5.0: - resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} - hasBin: true - - jsesc@2.5.2: - resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} - engines: {node: '>=4'} + jsesc@3.0.2: + resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} + engines: {node: '>=6'} hasBin: true json-buffer@3.0.1: @@ -3795,12 +3967,19 @@ packages: json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} json-stable-stringify@1.0.1: resolution: {integrity: sha512-i/J297TW6xyj7sDFa7AmBPkQvLIxWr2kKPWI26tXydnZrzVAocNqn5DMNT1Mzk0vit1V5UkRM7C1KdVNp7Lmcg==} + json-stream-stringify@3.1.6: + resolution: {integrity: sha512-x7fpwxOkbhFCaJDJ8vb1fBY3DdSa4AlITaz+HHILQJzdPMnHEFjxPwVUi1ALIbcIxDE0PNe/0i7frnY8QnBQog==} + engines: {node: '>=7.10.1'} + json5@1.0.2: resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} hasBin: true @@ -3810,9 +3989,6 @@ packages: engines: {node: '>=6'} hasBin: true - jsonfile@2.4.0: - resolution: {integrity: sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==} - jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} @@ -3834,9 +4010,6 @@ packages: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} - klaw@1.3.1: - resolution: {integrity: sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==} - kleur@3.0.3: resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} engines: {node: '>=6'} @@ -3888,18 +4061,10 @@ packages: resolution: {integrity: sha512-RmAl7su35BFd/xoMamRjpIE4j3v+L28o8CT5YhAXQJm1fD+1l9ngXY8JAQRJ+tFK2i5njvi0iRUKV09vPwA0iA==} engines: {node: '>=6'} - load-json-file@4.0.0: - resolution: {integrity: sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==} - engines: {node: '>=4'} - loader-runner@4.3.0: resolution: {integrity: sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==} engines: {node: '>=6.11.5'} - locate-path@2.0.0: - resolution: {integrity: sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==} - engines: {node: '>=4'} - locate-path@5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} @@ -3949,17 +4114,17 @@ packages: loglevel-colored-level-prefix@1.0.0: resolution: {integrity: sha512-u45Wcxxc+SdAlh4yeF/uKlC1SPUPCy0gullSNKXod5I4bmifzk+Q4lSLExNEVn19tGaJipbZ4V4jbFn79/6mVA==} - loglevel@1.9.1: - resolution: {integrity: sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==} + loglevel@1.9.2: + resolution: {integrity: sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==} engines: {node: '>= 0.6.0'} lowercase-keys@2.0.0: resolution: {integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==} engines: {node: '>=8'} - lru-cache@10.2.2: - resolution: {integrity: sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==} - engines: {node: 14 || >=16.14} + lru-cache@11.0.2: + resolution: {integrity: sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA==} + engines: {node: 20 || >=22} lru-cache@4.1.5: resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} @@ -3967,10 +4132,6 @@ packages: lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} - lru-cache@6.0.0: - resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} - engines: {node: '>=10'} - lru_map@0.3.3: resolution: {integrity: sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==} @@ -4012,8 +4173,8 @@ packages: micro-ftch@0.3.1: resolution: {integrity: sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==} - micromatch@4.0.5: - resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} mime-db@1.52.0: @@ -4032,6 +4193,10 @@ packages: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} + mimic-function@5.0.1: + resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} + engines: {node: '>=18'} + mimic-response@1.0.1: resolution: {integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==} engines: {node: '>=4'} @@ -4046,32 +4211,30 @@ packages: minimalistic-crypto-utils@1.0.1: resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} - minimatch@3.0.4: - resolution: {integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==} + minimatch@10.0.1: + resolution: {integrity: sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==} + engines: {node: 20 || >=22} minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - minimatch@5.0.1: - resolution: {integrity: sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==} + minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} engines: {node: '>=10'} minimatch@9.0.3: resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} engines: {node: '>=16 || 14 >=14.17'} - minimatch@9.0.4: - resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==} + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} - minimist@1.2.5: - resolution: {integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==} - minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - minipass@7.1.0: - resolution: {integrity: sha512-oGZRv2OT1lO2UF1zUcwdTb3wqUwI0kBGTgt/T7OdSj6M6N5m3o5uPf0AIW6lVxGGoiWUR7e2AwTE+xiwK8WQig==} + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} mkdirp@0.5.6: @@ -4081,8 +4244,8 @@ packages: mnemonist@0.38.5: resolution: {integrity: sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg==} - mocha@10.4.0: - resolution: {integrity: sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==} + mocha@10.8.2: + resolution: {integrity: sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==} engines: {node: '>= 14.0.0'} hasBin: true @@ -4093,9 +4256,6 @@ packages: ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} - ms@2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -4110,6 +4270,11 @@ packages: resolution: {integrity: sha512-ISDqGcspVu6U3VKqtJZG1uR55SmNNF9uK0EMq1IvNVVZOui6MW6VR0+pIZhqz85ORAGp+4zW+5fJ/SE7bwEibA==} engines: {node: '>=6.x.x'} + nanoid@3.3.8: + resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} @@ -4119,12 +4284,12 @@ packages: next-tick@1.1.0: resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} - nice-try@1.0.5: - resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} - node-addon-api@2.0.2: resolution: {integrity: sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==} + node-addon-api@5.1.0: + resolution: {integrity: sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==} + node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} @@ -4134,23 +4299,20 @@ packages: encoding: optional: true - node-gyp-build@4.8.1: - resolution: {integrity: sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==} + node-gyp-build@4.8.4: + resolution: {integrity: sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==} hasBin: true node-int64@0.4.0: resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} - node-releases@2.0.14: - resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} + node-releases@2.0.18: + resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==} - node-ts@6.0.1: - resolution: {integrity: sha512-nxFz4tJYv9Yu6u4e3B1rmfh45Zmge7rD/MlTA5V98+Q5eFsqzCWTWDYvbrNEPGtnzhkqNLk4E2r3C6VSfNoZNQ==} + node-ts@6.1.3: + resolution: {integrity: sha512-efSBNOe7AJxg2QKmDVzzQGxYMTfR51USAlteD6UCFlR2B4nMGhJiTVsypzKFupimWj9kwYUl5faeJcuMGpcwXw==} engines: {node: '>=18.0.0'} - normalize-package-data@2.5.0: - resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} - normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} @@ -4159,11 +4321,6 @@ packages: resolution: {integrity: sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==} engines: {node: '>=10'} - npm-run-all@4.1.5: - resolution: {integrity: sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==} - engines: {node: '>= 4'} - hasBin: true - npm-run-path@3.1.0: resolution: {integrity: sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg==} engines: {node: '>=8'} @@ -4180,18 +4337,16 @@ packages: resolution: {integrity: sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig==} engines: {node: '>=6.5.0', npm: '>=3'} - nwsapi@2.2.10: - resolution: {integrity: sha512-QK0sRs7MKv0tKe1+5uZIQk/C8XGza4DAnztJG8iD+TpJIORARrCxczA738awHrZoHeTjSSoHqao2teO0dC/gFQ==} - - nwsapi@2.2.9: - resolution: {integrity: sha512-2f3F0SEEer8bBu0dsNCFF50N0cTThV1nWFYcEYFZttdW0lDAoybv9cQoK7X7/68Z89S7FoRrVjP1LPX4XRf9vg==} + nwsapi@2.2.16: + resolution: {integrity: sha512-F1I/bimDpj3ncaNDhfyMWuFqmQDBwDB0Fogc2qpL3BWvkQteFD/8BzWuIRl83rq0DXfm8SGt/HFhLXZyljTXcQ==} object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} - object-inspect@1.13.1: - resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} + object-inspect@1.13.3: + resolution: {integrity: sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==} + engines: {node: '>= 0.4'} object-keys@1.1.1: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} @@ -4234,6 +4389,10 @@ packages: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} + onetime@7.0.0: + resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==} + engines: {node: '>=18'} + optionator@0.8.3: resolution: {integrity: sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==} engines: {node: '>= 0.8.0'} @@ -4242,8 +4401,8 @@ packages: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} - ora@8.0.1: - resolution: {integrity: sha512-ANIvzobt1rls2BDny5fWZ3ZVKyD6nscLvfFRpQgfWsythlcsVUC9kL0zq6j2Z5z9wwp1kd7wpsD/T9qNPVLCaQ==} + ora@8.1.1: + resolution: {integrity: sha512-YWielGi1XzG1UTvOaCFaNgEnuhZVMSHYkW/FQ7UX8O26PtlpdM84c0f7wLPlkvx2RfiQmnzd61d/MGxmpQeJPw==} engines: {node: '>=18'} os-tmpdir@1.0.2: @@ -4266,10 +4425,6 @@ packages: resolution: {integrity: sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==} engines: {node: '>=6'} - p-limit@1.3.0: - resolution: {integrity: sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==} - engines: {node: '>=4'} - p-limit@2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} @@ -4278,10 +4433,6 @@ packages: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} - p-locate@2.0.0: - resolution: {integrity: sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==} - engines: {node: '>=4'} - p-locate@4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} @@ -4302,14 +4453,13 @@ packages: resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} engines: {node: '>=10'} - p-try@1.0.0: - resolution: {integrity: sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==} - engines: {node: '>=4'} - p-try@2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} @@ -4317,6 +4467,10 @@ packages: parse-entities@1.2.2: resolution: {integrity: sha512-NzfpbxW/NPrzZ/yYSoQxyqUZMZXIdCfE0OIN4ESsnptHJECoUk3FZktxNuzQf4tjt5UEopnxpYJbvYuxIFDdsg==} + parse-imports@2.2.1: + resolution: {integrity: sha512-OL/zLggRp8mFhKL0rNORUTR4yBYujK/uU+xZL+/0Rgm2QE4nLO9v8PzEweSJEbMGKmDRjJE4R3IMJlL2di4JeQ==} + engines: {node: '>= 18'} + parse-json@4.0.0: resolution: {integrity: sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==} engines: {node: '>=4'} @@ -4328,12 +4482,8 @@ packages: parse-srcset@1.0.2: resolution: {integrity: sha512-/2qh0lav6CmI15FzA3i/2Bzk2zCgQhGMkvhOhKNcBVQ1ldgpbfiNTVslmooUmWJcADi1f1kIeynbDRVzNlfR6Q==} - parse5@7.1.2: - resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} - - path-exists@3.0.0: - resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} - engines: {node: '>=4'} + parse5@7.2.1: + resolution: {integrity: sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==} path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} @@ -4343,10 +4493,6 @@ packages: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} - path-key@2.0.1: - resolution: {integrity: sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==} - engines: {node: '>=4'} - path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -4354,13 +4500,9 @@ packages: path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - path-scurry@1.10.2: - resolution: {integrity: sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==} - engines: {node: '>=16 || 14 >=14.17'} - - path-type@3.0.0: - resolution: {integrity: sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==} - engines: {node: '>=4'} + path-scurry@2.0.0: + resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} + engines: {node: 20 || >=22} path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} @@ -4370,29 +4512,21 @@ packages: resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} engines: {node: '>=0.12'} - picocolors@0.2.1: - resolution: {integrity: sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==} - - picocolors@1.0.0: - resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} - pidtree@0.3.1: - resolution: {integrity: sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==} - engines: {node: '>=0.10'} - hasBin: true + picomatch@4.0.2: + resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + engines: {node: '>=12'} pify@2.3.0: resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} engines: {node: '>=0.10.0'} - pify@3.0.0: - resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} - engines: {node: '>=4'} - pinkie-promise@2.0.1: resolution: {integrity: sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==} engines: {node: '>=0.10.0'} @@ -4412,8 +4546,8 @@ packages: please-upgrade-node@3.2.0: resolution: {integrity: sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==} - poseidon-lite@0.2.0: - resolution: {integrity: sha512-vivDZnGmz8W4G/GzVA72PXkfYStjilu83rjjUfpL4PueKcC8nfX6hCPh2XhoC5FBgC6y0TA3YuUeUo5YCcNoig==} + poseidon-lite@0.2.1: + resolution: {integrity: sha512-xIr+G6HeYfOhCuswdqcFpSX47SPhm0EpisWJ6h7fHlWwaVIvH3dLnejpatrtw6Xc6HaLrpq05y7VRfvDmDGIog==} possible-typed-array-names@1.0.0: resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} @@ -4437,13 +4571,9 @@ packages: resolution: {integrity: sha512-3M3p+2gMp0AH3da530TlX8kiO1nxdTnc3C6vr8dMxRLIlh8UYkz0/wcwptSXjhtx2Fr0TySI7a+BHDQ8NL7LaQ==} engines: {node: '>=4'} - postcss@5.2.18: - resolution: {integrity: sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==} - engines: {node: '>=0.12'} - - postcss@7.0.39: - resolution: {integrity: sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==} - engines: {node: '>=6.0.0'} + postcss@8.4.49: + resolution: {integrity: sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==} + engines: {node: ^10 || ^12 || >=14} prelude-ls@1.1.2: resolution: {integrity: sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==} @@ -4470,8 +4600,8 @@ packages: engines: {node: '>=8'} hasBin: true - prettier@3.2.5: - resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==} + prettier@3.4.1: + resolution: {integrity: sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==} engines: {node: '>=14'} hasBin: true @@ -4503,11 +4633,11 @@ packages: pseudomap@1.0.2: resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} - psl@1.9.0: - resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} + psl@1.14.0: + resolution: {integrity: sha512-Syk1bnf6fRZ9wQs03AtKJHcM12cKbOLo9L8JtCCdYj5/DTsHmTyXM4BK5ouWeG2P6kZ4nmFvuNTdtaqfobCOCg==} - pump@3.0.0: - resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} + pump@3.0.2: + resolution: {integrity: sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==} punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} @@ -4536,10 +4666,6 @@ packages: react-is@18.3.1: resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} - read-pkg@3.0.0: - resolution: {integrity: sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==} - engines: {node: '>=4'} - readable-stream@3.6.2: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} @@ -4548,6 +4674,10 @@ packages: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} + readdirp@4.0.2: + resolution: {integrity: sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==} + engines: {node: '>= 14.16.0'} + rechoir@0.8.0: resolution: {integrity: sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==} engines: {node: '>= 10.13.0'} @@ -4555,8 +4685,12 @@ packages: ref-array-di@1.2.2: resolution: {integrity: sha512-jhCmhqWa7kvCVrWhR/d7RemkppqPUdxEil1CtTtm7FkZV8LcHHCK3Or9GinUiFP5WY3k0djUkMvhBhx49Jb2iA==} - regenerate-unicode-properties@10.1.1: - resolution: {integrity: sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==} + reflect.getprototypeof@1.0.7: + resolution: {integrity: sha512-bMvFGIUKlc/eSfXNX+aZ+EL95/EgZzuwA0OBPTbZZDEJw/0AkentjMuM1oiRfwHrshqk4RzdgiTg5CcDalXN5g==} + engines: {node: '>= 0.4'} + + regenerate-unicode-properties@10.2.0: + resolution: {integrity: sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA==} engines: {node: '>=4'} regenerate@1.4.2: @@ -4572,8 +4706,8 @@ packages: resolution: {integrity: sha512-5/rl2UD18oAlLQEIuKBeiSIOp1hb5wCXcakl5yvHxlY1wyWI4D5cUKKzCibBeu741PA9JKvZhMqbkDQqPusX3w==} engines: {node: '>= 4'} - regexp.prototype.flags@1.5.2: - resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} + regexp.prototype.flags@1.5.3: + resolution: {integrity: sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==} engines: {node: '>= 0.4'} regexpp@2.0.1: @@ -4584,12 +4718,15 @@ packages: resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} engines: {node: '>=8'} - regexpu-core@5.3.2: - resolution: {integrity: sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==} + regexpu-core@6.2.0: + resolution: {integrity: sha512-H66BPQMrv+V16t8xtmq+UC0CBpiTBA60V8ibS1QVReIp8T1z8hwFxqcGzm9K6lgsN7sB5edVH8a+ze6Fqm4weA==} engines: {node: '>=4'} - regjsparser@0.9.1: - resolution: {integrity: sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==} + regjsgen@0.8.0: + resolution: {integrity: sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==} + + regjsparser@0.12.0: + resolution: {integrity: sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ==} hasBin: true remark-math@1.0.6: @@ -4665,9 +4802,9 @@ packages: resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} engines: {node: '>=8'} - restore-cursor@4.0.0: - resolution: {integrity: sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + restore-cursor@5.1.0: + resolution: {integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==} + engines: {node: '>=18'} retry@0.13.1: resolution: {integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==} @@ -4682,19 +4819,14 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rimraf@2.7.1: - resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} - deprecated: Rimraf versions prior to v4 are no longer supported - hasBin: true - rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rimraf@5.0.7: - resolution: {integrity: sha512-nV6YcJo5wbLW77m+8KjH8aB/7/rxQy9SZ0HY5shnwULfS+9nmTtVXAJET5NdZmCzA4fPI/Hm1wo/Po/4mopOdg==} - engines: {node: '>=14.18'} + rimraf@6.0.1: + resolution: {integrity: sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==} + engines: {node: 20 || >=22} hasBin: true ripemd160@2.0.2: @@ -4704,12 +4836,6 @@ packages: resolution: {integrity: sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==} hasBin: true - rrweb-cssom@0.6.0: - resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} - - rrweb-cssom@0.7.0: - resolution: {integrity: sha512-KlSv0pm9kgQSRxXEMgtivPJ4h826YHsuob8pSHcfSZsSXGtvpEAie8S0AnXuObEJ7nhikOb4ahwxDm0H2yW17g==} - run-async@2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} engines: {node: '>=0.12.0'} @@ -4746,9 +4872,9 @@ packages: scrypt-js@3.0.1: resolution: {integrity: sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==} - secp256k1@4.0.3: - resolution: {integrity: sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==} - engines: {node: '>=10.0.0'} + secp256k1@5.0.1: + resolution: {integrity: sha512-lDFs9AAIaWP9UCdtWrotXWWF9t8PWgQDcxqgAnpM9rMqxb3Oaq2J0thzPVSxBwdJgyQtkU/sYtFtbM1RSt/iYA==} + engines: {node: '>=18.0.0'} semver-compare@1.0.0: resolution: {integrity: sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==} @@ -4757,27 +4883,15 @@ packages: resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true - semver@6.3.0: - resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} - hasBin: true - semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true - semver@7.6.0: - resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} - engines: {node: '>=10'} - hasBin: true - - semver@7.6.2: - resolution: {integrity: sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==} + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} engines: {node: '>=10'} hasBin: true - serialize-javascript@6.0.0: - resolution: {integrity: sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==} - serialize-javascript@6.0.2: resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} @@ -4803,25 +4917,14 @@ packages: resolution: {integrity: sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==} engines: {node: '>=8'} - shebang-command@1.2.0: - resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} - engines: {node: '>=0.10.0'} - shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} - shebang-regex@1.0.0: - resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} - engines: {node: '>=0.10.0'} - shebang-regex@3.0.0: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - shell-quote@1.8.1: - resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} - side-channel@1.0.6: resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} engines: {node: '>= 0.4'} @@ -4846,6 +4949,9 @@ packages: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} + slashes@3.0.12: + resolution: {integrity: sha512-Q9VME8WyGkc7pJf6QEkj3wE+2CnvZMI+XJhwdTPR8Z/kWQRXi7boAWLDibRPyHRTUTPx5FaU7MsyrjI3yLB4HA==} + slice-ansi@0.0.4: resolution: {integrity: sha512-up04hB2hR92PgjpyU3y/eg91yIBILyjVY26NvvciY3EVVPjybkMszMpXQ9QAkcS3I5rtJBDLoTxxg+qvW8c7rw==} engines: {node: '>=0.10.0'} @@ -4854,21 +4960,21 @@ packages: resolution: {integrity: sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==} engines: {node: '>=6'} - solc@0.7.3: - resolution: {integrity: sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA==} - engines: {node: '>=8.0.0'} + solc@0.8.26: + resolution: {integrity: sha512-yiPQNVf5rBFHwN6SIf3TUUvVAFKcQqmSUFeq+fb6pNRCo0ZCgpYOZDi3BVoezCPIAcKrVYd/qXlBLUP9wVrZ9g==} + engines: {node: '>=10.0.0'} hasBin: true + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + source-map-support@0.5.13: resolution: {integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==} source-map-support@0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} - source-map@0.5.7: - resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} - engines: {node: '>=0.10.0'} - source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} @@ -4877,20 +4983,14 @@ packages: resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==} engines: {node: '>= 8'} - spdx-correct@3.2.0: - resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} - spdx-exceptions@2.5.0: resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} - spdx-expression-parse@3.0.1: - resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} - spdx-expression-parse@4.0.0: resolution: {integrity: sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==} - spdx-license-ids@3.0.17: - resolution: {integrity: sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==} + spdx-license-ids@3.0.20: + resolution: {integrity: sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==} sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} @@ -4946,14 +5046,10 @@ packages: resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} engines: {node: '>=12'} - string-width@7.1.0: - resolution: {integrity: sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==} + string-width@7.2.0: + resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} engines: {node: '>=18'} - string.prototype.padend@3.1.6: - resolution: {integrity: sha512-XZpspuSB7vJWhvJc9DLSlrXl1mcA2BdoY5jjnS135ydXqLoqhs96JjDtCkjJEQHvfqZIp9hBuBMgI589peyx9Q==} - engines: {node: '>= 0.4'} - string.prototype.trim@1.2.9: resolution: {integrity: sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==} engines: {node: '>= 0.4'} @@ -5016,10 +5112,6 @@ packages: resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==} engines: {node: '>=0.8.0'} - supports-color@3.2.3: - resolution: {integrity: sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==} - engines: {node: '>=0.8.0'} - supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -5043,6 +5135,10 @@ packages: symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} + synckit@0.9.2: + resolution: {integrity: sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==} + engines: {node: ^14.18.0 || >=16.0.0} + table@5.4.6: resolution: {integrity: sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==} engines: {node: '>=6.0.0'} @@ -5058,7 +5154,7 @@ packages: '@swc/core': '*' esbuild: '*' uglify-js: '*' - webpack: ^5.1.0 + webpack: '>=5.94.0' peerDependenciesMeta: '@swc/core': optional: true @@ -5067,8 +5163,8 @@ packages: uglify-js: optional: true - terser@5.31.0: - resolution: {integrity: sha512-Q1JFAoUKE5IMfI4Z/lkE/E6+SwgzO+x4tq4v1AyBLRj8VSYvRO6A/rQrPg1yud4g0En9EKI1TvFRF2tQFcoUkg==} + terser@5.36.0: + resolution: {integrity: sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==} engines: {node: '>=10'} hasBin: true @@ -5082,6 +5178,10 @@ packages: through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + tinyglobby@0.2.10: + resolution: {integrity: sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==} + engines: {node: '>=12.0.0'} + tmp@0.0.33: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} @@ -5089,10 +5189,6 @@ packages: tmpl@1.0.5: resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} - to-fast-properties@2.0.0: - resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} - engines: {node: '>=4'} - to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -5115,32 +5211,24 @@ packages: resolution: {integrity: sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==} engines: {node: '>=12'} - tr46@5.0.0: - resolution: {integrity: sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==} - engines: {node: '>=18'} - - tree-kill@1.2.2: - resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} - hasBin: true - trim-trailing-lines@1.1.4: resolution: {integrity: sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ==} - trim@0.0.1: - resolution: {integrity: sha512-YzQV+TZg4AxpKxaTHK3c3D+kRDCGVEE7LemdlQZoQXn0iennk10RsIoY6ikzAqJTc9Xjl9C1/waHom/J86ziAQ==} + trim@1.0.1: + resolution: {integrity: sha512-3JVP2YVqITUisXblCDq/Bi4P9457G/sdEamInkyvCsjbTcXLXIiG7XCb4kGMFWh6JGXesS3TKxOPtrncN/xe8w==} deprecated: Use String.prototype.trim() instead trough@1.0.5: resolution: {integrity: sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==} - ts-api-utils@1.3.0: - resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} + ts-api-utils@1.4.3: + resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==} engines: {node: '>=16'} peerDependencies: typescript: '>=4.2.0' - ts-jest@29.1.3: - resolution: {integrity: sha512-6L9qz3ginTd1NKhOxmkP0qU3FyKjj5CPoY+anszfVn6Pmv/RIKzhiMCsH7Yb7UvJR9I2A64rm4zQl531s2F1iw==} + ts-jest@29.2.5: + resolution: {integrity: sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==} engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -5168,21 +5256,7 @@ packages: engines: {node: '>=12.0.0'} peerDependencies: typescript: '*' - webpack: ^5.0.0 - - ts-node@10.9.2: - resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} - hasBin: true - peerDependencies: - '@swc/core': '>=1.2.50' - '@swc/wasm': '>=1.2.50' - '@types/node': '*' - typescript: '>=2.7' - peerDependenciesMeta: - '@swc/core': - optional: true - '@swc/wasm': - optional: true + webpack: '>=5.94.0' tsconfig-paths@3.15.0: resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} @@ -5190,8 +5264,11 @@ packages: tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} - tslib@2.6.2: - resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + tslib@2.7.0: + resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} tsort@0.0.1: resolution: {integrity: sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==} @@ -5200,7 +5277,13 @@ packages: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: - typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev + || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + + tsx@4.19.2: + resolution: {integrity: sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==} + engines: {node: '>=18.0.0'} + hasBin: true tweetnacl-util@0.15.1: resolution: {integrity: sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==} @@ -5236,8 +5319,8 @@ packages: resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} engines: {node: '>=8'} - type@2.7.2: - resolution: {integrity: sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==} + type@2.7.3: + resolution: {integrity: sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==} typed-array-buffer@1.0.2: resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} @@ -5247,42 +5330,45 @@ packages: resolution: {integrity: sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==} engines: {node: '>= 0.4'} - typed-array-byte-offset@1.0.2: - resolution: {integrity: sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==} + typed-array-byte-offset@1.0.3: + resolution: {integrity: sha512-GsvTyUHTriq6o/bHcTd0vM7OQ9JEdlvluu9YISaA7+KzDzPaIzEeDFNkTfhdE3MYcNhNi0vq/LlegYgIs5yPAw==} engines: {node: '>= 0.4'} - typed-array-length@1.0.6: - resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} + typed-array-length@1.0.7: + resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} engines: {node: '>= 0.4'} typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} - typescript-eslint@7.11.0: - resolution: {integrity: sha512-ZKe3yHF/IS/kCUE4CGE3UgtK+Q7yRk1e9kwEI0rqm9XxMTd9P1eHe0LVVtrZ3oFuIQ2unJ9Xn0vTsLApzJ3aPw==} - engines: {node: ^18.18.0 || >=20.0.0} + typescript-eslint@8.16.0: + resolution: {integrity: sha512-wDkVmlY6O2do4V+lZd0GtRfbtXbeD0q9WygwXXSJnC1xorE8eqyC2L1tJimqpSeFrOzRlYtWnUp/uzgHQOgfBQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 + eslint: ^8.57.0 || ^9.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true - typescript@5.4.5: - resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} + typescript@5.7.2: + resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==} engines: {node: '>=14.17'} hasBin: true - uglify-js@3.17.4: - resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==} + uglify-js@3.19.3: + resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} engines: {node: '>=0.8.0'} hasBin: true unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} - undici-types@5.26.5: - resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + + undici-types@6.20.0: + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} undici@5.28.4: resolution: {integrity: sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==} @@ -5294,16 +5380,16 @@ packages: unherit@1.1.3: resolution: {integrity: sha512-Ft16BJcnapDKp0+J/rqFC3Rrk6Y/Ng4nzsC028k2jdDII/rdZ7Wd3pPT/6+vIIxRagwRc9K0IUX0Ra4fKvw+WQ==} - unicode-canonical-property-names-ecmascript@2.0.0: - resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==} + unicode-canonical-property-names-ecmascript@2.0.1: + resolution: {integrity: sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==} engines: {node: '>=4'} unicode-match-property-ecmascript@2.0.0: resolution: {integrity: sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==} engines: {node: '>=4'} - unicode-match-property-value-ecmascript@2.1.0: - resolution: {integrity: sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==} + unicode-match-property-value-ecmascript@2.2.0: + resolution: {integrity: sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg==} engines: {node: '>=4'} unicode-property-aliases-ecmascript@2.1.0: @@ -5351,8 +5437,8 @@ packages: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} engines: {node: '>= 0.8'} - update-browserslist-db@1.0.15: - resolution: {integrity: sha512-K9HWH62x3/EalU1U6sjSZiylm9C8tgq2mSvshZpqc7QE69RaA2qjhkW2HlNA0tFpEbtyFz7HTqbSdN4MSwUodA==} + update-browserslist-db@1.1.1: + resolution: {integrity: sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' @@ -5380,19 +5466,13 @@ packages: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true - v8-compile-cache-lib@3.0.1: - resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} - v8-compile-cache@2.4.0: resolution: {integrity: sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==} - v8-to-istanbul@9.2.0: - resolution: {integrity: sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==} + v8-to-istanbul@9.3.0: + resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} engines: {node: '>=10.12.0'} - validate-npm-package-license@3.0.4: - resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} - vfile-location@2.0.6: resolution: {integrity: sha512-sSFdyCP3G6Ka0CEmN83A2YCMKIieHx0EDaj5IDP4g1pa5ZJ4FJDvpO0WODLxo4LUX4oe52gmSCK7Jw4SBghqxA==} @@ -5406,8 +5486,8 @@ packages: resolution: {integrity: sha512-d2rr2EFhAGHnTlURu49G7GWmiJV80HbAnkYdD9IFAtfhmxC+kSWEaZ6ZF064DJFTv9lQZQV1vuLTntyQpoanGQ==} engines: {node: '>= 6'} - vue-eslint-parser@9.4.2: - resolution: {integrity: sha512-Ry9oiGmCAK91HrKMtCrKFWmSFWvYkpGglCeFAIqDdr9zdXmMMpJOmUJS7WWsW7fX81h6mwHmUZCQQ1E0PkSwYQ==} + vue-eslint-parser@9.4.3: + resolution: {integrity: sha512-2rYRLWlIpaiN8xbPiDyXZXRgLGOtWxERV7ND5fFAv5qo1D2N9Fu9MNajBNc6o13lZ+24DAWCkQCvj4klgmcITg==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' @@ -5416,17 +5496,17 @@ packages: resolution: {integrity: sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==} engines: {node: '>=14'} - w3c-xmlserializer@5.0.0: - resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} - engines: {node: '>=18'} - walker@1.0.8: resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} - watchpack@2.4.1: - resolution: {integrity: sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==} + watchpack@2.4.2: + resolution: {integrity: sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==} engines: {node: '>=10.13.0'} + web3-core-helpers@1.10.3: + resolution: {integrity: sha512-Yv7dQC3B9ipOc5sWm3VAz1ys70Izfzb8n9rSiQYIPjpqtJM+3V4EeK6ghzNR6CO2es0+Yu9CtCkw0h8gQhrTxA==} + engines: {node: '>=8.0.0'} + web3-core-helpers@1.10.4: resolution: {integrity: sha512-r+L5ylA17JlD1vwS8rjhWr0qg7zVoVMDvWhajWA5r5+USdh91jRUYosp19Kd1m2vE034v7Dfqe1xYRoH2zvG0g==} engines: {node: '>=8.0.0'} @@ -5451,6 +5531,10 @@ packages: resolution: {integrity: sha512-B6elffYm81MYZDTrat7aEhnhdtVE3lDBUZft16Z8awYMZYJDbnykEbJVS+l3mnA7AQTnSDr/1MjWofGDLBJPww==} engines: {node: '>=8.0.0'} + web3-eth-iban@1.10.3: + resolution: {integrity: sha512-ZCfOjYKAjaX2TGI8uif5ah+J3BYFuo+47JOIV1RIz2l7kD9VfnxvRH5UiQDRyMALQC7KFd2hUqIEtHklapNyKA==} + engines: {node: '>=8.0.0'} + web3-eth-iban@1.10.4: resolution: {integrity: sha512-0gE5iNmOkmtBmbKH2aTodeompnNE8jEyvwFJ6s/AF6jkw9ky9Op9cqfzS56AYAbrqEFuClsqB/AoRves7LDELw==} engines: {node: '>=8.0.0'} @@ -5467,6 +5551,10 @@ packages: resolution: {integrity: sha512-j3FBMifyuFFmUIPVQR4pj+t5ILhAexAui0opgcpu9R5LxQrLRUZxHSnU+YO25UycSOa/NAX8A+qkqZNpcFAlxA==} engines: {node: '>=8.0.0'} + web3-utils@1.10.3: + resolution: {integrity: sha512-OqcUrEE16fDBbGoQtZXWdavsPzbGIDc5v3VrRTZ0XrIpefC/viZ1ZU9bGEemazyS0catk/3rkOOxpzTfY+XsyQ==} + engines: {node: '>=8.0.0'} + web3-utils@1.10.4: resolution: {integrity: sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==} engines: {node: '>=8.0.0'} @@ -5484,7 +5572,7 @@ packages: hasBin: true peerDependencies: '@webpack-cli/generators': '*' - webpack: 5.x.x + webpack: '>=5.94.0' webpack-bundle-analyzer: '*' webpack-dev-server: '*' peerDependenciesMeta: @@ -5503,8 +5591,8 @@ packages: resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} engines: {node: '>=10.13.0'} - webpack@5.91.0: - resolution: {integrity: sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw==} + webpack@5.96.1: + resolution: {integrity: sha512-l2LlBSvVZGhL4ZrPwyr8+37AunkcYj5qh8o6u2/2rzoPc8gxFJkLj1WxNgooi9pnoc06jh0BjuXnamM4qlujZA==} engines: {node: '>=10.13.0'} hasBin: true peerDependencies: @@ -5513,47 +5601,39 @@ packages: webpack-cli: optional: true - websocket@1.0.34: - resolution: {integrity: sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==} + websocket@1.0.35: + resolution: {integrity: sha512-/REy6amwPZl44DDzvRCkaI1q1bIiQB0mEFQLUrhz3z2EK91cp3n72rAjUlrTP0zV22HJIUOVHQGPxhFRjxjt+Q==} engines: {node: '>=4.0.0'} whatwg-encoding@2.0.0: resolution: {integrity: sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==} engines: {node: '>=12'} - whatwg-encoding@3.1.1: - resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==} - engines: {node: '>=18'} - whatwg-mimetype@3.0.0: resolution: {integrity: sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==} engines: {node: '>=12'} - whatwg-mimetype@4.0.0: - resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==} - engines: {node: '>=18'} - whatwg-url@11.0.0: resolution: {integrity: sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==} engines: {node: '>=12'} - whatwg-url@14.0.0: - resolution: {integrity: sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==} - engines: {node: '>=18'} - whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} - which-typed-array@1.1.15: - resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} + which-builtin-type@1.2.0: + resolution: {integrity: sha512-I+qLGQ/vucCby4tf5HsLmGueEla4ZhwTBSqaooS+Y0BuxN4Cp+okmGuV+8mXZ84KDI9BA+oklo+RzKg0ONdSUA==} engines: {node: '>= 0.4'} - which@1.3.1: - resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} - hasBin: true + which-collection@1.0.2: + resolution: {integrity: sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==} + engines: {node: '>= 0.4'} + + which-typed-array@1.1.16: + resolution: {integrity: sha512-g+N+GAWiRj66DngFwHvISJd+ITsyphZvD1vChfVg6cEdnzy53GzB3oy0fUNlvhz7H7+MiqhYr26qxQShCpKTTQ==} + engines: {node: '>= 0.4'} which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} @@ -5574,8 +5654,8 @@ packages: wordwrap@1.0.0: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} - workerpool@6.2.1: - resolution: {integrity: sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==} + workerpool@6.5.1: + resolution: {integrity: sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==} wrap-ansi@3.0.1: resolution: {integrity: sha512-iXR3tDXpbnTpzjKSylUJRkLuOrEC7hwEB221cgn6wtF8wpmz28puFXAEfPT5zrjM3wahygB//VuWEr1vTkDcNQ==} @@ -5600,32 +5680,20 @@ packages: resolution: {integrity: sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==} engines: {node: '>=4'} - ws@7.4.6: - resolution: {integrity: sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==} - engines: {node: '>=8.3.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ^5.0.2 - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - - ws@7.5.9: - resolution: {integrity: sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==} - engines: {node: '>=8.3.0'} + ws@8.17.1: + resolution: {integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==} + engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 - utf-8-validate: ^5.0.2 + utf-8-validate: '>=5.0.2' peerDependenciesMeta: bufferutil: optional: true utf-8-validate: optional: true - ws@8.17.0: - resolution: {integrity: sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==} + ws@8.18.0: + resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -5640,10 +5708,6 @@ packages: resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} engines: {node: '>=12'} - xml-name-validator@5.0.0: - resolution: {integrity: sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==} - engines: {node: '>=18'} - xmlchars@2.2.0: resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} @@ -5665,9 +5729,6 @@ packages: yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} - yallist@4.0.0: - resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - yaml-unist-parser@1.1.1: resolution: {integrity: sha512-cGtqhHBlcft+rTKiPsVcSyi43Eqm5a1buYokW9VkztroKMErBSdR9ANHx+/XxNppHZTu2KMEn4yY8MdhuGoFuA==} engines: {node: '>= 6'} @@ -5676,13 +5737,13 @@ packages: resolution: {integrity: sha512-X/v7VDnK+sxbQ2Imq4Jt2PRUsRsP7UcpSl3Llg6+NRRqWLIvxkMFYtH1FmvwNGYRKKPa+EPA4qDBlI9WVG1UKw==} engines: {node: '>= 6'} - yaml@2.4.2: - resolution: {integrity: sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA==} + yaml@2.6.1: + resolution: {integrity: sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==} engines: {node: '>= 14'} hasBin: true - yargs-parser@20.2.4: - resolution: {integrity: sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==} + yargs-parser@20.2.9: + resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} engines: {node: '>=10'} yargs-parser@21.1.1: @@ -5701,10 +5762,6 @@ packages: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} - yn@3.1.1: - resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} - engines: {node: '>=6'} - yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} @@ -5713,12 +5770,12 @@ snapshots: '@aave/core-v3@1.19.3': {} - '@aave/deploy-v3@1.56.2(@aave/core-v3@1.19.3)(@aave/periphery-v3@2.5.2)(@ethersproject/abstract-provider@5.7.0)(@ethersproject/abstract-signer@5.7.0)(@ethersproject/hash@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@ethersproject/transactions@5.7.0)(hardhat@2.22.3(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5))(typescript@5.4.5)(utf-8-validate@5.0.10))(web3-core-helpers@1.10.4)(web3-core@1.10.4)': - dependencies: + ? '@aave/deploy-v3@1.56.2(@aave/core-v3@1.19.3)(@aave/periphery-v3@2.5.2)(@ethersproject/abstract-provider@5.7.0)(@ethersproject/abstract-signer@5.7.0)(@ethersproject/hash@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@ethersproject/transactions@5.7.0)(hardhat@2.22.16(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))(web3-core-helpers@1.10.3)(web3-core@1.10.4)' + : dependencies: '@aave/core-v3': 1.19.3 '@aave/periphery-v3': 2.5.2 - '@openzeppelin/defender-relay-client': 1.54.1(@ethersproject/abstract-provider@5.7.0)(@ethersproject/abstract-signer@5.7.0)(@ethersproject/hash@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@ethersproject/transactions@5.7.0)(web3-core-helpers@1.10.4)(web3-core@1.10.4) - hardhat: 2.22.3(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5))(typescript@5.4.5)(utf-8-validate@5.0.10) + '@openzeppelin/defender-relay-client': 1.54.6(@ethersproject/abstract-provider@5.7.0)(@ethersproject/abstract-signer@5.7.0)(@ethersproject/hash@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@ethersproject/transactions@5.7.0)(web3-core-helpers@1.10.3)(web3-core@1.10.4) + hardhat: 2.22.16(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) transitivePeerDependencies: - '@ethersproject/abstract-provider' - '@ethersproject/abstract-signer' @@ -5734,6 +5791,8 @@ snapshots: dependencies: '@aave/core-v3': 1.19.3 + '@adraffy/ens-normalize@1.10.1': {} + '@ampproject/remapping@2.3.0': dependencies: '@jridgewell/gen-mapping': 0.3.5 @@ -5743,891 +5802,941 @@ snapshots: dependencies: tslib: 1.14.1 - '@aptos-labs/aptos-cli@0.1.8': {} + '@aptos-labs/aptos-cli@0.1.9': {} + + '@aptos-labs/aptos-cli@1.0.2': + dependencies: + commander: 12.1.0 - '@aptos-labs/aptos-client@0.1.0': + '@aptos-labs/aptos-client@0.1.1': dependencies: - axios: 1.6.2 + axios: 1.7.4 got: 11.8.6 transitivePeerDependencies: - debug - '@aptos-labs/ts-sdk@1.20.0': + '@aptos-labs/ts-sdk@1.26.0': dependencies: - '@aptos-labs/aptos-cli': 0.1.8 - '@aptos-labs/aptos-client': 0.1.0 - '@noble/curves': 1.4.0 - '@noble/hashes': 1.4.0 - '@scure/bip32': 1.4.0 - '@scure/bip39': 1.3.0 + '@aptos-labs/aptos-cli': 0.1.9 + '@aptos-labs/aptos-client': 0.1.1 + '@noble/curves': 1.7.0 + '@noble/hashes': 1.6.1 + '@scure/bip32': 1.6.0 + '@scure/bip39': 1.5.0 eventemitter3: 5.0.1 - form-data: 4.0.0 + form-data: 4.0.1 js-base64: 3.7.7 jwt-decode: 4.0.0 - poseidon-lite: 0.2.0 + poseidon-lite: 0.2.1 transitivePeerDependencies: - debug '@aws-crypto/sha256-js@1.2.2': dependencies: '@aws-crypto/util': 1.2.2 - '@aws-sdk/types': 3.567.0 + '@aws-sdk/types': 3.696.0 tslib: 1.14.1 '@aws-crypto/util@1.2.2': dependencies: - '@aws-sdk/types': 3.567.0 + '@aws-sdk/types': 3.696.0 '@aws-sdk/util-utf8-browser': 3.259.0 tslib: 1.14.1 - '@aws-sdk/types@3.567.0': + '@aws-sdk/types@3.696.0': dependencies: - '@smithy/types': 2.12.0 - tslib: 2.6.2 + '@smithy/types': 3.7.1 + tslib: 2.8.1 '@aws-sdk/util-utf8-browser@3.259.0': dependencies: - tslib: 2.6.2 - - '@babel/code-frame@7.24.2': - dependencies: - '@babel/highlight': 7.24.5 - picocolors: 1.0.0 + tslib: 2.8.1 - '@babel/code-frame@7.24.6': + '@babel/code-frame@7.26.2': dependencies: - '@babel/highlight': 7.24.6 - picocolors: 1.0.0 + '@babel/helper-validator-identifier': 7.25.9 + js-tokens: 4.0.0 + picocolors: 1.1.1 '@babel/code-frame@7.8.3': dependencies: - '@babel/highlight': 7.24.5 + '@babel/highlight': 7.25.9 - '@babel/compat-data@7.24.6': {} + '@babel/compat-data@7.26.2': {} - '@babel/core@7.24.6': + '@babel/core@7.26.0': dependencies: '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.24.6 - '@babel/generator': 7.24.6 - '@babel/helper-compilation-targets': 7.24.6 - '@babel/helper-module-transforms': 7.24.6(@babel/core@7.24.6) - '@babel/helpers': 7.24.6 - '@babel/parser': 7.24.6 - '@babel/template': 7.24.6 - '@babel/traverse': 7.24.6 - '@babel/types': 7.24.6 + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.2 + '@babel/helper-compilation-targets': 7.25.9 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) + '@babel/helpers': 7.26.0 + '@babel/parser': 7.26.2 + '@babel/template': 7.25.9 + '@babel/traverse': 7.25.9 + '@babel/types': 7.26.0 convert-source-map: 2.0.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/generator@7.24.5': - dependencies: - '@babel/types': 7.24.5 - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - jsesc: 2.5.2 - - '@babel/generator@7.24.6': + '@babel/generator@7.26.2': dependencies: - '@babel/types': 7.24.6 + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - jsesc: 2.5.2 - - '@babel/helper-annotate-as-pure@7.22.5': - dependencies: - '@babel/types': 7.24.5 + jsesc: 3.0.2 - '@babel/helper-annotate-as-pure@7.24.6': + '@babel/helper-annotate-as-pure@7.25.9': dependencies: - '@babel/types': 7.24.6 + '@babel/types': 7.26.0 - '@babel/helper-builder-binary-assignment-operator-visitor@7.24.6': + '@babel/helper-builder-binary-assignment-operator-visitor@7.25.9': dependencies: - '@babel/types': 7.24.6 + '@babel/traverse': 7.25.9 + '@babel/types': 7.26.0 + transitivePeerDependencies: + - supports-color - '@babel/helper-compilation-targets@7.24.6': + '@babel/helper-compilation-targets@7.25.9': dependencies: - '@babel/compat-data': 7.24.6 - '@babel/helper-validator-option': 7.24.6 - browserslist: 4.23.0 + '@babel/compat-data': 7.26.2 + '@babel/helper-validator-option': 7.25.9 + browserslist: 4.24.2 lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-create-class-features-plugin@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-annotate-as-pure': 7.24.6 - '@babel/helper-environment-visitor': 7.24.6 - '@babel/helper-function-name': 7.24.6 - '@babel/helper-member-expression-to-functions': 7.24.6 - '@babel/helper-optimise-call-expression': 7.24.6 - '@babel/helper-replace-supers': 7.24.6(@babel/core@7.24.6) - '@babel/helper-skip-transparent-expression-wrappers': 7.24.6 - '@babel/helper-split-export-declaration': 7.24.6 - semver: 6.3.1 - - '@babel/helper-create-regexp-features-plugin@7.22.15(@babel/core@7.24.6)': + '@babel/helper-create-class-features-plugin@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-annotate-as-pure': 7.22.5 - regexpu-core: 5.3.2 + '@babel/core': 7.26.0 + '@babel/helper-annotate-as-pure': 7.25.9 + '@babel/helper-member-expression-to-functions': 7.25.9 + '@babel/helper-optimise-call-expression': 7.25.9 + '@babel/helper-replace-supers': 7.25.9(@babel/core@7.26.0) + '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 + '@babel/traverse': 7.25.9 semver: 6.3.1 + transitivePeerDependencies: + - supports-color - '@babel/helper-create-regexp-features-plugin@7.24.6(@babel/core@7.24.6)': + '@babel/helper-create-regexp-features-plugin@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-annotate-as-pure': 7.24.6 - regexpu-core: 5.3.2 + '@babel/core': 7.26.0 + '@babel/helper-annotate-as-pure': 7.25.9 + regexpu-core: 6.2.0 semver: 6.3.1 - '@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.24.6)': + '@babel/helper-define-polyfill-provider@0.6.3(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-compilation-targets': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - debug: 4.3.4(supports-color@8.1.1) + '@babel/core': 7.26.0 + '@babel/helper-compilation-targets': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + debug: 4.3.7(supports-color@8.1.1) lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: - supports-color - '@babel/helper-environment-visitor@7.24.6': {} - - '@babel/helper-function-name@7.24.6': - dependencies: - '@babel/template': 7.24.6 - '@babel/types': 7.24.6 - - '@babel/helper-hoist-variables@7.24.6': - dependencies: - '@babel/types': 7.24.6 - - '@babel/helper-member-expression-to-functions@7.24.6': + '@babel/helper-member-expression-to-functions@7.25.9': dependencies: - '@babel/types': 7.24.6 + '@babel/traverse': 7.25.9 + '@babel/types': 7.26.0 + transitivePeerDependencies: + - supports-color - '@babel/helper-module-imports@7.24.6': + '@babel/helper-module-imports@7.25.9': dependencies: - '@babel/types': 7.24.6 + '@babel/traverse': 7.25.9 + '@babel/types': 7.26.0 + transitivePeerDependencies: + - supports-color - '@babel/helper-module-transforms@7.24.6(@babel/core@7.24.6)': + '@babel/helper-module-transforms@7.26.0(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-environment-visitor': 7.24.6 - '@babel/helper-module-imports': 7.24.6 - '@babel/helper-simple-access': 7.24.6 - '@babel/helper-split-export-declaration': 7.24.6 - '@babel/helper-validator-identifier': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@babel/traverse': 7.25.9 + transitivePeerDependencies: + - supports-color - '@babel/helper-optimise-call-expression@7.24.6': + '@babel/helper-optimise-call-expression@7.25.9': dependencies: - '@babel/types': 7.24.6 - - '@babel/helper-plugin-utils@7.24.5': {} + '@babel/types': 7.26.0 - '@babel/helper-plugin-utils@7.24.6': {} - - '@babel/helper-remap-async-to-generator@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-annotate-as-pure': 7.24.6 - '@babel/helper-environment-visitor': 7.24.6 - '@babel/helper-wrap-function': 7.24.6 + '@babel/helper-plugin-utils@7.25.9': {} - '@babel/helper-replace-supers@7.24.6(@babel/core@7.24.6)': + '@babel/helper-remap-async-to-generator@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-environment-visitor': 7.24.6 - '@babel/helper-member-expression-to-functions': 7.24.6 - '@babel/helper-optimise-call-expression': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-annotate-as-pure': 7.25.9 + '@babel/helper-wrap-function': 7.25.9 + '@babel/traverse': 7.25.9 + transitivePeerDependencies: + - supports-color - '@babel/helper-simple-access@7.24.6': + '@babel/helper-replace-supers@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/types': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-member-expression-to-functions': 7.25.9 + '@babel/helper-optimise-call-expression': 7.25.9 + '@babel/traverse': 7.25.9 + transitivePeerDependencies: + - supports-color - '@babel/helper-skip-transparent-expression-wrappers@7.24.6': + '@babel/helper-simple-access@7.25.9': dependencies: - '@babel/types': 7.24.6 + '@babel/traverse': 7.25.9 + '@babel/types': 7.26.0 + transitivePeerDependencies: + - supports-color - '@babel/helper-split-export-declaration@7.24.6': + '@babel/helper-skip-transparent-expression-wrappers@7.25.9': dependencies: - '@babel/types': 7.24.6 - - '@babel/helper-string-parser@7.24.1': {} - - '@babel/helper-string-parser@7.24.6': {} + '@babel/traverse': 7.25.9 + '@babel/types': 7.26.0 + transitivePeerDependencies: + - supports-color - '@babel/helper-validator-identifier@7.24.5': {} + '@babel/helper-string-parser@7.25.9': {} - '@babel/helper-validator-identifier@7.24.6': {} + '@babel/helper-validator-identifier@7.25.9': {} - '@babel/helper-validator-option@7.24.6': {} + '@babel/helper-validator-option@7.25.9': {} - '@babel/helper-wrap-function@7.24.6': + '@babel/helper-wrap-function@7.25.9': dependencies: - '@babel/helper-function-name': 7.24.6 - '@babel/template': 7.24.6 - '@babel/types': 7.24.6 + '@babel/template': 7.25.9 + '@babel/traverse': 7.25.9 + '@babel/types': 7.26.0 + transitivePeerDependencies: + - supports-color - '@babel/helpers@7.24.6': + '@babel/helpers@7.26.0': dependencies: - '@babel/template': 7.24.6 - '@babel/types': 7.24.6 + '@babel/template': 7.25.9 + '@babel/types': 7.26.0 - '@babel/highlight@7.24.5': + '@babel/highlight@7.25.9': dependencies: - '@babel/helper-validator-identifier': 7.24.5 + '@babel/helper-validator-identifier': 7.25.9 chalk: 2.4.2 js-tokens: 4.0.0 - picocolors: 1.0.0 + picocolors: 1.1.1 - '@babel/highlight@7.24.6': + '@babel/parser@7.26.2': dependencies: - '@babel/helper-validator-identifier': 7.24.6 - chalk: 2.4.2 - js-tokens: 4.0.0 - picocolors: 1.0.0 + '@babel/types': 7.26.0 - '@babel/parser@7.24.5': + '@babel/parser@7.9.4': dependencies: - '@babel/types': 7.24.5 + '@babel/types': 7.26.0 - '@babel/parser@7.24.6': + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/types': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/traverse': 7.25.9 + transitivePeerDependencies: + - supports-color - '@babel/parser@7.9.4': + '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/types': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-environment-visitor': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 + '@babel/plugin-transform-optional-chaining': 7.25.9(@babel/core@7.26.0) + transitivePeerDependencies: + - supports-color - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-skip-transparent-expression-wrappers': 7.24.6 - '@babel/plugin-transform-optional-chaining': 7.24.6(@babel/core@7.24.6) + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/traverse': 7.25.9 + transitivePeerDependencies: + - supports-color - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-environment-visitor': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 - '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.24.6)': + '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.24.6)': + '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.24.6)': + '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.24.6)': + '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.24.6)': + '@babel/plugin-syntax-import-assertions@7.26.0(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.24.6)': + '@babel/plugin-syntax-import-attributes@7.26.0(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.24.6)': + '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-import-assertions@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-import-attributes@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.24.6)': + '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.24.6)': + '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-jsx@7.24.1(@babel/core@7.24.6)': + '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-jsx@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.24.6)': + '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.24.6)': + '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.24.6)': + '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.24.6)': + '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.24.6)': + '@babel/plugin-syntax-typescript@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.24.6)': + '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.24.6)': + '@babel/plugin-transform-arrow-functions@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.24.6)': + '@babel/plugin-transform-async-generator-functions@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-remap-async-to-generator': 7.25.9(@babel/core@7.26.0) + '@babel/traverse': 7.25.9 + transitivePeerDependencies: + - supports-color - '@babel/plugin-syntax-typescript@7.24.1(@babel/core@7.24.6)': + '@babel/plugin-transform-async-to-generator@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-remap-async-to-generator': 7.25.9(@babel/core@7.26.0) + transitivePeerDependencies: + - supports-color - '@babel/plugin-syntax-typescript@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-block-scoped-functions@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.24.6)': + '@babel/plugin-transform-block-scoping@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-arrow-functions@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-class-properties@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.25.9 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-async-generator-functions@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-class-static-block@7.26.0(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-environment-visitor': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-remap-async-to-generator': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.24.6) + '@babel/core': 7.26.0 + '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.25.9 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-async-to-generator@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-classes@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-module-imports': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-remap-async-to-generator': 7.24.6(@babel/core@7.24.6) + '@babel/core': 7.26.0 + '@babel/helper-annotate-as-pure': 7.25.9 + '@babel/helper-compilation-targets': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-replace-supers': 7.25.9(@babel/core@7.26.0) + '@babel/traverse': 7.25.9 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-block-scoped-functions@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-computed-properties@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/template': 7.25.9 - '@babel/plugin-transform-block-scoping@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-destructuring@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-class-properties@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-dotall-regex@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-create-class-features-plugin': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-class-static-block@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-duplicate-keys@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-create-class-features-plugin': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.24.6) + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-classes@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-annotate-as-pure': 7.24.6 - '@babel/helper-compilation-targets': 7.24.6 - '@babel/helper-environment-visitor': 7.24.6 - '@babel/helper-function-name': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-replace-supers': 7.24.6(@babel/core@7.24.6) - '@babel/helper-split-export-declaration': 7.24.6 - globals: 11.12.0 + '@babel/core': 7.26.0 + '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-computed-properties@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-dynamic-import@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/template': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-destructuring@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-exponentiation-operator@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-builder-binary-assignment-operator-visitor': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-dotall-regex@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-export-namespace-from@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-create-regexp-features-plugin': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-duplicate-keys@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-for-of@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-dynamic-import@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-function-name@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.24.6) + '@babel/core': 7.26.0 + '@babel/helper-compilation-targets': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/traverse': 7.25.9 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-exponentiation-operator@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-json-strings@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-builder-binary-assignment-operator-visitor': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-export-namespace-from@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-literals@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.24.6) + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-for-of@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-logical-assignment-operators@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-skip-transparent-expression-wrappers': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-function-name@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-member-expression-literals@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-compilation-targets': 7.24.6 - '@babel/helper-function-name': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-json-strings@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-modules-amd@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.24.6) + '@babel/core': 7.26.0 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.25.9 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-literals@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-modules-commonjs@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-simple-access': 7.25.9 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-logical-assignment-operators@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-modules-systemjs@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.24.6) + '@babel/core': 7.26.0 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@babel/traverse': 7.25.9 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-member-expression-literals@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-modules-umd@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.25.9 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-modules-amd@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-named-capturing-groups-regex@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-module-transforms': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-modules-commonjs@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-new-target@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-module-transforms': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-simple-access': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-modules-systemjs@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-nullish-coalescing-operator@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-hoist-variables': 7.24.6 - '@babel/helper-module-transforms': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-validator-identifier': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-modules-umd@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-numeric-separator@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-module-transforms': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-named-capturing-groups-regex@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-object-rest-spread@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-create-regexp-features-plugin': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-compilation-targets': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/plugin-transform-parameters': 7.25.9(@babel/core@7.26.0) - '@babel/plugin-transform-new-target@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-object-super@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-replace-supers': 7.25.9(@babel/core@7.26.0) + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-nullish-coalescing-operator@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-optional-catch-binding@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.6) + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-numeric-separator@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-optional-chaining@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.24.6) + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-object-rest-spread@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-parameters@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-compilation-targets': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.24.6) - '@babel/plugin-transform-parameters': 7.24.6(@babel/core@7.24.6) + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-object-super@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-private-methods@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-replace-supers': 7.24.6(@babel/core@7.24.6) + '@babel/core': 7.26.0 + '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.25.9 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-optional-catch-binding@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-private-property-in-object@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.24.6) + '@babel/core': 7.26.0 + '@babel/helper-annotate-as-pure': 7.25.9 + '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.25.9 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-optional-chaining@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-property-literals@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-skip-transparent-expression-wrappers': 7.24.6 - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.6) + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-parameters@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-regenerator@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + regenerator-transform: 0.15.2 - '@babel/plugin-transform-private-methods@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-regexp-modifiers@7.26.0(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-create-class-features-plugin': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-private-property-in-object@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-reserved-words@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-annotate-as-pure': 7.24.6 - '@babel/helper-create-class-features-plugin': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.24.6) + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-property-literals@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-shorthand-properties@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-regenerator@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-spread@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - regenerator-transform: 0.15.2 - - '@babel/plugin-transform-reserved-words@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - - '@babel/plugin-transform-shorthand-properties@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - - '@babel/plugin-transform-spread@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-skip-transparent-expression-wrappers': 7.24.6 - - '@babel/plugin-transform-sticky-regex@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - - '@babel/plugin-transform-template-literals@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - - '@babel/plugin-transform-typeof-symbol@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - - '@babel/plugin-transform-typescript@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-annotate-as-pure': 7.24.6 - '@babel/helper-create-class-features-plugin': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-typescript': 7.24.6(@babel/core@7.24.6) - - '@babel/plugin-transform-unicode-escapes@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - - '@babel/plugin-transform-unicode-property-regex@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-create-regexp-features-plugin': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 - - '@babel/plugin-transform-unicode-regex@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-create-regexp-features-plugin': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 - - '@babel/plugin-transform-unicode-sets-regex@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-create-regexp-features-plugin': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 - - '@babel/preset-env@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/compat-data': 7.24.6 - '@babel/core': 7.24.6 - '@babel/helper-compilation-targets': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-validator-option': 7.24.6 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.24.6) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.24.6) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.24.6) - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.24.6) - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.24.6) - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.24.6) - '@babel/plugin-syntax-import-assertions': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-syntax-import-attributes': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.24.6) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.24.6) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.24.6) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.6) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.24.6) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.24.6) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.24.6) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.6) - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.24.6) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.24.6) - '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.24.6) - '@babel/plugin-transform-arrow-functions': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-async-generator-functions': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-async-to-generator': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-block-scoped-functions': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-block-scoping': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-class-properties': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-class-static-block': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-classes': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-computed-properties': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-destructuring': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-dotall-regex': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-duplicate-keys': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-dynamic-import': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-exponentiation-operator': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-export-namespace-from': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-for-of': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-function-name': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-json-strings': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-literals': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-logical-assignment-operators': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-member-expression-literals': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-modules-amd': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-modules-commonjs': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-modules-systemjs': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-modules-umd': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-named-capturing-groups-regex': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-new-target': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-nullish-coalescing-operator': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-numeric-separator': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-object-rest-spread': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-object-super': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-optional-catch-binding': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-optional-chaining': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-parameters': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-private-methods': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-private-property-in-object': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-property-literals': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-regenerator': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-reserved-words': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-shorthand-properties': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-spread': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-sticky-regex': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-template-literals': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-typeof-symbol': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-unicode-escapes': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-unicode-property-regex': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-unicode-regex': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-unicode-sets-regex': 7.24.6(@babel/core@7.24.6) - '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.24.6) - babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.24.6) - babel-plugin-polyfill-corejs3: 0.10.4(@babel/core@7.24.6) - babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@7.24.6) - core-js-compat: 3.37.0 - semver: 6.3.1 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.24.6)': + '@babel/plugin-transform-sticky-regex@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/types': 7.24.5 - esutils: 2.0.3 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/preset-typescript@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-template-literals@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-validator-option': 7.24.6 - '@babel/plugin-syntax-jsx': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-modules-commonjs': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-typescript': 7.24.6(@babel/core@7.24.6) + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/regjsgen@0.8.0': {} - - '@babel/runtime@7.24.5': + '@babel/plugin-transform-typeof-symbol@7.25.9(@babel/core@7.26.0)': dependencies: - regenerator-runtime: 0.14.1 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/template@7.24.0': + '@babel/plugin-transform-typescript@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/code-frame': 7.24.2 - '@babel/parser': 7.24.5 - '@babel/types': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-annotate-as-pure': 7.25.9 + '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 + '@babel/plugin-syntax-typescript': 7.25.9(@babel/core@7.26.0) + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-unicode-escapes@7.25.9(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-transform-unicode-property-regex@7.25.9(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-transform-unicode-regex@7.25.9(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-transform-unicode-sets-regex@7.25.9(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/preset-env@7.26.0(@babel/core@7.26.0)': + dependencies: + '@babel/compat-data': 7.26.2 + '@babel/core': 7.26.0 + '@babel/helper-compilation-targets': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-validator-option': 7.25.9 + '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-bugfix-safari-class-field-initializer-scope': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.26.0) + '@babel/plugin-syntax-import-assertions': 7.26.0(@babel/core@7.26.0) + '@babel/plugin-syntax-import-attributes': 7.26.0(@babel/core@7.26.0) + '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.26.0) + '@babel/plugin-transform-arrow-functions': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-async-generator-functions': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-async-to-generator': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-block-scoped-functions': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-block-scoping': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-class-properties': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-class-static-block': 7.26.0(@babel/core@7.26.0) + '@babel/plugin-transform-classes': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-computed-properties': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-destructuring': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-dotall-regex': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-duplicate-keys': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-duplicate-named-capturing-groups-regex': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-dynamic-import': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-exponentiation-operator': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-export-namespace-from': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-for-of': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-function-name': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-json-strings': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-literals': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-logical-assignment-operators': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-member-expression-literals': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-modules-amd': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-modules-commonjs': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-modules-systemjs': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-modules-umd': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-named-capturing-groups-regex': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-new-target': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-nullish-coalescing-operator': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-numeric-separator': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-object-rest-spread': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-object-super': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-optional-catch-binding': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-optional-chaining': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-parameters': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-private-methods': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-private-property-in-object': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-property-literals': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-regenerator': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-regexp-modifiers': 7.26.0(@babel/core@7.26.0) + '@babel/plugin-transform-reserved-words': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-shorthand-properties': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-spread': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-sticky-regex': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-template-literals': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-typeof-symbol': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-unicode-escapes': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-unicode-property-regex': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-unicode-regex': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-unicode-sets-regex': 7.25.9(@babel/core@7.26.0) + '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.26.0) + babel-plugin-polyfill-corejs2: 0.4.12(@babel/core@7.26.0) + babel-plugin-polyfill-corejs3: 0.10.6(@babel/core@7.26.0) + babel-plugin-polyfill-regenerator: 0.6.3(@babel/core@7.26.0) + core-js-compat: 3.39.0 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color - '@babel/template@7.24.6': + '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.26.0)': dependencies: - '@babel/code-frame': 7.24.6 - '@babel/parser': 7.24.6 - '@babel/types': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/types': 7.26.0 + esutils: 2.0.3 - '@babel/traverse@7.24.6': + '@babel/preset-typescript@7.26.0(@babel/core@7.26.0)': dependencies: - '@babel/code-frame': 7.24.6 - '@babel/generator': 7.24.6 - '@babel/helper-environment-visitor': 7.24.6 - '@babel/helper-function-name': 7.24.6 - '@babel/helper-hoist-variables': 7.24.6 - '@babel/helper-split-export-declaration': 7.24.6 - '@babel/parser': 7.24.6 - '@babel/types': 7.24.6 - debug: 4.3.4(supports-color@8.1.1) - globals: 11.12.0 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-validator-option': 7.25.9 + '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-modules-commonjs': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-typescript': 7.25.9(@babel/core@7.26.0) transitivePeerDependencies: - supports-color - '@babel/types@7.24.5': + '@babel/runtime@7.26.0': dependencies: - '@babel/helper-string-parser': 7.24.1 - '@babel/helper-validator-identifier': 7.24.5 - to-fast-properties: 2.0.0 + regenerator-runtime: 0.14.1 - '@babel/types@7.24.6': + '@babel/template@7.25.9': dependencies: - '@babel/helper-string-parser': 7.24.6 - '@babel/helper-validator-identifier': 7.24.6 - to-fast-properties: 2.0.0 + '@babel/code-frame': 7.26.2 + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 - '@bcoe/v8-coverage@0.2.3': {} + '@babel/traverse@7.25.9': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.2 + '@babel/parser': 7.26.2 + '@babel/template': 7.25.9 + '@babel/types': 7.26.0 + debug: 4.3.7(supports-color@8.1.1) + globals: 11.12.0 + transitivePeerDependencies: + - supports-color - '@cspotcode/source-map-support@0.8.1': + '@babel/types@7.26.0': dependencies: - '@jridgewell/trace-mapping': 0.3.9 + '@babel/helper-string-parser': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + + '@bcoe/v8-coverage@0.2.3': {} '@discoveryjs/json-ext@0.5.7': {} - '@es-joy/jsdoccomment@0.43.0': + '@es-joy/jsdoccomment@0.49.0': dependencies: - '@types/eslint': 8.56.10 - '@types/estree': 1.0.5 - '@typescript-eslint/types': 7.8.0 comment-parser: 1.4.1 - esquery: 1.5.0 - jsdoc-type-pratt-parser: 4.0.0 + esquery: 1.6.0 + jsdoc-type-pratt-parser: 4.1.0 + + '@esbuild/aix-ppc64@0.23.1': + optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': + '@esbuild/android-arm64@0.23.1': + optional: true + + '@esbuild/android-arm@0.23.1': + optional: true + + '@esbuild/android-x64@0.23.1': + optional: true + + '@esbuild/darwin-arm64@0.23.1': + optional: true + + '@esbuild/darwin-x64@0.23.1': + optional: true + + '@esbuild/freebsd-arm64@0.23.1': + optional: true + + '@esbuild/freebsd-x64@0.23.1': + optional: true + + '@esbuild/linux-arm64@0.23.1': + optional: true + + '@esbuild/linux-arm@0.23.1': + optional: true + + '@esbuild/linux-ia32@0.23.1': + optional: true + + '@esbuild/linux-loong64@0.23.1': + optional: true + + '@esbuild/linux-mips64el@0.23.1': + optional: true + + '@esbuild/linux-ppc64@0.23.1': + optional: true + + '@esbuild/linux-riscv64@0.23.1': + optional: true + + '@esbuild/linux-s390x@0.23.1': + optional: true + + '@esbuild/linux-x64@0.23.1': + optional: true + + '@esbuild/netbsd-x64@0.23.1': + optional: true + + '@esbuild/openbsd-arm64@0.23.1': + optional: true + + '@esbuild/openbsd-x64@0.23.1': + optional: true + + '@esbuild/sunos-x64@0.23.1': + optional: true + + '@esbuild/win32-arm64@0.23.1': + optional: true + + '@esbuild/win32-ia32@0.23.1': + optional: true + + '@esbuild/win32-x64@0.23.1': + optional: true + + '@eslint-community/eslint-utils@4.4.1(eslint@8.57.1)': dependencies: - eslint: 8.57.0 + eslint: 8.57.1 eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.10.0': {} + '@eslint-community/eslint-utils@4.4.1(eslint@9.16.0)': + dependencies: + eslint: 9.16.0 + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.1': {} + + '@eslint/config-array@0.19.0': + dependencies: + '@eslint/object-schema': 2.1.4 + debug: 4.3.7(supports-color@8.1.1) + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + + '@eslint/core@0.9.0': {} '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) espree: 9.6.1 globals: 13.24.0 - ignore: 5.3.1 + ignore: 5.3.2 import-fresh: 3.3.0 js-yaml: 4.1.0 minimatch: 3.1.2 @@ -6635,14 +6744,36 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@8.57.0': {} + '@eslint/eslintrc@3.2.0': + dependencies: + ajv: 6.12.6 + debug: 4.3.7(supports-color@8.1.1) + espree: 10.3.0 + globals: 14.0.0 + ignore: 5.3.2 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@8.57.1': {} + + '@eslint/js@9.16.0': {} + + '@eslint/object-schema@2.1.4': {} + + '@eslint/plugin-kit@0.2.3': + dependencies: + levn: 0.4.1 '@ethereumjs/rlp@4.0.1': {} '@ethereumjs/util@8.1.0': dependencies: '@ethereumjs/rlp': 4.0.1 - ethereum-cryptography: 2.1.3 + ethereum-cryptography: 2.2.1 micro-ftch: 0.3.1 '@ethersproject/abi@5.7.0': @@ -6706,19 +6837,6 @@ snapshots: dependencies: '@ethersproject/bignumber': 5.7.0 - '@ethersproject/contracts@5.7.0': - 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': dependencies: '@ethersproject/abstract-signer': 5.7.0 @@ -6731,37 +6849,6 @@ snapshots: '@ethersproject/properties': 5.7.0 '@ethersproject/strings': 5.7.0 - '@ethersproject/hdnode@5.7.0': - 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': - 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.7.0': dependencies: '@ethersproject/bytes': 5.7.0 @@ -6773,11 +6860,6 @@ snapshots: dependencies: '@ethersproject/logger': 5.7.0 - '@ethersproject/pbkdf2@5.7.0': - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/sha2': 5.7.0 - '@ethersproject/properties@5.7.0': dependencies: '@ethersproject/logger': 5.7.0 @@ -6803,7 +6885,7 @@ snapshots: '@ethersproject/transactions': 5.7.0 '@ethersproject/web': 5.7.1 bech32: 1.1.4 - ws: 7.4.6(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - utf-8-validate @@ -6830,18 +6912,9 @@ snapshots: '@ethersproject/logger': 5.7.0 '@ethersproject/properties': 5.7.0 bn.js: 5.2.1 - elliptic: 6.5.4 + elliptic: 6.6.1 hash.js: 1.1.7 - '@ethersproject/solidity@5.7.0': - 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': dependencies: '@ethersproject/bytes': 5.7.0 @@ -6860,30 +6933,6 @@ snapshots: '@ethersproject/rlp': 5.7.0 '@ethersproject/signing-key': 5.7.0 - '@ethersproject/units@5.7.0': - dependencies: - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/constants': 5.7.0 - '@ethersproject/logger': 5.7.0 - - '@ethersproject/wallet@5.7.0': - 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': dependencies: '@ethersproject/base64': 5.7.0 @@ -6892,14 +6941,6 @@ snapshots: '@ethersproject/properties': 5.7.0 '@ethersproject/strings': 5.7.0 - '@ethersproject/wordlists@5.7.0': - 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 - '@fastify/busboy@2.1.1': {} '@glimmer/interfaces@0.41.4': {} @@ -6913,10 +6954,17 @@ snapshots: '@glimmer/util@0.41.4': {} - '@humanwhocodes/config-array@0.11.14': + '@humanfs/core@0.19.1': {} + + '@humanfs/node@0.16.6': + dependencies: + '@humanfs/core': 0.19.1 + '@humanwhocodes/retry': 0.3.1 + + '@humanwhocodes/config-array@0.13.0': dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -6925,6 +6973,10 @@ snapshots: '@humanwhocodes/object-schema@2.0.3': {} + '@humanwhocodes/retry@0.3.1': {} + + '@humanwhocodes/retry@0.4.1': {} + '@iarna/toml@2.2.3': {} '@isaacs/cliui@8.0.2': @@ -6949,27 +7001,27 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 20.12.12 + '@types/node': 22.10.1 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 slash: 3.0.0 - '@jest/core@29.7.0(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5))': + '@jest/core@29.7.0': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.12 + '@types/node': 22.10.1 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.12.12)(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5)) + jest-config: 29.7.0(@types/node@22.10.1) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -6981,7 +7033,7 @@ snapshots: jest-util: 29.7.0 jest-validate: 29.7.0 jest-watcher: 29.7.0 - micromatch: 4.0.5 + micromatch: 4.0.8 pretty-format: 29.7.0 slash: 3.0.0 strip-ansi: 6.0.1 @@ -6994,7 +7046,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.12 + '@types/node': 22.10.1 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -7012,7 +7064,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 20.12.12 + '@types/node': 22.10.1 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -7034,14 +7086,14 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 20.12.12 + '@types/node': 22.10.1 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 glob: 7.2.3 graceful-fs: 4.2.11 istanbul-lib-coverage: 3.2.2 - istanbul-lib-instrument: 6.0.2 + istanbul-lib-instrument: 6.0.3 istanbul-lib-report: 3.0.1 istanbul-lib-source-maps: 4.0.1 istanbul-reports: 3.1.7 @@ -7051,7 +7103,7 @@ snapshots: slash: 3.0.0 string-length: 4.0.2 strip-ansi: 6.0.1 - v8-to-istanbul: 9.2.0 + v8-to-istanbul: 9.3.0 transitivePeerDependencies: - supports-color @@ -7081,7 +7133,7 @@ snapshots: '@jest/transform@29.7.0': dependencies: - '@babel/core': 7.24.6 + '@babel/core': 7.26.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 babel-plugin-istanbul: 6.1.1 @@ -7092,7 +7144,7 @@ snapshots: jest-haste-map: 29.7.0 jest-regex-util: 29.6.3 jest-util: 29.7.0 - micromatch: 4.0.5 + micromatch: 4.0.8 pirates: 4.0.6 slash: 3.0.0 write-file-atomic: 4.0.2 @@ -7104,14 +7156,14 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 20.12.12 - '@types/yargs': 17.0.32 + '@types/node': 22.10.1 + '@types/yargs': 17.0.33 chalk: 4.1.2 '@jridgewell/gen-mapping@0.3.5': dependencies: '@jridgewell/set-array': 1.2.1 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 '@jridgewell/trace-mapping': 0.3.25 '@jridgewell/resolve-uri@3.1.2': {} @@ -7123,17 +7175,12 @@ snapshots: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - '@jridgewell/sourcemap-codec@1.4.15': {} + '@jridgewell/sourcemap-codec@1.5.0': {} '@jridgewell/trace-mapping@0.3.25': dependencies: '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.4.15 - - '@jridgewell/trace-mapping@0.3.9': - dependencies: - '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 '@metamask/eth-sig-util@4.0.1': dependencies: @@ -7143,20 +7190,37 @@ snapshots: tweetnacl: 1.0.3 tweetnacl-util: 0.15.1 - '@noble/curves@1.3.0': + '@microsoft/tsdoc-config@0.17.1': dependencies: - '@noble/hashes': 1.3.3 + '@microsoft/tsdoc': 0.15.1 + ajv: 8.12.0 + jju: 1.4.0 + resolve: 1.22.8 - '@noble/curves@1.4.0': + '@microsoft/tsdoc@0.15.1': {} + + '@noble/curves@1.2.0': + dependencies: + '@noble/hashes': 1.3.2 + + '@noble/curves@1.4.2': dependencies: '@noble/hashes': 1.4.0 + '@noble/curves@1.7.0': + dependencies: + '@noble/hashes': 1.6.0 + '@noble/hashes@1.2.0': {} - '@noble/hashes@1.3.3': {} + '@noble/hashes@1.3.2': {} '@noble/hashes@1.4.0': {} + '@noble/hashes@1.6.0': {} + + '@noble/hashes@1.6.1': {} + '@noble/secp256k1@1.7.1': {} '@nodelib/fs.scandir@2.1.5': @@ -7171,36 +7235,29 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 - '@nomicfoundation/edr-darwin-arm64@0.3.7': - optional: true + '@nomicfoundation/edr-darwin-arm64@0.6.5': {} - '@nomicfoundation/edr-darwin-x64@0.3.7': - optional: true + '@nomicfoundation/edr-darwin-x64@0.6.5': {} - '@nomicfoundation/edr-linux-arm64-gnu@0.3.7': - optional: true + '@nomicfoundation/edr-linux-arm64-gnu@0.6.5': {} - '@nomicfoundation/edr-linux-arm64-musl@0.3.7': - optional: true + '@nomicfoundation/edr-linux-arm64-musl@0.6.5': {} - '@nomicfoundation/edr-linux-x64-gnu@0.3.7': - optional: true + '@nomicfoundation/edr-linux-x64-gnu@0.6.5': {} - '@nomicfoundation/edr-linux-x64-musl@0.3.7': - optional: true + '@nomicfoundation/edr-linux-x64-musl@0.6.5': {} - '@nomicfoundation/edr-win32-x64-msvc@0.3.7': - optional: true + '@nomicfoundation/edr-win32-x64-msvc@0.6.5': {} - '@nomicfoundation/edr@0.3.7': - optionalDependencies: - '@nomicfoundation/edr-darwin-arm64': 0.3.7 - '@nomicfoundation/edr-darwin-x64': 0.3.7 - '@nomicfoundation/edr-linux-arm64-gnu': 0.3.7 - '@nomicfoundation/edr-linux-arm64-musl': 0.3.7 - '@nomicfoundation/edr-linux-x64-gnu': 0.3.7 - '@nomicfoundation/edr-linux-x64-musl': 0.3.7 - '@nomicfoundation/edr-win32-x64-msvc': 0.3.7 + '@nomicfoundation/edr@0.6.5': + dependencies: + '@nomicfoundation/edr-darwin-arm64': 0.6.5 + '@nomicfoundation/edr-darwin-x64': 0.6.5 + '@nomicfoundation/edr-linux-arm64-gnu': 0.6.5 + '@nomicfoundation/edr-linux-arm64-musl': 0.6.5 + '@nomicfoundation/edr-linux-x64-gnu': 0.6.5 + '@nomicfoundation/edr-linux-x64-musl': 0.6.5 + '@nomicfoundation/edr-win32-x64-msvc': 0.6.5 '@nomicfoundation/ethereumjs-common@4.0.4': dependencies: @@ -7222,85 +7279,74 @@ snapshots: '@nomicfoundation/ethereumjs-rlp': 5.0.4 ethereum-cryptography: 0.1.3 - '@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.1': - optional: true - - '@nomicfoundation/solidity-analyzer-darwin-x64@0.1.1': - optional: true - - '@nomicfoundation/solidity-analyzer-freebsd-x64@0.1.1': + '@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.2': optional: true - '@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.1': + '@nomicfoundation/solidity-analyzer-darwin-x64@0.1.2': optional: true - '@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.1': + '@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.2': optional: true - '@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.1': + '@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.2': optional: true - '@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.1': + '@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.2': optional: true - '@nomicfoundation/solidity-analyzer-win32-arm64-msvc@0.1.1': + '@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.2': optional: true - '@nomicfoundation/solidity-analyzer-win32-ia32-msvc@0.1.1': + '@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.2': optional: true - '@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.1': - optional: true - - '@nomicfoundation/solidity-analyzer@0.1.1': + '@nomicfoundation/solidity-analyzer@0.1.2': optionalDependencies: - '@nomicfoundation/solidity-analyzer-darwin-arm64': 0.1.1 - '@nomicfoundation/solidity-analyzer-darwin-x64': 0.1.1 - '@nomicfoundation/solidity-analyzer-freebsd-x64': 0.1.1 - '@nomicfoundation/solidity-analyzer-linux-arm64-gnu': 0.1.1 - '@nomicfoundation/solidity-analyzer-linux-arm64-musl': 0.1.1 - '@nomicfoundation/solidity-analyzer-linux-x64-gnu': 0.1.1 - '@nomicfoundation/solidity-analyzer-linux-x64-musl': 0.1.1 - '@nomicfoundation/solidity-analyzer-win32-arm64-msvc': 0.1.1 - '@nomicfoundation/solidity-analyzer-win32-ia32-msvc': 0.1.1 - '@nomicfoundation/solidity-analyzer-win32-x64-msvc': 0.1.1 - - '@openzeppelin/defender-base-client@1.54.1': + '@nomicfoundation/solidity-analyzer-darwin-arm64': 0.1.2 + '@nomicfoundation/solidity-analyzer-darwin-x64': 0.1.2 + '@nomicfoundation/solidity-analyzer-linux-arm64-gnu': 0.1.2 + '@nomicfoundation/solidity-analyzer-linux-arm64-musl': 0.1.2 + '@nomicfoundation/solidity-analyzer-linux-x64-gnu': 0.1.2 + '@nomicfoundation/solidity-analyzer-linux-x64-musl': 0.1.2 + '@nomicfoundation/solidity-analyzer-win32-x64-msvc': 0.1.2 + + '@openzeppelin/defender-base-client@1.54.6': dependencies: amazon-cognito-identity-js: 6.3.12 async-retry: 1.3.3 - axios: 1.6.8 + axios: 1.7.8 lodash: 4.17.21 node-fetch: 2.7.0 transitivePeerDependencies: - debug - encoding - '@openzeppelin/defender-relay-client@1.54.1(@ethersproject/abstract-provider@5.7.0)(@ethersproject/abstract-signer@5.7.0)(@ethersproject/hash@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@ethersproject/transactions@5.7.0)(web3-core-helpers@1.10.4)(web3-core@1.10.4)': - dependencies: + ? '@openzeppelin/defender-relay-client@1.54.6(@ethersproject/abstract-provider@5.7.0)(@ethersproject/abstract-signer@5.7.0)(@ethersproject/hash@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@ethersproject/transactions@5.7.0)(web3-core-helpers@1.10.3)(web3-core@1.10.4)' + : dependencies: '@ethersproject/abstract-provider': 5.7.0 '@ethersproject/abstract-signer': 5.7.0 '@ethersproject/hash': 5.7.0 '@ethersproject/providers': 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@ethersproject/transactions': 5.7.0 - '@openzeppelin/defender-base-client': 1.54.1 + '@openzeppelin/defender-base-client': 1.54.6 amazon-cognito-identity-js: 6.3.12 - axios: 1.6.8 + axios: 1.7.8 lodash: 4.17.21 node-fetch: 2.7.0 web3-core: 1.10.4 - web3-core-helpers: 1.10.4 + web3-core-helpers: 1.10.3 transitivePeerDependencies: - debug - encoding - '@pkgjs/parseargs@0.11.0': - optional: true + '@pkgr/core@0.1.1': {} '@rauschma/stringio@1.4.0': dependencies: '@types/node': 10.17.60 + '@rtsao/scc@1.1.0': {} + '@samverschueren/stream-to-observable@0.3.1(rxjs@6.6.7)': dependencies: any-observable: 0.3.0(rxjs@6.6.7) @@ -7309,40 +7355,42 @@ snapshots: transitivePeerDependencies: - zenObservable - '@scure/base@1.1.6': {} + '@scure/base@1.1.9': {} + + '@scure/base@1.2.1': {} '@scure/bip32@1.1.5': dependencies: '@noble/hashes': 1.2.0 '@noble/secp256k1': 1.7.1 - '@scure/base': 1.1.6 - - '@scure/bip32@1.3.3': - dependencies: - '@noble/curves': 1.3.0 - '@noble/hashes': 1.3.3 - '@scure/base': 1.1.6 + '@scure/base': 1.1.9 '@scure/bip32@1.4.0': dependencies: - '@noble/curves': 1.4.0 + '@noble/curves': 1.4.2 '@noble/hashes': 1.4.0 - '@scure/base': 1.1.6 + '@scure/base': 1.1.9 - '@scure/bip39@1.1.1': + '@scure/bip32@1.6.0': dependencies: - '@noble/hashes': 1.2.0 - '@scure/base': 1.1.6 + '@noble/curves': 1.7.0 + '@noble/hashes': 1.6.1 + '@scure/base': 1.2.1 - '@scure/bip39@1.2.2': + '@scure/bip39@1.1.1': dependencies: - '@noble/hashes': 1.3.3 - '@scure/base': 1.1.6 + '@noble/hashes': 1.2.0 + '@scure/base': 1.1.9 '@scure/bip39@1.3.0': dependencies: '@noble/hashes': 1.4.0 - '@scure/base': 1.1.6 + '@scure/base': 1.1.9 + + '@scure/bip39@1.5.0': + dependencies: + '@noble/hashes': 1.6.1 + '@scure/base': 1.2.1 '@sentry/core@5.30.0': dependencies: @@ -7371,7 +7419,7 @@ snapshots: '@sentry/tracing': 5.30.0 '@sentry/types': 5.30.0 '@sentry/utils': 5.30.0 - cookie: 0.4.2 + cookie: 1.0.2 https-proxy-agent: 5.0.1 lru_map: 0.3.3 tslib: 1.14.1 @@ -7405,9 +7453,9 @@ snapshots: dependencies: '@sinonjs/commons': 3.0.1 - '@smithy/types@2.12.0': + '@smithy/types@3.7.1': dependencies: - tslib: 2.6.2 + tslib: 2.8.1 '@szmarczak/http-timer@4.0.6': dependencies: @@ -7415,70 +7463,62 @@ snapshots: '@tootallnate/once@2.0.0': {} - '@tsconfig/node10@1.0.11': {} - - '@tsconfig/node12@1.0.11': {} - - '@tsconfig/node14@1.0.3': {} - - '@tsconfig/node16@1.0.4': {} - '@types/babel__core@7.20.5': dependencies: - '@babel/parser': 7.24.5 - '@babel/types': 7.24.5 + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 - '@types/babel__traverse': 7.20.5 + '@types/babel__traverse': 7.20.6 '@types/babel__generator@7.6.8': dependencies: - '@babel/types': 7.24.5 + '@babel/types': 7.26.0 '@types/babel__template@7.4.4': dependencies: - '@babel/parser': 7.24.5 - '@babel/types': 7.24.5 + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 - '@types/babel__traverse@7.20.5': + '@types/babel__traverse@7.20.6': dependencies: - '@babel/types': 7.24.5 + '@babel/types': 7.26.0 '@types/bn.js@4.11.6': dependencies: - '@types/node': 20.12.12 + '@types/node': 22.10.1 - '@types/bn.js@5.1.5': + '@types/bn.js@5.1.6': dependencies: - '@types/node': 20.12.12 + '@types/node': 22.10.1 '@types/cacheable-request@6.0.3': dependencies: '@types/http-cache-semantics': 4.0.4 '@types/keyv': 3.1.4 - '@types/node': 20.12.12 + '@types/node': 22.10.1 '@types/responselike': 1.0.3 '@types/eslint-scope@3.7.7': dependencies: - '@types/eslint': 8.56.10 - '@types/estree': 1.0.5 + '@types/eslint': 9.6.1 + '@types/estree': 1.0.6 - '@types/eslint@8.56.10': + '@types/eslint@9.6.1': dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 '@types/json-schema': 7.0.15 - '@types/estree@1.0.5': {} + '@types/estree@1.0.6': {} '@types/glob@7.2.0': dependencies: '@types/minimatch': 5.1.2 - '@types/node': 20.12.12 + '@types/node': 22.10.1 '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 20.12.12 + '@types/node': 22.10.1 '@types/http-cache-semantics@4.0.4': {} @@ -7492,16 +7532,16 @@ snapshots: dependencies: '@types/istanbul-lib-report': 3.0.3 - '@types/jest@29.5.12': + '@types/jest@29.5.14': dependencies: expect: 29.7.0 pretty-format: 29.7.0 '@types/jsdom@20.0.1': dependencies: - '@types/node': 20.12.12 + '@types/node': 22.10.1 '@types/tough-cookie': 4.0.5 - parse5: 7.1.2 + parse5: 7.2.1 '@types/json-schema@7.0.15': {} @@ -7509,7 +7549,7 @@ snapshots: '@types/keyv@3.1.4': dependencies: - '@types/node': 20.12.12 + '@types/node': 22.10.1 '@types/lru-cache@5.1.1': {} @@ -7519,75 +7559,79 @@ snapshots: '@types/node@12.20.55': {} - '@types/node@20.12.12': + '@types/node@22.10.1': dependencies: - undici-types: 5.26.5 + undici-types: 6.20.0 + + '@types/node@22.7.5': + dependencies: + undici-types: 6.19.8 '@types/pbkdf2@3.1.2': dependencies: - '@types/node': 20.12.12 + '@types/node': 22.10.1 '@types/responselike@1.0.3': dependencies: - '@types/node': 20.12.12 + '@types/node': 22.10.1 '@types/secp256k1@4.0.6': dependencies: - '@types/node': 20.12.12 + '@types/node': 22.10.1 '@types/stack-utils@2.0.3': {} '@types/tough-cookie@4.0.5': {} - '@types/unist@2.0.10': {} + '@types/unist@2.0.11': {} '@types/yargs-parser@21.0.3': {} - '@types/yargs@17.0.32': + '@types/yargs@17.0.33': dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@7.11.0(@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)': - dependencies: - '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.11.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/scope-manager': 7.11.0 - '@typescript-eslint/type-utils': 7.11.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.11.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.11.0 - eslint: 8.57.0 + ? '@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2)' + : dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 8.16.0(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/scope-manager': 8.16.0 + '@typescript-eslint/type-utils': 8.16.0(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.16.0(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 8.16.0 + eslint: 9.16.0 graphemer: 1.4.0 - ignore: 5.3.1 + ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.4.5) + ts-api-utils: 1.4.3(typescript@5.7.2) optionalDependencies: - typescript: 5.4.5 + typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2)': dependencies: '@typescript-eslint/scope-manager': 6.21.0 '@typescript-eslint/types': 6.21.0 - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.7.2) '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.4(supports-color@8.1.1) - eslint: 8.57.0 + debug: 4.3.7(supports-color@8.1.1) + eslint: 8.57.1 optionalDependencies: - typescript: 5.4.5 + typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2)': dependencies: - '@typescript-eslint/scope-manager': 7.11.0 - '@typescript-eslint/types': 7.11.0 - '@typescript-eslint/typescript-estree': 7.11.0(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.11.0 - debug: 4.3.4(supports-color@8.1.1) - eslint: 8.57.0 + '@typescript-eslint/scope-manager': 8.16.0 + '@typescript-eslint/types': 8.16.0 + '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 8.16.0 + debug: 4.3.7(supports-color@8.1.1) + eslint: 9.16.0 optionalDependencies: - typescript: 5.4.5 + typescript: 5.7.2 transitivePeerDependencies: - supports-color @@ -7596,185 +7640,184 @@ snapshots: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/visitor-keys': 6.21.0 - '@typescript-eslint/scope-manager@7.11.0': + '@typescript-eslint/scope-manager@8.16.0': dependencies: - '@typescript-eslint/types': 7.11.0 - '@typescript-eslint/visitor-keys': 7.11.0 + '@typescript-eslint/types': 8.16.0 + '@typescript-eslint/visitor-keys': 8.16.0 - '@typescript-eslint/type-utils@7.11.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/type-utils@8.16.0(eslint@9.16.0)(typescript@5.7.2)': dependencies: - '@typescript-eslint/typescript-estree': 7.11.0(typescript@5.4.5) - '@typescript-eslint/utils': 7.11.0(eslint@8.57.0)(typescript@5.4.5) - debug: 4.3.4(supports-color@8.1.1) - eslint: 8.57.0 - ts-api-utils: 1.3.0(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) + '@typescript-eslint/utils': 8.16.0(eslint@9.16.0)(typescript@5.7.2) + debug: 4.3.7(supports-color@8.1.1) + eslint: 9.16.0 + ts-api-utils: 1.4.3(typescript@5.7.2) optionalDependencies: - typescript: 5.4.5 + typescript: 5.7.2 transitivePeerDependencies: - supports-color '@typescript-eslint/types@6.21.0': {} - '@typescript-eslint/types@7.11.0': {} + '@typescript-eslint/types@8.16.0': {} - '@typescript-eslint/types@7.8.0': {} - - '@typescript-eslint/typescript-estree@2.6.1(typescript@5.4.5)': + '@typescript-eslint/typescript-estree@2.6.1(typescript@5.7.2)': dependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) glob: 7.2.3 is-glob: 4.0.3 lodash.unescape: 4.0.1 - semver: 6.3.1 - tsutils: 3.21.0(typescript@5.4.5) + semver: 7.6.3 + tsutils: 3.21.0(typescript@5.7.2) optionalDependencies: - typescript: 5.4.5 + typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@6.21.0(typescript@5.4.5)': + '@typescript-eslint/typescript-estree@6.21.0(typescript@5.7.2)': dependencies: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 - semver: 7.6.0 - ts-api-utils: 1.3.0(typescript@5.4.5) + semver: 7.6.3 + ts-api-utils: 1.4.3(typescript@5.7.2) optionalDependencies: - typescript: 5.4.5 + typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@7.11.0(typescript@5.4.5)': + '@typescript-eslint/typescript-estree@8.16.0(typescript@5.7.2)': dependencies: - '@typescript-eslint/types': 7.11.0 - '@typescript-eslint/visitor-keys': 7.11.0 - debug: 4.3.4(supports-color@8.1.1) - globby: 11.1.0 + '@typescript-eslint/types': 8.16.0 + '@typescript-eslint/visitor-keys': 8.16.0 + debug: 4.3.7(supports-color@8.1.1) + 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@5.4.5) + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.4.3(typescript@5.7.2) optionalDependencies: - typescript: 5.4.5 + typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.11.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/utils@8.16.0(eslint@9.16.0)(typescript@5.7.2)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@typescript-eslint/scope-manager': 7.11.0 - '@typescript-eslint/types': 7.11.0 - '@typescript-eslint/typescript-estree': 7.11.0(typescript@5.4.5) - eslint: 8.57.0 + '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) + '@typescript-eslint/scope-manager': 8.16.0 + '@typescript-eslint/types': 8.16.0 + '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) + eslint: 9.16.0 + optionalDependencies: + typescript: 5.7.2 transitivePeerDependencies: - supports-color - - typescript '@typescript-eslint/visitor-keys@6.21.0': dependencies: '@typescript-eslint/types': 6.21.0 eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@7.11.0': + '@typescript-eslint/visitor-keys@8.16.0': dependencies: - '@typescript-eslint/types': 7.11.0 - eslint-visitor-keys: 3.4.3 + '@typescript-eslint/types': 8.16.0 + eslint-visitor-keys: 4.2.0 '@ungap/structured-clone@1.2.0': {} - '@webassemblyjs/ast@1.12.1': + '@webassemblyjs/ast@1.14.1': dependencies: - '@webassemblyjs/helper-numbers': 1.11.6 - '@webassemblyjs/helper-wasm-bytecode': 1.11.6 + '@webassemblyjs/helper-numbers': 1.13.2 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 - '@webassemblyjs/floating-point-hex-parser@1.11.6': {} + '@webassemblyjs/floating-point-hex-parser@1.13.2': {} - '@webassemblyjs/helper-api-error@1.11.6': {} + '@webassemblyjs/helper-api-error@1.13.2': {} - '@webassemblyjs/helper-buffer@1.12.1': {} + '@webassemblyjs/helper-buffer@1.14.1': {} - '@webassemblyjs/helper-numbers@1.11.6': + '@webassemblyjs/helper-numbers@1.13.2': dependencies: - '@webassemblyjs/floating-point-hex-parser': 1.11.6 - '@webassemblyjs/helper-api-error': 1.11.6 + '@webassemblyjs/floating-point-hex-parser': 1.13.2 + '@webassemblyjs/helper-api-error': 1.13.2 '@xtuc/long': 4.2.2 - '@webassemblyjs/helper-wasm-bytecode@1.11.6': {} + '@webassemblyjs/helper-wasm-bytecode@1.13.2': {} - '@webassemblyjs/helper-wasm-section@1.12.1': + '@webassemblyjs/helper-wasm-section@1.14.1': dependencies: - '@webassemblyjs/ast': 1.12.1 - '@webassemblyjs/helper-buffer': 1.12.1 - '@webassemblyjs/helper-wasm-bytecode': 1.11.6 - '@webassemblyjs/wasm-gen': 1.12.1 + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-buffer': 1.14.1 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/wasm-gen': 1.14.1 - '@webassemblyjs/ieee754@1.11.6': + '@webassemblyjs/ieee754@1.13.2': dependencies: '@xtuc/ieee754': 1.2.0 - '@webassemblyjs/leb128@1.11.6': + '@webassemblyjs/leb128@1.13.2': dependencies: '@xtuc/long': 4.2.2 - '@webassemblyjs/utf8@1.11.6': {} + '@webassemblyjs/utf8@1.13.2': {} - '@webassemblyjs/wasm-edit@1.12.1': + '@webassemblyjs/wasm-edit@1.14.1': dependencies: - '@webassemblyjs/ast': 1.12.1 - '@webassemblyjs/helper-buffer': 1.12.1 - '@webassemblyjs/helper-wasm-bytecode': 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/ast': 1.14.1 + '@webassemblyjs/helper-buffer': 1.14.1 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/helper-wasm-section': 1.14.1 + '@webassemblyjs/wasm-gen': 1.14.1 + '@webassemblyjs/wasm-opt': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + '@webassemblyjs/wast-printer': 1.14.1 - '@webassemblyjs/wasm-gen@1.12.1': + '@webassemblyjs/wasm-gen@1.14.1': 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/ast': 1.14.1 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/ieee754': 1.13.2 + '@webassemblyjs/leb128': 1.13.2 + '@webassemblyjs/utf8': 1.13.2 - '@webassemblyjs/wasm-opt@1.12.1': + '@webassemblyjs/wasm-opt@1.14.1': dependencies: - '@webassemblyjs/ast': 1.12.1 - '@webassemblyjs/helper-buffer': 1.12.1 - '@webassemblyjs/wasm-gen': 1.12.1 - '@webassemblyjs/wasm-parser': 1.12.1 + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-buffer': 1.14.1 + '@webassemblyjs/wasm-gen': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 - '@webassemblyjs/wasm-parser@1.12.1': + '@webassemblyjs/wasm-parser@1.14.1': dependencies: - '@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/ast': 1.14.1 + '@webassemblyjs/helper-api-error': 1.13.2 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/ieee754': 1.13.2 + '@webassemblyjs/leb128': 1.13.2 + '@webassemblyjs/utf8': 1.13.2 - '@webassemblyjs/wast-printer@1.12.1': + '@webassemblyjs/wast-printer@1.14.1': dependencies: - '@webassemblyjs/ast': 1.12.1 + '@webassemblyjs/ast': 1.14.1 '@xtuc/long': 4.2.2 - '@webpack-cli/configtest@2.1.1(webpack-cli@5.1.4(webpack@5.91.0))(webpack@5.91.0(webpack-cli@5.1.4))': + '@webpack-cli/configtest@2.1.1(webpack-cli@5.1.4)(webpack@5.96.1)': dependencies: - webpack: 5.91.0(webpack-cli@5.1.4) - webpack-cli: 5.1.4(webpack@5.91.0) + webpack: 5.96.1(webpack-cli@5.1.4) + webpack-cli: 5.1.4(webpack@5.96.1) - '@webpack-cli/info@2.0.2(webpack-cli@5.1.4(webpack@5.91.0))(webpack@5.91.0(webpack-cli@5.1.4))': + '@webpack-cli/info@2.0.2(webpack-cli@5.1.4)(webpack@5.96.1)': dependencies: - webpack: 5.91.0(webpack-cli@5.1.4) - webpack-cli: 5.1.4(webpack@5.91.0) + webpack: 5.96.1(webpack-cli@5.1.4) + webpack-cli: 5.1.4(webpack@5.96.1) - '@webpack-cli/serve@2.0.5(webpack-cli@5.1.4(webpack@5.91.0))(webpack@5.91.0(webpack-cli@5.1.4))': + '@webpack-cli/serve@2.0.5(webpack-cli@5.1.4)(webpack@5.96.1)': dependencies: - webpack: 5.91.0(webpack-cli@5.1.4) - webpack-cli: 5.1.4(webpack@5.91.0) + webpack: 5.96.1(webpack-cli@5.1.4) + webpack-cli: 5.1.4(webpack@5.96.1) '@xtuc/ieee754@1.2.0': {} @@ -7782,44 +7825,36 @@ snapshots: abab@2.0.6: {} - abortcontroller-polyfill@1.7.5: {} + abortcontroller-polyfill@1.7.6: {} acorn-globals@7.0.1: dependencies: - acorn: 8.11.3 - acorn-walk: 8.3.2 - - acorn-import-assertions@1.9.0(acorn@8.11.3): - dependencies: - acorn: 8.11.3 + acorn: 8.14.0 + acorn-walk: 8.3.4 acorn-jsx@5.3.2(acorn@7.4.1): dependencies: acorn: 7.4.1 - acorn-jsx@5.3.2(acorn@8.11.3): + acorn-jsx@5.3.2(acorn@8.14.0): dependencies: - acorn: 8.11.3 + acorn: 8.14.0 - acorn-walk@8.3.2: {} + acorn-walk@8.3.4: + dependencies: + acorn: 8.14.0 acorn@7.4.1: {} - acorn@8.11.3: {} + acorn@8.14.0: {} adm-zip@0.4.16: {} - aes-js@3.0.0: {} + aes-js@4.0.0-beta.5: {} agent-base@6.0.2: dependencies: - debug: 4.3.4(supports-color@8.1.1) - transitivePeerDependencies: - - supports-color - - agent-base@7.1.1: - dependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -7839,6 +7874,13 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 + ajv@8.12.0: + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js: 4.4.1 + amazon-cognito-identity-js@6.3.12: dependencies: '@aws-crypto/sha256-js': 1.2.2 @@ -7863,8 +7905,6 @@ snapshots: dependencies: string-width: 4.2.3 - ansi-colors@4.1.1: {} - ansi-colors@4.1.3: {} ansi-escapes@3.2.0: {} @@ -7881,7 +7921,7 @@ snapshots: ansi-regex@5.0.1: {} - ansi-regex@6.0.1: {} + ansi-regex@6.1.0: {} ansi-styles@2.2.1: {} @@ -7908,8 +7948,6 @@ snapshots: are-docs-informative@0.0.2: {} - arg@4.1.3: {} - argparse@1.0.10: dependencies: sprintf-js: 1.0.3 @@ -7927,7 +7965,7 @@ snapshots: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.5 es-object-atoms: 1.0.0 get-intrinsic: 1.2.4 is-string: 1.0.7 @@ -7951,7 +7989,7 @@ snapshots: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.5 es-errors: 1.3.0 es-object-atoms: 1.0.0 es-shim-unscopables: 1.0.2 @@ -7960,14 +7998,14 @@ snapshots: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.5 es-shim-unscopables: 1.0.2 array.prototype.flatmap@1.3.2: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.5 es-shim-unscopables: 1.0.2 arraybuffer.prototype.slice@1.0.3: @@ -7975,7 +8013,7 @@ snapshots: array-buffer-byte-length: 1.0.1 call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.5 es-errors: 1.3.0 get-intrinsic: 1.2.4 is-array-buffer: 3.0.4 @@ -7989,35 +8027,37 @@ snapshots: dependencies: retry: 0.13.1 + async@3.2.6: {} + asynckit@0.4.0: {} available-typed-arrays@1.0.7: dependencies: possible-typed-array-names: 1.0.0 - axios@1.6.2: + axios@1.7.4: dependencies: - follow-redirects: 1.15.6(debug@4.3.4) - form-data: 4.0.0 + follow-redirects: 1.15.9(debug@4.3.7) + form-data: 4.0.1 proxy-from-env: 1.1.0 transitivePeerDependencies: - debug - axios@1.6.8: + axios@1.7.8: dependencies: - follow-redirects: 1.15.6(debug@4.3.4) - form-data: 4.0.0 + follow-redirects: 1.15.9(debug@4.3.7) + form-data: 4.0.1 proxy-from-env: 1.1.0 transitivePeerDependencies: - debug - babel-jest@29.7.0(@babel/core@7.24.6): + babel-jest@29.7.0(@babel/core@7.26.0): dependencies: - '@babel/core': 7.24.6 + '@babel/core': 7.26.0 '@jest/transform': 29.7.0 '@types/babel__core': 7.20.5 babel-plugin-istanbul: 6.1.1 - babel-preset-jest: 29.6.3(@babel/core@7.24.6) + babel-preset-jest: 29.6.3(@babel/core@7.26.0) chalk: 4.1.2 graceful-fs: 4.2.11 slash: 3.0.0 @@ -8026,7 +8066,7 @@ snapshots: babel-plugin-istanbul@6.1.1: dependencies: - '@babel/helper-plugin-utils': 7.24.5 + '@babel/helper-plugin-utils': 7.25.9 '@istanbuljs/load-nyc-config': 1.1.0 '@istanbuljs/schema': 0.1.3 istanbul-lib-instrument: 5.2.1 @@ -8036,62 +8076,65 @@ snapshots: babel-plugin-jest-hoist@29.6.3: dependencies: - '@babel/template': 7.24.0 - '@babel/types': 7.24.5 + '@babel/template': 7.25.9 + '@babel/types': 7.26.0 '@types/babel__core': 7.20.5 - '@types/babel__traverse': 7.20.5 + '@types/babel__traverse': 7.20.6 - babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.24.6): + babel-plugin-polyfill-corejs2@0.4.12(@babel/core@7.26.0): dependencies: - '@babel/compat-data': 7.24.6 - '@babel/core': 7.24.6 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.24.6) + '@babel/compat-data': 7.26.2 + '@babel/core': 7.26.0 + '@babel/helper-define-polyfill-provider': 0.6.3(@babel/core@7.26.0) semver: 6.3.1 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-corejs3@0.10.4(@babel/core@7.24.6): + babel-plugin-polyfill-corejs3@0.10.6(@babel/core@7.26.0): dependencies: - '@babel/core': 7.24.6 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.24.6) - core-js-compat: 3.37.0 + '@babel/core': 7.26.0 + '@babel/helper-define-polyfill-provider': 0.6.3(@babel/core@7.26.0) + core-js-compat: 3.39.0 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-regenerator@0.6.2(@babel/core@7.24.6): + babel-plugin-polyfill-regenerator@0.6.3(@babel/core@7.26.0): dependencies: - '@babel/core': 7.24.6 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.24.6) + '@babel/core': 7.26.0 + '@babel/helper-define-polyfill-provider': 0.6.3(@babel/core@7.26.0) transitivePeerDependencies: - supports-color - babel-preset-current-node-syntax@1.0.1(@babel/core@7.24.6): - dependencies: - '@babel/core': 7.24.6 - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.24.6) - '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.24.6) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.24.6) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.24.6) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.24.6) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.24.6) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.6) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.24.6) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.24.6) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.24.6) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.6) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.24.6) - - babel-preset-jest@29.6.3(@babel/core@7.24.6): - dependencies: - '@babel/core': 7.24.6 + babel-preset-current-node-syntax@1.1.0(@babel/core@7.26.0): + dependencies: + '@babel/core': 7.26.0 + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.26.0) + '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.26.0) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.26.0) + '@babel/plugin-syntax-import-attributes': 7.26.0(@babel/core@7.26.0) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.26.0) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.26.0) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.26.0) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.26.0) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.26.0) + + babel-preset-jest@29.6.3(@babel/core@7.26.0): + dependencies: + '@babel/core': 7.26.0 babel-plugin-jest-hoist: 29.6.3 - babel-preset-current-node-syntax: 1.0.1(@babel/core@7.24.6) + babel-preset-current-node-syntax: 1.1.0(@babel/core@7.26.0) bail@1.0.5: {} balanced-match@1.0.2: {} - base-x@3.0.9: + base-x@3.0.10: dependencies: safe-buffer: 5.2.1 @@ -8107,7 +8150,7 @@ snapshots: bn.js@4.11.6: {} - bn.js@4.12.0: {} + bn.js@4.12.1: {} bn.js@5.2.1: {} @@ -8131,9 +8174,9 @@ snapshots: dependencies: balanced-match: 1.0.2 - braces@3.0.2: + braces@3.0.3: dependencies: - fill-range: 7.0.1 + fill-range: 7.1.1 brorand@1.1.0: {} @@ -8142,18 +8185,18 @@ snapshots: browserify-aes@1.2.0: dependencies: buffer-xor: 1.0.3 - cipher-base: 1.0.4 + cipher-base: 1.0.6 create-hash: 1.2.0 evp_bytestokey: 1.0.3 inherits: 2.0.4 safe-buffer: 5.2.1 - browserslist@4.23.0: + browserslist@4.24.2: dependencies: - caniuse-lite: 1.0.30001616 - electron-to-chromium: 1.4.757 - node-releases: 2.0.14 - update-browserslist-db: 1.0.15(browserslist@4.23.0) + caniuse-lite: 1.0.30001684 + electron-to-chromium: 1.5.67 + node-releases: 2.0.18 + update-browserslist-db: 1.1.1(browserslist@4.24.2) bs-logger@0.2.6: dependencies: @@ -8161,7 +8204,7 @@ snapshots: bs58@4.0.1: dependencies: - base-x: 3.0.9 + base-x: 3.0.10 bs58check@2.1.2: dependencies: @@ -8185,13 +8228,13 @@ snapshots: bufferutil@4.0.8: dependencies: - node-gyp-build: 4.8.1 + node-gyp-build: 4.8.4 builtin-modules@3.3.0: {} builtins@5.1.0: dependencies: - semver: 7.6.2 + semver: 7.6.3 bytes@3.1.2: {} @@ -8231,7 +8274,7 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001616: {} + caniuse-lite@1.0.30001684: {} chalk@1.1.3: dependencies: @@ -8269,10 +8312,10 @@ snapshots: chardet@0.7.0: {} - chokidar@3.5.3: + chokidar@3.6.0: dependencies: anymatch: 3.1.3 - braces: 3.0.2 + braces: 3.0.3 glob-parent: 5.1.2 is-binary-path: 2.1.0 is-glob: 4.0.3 @@ -8281,25 +8324,19 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - chokidar@3.6.0: + chokidar@4.0.1: dependencies: - anymatch: 3.1.3 - braces: 3.0.2 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.3 + readdirp: 4.0.2 - chrome-trace-event@1.0.3: {} + chrome-trace-event@1.0.4: {} ci-info@2.0.0: {} ci-info@3.9.0: {} - cipher-base@1.0.4: + ci@2.3.0: {} + + cipher-base@1.0.6: dependencies: inherits: 2.0.4 safe-buffer: 5.2.1 @@ -8309,7 +8346,7 @@ snapshots: regexp-util: 1.2.2 unicode-regex: 2.0.0 - cjs-module-lexer@1.3.1: {} + cjs-module-lexer@1.4.1: {} clean-stack@2.2.0: {} @@ -8323,9 +8360,9 @@ snapshots: dependencies: restore-cursor: 3.1.0 - cli-cursor@4.0.0: + cli-cursor@5.0.0: dependencies: - restore-cursor: 4.0.0 + restore-cursor: 5.1.0 cli-spinners@2.9.2: {} @@ -8388,9 +8425,11 @@ snapshots: commander@10.0.1: {} + commander@12.1.0: {} + commander@2.20.3: {} - commander@3.0.2: {} + commander@8.3.0: {} comment-parser@1.4.1: {} @@ -8402,11 +8441,11 @@ snapshots: convert-source-map@2.0.0: {} - cookie@0.4.2: {} + cookie@1.0.2: {} - core-js-compat@3.37.0: + core-js-compat@3.39.0: dependencies: - browserslist: 4.23.0 + browserslist: 4.24.2 cosmiconfig@5.2.1: dependencies: @@ -8417,7 +8456,7 @@ snapshots: create-hash@1.2.0: dependencies: - cipher-base: 1.0.4 + cipher-base: 1.0.6 inherits: 2.0.4 md5.js: 1.3.5 ripemd160: 2.0.2 @@ -8425,20 +8464,20 @@ snapshots: create-hmac@1.1.7: dependencies: - cipher-base: 1.0.4 + cipher-base: 1.0.6 create-hash: 1.2.0 inherits: 2.0.4 ripemd160: 2.0.2 safe-buffer: 5.2.1 sha.js: 2.4.11 - create-jest@29.7.0(@types/node@20.12.12)(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5)): + create-jest@29.7.0(@types/node@22.10.1): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.12.12)(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5)) + jest-config: 29.7.0(@types/node@22.10.1) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -8447,23 +8486,13 @@ snapshots: - supports-color - ts-node - create-require@1.1.1: {} - cross-fetch@4.0.0: dependencies: node-fetch: 2.7.0 transitivePeerDependencies: - encoding - cross-spawn@6.0.5: - dependencies: - nice-try: 1.0.5 - path-key: 2.0.1 - semver: 5.7.2 - shebang-command: 1.2.0 - which: 1.3.1 - - cross-spawn@7.0.3: + cross-spawn@7.0.6: dependencies: path-key: 3.1.1 shebang-command: 2.0.0 @@ -8477,14 +8506,10 @@ snapshots: dependencies: cssom: 0.3.8 - cssstyle@4.0.1: - dependencies: - rrweb-cssom: 0.6.0 - d@1.0.2: dependencies: es5-ext: 0.10.64 - type: 2.7.2 + type: 2.7.3 dashify@2.0.0: {} @@ -8494,11 +8519,6 @@ snapshots: whatwg-mimetype: 3.0.0 whatwg-url: 11.0.0 - data-urls@5.0.0: - dependencies: - whatwg-mimetype: 4.0.0 - whatwg-url: 14.0.0 - data-view-buffer@1.0.1: dependencies: call-bind: 1.0.7 @@ -8527,9 +8547,9 @@ snapshots: dependencies: ms: 2.1.3 - debug@4.3.4(supports-color@8.1.1): + debug@4.3.7(supports-color@8.1.1): dependencies: - ms: 2.1.2 + ms: 2.1.3 optionalDependencies: supports-color: 8.1.1 @@ -8555,7 +8575,7 @@ snapshots: dependencies: es-define-property: 1.0.0 es-errors: 1.3.0 - gopd: 1.0.1 + gopd: 1.1.0 define-properties@1.2.1: dependencies: @@ -8584,7 +8604,7 @@ snapshots: diff@4.0.2: {} - diff@5.0.0: {} + diff@5.2.0: {} dir-glob@3.0.1: dependencies: @@ -8617,23 +8637,17 @@ snapshots: semver: 5.7.2 sigmund: 1.0.1 - electron-to-chromium@1.4.757: {} + ejs@3.1.10: + dependencies: + jake: 10.9.2 - elegant-spinner@1.0.1: {} + electron-to-chromium@1.5.67: {} - elliptic@6.5.4: - dependencies: - bn.js: 4.12.0 - brorand: 1.1.0 - hash.js: 1.1.7 - hmac-drbg: 1.0.1 - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - minimalistic-crypto-utils: 1.0.1 + elegant-spinner@1.0.1: {} - elliptic@6.5.5: + elliptic@6.6.1: dependencies: - bn.js: 4.12.0 + bn.js: 4.12.1 brorand: 1.1.0 hash.js: 1.1.7 hmac-drbg: 1.0.1 @@ -8643,7 +8657,7 @@ snapshots: emittery@0.13.1: {} - emoji-regex@10.3.0: {} + emoji-regex@10.4.0: {} emoji-regex@7.0.3: {} @@ -8655,7 +8669,7 @@ snapshots: dependencies: once: 1.4.0 - enhanced-resolve@5.16.0: + enhanced-resolve@5.17.1: dependencies: graceful-fs: 4.2.11 tapable: 2.2.1 @@ -8669,13 +8683,13 @@ snapshots: env-paths@2.2.1: {} - envinfo@7.13.0: {} + envinfo@7.14.0: {} error-ex@1.3.2: dependencies: is-arrayish: 0.2.1 - es-abstract@1.23.3: + es-abstract@1.23.5: dependencies: array-buffer-byte-length: 1.0.1 arraybuffer.prototype.slice: 1.0.3 @@ -8688,14 +8702,14 @@ snapshots: es-errors: 1.3.0 es-object-atoms: 1.0.0 es-set-tostringtag: 2.0.3 - es-to-primitive: 1.2.1 + es-to-primitive: 1.3.0 function.prototype.name: 1.1.6 get-intrinsic: 1.2.4 get-symbol-description: 1.0.2 globalthis: 1.0.4 - gopd: 1.0.1 + gopd: 1.1.0 has-property-descriptors: 1.0.2 - has-proto: 1.0.3 + has-proto: 1.1.0 has-symbols: 1.0.3 hasown: 2.0.2 internal-slot: 1.0.7 @@ -8703,15 +8717,15 @@ snapshots: is-callable: 1.2.7 is-data-view: 1.0.1 is-negative-zero: 2.0.3 - is-regex: 1.1.4 + is-regex: 1.2.0 is-shared-array-buffer: 1.0.3 is-string: 1.0.7 is-typed-array: 1.1.13 is-weakref: 1.0.2 - object-inspect: 1.13.1 + object-inspect: 1.13.3 object-keys: 1.1.1 object.assign: 4.1.5 - regexp.prototype.flags: 1.5.2 + regexp.prototype.flags: 1.5.3 safe-array-concat: 1.1.2 safe-regex-test: 1.0.3 string.prototype.trim: 1.2.9 @@ -8719,10 +8733,10 @@ snapshots: string.prototype.trimstart: 1.0.8 typed-array-buffer: 1.0.2 typed-array-byte-length: 1.0.1 - typed-array-byte-offset: 1.0.2 - typed-array-length: 1.0.6 + typed-array-byte-offset: 1.0.3 + typed-array-length: 1.0.7 unbox-primitive: 1.0.2 - which-typed-array: 1.1.15 + which-typed-array: 1.1.16 es-define-property@1.0.0: dependencies: @@ -8730,7 +8744,7 @@ snapshots: es-errors@1.3.0: {} - es-module-lexer@1.5.2: {} + es-module-lexer@1.5.4: {} es-object-atoms@1.0.0: dependencies: @@ -8746,7 +8760,7 @@ snapshots: dependencies: hasown: 2.0.2 - es-to-primitive@1.2.1: + es-to-primitive@1.3.0: dependencies: is-callable: 1.2.7 is-date-object: 1.0.5 @@ -8772,7 +8786,34 @@ snapshots: d: 1.0.2 ext: 1.7.0 - escalade@3.1.2: {} + esbuild@0.23.1: + optionalDependencies: + '@esbuild/aix-ppc64': 0.23.1 + '@esbuild/android-arm': 0.23.1 + '@esbuild/android-arm64': 0.23.1 + '@esbuild/android-x64': 0.23.1 + '@esbuild/darwin-arm64': 0.23.1 + '@esbuild/darwin-x64': 0.23.1 + '@esbuild/freebsd-arm64': 0.23.1 + '@esbuild/freebsd-x64': 0.23.1 + '@esbuild/linux-arm': 0.23.1 + '@esbuild/linux-arm64': 0.23.1 + '@esbuild/linux-ia32': 0.23.1 + '@esbuild/linux-loong64': 0.23.1 + '@esbuild/linux-mips64el': 0.23.1 + '@esbuild/linux-ppc64': 0.23.1 + '@esbuild/linux-riscv64': 0.23.1 + '@esbuild/linux-s390x': 0.23.1 + '@esbuild/linux-x64': 0.23.1 + '@esbuild/netbsd-x64': 0.23.1 + '@esbuild/openbsd-arm64': 0.23.1 + '@esbuild/openbsd-x64': 0.23.1 + '@esbuild/sunos-x64': 0.23.1 + '@esbuild/win32-arm64': 0.23.1 + '@esbuild/win32-ia32': 0.23.1 + '@esbuild/win32-x64': 0.23.1 + + escalade@3.2.0: {} escape-string-regexp@1.0.5: {} @@ -8788,140 +8829,151 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-compat-utils@0.5.0(eslint@8.57.0): + eslint-compat-utils@0.5.1(eslint@9.16.0): dependencies: - eslint: 8.57.0 - semver: 7.6.2 + eslint: 9.16.0 + semver: 7.6.3 - eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0): - dependencies: + ? eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0))(eslint@9.16.0) + : dependencies: confusing-browser-globals: 1.0.11 - eslint: 8.57.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0) + eslint: 9.16.0 + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0) object.assign: 4.1.5 object.entries: 1.1.8 - semver: 6.3.1 - - eslint-config-airbnb-typescript@18.0.0(@typescript-eslint/eslint-plugin@7.11.0(@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0): - dependencies: - '@typescript-eslint/eslint-plugin': 7.11.0(@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/parser': 7.11.0(eslint@8.57.0)(typescript@5.4.5) - eslint: 8.57.0 - eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0) + semver: 7.6.3 + + ? eslint-config-airbnb-typescript@18.0.0(@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2))(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0))(eslint@9.16.0) + : dependencies: + '@typescript-eslint/eslint-plugin': 8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/parser': 8.16.0(eslint@9.16.0)(typescript@5.7.2) + eslint: 9.16.0 + eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0))(eslint@9.16.0) transitivePeerDependencies: - eslint-plugin-import - eslint-config-prettier@9.1.0(eslint@8.57.0): + eslint-config-prettier@9.1.0(eslint@9.16.0): dependencies: - eslint: 8.57.0 + eslint: 9.16.0 - eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@6.2.0(eslint@8.57.0))(eslint@8.57.0): - dependencies: - eslint: 8.57.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0) - eslint-plugin-n: 16.6.2(eslint@8.57.0) - eslint-plugin-promise: 6.2.0(eslint@8.57.0) + ? eslint-config-standard@17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0))(eslint-plugin-n@16.6.2(eslint@9.16.0))(eslint-plugin-promise@7.2.1(eslint@9.16.0))(eslint@9.16.0) + : dependencies: + eslint: 9.16.0 + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0) + eslint-plugin-n: 16.6.2(eslint@9.16.0) + eslint-plugin-promise: 7.2.1(eslint@9.16.0) eslint-import-resolver-node@0.3.9: dependencies: debug: 3.2.7 - is-core-module: 2.13.1 + is-core-module: 2.15.1 resolve: 1.22.8 transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): - dependencies: + ? eslint-module-utils@2.12.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@9.16.0) + : dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 7.11.0(eslint@8.57.0)(typescript@5.4.5) - eslint: 8.57.0 + '@typescript-eslint/parser': 8.16.0(eslint@9.16.0)(typescript@5.7.2) + eslint: 9.16.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color - eslint-plugin-es-x@7.6.0(eslint@8.57.0): + eslint-plugin-es-x@7.8.0(eslint@9.16.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@eslint-community/regexpp': 4.10.0 - eslint: 8.57.0 - eslint-compat-utils: 0.5.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) + '@eslint-community/regexpp': 4.12.1 + eslint: 9.16.0 + eslint-compat-utils: 0.5.1(eslint@9.16.0) - eslint-plugin-es@3.0.1(eslint@8.57.0): + eslint-plugin-es@3.0.1(eslint@9.16.0): dependencies: - eslint: 8.57.0 + eslint: 9.16.0 eslint-utils: 2.1.0 regexpp: 3.2.0 - eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0): + eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0): dependencies: + '@rtsao/scc': 1.1.0 array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 array.prototype.flat: 1.3.2 array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.57.0 + eslint: 9.16.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@9.16.0) hasown: 2.0.2 - is-core-module: 2.13.1 + is-core-module: 2.15.1 is-glob: 4.0.3 minimatch: 3.1.2 object.fromentries: 2.0.8 object.groupby: 1.0.3 object.values: 1.2.0 semver: 6.3.1 + string.prototype.trimend: 1.0.8 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 7.11.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/parser': 8.16.0(eslint@9.16.0)(typescript@5.7.2) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jsdoc@48.2.6(eslint@8.57.0): + eslint-plugin-jsdoc@50.6.0(eslint@9.16.0): dependencies: - '@es-joy/jsdoccomment': 0.43.0 + '@es-joy/jsdoccomment': 0.49.0 are-docs-informative: 0.0.2 comment-parser: 1.4.1 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) escape-string-regexp: 4.0.0 - eslint: 8.57.0 - esquery: 1.5.0 - semver: 7.6.2 + eslint: 9.16.0 + espree: 10.3.0 + esquery: 1.6.0 + parse-imports: 2.2.1 + semver: 7.6.3 spdx-expression-parse: 4.0.0 + synckit: 0.9.2 transitivePeerDependencies: - supports-color - eslint-plugin-n@16.6.2(eslint@8.57.0): + eslint-plugin-n@16.6.2(eslint@9.16.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) builtins: 5.1.0 - eslint: 8.57.0 - eslint-plugin-es-x: 7.6.0(eslint@8.57.0) - get-tsconfig: 4.7.4 + eslint: 9.16.0 + eslint-plugin-es-x: 7.8.0(eslint@9.16.0) + get-tsconfig: 4.8.1 globals: 13.24.0 - ignore: 5.3.1 + ignore: 5.3.2 is-builtin-module: 3.2.1 - is-core-module: 2.13.1 + is-core-module: 2.15.1 minimatch: 3.1.2 resolve: 1.22.8 - semver: 7.6.2 + semver: 7.6.3 - eslint-plugin-node@11.1.0(eslint@8.57.0): + eslint-plugin-node@11.1.0(eslint@9.16.0): dependencies: - eslint: 8.57.0 - eslint-plugin-es: 3.0.1(eslint@8.57.0) + eslint: 9.16.0 + eslint-plugin-es: 3.0.1(eslint@9.16.0) eslint-utils: 2.1.0 - ignore: 5.3.1 - minimatch: 3.1.2 + ignore: 5.3.2 + minimatch: 10.0.1 resolve: 1.22.8 - semver: 6.3.1 + semver: 7.6.3 + + eslint-plugin-promise@7.2.1(eslint@9.16.0): + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) + eslint: 9.16.0 - eslint-plugin-promise@6.2.0(eslint@8.57.0): + eslint-plugin-tsdoc@0.4.0: dependencies: - eslint: 8.57.0 + '@microsoft/tsdoc': 0.15.1 + '@microsoft/tsdoc-config': 0.17.1 eslint-scope@5.1.1: dependencies: @@ -8933,6 +8985,11 @@ snapshots: esrecurse: 4.3.0 estraverse: 5.3.0 + eslint-scope@8.2.0: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + eslint-utils@1.4.3: dependencies: eslint-visitor-keys: 1.3.0 @@ -8945,19 +9002,21 @@ snapshots: eslint-visitor-keys@3.4.3: {} + eslint-visitor-keys@4.2.0: {} + eslint@6.8.0: dependencies: - '@babel/code-frame': 7.24.2 + '@babel/code-frame': 7.26.2 ajv: 6.12.6 chalk: 2.4.2 - cross-spawn: 6.0.5 - debug: 4.3.4(supports-color@8.1.1) + cross-spawn: 7.0.6 + debug: 4.3.7(supports-color@8.1.1) doctrine: 3.0.0 eslint-scope: 5.1.1 eslint-utils: 1.4.3 eslint-visitor-keys: 1.3.0 espree: 6.2.1 - esquery: 1.5.0 + esquery: 1.6.0 esutils: 2.0.3 file-entry-cache: 5.0.1 functional-red-black-tree: 1.0.1 @@ -8972,13 +9031,13 @@ snapshots: json-stable-stringify-without-jsonify: 1.0.1 levn: 0.3.0 lodash: 4.17.21 - minimatch: 3.1.2 + minimatch: 10.0.1 mkdirp: 0.5.6 natural-compare: 1.4.0 optionator: 0.8.3 progress: 2.0.3 regexpp: 2.0.1 - semver: 6.3.1 + semver: 7.6.3 strip-ansi: 5.2.0 strip-json-comments: 3.1.1 table: 5.4.6 @@ -8987,26 +9046,26 @@ snapshots: transitivePeerDependencies: - supports-color - eslint@8.57.0: + eslint@8.57.1: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@eslint-community/regexpp': 4.10.0 + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) + '@eslint-community/regexpp': 4.12.1 '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.0 - '@humanwhocodes/config-array': 0.11.14 + '@eslint/js': 8.57.1 + '@humanwhocodes/config-array': 0.13.0 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.4(supports-color@8.1.1) + cross-spawn: 7.0.6 + debug: 4.3.7(supports-color@8.1.1) doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 - esquery: 1.5.0 + esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 file-entry-cache: 6.0.1 @@ -9014,7 +9073,7 @@ snapshots: glob-parent: 6.0.2 globals: 13.24.0 graphemer: 1.4.0 - ignore: 5.3.1 + ignore: 5.3.2 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 @@ -9030,12 +9089,57 @@ snapshots: transitivePeerDependencies: - supports-color + eslint@9.16.0: + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) + '@eslint-community/regexpp': 4.12.1 + '@eslint/config-array': 0.19.0 + '@eslint/core': 0.9.0 + '@eslint/eslintrc': 3.2.0 + '@eslint/js': 9.16.0 + '@eslint/plugin-kit': 0.2.3 + '@humanfs/node': 0.16.6 + '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.4.1 + '@types/estree': 1.0.6 + '@types/json-schema': 7.0.15 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.3.7(supports-color@8.1.1) + escape-string-regexp: 4.0.0 + eslint-scope: 8.2.0 + eslint-visitor-keys: 4.2.0 + espree: 10.3.0 + esquery: 1.6.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 8.0.0 + find-up: 5.0.0 + glob-parent: 6.0.2 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + json-stable-stringify-without-jsonify: 1.0.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.4 + transitivePeerDependencies: + - supports-color + esniff@2.0.1: dependencies: d: 1.0.2 es5-ext: 0.10.64 event-emitter: 0.3.5 - type: 2.7.2 + type: 2.7.3 + + espree@10.3.0: + dependencies: + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) + eslint-visitor-keys: 4.2.0 espree@6.2.1: dependencies: @@ -9045,13 +9149,13 @@ snapshots: espree@9.6.1: dependencies: - acorn: 8.11.3 - acorn-jsx: 5.3.2(acorn@8.11.3) + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) eslint-visitor-keys: 3.4.3 esprima@4.0.1: {} - esquery@1.5.0: + esquery@1.6.0: dependencies: estraverse: 5.3.0 @@ -9065,9 +9169,9 @@ snapshots: esutils@2.0.3: {} - ethereum-bloom-filters@1.1.0: + ethereum-bloom-filters@1.2.0: dependencies: - '@noble/hashes': 1.4.0 + '@noble/hashes': 1.6.1 ethereum-cryptography@0.1.3: dependencies: @@ -9084,7 +9188,7 @@ snapshots: randombytes: 2.1.0 safe-buffer: 5.2.1 scrypt-js: 3.0.1 - secp256k1: 4.0.3 + secp256k1: 5.0.1 setimmediate: 1.0.5 ethereum-cryptography@1.2.0: @@ -9094,60 +9198,37 @@ snapshots: '@scure/bip32': 1.1.5 '@scure/bip39': 1.1.1 - ethereum-cryptography@2.1.3: + ethereum-cryptography@2.2.1: dependencies: - '@noble/curves': 1.3.0 - '@noble/hashes': 1.3.3 - '@scure/bip32': 1.3.3 - '@scure/bip39': 1.2.2 + '@noble/curves': 1.4.2 + '@noble/hashes': 1.4.0 + '@scure/bip32': 1.4.0 + '@scure/bip39': 1.3.0 ethereumjs-abi@0.6.8: dependencies: - bn.js: 4.12.0 + bn.js: 4.12.1 ethereumjs-util: 6.2.1 ethereumjs-util@6.2.1: dependencies: - '@types/bn.js': 4.11.6 - bn.js: 4.12.0 - create-hash: 1.2.0 - elliptic: 6.5.5 - ethereum-cryptography: 0.1.3 - ethjs-util: 0.1.6 - rlp: 2.2.7 - - ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10): - 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(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@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 + '@types/bn.js': 4.11.6 + bn.js: 4.12.1 + create-hash: 1.2.0 + elliptic: 6.6.1 + ethereum-cryptography: 0.1.3 + ethjs-util: 0.1.6 + rlp: 2.2.7 + + ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10): + dependencies: + '@adraffy/ens-normalize': 1.10.1 + '@noble/curves': 1.2.0 + '@noble/hashes': 1.3.2 + '@types/node': 22.7.5 + aes-js: 4.0.0-beta.5 + tslib: 2.7.0 + ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - utf-8-validate @@ -9180,7 +9261,7 @@ snapshots: execa@2.1.0: dependencies: - cross-spawn: 7.0.3 + cross-spawn: 7.0.6 get-stream: 5.2.0 is-stream: 2.0.1 merge-stream: 2.0.0 @@ -9192,7 +9273,7 @@ snapshots: execa@5.1.1: dependencies: - cross-spawn: 7.0.3 + cross-spawn: 7.0.6 get-stream: 6.0.1 human-signals: 2.1.0 is-stream: 2.0.1 @@ -9214,7 +9295,7 @@ snapshots: ext@1.7.0: dependencies: - type: 2.7.2 + type: 2.7.3 extend@3.0.2: {} @@ -9234,7 +9315,7 @@ snapshots: '@nodelib/fs.walk': 1.2.8 glob-parent: 5.1.2 merge2: 1.4.1 - micromatch: 4.0.5 + micromatch: 4.0.8 fast-json-stable-stringify@2.1.0: {} @@ -9250,6 +9331,10 @@ snapshots: dependencies: bser: 2.1.1 + fdir@6.4.2(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 + figures@1.7.0: dependencies: escape-string-regexp: 1.0.5 @@ -9271,7 +9356,15 @@ snapshots: dependencies: flat-cache: 3.2.0 - fill-range@7.0.1: + file-entry-cache@8.0.0: + dependencies: + flat-cache: 4.0.1 + + filelist@1.0.4: + dependencies: + minimatch: 5.1.6 + + fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 @@ -9279,10 +9372,6 @@ snapshots: find-project-root@1.1.1: {} - find-up@2.1.0: - dependencies: - locate-path: 2.0.0 - find-up@4.1.0: dependencies: locate-path: 5.0.0 @@ -9301,34 +9390,39 @@ snapshots: flat-cache@3.2.0: dependencies: - flatted: 3.3.1 + flatted: 3.3.2 keyv: 4.5.4 rimraf: 3.0.2 + flat-cache@4.0.1: + dependencies: + flatted: 3.3.2 + keyv: 4.5.4 + flat@5.0.2: {} flatted@2.0.2: {} - flatted@3.3.1: {} + flatted@3.3.2: {} flatten@1.0.3: {} flow-parser@0.111.3: {} - follow-redirects@1.15.6(debug@4.3.4): + follow-redirects@1.15.9(debug@4.3.7): optionalDependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) for-each@0.3.3: dependencies: is-callable: 1.2.7 - foreground-child@3.1.1: + foreground-child@3.3.0: dependencies: - cross-spawn: 7.0.3 + cross-spawn: 7.0.6 signal-exit: 4.1.0 - form-data@4.0.0: + form-data@4.0.1: dependencies: asynckit: 0.4.0 combined-stream: 1.0.8 @@ -9336,14 +9430,6 @@ snapshots: fp-ts@1.19.3: {} - fs-extra@0.30.0: - dependencies: - graceful-fs: 4.2.11 - jsonfile: 2.4.0 - klaw: 1.3.1 - path-is-absolute: 1.0.1 - rimraf: 2.7.1 - fs-extra@7.0.1: dependencies: graceful-fs: 4.2.11 @@ -9361,7 +9447,7 @@ snapshots: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.5 functions-have-names: 1.2.3 functional-red-black-tree@1.0.1: {} @@ -9372,13 +9458,13 @@ snapshots: get-caller-file@2.0.5: {} - get-east-asian-width@1.2.0: {} + get-east-asian-width@1.3.0: {} get-intrinsic@1.2.4: dependencies: es-errors: 1.3.0 function-bind: 1.1.2 - has-proto: 1.0.3 + has-proto: 1.1.0 has-symbols: 1.0.3 hasown: 2.0.2 @@ -9390,11 +9476,11 @@ snapshots: get-stream@4.1.0: dependencies: - pump: 3.0.0 + pump: 3.0.2 get-stream@5.2.0: dependencies: - pump: 3.0.0 + pump: 3.0.2 get-stream@6.0.1: {} @@ -9404,7 +9490,7 @@ snapshots: es-errors: 1.3.0 get-intrinsic: 1.2.4 - get-tsconfig@4.7.4: + get-tsconfig@4.8.1: dependencies: resolve-pkg-maps: 1.0.0 @@ -9418,22 +9504,14 @@ snapshots: glob-to-regexp@0.4.1: {} - glob@10.3.12: - dependencies: - foreground-child: 3.1.1 - jackspeak: 2.3.6 - minimatch: 9.0.4 - minipass: 7.1.0 - path-scurry: 1.10.2 - - glob@7.2.0: + glob@11.0.0: dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 + foreground-child: 3.3.0 + jackspeak: 4.0.2 + minimatch: 10.0.1 + minipass: 7.1.2 + package-json-from-dist: 1.0.1 + path-scurry: 2.0.0 glob@7.2.3: dependencies: @@ -9449,7 +9527,7 @@ snapshots: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 5.0.1 + minimatch: 5.1.6 once: 1.4.0 globals@11.12.0: {} @@ -9462,10 +9540,12 @@ snapshots: dependencies: type-fest: 0.20.2 + globals@14.0.0: {} + globalthis@1.0.4: dependencies: define-properties: 1.2.1 - gopd: 1.0.1 + gopd: 1.1.0 globby@10.0.2: dependencies: @@ -9474,7 +9554,7 @@ snapshots: dir-glob: 3.0.1 fast-glob: 3.3.2 glob: 7.2.3 - ignore: 5.3.1 + ignore: 5.3.2 merge2: 1.4.1 slash: 3.0.0 @@ -9483,7 +9563,7 @@ snapshots: array-union: 2.1.0 dir-glob: 3.0.1 fast-glob: 3.3.2 - ignore: 5.3.1 + ignore: 5.3.2 merge2: 1.4.1 slash: 3.0.0 @@ -9495,7 +9575,7 @@ snapshots: pify: 2.3.0 pinkie-promise: 2.0.1 - gopd@1.0.1: + gopd@1.1.0: dependencies: get-intrinsic: 1.2.4 @@ -9528,56 +9608,56 @@ snapshots: source-map: 0.6.1 wordwrap: 1.0.0 optionalDependencies: - uglify-js: 3.17.4 + uglify-js: 3.19.3 - hardhat@2.22.3(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5))(typescript@5.4.5)(utf-8-validate@5.0.10): + hardhat@2.22.16(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10): dependencies: '@ethersproject/abi': 5.7.0 '@metamask/eth-sig-util': 4.0.1 - '@nomicfoundation/edr': 0.3.7 + '@nomicfoundation/edr': 0.6.5 '@nomicfoundation/ethereumjs-common': 4.0.4 '@nomicfoundation/ethereumjs-tx': 5.0.4 '@nomicfoundation/ethereumjs-util': 9.0.4 - '@nomicfoundation/solidity-analyzer': 0.1.1 + '@nomicfoundation/solidity-analyzer': 0.1.2 '@sentry/node': 5.30.0 - '@types/bn.js': 5.1.5 + '@types/bn.js': 5.1.6 '@types/lru-cache': 5.1.1 adm-zip: 0.4.16 aggregate-error: 3.1.0 ansi-escapes: 4.3.2 boxen: 5.1.2 - chalk: 2.4.2 - chokidar: 3.6.0 + chokidar: 4.0.1 ci-info: 2.0.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) enquirer: 2.4.1 env-paths: 2.2.1 ethereum-cryptography: 1.2.0 ethereumjs-abi: 0.6.8 - find-up: 2.1.0 + find-up: 5.0.0 fp-ts: 1.19.3 fs-extra: 7.0.1 - glob: 7.2.0 - immutable: 4.3.5 + immutable: 4.3.7 io-ts: 1.10.4 + json-stream-stringify: 3.1.6 keccak: 3.0.4 lodash: 4.17.21 mnemonist: 0.38.5 - mocha: 10.4.0 + mocha: 10.8.2 p-map: 4.0.0 + picocolors: 1.1.1 raw-body: 2.5.2 resolve: 1.17.0 - semver: 6.3.1 - solc: 0.7.3(debug@4.3.4) + semver: 7.6.3 + solc: 0.8.26(debug@4.3.7) source-map-support: 0.5.21 stacktrace-parser: 0.1.10 + tinyglobby: 0.2.10 tsort: 0.0.1 undici: 5.28.4 uuid: 8.3.2 - ws: 7.5.9(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: - ts-node: 10.9.2(@types/node@20.12.12)(typescript@5.4.5) - typescript: 5.4.5 + typescript: 5.7.2 transitivePeerDependencies: - bufferutil - c-kzg @@ -9590,8 +9670,6 @@ snapshots: has-bigints@1.0.2: {} - has-flag@1.0.0: {} - has-flag@3.0.0: {} has-flag@4.0.0: {} @@ -9600,7 +9678,9 @@ snapshots: dependencies: es-define-property: 1.0.0 - has-proto@1.0.3: {} + has-proto@1.1.0: + dependencies: + call-bind: 1.0.7 has-symbols@1.0.3: {} @@ -9631,18 +9711,12 @@ snapshots: minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 - hosted-git-info@2.8.9: {} - html-element-attributes@2.2.1: {} html-encoding-sniffer@3.0.0: dependencies: whatwg-encoding: 2.0.0 - html-encoding-sniffer@4.0.0: - dependencies: - whatwg-encoding: 3.1.1 - html-escaper@2.0.2: {} html-styles@1.0.0: {} @@ -9665,14 +9739,7 @@ snapshots: dependencies: '@tootallnate/once': 2.0.0 agent-base: 6.0.2 - debug: 4.3.4(supports-color@8.1.1) - transitivePeerDependencies: - - supports-color - - http-proxy-agent@7.0.2: - dependencies: - agent-base: 7.1.1 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -9684,14 +9751,7 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.3.4(supports-color@8.1.1) - transitivePeerDependencies: - - supports-color - - https-proxy-agent@7.0.4: - dependencies: - agent-base: 7.1.1 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -9711,9 +9771,9 @@ snapshots: ignore@4.0.6: {} - ignore@5.3.1: {} + ignore@5.3.2: {} - immutable@4.3.5: {} + immutable@4.3.7: {} import-fresh@2.0.0: dependencies: @@ -9725,7 +9785,7 @@ snapshots: parent-module: 1.0.1 resolve-from: 4.0.0 - import-local@3.1.0: + import-local@3.2.0: dependencies: pkg-dir: 4.2.0 resolve-cwd: 3.0.0 @@ -9792,6 +9852,10 @@ snapshots: is-arrayish@0.2.1: {} + is-async-function@2.0.0: + dependencies: + has-tostringtag: 1.0.2 + is-bigint@1.0.4: dependencies: has-bigints: 1.0.2 @@ -9817,7 +9881,7 @@ snapshots: dependencies: ci-info: 2.0.0 - is-core-module@2.13.1: + is-core-module@2.15.1: dependencies: hasown: 2.0.2 @@ -9835,6 +9899,10 @@ snapshots: is-extglob@2.1.1: {} + is-finalizationregistry@1.1.0: + dependencies: + call-bind: 1.0.7 + is-fullwidth-code-point@1.0.0: dependencies: number-is-nan: 1.0.1 @@ -9859,6 +9927,8 @@ snapshots: is-interactive@2.0.0: {} + is-map@2.0.3: {} + is-negative-zero@2.0.3: {} is-number-object@1.0.7: @@ -9887,13 +9957,17 @@ snapshots: is-promise@2.2.2: {} - is-regex@1.1.4: + is-regex@1.2.0: dependencies: call-bind: 1.0.7 + gopd: 1.1.0 has-tostringtag: 1.0.2 + hasown: 2.0.2 is-regexp@1.0.0: {} + is-set@2.0.3: {} + is-shared-array-buffer@1.0.3: dependencies: call-bind: 1.0.7 @@ -9912,7 +9986,7 @@ snapshots: is-typed-array@1.1.13: dependencies: - which-typed-array: 1.1.15 + which-typed-array: 1.1.16 is-typedarray@1.0.0: {} @@ -9920,12 +9994,19 @@ snapshots: is-unicode-supported@1.3.0: {} - is-unicode-supported@2.0.0: {} + is-unicode-supported@2.1.0: {} + + is-weakmap@2.0.2: {} is-weakref@1.0.2: dependencies: call-bind: 1.0.7 + is-weakset@2.0.3: + dependencies: + call-bind: 1.0.7 + get-intrinsic: 1.2.4 + is-whitespace-character@1.0.4: {} is-word-character@1.0.4: {} @@ -9949,21 +10030,21 @@ snapshots: istanbul-lib-instrument@5.2.1: dependencies: - '@babel/core': 7.24.6 - '@babel/parser': 7.24.5 + '@babel/core': 7.26.0 + '@babel/parser': 7.26.2 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 - semver: 6.3.1 + semver: 7.6.3 transitivePeerDependencies: - supports-color - istanbul-lib-instrument@6.0.2: + istanbul-lib-instrument@6.0.3: dependencies: - '@babel/core': 7.24.6 - '@babel/parser': 7.24.5 + '@babel/core': 7.26.0 + '@babel/parser': 7.26.2 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 - semver: 7.6.0 + semver: 7.6.3 transitivePeerDependencies: - supports-color @@ -9975,7 +10056,7 @@ snapshots: istanbul-lib-source-maps@4.0.1: dependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) istanbul-lib-coverage: 3.2.2 source-map: 0.6.1 transitivePeerDependencies: @@ -9988,11 +10069,16 @@ snapshots: iterall@1.3.0: {} - jackspeak@2.3.6: + jackspeak@4.0.2: dependencies: '@isaacs/cliui': 8.0.2 - optionalDependencies: - '@pkgjs/parseargs': 0.11.0 + + jake@10.9.2: + dependencies: + async: 3.2.6 + chalk: 4.1.2 + filelist: 1.0.4 + minimatch: 3.1.2 jest-changed-files@29.7.0: dependencies: @@ -10006,7 +10092,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.12 + '@types/node': 22.10.1 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -10026,16 +10112,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@20.12.12)(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5)): + jest-cli@29.7.0(@types/node@22.10.1): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5)) + '@jest/core': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.12.12)(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5)) + create-jest: 29.7.0(@types/node@22.10.1) exit: 0.1.2 - import-local: 3.1.0 - jest-config: 29.7.0(@types/node@20.12.12)(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5)) + import-local: 3.2.0 + jest-config: 29.7.0(@types/node@22.10.1) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -10045,12 +10131,12 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@20.12.12)(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5)): + jest-config@29.7.0(@types/node@22.10.1): dependencies: - '@babel/core': 7.24.6 + '@babel/core': 7.26.0 '@jest/test-sequencer': 29.7.0 '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.24.6) + babel-jest: 29.7.0(@babel/core@7.26.0) chalk: 4.1.2 ci-info: 3.9.0 deepmerge: 4.3.1 @@ -10064,14 +10150,13 @@ snapshots: jest-runner: 29.7.0 jest-util: 29.7.0 jest-validate: 29.7.0 - micromatch: 4.0.5 + micromatch: 4.0.8 parse-json: 5.2.0 pretty-format: 29.7.0 slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 20.12.12 - ts-node: 10.9.2(@types/node@20.12.12)(typescript@5.4.5) + '@types/node': 22.10.1 transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -10105,7 +10190,7 @@ snapshots: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 '@types/jsdom': 20.0.1 - '@types/node': 20.12.12 + '@types/node': 22.10.1 jest-mock: 29.7.0 jest-util: 29.7.0 jsdom: 20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -10119,7 +10204,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.12 + '@types/node': 22.10.1 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -10129,14 +10214,14 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 20.12.12 + '@types/node': 22.10.1 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 jest-regex-util: 29.6.3 jest-util: 29.7.0 jest-worker: 29.7.0 - micromatch: 4.0.5 + micromatch: 4.0.8 walker: 1.0.8 optionalDependencies: fsevents: 2.3.3 @@ -10155,12 +10240,12 @@ snapshots: jest-message-util@29.7.0: dependencies: - '@babel/code-frame': 7.24.2 + '@babel/code-frame': 7.26.2 '@jest/types': 29.6.3 '@types/stack-utils': 2.0.3 chalk: 4.1.2 graceful-fs: 4.2.11 - micromatch: 4.0.5 + micromatch: 4.0.8 pretty-format: 29.7.0 slash: 3.0.0 stack-utils: 2.0.6 @@ -10168,7 +10253,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.12.12 + '@types/node': 22.10.1 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -10203,7 +10288,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.12 + '@types/node': 22.10.1 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -10231,9 +10316,9 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.12 + '@types/node': 22.10.1 chalk: 4.1.2 - cjs-module-lexer: 1.3.1 + cjs-module-lexer: 1.4.1 collect-v8-coverage: 1.0.2 glob: 7.2.3 graceful-fs: 4.2.11 @@ -10251,15 +10336,15 @@ snapshots: jest-snapshot@29.7.0: dependencies: - '@babel/core': 7.24.6 - '@babel/generator': 7.24.5 - '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.6) - '@babel/plugin-syntax-typescript': 7.24.1(@babel/core@7.24.6) - '@babel/types': 7.24.5 + '@babel/core': 7.26.0 + '@babel/generator': 7.26.2 + '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-syntax-typescript': 7.25.9(@babel/core@7.26.0) + '@babel/types': 7.26.0 '@jest/expect-utils': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - babel-preset-current-node-syntax: 1.0.1(@babel/core@7.24.6) + babel-preset-current-node-syntax: 1.1.0(@babel/core@7.26.0) chalk: 4.1.2 expect: 29.7.0 graceful-fs: 4.2.11 @@ -10270,14 +10355,14 @@ snapshots: jest-util: 29.7.0 natural-compare: 1.4.0 pretty-format: 29.7.0 - semver: 7.6.0 + semver: 7.6.3 transitivePeerDependencies: - supports-color jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.12.12 + '@types/node': 22.10.1 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -10296,7 +10381,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.12 + '@types/node': 22.10.1 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -10305,30 +10390,30 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 20.12.12 + '@types/node': 22.10.1 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@29.7.0: dependencies: - '@types/node': 20.12.12 + '@types/node': 22.10.1 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@20.12.12)(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5)): + jest@29.7.0(@types/node@22.10.1): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5)) + '@jest/core': 29.7.0 '@jest/types': 29.6.3 - import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@20.12.12)(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5)) + import-local: 3.2.0 + jest-cli: 29.7.0(@types/node@22.10.1) transitivePeerDependencies: - '@types/node' - babel-plugin-macros - supports-color - ts-node - js-base64@2.6.4: {} + jju@1.4.0: {} js-base64@3.7.7: {} @@ -10347,12 +10432,12 @@ snapshots: dependencies: argparse: 2.0.1 - jsdoc-type-pratt-parser@4.0.0: {} + jsdoc-type-pratt-parser@4.1.0: {} jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: abab: 2.0.6 - acorn: 8.11.3 + acorn: 8.14.0 acorn-globals: 7.0.1 cssom: 0.5.0 cssstyle: 2.3.0 @@ -10360,13 +10445,13 @@ snapshots: decimal.js: 10.4.3 domexception: 4.0.0 escodegen: 2.1.0 - form-data: 4.0.0 + form-data: 4.0.1 html-encoding-sniffer: 3.0.0 http-proxy-agent: 5.0.0 https-proxy-agent: 5.0.1 is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.9 - parse5: 7.1.2 + nwsapi: 2.2.16 + parse5: 7.2.1 saxes: 6.0.0 symbol-tree: 3.2.4 tough-cookie: 4.1.4 @@ -10375,44 +10460,14 @@ snapshots: whatwg-encoding: 2.0.0 whatwg-mimetype: 3.0.0 whatwg-url: 11.0.0 - ws: 8.17.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) xml-name-validator: 4.0.0 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - jsdom@24.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): - dependencies: - cssstyle: 4.0.1 - data-urls: 5.0.0 - decimal.js: 10.4.3 - form-data: 4.0.0 - html-encoding-sniffer: 4.0.0 - http-proxy-agent: 7.0.2 - https-proxy-agent: 7.0.4 - is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.10 - parse5: 7.1.2 - rrweb-cssom: 0.7.0 - saxes: 6.0.0 - symbol-tree: 3.2.4 - tough-cookie: 4.1.4 - w3c-xmlserializer: 5.0.0 - webidl-conversions: 7.0.0 - whatwg-encoding: 3.1.1 - whatwg-mimetype: 4.0.0 - whatwg-url: 14.0.0 - ws: 8.17.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - xml-name-validator: 5.0.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - - jsesc@0.5.0: {} - - jsesc@2.5.2: {} + jsesc@3.0.2: {} json-buffer@3.0.1: {} @@ -10422,22 +10477,22 @@ snapshots: json-schema-traverse@0.4.1: {} + json-schema-traverse@1.0.0: {} + json-stable-stringify-without-jsonify@1.0.1: {} json-stable-stringify@1.0.1: dependencies: jsonify: 0.0.1 + json-stream-stringify@3.1.6: {} + json5@1.0.2: dependencies: minimist: 1.2.8 json5@2.2.3: {} - jsonfile@2.4.0: - optionalDependencies: - graceful-fs: 4.2.11 - jsonfile@4.0.0: optionalDependencies: graceful-fs: 4.2.11 @@ -10449,7 +10504,7 @@ snapshots: keccak@3.0.4: dependencies: node-addon-api: 2.0.2 - node-gyp-build: 4.8.1 + node-gyp-build: 4.8.4 readable-stream: 3.6.2 keyv@4.5.4: @@ -10458,10 +10513,6 @@ snapshots: kind-of@6.0.3: {} - klaw@1.3.1: - optionalDependencies: - graceful-fs: 4.2.11 - kleur@3.0.3: {} leven@2.1.0: {} @@ -10489,13 +10540,13 @@ snapshots: chalk: 2.4.2 commander: 2.20.3 cosmiconfig: 5.2.1 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) dedent: 0.7.0 del: 5.1.0 execa: 2.1.0 listr: 0.14.3 log-symbols: 3.0.0 - micromatch: 4.0.5 + micromatch: 4.0.8 normalize-path: 3.0.0 please-upgrade-node: 3.2.0 string-argv: 0.3.2 @@ -10541,20 +10592,8 @@ snapshots: - zen-observable - zenObservable - load-json-file@4.0.0: - dependencies: - graceful-fs: 4.2.11 - parse-json: 4.0.0 - pify: 3.0.0 - strip-bom: 3.0.0 - loader-runner@4.3.0: {} - locate-path@2.0.0: - dependencies: - p-locate: 2.0.0 - path-exists: 3.0.0 - locate-path@5.0.0: dependencies: p-locate: 4.1.0 @@ -10602,13 +10641,13 @@ snapshots: loglevel-colored-level-prefix@1.0.0: dependencies: chalk: 1.1.3 - loglevel: 1.9.1 + loglevel: 1.9.2 - loglevel@1.9.1: {} + loglevel@1.9.2: {} lowercase-keys@2.0.0: {} - lru-cache@10.2.2: {} + lru-cache@11.0.2: {} lru-cache@4.1.5: dependencies: @@ -10619,15 +10658,11 @@ snapshots: dependencies: yallist: 3.1.1 - lru-cache@6.0.0: - dependencies: - yallist: 4.0.0 - lru_map@0.3.3: {} make-dir@4.0.0: dependencies: - semver: 7.6.0 + semver: 7.6.3 make-error@1.3.6: {} @@ -10661,9 +10696,9 @@ snapshots: micro-ftch@0.3.1: {} - micromatch@4.0.5: + micromatch@4.0.8: dependencies: - braces: 3.0.2 + braces: 3.0.3 picomatch: 2.3.1 mime-db@1.52.0: {} @@ -10676,6 +10711,8 @@ snapshots: mimic-fn@2.1.0: {} + mimic-function@5.0.1: {} + mimic-response@1.0.1: {} mimic-response@3.1.0: {} @@ -10684,15 +10721,15 @@ snapshots: minimalistic-crypto-utils@1.0.1: {} - minimatch@3.0.4: + minimatch@10.0.1: dependencies: - brace-expansion: 1.1.11 + brace-expansion: 2.0.1 minimatch@3.1.2: dependencies: brace-expansion: 1.1.11 - minimatch@5.0.1: + minimatch@5.1.6: dependencies: brace-expansion: 2.0.1 @@ -10700,15 +10737,13 @@ snapshots: dependencies: brace-expansion: 2.0.1 - minimatch@9.0.4: + minimatch@9.0.5: dependencies: brace-expansion: 2.0.1 - minimist@1.2.5: {} - minimist@1.2.8: {} - minipass@7.1.0: {} + minipass@7.1.2: {} mkdirp@0.5.6: dependencies: @@ -10718,35 +10753,33 @@ snapshots: dependencies: obliterator: 2.0.4 - mocha@10.4.0: + mocha@10.8.2: dependencies: - ansi-colors: 4.1.1 + ansi-colors: 4.1.3 browser-stdout: 1.3.1 - chokidar: 3.5.3 - debug: 4.3.4(supports-color@8.1.1) - diff: 5.0.0 + chokidar: 3.6.0 + debug: 4.3.7(supports-color@8.1.1) + 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.0.1 + minimatch: 5.1.6 ms: 2.1.3 - serialize-javascript: 6.0.0 + serialize-javascript: 6.0.2 strip-json-comments: 3.1.1 supports-color: 8.1.1 - workerpool: 6.2.1 + workerpool: 6.5.1 yargs: 16.2.0 - yargs-parser: 20.2.4 + yargs-parser: 20.2.9 yargs-unparser: 2.0.0 mri@1.2.0: {} ms@2.0.0: {} - ms@2.1.2: {} - ms@2.1.3: {} multimatch@3.0.0: @@ -10754,60 +10787,43 @@ snapshots: array-differ: 2.1.0 array-union: 1.0.2 arrify: 1.0.1 - minimatch: 3.1.2 + minimatch: 10.0.1 mute-stream@0.0.8: {} n-readlines@1.0.0: {} + nanoid@3.3.8: {} + natural-compare@1.4.0: {} neo-async@2.6.2: {} next-tick@1.1.0: {} - nice-try@1.0.5: {} - node-addon-api@2.0.2: {} + node-addon-api@5.1.0: {} + node-fetch@2.7.0: dependencies: whatwg-url: 5.0.0 - node-gyp-build@4.8.1: {} + node-gyp-build@4.8.4: {} node-int64@0.4.0: {} - node-releases@2.0.14: {} + node-releases@2.0.18: {} - node-ts@6.0.1: + node-ts@6.1.3: dependencies: '@rauschma/stringio': 1.4.0 - '@types/node': 20.12.12 - - normalize-package-data@2.5.0: - dependencies: - hosted-git-info: 2.8.9 - resolve: 1.22.8 - semver: 5.7.2 - validate-npm-package-license: 3.0.4 + '@types/node': 22.10.1 normalize-path@3.0.0: {} normalize-url@6.1.0: {} - npm-run-all@4.1.5: - dependencies: - ansi-styles: 3.2.1 - chalk: 2.4.2 - cross-spawn: 6.0.5 - memorystream: 0.3.1 - minimatch: 3.1.2 - pidtree: 0.3.1 - read-pkg: 3.0.0 - shell-quote: 1.8.1 - string.prototype.padend: 3.1.6 - npm-run-path@3.1.0: dependencies: path-key: 3.1.1 @@ -10823,13 +10839,11 @@ snapshots: bn.js: 4.11.6 strip-hex-prefix: 1.0.0 - nwsapi@2.2.10: {} - - nwsapi@2.2.9: {} + nwsapi@2.2.16: {} object-assign@4.1.1: {} - object-inspect@1.13.1: {} + object-inspect@1.13.3: {} object-keys@1.1.1: {} @@ -10850,14 +10864,14 @@ snapshots: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.5 es-object-atoms: 1.0.0 object.groupby@1.0.3: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.5 object.values@1.2.0: dependencies: @@ -10883,6 +10897,10 @@ snapshots: dependencies: mimic-fn: 2.1.0 + onetime@7.0.0: + dependencies: + mimic-function: 5.0.1 + optionator@0.8.3: dependencies: deep-is: 0.1.4 @@ -10901,16 +10919,16 @@ snapshots: type-check: 0.4.0 word-wrap: 1.2.5 - ora@8.0.1: + ora@8.1.1: dependencies: chalk: 5.3.0 - cli-cursor: 4.0.0 + cli-cursor: 5.0.0 cli-spinners: 2.9.2 is-interactive: 2.0.0 - is-unicode-supported: 2.0.0 + is-unicode-supported: 2.1.0 log-symbols: 6.0.0 stdin-discarder: 0.2.2 - string-width: 7.1.0 + string-width: 7.2.0 strip-ansi: 7.1.0 os-tmpdir@1.0.2: {} @@ -10923,10 +10941,6 @@ snapshots: p-is-promise@2.1.0: {} - p-limit@1.3.0: - dependencies: - p-try: 1.0.0 - p-limit@2.3.0: dependencies: p-try: 2.2.0 @@ -10935,10 +10949,6 @@ snapshots: dependencies: yocto-queue: 0.1.0 - p-locate@2.0.0: - dependencies: - p-limit: 1.3.0 - p-locate@4.1.0: dependencies: p-limit: 2.3.0 @@ -10957,10 +10967,10 @@ snapshots: dependencies: aggregate-error: 3.1.0 - p-try@1.0.0: {} - p-try@2.2.0: {} + package-json-from-dist@1.0.1: {} + parent-module@1.0.1: dependencies: callsites: 3.1.0 @@ -10974,6 +10984,11 @@ snapshots: is-decimal: 1.0.4 is-hexadecimal: 1.0.4 + parse-imports@2.2.1: + dependencies: + es-module-lexer: 1.5.4 + slashes: 3.0.12 + parse-json@4.0.0: dependencies: error-ex: 1.3.2 @@ -10981,37 +10996,29 @@ snapshots: parse-json@5.2.0: dependencies: - '@babel/code-frame': 7.24.2 + '@babel/code-frame': 7.26.2 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 parse-srcset@1.0.2: {} - parse5@7.1.2: + parse5@7.2.1: dependencies: entities: 4.5.0 - path-exists@3.0.0: {} - path-exists@4.0.0: {} path-is-absolute@1.0.1: {} - path-key@2.0.1: {} - path-key@3.1.1: {} path-parse@1.0.7: {} - path-scurry@1.10.2: - dependencies: - lru-cache: 10.2.2 - minipass: 7.1.0 - - path-type@3.0.0: + path-scurry@2.0.0: dependencies: - pify: 3.0.0 + lru-cache: 11.0.2 + minipass: 7.1.2 path-type@4.0.0: {} @@ -11023,18 +11030,14 @@ snapshots: safe-buffer: 5.2.1 sha.js: 2.4.11 - picocolors@0.2.1: {} - - picocolors@1.0.0: {} + picocolors@1.1.1: {} picomatch@2.3.1: {} - pidtree@0.3.1: {} + picomatch@4.0.2: {} pify@2.3.0: {} - pify@3.0.0: {} - pinkie-promise@2.0.1: dependencies: pinkie: 2.0.4 @@ -11051,19 +11054,19 @@ snapshots: dependencies: semver-compare: 1.0.0 - poseidon-lite@0.2.0: {} + poseidon-lite@0.2.1: {} possible-typed-array-names@1.0.0: {} postcss-less@2.0.0: dependencies: - postcss: 5.2.18 + postcss: 8.4.49 postcss-media-query-parser@0.2.3: {} postcss-scss@2.0.0: dependencies: - postcss: 7.0.39 + postcss: 8.4.49 postcss-selector-parser@2.2.3: dependencies: @@ -11077,17 +11080,11 @@ snapshots: indexes-of: 1.0.1 uniq: 1.0.1 - postcss@5.2.18: - dependencies: - chalk: 1.1.3 - js-base64: 2.6.4 - source-map: 0.5.7 - supports-color: 3.2.3 - - postcss@7.0.39: + postcss@8.4.49: dependencies: - picocolors: 0.2.1 - source-map: 0.6.1 + nanoid: 3.3.8 + picocolors: 1.1.1 + source-map-js: 1.2.1 prelude-ls@1.1.2: {} @@ -11095,22 +11092,22 @@ snapshots: prettier-eslint@16.3.0: dependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/parser': 6.21.0(eslint@8.57.1)(typescript@5.7.2) common-tags: 1.8.2 dlv: 1.1.3 - eslint: 8.57.0 + eslint: 8.57.1 indent-string: 4.0.0 lodash.merge: 4.6.2 loglevel-colored-level-prefix: 1.0.0 - prettier: 3.2.5 + prettier: 3.4.1 pretty-format: 29.7.0 require-relative: 0.8.7 - typescript: 5.4.5 - vue-eslint-parser: 9.4.2(eslint@8.57.0) + typescript: 5.7.2 + vue-eslint-parser: 9.4.3(eslint@8.57.1) transitivePeerDependencies: - supports-color - prettier-standard@16.4.1(typescript@5.4.5): + prettier-standard@16.4.1(typescript@5.7.2): dependencies: chalk: 2.4.2 diff: 4.0.2 @@ -11123,23 +11120,23 @@ snapshots: lint-staged: 9.4.3 mri: 1.2.0 multimatch: 3.0.0 - prettierx: 0.11.3(typescript@5.4.5) + prettierx: 0.11.3(typescript@5.7.2) transitivePeerDependencies: - supports-color - typescript - zen-observable - zenObservable - prettier@3.2.5: {} + prettier@3.4.1: {} - prettierx@0.11.3(typescript@5.4.5): + prettierx@0.11.3(typescript@5.7.2): dependencies: '@angular/compiler': 8.2.14 '@babel/code-frame': 7.8.3 '@babel/parser': 7.9.4 '@glimmer/syntax': 0.41.4 '@iarna/toml': 2.2.3 - '@typescript-eslint/typescript-estree': 2.6.1(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 2.6.1(typescript@5.7.2) angular-estree-parser: 1.3.1(@angular/compiler@8.2.14) angular-html-parser: 1.4.0 camelcase: 5.3.1 @@ -11171,8 +11168,8 @@ snapshots: linguist-languages: 7.6.0 lodash.uniqby: 4.7.0 mem: 5.1.1 - minimatch: 3.0.4 - minimist: 1.2.5 + minimatch: 10.0.1 + minimist: 1.2.8 n-readlines: 1.0.0 normalize-path: 3.0.0 parse-srcset: 1.0.2 @@ -11185,7 +11182,7 @@ snapshots: remark-math: 1.0.6(remark-parse@5.0.0) remark-parse: 5.0.0 resolve: 1.15.1 - semver: 6.3.0 + semver: 7.6.3 string-width: 4.2.0 unicode-regex: 3.0.0 unified: 8.4.2 @@ -11193,7 +11190,7 @@ snapshots: yaml: 1.8.3 yaml-unist-parser: 1.1.1 optionalDependencies: - typescript: 5.4.5 + typescript: 5.7.2 transitivePeerDependencies: - supports-color @@ -11214,9 +11211,11 @@ snapshots: pseudomap@1.0.2: {} - psl@1.9.0: {} + psl@1.14.0: + dependencies: + punycode: 2.3.1 - pump@3.0.0: + pump@3.0.2: dependencies: end-of-stream: 1.4.4 once: 1.4.0 @@ -11244,12 +11243,6 @@ snapshots: react-is@18.3.1: {} - read-pkg@3.0.0: - dependencies: - load-json-file: 4.0.0 - normalize-package-data: 2.5.0 - path-type: 3.0.0 - readable-stream@3.6.2: dependencies: inherits: 2.0.4 @@ -11260,6 +11253,8 @@ snapshots: dependencies: picomatch: 2.3.1 + readdirp@4.0.2: {} + rechoir@0.8.0: dependencies: resolve: 1.22.8 @@ -11271,7 +11266,17 @@ snapshots: transitivePeerDependencies: - supports-color - regenerate-unicode-properties@10.1.1: + reflect.getprototypeof@1.0.7: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.5 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + gopd: 1.1.0 + which-builtin-type: 1.2.0 + + regenerate-unicode-properties@10.2.0: dependencies: regenerate: 1.4.2 @@ -11281,13 +11286,13 @@ snapshots: regenerator-transform@0.15.2: dependencies: - '@babel/runtime': 7.24.5 + '@babel/runtime': 7.26.0 regexp-util@1.2.2: dependencies: tslib: 1.14.1 - regexp.prototype.flags@1.5.2: + regexp.prototype.flags@1.5.3: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 @@ -11298,18 +11303,20 @@ snapshots: regexpp@3.2.0: {} - regexpu-core@5.3.2: + regexpu-core@6.2.0: dependencies: - '@babel/regjsgen': 0.8.0 regenerate: 1.4.2 - regenerate-unicode-properties: 10.1.1 - regjsparser: 0.9.1 + regenerate-unicode-properties: 10.2.0 + regjsgen: 0.8.0 + regjsparser: 0.12.0 unicode-match-property-ecmascript: 2.0.0 - unicode-match-property-value-ecmascript: 2.1.0 + unicode-match-property-value-ecmascript: 2.2.0 - regjsparser@0.9.1: + regjsgen@0.8.0: {} + + regjsparser@0.12.0: dependencies: - jsesc: 0.5.0 + jsesc: 3.0.2 remark-math@1.0.6(remark-parse@5.0.0): dependencies: @@ -11327,7 +11334,7 @@ snapshots: parse-entities: 1.2.2 repeat-string: 1.6.1 state-toggle: 1.0.3 - trim: 0.0.1 + trim: 1.0.1 trim-trailing-lines: 1.1.4 unherit: 1.1.3 unist-util-remove-position: 1.1.4 @@ -11370,7 +11377,7 @@ snapshots: resolve@1.22.8: dependencies: - is-core-module: 2.13.1 + is-core-module: 2.15.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 @@ -11388,10 +11395,10 @@ snapshots: onetime: 5.1.2 signal-exit: 3.0.7 - restore-cursor@4.0.0: + restore-cursor@5.1.0: dependencies: - onetime: 5.1.2 - signal-exit: 3.0.7 + onetime: 7.0.0 + signal-exit: 4.1.0 retry@0.13.1: {} @@ -11401,17 +11408,14 @@ snapshots: dependencies: glob: 7.2.3 - rimraf@2.7.1: - dependencies: - glob: 7.2.3 - rimraf@3.0.2: dependencies: glob: 7.2.3 - rimraf@5.0.7: + rimraf@6.0.1: dependencies: - glob: 10.3.12 + glob: 11.0.0 + package-json-from-dist: 1.0.1 ripemd160@2.0.2: dependencies: @@ -11422,10 +11426,6 @@ snapshots: dependencies: bn.js: 5.2.1 - rrweb-cssom@0.6.0: {} - - rrweb-cssom@0.7.0: {} - run-async@2.4.1: {} run-parallel@1.2.0: @@ -11449,7 +11449,7 @@ snapshots: dependencies: call-bind: 1.0.7 es-errors: 1.3.0 - is-regex: 1.1.4 + is-regex: 1.2.0 safer-buffer@2.1.2: {} @@ -11465,29 +11465,19 @@ snapshots: scrypt-js@3.0.1: {} - secp256k1@4.0.3: + secp256k1@5.0.1: dependencies: - elliptic: 6.5.5 - node-addon-api: 2.0.2 - node-gyp-build: 4.8.1 + elliptic: 6.6.1 + node-addon-api: 5.1.0 + node-gyp-build: 4.8.4 semver-compare@1.0.0: {} semver@5.7.2: {} - semver@6.3.0: {} - semver@6.3.1: {} - semver@7.6.0: - dependencies: - lru-cache: 6.0.0 - - semver@7.6.2: {} - - serialize-javascript@6.0.0: - dependencies: - randombytes: 2.1.0 + semver@7.6.3: {} serialize-javascript@6.0.2: dependencies: @@ -11499,7 +11489,7 @@ snapshots: es-errors: 1.3.0 function-bind: 1.1.2 get-intrinsic: 1.2.4 - gopd: 1.0.1 + gopd: 1.1.0 has-property-descriptors: 1.0.2 set-function-name@2.0.2: @@ -11522,26 +11512,18 @@ snapshots: dependencies: kind-of: 6.0.3 - shebang-command@1.2.0: - dependencies: - shebang-regex: 1.0.0 - shebang-command@2.0.0: dependencies: shebang-regex: 3.0.0 - shebang-regex@1.0.0: {} - shebang-regex@3.0.0: {} - shell-quote@1.8.1: {} - side-channel@1.0.6: dependencies: call-bind: 1.0.7 es-errors: 1.3.0 get-intrinsic: 1.2.4 - object-inspect: 1.13.1 + object-inspect: 1.13.3 sigmund@1.0.1: {} @@ -11555,6 +11537,8 @@ snapshots: slash@3.0.0: {} + slashes@3.0.12: {} + slice-ansi@0.0.4: {} slice-ansi@2.1.0: @@ -11563,20 +11547,20 @@ snapshots: astral-regex: 1.0.0 is-fullwidth-code-point: 2.0.0 - solc@0.7.3(debug@4.3.4): + solc@0.8.26(debug@4.3.7): dependencies: command-exists: 1.2.9 - commander: 3.0.2 - follow-redirects: 1.15.6(debug@4.3.4) - fs-extra: 0.30.0 + commander: 8.3.0 + follow-redirects: 1.15.9(debug@4.3.7) js-sha3: 0.8.0 memorystream: 0.3.1 - require-from-string: 2.0.2 semver: 5.7.2 tmp: 0.0.33 transitivePeerDependencies: - debug + source-map-js@1.2.1: {} + source-map-support@0.5.13: dependencies: buffer-from: 1.1.2 @@ -11587,30 +11571,18 @@ snapshots: buffer-from: 1.1.2 source-map: 0.6.1 - source-map@0.5.7: {} - source-map@0.6.1: {} source-map@0.7.4: {} - spdx-correct@3.2.0: - dependencies: - spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.17 - spdx-exceptions@2.5.0: {} - spdx-expression-parse@3.0.1: - dependencies: - spdx-exceptions: 2.5.0 - spdx-license-ids: 3.0.17 - spdx-expression-parse@4.0.0: dependencies: spdx-exceptions: 2.5.0 - spdx-license-ids: 3.0.17 + spdx-license-ids: 3.0.20 - spdx-license-ids@3.0.17: {} + spdx-license-ids@3.0.20: {} sprintf-js@1.0.3: {} @@ -11670,24 +11642,17 @@ snapshots: emoji-regex: 9.2.2 strip-ansi: 7.1.0 - string-width@7.1.0: + string-width@7.2.0: dependencies: - emoji-regex: 10.3.0 - get-east-asian-width: 1.2.0 + emoji-regex: 10.4.0 + get-east-asian-width: 1.3.0 strip-ansi: 7.1.0 - string.prototype.padend@3.1.6: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-object-atoms: 1.0.0 - string.prototype.trim@1.2.9: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.5 es-object-atoms: 1.0.0 string.prototype.trimend@1.0.8: @@ -11730,7 +11695,7 @@ snapshots: strip-ansi@7.1.0: dependencies: - ansi-regex: 6.0.1 + ansi-regex: 6.1.0 strip-bom@3.0.0: {} @@ -11746,10 +11711,6 @@ snapshots: supports-color@2.0.0: {} - supports-color@3.2.3: - dependencies: - has-flag: 1.0.0 - supports-color@5.5.0: dependencies: has-flag: 3.0.0 @@ -11768,6 +11729,11 @@ snapshots: symbol-tree@3.2.4: {} + synckit@0.9.2: + dependencies: + '@pkgr/core': 0.1.1 + tslib: 2.8.1 + table@5.4.6: dependencies: ajv: 6.12.6 @@ -11777,19 +11743,19 @@ snapshots: tapable@2.2.1: {} - terser-webpack-plugin@5.3.10(webpack@5.91.0(webpack-cli@5.1.4)): + terser-webpack-plugin@5.3.10(webpack@5.96.1): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.2 - terser: 5.31.0 - webpack: 5.91.0(webpack-cli@5.1.4) + terser: 5.36.0 + webpack: 5.96.1(webpack-cli@5.1.4) - terser@5.31.0: + terser@5.36.0: dependencies: '@jridgewell/source-map': 0.3.6 - acorn: 8.11.3 + acorn: 8.14.0 commander: 2.20.3 source-map-support: 0.5.21 @@ -11797,20 +11763,23 @@ snapshots: dependencies: '@istanbuljs/schema': 0.1.3 glob: 7.2.3 - minimatch: 3.1.2 + minimatch: 10.0.1 text-table@0.2.0: {} through@2.3.8: {} + tinyglobby@0.2.10: + dependencies: + fdir: 6.4.2(picomatch@4.0.2) + picomatch: 4.0.2 + tmp@0.0.33: dependencies: os-tmpdir: 1.0.2 tmpl@1.0.5: {} - to-fast-properties@2.0.0: {} - to-regex-range@5.0.1: dependencies: is-number: 7.0.0 @@ -11821,7 +11790,7 @@ snapshots: tough-cookie@4.1.4: dependencies: - psl: 1.9.0 + psl: 1.14.0 punycode: 2.3.1 universalify: 0.2.0 url-parse: 1.5.10 @@ -11832,67 +11801,44 @@ snapshots: dependencies: punycode: 2.3.1 - tr46@5.0.0: - dependencies: - punycode: 2.3.1 - - tree-kill@1.2.2: {} - trim-trailing-lines@1.1.4: {} - trim@0.0.1: {} + trim@1.0.1: {} trough@1.0.5: {} - ts-api-utils@1.3.0(typescript@5.4.5): + ts-api-utils@1.4.3(typescript@5.7.2): dependencies: - typescript: 5.4.5 + typescript: 5.7.2 - ts-jest@29.1.3(@babel/core@7.24.6)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.6))(jest@29.7.0(@types/node@20.12.12)(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5)))(typescript@5.4.5): - dependencies: + ? ts-jest@29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@22.10.1))(typescript@5.7.2) + : dependencies: bs-logger: 0.2.6 + ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.12.12)(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5)) + jest: 29.7.0(@types/node@22.10.1) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 - semver: 7.6.0 - typescript: 5.4.5 + semver: 7.6.3 + typescript: 5.7.2 yargs-parser: 21.1.1 optionalDependencies: - '@babel/core': 7.24.6 + '@babel/core': 7.26.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.24.6) + babel-jest: 29.7.0(@babel/core@7.26.0) - ts-loader@9.5.1(typescript@5.4.5)(webpack@5.91.0(webpack-cli@5.1.4)): + ts-loader@9.5.1(typescript@5.7.2)(webpack@5.96.1): dependencies: chalk: 4.1.2 - enhanced-resolve: 5.16.0 - micromatch: 4.0.5 - semver: 7.6.0 + enhanced-resolve: 5.17.1 + micromatch: 4.0.8 + semver: 7.6.3 source-map: 0.7.4 - typescript: 5.4.5 - webpack: 5.91.0(webpack-cli@5.1.4) - - ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5): - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.11 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.4 - '@types/node': 20.12.12 - acorn: 8.11.3 - acorn-walk: 8.3.2 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.4.5 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 + typescript: 5.7.2 + webpack: 5.96.1(webpack-cli@5.1.4) tsconfig-paths@3.15.0: dependencies: @@ -11903,14 +11849,23 @@ snapshots: tslib@1.14.1: {} - tslib@2.6.2: {} + tslib@2.7.0: {} + + tslib@2.8.1: {} tsort@0.0.1: {} - tsutils@3.21.0(typescript@5.4.5): + tsutils@3.21.0(typescript@5.7.2): dependencies: tslib: 1.14.1 - typescript: 5.4.5 + typescript: 5.7.2 + + tsx@4.19.2: + dependencies: + esbuild: 0.23.1 + get-tsconfig: 4.8.1 + optionalDependencies: + fsevents: 2.3.3 tweetnacl-util@0.15.1: {} @@ -11934,7 +11889,7 @@ snapshots: type-fest@0.8.1: {} - type@2.7.2: {} + type@2.7.3: {} typed-array-buffer@1.0.2: dependencies: @@ -11946,46 +11901,47 @@ snapshots: dependencies: call-bind: 1.0.7 for-each: 0.3.3 - gopd: 1.0.1 - has-proto: 1.0.3 + gopd: 1.1.0 + has-proto: 1.1.0 is-typed-array: 1.1.13 - typed-array-byte-offset@1.0.2: + typed-array-byte-offset@1.0.3: dependencies: available-typed-arrays: 1.0.7 call-bind: 1.0.7 for-each: 0.3.3 - gopd: 1.0.1 - has-proto: 1.0.3 + gopd: 1.1.0 + has-proto: 1.1.0 is-typed-array: 1.1.13 + reflect.getprototypeof: 1.0.7 - typed-array-length@1.0.6: + typed-array-length@1.0.7: dependencies: call-bind: 1.0.7 for-each: 0.3.3 - gopd: 1.0.1 - has-proto: 1.0.3 + gopd: 1.1.0 is-typed-array: 1.1.13 possible-typed-array-names: 1.0.0 + reflect.getprototypeof: 1.0.7 typedarray-to-buffer@3.1.5: dependencies: is-typedarray: 1.0.0 - typescript-eslint@7.11.0(eslint@8.57.0)(typescript@5.4.5): + typescript-eslint@8.16.0(eslint@9.16.0)(typescript@5.7.2): dependencies: - '@typescript-eslint/eslint-plugin': 7.11.0(@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/parser': 7.11.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.11.0(eslint@8.57.0)(typescript@5.4.5) - eslint: 8.57.0 + '@typescript-eslint/eslint-plugin': 8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/parser': 8.16.0(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.16.0(eslint@9.16.0)(typescript@5.7.2) + eslint: 9.16.0 optionalDependencies: - typescript: 5.4.5 + typescript: 5.7.2 transitivePeerDependencies: - supports-color - typescript@5.4.5: {} + typescript@5.7.2: {} - uglify-js@3.17.4: + uglify-js@3.19.3: optional: true unbox-primitive@1.0.2: @@ -11995,7 +11951,9 @@ snapshots: has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 - undici-types@5.26.5: {} + undici-types@6.19.8: {} + + undici-types@6.20.0: {} undici@5.28.4: dependencies: @@ -12008,14 +11966,14 @@ snapshots: inherits: 2.0.4 xtend: 4.0.2 - unicode-canonical-property-names-ecmascript@2.0.0: {} + unicode-canonical-property-names-ecmascript@2.0.1: {} unicode-match-property-ecmascript@2.0.0: dependencies: - unicode-canonical-property-names-ecmascript: 2.0.0 + unicode-canonical-property-names-ecmascript: 2.0.1 unicode-property-aliases-ecmascript: 2.1.0 - unicode-match-property-value-ecmascript@2.1.0: {} + unicode-match-property-value-ecmascript@2.2.0: {} unicode-property-aliases-ecmascript@2.1.0: {} @@ -12029,7 +11987,7 @@ snapshots: unified@8.4.2: dependencies: - '@types/unist': 2.0.10 + '@types/unist': 2.0.11 bail: 1.0.5 extend: 3.0.2 is-plain-obj: 2.1.0 @@ -12046,7 +12004,7 @@ snapshots: unist-util-stringify-position@2.0.3: dependencies: - '@types/unist': 2.0.10 + '@types/unist': 2.0.11 unist-util-visit-parents@2.1.2: dependencies: @@ -12062,11 +12020,11 @@ snapshots: unpipe@1.0.0: {} - update-browserslist-db@1.0.15(browserslist@4.23.0): + update-browserslist-db@1.1.1(browserslist@4.24.2): dependencies: - browserslist: 4.23.0 - escalade: 3.1.2 - picocolors: 1.0.0 + browserslist: 4.24.2 + escalade: 3.2.0 + picocolors: 1.1.1 uri-js@4.4.1: dependencies: @@ -12079,7 +12037,7 @@ snapshots: utf-8-validate@5.0.10: dependencies: - node-gyp-build: 4.8.1 + node-gyp-build: 4.8.4 utf8@3.0.0: {} @@ -12091,35 +12049,28 @@ snapshots: is-arguments: 1.1.1 is-generator-function: 1.0.10 is-typed-array: 1.1.13 - which-typed-array: 1.1.15 + which-typed-array: 1.1.16 uuid@8.3.2: {} - v8-compile-cache-lib@3.0.1: {} - v8-compile-cache@2.4.0: {} - v8-to-istanbul@9.2.0: + v8-to-istanbul@9.3.0: dependencies: '@jridgewell/trace-mapping': 0.3.25 '@types/istanbul-lib-coverage': 2.0.6 convert-source-map: 2.0.0 - validate-npm-package-license@3.0.4: - dependencies: - spdx-correct: 3.2.0 - spdx-expression-parse: 3.0.1 - vfile-location@2.0.6: {} vfile-message@2.0.4: dependencies: - '@types/unist': 2.0.10 + '@types/unist': 2.0.11 unist-util-stringify-position: 2.0.3 vfile@4.2.1: dependencies: - '@types/unist': 2.0.10 + '@types/unist': 2.0.11 is-buffer: 2.0.5 unist-util-stringify-position: 2.0.3 vfile-message: 2.0.4 @@ -12130,16 +12081,16 @@ snapshots: leven: 2.1.0 tslib: 1.14.1 - vue-eslint-parser@9.4.2(eslint@8.57.0): + vue-eslint-parser@9.4.3(eslint@8.57.1): dependencies: - debug: 4.3.4(supports-color@8.1.1) - eslint: 8.57.0 + debug: 4.3.7(supports-color@8.1.1) + eslint: 8.57.1 eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 - esquery: 1.5.0 + esquery: 1.6.0 lodash: 4.17.21 - semver: 7.6.0 + semver: 7.6.3 transitivePeerDependencies: - supports-color @@ -12147,19 +12098,20 @@ snapshots: dependencies: xml-name-validator: 4.0.0 - w3c-xmlserializer@5.0.0: - dependencies: - xml-name-validator: 5.0.0 - walker@1.0.8: dependencies: makeerror: 1.0.12 - watchpack@2.4.1: + watchpack@2.4.2: dependencies: glob-to-regexp: 0.4.1 graceful-fs: 4.2.11 + web3-core-helpers@1.10.3: + dependencies: + web3-eth-iban: 1.10.3 + web3-utils: 1.10.3 + web3-core-helpers@1.10.4: dependencies: web3-eth-iban: 1.10.4 @@ -12195,7 +12147,7 @@ snapshots: web3-core@1.10.4: dependencies: - '@types/bn.js': 5.1.5 + '@types/bn.js': 5.1.6 '@types/node': 12.20.55 bignumber.js: 9.1.2 web3-core-helpers: 1.10.4 @@ -12206,6 +12158,11 @@ snapshots: - encoding - supports-color + web3-eth-iban@1.10.3: + dependencies: + bn.js: 5.2.1 + web3-utils: 1.10.3 + web3-eth-iban@1.10.4: dependencies: bn.js: 5.2.1 @@ -12213,7 +12170,7 @@ snapshots: web3-providers-http@1.10.4: dependencies: - abortcontroller-polyfill: 1.7.5 + abortcontroller-polyfill: 1.7.6 cross-fetch: 4.0.0 es6-promise: 4.2.8 web3-core-helpers: 1.10.4 @@ -12229,16 +12186,27 @@ snapshots: dependencies: eventemitter3: 4.0.4 web3-core-helpers: 1.10.4 - websocket: 1.0.34 + websocket: 1.0.35 transitivePeerDependencies: - supports-color + web3-utils@1.10.3: + dependencies: + '@ethereumjs/util': 8.1.0 + bn.js: 5.2.1 + ethereum-bloom-filters: 1.2.0 + ethereum-cryptography: 2.2.1 + ethjs-unit: 0.1.6 + number-to-bn: 1.7.0 + randombytes: 2.1.0 + utf8: 3.0.0 + web3-utils@1.10.4: dependencies: '@ethereumjs/util': 8.1.0 bn.js: 5.2.1 - ethereum-bloom-filters: 1.1.0 - ethereum-cryptography: 2.1.3 + ethereum-bloom-filters: 1.2.0 + ethereum-cryptography: 2.2.1 ethjs-unit: 0.1.6 number-to-bn: 1.7.0 randombytes: 2.1.0 @@ -12248,21 +12216,21 @@ snapshots: webidl-conversions@7.0.0: {} - webpack-cli@5.1.4(webpack@5.91.0): + webpack-cli@5.1.4(webpack@5.96.1): dependencies: '@discoveryjs/json-ext': 0.5.7 - '@webpack-cli/configtest': 2.1.1(webpack-cli@5.1.4(webpack@5.91.0))(webpack@5.91.0(webpack-cli@5.1.4)) - '@webpack-cli/info': 2.0.2(webpack-cli@5.1.4(webpack@5.91.0))(webpack@5.91.0(webpack-cli@5.1.4)) - '@webpack-cli/serve': 2.0.5(webpack-cli@5.1.4(webpack@5.91.0))(webpack@5.91.0(webpack-cli@5.1.4)) + '@webpack-cli/configtest': 2.1.1(webpack-cli@5.1.4)(webpack@5.96.1) + '@webpack-cli/info': 2.0.2(webpack-cli@5.1.4)(webpack@5.96.1) + '@webpack-cli/serve': 2.0.5(webpack-cli@5.1.4)(webpack@5.96.1) colorette: 2.0.20 commander: 10.0.1 - cross-spawn: 7.0.3 - envinfo: 7.13.0 + cross-spawn: 7.0.6 + envinfo: 7.14.0 fastest-levenshtein: 1.0.16 - import-local: 3.1.0 + import-local: 3.2.0 interpret: 3.1.1 rechoir: 0.8.0 - webpack: 5.91.0(webpack-cli@5.1.4) + webpack: 5.96.1(webpack-cli@5.1.4) webpack-merge: 5.10.0 webpack-merge@5.10.0: @@ -12273,19 +12241,18 @@ snapshots: webpack-sources@3.2.3: {} - webpack@5.91.0(webpack-cli@5.1.4): + webpack@5.96.1(webpack-cli@5.1.4): dependencies: '@types/eslint-scope': 3.7.7 - '@types/estree': 1.0.5 - '@webassemblyjs/ast': 1.12.1 - '@webassemblyjs/wasm-edit': 1.12.1 - '@webassemblyjs/wasm-parser': 1.12.1 - acorn: 8.11.3 - acorn-import-assertions: 1.9.0(acorn@8.11.3) - browserslist: 4.23.0 - chrome-trace-event: 1.0.3 - enhanced-resolve: 5.16.0 - es-module-lexer: 1.5.2 + '@types/estree': 1.0.6 + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/wasm-edit': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + acorn: 8.14.0 + browserslist: 4.24.2 + chrome-trace-event: 1.0.4 + enhanced-resolve: 5.17.1 + es-module-lexer: 1.5.4 eslint-scope: 5.1.1 events: 3.3.0 glob-to-regexp: 0.4.1 @@ -12296,17 +12263,17 @@ snapshots: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(webpack@5.91.0(webpack-cli@5.1.4)) - watchpack: 2.4.1 + terser-webpack-plugin: 5.3.10(webpack@5.96.1) + watchpack: 2.4.2 webpack-sources: 3.2.3 optionalDependencies: - webpack-cli: 5.1.4(webpack@5.91.0) + webpack-cli: 5.1.4(webpack@5.96.1) transitivePeerDependencies: - '@swc/core' - esbuild - uglify-js - websocket@1.0.34: + websocket@1.0.35: dependencies: bufferutil: 4.0.8 debug: 2.6.9 @@ -12321,24 +12288,13 @@ snapshots: dependencies: iconv-lite: 0.6.3 - whatwg-encoding@3.1.1: - dependencies: - iconv-lite: 0.6.3 - whatwg-mimetype@3.0.0: {} - whatwg-mimetype@4.0.0: {} - whatwg-url@11.0.0: dependencies: tr46: 3.0.0 webidl-conversions: 7.0.0 - whatwg-url@14.0.0: - dependencies: - tr46: 5.0.0 - webidl-conversions: 7.0.0 - whatwg-url@5.0.0: dependencies: tr46: 0.0.3 @@ -12352,17 +12308,36 @@ snapshots: is-string: 1.0.7 is-symbol: 1.0.4 - which-typed-array@1.1.15: + which-builtin-type@1.2.0: dependencies: - available-typed-arrays: 1.0.7 call-bind: 1.0.7 - for-each: 0.3.3 - gopd: 1.0.1 + function.prototype.name: 1.1.6 has-tostringtag: 1.0.2 + is-async-function: 2.0.0 + is-date-object: 1.0.5 + is-finalizationregistry: 1.1.0 + is-generator-function: 1.0.10 + is-regex: 1.2.0 + is-weakref: 1.0.2 + isarray: 2.0.5 + which-boxed-primitive: 1.0.2 + which-collection: 1.0.2 + which-typed-array: 1.1.16 - which@1.3.1: + which-collection@1.0.2: dependencies: - isexe: 2.0.0 + is-map: 2.0.3 + is-set: 2.0.3 + is-weakmap: 2.0.2 + is-weakset: 2.0.3 + + which-typed-array@1.1.16: + dependencies: + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.1.0 + has-tostringtag: 1.0.2 which@2.0.2: dependencies: @@ -12378,7 +12353,7 @@ snapshots: wordwrap@1.0.0: {} - workerpool@6.2.1: {} + workerpool@6.5.1: {} wrap-ansi@3.0.1: dependencies: @@ -12408,25 +12383,18 @@ snapshots: dependencies: mkdirp: 0.5.6 - ws@7.4.6(bufferutil@4.0.8)(utf-8-validate@5.0.10): - optionalDependencies: - bufferutil: 4.0.8 - utf-8-validate: 5.0.10 - - ws@7.5.9(bufferutil@4.0.8)(utf-8-validate@5.0.10): + ws@8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10): optionalDependencies: bufferutil: 4.0.8 utf-8-validate: 5.0.10 - ws@8.17.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): + ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): optionalDependencies: bufferutil: 4.0.8 utf-8-validate: 5.0.10 xml-name-validator@4.0.0: {} - xml-name-validator@5.0.0: {} - xmlchars@2.2.0: {} xtend@4.0.2: {} @@ -12439,8 +12407,6 @@ snapshots: yallist@3.1.1: {} - yallist@4.0.0: {} - yaml-unist-parser@1.1.1: dependencies: lines-and-columns: 1.1.6 @@ -12449,11 +12415,11 @@ snapshots: yaml@1.8.3: dependencies: - '@babel/runtime': 7.24.5 + '@babel/runtime': 7.26.0 - yaml@2.4.2: {} + yaml@2.6.1: {} - yargs-parser@20.2.4: {} + yargs-parser@20.2.9: {} yargs-parser@21.1.1: {} @@ -12467,23 +12433,21 @@ snapshots: yargs@16.2.0: dependencies: cliui: 7.0.4 - escalade: 3.1.2 + escalade: 3.2.0 get-caller-file: 2.0.5 require-directory: 2.1.1 string-width: 4.2.3 y18n: 5.0.8 - yargs-parser: 20.2.4 + yargs-parser: 20.2.9 yargs@17.7.2: dependencies: cliui: 8.0.1 - escalade: 3.1.2 + escalade: 3.2.0 get-caller-file: 2.0.5 require-directory: 2.1.1 string-width: 4.2.3 y18n: 5.0.8 yargs-parser: 21.1.1 - yn@3.1.1: {} - yocto-queue@0.1.0: {} diff --git a/test-suites/scripts/configReserves.ts b/test-suites/scripts/configReserves.ts index 591e2bf..1a4e61e 100644 --- a/test-suites/scripts/configReserves.ts +++ b/test-suites/scripts/configReserves.ts @@ -1,19 +1,16 @@ /* eslint-disable no-console */ -import * as dotenv from "dotenv"; import { PoolManager, strategyAAVE, strategyDAI, strategyUSDC, strategyWETH } from "../configs/pool"; import { AAVE, DAI, USDC, WETH } from "../configs/tokens"; import { underlyingTokens } from "./createTokens"; import { PoolClient } from "../clients/poolClient"; import { AptosProvider } from "../wrappers/aptosProvider"; - -// eslint-disable-next-line import/no-commonjs -const chalk = require("chalk"); - -dotenv.config(); +import chalk from "chalk"; +import { BigNumber } from "@ethersproject/bignumber"; +import { AccountAddress } from "@aptos-labs/ts-sdk"; async function getReserveInfo() { // get assets addresses - const assets = []; + const assets: Array = []; const dai = underlyingTokens.find((token) => token.symbol === DAI).accountAddress; const weth = underlyingTokens.find((token) => token.symbol === WETH).accountAddress; const usdc = underlyingTokens.find((token) => token.symbol === USDC).accountAddress; @@ -24,56 +21,56 @@ async function getReserveInfo() { assets.push(aave); // get assets base ltv - const baseLtv = []; + const baseLtv: Array = []; baseLtv.push(strategyDAI.baseLTVAsCollateral); baseLtv.push(strategyWETH.baseLTVAsCollateral); baseLtv.push(strategyUSDC.baseLTVAsCollateral); baseLtv.push(strategyAAVE.baseLTVAsCollateral); // get assets liquidation threshold - const liquidationThreshold = []; + const liquidationThreshold: Array = []; liquidationThreshold.push(strategyDAI.liquidationThreshold); liquidationThreshold.push(strategyWETH.liquidationThreshold); liquidationThreshold.push(strategyUSDC.liquidationThreshold); liquidationThreshold.push(strategyAAVE.liquidationThreshold); // get assets liquidation bonus - const liquidationBonus = []; + const liquidationBonus: Array = []; liquidationBonus.push(strategyDAI.liquidationBonus); liquidationBonus.push(strategyWETH.liquidationBonus); liquidationBonus.push(strategyUSDC.liquidationBonus); liquidationBonus.push(strategyAAVE.liquidationBonus); // reserve_factor - const reserveFactor = []; + const reserveFactor: Array = []; reserveFactor.push(strategyDAI.reserveFactor); reserveFactor.push(strategyWETH.reserveFactor); reserveFactor.push(strategyUSDC.reserveFactor); reserveFactor.push(strategyAAVE.reserveFactor); // borrow_cap - const borrowCap = []; + const borrowCap: Array = []; borrowCap.push(strategyDAI.borrowCap); borrowCap.push(strategyWETH.borrowCap); borrowCap.push(strategyUSDC.borrowCap); borrowCap.push(strategyAAVE.borrowCap); // supply_cap - const supplyCap = []; + const supplyCap: Array = []; supplyCap.push(strategyDAI.supplyCap); supplyCap.push(strategyWETH.supplyCap); supplyCap.push(strategyUSDC.supplyCap); supplyCap.push(strategyAAVE.supplyCap); // borrowing_enabled - const borrowingEnabled = []; + const borrowingEnabled: Array = []; borrowingEnabled.push(strategyDAI.borrowingEnabled); borrowingEnabled.push(strategyWETH.borrowingEnabled); borrowingEnabled.push(strategyUSDC.borrowingEnabled); borrowingEnabled.push(strategyAAVE.borrowingEnabled); // flash_loan_enabled - const flashLoanEnabled = []; + const flashLoanEnabled: Array = []; flashLoanEnabled.push(strategyDAI.flashLoanEnabled); flashLoanEnabled.push(strategyWETH.flashLoanEnabled); flashLoanEnabled.push(strategyUSDC.flashLoanEnabled); @@ -106,20 +103,46 @@ export async function configReserves() { } = await getReserveInfo(); // global aptos provider - const aptosProvider = new AptosProvider(); + const aptosProvider = AptosProvider.fromEnvs(); const poolClient = new PoolClient(aptosProvider, PoolManager); - // configure the reserve - const txReceipt = await poolClient.configureReserves( - assets, - baseLtv, - liquidationThreshold, - liquidationBonus, - reserveFactor, - borrowCap, - supplyCap, - borrowingEnabled, - flashLoanEnabled, - ); - console.log(chalk.yellow(`Reserve configured with tx hash = ${txReceipt.hash}`)); + for (let index in assets) { + let txReceipt = await poolClient.configureReserveAsCollateral( + assets[index], + BigNumber.from(baseLtv[index]), + BigNumber.from(liquidationThreshold[index]), + BigNumber.from(liquidationBonus[index]), + ); + console.log(chalk.yellow(`Reserve ${assets[index]} configured with tx hash = ${txReceipt.hash}`)); + + txReceipt = await poolClient.setReserveBorrowing( + assets[index], + borrowingEnabled[index], + ); + console.log(chalk.yellow(`Reserve ${assets[index]} enabled borrowing with tx hash = ${txReceipt.hash}`)); + + txReceipt = await poolClient.setReserveFlashLoaning( + assets[index], + flashLoanEnabled[index], + ); + console.log(chalk.yellow(`Reserve ${assets[index]} enabled flashloaning with tx hash = ${txReceipt.hash}`)); + + txReceipt = await poolClient.setReserveFactor( + assets[index], + BigNumber.from(reserveFactor[index]), + ); + console.log(chalk.yellow(`Reserve ${assets[index]} set factor with tx hash = ${txReceipt.hash}`)); + + txReceipt = await poolClient.setBorrowCap( + assets[index], + BigNumber.from(borrowCap[index]), + ); + console.log(chalk.yellow(`Reserve ${assets[index]} set borrow cap with tx hash = ${txReceipt.hash}`)); + + txReceipt = await poolClient.setSupplyCap( + assets[index], + BigNumber.from(supplyCap[index]), + ); + console.log(chalk.yellow(`Reserve ${assets[index]} set supply cap with tx hash = ${txReceipt.hash}`)); + } } diff --git a/test-suites/scripts/coreOperations.ts b/test-suites/scripts/coreOperations.ts index 522db09..2f1ff13 100644 --- a/test-suites/scripts/coreOperations.ts +++ b/test-suites/scripts/coreOperations.ts @@ -1,8 +1,6 @@ /* eslint-disable no-console */ /* eslint-disable no-await-in-loop */ -import dotenv from "dotenv"; -import path from "path"; -import { BigNumber } from "ethers"; +import { BigNumber } from "@ethersproject/bignumber"; import { UnderlyingTokensClient } from "../clients/underlyingTokensClient"; import { PoolClient } from "../clients/poolClient"; import { CoreClient } from "../clients/coreClient"; @@ -12,18 +10,11 @@ import { AAVE_REFERRAL, INTEREST_RATE_MODES } from "../helpers/constants"; import { DAI, UnderlyingManager, WETH } from "../configs/tokens"; import { PoolManager } from "../configs/pool"; import { SupplyBorrowManager } from "../configs/supplyBorrow"; -import { OracleClient } from "../clients/oracleClient"; -import { OracleManager } from "../configs/oracle"; - -const envPath = path.resolve(__dirname, "../../.env"); -dotenv.config({ path: envPath }); - -// eslint-disable-next-line import/no-commonjs -const chalk = require("chalk"); +import chalk from "chalk"; (async () => { // global aptos provider - const aptosProvider = new AptosProvider(); + const aptosProvider = AptosProvider.fromEnvs(); // all underlying-tokens-related operations client const underlyingTokensClient = new UnderlyingTokensClient(aptosProvider, UnderlyingManager); @@ -34,9 +25,6 @@ const chalk = require("chalk"); // all core-related operations client (supply, borrow, withdraw, repay) const coreClient = new CoreClient(aptosProvider, SupplyBorrowManager); - // init oracle client - const oracleClient = new OracleClient(aptosProvider, OracleManager); - // get all pool reserves const allReserveUnderlyingTokens = await poolClient.getAllReservesTokens(); @@ -90,6 +78,11 @@ const chalk = require("chalk"); const underlyingSymbol = await underlyingTokensClient.symbol(reserveUnderlyingToken.tokenAddress); const underlyingDecimals = await underlyingTokensClient.decimals(reserveUnderlyingToken.tokenAddress); const supplyAmount = BigNumber.from(10).pow(underlyingDecimals).mul(baseMintAmount).div(2); + + console.log( + chalk.yellow(`User ${supplier.accountAddress.toString()} supplying ${supplyAmount.toString()} of underlying [${underlyingSymbol}, ${reserveUnderlyingToken.tokenAddress.toString()}] to the pool ...`), + ); + // set the supplier to be the signer const txReceipt = await coreClient.supply( reserveUnderlyingToken.tokenAddress, @@ -98,26 +91,12 @@ const chalk = require("chalk"); AAVE_REFERRAL, ); console.log( - chalk.yellow(`User ${supplier.accountAddress.toString()} supplied ${supplyAmount.toString()} ${underlyingSymbol.toUpperCase()} to the pool. + chalk.yellow(`User ${supplier.accountAddress.toString()} successfully supplied ${supplyAmount.toString()} ${underlyingSymbol.toUpperCase()} to the pool. Tx hash = ${txReceipt.hash}`), ); } console.log(chalk.green("Supplying assets for test user finished successfully!")); - // ==============================ALLOW BORROWING ON ORACLE LEVEL=============================================== - - const isBorrowAllowed = await oracleClient.isBorrowAllowed(); - console.log(chalk.yellow("Is borrow allowed ? ", isBorrowAllowed)); - if (!isBorrowAllowed) { - const gracePeriod = BigNumber.from(1); - console.log(chalk.yellow(`Setting oracle grace period of ${gracePeriod.toNumber()} seconds`)); - const txReceipt = await oracleClient.setGracePeriod(gracePeriod); - console.log( - chalk.yellow(`Set grance period of ${gracePeriod.toNumber()} to the oracle. - Tx hash = ${txReceipt.hash}`), - ); - } - // ==============================USER BORROWS SOME ASSETS FROM POOL=============================================== console.log(chalk.yellow("---------------------------------------------")); console.log(chalk.cyan("Borrowing assets...")); @@ -128,6 +107,11 @@ const chalk = require("chalk"); const underlyingToBorrow = await underlyingTokensClient.getTokenAddress(underlyingToBorrowSymbol); const underlyingToBorrowDecimals = await underlyingTokensClient.decimals(underlyingToBorrow); const borrowAmount = BigNumber.from(10).pow(underlyingToBorrowDecimals).mul(baseMintAmount).div(5); + + console.log( + chalk.yellow(`User ${supplier.accountAddress.toString()} borrowing ${borrowAmount.toString()} of underlying [${underlyingToBorrowSymbol}, ${underlyingToBorrow.toString()}] from the pool ...`), + ); + borrowedAssetsWithAmounts.set(underlyingToBorrowSymbol, borrowAmount); const txReceipt = await coreClient.borrow( underlyingToBorrow, @@ -137,7 +121,7 @@ const chalk = require("chalk"); supplier.accountAddress, ); console.log( - chalk.yellow(`User ${supplier.accountAddress.toString()} borrowed ${borrowAmount.toString()} ${underlyingToBorrowSymbol.toUpperCase()} from the pool. + chalk.yellow(`User ${supplier.accountAddress.toString()} successfully borrowed ${borrowAmount.toString()} of underlying [${underlyingToBorrowSymbol}, ${underlyingToBorrow.toString()}] from the pool. Tx hash = ${txReceipt.hash}`), ); } diff --git a/test-suites/scripts/createRoles.ts b/test-suites/scripts/createRoles.ts index e0dc96f..98b9dce 100644 --- a/test-suites/scripts/createRoles.ts +++ b/test-suites/scripts/createRoles.ts @@ -1,16 +1,13 @@ /* eslint-disable no-console */ import { ATokenManager, UnderlyingManager, VariableManager } from "../configs/tokens"; import { AclClient } from "../clients/aclClient"; - import { AclManager } from "../configs/aclManage"; import { PoolManager } from "../configs/pool"; import { AptosProvider } from "../wrappers/aptosProvider"; - -// eslint-disable-next-line import/no-commonjs -const chalk = require("chalk"); +import chalk from "chalk"; export async function createRoles() { - const aptosProvider = new AptosProvider(); + const aptosProvider = AptosProvider.fromEnvs(); const aclClient = new AclClient(aptosProvider, AclManager); // acl manager grants itself a default admin role diff --git a/test-suites/scripts/createToken.ts b/test-suites/scripts/createToken.ts deleted file mode 100644 index 6fb4de4..0000000 --- a/test-suites/scripts/createToken.ts +++ /dev/null @@ -1,237 +0,0 @@ -/* eslint-disable no-console */ -import { Transaction } from "../helpers/helper"; -import { aptos } from "../configs/common"; -import { - AAAVE, - AAVE, - ADAI, - ATokenCreateTokenFuncAddr, - ATokenGetMetadataBySymbolFuncAddr, - ATokenManager, - AUSDC, - AWETH, - DAI, - getMetadataAddress, - UnderlyingCreateTokenFuncAddr, - UnderlyingGetMetadataBySymbolFuncAddr, - UnderlyingManager, - USDC, - VAAVE, - VariableCreateTokenFuncAddr, - VariableGetMetadataBySymbolFuncAddr, - VariableManager, - VDAI, - VUSDC, - VWETH, - WETH, -} from "../configs/tokens"; - -// eslint-disable-next-line import/no-commonjs -const chalk = require("chalk"); - -async function createDai() { - // create underling token - let txReceipt = await Transaction(aptos, UnderlyingManager, UnderlyingCreateTokenFuncAddr, [ - "100000000000000000", - "Dai", - DAI, - 8, - "https://aptoscan.com/images/empty-coin.svg", - "https://aptoscan.com", - ]); - console.log(chalk.green(`Deployed DAI underlying token with tx hash = ${txReceipt.hash}`)); - - // get underling token metadata - const underlingMetadata = await getMetadataAddress(UnderlyingGetMetadataBySymbolFuncAddr, DAI); - console.log("DAI underlying metadata address: ", underlingMetadata); - - // create a token - txReceipt = await Transaction(aptos, ATokenManager, ATokenCreateTokenFuncAddr, [ - "100000000000000000", - "aDai", - ADAI, - 8, - "https://aptoscan.com/images/empty-coin.svg", - "https://aptoscan.com", - underlingMetadata, - UnderlyingManager.accountAddress.toString(), - ]); - console.log(chalk.green(`Deployed ADAI token with tx hash = ${txReceipt.hash}`)); - - // get a token metadata - const aTokenMetadata = await getMetadataAddress(ATokenGetMetadataBySymbolFuncAddr, ADAI); - console.log("ADAI metadata address: ", aTokenMetadata); - - // create v token - txReceipt = await Transaction(aptos, VariableManager, VariableCreateTokenFuncAddr, [ - "100000000000000000", - "vDai", - VDAI, - 8, - "https://aptoscan.com/images/empty-coin.svg", - "https://aptoscan.com", - underlingMetadata, - UnderlyingManager.accountAddress.toString(), - ]); - console.log(chalk.green(`Deployed VDAI token with tx hash = ${txReceipt.hash}`)); - - const vTokenMetadata = await getMetadataAddress(VariableGetMetadataBySymbolFuncAddr, VDAI); - console.log("VDAI metadata address:", vTokenMetadata); -} - -async function createWeth() { - // create underlying token - let txReceipt = await Transaction(aptos, UnderlyingManager, UnderlyingCreateTokenFuncAddr, [ - "100000000000000000", - "Weth", - WETH, - 8, - "https://aptoscan.com/images/empty-coin.svg", - "https://aptoscan.com", - ]); - console.log(chalk.green(`Deployed WETH underlying token with tx hash = ${txReceipt.hash}`)); - - // get underling token metadata - const underlingMetadata = await getMetadataAddress(UnderlyingGetMetadataBySymbolFuncAddr, WETH); - console.log("WETH underlying metadata address:", underlingMetadata); - - // create a token - txReceipt = await Transaction(aptos, ATokenManager, ATokenCreateTokenFuncAddr, [ - "100000000000000000", - "aWeth", - AWETH, - 8, - "https://aptoscan.com/images/empty-coin.svg", - "https://aptoscan.com", - underlingMetadata, - UnderlyingManager.accountAddress.toString(), - ]); - console.log(chalk.green(`Deployed AWETH with tx hash = ${txReceipt.hash}`)); - - // get a token metadata - const aTokenMetadata = await getMetadataAddress(ATokenGetMetadataBySymbolFuncAddr, AWETH); - console.log("AWETH metadata address:", aTokenMetadata); - - // create v token - txReceipt = await Transaction(aptos, VariableManager, VariableCreateTokenFuncAddr, [ - "100000000000000000", - "vWeth", - VWETH, - 8, - "https://aptoscan.com/images/empty-coin.svg", - "https://aptoscan.com", - underlingMetadata, - UnderlyingManager.accountAddress.toString(), - ]); - console.log(chalk.green(`Deployed VWETH with tx hash = ${txReceipt.hash}`)); - - const vTokenMetadata = await getMetadataAddress(VariableGetMetadataBySymbolFuncAddr, VWETH); - console.log("VWETH metadata address:", vTokenMetadata); -} - -async function createUsdc() { - // create underling token - let txReceipt = await Transaction(aptos, UnderlyingManager, UnderlyingCreateTokenFuncAddr, [ - "100000000000000000", - "Usdc", - USDC, - 8, - "https://aptoscan.com/images/empty-coin.svg", - "https://aptoscan.com", - ]); - console.log(chalk.green(`Deployed USDC with tx hash = ${txReceipt.hash}`)); - - // get underling token metadata - const underlingMetadata = await getMetadataAddress(UnderlyingGetMetadataBySymbolFuncAddr, USDC); - console.log("USDC underlying metadata address:", underlingMetadata); - - // create a token - txReceipt = await Transaction(aptos, ATokenManager, ATokenCreateTokenFuncAddr, [ - "100000000000000000", - "aUsdc", - AUSDC, - 8, - "https://aptoscan.com/images/empty-coin.svg", - "https://aptoscan.com", - underlingMetadata, - UnderlyingManager.accountAddress.toString(), - ]); - console.log(chalk.green(`Deployed AUSDC with tx hash = ${txReceipt.hash}`)); - - // get a token metadata - const aTokenMetadata = await getMetadataAddress(ATokenGetMetadataBySymbolFuncAddr, AUSDC); - console.log("AUSDC metadata address:", aTokenMetadata); - - // create v token - txReceipt = await Transaction(aptos, VariableManager, VariableCreateTokenFuncAddr, [ - "100000000000000000", - "vUsdc", - VUSDC, - 8, - "https://aptoscan.com/images/empty-coin.svg", - "https://aptoscan.com", - underlingMetadata, - UnderlyingManager.accountAddress.toString(), - ]); - console.log(chalk.green(`Deployed VUSDC with tx hash = ${txReceipt.hash}`)); - - const vTokenMetadata = await getMetadataAddress(VariableGetMetadataBySymbolFuncAddr, VUSDC); - console.log("VUSDC metadata address:", vTokenMetadata); -} - -async function createAave() { - // create underling token - let txReceipt = await Transaction(aptos, UnderlyingManager, UnderlyingCreateTokenFuncAddr, [ - "100000000000000000", - "Aave", - AAVE, - 8, - "https://aptoscan.com/images/empty-coin.svg", - "https://aptoscan.com", - ]); - console.log(chalk.green(`Deployed AAVE with tx hash = ${txReceipt.hash}`)); - - // get underling token metadata - const underlingMetadata = await getMetadataAddress(UnderlyingGetMetadataBySymbolFuncAddr, AAVE); - console.log("AAVE underlying metadata address:", underlingMetadata); - - // create a token - txReceipt = await Transaction(aptos, ATokenManager, ATokenCreateTokenFuncAddr, [ - "100000000000000000", - "aAave", - AAAVE, - 8, - "https://aptoscan.com/images/empty-coin.svg", - "https://aptoscan.com", - underlingMetadata, - UnderlyingManager.accountAddress.toString(), - ]); - console.log(chalk.green(`Deployed AAAVE with tx hash = ${txReceipt.hash}`)); - - // get a token metadata - const aTokenMetadata = await getMetadataAddress(ATokenGetMetadataBySymbolFuncAddr, AAAVE); - console.log("AAAVE metadata address:", aTokenMetadata); - - // create v token - txReceipt = await Transaction(aptos, VariableManager, VariableCreateTokenFuncAddr, [ - "100000000000000000", - "vAave", - VAAVE, - 8, - "https://aptoscan.com/images/empty-coin.svg", - "https://aptoscan.com", - underlingMetadata, - UnderlyingManager.accountAddress.toString(), - ]); - console.log(chalk.green(`Deployed VAAVE with tx hash = ${txReceipt.hash}`)); - - const vTokenMetadata = await getMetadataAddress(VariableGetMetadataBySymbolFuncAddr, VAAVE); - console.log("VAAVE metadata address:", vTokenMetadata); -} - -export async function createTokens() { - await createDai(); - await createWeth(); - await createUsdc(); - await createAave(); -} diff --git a/test-suites/scripts/createTokens.ts b/test-suites/scripts/createTokens.ts new file mode 100644 index 0000000..11966bb --- /dev/null +++ b/test-suites/scripts/createTokens.ts @@ -0,0 +1,173 @@ +/* eslint-disable no-console */ +/* eslint-disable no-await-in-loop */ +import { AccountAddress } from "@aptos-labs/ts-sdk"; +import { BigNumber } from "@ethersproject/bignumber"; +import { + AAAVE, + AAVE, + ADAI, + AUSDC, + AWETH, + DAI, + UnderlyingManager, + USDC, + VAAVE, + VDAI, + VUSDC, + VWETH, + WETH, +} from "../configs/tokens"; + +import { AptosProvider } from "../wrappers/aptosProvider"; +import { UnderlyingTokensClient } from "../clients/underlyingTokensClient"; +import chalk from "chalk"; + +const TREASURY = AccountAddress.fromString("0x800010ed1fe94674af83640117490d459e20441eab132c17e7ff39b7ae07a722"); + +interface UnderlyingToken { + name: string; + symbol: string; + decimals: number; + treasury: AccountAddress; + metadataAddress: AccountAddress; + accountAddress: AccountAddress; +} +interface AToken { + name: string; + symbol: string; + underlyingSymbol: string; + metadataAddress: AccountAddress; + accountAddress: AccountAddress; +} + +interface VarToken { + name: string; + symbol: string; + underlyingSymbol: string; + metadataAddress: AccountAddress; + accountAddress: AccountAddress; +} + +export const underlyingTokens: Array = [ + { + symbol: DAI, + name: DAI, + decimals: 8, + treasury: TREASURY, + metadataAddress: AccountAddress.ZERO, + accountAddress: AccountAddress.ZERO, + }, + { + symbol: WETH, + name: WETH, + decimals: 8, + treasury: TREASURY, + metadataAddress: AccountAddress.ZERO, + accountAddress: AccountAddress.ZERO, + }, + { + symbol: USDC, + name: USDC, + decimals: 8, + treasury: TREASURY, + metadataAddress: AccountAddress.ZERO, + accountAddress: AccountAddress.ZERO, + }, + { + symbol: AAVE, + name: AAVE, + decimals: 8, + treasury: TREASURY, + metadataAddress: AccountAddress.ZERO, + accountAddress: AccountAddress.ZERO, + }, +]; + +export const aTokens: Array = [ + { + symbol: ADAI, + name: ADAI, + underlyingSymbol: DAI, + metadataAddress: AccountAddress.ZERO, + accountAddress: AccountAddress.ZERO, + }, + { + symbol: AWETH, + name: AWETH, + underlyingSymbol: WETH, + metadataAddress: AccountAddress.ZERO, + accountAddress: AccountAddress.ZERO, + }, + { + symbol: AUSDC, + name: AUSDC, + underlyingSymbol: USDC, + metadataAddress: AccountAddress.ZERO, + accountAddress: AccountAddress.ZERO, + }, + { + symbol: AAAVE, + name: AAAVE, + underlyingSymbol: AAVE, + metadataAddress: AccountAddress.ZERO, + accountAddress: AccountAddress.ZERO, + }, +]; + +export const varTokens: Array = [ + { + symbol: VDAI, + name: VDAI, + underlyingSymbol: DAI, + metadataAddress: AccountAddress.ZERO, + accountAddress: AccountAddress.ZERO, + }, + { + symbol: VWETH, + name: VWETH, + underlyingSymbol: WETH, + metadataAddress: AccountAddress.ZERO, + accountAddress: AccountAddress.ZERO, + }, + { + symbol: VUSDC, + name: VUSDC, + underlyingSymbol: USDC, + metadataAddress: AccountAddress.ZERO, + accountAddress: AccountAddress.ZERO, + }, + { + symbol: VAAVE, + name: VAAVE, + underlyingSymbol: AAVE, + metadataAddress: AccountAddress.ZERO, + accountAddress: AccountAddress.ZERO, + }, +]; + +export async function createTokens() { + // global aptos provider + const aptosProvider = AptosProvider.fromEnvs(); + const underlyingTokensClient = new UnderlyingTokensClient(aptosProvider, UnderlyingManager); + + // create underlying tokens + for (const [index, underlyingToken] of underlyingTokens.entries()) { + const txReceipt = await underlyingTokensClient.createToken( + BigNumber.from("100000000000000000").toBigInt(), + underlyingToken.name, + underlyingToken.symbol, + underlyingToken.decimals, + "https://aptoscan.com/images/empty-coin.svg", + "https://aptoscan.com", + ); + console.log(chalk.yellow(`Deployed underlying asset ${underlyingToken.symbol} with tx hash = ${txReceipt.hash}`)); + + const underlingMetadataAddress = await underlyingTokensClient.getMetadataBySymbol(underlyingToken.symbol); + console.log(chalk.yellow(`${underlyingToken.symbol} underlying metadata address: `, underlingMetadataAddress)); + underlyingTokens[index].metadataAddress = underlingMetadataAddress; + + const underlyingTokenAddress = await underlyingTokensClient.getTokenAddress(underlyingToken.symbol); + console.log(chalk.yellow(`${underlyingToken.symbol} underlying account address: `, underlyingTokenAddress)); + underlyingTokens[index].accountAddress = underlyingTokenAddress; + } +} diff --git a/test-suites/scripts/initData.ts b/test-suites/scripts/initData.ts index 34bfe9c..3f4b1b1 100644 --- a/test-suites/scripts/initData.ts +++ b/test-suites/scripts/initData.ts @@ -1,17 +1,12 @@ /* eslint-disable no-console */ -import * as dotenv from "dotenv"; import { initReserveOraclePrice } from "./initOraclePrice"; import { configReserves } from "./configReserves"; import { initReserves } from "./initReserves"; import { createTokens } from "./createTokens"; import { createRoles } from "./createRoles"; -import { initInteresRates } from "./initInterestRate"; +import { initDefaultInteresRates } from "./initInterestRate"; import { initPoolAddressesProvider } from "./initPoolAddressesProvider"; - -dotenv.config(); - -// eslint-disable-next-line import/no-commonjs -const chalk = require("chalk"); +import chalk from "chalk"; (async () => { // step1. create roles @@ -28,8 +23,8 @@ const chalk = require("chalk"); // step3. init interest rate strategies console.log(chalk.yellow("---------------------------------------------")); - console.log(chalk.cyan("initializing interest rate strategies...")); - await initInteresRates(); + console.log(chalk.cyan("initializing default interest rate strategies...")); + await initDefaultInteresRates(); console.log(chalk.green("initialized interest rate strategies successfully!")); // step3. init reserves and interest rate strategies @@ -46,13 +41,13 @@ const chalk = require("chalk"); // step5. config oracle price console.log(chalk.yellow("---------------------------------------------")); - console.log(chalk.cyan("configuring reserve prices...")); + console.log(chalk.cyan("configuring oracle prices...")); await initReserveOraclePrice(); - console.log(chalk.green("configured reserve prices successfully!")); + console.log(chalk.green("configured oracle prices successfully!")); - // step6. config pool addresses provider - console.log(chalk.yellow("---------------------------------------------")); - console.log(chalk.cyan("configuring pool addresses provider...")); - await initPoolAddressesProvider(); - console.log(chalk.green("configured pool addresses provider successfully!")); + // // step6. config pool addresses provider + // console.log(chalk.yellow("---------------------------------------------")); + // console.log(chalk.cyan("configuring pool addresses provider...")); + // await initPoolAddressesProvider(); + // console.log(chalk.green("configured pool addresses provider successfully!")); })(); diff --git a/test-suites/scripts/initInterestRate.ts b/test-suites/scripts/initInterestRate.ts index 6de14bb..f120ce5 100644 --- a/test-suites/scripts/initInterestRate.ts +++ b/test-suites/scripts/initInterestRate.ts @@ -1,22 +1,30 @@ /* eslint-disable no-console */ /* eslint-disable no-await-in-loop */ -import { BigNumber } from "ethers"; -import { PoolManager, rateStrategyStableTwo } from "../configs/pool"; +import { BigNumber } from "@ethersproject/bignumber"; +import { RateManager, rateStrategyStableTwo } from "../configs/rates"; import { AptosProvider } from "../wrappers/aptosProvider"; -import { PoolClient } from "../clients/poolClient"; import { underlyingTokens } from "./createTokens"; +import { AclManager } from "../configs/aclManage"; +import chalk from "chalk"; +import { DefaultInterestRateStrategyClient } from "../clients/defaultInterestRateStrategyClient"; +import { AclClient } from "../clients/aclClient"; -// eslint-disable-next-line import/no-commonjs -const chalk = require("chalk"); - -export async function initInteresRates() { +export async function initDefaultInteresRates() { // global aptos provider - const aptosProvider = new AptosProvider(); - const poolClient = new PoolClient(aptosProvider, PoolManager); + const aptosProvider = AptosProvider.fromEnvs(); + const defaultInterestRateStrategyClient = new DefaultInterestRateStrategyClient(aptosProvider, RateManager); + const aclClient = new AclClient(aptosProvider, AclManager); + const isRiskAdmin = await aclClient.isRiskAdmin(RateManager.accountAddress); + if (!isRiskAdmin) { + console.log(`Setting ${RateManager.accountAddress.toString()} to be asset risk and pool admin`); + await aclClient.addRiskAdmin(RateManager.accountAddress); + await aclClient.addPoolAdmin(RateManager.accountAddress); + } + console.log(`${RateManager.accountAddress.toString()} set to be risk and pool admin`); // set interest rate strategy fr each reserve for (const [, underlyingToken] of underlyingTokens.entries()) { - const txReceipt = await poolClient.setReserveInterestRateStrategy( + const txReceipt = await defaultInterestRateStrategyClient.setReserveInterestRateStrategy( underlyingToken.accountAddress, BigNumber.from(rateStrategyStableTwo.optimalUsageRatio), BigNumber.from(rateStrategyStableTwo.baseVariableBorrowRate), diff --git a/test-suites/scripts/initOraclePrice.ts b/test-suites/scripts/initOraclePrice.ts index 471d499..cdc7eba 100644 --- a/test-suites/scripts/initOraclePrice.ts +++ b/test-suites/scripts/initOraclePrice.ts @@ -1,24 +1,62 @@ /* eslint-disable no-console */ /* eslint-disable no-await-in-loop */ -import { BigNumber } from "ethers"; import { OracleManager } from "../configs/oracle"; import { AptosProvider } from "../wrappers/aptosProvider"; import { OracleClient } from "../clients/oracleClient"; -import { underlyingTokens } from "./createTokens"; - -// eslint-disable-next-line import/no-commonjs -const chalk = require("chalk"); +import { underlyingTokens, aTokens, varTokens } from "./createTokens"; +import chalk from "chalk"; +import { AclClient } from "../clients/aclClient"; +import { AclManager } from "../configs/aclManage"; +import { CommittedTransactionResponse } from "@aptos-labs/ts-sdk"; +import { priceFeeds } from "../helpers/priceFeeds"; +import { UnderlyingManager } from "../configs/tokens"; +import { UnderlyingTokensClient } from "../clients/underlyingTokensClient"; export async function initReserveOraclePrice() { // global aptos provider - const aptosProvider = new AptosProvider(); + const aptosProvider = AptosProvider.fromEnvs(); const oracleClient = new OracleClient(aptosProvider, OracleManager); + const underlyingTokensClient = new UnderlyingTokensClient(aptosProvider, UnderlyingManager); + const aclClient = new AclClient(aptosProvider, AclManager); + const isAssetListingAdmin = await aclClient.isAssetListingAdmin(OracleManager.accountAddress); + let txReceipt: CommittedTransactionResponse; + if (!isAssetListingAdmin) { + console.log(`Setting ${OracleManager.accountAddress.toString()} to be asset listing and and pool admin`); + txReceipt = await aclClient.addAssetListingAdmin(OracleManager.accountAddress); + txReceipt = await aclClient.addPoolAdmin(OracleManager.accountAddress); + } + console.log(`${OracleManager.accountAddress.toString()} set to be asset listing and pool admin`); + // set underlying price feeds for (const [, underlyingToken] of underlyingTokens.entries()) { - const txReceipt = await oracleClient.setAssetPrice(underlyingToken.accountAddress, BigNumber.from(1)); + const priceFeed = priceFeeds.get(underlyingToken.symbol); + const underlyingToBorrow = await underlyingTokensClient.getTokenAddress(underlyingToken.symbol); + const txReceipt = await oracleClient.setAssetFeedId(underlyingToBorrow, priceFeed); + console.log( + chalk.yellow( + `Feed Id ${priceFeed} set by oracle for underlying asset ${underlyingToken.symbol} with address ${underlyingToBorrow.toString()}. Tx hash = ${txReceipt.hash}`, + ), + ); + } + + // set atoken price feeds + for (const [, aToken] of aTokens.entries()) { + const priceFeed = priceFeeds.get(aToken.underlyingSymbol); + const txReceipt = await oracleClient.setAssetFeedId(aToken.accountAddress, priceFeed); + console.log( + chalk.yellow( + `Feed Id ${priceFeed} set by oracle for atoken ${aToken.symbol} with address ${aToken.accountAddress.toString()}. Tx hash = ${txReceipt.hash}`, + ), + ); + } + + // set var token price feeds + for (const [, varToken] of varTokens.entries()) { + const priceFeed = priceFeeds.get(varToken.underlyingSymbol); + const txReceipt = await oracleClient.setAssetFeedId(varToken.accountAddress, priceFeed); console.log( chalk.yellow( - `Price set by oracle for underlying asset ${underlyingToken.symbol} with tx hash = ${txReceipt.hash}`, + `Feed Id ${priceFeed} set by oracle for vartoken ${varToken.symbol} with address ${varToken.accountAddress.toString()}. Tx hash = ${txReceipt.hash}`, ), ); } diff --git a/test-suites/scripts/initPoolAddressesProvider.ts b/test-suites/scripts/initPoolAddressesProvider.ts index 6fddc09..54420a6 100644 --- a/test-suites/scripts/initPoolAddressesProvider.ts +++ b/test-suites/scripts/initPoolAddressesProvider.ts @@ -5,13 +5,11 @@ import { PoolAddressesProviderClient } from "../clients/poolAddressesProviderCli import { PoolManager } from "../configs/pool"; import { AclManager } from "../configs/aclManage"; import { OracleManager } from "../configs/oracle"; - -// eslint-disable-next-line import/no-commonjs -const chalk = require("chalk"); +import chalk from "chalk"; export async function initPoolAddressesProvider() { // global aptos provider - const aptosProvider = new AptosProvider(); + const aptosProvider = AptosProvider.fromEnvs(); const poolAddressesProviderClient = new PoolAddressesProviderClient(aptosProvider, PoolManager); let txReceipt = await poolAddressesProviderClient.setAclAdmin(AclManager.accountAddress); @@ -21,7 +19,7 @@ export async function initPoolAddressesProvider() { txReceipt = await poolAddressesProviderClient.setAclManager(AclManager.accountAddress); console.log( - chalk.yellow(`Acl maanger set to ${AclManager.accountAddress.toString()} with tx hash = ${txReceipt.hash}`), + chalk.yellow(`Acl manager set to ${AclManager.accountAddress.toString()} with tx hash = ${txReceipt.hash}`), ); txReceipt = await poolAddressesProviderClient.setPoolConfigurator(PoolManager.accountAddress); diff --git a/test-suites/scripts/initReserve.ts b/test-suites/scripts/initReserves.ts similarity index 89% rename from test-suites/scripts/initReserve.ts rename to test-suites/scripts/initReserves.ts index 6d2afb1..ae474a8 100644 --- a/test-suites/scripts/initReserve.ts +++ b/test-suites/scripts/initReserves.ts @@ -1,26 +1,22 @@ /* eslint-disable no-console */ /* eslint-disable no-await-in-loop */ -import { BigNumber } from "ethers"; import { PoolManager } from "../configs/pool"; import { AptosProvider } from "../wrappers/aptosProvider"; import { PoolClient } from "../clients/poolClient"; import { aTokens, underlyingTokens, varTokens } from "./createTokens"; import { ATokensClient } from "../clients/aTokensClient"; import { VariableTokensClient } from "../clients/variableTokensClient"; - -// eslint-disable-next-line import/no-commonjs -const chalk = require("chalk"); +import chalk from "chalk"; export async function initReserves() { // global aptos provider - const aptosProvider = new AptosProvider(); + const aptosProvider = AptosProvider.fromEnvs(); const poolClient = new PoolClient(aptosProvider, PoolManager); const aTokensClient = new ATokensClient(aptosProvider); const varTokensClient = new VariableTokensClient(aptosProvider); // create reserves input data const underlyingAssets = underlyingTokens.map((token) => token.accountAddress); - const underlyingAssetDecimals = underlyingTokens.map((token) => BigNumber.from(token.decimals).toNumber()); const treasuries = underlyingTokens.map((token) => token.treasury); const aTokenNames = aTokens.map((token) => token.name); const aTokenSymbols = aTokens.map((token) => token.symbol); @@ -30,7 +26,6 @@ export async function initReserves() { // init reserves const txReceipt = await poolClient.initReserves( underlyingAssets, - underlyingAssetDecimals, treasuries, aTokenNames, aTokenSymbols, diff --git a/test-suites/scripts/publishLargePackage.ts b/test-suites/scripts/publishLargePackage.ts index e803ece..5081a50 100644 --- a/test-suites/scripts/publishLargePackage.ts +++ b/test-suites/scripts/publishLargePackage.ts @@ -7,6 +7,7 @@ import fs from "fs"; import { PathLike } from "node:fs"; import { AptosProvider } from "../wrappers/aptosProvider"; import { PackagePublisher } from "../wrappers/packagePublisher"; +import chalk from "chalk"; const envPath = path.resolve(__dirname, "../../.env"); dotenv.config({ path: envPath }); @@ -22,9 +23,6 @@ const parseArgs = () => { return args; }; -// eslint-disable-next-line import/no-commonjs -const chalk = require("chalk"); - (async () => { // parse cmd args const args = parseArgs(); @@ -39,11 +37,13 @@ const chalk = require("chalk"); } // global aptos provider - const aptosProvider = new AptosProvider(); + const aptosProvider = AptosProvider.fromEnvs(); // all atokens-related operations client const senderProfile = args.profile as string; - const senderAccount = Account.fromPrivateKey({ privateKey: aptosProvider.getProfilePrivateKeyByName(senderProfile) }); + const senderAccount = Account.fromPrivateKey({ + privateKey: aptosProvider.getProfileAccountPrivateKeyByName(senderProfile), + }); const packagePublisher = new PackagePublisher(aptosProvider, senderAccount as Account, modulePath); try { diff --git a/test-suites/test/aave-oracle.spec.ts b/test-suites/test/aave-oracle.spec.ts index c8b15d1..f4785bb 100644 --- a/test-suites/test/aave-oracle.spec.ts +++ b/test-suites/test/aave-oracle.spec.ts @@ -1,4 +1,4 @@ -import { BigNumber } from "ethers"; +import { BigNumber } from "@ethersproject/bignumber"; import { initializeMakeSuite, testEnv } from "../configs/config"; import { OracleManager } from "../configs/oracle"; import { oneEther } from "../helpers/constants"; @@ -14,7 +14,7 @@ describe("AaveOracle", () => { const { weth } = testEnv; const sourcePrice = "100"; - const oracleClient = new OracleClient(new AptosProvider(), OracleManager); + const oracleClient = new OracleClient(AptosProvider.fromEnvs(), OracleManager); await oracleClient.setAssetPrice(weth, BigNumber.from(sourcePrice)); const newPrice = await oracleClient.getAssetPrice(weth); @@ -25,7 +25,7 @@ describe("AaveOracle", () => { const { weth } = testEnv; const fallbackPrice = oneEther.toString(); - const oracleClient = new OracleClient(new AptosProvider(), OracleManager); + const oracleClient = new OracleClient(AptosProvider.fromEnvs(), OracleManager); await oracleClient.setAssetPrice(weth, BigNumber.from(fallbackPrice)); const newPrice = await oracleClient.getAssetPrice(weth); diff --git a/test-suites/test/rate-strategy.spec.ts b/test-suites/test/rate-strategy.spec.ts index a98ec2f..c5af37d 100644 --- a/test-suites/test/rate-strategy.spec.ts +++ b/test-suites/test/rate-strategy.spec.ts @@ -12,7 +12,7 @@ import { PoolClient } from "../clients/poolClient"; describe("InterestRateStrategy", () => { let daiAddress: AccountAddress; let aDaiAddress: AccountAddress; - const aptosProvider = new AptosProvider(); + const aptosProvider = AptosProvider.fromEnvs(); let aTokensClient: ATokensClient; let underlyingTokensClient: UnderlyingTokensClient; let poolClient: PoolClient; diff --git a/test-suites/test/test.sh b/test-suites/test/test.sh deleted file mode 100755 index 8897211..0000000 --- a/test-suites/test/test.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# Run Jest tests with a delay between each test -jest test/aave-oracle.spec.ts && sleep 5 -jest test/acl-manager.spec.ts && sleep 5 -jest test/atoken-delegation-aware.spec.ts && sleep 5 -jest test/atoken-event-accounting.spec.ts && sleep 5 -jest test/atoken-events.spec.ts && sleep 5 -jest test/atoken-modifiers.spec.ts && sleep 5 -jest test/atoken-permit.spec.ts && sleep 5 -jest test/configurator.spec.ts && sleep 5 -jest test/liquidation-atoken.spec.ts && sleep 5 -jest test/liquidation-edge.spec.ts && sleep 5 -jest test/liquidation-emode-interest.spec.ts && sleep 5 -jest test/liquidation-emode.spec.ts && sleep 5 -jest test/liquidation-with-fee.spec.ts && sleep 5 -jest test/liquidity-indexes.spec.ts && sleep 5 -jest test/ltv-validation.spec.ts && sleep 5 -jest test/mint-to-treasury.spec.ts && sleep 5 -jest test/pool-drop-reserve.spec.ts && sleep 5 -jest test/pool-edge.spec.ts && sleep 5 -jest test/pool-get-reserve-address-by-id.spec.ts && sleep 5 -jest test/rate-strategy.spec.ts && sleep 5 -jest test/supply.spec.ts && sleep 5 -jest test/variable-debt-token-events.spec.ts && sleep 5 -jest test/variable-debt-token.spec.ts && sleep 5 -jest test/wadraymath.spec.ts && sleep 5 \ No newline at end of file diff --git a/test-suites/test/wadraymath.spec.ts b/test-suites/test/wadraymath.spec.ts index 46ebb6c..89afec4 100644 --- a/test-suites/test/wadraymath.spec.ts +++ b/test-suites/test/wadraymath.spec.ts @@ -1,4 +1,4 @@ -import { BigNumber } from "ethers"; +import { BigNumber } from "@ethersproject/bignumber"; import { expect, test, describe } from "@jest/globals"; import { BigNumberWrapper } from "../helpers/wadraymath"; import { HALF_WAD, RAY, WAD, HALF_RAY, MAX_UINT_AMOUNT } from "../helpers/constants"; diff --git a/test-suites/test/withdraw.spec.ts b/test-suites/test/withdraw.spec.ts index 59ba65e..8784187 100644 --- a/test-suites/test/withdraw.spec.ts +++ b/test-suites/test/withdraw.spec.ts @@ -20,7 +20,7 @@ import { ATokensClient } from "../clients/aTokensClient"; import { UnderlyingTokensClient } from "../clients/underlyingTokensClient"; import { PoolClient } from "../clients/poolClient"; -const aptosProvider = new AptosProvider(); +const aptosProvider = AptosProvider.fromEnvs(); let coreClient: CoreClient; let aTokensClient: ATokensClient; let underlyingTokensClient: UnderlyingTokensClient; diff --git a/test-suites/tsconfig.commonjs.json b/test-suites/tsconfig.commonjs.json index 695ccb0..9b3617b 100644 --- a/test-suites/tsconfig.commonjs.json +++ b/test-suites/tsconfig.commonjs.json @@ -1,21 +1,11 @@ { - // Extends base TypeScript configuration from 'tsconfig.json' "extends": "./tsconfig.json", "compilerOptions": { - // If enabled (true), generates corresponding '.d.ts' file alongside the output file. "declaration": true, - // Specifies the module system for the output bundle. "commonjs" is a standard for structuring and organizing JavaScript code. "module": "commonjs", - // The location where the output files will be placed. "outDir": "./dist/cmd/", - // Source map options "sourceMap": true, "inlineSources": true }, - // A list of glob patterns that exclude certain files from the compilation. - // Here, it's set to exclude all the files in 'node_modules' and any file ending in '.spec.ts'. - "exclude": [ - "node_modules", - "**/*.spec.ts" - ] -} \ No newline at end of file + "exclude": ["node_modules", "**/*.spec.ts"] +} diff --git a/test-suites/tsconfig.esm.json b/test-suites/tsconfig.esm.json index fb60be3..f71f010 100644 --- a/test-suites/tsconfig.esm.json +++ b/test-suites/tsconfig.esm.json @@ -1,26 +1,12 @@ { - // Extends base TypeScript configuration from 'tsconfig.json' - "extends": "./tsconfig.json", - "compilerOptions": { - // Specifies the module system for the output bundle. "ESNext" refers to the latest version of ECMAScript (JavaScript). - "module": "ESNext", - // The version of JavaScript that the compiler will output. "ESNext" means the latest version. - "target": "ESNext", - // The location where the output files will be placed. - "outDir": "./dist/esm/", - // If enabled (true), generates corresponding '.d.ts' file alongside the output file. - "declaration": true, - // Source map options - "sourceMap": true, - "inlineSources": true - // If enabled, only declaration files will be emitted and no JavaScript files will be output. - // Currently commented out, so JavaScript files are being output as well. - // "emitDeclarationOnly": true - }, - // A list of glob patterns that exclude certain files from the compilation. - // Here, it's set to exclude all the files in 'node_modules' and any file ending in '.spec.ts'. - "exclude": [ - "node_modules", - "**/*.spec.ts" - ] -} \ No newline at end of file + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "ESNext", + "target": "ESNext", + "outDir": "./dist/esm/", + "declaration": true, + "sourceMap": true, + "inlineSources": true + }, + "exclude": ["node_modules", "**/*.spec.ts"] +} diff --git a/test-suites/tsconfig.json b/test-suites/tsconfig.json index fb646f8..dd2c86b 100644 --- a/test-suites/tsconfig.json +++ b/test-suites/tsconfig.json @@ -9,6 +9,8 @@ "moduleResolution": "node", "allowSyntheticDefaultImports": true, "jsx": "preserve", + "strict": true, + "noEmit": true, "allowJs": true, "importHelpers": true, "alwaysStrict": true, @@ -25,13 +27,8 @@ "downlevelIteration": true, "esModuleInterop": true, "outDir": "dist", - "types": [ - "node", - "jest" - ], - "typeRoots": [ - "node_modules/@types" - ], + "types": ["node", "jest"], + "typeRoots": ["node_modules/@types"], "lib": [ "es7", "es6", @@ -59,9 +56,7 @@ "esnext", "esnext.asynciterable" ], - "files": [ - "./node_modules/@types/node/index.d.ts" - ], + "files": ["./node_modules/@types/node/index.d.ts"], "include": [ "./clients/**/*.ts", "./configs/**/*.ts", diff --git a/test-suites/wrappers/aptosProvider.ts b/test-suites/wrappers/aptosProvider.ts index 3de6262..aa300eb 100644 --- a/test-suites/wrappers/aptosProvider.ts +++ b/test-suites/wrappers/aptosProvider.ts @@ -4,15 +4,61 @@ import { Ed25519PrivateKey, AptosConfig, Aptos, - AccountPublicKey, AccountAddress, + Ed25519Account, } from "@aptos-labs/ts-sdk"; -import fs from "fs"; import path from "path"; -import { PathLike } from "node:fs"; import YAML from "yaml"; import dotenv from "dotenv"; +export interface AptosProviderConfig { + network: Network; + addresses: { + A_TOKENS: string; + UNDERLYING_TOKENS: string; + VARIABLE_TOKENS: string; + AAVE_ACL: string; + AAVE_CONFIG: string; + AAVE_ORACLE: string; + AAVE_POOL: string; + }; + oracle: { + URL: string; + CONTRACT_ACCOUNT: string; + DEPLOYER_ACCOUNT: string; + WORMHOLE: string; + }; +} + +export interface AptosAccountConfig { + network: string; + private_key: string; + public_key: string; + account: string; + rest_url: string; + faucet_url: string; +} + +export enum AAVE_PROFILES { + A_TOKENS = "a_tokens", + UNDERLYING_TOKENS = "underlying_tokens", + VARIABLE_TOKENS = "variable_tokens", + AAVE_ACL = "aave_acl", + AAVE_CONFIG = "aave_config", + AAVE_RATE = "aave_rate", + AAVE_ORACLE = "aave_oracle", + AAVE_POOL = "aave_pool", + AAVE_LARGE_PACKAGES = "aave_large_packages", + AAVE_MATH = "aave_math", + DEFAULT_FUNDER = "default", + TEST_ACCOUNT_0 = "test_account_0", + TEST_ACCOUNT_1 = "test_account_1", + TEST_ACCOUNT_2 = "test_account_2", + TEST_ACCOUNT_3 = "test_account_3", + TEST_ACCOUNT_4 = "test_account_4", + TEST_ACCOUNT_5 = "test_account_5", +} + const envPath = path.resolve(__dirname, "../../.env"); dotenv.config({ path: envPath }); @@ -25,71 +71,211 @@ export interface AccountProfileConfig { } export class AptosProvider { - private readonly network: Network; - - private readonly oracleUrl: string; + private network: Network; - private accountProfilesMap: Map = new Map(); + private oracleUrl: string; - private accountPrivateKeysMap: Map = new Map(); + private profileAddressMap: Map = new Map(); + private profileAccountMap: Map = new Map(); private aptos: Aptos; - constructor() { + private constructor() {} + + public static fromConfig(config: AptosProviderConfig): AptosProvider { + const aptosProvider = new AptosProvider(); + aptosProvider.setNetwork(config.network); + aptosProvider.setOracleUrl(config.oracle.URL); + aptosProvider.addProfileAddress(AAVE_PROFILES.A_TOKENS, AccountAddress.fromString(config.addresses.A_TOKENS)); + aptosProvider.addProfileAddress( + AAVE_PROFILES.UNDERLYING_TOKENS, + AccountAddress.fromString(config.addresses.UNDERLYING_TOKENS), + ); + aptosProvider.addProfileAddress( + AAVE_PROFILES.VARIABLE_TOKENS, + AccountAddress.fromString(config.addresses.VARIABLE_TOKENS), + ); + aptosProvider.addProfileAddress(AAVE_PROFILES.AAVE_ACL, AccountAddress.fromString(config.addresses.AAVE_ACL)); + aptosProvider.addProfileAddress(AAVE_PROFILES.AAVE_CONFIG, AccountAddress.fromString(config.addresses.AAVE_CONFIG)); + aptosProvider.addProfileAddress( + AAVE_PROFILES.AAVE_ORACLE, + AccountAddress.fromString(config.addresses.AAVE_ORACLE), + ); + aptosProvider.addProfileAddress(AAVE_PROFILES.AAVE_POOL, AccountAddress.fromString(config.addresses.AAVE_POOL)); + const aptosConfig = new AptosConfig({ + network: aptosProvider.getNetwork(), + }); + aptosProvider.setAptos(aptosConfig); + return aptosProvider; + } + + public static fromAptosYaml(aptosYaml: string): AptosProvider { + const aptosProvider = new AptosProvider(); + const parsedYaml = YAML.parse(aptosYaml); + for (const profile of Object.keys(parsedYaml.profiles)) { + const profileConfig = parsedYaml.profiles[profile] as AptosAccountConfig; + + // extract network + switch (profileConfig.network.toLowerCase()) { + case "testnet": { + aptosProvider.setNetwork(Network.TESTNET); + break; + } + case "devnet": { + aptosProvider.setNetwork(Network.DEVNET); + break; + } + case "mainnet": { + aptosProvider.setNetwork(Network.MAINNET); + break; + } + case "local": { + aptosProvider.setNetwork(Network.LOCAL); + break; + } + default: + throw new Error(`Unknown network ${profileConfig.network ? profileConfig.network : "undefined"}`); + } + + const aptosPrivateKey = new Ed25519PrivateKey(profileConfig.private_key); + aptosProvider.addProfileAccount(profile, aptosPrivateKey); + const profileAccount = Account.fromPrivateKey({ + privateKey: aptosPrivateKey, + }); + aptosProvider.addProfileAddress(profile, profileAccount.accountAddress); + } + const aptosConfig = new AptosConfig({ + network: aptosProvider.getNetwork(), + }); + aptosProvider.setAptos(aptosConfig); + return aptosProvider; + } + + public static fromEnvs(): AptosProvider { + const aptosProvider = new AptosProvider(); // read vars from .env file if (!process.env.APTOS_NETWORK) { throw new Error("Missing APTOS_NETWORK in .env file"); } switch (process.env.APTOS_NETWORK.toLowerCase()) { case "testnet": { - this.network = Network.TESTNET; + aptosProvider.setNetwork(Network.TESTNET); break; } case "devnet": { - this.network = Network.DEVNET; + aptosProvider.setNetwork(Network.DEVNET); break; } case "mainnet": { - this.network = Network.MAINNET; + aptosProvider.setNetwork(Network.MAINNET); break; } case "local": { - this.network = Network.LOCAL; + aptosProvider.setNetwork(Network.LOCAL); break; } default: throw new Error(`Unknown network ${process.env.APTOS_NETWORK ? process.env.APTOS_NETWORK : "undefined"}`); } - if (!process.env.PYTH_HERMES_URL) { - throw new Error("Missing PYTH_HERMES_URL in .env file"); + aptosProvider.setOracleUrl(""); + + // read envs + if (!process.env.A_TOKENS_PRIVATE_KEY) { + throw new Error("Env variable A_TOKENS_PRIVATE_KEY does not exist"); } - this.oracleUrl = process.env.PYTH_HERMES_URL; - let aptosConfigFile = process.env.APTOS_CONFIG_FILE; + addProfilePkey(aptosProvider, AAVE_PROFILES.A_TOKENS, process.env.A_TOKENS_PRIVATE_KEY); - // if aptos path not set presume local path - if (!process.env.APTOS_CONFIG_FILE) { - const basePath = path.resolve(__dirname, "../../"); - aptosConfigFile = path.join(basePath, ".aptos/config.yaml"); + if (!process.env.UNDERLYING_TOKENS_PRIVATE_KEY) { + throw new Error("Env variable UNDERLYING_TOKENS_PRIVATE_KEY does not exist"); } + addProfilePkey(aptosProvider, AAVE_PROFILES.UNDERLYING_TOKENS, process.env.UNDERLYING_TOKENS_PRIVATE_KEY); - // read profile set - if (!fs.existsSync(aptosConfigFile as PathLike)) { - throw new Error(`Package path ${aptosConfigFile} does not exist`); + if (!process.env.VARIABLE_TOKENS_PRIVATE_KEY) { + throw new Error("Env variable VARIABLE_TOKENS_PRIVATE_KEY does not exist"); } - const aptosConfigData = fs.readFileSync(aptosConfigFile, "utf8"); + addProfilePkey(aptosProvider, AAVE_PROFILES.VARIABLE_TOKENS, process.env.VARIABLE_TOKENS_PRIVATE_KEY); - const parsedYaml = YAML.parse(aptosConfigData); - for (const profile of Object.keys(parsedYaml.profiles)) { - const profileConfig = parsedYaml.profiles[profile] as AccountProfileConfig; - const aptosPrivateKey = new Ed25519PrivateKey(profileConfig.private_key); - this.accountPrivateKeysMap.set(profile, aptosPrivateKey); - const profileAccount = Account.fromPrivateKey({ privateKey: aptosPrivateKey }); - this.accountProfilesMap.set(profile, profileAccount); + if (!process.env.AAVE_ACL_PRIVATE_KEY) { + throw new Error("Env variable AAVE_ACL_PRIVATE_KEY does not exist"); + } + addProfilePkey(aptosProvider, AAVE_PROFILES.AAVE_ACL, process.env.AAVE_ACL_PRIVATE_KEY); + + if (!process.env.AAVE_RATE_PRIVATE_KEY) { + throw new Error("Env variable AAVE_RATE_PRIVATE_KEY does not exist"); + } + addProfilePkey(aptosProvider, AAVE_PROFILES.AAVE_RATE, process.env.AAVE_RATE_PRIVATE_KEY); + + if (!process.env.AAVE_CONFIG_PRIVATE_KEY) { + throw new Error("Env variable AAVE_CONFIG_PRIVATE_KEY does not exist"); + } + addProfilePkey(aptosProvider, AAVE_PROFILES.AAVE_CONFIG, process.env.AAVE_CONFIG_PRIVATE_KEY); + + if (!process.env.AAVE_ORACLE_PRIVATE_KEY) { + throw new Error("Env variable AAVE_ORACLE_PRIVATE_KEY does not exist"); + } + addProfilePkey(aptosProvider, AAVE_PROFILES.AAVE_ORACLE, process.env.AAVE_ORACLE_PRIVATE_KEY); + + if (!process.env.AAVE_ORACLE_PRIVATE_KEY) { + throw new Error("Env variable AAVE_ORACLE_PRIVATE_KEY does not exist"); + } + addProfilePkey(aptosProvider, AAVE_PROFILES.AAVE_ORACLE, process.env.AAVE_ORACLE_PRIVATE_KEY); + + if (!process.env.AAVE_POOL_PRIVATE_KEY) { + throw new Error("Env variable AAVE_POOL_PRIVATE_KEY does not exist"); + } + addProfilePkey(aptosProvider, AAVE_PROFILES.AAVE_POOL, process.env.AAVE_POOL_PRIVATE_KEY); + + if (!process.env.AAVE_LARGE_PACKAGES_PRIVATE_KEY) { + throw new Error("Env variable AAVE_LARGE_PACKAGES_PRIVATE_KEY does not exist"); + } + addProfilePkey(aptosProvider, AAVE_PROFILES.AAVE_LARGE_PACKAGES, process.env.AAVE_LARGE_PACKAGES_PRIVATE_KEY); + + if (!process.env.AAVE_MATH_PRIVATE_KEY) { + throw new Error("Env variable AAVE_MATH_PRIVATE_KEY does not exist"); } + addProfilePkey(aptosProvider, AAVE_PROFILES.AAVE_MATH, process.env.AAVE_MATH_PRIVATE_KEY); - const config = new AptosConfig({ network: this.network }); - this.aptos = new Aptos(config); + if (!process.env.DEFAULT_FUNDER_PRIVATE_KEY) { + throw new Error("Env variable DEFAULT_FUNDER_PRIVATE_KEY does not exist"); + } + addProfilePkey(aptosProvider, AAVE_PROFILES.DEFAULT_FUNDER, process.env.DEFAULT_FUNDER_PRIVATE_KEY); + + if (!process.env.TEST_ACCOUNT_0_PRIVATE_KEY) { + throw new Error("Env variable TEST_ACCOUNT_0_PRIVATE_KEY does not exist"); + } + addProfilePkey(aptosProvider, AAVE_PROFILES.TEST_ACCOUNT_0, process.env.TEST_ACCOUNT_0_PRIVATE_KEY); + + if (!process.env.TEST_ACCOUNT_1_PRIVATE_KEY) { + throw new Error("Env variable TEST_ACCOUNT_1_PRIVATE_KEY does not exist"); + } + addProfilePkey(aptosProvider, AAVE_PROFILES.TEST_ACCOUNT_1, process.env.TEST_ACCOUNT_1_PRIVATE_KEY); + + if (!process.env.TEST_ACCOUNT_2_PRIVATE_KEY) { + throw new Error("Env variable TEST_ACCOUNT_2_PRIVATE_KEY does not exist"); + } + addProfilePkey(aptosProvider, AAVE_PROFILES.TEST_ACCOUNT_2, process.env.TEST_ACCOUNT_2_PRIVATE_KEY); + + if (!process.env.TEST_ACCOUNT_3_PRIVATE_KEY) { + throw new Error("Env variable TEST_ACCOUNT_3_PRIVATE_KEY does not exist"); + } + addProfilePkey(aptosProvider, AAVE_PROFILES.TEST_ACCOUNT_3, process.env.TEST_ACCOUNT_3_PRIVATE_KEY); + + if (!process.env.TEST_ACCOUNT_4_PRIVATE_KEY) { + throw new Error("Env variable TEST_ACCOUNT_4_PRIVATE_KEY does not exist"); + } + addProfilePkey(aptosProvider, AAVE_PROFILES.TEST_ACCOUNT_4, process.env.TEST_ACCOUNT_4_PRIVATE_KEY); + + if (!process.env.TEST_ACCOUNT_5_PRIVATE_KEY) { + throw new Error("Env variable TEST_ACCOUNT_5_PRIVATE_KEY does not exist"); + } + addProfilePkey(aptosProvider, AAVE_PROFILES.TEST_ACCOUNT_5, process.env.TEST_ACCOUNT_5_PRIVATE_KEY); + + const aptosConfig = new AptosConfig({ + network: aptosProvider.getNetwork(), + }); + aptosProvider.setAptos(aptosConfig); + return aptosProvider; } /** Returns the aptos instance. */ @@ -97,24 +283,21 @@ export class AptosProvider { return this.aptos; } - /** Returns the account profile by name if found. */ - public getProfileAccountByName(profileName: string): Account { - return this.accountProfilesMap.get(profileName); - } - - /** Returns the account profile private key by name if found. */ - public getProfilePrivateKeyByName(profileName: string): Ed25519PrivateKey { - return this.accountPrivateKeysMap.get(profileName); + /** Returns the profile private key by name if found. */ + public getProfileAccountPrivateKeyByName(profileName: string): Ed25519PrivateKey { + return this.profileAccountMap.get(profileName); } - /** Returns the account profile public key by name if found. */ - public getProfilePublicKeyByName(profileName: string): AccountPublicKey { - return this.accountProfilesMap.get(profileName).publicKey; + /** Returns the profile private key by name if found. */ + public getProfileAccountByName(profileName: string): Ed25519Account { + return Account.fromPrivateKey({ + privateKey: this.getProfileAccountPrivateKeyByName(profileName), + }); } - /** Returns the account profile address by name if found. */ - public getProfileAccountAddressByByName(profileName: string): AccountAddress { - return this.accountProfilesMap.get(profileName).accountAddress; + /** Returns the profile address by name if found. */ + public getProfileAddressByName(profileName: string): AccountAddress { + return this.profileAddressMap.get(profileName); } /** Gets the selected network. */ @@ -126,4 +309,57 @@ export class AptosProvider { public getOracleUrl(): string { return this.oracleUrl; } + + public setNetwork(network: Network) { + this.network = network; + } + + public setOracleUrl(oracleUrl: string) { + this.oracleUrl = oracleUrl; + } + + public addProfileAddress(profileName: string, address: AccountAddress) { + this.profileAddressMap.set(profileName, address); + } + + public addProfileAccount(profileName: string, account: Ed25519PrivateKey) { + this.profileAccountMap.set(profileName, account); + } + + public setAptos(aptosConfig: AptosConfig) { + this.aptos = new Aptos(aptosConfig); + } + + public getOracleProfileAccount(): Ed25519Account { + return this.getProfileAccountByName(AAVE_PROFILES.AAVE_ORACLE); + } + + public getPoolProfileAccount(): Ed25519Account { + return this.getProfileAccountByName(AAVE_PROFILES.AAVE_POOL); + } + + public getATokensProfileAccount(): Ed25519Account { + return this.getProfileAccountByName(AAVE_PROFILES.A_TOKENS); + } + + public getUnderlyingTokensProfileAccount(): Ed25519Account { + return this.getProfileAccountByName(AAVE_PROFILES.UNDERLYING_TOKENS); + } + + public getVariableTokensProfileAccount(): Ed25519Account { + return this.getProfileAccountByName(AAVE_PROFILES.VARIABLE_TOKENS); + } + + public getAclProfileAccount(): Ed25519Account { + return this.getProfileAccountByName(AAVE_PROFILES.AAVE_ACL); + } } + +const addProfilePkey = (aptosProvider: AptosProvider, profile: string, privateKey: string) => { + const aptosPrivateKey = new Ed25519PrivateKey(privateKey); + aptosProvider.addProfileAccount(profile, aptosPrivateKey); + const profileAccount = Account.fromPrivateKey({ + privateKey: aptosPrivateKey, + }); + aptosProvider.addProfileAddress(profile, profileAccount.accountAddress); +};