-
Notifications
You must be signed in to change notification settings - Fork 1
2026 02 06 deploy #165
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
base: main
Are you sure you want to change the base?
2026 02 06 deploy #165
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,6 +5,8 @@ pragma solidity =0.8.25; | |||||||||||||||||||||||||||||||||||||||||||||||
| import {Script} from "forge-std/Script.sol"; | ||||||||||||||||||||||||||||||||||||||||||||||||
| import {DataContractMemoryContainer, LibDataContract} from "rain.datacontract/lib/LibDataContract.sol"; | ||||||||||||||||||||||||||||||||||||||||||||||||
| import {LibDecimalFloatDeploy} from "../src/lib/deploy/LibDecimalFloatDeploy.sol"; | ||||||||||||||||||||||||||||||||||||||||||||||||
| import {LibRainDeploy} from "rain.deploy/lib/LibRainDeploy.sol"; | ||||||||||||||||||||||||||||||||||||||||||||||||
| import {DecimalFloat} from "../src/concrete/DecimalFloat.sol"; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| bytes32 constant DEPLOYMENT_SUITE_ALL = keccak256("all"); | ||||||||||||||||||||||||||||||||||||||||||||||||
| bytes32 constant DEPLOYMENT_SUITE_TABLES = keccak256("deployment.suite.tables"); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -15,21 +17,33 @@ contract Deploy is Script { | |||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| function run() external { | ||||||||||||||||||||||||||||||||||||||||||||||||
| uint256 deployerPrivateKey = vm.envUint("DEPLOYMENT_KEY"); | ||||||||||||||||||||||||||||||||||||||||||||||||
| string memory suiteString = vm.envOr("DEPLOYMENT_SUITE", string("all")); | ||||||||||||||||||||||||||||||||||||||||||||||||
| bytes32 suite = keccak256(bytes(suiteString)); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| DataContractMemoryContainer container = LibDecimalFloatDeploy.dataContract(); | ||||||||||||||||||||||||||||||||||||||||||||||||
| LibRainDeploy.deployAndBroadcastToSupportedNetworks( | ||||||||||||||||||||||||||||||||||||||||||||||||
| vm, | ||||||||||||||||||||||||||||||||||||||||||||||||
| LibRainDeploy.supportedNetworks(), | ||||||||||||||||||||||||||||||||||||||||||||||||
| deployerPrivateKey, | ||||||||||||||||||||||||||||||||||||||||||||||||
| type(DecimalFloat).creationCode, | ||||||||||||||||||||||||||||||||||||||||||||||||
| "src/concrete/DecimalFloat.sol:DecimalFloat", | ||||||||||||||||||||||||||||||||||||||||||||||||
| LibDecimalFloatDeploy.ZOLTU_DEPLOYED_DECIMAL_FLOAT_ADDRESS, | ||||||||||||||||||||||||||||||||||||||||||||||||
| LibDecimalFloatDeploy.DECIMAL_FLOAT_CONTRACT_HASH, | ||||||||||||||||||||||||||||||||||||||||||||||||
| new address[](0) | ||||||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| vm.startBroadcast(deployerPrivateKey); | ||||||||||||||||||||||||||||||||||||||||||||||||
| // string memory suiteString = vm.envOr("DEPLOYMENT_SUITE", string("all")); | ||||||||||||||||||||||||||||||||||||||||||||||||
| // bytes32 suite = keccak256(bytes(suiteString)); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_TABLES) { | ||||||||||||||||||||||||||||||||||||||||||||||||
| container.writeZoltu(); | ||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||
| // DataContractMemoryContainer container = LibDecimalFloatDeploy.dataContract(); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_CONTRACT) { | ||||||||||||||||||||||||||||||||||||||||||||||||
| LibDecimalFloatDeploy.decimalFloatZoltu(); | ||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||
| // vm.startBroadcast(deployerPrivateKey); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| vm.stopBroadcast(); | ||||||||||||||||||||||||||||||||||||||||||||||||
| // if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_TABLES) { | ||||||||||||||||||||||||||||||||||||||||||||||||
| // container.writeZoltu(); | ||||||||||||||||||||||||||||||||||||||||||||||||
| // } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| // if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_CONTRACT) { | ||||||||||||||||||||||||||||||||||||||||||||||||
| // LibDecimalFloatDeploy.decimalFloatZoltu(); | ||||||||||||||||||||||||||||||||||||||||||||||||
| // } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| // vm.stopBroadcast(); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+32
to
+47
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Remove commented-out code before merging. Sixteen lines of commented-out old deployment logic should be removed. Version control preserves the history; leaving dead code as comments adds noise and maintenance burden. ♻️ Proposed cleanup new address[](0)
);
- // string memory suiteString = vm.envOr("DEPLOYMENT_SUITE", string("all"));
- // bytes32 suite = keccak256(bytes(suiteString));
-
- // DataContractMemoryContainer container = LibDecimalFloatDeploy.dataContract();
-
- // vm.startBroadcast(deployerPrivateKey);
-
- // if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_TABLES) {
- // container.writeZoltu();
- // }
-
- // if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_CONTRACT) {
- // LibDecimalFloatDeploy.decimalFloatZoltu();
- // }
-
- // vm.stopBroadcast();
}
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.