From 768cb305c19eb2f7bb4dedda52a2cf5b411edf9a Mon Sep 17 00:00:00 2001 From: Conor Flynn Date: Thu, 13 Apr 2023 20:37:32 -0400 Subject: [PATCH] fix all graph properties files --- .../requests/ExternalRequestFramework.java | 5 +- .../requests/graph-reserves.properties | 89 ++++++++++++++----- .../resources/requests/graph-swaps.properties | 81 +++-------------- .../requests/graph-user-reserves.properties | 10 +-- DeFi-Data-Engine/Rest Application/.gitignore | 1 + DeFi-Data-Engine/Rest Application/.project | 23 +++++ 6 files changed, 114 insertions(+), 95 deletions(-) create mode 100644 DeFi-Data-Engine/Rest Application/.gitignore create mode 100644 DeFi-Data-Engine/Rest Application/.project diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/requests/ExternalRequestFramework.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/requests/ExternalRequestFramework.java index 56320192..faca19a8 100644 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/requests/ExternalRequestFramework.java +++ b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/requests/ExternalRequestFramework.java @@ -80,7 +80,10 @@ public ExternalRequestFramework(ExternalStreamManager manager, String name, Stri this.date_location = date_location; this.date_start_var = date_start_var; this.date_end_var = date_end_var; - this.date_format = DateTimeFormatter.ofPattern(date_format); + if(is_dated) + this.date_format = DateTimeFormatter.ofPattern(date_format); + else + this.date_format = null; } public final boolean hasTag(String tag) { diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-reserves.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-reserves.properties index 15dcd2e9..4f0129db 100644 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-reserves.properties +++ b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-reserves.properties @@ -1,37 +1,82 @@ -request.name= graph-swaps +request.name= graph-reserves url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 -url.properties= method,swaps,\ +url.properties= method,reserves,\ values,\ id:\ - user:\ - reserve:\ - pool:\ - userReserve:\ - timestamp:\ - borrowRateModeTo:\ - borrowRateModeFrom:\ - stableBorrowRate:\ - variableBorrowRate + underlyingAsset:\ + pool{id}:\ + symbol:\ + name:\ + decimals:\ + usageAsCollateralEnabled:\ + borrowingEnabled:\ + stableBorrowRateEnabled:\ + isActive:\ + isFrozen:\ + price:\ + reserveInterestRateStrategy:\ + optimalUtilisationRate:\ + variableRateSlope1:\ + variableRateSlope2:\ + stableRateSlope1:\ + stableRateSlope2:\ + baseVariableBorrowRate:\ + baseLTVasCollateral:\ + reserveLiquidationThreshold:\ + reserveLiquidationBonus:\ + utilizationRate:\ + totalLiquidity:\ + totalATokenSupply:\ + totalLiquidityAsCollateral:\ + totalPrincipalStableDebt:\ + totalScaledVariableDebt:\ + totalCurrentVariableDebt:\ + totalDeposits:\ + liquidityRate:\ + averageStableRate:\ + variableBorrowRate:\ + stableBorrowRate:\ + liquidityIndex:\ + variableBorrowIndex:\ + aToken{id}:\ + vToken{id}:\ + sToken{id}:\ + reserveFactor:\ + lastUpdateTimestamp:\ + stableDebtLastUpdateTimestamp:\ + aEmissionPerSecond:\ + vEmissionPerSecond:\ + sEmissionPerSecond:\ + aTokenIncentivesIndex:\ + vTokenIncentivesIndex:\ + sTokenIncentivesIndex:\ + aIncentivesLastUpdateTimestamp:\ + vIncentivesLastUpdateTimestamp:\ + sIncentivesLastUpdateTimestamp:\ + lifetimeLiquidity:\ + lifetimePrincipalStableDebt:\ + lifetimeScaledVariableDebt:\ + lifetimeCurrentVariableDebt:\ + lifetimeRepayments:\ + lifetimeWithdrawals:\ + lifetimeBorrows:\ + lifetimeLiquidated:\ + lifetimeFlashLoans:\ + lifetimeFlashLoanPremium:\ + lifetimeDepositorsInterestEarned:\ + lifetimeReserveFactorAccrued url.headers= Content-Type,application/json data.path= data,\ - swaps + reserves recursion.type= graphql recursion.tags= -l,1000 -recursion.location= timestamp +recursion.location= id -date.valid= true - -date.location= properties - -date.start= startDate - -date.end= endDate - -date.format= yyyy-MM-dd \ No newline at end of file +date.valid= false \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-swaps.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-swaps.properties index 6711c348..2c62bbe9 100644 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-swaps.properties +++ b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-swaps.properties @@ -1,85 +1,32 @@ -request.name= graph-reserves +request.name= graph-swaps url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 -url.properties= method,reserves,\ +url.properties= method,swaps,\ values,\ id:\ - underlyingAsset:\ - pool:\ - symbol:\ - name:\ - decimals:\ - usageAsCollateralEnabled:\ - borrowingEnabled:\ - stableBorrowRateEnabled:\ - isActive:\ - isFrozen:\ - price:\ - reserveInterestRateStrategy:\ - optimalUtilisationRate:\ - variableRateSlope1:\ - variableRateSlope2:\ - stableRateSlope1:\ - stableRateSlope2:\ - baseVariableBorrowRate:\ - baseLTVasCollateral:\ - reserveLiquidationThreshold:\ - reserveLiquidationBonus:\ - utilizationRate:\ - totalLiquidity:\ - totalATokenSupply:\ - totalLiquidityAsCollateral:\ - totalPrincipalStableDebt:\ - totalScaledVariableDebt:\ - totalCurrentVariableDebt:\ - totalDeposits:\ - liquidityRate:\ - averageStableRate:\ - variableBorrowRate:\ - stableBorrowRate:\ - liquidityIndex:\ - variableBorrowIndex:\ - aToken{id}:\ - vToken{id}:\ - sToken{id}:\ - reserveFactor:\ - lastUpdateTimestamp:\ - stableDebtLastUpdateTimestamp:\ - aEmissionPerSecond:\ - vEmissionPerSecond:\ - sEmissionPerSecond:\ - aTokenIncentivesIndex:\ - vTokenIncentivesIndex:\ - sTokenIncentivesIndex:\ - aIncentivesLastUpdateTimestamp:\ - vIncentivesLastUpdateTimestamp:\ - sIncentivesLastUpdateTimestamp:\ - lifetimeLiquidity:\ - lifetimePrincipalStableDebt:\ - lifetimeScaledVariableDebt:\ - lifetimeCurrentVariableDebt:\ - lifetimeRepayments:\ - lifetimeWithdrawals:\ - lifetimeBorrows:\ - lifetimeLiquidated:\ - lifetimeFlashLoans:\ - lifetimeFlashLoanPremium:\ - lifetimeDepositorsInterestEarned:\ - ifetimeReserveFactorAccrued + user{id}:\ + reserve{id}:\ + pool{id}:\ + userReserve{id}:\ + timestamp:\ + borrowRateModeTo:\ + borrowRateModeFrom:\ + stableBorrowRate:\ + variableBorrowRate url.headers= Content-Type,application/json data.path= data,\ - reserves + swaps recursion.type= graphql recursion.tags= -l,1000 -recursion.location= id +recursion.location= timestamp -date.valid= false +date.valid= true date.location= properties diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-user-reserves.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-user-reserves.properties index 208db71b..12c1107b 100644 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-user-reserves.properties +++ b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-user-reserves.properties @@ -1,4 +1,4 @@ -request.name= graph-swaps +request.name= graph-user-reserves url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 @@ -18,7 +18,7 @@ url.properties= method,userReserves,\ currentTotalDebt:\ stableBorrowRate:\ oldStableBorrowRate:\ - liquiditiyRate:\ + liquidityRate:\ stableBorrowLastUpdateTimestamp:\ variableBorrowIndex:\ aTokenincentivesUserIndex:\ @@ -32,15 +32,15 @@ url.properties= method,userReserves,\ url.headers= Content-Type,application/json data.path= data,\ - swaps + userReserves recursion.type= graphql recursion.tags= -l,1000 -recursion.location= id +recursion.location= lastUpdateTimestamp -date.valid= false +date.valid= true date.location= properties diff --git a/DeFi-Data-Engine/Rest Application/.gitignore b/DeFi-Data-Engine/Rest Application/.gitignore new file mode 100644 index 00000000..ae3c1726 --- /dev/null +++ b/DeFi-Data-Engine/Rest Application/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/DeFi-Data-Engine/Rest Application/.project b/DeFi-Data-Engine/Rest Application/.project new file mode 100644 index 00000000..10c2ba0f --- /dev/null +++ b/DeFi-Data-Engine/Rest Application/.project @@ -0,0 +1,23 @@ + + + Rest Application + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.m2e.core.maven2Nature + org.eclipse.jdt.core.javanature + +