diff --git a/generator/features/__snapshots__/assetListing.spec.ts.snap b/generator/features/__snapshots__/assetListing.spec.ts.snap index e4a4839e1..2573fb620 100644 --- a/generator/features/__snapshots__/assetListing.spec.ts.snap +++ b/generator/features/__snapshots__/assetListing.spec.ts.snap @@ -167,7 +167,7 @@ contract AaveV3Ethereum_Test_20231023_Test is ProtocolV3TestBase { AaveV3Ethereum_Test_20231023 internal proposal; function setUp() public { - vm.createSelectFork(vm.rpcUrl('mainnet'), 18480106); + vm.createSelectFork(vm.rpcUrl('mainnet'), 18480118); proposal = new AaveV3Ethereum_Test_20231023(); } @@ -246,9 +246,8 @@ exports[`feature: assetListing > should return reasonable code 1`] = ` { "code": { "constants": [ - "address public constant PSP = 0xcAfE001067cDEF266AfB7Eb5A286dCFD277f3dE5; -uint256 internal constant PSP_SEED_AMOUNT = 10 ** 18; -", + "address public constant PSP = 0xcAfE001067cDEF266AfB7Eb5A286dCFD277f3dE5;", + "uint256 internal constant PSP_SEED_AMOUNT = 10 ** 18;", ], "execute": [ "IERC20(PSP).forceApprove(address(AaveV3Ethereum.POOL), PSP_SEED_AMOUNT); diff --git a/generator/features/assetListing.ts b/generator/features/assetListing.ts index 62fb5ca48..fbf352f34 100644 --- a/generator/features/assetListing.ts +++ b/generator/features/assetListing.ts @@ -100,11 +100,12 @@ export const assetListing: FeatureModule = { build(opt, pool, cfg) { const response: CodeArtifact = { code: { - constants: cfg.map( - (cfg) => - `address public constant ${cfg.assetSymbol} = ${cfg.asset};\n` + - `uint256 internal constant ${cfg.assetSymbol}_SEED_AMOUNT = 10 ** ${cfg.decimals};\n` - ), + constants: cfg + .map((cfg) => [ + `address public constant ${cfg.assetSymbol} = ${cfg.asset};`, + `uint256 internal constant ${cfg.assetSymbol}_SEED_AMOUNT = 10 ** ${cfg.decimals};`, + ]) + .flat(), execute: cfg.map( (cfg) => `IERC20(${cfg.assetSymbol}).forceApprove(address(${pool}.POOL), ${cfg.assetSymbol}_SEED_AMOUNT);