Skip to content

Commit

Permalink
Merge pull request #706 from OasisDEX/kk/aavelike-rewards
Browse files Browse the repository at this point in the history
feat: aave / spark reward claims
  • Loading branch information
halaprix authored Oct 18, 2024
2 parents 2f10959 + 1dffb5c commit cef697c
Show file tree
Hide file tree
Showing 30 changed files with 3,659 additions and 2,124 deletions.
3,281 changes: 1,369 additions & 1,912 deletions packages/abis/external/protocols/aave/v3-l2/pool.json

Large diffs are not rendered by default.

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"
}
]
1,371 changes: 1,370 additions & 1 deletion packages/abis/external/protocols/aave/v3/pool.json

Large diffs are not rendered by default.

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.80",
"version": "0.1.87",
"typings": "lib/index.d.ts",
"types": "lib/index.d.ts",
"main": "lib/index.js",
Expand Down
13 changes: 12 additions & 1 deletion packages/deploy-configurations/configs/arbitrum.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ export const config: SystemConfig = {
history: [],
constructorArgs: [],
},
AaveRewardsProxyActions: {
name: 'AaveRewardsProxyActions',
deploy: true,
address: '0x09e13fF37ad8d94381f8dE549D77e6F04cEFfA6F',
history: [],
constructorArgs: [],
},
},
actions: {
ERC4626Deposit: {
Expand Down Expand Up @@ -678,12 +685,16 @@ export const config: SystemConfig = {
},
PoolDataProvider: {
name: 'PoolDataProvider',
address: '0x69FA688f1Dc47d4B5d8029D5a35FB7a548310654',
address: '0x7F23D86Ee20D869112572136221e173428DD740B',
},
L2Encoder: {
name: 'L2Encoder',
address: '0x9abADECD08572e0eA5aF4d47A9C7984a5AA503dC',
},
RewardsController: {
name: 'RewardsController',
address: '0x929EC64c34a17401F460460D4B9390518E5B473e',
},
},
},
spark: {},
Expand Down
17 changes: 16 additions & 1 deletion packages/deploy-configurations/configs/base.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ export const config: SystemConfig = {
history: [],
constructorArgs: [],
},
AaveRewardsProxyActions: {
name: 'AaveRewardsProxyActions',
deploy: true,
address: '0x2b1c1925987009Fd39ced009a1b11Db21BE3c2AC',
history: [],
constructorArgs: [],
},
},
actions: {
ERC4626Deposit: {
Expand Down Expand Up @@ -339,6 +346,10 @@ export const config: SystemConfig = {
name: 'CUSDCV3',
address: '0xb125e6687d4313864e53df431d5425969c15eb2f',
},
CBBTC: {
name: 'CBBTC',
address: '0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf',
},
SNX: {
name: 'SNX',
address: '0x22e6966B799c4D5B13BE962E1D117b56327FDa66',
Expand Down Expand Up @@ -834,12 +845,16 @@ export const config: SystemConfig = {
},
PoolDataProvider: {
name: 'PoolDataProvider',
address: '0x2d8A3C5677189723C4cB8873CfC9C8976FDF38Ac',
address: '0xd82a47fdebB5bf5329b09441C3DaB4b5df2153Ad',
},
L2Encoder: {
name: 'L2Encoder',
address: '0x39e97c588B2907Fb67F44fea256Ae3BA064207C5',
},
RewardsController: {
name: 'RewardsController',
address: '0xf9cc4F0D883F1a1eb2c253bdb46c254Ca51E1F44',
},
},
},
spark: {},
Expand Down
11 changes: 11 additions & 0 deletions packages/deploy-configurations/configs/goerli.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ export const config: SystemConfig = {
history: [],
constructorArgs: [],
},
AaveRewardsProxyActions: {
name: 'AaveRewardsProxyActions',
deploy: true,
address: '',
history: [],
constructorArgs: [],
},
},
actions: {
ERC4626Deposit: {
Expand Down Expand Up @@ -590,6 +597,10 @@ export const config: SystemConfig = {
name: 'L2Encoder',
address: ADDRESS_ZERO,
},
RewardsController: {
name: 'RewardsController',
address: ADDRESS_ZERO,
},
},
},
maker: {
Expand Down
13 changes: 12 additions & 1 deletion packages/deploy-configurations/configs/hardhat.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,13 @@ export const config: SystemConfig = {
history: [],
constructorArgs: [],
},
AaveRewardsProxyActions: {
name: 'AaveRewardsProxyActions',
deploy: true,
address: '',
history: [],
constructorArgs: [],
},
},
actions: {
ERC4626Deposit: {
Expand Down Expand Up @@ -778,12 +785,16 @@ export const config: SystemConfig = {
},
PoolDataProvider: {
name: 'PoolDataProvider',
address: '0x7B4EB56E7CD4b454BA8ff71E4518426369a138a3',
address: '0x41393e5e337606dc3821075Af65AeE84D7688CBD',
},
L2Encoder: {
name: 'L2Encoder',
address: '0x0000000000000000000000000000000000000000',
},
RewardsController: {
name: 'RewardsController',
address: '0x8164Cc65827dcFe994AB23944CBC90e0aa80bFcb',
},
},
},
spark: {
Expand Down
13 changes: 12 additions & 1 deletion packages/deploy-configurations/configs/local.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ export const config: SystemConfig = {
history: [],
constructorArgs: [],
},
AaveRewardsProxyActions: {
name: 'AaveRewardsProxyActions',
deploy: true,
address: '',
history: [],
constructorArgs: [],
},
},
actions: {
ERC4626Deposit: {
Expand Down Expand Up @@ -746,12 +753,16 @@ export const config: SystemConfig = {
},
PoolDataProvider: {
name: 'PoolDataProvider',
address: '0x7B4EB56E7CD4b454BA8ff71E4518426369a138a3',
address: '0x41393e5e337606dc3821075Af65AeE84D7688CBD',
},
L2Encoder: {
name: 'L2Encoder',
address: '0x0000000000000000000000000000000000000000',
},
RewardsController: {
name: 'RewardsController',
address: '0x8164Cc65827dcFe994AB23944CBC90e0aa80bFcb',
},
},
},
spark: {},
Expand Down
Loading

0 comments on commit cef697c

Please sign in to comment.