diff --git a/abis/beefy/classic/ClassicStrategy.json b/abis/beefy/classic/ClassicStrategy.json index 2f5d747..bdafb89 100644 --- a/abis/beefy/classic/ClassicStrategy.json +++ b/abis/beefy/classic/ClassicStrategy.json @@ -119,16 +119,6 @@ "name": "SetUnirouter", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "harvester", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "wantHarvested", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "tvl", "type": "uint256" } - ], - "name": "StratHarvest", - "type": "event" - }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "address", "name": "account", "type": "address" }], diff --git a/abis/beefy/classic/ClassicStrategyStratHarvest0.json b/abis/beefy/classic/ClassicStrategyStratHarvest0.json new file mode 100644 index 0000000..f38dec2 --- /dev/null +++ b/abis/beefy/classic/ClassicStrategyStratHarvest0.json @@ -0,0 +1,12 @@ +[ + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "harvester", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "wantHarvested", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "tvl", "type": "uint256" } + ], + "name": "StratHarvest", + "type": "event" + } +] diff --git a/abis/beefy/classic/ClassicStrategyStratHarvest1.json b/abis/beefy/classic/ClassicStrategyStratHarvest1.json new file mode 100644 index 0000000..78a46a8 --- /dev/null +++ b/abis/beefy/classic/ClassicStrategyStratHarvest1.json @@ -0,0 +1,12 @@ +[ + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "harvester", "type": "address" }, + { "indexed": true, "internalType": "uint256", "name": "wantHarvested", "type": "uint256" }, + { "indexed": true, "internalType": "uint256", "name": "tvl", "type": "uint256" } + ], + "name": "StratHarvest", + "type": "event" + } +] diff --git a/bin/delete-all.sh b/bin/delete-all.sh index 64a415a..5c003bb 100755 --- a/bin/delete-all.sh +++ b/bin/delete-all.sh @@ -4,7 +4,7 @@ set -e # config valid_chains=($(ls config | sed 's/\.json//g')) -valid_providers=("goldsky" "0xgraph") +valid_providers=("goldsky" "0xgraph" "sentio") function exit_help { echo "Usage: $0 " diff --git a/bin/deploy.sh b/bin/deploy.sh index 8734a24..e5e57d7 100755 --- a/bin/deploy.sh +++ b/bin/deploy.sh @@ -2,7 +2,7 @@ # config valid_chains=($(ls config | sed 's/\.json//g')) -valid_providers=("goldsky" "0xgraph") +valid_providers=("goldsky" "0xgraph" "sentio") function exit_help { echo "Usage: $0 [] ... []" @@ -12,16 +12,15 @@ function exit_help { exit 1 } -function prepare { +function publish_0xgraph { CHAIN=$1 + SUBGRAPH=$2 + echo "preparing $CHAIN" yarn prepare:$CHAIN yarn codegen yarn build -} -function publish_0xgraph { - SUBGRAPH=$1 echo "publishing $SUBGRAPH to 0xgraph" yarn run graph remove $SUBGRAPH --node https://api.0xgraph.xyz/deploy sleep 5 @@ -30,23 +29,49 @@ function publish_0xgraph { yarn run graph deploy $SUBGRAPH --node https://api.0xgraph.xyz/deploy --ipfs https://api.0xgraph.xyz/ipfs --version-label=v0.0.1 } -function publish_goldsky { - SUBGRAPH=$1 +function publish_goldsky { CHAIN=$1 + CHAIN=$1 + SUBGRAPH=$2 + + echo "preparing $CHAIN" + yarn prepare:$CHAIN + yarn codegen + yarn build + echo "publishing $SUBGRAPH to goldsky" goldsky subgraph delete $SUBGRAPH/0.0.1 sleep 10 goldsky subgraph deploy $SUBGRAPH/0.0.1 --path . } +function publish_sentio { + CHAIN=$1 + SUBGRAPH=$2 + if [ -z "$SENTIO_OWNER" ]; then + echo "SENTIO_OWNER is required" + exit 1 + fi + + echo "preparing $CHAIN" + yarn prepare:$CHAIN + yarn codegen + + echo "publishing $SUBGRAPH to sentio" + npx @sentio/cli graph deploy --owner $SENTIO_OWNER --name $SUBGRAPH +} + function publish { CHAIN=$1 PROVIDER=$2 case $PROVIDER in "0xgraph") - publish_0xgraph beefyfinance/clm-$CHAIN + publish_0xgraph $CHAIN beefyfinance/clm-$CHAIN ;; "goldsky") - publish_goldsky beefy-clm-$CHAIN-dev + publish_goldsky $CHAIN beefy-clm-$CHAIN-dev + ;; + "sentio") + publish_sentio $CHAIN beefy-clm-$CHAIN ;; esac } @@ -76,7 +101,6 @@ for provider in $providers; do done -prepare $chain for provider in $providers; do publish $chain $provider done diff --git a/bin/prepare.sh b/bin/prepare.sh index 5e49595..c46a667 100755 --- a/bin/prepare.sh +++ b/bin/prepare.sh @@ -15,7 +15,10 @@ fi set -e +echo "Generating subgraph.yaml $CHAIN" yarn --silent run mustache config/$CHAIN.json subgraph.template.yaml > subgraph.yaml + +echo "Generating src/config.ts $CHAIN" yarn --silent run mustache config/$CHAIN.json src/config.template.ts > src/config.ts RNG=$((1 + $RANDOM % 100000)) diff --git a/bin/release.sh b/bin/release.sh index 491ddac..b18847b 100755 --- a/bin/release.sh +++ b/bin/release.sh @@ -4,7 +4,7 @@ set -e # config valid_chains=($(ls config | sed 's/\.json//g')) -valid_providers=("goldsky" "0xgraph") +valid_providers=("goldsky" "0xgraph" "sentio") function exit_help { echo "Usage: $0 " @@ -23,23 +23,38 @@ function prepare { } function publish_0xgraph { - SUBGRAPH=$1 - VERSION=$2 - DEPLOY_KEY=$3 + CHAIN=$1 + SUBGRAPH=$2 + VERSION=$3 + DEPLOY_KEY=$4 echo "publishing $SUBGRAPH to 0xgraph" yarn run graph deploy $SUBGRAPH --node https://api.0xgraph.xyz/deploy --ipfs https://api.0xgraph.xyz/ipfs --version-label="v$VERSION" --deploy-key=$DEPLOY_KEY } function publish_goldsky { - SUBGRAPH=$1 - VERSION=$2 - DEPLOY_KEY=$3 + CHAIN=$1 + SUBGRAPH=$2 + VERSION=$3 + DEPLOY_KEY=$4 echo "publishing $SUBGRAPH to goldsky" goldsky subgraph deploy $SUBGRAPH/$VERSION --path . --token $DEPLOY_KEY sleep 5 # wait for the subgraph to propagate goldsky subgraph tag create $SUBGRAPH/$VERSION --token $DEPLOY_KEY --tag next } +function publish_sentio { + CHAIN=$1 + SUBGRAPH=$2 + VERSION=$3 + if [ -z "$SENTIO_OWNER" ]; then + echo "SENTIO_OWNER is required" + exit 1 + fi + + echo "publishing $SUBGRAPH to sentio" + npx @sentio/cli graph deploy --owner $SENTIO_OWNER --name $SUBGRAPH +} + function publish { VERSION=$1 CHAIN=$2 @@ -48,10 +63,13 @@ function publish { SUBGRAPH= case $PROVIDER in "0xgraph") - publish_0xgraph beefyfinance/clm-$CHAIN $VERSION $DEPLOY_KEY + publish_0xgraph $CHAIN beefyfinance/clm-$CHAIN $VERSION $DEPLOY_KEY ;; "goldsky") - publish_goldsky beefy-clm-$CHAIN $VERSION $DEPLOY_KEY + publish_goldsky $CHAIN beefy-clm-$CHAIN $VERSION $DEPLOY_KEY + ;; + "sentio") + publish_sentio $CHAIN beefy-clm-$CHAIN $VERSION ;; esac } diff --git a/config/arbitrum-beta.json b/config/arbitrum-beta.json index 9f00006..f9da621 100644 --- a/config/arbitrum-beta.json +++ b/config/arbitrum-beta.json @@ -31,5 +31,10 @@ "umbrellaRegistryPriceFeedDecimals": 8, "beefySwapperAddress": "0xCee843CD04E3758dDC5BCFf08647DddB117151D0", - "beefyOracleAddress": "0x5C7c7Bb0c9251821cB5a1D9c08F21B0DAD5efe65" + "beefyOracleAddress": "0x5C7c7Bb0c9251821cB5a1D9c08F21B0DAD5efe65", + + "classicStratHarvest1ForAddresses": [], + + "onlyKeepClmClassicVaults": true, + "positionSnapshotEnabled": false } diff --git a/config/arbitrum.json b/config/arbitrum.json index 363ff35..cb8439f 100644 --- a/config/arbitrum.json +++ b/config/arbitrum.json @@ -31,5 +31,10 @@ "umbrellaRegistryPriceFeedDecimals": 8, "beefySwapperAddress": "0xCee843CD04E3758dDC5BCFf08647DddB117151D0", - "beefyOracleAddress": "0x5C7c7Bb0c9251821cB5a1D9c08F21B0DAD5efe65" + "beefyOracleAddress": "0x5C7c7Bb0c9251821cB5a1D9c08F21B0DAD5efe65", + + "classicStratHarvest1ForAddresses": [], + + "onlyKeepClmClassicVaults": true, + "positionSnapshotEnabled": false } diff --git a/config/avax.json b/config/avax.json index 229784a..7ce7b98 100644 --- a/config/avax.json +++ b/config/avax.json @@ -31,5 +31,10 @@ "umbrellaRegistryPriceFeedDecimals": 8, "beefySwapperAddress": "0x20a93Fc2Eb630B98c9C8ef276867C74cc6D5D7C9", - "beefyOracleAddress": "0xec27635CDD3F68cC6534b3bc381bb585a40bfeD3" + "beefyOracleAddress": "0xec27635CDD3F68cC6534b3bc381bb585a40bfeD3", + + "classicStratHarvest1ForAddresses": [], + + "onlyKeepClmClassicVaults": true, + "positionSnapshotEnabled": false } diff --git a/config/base.json b/config/base.json index 875d19f..bfaeeb3 100644 --- a/config/base.json +++ b/config/base.json @@ -31,5 +31,10 @@ "umbrellaRegistryPriceFeedDecimals": 8, "beefySwapperAddress": "0x9F8c6a094434C6E6f5F2792088Bb4d2D5971DdCc", - "beefyOracleAddress": "0x1BfA205114678c7d17b97DB7A71819D3E6718eb4" + "beefyOracleAddress": "0x1BfA205114678c7d17b97DB7A71819D3E6718eb4", + + "classicStratHarvest1ForAddresses": [], + + "onlyKeepClmClassicVaults": true, + "positionSnapshotEnabled": false } diff --git a/config/bsc.json b/config/bsc.json index 92405c9..9e013ad 100644 --- a/config/bsc.json +++ b/config/bsc.json @@ -31,5 +31,10 @@ "umbrellaRegistryPriceFeedDecimals": 8, "beefySwapperAddress": "0x4362FE9aC48e7c5ea85a359418bBd7471979F5C2", - "beefyOracleAddress": "0x32468F9097dCa52225b86a7cA5203ad0012F327C" + "beefyOracleAddress": "0x32468F9097dCa52225b86a7cA5203ad0012F327C", + + "classicStratHarvest1ForAddresses": [], + + "onlyKeepClmClassicVaults": true, + "positionSnapshotEnabled": false } diff --git a/config/linea.json b/config/linea.json index b01195e..8b1bd5e 100644 --- a/config/linea.json +++ b/config/linea.json @@ -31,5 +31,10 @@ "umbrellaRegistryPriceFeedDecimals": 8, "beefySwapperAddress": "0x5aD159A8537fE39CAD81748726584C05b68b3c11", - "beefyOracleAddress": "0x3923704D9684ABb234743d65D96c43Bf26414481" + "beefyOracleAddress": "0x3923704D9684ABb234743d65D96c43Bf26414481", + + "classicStratHarvest1ForAddresses": [], + + "onlyKeepClmClassicVaults": true, + "positionSnapshotEnabled": false } diff --git a/config/manta.json b/config/manta.json index c84f367..73ec52f 100644 --- a/config/manta.json +++ b/config/manta.json @@ -31,5 +31,10 @@ "umbrellaRegistryPriceFeedDecimals": 8, "beefySwapperAddress": "0x07f1ad98b725Af45485646aC431b7757f50C598A", - "beefyOracleAddress": "0x2AfB174c22D9eE334895C4e300ab93154d800aA0" + "beefyOracleAddress": "0x2AfB174c22D9eE334895C4e300ab93154d800aA0", + + "classicStratHarvest1ForAddresses": [], + + "onlyKeepClmClassicVaults": true, + "positionSnapshotEnabled": false } diff --git a/config/mantle.json b/config/mantle.json index b15c02c..bfc5ff5 100644 --- a/config/mantle.json +++ b/config/mantle.json @@ -31,5 +31,10 @@ "umbrellaRegistryPriceFeedDecimals": 8, "beefySwapperAddress": "0x9C18deE5290925f596fbEfee2f6745b640f3A4C6", - "beefyOracleAddress": "0x61129dCBd8944aB2D1C6792428603b0845f60c5B" + "beefyOracleAddress": "0x61129dCBd8944aB2D1C6792428603b0845f60c5B", + + "classicStratHarvest1ForAddresses": [], + + "onlyKeepClmClassicVaults": true, + "positionSnapshotEnabled": false } diff --git a/config/moonbeam.json b/config/moonbeam.json index bdf127a..f22354e 100644 --- a/config/moonbeam.json +++ b/config/moonbeam.json @@ -31,5 +31,10 @@ "umbrellaRegistryPriceFeedDecimals": 8, "beefySwapperAddress": "0x8F40C4Be6732241222293953475a9e69BFc607AA", - "beefyOracleAddress": "0x4d417C189AE9D1B128397026A124b531A535D741" + "beefyOracleAddress": "0x4d417C189AE9D1B128397026A124b531A535D741", + + "classicStratHarvest1ForAddresses": [], + + "onlyKeepClmClassicVaults": true, + "positionSnapshotEnabled": false } diff --git a/config/optimism.json b/config/optimism.json index ec70c34..999bd6f 100644 --- a/config/optimism.json +++ b/config/optimism.json @@ -31,5 +31,10 @@ "umbrellaRegistryPriceFeedDecimals": 8, "beefySwapperAddress": "0xe115b50c52cB5624fD76232cDF498ADA6ECD1e69", - "beefyOracleAddress": "0x7066606233Cc8b5ede0925003F8910FF7B15219C" + "beefyOracleAddress": "0x7066606233Cc8b5ede0925003F8910FF7B15219C", + + "classicStratHarvest1ForAddresses": [], + + "onlyKeepClmClassicVaults": true, + "positionSnapshotEnabled": false } diff --git a/config/polygon.json b/config/polygon.json index 851e94a..815c8b0 100644 --- a/config/polygon.json +++ b/config/polygon.json @@ -31,5 +31,10 @@ "umbrellaRegistryPriceFeedDecimals": 8, "beefySwapperAddress": "0xDd27227Dba7Ea8F5869466A10A8E36Bb2D709b35", - "beefyOracleAddress": "0xfcE4448C50A96c279afdB8CE7735295660653e19" + "beefyOracleAddress": "0xfcE4448C50A96c279afdB8CE7735295660653e19", + + "classicStratHarvest1ForAddresses": [], + + "onlyKeepClmClassicVaults": true, + "positionSnapshotEnabled": false } diff --git a/config/rootstock.json b/config/rootstock.json index f1273c6..be773f4 100644 --- a/config/rootstock.json +++ b/config/rootstock.json @@ -31,5 +31,10 @@ "umbrellaRegistryPriceFeedDecimals": 8, "beefySwapperAddress": "0x3C0b1765C379833b86A1704997019A7496Afdfae", - "beefyOracleAddress": "0x70127945067E4224d7B6ABfDc6f57e3ea45d5CA4" + "beefyOracleAddress": "0x70127945067E4224d7B6ABfDc6f57e3ea45d5CA4", + + "classicStratHarvest1ForAddresses": [], + + "onlyKeepClmClassicVaults": true, + "positionSnapshotEnabled": false } diff --git a/config/scroll.json b/config/scroll.json index 9ae1540..a3543d6 100644 --- a/config/scroll.json +++ b/config/scroll.json @@ -31,5 +31,10 @@ "umbrellaRegistryPriceFeedDecimals": 8, "beefySwapperAddress": "0xBC4a342B0c057501E081484A2d24e576E854F823", - "beefyOracleAddress": "0x448a3539a591dE3Fb9D5AAE407471D21d40cD315" + "beefyOracleAddress": "0x448a3539a591dE3Fb9D5AAE407471D21d40cD315", + + "classicStratHarvest1ForAddresses": [], + + "onlyKeepClmClassicVaults": true, + "positionSnapshotEnabled": false } diff --git a/config/sei.json b/config/sei.json index b97460f..073c76a 100644 --- a/config/sei.json +++ b/config/sei.json @@ -31,5 +31,10 @@ "umbrellaRegistryPriceFeedDecimals": 8, "beefySwapperAddress": "0x8e0B63846ebEFf857EE35eF3BD3A2df9EF7D6456", - "beefyOracleAddress": "0x9818dF1Bdce8D0E79B982e2C3a93ac821b3c17e0" + "beefyOracleAddress": "0x9818dF1Bdce8D0E79B982e2C3a93ac821b3c17e0", + + "classicStratHarvest1ForAddresses": [], + + "onlyKeepClmClassicVaults": true, + "positionSnapshotEnabled": false } diff --git a/config/sonic-sentio.json b/config/sonic-sentio.json new file mode 100644 index 0000000..aa21435 --- /dev/null +++ b/config/sonic-sentio.json @@ -0,0 +1,40 @@ +{ + "network": "534352", + + "multicall3Address": "0xcA11bde05977b3631167028862bE2a173976CA11", + "shareTokenMintAddress": "0x0000000000000000000000000000000000000000", + "burnAddress": "0x000000000000000000000000000000000000dead", + + "clmManagerFactoryAddress": "0x2AfB174c22D9eE334895C4e300ab93154d800aA0", + "clmManagerFactoryStartBlock": 10224895, + "clmStrategyFactoryAddress": "0xA5Cd8A60a05571141370D184e255777e5c2d5968", + "clmStrategyFactoryStartBlock": 10224905, + "rewardPoolFactoryAddress": "0xe103ab2f922aa1a56EC058AbfDA2CeEa1e95bCd7", + "rewardPoolFactoryStartBlock": 10224898, + "beefyClassicVaultFactoryAddress": "0x91BB303E972995EbE5f593BCddBb6F5Ef49Dbcbd", + "beefyClassicVaultFactoryStartBlock": 10224183, + "beefyClassicBoostFactoryAddress": "0x0000000000000000000000000000000000000000", + "beefyClassicBoostFactoryStartBlock": 10224183, + "clockTickBlocks": 120, + + "wrappedNativeAddress": "0x5300000000000000000000000000000000000004", + "wrappedNativeDecimals": 18, + + "priceOracleType": "chainlink", + "chainlinkNativePriceFeedAddress": "0x6bF14CB0A831078629D993FDeBcB182b21A8774C", + "chainlinkNativePriceFeedDecimals": 8, + "pythPriceFeedAddress": "0x0000000000000000000000000000000000000000", + "pythNativePriceId": "0x53614f1cb0c031d4af66c04cb9c756234adad0e1cee85303795091499a4084eb", + "umbrellaRegistryAddress": "0x0000000000000000000000000000000000000000", + "umbrellaRegistryPriceFeedName": "WRBTC-rUSDT", + "umbrellaRegistryPriceFeedNameBytes32": "0xd2a0ad2667ba45a57ce6a98d6f51a4a4d256d704f578b3b90d7ee12e2f6af854", + "umbrellaRegistryPriceFeedDecimals": 8, + + "beefySwapperAddress": "0xBC4a342B0c057501E081484A2d24e576E854F823", + "beefyOracleAddress": "0x448a3539a591dE3Fb9D5AAE407471D21d40cD315", + + "classicStratHarvest1ForAddresses": [], + + "onlyKeepClmClassicVaults": false, + "positionSnapshotEnabled": true +} diff --git a/config/zksync.json b/config/zksync.json index dc2388a..8b21ab8 100644 --- a/config/zksync.json +++ b/config/zksync.json @@ -31,5 +31,10 @@ "umbrellaRegistryPriceFeedDecimals": 8, "beefySwapperAddress": "0x46b9821E57a68274342E679B2a44c1acb5Af55C8", - "beefyOracleAddress": "0x072A7B3a35C7980146E23770576DC84c96Bc49Da" + "beefyOracleAddress": "0x072A7B3a35C7980146E23770576DC84c96Bc49Da", + + "classicStratHarvest1ForAddresses": [], + + "onlyKeepClmClassicVaults": true, + "positionSnapshotEnabled": false } diff --git a/package.json b/package.json index 776280b..94cdf12 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "prepare:linea": "./bin/prepare.sh linea", "prepare:manta": "./bin/prepare.sh manta", "prepare:moonbeam": "./bin/prepare.sh moonbeam", + "prepare:sonic-sentio": "./bin/prepare.sh sonic-sentio", "prepare:optimism": "./bin/prepare.sh optimism", "prepare:polygon": "./bin/prepare.sh polygon", "prepare:zksync": "./bin/prepare.sh zksync", @@ -39,7 +40,8 @@ "license": "MIT", "devDependencies": { "@graphprotocol/graph-cli": "^0.90.1", - "@graphprotocol/graph-ts": "^0.35.1", + "@graphprotocol/graph-ts": "0.32.0", + "@sentio/cli": "^2.22.1", "assemblyscript-prettier": "^3.0.1", "husky": "^9.0.11", "lint-staged": ">=10", diff --git a/schema.graphql b/schema.graphql index f60e696..2b69225 100644 --- a/schema.graphql +++ b/schema.graphql @@ -68,10 +68,25 @@ type ClockTick @entity(immutable: true) { type Investor @entity { "The investor address" id: Bytes! + "All investor beefy positions" positions: [ClmPosition!]! @derivedFrom(field: "investor") "All investor interactions" interactions: [ClmPositionInteraction!]! @derivedFrom(field: "investor") + + "All investor classic positions" + classicPositions: [ClassicPosition!]! @derivedFrom(field: "investor") + "All investor classic snapshots" + classicSnapshots: [ClassicPositionSnapshot!]! @derivedFrom(field: "investor") + "All investor classic interactions" + classicInteractions: [ClassicPositionInteraction!]! @derivedFrom(field: "investor") + + "All investor clm positions" + clmPositions: [ClmPosition!]! @derivedFrom(field: "investor") + "All investor clm snapshots" + clmSnapshots: [ClmPositionSnapshot!]! @derivedFrom(field: "investor") + "All investor clm interactions" + clmInteractions: [ClmPositionInteraction!]! @derivedFrom(field: "investor") } """ @@ -178,6 +193,9 @@ type Classic @entity { "All positions in the Classic" positions: [ClassicPosition!]! @derivedFrom(field: "classic") + "All snapshots of the Classic's positions" + positionSnapshots: [ClassicPositionSnapshot!]! @derivedFrom(field: "classic") + "All harvest events of the Classic" harvests: [ClassicHarvestEvent!]! @derivedFrom(field: "classic") @@ -320,10 +338,10 @@ type ClassicHarvestEvent @entity(immutable: true) { "The transaction that created the harvest event" createdWith: Transaction! - "The event log index in the transaction that created the harvest event." logIndex: BigInt! - + "The block number of the harvest event" + blockNumber: BigInt! "The timestamp of the harvest event so you can sort by time" timestamp: BigInt! @@ -372,6 +390,9 @@ type ClassicPosition @entity { "All investor position interactions" interactions: [ClassicPositionInteraction!]! @derivedFrom(field: "investorPosition") + + "All snapshots of the investor position" + snapshots: [ClassicPositionSnapshot!]! @derivedFrom(field: "investorPosition") } enum ClassicPositionInteractionType { @@ -406,7 +427,8 @@ type ClassicPositionInteraction @entity(immutable: true) { "The transaction that created the investor position interaction" createdWith: Transaction! - + "The event log index in the transaction that created the interaction." + logIndex: BigInt! "Block number of the interaction" blockNumber: BigInt! "The timestamp of the interaction" @@ -456,6 +478,57 @@ type ClassicPositionInteraction @entity(immutable: true) { nativeToUSDPrice: BigInt! } +""" +A snapshot of an investor's Classic position stats. +Any event that happens to the position is recorded in a snapshot. +We keep multiple snapshots time frames as noted by the "period" field. +Snapshots include: daily, weekly, yearly. +""" +type ClassicPositionSnapshot @entity { + "ClassicPosition.id + period + timestamp" + id: Bytes! + + "The Classic the snapshot is for" + classic: Classic! + "The investor that has a position in the Classic" + investor: Investor! + "The investor position the snapshot is for" + investorPosition: ClassicPosition! + + """ + Duration of the snapshot period in seconds. + Available periods: + - 1 day: 86400 + - 1 week: 604800 + - 1 year: 31536000 + """ + period: BigInt! + "Timestamp the snapshot was initiated at, rounded to period" + roundedTimestamp: BigInt! + "Actual timestamp snapshot was initiated at" + timestamp: BigInt! + + "The amount of vault shares the investor holds directly" + vaultBalance: BigInt! + "The amount of vault shares the investor holds in a boost" + boostBalance: BigInt! + "Amount of reward pool shares the investor holds. Ordered by clm.rewardPoolTokensOrder." + rewardPoolBalances: [BigInt!]! + "Total amount of vault shares the investor holds. Should always equal vaultBalance + boostBalance." + totalBalance: BigInt! + + "LP token price in native at the time of snapshot. Expressed with 18 decimals." + underlyingToNativePrice: BigInt! + "Breakdown token prices in native at the time of snapshot. Ordered by classic.underlyingBreakdownTokensOrder. Expressed with 18 decimals." + underlyingBreakdownToNativePrices: [BigInt!]! + "Boost token prices in native at the time of snapshot. Ordered by classic.boostRewardTokensOrder. Expressed with 18 decimals." + boostRewardToNativePrices: [BigInt!]! + "Reward token prices in native at the time of snapshot. Ordered by classic.rewardTokensOrder. Expressed with 18 decimals." + rewardToNativePrices: [BigInt!]! + "Native token price at the time of snapshot. Expressed with 18 decimals." + nativeToUSDPrice: BigInt! +} + ####################### ##### CLM Contracts ### ####################### @@ -470,6 +543,8 @@ type CLM @entity { manager: ClmManager! "The strategy of the CLM. The strategy is responsible for managing the CLM's assets." strategy: ClmStrategy! + "The underlying protocol pool contract address where liquidity is deposited" + underlyingProtocolPool: Bytes! """ The reward pool of the CLM. The reward pool is where the CLM's earnings are sent if the ClmManager does not automatically compound. @@ -547,6 +622,9 @@ type CLM @entity { "All positions in the CLM" positions: [ClmPosition!]! @derivedFrom(field: "clm") + "All snapshots of the CLM's positions" + positionSnapshots: [ClmPositionSnapshot!]! @derivedFrom(field: "clm") + "All collections events by the CLM" collections: [ClmManagerCollectionEvent!]! @derivedFrom(field: "clm") @@ -692,10 +770,10 @@ type ClmHarvestEvent @entity(immutable: true) { "The transaction that created the harvest event" createdWith: Transaction! - + "The block number of the harvest event" + blockNumber: BigInt! "The event log index in the transaction that created the harvest event." logIndex: BigInt! - "The timestamp of the harvest event so you can sort by time" timestamp: BigInt! @@ -742,10 +820,10 @@ type ClmManagerCollectionEvent @entity(immutable: true) { "The transaction that created the collect event" createdWith: Transaction! - + "The block number of the collection event" + blockNumber: BigInt! "The event log index in the transaction that created the collection event." logIndex: BigInt! - "The timestamp of the collect event so you can sort by time" timestamp: BigInt! @@ -804,6 +882,9 @@ type ClmPosition @entity { "All investor position interactions" interactions: [ClmPositionInteraction!]! @derivedFrom(field: "investorPosition") + + "All snapshots of the investor position" + snapshots: [ClmPositionSnapshot!]! @derivedFrom(field: "investorPosition") } enum ClmPositionInteractionType { @@ -832,9 +913,10 @@ type ClmPositionInteraction @entity(immutable: true) { "The transaction that created the investor position interaction" createdWith: Transaction! - "Block number of the interaction" blockNumber: BigInt! + "The event log index in the transaction that created the interaction." + logIndex: BigInt! "The timestamp of the interaction" timestamp: BigInt! @@ -879,3 +961,56 @@ type ClmPositionInteraction @entity(immutable: true) { "Native token price at the time of the interaction. Expressed with 18 decimals." nativeToUSDPrice: BigInt! } + +""" +A snapshot of an investor's CLM position stats. +Any event that happens to the position is recorded in a snapshot. +We keep multiple snapshots time frames as noted by the "period" field. +Snapshots include: daily, weekly, yearly. +""" +type ClmPositionSnapshot @entity { + "ClmPosition.id + period + timestamp" + id: Bytes! + + "The CLM the investor has a position in" + clm: CLM! + "The investor that has a position in the CLM" + investor: Investor! + "The investor position the interaction is for" + investorPosition: ClmPosition! + + """ + Duration of the snapshot period in seconds. + Available periods: + - 1 day: 86400 + - 1 week: 604800 + - 1 year: 31536000 + """ + period: BigInt! + "Timestamp the snapshot was initiated at, rounded to period" + roundedTimestamp: BigInt! + "Actual timestamp snapshot was initiated at" + timestamp: BigInt! + + "The amount of manager shares the investor holds" + managerBalance: BigInt! + "Amount of reward pool shares the investor holds. Ordered by clm.rewardPoolTokensOrder." + rewardPoolBalances: [BigInt!]! + "Total amount of CLM shares the investor holds. Should always equal to managerBalance + rewardPoolBalance." + totalBalance: BigInt! + "The amount of first underlying tokens the investor is entitled to at the time of snapshot" + underlyingBalance0: BigInt! + "The amount of second underlying tokens the investor is entitled to at the time of snapshot" + underlyingBalance1: BigInt! + + "Token 0 price in native at the time of snapshot. Expressed with 18 decimals." + token0ToNativePrice: BigInt! + "Token 1 price in native at the time of snapshot. Expressed with 18 decimals." + token1ToNativePrice: BigInt! + "Output token prices in native at the time of snapshot. Ordered by clm.outputTokensOrder. Expressed with 18 decimals." + outputToNativePrices: [BigInt!]! + "Reward token prices in native at the time of snapshot. Ordered by clm.rewardTokensOrder. Expressed with 18 decimals." + rewardToNativePrices: [BigInt!]! + "Native token price at the time of snapshot. Expressed with 18 decimals." + nativeToUSDPrice: BigInt! +} diff --git a/sentio/ai.md b/sentio/ai.md new file mode 100644 index 0000000..76690b0 --- /dev/null +++ b/sentio/ai.md @@ -0,0 +1,37 @@ +# prompt + +write the sql query for XXX in @XXX.md, use everything need in @schema.graphql and @sentio + +# context + + + + You are a data analyist writing SQL for a clickhouse database. You are asked to create SQL reports on a database that contains Beefy's indexer pre-processed data and format in in the required specification's format. + + + The goal is to transform our data, currenty stored in an SQL database into a standardized format that follows the sentio specifications. + + + - Given SQL access to the given @schema.graphql schema where each type is accessible as a standard SQL table and relations are accessible though join. + - the id of the relation is available as the relation name. Example: do NOT use `table.relation.id`, use `table.relation`. + - you have access to clickhouse functions and should write in clickhouse SQL format + - escape names with backticks + - use `toDecimal256(col, 18) / pow(10, token_decimals)` to convert BigInt to numbers. USD prices are assumed to have 18 decimals. + - example: `toDecimal256(any(p.underlying_token_amount_str), 18) / pow(10, underlying_token_decimals) as underlying_token_amount` + - use `array*` functions to deal with arrays (`arrayZip`, `arrayMap`, `arrayJoin`, etc) + - use `JSONExtract(col, 'Array(String)')` to extract data from columns of BigInt[] + - enums column names are postfixed with `__`. Exeample: `type: ClassicPositionInteractionType!` -> `column name: type__` + - convert timestamps with `fromUnixTimestamp(toInt64(col))` + - there is rarely a case when we need to use the `hex` function + - prefer CTEs over subqueries + + + + - Requirements: https://github.com/delta-hq/schemas/blob/main/schemas/general/SCHEMA.md + - FAQ: https://openblock.notion.site/Onboarding-FAQs-571951f8ecff4e7ca927fab4e27e8401 + - clickhouse docs: + - https://clickhouse.com/docs/en/sql-reference/functions/array-functions#arrayzip + - https://clickhouse.com/docs/en/sql-reference/functions/array-join + - Schema: @schema.graphql + + diff --git a/sentio/classic_general.md b/sentio/classic_general.md new file mode 100644 index 0000000..18186f8 --- /dev/null +++ b/sentio/classic_general.md @@ -0,0 +1,115 @@ +# General + +Table definitions for the generic schema. These tables can be used for any protocol. + +## Version: 1.0.0-alpha + +### Incentive Claim Data + +Transactional data on user level incentives claimed data. + +| Property | Description | Type | +| --------------------- | ---------------------------------------------------------------------------------------------------- | ------ | +| timestamp | The timestamp of the claim. | number | +| chain_id | The standard chain id. | number | +| transaction_hash | The hash of the transaction. | string | +| log_index | The event log. For transactions that don't emit event, create arbitrary index starting from 0. | number | +| transaction_signer | The address of the account that signed the transaction. | string | +| user_address | The address of the user who claimed the incentives (could be different from the transaction_signer). | string | +| claimed_token_address | The smart contract address of the claimed token. | string | +| amount | The amount of the token claimed, decimal normalized. | number | +| amount_usd | The amount of claimed tokens in USD. | number | +| other_incentive_usd | (Optional) Any incentives outside of the claimed token, in this transaction, summed up in USD terms. | number | + +### Airdrop + +Schema for airdrop data. + +| Property | Description | Type | +| --------------------- | ---------------------------------------------------------------------------------------------- | ------ | +| airdrop_timestamp | The timestamp the airdrop was given to the user. | number | +| user_address | The address of the user claiming the airdrop. | string | +| claim_timestamp | The timestamp of when the user claimed the airdrop. | number | +| transaction_hash | The hash of the transaction. | string | +| log_index | The event log. For transactions that don't emit event, create arbitrary index starting from 0. | number | +| airdrop_token_address | The smart contract address of the airdropped token. | string | +| airdrop_token_symbol | The symbol of the token being airdropped. | string | +| token_amount | The amount of each token airdropped, decimal normalized. | number | +| amount_usd | The USD value of the airdropped tokens. | number | + +### Pool Snapshot + +APR and APY data at the pool level. + +| Property | Description | Type | +| ---------------------- | ----------------------------------------------------------------------------------------------------------------- | ------ | +| timestamp | The timestamp of the record. | number | +| block_date | The timestamp truncated (ie, YYYY-MM-DD format for daily snapshots and YYYY-MM-DD HH:00:00 for hourly snapshots). | date | +| chain_id | The standard chain id. | number | +| protocol_type | The type of protocol (ie, Lending, CDP, DEX, Gaming, etc). | string | +| pool_address | The smart contract address of the pool. | string | +| pool_name | The name of the pool (ie, pool() in the smart contract, if it exists). | string | +| total_value_locked_usd | The total value locked within this pool in USD. | number | +| supply_apr | The annual percentage rate of this pool at the snapshot. | number | +| supply_apy | The annual percentage yield of the pool. | number | + +### Protocol Snapshot + +Protocol level snapshot focused on incentives and users. + +| Property | Description | Type | +| ------------------ | ----------------------------------------------------------------------------------------------------------------- | ------ | +| timestamp | The timestamp of the snapshot. | number | +| block_date | The timestamp truncated (ie, YYYY-MM-DD format for daily snapshots and YYYY-MM-DD HH:00:00 for hourly snapshots). | date | +| chain_id | The standard chain id. | number | +| daily_active_users | The number of unique daily active users on this protocol. | number | +| transaction_count | The number of transactions in this time period. | number | +| fees_usd | The amount of fees in this given period, decimal normalized. | number | + +### Token Balance Snapshot + +User level token balance snapshots. + +| Property | Description | Type | +| ---------------- | ----------------------------------------------------------------------------------------------------------------- | ------ | +| timestamp | The timestamp of the snapshot. | number | +| block_date | The timestamp truncated (ie, YYYY-MM-DD format for daily snapshots and YYYY-MM-DD HH:00:00 for hourly snapshots). | date | +| chain_id | The standard chain id. | number | +| user_address | The address of the user this snapshot activity is based on. | string | +| token_address | The smart contract address of the token. | string | +| token_symbol | The symbol of the token we are getting the balance of. | string | +| token_amount | The amount of the token at the given snapshot timestamp (decimal normalized). | number | +| token_amount_usd | The amount of the token in USD. | number | + +### General Transactions + +Generic table at a user and transaction level + +| Property | Description | Type | +| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | +| timestamp | The timestamp of the transaction. | timestamp | +| block_date | A date representation of the timestamp (ie, YYYY-MM-DD HH:MM:SS) | date | +| chain_id | The standard chain id. | number | +| block_number | The ordinal block number. | number | +| signer_address | The transaction signer's address. | varbinary | +| transaction_hash | The unique identifier for this transaction. | varbinary | +| log_index | The unique identifier for this transaction. | number | +| event_name | The string name for the event associated with log_index, corresponds to the action taken by the user (ie, deposit, withdrawal, borrow, repay, liquidation, flashloan). | string | +| transaction_fee | The total amount of gas used in the transactions occurring in the given snapshot (in the native gas amount). | number | +| transaction_fee_usd | (Optional, if possible) The total amount of gas used in USD terms in the given snapshot. | number | + +### User Transaction Fee Snapshot + +Gas and transaction snapshot data at the user level. + +| Property | Description | Type | +| -------------------- | ----------------------------------------------------------------------------------------------------------------- | ------ | +| timestamp | The timestamp of the snapshot. | number | +| block_date | The timestamp truncated (ie, YYYY-MM-DD format for daily snapshots and YYYY-MM-DD HH:00:00 for hourly snapshots). | date | +| chain_id | The standard chain id. | number | +| user_address | The address of the user this snapshot activity is based on. | string | +| transaction_count | The number of transactions this user has signed in the given snapshot. | number | +| transaction_fees | The total amount of gas used in the transactions occurring in the given snapshot (in the native gas amount). | number | +| transaction_fees_usd | (Optional, if possible) The total amount of gas used in USD terms in the given snapshot. | number | + +> Note: This markdown file is auto-generated. diff --git a/sentio/classic_yield_agg.md b/sentio/classic_yield_agg.md new file mode 100644 index 0000000..7c0fbb8 --- /dev/null +++ b/sentio/classic_yield_agg.md @@ -0,0 +1,239 @@ +# Yield Aggregator (Leverage, Gambling, RWA, Liquidity/LP, index) + +Standard table definitions for yield aggregator protocols (can include, Leverage, Gambling, RWA, Liquidity/LP, index). + +## Version: 1.0.0-alpha + +### Pools + +List of pools in the protocol. + +| Property | Description | Type | +| ------------------------- | ------------------------------------------------------------------------------- | ------ | +| chain_id | The standard chain id. | number | +| timestamp | The timestamp this pool was created. | number | +| creation_block_number | The block number that this pool was created. | number | +| underlying_token_address | The contract address of the underlying token or deposited token. | string | +| underlying_token_index | The index of the underlying token in the smart contract, default 0. | number | +| underlying_token_symbol | The symbol of the underlying token token. | string | +| underlying_token_decimals | The decimal amount of the underlying token. | number | +| receipt_token_address | The contract address of the output or receipt token of this pool, if available. | string | +| receipt_token_symbol | The symbol of the receipt token. | string | +| receipt_token_decimals | The symbol decimal amount for the receipt token. | number | +| pool_address | The smart contract address of the pool. | string | +| pool_symbol | The symbol of the pool. | string | + +```SQL +SELECT + 42161 as chain_id, + tx.blockTimestamp as timestamp, + tx.blockNumber as creation_block_number, + classic.underlyingToken as underlying_token_address, + 0 as underlying_token_index, + t_underlying.symbol as underlying_token_symbol, + t_underlying.decimals as underlying_token_decimals, + classic.vaultSharesToken as receipt_token_address, + t_shares.symbol as receipt_token_symbol, + t_shares.decimals as receipt_token_decimals, + classic.id as pool_address, + t_shares.symbol as pool_symbol +FROM Classic classic +JOIN Token t_underlying ON classic.underlyingToken = t_underlying.id +JOIN Token t_shares ON classic.vaultSharesToken = t_shares.id +JOIN ClassicVault vault ON classic.vault = vault.id +JOIN Transaction tx ON vault.createdWith = tx.id +ORDER BY timestamp DESC +``` + +### Position Snapshot + +Snapshot of the pool users. + +| Property | Description | Type | +| --------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------ | +| timestamp | The timestamp of the snapshot. | number | +| block_date | The timestamp truncated (ie, YYYY-MM-DD format for daily snapshots and YYYY-MM-DD HH:00:00 for hourly snapshots). | date | +| chain_id | The standard chain id. | number | +| pool_address | The address of the pool this user has a position in. | string | +| user_address | The address of the user who has a position in the pool. | string | +| underlying_token_address | The address of the supplied underlying token. | string | +| underlying_token_index | The index in the smart contract of this underlying token, default 0. | number | +| underlying_token_amount | The amount of the underlying token that the user deposited, decimal normalized. | number | +| underlying_token_amount_usd | The amount of underlying tokens supplied, in USD. | number | +| total_fees_usd | The total amount of revenue and fees paid in this pool in the given snapshot, in USD. | number | + +```SQL +WITH position_snapshots AS ( + SELECT + snapshot.timestamp, + fromUnixTimestamp(toInt64(snapshot.roundedTimestamp)) as block_date, + 42161 as chain_id, + classic.id as pool_address, + snapshot.investor as user_address, + classic.underlyingToken as underlying_token_address, + 0 as underlying_token_index, + -- Calculate underlying token amount using share ratio + (toDecimal256(snapshot.vaultBalance, 18) / pow(10, t_underlying.decimals)) * + (toDecimal256(classic.vaultUnderlyingTotalSupply, 18) / toDecimal256(classic.vaultSharesTotalSupply, 18)) + as underlying_token_amount, + -- Calculate USD value + ( + (toDecimal256(snapshot.vaultBalance, 18) / pow(10, t_underlying.decimals)) * + (toDecimal256(classic.vaultUnderlyingTotalSupply, 18) / toDecimal256(classic.vaultSharesTotalSupply, 18)) + ) * + (toDecimal256(snapshot.underlyingToNativePrice, 18) / pow(10, 18)) * + (toDecimal256(snapshot.nativeToUSDPrice, 18) / pow(10, 18)) + as underlying_token_amount_usd, + 0 as total_fees_usd + FROM ClassicPositionSnapshot snapshot + JOIN Classic classic ON snapshot.classic = classic.id + JOIN Token t_underlying ON classic.underlyingToken = t_underlying.id +) +SELECT * FROM position_snapshots +ORDER BY timestamp DESC, pool_address, user_address +``` + +### Pool Snapshot + +TVL, fees, and incentives data at the pool level. + +| Property | Description | Type | +| --------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------ | +| timestamp | The timestamp of the snapshot. | number | +| block_date | The timestamp truncated (ie, YYYY-MM-DD format for daily snapshots and YYYY-MM-DD HH:00:00 for hourly snapshots). | date | +| chain_id | The standard chain id. | number | +| underlying_token_address | The contract address of the underlying token or deposited token. | string | +| underlying_token_index | The index of the underlying token in the smart contract, default 0. | number | +| pool_address | The address of the pool. | string | +| underlying_token_amount | The amount of underlying token supplied in this pool, decimal normalized. | number | +| underlying_token_amount_usd | The amount of underlying tokens supplied in this pool, in USD. | number | +| total_fees_usd | The total amount of revenue and fees paid in this pool in the given snapshot, in USD. | number | + +### Events + +All user events (ie, Deposit, Withdrawal) + +| Property | Description | Type | +| ------------------------ | ---------------------------------------------------------------------------------------------- | ------ | +| timestamp | The timestamp of the transaction. | number | +| chain_id | The standard id of the chain. | number | +| block_number | The block number of the trade. | number | +| log_index | The event log. For transactions that don't emit event, create arbitrary index starting from 0. | number | +| transaction_hash | The hash of the transaction. | string | +| user_address | The address that initiates the transaction (ie, the transaction signer). | string | +| taker_address | The address that owns the position (ie, most of the time, it is the same as the user_address). | string | +| pool_address | The smart contract address of the pool. | string | +| underlying_token_address | The contract address of the underlying token or deposited token. | string | +| amount | The amount of token transacted, decimal normalized. | number | +| amount_usd | The amount of token transacted, in USD. | number | +| event_type | The type of event, corresponds to the action taken by the user (ie, deposit, withdrawal). | string | + +```SQL +WITH events AS ( + SELECT + i.timestamp, + i.blockNumber as block_number, + i.logIndex as log_index, + i.createdWith as transaction_hash, + tx.sender as user_address, + i.investor as taker_address, + classic.id as pool_address, + classic.underlyingToken as underlying_token_address, + -- Calculate amount using share ratio + (toDecimal256(i.vaultBalanceDelta, 18) / pow(10, t_underlying.decimals)) * + (toDecimal256(classic.vaultUnderlyingTotalSupply, 18) / toDecimal256(classic.vaultSharesTotalSupply, 18)) + as amount, + -- Calculate USD value + ( + (toDecimal256(i.vaultBalanceDelta, 18) / pow(10, t_underlying.decimals)) * + (toDecimal256(classic.vaultUnderlyingTotalSupply, 18) / toDecimal256(classic.vaultSharesTotalSupply, 18)) + ) * + (toDecimal256(i.underlyingToNativePrice, 18) / pow(10, 18)) * + (toDecimal256(i.nativeToUSDPrice, 18) / pow(10, 18)) + as amount_usd, + -- Map event types + CASE + WHEN i.type__ = 'VAULT_DEPOSIT' THEN 'deposit' + WHEN i.type__ = 'VAULT_WITHDRAW' THEN 'withdraw' + ELSE 'unknown' + END as event_type + FROM ClassicPositionInteraction i + JOIN Classic classic ON i.classic = classic.id + JOIN Token t_underlying ON classic.underlyingToken = t_underlying.id + JOIN Transaction tx ON i.createdWith = tx.id + WHERE i.type__ IN ('VAULT_DEPOSIT', 'VAULT_WITHDRAW') +) +SELECT + timestamp, + 42161 as chain_id, + block_number, + log_index, + transaction_hash, + user_address, + taker_address, + pool_address, + underlying_token_address, + amount, + amount_usd, + event_type +FROM events +ORDER BY timestamp DESC, log_index ASC +``` + +### Incentive Claim Data + +Transactional data on user level incentives claimed data. + +| Property | Description | Type | +| --------------------- | ---------------------------------------------------------------------------------------------------- | ------ | +| timestamp | The timestamp of the claim. | number | +| chain_id | The standard chain id. | number | +| transaction_hash | The hash of the transaction. | string | +| log_index | The event log. For transactions that don't emit event, create arbitrary index starting from 0. | number | +| transaction_signer | The address of the account that signed the transaction. | string | +| user_address | The address of the user who claimed the incentives (could be different from the transaction_signer). | string | +| claimed_token_address | The smart contract address of the claimed token. | string | +| amount | The amount of the token claimed, decimal normalized. | number | +| amount_usd | The amount of claimed tokens in USD. | number | +| other_incentive_usd | (Optional) Any incentives outside of the claimed token, in this transaction, summed up in USD terms. | number | + +```SQL +WITH reward_claims AS ( + -- Classic Reward Pool Claims + SELECT + i.timestamp, + 42161 as chain_id, + i.createdWith as transaction_hash, + i.logIndex as log_index, + tx.sender as transaction_signer, + i.investor as user_address, + arrayJoin(JSONExtract(classic.rewardTokensOrder, 'Array(String)')) as claimed_token_address, + -- Calculate claimed amount + toDecimal256( + arrayJoin(JSONExtract(i.rewardBalancesDelta, 'Array(String)')), + 18 + ) / pow(10, t_reward.decimals) as amount, + -- Calculate USD value + ( + toDecimal256( + arrayJoin(JSONExtract(i.rewardBalancesDelta, 'Array(String)')), + 18 + ) / pow(10, t_reward.decimals) + ) * + ( + toDecimal256( + arrayJoin(JSONExtract(i.rewardToNativePrices, 'Array(String)')), + 18 + ) / pow(10, 18) + ) * + (toDecimal256(i.nativeToUSDPrice, 18) / pow(10, 18)) as amount_usd, + 0 as other_incentive_usd + FROM ClassicPositionInteraction i + JOIN Classic classic ON i.classic = classic.id + JOIN Token t_reward ON t_reward.id = arrayJoin(JSONExtract(classic.rewardTokensOrder, 'Array(String)')) + JOIN Transaction tx ON i.createdWith = tx.id + WHERE i.type__ IN ('CLASSIC_REWARD_POOL_CLAIM', 'BOOST_REWARD_CLAIM') +) +SELECT * FROM reward_claims +ORDER BY timestamp DESC, log_index ASC +``` diff --git a/sentio/clm_alm.md b/sentio/clm_alm.md new file mode 100644 index 0000000..529875f --- /dev/null +++ b/sentio/clm_alm.md @@ -0,0 +1,316 @@ +# Automated Liquidity Management + +Standard table definitions for automated liquidity management protocol. + +## Version: 1.0.0-alpha + +### Pools + +List of pools in the protocol. + +| Property | Description | Type | +| ------------------------------------- | ---------------------------------------------------------------------------------------- | ------ | +| chain_id | The standard chain id. | number | +| timestamp | The timestamp this pool was created. | number | +| creation_block_number | The block number that this pool was created. | number | +| strategy_vault_contract_address | The contract address of the strategy vault which manages the liquidity pool positions. | string | +| liquidity_pool_address | The contract address of the underlying liquidity pool where liquidity are deposited into | string | +| strategy_vault_receipt_token_address | The contract address of ERC20 token which represents the share of liquidity provided. | string | +| strategy_vault_receipt_token_decimals | The decimal amount of the ERC20 receipt token. | number | +| strategy_vault_receipt_token_symbol | The symbol of the receipt token. | string | + +```SQL +SELECT + 42161 as chain_id, + tx.blockTimestamp as timestamp, + tx.blockNumber as creation_block_number, + strategy.id as strategy_vault_contract_address, + clm.underlyingProtocolPool as liquidity_pool_address, + managerToken.id as strategy_vault_receipt_token_address, + managerToken.decimals as strategy_vault_receipt_token_decimals, + managerToken.symbol as strategy_vault_receipt_token_symbol +FROM CLM clm +JOIN ClmManager manager ON clm.manager = manager.id +JOIN Transaction tx ON manager.createdWith = tx.id +JOIN ClmStrategy strategy ON clm.strategy = strategy.id +JOIN Token managerToken ON clm.managerToken = managerToken.id +ORDER BY timestamp DESC +``` + +### Position Snapshot + +Snapshot of the pool users. + +| Property | Description | Type | +| ------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------ | +| timestamp | The timestamp of the snapshot. | number | +| block_date | The timestamp truncated (ie, YYYY-MM-DD format for daily snapshots and YYYY-MM-DD HH:00:00 for hourly snapshots). | date | +| chain_id | The standard chain id. | number | +| strategy_vault_contract_address | The address of the strategy vault this user has a position in. | string | +| user_address | The address of the user who has a position in the strategy vault. | string | +| liquidity_pool_address | The address of the underlying liquidity pool where liquidity are deposited into | string | +| underlying_token_address | The address of the supplied underlying token. | string | +| underlying_token_index | The index of the underlying token in the smart contract, default 0. | number | +| underlying_token_amount | The amount based on the user's share of the total underlying token, decimal normalized. | number | +| underlying_token_amount_usd | The amount based on the user's share of the total underlying token, in USD. | number | +| total_fees_usd | The total amount of revenue and fees paid in this pool in the given snapshot, in USD. | number | + +```SQL + +WITH position_snapshots AS ( + SELECT + snapshot.timestamp, + fromUnixTimestamp(toInt64(snapshot.roundedTimestamp)) as block_date, + snapshot.investor as user_address, + clm.underlyingToken0 as token0_id, + clm.underlyingToken1 as token1_id, + t0.symbol as token0_symbol, + t1.symbol as token1_symbol, + -- Calculate token amounts + toDecimal256(snapshot.underlyingBalance0, 18) / pow(10, t0.decimals) as token0_amount, + toDecimal256(snapshot.underlyingBalance1, 18) / pow(10, t1.decimals) as token1_amount, + -- Calculate USD values using native price conversions + (toDecimal256(snapshot.underlyingBalance0, 18) / pow(10, t0.decimals)) * + (toDecimal256(snapshot.token0ToNativePrice, 18) / pow(10, 18)) * + (toDecimal256(snapshot.nativeToUSDPrice, 18) / pow(10, 18)) as token0_amount_usd, + (toDecimal256(snapshot.underlyingBalance1, 18) / pow(10, t1.decimals)) * + (toDecimal256(snapshot.token1ToNativePrice, 18) / pow(10, 18)) * + (toDecimal256(snapshot.nativeToUSDPrice, 18) / pow(10, 18)) as token1_amount_usd + FROM + `ClmPositionSnapshot` snapshot + JOIN + CLM clm ON snapshot.clm = clm.id + JOIN + Token t0 ON clm.underlyingToken0 = t0.id + JOIN + Token t1 ON clm.underlyingToken1 = t1.id +) +SELECT + timestamp, + block_date, + 42161 as chain_id, + user_address, + token_id as token_address, + token_symbol, + token_amount, + token_amount_usd +FROM +( + -- Token0 records + SELECT + timestamp, + block_date, + user_address, + token0_id as token_id, + token0_symbol as token_symbol, + token0_amount as token_amount, + token0_amount_usd as token_amount_usd + FROM position_snapshots + + UNION ALL + + -- Token1 records + SELECT + timestamp, + block_date, + user_address, + token1_id as token_id, + token1_symbol as token_symbol, + token1_amount as token_amount, + token1_amount_usd as token_amount_usd + FROM position_snapshots +) +ORDER BY timestamp DESC, user_address, token_symbol +``` + +### Pool Snapshot + +TVL, fees, and incentives data at the pool level. + +| Property | Description | Type | +| ------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------ | +| timestamp | The timestamp of the snapshot. | number | +| block_date | The timestamp truncated (ie, YYYY-MM-DD format for daily snapshots and YYYY-MM-DD HH:00:00 for hourly snapshots). | date | +| chain_id | The standard chain id. | number | +| strategy_vault_contract_address | The address of the strategy vault this user has a position in. | string | +| liquidity_pool_address | The address of the underlying liquidity pool where liquidity are deposited into | string | +| underlying_token_address | The address of the supplied underlying token. | string | +| underlying_token_index | The index of the underlying token in the smart contract, default 0. | number | +| underlying_token_amount | The amount of underlying token supplied in this pool, decimal normalized. | number | +| underlying_token_amount_usd | The amount of underlying tokens supplied in this pool, in USD. | number | +| total_fees_usd | The total amount of revenue and fees paid in this pool in the given snapshot, in USD. | number | + +```SQL +WITH pool_snapshots AS ( + SELECT + snapshot.timestamp, + fromUnixTimestamp(toInt64(snapshot.roundedTimestamp)) as block_date, + 42161 as chain_id, + strategy.id as strategy_vault_contract_address, + clm.underlyingProtocolPool as liquidity_pool_address, + -- For token0 + clm.underlyingToken0 as underlying_token_address, + 0 as underlying_token_index, + toDecimal256(snapshot.totalUnderlyingAmount0, 18) / pow(10, t0.decimals) as underlying_token_amount, + (toDecimal256(snapshot.totalUnderlyingAmount0, 18) / pow(10, t0.decimals)) * + (toDecimal256(snapshot.token0ToNativePrice, 18) / pow(10, 18)) * + (toDecimal256(snapshot.nativeToUSDPrice, 18) / pow(10, 18)) as underlying_token_amount_usd, + 0 as total_fees_usd + FROM ClmSnapshot snapshot + JOIN CLM clm ON snapshot.clm = clm.id + JOIN ClmStrategy strategy ON clm.strategy = strategy.id + JOIN Token t0 ON clm.underlyingToken0 = t0.id + + UNION ALL + + SELECT + snapshot.timestamp, + fromUnixTimestamp(toInt64(snapshot.roundedTimestamp)) as block_date, + 42161 as chain_id, + strategy.id as strategy_vault_contract_address, + clm.underlyingProtocolPool as liquidity_pool_address, + -- For token1 + clm.underlyingToken1 as underlying_token_address, + 1 as underlying_token_index, + toDecimal256(snapshot.totalUnderlyingAmount1, 18) / pow(10, t1.decimals) as underlying_token_amount, + (toDecimal256(snapshot.totalUnderlyingAmount1, 18) / pow(10, t1.decimals)) * + (toDecimal256(snapshot.token1ToNativePrice, 18) / pow(10, 18)) * + (toDecimal256(snapshot.nativeToUSDPrice, 18) / pow(10, 18)) as underlying_token_amount_usd, + 0 as total_fees_usd + FROM ClmSnapshot snapshot + JOIN CLM clm ON snapshot.clm = clm.id + JOIN ClmStrategy strategy ON clm.strategy = strategy.id + JOIN Token t1 ON clm.underlyingToken1 = t1.id +) +SELECT * FROM pool_snapshots +ORDER BY timestamp DESC, underlying_token_index +``` + +### ERC LP Token Transfer Events + +All LP Token transfer events + +| Property | Description | Type | +| ---------------- | ---------------------------------------------------------------------------------------------- | ------ | +| timestamp | The timestamp of the transaction. | number | +| chain_id | The standard id of the chain. | number | +| block_number | The block number of the trade. | number | +| log_index | The event log. For transactions that don't emit event, create arbitrary index starting from 0. | number | +| transaction_hash | The hash of the transaction. | string | +| from_address | The from address of the event (ie, the from field in a transfer). | string | +| to_address | The to address of the event (ie, the to field in a transfer). | string | +| pool_address | The contract address of the pool LP token. | string | +| amount | The amount of token transacted, decimal normalized. | number | +| event_type | The type of event, corresponds to the action taken by the user (ie, deposit, withdrawal). | string | + +```SQL + +``` + +### Events + +All user events (ie, Deposit, Withdrawal) + +| Property | Description | Type | +| ------------------------ | ---------------------------------------------------------------------------------------------- | ------ | +| timestamp | The timestamp of the transaction. | number | +| chain_id | The standard id of the chain. | number | +| block_number | The block number of the trade. | number | +| log_index | The event log. For transactions that don't emit event, create arbitrary index starting from 0. | number | +| transaction_hash | The hash of the transaction. | string | +| user_address | The address that initiates the transaction (ie, the transaction signer). | string | +| pool_address | The smart contract address of the pool. | string | +| underlying_token_address | The contract address of the underlying token or deposited token. | string | +| amount | The amount of token transacted, decimal normalized. | number | +| amount_usd | The amount of token transacted, in USD. | number | +| event_type | The type of event, corresponds to the action taken by the user (ie, deposit, withdrawal). | string | + +```SQL +SELECT + -- Timestamp and date fields + i.timestamp, + fromUnixTimestamp(toInt64(i.timestamp)) as block_date, + -- Chain and block info + 42161 as chain_id, + i.blockNumber as block_number, + -- Transaction details + tx.sender as signer_address, + i.createdWith as transaction_hash, + i.logIndex as log_index, + -- Event name mapping + CASE + WHEN i.type__ = 'MANAGER_DEPOSIT' THEN 'deposit' + WHEN i.type__ = 'MANAGER_WITHDRAW' THEN 'withdraw' + WHEN i.type__ = 'CLM_REWARD_POOL_STAKE' THEN 'stake' + WHEN i.type__ = 'CLM_REWARD_POOL_UNSTAKE' THEN 'unstake' + WHEN i.type__ = 'CLM_REWARD_POOL_CLAIM' THEN 'claim' + ELSE 'unknown' + END as event_name, + -- Transaction fees (placeholder values since gas data isn't in schema) + 0 as transaction_fee, + 0 as transaction_fee_usd +FROM ClmPositionInteraction i +JOIN Transaction tx ON i.createdWith = tx.id +JOIN CLM c ON i.clm = c.id +JOIN Protocol p ON c.protocol = p.id +WHERE i.type__ IN ( + 'MANAGER_DEPOSIT', + 'MANAGER_WITHDRAW', + 'CLM_REWARD_POOL_STAKE', + 'CLM_REWARD_POOL_UNSTAKE', + 'CLM_REWARD_POOL_CLAIM' +) +ORDER BY i.timestamp DESC, i.logIndex ASC +``` + +### Incentive Claim Data + +Transactional data on user level incentives claimed data. + +| Property | Description | Type | +| --------------------- | ---------------------------------------------------------------------------------------------------- | ------ | +| timestamp | The timestamp of the claim. | number | +| chain_id | The standard chain id. | number | +| transaction_hash | The hash of the transaction. | string | +| log_index | The event log. For transactions that don't emit event, create arbitrary index starting from 0. | number | +| transaction_signer | The address of the account that signed the transaction. | string | +| user_address | The address of the user who claimed the incentives (could be different from the transaction_signer). | string | +| claimed_token_address | The smart contract address of the claimed token. | string | +| amount | The amount of the token claimed, decimal normalized. | number | +| amount_usd | The amount of claimed tokens in USD. | number | +| other_incentive_usd | (Optional) Any incentives outside of the claimed token, in this transaction, summed up in USD terms. | number | + +```SQL +SELECT + i.timestamp, + 42161 as chain_id, + i.createdWith as transaction_hash, + i.logIndex as log_index, + tx.sender as transaction_signer, + i.investor as user_address, + arrayJoin(JSONExtract(clm.rewardTokensOrder, 'Array(String)')) as claimed_token_address, + toDecimal256( + arrayJoin(JSONExtract(i.rewardBalancesDelta, 'Array(String)')), + 18 + ) / pow(10, t.decimals) as amount, + ( + toDecimal256( + arrayJoin(JSONExtract(i.rewardBalancesDelta, 'Array(String)')), + 18 + ) / pow(10, t.decimals) + ) * + ( + toDecimal256( + arrayJoin(JSONExtract(i.rewardToNativePrices, 'Array(String)')), + 18 + ) / pow(10, 18) + ) * + (toDecimal256(i.nativeToUSDPrice, 18) / pow(10, 18)) as amount_usd, + 0 as other_incentive_usd +FROM ClmPositionInteraction i +JOIN CLM clm ON i.clm = clm.id +JOIN Transaction tx ON i.createdWith = tx.id +JOIN Token t ON t.id = arrayJoin(JSONExtract(clm.rewardTokensOrder, 'Array(String)')) +WHERE i.type__ = 'CLM_REWARD_POOL_CLAIM' +ORDER BY i.timestamp DESC, i.logIndex ASC +``` diff --git a/sentio/clm_general.md b/sentio/clm_general.md new file mode 100644 index 0000000..32dc319 --- /dev/null +++ b/sentio/clm_general.md @@ -0,0 +1,353 @@ +# General + +Table definitions for the generic schema. These tables can be used for any protocol. + +## Version: 1.0.0-alpha + +### Incentive Claim Data + +Transactional data on user level incentives claimed data. + +| Property | Description | Type | +| --------------------- | ---------------------------------------------------------------------------------------------------- | ------ | +| timestamp | The timestamp of the claim. | number | +| chain_id | The standard chain id. | number | +| transaction_hash | The hash of the transaction. | string | +| log_index | The event log. For transactions that don't emit event, create arbitrary index starting from 0. | number | +| transaction_signer | The address of the account that signed the transaction. | string | +| user_address | The address of the user who claimed the incentives (could be different from the transaction_signer). | string | +| claimed_token_address | The smart contract address of the claimed token. | string | +| amount | The amount of the token claimed, decimal normalized. | number | +| amount_usd | The amount of claimed tokens in USD. | number | +| other_incentive_usd | (Optional) Any incentives outside of the claimed token, in this transaction, summed up in USD terms. | number | + +```SQL +WITH token_ids AS ( + SELECT DISTINCT + arrayJoin(JSONExtract(clm.rewardTokensOrder, 'Array(String)')) as token_id + FROM + `ClmPositionInteraction` interaction + JOIN + CLM clm ON interaction.clm = clm.id + WHERE + type__ = 'CLM_REWARD_POOL_CLAIM' +) +SELECT + interaction.timestamp, + 42161 as chain_id, + hex(interaction.createdWith) as transaction_hash, + interaction.logIndex as log_index, + hex(tx.sender) as transaction_signer, + hex(interaction.investor) as user_address, + JSONExtract(clm.rewardTokensOrder, 'Array(String)') as claimed_token_address, + arrayMap( + (amount) -> toDecimal256(amount, 18) / pow(10, t.decimals), + JSONExtract(interaction.rewardBalancesDelta, 'Array(String)') + ) as amount, + arrayMap( + (amount, price) -> ( + toDecimal256(amount, 18) / pow(10, t.decimals) * + (toDecimal256(price, 18) / pow(10, 18)) * + (toDecimal256(interaction.nativeToUSDPrice, 18) / pow(10, 18)) + ), + JSONExtract(interaction.rewardBalancesDelta, 'Array(String)'), + JSONExtract(interaction.rewardToNativePrices, 'Array(String)') + ) as amount_usd, + 0 as other_incentive_usd +FROM + `ClmPositionInteraction` interaction +JOIN + CLM clm ON interaction.clm = clm.id +JOIN + Transaction tx ON interaction.createdWith = tx.id +JOIN + Token t ON t.id = arrayJoin(JSONExtract(clm.rewardTokensOrder, 'Array(String)')) +WHERE + type__ = 'CLM_REWARD_POOL_CLAIM' +ORDER BY + interaction.timestamp DESC +``` + +### Airdrop + +Schema for airdrop data. + +| Property | Description | Type | +| --------------------- | ---------------------------------------------------------------------------------------------- | ------ | +| airdrop_timestamp | The timestamp the airdrop was given to the user. | number | +| user_address | The address of the user claiming the airdrop. | string | +| claim_timestamp | The timestamp of when the user claimed the airdrop. | number | +| transaction_hash | The hash of the transaction. | string | +| log_index | The event log. For transactions that don't emit event, create arbitrary index starting from 0. | number | +| airdrop_token_address | The smart contract address of the airdropped token. | string | +| airdrop_token_symbol | The symbol of the token being airdropped. | string | +| token_amount | The amount of each token airdropped, decimal normalized. | number | +| amount_usd | The USD value of the airdropped tokens. | number | + +NOT APPLICABLE + +### Pool Snapshot + +APR and APY data at the pool level. + +| Property | Description | Type | +| ---------------------- | ----------------------------------------------------------------------------------------------------------------- | ------ | +| timestamp | The timestamp of the record. | number | +| block_date | The timestamp truncated (ie, YYYY-MM-DD format for daily snapshots and YYYY-MM-DD HH:00:00 for hourly snapshots). | date | +| chain_id | The standard chain id. | number | +| protocol_type | The type of protocol (ie, Lending, CDP, DEX, Gaming, etc). | string | +| pool_address | The smart contract address of the pool. | string | +| pool_name | The name of the pool (ie, pool() in the smart contract, if it exists). | string | +| total_value_locked_usd | The total value locked within this pool in USD. | number | +| supply_apr | The annual percentage rate of this pool at the snapshot. | number | +| supply_apy | The annual percentage yield of the pool. | number | + +```SQL +SELECT + snapshot.timestamp, + fromUnixTimestamp(toInt64(snapshot.roundedTimestamp)) as block_date, + 42161 as chain_id, + 'Lending' as protocol_type, + clm.id as pool_address, + managerToken.name as pool_name, + ( + (toDecimal256(snapshot.totalUnderlyingAmount0, 18) / pow(10, t0.decimals) * (toDecimal256(snapshot.token0ToNativePrice, 18) / pow(10, 18))) + + (toDecimal256(snapshot.totalUnderlyingAmount1, 18) / pow(10, t1.decimals) * (toDecimal256(snapshot.token1ToNativePrice, 18) / pow(10, 18))) + ) * (toDecimal256(snapshot.nativeToUSDPrice, 18) / pow(10, 18)) as total_value_locked_usd, + 0 as supply_apr, + 0 as supply_apy +FROM + `ClmSnapshot` snapshot +JOIN + CLM clm ON snapshot.clm = clm.id +LEFT JOIN + Token managerToken ON clm.managerToken = managerToken.id +JOIN + Token t0 ON clm.underlyingToken0 = t0.id +JOIN + Token t1 ON clm.underlyingToken1 = t1.id +ORDER BY + snapshot.timestamp DESC +``` + +### Protocol Snapshot + +Protocol level snapshot focused on incentives and users. + +| Property | Description | Type | +| ------------------ | ----------------------------------------------------------------------------------------------------------------- | ------ | +| timestamp | The timestamp of the snapshot. | number | +| block_date | The timestamp truncated (ie, YYYY-MM-DD format for daily snapshots and YYYY-MM-DD HH:00:00 for hourly snapshots). | date | +| chain_id | The standard chain id. | number | +| daily_active_users | The number of unique daily active users on this protocol. | number | +| transaction_count | The number of transactions in this time period. | number | +| fees_usd | The amount of fees in this given period, decimal normalized. | number | + +```SQL + +SELECT + toStartOfDay(fromUnixTimestamp(toInt64(events.timestamp))) as block_date, + max(events.timestamp) as timestamp, + 42161 as chain_id, + count(DISTINCT user_address) as daily_active_users, + count(*) as transaction_count, + sum(fees_usd) as fees_usd +FROM +( + -- Interactions + SELECT + timestamp, + hex(investor) as user_address, + 0 as fees_usd + FROM ClmPositionInteraction + WHERE type__ IN ('MANAGER_DEPOSIT', 'MANAGER_WITHDRAW', 'CLM_REWARD_POOL_STAKE', 'CLM_REWARD_POOL_UNSTAKE', 'CLM_REWARD_POOL_CLAIM') + + UNION ALL + + -- Harvest events + SELECT + h.timestamp, + hex(h.createdWith) as user_address, + ( + (toDecimal256(h.compoundedAmount0, 18) / pow(10, t0.decimals) * (toDecimal256(h.token0ToNativePrice, 18) / pow(10, 18))) + + (toDecimal256(h.compoundedAmount1, 18) / pow(10, t1.decimals) * (toDecimal256(h.token1ToNativePrice, 18) / pow(10, 18))) + ) * (toDecimal256(h.nativeToUSDPrice, 18) / pow(10, 18)) as fees_usd + FROM ClmHarvestEvent h + JOIN CLM clm ON h.clm = clm.id + JOIN Token t0 ON clm.underlyingToken0 = t0.id + JOIN Token t1 ON clm.underlyingToken1 = t1.id +) events +GROUP BY block_date +ORDER BY block_date DESC +``` + +### Token Balance Snapshot + +User level token balance snapshots. + +| Property | Description | Type | +| ---------------- | ----------------------------------------------------------------------------------------------------------------- | ------ | +| timestamp | The timestamp of the snapshot. | number | +| block_date | The timestamp truncated (ie, YYYY-MM-DD format for daily snapshots and YYYY-MM-DD HH:00:00 for hourly snapshots). | date | +| chain_id | The standard chain id. | number | +| user_address | The address of the user this snapshot activity is based on. | string | +| token_address | The smart contract address of the token. | string | +| token_symbol | The symbol of the token we are getting the balance of. | string | +| token_amount | The amount of the token at the given snapshot timestamp (decimal normalized). | number | +| token_amount_usd | The amount of the token in USD. | number | + +```SQL +WITH position_snapshots AS ( + SELECT + snapshot.timestamp, + fromUnixTimestamp(toInt64(snapshot.roundedTimestamp)) as block_date, + hex(snapshot.investor) as user_address, + clm.underlyingToken0 as token0_id, + clm.underlyingToken1 as token1_id, + t0.symbol as token0_symbol, + t1.symbol as token1_symbol, + -- Calculate token amounts + toDecimal256(snapshot.underlyingAmount0, 18) / pow(10, t0.decimals) as token0_amount, + toDecimal256(snapshot.underlyingAmount1, 18) / pow(10, t1.decimals) as token1_amount, + -- Calculate USD values using native price conversions + (toDecimal256(snapshot.underlyingAmount0, 18) / pow(10, t0.decimals)) * + (toDecimal256(snapshot.token0ToNativePrice, 18) / pow(10, 18)) * + (toDecimal256(snapshot.nativeToUSDPrice, 18) / pow(10, 18)) as token0_amount_usd, + (toDecimal256(snapshot.underlyingAmount1, 18) / pow(10, t1.decimals)) * + (toDecimal256(snapshot.token1ToNativePrice, 18) / pow(10, 18)) * + (toDecimal256(snapshot.nativeToUSDPrice, 18) / pow(10, 18)) as token1_amount_usd + FROM + `ClmPositionSnapshot` snapshot + JOIN + CLM clm ON snapshot.clm = clm.id + JOIN + Token t0 ON clm.underlyingToken0 = t0.id + JOIN + Token t1 ON clm.underlyingToken1 = t1.id +) +SELECT + timestamp, + block_date, + 42161 as chain_id, + user_address, + token_id as token_address, + token_symbol, + token_amount, + token_amount_usd +FROM +( + -- Token0 records + SELECT + timestamp, + block_date, + user_address, + token0_id as token_id, + token0_symbol as token_symbol, + token0_amount as token_amount, + token0_amount_usd as token_amount_usd + FROM position_snapshots + + UNION ALL + + -- Token1 records + SELECT + timestamp, + block_date, + user_address, + token1_id as token_id, + token1_symbol as token_symbol, + token1_amount as token_amount, + token1_amount_usd as token_amount_usd + FROM position_snapshots +) +ORDER BY timestamp DESC, user_address, token_symbol +``` + +### General Transactions + +Generic table at a user and transaction level + +| Property | Description | Type | +| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | +| timestamp | The timestamp of the transaction. | timestamp | +| block_date | A date representation of the timestamp (ie, YYYY-MM-DD HH:MM:SS) | date | +| chain_id | The standard chain id. | number | +| block_number | The ordinal block number. | number | +| signer_address | The transaction signer's address. | varbinary | +| transaction_hash | The unique identifier for this transaction. | varbinary | +| log_index | The unique identifier for this transaction. | number | +| event_name | The string name for the event associated with log_index, corresponds to the action taken by the user (ie, deposit, withdrawal, borrow, repay, liquidation, flashloan). | string | +| transaction_fee | The total amount of gas used in the transactions occurring in the given snapshot (in the native gas amount). | number | +| transaction_fee_usd | (Optional, if possible) The total amount of gas used in USD terms in the given snapshot. | number | + +```SQL +SELECT + -- Timestamp and date fields + i.timestamp, + fromUnixTimestamp(toInt64(i.timestamp)) as block_date, + -- Chain and block info + 42161 as chain_id, + i.blockNumber as block_number, + -- Transaction details + tx.sender as signer_address, + i.createdWith as transaction_hash, + i.logIndex as log_index, + -- Event name mapping + CASE + WHEN i.type__ = 'MANAGER_DEPOSIT' THEN 'deposit' + WHEN i.type__ = 'MANAGER_WITHDRAW' THEN 'withdraw' + WHEN i.type__ = 'CLM_REWARD_POOL_STAKE' THEN 'stake' + WHEN i.type__ = 'CLM_REWARD_POOL_UNSTAKE' THEN 'unstake' + WHEN i.type__ = 'CLM_REWARD_POOL_CLAIM' THEN 'claim' + ELSE 'unknown' + END as event_name, + -- Transaction fees (placeholder values since gas data isn't in schema) + 0 as transaction_fee, + 0 as transaction_fee_usd +FROM ClmPositionInteraction i +JOIN Transaction tx ON i.createdWith = tx.id +JOIN CLM c ON i.clm = c.id +JOIN Protocol p ON c.protocol = p.id +WHERE i.type__ IN ( + 'MANAGER_DEPOSIT', + 'MANAGER_WITHDRAW', + 'CLM_REWARD_POOL_STAKE', + 'CLM_REWARD_POOL_UNSTAKE', + 'CLM_REWARD_POOL_CLAIM' +) +ORDER BY i.timestamp DESC, i.logIndex ASC +``` + +### User Transaction Fee Snapshot + +Gas and transaction snapshot data at the user level. + +| Property | Description | Type | +| -------------------- | ----------------------------------------------------------------------------------------------------------------- | ------ | +| timestamp | The timestamp of the snapshot. | number | +| block_date | The timestamp truncated (ie, YYYY-MM-DD format for daily snapshots and YYYY-MM-DD HH:00:00 for hourly snapshots). | date | +| chain_id | The standard chain id. | number | +| user_address | The address of the user this snapshot activity is based on. | string | +| transaction_count | The number of transactions this user has signed in the given snapshot. | number | +| transaction_fees | The total amount of gas used in the transactions occurring in the given snapshot (in the native gas amount). | number | +| transaction_fees_usd | (Optional, if possible) The total amount of gas used in USD terms in the given snapshot. | number | + +```SQL +SELECT + i.timestamp, + fromUnixTimestamp(toInt64(i.timestamp)) as block_date, + 42161 as chain_id, + i.investor as user_address, + count(*) as transaction_count, + 0 as transaction_fees, -- Placeholder since gas data isn't in schema + 0 as transaction_fees_usd -- Placeholder since gas data isn't in schema +FROM + ClmPositionInteraction i +GROUP BY + toStartOfDay(fromUnixTimestamp(toInt64(i.timestamp))), + i.timestamp, + i.investor +ORDER BY + block_date DESC, + user_address +``` diff --git a/src/classic/clock.ts b/src/classic/clock.ts index ee950e4..fca9704 100644 --- a/src/classic/clock.ts +++ b/src/classic/clock.ts @@ -1,8 +1,9 @@ import { ClockTick } from "../../generated/schema" import { getBeefyClassicProtocol } from "../common/entity/protocol" +import { POSITION_SNAPSHOT_ENABLED } from "../config" import { hasClassicBeenRemoved, isClassicInitialized } from "./entity/classic" -import { isClmManager, isClmRewardPool } from "../clm/entity/clm" import { fetchClassicData, updateClassicDataAndSnapshots } from "./utils/classic-data" +import { updateClassicPositionSnapshotsIfEnabled } from "./utils/position-snapshot" import { log } from "@graphprotocol/graph-ts" export function updateClassicDataOnClockTick(tick: ClockTick): void { @@ -22,10 +23,17 @@ export function updateClassicDataOnClockTick(tick: ClockTick): void { continue } - // speed up the process by skipping vaults on non-reward pools - if (isClmRewardPool(classic.underlyingToken) || isClmManager(classic.underlyingToken)) { - const classicData = fetchClassicData(classic) - updateClassicDataAndSnapshots(classic, classicData, tick.timestamp) + const classicData = fetchClassicData(classic) + updateClassicDataAndSnapshots(classic, classicData, tick.timestamp) + + // update position snapshots + if (POSITION_SNAPSHOT_ENABLED) { + const positions = classic.positions.load() + log.info("Updating {} Classic position snapshots", [positions.length.toString()]) + for (let j = 0; j < positions.length; j++) { + const position = positions[j] + updateClassicPositionSnapshotsIfEnabled(classic, classicData, position, tick.timestamp) + } } } } diff --git a/src/classic/compound.ts b/src/classic/compound.ts index c3f4486..bdc0ff5 100644 --- a/src/classic/compound.ts +++ b/src/classic/compound.ts @@ -1,12 +1,17 @@ import { BigInt, ethereum, log } from "@graphprotocol/graph-ts" -import { StratHarvest as HarvestEvent } from "../../generated/templates/ClassicStrategy/ClassicStrategy" -import { getTransaction } from "../common/entity/transaction" +import { StratHarvest as HarvestEvent0 } from "../../generated/templates/ClassicStrategy/ClassicStrategyStratHarvest0" +import { StratHarvest as HarvestEvent1 } from "../../generated/templates/ClassicStrategy/ClassicStrategyStratHarvest1" +import { getAndSaveTransaction } from "../common/entity/transaction" import { ClassicHarvestEvent } from "../../generated/schema" import { getEventIdentifier } from "../common/utils/event" import { getClassic, getClassicStrategy, hasClassicBeenRemoved, isClassicInitialized } from "./entity/classic" -import { fetchClassicData } from "./utils/classic-data" +import { fetchClassicData, updateClassicDataAndSnapshots } from "./utils/classic-data" -export function handleClassicStrategyHarvest(event: HarvestEvent): void { +export function handleClassicStrategyHarvest0(event: HarvestEvent0): void { + _handleClassicStrategyHarvest(event, event.params.wantHarvested) +} + +export function handleClassicStrategyHarvest1(event: HarvestEvent1): void { _handleClassicStrategyHarvest(event, event.params.wantHarvested) } @@ -24,28 +29,33 @@ function _handleClassicStrategyHarvest(event: ethereum.Event, compoundedAmount: return } - let tx = getTransaction(event.block, event.transaction) - tx.save() + let tx = getAndSaveTransaction(event.block, event.transaction) /////// // fetch data on chain const classicData = fetchClassicData(classic) + updateClassicDataAndSnapshots(classic, classicData, event.block.timestamp) /////// // store the raw harvest event - let harvest = new ClassicHarvestEvent(getEventIdentifier(event)) - harvest.classic = classic.id - harvest.strategy = strategy.id - harvest.createdWith = tx.id - harvest.logIndex = event.logIndex - harvest.timestamp = event.block.timestamp - harvest.underlyingAmount = classicData.underlyingAmount - harvest.compoundedAmount = compoundedAmount - harvest.vaultSharesTotalSupply = classicData.vaultSharesTotalSupply - harvest.rewardPoolsTotalSupply = classicData.rewardPoolsTotalSupply - harvest.underlyingToNativePrice = classicData.underlyingToNativePrice - harvest.boostRewardToNativePrices = classicData.boostRewardToNativePrices - harvest.rewardToNativePrices = classicData.rewardToNativePrices - harvest.nativeToUSDPrice = classicData.nativeToUSDPrice - harvest.save() + let eventId = getEventIdentifier(event) + let harvest = ClassicHarvestEvent.load(eventId) + if (!harvest) { + harvest = new ClassicHarvestEvent(eventId) + harvest.classic = classic.id + harvest.strategy = strategy.id + harvest.createdWith = tx.id + harvest.blockNumber = event.block.number + harvest.logIndex = event.logIndex + harvest.timestamp = event.block.timestamp + harvest.underlyingAmount = classicData.underlyingAmount + harvest.compoundedAmount = compoundedAmount + harvest.vaultSharesTotalSupply = classicData.vaultSharesTotalSupply + harvest.rewardPoolsTotalSupply = classicData.rewardPoolsTotalSupply + harvest.underlyingToNativePrice = classicData.underlyingToNativePrice + harvest.boostRewardToNativePrices = classicData.boostRewardToNativePrices + harvest.rewardToNativePrices = classicData.rewardToNativePrices + harvest.nativeToUSDPrice = classicData.nativeToUSDPrice + harvest.save() + } } diff --git a/src/classic/entity/position.ts b/src/classic/entity/position.ts index 1655852..d7896b0 100644 --- a/src/classic/entity/position.ts +++ b/src/classic/entity/position.ts @@ -1,7 +1,9 @@ -import { Bytes, store } from "@graphprotocol/graph-ts" -import { Investor, ClassicPosition, CLM, Classic } from "../../../generated/schema" +import { BigInt, Bytes, store } from "@graphprotocol/graph-ts" +import { Investor, ClassicPosition, CLM, Classic, ClassicPositionSnapshot } from "../../../generated/schema" import { ADDRESS_ZERO } from "../../common/utils/address" import { ZERO_BI } from "../../common/utils/decimal" +import { getIntervalFromTimestamp } from "../../common/utils/time" +import { getPreviousSnapshotIdSuffix, getSnapshotIdSuffix } from "../../common/utils/snapshot" // @ts-ignore @inline @@ -29,3 +31,51 @@ export function removeClassicPosition(classic: Classic, investor: Investor): voi const id = getPositionId(classic, investor) store.remove("ClassicPosition", id.toHexString()) } + +export function getClassicPositionSnapshot( + position: ClassicPosition, + timestamp: BigInt, + period: BigInt, +): ClassicPositionSnapshot { + const interval = getIntervalFromTimestamp(timestamp, period) + const snapshotId = position.id.concat(getSnapshotIdSuffix(period, interval)) + let snapshot = ClassicPositionSnapshot.load(snapshotId) + if (!snapshot) { + snapshot = new ClassicPositionSnapshot(snapshotId) + snapshot.classic = position.classic + snapshot.investor = position.investor + snapshot.investorPosition = position.id + + snapshot.period = period + snapshot.timestamp = timestamp + snapshot.roundedTimestamp = interval + + snapshot.vaultBalance = ZERO_BI + snapshot.boostBalance = ZERO_BI + snapshot.rewardPoolBalances = [] + snapshot.totalBalance = ZERO_BI + + snapshot.underlyingToNativePrice = ZERO_BI + snapshot.underlyingBreakdownToNativePrices = [] + snapshot.boostRewardToNativePrices = [] + snapshot.rewardToNativePrices = [] + snapshot.nativeToUSDPrice = ZERO_BI + + // copy non-reseting values from the previous snapshot to the new snapshot + const previousSnapshotId = position.id.concat(getPreviousSnapshotIdSuffix(period, interval)) + const previousSnapshot = ClassicPositionSnapshot.load(previousSnapshotId) + if (previousSnapshot) { + snapshot.vaultBalance = previousSnapshot.vaultBalance + snapshot.boostBalance = previousSnapshot.boostBalance + snapshot.rewardPoolBalances = previousSnapshot.rewardPoolBalances + snapshot.totalBalance = previousSnapshot.totalBalance + snapshot.underlyingToNativePrice = previousSnapshot.underlyingToNativePrice + snapshot.underlyingBreakdownToNativePrices = previousSnapshot.underlyingBreakdownToNativePrices + snapshot.boostRewardToNativePrices = previousSnapshot.boostRewardToNativePrices + snapshot.rewardToNativePrices = previousSnapshot.rewardToNativePrices + snapshot.nativeToUSDPrice = previousSnapshot.nativeToUSDPrice + } + } + + return snapshot +} diff --git a/src/classic/interaction.ts b/src/classic/interaction.ts index b627cde..b9650f3 100644 --- a/src/classic/interaction.ts +++ b/src/classic/interaction.ts @@ -9,7 +9,7 @@ import { Transfer as RewardPoolTransferEvent, RewardPaid as RewardPoolRewardPaidEvent, } from "../../generated/templates/ClmRewardPool/RewardPool" -import { getTransaction } from "../common/entity/transaction" +import { getAndSaveTransaction } from "../common/entity/transaction" import { getInvestor } from "../common/entity/investor" import { Classic, ClassicPositionInteraction } from "../../generated/schema" import { BURN_ADDRESS, SHARE_TOKEN_MINT_ADDRESS } from "../config" @@ -24,6 +24,7 @@ import { } from "./entity/classic" import { getClassicPosition } from "./entity/position" import { fetchClassicData, updateClassicDataAndSnapshots } from "./utils/classic-data" +import { updateClassicPositionSnapshotsIfEnabled } from "./utils/position-snapshot" export function handleClassicVaultTransfer(event: ClassicVaultTransfer): void { // sending to self @@ -68,7 +69,7 @@ export function handleClassicVaultTransfer(event: ClassicVaultTransfer): void { !event.params.from.equals(vaultAddress) && !isRewardPoolFrom ) { - updateUserPosition(classic, event, event.params.from, event.params.value.neg(), ZERO_BI, [], [], []) + updateUserPositionAndSnapshots(classic, event, event.params.from, event.params.value.neg(), ZERO_BI, [], [], []) } if ( @@ -77,7 +78,7 @@ export function handleClassicVaultTransfer(event: ClassicVaultTransfer): void { !event.params.to.equals(vaultAddress) && !isRewardPoolTo ) { - updateUserPosition(classic, event, event.params.to, event.params.value, ZERO_BI, [], [], []) + updateUserPositionAndSnapshots(classic, event, event.params.to, event.params.value, ZERO_BI, [], [], []) } } @@ -97,7 +98,7 @@ export function handleClassicBoostStaked(event: ClassicBoostStaked): void { const investorAddress = event.params.user const amount = event.params.amount - updateUserPosition(classic, event, investorAddress, ZERO_BI, amount, [], [], []) + updateUserPositionAndSnapshots(classic, event, investorAddress, ZERO_BI, amount, [], [], []) } export function handleClassicBoostWithdrawn(event: ClassicBoostWithdrawn): void { @@ -116,7 +117,7 @@ export function handleClassicBoostWithdrawn(event: ClassicBoostWithdrawn): void const investorAddress = event.params.user const amount = event.params.amount - updateUserPosition(classic, event, investorAddress, ZERO_BI, amount.neg(), [], [], []) + updateUserPositionAndSnapshots(classic, event, investorAddress, ZERO_BI, amount.neg(), [], [], []) } export function handleClassicBoostRewardPaid(event: ClassicBoostRewardPaid): void { @@ -146,7 +147,7 @@ export function handleClassicBoostRewardPaid(event: ClassicBoostRewardPaid): voi } } - updateUserPosition(classic, event, investorAddress, ZERO_BI, ZERO_BI, boostRewardBalancesDelta, [], []) + updateUserPositionAndSnapshots(classic, event, investorAddress, ZERO_BI, ZERO_BI, boostRewardBalancesDelta, [], []) } export function handleClassicRewardPoolTransfer(event: RewardPoolTransferEvent): void { @@ -203,7 +204,7 @@ export function handleClassicRewardPoolTransfer(event: RewardPoolTransferEvent): !event.params.to.equals(vaultAddress) && !isRewardPoolTo ) { - updateUserPosition(classic, event, event.params.to, ZERO_BI, ZERO_BI, [], rewardPoolBalancesDelta, []) + updateUserPositionAndSnapshots(classic, event, event.params.to, ZERO_BI, ZERO_BI, [], rewardPoolBalancesDelta, []) } if ( @@ -216,7 +217,16 @@ export function handleClassicRewardPoolTransfer(event: RewardPoolTransferEvent): for (let i = 0; i < rewardPoolBalancesDelta.length; i++) { negRewardPoolBalancesDelta.push(rewardPoolBalancesDelta[i].neg()) } - updateUserPosition(classic, event, event.params.from, ZERO_BI, ZERO_BI, [], negRewardPoolBalancesDelta, []) + updateUserPositionAndSnapshots( + classic, + event, + event.params.from, + ZERO_BI, + ZERO_BI, + [], + negRewardPoolBalancesDelta, + [], + ) } } @@ -246,10 +256,10 @@ export function handleClassicRewardPoolRewardPaid(event: RewardPoolRewardPaidEve } } - updateUserPosition(classic, event, event.params.user, ZERO_BI, ZERO_BI, [], [], rewardBalancesDelta) + updateUserPositionAndSnapshots(classic, event, event.params.user, ZERO_BI, ZERO_BI, [], [], rewardBalancesDelta) } -function updateUserPosition( +function updateUserPositionAndSnapshots( classic: Classic, event: ethereum.Event, investorAddress: Address, @@ -271,8 +281,7 @@ function updateUserPosition( const investor = getInvestor(investorAddress) const position = getClassicPosition(classic, investor) - let tx = getTransaction(event.block, event.transaction) - tx.save() + let tx = getAndSaveTransaction(event.block, event.transaction) /////// // fetch data on chain and update clm @@ -341,6 +350,7 @@ function updateUserPosition( interaction.investorPosition = position.id interaction.createdWith = event.transaction.hash interaction.blockNumber = event.block.number + interaction.logIndex = event.logIndex interaction.timestamp = event.block.timestamp if (isSharesTransfer) { interaction.type = vaultBalanceDelta.gt(ZERO_BI) ? "VAULT_DEPOSIT" : "VAULT_WITHDRAW" @@ -375,4 +385,7 @@ function updateUserPosition( interaction.rewardToNativePrices = classicData.rewardToNativePrices interaction.nativeToUSDPrice = classicData.nativeToUSDPrice interaction.save() + + // update position snapshot + updateClassicPositionSnapshotsIfEnabled(classic, classicData, position, event.block.timestamp) } diff --git a/src/classic/lifecycle.ts b/src/classic/lifecycle.ts index 7fb678c..3e8ba63 100644 --- a/src/classic/lifecycle.ts +++ b/src/classic/lifecycle.ts @@ -19,6 +19,8 @@ import { import { ClassicVault as ClassicVaultTemplate, ClassicStrategy as ClassicStrategyTemplate, + ClassicStrategyStratHarvest0 as ClassicStrategyStratHarvest0Template, + ClassicStrategyStratHarvest1 as ClassicStrategyStratHarvest1Template, ClassicBoost as ClassicBoostTemplate, } from "../../generated/templates" import { @@ -31,18 +33,18 @@ import { removeClassicAndDependencies, } from "./entity/classic" import { Classic } from "../../generated/schema" -import { getTransaction } from "../common/entity/transaction" +import { getAndSaveTransaction } from "../common/entity/transaction" import { fetchAndSaveTokenData } from "../common/utils/token" import { PRODUCT_LIFECYCLE_PAUSED, PRODUCT_LIFECYCLE_RUNNING } from "../common/entity/lifecycle" import { ADDRESS_ZERO } from "../common/utils/address" import { isClmManager, isClmRewardPool } from "../clm/entity/clm" import { fetchClassicUnderlyingCLM } from "./utils/classic-data" +import { CLASSIC_STRAT_HARVEST_1_FOR_ADDRESSES, ONLY_KEEP_CLM_CLASSIC_VAULTS } from "../config" export function handleClassicVaultOrStrategyCreated(event: VaultOrStrategyCreated): void { const address = event.params.proxy - const tx = getTransaction(event.block, event.transaction) - tx.save() + const tx = getAndSaveTransaction(event.block, event.transaction) // test if we are creating a vault or a strategy const vaultContract = ClassicVaultContract.bind(address) @@ -72,6 +74,15 @@ export function handleClassicVaultOrStrategyCreated(event: VaultOrStrategyCreate strategy.save() ClassicStrategyTemplate.create(address) + for (let i = 0; i < CLASSIC_STRAT_HARVEST_1_FOR_ADDRESSES.length; i++) { + const harvest1ForAddress = CLASSIC_STRAT_HARVEST_1_FOR_ADDRESSES[i] + if (harvest1ForAddress.equals(address)) { + ClassicStrategyStratHarvest1Template.create(address) + } else { + // most common case + ClassicStrategyStratHarvest0Template.create(address) + } + } } } @@ -154,7 +165,7 @@ function fetchInitialClassicDataAndSave(classic: Classic): void { const underlyingTokenAddress = underlyingTokenAddressRes.value const isClmUnderlying = isClmRewardPool(underlyingTokenAddress) || isClmManager(underlyingTokenAddress) - if (!isClmUnderlying) { + if (!isClmUnderlying && ONLY_KEEP_CLM_CLASSIC_VAULTS) { log.info("Underlying token address is not related to clm, removing: {}", [underlyingTokenAddress.toHexString()]) removeClassicAndDependencies(classic) return @@ -170,8 +181,10 @@ function fetchInitialClassicDataAndSave(classic: Classic): void { const clm = fetchClassicUnderlyingCLM(classic) if (clm == null) { - log.error("Failed to fetch CLM data for Classic: {}", [classic.id.toHexString()]) - removeClassicAndDependencies(classic) + if (ONLY_KEEP_CLM_CLASSIC_VAULTS) { + log.error("Failed to fetch CLM data for Classic: {}", [classic.id.toHexString()]) + removeClassicAndDependencies(classic) + } return } classic.underlyingBreakdownTokens = [clm.underlyingToken0, clm.underlyingToken1] @@ -245,8 +258,7 @@ export function handleClassicVaultUpgradeStrategy(event: ClassicVaultUpgradeStra newStrategy.vault = classic.id newStrategy.classic = classic.id if (newStrategy.createdWith.equals(ADDRESS_ZERO)) { - const tx = getTransaction(event.block, event.transaction) - tx.save() + const tx = getAndSaveTransaction(event.block, event.transaction) newStrategy.createdWith = tx.id } newStrategy.save() diff --git a/src/classic/mapping/strategy.ts b/src/classic/mapping/strategy.ts index dfca66c..64bf43c 100644 --- a/src/classic/mapping/strategy.ts +++ b/src/classic/mapping/strategy.ts @@ -1,4 +1,4 @@ export { handleClassicStrategyInitialized } from "../lifecycle" export { handleClassicStrategyPaused } from "../lifecycle" export { handleClassicStrategyUnpaused } from "../lifecycle" -export { handleClassicStrategyHarvest } from "../compound" +export { handleClassicStrategyHarvest0, handleClassicStrategyHarvest1 } from "../compound" diff --git a/src/classic/utils/classic-data.ts b/src/classic/utils/classic-data.ts index 3e52a43..cc2614a 100644 --- a/src/classic/utils/classic-data.ts +++ b/src/classic/utils/classic-data.ts @@ -1,5 +1,5 @@ import { BigInt, log, ethereum, Address } from "@graphprotocol/graph-ts" -import { CLM, Classic } from "../../../generated/schema" +import { CLM, Classic, ClassicPosition } from "../../../generated/schema" import { ONE_BI, ZERO_BI, changeValueEncoding } from "../../common/utils/decimal" import { BEEFY_ORACLE_ADDRESS, @@ -376,7 +376,7 @@ export function fetchClassicData(classic: Classic): ClassicData { ) } -class ClassicData { +export class ClassicData { constructor( public vaultSharesTotalSupply: BigInt, public vaultUnderlyingTotalSupply: BigInt, diff --git a/src/classic/utils/position-snapshot.ts b/src/classic/utils/position-snapshot.ts new file mode 100644 index 0000000..99ecde6 --- /dev/null +++ b/src/classic/utils/position-snapshot.ts @@ -0,0 +1,56 @@ +import { Classic } from "../../../generated/schema" + +import { ClassicData } from "./classic-data" +import { ClassicPosition } from "../../../generated/schema" +import { POSITION_SNAPSHOT_ENABLED } from "../../config" +import { CLASSIC_SNAPSHOT_PERIODS } from "./snapshot" +import { getClassicPositionSnapshot } from "../entity/position" +import { BigInt, log } from "@graphprotocol/graph-ts" +import { hasClassicBeenRemoved, isClassicInitialized } from "../entity/classic" +import { ZERO_BI } from "../../common/utils/decimal" + +export function updateClassicPositionSnapshotsIfEnabled( + classic: Classic, + classicData: ClassicData, + position: ClassicPosition, + timestamp: BigInt, +): void { + // update position snapshots + if (!POSITION_SNAPSHOT_ENABLED) { + return + } + + if (hasClassicBeenRemoved(classic)) { + log.error("Classic vault {} has been removed, skipping updateClassicPositionSnapshots", [classic.id.toHexString()]) + return + } + + if (!isClassicInitialized(classic)) { + log.debug("Classic vault {} is not initialized, skipping updateClassicPositionSnapshots", [ + classic.id.toHexString(), + ]) + return + } + + if (position.totalBalance.equals(ZERO_BI)) { + log.debug("Classic position {} has no balance, skipping updateClassicPositionSnapshots", [ + position.id.toHexString(), + ]) + return + } + + for (let i = 0; i < CLASSIC_SNAPSHOT_PERIODS.length; i++) { + const period = CLASSIC_SNAPSHOT_PERIODS[i] + const snapshot = getClassicPositionSnapshot(position, timestamp, period) + snapshot.vaultBalance = position.vaultBalance + snapshot.boostBalance = position.boostBalance + snapshot.rewardPoolBalances = position.rewardPoolBalances + snapshot.totalBalance = position.totalBalance + snapshot.underlyingToNativePrice = classicData.underlyingToNativePrice + snapshot.underlyingBreakdownToNativePrices = classicData.underlyingBreakdownToNativePrices + snapshot.boostRewardToNativePrices = classicData.boostRewardToNativePrices + snapshot.rewardToNativePrices = classicData.rewardToNativePrices + snapshot.nativeToUSDPrice = classicData.nativeToUSDPrice + snapshot.save() + } +} diff --git a/src/clm/clock.ts b/src/clm/clock.ts index 244bfa5..2f345fe 100644 --- a/src/clm/clock.ts +++ b/src/clm/clock.ts @@ -2,6 +2,9 @@ import { ClockTick } from "../../generated/schema" import { getBeefyCLProtocol } from "../common/entity/protocol" import { updateCLMDataAndSnapshots, fetchCLMData } from "./utils/clm-data" import { isClmInitialized } from "./entity/clm" +import { updateClmPositionSnapshotsIfEnabled } from "./utils/position-snapshot" +import { log } from "@graphprotocol/graph-ts" +import { POSITION_SNAPSHOT_ENABLED } from "../config" export function updateClmDataOnClockTick(tick: ClockTick): void { const protocol = getBeefyCLProtocol() @@ -14,5 +17,15 @@ export function updateClmDataOnClockTick(tick: ClockTick): void { } const clmData = fetchCLMData(clm) updateCLMDataAndSnapshots(clm, clmData, tick.timestamp) + + // update position snapshots + if (POSITION_SNAPSHOT_ENABLED) { + const positions = clm.positions.load() + log.info("Updating {} CLM position snapshots", [positions.length.toString()]) + for (let j = 0; j < positions.length; j++) { + const position = positions[j] + updateClmPositionSnapshotsIfEnabled(clm, clmData, position, tick.timestamp) + } + } } } diff --git a/src/clm/compound.ts b/src/clm/compound.ts index d4aa90e..7f95f65 100644 --- a/src/clm/compound.ts +++ b/src/clm/compound.ts @@ -6,7 +6,7 @@ import { ClaimedRewards as CLMClaimedRewardsEvent, } from "../../generated/templates/ClmStrategy/ClmStrategy" import { getClmStrategy, getCLM, isClmInitialized } from "./entity/clm" -import { getTransaction } from "../common/entity/transaction" +import { getAndSaveTransaction } from "../common/entity/transaction" import { ClmHarvestEvent, ClmManagerCollectionEvent } from "../../generated/schema" import { ZERO_BI } from "../common/utils/decimal" import { getEventIdentifier } from "../common/utils/event" @@ -47,34 +47,39 @@ function handleClmStrategyHarvest( return } - let tx = getTransaction(event.block, event.transaction) - tx.save() + let tx = getAndSaveTransaction(event.block, event.transaction) /////// // fetch data on chain const clmData = fetchCLMData(clm) + updateCLMDataAndSnapshots(clm, clmData, event.block.timestamp) /////// // store the raw harvest event - let harvest = new ClmHarvestEvent(getEventIdentifier(event)) - harvest.clm = clm.id - harvest.strategy = strategy.id - harvest.createdWith = tx.id - harvest.logIndex = event.logIndex - harvest.timestamp = event.block.timestamp - harvest.underlyingAmount0 = clmData.totalUnderlyingAmount0 - harvest.underlyingAmount1 = clmData.totalUnderlyingAmount1 - harvest.compoundedAmount0 = compoundedAmount0 - harvest.compoundedAmount1 = compoundedAmount1 - harvest.collectedOutputAmounts = collectedOutputAmounts - harvest.managerTotalSupply = clmData.managerTotalSupply - harvest.rewardPoolsTotalSupply = clmData.rewardPoolsTotalSupply - harvest.token0ToNativePrice = clmData.token0ToNativePrice - harvest.token1ToNativePrice = clmData.token1ToNativePrice - harvest.outputToNativePrices = clmData.outputToNativePrices - harvest.rewardToNativePrices = clmData.rewardToNativePrices - harvest.nativeToUSDPrice = clmData.nativeToUSDPrice - harvest.save() + let eventId = getEventIdentifier(event) + let harvest = ClmHarvestEvent.load(eventId) + if (!harvest) { + harvest = new ClmHarvestEvent(eventId) + harvest.clm = clm.id + harvest.strategy = strategy.id + harvest.createdWith = tx.id + harvest.blockNumber = event.block.number + harvest.logIndex = event.logIndex + harvest.timestamp = event.block.timestamp + harvest.underlyingAmount0 = clmData.totalUnderlyingAmount0 + harvest.underlyingAmount1 = clmData.totalUnderlyingAmount1 + harvest.compoundedAmount0 = compoundedAmount0 + harvest.compoundedAmount1 = compoundedAmount1 + harvest.collectedOutputAmounts = collectedOutputAmounts + harvest.managerTotalSupply = clmData.managerTotalSupply + harvest.rewardPoolsTotalSupply = clmData.rewardPoolsTotalSupply + harvest.token0ToNativePrice = clmData.token0ToNativePrice + harvest.token1ToNativePrice = clmData.token1ToNativePrice + harvest.outputToNativePrices = clmData.outputToNativePrices + harvest.rewardToNativePrices = clmData.rewardToNativePrices + harvest.nativeToUSDPrice = clmData.nativeToUSDPrice + harvest.save() + } } export function handleClmStrategyClaimedFees(event: CLMClaimedFeesEvent): void { @@ -116,38 +121,39 @@ function handleClmStrategyFees( return } - let tx = getTransaction(event.block, event.transaction) - tx.save() + let tx = getAndSaveTransaction(event.block, event.transaction) /////// // fetch data on chain const clmData = fetchCLMData(clm) + updateCLMDataAndSnapshots(clm, clmData, event.block.timestamp) /////// // store the raw collect event - let collect = new ClmManagerCollectionEvent(getEventIdentifier(event)) - collect.clm = clm.id - collect.strategy = strategy.id - collect.createdWith = tx.id - collect.logIndex = event.logIndex - collect.timestamp = event.block.timestamp - collect.underlyingMainAmount0 = clmData.token0PositionMainBalance - collect.underlyingMainAmount1 = clmData.token1PositionMainBalance - collect.underlyingAltAmount0 = clmData.token0PositionAltBalance - collect.underlyingAltAmount1 = clmData.token1PositionAltBalance - collect.underlyingAmount0 = clmData.totalUnderlyingAmount0 - collect.underlyingAmount1 = clmData.totalUnderlyingAmount1 - collect.collectedAmount0 = collectedAmount0 - collect.collectedAmount1 = collectedAmount1 - collect.collectedOutputAmounts = collectedOutputAmounts - collect.token0ToNativePrice = clmData.token0ToNativePrice - collect.token1ToNativePrice = clmData.token1ToNativePrice - collect.outputToNativePrices = clmData.outputToNativePrices - collect.rewardToNativePrices = clmData.rewardToNativePrices - collect.nativeToUSDPrice = clmData.nativeToUSDPrice - collect.save() - - /////// - // update clm entity - updateCLMDataAndSnapshots(clm, clmData, event.block.timestamp) + let eventId = getEventIdentifier(event) + let collect = ClmManagerCollectionEvent.load(eventId) + if (!collect) { + collect = new ClmManagerCollectionEvent(eventId) + collect.clm = clm.id + collect.strategy = strategy.id + collect.createdWith = tx.id + collect.blockNumber = event.block.number + collect.logIndex = event.logIndex + collect.timestamp = event.block.timestamp + collect.underlyingMainAmount0 = clmData.token0PositionMainBalance + collect.underlyingMainAmount1 = clmData.token1PositionMainBalance + collect.underlyingAltAmount0 = clmData.token0PositionAltBalance + collect.underlyingAltAmount1 = clmData.token1PositionAltBalance + collect.underlyingAmount0 = clmData.totalUnderlyingAmount0 + collect.underlyingAmount1 = clmData.totalUnderlyingAmount1 + collect.collectedAmount0 = collectedAmount0 + collect.collectedAmount1 = collectedAmount1 + collect.collectedOutputAmounts = collectedOutputAmounts + collect.token0ToNativePrice = clmData.token0ToNativePrice + collect.token1ToNativePrice = clmData.token1ToNativePrice + collect.outputToNativePrices = clmData.outputToNativePrices + collect.rewardToNativePrices = clmData.rewardToNativePrices + collect.nativeToUSDPrice = clmData.nativeToUSDPrice + collect.save() + } } diff --git a/src/clm/entity/clm.ts b/src/clm/entity/clm.ts index 1aa7c05..04db475 100644 --- a/src/clm/entity/clm.ts +++ b/src/clm/entity/clm.ts @@ -24,6 +24,7 @@ export function getCLM(managerAddress: Bytes): CLM { clm.protocol = getBeefyCLProtocol().id clm.manager = managerAddress clm.strategy = ADDRESS_ZERO + clm.underlyingProtocolPool = ADDRESS_ZERO clm.lifecycle = PRODUCT_LIFECYCLE_INITIALIZING clm.managerToken = managerAddress diff --git a/src/clm/entity/position.ts b/src/clm/entity/position.ts index 18418ca..6fa5e19 100644 --- a/src/clm/entity/position.ts +++ b/src/clm/entity/position.ts @@ -1,7 +1,9 @@ -import { Bytes, store } from "@graphprotocol/graph-ts" -import { Investor, ClmPosition, CLM } from "../../../generated/schema" +import { BigInt, Bytes, store } from "@graphprotocol/graph-ts" +import { Investor, ClmPosition, CLM, ClmPositionSnapshot } from "../../../generated/schema" import { ADDRESS_ZERO } from "../../common/utils/address" import { ZERO_BI } from "../../common/utils/decimal" +import { getIntervalFromTimestamp } from "../../common/utils/time" +import { getPreviousSnapshotIdSuffix, getSnapshotIdSuffix } from "../../common/utils/snapshot" // @ts-ignore @inline @@ -28,3 +30,49 @@ export function removeClmPosition(clm: CLM, investor: Investor): void { const id = getPositionId(clm, investor) store.remove("ClmPosition", id.toHexString()) } + +export function getClmPositionSnapshot(position: ClmPosition, timestamp: BigInt, period: BigInt): ClmPositionSnapshot { + const interval = getIntervalFromTimestamp(timestamp, period) + const snapshotId = position.id.concat(getSnapshotIdSuffix(period, interval)) + let snapshot = ClmPositionSnapshot.load(snapshotId) + if (!snapshot) { + snapshot = new ClmPositionSnapshot(snapshotId) + snapshot.clm = position.clm + snapshot.investor = position.investor + snapshot.investorPosition = position.id + + snapshot.period = period + snapshot.timestamp = timestamp + snapshot.roundedTimestamp = interval + + snapshot.managerBalance = ZERO_BI + snapshot.rewardPoolBalances = [] + snapshot.totalBalance = ZERO_BI + snapshot.underlyingBalance0 = ZERO_BI + snapshot.underlyingBalance1 = ZERO_BI + + snapshot.token0ToNativePrice = ZERO_BI + snapshot.token1ToNativePrice = ZERO_BI + snapshot.outputToNativePrices = [] + snapshot.rewardToNativePrices = [] + snapshot.nativeToUSDPrice = ZERO_BI + + // copy non-reseting values from the previous snapshot to the new snapshot + const previousSnapshotId = position.id.concat(getPreviousSnapshotIdSuffix(period, interval)) + const previousSnapshot = ClmPositionSnapshot.load(previousSnapshotId) + if (previousSnapshot) { + snapshot.managerBalance = previousSnapshot.managerBalance + snapshot.rewardPoolBalances = previousSnapshot.rewardPoolBalances + snapshot.totalBalance = previousSnapshot.totalBalance + snapshot.underlyingBalance0 = previousSnapshot.underlyingBalance0 + snapshot.underlyingBalance1 = previousSnapshot.underlyingBalance1 + snapshot.token0ToNativePrice = previousSnapshot.token0ToNativePrice + snapshot.token1ToNativePrice = previousSnapshot.token1ToNativePrice + snapshot.outputToNativePrices = previousSnapshot.outputToNativePrices + snapshot.rewardToNativePrices = previousSnapshot.rewardToNativePrices + snapshot.nativeToUSDPrice = previousSnapshot.nativeToUSDPrice + } + } + + return snapshot +} diff --git a/src/clm/interaction.ts b/src/clm/interaction.ts index 269b183..784936c 100644 --- a/src/clm/interaction.ts +++ b/src/clm/interaction.ts @@ -5,7 +5,7 @@ import { RewardPaid as RewardPoolRewardPaidEvent, } from "../../generated/templates/ClmRewardPool/RewardPool" import { getClmRewardPool, getCLM, isClmInitialized } from "./entity/clm" -import { getTransaction } from "../common/entity/transaction" +import { getAndSaveTransaction } from "../common/entity/transaction" import { getInvestor } from "../common/entity/investor" import { getClmPosition } from "./entity/position" import { CLM, ClmPositionInteraction, ClmRewardPool } from "../../generated/schema" @@ -13,6 +13,7 @@ import { BURN_ADDRESS, SHARE_TOKEN_MINT_ADDRESS } from "../config" import { ZERO_BI } from "../common/utils/decimal" import { fetchCLMData, updateCLMDataAndSnapshots } from "./utils/clm-data" import { getEventIdentifier } from "../common/utils/event" +import { updateClmPositionSnapshotsIfEnabled } from "./utils/position-snapshot" export function handleClmManagerTransfer(event: ClmManagerTransferEvent): void { // sending to self @@ -48,7 +49,7 @@ export function handleClmManagerTransfer(event: ClmManagerTransferEvent): void { !event.params.from.equals(managerAddress) && !isRewardPoolFrom ) { - updateUserPosition(clm, event, event.params.from, event.params.value.neg(), [], [], null) + updateUserPositionAndSnapshots(clm, event, event.params.from, event.params.value.neg(), [], [], null) } if ( @@ -57,7 +58,7 @@ export function handleClmManagerTransfer(event: ClmManagerTransferEvent): void { !event.params.to.equals(managerAddress) && !isRewardPoolTo ) { - updateUserPosition(clm, event, event.params.to, event.params.value, [], [], null) + updateUserPositionAndSnapshots(clm, event, event.params.to, event.params.value, [], [], null) } } @@ -109,7 +110,7 @@ export function handleClmRewardPoolTransfer(event: RewardPoolTransferEvent): voi !event.params.to.equals(managerAddress) && !isRewardPoolTo ) { - updateUserPosition(clm, event, event.params.to, ZERO_BI, rewardPoolBalancesDelta, [], null) + updateUserPositionAndSnapshots(clm, event, event.params.to, ZERO_BI, rewardPoolBalancesDelta, [], null) } if ( @@ -122,7 +123,7 @@ export function handleClmRewardPoolTransfer(event: RewardPoolTransferEvent): voi for (let i = 0; i < rewardPoolBalancesDelta.length; i++) { negRewardPoolBalancesDelta.push(rewardPoolBalancesDelta[i].neg()) } - updateUserPosition(clm, event, event.params.from, ZERO_BI, negRewardPoolBalancesDelta, [], null) + updateUserPositionAndSnapshots(clm, event, event.params.from, ZERO_BI, negRewardPoolBalancesDelta, [], null) } } @@ -140,10 +141,10 @@ export function handleClmRewardPoolRewardPaid(event: RewardPoolRewardPaidEvent): } } - updateUserPosition(clm, event, event.params.user, ZERO_BI, [], rewardBalancesDelta, rewardPool) + updateUserPositionAndSnapshots(clm, event, event.params.user, ZERO_BI, [], rewardBalancesDelta, rewardPool) } -function updateUserPosition( +function updateUserPositionAndSnapshots( clm: CLM, event: ethereum.Event, investorAddress: Address, @@ -160,8 +161,7 @@ function updateUserPosition( const investor = getInvestor(investorAddress) const position = getClmPosition(clm, investor) - let tx = getTransaction(event.block, event.transaction) - tx.save() + let tx = getAndSaveTransaction(event.block, event.transaction) /////// // fetch data on chain and update clm @@ -224,6 +224,7 @@ function updateUserPosition( interaction.investorPosition = position.id interaction.createdWith = event.transaction.hash interaction.blockNumber = event.block.number + interaction.logIndex = event.logIndex interaction.timestamp = event.block.timestamp if (isSharesTransfer) { interaction.type = managerBalanceDelta.gt(ZERO_BI) ? "MANAGER_DEPOSIT" : "MANAGER_WITHDRAW" @@ -275,4 +276,7 @@ function updateUserPosition( interaction.rewardToNativePrices = clmData.rewardToNativePrices interaction.nativeToUSDPrice = clmData.nativeToUSDPrice interaction.save() + + // update position snapshots if needed + updateClmPositionSnapshotsIfEnabled(clm, clmData, position, event.block.timestamp) } diff --git a/src/clm/lifecycle.ts b/src/clm/lifecycle.ts index 605c481..5c7ae08 100644 --- a/src/clm/lifecycle.ts +++ b/src/clm/lifecycle.ts @@ -16,7 +16,7 @@ import { } from "../../generated/templates/ClmStrategy/ClmStrategy" import { ProxyCreated as CLMManagerCreatedEvent } from "../../generated/ClmManagerFactory/ClmManagerFactory" import { GlobalPause as ClmStrategyFactoryGlobalPauseEvent } from "../../generated/ClmStrategyFactory/ClmStrategyFactory" -import { getTransaction } from "../common/entity/transaction" +import { getAndSaveTransaction } from "../common/entity/transaction" import { fetchAndSaveTokenData } from "../common/utils/token" import { getBeefyCLProtocol } from "../common/entity/protocol" import { @@ -26,8 +26,7 @@ import { } from "../common/entity/lifecycle" export function handleClmManagerCreated(event: CLMManagerCreatedEvent): void { - const tx = getTransaction(event.block, event.transaction) - tx.save() + const tx = getAndSaveTransaction(event.block, event.transaction) const managerAddress = event.params.proxy @@ -80,7 +79,7 @@ export function handleClmManagerInitialized(event: ClmManagerInitialized): void // this is a test to know if that is the case const strategyContract = ClmStrategyContract.bind(strategyAddress) const strategyPoolRes = strategyContract.try_pool() - if (strategyAddressRes.reverted) { + if (strategyPoolRes.reverted) { log.error("handleClmManagerInitialized: Strategy pool reverted for CLM {}", [managerAddress.toHexString()]) return } @@ -161,6 +160,14 @@ function fetchInitialCLMDataAndSave(clm: CLM): void { const strategyAddress = Address.fromBytes(clm.strategy) const strategyContract = ClmStrategyContract.bind(strategyAddress) + + const strategyPoolRes = strategyContract.try_pool() + if (strategyPoolRes.value) { + clm.underlyingProtocolPool = strategyPoolRes.value + } else { + log.error("fetchInitialCLMDataAndSave: Strategy pool reverted for CLM {}", [clm.id.toHexString()]) + } + const outputTokenRes = strategyContract.try_output() if (!outputTokenRes.reverted) { const outputTokenAddress = outputTokenRes.value diff --git a/src/clm/utils/clm-data.ts b/src/clm/utils/clm-data.ts index af49c46..c916a8c 100644 --- a/src/clm/utils/clm-data.ts +++ b/src/clm/utils/clm-data.ts @@ -338,7 +338,7 @@ export function fetchCLMData(clm: CLM): CLMData { ) } -class CLMData { +export class CLMData { constructor( public managerTotalSupply: BigInt, public rewardPoolsTotalSupply: Array, diff --git a/src/clm/utils/position-snapshot.ts b/src/clm/utils/position-snapshot.ts new file mode 100644 index 0000000..44afd0b --- /dev/null +++ b/src/clm/utils/position-snapshot.ts @@ -0,0 +1,51 @@ +import { BigInt, log } from "@graphprotocol/graph-ts" +import { CLM, ClmPosition } from "../../../generated/schema" +import { CLMData } from "./clm-data" +import { getClmPositionSnapshot } from "../entity/position" +import { POSITION_SNAPSHOT_ENABLED } from "../../config" +import { CLM_SNAPSHOT_PERIODS } from "./snapshot" +import { ZERO_BI } from "../../common/utils/decimal" +import { isClmInitialized } from "../entity/clm" +import { getToken } from "../../common/entity/token" + +export function updateClmPositionSnapshotsIfEnabled( + clm: CLM, + clmData: CLMData, + position: ClmPosition, + timestamp: BigInt, +): void { + // update position snapshots + if (!POSITION_SNAPSHOT_ENABLED) { + return + } + + if (!isClmInitialized(clm)) { + log.debug("CLM {} is not initialized, skipping updateClmPositionSnapshots", [clm.id.toHexString()]) + return + } + + if (position.totalBalance.equals(ZERO_BI)) { + log.debug("CLM position {} has no balance, skipping updateClmPositionSnapshots", [position.id.toHexString()]) + return + } + + for (let i = 0; i < CLM_SNAPSHOT_PERIODS.length; i++) { + const period = CLM_SNAPSHOT_PERIODS[i] + const snapshot = getClmPositionSnapshot(position, timestamp, period) + snapshot.managerBalance = position.managerBalance + snapshot.rewardPoolBalances = position.rewardPoolBalances + snapshot.totalBalance = position.totalBalance + snapshot.underlyingBalance0 = clmData.totalUnderlyingAmount0 + .times(position.managerBalance) + .div(clmData.managerTotalSupply) + snapshot.underlyingBalance1 = clmData.totalUnderlyingAmount1 + .times(position.managerBalance) + .div(clmData.managerTotalSupply) + snapshot.token0ToNativePrice = clmData.token0ToNativePrice + snapshot.token1ToNativePrice = clmData.token1ToNativePrice + snapshot.outputToNativePrices = clmData.outputToNativePrices + snapshot.rewardToNativePrices = clmData.rewardToNativePrices + snapshot.nativeToUSDPrice = clmData.nativeToUSDPrice + snapshot.save() + } +} diff --git a/src/common/entity/transaction.ts b/src/common/entity/transaction.ts index 9c62c00..8a86a0c 100644 --- a/src/common/entity/transaction.ts +++ b/src/common/entity/transaction.ts @@ -2,7 +2,7 @@ import { ethereum } from "@graphprotocol/graph-ts" import { Transaction } from "../../../generated/schema" import { ADDRESS_ZERO } from "../utils/address" -export function getTransaction(block: ethereum.Block, transaction: ethereum.Transaction): Transaction { +export function getAndSaveTransaction(block: ethereum.Block, transaction: ethereum.Transaction): Transaction { let transactionId = transaction.hash let tx = Transaction.load(transactionId) if (!tx) { @@ -10,6 +10,7 @@ export function getTransaction(block: ethereum.Block, transaction: ethereum.Tran tx.blockNumber = block.number tx.blockTimestamp = block.timestamp tx.sender = transaction.from || ADDRESS_ZERO + tx.save() } return tx } diff --git a/src/common/utils/token.ts b/src/common/utils/token.ts index 60ac3ea..47dcc72 100644 --- a/src/common/utils/token.ts +++ b/src/common/utils/token.ts @@ -4,6 +4,11 @@ import { Address, BigInt, Bytes } from "@graphprotocol/graph-ts" import { getToken } from "../entity/token" export function fetchAndSaveTokenData(tokenAddress: Bytes): Token { + let tokenExists = Token.load(tokenAddress) + if (tokenExists) { + return tokenExists + } + const tokenContract = IERC20Contract.bind(Address.fromBytes(tokenAddress)) // use individual calls as there is a good change other subgraph has requested // this token's metadata and it's already in the graph-node cache diff --git a/src/config.template.ts b/src/config.template.ts index 4ca4d9d..444667a 100644 --- a/src/config.template.ts +++ b/src/config.template.ts @@ -1,6 +1,6 @@ import { Address, BigInt, Bytes } from "@graphprotocol/graph-ts" -export const NETWORK_NAME = "{{network}}" +export const NETWORK_NAME = "{{{network}}}" export const WNATIVE_TOKEN_ADDRESS = Address.fromString("{{wrappedNativeAddress}}") export const WNATIVE_DECIMALS = BigInt.fromU32({{wrappedNativeDecimals}}) export const PRICE_ORACLE_TYPE: string = "{{priceOracleType}}" @@ -20,6 +20,20 @@ export const PRICE_STORE_DECIMALS_USD = BigInt.fromU32(18) export const PRICE_STORE_DECIMALS_TOKEN_TO_NATIVE = BigInt.fromU32(18) export const BEEFY_SWAPPER_ADDRESS = Address.fromString("{{beefySwapperAddress}}") export const BEEFY_ORACLE_ADDRESS = Address.fromString("{{beefyOracleAddress}}") + // amount we divide 1 of _fromToken to get 1 of _toToken before asking for the price // this is to avoid liquidity issues with tokens that have very high price (e.g. BTC) -export const BEEFY_SWAPPER_VALUE_SCALER = BigInt.fromU32(1000) \ No newline at end of file +export const BEEFY_SWAPPER_VALUE_SCALER = BigInt.fromU32(1000) + +// on some network the classic vaults are supported by other data systems (databarn) +export const ONLY_KEEP_CLM_CLASSIC_VAULTS = {{onlyKeepClmClassicVaults}} + +// set to true to enable position snapshots, this will increase db size significantly +// but makes tracking user positions over time way simpler +export const POSITION_SNAPSHOT_ENABLED = {{positionSnapshotEnabled}} + +export const CLASSIC_STRAT_HARVEST_1_FOR_ADDRESSES: Address[] = [ +{{#classicStratHarvest1ForAddresses}} + Address.fromString("{{.}}"), +{{/classicStratHarvest1ForAddresses}} +]; diff --git a/src/reward-pool/lifecycle.ts b/src/reward-pool/lifecycle.ts index e8fee3b..d5d0fb8 100644 --- a/src/reward-pool/lifecycle.ts +++ b/src/reward-pool/lifecycle.ts @@ -11,7 +11,7 @@ import { AddReward as RewardPoolAddRewardEvent, RemoveReward as RewardPoolRemoveRewardEvent, } from "../../generated/RewardPoolFactory/RewardPool" -import { getTransaction } from "../common/entity/transaction" +import { getAndSaveTransaction } from "../common/entity/transaction" import { fetchAndSaveTokenData } from "../common/utils/token" import { ZERO_BI } from "../common/utils/decimal" import { getCLM, getClmRewardPool, isClmManagerAddress, isClmRewardPool, removeClmRewardPool } from "../clm/entity/clm" @@ -52,8 +52,7 @@ export function handleRewardPoolInitialized(event: RewardPoolInitialized): void } const stakedTokenAddress = stakedTokenAddressRes.value - const tx = getTransaction(event.block, event.transaction) - tx.save() + const tx = getAndSaveTransaction(event.block, event.transaction) const rewardPoolToken = fetchAndSaveTokenData(rewardPoolAddress) diff --git a/subgraph.template.yaml b/subgraph.template.yaml index c4894e9..c13ee6d 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -8,7 +8,7 @@ indexerHints: dataSources: - kind: ethereum/contract name: ClmManagerFactory - network: {{network}} + network: "{{{network}}}" source: address: "{{clmManagerFactoryAddress}}" abi: ClmManagerFactory @@ -53,6 +53,10 @@ dataSources: file: ./abis/beefy/classic/ClassicVault.json - name: ClassicStrategy file: ./abis/beefy/classic/ClassicStrategy.json + - name: ClassicStrategyStratHarvest0 + file: ./abis/beefy/classic/ClassicStrategyStratHarvest0.json + - name: ClassicStrategyStratHarvest1 + file: ./abis/beefy/classic/ClassicStrategyStratHarvest1.json - name: ClassicBoostFactory file: ./abis/beefy/classic/ClassicBoostFactory.json - name: ClassicBoost @@ -68,7 +72,7 @@ dataSources: - kind: ethereum/contract name: ClmStrategyFactory - network: {{network}} + network: "{{{network}}}" source: address: "{{clmStrategyFactoryAddress}}" abi: ClmStrategyFactory @@ -86,7 +90,7 @@ dataSources: - kind: ethereum/contract name: RewardPoolFactory - network: {{network}} + network: "{{{network}}}" source: address: "{{rewardPoolFactoryAddress}}" abi: RewardPoolFactory @@ -104,7 +108,7 @@ dataSources: - kind: ethereum/contract name: Clock - network: {{network}} + network: "{{{network}}}" source: address: "{{clmManagerFactoryAddress}}" abi: ClmManagerFactory @@ -125,7 +129,7 @@ dataSources: - kind: ethereum/contract name: ClassicVaultFactory - network: {{network}} + network: "{{{network}}}" source: address: "{{beefyClassicVaultFactoryAddress}}" abi: ClassicVaultFactory @@ -156,7 +160,7 @@ dataSources: - kind: ethereum/contract name: ClassicBoostFactory - network: {{network}} + network: "{{{network}}}" source: address: "{{beefyClassicBoostFactoryAddress}}" abi: ClassicBoostFactory @@ -175,7 +179,7 @@ dataSources: templates: - name: ClmManager kind: ethereum/contract - network: {{network}} + network: "{{{network}}}" source: abi: ClmManager mapping: @@ -193,7 +197,7 @@ templates: - name: ClmStrategy kind: ethereum/contract - network: {{network}} + network: "{{{network}}}" source: abi: ClmStrategy mapping: @@ -221,7 +225,7 @@ templates: - name: RewardPool kind: ethereum/contract - network: {{network}} + network: "{{{network}}}" source: abi: RewardPool mapping: @@ -237,7 +241,7 @@ templates: - name: ClmRewardPool kind: ethereum/contract - network: {{network}} + network: "{{{network}}}" source: abi: RewardPool mapping: @@ -259,7 +263,7 @@ templates: - name: ClassicRewardPool kind: ethereum/contract - network: {{network}} + network: "{{{network}}}" source: abi: RewardPool mapping: @@ -283,7 +287,7 @@ templates: - name: ClassicVault kind: ethereum/contract - network: {{network}} + network: "{{{network}}}" source: abi: ClassicVault mapping: @@ -303,7 +307,7 @@ templates: - name: ClassicStrategy kind: ethereum/contract - network: {{network}} + network: "{{{network}}}" source: abi: ClassicStrategy mapping: @@ -320,12 +324,42 @@ templates: handler: handleClassicStrategyPaused - event: Unpaused(address) handler: handleClassicStrategyUnpaused + + - name: ClassicStrategyStratHarvest0 + kind: ethereum/contract + network: "{{{network}}}" + source: + abi: ClassicStrategyStratHarvest0 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 # 0xgraph's version + language: wasm/assemblyscript + file: ./src/classic/mapping/strategy.ts + entities: *classicEntities + abis: *abis + eventHandlers: - event: StratHarvest(indexed address,uint256,uint256) - handler: handleClassicStrategyHarvest + handler: handleClassicStrategyHarvest0 + + - name: ClassicStrategyStratHarvest1 + kind: ethereum/contract + network: "{{{network}}}" + source: + abi: ClassicStrategyStratHarvest1 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 # 0xgraph's version + language: wasm/assemblyscript + file: ./src/classic/mapping/strategy.ts + entities: *classicEntities + abis: *abis + eventHandlers: + - event: StratHarvest(indexed address,indexed uint256,indexed uint256) + handler: handleClassicStrategyHarvest1 - name: ClassicBoost kind: ethereum/contract - network: {{network}} + network: "{{{network}}}" source: abi: ClassicBoost mapping: diff --git a/yarn.lock b/yarn.lock index 8dcccc6..65225bf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23,6 +23,246 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" +"@esbuild/aix-ppc64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz#51299374de171dbd80bb7d838e1cfce9af36f353" + integrity sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ== + +"@esbuild/aix-ppc64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz#b57697945b50e99007b4c2521507dc613d4a648c" + integrity sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw== + +"@esbuild/android-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz#58565291a1fe548638adb9c584237449e5e14018" + integrity sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw== + +"@esbuild/android-arm64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz#1add7e0af67acefd556e407f8497e81fddad79c0" + integrity sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w== + +"@esbuild/android-arm@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.23.1.tgz#5eb8c652d4c82a2421e3395b808e6d9c42c862ee" + integrity sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ== + +"@esbuild/android-arm@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.24.0.tgz#ab7263045fa8e090833a8e3c393b60d59a789810" + integrity sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew== + +"@esbuild/android-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.23.1.tgz#ae19d665d2f06f0f48a6ac9a224b3f672e65d517" + integrity sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg== + +"@esbuild/android-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.24.0.tgz#e8f8b196cfdfdd5aeaebbdb0110983460440e705" + integrity sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ== + +"@esbuild/darwin-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz#05b17f91a87e557b468a9c75e9d85ab10c121b16" + integrity sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q== + +"@esbuild/darwin-arm64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz#2d0d9414f2acbffd2d86e98253914fca603a53dd" + integrity sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw== + +"@esbuild/darwin-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz#c58353b982f4e04f0d022284b8ba2733f5ff0931" + integrity sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw== + +"@esbuild/darwin-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz#33087aab31a1eb64c89daf3d2cf8ce1775656107" + integrity sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA== + +"@esbuild/freebsd-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz#f9220dc65f80f03635e1ef96cfad5da1f446f3bc" + integrity sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA== + +"@esbuild/freebsd-arm64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz#bb76e5ea9e97fa3c753472f19421075d3a33e8a7" + integrity sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA== + +"@esbuild/freebsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz#69bd8511fa013b59f0226d1609ac43f7ce489730" + integrity sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g== + +"@esbuild/freebsd-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz#e0e2ce9249fdf6ee29e5dc3d420c7007fa579b93" + integrity sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ== + +"@esbuild/linux-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz#8050af6d51ddb388c75653ef9871f5ccd8f12383" + integrity sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g== + +"@esbuild/linux-arm64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz#d1b2aa58085f73ecf45533c07c82d81235388e75" + integrity sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g== + +"@esbuild/linux-arm@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz#ecaabd1c23b701070484990db9a82f382f99e771" + integrity sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ== + +"@esbuild/linux-arm@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz#8e4915df8ea3e12b690a057e77a47b1d5935ef6d" + integrity sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw== + +"@esbuild/linux-ia32@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz#3ed2273214178109741c09bd0687098a0243b333" + integrity sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ== + +"@esbuild/linux-ia32@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz#8200b1110666c39ab316572324b7af63d82013fb" + integrity sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA== + +"@esbuild/linux-loong64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz#a0fdf440b5485c81b0fbb316b08933d217f5d3ac" + integrity sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw== + +"@esbuild/linux-loong64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz#6ff0c99cf647504df321d0640f0d32e557da745c" + integrity sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g== + +"@esbuild/linux-mips64el@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz#e11a2806346db8375b18f5e104c5a9d4e81807f6" + integrity sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q== + +"@esbuild/linux-mips64el@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz#3f720ccd4d59bfeb4c2ce276a46b77ad380fa1f3" + integrity sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA== + +"@esbuild/linux-ppc64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz#06a2744c5eaf562b1a90937855b4d6cf7c75ec96" + integrity sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw== + +"@esbuild/linux-ppc64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz#9d6b188b15c25afd2e213474bf5f31e42e3aa09e" + integrity sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ== + +"@esbuild/linux-riscv64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz#65b46a2892fc0d1af4ba342af3fe0fa4a8fe08e7" + integrity sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA== + +"@esbuild/linux-riscv64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz#f989fdc9752dfda286c9cd87c46248e4dfecbc25" + integrity sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw== + +"@esbuild/linux-s390x@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz#e71ea18c70c3f604e241d16e4e5ab193a9785d6f" + integrity sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw== + +"@esbuild/linux-s390x@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz#29ebf87e4132ea659c1489fce63cd8509d1c7319" + integrity sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g== + +"@esbuild/linux-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz#d47f97391e80690d4dfe811a2e7d6927ad9eed24" + integrity sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ== + +"@esbuild/linux-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz#4af48c5c0479569b1f359ffbce22d15f261c0cef" + integrity sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA== + +"@esbuild/netbsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz#44e743c9778d57a8ace4b72f3c6b839a3b74a653" + integrity sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA== + +"@esbuild/netbsd-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz#1ae73d23cc044a0ebd4f198334416fb26c31366c" + integrity sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg== + +"@esbuild/openbsd-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz#05c5a1faf67b9881834758c69f3e51b7dee015d7" + integrity sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q== + +"@esbuild/openbsd-arm64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz#5d904a4f5158c89859fd902c427f96d6a9e632e2" + integrity sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg== + +"@esbuild/openbsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz#2e58ae511bacf67d19f9f2dcd9e8c5a93f00c273" + integrity sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA== + +"@esbuild/openbsd-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz#4c8aa88c49187c601bae2971e71c6dc5e0ad1cdf" + integrity sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q== + +"@esbuild/sunos-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz#adb022b959d18d3389ac70769cef5a03d3abd403" + integrity sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA== + +"@esbuild/sunos-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz#8ddc35a0ea38575fa44eda30a5ee01ae2fa54dd4" + integrity sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA== + +"@esbuild/win32-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz#84906f50c212b72ec360f48461d43202f4c8b9a2" + integrity sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A== + +"@esbuild/win32-arm64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz#6e79c8543f282c4539db684a207ae0e174a9007b" + integrity sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA== + +"@esbuild/win32-ia32@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz#5e3eacc515820ff729e90d0cb463183128e82fac" + integrity sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ== + +"@esbuild/win32-ia32@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz#057af345da256b7192d18b676a02e95d0fa39103" + integrity sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw== + +"@esbuild/win32-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz#81fd50d11e2c32b2d6241470e3185b70c7b30699" + integrity sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg== + +"@esbuild/win32-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz#168ab1c7e1c318b922637fad8f339d48b01e1244" + integrity sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA== + "@ethersproject/abi@5.0.7": version "5.0.7" resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.7.tgz#79e52452bd3ca2956d0e1c964207a58ad1a0ee7b" @@ -245,10 +485,10 @@ which "2.0.2" yaml "1.10.2" -"@graphprotocol/graph-ts@^0.35.1": - version "0.35.1" - resolved "https://registry.yarnpkg.com/@graphprotocol/graph-ts/-/graph-ts-0.35.1.tgz#1e1ecc36d8f7a727ef3a6f1fed4c5ce16de378c2" - integrity sha512-74CfuQmf7JI76/XCC34FTkMMKeaf+3Pn0FIV3m9KNeaOJ+OI3CvjMIVRhOZdKcJxsFCBGaCCl0eQjh47xTjxKA== +"@graphprotocol/graph-ts@0.32.0": + version "0.32.0" + resolved "https://registry.yarnpkg.com/@graphprotocol/graph-ts/-/graph-ts-0.32.0.tgz#36f8cd8e4ef42c3c32536cceb9995ab990f51d29" + integrity sha512-YfKLT2w+ItXD/VPYQiAKtINQONVsAOkcqVFMHlhUy0fcEBVWuFBT53hJNI0/l5ujQa4TSxtzrKW/7EABAdgI8g== dependencies: assemblyscript "0.19.10" @@ -275,12 +515,38 @@ dependencies: multiformats "^9.5.4" -"@jridgewell/resolve-uri@^3.0.3": +"@isaacs/cliui@^8.0.2": + version "8.0.2" + resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" + integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA== + dependencies: + string-width "^5.1.2" + string-width-cjs "npm:string-width@^4.2.0" + strip-ansi "^7.0.1" + strip-ansi-cjs "npm:strip-ansi@^6.0.1" + wrap-ansi "^8.1.0" + wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" + +"@jridgewell/gen-mapping@^0.3.2": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" + integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== + dependencies: + "@jridgewell/set-array" "^1.2.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.24" + +"@jridgewell/resolve-uri@^3.0.3", "@jridgewell/resolve-uri@^3.1.0": version "3.1.2" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== -"@jridgewell/sourcemap-codec@^1.4.10": +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== + +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": version "1.5.0" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== @@ -293,6 +559,14 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" +"@jridgewell/trace-mapping@^0.3.24": + version "0.3.25" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + "@noble/hashes@^1.4.0": version "1.6.1" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.6.1.tgz#df6e5943edcea504bac61395926d6fd67869a0d5" @@ -469,6 +743,11 @@ tslib "^2.6.2" webcrypto-core "^1.8.0" +"@pkgjs/parseargs@^0.11.0": + version "0.11.0" + resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" + integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== + "@pnpm/config.env-replace@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz#ab29da53df41e8948a00f2433f085f54de8b3a4c" @@ -548,6 +827,140 @@ resolved "https://registry.yarnpkg.com/@rescript/std/-/std-9.0.0.tgz#df53f3fa5911cb4e85bd66b92e9e58ddf3e4a7e1" integrity sha512-zGzFsgtZ44mgL4Xef2gOy1hrRVdrs9mcxCOOKZrIPsmbZW14yTkaF591GXxpQvjXiHtgZ/iA9qLyWH6oSReIxQ== +"@rollup/rollup-android-arm-eabi@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.27.4.tgz#e3c9cc13f144ba033df4d2c3130a214dc8e3473e" + integrity sha512-2Y3JT6f5MrQkICUyRVCw4oa0sutfAsgaSsb0Lmmy1Wi2y7X5vT9Euqw4gOsCyy0YfKURBg35nhUKZS4mDcfULw== + +"@rollup/rollup-android-arm64@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.27.4.tgz#0474250fcb5871aca952e249a0c3270fc4310b55" + integrity sha512-wzKRQXISyi9UdCVRqEd0H4cMpzvHYt1f/C3CoIjES6cG++RHKhrBj2+29nPF0IB5kpy9MS71vs07fvrNGAl/iA== + +"@rollup/rollup-darwin-arm64@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.27.4.tgz#77c29b4f9c430c1624f1a6835f2a7e82be3d16f2" + integrity sha512-PlNiRQapift4LNS8DPUHuDX/IdXiLjf8mc5vdEmUR0fF/pyy2qWwzdLjB+iZquGr8LuN4LnUoSEvKRwjSVYz3Q== + +"@rollup/rollup-darwin-x64@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.27.4.tgz#7d87711f641a458868758cbf110fb32eabd6a25a" + integrity sha512-o9bH2dbdgBDJaXWJCDTNDYa171ACUdzpxSZt+u/AAeQ20Nk5x+IhA+zsGmrQtpkLiumRJEYef68gcpn2ooXhSQ== + +"@rollup/rollup-freebsd-arm64@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.27.4.tgz#662f808d2780e4e91021ac9ee7ed800862bb9a57" + integrity sha512-NBI2/i2hT9Q+HySSHTBh52da7isru4aAAo6qC3I7QFVsuhxi2gM8t/EI9EVcILiHLj1vfi+VGGPaLOUENn7pmw== + +"@rollup/rollup-freebsd-x64@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.27.4.tgz#71e5a7bcfcbe51d8b65d158675acec1307edea79" + integrity sha512-wYcC5ycW2zvqtDYrE7deary2P2UFmSh85PUpAx+dwTCO9uw3sgzD6Gv9n5X4vLaQKsrfTSZZ7Z7uynQozPVvWA== + +"@rollup/rollup-linux-arm-gnueabihf@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.27.4.tgz#08f67fcec61ee18f8b33b3f403a834ab8f3aa75d" + integrity sha512-9OwUnK/xKw6DyRlgx8UizeqRFOfi9mf5TYCw1uolDaJSbUmBxP85DE6T4ouCMoN6pXw8ZoTeZCSEfSaYo+/s1w== + +"@rollup/rollup-linux-arm-musleabihf@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.27.4.tgz#2e1ad4607f86475b1731556359c6070eb8f4b109" + integrity sha512-Vgdo4fpuphS9V24WOV+KwkCVJ72u7idTgQaBoLRD0UxBAWTF9GWurJO9YD9yh00BzbkhpeXtm6na+MvJU7Z73A== + +"@rollup/rollup-linux-arm64-gnu@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.27.4.tgz#c65d559dcb0d3dabea500cf7b8215959ae6cccf8" + integrity sha512-pleyNgyd1kkBkw2kOqlBx+0atfIIkkExOTiifoODo6qKDSpnc6WzUY5RhHdmTdIJXBdSnh6JknnYTtmQyobrVg== + +"@rollup/rollup-linux-arm64-musl@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.27.4.tgz#6739f7eb33e20466bb88748519c98ce8dee23922" + integrity sha512-caluiUXvUuVyCHr5DxL8ohaaFFzPGmgmMvwmqAITMpV/Q+tPoaHZ/PWa3t8B2WyoRcIIuu1hkaW5KkeTDNSnMA== + +"@rollup/rollup-linux-powerpc64le-gnu@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.27.4.tgz#8d9fe9471c256e55278cb1f7b1c977cd8fe6df20" + integrity sha512-FScrpHrO60hARyHh7s1zHE97u0KlT/RECzCKAdmI+LEoC1eDh/RDji9JgFqyO+wPDb86Oa/sXkily1+oi4FzJQ== + +"@rollup/rollup-linux-riscv64-gnu@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.27.4.tgz#9a467f7ad5b61c9d66b24e79a3c57cb755d02c35" + integrity sha512-qyyprhyGb7+RBfMPeww9FlHwKkCXdKHeGgSqmIXw9VSUtvyFZ6WZRtnxgbuz76FK7LyoN8t/eINRbPUcvXB5fw== + +"@rollup/rollup-linux-s390x-gnu@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.27.4.tgz#efaddf22df27b87a267a731fbeb9539e92cd4527" + integrity sha512-PFz+y2kb6tbh7m3A7nA9++eInGcDVZUACulf/KzDtovvdTizHpZaJty7Gp0lFwSQcrnebHOqxF1MaKZd7psVRg== + +"@rollup/rollup-linux-x64-gnu@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.27.4.tgz#a959eccb04b07fd1591d7ff745a6865faa7042cd" + integrity sha512-Ni8mMtfo+o/G7DVtweXXV/Ol2TFf63KYjTtoZ5f078AUgJTmaIJnj4JFU7TK/9SVWTaSJGxPi5zMDgK4w+Ez7Q== + +"@rollup/rollup-linux-x64-musl@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.27.4.tgz#927764f1da1f2dd50943716dec93796d10cb6e99" + integrity sha512-5AeeAF1PB9TUzD+3cROzFTnAJAcVUGLuR8ng0E0WXGkYhp6RD6L+6szYVX+64Rs0r72019KHZS1ka1q+zU/wUw== + +"@rollup/rollup-win32-arm64-msvc@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.27.4.tgz#030b6cc607d845da23dced624e47fb45de105840" + integrity sha512-yOpVsA4K5qVwu2CaS3hHxluWIK5HQTjNV4tWjQXluMiiiu4pJj4BN98CvxohNCpcjMeTXk/ZMJBRbgRg8HBB6A== + +"@rollup/rollup-win32-ia32-msvc@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.27.4.tgz#3457a3f44a84f51d8097c3606429e01f0d2d0ec2" + integrity sha512-KtwEJOaHAVJlxV92rNYiG9JQwQAdhBlrjNRp7P9L8Cb4Rer3in+0A+IPhJC9y68WAi9H0sX4AiG2NTsVlmqJeQ== + +"@rollup/rollup-win32-x64-msvc@4.27.4": + version "4.27.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.27.4.tgz#67d516613c9f2fe42e2d8b78e252d0003179d92c" + integrity sha512-3j4jx1TppORdTAoBJRd+/wJRGCPC0ETWkXOecJ6PPZLj6SptXkrXcNqdj0oclbKML6FkQltdz7bBA3rUSirZug== + +"@sentio/cli@^2.22.1": + version "2.22.1" + resolved "https://registry.yarnpkg.com/@sentio/cli/-/cli-2.22.1.tgz#080cb20e812373cf304a26bd1375ffa835810fc9" + integrity sha512-cFrqQSuloNW8RUiUUuKmPP27ZDRRxl+kOowmR7U+QaibW98qdKZaziQfHmbZ5f22gNMbu/ruJ1DKYS4wVE/nKQ== + dependencies: + "@sentio/graph-cli" "^0.80.0-patch.1" + dotenv "^16.4.5" + tsup "npm:@sentio/tsup@^8.3.5-rc.1" + tsx "^4.15.2" + +"@sentio/graph-cli@^0.80.0-patch.1": + version "0.80.0-patch.1" + resolved "https://registry.yarnpkg.com/@sentio/graph-cli/-/graph-cli-0.80.0-patch.1.tgz#0113a96f57d968379e98c99f25159505a38646a2" + integrity sha512-ZQR7tCbb3c3YvP72GM6jPF+OAXE+kZzzWLHQwHmp/fJN8+xhHfphoNE7ygbX4cHFX3wo5nDoYw/RQiL6LHQ2Yg== + dependencies: + "@float-capital/float-subgraph-uncrashable" "^0.0.0-alpha.4" + "@oclif/core" "2.8.6" + "@oclif/plugin-autocomplete" "^2.3.6" + "@oclif/plugin-not-found" "^2.4.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.5" + gluegun "5.1.6" + graphql "15.5.0" + immutable "4.2.1" + ipfs-http-client "55.0.0" + jayson "4.0.0" + js-yaml "3.14.1" + open "8.4.2" + prettier "3.0.3" + semver "7.4.0" + sync-request "6.1.0" + tmp-promise "3.0.3" + web3-eth-abi "1.7.0" + which "2.0.2" + yaml "1.10.2" + "@tsconfig/node10@^1.0.7": version "1.0.11" resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" @@ -596,6 +1009,11 @@ dependencies: "@types/node" "*" +"@types/estree@1.0.6": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" + integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== + "@types/form-data@0.0.33": version "0.0.33" resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-0.0.33.tgz#c9ac85b2a5fd18435b8c85d9ecb50e6d6c893ff8" @@ -774,7 +1192,7 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0, ansi-styles@^4.3.0: dependencies: color-convert "^2.0.1" -ansi-styles@^6.0.0, ansi-styles@^6.2.1: +ansi-styles@^6.0.0, ansi-styles@^6.1.0, ansi-styles@^6.2.1: version "6.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== @@ -789,6 +1207,11 @@ ansis@^3.3.1, ansis@^3.3.2: resolved "https://registry.yarnpkg.com/ansis/-/ansis-3.3.2.tgz#15adc36fea112da95c74d309706e593618accac3" integrity sha512-cFthbBlt+Oi0i9Pv/j6YdVWJh54CtjGACaMPCIrEV4Ha7HWsIjXDwseYV79TIL0B4+KfSwD5S70PeQDkPUd1rA== +any-promise@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" + integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A== + any-signal@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/any-signal/-/any-signal-2.1.2.tgz#8d48270de0605f8b218cf9abe8e9c6a0e7418102" @@ -1094,6 +1517,13 @@ buffer@^6.0.1, buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" +bundle-require@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/bundle-require/-/bundle-require-5.0.0.tgz#071521bdea6534495cf23e92a83f889f91729e93" + integrity sha512-GuziW3fSSmopcx4KRymQEJVbZUfqlCqcq7dvs6TYwKRZiegK/2buMxQTPs6MGlNv50wms1699qYO54R8XfRX4w== + dependencies: + load-tsconfig "^0.2.3" + busboy@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" @@ -1101,6 +1531,11 @@ busboy@^1.6.0: dependencies: streamsearch "^1.1.0" +cac@^6.7.14: + version "6.7.14" + resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959" + integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ== + call-bind@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" @@ -1180,6 +1615,13 @@ chokidar@3.5.3: optionalDependencies: fsevents "~2.3.2" +chokidar@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-4.0.1.tgz#4a6dff66798fb0f72a94f616abbd7e1a19f31d41" + integrity sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA== + dependencies: + readdirp "^4.0.1" + chownr@^1.0.1: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" @@ -1300,6 +1742,11 @@ commander@^2.20.3: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== +commander@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" + integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== + commander@~12.1.0: version "12.1.0" resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3" @@ -1328,6 +1775,11 @@ config-chain@^1.1.11: ini "^1.3.4" proto-list "~1.2.1" +consola@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/consola/-/consola-3.2.3.tgz#0741857aa88cfa0d6fd53f1cff0375136e98502f" + integrity sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ== + content-type@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" @@ -1386,7 +1838,7 @@ cross-spawn@7.0.3: shebang-command "^2.0.0" which "^2.0.1" -cross-spawn@^7.0.3: +cross-spawn@^7.0.0, cross-spawn@^7.0.3: version "7.0.6" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== @@ -1501,6 +1953,16 @@ dockerode@2.5.8: docker-modem "^1.0.8" tar-fs "~1.16.3" +dotenv@^16.4.5: + version "16.4.5" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" + integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== + +eastasianwidth@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" + integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== + ejs@3.1.8: version "3.1.8" resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.8.tgz#758d32910c78047585c7ef1f92f9ee041c1c190b" @@ -1558,6 +2020,11 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== +emoji-regex@^9.2.2: + version "9.2.2" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" + integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== + encoding@^0.1.13: version "0.1.13" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" @@ -1615,6 +2082,66 @@ es6-promisify@^5.0.0: dependencies: es6-promise "^4.0.3" +esbuild@^0.24.0: + version "0.24.0" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.24.0.tgz#f2d470596885fcb2e91c21eb3da3b3c89c0b55e7" + integrity sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ== + optionalDependencies: + "@esbuild/aix-ppc64" "0.24.0" + "@esbuild/android-arm" "0.24.0" + "@esbuild/android-arm64" "0.24.0" + "@esbuild/android-x64" "0.24.0" + "@esbuild/darwin-arm64" "0.24.0" + "@esbuild/darwin-x64" "0.24.0" + "@esbuild/freebsd-arm64" "0.24.0" + "@esbuild/freebsd-x64" "0.24.0" + "@esbuild/linux-arm" "0.24.0" + "@esbuild/linux-arm64" "0.24.0" + "@esbuild/linux-ia32" "0.24.0" + "@esbuild/linux-loong64" "0.24.0" + "@esbuild/linux-mips64el" "0.24.0" + "@esbuild/linux-ppc64" "0.24.0" + "@esbuild/linux-riscv64" "0.24.0" + "@esbuild/linux-s390x" "0.24.0" + "@esbuild/linux-x64" "0.24.0" + "@esbuild/netbsd-x64" "0.24.0" + "@esbuild/openbsd-arm64" "0.24.0" + "@esbuild/openbsd-x64" "0.24.0" + "@esbuild/sunos-x64" "0.24.0" + "@esbuild/win32-arm64" "0.24.0" + "@esbuild/win32-ia32" "0.24.0" + "@esbuild/win32-x64" "0.24.0" + +esbuild@~0.23.0: + version "0.23.1" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.23.1.tgz#40fdc3f9265ec0beae6f59824ade1bd3d3d2dab8" + integrity sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg== + optionalDependencies: + "@esbuild/aix-ppc64" "0.23.1" + "@esbuild/android-arm" "0.23.1" + "@esbuild/android-arm64" "0.23.1" + "@esbuild/android-x64" "0.23.1" + "@esbuild/darwin-arm64" "0.23.1" + "@esbuild/darwin-x64" "0.23.1" + "@esbuild/freebsd-arm64" "0.23.1" + "@esbuild/freebsd-x64" "0.23.1" + "@esbuild/linux-arm" "0.23.1" + "@esbuild/linux-arm64" "0.23.1" + "@esbuild/linux-ia32" "0.23.1" + "@esbuild/linux-loong64" "0.23.1" + "@esbuild/linux-mips64el" "0.23.1" + "@esbuild/linux-ppc64" "0.23.1" + "@esbuild/linux-riscv64" "0.23.1" + "@esbuild/linux-s390x" "0.23.1" + "@esbuild/linux-x64" "0.23.1" + "@esbuild/netbsd-x64" "0.23.1" + "@esbuild/openbsd-arm64" "0.23.1" + "@esbuild/openbsd-x64" "0.23.1" + "@esbuild/sunos-x64" "0.23.1" + "@esbuild/win32-arm64" "0.23.1" + "@esbuild/win32-ia32" "0.23.1" + "@esbuild/win32-x64" "0.23.1" + escape-string-regexp@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" @@ -1784,6 +2311,11 @@ fastq@^1.6.0: dependencies: reusify "^1.0.4" +fdir@^6.4.2: + version "6.4.2" + resolved "https://registry.yarnpkg.com/fdir/-/fdir-6.4.2.tgz#ddaa7ce1831b161bc3657bb99cb36e1622702689" + integrity sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ== + filelist@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.4.tgz#f78978a1e944775ff9e62e744424f215e58352b5" @@ -1803,6 +2335,14 @@ follow-redirects@^1.14.0: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1" integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ== +foreground-child@^3.1.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.3.0.tgz#0ac8644c06e431439f8561db8ecf29a7b5519c77" + integrity sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg== + dependencies: + cross-spawn "^7.0.0" + signal-exit "^4.0.1" + form-data@^2.2.0: version "2.5.2" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.2.tgz#dc653743d1de2fcc340ceea38079daf6e9069fd2" @@ -1848,7 +2388,7 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@~2.3.2: +fsevents@~2.3.2, fsevents@~2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== @@ -1899,6 +2439,13 @@ get-stream@^8.0.1: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-8.0.1.tgz#def9dfd71742cd7754a7761ed43749a27d02eca2" integrity sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== +get-tsconfig@^4.7.5: + version "4.8.1" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.8.1.tgz#8995eb391ae6e1638d251118c7b56de7eb425471" + integrity sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg== + dependencies: + resolve-pkg-maps "^1.0.0" + glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -1916,6 +2463,18 @@ glob@9.3.5: minipass "^4.2.4" path-scurry "^1.6.1" +glob@^10.3.10: + version "10.4.5" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" + integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== + dependencies: + foreground-child "^3.1.0" + jackspeak "^3.1.2" + minimatch "^9.0.4" + minipass "^7.1.2" + package-json-from-dist "^1.0.0" + path-scurry "^1.11.1" + glob@^7.1.3: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" @@ -2449,6 +3008,15 @@ it-to-stream@^1.0.0: p-fifo "^1.0.0" readable-stream "^3.6.0" +jackspeak@^3.1.2: + version "3.4.3" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a" + integrity sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw== + dependencies: + "@isaacs/cliui" "^8.0.2" + optionalDependencies: + "@pkgjs/parseargs" "^0.11.0" + jake@^10.8.5: version "10.9.2" resolved "https://registry.yarnpkg.com/jake/-/jake-10.9.2.tgz#6ae487e6a69afec3a5e167628996b59f35ae2b7f" @@ -2477,6 +3045,11 @@ jayson@4.0.0: uuid "^8.3.2" ws "^7.4.5" +joycon@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/joycon/-/joycon-3.1.1.tgz#bce8596d6ae808f8b68168f5fc69280996894f03" + integrity sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw== + js-sha3@0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" @@ -2540,7 +3113,7 @@ keccak@^3.0.0: node-gyp-build "^4.2.0" readable-stream "^3.6.0" -lilconfig@^3.1.2, lilconfig@~3.1.1: +lilconfig@^3.1.1, lilconfig@^3.1.2, lilconfig@~3.1.1: version "3.1.2" resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.2.tgz#e4a7c3cb549e3a606c8dcc32e5ae1005e62c05cb" integrity sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow== @@ -2578,6 +3151,11 @@ listr2@~8.2.1: rfdc "^1.3.1" wrap-ansi "^9.0.0" +load-tsconfig@^0.2.3: + version "0.2.5" + resolved "https://registry.yarnpkg.com/load-tsconfig/-/load-tsconfig-0.2.5.tgz#453b8cd8961bfb912dea77eb6c168fe8cca3d3a1" + integrity sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg== + lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" @@ -2623,6 +3201,11 @@ lodash.snakecase@^4.1.1: resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d" integrity sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw== +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + integrity sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA== + lodash.startcase@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.startcase/-/lodash.startcase-4.4.0.tgz#9436e34ed26093ed7ffae1936144350915d9add8" @@ -2805,7 +3388,7 @@ minimatch@^8.0.2: dependencies: brace-expansion "^2.0.1" -minimatch@^9.0.5: +minimatch@^9.0.4, minimatch@^9.0.5: version "9.0.5" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== @@ -2834,7 +3417,7 @@ minipass@^5.0.0: resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== -"minipass@^5.0.0 || ^6.0.2 || ^7.0.0": +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== @@ -2898,6 +3481,15 @@ mustache@^4.2.0: resolved "https://registry.yarnpkg.com/mustache/-/mustache-4.2.0.tgz#e5892324d60a12ec9c2a73359edca52972bf6f64" integrity sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ== +mz@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" + integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== + dependencies: + any-promise "^1.0.0" + object-assign "^4.0.1" + thenify-all "^1.0.0" + nanoid@^3.0.2, nanoid@^3.1.20, nanoid@^3.1.23: version "3.3.8" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf" @@ -2967,7 +3559,7 @@ number-to-bn@1.7.0: bn.js "4.11.6" strip-hex-prefix "1.0.0" -object-assign@^4.1.0: +object-assign@^4.0.1, object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== @@ -3038,6 +3630,11 @@ p-fifo@^1.0.0: fast-fifo "^1.0.0" p-defer "^3.0.0" +package-json-from-dist@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz#4f1471a010827a86f94cfd9b0727e36d267de505" + integrity sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw== + parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -3096,7 +3693,7 @@ path-key@^4.0.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== -path-scurry@^1.6.1: +path-scurry@^1.11.1, path-scurry@^1.6.1: version "1.11.1" resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== @@ -3120,7 +3717,7 @@ pbkdf2@^3.0.17: safe-buffer "^5.0.1" sha.js "^2.4.8" -picocolors@^1.0.0: +picocolors@^1.0.0, picocolors@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== @@ -3130,16 +3727,33 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +picomatch@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.2.tgz#77c742931e8f3b8820946c76cd0c1f13730d1dab" + integrity sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg== + pidtree@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.6.0.tgz#90ad7b6d42d5841e69e0a2419ef38f8883aa057c" integrity sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g== +pirates@^4.0.1: + version "4.0.6" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" + integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== + pluralize@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== +postcss-load-config@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-6.0.1.tgz#6fd7dcd8ae89badcf1b2d644489cbabf83aa8096" + integrity sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g== + dependencies: + lilconfig "^3.1.1" + prettier@3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.3.tgz#432a51f7ba422d1469096c0fdc28e235db8f9643" @@ -3199,6 +3813,11 @@ punycode@^1.3.2: resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ== +punycode@^2.1.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + pvtsutils@^1.3.2, pvtsutils@^1.3.5: version "1.3.6" resolved "https://registry.yarnpkg.com/pvtsutils/-/pvtsutils-1.3.6.tgz#ec46e34db7422b9e4fdc5490578c1883657d6001" @@ -3269,6 +3888,11 @@ readable-stream@~1.0.26-4: isarray "0.0.1" string_decoder "~0.10.x" +readdirp@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-4.0.2.tgz#388fccb8b75665da3abffe2d8f8ed59fe74c230a" + integrity sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA== + readdirp@~3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" @@ -3302,6 +3926,16 @@ resolve-from@^4.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve-pkg-maps@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" + integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== + restore-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" @@ -3362,6 +3996,33 @@ rlp@^2.2.4: dependencies: bn.js "^5.2.0" +rollup@^4.24.0: + version "4.27.4" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.27.4.tgz#b23e4ef4fe4d0d87f5237dacf63f95a499503897" + integrity sha512-RLKxqHEMjh/RGLsDxAEsaLO3mWgyoU6x9w6n1ikAzet4B3gI2/3yP6PWY2p9QzRTh6MfEIXB3MwsOY0Iv3vNrw== + dependencies: + "@types/estree" "1.0.6" + optionalDependencies: + "@rollup/rollup-android-arm-eabi" "4.27.4" + "@rollup/rollup-android-arm64" "4.27.4" + "@rollup/rollup-darwin-arm64" "4.27.4" + "@rollup/rollup-darwin-x64" "4.27.4" + "@rollup/rollup-freebsd-arm64" "4.27.4" + "@rollup/rollup-freebsd-x64" "4.27.4" + "@rollup/rollup-linux-arm-gnueabihf" "4.27.4" + "@rollup/rollup-linux-arm-musleabihf" "4.27.4" + "@rollup/rollup-linux-arm64-gnu" "4.27.4" + "@rollup/rollup-linux-arm64-musl" "4.27.4" + "@rollup/rollup-linux-powerpc64le-gnu" "4.27.4" + "@rollup/rollup-linux-riscv64-gnu" "4.27.4" + "@rollup/rollup-linux-s390x-gnu" "4.27.4" + "@rollup/rollup-linux-x64-gnu" "4.27.4" + "@rollup/rollup-linux-x64-musl" "4.27.4" + "@rollup/rollup-win32-arm64-msvc" "4.27.4" + "@rollup/rollup-win32-ia32-msvc" "4.27.4" + "@rollup/rollup-win32-x64-msvc" "4.27.4" + fsevents "~2.3.2" + run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -3469,7 +4130,7 @@ signal-exit@^3.0.2, signal-exit@^3.0.3: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== -signal-exit@^4.1.0: +signal-exit@^4.0.1, signal-exit@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== @@ -3512,6 +4173,13 @@ source-map-support@^0.5.20, source-map-support@^0.5.21: buffer-from "^1.0.0" source-map "^0.6.0" +source-map@0.8.0-beta.0: + version "0.8.0-beta.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.8.0-beta.0.tgz#d4c1bb42c3f7ee925f005927ba10709e0d1d1f11" + integrity sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA== + dependencies: + whatwg-url "^7.0.0" + source-map@^0.6.0: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" @@ -3544,6 +4212,15 @@ string-argv@~0.3.2: resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6" integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -3553,6 +4230,15 @@ string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2 is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" +string-width@^5.0.1, string-width@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" + integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== + dependencies: + eastasianwidth "^0.2.0" + emoji-regex "^9.2.2" + strip-ansi "^7.0.1" + string-width@^7.0.0: version "7.1.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-7.1.0.tgz#d994252935224729ea3719c49f7206dc9c46550a" @@ -3581,6 +4267,13 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" @@ -3595,7 +4288,7 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" -strip-ansi@^7.1.0: +strip-ansi@^7.0.1, strip-ansi@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== @@ -3619,6 +4312,19 @@ strip-hex-prefix@1.0.0: dependencies: is-hex-prefixed "1.0.0" +sucrase@^3.35.0: + version "3.35.0" + resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.35.0.tgz#57f17a3d7e19b36d8995f06679d121be914ae263" + integrity sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA== + dependencies: + "@jridgewell/gen-mapping" "^0.3.2" + commander "^4.0.0" + glob "^10.3.10" + lines-and-columns "^1.1.6" + mz "^2.7.0" + pirates "^4.0.1" + ts-interface-checker "^0.1.9" + supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -3716,6 +4422,20 @@ then-request@^6.0.0: promise "^8.0.0" qs "^6.4.0" +thenify-all@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" + integrity sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA== + dependencies: + thenify ">= 3.1.0 < 4" + +"thenify@>= 3.1.0 < 4": + version "3.3.1" + resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f" + integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== + dependencies: + any-promise "^1.0.0" + "through@>=2.2.7 <3": version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" @@ -3730,6 +4450,19 @@ timeout-abort-controller@^2.0.0: native-abort-controller "^1.0.4" retimer "^3.0.0" +tinyexec@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/tinyexec/-/tinyexec-0.3.1.tgz#0ab0daf93b43e2c211212396bdb836b468c97c98" + integrity sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ== + +tinyglobby@^0.2.9: + version "0.2.10" + resolved "https://registry.yarnpkg.com/tinyglobby/-/tinyglobby-0.2.10.tgz#e712cf2dc9b95a1f5c5bbd159720e15833977a0f" + integrity sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew== + dependencies: + fdir "^6.4.2" + picomatch "^4.0.2" + tmp-promise@3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/tmp-promise/-/tmp-promise-3.0.3.tgz#60a1a1cc98c988674fcbfd23b6e3367bdeac4ce7" @@ -3754,11 +4487,28 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +tr46@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" + integrity sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA== + dependencies: + punycode "^2.1.0" + tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +tree-kill@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" + integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== + +ts-interface-checker@^0.1.9: + version "0.1.13" + resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" + integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== + ts-node@^10.9.1: version "10.9.2" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" @@ -3783,6 +4533,38 @@ tslib@^2.0.0, tslib@^2.3.1, tslib@^2.4.0, tslib@^2.5.0, tslib@^2.6.2, tslib@^2.7 resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== +"tsup@npm:@sentio/tsup@^8.3.5-rc.1": + version "8.3.5-rc.1" + resolved "https://registry.yarnpkg.com/@sentio/tsup/-/tsup-8.3.5-rc.1.tgz#beff06b3ea8217336bb0797a5d1a75cb034c46ad" + integrity sha512-zQIr6STxqev2ujjpJ0iSNEw9YovTlrsDVZlGCRUL4n4ACucleoF2V7vjQwvnc8qLN1gDTvdBikr06ICwLuKjeA== + dependencies: + bundle-require "^5.0.0" + cac "^6.7.14" + chokidar "^4.0.1" + consola "^3.2.3" + debug "^4.3.7" + esbuild "^0.24.0" + joycon "^3.1.1" + picocolors "^1.1.1" + postcss-load-config "^6.0.1" + resolve-from "^5.0.0" + rollup "^4.24.0" + source-map "0.8.0-beta.0" + sucrase "^3.35.0" + tinyexec "^0.3.1" + tinyglobby "^0.2.9" + tree-kill "^1.2.2" + +tsx@^4.15.2: + version "4.19.2" + resolved "https://registry.yarnpkg.com/tsx/-/tsx-4.19.2.tgz#2d7814783440e0ae42354d0417d9c2989a2ae92c" + integrity sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g== + dependencies: + esbuild "~0.23.0" + get-tsconfig "^4.7.5" + optionalDependencies: + fsevents "~2.3.3" + tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -3906,6 +4688,11 @@ webidl-conversions@^3.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== +webidl-conversions@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== + whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" @@ -3914,6 +4701,15 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" +whatwg-url@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06" + integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg== + dependencies: + lodash.sortby "^4.7.0" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" + which@2.0.2, which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" @@ -3933,6 +4729,15 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" @@ -3942,6 +4747,15 @@ wrap-ansi@^7.0.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" + integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== + dependencies: + ansi-styles "^6.1.0" + string-width "^5.0.1" + strip-ansi "^7.0.1" + wrap-ansi@^9.0.0: version "9.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-9.0.0.tgz#1a3dc8b70d85eeb8398ddfb1e4a02cd186e58b3e"