-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add-deployments
- Loading branch information
Showing
12 changed files
with
172 additions
and
28 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity >=0.8.0 <0.9.0; | ||
|
||
import {Script} from "forge-std/Script.sol"; | ||
|
||
import {DeployUniswapV2PriceOracle, UniswapV2PriceOracle} from "./single-deployment/UniswapV2PriceOracle.s.sol"; | ||
import {DeployConstantProduct, ConstantProduct} from "./single-deployment/ConstantProduct.s.sol"; | ||
|
||
contract DeployAllContracts is DeployConstantProduct, DeployUniswapV2PriceOracle { | ||
function run() public override(DeployConstantProduct, DeployUniswapV2PriceOracle) { | ||
deployAll(); | ||
} | ||
|
||
function deployAll() public returns (ConstantProduct constantProduct, UniswapV2PriceOracle uniswapV2PriceOracle) { | ||
constantProduct = deployConstantProduct(); | ||
uniswapV2PriceOracle = deployUniswapV2PriceOracle(); | ||
} | ||
} |
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,17 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity >=0.8.0 <0.9.0; | ||
|
||
import {Script} from "forge-std/Script.sol"; | ||
|
||
import {ConstantProduct} from "src/ConstantProduct.sol"; | ||
|
||
contract DeployConstantProduct is Script { | ||
function run() public virtual { | ||
deployConstantProduct(); | ||
} | ||
|
||
function deployConstantProduct() internal returns (ConstantProduct) { | ||
vm.broadcast(); | ||
return new ConstantProduct(); | ||
} | ||
} |
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,17 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity >=0.8.0 <0.9.0; | ||
|
||
import {Script} from "forge-std/Script.sol"; | ||
|
||
import {UniswapV2PriceOracle} from "src/oracles/UniswapV2PriceOracle.sol"; | ||
|
||
contract DeployUniswapV2PriceOracle is Script { | ||
function run() public virtual { | ||
deployUniswapV2PriceOracle(); | ||
} | ||
|
||
function deployUniswapV2PriceOracle() internal returns (UniswapV2PriceOracle) { | ||
vm.broadcast(); | ||
return new UniswapV2PriceOracle(); | ||
} | ||
} |
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,19 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity >=0.8.0 <0.9.0; | ||
|
||
/** | ||
* @title Watchtower Custom Error Interface | ||
* @author CoW Protocol Developers | ||
* @dev An interface that collects all custom error message for the watchtower. | ||
* Different error messages lead to different watchtower behaviors when creating | ||
* an order. | ||
* @dev The watchtower is a service that automatically posts orders to the CoW | ||
* Protocol orderbook at regular intervals. | ||
*/ | ||
contract IWatchtowerCustomErrors { | ||
/** | ||
* No order is currently available for trading, but the watchtower should | ||
* try again at the specified timestamp. | ||
*/ | ||
error PollTryAtEpoch(uint256 timestamp, string message); | ||
} |
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,18 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity >=0.8.0 <0.9.0; | ||
|
||
import {Test} from "forge-std/Test.sol"; | ||
|
||
import {DeployAllContracts} from "script/DeployAllContracts.s.sol"; | ||
|
||
contract DeployAllContractsTest is Test { | ||
DeployAllContracts script; | ||
|
||
function setUp() public { | ||
script = new DeployAllContracts(); | ||
} | ||
|
||
function testDoesNotRevert() public { | ||
script.run(); | ||
} | ||
} |
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,18 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity >=0.8.0 <0.9.0; | ||
|
||
import {Test} from "forge-std/Test.sol"; | ||
|
||
import {DeployConstantProduct} from "script/single-deployment/ConstantProduct.s.sol"; | ||
|
||
contract DeployConstantProductTest is Test { | ||
DeployConstantProduct script; | ||
|
||
function setUp() public { | ||
script = new DeployConstantProduct(); | ||
} | ||
|
||
function testDoesNotRevert() public { | ||
script.run(); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
test/script/single-deployment/DeployUniswapV2PriceOracle.sol
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,18 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity >=0.8.0 <0.9.0; | ||
|
||
import {Test} from "forge-std/Test.sol"; | ||
|
||
import {DeployUniswapV2PriceOracle} from "script/single-deployment/UniswapV2PriceOracle.s.sol"; | ||
|
||
contract DeployUniswapV2PriceOracleTest is Test { | ||
DeployUniswapV2PriceOracle script; | ||
|
||
function setUp() public { | ||
script = new DeployUniswapV2PriceOracle(); | ||
} | ||
|
||
function testDoesNotRevert() public { | ||
script.run(); | ||
} | ||
} |