#55: Feat: deterministic config

25 files changed

642 additions

473 deletions

14 commits



The repository aave-proposals-v3 by bgd-labs underwent significant refactoring and simplification, particularly in asset listings generation. Key changes include new import statements, a new function for translating JavaScript to Solidity values, updates to cli and build methods, refactoring of asset listing generation, removal of redundant code, introduction of a new aip object, function renaming and relocation, and addition of a PoolCache type to improve code readability, maintainability, and functionality.

The pull requests for the repository aave-proposals-v3, owned by bgd-labs, primarily involve significant refactoring and simplification of the codebase, particularly in the way asset listings are generated.

Key changes include:

  • Addition of three new import statements to the assetListing.ts file, namely translateJsBoolToSol, transformNumberToPercent, translateJsPercentToSol, transformNumberToHumanReadable, and translateJsNumberToSol from the ../prompts directory.
  • Introduction of a new function generateAssetListingSol that translates JavaScript values to Solidity values.
  • Updates to the cli and build methods of the assetListing object, including simplification of the build method to return a CodeArtifact object.
  • Significant refactoring of the asset listing generation process, replacing manual property setting with a call to the new generateAssetListingSol(cfg) function.
  • Removal of commented-out code sections that previously generated a table of risk parameters for each asset and created a listing template.
  • Addition of a new aip object with a specification property that maps over the cfg array to create a listing template for each element.
  • Replacement of the percentInput function with percentPrompt from ../prompts/percentPrompt.
  • Changes to the fetchRateStrategyParamsV2 and fetchRateStrategyParamsV3 functions to now take a required parameter.
  • Renaming and relocation of numberInput and percentInput functions to numberPrompt and percentPrompt respectively, with updates to their validation and return processes.
  • Introduction of a PoolCache type to types.ts and addition of a cache property of type PoolCache to the PoolConfig interface.

These changes aim to simplify the code, making it easier to read and maintain, and improve the functionality of the asset listing process.

Merged 14 days ago

Last updated 04/12 00:17