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

chore: fix e-mode categoryId to uint8 #274

Merged
merged 1 commit into from
Oct 25, 2023
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
2 changes: 1 addition & 1 deletion scripts/generator/protocolV3Generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ function generateEmodes(chainId: ChainId, eModes: Map<number, string>, libraryNa
const formatted = sorted.reduce((acc, [value, label]) => {
acc[`${label ? label.toUpperCase().replace('-', '_').replace(' ', '_') : 'NONE'}`] = {
value,
type: 'uint256',
type: 'uint8',
};
return acc;
}, {} as Addresses);
Expand Down
2 changes: 1 addition & 1 deletion scripts/generator/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function addressInfoToSolidityLibraryConstant(
entry: AddressInfo,
) {
if (typeof entry === 'object') {
if (entry.type === 'uint256') {
if (entry.type === 'uint256' || entry.type === 'uint8') {
return `${entry.type} internal constant ${key} = ${entry.value};\n`;
}
const blockExplorerLinkComment = getExplorerLink(entry.chainId || chainId, entry.value);
Expand Down
6 changes: 3 additions & 3 deletions src/AaveV3Arbitrum.sol
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,9 @@ library AaveV3ArbitrumAssets {
}

library AaveV3ArbitrumEModes {
uint256 internal constant NONE = 0;
uint8 internal constant NONE = 0;

uint256 internal constant STABLECOINS = 1;
uint8 internal constant STABLECOINS = 1;

uint256 internal constant ETH_CORRELATED = 2;
uint8 internal constant ETH_CORRELATED = 2;
}
4 changes: 2 additions & 2 deletions src/AaveV3ArbitrumGoerli.sol
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ library AaveV3ArbitrumGoerliAssets {
}

library AaveV3ArbitrumGoerliEModes {
uint256 internal constant NONE = 0;
uint8 internal constant NONE = 0;

uint256 internal constant STABLECOINS = 1;
uint8 internal constant STABLECOINS = 1;
}
6 changes: 3 additions & 3 deletions src/AaveV3Avalanche.sol
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,9 @@ library AaveV3AvalancheAssets {
}

library AaveV3AvalancheEModes {
uint256 internal constant NONE = 0;
uint8 internal constant NONE = 0;

uint256 internal constant STABLECOINS = 1;
uint8 internal constant STABLECOINS = 1;

uint256 internal constant AVAX_CORRELATED = 2;
uint8 internal constant AVAX_CORRELATED = 2;
}
4 changes: 2 additions & 2 deletions src/AaveV3Base.sol
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ library AaveV3BaseAssets {
}

library AaveV3BaseEModes {
uint256 internal constant NONE = 0;
uint8 internal constant NONE = 0;

uint256 internal constant ETH_CORRELATED = 1;
uint8 internal constant ETH_CORRELATED = 1;
}
4 changes: 2 additions & 2 deletions src/AaveV3Ethereum.sol
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ library AaveV3EthereumAssets {
}

library AaveV3EthereumEModes {
uint256 internal constant NONE = 0;
uint8 internal constant NONE = 0;

uint256 internal constant ETH_CORRELATED = 1;
uint8 internal constant ETH_CORRELATED = 1;
}
4 changes: 2 additions & 2 deletions src/AaveV3Fantom.sol
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ library AaveV3FantomAssets {
}

library AaveV3FantomEModes {
uint256 internal constant NONE = 0;
uint8 internal constant NONE = 0;

uint256 internal constant STABLECOINS = 1;
uint8 internal constant STABLECOINS = 1;
}
4 changes: 2 additions & 2 deletions src/AaveV3FantomTestnet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ library AaveV3FantomTestnetAssets {
}

library AaveV3FantomTestnetEModes {
uint256 internal constant NONE = 0;
uint8 internal constant NONE = 0;

uint256 internal constant STABLECOINS = 1;
uint8 internal constant STABLECOINS = 1;
}
4 changes: 2 additions & 2 deletions src/AaveV3Fuji.sol
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ library AaveV3FujiAssets {
}

library AaveV3FujiEModes {
uint256 internal constant NONE = 0;
uint8 internal constant NONE = 0;

uint256 internal constant STABLECOINS = 1;
uint8 internal constant STABLECOINS = 1;
}
4 changes: 2 additions & 2 deletions src/AaveV3GoerliGho.sol
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ library AaveV3GoerliGhoAssets {
}

library AaveV3GoerliGhoEModes {
uint256 internal constant NONE = 0;
uint8 internal constant NONE = 0;

uint256 internal constant STABLE_EMODE = 1;
uint8 internal constant STABLE_EMODE = 1;
}
4 changes: 2 additions & 2 deletions src/AaveV3Harmony.sol
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ library AaveV3HarmonyAssets {
}

library AaveV3HarmonyEModes {
uint256 internal constant NONE = 0;
uint8 internal constant NONE = 0;

uint256 internal constant STABLECOINS = 1;
uint8 internal constant STABLECOINS = 1;
}
2 changes: 1 addition & 1 deletion src/AaveV3Metis.sol
Original file line number Diff line number Diff line change
Expand Up @@ -189,5 +189,5 @@ library AaveV3MetisAssets {
}

library AaveV3MetisEModes {
uint256 internal constant NONE = 0;
uint8 internal constant NONE = 0;
}
4 changes: 2 additions & 2 deletions src/AaveV3Mumbai.sol
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ library AaveV3MumbaiAssets {
}

library AaveV3MumbaiEModes {
uint256 internal constant NONE = 0;
uint8 internal constant NONE = 0;

uint256 internal constant STABLECOINS = 1;
uint8 internal constant STABLECOINS = 1;
}
6 changes: 3 additions & 3 deletions src/AaveV3Optimism.sol
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,9 @@ library AaveV3OptimismAssets {
}

library AaveV3OptimismEModes {
uint256 internal constant NONE = 0;
uint8 internal constant NONE = 0;

uint256 internal constant STABLECOINS = 1;
uint8 internal constant STABLECOINS = 1;

uint256 internal constant ETH_CORRELATED = 2;
uint8 internal constant ETH_CORRELATED = 2;
}
4 changes: 2 additions & 2 deletions src/AaveV3OptimismGoerli.sol
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ library AaveV3OptimismGoerliAssets {
}

library AaveV3OptimismGoerliEModes {
uint256 internal constant NONE = 0;
uint8 internal constant NONE = 0;

uint256 internal constant STABLECOINS = 1;
uint8 internal constant STABLECOINS = 1;
}
8 changes: 4 additions & 4 deletions src/AaveV3Polygon.sol
Original file line number Diff line number Diff line change
Expand Up @@ -516,11 +516,11 @@ library AaveV3PolygonAssets {
}

library AaveV3PolygonEModes {
uint256 internal constant NONE = 0;
uint8 internal constant NONE = 0;

uint256 internal constant STABLECOINS = 1;
uint8 internal constant STABLECOINS = 1;

uint256 internal constant MATIC_CORRELATED = 2;
uint8 internal constant MATIC_CORRELATED = 2;

uint256 internal constant ETH_CORRELATED = 3;
uint8 internal constant ETH_CORRELATED = 3;
}
4 changes: 2 additions & 2 deletions src/AaveV3ScrollAlpha.sol
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ library AaveV3ScrollAlphaAssets {
}

library AaveV3ScrollAlphaEModes {
uint256 internal constant NONE = 0;
uint8 internal constant NONE = 0;

uint256 internal constant STABLECOINS = 1;
uint8 internal constant STABLECOINS = 1;
}
4 changes: 2 additions & 2 deletions src/AaveV3ScrollSepolia.sol
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ library AaveV3ScrollSepoliaAssets {
}

library AaveV3ScrollSepoliaEModes {
uint256 internal constant NONE = 0;
uint8 internal constant NONE = 0;

uint256 internal constant STABLECOINS = 1;
uint8 internal constant STABLECOINS = 1;
}
4 changes: 2 additions & 2 deletions src/AaveV3Sepolia.sol
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ library AaveV3SepoliaAssets {
}

library AaveV3SepoliaEModes {
uint256 internal constant NONE = 0;
uint8 internal constant NONE = 0;

uint256 internal constant STABLECOINS = 1;
uint8 internal constant STABLECOINS = 1;
}
Loading