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

feat: avara testnet #727

Draft
wants to merge 1 commit into
base: feat/testnets
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion scripts/configs/pools/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const baseSepoliaProtoV3: PoolConfig = {
UI_POOL_DATA_PROVIDER: '0x6a9D64f93DB660EaCB2b6E9424792c630CdA87d8',
WALLET_BALANCE_PROVIDER: '0x2c4D1F4EC7F4FfA09a5E1C9e74fD3A10f21Bd811',
WETH_GATEWAY: '0x0568130e794429D2eEBC4dafE18f25Ff1a1ed8b6',
UMBRELLA: '0xb939e96168a3953697B64DA8055570dee8735829',
UMBRELLA: '0x710ebb9F848f725a47F39ce03Bd79Be6340e63dA',
},
};

Expand Down
14 changes: 7 additions & 7 deletions src/AaveV3BaseSepolia.sol
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ library AaveV3BaseSepolia {
// https://sepolia.basescan.org/address/0x6414DE3F58d54Fb90636e8393F065fDFe34Da420
ICollector internal constant COLLECTOR = ICollector(0x6414DE3F58d54Fb90636e8393F065fDFe34Da420);

// https://sepolia.basescan.org/address/0x3012CaC83a1286D0014aA9BB0461b80eb9c8e1b1
address internal constant DEFAULT_A_TOKEN_IMPL_REV_1 = 0x3012CaC83a1286D0014aA9BB0461b80eb9c8e1b1;
// https://sepolia.basescan.org/address/0xfa3BE9b886fb9E4909040a7AE01eeD47fd96A075
address internal constant DEFAULT_A_TOKEN_IMPL_REV_2 = 0xfa3BE9b886fb9E4909040a7AE01eeD47fd96A075;

// https://sepolia.basescan.org/address/0x9B928e20ECD8d2bA6444B307F4B5127A41d6e19C
address internal constant DEFAULT_VARIABLE_DEBT_TOKEN_IMPL_REV_1 =
0x9B928e20ECD8d2bA6444B307F4B5127A41d6e19C;
// https://sepolia.basescan.org/address/0x2B218FFE3C1272Da2F95cb0d09Ff346a861E04b7
address internal constant DEFAULT_VARIABLE_DEBT_TOKEN_IMPL_REV_2 =
0x2B218FFE3C1272Da2F95cb0d09Ff346a861E04b7;

// https://sepolia.basescan.org/address/0x4Afb5ADe7Bd7a670B61f303ab0C740eE8350918f
address internal constant STATA_FACTORY = 0x4Afb5ADe7Bd7a670B61f303ab0C740eE8350918f;
Expand All @@ -78,8 +78,8 @@ library AaveV3BaseSepolia {
// https://sepolia.basescan.org/address/0x0568130e794429D2eEBC4dafE18f25Ff1a1ed8b6
address internal constant WETH_GATEWAY = 0x0568130e794429D2eEBC4dafE18f25Ff1a1ed8b6;

// https://sepolia.basescan.org/address/0xb939e96168a3953697B64DA8055570dee8735829
address internal constant UMBRELLA = 0xb939e96168a3953697B64DA8055570dee8735829;
// https://sepolia.basescan.org/address/0x710ebb9F848f725a47F39ce03Bd79Be6340e63dA
address internal constant UMBRELLA = 0x710ebb9F848f725a47F39ce03Bd79Be6340e63dA;
}
library AaveV3BaseSepoliaAssets {
// https://sepolia.basescan.org/address/0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f
Expand Down
12 changes: 6 additions & 6 deletions src/ts/AaveV3BaseSepolia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ export const EMISSION_MANAGER = '0x49ECA4d8e7EaE6a1e7c02516851fF9038b277e96';
// ICollector https://sepolia.basescan.org/address/0x6414DE3F58d54Fb90636e8393F065fDFe34Da420
export const COLLECTOR = '0x6414DE3F58d54Fb90636e8393F065fDFe34Da420';

// https://sepolia.basescan.org/address/0x3012CaC83a1286D0014aA9BB0461b80eb9c8e1b1
export const DEFAULT_A_TOKEN_IMPL_REV_1 = '0x3012CaC83a1286D0014aA9BB0461b80eb9c8e1b1';
// https://sepolia.basescan.org/address/0xfa3BE9b886fb9E4909040a7AE01eeD47fd96A075
export const DEFAULT_A_TOKEN_IMPL_REV_2 = '0xfa3BE9b886fb9E4909040a7AE01eeD47fd96A075';

// https://sepolia.basescan.org/address/0x9B928e20ECD8d2bA6444B307F4B5127A41d6e19C
export const DEFAULT_VARIABLE_DEBT_TOKEN_IMPL_REV_1 = '0x9B928e20ECD8d2bA6444B307F4B5127A41d6e19C';
// https://sepolia.basescan.org/address/0x2B218FFE3C1272Da2F95cb0d09Ff346a861E04b7
export const DEFAULT_VARIABLE_DEBT_TOKEN_IMPL_REV_2 = '0x2B218FFE3C1272Da2F95cb0d09Ff346a861E04b7';

// https://sepolia.basescan.org/address/0x4Afb5ADe7Bd7a670B61f303ab0C740eE8350918f
export const STATA_FACTORY = '0x4Afb5ADe7Bd7a670B61f303ab0C740eE8350918f';
Expand All @@ -65,8 +65,8 @@ export const WALLET_BALANCE_PROVIDER = '0x2c4D1F4EC7F4FfA09a5E1C9e74fD3A10f21Bd8
// https://sepolia.basescan.org/address/0x0568130e794429D2eEBC4dafE18f25Ff1a1ed8b6
export const WETH_GATEWAY = '0x0568130e794429D2eEBC4dafE18f25Ff1a1ed8b6';

// https://sepolia.basescan.org/address/0xb939e96168a3953697B64DA8055570dee8735829
export const UMBRELLA = '0xb939e96168a3953697B64DA8055570dee8735829';
// https://sepolia.basescan.org/address/0x710ebb9F848f725a47F39ce03Bd79Be6340e63dA
export const UMBRELLA = '0x710ebb9F848f725a47F39ce03Bd79Be6340e63dA';

export const CHAIN_ID = 84532;
export const ASSETS = {
Expand Down
3 changes: 2 additions & 1 deletion src/ts/AaveV3Ethereum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,10 @@ export const E_MODES = {
label: 'sUSDe Stablecoins',
collateralBitmap: '4294967296',
collateralAssets: ['0x9D39A5DE30e57443BfF2A8307A4256c8797A3497'],
borrowableBitmap: '34359738376',
borrowableBitmap: '34359738632',
borrowableAssets: [
'0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
'0xdAC17F958D2ee523a2206206994597C13D831ec7',
'0xdC035D45d973E3EC169d2276DDab16f1e407384F',
],
ltv: 9000,
Expand Down
20 changes: 0 additions & 20 deletions tests/__snapshots__/verification.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -102,26 +102,6 @@ exports[`verification > should have all contracts verified except for the known
"value": "0x11979886A6dBAE27D7a72c49fCF3F23240D647bF",
},
},
{
"item": {
"chainId": 84532,
"path": [
"AaveV3BaseSepolia",
"COLLECTOR",
],
"value": "0x6414DE3F58d54Fb90636e8393F065fDFe34Da420",
},
},
{
"item": {
"chainId": 84532,
"path": [
"AaveV3BaseSepolia",
"UMBRELLA",
],
"value": "0xb939e96168a3953697B64DA8055570dee8735829",
},
},
{
"item": {
"chainId": 421614,
Expand Down
12 changes: 12 additions & 0 deletions tests/cache/verified.json
Original file line number Diff line number Diff line change
Expand Up @@ -7027,6 +7027,18 @@
},
"0xD9145b5F45Ad4519c7ACcD6E0A4A82e83bB8A6Dc": {
"name": "Faucet"
},
"0x6414DE3F58d54Fb90636e8393F065fDFe34Da420": {
"name": "TransparentUpgradeableProxy"
},
"0xfa3BE9b886fb9E4909040a7AE01eeD47fd96A075": {
"name": "ATokenInstance"
},
"0x2B218FFE3C1272Da2F95cb0d09Ff346a861E04b7": {
"name": "VariableDebtTokenInstance"
},
"0x710ebb9F848f725a47F39ce03Bd79Be6340e63dA": {
"name": "TransparentUpgradeableProxy"
}
},
"421614": {
Expand Down
42 changes: 42 additions & 0 deletions tests/generators/umbrella.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ describe('umbrellaGenerator', () => {
"oracle": "0x0000000000000000000000000000000000000000",
"stakeToken": "0xFCf0DbDE4a68C95EeE14dD7f2FE61e09F9Fb5433",
},
{
"isReserveStataToken": true,
"liquidationBonus": 10000n,
"oracle": "0x7c743cCAE301b558D2DB0c72D6d69C792AA2E4c9",
"stakeToken": "0x7c743cCAE301b558D2DB0c72D6d69C792AA2E4c9",
},
],
"reserve": "0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f",
},
Expand All @@ -27,6 +33,12 @@ describe('umbrellaGenerator', () => {
"oracle": "0x0000000000000000000000000000000000000000",
"stakeToken": "0xE9bd69a6d6bE3A18017b29db0Bc771e98de67642",
},
{
"isReserveStataToken": true,
"liquidationBonus": 10000n,
"oracle": "0x4Dc9749D5FF960e92b21800CC0a6fC7A2aD606f8",
"stakeToken": "0x4Dc9749D5FF960e92b21800CC0a6fC7A2aD606f8",
},
],
"reserve": "0x0a215D8ba66387DCA84B284D18c3B4ec3de6E54a",
},
Expand All @@ -38,6 +50,12 @@ describe('umbrellaGenerator', () => {
"oracle": "0x0000000000000000000000000000000000000000",
"stakeToken": "0xbAF767aF5e31b13aCAeFFE1db94f76B5026f9b54",
},
{
"isReserveStataToken": true,
"liquidationBonus": 10000n,
"oracle": "0x8d1dF6F3602f1Ca01f01F6e6d1071B205FbB0026",
"stakeToken": "0x8d1dF6F3602f1Ca01f01F6e6d1071B205FbB0026",
},
],
"reserve": "0x54114591963CF60EF3aA63bEfD6eC263D98145a4",
},
Expand All @@ -49,6 +67,12 @@ describe('umbrellaGenerator', () => {
"oracle": "0x0000000000000000000000000000000000000000",
"stakeToken": "0xA8EB382804BEE84985053C4ce5F94E9e91593042",
},
{
"isReserveStataToken": true,
"liquidationBonus": 10000n,
"oracle": "0xF2176ACe5DA79291D176C645a725eBa96A8f246D",
"stakeToken": "0xF2176ACe5DA79291D176C645a725eBa96A8f246D",
},
],
"reserve": "0x4200000000000000000000000000000000000006",
},
Expand All @@ -60,6 +84,12 @@ describe('umbrellaGenerator', () => {
"oracle": "0x0000000000000000000000000000000000000000",
"stakeToken": "0x98297F8CE8fBE6Ac21Baa23549389852D28715C4",
},
{
"isReserveStataToken": true,
"liquidationBonus": 10000n,
"oracle": "0xC550C904e04C6046122C0271A5D90891870f8824",
"stakeToken": "0xC550C904e04C6046122C0271A5D90891870f8824",
},
],
"reserve": "0xD171b9694f7A2597Ed006D41f7509aaD4B485c4B",
},
Expand All @@ -71,6 +101,12 @@ describe('umbrellaGenerator', () => {
"oracle": "0x0000000000000000000000000000000000000000",
"stakeToken": "0xF045cAB6235e10116319D94B1c5970DAAe9b7136",
},
{
"isReserveStataToken": true,
"liquidationBonus": 10000n,
"oracle": "0xA821016E5A282676c07FeC5217016e229B518dE0",
"stakeToken": "0xA821016E5A282676c07FeC5217016e229B518dE0",
},
],
"reserve": "0x810D46F9a9027E28F9B01F75E2bdde839dA61115",
},
Expand All @@ -89,6 +125,12 @@ describe('umbrellaGenerator', () => {
"0x98297F8CE8fBE6Ac21Baa23549389852D28715C4",
"0xF045cAB6235e10116319D94B1c5970DAAe9b7136",
"0x32735b634571904008D29086C95e90b558758F9f",
"0x7c743cCAE301b558D2DB0c72D6d69C792AA2E4c9",
"0x4Dc9749D5FF960e92b21800CC0a6fC7A2aD606f8",
"0x8d1dF6F3602f1Ca01f01F6e6d1071B205FbB0026",
"0xF2176ACe5DA79291D176C645a725eBa96A8f246D",
"0xC550C904e04C6046122C0271A5D90891870f8824",
"0xA821016E5A282676c07FeC5217016e229B518dE0",
],
}
`);
Expand Down
3 changes: 2 additions & 1 deletion tests/verification.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {flattenedAddresses, ListItem} from '../ui/src/utils/getAddresses';
import verified from './cache/verified.json';
import {writeFileSync} from 'fs';
import {Hex, PublicClient, zeroAddress} from 'viem';
import {getCode} from 'viem/actions';
import {getClient} from '../scripts/clients';

const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY as string;
Expand Down Expand Up @@ -112,7 +113,7 @@ describe(
if (checked.has(key)) continue;
checked.add(key);
const client = getClient(item.chainId) as PublicClient;
const hasCode = await client.getCode({address: item.value as Hex});
const hasCode = await getCode(client, {address: item.value as Hex});
if (hasCode) {
const {status, result} = (await checkVerified(item)) as {
status: string;
Expand Down
Loading