Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,13 @@ Express 10% in MPS as 1e6 (1,000,000). Over 50 blocks this is 1e6 / 50 = 20,000
Pack this into a bytes8 value:

```solidity
bytes8 firstTranche = uint64(20_000) | (uint64(50) << 24);
bytes8 firstTranche = uint64(50) | (uint64(20_000) << 40);
```

Repeat this for the rest of the tranches to get the final auction steps data:
```solidity
bytes8 secondTranche = uint64(100_000) | (uint64(49) << 24); // 49e6 / 49 = 100_000 MPS per block
bytes8 thirdTranche = uint64(4_100_000) | (uint64(1) << 24); // 41e6 / 1 = 4_100_000 MPS per block
bytes8 secondTranche = bytes8(uint64(49) | (uint64(100_000) << 40)); // 49e6 / 49 = 100_000 MPS per block
bytes8 thirdTranche = bytes8(uint64(1) | (uint64(4_100_000) << 40)); // 41e6 / 1 = 4_100_000 MPS per block
```

Finally, pack the auction steps data into a bytes array:
Expand Down Expand Up @@ -266,11 +266,11 @@ contract ExampleCCADeploymentScript is Script {

Let's run the script:
```bash
forge script scripts/ExampleCCADeploymentScript.s.sol:ExampleCCADeploymentScript \
DEPLOYER=<your-address> forge script scripts/ExampleCCADeploymentScript.s.sol:ExampleCCADeploymentScript \
--rpc-url http://localhost:8545 --private-key <your-private-key> --broadcast
```

The deployment should be successful and you should see the factory and auction contract addresses logged to the console.

### Next steps
In the next section we'll write some scripts to interact with the deployed auction contract.
In the next section we'll write some scripts to interact with the deployed auction contract.