Skip to content

Commit

Permalink
Merge pull request #286 from vzotova/free-fee-model
Browse files Browse the repository at this point in the history
Free fee model
  • Loading branch information
cygnusv authored Jul 11, 2024
2 parents fac658c + d0a809e commit 6a97341
Show file tree
Hide file tree
Showing 8 changed files with 543 additions and 386 deletions.
39 changes: 39 additions & 0 deletions contracts/contracts/coordination/FreeFeeModel.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// SPDX-License-Identifier: AGPL-3.0-or-later

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";

/**
* @title FreeFeeModel
* @notice Free FeeModel
*/
contract FreeFeeModel is Ownable {
mapping(address initiator => bool approved) public initiatorWhiteList;

constructor() Ownable(msg.sender) {}

function approveInitiator(address initiator) external onlyOwner {
initiatorWhiteList[initiator] = true;
}

function processRitualPayment(address initiator, uint32, uint256, uint32) external {
require(initiatorWhiteList[initiator], "Initiator not approved");
}

function processRitualExtending(address initiator, uint32, uint256, uint32) external {
require(initiatorWhiteList[initiator], "Initiator not approved");
}

function beforeSetAuthorization(
uint32 ritualId,
address[] calldata addresses,
bool value
) external {
// solhint-disable-previous-line no-empty-blocks
}

function beforeIsAuthorized(uint32 ritualId) external view {
// solhint-disable-previous-line no-empty-blocks
}
}
2 changes: 0 additions & 2 deletions contracts/contracts/coordination/IFeeModel.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

/**
* @title IFeeModel
* @notice IFeeModel
Expand Down
Loading

0 comments on commit 6a97341

Please sign in to comment.