feat: deploy liquity scripts#8
Merged
Merged
Conversation
bowd
approved these changes
Feb 26, 2026
| oracleAdapterLabel: "OracleAdapter", | ||
| // ── Addresses ────────────────────────────────────────── | ||
| rateFeedID: 0xf590b62f9cfcc6409075b1ecAc8176fe25744B88, // GBP/USD | ||
| watchdog: 0x287810F677516f10993ff63a520aAD5509F35796, // TODO: change to FXPriceFeed Watchdog Celo |
Contributor
There was a problem hiding this comment.
should we resolve this now? can I help?
Contributor
Author
There was a problem hiding this comment.
Yeah there are some addresses, and i wasn't sure which ones we will use on Celo
| address(uint160(uint256(keccak256("hevm cheat code")))); | ||
| Vm private constant vm = Vm(VM_ADDRESS); | ||
|
|
||
| function get() |
Contributor
There was a problem hiding this comment.
get("GBPm")
->
vm.deployCode(string.concat(..."LiquitiyConfig_{network}_{debtToken}.sol")).
LiquityConfigLib.get() now takes a token string param and resolves the
config contract as LiquityConfig_{network}_{token} using the NETWORK env
var. DeployLiquity declares the token param via @Custom:env natspec.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… preview SVG
- Replace instanceSalt with proxyLabel (for proxy names) and singletonLabel
(for CREATE3 singleton deployments) across interface, configs, and deploy script
- Write decoded NFT preview SVG to out/nft-preview-{label}.svg during deployment
- Add out/ to fs_permissions for vm.writeFile support
- Add SVG token logo assets and remove old txt-based logos
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This reverts commit 58be8d6.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ity up - Reset .treb files to main branch state - Remove DeployLiquityDependenciesTest.s.sol - Move DeployLiquity.s.sol from LiquityV2/ to v3/ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
nvtaveras
approved these changes
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This Pr adds the full deployment script for Liquity V2 CDP instances (DeployLiquity.s.sol) along with a Solidity-based config system.
I had to remove the price fetching in the initialize function in the FXPriceFeed.sol contract in the bold repo, so we can deploy a Liquity Instance and activate it by setting the rateFeedId later.
For testing this script, remove the line in the lib folder: https://github.com/mento-protocol/bold/blob/073a25f049f423b3336e3785d5f1e13235ced07b/contracts/src/PriceFeeds/FXPriceFeed.sol#L124
I also created a Pr for this: mento-protocol/bold#38
Concrete deployment configs implement ILiquityConfig directly and are imported by
LiquityConfigLib, so Foundry compiles its artifacts. The script deploys all Liquity V2 contracts (TroveManager, BorrowerOperations, StabilityPool, CollateralRegistry, etc.).
The three upgradeable proxy contracts (FXPriceFeed, StabilityPool, SystemParams) have their ProxyAdmin
Ownership transferred to the configured owner address after deployment.
The LiquityConfig_anvil_GBPm config provides a ready-to-use configuration for local Anvil fork testing of a GBPm/USDm instance. For testing run:
treb dev anvil start && treb run DeployLiquityDependenciesTest && LIQUITY_CONFIG_CONTRACT=LiquityConfig_anvil_GBPm treb run DeployLiquityV2The optimizer_runs = 0 setting is added to foundry.toml
to keep TroveManager bytecode within the EIP-170 24576-byte limit.