From 2fadb5a0f75b1167bbaa70f706f103a0d1d3ec53 Mon Sep 17 00:00:00 2001 From: Harsh Agarwal Date: Tue, 13 Aug 2024 19:56:57 +0530 Subject: [PATCH] feat(#major); Eigenpie; Add subgraph (#2602) --- deployment/deployment.json | 34 + subgraphs/eigenpie/abis/ERC20.json | 222 + subgraphs/eigenpie/abis/EigenConfig.json | 764 +++ subgraphs/eigenpie/abis/EigenStaking.json | 643 ++ subgraphs/eigenpie/abis/MLRT.json | 547 ++ .../eigenpie/abis/Prices/AaveOracle.json | 159 + .../abis/Prices/Calculations/Curve.json | 143 + .../abis/Prices/Calculations/SushiSwap.json | 137 + subgraphs/eigenpie/abis/Prices/ChainLink.json | 530 ++ .../eigenpie/abis/Prices/Curve/Pool.json | 916 +++ .../eigenpie/abis/Prices/Curve/Registry.json | 337 ++ subgraphs/eigenpie/abis/Prices/ERC20.json | 828 +++ .../eigenpie/abis/Prices/Uniswap/Factory.json | 125 + .../eigenpie/abis/Prices/Uniswap/Pair.json | 461 ++ .../eigenpie/abis/Prices/Uniswap/Router.json | 398 ++ subgraphs/eigenpie/abis/Prices/YearnLens.json | 174 + subgraphs/eigenpie/package-lock.json | 5367 +++++++++++++++++ subgraphs/eigenpie/package.json | 14 + .../eigenpie-ethereum/configurations.json | 17 + .../config/templates/eigenpie.template.yaml | 133 + subgraphs/eigenpie/schema.graphql | 349 ++ subgraphs/eigenpie/src/common/constants.ts | 85 + subgraphs/eigenpie/src/common/initializers.ts | 94 + subgraphs/eigenpie/src/common/utils.ts | 65 + .../src/mappings/eigenConfigMappings.ts | 24 + .../src/mappings/eigenStakingMappings.ts | 41 + subgraphs/eigenpie/src/prices/README.md | 295 + .../prices/calculations/CalculationsCurve.ts | 47 + .../calculations/CalculationsSushiswap.ts | 47 + .../eigenpie/src/prices/common/constants.ts | 52 + subgraphs/eigenpie/src/prices/common/types.ts | 147 + subgraphs/eigenpie/src/prices/common/utils.ts | 181 + .../eigenpie/src/prices/config/arbitrum.ts | 146 + .../eigenpie/src/prices/config/aurora.ts | 133 + .../eigenpie/src/prices/config/avalanche.ts | 140 + subgraphs/eigenpie/src/prices/config/bsc.ts | 130 + subgraphs/eigenpie/src/prices/config/celo.ts | 132 + .../eigenpie/src/prices/config/cronos.ts | 131 + .../eigenpie/src/prices/config/fantom.ts | 145 + subgraphs/eigenpie/src/prices/config/fuse.ts | 132 + .../eigenpie/src/prices/config/gnosis.ts | 134 + .../eigenpie/src/prices/config/harmony.ts | 136 + .../eigenpie/src/prices/config/mainnet.ts | 371 ++ .../eigenpie/src/prices/config/moonbeam.ts | 133 + .../eigenpie/src/prices/config/optimism.ts | 145 + .../eigenpie/src/prices/config/polygon.ts | 139 + .../eigenpie/src/prices/config/template.ts | 142 + subgraphs/eigenpie/src/prices/index.ts | 154 + .../eigenpie/src/prices/oracles/AaveOracle.ts | 44 + .../src/prices/oracles/ChainLinkFeed.ts | 53 + .../src/prices/oracles/YearnLensOracle.ts | 44 + .../src/prices/routers/CurveRouter.ts | 368 ++ .../src/prices/routers/UniswapForksRouter.ts | 292 + subgraphs/eigenpie/src/sdk/README.md | 25 + .../eigenpie/src/sdk/protocols/config.ts | 45 + .../src/sdk/protocols/generic/account.ts | 93 + .../src/sdk/protocols/generic/index.ts | 72 + .../src/sdk/protocols/generic/pool.ts | 298 + .../src/sdk/protocols/generic/poolSnapshot.ts | 93 + .../src/sdk/protocols/generic/protocol.ts | 257 + .../sdk/protocols/generic/protocolSnapshot.ts | 165 + .../src/sdk/protocols/generic/tokens.ts | 58 + subgraphs/eigenpie/src/sdk/util/arrays.ts | 103 + subgraphs/eigenpie/src/sdk/util/constants.ts | 222 + subgraphs/eigenpie/src/sdk/util/events.ts | 70 + subgraphs/eigenpie/src/sdk/util/numbers.ts | 61 + subgraphs/eigenpie/tsconfig.json | 4 + 67 files changed, 18186 insertions(+) create mode 100644 subgraphs/eigenpie/abis/ERC20.json create mode 100644 subgraphs/eigenpie/abis/EigenConfig.json create mode 100644 subgraphs/eigenpie/abis/EigenStaking.json create mode 100644 subgraphs/eigenpie/abis/MLRT.json create mode 100644 subgraphs/eigenpie/abis/Prices/AaveOracle.json create mode 100644 subgraphs/eigenpie/abis/Prices/Calculations/Curve.json create mode 100644 subgraphs/eigenpie/abis/Prices/Calculations/SushiSwap.json create mode 100644 subgraphs/eigenpie/abis/Prices/ChainLink.json create mode 100644 subgraphs/eigenpie/abis/Prices/Curve/Pool.json create mode 100644 subgraphs/eigenpie/abis/Prices/Curve/Registry.json create mode 100644 subgraphs/eigenpie/abis/Prices/ERC20.json create mode 100644 subgraphs/eigenpie/abis/Prices/Uniswap/Factory.json create mode 100644 subgraphs/eigenpie/abis/Prices/Uniswap/Pair.json create mode 100644 subgraphs/eigenpie/abis/Prices/Uniswap/Router.json create mode 100644 subgraphs/eigenpie/abis/Prices/YearnLens.json create mode 100644 subgraphs/eigenpie/package-lock.json create mode 100644 subgraphs/eigenpie/package.json create mode 100644 subgraphs/eigenpie/protocols/eigenpie/config/deployments/eigenpie-ethereum/configurations.json create mode 100644 subgraphs/eigenpie/protocols/eigenpie/config/templates/eigenpie.template.yaml create mode 100644 subgraphs/eigenpie/schema.graphql create mode 100644 subgraphs/eigenpie/src/common/constants.ts create mode 100644 subgraphs/eigenpie/src/common/initializers.ts create mode 100644 subgraphs/eigenpie/src/common/utils.ts create mode 100644 subgraphs/eigenpie/src/mappings/eigenConfigMappings.ts create mode 100644 subgraphs/eigenpie/src/mappings/eigenStakingMappings.ts create mode 100644 subgraphs/eigenpie/src/prices/README.md create mode 100644 subgraphs/eigenpie/src/prices/calculations/CalculationsCurve.ts create mode 100644 subgraphs/eigenpie/src/prices/calculations/CalculationsSushiswap.ts create mode 100644 subgraphs/eigenpie/src/prices/common/constants.ts create mode 100644 subgraphs/eigenpie/src/prices/common/types.ts create mode 100644 subgraphs/eigenpie/src/prices/common/utils.ts create mode 100644 subgraphs/eigenpie/src/prices/config/arbitrum.ts create mode 100644 subgraphs/eigenpie/src/prices/config/aurora.ts create mode 100644 subgraphs/eigenpie/src/prices/config/avalanche.ts create mode 100644 subgraphs/eigenpie/src/prices/config/bsc.ts create mode 100644 subgraphs/eigenpie/src/prices/config/celo.ts create mode 100644 subgraphs/eigenpie/src/prices/config/cronos.ts create mode 100644 subgraphs/eigenpie/src/prices/config/fantom.ts create mode 100644 subgraphs/eigenpie/src/prices/config/fuse.ts create mode 100644 subgraphs/eigenpie/src/prices/config/gnosis.ts create mode 100644 subgraphs/eigenpie/src/prices/config/harmony.ts create mode 100644 subgraphs/eigenpie/src/prices/config/mainnet.ts create mode 100644 subgraphs/eigenpie/src/prices/config/moonbeam.ts create mode 100644 subgraphs/eigenpie/src/prices/config/optimism.ts create mode 100644 subgraphs/eigenpie/src/prices/config/polygon.ts create mode 100644 subgraphs/eigenpie/src/prices/config/template.ts create mode 100644 subgraphs/eigenpie/src/prices/index.ts create mode 100644 subgraphs/eigenpie/src/prices/oracles/AaveOracle.ts create mode 100644 subgraphs/eigenpie/src/prices/oracles/ChainLinkFeed.ts create mode 100644 subgraphs/eigenpie/src/prices/oracles/YearnLensOracle.ts create mode 100644 subgraphs/eigenpie/src/prices/routers/CurveRouter.ts create mode 100644 subgraphs/eigenpie/src/prices/routers/UniswapForksRouter.ts create mode 100644 subgraphs/eigenpie/src/sdk/README.md create mode 100644 subgraphs/eigenpie/src/sdk/protocols/config.ts create mode 100644 subgraphs/eigenpie/src/sdk/protocols/generic/account.ts create mode 100644 subgraphs/eigenpie/src/sdk/protocols/generic/index.ts create mode 100644 subgraphs/eigenpie/src/sdk/protocols/generic/pool.ts create mode 100644 subgraphs/eigenpie/src/sdk/protocols/generic/poolSnapshot.ts create mode 100644 subgraphs/eigenpie/src/sdk/protocols/generic/protocol.ts create mode 100644 subgraphs/eigenpie/src/sdk/protocols/generic/protocolSnapshot.ts create mode 100644 subgraphs/eigenpie/src/sdk/protocols/generic/tokens.ts create mode 100644 subgraphs/eigenpie/src/sdk/util/arrays.ts create mode 100644 subgraphs/eigenpie/src/sdk/util/constants.ts create mode 100644 subgraphs/eigenpie/src/sdk/util/events.ts create mode 100644 subgraphs/eigenpie/src/sdk/util/numbers.ts create mode 100644 subgraphs/eigenpie/tsconfig.json diff --git a/deployment/deployment.json b/deployment/deployment.json index 849042bb2e..e1a91f6cf2 100644 --- a/deployment/deployment.json +++ b/deployment/deployment.json @@ -12016,5 +12016,39 @@ } } } + }, + "eigenpie": { + "schema": "generic", + "base": "eigenpie", + "protocol": "eigenpie", + "project": "eigenpie", + "deployments": { + "eigenpie-ethereum": { + "network": "ethereum", + "status": "prod", + "versions": { + "schema": "3.0.0", + "subgraph": "1.0.0", + "methodology": "1.0.0" + }, + "files": { + "template": "eigenpie.template.yaml" + }, + "options": { + "prepare:yaml": true, + "prepare:constants": false + }, + "services": { + "hosted-service": { + "slug": "eigenpie-ethereum", + "query-id": "eigenpie-ethereum" + }, + "decentralized-network": { + "slug": "eigenpie-ethereum", + "query-id": "TODO" + } + } + } + } } } diff --git a/subgraphs/eigenpie/abis/ERC20.json b/subgraphs/eigenpie/abis/ERC20.json new file mode 100644 index 0000000000..405d6b3648 --- /dev/null +++ b/subgraphs/eigenpie/abis/ERC20.json @@ -0,0 +1,222 @@ +[ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + } +] diff --git a/subgraphs/eigenpie/abis/EigenConfig.json b/subgraphs/eigenpie/abis/EigenConfig.json new file mode 100644 index 0000000000..e4d5f9d4a1 --- /dev/null +++ b/subgraphs/eigenpie/abis/EigenConfig.json @@ -0,0 +1,764 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AssetAlreadySupported", + "type": "error" + }, + { + "inputs": [], + "name": "AssetNotSupported", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotEigenpieConfigAdmin", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "role", + "type": "string" + } + ], + "name": "CallerNotEigenpieConfigAllowedRole", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotEigenpieConfigBurner", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotEigenpieConfigManager", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotEigenpieConfigMinter", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotEigenpieConfigOracle", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotEigenpieConfigOracleAdmin", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotEigenpieConfigPriceProvider", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAsset", + "type": "error" + }, + { + "inputs": [], + "name": "ValueAlreadyInUse", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receipt", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "depositLimit", + "type": "uint256" + } + ], + "name": "AddedNewSupportedAsset", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBoost", + "type": "uint256" + } + ], + "name": "AssetBoostUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "depositLimit", + "type": "uint256" + } + ], + "name": "AssetDepositLimitUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "strategy", + "type": "address" + } + ], + "name": "AssetStrategyUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receipt", + "type": "address" + } + ], + "name": "ReceiptTokenUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "me", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "myReferral", + "type": "address" + } + ], + "name": "ReferralUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "RemovedSupportedAsset", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "contractAddr", + "type": "address" + } + ], + "name": "SetContract", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "address", + "name": "mLRTReceipt", + "type": "address" + }, + { + "internalType": "uint256", + "name": "depositLimit", + "type": "uint256" + } + ], + "name": "addNewSupportedAsset", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "assetStrategy", + "outputs": [ + { + "internalType": "address", + "name": "strategy", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "baseGasAmountSpent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "boostByAsset", + "outputs": [ + { + "internalType": "uint256", + "name": "boost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "contractKey", + "type": "bytes32" + } + ], + "name": "contractMap", + "outputs": [ + { + "internalType": "address", + "name": "contractAddress", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "depositLimitByAsset", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "contractKey", + "type": "bytes32" + } + ], + "name": "getContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getSupportedAssetList", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "admin", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "isSupportedAsset", + "outputs": [ + { + "internalType": "bool", + "name": "isSupported", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "mLRTReceiptByAsset", + "outputs": [ + { + "internalType": "address", + "name": "mLRTReceipt", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_baseGasAmountSpent", + "type": "uint256" + } + ], + "name": "setBaseGasAmountSpent", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "contractKey", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "contractAddress", + "type": "address" + } + ], + "name": "setContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "supportedAssetList", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "boost", + "type": "uint256" + } + ], + "name": "updateAssetBoost", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "depositLimit", + "type": "uint256" + } + ], + "name": "updateAssetDepositLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "address", + "name": "strategy", + "type": "address" + } + ], + "name": "updateAssetStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "address", + "name": "mLRTReceipt", + "type": "address" + } + ], + "name": "updateReceiptToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/subgraphs/eigenpie/abis/EigenStaking.json b/subgraphs/eigenpie/abis/EigenStaking.json new file mode 100644 index 0000000000..03d873ece3 --- /dev/null +++ b/subgraphs/eigenpie/abis/EigenStaking.json @@ -0,0 +1,643 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AssetNotSupported", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotEigenpieConfigAdmin", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotEigenpieConfigManager", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAmountToDeposit", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidCaller", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidIndex", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMaximumNodeDelegatorLimit", + "type": "error" + }, + { + "inputs": [], + "name": "LengthMismatch", + "type": "error" + }, + { + "inputs": [], + "name": "MaximumDepositLimitReached", + "type": "error" + }, + { + "inputs": [], + "name": "MaximumNodeDelegatorLimitReached", + "type": "error" + }, + { + "inputs": [], + "name": "MinimumAmountToReceiveNotMet", + "type": "error" + }, + { + "inputs": [], + "name": "NativeTokenTransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "NotEnoughAssetToTransfer", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyWhenPredeposit", + "type": "error" + }, + { + "inputs": [], + "name": "TokenTransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "depositor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "depositAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "referral", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintedAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isPreDepsoit", + "type": "bool" + } + ], + "name": "AssetDeposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "depositor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "depositAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "referral", + "type": "address" + } + ], + "name": "AssetDeposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "maxNodeDelegatorLimit", + "type": "uint256" + } + ], + "name": "MaxNodeDelegatorLimitUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "minAmountToDeposit", + "type": "uint256" + } + ], + "name": "MinAmountToDepositUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "nodeDelegatorContracts", + "type": "address[]" + } + ], + "name": "NodeDelegatorAddedinQueue", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPreDepositHelper", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPreDepositHelper", + "type": "address" + } + ], + "name": "PreDepositHelperChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bool", + "name": "newIsPreDeposit", + "type": "bool" + } + ], + "name": "PreDepositStatusChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "eigenpieConfig", + "type": "address" + } + ], + "name": "UpdatedEigenpieConfig", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "nodeDelegatorContracts", + "type": "address[]" + } + ], + "name": "addNodeDelegatorContractToQueue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "depositAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minRec", + "type": "uint256" + }, + { + "internalType": "address", + "name": "referral", + "type": "address" + } + ], + "name": "depositAsset", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "eigenpieConfig", + "outputs": [ + { + "internalType": "contract IEigenpieConfig", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "getAssetCurrentLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "getAssetDistributionData", + "outputs": [ + { + "internalType": "uint256", + "name": "assetLyingInDepositPool", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "assetLyingInNDCs", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "assetStakedInEigenLayer", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "getMLRTAmountToMint", + "outputs": [ + { + "internalType": "uint256", + "name": "mLRTAmountToMint", + "type": "uint256" + }, + { + "internalType": "address", + "name": "mLRTReceipt", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNodeDelegatorQueue", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "getTotalAssetDeposits", + "outputs": [ + { + "internalType": "uint256", + "name": "totalAssetDeposit", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "eigenpieConfigAddr", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isNodeDelegator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isPreDeposit", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxNodeDelegatorLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minAmountToDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "nodeDelegatorQueue", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_isPreDeposit", + "type": "bool" + } + ], + "name": "setIsPreDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "minAmountToDeposit_", + "type": "uint256" + } + ], + "name": "setMinAmountToDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "ndcIndex", + "type": "uint256" + }, + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferAssetToNodeDelegator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "eigenpieConfigAddr", + "type": "address" + } + ], + "name": "updateEigenpieConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maxNodeDelegatorLimit_", + "type": "uint256" + } + ], + "name": "updateMaxNodeDelegatorLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } +] diff --git a/subgraphs/eigenpie/abis/MLRT.json b/subgraphs/eigenpie/abis/MLRT.json new file mode 100644 index 0000000000..1a57e260f1 --- /dev/null +++ b/subgraphs/eigenpie/abis/MLRT.json @@ -0,0 +1,547 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "CallerNotEigenpieConfigAdmin", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotEigenpieConfigBurner", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotEigenpieConfigManager", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotEigenpieConfigMinter", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotEigenpieConfigPriceProvider", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newExchangeRate", + "type": "uint256" + } + ], + "name": "LSTExchangeRateUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "eigenpieConfig", + "type": "address" + } + ], + "name": "UpdatedEigenpieConfig", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "eigenpieConfig", + "outputs": [ + { + "internalType": "contract IEigenpieConfig", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "exchangeRateToLST", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "exchangeRateToNative", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "address", + "name": "eigenpieConfigAddr", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "underlyingAsset", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "eigenpieConfigAddr", + "type": "address" + } + ], + "name": "updateEigenpieConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newRate", + "type": "uint256" + } + ], + "name": "updateExchangeRateToLST", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/subgraphs/eigenpie/abis/Prices/AaveOracle.json b/subgraphs/eigenpie/abis/Prices/AaveOracle.json new file mode 100644 index 0000000000..3149642bb9 --- /dev/null +++ b/subgraphs/eigenpie/abis/Prices/AaveOracle.json @@ -0,0 +1,159 @@ +[ + { + "inputs": [ + { + "internalType": "contract IPoolAddressesProvider", + "name": "provider", + "type": "address" + }, + { "internalType": "address[]", "name": "assets", "type": "address[]" }, + { "internalType": "address[]", "name": "sources", "type": "address[]" }, + { + "internalType": "address", + "name": "fallbackOracle", + "type": "address" + }, + { "internalType": "address", "name": "baseCurrency", "type": "address" }, + { + "internalType": "uint256", + "name": "baseCurrencyUnit", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "source", + "type": "address" + } + ], + "name": "AssetSourceUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "baseCurrency", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "baseCurrencyUnit", + "type": "uint256" + } + ], + "name": "BaseCurrencySet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "fallbackOracle", + "type": "address" + } + ], + "name": "FallbackOracleUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "ADDRESSES_PROVIDER", + "outputs": [ + { + "internalType": "contract IPoolAddressesProvider", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "BASE_CURRENCY", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "BASE_CURRENCY_UNIT", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" } + ], + "name": "getAssetPrice", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address[]", "name": "assets", "type": "address[]" } + ], + "name": "getAssetsPrices", + "outputs": [ + { "internalType": "uint256[]", "name": "", "type": "uint256[]" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFallbackOracle", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" } + ], + "name": "getSourceOfAsset", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address[]", "name": "assets", "type": "address[]" }, + { "internalType": "address[]", "name": "sources", "type": "address[]" } + ], + "name": "setAssetSources", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "fallbackOracle", "type": "address" } + ], + "name": "setFallbackOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/subgraphs/eigenpie/abis/Prices/Calculations/Curve.json b/subgraphs/eigenpie/abis/Prices/Calculations/Curve.json new file mode 100644 index 0000000000..b1f6da3de4 --- /dev/null +++ b/subgraphs/eigenpie/abis/Prices/Calculations/Curve.json @@ -0,0 +1,143 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "_curveAddressProviderAddress", + "type": "address" + }, + { "internalType": "address", "name": "_oracleAddress", "type": "address" } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "curveAddressProviderAddress", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "curveMetapoolFactoryAddress", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "curveRegistryAddress", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "curveLpTokenAddress", + "type": "address" + } + ], + "name": "getBasePrice", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "curveLpTokenAddress", + "type": "address" + } + ], + "name": "getCurvePriceUsdc", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "tokenAddress", "type": "address" } + ], + "name": "getPool", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "assetAddress", "type": "address" } + ], + "name": "getPriceUsdc", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "poolAddress", "type": "address" } + ], + "name": "getUnderlyingCoinFromPool", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "curveLpTokenAddress", + "type": "address" + } + ], + "name": "getVirtualPrice", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "tokenAddress", "type": "address" } + ], + "name": "isBasicToken", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "tokenAddress", "type": "address" } + ], + "name": "isCurveLpToken", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oracleAddress", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ownerAddress", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "slot", "type": "bytes32" }, + { "internalType": "bytes32", "name": "value", "type": "bytes32" } + ], + "name": "updateSlot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/subgraphs/eigenpie/abis/Prices/Calculations/SushiSwap.json b/subgraphs/eigenpie/abis/Prices/Calculations/SushiSwap.json new file mode 100644 index 0000000000..8b9718ae78 --- /dev/null +++ b/subgraphs/eigenpie/abis/Prices/Calculations/SushiSwap.json @@ -0,0 +1,137 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "_primaryRouterAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_primaryFactoryAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_secondaryRouterAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_secondaryFactoryAddress", + "type": "address" + }, + { "internalType": "address", "name": "_usdcAddress", "type": "address" } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { "internalType": "address", "name": "tokenAddress", "type": "address" } + ], + "name": "getLpTokenPriceUsdc", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "tokenAddress", "type": "address" } + ], + "name": "getLpTokenTotalLiquidityUsdc", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "token0Address", "type": "address" }, + { "internalType": "address", "name": "token1Address", "type": "address" } + ], + "name": "getPriceFromRouter", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "tokenAddress", "type": "address" } + ], + "name": "getPriceFromRouterUsdc", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "tokenAddress", "type": "address" } + ], + "name": "getPriceUsdc", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "tokenAddress", "type": "address" } + ], + "name": "getRouterForLpToken", + "outputs": [ + { "internalType": "contract PriceRouter", "name": "", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "tokenAddress", "type": "address" } + ], + "name": "isLpToken", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "primaryFactoryAddress", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "primaryRouterAddress", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "secondaryFactoryAddress", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "secondaryRouterAddress", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "usdcAddress", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "wethAddress", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + } +] diff --git a/subgraphs/eigenpie/abis/Prices/ChainLink.json b/subgraphs/eigenpie/abis/Prices/ChainLink.json new file mode 100644 index 0000000000..55882931c3 --- /dev/null +++ b/subgraphs/eigenpie/abis/Prices/ChainLink.json @@ -0,0 +1,530 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "accessController", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "AccessControllerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "denomination", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "latestAggregator", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "previousAggregator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "nextPhaseId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "FeedConfirmed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "denomination", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "proposedAggregator", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "currentAggregator", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "FeedProposed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "OwnershipTransferRequested", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "base", "type": "address" }, + { "internalType": "address", "name": "quote", "type": "address" }, + { "internalType": "address", "name": "aggregator", "type": "address" } + ], + "name": "confirmFeed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "base", "type": "address" }, + { "internalType": "address", "name": "quote", "type": "address" } + ], + "name": "decimals", + "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "base", "type": "address" }, + { "internalType": "address", "name": "quote", "type": "address" } + ], + "name": "description", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAccessController", + "outputs": [ + { + "internalType": "contract AccessControllerInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "base", "type": "address" }, + { "internalType": "address", "name": "quote", "type": "address" }, + { "internalType": "uint256", "name": "roundId", "type": "uint256" } + ], + "name": "getAnswer", + "outputs": [ + { "internalType": "int256", "name": "answer", "type": "int256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "base", "type": "address" }, + { "internalType": "address", "name": "quote", "type": "address" } + ], + "name": "getCurrentPhaseId", + "outputs": [ + { "internalType": "uint16", "name": "currentPhaseId", "type": "uint16" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "base", "type": "address" }, + { "internalType": "address", "name": "quote", "type": "address" } + ], + "name": "getFeed", + "outputs": [ + { + "internalType": "contract AggregatorV2V3Interface", + "name": "aggregator", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "base", "type": "address" }, + { "internalType": "address", "name": "quote", "type": "address" }, + { "internalType": "uint80", "name": "roundId", "type": "uint80" } + ], + "name": "getNextRoundId", + "outputs": [ + { "internalType": "uint80", "name": "nextRoundId", "type": "uint80" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "base", "type": "address" }, + { "internalType": "address", "name": "quote", "type": "address" }, + { "internalType": "uint16", "name": "phaseId", "type": "uint16" } + ], + "name": "getPhase", + "outputs": [ + { + "components": [ + { "internalType": "uint16", "name": "phaseId", "type": "uint16" }, + { + "internalType": "uint80", + "name": "startingAggregatorRoundId", + "type": "uint80" + }, + { + "internalType": "uint80", + "name": "endingAggregatorRoundId", + "type": "uint80" + } + ], + "internalType": "struct FeedRegistryInterface.Phase", + "name": "phase", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "base", "type": "address" }, + { "internalType": "address", "name": "quote", "type": "address" }, + { "internalType": "uint16", "name": "phaseId", "type": "uint16" } + ], + "name": "getPhaseFeed", + "outputs": [ + { + "internalType": "contract AggregatorV2V3Interface", + "name": "aggregator", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "base", "type": "address" }, + { "internalType": "address", "name": "quote", "type": "address" }, + { "internalType": "uint16", "name": "phaseId", "type": "uint16" } + ], + "name": "getPhaseRange", + "outputs": [ + { "internalType": "uint80", "name": "startingRoundId", "type": "uint80" }, + { "internalType": "uint80", "name": "endingRoundId", "type": "uint80" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "base", "type": "address" }, + { "internalType": "address", "name": "quote", "type": "address" }, + { "internalType": "uint80", "name": "roundId", "type": "uint80" } + ], + "name": "getPreviousRoundId", + "outputs": [ + { "internalType": "uint80", "name": "previousRoundId", "type": "uint80" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "base", "type": "address" }, + { "internalType": "address", "name": "quote", "type": "address" } + ], + "name": "getProposedFeed", + "outputs": [ + { + "internalType": "contract AggregatorV2V3Interface", + "name": "proposedAggregator", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "base", "type": "address" }, + { "internalType": "address", "name": "quote", "type": "address" }, + { "internalType": "uint80", "name": "_roundId", "type": "uint80" } + ], + "name": "getRoundData", + "outputs": [ + { "internalType": "uint80", "name": "roundId", "type": "uint80" }, + { "internalType": "int256", "name": "answer", "type": "int256" }, + { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, + { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, + { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "base", "type": "address" }, + { "internalType": "address", "name": "quote", "type": "address" }, + { "internalType": "uint80", "name": "roundId", "type": "uint80" } + ], + "name": "getRoundFeed", + "outputs": [ + { + "internalType": "contract AggregatorV2V3Interface", + "name": "aggregator", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "base", "type": "address" }, + { "internalType": "address", "name": "quote", "type": "address" }, + { "internalType": "uint256", "name": "roundId", "type": "uint256" } + ], + "name": "getTimestamp", + "outputs": [ + { "internalType": "uint256", "name": "timestamp", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "aggregator", "type": "address" } + ], + "name": "isFeedEnabled", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "base", "type": "address" }, + { "internalType": "address", "name": "quote", "type": "address" } + ], + "name": "latestAnswer", + "outputs": [ + { "internalType": "int256", "name": "answer", "type": "int256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "base", "type": "address" }, + { "internalType": "address", "name": "quote", "type": "address" } + ], + "name": "latestRound", + "outputs": [ + { "internalType": "uint256", "name": "roundId", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "base", "type": "address" }, + { "internalType": "address", "name": "quote", "type": "address" } + ], + "name": "latestRoundData", + "outputs": [ + { "internalType": "uint80", "name": "roundId", "type": "uint80" }, + { "internalType": "int256", "name": "answer", "type": "int256" }, + { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, + { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, + { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "base", "type": "address" }, + { "internalType": "address", "name": "quote", "type": "address" } + ], + "name": "latestTimestamp", + "outputs": [ + { "internalType": "uint256", "name": "timestamp", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "base", "type": "address" }, + { "internalType": "address", "name": "quote", "type": "address" }, + { "internalType": "address", "name": "aggregator", "type": "address" } + ], + "name": "proposeFeed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "base", "type": "address" }, + { "internalType": "address", "name": "quote", "type": "address" }, + { "internalType": "uint80", "name": "roundId", "type": "uint80" } + ], + "name": "proposedGetRoundData", + "outputs": [ + { "internalType": "uint80", "name": "id", "type": "uint80" }, + { "internalType": "int256", "name": "answer", "type": "int256" }, + { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, + { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, + { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "base", "type": "address" }, + { "internalType": "address", "name": "quote", "type": "address" } + ], + "name": "proposedLatestRoundData", + "outputs": [ + { "internalType": "uint80", "name": "id", "type": "uint80" }, + { "internalType": "int256", "name": "answer", "type": "int256" }, + { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, + { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, + { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract AccessControllerInterface", + "name": "_accessController", + "type": "address" + } + ], + "name": "setAccessController", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "to", "type": "address" }], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "typeAndVersion", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "base", "type": "address" }, + { "internalType": "address", "name": "quote", "type": "address" } + ], + "name": "version", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + } +] diff --git a/subgraphs/eigenpie/abis/Prices/Curve/Pool.json b/subgraphs/eigenpie/abis/Prices/Curve/Pool.json new file mode 100644 index 0000000000..d4843cae7d --- /dev/null +++ b/subgraphs/eigenpie/abis/Prices/Curve/Pool.json @@ -0,0 +1,916 @@ +[ + { + "name": "TokenExchange", + "inputs": [ + { "type": "address", "name": "buyer", "indexed": true }, + { "type": "int128", "name": "sold_id", "indexed": false }, + { "type": "uint256", "name": "tokens_sold", "indexed": false }, + { "type": "int128", "name": "bought_id", "indexed": false }, + { "type": "uint256", "name": "tokens_bought", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "TokenExchange", + "inputs": [ + { "name": "buyer", "type": "address", "indexed": true }, + { "name": "sold_id", "type": "uint256", "indexed": false }, + { "name": "tokens_sold", "type": "uint256", "indexed": false }, + { "name": "bought_id", "type": "uint256", "indexed": false }, + { "name": "tokens_bought", "type": "uint256", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "TokenExchangeUnderlying", + "inputs": [ + { "name": "buyer", "type": "address", "indexed": true }, + { "name": "sold_id", "type": "int128", "indexed": false }, + { "name": "tokens_sold", "type": "uint256", "indexed": false }, + { "name": "bought_id", "type": "int128", "indexed": false }, + { "name": "tokens_bought", "type": "uint256", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "AddLiquidity", + "inputs": [ + { "name": "provider", "type": "address", "indexed": true }, + { "name": "token_amounts", "type": "uint256[2]", "indexed": false }, + { "name": "fee", "type": "uint256", "indexed": false }, + { "name": "token_supply", "type": "uint256", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "AddLiquidity", + "inputs": [ + { "name": "provider", "type": "address", "indexed": true }, + { "name": "token_amounts", "type": "uint256[3]", "indexed": false }, + { "name": "fee", "type": "uint256", "indexed": false }, + { "name": "token_supply", "type": "uint256", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "AddLiquidity", + "inputs": [ + { "name": "provider", "type": "address", "indexed": true }, + { "name": "token_amounts", "type": "uint256[2]", "indexed": false }, + { "name": "fees", "type": "uint256[2]", "indexed": false }, + { "name": "invariant", "type": "uint256", "indexed": false }, + { "name": "token_supply", "type": "uint256", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "AddLiquidity", + "inputs": [ + { "type": "address", "name": "provider", "indexed": true }, + { "type": "uint256[3]", "name": "token_amounts", "indexed": false }, + { "type": "uint256[3]", "name": "fees", "indexed": false }, + { "type": "uint256", "name": "invariant", "indexed": false }, + { "type": "uint256", "name": "token_supply", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "AddLiquidity", + "inputs": [ + { "type": "address", "name": "provider", "indexed": true }, + { "type": "uint256[4]", "name": "token_amounts", "indexed": false }, + { "type": "uint256[4]", "name": "fees", "indexed": false }, + { "type": "uint256", "name": "invariant", "indexed": false }, + { "type": "uint256", "name": "token_supply", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RemoveLiquidity", + "inputs": [ + { "name": "provider", "type": "address", "indexed": true }, + { "name": "token_amounts", "type": "uint256[2]", "indexed": false }, + { "name": "token_supply", "type": "uint256", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RemoveLiquidity", + "inputs": [ + { "name": "provider", "type": "address", "indexed": true }, + { "name": "token_amounts", "type": "uint256[3]", "indexed": false }, + { "name": "token_supply", "type": "uint256", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RemoveLiquidity", + "inputs": [ + { "name": "provider", "type": "address", "indexed": true }, + { "name": "token_amounts", "type": "uint256[2]", "indexed": false }, + { "name": "fees", "type": "uint256[2]", "indexed": false }, + { "name": "token_supply", "type": "uint256", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RemoveLiquidity", + "inputs": [ + { "type": "address", "name": "provider", "indexed": true }, + { "type": "uint256[3]", "name": "token_amounts", "indexed": false }, + { "type": "uint256[3]", "name": "fees", "indexed": false }, + { "type": "uint256", "name": "token_supply", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RemoveLiquidity", + "inputs": [ + { "type": "address", "name": "provider", "indexed": true }, + { "type": "uint256[4]", "name": "token_amounts", "indexed": false }, + { "type": "uint256[4]", "name": "fees", "indexed": false }, + { "type": "uint256", "name": "token_supply", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RemoveLiquidityOne", + "inputs": [ + { "type": "address", "name": "provider", "indexed": true }, + { "type": "uint256", "name": "token_amount", "indexed": false }, + { "type": "uint256", "name": "coin_amount", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RemoveLiquidityOne", + "inputs": [ + { "name": "provider", "type": "address", "indexed": true }, + { "name": "token_amount", "type": "uint256", "indexed": false }, + { "name": "coin_amount", "type": "uint256", "indexed": false }, + { "name": "token_supply", "type": "uint256", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RemoveLiquidityImbalance", + "inputs": [ + { "type": "address", "name": "provider", "indexed": true }, + { "type": "uint256[2]", "name": "token_amounts", "indexed": false }, + { "type": "uint256[2]", "name": "fees", "indexed": false }, + { "type": "uint256", "name": "invariant", "indexed": false }, + { "type": "uint256", "name": "token_supply", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RemoveLiquidityImbalance", + "inputs": [ + { "type": "address", "name": "provider", "indexed": true }, + { "type": "uint256[3]", "name": "token_amounts", "indexed": false }, + { "type": "uint256[3]", "name": "fees", "indexed": false }, + { "type": "uint256", "name": "invariant", "indexed": false }, + { "type": "uint256", "name": "token_supply", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RemoveLiquidityImbalance", + "inputs": [ + { "type": "address", "name": "provider", "indexed": true }, + { "type": "uint256[4]", "name": "token_amounts", "indexed": false }, + { "type": "uint256[4]", "name": "fees", "indexed": false }, + { "type": "uint256", "name": "invariant", "indexed": false }, + { "type": "uint256", "name": "token_supply", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "NewFee", + "inputs": [ + { "type": "uint256", "name": "fee", "indexed": false }, + { "type": "uint256", "name": "admin_fee", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "NewFee", + "inputs": [ + { "type": "uint256", "name": "fee", "indexed": false }, + { "type": "uint256", "name": "admin_fee", "indexed": false }, + { "type": "uint256", "name": "offpeg_fee_multiplier", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + + { + "name": "CommitNewAdmin", + "inputs": [ + { "name": "deadline", "type": "uint256", "indexed": true }, + { "name": "admin", "type": "address", "indexed": true } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "NewAdmin", + "inputs": [{ "name": "admin", "type": "address", "indexed": true }], + "anonymous": false, + "type": "event" + }, + { + "name": "CommitNewParameters", + "inputs": [ + { "name": "deadline", "type": "uint256", "indexed": true }, + { "name": "admin_fee", "type": "uint256", "indexed": false }, + { "name": "mid_fee", "type": "uint256", "indexed": false }, + { "name": "out_fee", "type": "uint256", "indexed": false }, + { "name": "fee_gamma", "type": "uint256", "indexed": false }, + { "name": "allowed_extra_profit", "type": "uint256", "indexed": false }, + { "name": "adjustment_step", "type": "uint256", "indexed": false }, + { "name": "ma_half_time", "type": "uint256", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "NewParameters", + "inputs": [ + { "name": "admin_fee", "type": "uint256", "indexed": false }, + { "name": "mid_fee", "type": "uint256", "indexed": false }, + { "name": "out_fee", "type": "uint256", "indexed": false }, + { "name": "fee_gamma", "type": "uint256", "indexed": false }, + { "name": "allowed_extra_profit", "type": "uint256", "indexed": false }, + { "name": "adjustment_step", "type": "uint256", "indexed": false }, + { "name": "ma_half_time", "type": "uint256", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RampAgamma", + "inputs": [ + { "name": "initial_A", "type": "uint256", "indexed": false }, + { "name": "future_A", "type": "uint256", "indexed": false }, + { "name": "initial_gamma", "type": "uint256", "indexed": false }, + { "name": "future_gamma", "type": "uint256", "indexed": false }, + { "name": "initial_time", "type": "uint256", "indexed": false }, + { "name": "future_time", "type": "uint256", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "StopRampA", + "inputs": [ + { "name": "current_A", "type": "uint256", "indexed": false }, + { "name": "current_gamma", "type": "uint256", "indexed": false }, + { "name": "time", "type": "uint256", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "ClaimAdminFee", + "inputs": [ + { "name": "admin", "type": "address", "indexed": true }, + { "name": "tokens", "type": "uint256", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "stateMutability": "nonpayable", + "type": "constructor", + "inputs": [ + { "name": "owner", "type": "address" }, + { "name": "admin_fee_receiver", "type": "address" }, + { "name": "A", "type": "uint256" }, + { "name": "gamma", "type": "uint256" }, + { "name": "mid_fee", "type": "uint256" }, + { "name": "out_fee", "type": "uint256" }, + { "name": "allowed_extra_profit", "type": "uint256" }, + { "name": "fee_gamma", "type": "uint256" }, + { "name": "adjustment_step", "type": "uint256" }, + { "name": "admin_fee", "type": "uint256" }, + { "name": "ma_half_time", "type": "uint256" }, + { "name": "initial_price", "type": "uint256" } + ], + "outputs": [] + }, + { "stateMutability": "payable", "type": "fallback" }, + { + "stateMutability": "view", + "type": "function", + "name": "token", + "inputs": [], + "outputs": [{ "name": "", "type": "address" }], + "gas": 516 + }, + { + "stateMutability": "view", + "type": "function", + "name": "coins", + "inputs": [{ "name": "i", "type": "uint256" }], + "outputs": [{ "name": "", "type": "address" }], + "gas": 648 + }, + { + "stateMutability": "view", + "type": "function", + "name": "A", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 685 + }, + { + "stateMutability": "view", + "type": "function", + "name": "gamma", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 11789 + }, + { + "stateMutability": "view", + "type": "function", + "name": "fee", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 17633 + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_virtual_price", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 364797 + }, + { + "stateMutability": "payable", + "type": "function", + "name": "exchange", + "inputs": [ + { "name": "i", "type": "uint256" }, + { "name": "j", "type": "uint256" }, + { "name": "dx", "type": "uint256" }, + { "name": "min_dy", "type": "uint256" } + ], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 16775598 + }, + { + "stateMutability": "payable", + "type": "function", + "name": "exchange", + "inputs": [ + { "name": "i", "type": "uint256" }, + { "name": "j", "type": "uint256" }, + { "name": "dx", "type": "uint256" }, + { "name": "min_dy", "type": "uint256" }, + { "name": "use_eth", "type": "bool" } + ], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 16775598 + }, + { + "stateMutability": "payable", + "type": "function", + "name": "exchange_underlying", + "inputs": [ + { "name": "i", "type": "uint256" }, + { "name": "j", "type": "uint256" }, + { "name": "dx", "type": "uint256" }, + { "name": "min_dy", "type": "uint256" } + ], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 16775396 + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_dy", + "inputs": [ + { "name": "i", "type": "uint256" }, + { "name": "j", "type": "uint256" }, + { "name": "dx", "type": "uint256" } + ], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 4577515 + }, + { + "stateMutability": "payable", + "type": "function", + "name": "add_liquidity", + "inputs": [ + { "name": "amounts", "type": "uint256[2]" }, + { "name": "min_mint_amount", "type": "uint256" } + ], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 17694821 + }, + { + "stateMutability": "payable", + "type": "function", + "name": "add_liquidity", + "inputs": [ + { "name": "amounts", "type": "uint256[2]" }, + { "name": "min_mint_amount", "type": "uint256" }, + { "name": "use_eth", "type": "bool" } + ], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 17694821 + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "remove_liquidity", + "inputs": [ + { "name": "_amount", "type": "uint256" }, + { "name": "min_amounts", "type": "uint256[2]" } + ], + "outputs": [], + "gas": 263729 + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "remove_liquidity", + "inputs": [ + { "name": "_amount", "type": "uint256" }, + { "name": "min_amounts", "type": "uint256[2]" }, + { "name": "use_eth", "type": "bool" } + ], + "outputs": [], + "gas": 263729 + }, + { + "stateMutability": "view", + "type": "function", + "name": "calc_token_amount", + "inputs": [{ "name": "amounts", "type": "uint256[2]" }], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 5200947 + }, + { + "stateMutability": "view", + "type": "function", + "name": "calc_withdraw_one_coin", + "inputs": [ + { "name": "token_amount", "type": "uint256" }, + { "name": "i", "type": "uint256" } + ], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 12584 + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "remove_liquidity_one_coin", + "inputs": [ + { "name": "token_amount", "type": "uint256" }, + { "name": "i", "type": "uint256" }, + { "name": "min_amount", "type": "uint256" } + ], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 16702178 + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "remove_liquidity_one_coin", + "inputs": [ + { "name": "token_amount", "type": "uint256" }, + { "name": "i", "type": "uint256" }, + { "name": "min_amount", "type": "uint256" }, + { "name": "use_eth", "type": "bool" } + ], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 16702178 + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "claim_admin_fees", + "inputs": [], + "outputs": [], + "gas": 3250985 + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "ramp_A_gamma", + "inputs": [ + { "name": "future_A", "type": "uint256" }, + { "name": "future_gamma", "type": "uint256" }, + { "name": "future_time", "type": "uint256" } + ], + "outputs": [], + "gas": 161698 + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "stop_ramp_A_gamma", + "inputs": [], + "outputs": [], + "gas": 156743 + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "commit_new_parameters", + "inputs": [ + { "name": "_new_mid_fee", "type": "uint256" }, + { "name": "_new_out_fee", "type": "uint256" }, + { "name": "_new_admin_fee", "type": "uint256" }, + { "name": "_new_fee_gamma", "type": "uint256" }, + { "name": "_new_allowed_extra_profit", "type": "uint256" }, + { "name": "_new_adjustment_step", "type": "uint256" }, + { "name": "_new_ma_half_time", "type": "uint256" } + ], + "outputs": [], + "gas": 305084 + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "apply_new_parameters", + "inputs": [], + "outputs": [], + "gas": 3543175 + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "revert_new_parameters", + "inputs": [], + "outputs": [], + "gas": 23142 + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "commit_transfer_ownership", + "inputs": [{ "name": "_owner", "type": "address" }], + "outputs": [], + "gas": 78827 + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "apply_transfer_ownership", + "inputs": [], + "outputs": [], + "gas": 67042 + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "revert_transfer_ownership", + "inputs": [], + "outputs": [], + "gas": 23232 + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "kill_me", + "inputs": [], + "outputs": [], + "gas": 40455 + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "unkill_me", + "inputs": [], + "outputs": [], + "gas": 23292 + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "set_admin_fee_receiver", + "inputs": [{ "name": "_admin_fee_receiver", "type": "address" }], + "outputs": [], + "gas": 38482 + }, + { + "stateMutability": "view", + "type": "function", + "name": "lp_price", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 217046 + }, + { + "stateMutability": "view", + "type": "function", + "name": "price_scale", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 3426 + }, + { + "stateMutability": "view", + "type": "function", + "name": "price_oracle", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 3456 + }, + { + "stateMutability": "view", + "type": "function", + "name": "price_oracle", + "inputs": [{ "name": "", "type": "uint256" }], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 3456 + }, + { + "stateMutability": "view", + "type": "function", + "name": "last_prices", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 3486 + }, + { + "stateMutability": "view", + "type": "function", + "name": "last_prices_timestamp", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 3516 + }, + { + "stateMutability": "view", + "type": "function", + "name": "initial_A_gamma", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 3546 + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_A_gamma", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 3576 + }, + { + "stateMutability": "view", + "type": "function", + "name": "initial_A_gamma_time", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 3606 + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_A_gamma_time", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 3636 + }, + { + "stateMutability": "view", + "type": "function", + "name": "allowed_extra_profit", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 3666 + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_allowed_extra_profit", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 3696 + }, + { + "stateMutability": "view", + "type": "function", + "name": "fee_gamma", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 3726 + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_fee_gamma", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 3756 + }, + { + "stateMutability": "view", + "type": "function", + "name": "adjustment_step", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 3786 + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_adjustment_step", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 3816 + }, + { + "stateMutability": "view", + "type": "function", + "name": "ma_half_time", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 3846 + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_ma_half_time", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 3876 + }, + { + "stateMutability": "view", + "type": "function", + "name": "mid_fee", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 3906 + }, + { + "stateMutability": "view", + "type": "function", + "name": "out_fee", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 3936 + }, + { + "stateMutability": "view", + "type": "function", + "name": "admin_fee", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 3966 + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_mid_fee", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 3996 + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_out_fee", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 4026 + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_admin_fee", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 4056 + }, + { + "stateMutability": "view", + "type": "function", + "name": "balances", + "inputs": [{ "name": "arg0", "type": "uint256" }], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 4131 + }, + { + "stateMutability": "view", + "type": "function", + "name": "D", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 4116 + }, + { + "stateMutability": "view", + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [{ "name": "", "type": "address" }], + "gas": 4146 + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_owner", + "inputs": [], + "outputs": [{ "name": "", "type": "address" }], + "gas": 4176 + }, + { + "stateMutability": "view", + "type": "function", + "name": "xcp_profit", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 4206 + }, + { + "stateMutability": "view", + "type": "function", + "name": "xcp_profit_a", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 4236 + }, + { + "stateMutability": "view", + "type": "function", + "name": "virtual_price", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 4266 + }, + { + "stateMutability": "view", + "type": "function", + "name": "is_killed", + "inputs": [], + "outputs": [{ "name": "", "type": "bool" }], + "gas": 4296 + }, + { + "stateMutability": "view", + "type": "function", + "name": "kill_deadline", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 4326 + }, + { + "stateMutability": "view", + "type": "function", + "name": "transfer_ownership_deadline", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 4356 + }, + { + "stateMutability": "view", + "type": "function", + "name": "admin_actions_deadline", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256" }], + "gas": 4386 + }, + { + "stateMutability": "view", + "type": "function", + "name": "admin_fee_receiver", + "inputs": [], + "outputs": [{ "name": "", "type": "address" }], + "gas": 4416 + }, + { + "name": "lp_token", + "outputs": [{ "type": "address", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 2291 + } +] diff --git a/subgraphs/eigenpie/abis/Prices/Curve/Registry.json b/subgraphs/eigenpie/abis/Prices/Curve/Registry.json new file mode 100644 index 0000000000..9747624cc9 --- /dev/null +++ b/subgraphs/eigenpie/abis/Prices/Curve/Registry.json @@ -0,0 +1,337 @@ +[ + { + "name": "PoolAdded", + "inputs": [ + { "type": "address", "name": "pool", "indexed": true }, + { "type": "bytes", "name": "rate_method_id", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "PoolRemoved", + "inputs": [{ "type": "address", "name": "pool", "indexed": true }], + "anonymous": false, + "type": "event" + }, + { + "outputs": [], + "inputs": [ + { "type": "address", "name": "_address_provider" }, + { "type": "address", "name": "_gauge_controller" } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "name": "find_pool_for_coins", + "outputs": [{ "type": "address", "name": "" }], + "inputs": [ + { "type": "address", "name": "_from" }, + { "type": "address", "name": "_to" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "name": "find_pool_for_coins", + "outputs": [{ "type": "address", "name": "" }], + "inputs": [ + { "type": "address", "name": "_from" }, + { "type": "address", "name": "_to" }, + { "type": "uint256", "name": "i" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "name": "get_n_coins", + "outputs": [{ "type": "uint256[2]", "name": "" }], + "inputs": [{ "type": "address", "name": "_pool" }], + "stateMutability": "view", + "type": "function", + "gas": 1704 + }, + { + "name": "get_coins", + "outputs": [{ "type": "address[8]", "name": "" }], + "inputs": [{ "type": "address", "name": "_pool" }], + "stateMutability": "view", + "type": "function", + "gas": 12285 + }, + { + "name": "get_underlying_coins", + "outputs": [{ "type": "address[8]", "name": "" }], + "inputs": [{ "type": "address", "name": "_pool" }], + "stateMutability": "view", + "type": "function", + "gas": 12347 + }, + { + "name": "get_decimals", + "outputs": [{ "type": "uint256[8]", "name": "" }], + "inputs": [{ "type": "address", "name": "_pool" }], + "stateMutability": "view", + "type": "function", + "gas": 8199 + }, + { + "name": "get_underlying_decimals", + "outputs": [{ "type": "uint256[8]", "name": "" }], + "inputs": [{ "type": "address", "name": "_pool" }], + "stateMutability": "view", + "type": "function", + "gas": 8261 + }, + { + "name": "get_rates", + "outputs": [{ "type": "uint256[8]", "name": "" }], + "inputs": [{ "type": "address", "name": "_pool" }], + "stateMutability": "view", + "type": "function", + "gas": 34780 + }, + { + "name": "get_gauges", + "outputs": [ + { "type": "address[10]", "name": "" }, + { "type": "int128[10]", "name": "" } + ], + "inputs": [{ "type": "address", "name": "_pool" }], + "stateMutability": "view", + "type": "function", + "gas": 20310 + }, + { + "name": "get_balances", + "outputs": [{ "type": "uint256[8]", "name": "" }], + "inputs": [{ "type": "address", "name": "_pool" }], + "stateMutability": "view", + "type": "function", + "gas": 16818 + }, + { + "name": "get_underlying_balances", + "outputs": [{ "type": "uint256[8]", "name": "" }], + "inputs": [{ "type": "address", "name": "_pool" }], + "stateMutability": "view", + "type": "function", + "gas": 158953 + }, + { + "name": "get_virtual_price_from_lp_token", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [{ "type": "address", "name": "_token" }], + "stateMutability": "view", + "type": "function", + "gas": 2080 + }, + { + "name": "get_A", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [{ "type": "address", "name": "_pool" }], + "stateMutability": "view", + "type": "function", + "gas": 1198 + }, + { + "name": "get_parameters", + "outputs": [ + { "type": "uint256", "name": "A" }, + { "type": "uint256", "name": "future_A" }, + { "type": "uint256", "name": "fee" }, + { "type": "uint256", "name": "admin_fee" }, + { "type": "uint256", "name": "future_fee" }, + { "type": "uint256", "name": "future_admin_fee" }, + { "type": "address", "name": "future_owner" }, + { "type": "uint256", "name": "initial_A" }, + { "type": "uint256", "name": "initial_A_time" }, + { "type": "uint256", "name": "future_A_time" } + ], + "inputs": [{ "type": "address", "name": "_pool" }], + "stateMutability": "view", + "type": "function", + "gas": 6458 + }, + { + "name": "get_fees", + "outputs": [{ "type": "uint256[2]", "name": "" }], + "inputs": [{ "type": "address", "name": "_pool" }], + "stateMutability": "view", + "type": "function", + "gas": 1603 + }, + { + "name": "get_admin_balances", + "outputs": [{ "type": "uint256[8]", "name": "" }], + "inputs": [{ "type": "address", "name": "_pool" }], + "stateMutability": "view", + "type": "function", + "gas": 36719 + }, + { + "name": "get_coin_indices", + "outputs": [ + { "type": "int128", "name": "" }, + { "type": "int128", "name": "" }, + { "type": "bool", "name": "" } + ], + "inputs": [ + { "type": "address", "name": "_pool" }, + { "type": "address", "name": "_from" }, + { "type": "address", "name": "_to" } + ], + "stateMutability": "view", + "type": "function", + "gas": 27456 + }, + { + "name": "estimate_gas_used", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [ + { "type": "address", "name": "_pool" }, + { "type": "address", "name": "_from" }, + { "type": "address", "name": "_to" } + ], + "stateMutability": "view", + "type": "function", + "gas": 32329 + }, + { + "name": "add_pool", + "outputs": [], + "inputs": [ + { "type": "address", "name": "_pool" }, + { "type": "uint256", "name": "_n_coins" }, + { "type": "address", "name": "_lp_token" }, + { "type": "bytes32", "name": "_rate_method_id" }, + { "type": "uint256", "name": "_decimals" }, + { "type": "uint256", "name": "_underlying_decimals" }, + { "type": "bool", "name": "_has_initial_A" }, + { "type": "bool", "name": "_is_v1" } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": 10196577 + }, + { + "name": "add_pool_without_underlying", + "outputs": [], + "inputs": [ + { "type": "address", "name": "_pool" }, + { "type": "uint256", "name": "_n_coins" }, + { "type": "address", "name": "_lp_token" }, + { "type": "bytes32", "name": "_rate_method_id" }, + { "type": "uint256", "name": "_decimals" }, + { "type": "uint256", "name": "_use_rates" }, + { "type": "bool", "name": "_has_initial_A" }, + { "type": "bool", "name": "_is_v1" } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": 5590664 + }, + { + "name": "add_metapool", + "outputs": [], + "inputs": [ + { "type": "address", "name": "_pool" }, + { "type": "uint256", "name": "_n_coins" }, + { "type": "address", "name": "_lp_token" }, + { "type": "uint256", "name": "_decimals" } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": 10226976 + }, + { + "name": "remove_pool", + "outputs": [], + "inputs": [{ "type": "address", "name": "_pool" }], + "stateMutability": "nonpayable", + "type": "function", + "gas": 779646579509 + }, + { + "name": "set_coin_gas_estimates", + "outputs": [], + "inputs": [ + { "type": "address[10]", "name": "_addr" }, + { "type": "uint256[10]", "name": "_amount" } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": 357165 + }, + { + "name": "set_gas_estimate_contract", + "outputs": [], + "inputs": [ + { "type": "address", "name": "_pool" }, + { "type": "address", "name": "_estimator" } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": 37747 + }, + { + "name": "set_liquidity_gauges", + "outputs": [], + "inputs": [ + { "type": "address", "name": "_pool" }, + { "type": "address[10]", "name": "_liquidity_gauges" } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": 365793 + }, + { + "name": "address_provider", + "outputs": [{ "type": "address", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 2111 + }, + { + "name": "gauge_controller", + "outputs": [{ "type": "address", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 2141 + }, + { + "name": "pool_list", + "outputs": [{ "type": "address", "name": "" }], + "inputs": [{ "type": "uint256", "name": "arg0" }], + "stateMutability": "view", + "type": "function", + "gas": 2280 + }, + { + "name": "pool_count", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 2201 + }, + { + "name": "get_pool_from_lp_token", + "outputs": [{ "type": "address", "name": "" }], + "inputs": [{ "type": "address", "name": "arg0" }], + "stateMutability": "view", + "type": "function", + "gas": 2446 + }, + { + "name": "get_lp_token", + "outputs": [{ "type": "address", "name": "" }], + "inputs": [{ "type": "address", "name": "arg0" }], + "stateMutability": "view", + "type": "function", + "gas": 2476 + } +] diff --git a/subgraphs/eigenpie/abis/Prices/ERC20.json b/subgraphs/eigenpie/abis/Prices/ERC20.json new file mode 100644 index 0000000000..5c47f76a53 --- /dev/null +++ b/subgraphs/eigenpie/abis/Prices/ERC20.json @@ -0,0 +1,828 @@ +[ + { + "name": "Transfer", + "inputs": [ + { "type": "address", "name": "sender", "indexed": true }, + { "type": "address", "name": "receiver", "indexed": true }, + { "type": "uint256", "name": "value", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "Approval", + "inputs": [ + { "type": "address", "name": "owner", "indexed": true }, + { "type": "address", "name": "spender", "indexed": true }, + { "type": "uint256", "name": "value", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "StrategyAdded", + "inputs": [ + { "type": "address", "name": "strategy", "indexed": true }, + { "type": "uint256", "name": "debtRatio", "indexed": false }, + { "type": "uint256", "name": "rateLimit", "indexed": false }, + { "type": "uint256", "name": "performanceFee", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "StrategyReported", + "inputs": [ + { "type": "address", "name": "strategy", "indexed": true }, + { "type": "uint256", "name": "gain", "indexed": false }, + { "type": "uint256", "name": "loss", "indexed": false }, + { "type": "uint256", "name": "totalGain", "indexed": false }, + { "type": "uint256", "name": "totalLoss", "indexed": false }, + { "type": "uint256", "name": "totalDebt", "indexed": false }, + { "type": "uint256", "name": "debtAdded", "indexed": false }, + { "type": "uint256", "name": "debtRatio", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "UpdateGovernance", + "inputs": [{ "type": "address", "name": "governance", "indexed": false }], + "anonymous": false, + "type": "event" + }, + { + "name": "UpdateManagement", + "inputs": [{ "type": "address", "name": "management", "indexed": false }], + "anonymous": false, + "type": "event" + }, + { + "name": "UpdateGuestList", + "inputs": [{ "type": "address", "name": "guestList", "indexed": false }], + "anonymous": false, + "type": "event" + }, + { + "name": "UpdateRewards", + "inputs": [{ "type": "address", "name": "rewards", "indexed": false }], + "anonymous": false, + "type": "event" + }, + { + "name": "UpdateDepositLimit", + "inputs": [{ "type": "uint256", "name": "depositLimit", "indexed": false }], + "anonymous": false, + "type": "event" + }, + { + "name": "UpdatePerformanceFee", + "inputs": [ + { "type": "uint256", "name": "performanceFee", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "UpdateManagementFee", + "inputs": [ + { "type": "uint256", "name": "managementFee", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "UpdateGuardian", + "inputs": [{ "type": "address", "name": "guardian", "indexed": false }], + "anonymous": false, + "type": "event" + }, + { + "name": "EmergencyShutdown", + "inputs": [{ "type": "bool", "name": "active", "indexed": false }], + "anonymous": false, + "type": "event" + }, + { + "name": "UpdateWithdrawalQueue", + "inputs": [{ "type": "address[20]", "name": "queue", "indexed": false }], + "anonymous": false, + "type": "event" + }, + { + "name": "StrategyUpdateDebtRatio", + "inputs": [ + { "type": "address", "name": "strategy", "indexed": true }, + { "type": "uint256", "name": "debtRatio", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "StrategyUpdateRateLimit", + "inputs": [ + { "type": "address", "name": "strategy", "indexed": true }, + { "type": "uint256", "name": "rateLimit", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "StrategyUpdatePerformanceFee", + "inputs": [ + { "type": "address", "name": "strategy", "indexed": true }, + { "type": "uint256", "name": "performanceFee", "indexed": false } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "StrategyMigrated", + "inputs": [ + { "type": "address", "name": "oldVersion", "indexed": true }, + { "type": "address", "name": "newVersion", "indexed": true } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "StrategyRevoked", + "inputs": [{ "type": "address", "name": "strategy", "indexed": true }], + "anonymous": false, + "type": "event" + }, + { + "name": "StrategyRemovedFromQueue", + "inputs": [{ "type": "address", "name": "strategy", "indexed": true }], + "anonymous": false, + "type": "event" + }, + { + "name": "StrategyAddedToQueue", + "inputs": [{ "type": "address", "name": "strategy", "indexed": true }], + "anonymous": false, + "type": "event" + }, + { + "name": "initialize", + "outputs": [], + "inputs": [ + { "type": "address", "name": "token" }, + { "type": "address", "name": "governance" }, + { "type": "address", "name": "rewards" }, + { "type": "string", "name": "nameOverride" }, + { "type": "string", "name": "symbolOverride" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "name": "initialize", + "outputs": [], + "inputs": [ + { "type": "address", "name": "token" }, + { "type": "address", "name": "governance" }, + { "type": "address", "name": "rewards" }, + { "type": "string", "name": "nameOverride" }, + { "type": "string", "name": "symbolOverride" }, + { "type": "address", "name": "guardian" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "name": "apiVersion", + "outputs": [{ "type": "string", "name": "" }], + "inputs": [], + "stateMutability": "pure", + "type": "function", + "gas": 4519 + }, + { + "name": "setName", + "outputs": [], + "inputs": [{ "type": "string", "name": "name" }], + "stateMutability": "nonpayable", + "type": "function", + "gas": 107017 + }, + { + "name": "setSymbol", + "outputs": [], + "inputs": [{ "type": "string", "name": "symbol" }], + "stateMutability": "nonpayable", + "type": "function", + "gas": 71867 + }, + { + "name": "setGovernance", + "outputs": [], + "inputs": [{ "type": "address", "name": "governance" }], + "stateMutability": "nonpayable", + "type": "function", + "gas": 36338 + }, + { + "name": "acceptGovernance", + "outputs": [], + "inputs": [], + "stateMutability": "nonpayable", + "type": "function", + "gas": 37610 + }, + { + "name": "setManagement", + "outputs": [], + "inputs": [{ "type": "address", "name": "management" }], + "stateMutability": "nonpayable", + "type": "function", + "gas": 37748 + }, + { + "name": "setGuestList", + "outputs": [], + "inputs": [{ "type": "address", "name": "guestList" }], + "stateMutability": "nonpayable", + "type": "function", + "gas": 37778 + }, + { + "name": "setRewards", + "outputs": [], + "inputs": [{ "type": "address", "name": "rewards" }], + "stateMutability": "nonpayable", + "type": "function", + "gas": 37808 + }, + { + "name": "setDepositLimit", + "outputs": [], + "inputs": [{ "type": "uint256", "name": "limit" }], + "stateMutability": "nonpayable", + "type": "function", + "gas": 37738 + }, + { + "name": "setPerformanceFee", + "outputs": [], + "inputs": [{ "type": "uint256", "name": "fee" }], + "stateMutability": "nonpayable", + "type": "function", + "gas": 37872 + }, + { + "name": "setManagementFee", + "outputs": [], + "inputs": [{ "type": "uint256", "name": "fee" }], + "stateMutability": "nonpayable", + "type": "function", + "gas": 37902 + }, + { + "name": "setGuardian", + "outputs": [], + "inputs": [{ "type": "address", "name": "guardian" }], + "stateMutability": "nonpayable", + "type": "function", + "gas": 39146 + }, + { + "name": "setEmergencyShutdown", + "outputs": [], + "inputs": [{ "type": "bool", "name": "active" }], + "stateMutability": "nonpayable", + "type": "function", + "gas": 39217 + }, + { + "name": "setWithdrawalQueue", + "outputs": [], + "inputs": [{ "type": "address[20]", "name": "queue" }], + "stateMutability": "nonpayable", + "type": "function", + "gas": 763893 + }, + { + "name": "transfer", + "outputs": [{ "type": "bool", "name": "" }], + "inputs": [ + { "type": "address", "name": "receiver" }, + { "type": "uint256", "name": "amount" } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": 76733 + }, + { + "name": "transferFrom", + "outputs": [{ "type": "bool", "name": "" }], + "inputs": [ + { "type": "address", "name": "sender" }, + { "type": "address", "name": "receiver" }, + { "type": "uint256", "name": "amount" } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": 116496 + }, + { + "name": "approve", + "outputs": [{ "type": "bool", "name": "" }], + "inputs": [ + { "type": "address", "name": "spender" }, + { "type": "uint256", "name": "amount" } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": 38244 + }, + { + "name": "increaseAllowance", + "outputs": [{ "type": "bool", "name": "" }], + "inputs": [ + { "type": "address", "name": "spender" }, + { "type": "uint256", "name": "amount" } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": 40285 + }, + { + "name": "decreaseAllowance", + "outputs": [{ "type": "bool", "name": "" }], + "inputs": [ + { "type": "address", "name": "spender" }, + { "type": "uint256", "name": "amount" } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": 40309 + }, + { + "name": "permit", + "outputs": [{ "type": "bool", "name": "" }], + "inputs": [ + { "type": "address", "name": "owner" }, + { "type": "address", "name": "spender" }, + { "type": "uint256", "name": "amount" }, + { "type": "uint256", "name": "expiry" }, + { "type": "bytes", "name": "signature" } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": 81237 + }, + { + "name": "totalAssets", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 4123 + }, + { + "name": "deposit", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "name": "deposit", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [{ "type": "uint256", "name": "_amount" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "name": "deposit", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [ + { "type": "uint256", "name": "_amount" }, + { "type": "address", "name": "recipient" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "name": "maxAvailableShares", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 364171 + }, + { + "name": "withdraw", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "name": "withdraw", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [{ "type": "uint256", "name": "maxShares" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "name": "withdraw", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [ + { "type": "uint256", "name": "maxShares" }, + { "type": "address", "name": "recipient" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "name": "withdraw", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [ + { "type": "uint256", "name": "maxShares" }, + { "type": "address", "name": "recipient" }, + { "type": "uint256", "name": "maxLoss" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "name": "pricePerShare", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 12412 + }, + { + "name": "addStrategy", + "outputs": [], + "inputs": [ + { "type": "address", "name": "strategy" }, + { "type": "uint256", "name": "debtRatio" }, + { "type": "uint256", "name": "rateLimit" }, + { "type": "uint256", "name": "performanceFee" } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": 1450351 + }, + { + "name": "updateStrategyDebtRatio", + "outputs": [], + "inputs": [ + { "type": "address", "name": "strategy" }, + { "type": "uint256", "name": "debtRatio" } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": 115316 + }, + { + "name": "updateStrategyRateLimit", + "outputs": [], + "inputs": [ + { "type": "address", "name": "strategy" }, + { "type": "uint256", "name": "rateLimit" } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": 41467 + }, + { + "name": "updateStrategyPerformanceFee", + "outputs": [], + "inputs": [ + { "type": "address", "name": "strategy" }, + { "type": "uint256", "name": "performanceFee" } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": 41344 + }, + { + "name": "migrateStrategy", + "outputs": [], + "inputs": [ + { "type": "address", "name": "oldVersion" }, + { "type": "address", "name": "newVersion" } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": 1105801 + }, + { + "name": "revokeStrategy", + "outputs": [], + "inputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "name": "revokeStrategy", + "outputs": [], + "inputs": [{ "type": "address", "name": "strategy" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "name": "addStrategyToQueue", + "outputs": [], + "inputs": [{ "type": "address", "name": "strategy" }], + "stateMutability": "nonpayable", + "type": "function", + "gas": 1196920 + }, + { + "name": "removeStrategyFromQueue", + "outputs": [], + "inputs": [{ "type": "address", "name": "strategy" }], + "stateMutability": "nonpayable", + "type": "function", + "gas": 23091666 + }, + { + "name": "debtOutstanding", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "name": "debtOutstanding", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [{ "type": "address", "name": "strategy" }], + "stateMutability": "view", + "type": "function" + }, + { + "name": "creditAvailable", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "name": "creditAvailable", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [{ "type": "address", "name": "strategy" }], + "stateMutability": "view", + "type": "function" + }, + { + "name": "availableDepositLimit", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 9808 + }, + { + "name": "expectedReturn", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "name": "expectedReturn", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [{ "type": "address", "name": "strategy" }], + "stateMutability": "view", + "type": "function" + }, + { + "name": "report", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [ + { "type": "uint256", "name": "gain" }, + { "type": "uint256", "name": "loss" }, + { "type": "uint256", "name": "_debtPayment" } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": 937520 + }, + { + "name": "sweep", + "outputs": [], + "inputs": [{ "type": "address", "name": "token" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "name": "sweep", + "outputs": [], + "inputs": [ + { "type": "address", "name": "token" }, + { "type": "uint256", "name": "amount" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "name": "name", + "outputs": [{ "type": "string", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 9053 + }, + { + "name": "symbol", + "outputs": [{ "type": "string", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 8106 + }, + { + "name": "decimals", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 2711 + }, + { + "name": "balanceOf", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [{ "type": "address", "name": "arg0" }], + "stateMutability": "view", + "type": "function", + "gas": 2956 + }, + { + "name": "allowance", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [ + { "type": "address", "name": "arg0" }, + { "type": "address", "name": "arg1" } + ], + "stateMutability": "view", + "type": "function", + "gas": 3201 + }, + { + "name": "totalSupply", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 2801 + }, + { + "name": "token", + "outputs": [{ "type": "address", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 2831 + }, + { + "name": "governance", + "outputs": [{ "type": "address", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 2861 + }, + { + "name": "management", + "outputs": [{ "type": "address", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 2891 + }, + { + "name": "guardian", + "outputs": [{ "type": "address", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 2921 + }, + { + "name": "guestList", + "outputs": [{ "type": "address", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 2951 + }, + { + "name": "strategies", + "outputs": [ + { "type": "uint256", "name": "performanceFee" }, + { "type": "uint256", "name": "activation" }, + { "type": "uint256", "name": "debtRatio" }, + { "type": "uint256", "name": "rateLimit" }, + { "type": "uint256", "name": "lastReport" }, + { "type": "uint256", "name": "totalDebt" }, + { "type": "uint256", "name": "totalGain" }, + { "type": "uint256", "name": "totalLoss" } + ], + "inputs": [{ "type": "address", "name": "arg0" }], + "stateMutability": "view", + "type": "function", + "gas": 10322 + }, + { + "name": "withdrawalQueue", + "outputs": [{ "type": "address", "name": "" }], + "inputs": [{ "type": "uint256", "name": "arg0" }], + "stateMutability": "view", + "type": "function", + "gas": 3120 + }, + { + "name": "emergencyShutdown", + "outputs": [{ "type": "bool", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 3041 + }, + { + "name": "depositLimit", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 3071 + }, + { + "name": "debtRatio", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 3101 + }, + { + "name": "totalDebt", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 3131 + }, + { + "name": "lastReport", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 3161 + }, + { + "name": "activation", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 3191 + }, + { + "name": "rewards", + "outputs": [{ "type": "address", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 3221 + }, + { + "name": "managementFee", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 3251 + }, + { + "name": "performanceFee", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 3281 + }, + { + "name": "nonces", + "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [{ "type": "address", "name": "arg0" }], + "stateMutability": "view", + "type": "function", + "gas": 3526 + }, + { + "name": "DOMAIN_SEPARATOR", + "outputs": [{ "type": "bytes32", "name": "" }], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": 3341 + } +] diff --git a/subgraphs/eigenpie/abis/Prices/Uniswap/Factory.json b/subgraphs/eigenpie/abis/Prices/Uniswap/Factory.json new file mode 100644 index 0000000000..1b14599d5d --- /dev/null +++ b/subgraphs/eigenpie/abis/Prices/Uniswap/Factory.json @@ -0,0 +1,125 @@ +[ + { + "inputs": [ + { "internalType": "address", "name": "_feeToSetter", "type": "address" } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token0", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token1", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "pair", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "PairCreated", + "type": "event" + }, + { + "constant": true, + "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "name": "allPairs", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "allPairsLength", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "tokenA", "type": "address" }, + { "internalType": "address", "name": "tokenB", "type": "address" } + ], + "name": "createPair", + "outputs": [ + { "internalType": "address", "name": "pair", "type": "address" } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "feeTo", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "feeToSetter", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "address", "name": "", "type": "address" } + ], + "name": "getPair", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "_feeTo", "type": "address" } + ], + "name": "setFeeTo", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "_feeToSetter", "type": "address" } + ], + "name": "setFeeToSetter", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/subgraphs/eigenpie/abis/Prices/Uniswap/Pair.json b/subgraphs/eigenpie/abis/Prices/Uniswap/Pair.json new file mode 100644 index 0000000000..e5efebf418 --- /dev/null +++ b/subgraphs/eigenpie/abis/Prices/Uniswap/Pair.json @@ -0,0 +1,461 @@ +[ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "Burn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "name": "Mint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0In", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1In", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0Out", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1Out", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "Swap", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint112", + "name": "reserve0", + "type": "uint112" + }, + { + "indexed": false, + "internalType": "uint112", + "name": "reserve1", + "type": "uint112" + } + ], + "name": "Sync", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MINIMUM_LIQUIDITY", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "PERMIT_TYPEHASH", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "address", "name": "", "type": "address" } + ], + "name": "allowance", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "value", "type": "uint256" } + ], + "name": "approve", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "balanceOf", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "address", "name": "to", "type": "address" }], + "name": "burn", + "outputs": [ + { "internalType": "uint256", "name": "amount0", "type": "uint256" }, + { "internalType": "uint256", "name": "amount1", "type": "uint256" } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "factory", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getReserves", + "outputs": [ + { "internalType": "uint112", "name": "_reserve0", "type": "uint112" }, + { "internalType": "uint112", "name": "_reserve1", "type": "uint112" }, + { + "internalType": "uint32", + "name": "_blockTimestampLast", + "type": "uint32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "_token0", "type": "address" }, + { "internalType": "address", "name": "_token1", "type": "address" } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "kLast", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "address", "name": "to", "type": "address" }], + "name": "mint", + "outputs": [ + { "internalType": "uint256", "name": "liquidity", "type": "uint256" } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "nonces", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" }, + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "value", "type": "uint256" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" }, + { "internalType": "uint8", "name": "v", "type": "uint8" }, + { "internalType": "bytes32", "name": "r", "type": "bytes32" }, + { "internalType": "bytes32", "name": "s", "type": "bytes32" } + ], + "name": "permit", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "price0CumulativeLast", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "price1CumulativeLast", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "address", "name": "to", "type": "address" }], + "name": "skim", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "uint256", "name": "amount0Out", "type": "uint256" }, + { "internalType": "uint256", "name": "amount1Out", "type": "uint256" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "name": "swap", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "sync", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "token0", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "token1", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "value", "type": "uint256" } + ], + "name": "transfer", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "from", "type": "address" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "value", "type": "uint256" } + ], + "name": "transferFrom", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/subgraphs/eigenpie/abis/Prices/Uniswap/Router.json b/subgraphs/eigenpie/abis/Prices/Uniswap/Router.json new file mode 100644 index 0000000000..efc7f31728 --- /dev/null +++ b/subgraphs/eigenpie/abis/Prices/Uniswap/Router.json @@ -0,0 +1,398 @@ +[ + { + "inputs": [ + { "internalType": "address", "name": "_factory", "type": "address" }, + { "internalType": "address", "name": "_WETH", "type": "address" } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "WETH", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "tokenA", "type": "address" }, + { "internalType": "address", "name": "tokenB", "type": "address" }, + { + "internalType": "uint256", + "name": "amountADesired", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountBDesired", + "type": "uint256" + }, + { "internalType": "uint256", "name": "amountAMin", "type": "uint256" }, + { "internalType": "uint256", "name": "amountBMin", "type": "uint256" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" } + ], + "name": "addLiquidity", + "outputs": [ + { "internalType": "uint256", "name": "amountA", "type": "uint256" }, + { "internalType": "uint256", "name": "amountB", "type": "uint256" }, + { "internalType": "uint256", "name": "liquidity", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "token", "type": "address" }, + { + "internalType": "uint256", + "name": "amountTokenDesired", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountTokenMin", + "type": "uint256" + }, + { "internalType": "uint256", "name": "amountETHMin", "type": "uint256" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" } + ], + "name": "addLiquidityETH", + "outputs": [ + { "internalType": "uint256", "name": "amountToken", "type": "uint256" }, + { "internalType": "uint256", "name": "amountETH", "type": "uint256" }, + { "internalType": "uint256", "name": "liquidity", "type": "uint256" } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "factory", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amountOut", "type": "uint256" }, + { "internalType": "uint256", "name": "reserveIn", "type": "uint256" }, + { "internalType": "uint256", "name": "reserveOut", "type": "uint256" } + ], + "name": "getAmountIn", + "outputs": [ + { "internalType": "uint256", "name": "amountIn", "type": "uint256" } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, + { "internalType": "uint256", "name": "reserveIn", "type": "uint256" }, + { "internalType": "uint256", "name": "reserveOut", "type": "uint256" } + ], + "name": "getAmountOut", + "outputs": [ + { "internalType": "uint256", "name": "amountOut", "type": "uint256" } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amountOut", "type": "uint256" }, + { "internalType": "address[]", "name": "path", "type": "address[]" } + ], + "name": "getAmountsIn", + "outputs": [ + { "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, + { "internalType": "address[]", "name": "path", "type": "address[]" } + ], + "name": "getAmountsOut", + "outputs": [ + { "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amountA", "type": "uint256" }, + { "internalType": "uint256", "name": "reserveA", "type": "uint256" }, + { "internalType": "uint256", "name": "reserveB", "type": "uint256" } + ], + "name": "quote", + "outputs": [ + { "internalType": "uint256", "name": "amountB", "type": "uint256" } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "tokenA", "type": "address" }, + { "internalType": "address", "name": "tokenB", "type": "address" }, + { "internalType": "uint256", "name": "liquidity", "type": "uint256" }, + { "internalType": "uint256", "name": "amountAMin", "type": "uint256" }, + { "internalType": "uint256", "name": "amountBMin", "type": "uint256" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" } + ], + "name": "removeLiquidity", + "outputs": [ + { "internalType": "uint256", "name": "amountA", "type": "uint256" }, + { "internalType": "uint256", "name": "amountB", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "token", "type": "address" }, + { "internalType": "uint256", "name": "liquidity", "type": "uint256" }, + { + "internalType": "uint256", + "name": "amountTokenMin", + "type": "uint256" + }, + { "internalType": "uint256", "name": "amountETHMin", "type": "uint256" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" } + ], + "name": "removeLiquidityETH", + "outputs": [ + { "internalType": "uint256", "name": "amountToken", "type": "uint256" }, + { "internalType": "uint256", "name": "amountETH", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "token", "type": "address" }, + { "internalType": "uint256", "name": "liquidity", "type": "uint256" }, + { + "internalType": "uint256", + "name": "amountTokenMin", + "type": "uint256" + }, + { "internalType": "uint256", "name": "amountETHMin", "type": "uint256" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" } + ], + "name": "removeLiquidityETHSupportingFeeOnTransferTokens", + "outputs": [ + { "internalType": "uint256", "name": "amountETH", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "token", "type": "address" }, + { "internalType": "uint256", "name": "liquidity", "type": "uint256" }, + { + "internalType": "uint256", + "name": "amountTokenMin", + "type": "uint256" + }, + { "internalType": "uint256", "name": "amountETHMin", "type": "uint256" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" }, + { "internalType": "bool", "name": "approveMax", "type": "bool" }, + { "internalType": "uint8", "name": "v", "type": "uint8" }, + { "internalType": "bytes32", "name": "r", "type": "bytes32" }, + { "internalType": "bytes32", "name": "s", "type": "bytes32" } + ], + "name": "removeLiquidityETHWithPermit", + "outputs": [ + { "internalType": "uint256", "name": "amountToken", "type": "uint256" }, + { "internalType": "uint256", "name": "amountETH", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "token", "type": "address" }, + { "internalType": "uint256", "name": "liquidity", "type": "uint256" }, + { + "internalType": "uint256", + "name": "amountTokenMin", + "type": "uint256" + }, + { "internalType": "uint256", "name": "amountETHMin", "type": "uint256" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" }, + { "internalType": "bool", "name": "approveMax", "type": "bool" }, + { "internalType": "uint8", "name": "v", "type": "uint8" }, + { "internalType": "bytes32", "name": "r", "type": "bytes32" }, + { "internalType": "bytes32", "name": "s", "type": "bytes32" } + ], + "name": "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens", + "outputs": [ + { "internalType": "uint256", "name": "amountETH", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "tokenA", "type": "address" }, + { "internalType": "address", "name": "tokenB", "type": "address" }, + { "internalType": "uint256", "name": "liquidity", "type": "uint256" }, + { "internalType": "uint256", "name": "amountAMin", "type": "uint256" }, + { "internalType": "uint256", "name": "amountBMin", "type": "uint256" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" }, + { "internalType": "bool", "name": "approveMax", "type": "bool" }, + { "internalType": "uint8", "name": "v", "type": "uint8" }, + { "internalType": "bytes32", "name": "r", "type": "bytes32" }, + { "internalType": "bytes32", "name": "s", "type": "bytes32" } + ], + "name": "removeLiquidityWithPermit", + "outputs": [ + { "internalType": "uint256", "name": "amountA", "type": "uint256" }, + { "internalType": "uint256", "name": "amountB", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amountOut", "type": "uint256" }, + { "internalType": "address[]", "name": "path", "type": "address[]" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" } + ], + "name": "swapETHForExactTokens", + "outputs": [ + { "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amountOutMin", "type": "uint256" }, + { "internalType": "address[]", "name": "path", "type": "address[]" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" } + ], + "name": "swapExactETHForTokens", + "outputs": [ + { "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amountOutMin", "type": "uint256" }, + { "internalType": "address[]", "name": "path", "type": "address[]" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" } + ], + "name": "swapExactETHForTokensSupportingFeeOnTransferTokens", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, + { "internalType": "uint256", "name": "amountOutMin", "type": "uint256" }, + { "internalType": "address[]", "name": "path", "type": "address[]" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" } + ], + "name": "swapExactTokensForETH", + "outputs": [ + { "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, + { "internalType": "uint256", "name": "amountOutMin", "type": "uint256" }, + { "internalType": "address[]", "name": "path", "type": "address[]" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" } + ], + "name": "swapExactTokensForETHSupportingFeeOnTransferTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, + { "internalType": "uint256", "name": "amountOutMin", "type": "uint256" }, + { "internalType": "address[]", "name": "path", "type": "address[]" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" } + ], + "name": "swapExactTokensForTokens", + "outputs": [ + { "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, + { "internalType": "uint256", "name": "amountOutMin", "type": "uint256" }, + { "internalType": "address[]", "name": "path", "type": "address[]" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" } + ], + "name": "swapExactTokensForTokensSupportingFeeOnTransferTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amountOut", "type": "uint256" }, + { "internalType": "uint256", "name": "amountInMax", "type": "uint256" }, + { "internalType": "address[]", "name": "path", "type": "address[]" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" } + ], + "name": "swapTokensForExactETH", + "outputs": [ + { "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amountOut", "type": "uint256" }, + { "internalType": "uint256", "name": "amountInMax", "type": "uint256" }, + { "internalType": "address[]", "name": "path", "type": "address[]" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" } + ], + "name": "swapTokensForExactTokens", + "outputs": [ + { "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { "stateMutability": "payable", "type": "receive" } +] diff --git a/subgraphs/eigenpie/abis/Prices/YearnLens.json b/subgraphs/eigenpie/abis/Prices/YearnLens.json new file mode 100644 index 0000000000..60a45cc87c --- /dev/null +++ b/subgraphs/eigenpie/abis/Prices/YearnLens.json @@ -0,0 +1,174 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "_managementListAddress", + "type": "address" + }, + { "internalType": "address", "name": "_usdcAddress", "type": "address" } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "tokenAliasAddress", + "type": "address" + } + ], + "name": "TokenAliasAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "TokenAliasRemoved", + "type": "event" + }, + { "stateMutability": "nonpayable", "type": "fallback" }, + { + "inputs": [ + { "internalType": "address", "name": "tokenAddress", "type": "address" }, + { + "internalType": "address", + "name": "tokenAliasAddress", + "type": "address" + } + ], + "name": "addTokenAlias", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenAliasAddress", + "type": "address" + } + ], + "internalType": "struct Oracle.TokenAlias[]", + "name": "_tokenAliases", + "type": "tuple[]" + } + ], + "name": "addTokenAliases", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "calculations", + "outputs": [ + { "internalType": "address[]", "name": "", "type": "address[]" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "tokenAddress", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "getNormalizedValueUsdc", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "tokenAddress", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "uint256", "name": "priceUsdc", "type": "uint256" } + ], + "name": "getNormalizedValueUsdc", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "tokenAddress", "type": "address" } + ], + "name": "getPriceUsdcRecommended", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "managementList", + "outputs": [ + { + "internalType": "contract ManagementList", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "tokenAddress", "type": "address" } + ], + "name": "removeTokenAlias", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "calculationAddresses", + "type": "address[]" + } + ], + "name": "setCalculations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "tokenAliases", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "usdcAddress", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + } +] diff --git a/subgraphs/eigenpie/package-lock.json b/subgraphs/eigenpie/package-lock.json new file mode 100644 index 0000000000..aec5b0da30 --- /dev/null +++ b/subgraphs/eigenpie/package-lock.json @@ -0,0 +1,5367 @@ +{ + "name": "eigenpie", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "eigenpie", + "license": "MIT", + "dependencies": { + "@graphprotocol/graph-cli": "^0.46.1", + "@graphprotocol/graph-ts": "^0.29.3" + }, + "devDependencies": { + "prettier": "^3.2.5" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "dependencies": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "dependencies": { + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@ethersproject/abi": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.7.tgz", + "integrity": "sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw==", + "dependencies": { + "@ethersproject/address": "^5.0.4", + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/constants": "^5.0.4", + "@ethersproject/hash": "^5.0.4", + "@ethersproject/keccak256": "^5.0.3", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.3", + "@ethersproject/strings": "^5.0.4" + } + }, + "node_modules/@ethersproject/abstract-provider": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz", + "integrity": "sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/networks": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/web": "^5.7.0" + } + }, + "node_modules/@ethersproject/abstract-signer": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz", + "integrity": "sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0" + } + }, + "node_modules/@ethersproject/address": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.7.0.tgz", + "integrity": "sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/rlp": "^5.7.0" + } + }, + "node_modules/@ethersproject/base64": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.7.0.tgz", + "integrity": "sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0" + } + }, + "node_modules/@ethersproject/bignumber": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.7.0.tgz", + "integrity": "sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "bn.js": "^5.2.1" + } + }, + "node_modules/@ethersproject/bytes": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.7.0.tgz", + "integrity": "sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/constants": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.7.0.tgz", + "integrity": "sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.7.0" + } + }, + "node_modules/@ethersproject/hash": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.7.0.tgz", + "integrity": "sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/base64": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/keccak256": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.7.0.tgz", + "integrity": "sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "js-sha3": "0.8.0" + } + }, + "node_modules/@ethersproject/logger": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.7.0.tgz", + "integrity": "sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ] + }, + "node_modules/@ethersproject/networks": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.7.1.tgz", + "integrity": "sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/properties": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.7.0.tgz", + "integrity": "sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/rlp": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.7.0.tgz", + "integrity": "sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/signing-key": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.7.0.tgz", + "integrity": "sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "bn.js": "^5.2.1", + "elliptic": "6.5.4", + "hash.js": "1.1.7" + } + }, + "node_modules/@ethersproject/strings": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.7.0.tgz", + "integrity": "sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/transactions": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.7.0.tgz", + "integrity": "sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/rlp": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0" + } + }, + "node_modules/@ethersproject/web": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.7.1.tgz", + "integrity": "sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/base64": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@float-capital/float-subgraph-uncrashable": { + "version": "0.0.0-internal-testing.5", + "resolved": "https://registry.npmjs.org/@float-capital/float-subgraph-uncrashable/-/float-subgraph-uncrashable-0.0.0-internal-testing.5.tgz", + "integrity": "sha512-yZ0H5e3EpAYKokX/AbtplzlvSxEJY7ZfpvQyDzyODkks0hakAAlDG6fQu1SlDJMWorY7bbq1j7fCiFeTWci6TA==", + "dependencies": { + "@rescript/std": "9.0.0", + "graphql": "^16.6.0", + "graphql-import-node": "^0.0.5", + "js-yaml": "^4.1.0" + }, + "bin": { + "uncrashable": "bin/uncrashable" + } + }, + "node_modules/@float-capital/float-subgraph-uncrashable/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/@float-capital/float-subgraph-uncrashable/node_modules/graphql": { + "version": "16.9.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz", + "integrity": "sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==", + "engines": { + "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" + } + }, + "node_modules/@float-capital/float-subgraph-uncrashable/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@graphprotocol/graph-cli": { + "version": "0.46.1", + "resolved": "https://registry.npmjs.org/@graphprotocol/graph-cli/-/graph-cli-0.46.1.tgz", + "integrity": "sha512-594BiH2m9gThP1xdvxguVzvVlOb1KzJyVdh2F4dV78NPfMRFY2fe1nakmadKcewc72VVLXNgfdBu/J4IPfo0eg==", + "dependencies": { + "@float-capital/float-subgraph-uncrashable": "^0.0.0-alpha.4", + "@oclif/core": "2.8.0", + "@whatwg-node/fetch": "^0.8.4", + "assemblyscript": "0.19.23", + "binary-install-raw": "0.0.13", + "chalk": "3.0.0", + "chokidar": "3.5.3", + "debug": "4.3.4", + "docker-compose": "0.23.19", + "dockerode": "2.5.8", + "fs-extra": "9.1.0", + "glob": "9.3.4", + "gluegun": "git+https://github.com/edgeandnode/gluegun.git#v4.3.1-pin-colors-dep", + "graphql": "15.5.0", + "immutable": "4.2.1", + "ipfs-http-client": "55.0.0", + "jayson": "4.0.0", + "js-yaml": "3.14.1", + "prettier": "1.19.1", + "request": "2.88.2", + "semver": "7.3.8", + "sync-request": "6.1.0", + "tmp-promise": "3.0.3", + "web3-eth-abi": "1.7.0", + "which": "2.0.2", + "yaml": "1.10.2" + }, + "bin": { + "graph": "dist/bin.js" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@graphprotocol/graph-cli/node_modules/prettier": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", + "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@graphprotocol/graph-ts": { + "version": "0.29.3", + "resolved": "https://registry.npmjs.org/@graphprotocol/graph-ts/-/graph-ts-0.29.3.tgz", + "integrity": "sha512-FXBLGlunOSwjiUXYEz1J9J/I2D/myldyib/9v0R+gn/NJaYqUkXD39UmIuRxqj9cBzB/FYojHzoHidIG5nYZDw==", + "dependencies": { + "assemblyscript": "0.19.10" + } + }, + "node_modules/@graphprotocol/graph-ts/node_modules/assemblyscript": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/assemblyscript/-/assemblyscript-0.19.10.tgz", + "integrity": "sha512-HavcUBXB3mBTRGJcpvaQjmnmaqKHBGREjSPNsIvnAk2f9dj78y4BkMaSSdvBQYWcDDzsHQjyUC8stICFkD1Odg==", + "dependencies": { + "binaryen": "101.0.0-nightly.20210723", + "long": "^4.0.0" + }, + "bin": { + "asc": "bin/asc", + "asinit": "bin/asinit" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/assemblyscript" + } + }, + "node_modules/@graphprotocol/graph-ts/node_modules/binaryen": { + "version": "101.0.0-nightly.20210723", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-101.0.0-nightly.20210723.tgz", + "integrity": "sha512-eioJNqhHlkguVSbblHOtLqlhtC882SOEPKmNFZaDuz1hzQjolxZ+eu3/kaS10n3sGPONsIZsO7R9fR00UyhEUA==", + "bin": { + "wasm-opt": "bin/wasm-opt" + } + }, + "node_modules/@graphprotocol/graph-ts/node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "node_modules/@ipld/dag-cbor": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@ipld/dag-cbor/-/dag-cbor-7.0.3.tgz", + "integrity": "sha512-1VVh2huHsuohdXC1bGJNE8WR72slZ9XE2T3wbBBq31dm7ZBatmKLLxrB+XAqafxfRFjv08RZmj/W/ZqaM13AuA==", + "dependencies": { + "cborg": "^1.6.0", + "multiformats": "^9.5.4" + } + }, + "node_modules/@ipld/dag-json": { + "version": "8.0.11", + "resolved": "https://registry.npmjs.org/@ipld/dag-json/-/dag-json-8.0.11.tgz", + "integrity": "sha512-Pea7JXeYHTWXRTIhBqBlhw7G53PJ7yta3G/sizGEZyzdeEwhZRr0od5IQ0r2ZxOt1Do+2czddjeEPp+YTxDwCA==", + "dependencies": { + "cborg": "^1.5.4", + "multiformats": "^9.5.4" + } + }, + "node_modules/@ipld/dag-pb": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/@ipld/dag-pb/-/dag-pb-2.1.18.tgz", + "integrity": "sha512-ZBnf2fuX9y3KccADURG5vb9FaOeMjFkCrNysB0PtftME/4iCTjxfaLoNq/IAh5fTqUOMXvryN6Jyka4ZGuMLIg==", + "dependencies": { + "multiformats": "^9.5.4" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@oclif/core": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@oclif/core/-/core-2.8.0.tgz", + "integrity": "sha512-A2wHItFrD/WOw5bJ6Mtv9MD7If0bsKNR0pwEY0me+fo4HSXlJOtgYGqmzb8t8akX3DUUT7XsjPajsoHLkIJyvg==", + "dependencies": { + "@types/cli-progress": "^3.11.0", + "ansi-escapes": "^4.3.2", + "ansi-styles": "^4.3.0", + "cardinal": "^2.1.1", + "chalk": "^4.1.2", + "clean-stack": "^3.0.1", + "cli-progress": "^3.12.0", + "debug": "^4.3.4", + "ejs": "^3.1.8", + "fs-extra": "^9.1.0", + "get-package-type": "^0.1.0", + "globby": "^11.1.0", + "hyperlinker": "^1.0.0", + "indent-string": "^4.0.0", + "is-wsl": "^2.2.0", + "js-yaml": "^3.14.1", + "natural-orderby": "^2.0.3", + "object-treeify": "^1.1.33", + "password-prompt": "^1.1.2", + "semver": "^7.3.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "supports-color": "^8.1.1", + "supports-hyperlinks": "^2.2.0", + "ts-node": "^10.9.1", + "tslib": "^2.5.0", + "widest-line": "^3.1.0", + "wordwrap": "^1.0.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@oclif/core/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@oclif/core/node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@peculiar/asn1-schema": { + "version": "2.3.13", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.13.tgz", + "integrity": "sha512-3Xq3a01WkHRZL8X04Zsfg//mGaA21xlL4tlVn4v2xGT0JStiztATRkMwa5b+f/HXmY2smsiLXYK46Gwgzvfg3g==", + "dependencies": { + "asn1js": "^3.0.5", + "pvtsutils": "^1.3.5", + "tslib": "^2.6.2" + } + }, + "node_modules/@peculiar/json-schema": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz", + "integrity": "sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==", + "dependencies": { + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@peculiar/webcrypto": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.5.0.tgz", + "integrity": "sha512-BRs5XUAwiyCDQMsVA9IDvDa7UBR9gAvPHgugOeGng3YN6vJ9JYonyDc0lNczErgtCWtucjR5N7VtaonboD/ezg==", + "dependencies": { + "@peculiar/asn1-schema": "^2.3.8", + "@peculiar/json-schema": "^1.1.12", + "pvtsutils": "^1.3.5", + "tslib": "^2.6.2", + "webcrypto-core": "^1.8.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, + "node_modules/@rescript/std": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@rescript/std/-/std-9.0.0.tgz", + "integrity": "sha512-zGzFsgtZ44mgL4Xef2gOy1hrRVdrs9mcxCOOKZrIPsmbZW14yTkaF591GXxpQvjXiHtgZ/iA9qLyWH6oSReIxQ==" + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==" + }, + "node_modules/@types/bn.js": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.5.tgz", + "integrity": "sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/cli-progress": { + "version": "3.11.6", + "resolved": "https://registry.npmjs.org/@types/cli-progress/-/cli-progress-3.11.6.tgz", + "integrity": "sha512-cE3+jb9WRlu+uOSAugewNpITJDt1VF8dHOopPO4IABFc3SXYL5WE/+PTz/FCdZRRfIujiWW3n3aMbv1eIGVRWA==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/concat-stream": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.1.tgz", + "integrity": "sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/form-data": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", + "integrity": "sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/long": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" + }, + "node_modules/@types/minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==" + }, + "node_modules/@types/node": { + "version": "22.2.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.2.0.tgz", + "integrity": "sha512-bm6EG6/pCpkxDf/0gDNDdtDILMOHgaQBVOJGdwsqClnxA3xL6jtMv76rLBc006RVMWbmaf0xbmom4Z/5o2nRkQ==", + "dependencies": { + "undici-types": "~6.13.0" + } + }, + "node_modules/@types/parse-json": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", + "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==" + }, + "node_modules/@types/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/qs": { + "version": "6.9.15", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", + "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==" + }, + "node_modules/@types/secp256k1": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.6.tgz", + "integrity": "sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/ws": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", + "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@whatwg-node/events": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.0.3.tgz", + "integrity": "sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA==" + }, + "node_modules/@whatwg-node/fetch": { + "version": "0.8.8", + "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.8.8.tgz", + "integrity": "sha512-CdcjGC2vdKhc13KKxgsc6/616BQ7ooDIgPeTuAiE8qfCnS0mGzcfCOoZXypQSz73nxI+GWc7ZReIAVhxoE1KCg==", + "dependencies": { + "@peculiar/webcrypto": "^1.4.0", + "@whatwg-node/node-fetch": "^0.3.6", + "busboy": "^1.6.0", + "urlpattern-polyfill": "^8.0.0", + "web-streams-polyfill": "^3.2.1" + } + }, + "node_modules/@whatwg-node/node-fetch": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.3.6.tgz", + "integrity": "sha512-w9wKgDO4C95qnXZRwZTfCmLWqyRnooGjcIwG0wADWjw9/HN0p7dtvtgSvItZtUyNteEvgTrd8QojNEqV6DAGTA==", + "dependencies": { + "@whatwg-node/events": "^0.0.3", + "busboy": "^1.6.0", + "fast-querystring": "^1.1.1", + "fast-url-parser": "^1.1.3", + "tslib": "^2.3.1" + } + }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, + "node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", + "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-colors": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", + "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ansicolors": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz", + "integrity": "sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg==" + }, + "node_modules/any-signal": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/any-signal/-/any-signal-2.1.2.tgz", + "integrity": "sha512-B+rDnWasMi/eWcajPcCWSlYc7muXOrcYrqgyzcdKisl2H/WTlQ0gip1KyQfr0ZlxJdsuWCj/LWwQm7fhyhRfIQ==", + "dependencies": { + "abort-controller": "^3.0.0", + "native-abort-controller": "^1.0.3" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/apisauce": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/apisauce/-/apisauce-1.1.5.tgz", + "integrity": "sha512-gKC8qb/bDJsPsnEXLZnXJ7gVx7dh87CEVNeIwv1dvaffnXoh5GHwac5pWR1P2broLiVj/fqFMQvLDDt/RhjiqA==", + "dependencies": { + "axios": "^0.21.2", + "ramda": "^0.25.0" + } + }, + "node_modules/app-module-path": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/app-module-path/-/app-module-path-2.2.0.tgz", + "integrity": "sha512-gkco+qxENJV+8vFcDiiFhuoSvRXb2a/QPqpSoWhVz829VNJfOTnELbBmPmNKFxf3xdNnw4DWCkzkDaavcX/1YQ==" + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" + }, + "node_modules/asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/asn1js": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", + "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", + "dependencies": { + "pvtsutils": "^1.3.2", + "pvutils": "^1.1.3", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/assemblyscript": { + "version": "0.19.23", + "resolved": "https://registry.npmjs.org/assemblyscript/-/assemblyscript-0.19.23.tgz", + "integrity": "sha512-fwOQNZVTMga5KRsfY80g7cpOl4PsFQczMwHzdtgoqLXaYhkhavufKb0sB0l3T1DUxpAufA0KNhlbpuuhZUwxMA==", + "dependencies": { + "binaryen": "102.0.0-nightly.20211028", + "long": "^5.2.0", + "source-map-support": "^0.5.20" + }, + "bin": { + "asc": "bin/asc", + "asinit": "bin/asinit" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/assemblyscript" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/async": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.1.tgz", + "integrity": "sha512-u5w79Rd7SU4JaIlA/zFqG+gOiuq25q5VLyZ8E+ijJeILuTxVzZgp2CaGw/UTw6pXYN9XMO9yiqj/nEHmhTG5CA==" + }, + "node_modules/axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "dependencies": { + "follow-redirects": "^1.14.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/base-x": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", + "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/binary-install-raw": { + "version": "0.0.13", + "resolved": "https://registry.npmjs.org/binary-install-raw/-/binary-install-raw-0.0.13.tgz", + "integrity": "sha512-v7ms6N/H7iciuk6QInon3/n2mu7oRX+6knJ9xFPsJ3rQePgAqcR3CRTwUheFd8SLbiq4LL7Z4G/44L9zscdt9A==", + "dependencies": { + "axios": "^0.21.1", + "rimraf": "^3.0.2", + "tar": "^6.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/binaryen": { + "version": "102.0.0-nightly.20211028", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-102.0.0-nightly.20211028.tgz", + "integrity": "sha512-GCJBVB5exbxzzvyt8MGDv/MeUjs6gkXDvf4xOIItRBptYl0Tz5sm1o/uG95YK0L0VeG5ajDu3hRtkBP2kzqC5w==", + "bin": { + "wasm-opt": "bin/wasm-opt" + } + }, + "node_modules/bl": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", + "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", + "dependencies": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/blakejs": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", + "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==" + }, + "node_modules/blob-to-it": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/blob-to-it/-/blob-to-it-1.0.4.tgz", + "integrity": "sha512-iCmk0W4NdbrWgRRuxOriU8aM5ijeVLI61Zulsmg/lUHNr7pYjoj+U77opLefNagevtrrbMt3JQ5Qip7ar178kA==", + "dependencies": { + "browser-readablestream-to-it": "^1.0.3" + } + }, + "node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" + }, + "node_modules/browser-readablestream-to-it": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/browser-readablestream-to-it/-/browser-readablestream-to-it-1.0.3.tgz", + "integrity": "sha512-+12sHB+Br8HIh6VAMVEG5r3UXCyESIgDW7kzk3BjIXa43DVqVwL7GC5TW3jeh+72dtcH99pPVpw0X8i0jt+/kw==" + }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dependencies": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "node_modules/buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" + }, + "node_modules/buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==" + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==" + }, + "node_modules/busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "dependencies": { + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/cardinal": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-2.1.1.tgz", + "integrity": "sha512-JSr5eOgoEymtYHBjNWyjrMqet9Am2miJhlfKNdqLp6zoeAh0KN5dRAcxlecj5mAJrmQomgiOBj35xHLrFjqBpw==", + "dependencies": { + "ansicolors": "~0.3.2", + "redeyed": "~2.1.0" + }, + "bin": { + "cdl": "bin/cdl.js" + } + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" + }, + "node_modules/cborg": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/cborg/-/cborg-1.10.2.tgz", + "integrity": "sha512-b3tFPA9pUr2zCUiCfRd2+wok2/LBSNUMKOuRRok+WlvvAgEt/PlbgPTsZUcwCOs53IJvLgTp0eotwtosE6njug==", + "bin": { + "cborg": "cli.js" + } + }, + "node_modules/chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "engines": { + "node": ">=10" + } + }, + "node_modules/cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/clean-stack": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-3.0.1.tgz", + "integrity": "sha512-lR9wNiMRcVQjSB3a7xXGLuz4cr4wJuuXlaAEbRutGowQTmlp7R72/DOgN21e8jdwblMWl9UOJMJXarX94pzKdg==", + "dependencies": { + "escape-string-regexp": "4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-progress": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/cli-progress/-/cli-progress-3.12.0.tgz", + "integrity": "sha512-tRkV3HJ1ASwm19THiiLIXLO7Im7wlTuKnvkYaTkyoAPefqjNg7W7DHKUlGRxy9vxDvbyCYQkQozvptuMkGCg8A==", + "dependencies": { + "string-width": "^4.2.3" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-table3": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", + "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", + "dependencies": { + "object-assign": "^4.1.0", + "string-width": "^2.1.1" + }, + "engines": { + "node": ">=6" + }, + "optionalDependencies": { + "colors": "^1.1.2" + } + }, + "node_modules/cli-table3/node_modules/ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/cli-table3/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "engines": { + "node": ">=4" + } + }, + "node_modules/cli-table3/node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cli-table3/node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/colors": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz", + "integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==", + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "engines": [ + "node >= 0.8" + ], + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/cosmiconfig": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", + "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", + "dependencies": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.1.0", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.7.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/delay": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", + "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/dns-over-http-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/dns-over-http-resolver/-/dns-over-http-resolver-1.2.3.tgz", + "integrity": "sha512-miDiVSI6KSNbi4SVifzO/reD8rMnxgrlnkrlkugOLQpWQTe2qMdHsZp5DmfKjxNE+/T3VAAYLQUZMv9SMr6+AA==", + "dependencies": { + "debug": "^4.3.1", + "native-fetch": "^3.0.0", + "receptacle": "^1.3.2" + } + }, + "node_modules/docker-compose": { + "version": "0.23.19", + "resolved": "https://registry.npmjs.org/docker-compose/-/docker-compose-0.23.19.tgz", + "integrity": "sha512-v5vNLIdUqwj4my80wxFDkNH+4S85zsRuH29SO7dCWVWPCMt/ohZBsGN6g6KXWifT0pzQ7uOxqEKCYCDPJ8Vz4g==", + "dependencies": { + "yaml": "^1.10.2" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/docker-modem": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/docker-modem/-/docker-modem-1.0.9.tgz", + "integrity": "sha512-lVjqCSCIAUDZPAZIeyM125HXfNvOmYYInciphNrLrylUtKyW66meAjSPXWchKVzoIYZx69TPnAepVSSkeawoIw==", + "dependencies": { + "debug": "^3.2.6", + "JSONStream": "1.3.2", + "readable-stream": "~1.0.26-4", + "split-ca": "^1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/docker-modem/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/docker-modem/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" + }, + "node_modules/docker-modem/node_modules/readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/docker-modem/node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" + }, + "node_modules/dockerode": { + "version": "2.5.8", + "resolved": "https://registry.npmjs.org/dockerode/-/dockerode-2.5.8.tgz", + "integrity": "sha512-+7iOUYBeDTScmOmQqpUYQaE7F4vvIt6+gIZNHWhqAQEI887tiPFB9OvXI/HzQYqfUNvukMK+9myLW63oTJPZpw==", + "dependencies": { + "concat-stream": "~1.6.2", + "docker-modem": "^1.0.8", + "tar-fs": "~1.16.3" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/electron-fetch": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/electron-fetch/-/electron-fetch-1.9.1.tgz", + "integrity": "sha512-M9qw6oUILGVrcENMSRRefE1MbHPIz0h79EKIeJWK9v563aT9Qkh8aEHPO1H5vi970wPirNY+jO9OpFoLiMsMGA==", + "dependencies": { + "encoding": "^0.1.13" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/enquirer": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.4.tgz", + "integrity": "sha512-pkYrrDZumL2VS6VBGDhqbajCM2xpkUNLuKfGPjfKaSIBKYopQbqEFyrOkRMIb2HDR/rO1kGhEt/5twBwtzKBXw==", + "dependencies": { + "ansi-colors": "^3.2.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/err-code": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-3.0.1.tgz", + "integrity": "sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA==" + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, + "node_modules/es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==", + "dependencies": { + "es6-promise": "^4.0.3" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ethereum-bloom-filters": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.2.0.tgz", + "integrity": "sha512-28hyiE7HVsWubqhpVLVmZXFd4ITeHi+BUu05o9isf0GUpMtzBUi+8/gFrGaGYzvGAJQmJ3JKj77Mk9G98T84rA==", + "dependencies": { + "@noble/hashes": "^1.4.0" + } + }, + "node_modules/ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dependencies": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "node_modules/ethereumjs-util": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", + "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", + "dependencies": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "rlp": "^2.2.4" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/ethjs-unit": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", + "integrity": "sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==", + "dependencies": { + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/ethjs-unit/node_modules/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==" + }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/execa": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-3.4.0.tgz", + "integrity": "sha512-r9vdGQk4bmCuK1yKQu1KTwcT2zwfWdbdaXfCtAh+5nU/4fSX+JAb7vZGvI5naJrQlvONrEB20jeruESI69530g==", + "dependencies": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "p-finally": "^2.0.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": "^8.12.0 || >=9.7.0" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==", + "engines": { + "node": "> 0.1.90" + } + }, + "node_modules/fast-decode-uri-component": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fast-decode-uri-component/-/fast-decode-uri-component-1.0.1.tgz", + "integrity": "sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==" + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "node_modules/fast-querystring": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/fast-querystring/-/fast-querystring-1.1.2.tgz", + "integrity": "sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg==", + "dependencies": { + "fast-decode-uri-component": "^1.0.1" + } + }, + "node_modules/fast-url-parser": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", + "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", + "dependencies": { + "punycode": "^1.3.2" + } + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/fs-jetpack": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/fs-jetpack/-/fs-jetpack-2.4.0.tgz", + "integrity": "sha512-S/o9Dd7K9A7gicVU32eT8G0kHcmSu0rCVdP79P0MWInKFb8XpTc8Syhoo66k9no+HDshtlh4pUJTws8X+8fdFQ==", + "dependencies": { + "minimatch": "^3.0.2", + "rimraf": "^2.6.3" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fs-jetpack/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/fs-jetpack/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fs-jetpack/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/fs-jetpack/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-iterator": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-iterator/-/get-iterator-1.0.2.tgz", + "integrity": "sha512-v+dm9bNVfOYsY1OrhaCrmyOcYoSeVvbt+hHZ0Au+T+p1y+0Uyj9aMaGIeUTT6xdpRbWzDeYKvfOslPhggQMcsg==" + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==", + "engines": { + "node": ">=4" + } + }, + "node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/glob": { + "version": "9.3.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.4.tgz", + "integrity": "sha512-qaSc49hojMOv1EPM4EuyITjDSgSKI0rthoHnvE81tcOi1SCVndHko7auqxdQ14eiQG2NDBJBE86+2xIrbIvrbA==", + "dependencies": { + "fs.realpath": "^1.0.0", + "minimatch": "^8.0.2", + "minipass": "^4.2.4", + "path-scurry": "^1.6.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gluegun": { + "version": "4.3.1", + "resolved": "git+ssh://git@github.com/edgeandnode/gluegun.git#b34b9003d7bf556836da41b57ef36eb21570620a", + "dependencies": { + "apisauce": "^1.0.1", + "app-module-path": "^2.2.0", + "cli-table3": "~0.5.0", + "colors": "1.3.3", + "cosmiconfig": "6.0.0", + "cross-spawn": "^7.0.0", + "ejs": "^2.6.1", + "enquirer": "2.3.4", + "execa": "^3.0.0", + "fs-jetpack": "^2.2.2", + "lodash.camelcase": "^4.3.0", + "lodash.kebabcase": "^4.1.1", + "lodash.lowercase": "^4.3.0", + "lodash.lowerfirst": "^4.3.1", + "lodash.pad": "^4.5.1", + "lodash.padend": "^4.6.1", + "lodash.padstart": "^4.6.1", + "lodash.repeat": "^4.1.0", + "lodash.snakecase": "^4.1.1", + "lodash.startcase": "^4.4.0", + "lodash.trim": "^4.5.1", + "lodash.trimend": "^4.5.1", + "lodash.trimstart": "^4.5.1", + "lodash.uppercase": "^4.3.0", + "lodash.upperfirst": "^4.3.1", + "ora": "^4.0.0", + "pluralize": "^8.0.0", + "ramdasauce": "^2.1.0", + "semver": "^7.0.0", + "which": "^2.0.0", + "yargs-parser": "^16.1.0" + }, + "bin": { + "gluegun": "bin/gluegun" + } + }, + "node_modules/gluegun/node_modules/ejs": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.7.4.tgz", + "integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==", + "hasInstallScript": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + }, + "node_modules/graphql": { + "version": "15.5.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-15.5.0.tgz", + "integrity": "sha512-OmaM7y0kaK31NKG31q4YbD2beNYa6jBBKtMFT6gLYJljHLJr42IqJ8KX08u3Li/0ifzTU5HjmoOOrwa5BRLeDA==", + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/graphql-import-node": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/graphql-import-node/-/graphql-import-node-0.0.5.tgz", + "integrity": "sha512-OXbou9fqh9/Lm7vwXT0XoRN9J5+WCYKnbiTalgFDvkQERITRmcfncZs6aVABedd5B85yQU5EULS4a5pnbpuI0Q==", + "peerDependencies": { + "graphql": "*" + } + }, + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", + "dependencies": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hash-base/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/hash-base/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/http-basic": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", + "integrity": "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==", + "dependencies": { + "caseless": "^0.12.0", + "concat-stream": "^1.6.2", + "http-response-object": "^3.0.1", + "parse-cache-control": "^1.0.1" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/http-response-object": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", + "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==", + "dependencies": { + "@types/node": "^10.0.3" + } + }, + "node_modules/http-response-object/node_modules/@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" + }, + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "engines": { + "node": ">=8.12.0" + } + }, + "node_modules/hyperlinker": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/hyperlinker/-/hyperlinker-1.0.0.tgz", + "integrity": "sha512-Ty8UblRWFEcfSuIaajM34LdPXIhbs1ajEX/BBPv24J+enSVaEVY63xQ6lTO9VRYS5LAoghIG0IDJ+p+IPzKUQQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/immutable": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.2.1.tgz", + "integrity": "sha512-7WYV7Q5BTs0nlQm7tl92rDYYoyELLKHoDMBKhrxEoiV4mrfVdRz8hzPiYOzH7yWjzoVEamxRuAqhxL2PLRwZYQ==" + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/interface-datastore": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-6.1.1.tgz", + "integrity": "sha512-AmCS+9CT34pp2u0QQVXjKztkuq3y5T+BIciuiHDDtDZucZD8VudosnSdUyXJV6IsRkN5jc4RFDhCk1O6Q3Gxjg==", + "dependencies": { + "interface-store": "^2.0.2", + "nanoid": "^3.0.2", + "uint8arrays": "^3.0.0" + } + }, + "node_modules/interface-store": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-2.0.2.tgz", + "integrity": "sha512-rScRlhDcz6k199EkHqT8NpM87ebN89ICOzILoBHgaG36/WX50N32BnU/kpZgCGPLhARRAWUUX5/cyaIjt7Kipg==" + }, + "node_modules/ip-regex": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz", + "integrity": "sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ipfs-core-types": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/ipfs-core-types/-/ipfs-core-types-0.9.0.tgz", + "integrity": "sha512-VJ8vJSHvI1Zm7/SxsZo03T+zzpsg8pkgiIi5hfwSJlsrJ1E2v68QPlnLshGHUSYw89Oxq0IbETYl2pGTFHTWfg==", + "deprecated": "js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details", + "dependencies": { + "interface-datastore": "^6.0.2", + "multiaddr": "^10.0.0", + "multiformats": "^9.4.13" + } + }, + "node_modules/ipfs-core-utils": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/ipfs-core-utils/-/ipfs-core-utils-0.13.0.tgz", + "integrity": "sha512-HP5EafxU4/dLW3U13CFsgqVO5Ika8N4sRSIb/dTg16NjLOozMH31TXV0Grtu2ZWo1T10ahTzMvrfT5f4mhioXw==", + "deprecated": "js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details", + "dependencies": { + "any-signal": "^2.1.2", + "blob-to-it": "^1.0.1", + "browser-readablestream-to-it": "^1.0.1", + "debug": "^4.1.1", + "err-code": "^3.0.1", + "ipfs-core-types": "^0.9.0", + "ipfs-unixfs": "^6.0.3", + "ipfs-utils": "^9.0.2", + "it-all": "^1.0.4", + "it-map": "^1.0.4", + "it-peekable": "^1.0.2", + "it-to-stream": "^1.0.0", + "merge-options": "^3.0.4", + "multiaddr": "^10.0.0", + "multiaddr-to-uri": "^8.0.0", + "multiformats": "^9.4.13", + "nanoid": "^3.1.23", + "parse-duration": "^1.0.0", + "timeout-abort-controller": "^2.0.0", + "uint8arrays": "^3.0.0" + } + }, + "node_modules/ipfs-http-client": { + "version": "55.0.0", + "resolved": "https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-55.0.0.tgz", + "integrity": "sha512-GpvEs7C7WL9M6fN/kZbjeh4Y8YN7rY8b18tVWZnKxRsVwM25cIFrRI8CwNt3Ugin9yShieI3i9sPyzYGMrLNnQ==", + "deprecated": "js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details", + "dependencies": { + "@ipld/dag-cbor": "^7.0.0", + "@ipld/dag-json": "^8.0.1", + "@ipld/dag-pb": "^2.1.3", + "abort-controller": "^3.0.0", + "any-signal": "^2.1.2", + "debug": "^4.1.1", + "err-code": "^3.0.1", + "ipfs-core-types": "^0.9.0", + "ipfs-core-utils": "^0.13.0", + "ipfs-utils": "^9.0.2", + "it-first": "^1.0.6", + "it-last": "^1.0.4", + "merge-options": "^3.0.4", + "multiaddr": "^10.0.0", + "multiformats": "^9.4.13", + "native-abort-controller": "^1.0.3", + "parse-duration": "^1.0.0", + "stream-to-it": "^0.2.2", + "uint8arrays": "^3.0.0" + }, + "engines": { + "node": ">=14.0.0", + "npm": ">=3.0.0" + } + }, + "node_modules/ipfs-unixfs": { + "version": "6.0.9", + "resolved": "https://registry.npmjs.org/ipfs-unixfs/-/ipfs-unixfs-6.0.9.tgz", + "integrity": "sha512-0DQ7p0/9dRB6XCb0mVCTli33GzIzSVx5udpJuVM47tGcD+W+Bl4LsnoLswd3ggNnNEakMv1FdoFITiEnchXDqQ==", + "dependencies": { + "err-code": "^3.0.1", + "protobufjs": "^6.10.2" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/ipfs-utils": { + "version": "9.0.14", + "resolved": "https://registry.npmjs.org/ipfs-utils/-/ipfs-utils-9.0.14.tgz", + "integrity": "sha512-zIaiEGX18QATxgaS0/EOQNoo33W0islREABAcxXE8n7y2MGAlB+hdsxXn4J0hGZge8IqVQhW8sWIb+oJz2yEvg==", + "dependencies": { + "any-signal": "^3.0.0", + "browser-readablestream-to-it": "^1.0.0", + "buffer": "^6.0.1", + "electron-fetch": "^1.7.2", + "err-code": "^3.0.1", + "is-electron": "^2.2.0", + "iso-url": "^1.1.5", + "it-all": "^1.0.4", + "it-glob": "^1.0.1", + "it-to-stream": "^1.0.0", + "merge-options": "^3.0.4", + "nanoid": "^3.1.20", + "native-fetch": "^3.0.0", + "node-fetch": "^2.6.8", + "react-native-fetch-api": "^3.0.0", + "stream-to-it": "^0.2.2" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/ipfs-utils/node_modules/any-signal": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/any-signal/-/any-signal-3.0.1.tgz", + "integrity": "sha512-xgZgJtKEa9YmDqXodIgl7Fl1C8yNXr8w6gXjqK3LW4GcEiYT+6AQfJSE/8SPsEpLLmcvbv8YU+qet94UewHxqg==" + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-electron": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.2.tgz", + "integrity": "sha512-FO/Rhvz5tuw4MCWkpMzHFKWD2LsfHzIb7i6MdPYZ/KW7AlxawyLkqdy+jPZP1WubqEADE3O4FUENlJHDfQASRg==" + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==", + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-ip": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-ip/-/is-ip-3.1.0.tgz", + "integrity": "sha512-35vd5necO7IitFPjd/YBeqwWnyDWbuLH9ZXQdMfDA8TEo7pv5X8yfrvVO3xbJbLUlERCMvf6X0hTUamQxCYJ9Q==", + "dependencies": { + "ip-regex": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "node_modules/iso-url": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/iso-url/-/iso-url-1.2.1.tgz", + "integrity": "sha512-9JPDgCN4B7QPkLtYAAOrEuAWvP9rWvR5offAr0/SeF046wIkglqH3VXgYYP6NcsKslH80UIVgmPqNe3j7tG2ng==", + "engines": { + "node": ">=12" + } + }, + "node_modules/isomorphic-ws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", + "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" + }, + "node_modules/it-all": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/it-all/-/it-all-1.0.6.tgz", + "integrity": "sha512-3cmCc6Heqe3uWi3CVM/k51fa/XbMFpQVzFoDsV0IZNHSQDyAXl3c4MjHkFX5kF3922OGj7Myv1nSEUgRtcuM1A==" + }, + "node_modules/it-first": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/it-first/-/it-first-1.0.7.tgz", + "integrity": "sha512-nvJKZoBpZD/6Rtde6FXqwDqDZGF1sCADmr2Zoc0hZsIvnE449gRFnGctxDf09Bzc/FWnHXAdaHVIetY6lrE0/g==" + }, + "node_modules/it-glob": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/it-glob/-/it-glob-1.0.2.tgz", + "integrity": "sha512-Ch2Dzhw4URfB9L/0ZHyY+uqOnKvBNeS/SMcRiPmJfpHiM0TsUZn+GkpcZxAoF3dJVdPm/PuIk3A4wlV7SUo23Q==", + "dependencies": { + "@types/minimatch": "^3.0.4", + "minimatch": "^3.0.4" + } + }, + "node_modules/it-glob/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/it-glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/it-last": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/it-last/-/it-last-1.0.6.tgz", + "integrity": "sha512-aFGeibeiX/lM4bX3JY0OkVCFkAw8+n9lkukkLNivbJRvNz8lI3YXv5xcqhFUV2lDJiraEK3OXRDbGuevnnR67Q==" + }, + "node_modules/it-map": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/it-map/-/it-map-1.0.6.tgz", + "integrity": "sha512-XT4/RM6UHIFG9IobGlQPFQUrlEKkU4eBUFG3qhWhfAdh1JfF2x11ShCrKCdmZ0OiZppPfoLuzcfA4cey6q3UAQ==" + }, + "node_modules/it-peekable": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-1.0.3.tgz", + "integrity": "sha512-5+8zemFS+wSfIkSZyf0Zh5kNN+iGyccN02914BY4w/Dj+uoFEoPSvj5vaWn8pNZJNSxzjW0zHRxC3LUb2KWJTQ==" + }, + "node_modules/it-to-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/it-to-stream/-/it-to-stream-1.0.0.tgz", + "integrity": "sha512-pLULMZMAB/+vbdvbZtebC0nWBTbG581lk6w8P7DfIIIKUfa8FbY7Oi0FxZcFPbxvISs7A9E+cMpLDBc1XhpAOA==", + "dependencies": { + "buffer": "^6.0.3", + "fast-fifo": "^1.0.0", + "get-iterator": "^1.0.2", + "p-defer": "^3.0.0", + "p-fifo": "^1.0.0", + "readable-stream": "^3.6.0" + } + }, + "node_modules/it-to-stream/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jake": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jake/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/jake/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jake/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/jake/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jayson": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jayson/-/jayson-4.0.0.tgz", + "integrity": "sha512-v2RNpDCMu45fnLzSk47vx7I+QUaOsox6f5X0CUlabAFwxoP+8MfAY0NQRFwOEYXIxm8Ih5y6OaEa5KYiQMkyAA==", + "dependencies": { + "@types/connect": "^3.4.33", + "@types/node": "^12.12.54", + "@types/ws": "^7.4.4", + "commander": "^2.20.3", + "delay": "^5.0.0", + "es6-promisify": "^5.0.0", + "eyes": "^0.1.8", + "isomorphic-ws": "^4.0.1", + "json-stringify-safe": "^5.0.1", + "JSONStream": "^1.3.5", + "uuid": "^8.3.2", + "ws": "^7.4.5" + }, + "bin": { + "jayson": "bin/jayson.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jayson/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" + }, + "node_modules/jayson/node_modules/JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dependencies": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "bin": { + "JSONStream": "bin.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "engines": [ + "node >= 0.2.0" + ] + }, + "node_modules/JSONStream": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz", + "integrity": "sha512-mn0KSip7N4e0UDPZHnqDsHECo5uGQrixQKnAskOM1BIB8hd7QKbd6il8IPRPudPHOeHiECoCFqhyMaRO9+nWyA==", + "dependencies": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "bin": { + "JSONStream": "bin.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/keccak": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.4.tgz", + "integrity": "sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==", + "hasInstallScript": true, + "dependencies": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/keccak/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" + }, + "node_modules/lodash.kebabcase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", + "integrity": "sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==" + }, + "node_modules/lodash.lowercase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.lowercase/-/lodash.lowercase-4.3.0.tgz", + "integrity": "sha512-UcvP1IZYyDKyEL64mmrwoA1AbFu5ahojhTtkOUr1K9dbuxzS9ev8i4TxMMGCqRC9TE8uDaSoufNAXxRPNTseVA==" + }, + "node_modules/lodash.lowerfirst": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/lodash.lowerfirst/-/lodash.lowerfirst-4.3.1.tgz", + "integrity": "sha512-UUKX7VhP1/JL54NXg2aq/E1Sfnjjes8fNYTNkPU8ZmsaVeBvPHKdbNaN79Re5XRL01u6wbq3j0cbYZj71Fcu5w==" + }, + "node_modules/lodash.pad": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-4.5.1.tgz", + "integrity": "sha512-mvUHifnLqM+03YNzeTBS1/Gr6JRFjd3rRx88FHWUvamVaT9k2O/kXha3yBSOwB9/DTQrSTLJNHvLBBt2FdX7Mg==" + }, + "node_modules/lodash.padend": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.6.1.tgz", + "integrity": "sha512-sOQs2aqGpbl27tmCS1QNZA09Uqp01ZzWfDUoD+xzTii0E7dSQfRKcRetFwa+uXaxaqL+TKm7CgD2JdKP7aZBSw==" + }, + "node_modules/lodash.padstart": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.6.1.tgz", + "integrity": "sha512-sW73O6S8+Tg66eY56DBk85aQzzUJDtpoXFBgELMd5P/SotAguo+1kYO6RuYgXxA4HJH3LFTFPASX6ET6bjfriw==" + }, + "node_modules/lodash.repeat": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/lodash.repeat/-/lodash.repeat-4.1.0.tgz", + "integrity": "sha512-eWsgQW89IewS95ZOcr15HHCX6FVDxq3f2PNUIng3fyzsPev9imFQxIYdFZ6crl8L56UR6ZlGDLcEb3RZsCSSqw==" + }, + "node_modules/lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==" + }, + "node_modules/lodash.startcase": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", + "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==" + }, + "node_modules/lodash.trim": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/lodash.trim/-/lodash.trim-4.5.1.tgz", + "integrity": "sha512-nJAlRl/K+eiOehWKDzoBVrSMhK0K3A3YQsUNXHQa5yIrKBAhsZgSu3KoAFoFT+mEgiyBHddZ0pRk1ITpIp90Wg==" + }, + "node_modules/lodash.trimend": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/lodash.trimend/-/lodash.trimend-4.5.1.tgz", + "integrity": "sha512-lsD+k73XztDsMBKPKvzHXRKFNMohTjoTKIIo4ADLn5dA65LZ1BqlAvSXhR2rPEC3BgAUQnzMnorqDtqn2z4IHA==" + }, + "node_modules/lodash.trimstart": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/lodash.trimstart/-/lodash.trimstart-4.5.1.tgz", + "integrity": "sha512-b/+D6La8tU76L/61/aN0jULWHkT0EeJCmVstPBn/K9MtD2qBW83AsBNrr63dKuWYwVMO7ucv13QNO/Ek/2RKaQ==" + }, + "node_modules/lodash.uppercase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.uppercase/-/lodash.uppercase-4.3.0.tgz", + "integrity": "sha512-+Nbnxkj7s8K5U8z6KnEYPGUOGp3woZbB7Ecs7v3LkkjLQSm2kP9SKIILitN1ktn2mB/tmM9oSlku06I+/lH7QA==" + }, + "node_modules/lodash.upperfirst": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz", + "integrity": "sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==" + }, + "node_modules/log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "dependencies": { + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-symbols/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/log-symbols/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/log-symbols/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/log-symbols/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/log-symbols/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/merge-options": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-3.0.4.tgz", + "integrity": "sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ==", + "dependencies": { + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" + }, + "node_modules/minimatch": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", + "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", + "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/multiaddr": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-10.0.1.tgz", + "integrity": "sha512-G5upNcGzEGuTHkzxezPrrD6CaIHR9uo+7MwqhNVcXTs33IInon4y7nMiGxl2CY5hG7chvYQUQhz5V52/Qe3cbg==", + "deprecated": "This module is deprecated, please upgrade to @multiformats/multiaddr", + "dependencies": { + "dns-over-http-resolver": "^1.2.3", + "err-code": "^3.0.1", + "is-ip": "^3.1.0", + "multiformats": "^9.4.5", + "uint8arrays": "^3.0.0", + "varint": "^6.0.0" + } + }, + "node_modules/multiaddr-to-uri": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/multiaddr-to-uri/-/multiaddr-to-uri-8.0.0.tgz", + "integrity": "sha512-dq4p/vsOOUdVEd1J1gl+R2GFrXJQH8yjLtz4hodqdVbieg39LvBOdMQRdQnfbg5LSM/q1BYNVf5CBbwZFFqBgA==", + "deprecated": "This module is deprecated, please upgrade to @multiformats/multiaddr-to-uri", + "dependencies": { + "multiaddr": "^10.0.0" + } + }, + "node_modules/multiformats": { + "version": "9.9.0", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.9.0.tgz", + "integrity": "sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==" + }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/native-abort-controller": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/native-abort-controller/-/native-abort-controller-1.0.4.tgz", + "integrity": "sha512-zp8yev7nxczDJMoP6pDxyD20IU0T22eX8VwN2ztDccKvSZhRaV33yP1BGwKSZfXuqWUzsXopVFjBdau9OOAwMQ==", + "peerDependencies": { + "abort-controller": "*" + } + }, + "node_modules/native-fetch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/native-fetch/-/native-fetch-3.0.0.tgz", + "integrity": "sha512-G3Z7vx0IFb/FQ4JxvtqGABsOTIqRWvgQz6e+erkB+JJD6LrszQtMozEHI4EkmgZQvnGHrpLVzUWk7t4sJCIkVw==", + "peerDependencies": { + "node-fetch": "*" + } + }, + "node_modules/natural-orderby": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/natural-orderby/-/natural-orderby-2.0.3.tgz", + "integrity": "sha512-p7KTHxU0CUrcOXe62Zfrb5Z13nLvPhSWR/so3kFulUQU0sgUll2Z0LwpsLN351eOOD+hRGu/F1g+6xDfPeD++Q==", + "engines": { + "node": "*" + } + }, + "node_modules/node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.1.tgz", + "integrity": "sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/number-to-bn": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", + "integrity": "sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig==", + "dependencies": { + "bn.js": "4.11.6", + "strip-hex-prefix": "1.0.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/number-to-bn/node_modules/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==" + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "engines": { + "node": "*" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-treeify": { + "version": "1.1.33", + "resolved": "https://registry.npmjs.org/object-treeify/-/object-treeify-1.1.33.tgz", + "integrity": "sha512-EFVjAYfzWqWsBMRHPMAXLCDIJnpMhdWAqR7xG6M6a2cs6PMFpl/+Z20w9zDW4vkxOFfddegBKq9Rehd0bxWE7A==", + "engines": { + "node": ">= 10" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-4.1.1.tgz", + "integrity": "sha512-sjYP8QyVWBpBZWD6Vr1M/KwknSw6kJOz41tvGMlwWeClHBtYKTbHMki1PsLZnxKpXMPbTKv9b3pjQu3REib96A==", + "dependencies": { + "chalk": "^3.0.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.2.0", + "is-interactive": "^1.0.0", + "log-symbols": "^3.0.0", + "mute-stream": "0.0.8", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-defer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-3.0.0.tgz", + "integrity": "sha512-ugZxsxmtTln604yeYd29EGrNhazN2lywetzpKhfmQjW/VJmhpDmWbiX+h0zL8V91R0UXkhb3KtPmyq9PZw3aYw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/p-fifo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-fifo/-/p-fifo-1.0.0.tgz", + "integrity": "sha512-IjoCxXW48tqdtDFz6fqo5q1UfFVjjVZe8TC1QRflvNUJtNfCUhxOUw6MOVZhDPjqhSzc26xKdugsO17gmzd5+A==", + "dependencies": { + "fast-fifo": "^1.0.0", + "p-defer": "^3.0.0" + } + }, + "node_modules/p-finally": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz", + "integrity": "sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-cache-control": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", + "integrity": "sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==" + }, + "node_modules/parse-duration": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/parse-duration/-/parse-duration-1.1.0.tgz", + "integrity": "sha512-z6t9dvSJYaPoQq7quMzdEagSFtpGu+utzHqqxmpVWNNZRIXnvqyCvn9XsTdh7c/w0Bqmdz3RB3YnRaKtpRtEXQ==" + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/password-prompt": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/password-prompt/-/password-prompt-1.1.3.tgz", + "integrity": "sha512-HkrjG2aJlvF0t2BMH0e2LB/EHf3Lcq3fNMzy4GYHcQblAvOl+QQji1Lx7WRBMqpVK8p+KR7bCg7oqAMXtdgqyw==", + "dependencies": { + "ansi-escapes": "^4.3.2", + "cross-spawn": "^7.0.3" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "dependencies": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" + }, + "node_modules/picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/promise": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz", + "integrity": "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==", + "dependencies": { + "asap": "~2.0.6" + } + }, + "node_modules/protobufjs": { + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": ">=13.7.0", + "long": "^4.0.0" + }, + "bin": { + "pbjs": "bin/pbjs", + "pbts": "bin/pbts" + } + }, + "node_modules/protobufjs/node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "node_modules/psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==" + }, + "node_modules/pvtsutils": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.5.tgz", + "integrity": "sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==", + "dependencies": { + "tslib": "^2.6.1" + } + }, + "node_modules/pvutils": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", + "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/ramda": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.25.0.tgz", + "integrity": "sha512-GXpfrYVPwx3K7RQ6aYT8KPS8XViSXUVJT1ONhoKPE9VAleW42YE+U+8VEyGWt41EnEQW7gwecYJriTI0pKoecQ==" + }, + "node_modules/ramdasauce": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ramdasauce/-/ramdasauce-2.1.3.tgz", + "integrity": "sha512-Ml3CPim4SKwmg5g9UI77lnRSeKr/kQw7YhQ6rfdMcBYy6DMlwmkEwQqjygJ3OhxPR+NfFfpjKl3Tf8GXckaqqg==", + "dependencies": { + "ramda": "^0.24.1" + } + }, + "node_modules/ramdasauce/node_modules/ramda": { + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.24.1.tgz", + "integrity": "sha512-HEm619G8PaZMfkqCa23qiOe7r3R0brPu7ZgOsgKUsnvLhd0qhc/vTjkUovomgPWa5ECBa08fJZixth9LaoBo5w==" + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/react-native-fetch-api": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/react-native-fetch-api/-/react-native-fetch-api-3.0.0.tgz", + "integrity": "sha512-g2rtqPjdroaboDKTsJCTlcmtw54E25OjyaunUP0anOZn4Fuo2IKs8BVfe02zVggA/UysbmfSnRJIqtNkAgggNA==", + "dependencies": { + "p-defer": "^3.0.0" + } + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/receptacle": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/receptacle/-/receptacle-1.3.2.tgz", + "integrity": "sha512-HrsFvqZZheusncQRiEE7GatOAETrARKV/lnfYicIm8lbvp/JQOdADOfhjBd2DajvoszEyxSM6RlAAIZgEoeu/A==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/redeyed": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-2.1.1.tgz", + "integrity": "sha512-FNpGGo1DycYAdnrKFxCMmKYgo/mILAqtRYbkdQD8Ep/Hk2PQ5+aEAEx+IU713RTDmuBaH0c8P5ZozurNu5ObRQ==", + "dependencies": { + "esprima": "~4.0.0" + } + }, + "node_modules/request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/request/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "engines": { + "node": ">=4" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/retimer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/retimer/-/retimer-3.0.0.tgz", + "integrity": "sha512-WKE0j11Pa0ZJI5YIk0nflGI7SQsfl2ljihVy7ogh7DeQSeYAUi0ubZ/yEueGtDfUPk6GH5LRw1hBdLq4IwUBWA==" + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/rlp": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", + "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", + "dependencies": { + "bn.js": "^5.2.0" + }, + "bin": { + "rlp": "bin/rlp" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" + }, + "node_modules/secp256k1": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz", + "integrity": "sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==", + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.4", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/split-ca": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split-ca/-/split-ca-1.0.1.tgz", + "integrity": "sha512-Q5thBSxp5t8WPTTJQS59LrGqOZqOsrhDGDVm8azCqIBjSBd7nd9o2PM+mDulQQkh8h//4U6hFZnc/mul8t5pWQ==" + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + }, + "node_modules/sshpk": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", + "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stream-to-it": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/stream-to-it/-/stream-to-it-0.2.4.tgz", + "integrity": "sha512-4vEbkSs83OahpmBybNJXlJd7d6/RxzkkSdT3I0mnGt79Xd2Kk+e1JqbvAvsQfCeKj3aKb0QIWkyK3/n0j506vQ==", + "dependencies": { + "get-iterator": "^1.0.2" + } + }, + "node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-hex-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==", + "dependencies": { + "is-hex-prefixed": "1.0.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/supports-hyperlinks": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", + "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", + "dependencies": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-hyperlinks/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/sync-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", + "integrity": "sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==", + "dependencies": { + "http-response-object": "^3.0.1", + "sync-rpc": "^1.2.1", + "then-request": "^6.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/sync-rpc": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.6.tgz", + "integrity": "sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==", + "dependencies": { + "get-port": "^3.1.0" + } + }, + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar-fs": { + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz", + "integrity": "sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw==", + "dependencies": { + "chownr": "^1.0.1", + "mkdirp": "^0.5.1", + "pump": "^1.0.0", + "tar-stream": "^1.1.2" + } + }, + "node_modules/tar-fs/node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, + "node_modules/tar-fs/node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/tar-fs/node_modules/pump": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", + "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "dependencies": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tar/node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/then-request": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/then-request/-/then-request-6.0.2.tgz", + "integrity": "sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==", + "dependencies": { + "@types/concat-stream": "^1.6.0", + "@types/form-data": "0.0.33", + "@types/node": "^8.0.0", + "@types/qs": "^6.2.31", + "caseless": "~0.12.0", + "concat-stream": "^1.6.0", + "form-data": "^2.2.0", + "http-basic": "^8.1.1", + "http-response-object": "^3.0.1", + "promise": "^8.0.0", + "qs": "^6.4.0" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/then-request/node_modules/@types/node": { + "version": "8.10.66", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", + "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==" + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" + }, + "node_modules/timeout-abort-controller": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/timeout-abort-controller/-/timeout-abort-controller-2.0.0.tgz", + "integrity": "sha512-2FAPXfzTPYEgw27bQGTHc0SzrbmnU2eso4qo172zMLZzaGqeu09PFa5B2FCUHM1tflgRqPgn5KQgp6+Vex4uNA==", + "dependencies": { + "abort-controller": "^3.0.0", + "native-abort-controller": "^1.0.4", + "retimer": "^3.0.0" + } + }, + "node_modules/tmp": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", + "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", + "engines": { + "node": ">=14.14" + } + }, + "node_modules/tmp-promise": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/tmp-promise/-/tmp-promise-3.0.3.tgz", + "integrity": "sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==", + "dependencies": { + "tmp": "^0.2.0" + } + }, + "node_modules/to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tough-cookie/node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "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 + } + } + }, + "node_modules/tslib": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" + }, + "node_modules/typescript": { + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/uint8arrays": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", + "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, + "node_modules/undici-types": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.13.0.tgz", + "integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==" + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/uri-js/node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/urlpattern-polyfill": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz", + "integrity": "sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==" + }, + "node_modules/utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", + "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==" + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==" + }, + "node_modules/varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/verror/node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/web-streams-polyfill": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", + "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/web3-eth-abi": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.7.0.tgz", + "integrity": "sha512-heqR0bWxgCJwjWIhq2sGyNj9bwun5+Xox/LdZKe+WMyTSy0cXDXEAgv3XKNkXC4JqdDt/ZlbTEx4TWak4TRMSg==", + "dependencies": { + "@ethersproject/abi": "5.0.7", + "web3-utils": "1.7.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-utils": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.7.0.tgz", + "integrity": "sha512-O8Tl4Ky40Sp6pe89Olk2FsaUkgHyb5QAXuaKo38ms3CxZZ4d3rPGfjP9DNKGm5+IUgAZBNpF1VmlSmNCqfDI1w==", + "dependencies": { + "bn.js": "^4.11.9", + "ethereum-bloom-filters": "^1.0.6", + "ethereumjs-util": "^7.1.0", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-utils/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/webcrypto-core": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.8.0.tgz", + "integrity": "sha512-kR1UQNH8MD42CYuLzvibfakG5Ew5seG85dMMoAM/1LqvckxaF6pUiidLuraIu4V+YCIFabYecUZAW0TuxAoaqw==", + "dependencies": { + "@peculiar/asn1-schema": "^2.3.8", + "@peculiar/json-schema": "^1.1.12", + "asn1js": "^3.0.1", + "pvtsutils": "^1.3.5", + "tslib": "^2.6.2" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dependencies": { + "string-width": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==" + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/ws": { + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/yargs-parser": { + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-16.1.0.tgz", + "integrity": "sha512-H/V41UNZQPkUMIT5h5hiwg4QKIY1RPvoBV4XcjUbRM8Bk2oKqqyZ0DIEbTFZB0XjbtSPG8SAa/0DxCQmiRgzKg==", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "engines": { + "node": ">=6" + } + } + } +} diff --git a/subgraphs/eigenpie/package.json b/subgraphs/eigenpie/package.json new file mode 100644 index 0000000000..0f092d5d84 --- /dev/null +++ b/subgraphs/eigenpie/package.json @@ -0,0 +1,14 @@ +{ + "name": "eigenpie", + "license": "MIT", + "scripts": { + "format": "npx prettier --write ." + }, + "dependencies": { + "@graphprotocol/graph-cli": "^0.46.1", + "@graphprotocol/graph-ts": "^0.29.3" + }, + "devDependencies": { + "prettier": "^3.2.5" + } +} diff --git a/subgraphs/eigenpie/protocols/eigenpie/config/deployments/eigenpie-ethereum/configurations.json b/subgraphs/eigenpie/protocols/eigenpie/config/deployments/eigenpie-ethereum/configurations.json new file mode 100644 index 0000000000..b40a2e28a8 --- /dev/null +++ b/subgraphs/eigenpie/protocols/eigenpie/config/deployments/eigenpie-ethereum/configurations.json @@ -0,0 +1,17 @@ +{ + "network": "mainnet", + + "EigenConfig": { + "address": "0x20b70E4A1883b81429533FeD944d7957121c7CAB", + "startBlock": "19090400" + }, + + "EigenStaking": { + "address": "0x24db6717db1c75b9db6ea47164d8730b63875db7", + "startBlock": "19090400" + }, + + "graftEnabled": false, + "subgraphId": "", + "graftStartBlock": 0 +} diff --git a/subgraphs/eigenpie/protocols/eigenpie/config/templates/eigenpie.template.yaml b/subgraphs/eigenpie/protocols/eigenpie/config/templates/eigenpie.template.yaml new file mode 100644 index 0000000000..b3b434e6e1 --- /dev/null +++ b/subgraphs/eigenpie/protocols/eigenpie/config/templates/eigenpie.template.yaml @@ -0,0 +1,133 @@ +specVersion: 0.0.8 +schema: + file: ./schema.graphql +{{#graftEnabled}} +features: + - grafting +graft: + base: {{ subgraphId }} # Subgraph ID of base subgraph + block: {{ graftStartBlock }} # Block number +{{ /graftEnabled }} +dataSources: + - kind: ethereum + network: {{ network }} + name: EigenConfig + source: + address: "{{ EigenConfig.address }}" + abi: EigenConfig + startBlock: {{ EigenConfig.startBlock }} + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Pool + abis: + - name: EigenConfig + file: ./abis/EigenConfig.json + - name: EigenStaking + file: ./abis/EigenStaking.json + - name: MLRT + file: ./abis/MLRT.json + - name: ERC20 + file: ./abis/ERC20.json + + ########################################### + ############## Price Oracle ############### + ########################################### + # ERC20 + - name: _ERC20 + file: ./abis/Prices/ERC20.json + # Curve Contracts + - name: CurvePool + file: ./abis/Prices/Curve/Pool.json + - name: CurveRegistry + file: ./abis/Prices/Curve/Registry.json + - name: CalculationsCurve + file: ./abis/Prices/Calculations/Curve.json + # YearnLens Contracts + - name: YearnLensContract + file: ./abis/Prices/YearnLens.json + # Aave Oracle Contract + - name: AaveOracleContract + file: ./abis/Prices/AaveOracle.json + # SushiSwap Contracts + - name: CalculationsSushiSwap + file: ./abis/Prices/Calculations/SushiSwap.json + # ChainLink Contracts + - name: ChainLinkContract + file: ./abis/Prices/ChainLink.json + # Uniswap Contracts + - name: UniswapRouter + file: ./abis/Prices/Uniswap/Router.json + - name: UniswapFactory + file: ./abis/Prices/Uniswap/Factory.json + - name: UniswapPair + file: ./abis/Prices/Uniswap/Pair.json + eventHandlers: + - event: AddedNewSupportedAsset(indexed address,indexed address,uint256) + handler: handleAddedNewSupportedAsset + - event: ReceiptTokenUpdated(indexed address,indexed address) + handler: handleReceiptTokenUpdated + file: ./src/mappings/eigenConfigMappings.ts + - kind: ethereum + network: {{ network }} + name: EigenStaking + source: + address: "{{ EigenStaking.address }}" + abi: EigenStaking + startBlock: {{ EigenStaking.startBlock }} + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Pool + abis: + - name: EigenStaking + file: ./abis/EigenStaking.json + - name: EigenConfig + file: ./abis/EigenConfig.json + - name: MLRT + file: ./abis/MLRT.json + - name: ERC20 + file: ./abis/ERC20.json + + ########################################### + ############## Price Oracle ############### + ########################################### + # ERC20 + - name: _ERC20 + file: ./abis/Prices/ERC20.json + # Curve Contracts + - name: CurvePool + file: ./abis/Prices/Curve/Pool.json + - name: CurveRegistry + file: ./abis/Prices/Curve/Registry.json + - name: CalculationsCurve + file: ./abis/Prices/Calculations/Curve.json + # YearnLens Contracts + - name: YearnLensContract + file: ./abis/Prices/YearnLens.json + # Aave Oracle Contract + - name: AaveOracleContract + file: ./abis/Prices/AaveOracle.json + # SushiSwap Contracts + - name: CalculationsSushiSwap + file: ./abis/Prices/Calculations/SushiSwap.json + # ChainLink Contracts + - name: ChainLinkContract + file: ./abis/Prices/ChainLink.json + # Uniswap Contracts + - name: UniswapRouter + file: ./abis/Prices/Uniswap/Router.json + - name: UniswapFactory + file: ./abis/Prices/Uniswap/Factory.json + - name: UniswapPair + file: ./abis/Prices/Uniswap/Pair.json + eventHandlers: + - event: AssetDeposit(indexed address,indexed address,uint256,indexed address,uint256,bool) + handler: handleAssetDeposit + - event: AssetDeposit(indexed address,indexed address,uint256,indexed address) + handler: handleAssetDepositWithoutMintAmount + file: ./src/mappings/eigenStakingMappings.ts diff --git a/subgraphs/eigenpie/schema.graphql b/subgraphs/eigenpie/schema.graphql new file mode 100644 index 0000000000..802cb7bf84 --- /dev/null +++ b/subgraphs/eigenpie/schema.graphql @@ -0,0 +1,349 @@ +# Subgraph Schema: Generic +# Version: 3.0.0 +# See https://github.com/messari/subgraphs/blob/master/docs/SCHEMA.md for details + +enum Network { + ARBITRUM_ONE + ARWEAVE_MAINNET + AURORA + AVALANCHE + BOBA + BSC # aka BNB Chain + CELO + COSMOS + CRONOS + MAINNET # Ethereum Mainnet + FANTOM + FUSE + HARMONY + JUNO + MOONBEAM + MOONRIVER + NEAR_MAINNET + OPTIMISM + OSMOSIS + MATIC # aka Polygon + GNOSIS +} + +enum ProtocolType { + EXCHANGE + LENDING + YIELD + BRIDGE + GENERIC + # Will add more +} + +enum TokenType { + MULTIPLE + UNKNOWN + ERC20 + ERC721 + ERC1155 + BEP20 + BEP721 + BEP1155 + # Will add more +} + +type Token @entity @regularPolling { + " Smart contract address of the token " + id: Bytes! + + " Name of the token, mirrored from the smart contract " + name: String! + + " Symbol of the token, mirrored from the smart contract " + symbol: String! + + " The number of decimal places this token uses, default to 18 " + decimals: Int! + + " Optional field to track the price of a token, mostly for caching purposes " + lastPriceUSD: BigDecimal + + " Optional field to track the block number of the last token price " + lastPriceBlockNumber: BigInt +} + +############################# +##### Protocol Metadata ##### +############################# + +type Protocol @entity @regularPolling { + " Smart contract address of the protocol's main contract (Factory, Registry, etc) " + id: Bytes! + + " Name of the protocol, including version. e.g. Uniswap v3 " + name: String! + + " Slug of protocol, including version. e.g. uniswap-v3 " + slug: String! + + " Version of the subgraph schema, in SemVer format (e.g. 1.0.0) " + schemaVersion: String! + + " Version of the subgraph implementation, in SemVer format (e.g. 1.0.0) " + subgraphVersion: String! + + " Version of the methodology used to compute metrics, loosely based on SemVer format (e.g. 1.0.0) " + methodologyVersion: String! + + " The blockchain network this subgraph is indexing on " + network: Network! + + " The type of protocol (e.g. DEX, Lending, Yield, etc) " + type: ProtocolType! + + ##### Quantitative Data ##### + + " Current TVL (Total Value Locked) of the entire protocol " + totalValueLockedUSD: BigDecimal! + + " Revenue claimed by suppliers to the protocol. LPs on DEXs (e.g. 0.25% of the swap fee in Sushiswap). Depositors on Lending Protocols. NFT sellers on OpenSea. " + cumulativeSupplySideRevenueUSD: BigDecimal! + + " Gross revenue for the protocol (revenue claimed by protocol). Examples: AMM protocol fee (Sushi’s 0.05%). OpenSea 10% sell fee. " + cumulativeProtocolSideRevenueUSD: BigDecimal! + + " All revenue generated by the protocol. e.g. 0.30% of swap fee in Sushiswap, all yield generated by Yearn. " + cumulativeTotalRevenueUSD: BigDecimal! + + " Total number of transactions. Transactions include events triggered by outside users (ie, deposit, withdraw, etc.)" + cumulativeTransactionCount: Int! + + " Number of cumulative unique users " + cumulativeUniqueUsers: Int! + + " Total number of pools " + totalPoolCount: Int! + + " Day ID of the most recent daily snapshot " + lastSnapshotDayID: Int! + + " Timestamp of the last time this entity was updated " + lastUpdateTimestamp: BigInt! + + ##### Snapshots ##### + + " Daily usage metrics for this protocol " + dailyUsageMetrics: [UsageMetricsDailySnapshot!]! + @derivedFrom(field: "protocol") + + " Daily financial metrics for this protocol " + financialMetrics: [FinancialsDailySnapshot!]! @derivedFrom(field: "protocol") + + ##### Pools ##### + + " All pools that belong to this protocol " + pools: [Pool!]! @derivedFrom(field: "protocol") +} + +############################### +##### Protocol Timeseries ##### +############################### + +type UsageMetricsDailySnapshot @entity @dailySnapshot { + " ID is # of days since Unix epoch time " + id: Bytes! + + " Number of days since Unix epoch time " + day: Int! + + " Protocol this snapshot is associated with " + protocol: Protocol! + + " Number of unique daily active users " + dailyActiveUsers: Int! + + " Number of cumulative unique users " + cumulativeUniqueUsers: Int! + + " Total number of transactions occurred in a day. Transactions include all entities that implement the Event interface. " + dailyTransactionCount: Int! + + " Total number of transactions. Transactions include events triggered by outside users (ie, deposit, withdraw, etc.)" + cumulativeTransactionCount: Int! + + " Total number of pools " + totalPoolCount: Int! + + " Timestamp of when this snapshot was taken/last modified (May be taken after interval has passed) " + timestamp: BigInt! + + " Block number of when this snapshot was taken/last modified (May be taken after interval has passed) " + blockNumber: BigInt! +} + +type FinancialsDailySnapshot @entity @dailySnapshot { + " ID is # of days since Unix epoch time " + id: Bytes! + + " Number of days since Unix epoch time " + day: Int! + + " Protocol this snapshot is associated with " + protocol: Protocol! + + " Current TVL (Total Value Locked) of the entire protocol " + totalValueLockedUSD: BigDecimal! + + " Revenue claimed by suppliers to the protocol. LPs on DEXs (e.g. 0.25% of the swap fee in Sushiswap). Depositors on Lending Protocols. NFT sellers on OpenSea. " + dailySupplySideRevenueUSD: BigDecimal! + + " Revenue claimed by suppliers to the protocol. LPs on DEXs (e.g. 0.25% of the swap fee in Sushiswap). Depositors on Lending Protocols. NFT sellers on OpenSea. " + cumulativeSupplySideRevenueUSD: BigDecimal! + + " Gross revenue for the protocol (revenue claimed by protocol). Examples: AMM protocol fee (Sushi’s 0.05%). OpenSea 10% sell fee. " + dailyProtocolSideRevenueUSD: BigDecimal! + + " Gross revenue for the protocol (revenue claimed by protocol). Examples: AMM protocol fee (Sushi’s 0.05%). OpenSea 10% sell fee. " + cumulativeProtocolSideRevenueUSD: BigDecimal! + + " All revenue generated by the protocol. e.g. 0.30% of swap fee in Sushiswap, all yield generated by Yearn. " + dailyTotalRevenueUSD: BigDecimal! + + " All revenue generated by the protocol. e.g. 0.30% of swap fee in Sushiswap, all yield generated by Yearn. " + cumulativeTotalRevenueUSD: BigDecimal! + + " Timestamp of when this snapshot was taken/last modified (May be taken after interval has passed) " + timestamp: BigInt! + + " Block number of when this snapshot was taken/last modified (May be taken after interval has passed) " + blockNumber: BigInt! +} + +########################### +##### Pool-Level Data ##### +########################### + +type Pool @entity @regularPolling { + " Smart contract address of the pool " + id: Bytes! + + " The protocol this pool belongs to " + protocol: Protocol! + + " Name of the pool (e.g. Curve.fi DAI/USDC/USDT) " + name: String + + " Symbol of liquidity pool (e.g. 3CRV) " + symbol: String + + # Generally protocols accept one or multiple tokens and mint tokens to the depositor to track ownership + # Some protocols don't mint any tokens to track ownership, in that case outputToken is null. + + " Token that is minted to track ownership of position in protocol " + outputToken: Token + + " Tokens that need to be deposited to take a position in protocol. e.g. WETH and USDC to deposit into the WETH-USDC pool. Array to account for multi-asset pools like Curve and Balancer " + inputTokens: [Token!]! + + " Creation timestamp " + createdTimestamp: BigInt! + + " Creation block number " + createdBlockNumber: BigInt! + + ##### Quantitative Data ##### + + " Current TVL (Total Value Locked) of this pool in USD " + totalValueLockedUSD: BigDecimal! + + " All revenue generated by the pool, accrued to the supply side. " + cumulativeSupplySideRevenueUSD: BigDecimal! + + " All revenue generated by the pool, accrued to the protocol. " + cumulativeProtocolSideRevenueUSD: BigDecimal! + + " All revenue generated by the pool. " + cumulativeTotalRevenueUSD: BigDecimal! + + " Amount of input tokens in the pool. The ordering should be the same as the pool's `inputTokens` field. " + inputTokenBalances: [BigInt!]! + + " The USD value of input tokens in this pool. Should be the same order as the pool's `inputTokens` field. " + inputTokenBalancesUSD: [BigDecimal!]! + + " Total supply of output token. Note that certain DEXes don't have an output token (e.g. Bancor) " + outputTokenSupply: BigInt + + " Day ID of the most recent daily snapshot " + lastSnapshotDayID: Int! + + " Timestamp of the last time this entity was updated " + lastUpdateTimestamp: BigInt! +} + +type PoolDailySnapshot @entity @dailySnapshot { + " { Smart contract address of the pool }-{ # of days since Unix epoch time } " + id: Bytes! + + " Number of days since Unix epoch time " + day: Int! + + " The protocol this snapshot belongs to " + protocol: Protocol! + + " The pool this snapshot belongs to " + pool: Pool! + + ##### Quantitative Data ##### + + " Current TVL (Total Value Locked) of this pool " + totalValueLockedUSD: BigDecimal! + + " All revenue generated by the pool, accrued to the supply side. " + cumulativeSupplySideRevenueUSD: BigDecimal! + + " Daily revenue generated by the pool, accrued to the supply side. " + dailySupplySideRevenueUSD: BigDecimal! + + " All revenue generated by the pool, accrued to the protocol. " + cumulativeProtocolSideRevenueUSD: BigDecimal! + + " Daily revenue generated by the pool, accrued to the protocol. " + dailyProtocolSideRevenueUSD: BigDecimal! + + " All revenue generated by the pool. " + cumulativeTotalRevenueUSD: BigDecimal! + + " Daily revenue generated by the pool. " + dailyTotalRevenueUSD: BigDecimal! + + " Amount of input tokens in the pool. The ordering should be the same as the pool's `inputTokens` field. " + inputTokenBalances: [BigInt!]! + + " The USD value of input tokens in this pool. Should be the same order as the pool's `inputTokens` field. " + inputTokenBalancesUSD: [BigDecimal!]! + + " Total supply of output token. Note that certain DEXes don't have an output token (e.g. Bancor) " + outputTokenSupply: BigInt + + " Timestamp of when this snapshot was taken/last modified (May be taken after interval has passed) " + timestamp: BigInt! + + " Block number of when this snapshot was taken/last modified (May be taken after interval has passed) " + blockNumber: BigInt! +} + +# An account is a unique Ethereum address +# Helps to accumulate total unique users +type Account @entity @regularPolling { + " Address of the account " + id: ID! +} + +# Helper entity for calculating daily active users +type ActiveAccount @entity { + " { daily }-{ Address of the account }-{ Days since Unix epoch } " + id: ID! +} + +type _ActivityHelper @entity { + " { daily }-{ Days since Unix epoch} " + id: Bytes! + + dailyActiveUsers: Int! +} diff --git a/subgraphs/eigenpie/src/common/constants.ts b/subgraphs/eigenpie/src/common/constants.ts new file mode 100644 index 0000000000..8401c2b3e2 --- /dev/null +++ b/subgraphs/eigenpie/src/common/constants.ts @@ -0,0 +1,85 @@ +import { Address, BigDecimal, BigInt } from "@graphprotocol/graph-ts"; + +////////////////////////////// +/////// Protocol Config ////// +////////////////////////////// + +export namespace Protocol { + export const ID = "0x20b70e4a1883b81429533fed944d7957121c7cab"; + export const NAME = "Eigenpie"; + export const SLUG = "eigenpie"; +} + +////////////////////////////// +///// Ethereum Addresses ///// +////////////////////////////// + +export namespace NULL { + export const TYPE_STRING = "0x0000000000000000000000000000000000000000"; + export const TYPE_ADDRESS = Address.fromString(TYPE_STRING); +} + +export const ETH_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"; +export const WETH_ADDRESS = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"; + +export const EIGEN_CONFIG_ADDRESS = + "0x20b70e4a1883b81429533fed944d7957121c7cab"; +export const EIGEN_STAKING_ADDRESS = + "0x24db6717db1c75b9db6ea47164d8730b63875db7"; +export const EGETH_TOKEN_ADDRESS = "0xefefefefefefefefefefefefefefefefefefefef"; + +//////////////////////// +///// Type Helpers ///// +//////////////////////// + +export const DEFAULT_DECIMALS = 18; + +export const USDC_DECIMALS = 6; +export const USDC_DENOMINATOR = BigDecimal.fromString("1000000"); + +export const BIGINT_ZERO = BigInt.fromI32(0); +export const BIGINT_ONE = BigInt.fromI32(1); +export const BIGINT_TWO = BigInt.fromI32(2); +export const BIGINT_TEN = BigInt.fromI32(10); +export const BIGINT_HUNDRED = BigInt.fromI32(100); +export const BIGINT_THOUSAND = BigInt.fromI32(1000); +export const BIGINT_TEN_TO_EIGHTEENTH = BigInt.fromString("10").pow(18); +export const BIGINT_MINUS_ONE = BigInt.fromI32(-1); +export const BIGINT_MAX = BigInt.fromString( + "115792089237316195423570985008687907853269984665640564039457584007913129639935" +); + +export const INT_NEGATIVE_ONE = -1 as i32; +export const INT_ZERO = 0 as i32; +export const INT_ONE = 1 as i32; +export const INT_TWO = 2 as i32; +export const INT_FOUR = 4 as i32; + +export const BIGDECIMAL_ZERO = new BigDecimal(BIGINT_ZERO); +export const BIGDECIMAL_ONE = new BigDecimal(BIGINT_ONE); +export const BIGDECIMAL_TWO = new BigDecimal(BIGINT_TWO); +export const BIGDECIMAL_HUNDRED = new BigDecimal(BIGINT_HUNDRED); +export const BIGDECIMAL_MINUS_ONE = new BigDecimal(BIGINT_MINUS_ONE); + +export const MAX_UINT = BigInt.fromI32(2).times(BigInt.fromI32(255)); + +///////////////////// +///// Date/Time ///// +///////////////////// + +export const SECONDS_PER_DAY = 60 * 60 * 24; // 86400 +export const SECONDS_PER_HOUR = 60 * 60; // 3600 +export const SECONDS_PER_DAY_BI = BigInt.fromI32(SECONDS_PER_DAY); +export const SECONDS_PER_HOUR_BI = BigInt.fromI32(SECONDS_PER_HOUR); +export const MS_PER_DAY = new BigDecimal(BigInt.fromI32(24 * 60 * 60 * 1000)); +export const DAYS_PER_YEAR = new BigDecimal(BigInt.fromI32(365)); +export const MS_PER_YEAR = DAYS_PER_YEAR.times( + new BigDecimal(BigInt.fromI32(24 * 60 * 60 * 1000)) +); + +//////////////// +///// Misc ///// +//////////////// + +export const ETH_SYMBOL = "ETH"; +export const ETH_NAME = "Ether"; diff --git a/subgraphs/eigenpie/src/common/initializers.ts b/subgraphs/eigenpie/src/common/initializers.ts new file mode 100644 index 0000000000..9c443bdd94 --- /dev/null +++ b/subgraphs/eigenpie/src/common/initializers.ts @@ -0,0 +1,94 @@ +import { Versions } from "../versions"; +import { SDK } from "../sdk/protocols/generic"; +import * as constants from "../common/constants"; +import { Pool } from "../sdk/protocols/generic/pool"; +import { Pricer, TokenInit, readValue } from "./utils"; +import { MLRT } from "../../generated/EigenConfig/MLRT"; +import { ProtocolConfig } from "../sdk/protocols/config"; +import { ERC20 } from "../../generated/EigenConfig/ERC20"; +import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts"; + +export function initializeSDKFromEvent(event: ethereum.Event): SDK { + const protocolConfig = new ProtocolConfig( + constants.Protocol.ID, + constants.Protocol.NAME, + constants.Protocol.SLUG, + Versions + ); + const tokenPricer = new Pricer(); + const tokenInitializer = new TokenInit(); + + const sdk = SDK.initializeFromEvent( + protocolConfig, + tokenPricer, + tokenInitializer, + event + ); + + return sdk; +} + +export function initializeSDKFromCall(call: ethereum.Call): SDK { + const protocolConfig = new ProtocolConfig( + constants.Protocol.ID, + constants.Protocol.NAME, + constants.Protocol.SLUG, + Versions + ); + const tokenPricer = new Pricer(); + const tokenInitializer = new TokenInit(); + + const sdk = SDK.initializeFromCall( + protocolConfig, + tokenPricer, + tokenInitializer, + call + ); + + return sdk; +} + +export function getOrCreatePool(poolAddress: Address, sdk: SDK): Pool { + const pool = sdk.Pools.loadPool(poolAddress); + + if (!pool.isInitialized) { + const poolContract = MLRT.bind(poolAddress); + + const inputToken = readValue
( + poolContract.try_underlyingAsset(), + constants.NULL.TYPE_ADDRESS + ); + const outputToken = sdk.Tokens.getOrCreateToken(poolAddress); + + pool.initialize( + outputToken.name, + outputToken.symbol, + [inputToken], + outputToken + ); + } + + return pool; +} + +export function updatePoolTVL(pool: Pool): void { + const contract = MLRT.bind(Address.fromBytes(pool.getBytesID())); + + const poolUnderlyingTVL = readValue( + contract.try_totalSupply(), + constants.BIGINT_ZERO + ); + + pool.setInputTokenBalances([poolUnderlyingTVL], true); +} + +export function updatePoolOutputTokenSupply(pool: Pool): void { + const contract = ERC20.bind(Address.fromBytes(pool.getBytesID())); + + const outputTokenSupply = readValue( + contract.try_totalSupply(), + constants.BIGINT_ZERO + ); + + pool.setOutputTokenSupply(outputTokenSupply); +} diff --git a/subgraphs/eigenpie/src/common/utils.ts b/subgraphs/eigenpie/src/common/utils.ts new file mode 100644 index 0000000000..19cdbb1501 --- /dev/null +++ b/subgraphs/eigenpie/src/common/utils.ts @@ -0,0 +1,65 @@ +import { Token } from "../../generated/schema"; +import * as constants from "../common/constants"; +import { TokenPricer } from "../sdk/protocols/config"; +import { bigIntToBigDecimal } from "../sdk/util/numbers"; +import { ERC20 } from "../../generated/EigenConfig/ERC20"; +import { getUsdPrice, getUsdPricePerToken } from "../prices"; +import { EigenConfig } from "../../generated/EigenConfig/EigenConfig"; +import { Address, BigDecimal, BigInt, ethereum } from "@graphprotocol/graph-ts"; +import { TokenParams, TokenInitializer } from "../sdk/protocols/generic/tokens"; + +export function readValue( + callResult: ethereum.CallResult, + defaultValue: T +): T { + return callResult.reverted ? defaultValue : callResult.value; +} + +export class Pricer implements TokenPricer { + getTokenPrice(token: Token): BigDecimal { + const pricedToken = Address.fromBytes(token.id); + + return getUsdPricePerToken(pricedToken).usdPrice; + } + + getAmountValueUSD(token: Token, amount: BigInt): BigDecimal { + const pricedToken = Address.fromBytes(token.id); + const _amount = bigIntToBigDecimal(amount, token.decimals); + + return getUsdPrice(pricedToken, _amount); + } +} + +export class TokenInit implements TokenInitializer { + getTokenParams(address: Address): TokenParams { + const contract = ERC20.bind(address); + let default_name = "unknown"; + let default_symbol = "UNKNOWN"; + let default_decimals = constants.INT_ZERO as i32; + + if (address == Address.fromString(constants.EGETH_TOKEN_ADDRESS)) { + default_name = constants.ETH_NAME; + default_symbol = constants.ETH_SYMBOL; + default_decimals = constants.DEFAULT_DECIMALS as i32; + } + + const name = readValue(contract.try_name(), default_name); + const symbol = readValue(contract.try_symbol(), default_symbol); + const decimals = readValue(contract.try_decimals(), default_decimals); + + return new TokenParams(name, symbol, decimals); + } +} + +export function getReceiptByAsset(asset: Address): Address { + const contract = EigenConfig.bind( + Address.fromString(constants.EIGEN_CONFIG_ADDRESS) + ); + + const receipt = readValue
( + contract.try_mLRTReceiptByAsset(asset), + constants.NULL.TYPE_ADDRESS + ); + + return receipt; +} diff --git a/subgraphs/eigenpie/src/mappings/eigenConfigMappings.ts b/subgraphs/eigenpie/src/mappings/eigenConfigMappings.ts new file mode 100644 index 0000000000..653d40f386 --- /dev/null +++ b/subgraphs/eigenpie/src/mappings/eigenConfigMappings.ts @@ -0,0 +1,24 @@ +import { + getOrCreatePool, + initializeSDKFromEvent, +} from "../common/initializers"; +import { + ReceiptTokenUpdated, + AddedNewSupportedAsset, +} from "../../generated/EigenConfig/EigenConfig"; + +export function handleAddedNewSupportedAsset( + event: AddedNewSupportedAsset +): void { + const receiptAddress = event.params.receipt; + + const sdk = initializeSDKFromEvent(event); + getOrCreatePool(receiptAddress, sdk); +} + +export function handleReceiptTokenUpdated(event: ReceiptTokenUpdated): void { + const receiptAddress = event.params.receipt; + + const sdk = initializeSDKFromEvent(event); + getOrCreatePool(receiptAddress, sdk); +} diff --git a/subgraphs/eigenpie/src/mappings/eigenStakingMappings.ts b/subgraphs/eigenpie/src/mappings/eigenStakingMappings.ts new file mode 100644 index 0000000000..6bbdd16396 --- /dev/null +++ b/subgraphs/eigenpie/src/mappings/eigenStakingMappings.ts @@ -0,0 +1,41 @@ +import { + updatePoolTVL, + getOrCreatePool, + initializeSDKFromEvent, + updatePoolOutputTokenSupply, +} from "../common/initializers"; +import { + AssetDeposit, + AssetDeposit1 as AssetDepositWithoutMintAmount, +} from "../../generated/EigenStaking/EigenStaking"; +import { getReceiptByAsset } from "../common/utils"; + +export function handleAssetDeposit(event: AssetDeposit): void { + const assetAddress = event.params.asset; + const receiptAddress = getReceiptByAsset(assetAddress); + + const sdk = initializeSDKFromEvent(event); + const pool = getOrCreatePool(receiptAddress, sdk); + + updatePoolOutputTokenSupply(pool); + updatePoolTVL(pool); + + const account = sdk.Accounts.loadAccount(event.transaction.from); + account.trackActivity(); +} + +export function handleAssetDepositWithoutMintAmount( + event: AssetDepositWithoutMintAmount +): void { + const assetAddress = event.params.asset; + const receiptAddress = getReceiptByAsset(assetAddress); + + const sdk = initializeSDKFromEvent(event); + const pool = getOrCreatePool(receiptAddress, sdk); + + updatePoolOutputTokenSupply(pool); + updatePoolTVL(pool); + + const account = sdk.Accounts.loadAccount(event.transaction.from); + account.trackActivity(); +} diff --git a/subgraphs/eigenpie/src/prices/README.md b/subgraphs/eigenpie/src/prices/README.md new file mode 100644 index 0000000000..a21d78286a --- /dev/null +++ b/subgraphs/eigenpie/src/prices/README.md @@ -0,0 +1,295 @@ +# Price Oracle + +## Configuration + +In `subgraph.yaml`, add the following code snippet inside the `abis` section of the `datasources` which is going to fetch prices of token using the `Price Oracle`. +
+**NOTE**: Include the following code snippet in each of the datasources, that is dependent on the `Price Oracle` and update imports in each file inside oracle folder. + +``` +########################################### +############## Price Oracle ############### +########################################### +# ERC20 +- name: _ERC20 + file: ./abis/Prices/ERC20.json +# Curve Contracts +- name: CurvePool + file: ./abis/Prices/Curve/Pool.json +- name: CurveRegistry + file: ./abis/Prices/Curve/Registry.json +- name: CalculationsCurve + file: ./abis/Prices/Calculations/Curve.json +# YearnLens Contracts +- name: YearnLensContract + file: ./abis/Prices/YearnLens.json +# Aave Oracle Contract +- name: AaveOracleContract + file: ./abis/Prices/AaveOracle.json +# SushiSwap Contracts +- name: CalculationsSushiSwap + file: ./abis/Prices/Calculations/SushiSwap.json +# ChainLink Contracts +- name: ChainLinkContract + file: ./abis/Prices/ChainLink.json +# Uniswap Contracts +- name: UniswapRouter + file: ./abis/Prices/Uniswap/Router.json +- name: UniswapFactory + file: ./abis/Prices/Uniswap/Factory.json +- name: UniswapPair + file: ./abis/Prices/Uniswap/Pair.json +``` + +## Usage + +Following are some ways through which you can get the prices of tokens: + +``` +import { BigDecimal } from "@graphprotocol/graph-ts"; +import { getUsdPrice, getUsdPricePerToken, getLiquidityBoundPrice } from "../Oracle"; + +// Method 1 +// Using function getUsdPrice(tokenAddr: Address, amount: BigDecimal): BigDecimal + +let tokenPrice = getUsdPrice(tokenAddr, amount); +``` + +> Note: Preferred as it internally calls `getLiquidityBoundPrice(...)` and returns token price bounded by it's pool's liquidity. +>
+> To get the price per token, you can still use `getUsdPrice(...)` as: +>

> `let tokenPrice = getUsdPrice(tokenAddr, BIGDECIMAL_ONE);` + +``` +// Method 2 +// Using function getUsdPricePerToken(tokenAddr: Address): CustomPriceType + +let tokenPrice: BigDecimal; +let fetchPrice = getUsdPricePerToken(tokenAddr); + +// fetchPrice.reverted: Bool +// fetchPrice.usdPrice: BigDecimal +// fetchPrice.decimals: number +// fetchPrice.oracleType: string +// fetchPrice.liquidity: BigDecimal + +if (!fetchPrice.reverted) { + if ( + fetchPrice.oracleType == constants.OracleType.UNISWAP_FORKS_ROUTER || + fetchPrice.oracleType == constants.OracleType.CURVE_ROUTER + ) { + fetchPrice = getLiquidityBoundPrice(tokenAddr, fetchPrice, amount) + } + tokenPrice = fetchPrice.usdPrice * amount +} +``` + +## Optimizations + +- Configure default `number of oracles` to fetch price from and their `order of preference` in OracleType's constructor, depending on which oracles _generally_ works best for you. +- Although querying multiple oracles for the same token's price mean more contract calls, this overhead can be beared for smaller subgraphs, and for specific tokens/block ranges for larger ones in favour of spotting and ignoring outlier values by avoiding complete reliance on a single source of truth and trusting the closer majority values, especially for low/distributed liquidity tokens, or during volatile markets. +

+ The result is an average price on the k-closest reported values. +
+ where, `k = ceil(reportedPrices.length/2)` +- For any observed pricing discrepancies, you may define an override on the default oracle configuration in network's config file which works better for the mispriced token(s). +
+ An example override is defined under `ORACLE CONFIG OVERRIDES` section in `config/template.ts` +

+ Any new overrides shall be maintained in both the subgraph as well as the reference pricelib directory, so the same inconsistencies do not have to be handled separately. + +## Folder Structure + +``` +Prices +├── calculations +│ ├── CalculationsCurve.ts +│ └── CalculationsSushiSwap.ts +├── common +│ ├── types.ts +│ ├── constants.ts +│ └── utils.ts +├── config +│ ├── arbitrum.ts +│ ├── aurora.ts +│ ├── avalanche.ts +│ ├── bsc.ts +│ ├── celo.ts +│ ├── cronos.ts +│ ├── fantom.ts +│ ├── fuse.ts +│ ├── gnosis.ts +│ ├── harmony.ts +│ ├── mainnet.ts +│ ├── moonbeam.ts +│ ├── optimism.ts +│ ├── polygon.ts +│ └── template.ts +├── oracles +│ ├── AaveOracle.ts +│ ├── ChainLinkFeed.ts +│ └── YearnLensOracle.ts +├── routers +│ ├── CurveRouter.ts +│ └── UniswapForksRouter.ts +│── README.md +└── index.ts +``` + +## Development Status + +🔨 = In progress. +🛠 = Feature complete. Additional testing required. +`MultiCall` = If the method uses more than two `JSON RPC Call`. + +### Arbitrum + +| **Method** | **Address** | **StartBlock** | **MultiCall** | +| ------------ | :------------------------------------------: | :------------: | :-----------: | +| YearnLens | `0x043518ab266485dc085a1db095b8d9c2fc78e9b9` | `2396321` | ❎ | +| AaveOracle | `0xb56c2F0B653B2e0b10C9b928C8580Ac5Df02C7C7` | `7740843` | ❎ | +| Curve | `0x3268c3bda100ef0ff3c2d044f23eab62c80d78d2` | `11707234` | ❎ | +| SushiSwap | `0x5ea7e501c9a23f4a76dc7d33a11d995b13a1dd25` | `2396120` | ❎ | +| CurveRouters | | | | +| | `0x445FE580eF8d70FF569aB36e80c647af338db351` | `1362056` | ✅ | +| | `0x0E9fBb167DF83EdE3240D6a5fa5d40c6C6851e15` | `4530115` | ✅ | +| UniswapForks | | | | +| | `0x1b02da8cb0d097eb8d57a175b88c7d8b47997506` | `73` | ✅ | + +### Aurora + +| **Method** | **Address** | **StartBlock** | **MultiCall** | +| ------------ | :------------------------------------------: | :------------: | :-----------: | +| CurveRouters | | | | +| | `0x5B5CFE992AdAC0C9D48E05854B2d91C73a003858` | `62440525` | ✅ | +| UniswapForks | | | | +| | `0x2CB45Edb4517d5947aFdE3BEAbF95A582506858B` | | ✅ | + +### Avalanche + +| **Method** | **Address** | **StartBlock** | **MultiCall** | +| ------------ | :------------------------------------------: | :------------: | :-----------: | +| AaveOracle | `0xEBd36016B3eD09D4693Ed4251c67Bd858c3c7C9C` | `11970477` | ❎ | +| CurveRouters | | | | +| | `0x8474DdbE98F5aA3179B3B3F5942D724aFcdec9f6` | `5254206` | ✅ | +| | `0x90f421832199e93d01b64DaF378b183809EB0988` | `9384663` | ✅ | +| UniswapForks | | | | +| | `0x60aE616a2155Ee3d9A68541Ba4544862310933d4` | `2486393` | ✅ | +| | `0xE54Ca86531e17Ef3616d22Ca28b0D458b6C89106` | `56879` | ✅ | +| | `0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506` | `506236` | ✅ | + +### BSC + +| **Method** | **Address** | **StartBlock** | **MultiCall** | +| ------------ | :------------------------------------------: | :------------: | :-----------: | +| UniswapForks | | | | +| | `0x10ED43C718714eb63d5aA57B78B54704E256024E` | `6810080` | ✅ | +| | `0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F` | `586899` | ✅ | + +### Celo + +| **Method** | **Address** | **StartBlock** | **MultiCall** | +| ------------ | :------------------------------------------: | :------------: | :-----------: | +| UniswapForks | | | | +| | `0xe3d8bd6aed4f159bc8000a9cd47cffdb95f96121` | `5272598` | ✅ | +| | `0x1b02da8cb0d097eb8d57a175b88c7d8b47997506` | `7254057` | ✅ | + +### Cronos + +| **Method** | **Address** | **StartBlock** | **MultiCall** | +| ------------ | :------------------------------------------: | :------------: | :-----------: | +| UniswapForks | | | | +| | `0x145863eb42cf62847a6ca784e6416c1682b1b2ae` | `5247` | ✅ | + +### Fantom + +| **Method** | **Address** | **StartBlock** | **MultiCall** | +| ------------ | :------------------------------------------: | :------------: | :-----------: | +| YearnLens | `0x57aa88a0810dfe3f9b71a9b179dd8bf5f956c46a` | `17091856` | ❎ | +| Curve | `0x0b53e9df372e72d8fdcdbedfbb56059957a37128` | `27067399` | ❎ | +| SushiSwap | `0x44536de2220987d098d1d29d3aafc7f7348e9ee4` | `3809480` | ❎ | +| CurveRouters | | | | +| | `0x0f854EA9F38ceA4B1c2FC79047E9D0134419D5d6` | `5655918` | ✅ | +| | `0x4fb93D7d320E8A263F22f62C2059dFC2A8bCbC4c` | `27552509` | ✅ | +| UniswapForks | | | | +| | `0xbe4fc72f8293f9d3512d58b969c98c3f676cb957` | `3796241` | ✅ | +| | `0x16327E3FbDaCA3bcF7E38F5Af2599D2DDc33aE52` | `4250168` | ✅ | +| | `0x1b02da8cb0d097eb8d57a175b88c7d8b47997506` | `2457904` | ✅ | + +### Fuse + +| **Method** | **Address** | **StartBlock** | **MultiCall** | +| ------------ | :------------------------------------------: | :------------: | :-----------: | +| UniswapForks | | | | +| | `0xe3f85aad0c8dd7337427b9df5d0fb741d65eeeb5` | `15645719` | ✅ | +| | `0x1b02da8cb0d097eb8d57a175b88c7d8b47997506` | `12936314` | ✅ | + +### Gnosis + +| **Method** | **Address** | **StartBlock** | **MultiCall** | +| ------------ | :------------------------------------------: | :------------: | :-----------: | +| CurveRouters | | | | +| | `0x55E91365697EB8032F98290601847296eC847210` | `20754886` | ✅ | +| | `0x8A4694401bE8F8FCCbC542a3219aF1591f87CE17` | `23334728` | ✅ | +| UniswapForks | | | | +| | `0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506` | `14735910` | ✅ | + +### Harmony + +| **Method** | **Address** | **StartBlock** | **MultiCall** | +| ------------ | :------------------------------------------: | :------------: | :-----------: | +| AaveOracle | `0x3c90887ede8d65ccb2777a5d577beab2548280ad` | `23930344` | ❎ | +| CurveRouters | | | | +| | `0x0a53FaDa2d943057C47A301D25a4D9b3B8e01e8E` | `18003250` | ✅ | +| UniswapForks | | | | +| | `0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506` | `11256069` | ✅ | + +### Mainnet + +| **Method** | **Address** | **StartBlock** | **MultiCall** | +| ------------ | :------------------------------------------: | :------------: | :-----------: | +| YearnLens | `0x83d95e0d5f402511db06817aff3f9ea88224b030` | `12242339` | ❎ | +| ChainLink | `0x47Fb2585D2C56Fe188D0E6ec628a38b74fCeeeDf` | `12864088` | ❎ | +| Curve | `0x25BF7b72815476Dd515044F9650Bf79bAd0Df655` | `12370088` | ❎ | +| SushiSwap | `0x8263e161A855B644f582d9C164C66aABEe53f927` | `12692284` | ❎ | +| CurveRouters | | | | +| | `0x7D86446dDb609eD0F5f8684AcF30380a356b2B4c` | `11154794` | ✅ | +| | `0x8F942C20D02bEfc377D41445793068908E2250D0` | `13986752` | ✅ | +| UniswapForks | | | | +| | `0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F` | `10794261` | ✅ | +| | `0x7a250d5630b4cf539739df2c5dacb4c659f2488d` | `10207858` | ✅ | + +### Moonbeam + +| **Method** | **Address** | **StartBlock** | **MultiCall** | +| ------------ | :------------------------------------------: | :------------: | :-----------: | +| CurveRouters | | | | +| | `0xC2b1DF84112619D190193E48148000e3990Bf627` | `1452049` | ✅ | +| UniswapForks | | | | +| | `0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506` | `503734` | ✅ | + +### Optimism + +| **Method** | **Address** | **StartBlock** | **MultiCall** | +| ------------ | :------------------------------------------: | :------------: | :-----------: | +| YearnLens | `0xb082d9f4734c535d9d80536f7e87a6f4f471bf65` | `18109291` | ❎ | +| AaveOracle | `0xD81eb3728a631871a7eBBaD631b5f424909f0c77` | `4365625` | ❎ | +| Curve | `0x0ffe8434eae67c9838b12c3cd11ac4005daa7227` | `18368996` | ❎ | +| SushiSwap | `0x5fd3815dcb668200a662114fbc9af13ac0a55b4d` | `18216910` | ❎ | +| CurveRouters | | | | +| | `0xC5cfaDA84E902aD92DD40194f0883ad49639b023` | `2373837` | ✅ | +| | `0x7DA64233Fefb352f8F501B357c018158ED8aA455` | `3729171` | ✅ | +| UniswapForks | | | | +| | `0x9c12939390052919aF3155f41Bf4160Fd3666A6f` | `19702709` | ✅ | + +### Polygon + +| **Method** | **Address** | **StartBlock** | **MultiCall** | +| ------------ | :------------------------------------------: | :------------: | :-----------: | +| AaveOracle | `0xb023e699F5a33916Ea823A16485e259257cA8Bd1` | `25825996` | ❎ | +| CurveRouters | | | | +| | `0x094d12e5b541784701FD8d65F11fc0598FBC6332` | `13991825` | ✅ | +| | `0x47bB542B9dE58b970bA50c9dae444DDB4c16751a` | `23556360` | ✅ | +| UniswapForks | | | | +| | `0xa5e0829caced8ffdd4de3c43696c57f7d7a678ff` | `4931900` | ✅ | +| | `0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506` | `11333235` | ✅ | diff --git a/subgraphs/eigenpie/src/prices/calculations/CalculationsCurve.ts b/subgraphs/eigenpie/src/prices/calculations/CalculationsCurve.ts new file mode 100644 index 0000000000..a0b3dea043 --- /dev/null +++ b/subgraphs/eigenpie/src/prices/calculations/CalculationsCurve.ts @@ -0,0 +1,47 @@ +import * as utils from "../common/utils"; +import * as constants from "../common/constants"; +import { CustomPriceType, OracleContract } from "../common/types"; +import { Address, BigDecimal, BigInt, ethereum } from "@graphprotocol/graph-ts"; +import { CalculationsCurve as CalculationsCurveContract } from "../../../generated/EigenConfig/CalculationsCurve"; + +export function getCalculationsCurveContract( + contract: OracleContract, + block: ethereum.Block | null = null +): CalculationsCurveContract | null { + if ( + (block && contract.startBlock.gt(block.number)) || + utils.isNullAddress(contract.address) + ) + return null; + + return CalculationsCurveContract.bind(contract.address); +} + +export function getTokenPriceUSDC( + tokenAddr: Address, + block: ethereum.Block | null = null +): CustomPriceType { + const config = utils.getConfig(); + + if (!config || config.curveCalculationsBlacklist().includes(tokenAddr)) + return new CustomPriceType(); + + const calculationCurveContract = getCalculationsCurveContract( + config.curveCalculations(), + block + ); + if (!calculationCurveContract) return new CustomPriceType(); + + const tokenPrice: BigDecimal = utils + .readValue( + calculationCurveContract.try_getCurvePriceUsdc(tokenAddr), + constants.BIGINT_ZERO + ) + .toBigDecimal(); + + return CustomPriceType.initialize( + tokenPrice, + constants.DEFAULT_USDC_DECIMALS, + constants.OracleType.CURVE_CALCULATIONS + ); +} diff --git a/subgraphs/eigenpie/src/prices/calculations/CalculationsSushiswap.ts b/subgraphs/eigenpie/src/prices/calculations/CalculationsSushiswap.ts new file mode 100644 index 0000000000..a9aaa3ea7e --- /dev/null +++ b/subgraphs/eigenpie/src/prices/calculations/CalculationsSushiswap.ts @@ -0,0 +1,47 @@ +import * as utils from "../common/utils"; +import * as constants from "../common/constants"; +import { CustomPriceType, OracleContract } from "../common/types"; +import { Address, BigDecimal, BigInt, ethereum } from "@graphprotocol/graph-ts"; +import { CalculationsSushiSwap as CalculationsSushiContract } from "../../../generated/EigenConfig/CalculationsSushiSwap"; + +export function getSushiSwapContract( + contract: OracleContract, + block: ethereum.Block | null = null +): CalculationsSushiContract | null { + if ( + (block && contract.startBlock.gt(block.number)) || + utils.isNullAddress(contract.address) + ) + return null; + + return CalculationsSushiContract.bind(contract.address); +} + +export function getTokenPriceUSDC( + tokenAddr: Address, + block: ethereum.Block | null = null +): CustomPriceType { + const config = utils.getConfig(); + + if (!config || config.sushiCalculationsBlacklist().includes(tokenAddr)) + return new CustomPriceType(); + + const calculationSushiContract = getSushiSwapContract( + config.sushiCalculations(), + block + ); + if (!calculationSushiContract) return new CustomPriceType(); + + const tokenPrice: BigDecimal = utils + .readValue( + calculationSushiContract.try_getPriceUsdc(tokenAddr), + constants.BIGINT_ZERO + ) + .toBigDecimal(); + + return CustomPriceType.initialize( + tokenPrice, + constants.DEFAULT_USDC_DECIMALS, + constants.OracleType.SUSHI_CALCULATIONS + ); +} diff --git a/subgraphs/eigenpie/src/prices/common/constants.ts b/subgraphs/eigenpie/src/prices/common/constants.ts new file mode 100644 index 0000000000..93838017a7 --- /dev/null +++ b/subgraphs/eigenpie/src/prices/common/constants.ts @@ -0,0 +1,52 @@ +import { Address, BigDecimal, BigInt } from "@graphprotocol/graph-ts"; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////////////// COMMON //////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export namespace NULL { + export const TYPE_STRING = "0x0000000000000000000000000000000000000000"; + export const TYPE_ADDRESS = Address.fromString(TYPE_STRING); +} + +export namespace OracleType { + export const AAVE_ORACLE = "AaveOracle"; + export const CURVE_ROUTER = "CurveRouter"; + export const CHAINLINK_FEED = "ChainlinkFeed"; + export const YEARN_LENS_ORACLE = "YearnLensOracle"; + export const CURVE_CALCULATIONS = "CurveCalculations"; + export const UNISWAP_FORKS_ROUTER = "UniswapForksRouter"; + export const SUSHI_CALCULATIONS = "SushiswapCalculations"; +} + +export const CHAIN_LINK_USD_ADDRESS = Address.fromString( + "0x0000000000000000000000000000000000000348" +); + +export const PRICE_LIB_VERSION = "1.3.4"; + +export const INT_ZERO = 0 as i32; +export const INT_ONE = 1 as i32; +export const INT_TWO = 2 as i32; +export const INT_NEGATIVE_ONE = -1 as i32; + +export const BIGINT_ZERO = BigInt.fromI32(0); +export const BIGINT_ONE = BigInt.fromI32(1); +export const BIGINT_TEN = BigInt.fromI32(10); +export const BIGINT_TEN_THOUSAND = BigInt.fromI32(10000); + +export const BIGDECIMAL_ZERO = new BigDecimal(BIGINT_ZERO); +export const BIGDECIMAL_USD_PRICE = BigDecimal.fromString("1000000"); + +export const AAVE_ORACLE_DECIMALS = 8; +export const DEFAULT_USDC_DECIMALS = 6; +export const DEFAULT_DECIMALS = BigInt.fromI32(18); + +export const WETH_ADDRESS = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"; + +export const WETH_LIKE_TOKENS: Address[] = [ + Address.fromString("0xefefefefefefefefefefefefefefefefefefefef"), // egETH + Address.fromString("0xf1c9acdc66974dfb6decb12aa385b9cd01190e38"), // osETH + Address.fromString("0xac3e018457b222d93114458476f3e3416abbe38f"), // sfrxETH + Address.fromString("0xa2e3356610840701bdf5611a53974510ae27e2e1"), // wBETH +]; diff --git a/subgraphs/eigenpie/src/prices/common/types.ts b/subgraphs/eigenpie/src/prices/common/types.ts new file mode 100644 index 0000000000..bf2dfe1a41 --- /dev/null +++ b/subgraphs/eigenpie/src/prices/common/types.ts @@ -0,0 +1,147 @@ +import * as constants from "./constants"; +import { Address, BigDecimal, BigInt, ethereum } from "@graphprotocol/graph-ts"; + +export class Wrapped { + inner: T; + + constructor(inner: T) { + this.inner = inner; + } +} + +export class OracleContract { + private _contractAddress: string; + private _contractStartBlock: i32; + + constructor( + contractAddress: string = constants.NULL.TYPE_STRING, + startBlock: i32 = -1 + ) { + this._contractAddress = contractAddress; + this._contractStartBlock = startBlock; + } + + get address(): Address { + return Address.fromString(this._contractAddress); + } + + get startBlock(): BigInt { + return BigInt.fromI32(this._contractStartBlock); + } +} + +export class CustomPriceType { + // `null` indicates a reverted call. + private _usdPrice: Wrapped; + private _decimals: Wrapped; + private _oracleType: string; + private _liquidity: Wrapped; + + constructor() { + this._usdPrice = new Wrapped(constants.BIGDECIMAL_ZERO); + this._decimals = new Wrapped(constants.BIGINT_ZERO.toI32() as u8); + this._oracleType = ""; + this._liquidity = new Wrapped(constants.BIGDECIMAL_ZERO); + } + + static initialize( + _usdPrice: BigDecimal, + _decimals: i32 = 0, + _oracleType: string = "", + _liquidity: BigDecimal | null = null + ): CustomPriceType { + const result = new CustomPriceType(); + result._usdPrice = new Wrapped(_usdPrice); + result._decimals = new Wrapped(_decimals as u8); + result._oracleType = _oracleType; + if (_liquidity) result._liquidity = new Wrapped(_liquidity); + + return result; + } + + get reverted(): bool { + return this._usdPrice.inner == constants.BIGDECIMAL_ZERO; + } + + get usdPrice(): BigDecimal { + return changetype>(this._usdPrice).inner.div( + constants.BIGINT_TEN.pow(this.decimals as u8).toBigDecimal() + ); + } + + get decimals(): i32 { + return changetype>(this._decimals).inner; + } + + get oracleType(): string { + return this._oracleType; + } + + get liquidity(): BigDecimal { + return this._liquidity.inner; + } + + setLiquidity(liquidity: BigDecimal): void { + this._liquidity = new Wrapped(liquidity); + } +} + +export interface OracleConfig { + oracleCount(): number; + oracleOrder(): string[]; +} + +export class OracleType { + oracleCount: number; + oracleOrder: string[]; + + constructor() { + this.oracleCount = constants.INT_ONE; + this.oracleOrder = [ + constants.OracleType.YEARN_LENS_ORACLE, + constants.OracleType.CHAINLINK_FEED, + constants.OracleType.CURVE_CALCULATIONS, + constants.OracleType.SUSHI_CALCULATIONS, + constants.OracleType.CURVE_ROUTER, + constants.OracleType.UNISWAP_FORKS_ROUTER, + ]; + } + + setOracleConfig(override: OracleConfig): void { + this.oracleCount = override.oracleCount(); + this.oracleOrder = override.oracleOrder(); + } +} + +export interface Configurations { + network(): string; + + yearnLens(): OracleContract; + chainLink(): OracleContract; + yearnLensBlacklist(): Address[]; + + aaveOracle(): OracleContract; + aaveOracleBlacklist(): Address[]; + + curveCalculations(): OracleContract; + curveCalculationsBlacklist(): Address[]; + + sushiCalculations(): OracleContract; + sushiCalculationsBlacklist(): Address[]; + + uniswapForks(): OracleContract[]; + curveRegistry(): OracleContract[]; + + hardcodedStables(): Address[]; + + ethAddress(): Address; + wethAddress(): Address; + usdcAddress(): Address; + + usdcTokenDecimals(): BigInt; + + getOracleOverride( + tokenAddr: Address | null, + block: ethereum.Block | null + ): OracleConfig | null; +} diff --git a/subgraphs/eigenpie/src/prices/common/utils.ts b/subgraphs/eigenpie/src/prices/common/utils.ts new file mode 100644 index 0000000000..28ec747b38 --- /dev/null +++ b/subgraphs/eigenpie/src/prices/common/utils.ts @@ -0,0 +1,181 @@ +import * as BSC from "../config/bsc"; +import * as CELO from "../config/celo"; +import * as FUSE from "../config/fuse"; +import * as XDAI from "../config/gnosis"; +import * as CRONOS from "../config/cronos"; +import * as AURORA from "../config/aurora"; +import * as FANTOM from "../config/fantom"; +import * as POLYGON from "../config/polygon"; +import * as MAINNET from "../config/mainnet"; +import * as HARMONY from "../config/harmony"; +import * as MOONBEAM from "../config/moonbeam"; +import * as OPTIMISM from "../config/optimism"; +import * as AVALANCHE from "../config/avalanche"; +import * as ARBITRUM_ONE from "../config/arbitrum"; + +import { Configurations, CustomPriceType } from "./types"; +import * as constants from "./constants"; +import * as TEMPLATE from "../config/template"; +import { _ERC20 } from "../../../generated/EigenConfig/_ERC20"; +import { + Address, + BigInt, + BigDecimal, + dataSource, + ethereum, +} from "@graphprotocol/graph-ts"; + +export function isNullAddress(tokenAddr: Address): boolean { + return tokenAddr.equals(constants.NULL.TYPE_ADDRESS); +} + +export function bigIntToBigDecimal( + quantity: BigInt, + decimals: i32 = constants.DEFAULT_DECIMALS.toI32() +): BigDecimal { + return quantity.divDecimal( + constants.BIGINT_TEN.pow(decimals as u8).toBigDecimal() + ); +} + +export function readValue( + callResult: ethereum.CallResult, + defaultValue: T +): T { + return callResult.reverted ? defaultValue : callResult.value; +} + +export function getTokenName(tokenAddr: Address): string { + const tokenContract = _ERC20.bind(tokenAddr); + const name = readValue(tokenContract.try_name(), ""); + + return name; +} + +export function getTokenDecimals(tokenAddr: Address): BigInt { + const tokenContract = _ERC20.bind(tokenAddr); + + const decimals = readValue( + tokenContract.try_decimals(), + constants.DEFAULT_DECIMALS + ); + + return decimals; +} + +export function getTokenSupply(tokenAddr: Address): BigInt { + const tokenContract = _ERC20.bind(tokenAddr); + + const totalSupply = readValue( + tokenContract.try_totalSupply(), + constants.BIGINT_ONE + ); + + return totalSupply; +} + +export function getConfig(): Configurations { + const network = dataSource.network(); + + if (network == XDAI.NETWORK_STRING) { + return new XDAI.config(); + } else if (network == AURORA.NETWORK_STRING) { + return new AURORA.config(); + } else if (network == BSC.NETWORK_STRING) { + return new BSC.config(); + } else if (network == FANTOM.NETWORK_STRING) { + return new FANTOM.config(); + } else if (network == POLYGON.NETWORK_STRING) { + return new POLYGON.config(); + } else if (network == MAINNET.NETWORK_STRING) { + return new MAINNET.config(); + } else if (network == HARMONY.NETWORK_STRING) { + return new HARMONY.config(); + } else if (network == MOONBEAM.NETWORK_STRING) { + return new MOONBEAM.config(); + } else if (network == OPTIMISM.NETWORK_STRING) { + return new OPTIMISM.config(); + } else if (network == AVALANCHE.NETWORK_STRING) { + return new AVALANCHE.config(); + } else if (network == ARBITRUM_ONE.NETWORK_STRING) { + return new ARBITRUM_ONE.config(); + } else if (network == CRONOS.NETWORK_STRING) { + return new CRONOS.config(); + } else if (network == CELO.NETWORK_STRING) { + return new CELO.config(); + } else if (network == FUSE.NETWORK_STRING) { + return new FUSE.config(); + } + + return new TEMPLATE.config(); +} + +function sortByPrices(prices: CustomPriceType[]): CustomPriceType[] { + const pricesSorted = prices.sort(function (a, b) { + const x = a.usdPrice; + const y = b.usdPrice; + + if (x < y) return -1; + if (x > y) return 1; + return 0; + }); + + return pricesSorted; +} + +function pairwiseDiffOfPrices(prices: CustomPriceType[]): BigDecimal[] { + const diff: BigDecimal[] = []; + for (let i = 1; i < prices.length; i++) { + const x = prices[i].usdPrice; + const y = prices[i - 1].usdPrice; + + diff.push(x.minus(y)); + } + + return diff; +} + +export function kClosestPrices( + k: i32, + prices: CustomPriceType[] +): CustomPriceType[] { + // sort by USD prices + const pricesSorted = sortByPrices(prices); + + // pairwise difference in USD prices + const pairwiseDiff = pairwiseDiffOfPrices(pricesSorted); + + // k minimum difference values and their original indexes + const pairwiseDiffCopy = pairwiseDiff.map((x: BigDecimal) => x); + const pairwiseDiffSortedSlice = pairwiseDiffCopy.sort().slice(0, k); + const minDiffAtIdx: i32[] = []; + for (let i = 0; i < pairwiseDiffSortedSlice.length; i++) { + const idx = pairwiseDiff.indexOf(pairwiseDiffSortedSlice[i]); + minDiffAtIdx.push(idx as i32); + } + + // k closest USD price values + const kClosestPrices: CustomPriceType[] = []; + for (let i = 0; i < minDiffAtIdx.length; i++) { + if (!kClosestPrices.includes(pricesSorted[minDiffAtIdx[i]])) { + kClosestPrices.push(pricesSorted[minDiffAtIdx[i]]); + } + if (!kClosestPrices.includes(pricesSorted[minDiffAtIdx[i] + 1])) { + kClosestPrices.push(pricesSorted[minDiffAtIdx[i] + 1]); + } + } + + return kClosestPrices; +} + +export function averagePrice(prices: CustomPriceType[]): CustomPriceType { + let summationUSDPrice = constants.BIGDECIMAL_ZERO; + for (let i = 0; i < prices.length; i++) { + summationUSDPrice = summationUSDPrice.plus(prices[i].usdPrice); + } + + return CustomPriceType.initialize( + summationUSDPrice.div(new BigDecimal(BigInt.fromI32(prices.length as i32))), + constants.DEFAULT_USDC_DECIMALS + ); +} diff --git a/subgraphs/eigenpie/src/prices/config/arbitrum.ts b/subgraphs/eigenpie/src/prices/config/arbitrum.ts new file mode 100644 index 0000000000..bf39a7b81b --- /dev/null +++ b/subgraphs/eigenpie/src/prices/config/arbitrum.ts @@ -0,0 +1,146 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import * as constants from "../common/constants"; +import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts"; +import { Configurations, OracleConfig, OracleContract } from "../common/types"; + +export const NETWORK_STRING = "arbitrum-one"; + +/////////////////////////////////////////////////////////////////////////// +///////////////////// CALCULATIONS/ORACLE CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_CONTRACT_ADDRESS = new OracleContract( + "0x043518ab266485dc085a1db095b8d9c2fc78e9b9", + 2396321 +); +export const AAVE_ORACLE_CONTRACT_ADDRESS = new OracleContract( + "0xb56c2f0b653b2e0b10c9b928c8580ac5df02c7c7", + 7740843 +); +export const SUSHISWAP_CALCULATIONS_ADDRESS = new OracleContract( + "0x5ea7e501c9a23f4a76dc7d33a11d995b13a1dd25", + 2396120 +); +export const CHAIN_LINK_CONTRACT_ADDRESS = new OracleContract(); + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////// CURVE CONTRACT ////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const CURVE_CALCULATIONS_ADDRESS = new OracleContract( + "0x3268c3bda100ef0ff3c2d044f23eab62c80d78d2", + 11707234 +); + +export const CURVE_REGISTRY_ADDRESSES: OracleContract[] = [ + new OracleContract("0x445fe580ef8d70ff569ab36e80c647af338db351", 1362056), + new OracleContract("0x0e9fbb167df83ede3240d6a5fa5d40c6c6851e15", 4530115), +]; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// UNISWAP FORKS CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const UNISWAP_FORKS_ROUTER_ADDRESSES: OracleContract[] = [ + new OracleContract("0x1b02da8cb0d097eb8d57a175b88c7d8b47997506", 73), // SushiSwap +]; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// BLACKLISTED TOKENS //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_BLACKLIST: Address[] = []; +export const AAVE_ORACLE_BLACKLIST: Address[] = []; +export const CURVE_CALCULATIONS_BLACKSLIST: Address[] = []; +export const SUSHI_CALCULATIONS_BLACKSLIST: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +//////////////////////////// HARDCODED STABLES //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const HARDCODED_STABLES: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////////// HELPERS ///////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const USDC_TOKEN_DECIMALS = BigInt.fromI32(6); + +export const ETH_ADDRESS = Address.fromString( + "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" +); +export const WETH_ADDRESS = Address.fromString( + "0x82af49447d8a07e3bd95bd0d56f35241523fbab1" +); +export const USDC_ADDRESS = Address.fromString( + "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8" +); + +export class config implements Configurations { + network(): string { + return NETWORK_STRING; + } + + yearnLens(): OracleContract { + return YEARN_LENS_CONTRACT_ADDRESS; + } + chainLink(): OracleContract { + return CHAIN_LINK_CONTRACT_ADDRESS; + } + yearnLensBlacklist(): Address[] { + return YEARN_LENS_BLACKLIST; + } + + aaveOracle(): OracleContract { + return AAVE_ORACLE_CONTRACT_ADDRESS; + } + aaveOracleBlacklist(): Address[] { + return AAVE_ORACLE_BLACKLIST; + } + + curveCalculations(): OracleContract { + return CURVE_CALCULATIONS_ADDRESS; + } + curveCalculationsBlacklist(): Address[] { + return CURVE_CALCULATIONS_BLACKSLIST; + } + + sushiCalculations(): OracleContract { + return SUSHISWAP_CALCULATIONS_ADDRESS; + } + sushiCalculationsBlacklist(): Address[] { + return SUSHI_CALCULATIONS_BLACKSLIST; + } + + uniswapForks(): OracleContract[] { + return UNISWAP_FORKS_ROUTER_ADDRESSES; + } + curveRegistry(): OracleContract[] { + return CURVE_REGISTRY_ADDRESSES; + } + + hardcodedStables(): Address[] { + return HARDCODED_STABLES; + } + + ethAddress(): Address { + return ETH_ADDRESS; + } + wethAddress(): Address { + return WETH_ADDRESS; + } + usdcAddress(): Address { + return USDC_ADDRESS; + } + + usdcTokenDecimals(): BigInt { + return USDC_TOKEN_DECIMALS; + } + + getOracleOverride( + tokenAddr: Address | null, + block: ethereum.Block | null + ): OracleConfig | null { + return null; + } +} diff --git a/subgraphs/eigenpie/src/prices/config/aurora.ts b/subgraphs/eigenpie/src/prices/config/aurora.ts new file mode 100644 index 0000000000..d3b303b815 --- /dev/null +++ b/subgraphs/eigenpie/src/prices/config/aurora.ts @@ -0,0 +1,133 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import * as constants from "../common/constants"; +import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts"; +import { Configurations, OracleConfig, OracleContract } from "../common/types"; + +export const NETWORK_STRING = "aurora"; + +/////////////////////////////////////////////////////////////////////////// +///////////////////// CALCULATIONS/ORACLE CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_CONTRACT_ADDRESS = new OracleContract(); +export const CHAIN_LINK_CONTRACT_ADDRESS = new OracleContract(); +export const AAVE_ORACLE_CONTRACT_ADDRESS = new OracleContract(); +export const SUSHISWAP_CALCULATIONS_ADDRESS = new OracleContract(); + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////// CURVE CONTRACT ////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const CURVE_CALCULATIONS_ADDRESS = new OracleContract(); + +export const CURVE_REGISTRY_ADDRESSES: OracleContract[] = [ + new OracleContract("0x5b5cfe992adac0c9d48e05854b2d91c73a003858", 62440526), +]; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// UNISWAP FORKS CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const UNISWAP_FORKS_ROUTER_ADDRESSES: OracleContract[] = [ + new OracleContract("0x2cb45edb4517d5947afde3beabf95a582506858b", 49607893), // TriSolaris +]; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// BLACKLISTED TOKENS //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_BLACKLIST: Address[] = []; +export const AAVE_ORACLE_BLACKLIST: Address[] = []; +export const CURVE_CALCULATIONS_BLACKSLIST: Address[] = []; +export const SUSHI_CALCULATIONS_BLACKSLIST: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +//////////////////////////// HARDCODED STABLES //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const HARDCODED_STABLES: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////////// HELPERS ///////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const USDC_TOKEN_DECIMALS = BigInt.fromI32(6); + +export const ETH_ADDRESS = Address.fromString( + "0x8bec47865ade3b172a928df8f990bc7f2a3b9f79" // Aurora +); +export const WETH_ADDRESS = Address.fromString( + "0xc9bdeed33cd01541e1eed10f90519d2c06fe3feb" // WETH +); +export const USDC_ADDRESS = Address.fromString( + "0xb12bfca5a55806aaf64e99521918a4bf0fc40802" +); + +export class config implements Configurations { + network(): string { + return NETWORK_STRING; + } + + yearnLens(): OracleContract { + return YEARN_LENS_CONTRACT_ADDRESS; + } + chainLink(): OracleContract { + return CHAIN_LINK_CONTRACT_ADDRESS; + } + yearnLensBlacklist(): Address[] { + return YEARN_LENS_BLACKLIST; + } + + aaveOracle(): OracleContract { + return AAVE_ORACLE_CONTRACT_ADDRESS; + } + aaveOracleBlacklist(): Address[] { + return AAVE_ORACLE_BLACKLIST; + } + + curveCalculations(): OracleContract { + return CURVE_CALCULATIONS_ADDRESS; + } + curveCalculationsBlacklist(): Address[] { + return CURVE_CALCULATIONS_BLACKSLIST; + } + + sushiCalculations(): OracleContract { + return SUSHISWAP_CALCULATIONS_ADDRESS; + } + sushiCalculationsBlacklist(): Address[] { + return SUSHI_CALCULATIONS_BLACKSLIST; + } + + uniswapForks(): OracleContract[] { + return UNISWAP_FORKS_ROUTER_ADDRESSES; + } + curveRegistry(): OracleContract[] { + return CURVE_REGISTRY_ADDRESSES; + } + + hardcodedStables(): Address[] { + return HARDCODED_STABLES; + } + + ethAddress(): Address { + return ETH_ADDRESS; + } + wethAddress(): Address { + return WETH_ADDRESS; + } + usdcAddress(): Address { + return USDC_ADDRESS; + } + + usdcTokenDecimals(): BigInt { + return USDC_TOKEN_DECIMALS; + } + + getOracleOverride( + tokenAddr: Address | null, + block: ethereum.Block | null + ): OracleConfig | null { + return null; + } +} diff --git a/subgraphs/eigenpie/src/prices/config/avalanche.ts b/subgraphs/eigenpie/src/prices/config/avalanche.ts new file mode 100644 index 0000000000..f40fbbf1aa --- /dev/null +++ b/subgraphs/eigenpie/src/prices/config/avalanche.ts @@ -0,0 +1,140 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import * as constants from "../common/constants"; +import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts"; +import { Configurations, OracleConfig, OracleContract } from "../common/types"; + +export const NETWORK_STRING = "avalanche"; + +/////////////////////////////////////////////////////////////////////////// +///////////////////// CALCULATIONS/ORACLE CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_CONTRACT_ADDRESS = new OracleContract(); +export const CHAIN_LINK_CONTRACT_ADDRESS = new OracleContract(); +export const SUSHISWAP_CALCULATIONS_ADDRESS = new OracleContract(); + +export const AAVE_ORACLE_CONTRACT_ADDRESS = new OracleContract( + "0xebd36016b3ed09d4693ed4251c67bd858c3c7c9c", + 11970477 +); + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////// CURVE CONTRACT ////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const CURVE_CALCULATIONS_ADDRESS = new OracleContract(); + +export const CURVE_REGISTRY_ADDRESSES: OracleContract[] = [ + new OracleContract("0x8474ddbe98f5aa3179b3b3f5942d724afcdec9f6", 5254206), + new OracleContract("0x90f421832199e93d01b64daf378b183809eb0988", 9384663), +]; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// UNISWAP FORKS CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const UNISWAP_FORKS_ROUTER_ADDRESSES: OracleContract[] = [ + new OracleContract("0x60ae616a2155ee3d9a68541ba4544862310933d4", 2486393), // TraderJOE + new OracleContract("0xe54ca86531e17ef3616d22ca28b0d458b6c89106", 56879), // Pangolin + new OracleContract("0x1b02da8cb0d097eb8d57a175b88c7d8b47997506", 506236), // Sushiswap +]; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// BLACKLISTED TOKENS //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_BLACKLIST: Address[] = []; +export const AAVE_ORACLE_BLACKLIST: Address[] = []; +export const CURVE_CALCULATIONS_BLACKSLIST: Address[] = []; +export const SUSHI_CALCULATIONS_BLACKSLIST: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +//////////////////////////// HARDCODED STABLES //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const HARDCODED_STABLES: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////////// HELPERS ///////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const USDC_TOKEN_DECIMALS = BigInt.fromI32(6); + +export const ETH_ADDRESS = Address.fromString( + "0x49d5c2bdffac6ce2bfdb6640f4f80f226bc10bab" +); +export const WETH_ADDRESS = Address.fromString( + "0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7" +); +export const USDC_ADDRESS = Address.fromString( + "0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e" +); + +export class config implements Configurations { + network(): string { + return NETWORK_STRING; + } + + yearnLens(): OracleContract { + return YEARN_LENS_CONTRACT_ADDRESS; + } + chainLink(): OracleContract { + return CHAIN_LINK_CONTRACT_ADDRESS; + } + yearnLensBlacklist(): Address[] { + return YEARN_LENS_BLACKLIST; + } + + aaveOracle(): OracleContract { + return AAVE_ORACLE_CONTRACT_ADDRESS; + } + aaveOracleBlacklist(): Address[] { + return AAVE_ORACLE_BLACKLIST; + } + + curveCalculations(): OracleContract { + return CURVE_CALCULATIONS_ADDRESS; + } + curveCalculationsBlacklist(): Address[] { + return CURVE_CALCULATIONS_BLACKSLIST; + } + + sushiCalculations(): OracleContract { + return SUSHISWAP_CALCULATIONS_ADDRESS; + } + sushiCalculationsBlacklist(): Address[] { + return SUSHI_CALCULATIONS_BLACKSLIST; + } + + uniswapForks(): OracleContract[] { + return UNISWAP_FORKS_ROUTER_ADDRESSES; + } + curveRegistry(): OracleContract[] { + return CURVE_REGISTRY_ADDRESSES; + } + + hardcodedStables(): Address[] { + return HARDCODED_STABLES; + } + + ethAddress(): Address { + return ETH_ADDRESS; + } + wethAddress(): Address { + return WETH_ADDRESS; + } + usdcAddress(): Address { + return USDC_ADDRESS; + } + + usdcTokenDecimals(): BigInt { + return USDC_TOKEN_DECIMALS; + } + + getOracleOverride( + tokenAddr: Address | null, + block: ethereum.Block | null + ): OracleConfig | null { + return null; + } +} diff --git a/subgraphs/eigenpie/src/prices/config/bsc.ts b/subgraphs/eigenpie/src/prices/config/bsc.ts new file mode 100644 index 0000000000..0d00234608 --- /dev/null +++ b/subgraphs/eigenpie/src/prices/config/bsc.ts @@ -0,0 +1,130 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import * as constants from "../common/constants"; +import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts"; +import { Configurations, OracleConfig, OracleContract } from "../common/types"; + +export const NETWORK_STRING = "bsc"; + +/////////////////////////////////////////////////////////////////////////// +///////////////////// CALCULATIONS/ORACLE CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_CONTRACT_ADDRESS = new OracleContract(); +export const CHAIN_LINK_CONTRACT_ADDRESS = new OracleContract(); +export const AAVE_ORACLE_CONTRACT_ADDRESS = new OracleContract(); +export const SUSHISWAP_CALCULATIONS_ADDRESS = new OracleContract(); + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////// CURVE CONTRACT ////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const CURVE_CALCULATIONS_ADDRESS = new OracleContract(); + +export const CURVE_REGISTRY_ADDRESSES: OracleContract[] = []; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// UNISWAP FORKS CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const UNISWAP_FORKS_ROUTER_ADDRESSES: OracleContract[] = [ + new OracleContract("0x10ed43c718714eb63d5aa57b78b54704e256024e", 6810080), // PancakeSwap v2 + new OracleContract("0x05ff2b0db69458a0750badebc4f9e13add608c7f", 586899), // PancakeSwap v1 +]; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// BLACKLISTED TOKENS //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_BLACKLIST: Address[] = []; +export const AAVE_ORACLE_BLACKLIST: Address[] = []; +export const CURVE_CALCULATIONS_BLACKSLIST: Address[] = []; +export const SUSHI_CALCULATIONS_BLACKSLIST: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +//////////////////////////// HARDCODED STABLES //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const HARDCODED_STABLES: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////////// HELPERS ///////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const USDC_TOKEN_DECIMALS = BigInt.fromI32(18); + +export const ETH_ADDRESS = constants.NULL.TYPE_ADDRESS; +export const WETH_ADDRESS = Address.fromString( + "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c" +); +export const USDC_ADDRESS = Address.fromString( + "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d" +); + +export class config implements Configurations { + network(): string { + return NETWORK_STRING; + } + + yearnLens(): OracleContract { + return YEARN_LENS_CONTRACT_ADDRESS; + } + chainLink(): OracleContract { + return CHAIN_LINK_CONTRACT_ADDRESS; + } + yearnLensBlacklist(): Address[] { + return YEARN_LENS_BLACKLIST; + } + + aaveOracle(): OracleContract { + return AAVE_ORACLE_CONTRACT_ADDRESS; + } + aaveOracleBlacklist(): Address[] { + return AAVE_ORACLE_BLACKLIST; + } + + curveCalculations(): OracleContract { + return CURVE_CALCULATIONS_ADDRESS; + } + curveCalculationsBlacklist(): Address[] { + return CURVE_CALCULATIONS_BLACKSLIST; + } + + sushiCalculations(): OracleContract { + return SUSHISWAP_CALCULATIONS_ADDRESS; + } + sushiCalculationsBlacklist(): Address[] { + return SUSHI_CALCULATIONS_BLACKSLIST; + } + + uniswapForks(): OracleContract[] { + return UNISWAP_FORKS_ROUTER_ADDRESSES; + } + curveRegistry(): OracleContract[] { + return CURVE_REGISTRY_ADDRESSES; + } + + hardcodedStables(): Address[] { + return HARDCODED_STABLES; + } + + ethAddress(): Address { + return ETH_ADDRESS; + } + wethAddress(): Address { + return WETH_ADDRESS; + } + usdcAddress(): Address { + return USDC_ADDRESS; + } + + usdcTokenDecimals(): BigInt { + return USDC_TOKEN_DECIMALS; + } + + getOracleOverride( + tokenAddr: Address | null, + block: ethereum.Block | null + ): OracleConfig | null { + return null; + } +} diff --git a/subgraphs/eigenpie/src/prices/config/celo.ts b/subgraphs/eigenpie/src/prices/config/celo.ts new file mode 100644 index 0000000000..1e961cb575 --- /dev/null +++ b/subgraphs/eigenpie/src/prices/config/celo.ts @@ -0,0 +1,132 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import * as constants from "../common/constants"; +import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts"; +import { Configurations, OracleConfig, OracleContract } from "../common/types"; + +export const NETWORK_STRING = "celo"; + +/////////////////////////////////////////////////////////////////////////// +///////////////////// CALCULATIONS/ORACLE CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_CONTRACT_ADDRESS = new OracleContract(); +export const CHAIN_LINK_CONTRACT_ADDRESS = new OracleContract(); +export const AAVE_ORACLE_CONTRACT_ADDRESS = new OracleContract(); +export const SUSHISWAP_CALCULATIONS_ADDRESS = new OracleContract(); + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////// CURVE CONTRACT ////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const CURVE_CALCULATIONS_ADDRESS = new OracleContract(); + +export const CURVE_REGISTRY_ADDRESSES: OracleContract[] = []; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// UNISWAP FORKS CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const UNISWAP_FORKS_ROUTER_ADDRESSES: OracleContract[] = [ + new OracleContract("0xe3d8bd6aed4f159bc8000a9cd47cffdb95f96121", 5272598), // Ubeswap + new OracleContract("0x1b02da8cb0d097eb8d57a175b88c7d8b47997506", 7254057), // Sushiswap +]; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// BLACKLISTED TOKENS //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_BLACKLIST: Address[] = []; +export const AAVE_ORACLE_BLACKLIST: Address[] = []; +export const CURVE_CALCULATIONS_BLACKSLIST: Address[] = []; +export const SUSHI_CALCULATIONS_BLACKSLIST: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +//////////////////////////// HARDCODED STABLES //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const HARDCODED_STABLES: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////////// HELPERS ///////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const USDC_TOKEN_DECIMALS = BigInt.fromI32(6); + +export const ETH_ADDRESS = Address.fromString( + "0x122013fd7df1c6f636a5bb8f03108e876548b455" +); +export const WETH_ADDRESS = Address.fromString( + "0x471ece3750da237f93b8e339c536989b8978a438" // Celo native asset (CELO) +); +export const USDC_ADDRESS = Address.fromString( + "0x37f750b7cc259a2f741af45294f6a16572cf5cad" +); + +export class config implements Configurations { + network(): string { + return NETWORK_STRING; + } + + yearnLens(): OracleContract { + return YEARN_LENS_CONTRACT_ADDRESS; + } + chainLink(): OracleContract { + return CHAIN_LINK_CONTRACT_ADDRESS; + } + yearnLensBlacklist(): Address[] { + return YEARN_LENS_BLACKLIST; + } + + aaveOracle(): OracleContract { + return AAVE_ORACLE_CONTRACT_ADDRESS; + } + aaveOracleBlacklist(): Address[] { + return AAVE_ORACLE_BLACKLIST; + } + + curveCalculations(): OracleContract { + return CURVE_CALCULATIONS_ADDRESS; + } + curveCalculationsBlacklist(): Address[] { + return CURVE_CALCULATIONS_BLACKSLIST; + } + + sushiCalculations(): OracleContract { + return SUSHISWAP_CALCULATIONS_ADDRESS; + } + sushiCalculationsBlacklist(): Address[] { + return SUSHI_CALCULATIONS_BLACKSLIST; + } + + uniswapForks(): OracleContract[] { + return UNISWAP_FORKS_ROUTER_ADDRESSES; + } + curveRegistry(): OracleContract[] { + return CURVE_REGISTRY_ADDRESSES; + } + + hardcodedStables(): Address[] { + return HARDCODED_STABLES; + } + + ethAddress(): Address { + return ETH_ADDRESS; + } + wethAddress(): Address { + return WETH_ADDRESS; + } + usdcAddress(): Address { + return USDC_ADDRESS; + } + + usdcTokenDecimals(): BigInt { + return USDC_TOKEN_DECIMALS; + } + + getOracleOverride( + tokenAddr: Address | null, + block: ethereum.Block | null + ): OracleConfig | null { + return null; + } +} diff --git a/subgraphs/eigenpie/src/prices/config/cronos.ts b/subgraphs/eigenpie/src/prices/config/cronos.ts new file mode 100644 index 0000000000..5149b29d2a --- /dev/null +++ b/subgraphs/eigenpie/src/prices/config/cronos.ts @@ -0,0 +1,131 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import * as constants from "../common/constants"; +import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts"; +import { Configurations, OracleConfig, OracleContract } from "../common/types"; + +export const NETWORK_STRING = "cronos"; + +/////////////////////////////////////////////////////////////////////////// +///////////////////// CALCULATIONS/ORACLE CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_CONTRACT_ADDRESS = new OracleContract(); +export const CHAIN_LINK_CONTRACT_ADDRESS = new OracleContract(); +export const AAVE_ORACLE_CONTRACT_ADDRESS = new OracleContract(); +export const SUSHISWAP_CALCULATIONS_ADDRESS = new OracleContract(); + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////// CURVE CONTRACT ////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const CURVE_CALCULATIONS_ADDRESS = new OracleContract(); + +export const CURVE_REGISTRY_ADDRESSES: OracleContract[] = []; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// UNISWAP FORKS CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const UNISWAP_FORKS_ROUTER_ADDRESSES: OracleContract[] = [ + new OracleContract("0x145863eb42cf62847a6ca784e6416c1682b1b2ae", 5247), // VVS Finance +]; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// BLACKLISTED TOKENS //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_BLACKLIST: Address[] = []; +export const AAVE_ORACLE_BLACKLIST: Address[] = []; +export const CURVE_CALCULATIONS_BLACKSLIST: Address[] = []; +export const SUSHI_CALCULATIONS_BLACKSLIST: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +//////////////////////////// HARDCODED STABLES //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const HARDCODED_STABLES: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////////// HELPERS ///////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const USDC_TOKEN_DECIMALS = BigInt.fromI32(6); + +export const ETH_ADDRESS = Address.fromString( + "0xe44fd7fcb2b1581822d0c862b68222998a0c299a" +); +export const WETH_ADDRESS = Address.fromString( + "0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23" // Wrapped CRO (WCRO) +); +export const USDC_ADDRESS = Address.fromString( + "0xc21223249ca28397b4b6541dffaecc539bff0c59" +); + +export class config implements Configurations { + network(): string { + return NETWORK_STRING; + } + + yearnLens(): OracleContract { + return YEARN_LENS_CONTRACT_ADDRESS; + } + chainLink(): OracleContract { + return CHAIN_LINK_CONTRACT_ADDRESS; + } + yearnLensBlacklist(): Address[] { + return YEARN_LENS_BLACKLIST; + } + + aaveOracle(): OracleContract { + return AAVE_ORACLE_CONTRACT_ADDRESS; + } + aaveOracleBlacklist(): Address[] { + return AAVE_ORACLE_BLACKLIST; + } + + curveCalculations(): OracleContract { + return CURVE_CALCULATIONS_ADDRESS; + } + curveCalculationsBlacklist(): Address[] { + return CURVE_CALCULATIONS_BLACKSLIST; + } + + sushiCalculations(): OracleContract { + return SUSHISWAP_CALCULATIONS_ADDRESS; + } + sushiCalculationsBlacklist(): Address[] { + return SUSHI_CALCULATIONS_BLACKSLIST; + } + + uniswapForks(): OracleContract[] { + return UNISWAP_FORKS_ROUTER_ADDRESSES; + } + curveRegistry(): OracleContract[] { + return CURVE_REGISTRY_ADDRESSES; + } + + hardcodedStables(): Address[] { + return HARDCODED_STABLES; + } + + ethAddress(): Address { + return ETH_ADDRESS; + } + wethAddress(): Address { + return WETH_ADDRESS; + } + usdcAddress(): Address { + return USDC_ADDRESS; + } + + usdcTokenDecimals(): BigInt { + return USDC_TOKEN_DECIMALS; + } + + getOracleOverride( + tokenAddr: Address | null, + block: ethereum.Block | null + ): OracleConfig | null { + return null; + } +} diff --git a/subgraphs/eigenpie/src/prices/config/fantom.ts b/subgraphs/eigenpie/src/prices/config/fantom.ts new file mode 100644 index 0000000000..22920117cc --- /dev/null +++ b/subgraphs/eigenpie/src/prices/config/fantom.ts @@ -0,0 +1,145 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import * as constants from "../common/constants"; +import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts"; +import { Configurations, OracleConfig, OracleContract } from "../common/types"; + +export const NETWORK_STRING = "fantom"; + +/////////////////////////////////////////////////////////////////////////// +///////////////////// CALCULATIONS/ORACLE CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_CONTRACT_ADDRESS = new OracleContract( + "0x57aa88a0810dfe3f9b71a9b179dd8bf5f956c46a", + 17091856 +); +export const CHAIN_LINK_CONTRACT_ADDRESS = new OracleContract(); +export const AAVE_ORACLE_CONTRACT_ADDRESS = new OracleContract(); +export const SUSHISWAP_CALCULATIONS_ADDRESS = new OracleContract( + "0x44536de2220987d098d1d29d3aafc7f7348e9ee4", + 3809480 +); + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////// CURVE CONTRACT ////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const CURVE_CALCULATIONS_ADDRESS = new OracleContract( + "0x0b53e9df372e72d8fdcdbedfbb56059957a37128", + 27067399 +); + +export const CURVE_REGISTRY_ADDRESSES: OracleContract[] = [ + new OracleContract("0x0f854ea9f38cea4b1c2fc79047e9d0134419d5d6", 5655918), + new OracleContract("0x4fb93d7d320e8a263f22f62c2059dfc2a8bcbc4c", 27552509), +]; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// UNISWAP FORKS CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const UNISWAP_FORKS_ROUTER_ADDRESSES: OracleContract[] = [ + new OracleContract("0xbe4fc72f8293f9d3512d58b969c98c3f676cb957", 3796241), // Uniswap v2 + new OracleContract("0x16327e3fbdaca3bcf7e38f5af2599d2ddc33ae52", 4250168), // Spiritswap + new OracleContract("0x1b02da8cb0d097eb8d57a175b88c7d8b47997506", 2457904), // Sushiswap +]; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// BLACKLISTED TOKENS //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_BLACKLIST: Address[] = []; +export const AAVE_ORACLE_BLACKLIST: Address[] = []; +export const CURVE_CALCULATIONS_BLACKSLIST: Address[] = []; +export const SUSHI_CALCULATIONS_BLACKSLIST: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +//////////////////////////// HARDCODED STABLES //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const HARDCODED_STABLES: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////////// HELPERS ///////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const USDC_TOKEN_DECIMALS = BigInt.fromI32(6); + +export const ETH_ADDRESS = Address.fromString( + "0x658b0c7613e890ee50b8c4bc6a3f41ef411208ad" +); +export const WETH_ADDRESS = Address.fromString( + "0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83" +); +export const USDC_ADDRESS = Address.fromString( + "0x04068da6c83afcfa0e13ba15a6696662335d5b75" +); + +export class config implements Configurations { + network(): string { + return NETWORK_STRING; + } + + yearnLens(): OracleContract { + return YEARN_LENS_CONTRACT_ADDRESS; + } + chainLink(): OracleContract { + return CHAIN_LINK_CONTRACT_ADDRESS; + } + yearnLensBlacklist(): Address[] { + return YEARN_LENS_BLACKLIST; + } + + aaveOracle(): OracleContract { + return AAVE_ORACLE_CONTRACT_ADDRESS; + } + aaveOracleBlacklist(): Address[] { + return AAVE_ORACLE_BLACKLIST; + } + + curveCalculations(): OracleContract { + return CURVE_CALCULATIONS_ADDRESS; + } + curveCalculationsBlacklist(): Address[] { + return CURVE_CALCULATIONS_BLACKSLIST; + } + + sushiCalculations(): OracleContract { + return SUSHISWAP_CALCULATIONS_ADDRESS; + } + sushiCalculationsBlacklist(): Address[] { + return SUSHI_CALCULATIONS_BLACKSLIST; + } + + uniswapForks(): OracleContract[] { + return UNISWAP_FORKS_ROUTER_ADDRESSES; + } + curveRegistry(): OracleContract[] { + return CURVE_REGISTRY_ADDRESSES; + } + + hardcodedStables(): Address[] { + return HARDCODED_STABLES; + } + + ethAddress(): Address { + return ETH_ADDRESS; + } + wethAddress(): Address { + return WETH_ADDRESS; + } + usdcAddress(): Address { + return USDC_ADDRESS; + } + + usdcTokenDecimals(): BigInt { + return USDC_TOKEN_DECIMALS; + } + + getOracleOverride( + tokenAddr: Address | null, + block: ethereum.Block | null + ): OracleConfig | null { + return null; + } +} diff --git a/subgraphs/eigenpie/src/prices/config/fuse.ts b/subgraphs/eigenpie/src/prices/config/fuse.ts new file mode 100644 index 0000000000..87078fc497 --- /dev/null +++ b/subgraphs/eigenpie/src/prices/config/fuse.ts @@ -0,0 +1,132 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import * as constants from "../common/constants"; +import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts"; +import { Configurations, OracleConfig, OracleContract } from "../common/types"; + +export const NETWORK_STRING = "fuse"; + +/////////////////////////////////////////////////////////////////////////// +///////////////////// CALCULATIONS/ORACLE CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_CONTRACT_ADDRESS = new OracleContract(); +export const CHAIN_LINK_CONTRACT_ADDRESS = new OracleContract(); +export const AAVE_ORACLE_CONTRACT_ADDRESS = new OracleContract(); +export const SUSHISWAP_CALCULATIONS_ADDRESS = new OracleContract(); + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////// CURVE CONTRACT ////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const CURVE_CALCULATIONS_ADDRESS = new OracleContract(); + +export const CURVE_REGISTRY_ADDRESSES: OracleContract[] = []; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// UNISWAP FORKS CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const UNISWAP_FORKS_ROUTER_ADDRESSES: OracleContract[] = [ + new OracleContract("0xe3f85aad0c8dd7337427b9df5d0fb741d65eeeb5", 15645719), // Voltage Finance + new OracleContract("0x1b02da8cb0d097eb8d57a175b88c7d8b47997506", 12936314), // Sushiswap +]; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// BLACKLISTED TOKENS //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_BLACKLIST: Address[] = []; +export const AAVE_ORACLE_BLACKLIST: Address[] = []; +export const CURVE_CALCULATIONS_BLACKSLIST: Address[] = []; +export const SUSHI_CALCULATIONS_BLACKSLIST: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +//////////////////////////// HARDCODED STABLES //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const HARDCODED_STABLES: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////////// HELPERS ///////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const USDC_TOKEN_DECIMALS = BigInt.fromI32(6); + +export const ETH_ADDRESS = Address.fromString( + "0xa722c13135930332eb3d749b2f0906559d2c5b99" +); +export const WETH_ADDRESS = Address.fromString( + "0x0be9e53fd7edac9f859882afdda116645287c629" // Wrapped Fuse (WFUSE) +); +export const USDC_ADDRESS = Address.fromString( + "0x620fd5fa44be6af63715ef4e65ddfa0387ad13f5" +); + +export class config implements Configurations { + network(): string { + return NETWORK_STRING; + } + + yearnLens(): OracleContract { + return YEARN_LENS_CONTRACT_ADDRESS; + } + chainLink(): OracleContract { + return CHAIN_LINK_CONTRACT_ADDRESS; + } + yearnLensBlacklist(): Address[] { + return YEARN_LENS_BLACKLIST; + } + + aaveOracle(): OracleContract { + return AAVE_ORACLE_CONTRACT_ADDRESS; + } + aaveOracleBlacklist(): Address[] { + return AAVE_ORACLE_BLACKLIST; + } + + curveCalculations(): OracleContract { + return CURVE_CALCULATIONS_ADDRESS; + } + curveCalculationsBlacklist(): Address[] { + return CURVE_CALCULATIONS_BLACKSLIST; + } + + sushiCalculations(): OracleContract { + return SUSHISWAP_CALCULATIONS_ADDRESS; + } + sushiCalculationsBlacklist(): Address[] { + return SUSHI_CALCULATIONS_BLACKSLIST; + } + + uniswapForks(): OracleContract[] { + return UNISWAP_FORKS_ROUTER_ADDRESSES; + } + curveRegistry(): OracleContract[] { + return CURVE_REGISTRY_ADDRESSES; + } + + hardcodedStables(): Address[] { + return HARDCODED_STABLES; + } + + ethAddress(): Address { + return ETH_ADDRESS; + } + wethAddress(): Address { + return WETH_ADDRESS; + } + usdcAddress(): Address { + return USDC_ADDRESS; + } + + usdcTokenDecimals(): BigInt { + return USDC_TOKEN_DECIMALS; + } + + getOracleOverride( + tokenAddr: Address | null, + block: ethereum.Block | null + ): OracleConfig | null { + return null; + } +} diff --git a/subgraphs/eigenpie/src/prices/config/gnosis.ts b/subgraphs/eigenpie/src/prices/config/gnosis.ts new file mode 100644 index 0000000000..4d1ab5baaa --- /dev/null +++ b/subgraphs/eigenpie/src/prices/config/gnosis.ts @@ -0,0 +1,134 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import * as constants from "../common/constants"; +import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts"; +import { Configurations, OracleConfig, OracleContract } from "../common/types"; + +export const NETWORK_STRING: string = "xdai"; + +/////////////////////////////////////////////////////////////////////////// +///////////////////// CALCULATIONS/ORACLE CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_CONTRACT_ADDRESS = new OracleContract(); +export const CHAIN_LINK_CONTRACT_ADDRESS = new OracleContract(); +export const AAVE_ORACLE_CONTRACT_ADDRESS = new OracleContract(); +export const SUSHISWAP_CALCULATIONS_ADDRESS = new OracleContract(); + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////// CURVE CONTRACT ////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const CURVE_CALCULATIONS_ADDRESS = new OracleContract(); + +export const CURVE_REGISTRY_ADDRESSES: OracleContract[] = [ + new OracleContract("0x55e91365697eb8032f98290601847296ec847210", 20754886), + new OracleContract("0x8a4694401be8f8fccbc542a3219af1591f87ce17", 23334728), +]; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// UNISWAP FORKS CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const UNISWAP_FORKS_ROUTER_ADDRESSES: OracleContract[] = [ + new OracleContract("0x1b02da8cb0d097eb8d57a175b88c7d8b47997506", 14735910), // SushiSwap +]; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// BLACKLISTED TOKENS //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_BLACKLIST: Address[] = []; +export const AAVE_ORACLE_BLACKLIST: Address[] = []; +export const CURVE_CALCULATIONS_BLACKSLIST: Address[] = []; +export const SUSHI_CALCULATIONS_BLACKSLIST: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +//////////////////////////// HARDCODED STABLES //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const HARDCODED_STABLES: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////////// HELPERS ///////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const USDC_TOKEN_DECIMALS = BigInt.fromI32(6); + +export const ETH_ADDRESS = Address.fromString( + "0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1" +); +export const WETH_ADDRESS = Address.fromString( + "0xe91d153e0b41518a2ce8dd3d7944fa863463a97d" +); +export const USDC_ADDRESS = Address.fromString( + "0xddafbb505ad214d7b80b1f830fccc89b60fb7a83" +); + +export class config implements Configurations { + network(): string { + return NETWORK_STRING; + } + + yearnLens(): OracleContract { + return YEARN_LENS_CONTRACT_ADDRESS; + } + chainLink(): OracleContract { + return CHAIN_LINK_CONTRACT_ADDRESS; + } + yearnLensBlacklist(): Address[] { + return YEARN_LENS_BLACKLIST; + } + + aaveOracle(): OracleContract { + return AAVE_ORACLE_CONTRACT_ADDRESS; + } + aaveOracleBlacklist(): Address[] { + return AAVE_ORACLE_BLACKLIST; + } + + curveCalculations(): OracleContract { + return CURVE_CALCULATIONS_ADDRESS; + } + curveCalculationsBlacklist(): Address[] { + return CURVE_CALCULATIONS_BLACKSLIST; + } + + sushiCalculations(): OracleContract { + return SUSHISWAP_CALCULATIONS_ADDRESS; + } + sushiCalculationsBlacklist(): Address[] { + return SUSHI_CALCULATIONS_BLACKSLIST; + } + + uniswapForks(): OracleContract[] { + return UNISWAP_FORKS_ROUTER_ADDRESSES; + } + curveRegistry(): OracleContract[] { + return CURVE_REGISTRY_ADDRESSES; + } + + hardcodedStables(): Address[] { + return HARDCODED_STABLES; + } + + ethAddress(): Address { + return ETH_ADDRESS; + } + wethAddress(): Address { + return WETH_ADDRESS; + } + usdcAddress(): Address { + return USDC_ADDRESS; + } + + usdcTokenDecimals(): BigInt { + return USDC_TOKEN_DECIMALS; + } + + getOracleOverride( + tokenAddr: Address | null, + block: ethereum.Block | null + ): OracleConfig | null { + return null; + } +} diff --git a/subgraphs/eigenpie/src/prices/config/harmony.ts b/subgraphs/eigenpie/src/prices/config/harmony.ts new file mode 100644 index 0000000000..6f9d265210 --- /dev/null +++ b/subgraphs/eigenpie/src/prices/config/harmony.ts @@ -0,0 +1,136 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import * as constants from "../common/constants"; +import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts"; +import { Configurations, OracleConfig, OracleContract } from "../common/types"; + +export const NETWORK_STRING = "harmony"; + +/////////////////////////////////////////////////////////////////////////// +///////////////////// CALCULATIONS/ORACLE CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_CONTRACT_ADDRESS = new OracleContract(); +export const CHAIN_LINK_CONTRACT_ADDRESS = new OracleContract(); +export const SUSHISWAP_CALCULATIONS_ADDRESS = new OracleContract(); +export const AAVE_ORACLE_CONTRACT_ADDRESS = new OracleContract( + "0xb56c2f0b653b2e0b10c9b928c8580ac5df02c7c7", + 23930344 +); + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////// CURVE CONTRACT ////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const CURVE_CALCULATIONS_ADDRESS = new OracleContract(); + +export const CURVE_REGISTRY_ADDRESSES: OracleContract[] = [ + new OracleContract("0x0a53fada2d943057c47a301d25a4d9b3b8e01e8e", 18003250), +]; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// UNISWAP FORKS CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const UNISWAP_FORKS_ROUTER_ADDRESSES: OracleContract[] = [ + new OracleContract("0x1b02da8cb0d097eb8d57a175b88c7d8b47997506", 11256069), // SushiSwap +]; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// BLACKLISTED TOKENS //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_BLACKLIST: Address[] = []; +export const AAVE_ORACLE_BLACKLIST: Address[] = []; +export const CURVE_CALCULATIONS_BLACKSLIST: Address[] = []; +export const SUSHI_CALCULATIONS_BLACKSLIST: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +//////////////////////////// HARDCODED STABLES //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const HARDCODED_STABLES: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////////// HELPERS ///////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const USDC_TOKEN_DECIMALS = BigInt.fromI32(6); + +export const ETH_ADDRESS = Address.fromString( + "0x6983d1e6def3690c4d616b13597a09e6193ea013" +); +export const WETH_ADDRESS = Address.fromString( + "0xcf664087a5bb0237a0bad6742852ec6c8d69a27a" +); +export const USDC_ADDRESS = Address.fromString( + "0x985458e523db3d53125813ed68c274899e9dfab4" +); + +export class config implements Configurations { + network(): string { + return NETWORK_STRING; + } + + yearnLens(): OracleContract { + return YEARN_LENS_CONTRACT_ADDRESS; + } + chainLink(): OracleContract { + return CHAIN_LINK_CONTRACT_ADDRESS; + } + yearnLensBlacklist(): Address[] { + return YEARN_LENS_BLACKLIST; + } + + aaveOracle(): OracleContract { + return AAVE_ORACLE_CONTRACT_ADDRESS; + } + aaveOracleBlacklist(): Address[] { + return AAVE_ORACLE_BLACKLIST; + } + + curveCalculations(): OracleContract { + return CURVE_CALCULATIONS_ADDRESS; + } + curveCalculationsBlacklist(): Address[] { + return CURVE_CALCULATIONS_BLACKSLIST; + } + + sushiCalculations(): OracleContract { + return SUSHISWAP_CALCULATIONS_ADDRESS; + } + sushiCalculationsBlacklist(): Address[] { + return SUSHI_CALCULATIONS_BLACKSLIST; + } + + uniswapForks(): OracleContract[] { + return UNISWAP_FORKS_ROUTER_ADDRESSES; + } + curveRegistry(): OracleContract[] { + return CURVE_REGISTRY_ADDRESSES; + } + + hardcodedStables(): Address[] { + return HARDCODED_STABLES; + } + + ethAddress(): Address { + return ETH_ADDRESS; + } + wethAddress(): Address { + return WETH_ADDRESS; + } + usdcAddress(): Address { + return USDC_ADDRESS; + } + + usdcTokenDecimals(): BigInt { + return USDC_TOKEN_DECIMALS; + } + + getOracleOverride( + tokenAddr: Address | null, + block: ethereum.Block | null + ): OracleConfig | null { + return null; + } +} diff --git a/subgraphs/eigenpie/src/prices/config/mainnet.ts b/subgraphs/eigenpie/src/prices/config/mainnet.ts new file mode 100644 index 0000000000..b050f8e598 --- /dev/null +++ b/subgraphs/eigenpie/src/prices/config/mainnet.ts @@ -0,0 +1,371 @@ +/* eslint-disable @typescript-eslint/no-magic-numbers */ +import * as constants from "../common/constants"; +import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts"; +import { Configurations, OracleConfig, OracleContract } from "../common/types"; + +export const NETWORK_STRING = "mainnet"; + +/////////////////////////////////////////////////////////////////////////// +///////////////////// CALCULATIONS/ORACLE CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_CONTRACT_ADDRESS = new OracleContract( + "0x83d95e0d5f402511db06817aff3f9ea88224b030", + 12242339 +); +export const CHAIN_LINK_CONTRACT_ADDRESS = new OracleContract( + "0x47fb2585d2c56fe188d0e6ec628a38b74fceeedf", + 12864088 +); +export const AAVE_ORACLE_CONTRACT_ADDRESS = new OracleContract(); +export const SUSHISWAP_CALCULATIONS_ADDRESS = new OracleContract( + "0x8263e161a855b644f582d9c164c66aabee53f927", + 12692284 +); + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////// CURVE CONTRACT ////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const CURVE_CALCULATIONS_ADDRESS = new OracleContract( + "0x25bf7b72815476dd515044f9650bf79bad0df655", + 12370088 +); + +// Address Provider: https://etherscan.io/address/0x0000000022d53366457f9d5e68ec105046fc4383 +export const CURVE_REGISTRY_ADDRESSES: OracleContract[] = [ + new OracleContract("0x7d86446ddb609ed0f5f8684acf30380a356b2b4c", 11154794), + new OracleContract("0x90e00ace148ca3b23ac1bc8c240c2a7dd9c2d7f5", 12195750), // Main Registry + new OracleContract("0x8f942c20d02befc377d41445793068908e2250d0", 13986752), // CryptoSwap Registry + new OracleContract("0xf98b45fa17de75fb1ad0e7afd971b0ca00e379fc", 15732062), // Meta Registry +]; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// UNISWAP FORKS CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const UNISWAP_FORKS_ROUTER_ADDRESSES: OracleContract[] = [ + new OracleContract("0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f", 10794261), // SushiSwap + new OracleContract("0x7a250d5630b4cf539739df2c5dacb4c659f2488d", 10207858), // Uniswap +]; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// BLACKLISTED TOKENS //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_BLACKLIST: Address[] = [ + Address.fromString("0x5f98805a4e8be255a32880fdec7f6728c6568ba0"), // LUSD + Address.fromString("0x8daebade922df735c38c80c7ebd708af50815faa"), // tBTC + Address.fromString("0x0316eb71485b0ab14103307bf65a021042c6d380"), // Huobi BTC + Address.fromString("0xca3d75ac011bf5ad07a98d02f18225f9bd9a6bdf"), // crvTriCrypto +]; +export const AAVE_ORACLE_BLACKLIST: Address[] = []; +export const CURVE_CALCULATIONS_BLACKSLIST: Address[] = [ + Address.fromString("0xca3d75ac011bf5ad07a98d02f18225f9bd9a6bdf"), // crvTriCrypto + Address.fromString("0xc4ad29ba4b3c580e6d59105fff484999997675ff"), // crv3Crypto +]; +export const SUSHI_CALCULATIONS_BLACKSLIST: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +//////////////////////////// HARDCODED STABLES //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const HARDCODED_STABLES: Address[] = [ + Address.fromString("0xd632f22692fac7611d2aa1c0d552930d43caed3b"), // Curve.fi Factory USD Metapool: Frax + Address.fromString("0x99d8a9c45b2eca8864373a26d1459e3dff1e17f3"), // Magic Internet Money + Address.fromString("0x5a6a4d54456819380173272a5e8e9b9904bdf41b"), // Curve.fi Factory USD Metapool: Magic Internet Money 3Pool + Address.fromString("0xbc6da0fe9ad5f3b0d58160288917aa56653660e9"), // Alchemix USD + Address.fromString("0x43b4fdfd4ff969587185cdb6f0bd875c5fc83f8c"), // Curve.fi Factory USD Metapool: Alchemix USD + Address.fromString("0x57ab1ec28d129707052df4df418d58a2d46d5f51"), // Synth SUSD + Address.fromString("0xc25a3a3b969415c80451098fa907ec722572917f"), // Curve.fi DAI/USDC/USDT/sUSD + Address.fromString("0x0000000000085d4780b73119b644ae5ecd22b376"), // TrueUSD + Address.fromString("0xecd5e75afb02efa118af914515d6521aabd189f1"), // Curve.fi Factory USD Metapool: TrueUSD + Address.fromString("0xfd2a8fa60abd58efe3eee34dd494cd491dc14900"), // Curve.fi aDAI/aUSDC/aUSDT + Address.fromString("0x8ee017541375f6bcd802ba119bddc94dad6911a1"), // Curve.fi Factory USD Metapool: PUSd + Address.fromString("0x5b3b5df2bf2b6543f78e053bd91c4bdd820929f1"), // Curve.fi Factory USD Metapool: USDM + Address.fromString("0x04b727c7e246ca70d496ecf52e6b6280f3c8077d"), // Curve.fi Factory USD Metapool: apeUSDFRAXBP + Address.fromString("0x3175df0976dfa876431c2e9ee6bc45b65d3473cc"), // Curve.fi FRAX/USDC + Address.fromString("0xbcb91e689114b9cc865ad7871845c95241df4105"), // Curve.fi Factory USD Metapool: PWRD Metapool + Address.fromString("0x26ea744e5b887e5205727f55dfbe8685e3b21951"), // iearn USDC + Address.fromString("0xc2cb1040220768554cf699b0d863a3cd4324ce32"), // iearn DAI + Address.fromString("0x04bc0ab673d88ae9dbc9da2380cb6b79c4bca9ae"), // iearn BUSD + Address.fromString("0xe6354ed5bc4b393a5aad09f21c46e101e692d447"), // iearn USDT + Address.fromString("0x3b3ac5386837dc563660fb6a0937dfaa5924333b"), // Curve.fi yDAI/yUSDC/yUSDT/yBUSD + Address.fromString("0xc2f5fea5197a3d92736500fd7733fcc7a3bbdf3f"), // Curve.fi Factory USD Metapool: fUSD-3pool + Address.fromString("0x0c10bf8fcb7bf5412187a595ab97a3609160b5c6"), // Decentralized USD + Address.fromString("0x028171bca77440897b824ca71d1c56cac55b68a3"), // Aave interest bearing DAI + Address.fromString("0x3ed3b47dd13ec9a98b44e6204a523e766b225811"), // Aave interest bearing USDT + Address.fromString("0xbcca60bb61934080951369a648fb03df4f96263c"), // Aave interest bearing USDC + Address.fromString("0x6c5024cd4f8a59110119c56f8933403a539555eb"), // Aave interest bearing SUSD + Address.fromString("0xd71ecff9342a5ced620049e616c5035f1db98620"), // Synth sEUR + Address.fromString("0xfc2838a17d8e8b1d5456e0a351b0708a09211147"), // FRAX/USDP + Address.fromString("0x5ca135cb8527d76e932f34b5145575f9d8cbe08e"), // FPI + Address.fromString("0xf939e0a03fb07f59a73314e73794be0e57ac1b4e"), // crvUSD +]; + +/////////////////////////////////////////////////////////////////////////// +///////////////////////// ORACLE CONFIG OVERRIDES ///////////////////////// +/////////////////////////////////////////////////////////////////////////// + +// https://github.com/messari/subgraphs/issues/2090 +class SpellOverride implements OracleConfig { + oracleCount(): number { + return constants.INT_ONE; + } + oracleOrder(): string[] { + return [ + constants.OracleType.CHAINLINK_FEED, + constants.OracleType.CURVE_CALCULATIONS, + constants.OracleType.SUSHI_CALCULATIONS, + constants.OracleType.CURVE_ROUTER, + constants.OracleType.UNISWAP_FORKS_ROUTER, + constants.OracleType.YEARN_LENS_ORACLE, + ]; + } +} + +// https://github.com/messari/subgraphs/issues/726 +class StETHOverride implements OracleConfig { + oracleCount(): number { + return constants.INT_ONE; + } + oracleOrder(): string[] { + return [ + constants.OracleType.CHAINLINK_FEED, + constants.OracleType.CURVE_CALCULATIONS, + constants.OracleType.SUSHI_CALCULATIONS, + constants.OracleType.CURVE_ROUTER, + constants.OracleType.UNISWAP_FORKS_ROUTER, + constants.OracleType.YEARN_LENS_ORACLE, + ]; + } +} + +// https://github.com/messari/subgraphs/issues/2097 +class BaxaOverride implements OracleConfig { + oracleCount(): number { + return constants.INT_ONE; + } + oracleOrder(): string[] { + return [ + constants.OracleType.UNISWAP_FORKS_ROUTER, + constants.OracleType.YEARN_LENS_ORACLE, + constants.OracleType.CHAINLINK_FEED, + constants.OracleType.CURVE_CALCULATIONS, + constants.OracleType.CURVE_ROUTER, + constants.OracleType.SUSHI_CALCULATIONS, + ]; + } +} + +// https://github.com/messari/subgraphs/issues/2329 +class DelperOverride implements OracleConfig { + oracleCount(): number { + return constants.INT_ONE; + } + oracleOrder(): string[] { + return [ + constants.OracleType.UNISWAP_FORKS_ROUTER, + constants.OracleType.YEARN_LENS_ORACLE, + constants.OracleType.CHAINLINK_FEED, + constants.OracleType.CURVE_CALCULATIONS, + constants.OracleType.CURVE_ROUTER, + constants.OracleType.SUSHI_CALCULATIONS, + ]; + } +} + +// https://github.com/messari/subgraphs/issues/2290 +class CurveFactoryPoolOverride implements OracleConfig { + oracleCount(): number { + return constants.INT_ONE; + } + oracleOrder(): string[] { + return [ + constants.OracleType.CURVE_ROUTER, + constants.OracleType.UNISWAP_FORKS_ROUTER, + constants.OracleType.CHAINLINK_FEED, + constants.OracleType.CURVE_CALCULATIONS, + constants.OracleType.SUSHI_CALCULATIONS, + constants.OracleType.YEARN_LENS_ORACLE, + ]; + } +} + +class PreferUniswapOverride implements OracleConfig { + oracleCount(): number { + return constants.INT_ONE; + } + oracleOrder(): string[] { + return [ + constants.OracleType.UNISWAP_FORKS_ROUTER, + constants.OracleType.CURVE_CALCULATIONS, + constants.OracleType.CHAINLINK_FEED, + constants.OracleType.SUSHI_CALCULATIONS, + constants.OracleType.CURVE_ROUTER, + constants.OracleType.YEARN_LENS_ORACLE, + ]; + } +} + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////////// HELPERS ///////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const USDC_TOKEN_DECIMALS = BigInt.fromI32(6); + +export const ETH_ADDRESS = Address.fromString( + "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" +); +export const WETH_ADDRESS = Address.fromString( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" +); +export const USDC_ADDRESS = Address.fromString( + "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" +); + +export class config implements Configurations { + network(): string { + return NETWORK_STRING; + } + + yearnLens(): OracleContract { + return YEARN_LENS_CONTRACT_ADDRESS; + } + chainLink(): OracleContract { + return CHAIN_LINK_CONTRACT_ADDRESS; + } + yearnLensBlacklist(): Address[] { + return YEARN_LENS_BLACKLIST; + } + + aaveOracle(): OracleContract { + return AAVE_ORACLE_CONTRACT_ADDRESS; + } + aaveOracleBlacklist(): Address[] { + return AAVE_ORACLE_BLACKLIST; + } + + curveCalculations(): OracleContract { + return CURVE_CALCULATIONS_ADDRESS; + } + curveCalculationsBlacklist(): Address[] { + return CURVE_CALCULATIONS_BLACKSLIST; + } + + sushiCalculations(): OracleContract { + return SUSHISWAP_CALCULATIONS_ADDRESS; + } + sushiCalculationsBlacklist(): Address[] { + return SUSHI_CALCULATIONS_BLACKSLIST; + } + + uniswapForks(): OracleContract[] { + return UNISWAP_FORKS_ROUTER_ADDRESSES; + } + curveRegistry(): OracleContract[] { + return CURVE_REGISTRY_ADDRESSES; + } + + hardcodedStables(): Address[] { + return HARDCODED_STABLES; + } + + ethAddress(): Address { + return ETH_ADDRESS; + } + wethAddress(): Address { + return WETH_ADDRESS; + } + usdcAddress(): Address { + return USDC_ADDRESS; + } + + usdcTokenDecimals(): BigInt { + return USDC_TOKEN_DECIMALS; + } + + getOracleOverride( + tokenAddr: Address | null, + block: ethereum.Block | null + ): OracleConfig | null { + if (tokenAddr || block) { + if ( + tokenAddr && + [ + Address.fromString("0x090185f2135308bad17527004364ebcc2d37e5f6"), // SPELL + ].includes(tokenAddr) + ) { + return new SpellOverride(); + } + if ( + tokenAddr && + [ + Address.fromString("0xae7ab96520de3a18e5e111b5eaab095312d7fe84"), // stETH + ].includes(tokenAddr) && + block && + block.number.gt(BigInt.fromString("14019699")) && + block.number.lt(BigInt.fromString("14941265")) + ) { + return new StETHOverride(); + } + if ( + tokenAddr && + [ + Address.fromString("0x91b08f4a7c1251dfccf5440f8894f8daa10c8de5"), // BAXA + ].includes(tokenAddr) + ) { + return new BaxaOverride(); + } + if ( + tokenAddr && + [ + Address.fromString("0x077416cc6242b3a7d8e42652b8a6a2599fda4a92"), // DPR + ].includes(tokenAddr) + ) { + return new DelperOverride(); + } + if ( + tokenAddr && + [ + Address.fromString("0xed4064f376cb8d68f770fb1ff088a3d0f3ff5c4d"), // crvCRVETH + Address.fromString("0xf985005a3793dba4cce241b3c19ddcd3fe069ff4"), // ALCXFRAXBP-f + Address.fromString("0x971add32ea87f10bd192671630be3be8a11b8623"), // cvxcrv-crv-f + Address.fromString("0x137469b55d1f15651ba46a89d0588e97dd0b6562"), // BADGERWBTC-f + Address.fromString("0x4647b6d835f3b393c7a955df51eefcf0db961606"), // KP3RETH-f + Address.fromString("0x6359b6d3e327c497453d4376561ee276c6933323"), // SDTETH-f + Address.fromString("0x2889302a794da87fbf1d6db415c1492194663d13"), // crvCRVUSDTBTCWSTETH + Address.fromString("0x3a283d9c08e8b55966afb64c515f5143cf907611"), // crvCVXETH + // + Address.fromString("0x7f86bf177dd4f3494b841a37e810a34dd56c829b"), // TricryptoUSDC + Address.fromString("0xf5f5b97624542d72a9e06f04804bf81baa15e2b4"), // TricryptoUSDT + Address.fromString("0x4ebdf703948ddcea3b11f675b4d1fba9d2414a14"), // TriCRV + Address.fromString("0xf3a43307dcafa93275993862aae628fcb50dc768"), // Factory Crypto Pool: cvxFxs/Fxs + Address.fromString("0xb79565c01b7ae53618d9b847b9443aaf4f9011e7"), // Factory Crypto Pool: LDO/ETH + Address.fromString("0x4704ab1fb693ce163f7c9d3a31b3ff4eaf797714"), // Factory Crypto Pool: FPI2Pool + Address.fromString("0xda68f66fc0f10ee61048e70106df4bdb26baf595"), // Factory Crypto Pool: JPEG/pETH + Address.fromString("0x5be6c45e2d074faa20700c49ada3e88a1cc0025d"), // Factory Crypto Pool: Curve GEAR/ETH + Address.fromString("0x8109a51542294cdbb489ae5516f42ffbd92177aa"), // Factory Crypto Pool: OGV/ETH + Address.fromString("0x390f3595bca2df7d23783dfd126427cceb997bf4"), // Factory Plain Pool: crvUSD/USDT + Address.fromString("0x4dece678ceceb27446b35c672dc7d61f30bad69e"), // Factory Plain Pool: crvUSD/USDC + ].includes(tokenAddr) + ) { + return new CurveFactoryPoolOverride(); + } + if ( + tokenAddr && + [ + Address.fromString("0xdbdb4d16eda451d0503b854cf79d55697f90c8df"), // ALCX + Address.fromString("0x62b9c7356a2dc64a1969e19c23e4f579f9810aa7"), // cvxCRV + Address.fromString("0x1ceb5cb57c4d4e2b2433641b95dd330a33185a44"), // KP3R + Address.fromString("0x73968b9a57c6e53d41345fd57a6e6ae27d6cdb2f"), // SDT + Address.fromString("0xba3335588d9403515223f109edc4eb7269a9ab5d"), // GEAR + ].includes(tokenAddr) + ) { + return new PreferUniswapOverride(); + } + } + + return null; + } +} diff --git a/subgraphs/eigenpie/src/prices/config/moonbeam.ts b/subgraphs/eigenpie/src/prices/config/moonbeam.ts new file mode 100644 index 0000000000..33bcd9e348 --- /dev/null +++ b/subgraphs/eigenpie/src/prices/config/moonbeam.ts @@ -0,0 +1,133 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import * as constants from "../common/constants"; +import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts"; +import { Configurations, OracleConfig, OracleContract } from "../common/types"; + +export const NETWORK_STRING = "moonbeam"; + +/////////////////////////////////////////////////////////////////////////// +///////////////////// CALCULATIONS/ORACLE CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_CONTRACT_ADDRESS = new OracleContract(); +export const CHAIN_LINK_CONTRACT_ADDRESS = new OracleContract(); +export const AAVE_ORACLE_CONTRACT_ADDRESS = new OracleContract(); +export const SUSHISWAP_CALCULATIONS_ADDRESS = new OracleContract(); + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////// CURVE CONTRACT ////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const CURVE_CALCULATIONS_ADDRESS = new OracleContract(); + +export const CURVE_REGISTRY_ADDRESSES: OracleContract[] = [ + new OracleContract("0xc2b1df84112619d190193e48148000e3990bf627", 1452049), +]; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// UNISWAP FORKS CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const UNISWAP_FORKS_ROUTER_ADDRESSES: OracleContract[] = [ + new OracleContract("0x445fe580ef8d70ff569ab36e80c647af338db351", 503734), // SushiSwap +]; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// BLACKLISTED TOKENS //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_BLACKLIST: Address[] = []; +export const AAVE_ORACLE_BLACKLIST: Address[] = []; +export const CURVE_CALCULATIONS_BLACKSLIST: Address[] = []; +export const SUSHI_CALCULATIONS_BLACKSLIST: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +//////////////////////////// HARDCODED STABLES //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const HARDCODED_STABLES: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////////// HELPERS ///////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const USDC_TOKEN_DECIMALS = BigInt.fromI32(6); + +export const ETH_ADDRESS = Address.fromString( + "0xfa9343c3897324496a05fc75abed6bac29f8a40f" +); +export const WETH_ADDRESS = Address.fromString( + "0xacc15dc74880c9944775448304b263d191c6077f" +); +export const USDC_ADDRESS = Address.fromString( + "0x818ec0a7fe18ff94269904fced6ae3dae6d6dc0b" +); + +export class config implements Configurations { + network(): string { + return NETWORK_STRING; + } + + yearnLens(): OracleContract { + return YEARN_LENS_CONTRACT_ADDRESS; + } + chainLink(): OracleContract { + return CHAIN_LINK_CONTRACT_ADDRESS; + } + yearnLensBlacklist(): Address[] { + return YEARN_LENS_BLACKLIST; + } + + aaveOracle(): OracleContract { + return AAVE_ORACLE_CONTRACT_ADDRESS; + } + aaveOracleBlacklist(): Address[] { + return AAVE_ORACLE_BLACKLIST; + } + + curveCalculations(): OracleContract { + return CURVE_CALCULATIONS_ADDRESS; + } + curveCalculationsBlacklist(): Address[] { + return CURVE_CALCULATIONS_BLACKSLIST; + } + + sushiCalculations(): OracleContract { + return SUSHISWAP_CALCULATIONS_ADDRESS; + } + sushiCalculationsBlacklist(): Address[] { + return SUSHI_CALCULATIONS_BLACKSLIST; + } + + uniswapForks(): OracleContract[] { + return UNISWAP_FORKS_ROUTER_ADDRESSES; + } + curveRegistry(): OracleContract[] { + return CURVE_REGISTRY_ADDRESSES; + } + + hardcodedStables(): Address[] { + return HARDCODED_STABLES; + } + + ethAddress(): Address { + return ETH_ADDRESS; + } + wethAddress(): Address { + return WETH_ADDRESS; + } + usdcAddress(): Address { + return USDC_ADDRESS; + } + + usdcTokenDecimals(): BigInt { + return USDC_TOKEN_DECIMALS; + } + + getOracleOverride( + tokenAddr: Address | null, + block: ethereum.Block | null + ): OracleConfig | null { + return null; + } +} diff --git a/subgraphs/eigenpie/src/prices/config/optimism.ts b/subgraphs/eigenpie/src/prices/config/optimism.ts new file mode 100644 index 0000000000..3bc65a7e56 --- /dev/null +++ b/subgraphs/eigenpie/src/prices/config/optimism.ts @@ -0,0 +1,145 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import * as constants from "../common/constants"; +import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts"; +import { Configurations, OracleConfig, OracleContract } from "../common/types"; + +export const NETWORK_STRING = "optimism"; + +/////////////////////////////////////////////////////////////////////////// +///////////////////// CALCULATIONS/ORACLE CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_CONTRACT_ADDRESS = new OracleContract( + "0xb082d9f4734c535d9d80536f7e87a6f4f471bf65", + 18109291 +); +export const CHAIN_LINK_CONTRACT_ADDRESS = new OracleContract(); +export const AAVE_ORACLE_CONTRACT_ADDRESS = new OracleContract( + "0xd81eb3728a631871a7ebbad631b5f424909f0c77", + 4365625 +); +export const SUSHISWAP_CALCULATIONS_ADDRESS = new OracleContract( + "0x5fd3815dcb668200a662114fbc9af13ac0a55b4d", + 18216910 +); + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////// CURVE CONTRACT ////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const CURVE_CALCULATIONS_ADDRESS = new OracleContract( + "0x0ffe8434eae67c9838b12c3cd11ac4005daa7227", + 18368996 +); + +export const CURVE_REGISTRY_ADDRESSES: OracleContract[] = [ + new OracleContract("0xc5cfada84e902ad92dd40194f0883ad49639b023", 2373837), + new OracleContract("0x445fe580ef8d70ff569ab36e80c647af338db351", 3729171), +]; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// UNISWAP FORKS CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const UNISWAP_FORKS_ROUTER_ADDRESSES: OracleContract[] = [ + new OracleContract("0x9c12939390052919af3155f41bf4160fd3666a6f", 19702709), // Velodrame +]; +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// BLACKLISTED TOKENS //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_BLACKLIST: Address[] = []; +export const AAVE_ORACLE_BLACKLIST: Address[] = []; +export const CURVE_CALCULATIONS_BLACKSLIST: Address[] = []; +export const SUSHI_CALCULATIONS_BLACKSLIST: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +//////////////////////////// HARDCODED STABLES //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const HARDCODED_STABLES: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////////// HELPERS ///////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const USDC_TOKEN_DECIMALS = BigInt.fromI32(6); + +export const ETH_ADDRESS = Address.fromString( + "0x4200000000000000000000000000000000000042" +); +export const WETH_ADDRESS = Address.fromString( + "0x4200000000000000000000000000000000000006" +); +export const USDC_ADDRESS = Address.fromString( + "0x7f5c764cbc14f9669b88837ca1490cca17c31607" +); + +export class config implements Configurations { + network(): string { + return NETWORK_STRING; + } + + yearnLens(): OracleContract { + return YEARN_LENS_CONTRACT_ADDRESS; + } + chainLink(): OracleContract { + return CHAIN_LINK_CONTRACT_ADDRESS; + } + yearnLensBlacklist(): Address[] { + return YEARN_LENS_BLACKLIST; + } + + aaveOracle(): OracleContract { + return AAVE_ORACLE_CONTRACT_ADDRESS; + } + aaveOracleBlacklist(): Address[] { + return AAVE_ORACLE_BLACKLIST; + } + + curveCalculations(): OracleContract { + return CURVE_CALCULATIONS_ADDRESS; + } + curveCalculationsBlacklist(): Address[] { + return CURVE_CALCULATIONS_BLACKSLIST; + } + + sushiCalculations(): OracleContract { + return SUSHISWAP_CALCULATIONS_ADDRESS; + } + sushiCalculationsBlacklist(): Address[] { + return SUSHI_CALCULATIONS_BLACKSLIST; + } + + uniswapForks(): OracleContract[] { + return UNISWAP_FORKS_ROUTER_ADDRESSES; + } + curveRegistry(): OracleContract[] { + return CURVE_REGISTRY_ADDRESSES; + } + + hardcodedStables(): Address[] { + return HARDCODED_STABLES; + } + + ethAddress(): Address { + return ETH_ADDRESS; + } + wethAddress(): Address { + return WETH_ADDRESS; + } + usdcAddress(): Address { + return USDC_ADDRESS; + } + + usdcTokenDecimals(): BigInt { + return USDC_TOKEN_DECIMALS; + } + + getOracleOverride( + tokenAddr: Address | null, + block: ethereum.Block | null + ): OracleConfig | null { + return null; + } +} diff --git a/subgraphs/eigenpie/src/prices/config/polygon.ts b/subgraphs/eigenpie/src/prices/config/polygon.ts new file mode 100644 index 0000000000..782ba266d2 --- /dev/null +++ b/subgraphs/eigenpie/src/prices/config/polygon.ts @@ -0,0 +1,139 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import * as constants from "../common/constants"; +import { BigInt, Address, ethereum } from "@graphprotocol/graph-ts"; +import { Configurations, OracleConfig, OracleContract } from "../common/types"; + +export const NETWORK_STRING = "matic"; + +/////////////////////////////////////////////////////////////////////////// +///////////////////// CALCULATIONS/ORACLE CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_CONTRACT_ADDRESS = new OracleContract(); +export const CHAIN_LINK_CONTRACT_ADDRESS = new OracleContract(); +export const SUSHISWAP_CALCULATIONS_ADDRESS = new OracleContract(); + +export const AAVE_ORACLE_CONTRACT_ADDRESS = new OracleContract( + "0xb023e699f5a33916ea823a16485e259257ca8bd1", + 25825996 +); + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////// CURVE CONTRACT ////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const CURVE_CALCULATIONS_ADDRESS = new OracleContract(); + +export const CURVE_REGISTRY_ADDRESSES: OracleContract[] = [ + new OracleContract("0x094d12e5b541784701fd8d65f11fc0598fbc6332", 13991825), + new OracleContract("0x47bb542b9de58b970ba50c9dae444ddb4c16751a", 23556360), +]; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// UNISWAP FORKS CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const UNISWAP_FORKS_ROUTER_ADDRESSES: OracleContract[] = [ + new OracleContract("0xa5e0829caced8ffdd4de3c43696c57f7d7a678ff", 4931900), // QuickSwap + new OracleContract("0x1b02da8cb0d097eb8d57a175b88c7d8b47997506", 11333235), // SushiSwap +]; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// BLACKLISTED TOKENS //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_BLACKLIST: Address[] = []; +export const AAVE_ORACLE_BLACKLIST: Address[] = []; +export const CURVE_CALCULATIONS_BLACKSLIST: Address[] = []; +export const SUSHI_CALCULATIONS_BLACKSLIST: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +//////////////////////////// HARDCODED STABLES //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const HARDCODED_STABLES: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////////// HELPERS ///////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const USDC_TOKEN_DECIMALS = BigInt.fromI32(6); + +export const ETH_ADDRESS = Address.fromString( + "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619" +); +export const WETH_ADDRESS = Address.fromString( + "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270" +); +export const USDC_ADDRESS = Address.fromString( + "0x2791bca1f2de4661ed88a30c99a7a9449aa84174" +); + +export class config implements Configurations { + network(): string { + return NETWORK_STRING; + } + + yearnLens(): OracleContract { + return YEARN_LENS_CONTRACT_ADDRESS; + } + chainLink(): OracleContract { + return CHAIN_LINK_CONTRACT_ADDRESS; + } + yearnLensBlacklist(): Address[] { + return YEARN_LENS_BLACKLIST; + } + + aaveOracle(): OracleContract { + return AAVE_ORACLE_CONTRACT_ADDRESS; + } + aaveOracleBlacklist(): Address[] { + return AAVE_ORACLE_BLACKLIST; + } + + curveCalculations(): OracleContract { + return CURVE_CALCULATIONS_ADDRESS; + } + curveCalculationsBlacklist(): Address[] { + return CURVE_CALCULATIONS_BLACKSLIST; + } + + sushiCalculations(): OracleContract { + return SUSHISWAP_CALCULATIONS_ADDRESS; + } + sushiCalculationsBlacklist(): Address[] { + return SUSHI_CALCULATIONS_BLACKSLIST; + } + + uniswapForks(): OracleContract[] { + return UNISWAP_FORKS_ROUTER_ADDRESSES; + } + curveRegistry(): OracleContract[] { + return CURVE_REGISTRY_ADDRESSES; + } + + hardcodedStables(): Address[] { + return HARDCODED_STABLES; + } + + ethAddress(): Address { + return ETH_ADDRESS; + } + wethAddress(): Address { + return WETH_ADDRESS; + } + usdcAddress(): Address { + return USDC_ADDRESS; + } + + usdcTokenDecimals(): BigInt { + return USDC_TOKEN_DECIMALS; + } + + getOracleOverride( + tokenAddr: Address | null, + block: ethereum.Block | null + ): OracleConfig | null { + return null; + } +} diff --git a/subgraphs/eigenpie/src/prices/config/template.ts b/subgraphs/eigenpie/src/prices/config/template.ts new file mode 100644 index 0000000000..e919b22c74 --- /dev/null +++ b/subgraphs/eigenpie/src/prices/config/template.ts @@ -0,0 +1,142 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import * as constants from "../common/constants"; +import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts"; +import { Configurations, OracleConfig, OracleContract } from "../common/types"; + +export const NETWORK_STRING = "default"; + +/////////////////////////////////////////////////////////////////////////// +///////////////////// CALCULATIONS/ORACLE CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_CONTRACT_ADDRESS = new OracleContract(); +export const CHAIN_LINK_CONTRACT_ADDRESS = new OracleContract(); +export const AAVE_ORACLE_CONTRACT_ADDRESS = new OracleContract(); +export const SUSHISWAP_CALCULATIONS_ADDRESS = new OracleContract(); + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////// CURVE CONTRACT ////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const CURVE_CALCULATIONS_ADDRESS = new OracleContract(); +export const CURVE_REGISTRY_ADDRESSES: OracleContract[] = []; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// UNISWAP FORKS CONTRACT //////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const UNISWAP_FORKS_ROUTER_ADDRESSES: OracleContract[] = []; + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////// BLACKLISTED TOKENS //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const YEARN_LENS_BLACKLIST: Address[] = []; +export const AAVE_ORACLE_BLACKLIST: Address[] = []; +export const CURVE_CALCULATIONS_BLACKSLIST: Address[] = []; +export const SUSHI_CALCULATIONS_BLACKSLIST: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +//////////////////////////// HARDCODED STABLES //////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const HARDCODED_STABLES: Address[] = []; + +/////////////////////////////////////////////////////////////////////////// +///////////////////////// ORACLE CONFIG OVERRIDES ///////////////////////// +/////////////////////////////////////////////////////////////////////////// + +class SomeOverride implements OracleConfig { + oracleCount(): number { + return constants.INT_ONE; + } + oracleOrder(): string[] { + return [ + constants.OracleType.YEARN_LENS_ORACLE, + constants.OracleType.CHAINLINK_FEED, + constants.OracleType.CURVE_CALCULATIONS, + constants.OracleType.SUSHI_CALCULATIONS, + constants.OracleType.CURVE_ROUTER, + constants.OracleType.UNISWAP_FORKS_ROUTER, + ]; + } +} + +/////////////////////////////////////////////////////////////////////////// +///////////////////////////////// HELPERS ///////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +export const USDC_TOKEN_DECIMALS = BigInt.fromI32(6); + +export const ETH_ADDRESS = constants.NULL.TYPE_ADDRESS; +export const WETH_ADDRESS = constants.NULL.TYPE_ADDRESS; +export const USDC_ADDRESS = constants.NULL.TYPE_ADDRESS; + +export class config implements Configurations { + network(): string { + return NETWORK_STRING; + } + + yearnLens(): OracleContract { + return YEARN_LENS_CONTRACT_ADDRESS; + } + chainLink(): OracleContract { + return CHAIN_LINK_CONTRACT_ADDRESS; + } + yearnLensBlacklist(): Address[] { + return YEARN_LENS_BLACKLIST; + } + + aaveOracle(): OracleContract { + return AAVE_ORACLE_CONTRACT_ADDRESS; + } + aaveOracleBlacklist(): Address[] { + return AAVE_ORACLE_BLACKLIST; + } + + curveCalculations(): OracleContract { + return CURVE_CALCULATIONS_ADDRESS; + } + curveCalculationsBlacklist(): Address[] { + return CURVE_CALCULATIONS_BLACKSLIST; + } + + sushiCalculations(): OracleContract { + return SUSHISWAP_CALCULATIONS_ADDRESS; + } + sushiCalculationsBlacklist(): Address[] { + return SUSHI_CALCULATIONS_BLACKSLIST; + } + + uniswapForks(): OracleContract[] { + return UNISWAP_FORKS_ROUTER_ADDRESSES; + } + curveRegistry(): OracleContract[] { + return CURVE_REGISTRY_ADDRESSES; + } + + hardcodedStables(): Address[] { + return HARDCODED_STABLES; + } + + ethAddress(): Address { + return ETH_ADDRESS; + } + wethAddress(): Address { + return WETH_ADDRESS; + } + usdcAddress(): Address { + return USDC_ADDRESS; + } + + usdcTokenDecimals(): BigInt { + return USDC_TOKEN_DECIMALS; + } + + getOracleOverride( + tokenAddr: Address | null, + block: ethereum.Block | null + ): OracleConfig | null { + return new SomeOverride(); + } +} diff --git a/subgraphs/eigenpie/src/prices/index.ts b/subgraphs/eigenpie/src/prices/index.ts new file mode 100644 index 0000000000..e1a2e9a442 --- /dev/null +++ b/subgraphs/eigenpie/src/prices/index.ts @@ -0,0 +1,154 @@ +import { + log, + Address, + ethereum, + BigDecimal, + dataSource, +} from "@graphprotocol/graph-ts"; +import { CustomPriceType, OracleType } from "./common/types"; + +import * as utils from "./common/utils"; +import * as constants from "./common/constants"; +import * as AaveOracle from "./oracles/AaveOracle"; +import * as CurveRouter from "./routers/CurveRouter"; +import * as ChainLinkFeed from "./oracles/ChainLinkFeed"; +import * as YearnLensOracle from "./oracles/YearnLensOracle"; +import * as UniswapForksRouter from "./routers/UniswapForksRouter"; +import * as CurveCalculations from "./calculations/CalculationsCurve"; +import * as SushiCalculations from "./calculations/CalculationsSushiswap"; + +export function getUsdPricePerToken( + tokenAddr: Address, + block: ethereum.Block | null = null +): CustomPriceType { + if (tokenAddr.equals(constants.NULL.TYPE_ADDRESS)) { + return new CustomPriceType(); + } + + if (constants.WETH_LIKE_TOKENS.includes(tokenAddr)) + tokenAddr = Address.fromString(constants.WETH_ADDRESS); + + const config = utils.getConfig(); + if (config.network() == "default") { + log.warning("Failed to fetch price: network {} not implemented", [ + dataSource.network(), + ]); + + return new CustomPriceType(); + } + + if (config.hardcodedStables().includes(tokenAddr)) { + return CustomPriceType.initialize( + constants.BIGDECIMAL_USD_PRICE, + constants.DEFAULT_USDC_DECIMALS + ); + } + + const oracle = new OracleType(); + const override = config.getOracleOverride(tokenAddr, block); + if (override) { + oracle.setOracleConfig(override); + } + const oracleCount = oracle.oracleCount; + const oracleOrder = oracle.oracleOrder; + + const prices: CustomPriceType[] = []; + for (let i = 0; i < oracleOrder.length; i++) { + if (prices.length >= oracleCount) { + break; + } + + let oraclePrice = new CustomPriceType(); + + if (oracleOrder[i] == constants.OracleType.YEARN_LENS_ORACLE) { + oraclePrice = YearnLensOracle.getTokenPriceUSDC(tokenAddr, block); + } else if (oracleOrder[i] == constants.OracleType.CHAINLINK_FEED) { + oraclePrice = ChainLinkFeed.getTokenPriceUSDC(tokenAddr, block); + } else if (oracleOrder[i] == constants.OracleType.CURVE_CALCULATIONS) { + oraclePrice = CurveCalculations.getTokenPriceUSDC(tokenAddr, block); + } else if (oracleOrder[i] == constants.OracleType.SUSHI_CALCULATIONS) { + oraclePrice = SushiCalculations.getTokenPriceUSDC(tokenAddr, block); + } else if (oracleOrder[i] == constants.OracleType.AAVE_ORACLE) { + oraclePrice = AaveOracle.getTokenPriceUSDC(tokenAddr, block); + } else if (oracleOrder[i] == constants.OracleType.CURVE_ROUTER) { + oraclePrice = CurveRouter.getCurvePriceUsdc(tokenAddr, block); + } else if (oracleOrder[i] == constants.OracleType.UNISWAP_FORKS_ROUTER) { + oraclePrice = UniswapForksRouter.getTokenPriceUSDC(tokenAddr, block); + } + + if (!oraclePrice.reverted) { + prices.push(oraclePrice); + } + } + + if (prices.length == constants.INT_ZERO) { + log.warning("[Oracle] Failed to Fetch Price, tokenAddr: {}", [ + tokenAddr.toHexString(), + ]); + + return new CustomPriceType(); + } else if (prices.length == constants.INT_ONE) { + return prices[constants.INT_ZERO]; + } else if (prices.length == constants.INT_TWO) { + return utils.averagePrice(prices); + } + + const k = Math.ceil(prices.length / constants.INT_TWO) as i32; + const closestPrices = utils.kClosestPrices(k, prices); + + return utils.averagePrice(closestPrices); +} + +export function getLiquidityBoundPrice( + tokenAddress: Address, + tokenPrice: CustomPriceType, + amount: BigDecimal +): BigDecimal { + const reportedPriceUSD = tokenPrice.usdPrice.times(amount); + const liquidity = tokenPrice.liquidity; + + let liquidityBoundPriceUSD = reportedPriceUSD; + if (liquidity > constants.BIGDECIMAL_ZERO && reportedPriceUSD > liquidity) { + liquidityBoundPriceUSD = liquidity + .div( + constants.BIGINT_TEN.pow( + constants.DEFAULT_USDC_DECIMALS as u8 + ).toBigDecimal() + ) + .times(constants.BIGINT_TEN.pow(tokenPrice.decimals as u8).toBigDecimal()) + .div(amount); + + log.warning( + "[getLiquidityBoundPrice] token: {} (reported price * amount): ({} * {}) bound to available liquidity: {}; new price: {}", + [ + tokenAddress.toHexString(), + tokenPrice.usdPrice.toString(), + amount.toString(), + liquidity.toString(), + liquidityBoundPriceUSD.toString(), + ] + ); + } + + return liquidityBoundPriceUSD; +} + +export function getUsdPrice( + tokenAddr: Address, + amount: BigDecimal, + block: ethereum.Block | null = null +): BigDecimal { + const tokenPrice = getUsdPricePerToken(tokenAddr, block); + + if (!tokenPrice.reverted) { + if ( + tokenPrice.oracleType == constants.OracleType.UNISWAP_FORKS_ROUTER || + tokenPrice.oracleType == constants.OracleType.CURVE_ROUTER + ) { + return getLiquidityBoundPrice(tokenAddr, tokenPrice, amount); + } + return tokenPrice.usdPrice.times(amount); + } + + return constants.BIGDECIMAL_ZERO; +} diff --git a/subgraphs/eigenpie/src/prices/oracles/AaveOracle.ts b/subgraphs/eigenpie/src/prices/oracles/AaveOracle.ts new file mode 100644 index 0000000000..5c2a9aecd5 --- /dev/null +++ b/subgraphs/eigenpie/src/prices/oracles/AaveOracle.ts @@ -0,0 +1,44 @@ +import * as utils from "../common/utils"; +import * as constants from "../common/constants"; +import { CustomPriceType, OracleContract } from "../common/types"; +import { Address, BigDecimal, BigInt, ethereum } from "@graphprotocol/graph-ts"; +import { AaveOracleContract } from "../../../generated/EigenConfig/AaveOracleContract"; + +export function getAaveOracleContract( + contract: OracleContract, + block: ethereum.Block | null = null +): AaveOracleContract | null { + if ( + (block && contract.startBlock.gt(block.number)) || + utils.isNullAddress(contract.address) + ) + return null; + + return AaveOracleContract.bind(contract.address); +} + +export function getTokenPriceUSDC( + tokenAddr: Address, + block: ethereum.Block | null = null +): CustomPriceType { + const config = utils.getConfig(); + + if (!config || config.aaveOracleBlacklist().includes(tokenAddr)) + return new CustomPriceType(); + + const aaveOracleContract = getAaveOracleContract(config.aaveOracle(), block); + if (!aaveOracleContract) return new CustomPriceType(); + + const tokenPrice: BigDecimal = utils + .readValue( + aaveOracleContract.try_getAssetPrice(tokenAddr), + constants.BIGINT_ZERO + ) + .toBigDecimal(); + + return CustomPriceType.initialize( + tokenPrice, + constants.AAVE_ORACLE_DECIMALS, + constants.OracleType.AAVE_ORACLE + ); +} diff --git a/subgraphs/eigenpie/src/prices/oracles/ChainLinkFeed.ts b/subgraphs/eigenpie/src/prices/oracles/ChainLinkFeed.ts new file mode 100644 index 0000000000..62596657e2 --- /dev/null +++ b/subgraphs/eigenpie/src/prices/oracles/ChainLinkFeed.ts @@ -0,0 +1,53 @@ +import * as utils from "../common/utils"; +import * as constants from "../common/constants"; +import { Address, ethereum } from "@graphprotocol/graph-ts"; +import { CustomPriceType, OracleContract } from "../common/types"; +import { ChainLinkContract } from "../../../generated/EigenConfig/ChainLinkContract"; + +export function getChainLinkContract( + contract: OracleContract, + block: ethereum.Block | null = null +): ChainLinkContract | null { + if ( + (block && contract.startBlock.gt(block.number)) || + utils.isNullAddress(contract.address) + ) + return null; + + return ChainLinkContract.bind(contract.address); +} + +export function getTokenPriceUSDC( + tokenAddr: Address, + block: ethereum.Block | null = null +): CustomPriceType { + const config = utils.getConfig(); + if (!config) return new CustomPriceType(); + + const chainLinkContract = getChainLinkContract(config.chainLink(), block); + if (!chainLinkContract) return new CustomPriceType(); + + const result = chainLinkContract.try_latestRoundData( + tokenAddr, + constants.CHAIN_LINK_USD_ADDRESS + ); + + if (!result.reverted) { + const decimals = chainLinkContract.try_decimals( + tokenAddr, + constants.CHAIN_LINK_USD_ADDRESS + ); + + if (decimals.reverted) { + return new CustomPriceType(); + } + + return CustomPriceType.initialize( + result.value.value1.toBigDecimal(), + decimals.value, + constants.OracleType.CHAINLINK_FEED + ); + } + + return new CustomPriceType(); +} diff --git a/subgraphs/eigenpie/src/prices/oracles/YearnLensOracle.ts b/subgraphs/eigenpie/src/prices/oracles/YearnLensOracle.ts new file mode 100644 index 0000000000..f071f564d6 --- /dev/null +++ b/subgraphs/eigenpie/src/prices/oracles/YearnLensOracle.ts @@ -0,0 +1,44 @@ +import * as utils from "../common/utils"; +import * as constants from "../common/constants"; +import { CustomPriceType, OracleContract } from "../common/types"; +import { Address, BigDecimal, BigInt, ethereum } from "@graphprotocol/graph-ts"; +import { YearnLensContract } from "../../../generated/EigenConfig/YearnLensContract"; + +export function getYearnLensContract( + contract: OracleContract, + block: ethereum.Block | null = null +): YearnLensContract | null { + if ( + (block && contract.startBlock.gt(block.number)) || + utils.isNullAddress(contract.address) + ) + return null; + + return YearnLensContract.bind(contract.address); +} + +export function getTokenPriceUSDC( + tokenAddr: Address, + block: ethereum.Block | null = null +): CustomPriceType { + const config = utils.getConfig(); + + if (!config || config.yearnLensBlacklist().includes(tokenAddr)) + return new CustomPriceType(); + + const yearnLensContract = getYearnLensContract(config.yearnLens(), block); + if (!yearnLensContract) return new CustomPriceType(); + + const tokenPrice: BigDecimal = utils + .readValue( + yearnLensContract.try_getPriceUsdcRecommended(tokenAddr), + constants.BIGINT_ZERO + ) + .toBigDecimal(); + + return CustomPriceType.initialize( + tokenPrice, + constants.DEFAULT_USDC_DECIMALS, + constants.OracleType.YEARN_LENS_ORACLE + ); +} diff --git a/subgraphs/eigenpie/src/prices/routers/CurveRouter.ts b/subgraphs/eigenpie/src/prices/routers/CurveRouter.ts new file mode 100644 index 0000000000..be68529b3a --- /dev/null +++ b/subgraphs/eigenpie/src/prices/routers/CurveRouter.ts @@ -0,0 +1,368 @@ +/* eslint-disable @typescript-eslint/no-magic-numbers */ +import { getUsdPricePerToken } from ".."; +import * as utils from "../common/utils"; +import * as constants from "../common/constants"; +import { CustomPriceType } from "../common/types"; +import { BigInt, Address, BigDecimal, ethereum } from "@graphprotocol/graph-ts"; +import { CurvePool as CurvePoolContract } from "../../../generated/EigenConfig/CurvePool"; +import { CurveRegistry as CurveRegistryContract } from "../../../generated/EigenConfig/CurveRegistry"; + +export function isCurveLpToken( + lpAddress: Address, + block: ethereum.Block +): bool { + const poolAddress = getPoolFromLpToken(lpAddress, block); + if (poolAddress.notEqual(constants.NULL.TYPE_ADDRESS)) return true; + + return false; +} + +export function getPoolFromLpToken( + lpAddress: Address, + block: ethereum.Block | null = null +): Address { + const config = utils.getConfig(); + const curveRegistryAdresses = config.curveRegistry(); + + for (let idx = 0; idx < curveRegistryAdresses.length; idx++) { + const curveRegistry = curveRegistryAdresses[idx]; + if (block && curveRegistry.startBlock.gt(block.number)) continue; + + const curveRegistryContract = CurveRegistryContract.bind( + curveRegistry.address + ); + + const poolAddress = utils.readValue
( + curveRegistryContract.try_get_pool_from_lp_token(lpAddress), + constants.NULL.TYPE_ADDRESS + ); + + if (poolAddress.notEqual(constants.NULL.TYPE_ADDRESS)) return poolAddress; + } + + return constants.NULL.TYPE_ADDRESS; +} + +export function isLpCryptoPool( + lpAddress: Address, + block: ethereum.Block | null = null +): bool { + const poolAddress = getPoolFromLpToken(lpAddress, block); + + if (poolAddress != constants.NULL.TYPE_ADDRESS) { + return isPoolCryptoPool(poolAddress); + } + + return false; +} + +export function isPoolCryptoPool(poolAddress: Address): bool { + const poolContract = CurvePoolContract.bind(poolAddress); + + const priceOracleCall = poolContract.try_price_oracle(); + if (!priceOracleCall.reverted) return true; + + const priceOracle1Call = poolContract.try_price_oracle1( + constants.BIGINT_ZERO + ); + if (!priceOracle1Call.reverted) return true; + + return false; +} + +export function getCurvePriceUsdc( + lpAddress: Address, + block: ethereum.Block | null = null +): CustomPriceType { + if (isLpCryptoPool(lpAddress, block)) + return cryptoPoolLpPriceUsdc(lpAddress, block); + + const basePrice = getBasePrice(lpAddress, block); + const virtualPrice = getVirtualPrice(lpAddress, block).toBigDecimal(); + + const config = utils.getConfig(); + const usdcTokenDecimals = config.usdcTokenDecimals(); + + const decimalsAdjustment = + constants.DEFAULT_DECIMALS.minus(usdcTokenDecimals); + const priceUsdc = virtualPrice + .times(basePrice.usdPrice) + .times( + constants.BIGINT_TEN.pow(decimalsAdjustment.toI32() as u8).toBigDecimal() + ); + + const liquidity = getLpTokenLiquidityUsdc(lpAddress, block); + + return CustomPriceType.initialize( + priceUsdc, + decimalsAdjustment.plus(constants.DEFAULT_DECIMALS).toI32() as u8, + constants.OracleType.CURVE_ROUTER, + liquidity.usdPrice + ); +} + +export function getBasePrice( + lpAddress: Address, + block: ethereum.Block | null = null +): CustomPriceType { + const poolAddress = getPoolFromLpToken(lpAddress, block); + + if (poolAddress.equals(constants.NULL.TYPE_ADDRESS)) + return new CustomPriceType(); + + const underlyingCoinAddress = getUnderlyingCoinFromPool(poolAddress, block); + const basePrice = getPriceUsdcRecommended(underlyingCoinAddress, block); + + return basePrice; +} + +export function getUnderlyingCoinFromPool( + poolAddress: Address, + block: ethereum.Block | null = null +): Address { + const config = utils.getConfig(); + const curveRegistryAdresses = config.curveRegistry(); + + for (let idx = 0; idx < curveRegistryAdresses.length; idx++) { + const curveRegistry = curveRegistryAdresses[idx]; + if (block && curveRegistry.startBlock.gt(block.number)) continue; + + const curveRegistryContract = CurveRegistryContract.bind( + curveRegistry.address + ); + + const coins = utils.readValue( + curveRegistryContract.try_get_underlying_coins(poolAddress), + [] + ); + + if (coins.length != 0) return getPreferredCoinFromCoins(coins); + } + + return constants.NULL.TYPE_ADDRESS; +} + +export function getPreferredCoinFromCoins(coins: Address[]): Address { + let preferredCoinAddress = constants.NULL.TYPE_ADDRESS; + for (let coinIdx = 0; coinIdx < 8; coinIdx++) { + const coinAddress = coins[coinIdx]; + + if (coinAddress.notEqual(constants.NULL.TYPE_ADDRESS)) { + preferredCoinAddress = coinAddress; + } + // Found preferred coin and we're at the end of the token array + if ( + (preferredCoinAddress.notEqual(constants.NULL.TYPE_ADDRESS) && + coinAddress.equals(constants.NULL.TYPE_ADDRESS)) || + coinIdx == 7 + ) { + break; + } + } + + return preferredCoinAddress; +} + +export function getVirtualPrice( + curveLpTokenAddress: Address, + block: ethereum.Block | null = null +): BigInt { + const config = utils.getConfig(); + const curveRegistryAdresses = config.curveRegistry(); + + for (let idx = 0; idx < curveRegistryAdresses.length; idx++) { + const curveRegistry = curveRegistryAdresses[idx]; + if (block && curveRegistry.startBlock.gt(block.number)) continue; + + const curveRegistryContract = CurveRegistryContract.bind( + curveRegistry.address + ); + + const virtualPriceCall = + curveRegistryContract.try_get_virtual_price_from_lp_token( + curveLpTokenAddress + ); + + if (!virtualPriceCall.reverted) return virtualPriceCall.value; + } + + return constants.BIGINT_ZERO; +} + +export function getPriceUsdcRecommended( + tokenAddress: Address, + block: ethereum.Block | null = null +): CustomPriceType { + return getUsdPricePerToken(tokenAddress, block); +} + +export function cryptoPoolLpPriceUsdc( + lpAddress: Address, + block: ethereum.Block | null = null +): CustomPriceType { + const totalSupply = utils.getTokenSupply(lpAddress); + + const totalValueUsdc = cryptoPoolLpTotalValueUsdc(lpAddress, block); + const priceUsdc = totalValueUsdc + .times( + constants.BIGINT_TEN.pow( + constants.DEFAULT_DECIMALS.toI32() as u8 + ).toBigDecimal() + ) + .div(totalSupply.toBigDecimal()); + + return CustomPriceType.initialize( + priceUsdc, + 0, + constants.OracleType.CURVE_ROUTER + ); +} + +export function cryptoPoolLpTotalValueUsdc( + lpAddress: Address, + block: ethereum.Block | null = null +): BigDecimal { + const poolAddress = getPoolFromLpToken(lpAddress, block); + + const underlyingTokensAddresses = + cryptoPoolUnderlyingTokensAddressesByPoolAddress(poolAddress); + + let totalValue = constants.BIGDECIMAL_ZERO; + + for ( + let tokenIdx = 0; + tokenIdx < underlyingTokensAddresses.length; + tokenIdx++ + ) { + const tokenValueUsdc = cryptoPoolTokenAmountUsdc( + poolAddress, + underlyingTokensAddresses[tokenIdx], + BigInt.fromI32(tokenIdx), + block + ); + totalValue = totalValue.plus(tokenValueUsdc); + } + + return totalValue; +} + +export function cryptoPoolTokenAmountUsdc( + poolAddress: Address, + tokenAddress: Address, + tokenIdx: BigInt, + block: ethereum.Block | null = null +): BigDecimal { + const poolContract = CurvePoolContract.bind(poolAddress); + + const tokenBalance = utils + .readValue( + poolContract.try_balances(tokenIdx), + constants.BIGINT_ZERO + ) + .toBigDecimal(); + + const tokenDecimals = utils.getTokenDecimals(tokenAddress); + const tokenPrice = getPriceUsdcRecommended(tokenAddress, block); + const tokenValueUsdc = tokenBalance + .times(tokenPrice.usdPrice) + .div(constants.BIGINT_TEN.pow(tokenDecimals.toI32() as u8).toBigDecimal()); + + return tokenValueUsdc; +} + +export function cryptoPoolUnderlyingTokensAddressesByPoolAddress( + poolAddress: Address +): Address[] { + const poolContract = CurvePoolContract.bind(poolAddress); + + let idx = 0; + const coins: Address[] = []; + while (idx >= 0) { + const coin = utils.readValue
( + poolContract.try_coins(BigInt.fromI32(idx)), + constants.NULL.TYPE_ADDRESS + ); + + if (coin.equals(constants.NULL.TYPE_ADDRESS)) { + return coins; + } + + coins.push(coin); + idx += 1; + } + + return coins; +} + +export function getPriceUsdc( + tokenAddress: Address, + block: ethereum.Block +): CustomPriceType { + if (isCurveLpToken(tokenAddress, block)) + return getCurvePriceUsdc(tokenAddress, block); + + const poolContract = CurvePoolContract.bind(tokenAddress); + const virtualPrice = utils + .readValue( + poolContract.try_get_virtual_price(), + constants.BIGINT_ZERO + ) + .toBigDecimal(); + + const coins: Address[] = []; + for (let i = 0; i < 8; i++) { + const coin = utils.readValue
( + poolContract.try_coins(BigInt.fromI32(i)), + constants.NULL.TYPE_ADDRESS + ); + + coins.push(coin); + } + + const preferredCoin = getPreferredCoinFromCoins(coins); + const price = getPriceUsdcRecommended(preferredCoin, block); + + return CustomPriceType.initialize( + price.usdPrice.times(virtualPrice), + constants.DEFAULT_DECIMALS.toI32() as u8, + constants.OracleType.CURVE_ROUTER + ); +} + +function getLpTokenLiquidityUsdc( + lpAddress: Address, + block: ethereum.Block | null = null +): CustomPriceType { + const poolAddress = getPoolFromLpToken(lpAddress, block); + const poolContract = CurvePoolContract.bind(poolAddress); + + let liquidity = constants.BIGDECIMAL_ZERO; + for (let i = 0; i < 8; i++) { + const coin = utils.readValue
( + poolContract.try_coins(BigInt.fromI32(i)), + constants.NULL.TYPE_ADDRESS + ); + if (coin.equals(constants.NULL.TYPE_ADDRESS) || coin.equals(lpAddress)) + continue; + + const decimals = utils.getTokenDecimals(coin); + const balance = utils.readValue( + poolContract.try_balances(BigInt.fromI32(i as i32)), + constants.BIGINT_ZERO + ); + + const price = getPriceUsdcRecommended(coin, block); + liquidity = liquidity.plus( + balance + .div(constants.BIGINT_TEN.pow(decimals.toI32() as u8)) + .toBigDecimal() + .times(price.usdPrice) + ); + } + + return CustomPriceType.initialize( + liquidity, + constants.DEFAULT_USDC_DECIMALS, + constants.OracleType.CURVE_ROUTER + ); +} diff --git a/subgraphs/eigenpie/src/prices/routers/UniswapForksRouter.ts b/subgraphs/eigenpie/src/prices/routers/UniswapForksRouter.ts new file mode 100644 index 0000000000..dd44644834 --- /dev/null +++ b/subgraphs/eigenpie/src/prices/routers/UniswapForksRouter.ts @@ -0,0 +1,292 @@ +import * as utils from "../common/utils"; +import * as constants from "../common/constants"; +import { CustomPriceType } from "../common/types"; +import { Address, BigInt, ethereum, log } from "@graphprotocol/graph-ts"; +import { UniswapPair as UniswapPairContract } from "../../../generated/EigenConfig/UniswapPair"; +import { UniswapRouter as UniswapRouterContract } from "../../../generated/EigenConfig/UniswapRouter"; +import { UniswapFactory as UniswapFactoryContract } from "../../../generated/EigenConfig/UniswapFactory"; + +export function isLpToken(tokenAddress: Address, ethAddress: Address): bool { + if (tokenAddress.equals(ethAddress)) return false; + + const lpToken = UniswapRouterContract.bind(tokenAddress); + const isFactoryAvailable = utils.readValue( + lpToken.try_factory(), + constants.NULL.TYPE_ADDRESS + ); + + if (isFactoryAvailable.equals(constants.NULL.TYPE_ADDRESS)) return false; + + return true; +} + +export function getTokenPriceUSDC( + tokenAddress: Address, + block: ethereum.Block | null = null +): CustomPriceType { + const config = utils.getConfig(); + if (!config) return new CustomPriceType(); + + const ethAddress = config.ethAddress(); + const usdcAddress = config.usdcAddress(); + + if (isLpToken(tokenAddress, ethAddress)) { + return getLpTokenPriceUsdc(tokenAddress, block); + } + return getPriceFromRouterUSDC(tokenAddress, usdcAddress, block); +} + +export function getPriceFromRouterUSDC( + tokenAddress: Address, + usdcAddress: Address, + block: ethereum.Block | null = null +): CustomPriceType { + return getPriceFromRouter(tokenAddress, usdcAddress, block); +} + +export function getPriceFromRouter( + token0Address: Address, + token1Address: Address, + block: ethereum.Block | null = null +): CustomPriceType { + const config = utils.getConfig(); + + const ethAddress = config.ethAddress(); + const wethAddress = config.wethAddress(); + + // Construct swap path + const path: Address[] = []; + let numberOfJumps: BigInt; + + // Convert ETH address to WETH + if (token0Address == ethAddress) token0Address = wethAddress; + if (token1Address == ethAddress) token1Address = wethAddress; + + const inputTokenIsWeth: bool = + token0Address.equals(wethAddress) || token1Address.equals(wethAddress); + + if (inputTokenIsWeth) { + // Path = [token0, weth] or [weth, token1] + numberOfJumps = BigInt.fromI32(1); + + path.push(token0Address); + path.push(token1Address); + } else { + // Path = [token0, weth, token1] + numberOfJumps = BigInt.fromI32(2); + + path.push(token0Address); + path.push(wethAddress); + path.push(token1Address); + } + + const token0Decimals = utils.getTokenDecimals(token0Address); + const amountIn = constants.BIGINT_TEN.pow(token0Decimals.toI32() as u8); + + const routerAddresses = config.uniswapForks(); + + let routerAddress = constants.NULL.TYPE_ADDRESS; + let amountOut = constants.BIGINT_ZERO; + for (let idx = 0; idx < routerAddresses.length; idx++) { + const router = routerAddresses[idx]; + if (block && router.startBlock.gt(block.number)) continue; + + const uniswapForkRouter = UniswapRouterContract.bind(router.address); + const amountOutArray = uniswapForkRouter.try_getAmountsOut(amountIn, path); + + if (!amountOutArray.reverted) { + routerAddress = router.address; + amountOut = amountOutArray.value[amountOutArray.value.length - 1]; + break; + } + } + + const feeBips = BigInt.fromI32(30); + + const amountOutBigDecimal = amountOut + .times(constants.BIGINT_TEN_THOUSAND) + .div(constants.BIGINT_TEN_THOUSAND.minus(feeBips.times(numberOfJumps))) + .toBigDecimal(); + + const priceFromRouter = CustomPriceType.initialize( + amountOutBigDecimal, + config.usdcTokenDecimals().toI32() as u8, + constants.OracleType.UNISWAP_FORKS_ROUTER + ); + + const routerContract = UniswapRouterContract.bind(routerAddress); + const factoryAddress = utils.readValue( + routerContract.try_factory(), + constants.NULL.TYPE_ADDRESS + ); + if (factoryAddress.equals(constants.NULL.TYPE_ADDRESS)) + return priceFromRouter; + + const factoryContract = UniswapFactoryContract.bind(factoryAddress); + const tokenPair = utils.readValue( + factoryContract.try_getPair(token0Address, wethAddress), + constants.NULL.TYPE_ADDRESS + ); + if (tokenPair.equals(constants.NULL.TYPE_ADDRESS)) return priceFromRouter; + + const liquidityUSD = getLpTokenLiquidityUsdc(tokenPair, wethAddress, block); + priceFromRouter.setLiquidity(liquidityUSD.usdPrice); + + return priceFromRouter; +} + +export function getLpTokenPriceUsdc( + tokenAddress: Address, + block: ethereum.Block | null = null +): CustomPriceType { + const uniSwapPair = UniswapPairContract.bind(tokenAddress); + + const totalLiquidity: CustomPriceType = getLpTokenTotalLiquidityUsdc( + tokenAddress, + block + ); + const totalSupply = utils.readValue( + uniSwapPair.try_totalSupply(), + constants.BIGINT_ZERO + ); + if (totalSupply == constants.BIGINT_ZERO || totalLiquidity.reverted) { + return new CustomPriceType(); + } + + let pairDecimals: number; + const pairDecimalsCall = uniSwapPair.try_decimals(); + + if (pairDecimalsCall.reverted) { + log.warning( + "[UniswapForksRouter] Failed to fetch pair decimals, tokenAddress: {}", + [tokenAddress.toHexString()] + ); + + return new CustomPriceType(); + } else { + pairDecimals = pairDecimalsCall.value; + } + + const pricePerLpTokenUsdc = totalLiquidity.usdPrice + .times(constants.BIGINT_TEN.pow(pairDecimals as u8).toBigDecimal()) + .div(totalSupply.toBigDecimal()); + + return CustomPriceType.initialize( + pricePerLpTokenUsdc, + constants.DEFAULT_USDC_DECIMALS, + constants.OracleType.UNISWAP_FORKS_ROUTER + ); +} + +export function getLpTokenTotalLiquidityUsdc( + tokenAddress: Address, + block: ethereum.Block | null = null +): CustomPriceType { + const uniSwapPair = UniswapPairContract.bind(tokenAddress); + + const token0Address = utils.readValue
( + uniSwapPair.try_token0(), + constants.NULL.TYPE_ADDRESS + ); + const token1Address = utils.readValue
( + uniSwapPair.try_token1(), + constants.NULL.TYPE_ADDRESS + ); + + if ( + token0Address.equals(constants.NULL.TYPE_ADDRESS) || + token1Address.equals(constants.NULL.TYPE_ADDRESS) + ) { + return new CustomPriceType(); + } + + const token0Decimals = utils.getTokenDecimals(token0Address); + const token1Decimals = utils.getTokenDecimals(token1Address); + + const reservesCall = uniSwapPair.try_getReserves(); + + if (reservesCall.reverted) return new CustomPriceType(); + + const token0Price = getTokenPriceUSDC(token0Address, block); + const token1Price = getTokenPriceUSDC(token1Address, block); + + if (token0Price.reverted || token1Price.reverted) { + return new CustomPriceType(); + } + + const reserves = reservesCall.value; + const reserve0 = reserves.value0; + const reserve1 = reserves.value1; + + if ( + reserve0.notEqual(constants.BIGINT_ZERO) || + reserve1.notEqual(constants.BIGINT_ZERO) + ) { + const liquidity0 = reserve0 + .toBigDecimal() + .div( + constants.BIGINT_TEN.pow(token0Decimals.toI32() as u8).toBigDecimal() + ) + .times(token0Price.usdPrice); + + const liquidity1 = reserve1 + .toBigDecimal() + .div( + constants.BIGINT_TEN.pow(token1Decimals.toI32() as u8).toBigDecimal() + ) + .times(token1Price.usdPrice); + + const totalLiquidity = liquidity0.plus(liquidity1); + + return CustomPriceType.initialize( + totalLiquidity, + constants.DEFAULT_USDC_DECIMALS, + constants.OracleType.UNISWAP_FORKS_ROUTER + ); + } + return new CustomPriceType(); +} + +function getLpTokenLiquidityUsdc( + lpAddress: Address, + wethAddress: Address, + block: ethereum.Block | null = null +): CustomPriceType { + const uniSwapPair = UniswapPairContract.bind(lpAddress); + + const token1Call = uniSwapPair.try_token1(); + if (token1Call.reverted) return new CustomPriceType(); + const token1Address = token1Call.value; + + const reservesCall = uniSwapPair.try_getReserves(); + if (reservesCall.reverted) return new CustomPriceType(); + const reserves = reservesCall.value; + + let wethReserves = reserves.value0; + if (token1Address == wethAddress) { + wethReserves = reserves.value1; + } + + const wethPrice = getTokenPriceUSDC(wethAddress, block); + if (wethPrice.reverted) { + return new CustomPriceType(); + } + + const wethDecimals = utils.getTokenDecimals(wethAddress); + + if (wethReserves.notEqual(constants.BIGINT_ZERO)) { + const liquidityUSDC = utils + .bigIntToBigDecimal( + wethReserves, + wethDecimals.toI32() - constants.DEFAULT_USDC_DECIMALS + ) + .times(wethPrice.usdPrice); + + return CustomPriceType.initialize( + liquidityUSDC, + constants.DEFAULT_USDC_DECIMALS, + constants.OracleType.UNISWAP_FORKS_ROUTER + ); + } + return new CustomPriceType(); +} diff --git a/subgraphs/eigenpie/src/sdk/README.md b/subgraphs/eigenpie/src/sdk/README.md new file mode 100644 index 0000000000..c8e3bddd41 --- /dev/null +++ b/subgraphs/eigenpie/src/sdk/README.md @@ -0,0 +1,25 @@ +## Wat dis? + +This folder contains a library which abstracts the developer from most of the _schema related_ functionality. Ideally, building a subgraph should only consist on understading a protocol and translating certain events into actions and metrics. But the particularities of how this metrics are stored and how they relate to each other inside the schema can and should be abstracted away. Things like taking snapshots of entities every X amount of time, updating TVL every time there is a deposit/withdrawal, updating fees at _swap & pool & protocol & snapshot levels_, etc ... This library aims to do that. + +When using this library, entities should not be updated directly, but always through the library unless absolutely needed. An exception to this is if you create your own auxiliary entity to aid on the handling of some events. + +## How It's Organized + +Pretty straightforward, `/protocols` and `/util`. + +Because we are currently experimenting different approaches, each protocol type has a different schema, and AssemblyScript has some limitations when dealing with interfaces, so far, each protocol type has its own implementation. They all live in their respective folders under `/protocols`, and have very little shared code. + +`/util` contains all these common functions and constants we use over and over. + +## Setting it up + +It would be ideal to have the library to get setup automatically with the messari-cli, in a similar way as we do to generate versions. We might eventually get there, but so far it consists on a manual copy process. + +Refer to each protocol type readme, since requirements might vary: + +- [Bridges](./protocols/bridge/README.md) +- [Lending](./protocols/lending/README.md) +- [Perpetual Futures](./protocols/perpfutures/README.md) +- DEX +- Yield diff --git a/subgraphs/eigenpie/src/sdk/protocols/config.ts b/subgraphs/eigenpie/src/sdk/protocols/config.ts new file mode 100644 index 0000000000..c1c36a9217 --- /dev/null +++ b/subgraphs/eigenpie/src/sdk/protocols/config.ts @@ -0,0 +1,45 @@ +import { Token } from "../../../generated/schema"; +import { BigDecimal, BigInt } from "@graphprotocol/graph-ts"; +import { Versions } from "../../../../../deployment/context/interface"; + +export interface ProtocolConfigurer { + getID(): string; + getName(): string; + getSlug(): string; + getVersions(): Versions; +} + +export class ProtocolConfig implements ProtocolConfigurer { + id: string; + name: string; + slug: string; + versions: Versions; + + constructor(id: string, name: string, slug: string, versions: Versions) { + this.id = id; + this.name = name; + this.slug = slug; + this.versions = versions; + } + + getID(): string { + return this.id; + } + + getName(): string { + return this.name; + } + + getSlug(): string { + return this.slug; + } + + getVersions(): Versions { + return this.versions; + } +} + +export interface TokenPricer { + getTokenPrice(token: Token): BigDecimal; + getAmountValueUSD(token: Token, amount: BigInt): BigDecimal; +} diff --git a/subgraphs/eigenpie/src/sdk/protocols/generic/account.ts b/subgraphs/eigenpie/src/sdk/protocols/generic/account.ts new file mode 100644 index 0000000000..b962ef2360 --- /dev/null +++ b/subgraphs/eigenpie/src/sdk/protocols/generic/account.ts @@ -0,0 +1,93 @@ +import { + ActiveAccount, + Account as AccountSchema, +} from "../../../../generated/schema"; +import { TokenManager } from "./tokens"; +import { ProtocolManager } from "./protocol"; +import { Address } from "@graphprotocol/graph-ts"; +import { CustomEventType, getUnixDays, getUnixHours } from "../../util/events"; + +/** + * This file contains the AccountClass, which does + * the operations on the Account entity. This includes: + * - Creating a new Account + * - Updating an existing Account + * + * Schema Version: 3.0.0 + * SDK Version: 1.1.0 + * Author(s): + * - @steegecs + * - @shashwatS22 + */ + +export class AccountManager { + protocol: ProtocolManager; + tokens: TokenManager; + + constructor(protocol: ProtocolManager, tokens: TokenManager) { + this.protocol = protocol; + this.tokens = tokens; + } + + loadAccount(address: Address): Account { + let acc = AccountSchema.load(address.toHexString()); + if (acc) { + return new Account(this.protocol, acc, this.tokens); + } + + acc = new AccountSchema(address.toHexString()); + acc.save(); + + this.protocol.addUser(); + + return new Account(this.protocol, acc, this.tokens); + } +} + +export class AccountWasActive { + hourly: boolean; + daily: boolean; +} + +export class Account { + account: AccountSchema; + event: CustomEventType; + protocol: ProtocolManager; + tokens: TokenManager; + + constructor( + protocol: ProtocolManager, + account: AccountSchema, + tokens: TokenManager + ) { + this.account = account; + this.protocol = protocol; + this.event = protocol.getCurrentEvent(); + this.tokens = tokens; + } + + trackActivity(): void { + const days = getUnixDays(this.event.block); + const hours = getUnixHours(this.event.block); + + const generalHourlyID = `${this.account.id}-hourly-${hours}`; + const generalDailyID = `${this.account.id}-daily-${days}`; + + const generalActivity: AccountWasActive = { + daily: this.isActiveByActivityID(generalDailyID), + hourly: this.isActiveByActivityID(generalHourlyID), + }; + + this.protocol.addActiveUser(generalActivity); + this.protocol.addTransaction(); + } + + private isActiveByActivityID(id: string): boolean { + const dAct = ActiveAccount.load(id); + if (!dAct) { + new ActiveAccount(id).save(); + return true; + } + return false; + } +} diff --git a/subgraphs/eigenpie/src/sdk/protocols/generic/index.ts b/subgraphs/eigenpie/src/sdk/protocols/generic/index.ts new file mode 100644 index 0000000000..59f201e67f --- /dev/null +++ b/subgraphs/eigenpie/src/sdk/protocols/generic/index.ts @@ -0,0 +1,72 @@ +import { PoolManager } from "./pool"; +import { AccountManager } from "./account"; +import { ProtocolManager } from "./protocol"; +import { BIGINT_ZERO } from "../../util/constants"; +import { ethereum } from "@graphprotocol/graph-ts"; +import { CustomEventType } from "../../util/events"; +import { TokenManager, TokenInitializer } from "./tokens"; +import { ProtocolConfigurer, TokenPricer } from "../config"; + +/** + * This file contains the SDK class, which initializes + * all managers from event or call. + * + * Schema Version: 3.0.0 + * SDK Version: 1.1.0 + * Author(s): + * - @steegecs + * - @shashwatS22 + + */ + +export class SDK { + Protocol: ProtocolManager; + Accounts: AccountManager; + Pools: PoolManager; + Tokens: TokenManager; + Pricer: TokenPricer; + + constructor( + config: ProtocolConfigurer, + pricer: TokenPricer, + tokenInitializer: TokenInitializer, + event: CustomEventType + ) { + this.Protocol = ProtocolManager.load(config, pricer, event); + this.Tokens = new TokenManager(this.Protocol, tokenInitializer); + this.Accounts = new AccountManager(this.Protocol, this.Tokens); + this.Pools = new PoolManager(this.Protocol, this.Tokens); + this.Pricer = pricer; + + this.Protocol.sdk = this; + } + + static initializeFromEvent( + config: ProtocolConfigurer, + pricer: TokenPricer, + tokenInitializer: TokenInitializer, + event: ethereum.Event + ): SDK { + const customEvent = CustomEventType.initialize( + event.block, + event.transaction, + event.logIndex, + event + ); + return new SDK(config, pricer, tokenInitializer, customEvent); + } + + static initializeFromCall( + config: ProtocolConfigurer, + pricer: TokenPricer, + tokenInitializer: TokenInitializer, + event: ethereum.Call + ): SDK { + const customEvent = CustomEventType.initialize( + event.block, + event.transaction, + BIGINT_ZERO + ); + return new SDK(config, pricer, tokenInitializer, customEvent); + } +} diff --git a/subgraphs/eigenpie/src/sdk/protocols/generic/pool.ts b/subgraphs/eigenpie/src/sdk/protocols/generic/pool.ts new file mode 100644 index 0000000000..fa71e2239c --- /dev/null +++ b/subgraphs/eigenpie/src/sdk/protocols/generic/pool.ts @@ -0,0 +1,298 @@ +import { BIGDECIMAL_ZERO, BIGINT_ZERO } from "../../util/constants"; +import { TokenManager } from "./tokens"; +import { ProtocolManager } from "./protocol"; +import { PoolSnapshot } from "./poolSnapshot"; +import { Pool as PoolSchema, Token } from "../../../../generated/schema"; +import { Bytes, BigDecimal, BigInt, Address } from "@graphprotocol/graph-ts"; + +/** + * This file contains the PoolManager, which is used to + * initialize new pools in the protocol. + * + * Schema Version: 3.0.0 + * SDK Version: 1.1.0 + * Author(s): + * - @steegecs + * - @shashwatS22 + */ + +export class PoolManager { + protocol: ProtocolManager; + tokens: TokenManager; + + constructor(protocol: ProtocolManager, tokens: TokenManager) { + this.protocol = protocol; + this.tokens = tokens; + } + + loadPool(id: Bytes): Pool { + let entity = PoolSchema.load(id); + if (entity) { + return new Pool(this.protocol, entity, this.tokens, true); + } + + entity = new PoolSchema(id); + entity.protocol = this.protocol.getBytesID(); + + const pool = new Pool(this.protocol, entity, this.tokens, false); + pool.isInitialized = false; + return pool; + } +} + +export class Pool { + pool: PoolSchema; + protocol: ProtocolManager; + tokens: TokenManager; + snapshoter: PoolSnapshot | null = null; + + public isInitialized: boolean = true; + + constructor( + protocol: ProtocolManager, + pool: PoolSchema, + tokens: TokenManager, + isInitialized: bool + ) { + this.pool = pool; + this.protocol = protocol; + this.tokens = tokens; + + if (isInitialized) { + this.snapshoter = new PoolSnapshot(pool, protocol.event); + this.pool.lastUpdateTimestamp = protocol.event.block.timestamp; + this.save(); + } + } + + private save(): void { + this.pool.save(); + } + + initialize( + name: string, + symbol: string, + inputTokens: Bytes[], + outputToken: Token | null + ): void { + if (this.isInitialized) { + return; + } + + const event = this.protocol.getCurrentEvent(); + this.pool.protocol = this.protocol.getBytesID(); + this.pool.name = name; + this.pool.symbol = symbol; + this.pool.inputTokens = inputTokens; + this.pool.outputToken = outputToken ? outputToken.id : null; + this.pool.createdTimestamp = event.block.timestamp; + this.pool.createdBlockNumber = event.block.number; + + this.pool.inputTokenBalances = []; + this.pool.inputTokenBalancesUSD = []; + this.pool.totalValueLockedUSD = BIGDECIMAL_ZERO; + this.pool.cumulativeSupplySideRevenueUSD = BIGDECIMAL_ZERO; + this.pool.cumulativeProtocolSideRevenueUSD = BIGDECIMAL_ZERO; + this.pool.cumulativeTotalRevenueUSD = BIGDECIMAL_ZERO; + + this.pool.lastSnapshotDayID = 0; + this.pool.lastUpdateTimestamp = BIGINT_ZERO; + this.save(); + + this.protocol.addPool(); + } + + /** + * Recalculates the total value locked for this pool based on its current input token balance. + * This function will also update the protocol's total value locked based on the change in this pool's. + */ + private refreshTotalValueLocked(): void { + let totalValueLockedUSD = BIGDECIMAL_ZERO; + + for (let idx = 0; idx < this.pool.inputTokens.length; idx++) { + const inputTokenBalanceUSD = this.pool.inputTokenBalancesUSD[idx]; + totalValueLockedUSD = totalValueLockedUSD.plus(inputTokenBalanceUSD); + } + + this.setTotalValueLocked(totalValueLockedUSD); + } + + /** + * Updates the total value locked for this pool to the given value. + * Will also update the protocol's total value locked based on the change in this pool's. + */ + setTotalValueLocked(newTVL: BigDecimal): void { + const delta = newTVL.minus(this.pool.totalValueLockedUSD); + this.addTotalValueLocked(delta); + this.save(); + } + + /** + * Adds the given delta to the total value locked for this pool. + * Will also update the protocol's total value locked based on the change in this pool's. + * + * @param delta The change in total value locked for this pool. + */ + addTotalValueLocked(delta: BigDecimal): void { + this.pool.totalValueLockedUSD = this.pool.totalValueLockedUSD.plus(delta); + this.protocol.addTotalValueLocked(delta); + this.save(); + } + + /** + * Utility function to update token price. + * + * @param token + * @returns + */ + setTokenPrice(token: Token): void { + if ( + !token.lastPriceBlockNumber || + (token.lastPriceBlockNumber && + token.lastPriceBlockNumber! < this.protocol.event.block.number) + ) { + const pricePerToken = this.protocol.getTokenPricer().getTokenPrice(token); + token.lastPriceUSD = pricePerToken; + token.lastPriceBlockNumber = this.protocol.event.block.number; + token.save(); + } + } + + /** + * Utility function to convert some amount of input token to USD. + * + * @param token + * @param amount the amount of inputToken to convert to USD + * @returns The converted amount. + */ + getInputTokenAmountPrice(token: Token, amount: BigInt): BigDecimal { + this.setTokenPrice(token); + + return this.protocol.getTokenPricer().getAmountValueUSD(token, amount); + } + + /** + * Sets the pool's input token balance to the given amount. It will optionally + * update the pool's and protocol's total value locked. If not stated, will default to true. + * + * @param amount amount to be set as the pool's input token balance. + * @param updateMetrics optional parameter to indicate whether to update the pool's and protocol's total value locked. + */ + setInputTokenBalances( + newBalances: BigInt[], + updateMetrics: boolean = true + ): void { + this.pool.inputTokenBalances = newBalances; + this.setInputTokenBalancesUSD(); + if (updateMetrics) { + this.refreshTotalValueLocked(); + } + } + + /** + * Sets the pool's input token balance USD by calculating it for each token. + */ + private setInputTokenBalancesUSD(): void { + const inputTokenBalancesUSD: BigDecimal[] = []; + for (let idx = 0; idx < this.pool.inputTokens.length; idx++) { + const inputTokenBalance = this.pool.inputTokenBalances[idx]; + const inputToken = this.tokens.getOrCreateToken( + Address.fromBytes(this.pool.inputTokens[idx]) + ); + + const amountUSD = this.getInputTokenAmountPrice( + inputToken, + inputTokenBalance + ); + inputTokenBalancesUSD.push(amountUSD); + } + this.pool.inputTokenBalancesUSD = inputTokenBalancesUSD; + } + + getBytesID(): Bytes { + return this.pool.id; + } + + /** + * Adds a given USD value to the pool and protocol supplySideRevenue. It can be a positive or negative amount. + * Same as for the rest of setters, this is mostly to be called internally by the library. + * But you can use it if you need to. It will also update the protocol's snapshots. + * @param rev {BigDecimal} The value to add to the protocol's supplySideRevenue. + */ + addSupplySideRevenueUSD(rev: BigDecimal): void { + this.pool.cumulativeTotalRevenueUSD = + this.pool.cumulativeTotalRevenueUSD.plus(rev); + this.pool.cumulativeSupplySideRevenueUSD = + this.pool.cumulativeSupplySideRevenueUSD.plus(rev); + this.save(); + + this.protocol.addSupplySideRevenueUSD(rev); + } + + /** + * Adds a given USD value to the pool and protocol protocolSideRevenue. It can be a positive or negative amount. + * Same as for the rest of setters, this is mostly to be called internally by the library. + * But you can use it if you need to. It will also update the protocol's snapshots. + * @param rev {BigDecimal} The value to add to the protocol's protocolSideRevenue. + */ + addProtocolSideRevenueUSD(rev: BigDecimal): void { + this.pool.cumulativeTotalRevenueUSD = + this.pool.cumulativeTotalRevenueUSD.plus(rev); + this.pool.cumulativeProtocolSideRevenueUSD = + this.pool.cumulativeProtocolSideRevenueUSD.plus(rev); + this.save(); + + this.protocol.addProtocolSideRevenueUSD(rev); + } + + /** + * Adds a given USD value to the pool and protocol's supplySideRevenue and protocolSideRevenue. It can be a positive or negative amount. + * Same as for the rest of setters, this is mostly to be called internally by the library. + * But you can use it if you need to. It will also update the protocol's snapshots. + * @param protocolSide {BigDecimal} The value to add to the protocol's protocolSideRevenue. + * @param supplySide {BigDecimal} The value to add to the protocol's supplySideRevenue. + */ + addRevenueUSD(protocolSide: BigDecimal, supplySide: BigDecimal): void { + this.addSupplySideRevenueUSD(supplySide); + this.addProtocolSideRevenueUSD(protocolSide); + } + + /** + * Convenience method to add revenue denominated in the pool's input token. It converts it to USD + * under the hood and calls addRevenueUSD. + */ + addRevenueNative( + inputToken: Token, + protocolSide: BigInt, + supplySide: BigInt + ): void { + const pricer = this.protocol.pricer; + + const pAmountUSD = pricer.getAmountValueUSD(inputToken, protocolSide); + const sAmountUSD = pricer.getAmountValueUSD(inputToken, supplySide); + this.addRevenueUSD(pAmountUSD, sAmountUSD); + } + + /** + * Adds a given amount to the pool's outputTokenSupply. It should only be used for pools + * of type LIQUIDITY. Or pools that emit some kind of LP token on deposit. + * @param amount + */ + addOutputTokenSupply(amount: BigInt): void { + if (!this.pool.outputTokenSupply) { + this.pool.outputTokenSupply = BIGINT_ZERO; + } + this.pool.outputTokenSupply = this.pool.outputTokenSupply!.plus(amount); + this.save(); + } + + /** + * Sets the pool's outputTokenSupply value. It should only be used for pools + * of type LIQUIDITY. Or pools that emit some kind of LP token on deposit. + * @param amount + */ + setOutputTokenSupply(amount: BigInt): void { + this.pool.outputTokenSupply = amount; + this.save(); + } +} diff --git a/subgraphs/eigenpie/src/sdk/protocols/generic/poolSnapshot.ts b/subgraphs/eigenpie/src/sdk/protocols/generic/poolSnapshot.ts new file mode 100644 index 0000000000..c7945dbb64 --- /dev/null +++ b/subgraphs/eigenpie/src/sdk/protocols/generic/poolSnapshot.ts @@ -0,0 +1,93 @@ +import { + Pool as PoolSchema, + PoolDailySnapshot, +} from "../../../../generated/schema"; +import { SECONDS_PER_DAY } from "../../util/constants"; +import { CustomEventType, getUnixDays, getUnixHours } from "../../util/events"; + +/** + * This file contains the PoolSnapshot, which is used to + * make all of the storage changes that occur in the pool daily and hourly snapshots. + * + * Schema Version: 3.0.0 + * SDK Version: 1.1.0 + * Author(s): + * - @steegecs + * - @shashwatS22 + */ + +export class PoolSnapshot { + pool: PoolSchema; + event: CustomEventType; + dayID: i32; + hourID: i32; + + constructor(pool: PoolSchema, event: CustomEventType) { + this.pool = pool; + this.event = event; + this.dayID = getUnixDays(event.block); + this.hourID = getUnixHours(event.block); + this.takeSnapshots(); + } + + private takeSnapshots(): void { + if (!this.pool.lastUpdateTimestamp) return; + + const snapshotDayID = + this.pool.lastUpdateTimestamp.toI32() / SECONDS_PER_DAY; + + if (snapshotDayID != this.dayID) { + this.takeDailySnapshot(snapshotDayID); + this.pool.lastSnapshotDayID = snapshotDayID; + this.pool.save(); + } + } + + private takeDailySnapshot(day: i32): void { + const snapshot = new PoolDailySnapshot(this.pool.id.concatI32(day)); + const previousSnapshot = PoolDailySnapshot.load( + this.pool.id.concatI32(this.pool.lastSnapshotDayID) + ); + + snapshot.day = day; + snapshot.protocol = this.pool.protocol; + snapshot.pool = this.pool.id; + snapshot.timestamp = this.event.block.timestamp; + snapshot.blockNumber = this.event.block.number; + + // tvl and balances + snapshot.totalValueLockedUSD = this.pool.totalValueLockedUSD; + snapshot.inputTokenBalances = this.pool.inputTokenBalances; + snapshot.inputTokenBalancesUSD = this.pool.inputTokenBalancesUSD; + + // revenues + snapshot.cumulativeSupplySideRevenueUSD = + this.pool.cumulativeSupplySideRevenueUSD; + snapshot.cumulativeProtocolSideRevenueUSD = + this.pool.cumulativeProtocolSideRevenueUSD; + snapshot.cumulativeTotalRevenueUSD = this.pool.cumulativeTotalRevenueUSD; + + // deltas + let supplySideRevenueDelta = snapshot.cumulativeSupplySideRevenueUSD; + let protocolSideRevenueDelta = snapshot.cumulativeProtocolSideRevenueUSD; + let totalRevenueDelta = snapshot.cumulativeTotalRevenueUSD; + + if (previousSnapshot) { + supplySideRevenueDelta = snapshot.cumulativeSupplySideRevenueUSD.minus( + previousSnapshot.cumulativeSupplySideRevenueUSD + ); + protocolSideRevenueDelta = + snapshot.cumulativeProtocolSideRevenueUSD.minus( + previousSnapshot.cumulativeProtocolSideRevenueUSD + ); + totalRevenueDelta = snapshot.cumulativeTotalRevenueUSD.minus( + previousSnapshot.cumulativeTotalRevenueUSD + ); + } + snapshot.dailySupplySideRevenueUSD = supplySideRevenueDelta; + snapshot.dailyProtocolSideRevenueUSD = protocolSideRevenueDelta; + snapshot.dailyTotalRevenueUSD = totalRevenueDelta; + + snapshot.save(); + } +} diff --git a/subgraphs/eigenpie/src/sdk/protocols/generic/protocol.ts b/subgraphs/eigenpie/src/sdk/protocols/generic/protocol.ts new file mode 100644 index 0000000000..c09aac2905 --- /dev/null +++ b/subgraphs/eigenpie/src/sdk/protocols/generic/protocol.ts @@ -0,0 +1,257 @@ +import { SDK } from "."; +import { + dataSource, + Address, + Bytes, + BigDecimal, +} from "@graphprotocol/graph-ts"; +import { AccountWasActive } from "./account"; +import * as constants from "../../util/constants"; +import { BIGINT_ZERO } from "../../util/constants"; +import { CustomEventType } from "../../util/events"; +import { ProtocolSnapshot } from "./protocolSnapshot"; +import { ProtocolConfigurer, TokenPricer } from "../config"; +import { Protocol as ProtocolSchema } from "../../../../generated/schema"; +import { Versions } from "../../../../../../deployment/context/interface"; + +/** + * This file contains the ProtocolManager class, which is used to + * make all of the storage changes that occur in a protocol. + * + * Schema Version: 3.0.0 + * SDK Version: 1.1.0 + * Author(s): + * - @steegecs + * - @shashwatS22 + */ + +/** + * ProtocolManager is a wrapper around the ProtocolSchema entity that takes care of + * safely and conveniently updating the entity. Updating the Protocol entity using this + * wrapper also takes care of the Financials and Usage snapshots. + */ +export class ProtocolManager { + protocol: ProtocolSchema; + event: CustomEventType; + pricer: TokenPricer; + snapshoter: ProtocolSnapshot; + sdk: SDK | null = null; + /** + * Creates a new Protocol instance. This should only be called by the Protocol.load + * @private + */ + private constructor( + protocol: ProtocolSchema, + pricer: TokenPricer, + event: CustomEventType + ) { + this.protocol = protocol; + this.event = event; + this.pricer = pricer; + this.snapshoter = new ProtocolSnapshot(protocol, event); + this.protocol.lastUpdateTimestamp = event.block.timestamp; + } + + /** + * This is the main function to instantiate a Protocol entity. Most times it is not called directly, but from the SDK initializer. + * + * @param conf {ProtocolConfigurer} An object that implements the ProtocolConfigurer interface, to set some of the protocol's properties + * @param pricer {TokenPricer} An object that implements the TokenPricer interface, to allow the wrapper to access pricing data + * @param event {CustomEventType} The event being handled at a time. + * @returns Protocol + */ + static load( + conf: ProtocolConfigurer, + pricer: TokenPricer, + event: CustomEventType + ): ProtocolManager { + const id = Address.fromString(conf.getID()); + let protocol = ProtocolSchema.load(id); + if (protocol) { + const proto = new ProtocolManager(protocol, pricer, event); + proto.setVersions(conf.getVersions()); + return proto; + } + + protocol = new ProtocolSchema(id); + protocol.name = conf.getName(); + protocol.slug = conf.getSlug(); + protocol.network = dataSource.network().toUpperCase().replace("-", "_"); + protocol.type = constants.ProtocolType.GENERIC; + protocol.totalValueLockedUSD = constants.BIGDECIMAL_ZERO; + protocol.cumulativeSupplySideRevenueUSD = constants.BIGDECIMAL_ZERO; + protocol.cumulativeProtocolSideRevenueUSD = constants.BIGDECIMAL_ZERO; + protocol.cumulativeTotalRevenueUSD = constants.BIGDECIMAL_ZERO; + + protocol.cumulativeTransactionCount = 0; + protocol.cumulativeUniqueUsers = 0; + protocol.totalPoolCount = 0; + + protocol.lastSnapshotDayID = 0; + protocol.lastUpdateTimestamp = BIGINT_ZERO; + + protocol.schemaVersion = conf.getVersions().getSchemaVersion(); + protocol.subgraphVersion = conf.getVersions().getSubgraphVersion(); + protocol.methodologyVersion = conf.getVersions().getMethodologyVersion(); + + const proto = new ProtocolManager(protocol, pricer, event); + proto.save(); + return proto; + } + + /** + * Updates the protocol entity versions. This is called on load to make sure we update the version + * if we've grafted the subgraph. + * + * @param versions {Versions} An object that implements the Versions interface, to get the protocol's versions + */ + private setVersions(versions: Versions): void { + this.protocol.schemaVersion = versions.getSchemaVersion(); + this.protocol.subgraphVersion = versions.getSubgraphVersion(); + this.protocol.methodologyVersion = versions.getMethodologyVersion(); + this.save(); + } + + /** + * This will save the entity to storage. If any other action needs to be performed on + * save, it should be added here. + * It is meant to be used internally. If you need to save the entity from outside the wrapper + * you should probably be using some of the setters instead. + * @private + */ + private save(): void { + this.protocol.save(); + } + + /** + * + * @returns {string} The ID of the protocol entity. + */ + getID(): string { + return this.protocol.id.toHexString(); + } + + /** + * + * @returns {Bytes} The ID of the protocol entity, as Bytes. + */ + getBytesID(): Bytes { + return this.protocol.id; + } + + /** + * + * @returns {CustomEventType} the event currently being handled. + */ + getCurrentEvent(): CustomEventType { + return this.event; + } + + /** + * + * @returns {TokenPricer} The pricer object used by the wrapper. + * @see TokenPricer + */ + getTokenPricer(): TokenPricer { + return this.pricer; + } + + /** + * Sets the TVL in USD for the protocol. Most times this will be called internally by + * other members of the library when TVL changes are made to them. But if the library + * is not well fitted to a given protocol and you need to set the TVL manually, you can + * use this method. + * It will also update the protocol's snapshots. + * @param tvl {BigDecimal} The new total value locked for the protocol. + */ + setTotalValueLocked(tvl: BigDecimal): void { + this.protocol.totalValueLockedUSD = tvl; + this.save(); + } + + /** + * Adds a given USD value to the protocol's TVL. It can be a positive or negative amount. + * Same as for setTotalValueLocked, this is mostly to be called internally by the library. + * But you can use it if you need to. It will also update the protocol's snapshots. + * @param tvl {BigDecimal} The value to add to the protocol's TVL. + */ + addTotalValueLocked(tvl: BigDecimal): void { + this.protocol.totalValueLockedUSD = + this.protocol.totalValueLockedUSD.plus(tvl); + this.save(); + } + + /** + * Adds a given USD value to the protocol supplySideRevenue. It can be a positive or negative amount. + * Same as for the rest of setters, this is mostly to be called internally by the library. + * But you can use it if you need to. It will also update the protocol's snapshots. + * @param rev {BigDecimal} The value to add to the protocol's supplySideRevenue. + */ + addSupplySideRevenueUSD(rev: BigDecimal): void { + this.protocol.cumulativeTotalRevenueUSD = + this.protocol.cumulativeTotalRevenueUSD.plus(rev); + this.protocol.cumulativeSupplySideRevenueUSD = + this.protocol.cumulativeSupplySideRevenueUSD.plus(rev); + this.save(); + } + + /** + * Adds a given USD value to the protocol protocolSideRevenue. It can be a positive or negative amount. + * Same as for the rest of setters, this is mostly to be called internally by the library. + * But you can use it if you need to. It will also update the protocol's snapshots. + * @param rev {BigDecimal} The value to add to the protocol's protocolSideRevenue. + */ + addProtocolSideRevenueUSD(rev: BigDecimal): void { + this.protocol.cumulativeTotalRevenueUSD = + this.protocol.cumulativeTotalRevenueUSD.plus(rev); + this.protocol.cumulativeProtocolSideRevenueUSD = + this.protocol.cumulativeProtocolSideRevenueUSD.plus(rev); + this.save(); + } + + /** + * Adds a given USD value to the protocol's supplySideRevenue and protocolSideRevenue. It can be a positive or negative amount. + * Same as for the rest of setters, this is mostly to be called internally by the library. + * But you can use it if you need to. It will also update the protocol's snapshots. + * @param protocolSide {BigDecimal} The value to add to the protocol's protocolSideRevenue. + * @param supplySide {BigDecimal} The value to add to the protocol's supplySideRevenue. + */ + addRevenueUSD(protocolSide: BigDecimal, supplySide: BigDecimal): void { + this.addSupplySideRevenueUSD(supplySide); + this.addProtocolSideRevenueUSD(protocolSide); + } + + /** + * Adds some value to the cumulativeUniqueUsers counter. If the value is omitted it will default to 1. + * If you are loading accounts with the AccountManager you won't need to use this method. + * @param count {u8} The value to add to the counter. + */ + addUser(count: u8 = 1): void { + this.protocol.cumulativeUniqueUsers += count; + this.save(); + } + + /** + * Will increase the hourly and daily active users counters. These will be reflected + * on the next Usage snapshot whenever it comes up. + */ + addActiveUser(activity: AccountWasActive): void { + this.snapshoter.addActiveUser(activity); + } + + /** + * Increases the totalPoolCount counter by the given value. + * If you are using the PoolManager class you won't need to use this method. + * @param count {u8} The value to add to the counter. + * @see PoolManager + */ + addPool(count: u8 = 1): void { + this.protocol.totalPoolCount += count; + this.save(); + } + + addTransaction(): void { + this.protocol.cumulativeTransactionCount += 1; + this.save(); + } +} diff --git a/subgraphs/eigenpie/src/sdk/protocols/generic/protocolSnapshot.ts b/subgraphs/eigenpie/src/sdk/protocols/generic/protocolSnapshot.ts new file mode 100644 index 0000000000..85d80bbc36 --- /dev/null +++ b/subgraphs/eigenpie/src/sdk/protocols/generic/protocolSnapshot.ts @@ -0,0 +1,165 @@ +import { + _ActivityHelper, + FinancialsDailySnapshot, + UsageMetricsDailySnapshot, + Protocol as ProtocolSchema, +} from "../../../../generated/schema"; +import { AccountWasActive } from "./account"; +import { Bytes } from "@graphprotocol/graph-ts"; +import { SECONDS_PER_DAY } from "../../util/constants"; +import { CustomEventType, getUnixDays, getUnixHours } from "../../util/events"; + +const ActivityHelperID = Bytes.fromUTF8("_ActivityHelper"); + +/** + * This file contains the ProtocolSnapshot, which is used to + * make all of the storage changes that occur in the protocol's + * daily and hourly snapshots. + * + * Schema Version: 3.0.0 + * SDK Version: 1.1.0 + * Author(s): + * - @steegecs + * - @shashwatS22 + */ + +/** + * Helper class to manage Financials and Usage snapshots. + * It is not meant to be used directly, but rather by the Protocol and Account lib classes. + * Whenever it is instantiated it will check if it is time to take any of the + * dailyFinancials, dailyUsage or hourlyUsage snapshots. + * + * Snapshots are taken in a way that allows the snapshot entity to be immutable. + */ +export class ProtocolSnapshot { + protocol: ProtocolSchema; + event: CustomEventType; + dayID: i32; + hourID: i32; + activityHelper: _ActivityHelper; + + constructor(protocol: ProtocolSchema, event: CustomEventType) { + this.protocol = protocol; + this.event = event; + this.dayID = getUnixDays(event.block); + this.hourID = getUnixHours(event.block); + this.activityHelper = initActivityHelper(); + this.takeSnapshots(); + } + + addActiveUser(activity: AccountWasActive): void { + this.activityHelper.dailyActiveUsers += activity.daily ? 1 : 0; + this.activityHelper.save(); + } + + private takeSnapshots(): void { + const snapshotDayID = + this.protocol.lastUpdateTimestamp.toI32() / SECONDS_PER_DAY; + + if (snapshotDayID != this.dayID) { + this.takeFinancialsDailySnapshot(snapshotDayID); + this.takeUsageDailySnapshot(snapshotDayID); + this.protocol.lastSnapshotDayID = snapshotDayID; + this.protocol.save(); + } + } + + private takeFinancialsDailySnapshot(day: i32): void { + const snapshot = new FinancialsDailySnapshot(Bytes.fromI32(day)); + const previousSnapshot = FinancialsDailySnapshot.load( + Bytes.fromI32(this.protocol.lastSnapshotDayID) + ); + + snapshot.day = day; + snapshot.protocol = this.protocol.id; + snapshot.blockNumber = this.event.block.number; + snapshot.timestamp = this.event.block.timestamp; + + // tvl + snapshot.totalValueLockedUSD = this.protocol.totalValueLockedUSD; + + // revenues + snapshot.cumulativeSupplySideRevenueUSD = + this.protocol.cumulativeSupplySideRevenueUSD; + snapshot.cumulativeProtocolSideRevenueUSD = + this.protocol.cumulativeProtocolSideRevenueUSD; + snapshot.cumulativeTotalRevenueUSD = + this.protocol.cumulativeTotalRevenueUSD; + + // deltas + let supplySideRevenueDelta = snapshot.cumulativeSupplySideRevenueUSD; + let protocolSideRevenueDelta = snapshot.cumulativeProtocolSideRevenueUSD; + let totalRevenueDelta = snapshot.cumulativeTotalRevenueUSD; + + if (previousSnapshot) { + supplySideRevenueDelta = snapshot.cumulativeSupplySideRevenueUSD.minus( + previousSnapshot.cumulativeSupplySideRevenueUSD + ); + protocolSideRevenueDelta = + snapshot.cumulativeProtocolSideRevenueUSD.minus( + previousSnapshot.cumulativeProtocolSideRevenueUSD + ); + totalRevenueDelta = snapshot.cumulativeTotalRevenueUSD.minus( + previousSnapshot.cumulativeTotalRevenueUSD + ); + } + snapshot.dailySupplySideRevenueUSD = supplySideRevenueDelta; + snapshot.dailyProtocolSideRevenueUSD = protocolSideRevenueDelta; + snapshot.dailyTotalRevenueUSD = totalRevenueDelta; + + snapshot.save(); + } + + private takeUsageDailySnapshot(day: i32): void { + const activity = this.activityHelper; + + const snapshot = new UsageMetricsDailySnapshot(Bytes.fromI32(day)); + const previousSnapshot = UsageMetricsDailySnapshot.load( + Bytes.fromI32(this.protocol.lastSnapshotDayID) + ); + + snapshot.protocol = this.protocol.id; + snapshot.day = day; + snapshot.blockNumber = this.event.block.number; + snapshot.timestamp = this.event.block.timestamp; + + // unique users + snapshot.cumulativeUniqueUsers = this.protocol.cumulativeUniqueUsers; + + // daily activity + snapshot.dailyActiveUsers = activity.dailyActiveUsers; + + // transaction counts + snapshot.cumulativeTransactionCount = + this.protocol.cumulativeTransactionCount; + + // misc + snapshot.totalPoolCount = this.protocol.totalPoolCount; + + // deltas + let transactionDelta = snapshot.cumulativeTransactionCount; + + if (previousSnapshot) { + transactionDelta = + snapshot.cumulativeTransactionCount - + previousSnapshot.cumulativeTransactionCount; + } + snapshot.dailyTransactionCount = transactionDelta; + snapshot.save(); + + activity.dailyActiveUsers = 0; + activity.save(); + } +} + +function initActivityHelper(): _ActivityHelper { + let helper = _ActivityHelper.load(ActivityHelperID); + if (helper) { + return helper; + } + helper = new _ActivityHelper(ActivityHelperID); + helper.dailyActiveUsers = 0; + + helper.save(); + return helper; +} diff --git a/subgraphs/eigenpie/src/sdk/protocols/generic/tokens.ts b/subgraphs/eigenpie/src/sdk/protocols/generic/tokens.ts new file mode 100644 index 0000000000..7095cf896c --- /dev/null +++ b/subgraphs/eigenpie/src/sdk/protocols/generic/tokens.ts @@ -0,0 +1,58 @@ +import { ProtocolManager } from "./protocol"; +import { Address } from "@graphprotocol/graph-ts"; +import { Token } from "../../../../generated/schema"; +import { BIGDECIMAL_ZERO } from "../../util/constants"; + +/** + * This file contains the TokenManagerClass, which initializes + * token entities. + * + * Schema Version: 3.0.0 + * SDK Version: 1.1.0 + * Author(s): + * - @steegecs + * - @shashwatS22 + */ + +export interface TokenInitializer { + getTokenParams(address: Address): TokenParams; +} + +export class TokenParams { + name: string; + symbol: string; + decimals: i32; + + constructor(name: string, symbol: string, decimals: i32) { + this.name = name; + this.symbol = symbol; + this.decimals = decimals; + } +} + +export class TokenManager { + protocol: ProtocolManager; + initializer: TokenInitializer; + + constructor(protocol: ProtocolManager, init: TokenInitializer) { + this.protocol = protocol; + this.initializer = init; + } + + getOrCreateToken(address: Address): Token { + let token = Token.load(address); + if (token) { + return token; + } + + const params = this.initializer.getTokenParams(address); + token = new Token(address); + token.name = params.name; + token.symbol = params.symbol; + token.decimals = params.decimals; + token.lastPriceUSD = BIGDECIMAL_ZERO; + token.save(); + + return token; + } +} diff --git a/subgraphs/eigenpie/src/sdk/util/arrays.ts b/subgraphs/eigenpie/src/sdk/util/arrays.ts new file mode 100644 index 0000000000..d610008f16 --- /dev/null +++ b/subgraphs/eigenpie/src/sdk/util/arrays.ts @@ -0,0 +1,103 @@ +import { Bytes } from "@graphprotocol/graph-ts"; + +// A function which given 3 arrays of arbitrary types of the same length, +// where the first one holds the reference order, the second one holds the same elements +// as the first but in different order, and the third any arbitrary elements. It will return +// the third array after sorting it according to the order of the first one. +// For example: +// sortArrayByReference(['a', 'c', 'b'], ['a', 'b', 'c'], [1, 2, 3]) => [1, 3, 2] +export function sortArrayByReference( + reference: T[], + array: T[], + toSort: K[] +): K[] { + const sorted: K[] = new Array(); + for (let i = 0; i < reference.length; i++) { + const index = array.indexOf(reference[i]); + sorted.push(toSort[index]); + } + return sorted; +} + +// sortBytesArray will sort an array of Bytes in ascending order +// by comparing their hex string representation. +export function sortBytesArray(array: Bytes[]): Bytes[] { + const toSort = array.map((item) => item.toHexString()); + toSort.sort(); + return toSort.map((item) => Bytes.fromHexString(item)); +} + +export function updateArrayAtIndex(x: T[], item: T, index: i32): T[] { + if (x.length == 0) { + return [item]; + } + if (index == -1 || index > x.length) { + index = x.length; + } + const retval = new Array(); + let i = 0; + while (i < index) { + retval.push(x[i]); + i += 1; + } + retval.push(item); + i += 1; + while (i < x.length) { + retval.push(x[i]); + i += 1; + } + return retval; +} + +export function addToArrayAtIndex(x: T[], item: T, index: i32 = -1): T[] { + if (x.length == 0) { + return [item]; + } + if (index == -1 || index > x.length) { + index = x.length; + } + const retval = new Array(); + let i = 0; + while (i < index) { + retval.push(x[i]); + i += 1; + } + retval.push(item); + while (i < x.length) { + retval.push(x[i]); + i += 1; + } + return retval; +} + +export function addArrays(a: T[], b: T[]): T[] { + const retval = new Array(); + const arraysByLength = a.length <= b.length ? [a, b] : [b, a]; + + let i = 0; + while (i < arraysByLength[0].length) { + retval.push(a[i].plus(b[i])); + i += 1; + } + while (i < arraysByLength[1].length) { + retval.push(arraysByLength[1][i]); + i += 1; + } + return retval; +} + +export function subtractArrays(a: T[], b: T[]): T[] { + const retval = new Array(); + const arraysByLength = a.length <= b.length ? [a, b] : [b, a]; + + let i = 0; + while (i < arraysByLength[0].length) { + retval.push(a[i].minus(b[i])); + i += 1; + } + while (i < arraysByLength[1].length) { + retval.push(arraysByLength[1][i]); + i += 1; + } + return retval; +} diff --git a/subgraphs/eigenpie/src/sdk/util/constants.ts b/subgraphs/eigenpie/src/sdk/util/constants.ts new file mode 100644 index 0000000000..d7bf4e09ba --- /dev/null +++ b/subgraphs/eigenpie/src/sdk/util/constants.ts @@ -0,0 +1,222 @@ +import { BigDecimal, BigInt } from "@graphprotocol/graph-ts"; + +//////////////////////// +///// Schema Enums ///// +//////////////////////// + +// The network names corresponding to the Network enum in the schema. +// They also correspond to the ones in `dataSource.network()` after converting to lower case. +// See below for a complete list: +// https://thegraph.com/docs/en/hosted-service/what-is-hosted-service/#supported-networks-on-the-hosted-service +export namespace Network { + export const ARBITRUM_ONE = "ARBITRUM_ONE"; + export const AVALANCHE = "AVALANCHE"; + export const AURORA = "AURORA"; + export const BASE = "BASE"; + export const BSC = "BSC"; // aka BNB Chain + export const CELO = "CELO"; + export const MAINNET = "MAINNET"; // Ethereum mainnet + export const FANTOM = "FANTOM"; + export const FUSE = "FUSE"; + export const MOONBEAM = "MOONBEAM"; + export const MOONRIVER = "MOONRIVER"; + export const NEAR_MAINNET = "NEAR_MAINNET"; + export const OPTIMISM = "OPTIMISM"; + export const MATIC = "MATIC"; // aka Polygon + export const XDAI = "XDAI"; // aka Gnosis Chain + + // other networks + export const UBIQ = "UBIQ"; + export const SONGBIRD = "SONGBIRD"; + export const ELASTOS = "ELASTOS"; + export const KARDIACHAIN = "KARDIACHAIN"; + export const CRONOS = "CRONOS"; + export const RSK = "RSK"; + export const TELOS = "TELOS"; + export const XDC = "XDC"; + export const ZYX = "ZYX"; + export const CSC = "CSC"; + export const SYSCOIN = "SYSCOIN"; + export const GOCHAIN = "GOCHAIN"; + export const ETHEREUMCLASSIC = "ETHEREUMCLASSIC"; + export const OKEXCHAIN = "OKEXCHAIN"; + export const HOO = "HOO"; + export const METER = "METER"; + export const NOVA_NETWORK = "NOVA_NETWORK"; + export const TOMOCHAIN = "TOMOCHAIN"; + export const VELAS = "VELAS"; + export const THUNDERCORE = "THUNDERCORE"; + export const HECO = "HECO"; + export const XDAIARB = "XDAIARB"; + export const ENERGYWEB = "ENERGYWEB"; + export const HPB = "HPB"; + export const BOBA = "BOBA"; + export const KUCOIN = "KUCOIN"; + export const SHIDEN = "SHIDEN"; + export const THETA = "THETA"; + export const SX = "SX"; + export const CANDLE = "CANDLE"; + export const ASTAR = "ASTAR"; + export const CALLISTO = "CALLISTO"; + export const WANCHAIN = "WANCHAIN"; + export const METIS = "METIS"; + export const ULTRON = "ULTRON"; + export const STEP = "STEP"; + export const DOGECHAIN = "DOGECHAIN"; + export const RONIN = "RONIN"; + export const KAVA = "KAVA"; + export const IOTEX = "IOTEX"; + export const XLC = "XLC"; + export const NAHMII = "NAHMII"; + export const TOMBCHAIN = "TOMBCHAIN"; + export const CANTO = "CANTO"; + export const KLAYTN = "KLAYTN"; + export const EVMOS = "EVMOS"; + export const SMARTBCH = "SMARTBCH"; + export const BITGERT = "BITGERT"; + export const FUSION = "FUSION"; + export const OHO = "OHO"; + export const ARB_NOVA = "ARB_NOVA"; + export const OASIS = "OASIS"; + export const REI = "REI"; + export const REICHAIN = "REICHAIN"; + export const GODWOKEN = "GODWOKEN"; + export const POLIS = "POLIS"; + export const KEKCHAIN = "KEKCHAIN"; + export const VISION = "VISION"; + export const HARMONY = "HARMONY"; + export const PALM = "PALM"; + export const CURIO = "CURIO"; + + export const UNKNOWN_NETWORK = "UNKNOWN_NETWORK"; +} +export type Network = string; + +export namespace ProtocolType { + export const EXCHANGE = "EXCHANGE"; + export const LENDING = "LENDING"; + export const YIELD = "YIELD"; + export const BRIDGE = "BRIDGE"; + export const OPTION = "OPTION"; + export const PERPETUAL = "PERPETUAL"; + export const GENERIC = "GENERIC"; +} + +export namespace VaultFeeType { + export const MANAGEMENT_FEE = "MANAGEMENT_FEE"; + export const PERFORMANCE_FEE = "PERFORMANCE_FEE"; + export const DEPOSIT_FEE = "DEPOSIT_FEE"; + export const WITHDRAWAL_FEE = "WITHDRAWAL_FEE"; +} + +export namespace LiquidityPoolFeeType { + export const FIXED_TRADING_FEE = "FIXED_TRADING_FEE"; + export const TIERED_TRADING_FEE = "TIERED_TRADING_FEE"; + export const DYNAMIC_TRADING_FEE = "DYNAMIC_TRADING_FEE"; + export const FIXED_LP_FEE = "FIXED_LP_FEE"; + export const DYNAMIC_LP_FEE = "DYNAMIC_LP_FEE"; + export const FIXED_PROTOCOL_FEE = "FIXED_PROTOCOL_FEE"; + export const DYNAMIC_PROTOCOL_FEE = "DYNAMIC_PROTOCOL_FEE"; +} +export type LiquidityPoolFeeType = string; + +export namespace ActivityInterval { + export const HOURLY = "HOURLY"; + export const DAILY = "DAILY"; +} + +export namespace LendingType { + export const CDP = "CDP"; + export const POOLED = "POOLED"; +} + +export namespace RiskType { + export const GLOBAL = "GLOBAL"; + export const ISOLATED = "ISOLATED"; +} + +export namespace InterestRateType { + export const STABLE = "STABLE"; + export const VARIABLE = "VARIABLE"; + export const FIXED_TERM = "FIXED_TERM"; +} + +export namespace InterestRateSide { + export const LENDER = "LENDER"; + export const BORROWER = "BORROWER"; +} + +export namespace UsageType { + export const DEPOSIT = "DEPOSIT"; + export const WITHDRAW = "WITHDRAW"; + export const SWAP = "SWAP"; +} + +export namespace PositionSide { + export const LONG = "LONG"; + export const SHORT = "SHORT"; +} +export type PositionSide = string; + +////////////////////////////// +///// Ethereum Addresses ///// +////////////////////////////// + +export const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000"; +export const ETH_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"; + +//////////////////////// +///// Type Helpers ///// +//////////////////////// + +export const DEFAULT_DECIMALS = 18; + +export const USDC_DECIMALS = 6; +export const USDC_DENOMINATOR = BigDecimal.fromString("1000000"); + +export const BIGINT_ZERO = BigInt.fromI32(0); +export const BIGINT_ONE = BigInt.fromI32(1); +export const BIGINT_TWO = BigInt.fromI32(2); +export const BIGINT_TEN = BigInt.fromI32(10); +export const BIGINT_HUNDRED = BigInt.fromI32(100); +export const BIGINT_THOUSAND = BigInt.fromI32(1000); +export const BIGINT_TEN_TO_EIGHTEENTH = BigInt.fromString("10").pow(18); +export const BIGINT_MINUS_ONE = BigInt.fromI32(-1); +export const BIGINT_MAX = BigInt.fromString( + "115792089237316195423570985008687907853269984665640564039457584007913129639935" +); + +export const INT_NEGATIVE_ONE = -1 as i32; +export const INT_ZERO = 0 as i32; +export const INT_ONE = 1 as i32; +export const INT_TWO = 2 as i32; +export const INT_FOUR = 4 as i32; + +export const BIGDECIMAL_ZERO = new BigDecimal(BIGINT_ZERO); +export const BIGDECIMAL_ONE = new BigDecimal(BIGINT_ONE); +export const BIGDECIMAL_TWO = new BigDecimal(BIGINT_TWO); +export const BIGDECIMAL_HUNDRED = new BigDecimal(BIGINT_HUNDRED); +export const BIGDECIMAL_MINUS_ONE = new BigDecimal(BIGINT_MINUS_ONE); + +export const MAX_UINT = BigInt.fromI32(2).times(BigInt.fromI32(255)); + +///////////////////// +///// Date/Time ///// +///////////////////// + +export const SECONDS_PER_DAY = 60 * 60 * 24; // 86400 +export const SECONDS_PER_HOUR = 60 * 60; // 3600 +export const SECONDS_PER_DAY_BI = BigInt.fromI32(SECONDS_PER_DAY); +export const SECONDS_PER_HOUR_BI = BigInt.fromI32(SECONDS_PER_HOUR); +export const MS_PER_DAY = new BigDecimal(BigInt.fromI32(24 * 60 * 60 * 1000)); +export const DAYS_PER_YEAR = new BigDecimal(BigInt.fromI32(365)); +export const MS_PER_YEAR = DAYS_PER_YEAR.times( + new BigDecimal(BigInt.fromI32(24 * 60 * 60 * 1000)) +); + +//////////////// +///// Misc ///// +//////////////// + +export const ETH_SYMBOL = "ETH"; +export const ETH_NAME = "Ether"; diff --git a/subgraphs/eigenpie/src/sdk/util/events.ts b/subgraphs/eigenpie/src/sdk/util/events.ts new file mode 100644 index 0000000000..5c6ee1e4d1 --- /dev/null +++ b/subgraphs/eigenpie/src/sdk/util/events.ts @@ -0,0 +1,70 @@ +import { BigInt, Address, Bytes, ethereum } from "@graphprotocol/graph-ts"; +import { + BIGINT_ZERO, + SECONDS_PER_DAY, + SECONDS_PER_HOUR, + ZERO_ADDRESS, +} from "./constants"; + +export class CustomEventType { + block: ethereum.Block; + transaction: ethereum.Transaction; + logIndex: BigInt; + event: ethereum.Event | null; + + constructor() { + this.block = new ethereum.Block( + Bytes.empty(), + Bytes.empty(), + Bytes.empty(), + Address.fromString(ZERO_ADDRESS), + Bytes.empty(), + Bytes.empty(), + Bytes.empty(), + BIGINT_ZERO, + BIGINT_ZERO, + BIGINT_ZERO, + BIGINT_ZERO, + BIGINT_ZERO, + BIGINT_ZERO, + null, + null + ); + this.transaction = new ethereum.Transaction( + Bytes.empty(), + BIGINT_ZERO, + Address.fromString(ZERO_ADDRESS), + null, + BIGINT_ZERO, + BIGINT_ZERO, + BIGINT_ZERO, + Bytes.empty(), + BIGINT_ZERO + ); + this.logIndex = BIGINT_ZERO; + this.event = null; + } + + static initialize( + block: ethereum.Block, + transaction: ethereum.Transaction, + logIndex: BigInt, + event: ethereum.Event | null = null + ): CustomEventType { + const customEvent = new CustomEventType(); + customEvent.block = block; + customEvent.transaction = transaction; + customEvent.logIndex = logIndex; + customEvent.event = event; + + return customEvent; + } +} + +export function getUnixDays(block: ethereum.Block): i32 { + return block.timestamp.toI32() / SECONDS_PER_DAY; +} + +export function getUnixHours(block: ethereum.Block): i32 { + return block.timestamp.toI32() / SECONDS_PER_HOUR; +} diff --git a/subgraphs/eigenpie/src/sdk/util/numbers.ts b/subgraphs/eigenpie/src/sdk/util/numbers.ts new file mode 100644 index 0000000000..725140a922 --- /dev/null +++ b/subgraphs/eigenpie/src/sdk/util/numbers.ts @@ -0,0 +1,61 @@ +import { BigDecimal, BigInt } from "@graphprotocol/graph-ts"; +import { + BIGDECIMAL_ZERO, + BIGINT_TEN, + DEFAULT_DECIMALS, + INT_TWO, +} from "./constants"; + +export function bigIntToBigDecimal( + quantity: BigInt, + decimals: i32 = DEFAULT_DECIMALS +): BigDecimal { + return quantity.divDecimal(BIGINT_TEN.pow(decimals as u8).toBigDecimal()); +} + +export function bigDecimalToBigInt(input: BigDecimal): BigInt { + const str = input.truncate(0).toString(); + return BigInt.fromString(str); +} + +// returns 10^exp +export function exponentToBigDecimal(exp: i32 = DEFAULT_DECIMALS): BigDecimal { + let bd = BigDecimal.fromString("1"); + const ten = BigDecimal.fromString("10"); + for (let i = 0; i < exp; i++) { + bd = bd.times(ten); + } + return bd; +} + +export function calculateAverage(prices: BigDecimal[]): BigDecimal { + let sum = BigDecimal.fromString("0"); + for (let i = 0; i < prices.length; i++) { + sum = sum.plus(prices[i]); + } + + return sum.div( + BigDecimal.fromString(BigInt.fromI32(prices.length).toString()) + ); +} + +export function calculateMedian(prices: BigDecimal[]): BigDecimal { + const sorted = prices.sort((a, b) => { + return a.equals(b) ? 0 : a.gt(b) ? 1 : -1; + }); + + const mid = Math.ceil(sorted.length / 2) as i32; + if (sorted.length % 2 == 0) { + return sorted[mid] + .plus(sorted[mid - 1]) + .div(BigDecimal.fromString(INT_TWO.toString())); + } + + return sorted[mid - 1]; +} + +export function safeDivide(a: BigDecimal, b: BigDecimal): BigDecimal { + if (b == BIGDECIMAL_ZERO) return BIGDECIMAL_ZERO; + + return a.div(b); +} diff --git a/subgraphs/eigenpie/tsconfig.json b/subgraphs/eigenpie/tsconfig.json new file mode 100644 index 0000000000..5c5d17c928 --- /dev/null +++ b/subgraphs/eigenpie/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "@graphprotocol/graph-ts/types/tsconfig.base.json", + "include": ["src"] +}