-
Notifications
You must be signed in to change notification settings - Fork 1
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
VaultParams refactoring #48
Conversation
v1.8.2
Manually altered the wrapping of some lines
…resses/Private Keys.
Manually altered the wrapping of some lines
Removed the DEFAULT_ANVIL_KEY restored it to configuration files. Also renamed it DEPLOYER_PRIVATE_KEY
VaultParams refactoring
🚨 Report Summary
For more details view the full report in OpenZeppelin Code Inspector |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After our discussion, I'm not sure if I was supposed to mention the issues we discussed! So I did :D
const depositWindowParam = { | ||
opensAt: params.depositOpensAt, | ||
closesAt: params.depositClosesAt, | ||
}; | ||
|
||
const matureWindowParam = { | ||
opensAt: params.redemptionOpensAt, | ||
closesAt: params.redemptionClosesAt, | ||
}; | ||
|
||
const windowVaultParams = { | ||
depositWindow: depositWindowParam, | ||
matureWindow: matureWindowParam, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the deposit windows, i was thinking we could have a struct to represent the open and close at. generally, i'd prefer object types that are more descriptive over simple primitives.
for example below, this also raises the question, shouldn't a window be between two Dates (not numbers).
interface WindowParam {
opensAt: BigNumber;
closesAt: BigNumber;
}
const depositWindowParam: WindowParam = {
opensAt: params.depositOpensAt,
closesAt: params.depositClosesAt,
};
const matureWindowParam: WindowParam = {
opensAt: params.redemptionOpensAt,
closesAt: params.redemptionClosesAt,
};```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love the idea of interface
s with the param values, then using multiple inheritance to realise a single params.
Sadly, interfaces don't allow state variables link (I would love to be wrong here!)
So we would have to use accessor functions, which would be a lot more cumbersome and would reduce the elegance of the solution I think.
// Read-only interface
interface IContractRoles {
function getOwner() external returns (address);
function getOperator() external returns (address);
function getCustodian() external returns (address);
}
struct VaultParameters is IContractRoles {
...
Even still, as far as I can tell, only contracts themselves can realise interface
s, so making this design a non-starter.
|
||
contract CredbullFixedYieldVaultWithUpside is UpsideVault { | ||
constructor(VaultParams memory params, IERC20 _token, uint256 _collateralPercentage) | ||
constructor(ICredbull.FixedYieldVaultParams memory params, IERC20 _token, uint256 _collateralPercentage) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest to group the token and collateral percentage here into a UpsideVaultParams struct.
-
suggest to rename token to something more explicit. tokenForLock or similar. having it within the UpsideVaultParams struct will also help with context. we have so many tokens on Vaults, it isn't obvious what this is!
-
what is the collateralPercentage? is this the upsideReward that we get? or tokensRequiredForLock? let's rename it as appropriate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- It is cbl token. tokens that are locked for upside.
- The percentage of CBL token to be locked for upside
constructor(BaseVaultParams memory baseVaultParams) | ||
ERC4626(baseVaultParams.asset) | ||
ERC20(baseVaultParams.shareName, baseVaultParams.shareSymbol) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great, love it! keeps our base very simple!
struct MaturityVaultParams { | ||
BaseVaultParams baseVaultParams; | ||
ContractRoles contractRoles; | ||
WindowVaultParams windowVaultParams; | ||
KycParams kycParams; | ||
MaxCapParams maxCapParams; | ||
uint256 promisedYield; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicates FixedYieldVault - doesn't look like it's used anyhow. remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please see comments, looks good overall! please incorporate those few suggested changes.
* icredbull removed * refactored ICredbull structs * removed ICredbull file * added IErrors * type changes in scripts
* split params init commit * forge install: forge-std v1.8.2 * Initial version of local and dev application configuration * Add `js-toml` dependency. * Update `.env.sample` to give clear instructions and remove unnecessary keys. * Moved DEFAULT_ANVIL_KEY to its singular usage. Manually altered the wrapping of some lines * Updated deployment helper JS scripts to use TOML application config. * Fixed some new solc warnings. * Now using TOML application config to control deployment. * Re-submit with auto-formatted changes. * Proposed changes to the GitHub Actions * Added decoder logic in read/write response * refactored handle error logic * Moving DeployTestVault under test package. * Updated the env sample files to clearly name the expected Account Addresses/Private Keys. * Added an env key stub to workaround local deploy problems. * Added more detail to the documentation. * Update `.env.sample` to give clear instructions and remove unnecessary keys. * Moved DEFAULT_ANVIL_KEY to its singular usage. Manually altered the wrapping of some lines * Moved the config functionality into it's own module, used by both it's peer modules. * Corrected a badly rebased Makefile. Removed the DEFAULT_ANVIL_KEY restored it to configuration files. Also renamed it DEPLOYER_PRIVATE_KEY * Updated the sample file removing moved config points. * Sepolia config now uses the TOML file. * Corrected badly-merged local vault command. * Add TOML files for all the supported environments. * Updated to use the correct Supabase config item key. * Linting fixes * Corrected the shared config code to be exportable. * Lint fixes. * Improved post-load config log comment. * Agh, another lint change. * Revert "Proposed changes to the GitHub Actions" This reverts commit 104ab40. * Try to fix duplicate IERC20 type import * Manually remove the duplicate IERC20 definition. See dependency graph using 'forge tree' * Changing the github actions to trigger from main and development branch * Make Readme more executable * Update contracts git-hub actions script * Updating testnet Env to deploy to baseSepolia * Fix supabase URL for testnet * Moved keys out of toml and into secrets (testnet) or env (local only) * Add yarn to contracts/ github actions to run it locally * Add Readme for running github actions locally * Adding yarn to api github actions to run locally * First cut of using toml in API, starting with app.controller.ts * Fix linting issue * Rename TomlConfig file to tomlConfig.ts * Remove yarn install step from github actions, some errant failures * Minor Readme updates to start build * Fix name for check-env github action * Issue with yarn install now can't find ./types module. Reverting some package.json changes * Fix compile error * Use the dev env in api github actions. Testnet missing sentry keys (amongst others). * Removed some unused keys from the sample * Upgrade to `dotenv` 16.4.5 to enable multi-path configuration. Updated `config.ts` to load local env files hierarchically. * Change to use `.env` instead of `.env.local` Re-added a `.env.sample` in `contracts`, as `make` and `forge` use it too. * Added configuration loading documentation to the Makefile. Added some console logging for clarity. * The ETH Config functions were identical, so I re-factored it. Updated some comments to be more accurate . * Enabled hierarchical loading of `.env` files. Removed usage of `.env.local` to be consistent across modules. Enable nestjs CLI to copy the resource files to the `dist` directory. * Renamed `.env.local.sample` Linted formatting changes. * Edit to include any resource tree and to watch those files too. * Cleanup imports after linting * Makefil to call yarn db-export rather than node. Minor Readme cleanup * Using TomlConfigService across API, replacing Config. * Default to local env in TomlConfigService * Fix github actions triggers * Get TomlConfigService from the app. * Changed API to use Github actions testnet secrets * Update Fly.io deploy token. Hopefully fix the build * Update Fly.io deploy token. Hopefully fix the build * Readme hint on fly deploy token * Adding deploy to bitlayerTestnet * Adding test of tomlConfig. Minor variable renaming * Adding test of tomlConfig. Minor variable renaming * Renamed toml in contracts package * Updating github actions to checkout@v4. Node 16 is deprecated. * Cleared Keys out of toml - shouldn't be checked in * Adding Operating Key to github actions to fix the build * Fix config in checkDb and exporter. Suppress output of key in makefile * Change API to use service key. Anon user doesn't have sufficient access * Changing a few more to Supabase service key. * Updatig fly.io config * Changing api toml paths to make fly.io happy * Changing api toml paths to make fly.io happy * Still can't get fly.io to read the toml. Moving back to where it started * contract changes in changing vault params * fixed lint errors * params change in backend and scripts * changes in operation script * fixed upside vault params * lint fix * Interface refactoring (#54) * icredbull removed * refactored ICredbull structs * removed ICredbull file * added IErrors * type changes in scripts * new refactored changes * notification service console logger * resolved toml and readme conflicts --------- Co-authored-by: Jonathan Lodge <[email protected]> Co-authored-by: Ian Lucas <[email protected]>
* split params init commit * forge install: forge-std v1.8.2 * Initial version of local and dev application configuration * Add `js-toml` dependency. * Update `.env.sample` to give clear instructions and remove unnecessary keys. * Moved DEFAULT_ANVIL_KEY to its singular usage. Manually altered the wrapping of some lines * Updated deployment helper JS scripts to use TOML application config. * Fixed some new solc warnings. * Now using TOML application config to control deployment. * Re-submit with auto-formatted changes. * Proposed changes to the GitHub Actions * Added decoder logic in read/write response * refactored handle error logic * Moving DeployTestVault under test package. * Updated the env sample files to clearly name the expected Account Addresses/Private Keys. * Added an env key stub to workaround local deploy problems. * Added more detail to the documentation. * Update `.env.sample` to give clear instructions and remove unnecessary keys. * Moved DEFAULT_ANVIL_KEY to its singular usage. Manually altered the wrapping of some lines * Moved the config functionality into it's own module, used by both it's peer modules. * Corrected a badly rebased Makefile. Removed the DEFAULT_ANVIL_KEY restored it to configuration files. Also renamed it DEPLOYER_PRIVATE_KEY * Updated the sample file removing moved config points. * Sepolia config now uses the TOML file. * Corrected badly-merged local vault command. * Add TOML files for all the supported environments. * Updated to use the correct Supabase config item key. * Linting fixes * Corrected the shared config code to be exportable. * Lint fixes. * Improved post-load config log comment. * Agh, another lint change. * Revert "Proposed changes to the GitHub Actions" This reverts commit 104ab40. * Try to fix duplicate IERC20 type import * Manually remove the duplicate IERC20 definition. See dependency graph using 'forge tree' * Changing the github actions to trigger from main and development branch * Make Readme more executable * Update contracts git-hub actions script * Updating testnet Env to deploy to baseSepolia * Fix supabase URL for testnet * Moved keys out of toml and into secrets (testnet) or env (local only) * Add yarn to contracts/ github actions to run it locally * Add Readme for running github actions locally * Adding yarn to api github actions to run locally * First cut of using toml in API, starting with app.controller.ts * Fix linting issue * Rename TomlConfig file to tomlConfig.ts * Remove yarn install step from github actions, some errant failures * Minor Readme updates to start build * Fix name for check-env github action * Issue with yarn install now can't find ./types module. Reverting some package.json changes * Fix compile error * Use the dev env in api github actions. Testnet missing sentry keys (amongst others). * Removed some unused keys from the sample * Upgrade to `dotenv` 16.4.5 to enable multi-path configuration. Updated `config.ts` to load local env files hierarchically. * Change to use `.env` instead of `.env.local` Re-added a `.env.sample` in `contracts`, as `make` and `forge` use it too. * Added configuration loading documentation to the Makefile. Added some console logging for clarity. * The ETH Config functions were identical, so I re-factored it. Updated some comments to be more accurate . * Enabled hierarchical loading of `.env` files. Removed usage of `.env.local` to be consistent across modules. Enable nestjs CLI to copy the resource files to the `dist` directory. * Renamed `.env.local.sample` Linted formatting changes. * Edit to include any resource tree and to watch those files too. * Cleanup imports after linting * Makefil to call yarn db-export rather than node. Minor Readme cleanup * Using TomlConfigService across API, replacing Config. * Default to local env in TomlConfigService * Fix github actions triggers * Get TomlConfigService from the app. * Changed API to use Github actions testnet secrets * Update Fly.io deploy token. Hopefully fix the build * Update Fly.io deploy token. Hopefully fix the build * Readme hint on fly deploy token * Adding deploy to bitlayerTestnet * Adding test of tomlConfig. Minor variable renaming * Adding test of tomlConfig. Minor variable renaming * Renamed toml in contracts package * Updating github actions to checkout@v4. Node 16 is deprecated. * Cleared Keys out of toml - shouldn't be checked in * Adding Operating Key to github actions to fix the build * Fix config in checkDb and exporter. Suppress output of key in makefile * Change API to use service key. Anon user doesn't have sufficient access * Changing a few more to Supabase service key. * Updatig fly.io config * Changing api toml paths to make fly.io happy * Changing api toml paths to make fly.io happy * Still can't get fly.io to read the toml. Moving back to where it started * contract changes in changing vault params * fixed lint errors * params change in backend and scripts * changes in operation script * fixed upside vault params * lint fix * Interface refactoring (#54) * icredbull removed * refactored ICredbull structs * removed ICredbull file * added IErrors * type changes in scripts * new refactored changes * notification service console logger * resolved toml and readme conflicts --------- Co-authored-by: Jonathan Lodge <[email protected]> Co-authored-by: Ian Lucas <[email protected]>
* split params init commit * forge install: forge-std v1.8.2 * Initial version of local and dev application configuration * Add `js-toml` dependency. * Update `.env.sample` to give clear instructions and remove unnecessary keys. * Moved DEFAULT_ANVIL_KEY to its singular usage. Manually altered the wrapping of some lines * Updated deployment helper JS scripts to use TOML application config. * Fixed some new solc warnings. * Now using TOML application config to control deployment. * Re-submit with auto-formatted changes. * Proposed changes to the GitHub Actions * Added decoder logic in read/write response * refactored handle error logic * Moving DeployTestVault under test package. * Updated the env sample files to clearly name the expected Account Addresses/Private Keys. * Added an env key stub to workaround local deploy problems. * Added more detail to the documentation. * Update `.env.sample` to give clear instructions and remove unnecessary keys. * Moved DEFAULT_ANVIL_KEY to its singular usage. Manually altered the wrapping of some lines * Moved the config functionality into it's own module, used by both it's peer modules. * Corrected a badly rebased Makefile. Removed the DEFAULT_ANVIL_KEY restored it to configuration files. Also renamed it DEPLOYER_PRIVATE_KEY * Updated the sample file removing moved config points. * Sepolia config now uses the TOML file. * Corrected badly-merged local vault command. * Add TOML files for all the supported environments. * Updated to use the correct Supabase config item key. * Linting fixes * Corrected the shared config code to be exportable. * Lint fixes. * Improved post-load config log comment. * Agh, another lint change. * Revert "Proposed changes to the GitHub Actions" This reverts commit 104ab40. * Try to fix duplicate IERC20 type import * Manually remove the duplicate IERC20 definition. See dependency graph using 'forge tree' * Changing the github actions to trigger from main and development branch * Make Readme more executable * Update contracts git-hub actions script * Updating testnet Env to deploy to baseSepolia * Fix supabase URL for testnet * Moved keys out of toml and into secrets (testnet) or env (local only) * Add yarn to contracts/ github actions to run it locally * Add Readme for running github actions locally * Adding yarn to api github actions to run locally * First cut of using toml in API, starting with app.controller.ts * Fix linting issue * Rename TomlConfig file to tomlConfig.ts * Remove yarn install step from github actions, some errant failures * Minor Readme updates to start build * Fix name for check-env github action * Issue with yarn install now can't find ./types module. Reverting some package.json changes * Fix compile error * Use the dev env in api github actions. Testnet missing sentry keys (amongst others). * Removed some unused keys from the sample * Upgrade to `dotenv` 16.4.5 to enable multi-path configuration. Updated `config.ts` to load local env files hierarchically. * Change to use `.env` instead of `.env.local` Re-added a `.env.sample` in `contracts`, as `make` and `forge` use it too. * Added configuration loading documentation to the Makefile. Added some console logging for clarity. * The ETH Config functions were identical, so I re-factored it. Updated some comments to be more accurate . * Enabled hierarchical loading of `.env` files. Removed usage of `.env.local` to be consistent across modules. Enable nestjs CLI to copy the resource files to the `dist` directory. * Renamed `.env.local.sample` Linted formatting changes. * Edit to include any resource tree and to watch those files too. * Cleanup imports after linting * Makefil to call yarn db-export rather than node. Minor Readme cleanup * Using TomlConfigService across API, replacing Config. * Default to local env in TomlConfigService * Fix github actions triggers * Get TomlConfigService from the app. * Changed API to use Github actions testnet secrets * Update Fly.io deploy token. Hopefully fix the build * Update Fly.io deploy token. Hopefully fix the build * Readme hint on fly deploy token * Adding deploy to bitlayerTestnet * Adding test of tomlConfig. Minor variable renaming * Adding test of tomlConfig. Minor variable renaming * Renamed toml in contracts package * Updating github actions to checkout@v4. Node 16 is deprecated. * Cleared Keys out of toml - shouldn't be checked in * Adding Operating Key to github actions to fix the build * Fix config in checkDb and exporter. Suppress output of key in makefile * Change API to use service key. Anon user doesn't have sufficient access * Changing a few more to Supabase service key. * Updatig fly.io config * Changing api toml paths to make fly.io happy * Changing api toml paths to make fly.io happy * Still can't get fly.io to read the toml. Moving back to where it started * contract changes in changing vault params * fixed lint errors * params change in backend and scripts * changes in operation script * fixed upside vault params * lint fix * Interface refactoring (#54) * icredbull removed * refactored ICredbull structs * removed ICredbull file * added IErrors * type changes in scripts * new refactored changes * notification service console logger * resolved toml and readme conflicts --------- Co-authored-by: Jonathan Lodge <[email protected]> Co-authored-by: Ian Lucas <[email protected]>
* split params init commit * forge install: forge-std v1.8.2 * Initial version of local and dev application configuration * Add `js-toml` dependency. * Update `.env.sample` to give clear instructions and remove unnecessary keys. * Moved DEFAULT_ANVIL_KEY to its singular usage. Manually altered the wrapping of some lines * Updated deployment helper JS scripts to use TOML application config. * Fixed some new solc warnings. * Now using TOML application config to control deployment. * Re-submit with auto-formatted changes. * Proposed changes to the GitHub Actions * Added decoder logic in read/write response * refactored handle error logic * Moving DeployTestVault under test package. * Updated the env sample files to clearly name the expected Account Addresses/Private Keys. * Added an env key stub to workaround local deploy problems. * Added more detail to the documentation. * Update `.env.sample` to give clear instructions and remove unnecessary keys. * Moved DEFAULT_ANVIL_KEY to its singular usage. Manually altered the wrapping of some lines * Moved the config functionality into it's own module, used by both it's peer modules. * Corrected a badly rebased Makefile. Removed the DEFAULT_ANVIL_KEY restored it to configuration files. Also renamed it DEPLOYER_PRIVATE_KEY * Updated the sample file removing moved config points. * Sepolia config now uses the TOML file. * Corrected badly-merged local vault command. * Add TOML files for all the supported environments. * Updated to use the correct Supabase config item key. * Linting fixes * Corrected the shared config code to be exportable. * Lint fixes. * Improved post-load config log comment. * Agh, another lint change. * Revert "Proposed changes to the GitHub Actions" This reverts commit 104ab40. * Try to fix duplicate IERC20 type import * Manually remove the duplicate IERC20 definition. See dependency graph using 'forge tree' * Changing the github actions to trigger from main and development branch * Make Readme more executable * Update contracts git-hub actions script * Updating testnet Env to deploy to baseSepolia * Fix supabase URL for testnet * Moved keys out of toml and into secrets (testnet) or env (local only) * Add yarn to contracts/ github actions to run it locally * Add Readme for running github actions locally * Adding yarn to api github actions to run locally * First cut of using toml in API, starting with app.controller.ts * Fix linting issue * Rename TomlConfig file to tomlConfig.ts * Remove yarn install step from github actions, some errant failures * Minor Readme updates to start build * Fix name for check-env github action * Issue with yarn install now can't find ./types module. Reverting some package.json changes * Fix compile error * Use the dev env in api github actions. Testnet missing sentry keys (amongst others). * Removed some unused keys from the sample * Upgrade to `dotenv` 16.4.5 to enable multi-path configuration. Updated `config.ts` to load local env files hierarchically. * Change to use `.env` instead of `.env.local` Re-added a `.env.sample` in `contracts`, as `make` and `forge` use it too. * Added configuration loading documentation to the Makefile. Added some console logging for clarity. * The ETH Config functions were identical, so I re-factored it. Updated some comments to be more accurate . * Enabled hierarchical loading of `.env` files. Removed usage of `.env.local` to be consistent across modules. Enable nestjs CLI to copy the resource files to the `dist` directory. * Renamed `.env.local.sample` Linted formatting changes. * Edit to include any resource tree and to watch those files too. * Cleanup imports after linting * Makefil to call yarn db-export rather than node. Minor Readme cleanup * Using TomlConfigService across API, replacing Config. * Default to local env in TomlConfigService * Fix github actions triggers * Get TomlConfigService from the app. * Changed API to use Github actions testnet secrets * Update Fly.io deploy token. Hopefully fix the build * Update Fly.io deploy token. Hopefully fix the build * Readme hint on fly deploy token * Adding deploy to bitlayerTestnet * Adding test of tomlConfig. Minor variable renaming * Adding test of tomlConfig. Minor variable renaming * Renamed toml in contracts package * Updating github actions to checkout@v4. Node 16 is deprecated. * Cleared Keys out of toml - shouldn't be checked in * Adding Operating Key to github actions to fix the build * Fix config in checkDb and exporter. Suppress output of key in makefile * Change API to use service key. Anon user doesn't have sufficient access * Changing a few more to Supabase service key. * Updatig fly.io config * Changing api toml paths to make fly.io happy * Changing api toml paths to make fly.io happy * Still can't get fly.io to read the toml. Moving back to where it started * contract changes in changing vault params * fixed lint errors * params change in backend and scripts * changes in operation script * fixed upside vault params * lint fix * Interface refactoring (#54) * icredbull removed * refactored ICredbull structs * removed ICredbull file * added IErrors * type changes in scripts * new refactored changes * notification service console logger * resolved toml and readme conflicts --------- Co-authored-by: Jonathan Lodge <[email protected]> Co-authored-by: Ian Lucas <[email protected]>
* split params init commit * forge install: forge-std v1.8.2 * Initial version of local and dev application configuration * Add `js-toml` dependency. * Update `.env.sample` to give clear instructions and remove unnecessary keys. * Moved DEFAULT_ANVIL_KEY to its singular usage. Manually altered the wrapping of some lines * Updated deployment helper JS scripts to use TOML application config. * Fixed some new solc warnings. * Now using TOML application config to control deployment. * Re-submit with auto-formatted changes. * Proposed changes to the GitHub Actions * Added decoder logic in read/write response * refactored handle error logic * Moving DeployTestVault under test package. * Updated the env sample files to clearly name the expected Account Addresses/Private Keys. * Added an env key stub to workaround local deploy problems. * Added more detail to the documentation. * Update `.env.sample` to give clear instructions and remove unnecessary keys. * Moved DEFAULT_ANVIL_KEY to its singular usage. Manually altered the wrapping of some lines * Moved the config functionality into it's own module, used by both it's peer modules. * Corrected a badly rebased Makefile. Removed the DEFAULT_ANVIL_KEY restored it to configuration files. Also renamed it DEPLOYER_PRIVATE_KEY * Updated the sample file removing moved config points. * Sepolia config now uses the TOML file. * Corrected badly-merged local vault command. * Add TOML files for all the supported environments. * Updated to use the correct Supabase config item key. * Linting fixes * Corrected the shared config code to be exportable. * Lint fixes. * Improved post-load config log comment. * Agh, another lint change. * Revert "Proposed changes to the GitHub Actions" This reverts commit 104ab40. * Try to fix duplicate IERC20 type import * Manually remove the duplicate IERC20 definition. See dependency graph using 'forge tree' * Changing the github actions to trigger from main and development branch * Make Readme more executable * Update contracts git-hub actions script * Updating testnet Env to deploy to baseSepolia * Fix supabase URL for testnet * Moved keys out of toml and into secrets (testnet) or env (local only) * Add yarn to contracts/ github actions to run it locally * Add Readme for running github actions locally * Adding yarn to api github actions to run locally * First cut of using toml in API, starting with app.controller.ts * Fix linting issue * Rename TomlConfig file to tomlConfig.ts * Remove yarn install step from github actions, some errant failures * Minor Readme updates to start build * Fix name for check-env github action * Issue with yarn install now can't find ./types module. Reverting some package.json changes * Fix compile error * Use the dev env in api github actions. Testnet missing sentry keys (amongst others). * Removed some unused keys from the sample * Upgrade to `dotenv` 16.4.5 to enable multi-path configuration. Updated `config.ts` to load local env files hierarchically. * Change to use `.env` instead of `.env.local` Re-added a `.env.sample` in `contracts`, as `make` and `forge` use it too. * Added configuration loading documentation to the Makefile. Added some console logging for clarity. * The ETH Config functions were identical, so I re-factored it. Updated some comments to be more accurate . * Enabled hierarchical loading of `.env` files. Removed usage of `.env.local` to be consistent across modules. Enable nestjs CLI to copy the resource files to the `dist` directory. * Renamed `.env.local.sample` Linted formatting changes. * Edit to include any resource tree and to watch those files too. * Cleanup imports after linting * Makefil to call yarn db-export rather than node. Minor Readme cleanup * Using TomlConfigService across API, replacing Config. * Default to local env in TomlConfigService * Fix github actions triggers * Get TomlConfigService from the app. * Changed API to use Github actions testnet secrets * Update Fly.io deploy token. Hopefully fix the build * Update Fly.io deploy token. Hopefully fix the build * Readme hint on fly deploy token * Adding deploy to bitlayerTestnet * Adding test of tomlConfig. Minor variable renaming * Adding test of tomlConfig. Minor variable renaming * Renamed toml in contracts package * Updating github actions to checkout@v4. Node 16 is deprecated. * Cleared Keys out of toml - shouldn't be checked in * Adding Operating Key to github actions to fix the build * Fix config in checkDb and exporter. Suppress output of key in makefile * Change API to use service key. Anon user doesn't have sufficient access * Changing a few more to Supabase service key. * Updatig fly.io config * Changing api toml paths to make fly.io happy * Changing api toml paths to make fly.io happy * Still can't get fly.io to read the toml. Moving back to where it started * contract changes in changing vault params * fixed lint errors * params change in backend and scripts * changes in operation script * fixed upside vault params * lint fix * Interface refactoring (#54) * icredbull removed * refactored ICredbull structs * removed ICredbull file * added IErrors * type changes in scripts * new refactored changes * notification service console logger * resolved toml and readme conflicts --------- Co-authored-by: Jonathan Lodge <[email protected]> Co-authored-by: Ian Lucas <[email protected]>
* split params init commit * forge install: forge-std v1.8.2 * Initial version of local and dev application configuration * Add `js-toml` dependency. * Update `.env.sample` to give clear instructions and remove unnecessary keys. * Moved DEFAULT_ANVIL_KEY to its singular usage. Manually altered the wrapping of some lines * Updated deployment helper JS scripts to use TOML application config. * Fixed some new solc warnings. * Now using TOML application config to control deployment. * Re-submit with auto-formatted changes. * Proposed changes to the GitHub Actions * Added decoder logic in read/write response * refactored handle error logic * Moving DeployTestVault under test package. * Updated the env sample files to clearly name the expected Account Addresses/Private Keys. * Added an env key stub to workaround local deploy problems. * Added more detail to the documentation. * Update `.env.sample` to give clear instructions and remove unnecessary keys. * Moved DEFAULT_ANVIL_KEY to its singular usage. Manually altered the wrapping of some lines * Moved the config functionality into it's own module, used by both it's peer modules. * Corrected a badly rebased Makefile. Removed the DEFAULT_ANVIL_KEY restored it to configuration files. Also renamed it DEPLOYER_PRIVATE_KEY * Updated the sample file removing moved config points. * Sepolia config now uses the TOML file. * Corrected badly-merged local vault command. * Add TOML files for all the supported environments. * Updated to use the correct Supabase config item key. * Linting fixes * Corrected the shared config code to be exportable. * Lint fixes. * Improved post-load config log comment. * Agh, another lint change. * Revert "Proposed changes to the GitHub Actions" This reverts commit 104ab40. * Try to fix duplicate IERC20 type import * Manually remove the duplicate IERC20 definition. See dependency graph using 'forge tree' * Changing the github actions to trigger from main and development branch * Make Readme more executable * Update contracts git-hub actions script * Updating testnet Env to deploy to baseSepolia * Fix supabase URL for testnet * Moved keys out of toml and into secrets (testnet) or env (local only) * Add yarn to contracts/ github actions to run it locally * Add Readme for running github actions locally * Adding yarn to api github actions to run locally * First cut of using toml in API, starting with app.controller.ts * Fix linting issue * Rename TomlConfig file to tomlConfig.ts * Remove yarn install step from github actions, some errant failures * Minor Readme updates to start build * Fix name for check-env github action * Issue with yarn install now can't find ./types module. Reverting some package.json changes * Fix compile error * Use the dev env in api github actions. Testnet missing sentry keys (amongst others). * Removed some unused keys from the sample * Upgrade to `dotenv` 16.4.5 to enable multi-path configuration. Updated `config.ts` to load local env files hierarchically. * Change to use `.env` instead of `.env.local` Re-added a `.env.sample` in `contracts`, as `make` and `forge` use it too. * Added configuration loading documentation to the Makefile. Added some console logging for clarity. * The ETH Config functions were identical, so I re-factored it. Updated some comments to be more accurate . * Enabled hierarchical loading of `.env` files. Removed usage of `.env.local` to be consistent across modules. Enable nestjs CLI to copy the resource files to the `dist` directory. * Renamed `.env.local.sample` Linted formatting changes. * Edit to include any resource tree and to watch those files too. * Cleanup imports after linting * Makefil to call yarn db-export rather than node. Minor Readme cleanup * Using TomlConfigService across API, replacing Config. * Default to local env in TomlConfigService * Fix github actions triggers * Get TomlConfigService from the app. * Changed API to use Github actions testnet secrets * Update Fly.io deploy token. Hopefully fix the build * Update Fly.io deploy token. Hopefully fix the build * Readme hint on fly deploy token * Adding deploy to bitlayerTestnet * Adding test of tomlConfig. Minor variable renaming * Adding test of tomlConfig. Minor variable renaming * Renamed toml in contracts package * Updating github actions to checkout@v4. Node 16 is deprecated. * Cleared Keys out of toml - shouldn't be checked in * Adding Operating Key to github actions to fix the build * Fix config in checkDb and exporter. Suppress output of key in makefile * Change API to use service key. Anon user doesn't have sufficient access * Changing a few more to Supabase service key. * Updatig fly.io config * Changing api toml paths to make fly.io happy * Changing api toml paths to make fly.io happy * Still can't get fly.io to read the toml. Moving back to where it started * contract changes in changing vault params * fixed lint errors * params change in backend and scripts * changes in operation script * fixed upside vault params * lint fix * Interface refactoring (#54) * icredbull removed * refactored ICredbull structs * removed ICredbull file * added IErrors * type changes in scripts * new refactored changes * notification service console logger * resolved toml and readme conflicts --------- Co-authored-by: Jonathan Lodge <[email protected]> Co-authored-by: Ian Lucas <[email protected]>
* split params init commit * forge install: forge-std v1.8.2 * Initial version of local and dev application configuration * Add `js-toml` dependency. * Update `.env.sample` to give clear instructions and remove unnecessary keys. * Moved DEFAULT_ANVIL_KEY to its singular usage. Manually altered the wrapping of some lines * Updated deployment helper JS scripts to use TOML application config. * Fixed some new solc warnings. * Now using TOML application config to control deployment. * Re-submit with auto-formatted changes. * Proposed changes to the GitHub Actions * Added decoder logic in read/write response * refactored handle error logic * Moving DeployTestVault under test package. * Updated the env sample files to clearly name the expected Account Addresses/Private Keys. * Added an env key stub to workaround local deploy problems. * Added more detail to the documentation. * Update `.env.sample` to give clear instructions and remove unnecessary keys. * Moved DEFAULT_ANVIL_KEY to its singular usage. Manually altered the wrapping of some lines * Moved the config functionality into it's own module, used by both it's peer modules. * Corrected a badly rebased Makefile. Removed the DEFAULT_ANVIL_KEY restored it to configuration files. Also renamed it DEPLOYER_PRIVATE_KEY * Updated the sample file removing moved config points. * Sepolia config now uses the TOML file. * Corrected badly-merged local vault command. * Add TOML files for all the supported environments. * Updated to use the correct Supabase config item key. * Linting fixes * Corrected the shared config code to be exportable. * Lint fixes. * Improved post-load config log comment. * Agh, another lint change. * Revert "Proposed changes to the GitHub Actions" This reverts commit 104ab40. * Try to fix duplicate IERC20 type import * Manually remove the duplicate IERC20 definition. See dependency graph using 'forge tree' * Changing the github actions to trigger from main and development branch * Make Readme more executable * Update contracts git-hub actions script * Updating testnet Env to deploy to baseSepolia * Fix supabase URL for testnet * Moved keys out of toml and into secrets (testnet) or env (local only) * Add yarn to contracts/ github actions to run it locally * Add Readme for running github actions locally * Adding yarn to api github actions to run locally * First cut of using toml in API, starting with app.controller.ts * Fix linting issue * Rename TomlConfig file to tomlConfig.ts * Remove yarn install step from github actions, some errant failures * Minor Readme updates to start build * Fix name for check-env github action * Issue with yarn install now can't find ./types module. Reverting some package.json changes * Fix compile error * Use the dev env in api github actions. Testnet missing sentry keys (amongst others). * Removed some unused keys from the sample * Upgrade to `dotenv` 16.4.5 to enable multi-path configuration. Updated `config.ts` to load local env files hierarchically. * Change to use `.env` instead of `.env.local` Re-added a `.env.sample` in `contracts`, as `make` and `forge` use it too. * Added configuration loading documentation to the Makefile. Added some console logging for clarity. * The ETH Config functions were identical, so I re-factored it. Updated some comments to be more accurate . * Enabled hierarchical loading of `.env` files. Removed usage of `.env.local` to be consistent across modules. Enable nestjs CLI to copy the resource files to the `dist` directory. * Renamed `.env.local.sample` Linted formatting changes. * Edit to include any resource tree and to watch those files too. * Cleanup imports after linting * Makefil to call yarn db-export rather than node. Minor Readme cleanup * Using TomlConfigService across API, replacing Config. * Default to local env in TomlConfigService * Fix github actions triggers * Get TomlConfigService from the app. * Changed API to use Github actions testnet secrets * Update Fly.io deploy token. Hopefully fix the build * Update Fly.io deploy token. Hopefully fix the build * Readme hint on fly deploy token * Adding deploy to bitlayerTestnet * Adding test of tomlConfig. Minor variable renaming * Adding test of tomlConfig. Minor variable renaming * Renamed toml in contracts package * Updating github actions to checkout@v4. Node 16 is deprecated. * Cleared Keys out of toml - shouldn't be checked in * Adding Operating Key to github actions to fix the build * Fix config in checkDb and exporter. Suppress output of key in makefile * Change API to use service key. Anon user doesn't have sufficient access * Changing a few more to Supabase service key. * Updatig fly.io config * Changing api toml paths to make fly.io happy * Changing api toml paths to make fly.io happy * Still can't get fly.io to read the toml. Moving back to where it started * contract changes in changing vault params * fixed lint errors * params change in backend and scripts * changes in operation script * fixed upside vault params * lint fix * Interface refactoring (#54) * icredbull removed * refactored ICredbull structs * removed ICredbull file * added IErrors * type changes in scripts * new refactored changes * notification service console logger * resolved toml and readme conflicts --------- Co-authored-by: Jonathan Lodge <[email protected]> Co-authored-by: Ian Lucas <[email protected]>
No description provided.