Add quoter set method in contract

This commit is contained in:
lash
2023-08-01 15:33:38 +01:00
parent 51f03be466
commit 17f5d2f340
4 changed files with 11 additions and 3 deletions

View File

@@ -28,6 +28,7 @@ contract SwapPool {
uint256 public sealState;
uint8 constant FEE_STATE = 1;
uint8 constant FEEADDRESS_STATE = 2;
uint8 constant QUOTER_STATE = 2;
uint256 constant public maxSealState = 3;
// Implements Seal
@@ -77,6 +78,13 @@ contract SwapPool {
feePpm = _fee;
}
// Change address for the quoter contract
function setQuoter(address _quoter) public {
require(!isSealed(QUOTER_STATE), "ERR_SEAL");
require(msg.sender == owner, "ERR_AXX");
quoter = _quoter;
}
// Implements EIP173
function transferOwnership(address _newOwner) public returns (bool) {
address oldOwner;