removed PriceConstraint and implemented LineConstraint; MockDeploy copied/separated from Deploy
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
// SPDX-License-Identifier: UNLICENSED
|
||||
// pragma solidity =0.7.6;
|
||||
pragma solidity >=0.8.0;
|
||||
|
||||
import "forge-std/Script.sol";
|
||||
@@ -13,11 +12,9 @@ contract Deploy is Script {
|
||||
function run() external {
|
||||
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
|
||||
vm.startBroadcast(deployerPrivateKey);
|
||||
// Factory deployer = new Factory{salt:keccak256(abi.encode(1))}(); // version 1
|
||||
Factory deployer = new Factory(); // hardhat often breaks on the CREATE2 above :(
|
||||
Factory deployer = new Factory{salt:keccak256(abi.encode(1))}(); // version 1
|
||||
QueryHelper query = new QueryHelper();
|
||||
Dexorder dexorder = new Dexorder();
|
||||
// MockEnv mock = new MockEnv();
|
||||
vm.stopBroadcast();
|
||||
console2.log('Factory');
|
||||
console2.log(address(deployer));
|
||||
@@ -25,7 +22,5 @@ contract Deploy is Script {
|
||||
console2.log(address(query));
|
||||
console2.log('Dexorder');
|
||||
console2.log(address(dexorder));
|
||||
// console2.log('MockEnv'); // todo no mock in production deployment
|
||||
// console2.log(address(mock));
|
||||
}
|
||||
}
|
||||
|
||||
31
script/DeployMock.sol
Normal file
31
script/DeployMock.sol
Normal 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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user