removed PriceConstraint and implemented LineConstraint; MockDeploy copied/separated from Deploy

This commit is contained in:
Tim Olson
2023-11-01 17:56:25 -04:00
parent 7b64745438
commit 03b7ac11e3
7 changed files with 122 additions and 49 deletions

31
script/DeployMock.sol Normal file
View File

@@ -0,0 +1,31 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.8.0;
import "forge-std/Script.sol";
import "forge-std/console2.sol";
import "../src/QueryHelper.sol";
import "../src/Factory.sol";
import "../src/Dexorder.sol";
import "../test/MockEnv.sol";
contract DeployMock is Script {
function run() external {
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
vm.startBroadcast(deployerPrivateKey);
// hardhat often breaks on the CREATE2 so we disable it for mock
// Factory deployer = new Factory{salt:keccak256(abi.encode(1))}(); // version 1
Factory deployer = new Factory();
QueryHelper query = new QueryHelper();
Dexorder dexorder = new Dexorder();
MockEnv mock = new MockEnv();
vm.stopBroadcast();
console2.log('Factory');
console2.log(address(deployer));
console2.log('QueryHelper');
console2.log(address(query));
console2.log('Dexorder');
console2.log(address(dexorder));
console2.log('MockEnv');
console2.log(address(mock));
}
}