-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #286 from vzotova/free-fee-model
Free fee model
- Loading branch information
Showing
8 changed files
with
543 additions
and
386 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
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 | ||
} | ||
} |
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
Oops, something went wrong.