From 2f0add051255b191536f8c3c50c64510829cd98c Mon Sep 17 00:00:00 2001 From: Thrilok Kumar Date: Sun, 25 Apr 2021 18:40:10 +0530 Subject: [PATCH] Added mainnet Aave stake and claim connector --- src/abi/connectors/v1/aave_claim.ts | 3 +++ src/abi/connectors/v1/aave_stake.ts | 3 +++ src/abi/connectors/v1/index.ts | 2 ++ src/abi/connectors/v2/AAVE-STAKE-A.ts | 3 +++ src/abi/connectors/v2/index.ts | 4 +++- src/addresses/mainnet/connectorsV1.ts | 4 +++- src/addresses/mainnet/connectorsV2_M1.ts | 2 ++ src/data/connectorsV2_M1_mapping.ts | 4 +++- 8 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 src/abi/connectors/v1/aave_claim.ts create mode 100644 src/abi/connectors/v1/aave_stake.ts create mode 100644 src/abi/connectors/v2/AAVE-STAKE-A.ts diff --git a/src/abi/connectors/v1/aave_claim.ts b/src/abi/connectors/v1/aave_claim.ts new file mode 100644 index 00000000..65cd49a8 --- /dev/null +++ b/src/abi/connectors/v1/aave_claim.ts @@ -0,0 +1,3 @@ +import { AbiItem } from 'web3-utils'; + +export const aave_claim: AbiItem[] = [{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"assets","type":"address[]"},{"indexed":false,"internalType":"uint256","name":"amt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"getId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"setId","type":"uint256"}],"name":"LogClaimed","type":"event"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"uint256","name":"amt","type":"uint256"},{"internalType":"uint256","name":"getId","type":"uint256"},{"internalType":"uint256","name":"setId","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"connectorID","outputs":[{"internalType":"uint256","name":"_type","type":"uint256"},{"internalType":"uint256","name":"_id","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}] \ No newline at end of file diff --git a/src/abi/connectors/v1/aave_stake.ts b/src/abi/connectors/v1/aave_stake.ts new file mode 100644 index 00000000..43b777ca --- /dev/null +++ b/src/abi/connectors/v1/aave_stake.ts @@ -0,0 +1,3 @@ +import { AbiItem } from 'web3-utils'; + +export const aave_stake: AbiItem[] =[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"getId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"setId","type":"uint256"}],"name":"LogClaim","type":"event"},{"anonymous":false,"inputs":[],"name":"LogCooldown","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"delegatee","type":"address"},{"indexed":false,"internalType":"bool","name":"delegateAave","type":"bool"},{"indexed":false,"internalType":"bool","name":"delegateStkAave","type":"bool"},{"indexed":false,"internalType":"uint8","name":"aaveDelegationType","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"stkAaveDelegationType","type":"uint8"}],"name":"LogDelegate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"getId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"setId","type":"uint256"}],"name":"LogRedeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"getId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"setId","type":"uint256"}],"name":"LogStake","type":"event"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"getId","type":"uint256"},{"internalType":"uint256","name":"setId","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"connectorID","outputs":[{"internalType":"uint256","name":"_type","type":"uint256"},{"internalType":"uint256","name":"_id","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"cooldown","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"},{"internalType":"bool","name":"delegateAave","type":"bool"},{"internalType":"bool","name":"delegateStkAave","type":"bool"},{"internalType":"uint8","name":"aaveDelegationType","type":"uint8"},{"internalType":"uint8","name":"stkAaveDelegationType","type":"uint8"}],"name":"delegate","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"getId","type":"uint256"},{"internalType":"uint256","name":"setId","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"getId","type":"uint256"},{"internalType":"uint256","name":"setId","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"payable","type":"function"}] \ No newline at end of file diff --git a/src/abi/connectors/v1/index.ts b/src/abi/connectors/v1/index.ts index fbfe6f59..952f24d9 100644 --- a/src/abi/connectors/v1/index.ts +++ b/src/abi/connectors/v1/index.ts @@ -1,6 +1,8 @@ export * from './oneInch' export * from './aave' export * from './aave_migrate' +export * from './aave_claim' +export * from './aave_stake' export * from './aave_polygon_migrate' export * from './aave_v1_import' export * from './aave_v2_import' diff --git a/src/abi/connectors/v2/AAVE-STAKE-A.ts b/src/abi/connectors/v2/AAVE-STAKE-A.ts new file mode 100644 index 00000000..2beee6ff --- /dev/null +++ b/src/abi/connectors/v2/AAVE-STAKE-A.ts @@ -0,0 +1,3 @@ +import { AbiItem } from 'web3-utils' + +export const AAVE_STAKE_A: AbiItem[] = [{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"getId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"setId","type":"uint256"}],"name":"LogClaim","type":"event"},{"anonymous":false,"inputs":[],"name":"LogCooldown","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"delegatee","type":"address"},{"indexed":false,"internalType":"bool","name":"delegateAave","type":"bool"},{"indexed":false,"internalType":"bool","name":"delegateStkAave","type":"bool"},{"indexed":false,"internalType":"uint8","name":"aaveDelegationType","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"stkAaveDelegationType","type":"uint8"}],"name":"LogDelegate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"getId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"setId","type":"uint256"}],"name":"LogRedeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"getId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"setId","type":"uint256"}],"name":"LogStake","type":"event"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"getId","type":"uint256"},{"internalType":"uint256","name":"setId","type":"uint256"}],"name":"claim","outputs":[{"internalType":"string","name":"_eventName","type":"string"},{"internalType":"bytes","name":"_eventParam","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"cooldown","outputs":[{"internalType":"string","name":"_eventName","type":"string"},{"internalType":"bytes","name":"_eventParam","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"},{"internalType":"bool","name":"delegateAave","type":"bool"},{"internalType":"bool","name":"delegateStkAave","type":"bool"},{"internalType":"uint8","name":"aaveDelegationType","type":"uint8"},{"internalType":"uint8","name":"stkAaveDelegationType","type":"uint8"}],"name":"delegate","outputs":[{"internalType":"string","name":"_eventName","type":"string"},{"internalType":"bytes","name":"_eventParam","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"getId","type":"uint256"},{"internalType":"uint256","name":"setId","type":"uint256"}],"name":"redeem","outputs":[{"internalType":"string","name":"_eventName","type":"string"},{"internalType":"bytes","name":"_eventParam","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"getId","type":"uint256"},{"internalType":"uint256","name":"setId","type":"uint256"}],"name":"stake","outputs":[{"internalType":"string","name":"_eventName","type":"string"},{"internalType":"bytes","name":"_eventParam","type":"bytes"}],"stateMutability":"payable","type":"function"}] \ No newline at end of file diff --git a/src/abi/connectors/v2/index.ts b/src/abi/connectors/v2/index.ts index 19bf12c7..a29227f0 100644 --- a/src/abi/connectors/v2/index.ts +++ b/src/abi/connectors/v2/index.ts @@ -1,5 +1,6 @@ import {ONEINCH_A} from './1INCH-A' import {AAVE_CLAIM_A} from './AAVE-CLAIM-A' +import {AAVE_STAKE_A} from './AAVE-STAKE-A' import {AAVE_V1} from './AAVE-V1-A' import {AAVE_V2} from './AAVE-V2-A' import {AUTHORITY_A} from './AUTHORITY-A' @@ -22,5 +23,6 @@ export const connectorsV2_M1 = { "COMPOUND-A": COMPOUND_A, "MAKERDAO-A": MAKERDAO_A, "UNISWAP-A": UNISWAP_A, - "POLYGON-BRIDGE-A": POLYGON_BRIDGE_A + "POLYGON-BRIDGE-A": POLYGON_BRIDGE_A, + "AAVE-STAKE-A": AAVE_STAKE_A } diff --git a/src/addresses/mainnet/connectorsV1.ts b/src/addresses/mainnet/connectorsV1.ts index 7af53f8c..046bb915 100644 --- a/src/addresses/mainnet/connectorsV1.ts +++ b/src/addresses/mainnet/connectorsV1.ts @@ -37,5 +37,7 @@ export const connectorsV1 = { aave_v2_import: "0xCFC2a047887A4026A7E866f7ec1404f30D6A6F31", aave_v1_import: "0x4a9e4827e884cB3e49406e3A1A678F75910B1BB9", polygon_bridge: "0x5d1C4e6c91Ee834c6E1949DB2D0A6309061c358A", - aave_polygon_migrate: "0x9686CE6Ad5C3f7b212CAF401b928c4bB3422E7Ba" + aave_polygon_migrate: "0x9686CE6Ad5C3f7b212CAF401b928c4bB3422E7Ba", + aave_claim: "0x8f1e38c53af7bD2b2bE01b9580911b7Cca504F1b", + aave_stake: "0xa96b2F679fB935Ba279eA9395402ca4696D64D78" } \ No newline at end of file diff --git a/src/addresses/mainnet/connectorsV2_M1.ts b/src/addresses/mainnet/connectorsV2_M1.ts index 50ec9bfd..eb3f1650 100644 --- a/src/addresses/mainnet/connectorsV2_M1.ts +++ b/src/addresses/mainnet/connectorsV2_M1.ts @@ -9,4 +9,6 @@ export const connectorsV2_M1 = { "MAKERDAO-A": "0x839c2D3aDe63DF5b0b8F3E57D5e145057Ab41556", "UNISWAP-A": "0xA4BF319968986D2352FA1c550D781bBFCCE3FcaB", "POLYGON-BRIDGE-A": "0x697860CeE594c577F18f71cAf3d8B68D913c7366", + "AAVE-CLAIM-A": "0x611C1FA59Aa1d6352c4C8bD44882063c6aEE85E0", + "AAVE-STAKE-A": "0xf73C94402BC24148b744083eD02654EEc2C37D5B", } \ No newline at end of file diff --git a/src/data/connectorsV2_M1_mapping.ts b/src/data/connectorsV2_M1_mapping.ts index f3b88a1e..8fa48136 100644 --- a/src/data/connectorsV2_M1_mapping.ts +++ b/src/data/connectorsV2_M1_mapping.ts @@ -8,5 +8,7 @@ export default { "compound" :"COMPOUND-A", "maker" :"MAKERDAO-A", "uniswap" :"UNISWAP-A", - "polygon_bridge" :"POLYGON-BRIDGE-A" + "polygon_bridge" :"POLYGON-BRIDGE-A", + "aave_claim": "AAVE-CLAIM-A", + "aave_stake": "AAVE-STAKE-A", }