Skip to content

Commit a443432

Browse files
committed
build: update V1 deployment script
1 parent 2ee94af commit a443432

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

script/V1DeploymentScript.s.sol

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ contract V1DeploymentScript is Script {
4040
console.log(unicode"👑 PROTOCOL_OWNER set as %s", owner);
4141

4242
vm.startBroadcast();
43-
console.log(unicode"🚀 Deploying contracts...");
43+
console.log(unicode"🚀 Deploying contracts with sender %s...", msg.sender);
4444

4545
// Owner of the protocol is first set as the deployer to allow the whitelisting of modules,
4646
// ownership is then transferred to the address defined as the PROTOCOL_OWNER
@@ -125,17 +125,19 @@ contract V1DeploymentScript is Script {
125125
) internal {
126126
int24 DEFAULT_LOWER_TICK = 167_520;
127127
int24 DEFAULT_UPPER_TICK = 200_040;
128-
uint256 DEFAULT_MAX_SHARE_TO_BE_SOLD = 0.23 ether;
128+
uint256 DEFAULT_MAX_SHARE_TO_BE_SOLD = 0.9 ether;
129129

130130
bool isToken0;
131-
uint256 initialSupply = 100_000_000 ether;
132-
string memory name = "Best Coin";
133-
string memory symbol = "BEST";
131+
uint256 initialSupply = 1_000_000_000 ether;
132+
string memory name = "a";
133+
string memory symbol = "a";
134+
string memory tokenURI = "ipfs://QmPXxsEGfHHnCa8VuPoMS7n1pAhJVw1BnnfSx83sioE65y";
134135
bytes memory governanceData = abi.encode(name, 7200, 50_400, initialSupply / 1000);
135-
bytes memory tokenFactoryData = abi.encode(name, symbol, 0, 0, new address[](0), new uint256[](0), "");
136+
bytes memory tokenFactoryData = abi.encode(name, symbol, 0, 0, new address[](0), new uint256[](0), tokenURI);
136137

137138
// Compute the asset address that will be created
138139
bytes32 salt;
140+
139141
bytes memory creationCode = type(DERC20).creationCode;
140142
bytes memory create2Args = abi.encode(
141143
name,
@@ -147,7 +149,7 @@ contract V1DeploymentScript is Script {
147149
0,
148150
new address[](0),
149151
new uint256[](0),
150-
""
152+
tokenURI
151153
);
152154
address predictedAsset = vm.computeCreate2Address(
153155
salt, keccak256(abi.encodePacked(creationCode, create2Args)), address(tokenFactory)
@@ -171,7 +173,7 @@ contract V1DeploymentScript is Script {
171173
(address asset,,,,) = airlock.create(
172174
CreateParams(
173175
initialSupply,
174-
initialSupply,
176+
900_000_000 ether,
175177
weth,
176178
tokenFactory,
177179
tokenFactoryData,
@@ -180,12 +182,15 @@ contract V1DeploymentScript is Script {
180182
poolInitializer,
181183
poolInitializerData,
182184
liquidityMigrator,
183-
"",
184-
address(this),
185+
new bytes(0),
186+
address(0),
185187
salt
186188
)
187189
);
188190

191+
console.log("| Asset Token | %s |", asset);
192+
console.log("+----------------------------+--------------------------------------------+");
193+
189194
require(asset == predictedAsset, "Predicted asset address doesn't match actual");
190195
}
191196
}

0 commit comments

Comments
 (0)