Skip to content

Commit

Permalink
feat: add umbrella generator
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra committed Dec 9, 2024
1 parent 441d2d6 commit c19ba5b
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 102 deletions.
100 changes: 0 additions & 100 deletions tests/__snapshots__/verification.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,106 +2,6 @@

exports[`verification > should have all contracts verified except for the known set of errors 1`] = `
[
{
"item": {
"chainId": 1101,
"path": [
"GovernanceV3PolygonZkEvm",
"PC_DATA_HELPER",
],
"value": "0xF1c11BE0b4466728DDb7991A0Ac5265646ec9672",
},
},
{
"item": {
"chainId": 1,
"path": [
"AaveV2EthereumAMM",
"UI_INCENTIVE_DATA_PROVIDER",
],
"value": "0xD01ab9a6577E1D84F142e44D49380e23A340387d",
},
},
{
"item": {
"chainId": 137,
"path": [
"AaveV2Polygon",
"UI_INCENTIVE_DATA_PROVIDER",
],
"value": "0x645654D59A5226CBab969b1f5431aA47CBf64ab8",
},
},
{
"item": {
"chainId": 43113,
"path": [
"AaveV2Fuji",
"POOL_IMPL",
],
"value": "0x6C66d96ACCCCC2E6F576813A480AD230D56FB2F1",
},
},
{
"item": {
"chainId": 43113,
"path": [
"AaveV2Fuji",
"ORACLE",
],
"value": "0xfa4f5B081632c4709667D467F817C09d9008A46A",
},
},
{
"item": {
"chainId": 43113,
"path": [
"AaveV2Fuji",
"LENDING_RATE_ORACLE",
],
"value": "0x76Ec7c83aCb6af821E61F1DF1E0aBE684Bc904F8",
},
},
{
"item": {
"chainId": 43113,
"path": [
"AaveV2Fuji",
"DEFAULT_INCENTIVES_CONTROLLER",
],
"value": "0xa1EF206fb9a8D8186157FC817fCddcC47727ED55",
},
},
{
"item": {
"chainId": 43113,
"path": [
"AaveV2Fuji",
"FAUCET",
],
"value": "0x90E5BAc5A98fff59617080848959f44eACB4Cd7B",
},
},
{
"item": {
"chainId": 43113,
"path": [
"AaveV2Fuji",
"UI_INCENTIVE_DATA_PROVIDER",
],
"value": "0x9842E5B7b7C6cEDfB1952a388e050582Ff95645b",
},
},
{
"item": {
"chainId": 43114,
"path": [
"AaveV2Avalanche",
"UI_INCENTIVE_DATA_PROVIDER",
],
"value": "0x11979886A6dBAE27D7a72c49fCF3F23240D647bF",
},
},
{
"item": {
"chainId": 421614,
Expand Down
27 changes: 27 additions & 0 deletions tests/cache/verified.json
Original file line number Diff line number Diff line change
Expand Up @@ -7039,6 +7039,33 @@
},
"0xb939e96168a3953697B64DA8055570dee8735829": {
"name": "TransparentUpgradeableProxy"
},
"0xfa3BE9b886fb9E4909040a7AE01eeD47fd96A075": {
"name": "ATokenInstance"
},
"0x2B218FFE3C1272Da2F95cb0d09Ff346a861E04b7": {
"name": "VariableDebtTokenInstance"
},
"0xc2B555ae014305DBF6E9dF01d7a8D50C446Fa3f1": {
"name": "TransparentUpgradeableProxy"
},
"0x567FD032E58504b88c5ACDE951b8069a58445766": {
"name": "TransparentUpgradeableProxy"
},
"0x32ae7319c4a4eEC0bB8318d4382A193E89fF2A1D": {
"name": "TransparentUpgradeableProxy"
},
"0x946fA6F7E2E6F94EfAB67DBf72a054d79F7F8301": {
"name": "TransparentUpgradeableProxy"
},
"0xAd1D19156C20a73d19c9f896faDFf7Eafd0c4dF9": {
"name": "TransparentUpgradeableProxy"
},
"0xD7fe90c0F9eEB361300876f49e81A34cbbbe1fE4": {
"name": "TransparentUpgradeableProxy"
},
"0xD250d3E34F3bC3090f798a93c38DbAeced420Eae": {
"name": "TransparentUpgradeableProxy"
}
},
"421614": {
Expand Down
2 changes: 1 addition & 1 deletion tests/generators/umbrella.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {describe, it, expect} from 'vitest';
import {getUmbrellaConfig} from '../../scripts/generator/umbrellaGenerator';
import {getUmbrellaConfig} from '../../scripts/generator/umbrella';

describe('umbrellaGenerator', () => {
it('should generate the config', async () => {
Expand Down
22 changes: 21 additions & 1 deletion tests/verification.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,33 @@ function getApiUrl(chainId: number) {
return `https://api.etherscan.io/v2/api`;
}

// very old contracts we know will never be verified
const knownErrors = {
1: {
'0xD01ab9a6577E1D84F142e44D49380e23A340387d': true,
},
1101: {
'0xF1c11BE0b4466728DDb7991A0Ac5265646ec9672': true,
},
137: {
'0x645654D59A5226CBab969b1f5431aA47CBf64ab8': true,
},
43114: {
'0x11979886A6dBAE27D7a72c49fCF3F23240D647bF': true,
},
};

describe(
'verification',
() => {
it('should have all contracts verified except for the known set of errors', async () => {
const addressesToCheck = flattenedAddresses.filter(
(item) =>
![ChainId.harmony, ChainId.fantom, ChainId.fantom_testnet].includes(item.chainId as any),
![ChainId.harmony, ChainId.fantom, ChainId.fantom_testnet].includes(
item.chainId as any,
) &&
item.path[0] !== 'AaveV2Fuji' &&
!knownErrors[item.chainId]?.[item.value],
);
const errors: {item: ListItem}[] = [];
let newVerified = false;
Expand Down

0 comments on commit c19ba5b

Please sign in to comment.