Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/forty-mugs-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@aave/graphql": minor
---

Updated schema for v3.6 upgrade
9 changes: 6 additions & 3 deletions packages/graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ type EmodeMarketReserveInfo {

"""If the underlying token can be borrowed with this eMode on"""
canBeBorrowed: Boolean!

"""If the underlying token has LTV zero in this eMode"""
hasLtvZero: Boolean!
}

"""The emode reserve information"""
Expand All @@ -295,6 +298,9 @@ type EmodeReserveInfo {

"""If the underlying token can be borrowed with this eMode on"""
canBeBorrowed: Boolean!

"""If the underlying token has LTV zero in this eMode"""
hasLtvZero: Boolean!
}

input Erc20AmountInput {
Expand Down Expand Up @@ -1072,9 +1078,6 @@ type Reserve {
"""If the reserve can use flash loans on it"""
flashLoanEnabled: Boolean!

"""The unbacked amount in the reserve"""
unbacked: TokenAmount!

"""The interest rate strategy address"""
interestRateStrategyAddress: EvmAddress!

Expand Down
4 changes: 1 addition & 3 deletions packages/graphql/src/fragments/reserve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ export const EmodeReserveInfoFragment = graphql(
}
canBeCollateral
canBeBorrowed
hasLtvZero
}`,
[PercentValueFragment],
);
Expand Down Expand Up @@ -321,9 +322,6 @@ export const ReserveFragment = graphql(
isFrozen
isPaused
flashLoanEnabled
unbacked{
...TokenAmount
}
interestRateStrategyAddress
permitSupported
supplyInfo {
Expand Down
6 changes: 3 additions & 3 deletions packages/graphql/src/graphql-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export type introspection_types = {
'DomainData': { kind: 'OBJECT'; name: 'DomainData'; fields: { 'chainId': { name: 'chainId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ChainId'; ofType: null; }; } }; 'name': { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'verifyingContract': { name: 'verifyingContract'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; } }; 'version': { name: 'version'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; };
'ERC712Signature': { kind: 'INPUT_OBJECT'; name: 'ERC712Signature'; isOneOf: false; inputFields: [{ name: 'value'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Signature'; ofType: null; }; }; defaultValue: null }, { name: 'deadline'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }]; };
'EmodeMarketCategory': { kind: 'OBJECT'; name: 'EmodeMarketCategory'; fields: { 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'label': { name: 'label'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'liquidationPenalty': { name: 'liquidationPenalty'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PercentValue'; ofType: null; }; } }; 'liquidationThreshold': { name: 'liquidationThreshold'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PercentValue'; ofType: null; }; } }; 'maxLTV': { name: 'maxLTV'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PercentValue'; ofType: null; }; } }; 'reserves': { name: 'reserves'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'EmodeMarketReserveInfo'; ofType: null; }; }; }; } }; }; };
'EmodeMarketReserveInfo': { kind: 'OBJECT'; name: 'EmodeMarketReserveInfo'; fields: { 'canBeBorrowed': { name: 'canBeBorrowed'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'canBeCollateral': { name: 'canBeCollateral'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'underlyingToken': { name: 'underlyingToken'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Currency'; ofType: null; }; } }; }; };
'EmodeReserveInfo': { kind: 'OBJECT'; name: 'EmodeReserveInfo'; fields: { 'canBeBorrowed': { name: 'canBeBorrowed'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'canBeCollateral': { name: 'canBeCollateral'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'categoryId': { name: 'categoryId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'label': { name: 'label'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'liquidationPenalty': { name: 'liquidationPenalty'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PercentValue'; ofType: null; }; } }; 'liquidationThreshold': { name: 'liquidationThreshold'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PercentValue'; ofType: null; }; } }; 'maxLTV': { name: 'maxLTV'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PercentValue'; ofType: null; }; } }; }; };
'EmodeMarketReserveInfo': { kind: 'OBJECT'; name: 'EmodeMarketReserveInfo'; fields: { 'canBeBorrowed': { name: 'canBeBorrowed'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'canBeCollateral': { name: 'canBeCollateral'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'hasLtvZero': { name: 'hasLtvZero'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'underlyingToken': { name: 'underlyingToken'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Currency'; ofType: null; }; } }; }; };
'EmodeReserveInfo': { kind: 'OBJECT'; name: 'EmodeReserveInfo'; fields: { 'canBeBorrowed': { name: 'canBeBorrowed'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'canBeCollateral': { name: 'canBeCollateral'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'categoryId': { name: 'categoryId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'hasLtvZero': { name: 'hasLtvZero'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'label': { name: 'label'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'liquidationPenalty': { name: 'liquidationPenalty'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PercentValue'; ofType: null; }; } }; 'liquidationThreshold': { name: 'liquidationThreshold'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PercentValue'; ofType: null; }; } }; 'maxLTV': { name: 'maxLTV'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PercentValue'; ofType: null; }; } }; }; };
'Erc20AmountInput': { kind: 'INPUT_OBJECT'; name: 'Erc20AmountInput'; isOneOf: false; inputFields: [{ name: 'currency'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; }; defaultValue: null }, { name: 'value'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigDecimal'; ofType: null; }; }; defaultValue: null }, { name: 'permitSig'; type: { kind: 'INPUT_OBJECT'; name: 'ERC712Signature'; ofType: null; }; defaultValue: null }]; };
'EvmAddress': unknown;
'ExecutionPlan': { kind: 'UNION'; name: 'ExecutionPlan'; fields: {}; possibleTypes: 'ApprovalRequired' | 'InsufficientBalanceError' | 'TransactionRequest'; };
Expand Down Expand Up @@ -79,7 +79,7 @@ export type introspection_types = {
'RepayErc20Amount': { kind: 'INPUT_OBJECT'; name: 'RepayErc20Amount'; isOneOf: true; inputFields: [{ name: 'exact'; type: { kind: 'SCALAR'; name: 'BigDecimal'; ofType: null; }; defaultValue: null }, { name: 'max'; type: { kind: 'SCALAR'; name: 'AlwaysTrue'; ofType: null; }; defaultValue: null }]; };
'RepayErc20AmountInput': { kind: 'INPUT_OBJECT'; name: 'RepayErc20AmountInput'; isOneOf: false; inputFields: [{ name: 'currency'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; }; defaultValue: null }, { name: 'value'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'RepayErc20Amount'; ofType: null; }; }; defaultValue: null }, { name: 'permitSig'; type: { kind: 'INPUT_OBJECT'; name: 'ERC712Signature'; ofType: null; }; defaultValue: null }]; };
'RepayRequest': { kind: 'INPUT_OBJECT'; name: 'RepayRequest'; isOneOf: false; inputFields: [{ name: 'market'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; }; defaultValue: null }, { name: 'amount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'RepayAmountInput'; ofType: null; }; }; defaultValue: null }, { name: 'sender'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; }; defaultValue: null }, { name: 'onBehalfOf'; type: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; defaultValue: null }, { name: 'chainId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ChainId'; ofType: null; }; }; defaultValue: null }]; };
'Reserve': { kind: 'OBJECT'; name: 'Reserve'; fields: { 'aToken': { name: 'aToken'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Currency'; ofType: null; }; } }; 'acceptsNative': { name: 'acceptsNative'; type: { kind: 'OBJECT'; name: 'NativeCurrency'; ofType: null; } }; 'borrowInfo': { name: 'borrowInfo'; type: { kind: 'OBJECT'; name: 'ReserveBorrowInfo'; ofType: null; } }; 'eModeInfo': { name: 'eModeInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'EmodeReserveInfo'; ofType: null; }; }; }; } }; 'flashLoanEnabled': { name: 'flashLoanEnabled'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'incentives': { name: 'incentives'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ReserveIncentive'; ofType: null; }; }; }; } }; 'interestRateStrategyAddress': { name: 'interestRateStrategyAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; } }; 'isFrozen': { name: 'isFrozen'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'isPaused': { name: 'isPaused'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'isolationModeConfig': { name: 'isolationModeConfig'; type: { kind: 'OBJECT'; name: 'ReserveIsolationModeConfig'; ofType: null; } }; 'market': { name: 'market'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'MarketInfo'; ofType: null; }; } }; 'permitSupported': { name: 'permitSupported'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'size': { name: 'size'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TokenAmount'; ofType: null; }; } }; 'supplyInfo': { name: 'supplyInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ReserveSupplyInfo'; ofType: null; }; } }; 'unbacked': { name: 'unbacked'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TokenAmount'; ofType: null; }; } }; 'underlyingToken': { name: 'underlyingToken'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Currency'; ofType: null; }; } }; 'usdExchangeRate': { name: 'usdExchangeRate'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigDecimal'; ofType: null; }; } }; 'usdOracleAddress': { name: 'usdOracleAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; } }; 'userState': { name: 'userState'; type: { kind: 'OBJECT'; name: 'ReserveUserState'; ofType: null; } }; 'vToken': { name: 'vToken'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Currency'; ofType: null; }; } }; }; };
'Reserve': { kind: 'OBJECT'; name: 'Reserve'; fields: { 'aToken': { name: 'aToken'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Currency'; ofType: null; }; } }; 'acceptsNative': { name: 'acceptsNative'; type: { kind: 'OBJECT'; name: 'NativeCurrency'; ofType: null; } }; 'borrowInfo': { name: 'borrowInfo'; type: { kind: 'OBJECT'; name: 'ReserveBorrowInfo'; ofType: null; } }; 'eModeInfo': { name: 'eModeInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'EmodeReserveInfo'; ofType: null; }; }; }; } }; 'flashLoanEnabled': { name: 'flashLoanEnabled'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'incentives': { name: 'incentives'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ReserveIncentive'; ofType: null; }; }; }; } }; 'interestRateStrategyAddress': { name: 'interestRateStrategyAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; } }; 'isFrozen': { name: 'isFrozen'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'isPaused': { name: 'isPaused'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'isolationModeConfig': { name: 'isolationModeConfig'; type: { kind: 'OBJECT'; name: 'ReserveIsolationModeConfig'; ofType: null; } }; 'market': { name: 'market'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'MarketInfo'; ofType: null; }; } }; 'permitSupported': { name: 'permitSupported'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'size': { name: 'size'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TokenAmount'; ofType: null; }; } }; 'supplyInfo': { name: 'supplyInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ReserveSupplyInfo'; ofType: null; }; } }; 'underlyingToken': { name: 'underlyingToken'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Currency'; ofType: null; }; } }; 'usdExchangeRate': { name: 'usdExchangeRate'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigDecimal'; ofType: null; }; } }; 'usdOracleAddress': { name: 'usdOracleAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; } }; 'userState': { name: 'userState'; type: { kind: 'OBJECT'; name: 'ReserveUserState'; ofType: null; } }; 'vToken': { name: 'vToken'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Currency'; ofType: null; }; } }; }; };
'ReserveBorrowInfo': { kind: 'OBJECT'; name: 'ReserveBorrowInfo'; fields: { 'apy': { name: 'apy'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PercentValue'; ofType: null; }; } }; 'availableLiquidity': { name: 'availableLiquidity'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TokenAmount'; ofType: null; }; } }; 'baseVariableBorrowRate': { name: 'baseVariableBorrowRate'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PercentValue'; ofType: null; }; } }; 'borrowCap': { name: 'borrowCap'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TokenAmount'; ofType: null; }; } }; 'borrowCapReached': { name: 'borrowCapReached'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'borrowingState': { name: 'borrowingState'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'ReserveBorrowingState'; ofType: null; }; } }; 'optimalUsageRate': { name: 'optimalUsageRate'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PercentValue'; ofType: null; }; } }; 'reserveFactor': { name: 'reserveFactor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PercentValue'; ofType: null; }; } }; 'total': { name: 'total'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TokenAmount'; ofType: null; }; } }; 'utilizationRate': { name: 'utilizationRate'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PercentValue'; ofType: null; }; } }; 'variableRateSlope1': { name: 'variableRateSlope1'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PercentValue'; ofType: null; }; } }; 'variableRateSlope2': { name: 'variableRateSlope2'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PercentValue'; ofType: null; }; } }; }; };
'ReserveBorrowingState': { name: 'ReserveBorrowingState'; enumValues: 'ENABLED' | 'DISABLED' | 'USER_EMODE_DISABLED_BORROW'; };
'ReserveIncentive': { kind: 'UNION'; name: 'ReserveIncentive'; fields: {}; possibleTypes: 'AaveBorrowIncentive' | 'AaveSupplyIncentive' | 'MeritBorrowAndSupplyIncentiveCondition' | 'MeritBorrowIncentive' | 'MeritSupplyIncentive'; };
Expand Down
1 change: 0 additions & 1 deletion packages/spec/markets/reserve.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ describe('Given an Aave Market reserve', () => {
usdExchangeRate: expect.any(String),
vToken: expect.any(Object),
supplyInfo: expect.any(Object),
unbacked: expect.any(Object),
borrowInfo: expect.any(Object),
eModeInfo: expect.any(Array),
market: expect.any(Object),
Expand Down