Skip to content

Commit

Permalink
Rename interface IRuleEngineCMTAT to IRuleEngine
Browse files Browse the repository at this point in the history
  • Loading branch information
rya-sge committed Dec 12, 2023
1 parent 05625b8 commit f5c2401
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion contracts/CMTAT_STANDALONE.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ contract CMTAT_STANDALONE is CMTAT_BASE {
uint8 decimalsIrrevocable,
string memory tokenId_,
string memory terms_,
IRuleEngineCMTAT ruleEngine_,
IRuleEngine ruleEngine_,
string memory information_,
uint256 flag_
) MetaTxModule(forwarderIrrevocable) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.0;

import "../draft-IERC1404/draft-IERC1404Wrapper.sol";

interface IRuleEngineCMTAT is IERC1404Wrapper {
interface IRuleEngine is IERC1404Wrapper {
/**
* @dev Returns true if the operation is a success, and false otherwise.
*/
Expand Down
4 changes: 2 additions & 2 deletions contracts/mocks/RuleEngine/RuleEngineMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
pragma solidity ^0.8.20;

import "./interfaces/IRule.sol";
import "./interfaces/IRuleEngine.sol";
import "./interfaces/IRuleEngineMock.sol";
import "./RuleMock.sol";
import "./CodeList.sol";

/*
@title a mock for testing, not suitable for production
*/
contract RuleEngineMock is IRuleEngine {
contract RuleEngineMock is IRuleEngineMock {
IRule[] internal _rules;

constructor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
pragma solidity ^0.8.0;

import "./IRule.sol";
import "../../../interfaces/engine/IRuleEngineCMTAT.sol";
import "../../../interfaces/engine/IRuleEngine.sol";

interface IRuleEngine is IRuleEngineCMTAT {
interface IRuleEngineMock is IRuleEngine {
/**
* @dev define the rules, the precedent rules will be overwritten
*/
Expand Down
4 changes: 2 additions & 2 deletions contracts/modules/CMTAT_BASE.sol
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ abstract contract CMTAT_BASE is
uint8 decimalsIrrevocable,
string memory tokenId_,
string memory terms_,
IRuleEngineCMTAT ruleEngine_,
IRuleEngine ruleEngine_,
string memory information_,
uint256 flag_
) public initializer {
Expand Down Expand Up @@ -91,7 +91,7 @@ abstract contract CMTAT_BASE is
uint8 decimalsIrrevocable,
string memory tokenId_,
string memory terms_,
IRuleEngineCMTAT ruleEngine_,
IRuleEngine ruleEngine_,
string memory information_,
uint256 flag_
) internal onlyInitializing {
Expand Down
8 changes: 4 additions & 4 deletions contracts/modules/internal/ValidationModuleInternal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pragma solidity ^0.8.20;
import "../../../openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol";
import "../../../openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol";
import "../../interfaces/draft-IERC1404/draft-IERC1404Wrapper.sol";
import "../../interfaces/engine/IRuleEngineCMTAT.sol";
import "../../interfaces/engine/IRuleEngine.sol";
/**
* @dev Validation module.
*
Expand All @@ -18,12 +18,12 @@ abstract contract ValidationModuleInternal is
/**
* @dev Emitted when a rule engine is set.
*/
event RuleEngine(IRuleEngineCMTAT indexed newRuleEngine);
event RuleEngine(IRuleEngine indexed newRuleEngine);

IRuleEngineCMTAT public ruleEngine;
IRuleEngine public ruleEngine;

function __Validation_init_unchained(
IRuleEngineCMTAT ruleEngine_
IRuleEngine ruleEngine_
) internal onlyInitializing {
if (address(ruleEngine_) != address(0)) {
ruleEngine = ruleEngine_;
Expand Down
2 changes: 1 addition & 1 deletion contracts/modules/wrapper/controllers/ValidationModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ abstract contract ValidationModule is
@param ruleEngine_ the call will be reverted if the new value of ruleEngine is the same as the current one
*/
function setRuleEngine(
IRuleEngineCMTAT ruleEngine_
IRuleEngine ruleEngine_
) external onlyRole(DEFAULT_ADMIN_ROLE) {
if (ruleEngine == ruleEngine_)
revert Errors.CMTAT_ValidationModule_SameValue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ contract CMTATSnapshotStandaloneTest is CMTAT_BASE_SnapshotTest {
uint8 decimalsIrrevocable,
string memory tokenId_,
string memory terms_,
IRuleEngineCMTAT ruleEngine_,
IRuleEngine ruleEngine_,
string memory information_,
uint256 flag_
) MetaTxModule(forwarderIrrevocable) {
Expand Down
4 changes: 2 additions & 2 deletions contracts/test/CMTATSnapshot/CMTAT_BASE_SnapshotTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ abstract contract CMTAT_BASE_SnapshotTest is
uint8 decimalsIrrevocable,
string memory tokenId_,
string memory terms_,
IRuleEngineCMTAT ruleEngine_,
IRuleEngine ruleEngine_,
string memory information_,
uint256 flag_
) public initializer {
Expand Down Expand Up @@ -82,7 +82,7 @@ abstract contract CMTAT_BASE_SnapshotTest is
uint8 decimalsIrrevocable,
string memory tokenId_,
string memory terms_,
IRuleEngineCMTAT ruleEngine_,
IRuleEngine ruleEngine_,
string memory information_,
uint256 flag_
) internal onlyInitializing {
Expand Down

0 comments on commit f5c2401

Please sign in to comment.