-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add min and max range for Sale and deploy script (#190)
Why: * The Sale contract needs to have a minimum and maximum amount to raise. When the maximum is reached, Rising Tide triggers for the final time * We want to have a mock Sale contract deployed in Sepolia so we can start testing the integration with the UI How: * Adding the `minTarget` and `maxTarget` variables to the Sale contract * Adding a `Deploy.s.sol` script to deploy mock Sale and MockERC20 contracts * Updating the tests and the foundry config
- Loading branch information
1 parent
7463893
commit d0e38d6
Showing
5 changed files
with
66 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.20; | ||
|
||
import {Script} from "lib/forge-std/src/Script.sol"; | ||
|
||
import {MockERC20} from "contracts/test/MockERC20.sol"; | ||
import {Sale} from "contracts/token/Sale.sol"; | ||
|
||
contract DeployScript is Script { | ||
function run() public { | ||
vm.startBroadcast(); | ||
|
||
uint start = vm.unixTime(); | ||
uint end = start + 60 * 60 * 24 * 7; | ||
|
||
MockERC20 token = new MockERC20("USDC", "USDC", 18); | ||
Sale sale = new Sale( | ||
address(token), | ||
1 ** 18, | ||
start, | ||
end, | ||
1000, | ||
1000000, | ||
2000000 | ||
); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} |
This file contains 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
This file contains 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