Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3A DAO - Fix: Issue #178 #189

Merged
merged 2 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions adapters/3ADAO/hourly_blocks.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
number,timestamp
4980088,1714773599
number,timestamp
4980089,1714773599
13 changes: 0 additions & 13 deletions adapters/3ADAO/src/sdk/ABIs/balanceGetter.ts

This file was deleted.

65 changes: 65 additions & 0 deletions adapters/3ADAO/src/sdk/ABIs/surgeHelper.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
export const surgeHelperABI = [
{
inputs: [],
name: "CONVERSION_PRICE_FEED",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "DECIMAL_PRECISION",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "VERSION",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "euroAmount", type: "uint256" }],
name: "convertEuroToDollar",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "_vaultFactory", type: "address" },
],
name: "getAllVaults",
outputs: [{ internalType: "address[]", name: "", type: "address[]" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "vaultAddress", type: "address" },
{ internalType: "address", name: "collateralAddress", type: "address" },
],
name: "getVaultTVLAndCollateralAmount",
outputs: [
{ internalType: "uint256", name: "", type: "uint256" },
{ internalType: "uint256", name: "", type: "uint256" },
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "vaultAddress", type: "address" },
{ internalType: "address", name: "receiptTokenAddress", type: "address" },
],
name: "getVaultTVLAndUnderlyingAmount",
outputs: [
{ internalType: "uint256", name: "", type: "uint256" },
{ internalType: "uint256", name: "", type: "uint256" },
],
stateMutability: "view",
type: "function",
},
];
163 changes: 0 additions & 163 deletions adapters/3ADAO/src/sdk/ABIs/vaultFactoryHelper.ts

This file was deleted.

33 changes: 30 additions & 3 deletions adapters/3ADAO/src/sdk/config.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
export const LINEA_RPC1 = "https://linea.decubate.com";
export const LINEA_RPC1 = "https://surge.3adao.org";
export const LINEA_RPC2 = "https://1rpc.io/linea";
export const LINEA_RPC3 = "https://rpc.linea.build";
export const LINEA_RPC4 = "https://linea.blockpi.network/v1/rpc/public";
export const LINEA_RPC5 = "https://linea.decubate.com";

export const addresses = {
vaultFactory: "0x65c6FD9B3a2A892096881e28f07c732ed128893E",
vaultFactoryHelper: "0x045d6078dd0d2436b67bc4050ab8f2a7e7e9b03c",
euro3: "0x3F817b28Da4940F018C6b5c0A11C555ebB1264f9",
a3a: "0x3d4b2132ed4ea0aa93903713a4de9f98e625a5c7",
stabilityPool: "0x51c3db485e3b21193636a83f05b3517f691cd68c",
cashbackPool: "0xa1bDB7f6B749Ab887Bd712c7198aFaE6F25a3c12",
balanceGetter: "0x1d42656c2f56e81678d5a6a9965937e3a5677f4d",
surgeHelper: "0x4fa03364c121c19C69136d75C6BC8E39c5667232",
};

export const whitelistedCollaterals: Record<number, string[]> = {
3130793: [
"0x176211869cA2b568f2A7D4EE941E073a821EE1ff",
Expand All @@ -33,3 +34,29 @@ export const whitelistedCollaterals: Record<number, string[]> = {
"0x9be5e24f05bbafc28da814bd59284878b388a40f",
],
};

// Define the type for receiptTokens
export const receiptTokens: {
[key: string]: { underlying: string };
} = {
// meUSDC
"0X333D8B480BDB25EA7BE4DD87EEB359988CE1B30D": {
underlying: "0X176211869CA2B568F2A7D4EE941E073A821EE1FF",
},
// meUSDT
"0XF669C3C03D9FDF4339E19214A749E52616300E89": {
underlying: "0XA219439258CA9DA29E9CC4CE5596924745E12B93",
},
// meWETH
"0XAD7F33984BED10518012013D4AB0458D37FEE6F3": {
underlying: "0XE5D7C2A44FFDDF6B295A15C148167DAAAF5CF34F",
},
// mewstETH
"0XCEED853798FF1C95CEB4DC48F68394EB7A86A782": {
underlying: "0XB5BEDD42000B71FDDE22D3EE8A79BD49A568FC8F",
},
// meWBTC
"0X9BE5E24F05BBAFC28DA814BD59284878B388A40F": {
underlying: "0X3AAB2285DDCDDAD8EDF438C1BAB47E1A9D05A9B4",
},
};
Loading
Loading