Skip to content

Commit

Permalink
chore: new aave data provider
Browse files Browse the repository at this point in the history
## Ticket URL

Please provide a link to the ticket:

## Description of Changes

Please list the changes introduced by this PR:

- [ ]
- [ ]
- [ ]

## How to Test

Please provide instructions on how to test the changes in this PR:

## PR Definition of Done

Please ensure the following requirements have been met before marking the PR as ready for review:

- [ ] All checks are passing
- [ ] PR is linked to a corresponding ticket
- [ ] PR title is clear and concise
- [ ] Code has been self-reviewed and any fixes or improvements noted (See Code review standards in Notion)
- [ ] Documentation has been updated if necessary
  • Loading branch information
halaprix committed Oct 8, 2024
1 parent 96b2905 commit cdeffc8
Show file tree
Hide file tree
Showing 29 changed files with 462 additions and 3,786 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1,219 @@
[{"inputs":[{"internalType":"contract IPoolAddressesProvider","name":"addressesProvider","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ADDRESSES_PROVIDER","outputs":[{"internalType":"contract IPoolAddressesProvider","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getATokenTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllATokens","outputs":[{"components":[{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"tokenAddress","type":"address"}],"internalType":"struct IPoolDataProvider.TokenData[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllReservesTokens","outputs":[{"components":[{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"tokenAddress","type":"address"}],"internalType":"struct IPoolDataProvider.TokenData[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getDebtCeiling","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDebtCeilingDecimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getFlashLoanEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getInterestRateStrategyAddress","outputs":[{"internalType":"address","name":"irStrategyAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getLiquidationProtocolFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getPaused","outputs":[{"internalType":"bool","name":"isPaused","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getReserveCaps","outputs":[{"internalType":"uint256","name":"borrowCap","type":"uint256"},{"internalType":"uint256","name":"supplyCap","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getReserveConfigurationData","outputs":[{"internalType":"uint256","name":"decimals","type":"uint256"},{"internalType":"uint256","name":"ltv","type":"uint256"},{"internalType":"uint256","name":"liquidationThreshold","type":"uint256"},{"internalType":"uint256","name":"liquidationBonus","type":"uint256"},{"internalType":"uint256","name":"reserveFactor","type":"uint256"},{"internalType":"bool","name":"usageAsCollateralEnabled","type":"bool"},{"internalType":"bool","name":"borrowingEnabled","type":"bool"},{"internalType":"bool","name":"stableBorrowRateEnabled","type":"bool"},{"internalType":"bool","name":"isActive","type":"bool"},{"internalType":"bool","name":"isFrozen","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getReserveData","outputs":[{"internalType":"uint256","name":"unbacked","type":"uint256"},{"internalType":"uint256","name":"accruedToTreasuryScaled","type":"uint256"},{"internalType":"uint256","name":"totalAToken","type":"uint256"},{"internalType":"uint256","name":"totalStableDebt","type":"uint256"},{"internalType":"uint256","name":"totalVariableDebt","type":"uint256"},{"internalType":"uint256","name":"liquidityRate","type":"uint256"},{"internalType":"uint256","name":"variableBorrowRate","type":"uint256"},{"internalType":"uint256","name":"stableBorrowRate","type":"uint256"},{"internalType":"uint256","name":"averageStableBorrowRate","type":"uint256"},{"internalType":"uint256","name":"liquidityIndex","type":"uint256"},{"internalType":"uint256","name":"variableBorrowIndex","type":"uint256"},{"internalType":"uint40","name":"lastUpdateTimestamp","type":"uint40"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getReserveEModeCategory","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getReserveTokensAddresses","outputs":[{"internalType":"address","name":"aTokenAddress","type":"address"},{"internalType":"address","name":"stableDebtTokenAddress","type":"address"},{"internalType":"address","name":"variableDebtTokenAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getSiloedBorrowing","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getTotalDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getUnbackedMintCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"user","type":"address"}],"name":"getUserReserveData","outputs":[{"internalType":"uint256","name":"currentATokenBalance","type":"uint256"},{"internalType":"uint256","name":"currentStableDebt","type":"uint256"},{"internalType":"uint256","name":"currentVariableDebt","type":"uint256"},{"internalType":"uint256","name":"principalStableDebt","type":"uint256"},{"internalType":"uint256","name":"scaledVariableDebt","type":"uint256"},{"internalType":"uint256","name":"stableBorrowRate","type":"uint256"},{"internalType":"uint256","name":"liquidityRate","type":"uint256"},{"internalType":"uint40","name":"stableRateLastUpdated","type":"uint40"},{"internalType":"bool","name":"usageAsCollateralEnabled","type":"bool"}],"stateMutability":"view","type":"function"}]
[
{
"inputs": [
{
"internalType": "contract IPoolAddressesProvider",
"name": "addressesProvider",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "ADDRESSES_PROVIDER",
"outputs": [
{ "internalType": "contract IPoolAddressesProvider", "name": "", "type": "address" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
"name": "getATokenTotalSupply",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getAllATokens",
"outputs": [
{
"components": [
{ "internalType": "string", "name": "symbol", "type": "string" },
{ "internalType": "address", "name": "tokenAddress", "type": "address" }
],
"internalType": "struct IPoolDataProvider.TokenData[]",
"name": "",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getAllReservesTokens",
"outputs": [
{
"components": [
{ "internalType": "string", "name": "symbol", "type": "string" },
{ "internalType": "address", "name": "tokenAddress", "type": "address" }
],
"internalType": "struct IPoolDataProvider.TokenData[]",
"name": "",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
"name": "getDebtCeiling",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getDebtCeilingDecimals",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
"name": "getFlashLoanEnabled",
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
"name": "getInterestRateStrategyAddress",
"outputs": [{ "internalType": "address", "name": "irStrategyAddress", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
"name": "getIsVirtualAccActive",
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
"name": "getLiquidationProtocolFee",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
"name": "getPaused",
"outputs": [{ "internalType": "bool", "name": "isPaused", "type": "bool" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
"name": "getReserveCaps",
"outputs": [
{ "internalType": "uint256", "name": "borrowCap", "type": "uint256" },
{ "internalType": "uint256", "name": "supplyCap", "type": "uint256" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
"name": "getReserveConfigurationData",
"outputs": [
{ "internalType": "uint256", "name": "decimals", "type": "uint256" },
{ "internalType": "uint256", "name": "ltv", "type": "uint256" },
{ "internalType": "uint256", "name": "liquidationThreshold", "type": "uint256" },
{ "internalType": "uint256", "name": "liquidationBonus", "type": "uint256" },
{ "internalType": "uint256", "name": "reserveFactor", "type": "uint256" },
{ "internalType": "bool", "name": "usageAsCollateralEnabled", "type": "bool" },
{ "internalType": "bool", "name": "borrowingEnabled", "type": "bool" },
{ "internalType": "bool", "name": "stableBorrowRateEnabled", "type": "bool" },
{ "internalType": "bool", "name": "isActive", "type": "bool" },
{ "internalType": "bool", "name": "isFrozen", "type": "bool" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
"name": "getReserveData",
"outputs": [
{ "internalType": "uint256", "name": "unbacked", "type": "uint256" },
{ "internalType": "uint256", "name": "accruedToTreasuryScaled", "type": "uint256" },
{ "internalType": "uint256", "name": "totalAToken", "type": "uint256" },
{ "internalType": "uint256", "name": "totalStableDebt", "type": "uint256" },
{ "internalType": "uint256", "name": "totalVariableDebt", "type": "uint256" },
{ "internalType": "uint256", "name": "liquidityRate", "type": "uint256" },
{ "internalType": "uint256", "name": "variableBorrowRate", "type": "uint256" },
{ "internalType": "uint256", "name": "stableBorrowRate", "type": "uint256" },
{ "internalType": "uint256", "name": "averageStableBorrowRate", "type": "uint256" },
{ "internalType": "uint256", "name": "liquidityIndex", "type": "uint256" },
{ "internalType": "uint256", "name": "variableBorrowIndex", "type": "uint256" },
{ "internalType": "uint40", "name": "lastUpdateTimestamp", "type": "uint40" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
"name": "getReserveTokensAddresses",
"outputs": [
{ "internalType": "address", "name": "aTokenAddress", "type": "address" },
{ "internalType": "address", "name": "stableDebtTokenAddress", "type": "address" },
{ "internalType": "address", "name": "variableDebtTokenAddress", "type": "address" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
"name": "getSiloedBorrowing",
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
"name": "getTotalDebt",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
"name": "getUnbackedMintCap",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "asset", "type": "address" },
{ "internalType": "address", "name": "user", "type": "address" }
],
"name": "getUserReserveData",
"outputs": [
{ "internalType": "uint256", "name": "currentATokenBalance", "type": "uint256" },
{ "internalType": "uint256", "name": "currentStableDebt", "type": "uint256" },
{ "internalType": "uint256", "name": "currentVariableDebt", "type": "uint256" },
{ "internalType": "uint256", "name": "principalStableDebt", "type": "uint256" },
{ "internalType": "uint256", "name": "scaledVariableDebt", "type": "uint256" },
{ "internalType": "uint256", "name": "stableBorrowRate", "type": "uint256" },
{ "internalType": "uint256", "name": "liquidityRate", "type": "uint256" },
{ "internalType": "uint40", "name": "stableRateLastUpdated", "type": "uint40" },
{ "internalType": "bool", "name": "usageAsCollateralEnabled", "type": "bool" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
"name": "getVirtualUnderlyingBalance",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
}
]
2 changes: 1 addition & 1 deletion packages/addresses/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oasisdex/addresses",
"version": "0.1.20-automation.0",
"version": "0.1.21-automation",
"typings": "lib/index.d.ts",
"types": "lib/index.d.ts",
"main": "lib/index.js",
Expand Down
3 changes: 0 additions & 3 deletions packages/deploy-configurations/addresses/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
arbitrumConfig,
baseConfig,
goerliConfig,
mainnetConfig,
optimismConfig,
sepoliaConfig,
Expand Down Expand Up @@ -72,7 +71,6 @@ export type Addresses = {
[Network.OPTIMISM]: DefaultDeployment
[Network.ARBITRUM]: DefaultDeployment
[Network.BASE]: DefaultDeployment
[Network.GOERLI]: DefaultDeployment
[Network.SEPOLIA]: DefaultDeployment
[Network.TEST]: DefaultDeployment
}
Expand Down Expand Up @@ -151,7 +149,6 @@ function extractAddressesFromConfig<T extends Contracts>(
export const ADDRESSES: Addresses = {
[Network.MAINNET]: createAddressesStructure(mainnetConfig),
[Network.OPTIMISM]: createAddressesStructure(optimismConfig),
[Network.GOERLI]: createAddressesStructure(goerliConfig),
[Network.ARBITRUM]: createAddressesStructure(arbitrumConfig),
[Network.BASE]: createAddressesStructure(baseConfig),
[Network.TEST]: createAddressesStructure(testConfig),
Expand Down
19 changes: 18 additions & 1 deletion packages/deploy-configurations/configs/arbitrum.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ export const config: SystemConfig = {
},
},
actions: {
SendTokenAuto: {
name: 'SendTokenAuto',
deploy: false,
address: '0x0000000000000000000000000000000000000000',
serviceRegistryName: SERVICE_REGISTRY_NAMES.common.SEND_TOKEN_AUTO,
history: [],
constructorArgs: [],
},
PositionCreated: {
name: 'PositionCreated',
deploy: false,
Expand Down Expand Up @@ -320,6 +328,11 @@ export const config: SystemConfig = {
},
},
common: {
OneInchAggregator5: {
name: 'OneInchAggregator5',
address: '0x1111111254EEB25477B68fb85Ed929f73A960582',
serviceRegistryName: SERVICE_REGISTRY_NAMES.common.ONE_INCH_AGGREGATOR5,
},
GnosisSafe: { name: 'GnosisSafe', address: '' },
UniswapRouterV3: {
name: 'UniswapRouterV3',
Expand Down Expand Up @@ -624,7 +637,7 @@ export const config: SystemConfig = {
},
PoolDataProvider: {
name: 'PoolDataProvider',
address: '0x69FA688f1Dc47d4B5d8029D5a35FB7a548310654',
address: '0x7F23D86Ee20D869112572136221e173428DD740B',
},
L2Encoder: {
name: 'L2Encoder',
Expand Down Expand Up @@ -897,5 +910,9 @@ export const config: SystemConfig = {
address: '0x0000000000000000000000000000000000000000',
serviceRegistryName: SERVICE_REGISTRY_NAMES.morphoblue.MORPHO_BLUE,
},
AdaptiveCurveIrm: {
name: 'AdaptiveCurveIrm',
address: '0x0000000000000000000000000000000000000000'
},
},
}
19 changes: 18 additions & 1 deletion packages/deploy-configurations/configs/base.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ export const config: SystemConfig = {
},
},
actions: {
SendTokenAuto: {
name: 'SendTokenAuto',
deploy: false,
address: '0x0000000000000000000000000000000000000000',
serviceRegistryName: SERVICE_REGISTRY_NAMES.common.SEND_TOKEN_AUTO,
history: [],
constructorArgs: [],
},
PositionCreated: {
name: 'PositionCreated',
deploy: false,
Expand Down Expand Up @@ -315,6 +323,11 @@ export const config: SystemConfig = {
},
},
common: {
OneInchAggregator5: {
name: 'OneInchAggregator5',
address: '0x1111111254EEB25477B68fb85Ed929f73A960582',
serviceRegistryName: SERVICE_REGISTRY_NAMES.common.ONE_INCH_AGGREGATOR5
},
GnosisSafe: {
name: 'GnosisSafe',
address: '0x0000000000000000000000000000000000000000',
Expand Down Expand Up @@ -703,7 +716,7 @@ export const config: SystemConfig = {
},
PoolDataProvider: {
name: 'PoolDataProvider',
address: '0x2d8A3C5677189723C4cB8873CfC9C8976FDF38Ac',
address: '0xd82a47fdebB5bf5329b09441C3DaB4b5df2153Ad',
},
L2Encoder: {
name: 'L2Encoder',
Expand Down Expand Up @@ -1309,5 +1322,9 @@ export const config: SystemConfig = {
address: '0x0000000000000000000000000000000000000000',
serviceRegistryName: SERVICE_REGISTRY_NAMES.morphoblue.MORPHO_BLUE,
},
AdaptiveCurveIrm: {
name: 'AdaptiveCurveIrm',
address: '0x0000000000000000000000000000000000000000'
},
},
}
Loading

0 comments on commit cdeffc8

Please sign in to comment.