kopia lustrzana https://github.com/bugout-dev/dao
Added "unapproveForPool" on Terminus and...
made it so that Terminus Controller contract proxies `approveForPool` and `unapproveForPool` calls through to its Terminus contract.pull/58/head
rodzic
ac431c9a0e
commit
a5dbb04a6e
|
@ -148,6 +148,11 @@ contract ERC1155WithTerminusStorage is
|
|||
LibTerminus._approveForPool(poolID, operator);
|
||||
}
|
||||
|
||||
function unapproveForPool(uint256 poolID, address operator) external {
|
||||
LibTerminus.enforcePoolIsController(poolID, _msgSender());
|
||||
LibTerminus._unapproveForPool(poolID, operator);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev See {IERC1155-safeTransferFrom}.
|
||||
*/
|
||||
|
|
|
@ -123,4 +123,9 @@ library LibTerminus {
|
|||
LibTerminus.TerminusStorage storage ts = LibTerminus.terminusStorage();
|
||||
ts.globalPoolOperatorApprovals[poolID][operator] = true;
|
||||
}
|
||||
|
||||
function _unapproveForPool(uint256 poolID, address operator) internal {
|
||||
LibTerminus.TerminusStorage storage ts = LibTerminus.terminusStorage();
|
||||
ts.globalPoolOperatorApprovals[poolID][operator] = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -192,6 +192,20 @@ contract TerminusControllerFacet is TerminusPermissions, TokenDrainerFacet {
|
|||
return terminusContract().terminusPoolSupply(poolID);
|
||||
}
|
||||
|
||||
function approveForPool(uint256 poolID, address operator)
|
||||
external
|
||||
onlyMainAdmin
|
||||
{
|
||||
terminusContract().approveForPool(poolID, operator);
|
||||
}
|
||||
|
||||
function unapproveForPool(uint256 poolID, address operator)
|
||||
external
|
||||
onlyMainAdmin
|
||||
{
|
||||
terminusContract().unapproveForPool(poolID, operator);
|
||||
}
|
||||
|
||||
function _approvePoolCreationPayments() internal {
|
||||
IERC20 paymentToken = IERC20(terminusContract().paymentToken());
|
||||
uint256 fee = terminusContract().poolBasePrice();
|
||||
|
|
Ładowanie…
Reference in New Issue