Skip to content

Commit

Permalink
chris format & licence update
Browse files Browse the repository at this point in the history
Signed-off-by: chrismaree <christopher.maree@gmail.com>
  • Loading branch information
chrismaree committed May 17, 2024
1 parent e4aeac8 commit 0c2402f
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 43 deletions.
33 changes: 33 additions & 0 deletions src/factories/ImmutableOvalChainlinkFactory.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.17;

import {ImmutableController} from "../controllers/ImmutableController.sol";
import {ChainlinkSourceAdapter} from "../adapters/source-adapters/ChainlinkSourceAdapter.sol";
import {ChainlinkDestinationAdapter} from "../adapters/destination-adapters/ChainlinkDestinationAdapter.sol";
import {IAggregatorV3Source} from "../interfaces/chainlink/IAggregatorV3Source.sol";

contract OvalChainlinkImmutable is ImmutableController, ChainlinkSourceAdapter, ChainlinkDestinationAdapter {
constructor(
IAggregatorV3Source source,
address[] memory unlockers,
uint256 _lockWindow,
uint256 _maxTraversal,
address owner
)
ChainlinkSourceAdapter(source)
ImmutableController(_lockWindow, _maxTraversal, unlockers)
ChainlinkDestinationAdapter(source.decimals())
{}
}

contract MutableUnlockersOvalChainlinkFactory {
function createImmutableOvalChainlink(
IAggregatorV3Source source,
uint256 lockWindow,
uint256 maxTraversal,
address owner,
address[] memory unlockers
) external returns (address) {
return address(new OvalChainlinkImmutable(source, unlockers, lockWindow, maxTraversal, owner));
}
}
43 changes: 0 additions & 43 deletions src/factories/MutableUnlockersFactory.sol

This file was deleted.

39 changes: 39 additions & 0 deletions src/factories/MutableUnlockersOvalChainlinkFactory.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.17;

import {MutableUnlockersController} from "../controllers/MutableUnlockersController.sol";
import {ChainlinkSourceAdapter} from "../adapters/source-adapters/ChainlinkSourceAdapter.sol";
import {ChainlinkDestinationAdapter} from "../adapters/destination-adapters/ChainlinkDestinationAdapter.sol";
import {IAggregatorV3Source} from "../interfaces/chainlink/IAggregatorV3Source.sol";

contract OvalChainlinkMutableUnlocker is
MutableUnlockersController,
ChainlinkSourceAdapter,
ChainlinkDestinationAdapter
{
constructor(
IAggregatorV3Source source,
address[] memory unlockers,
uint256 _lockWindow,
uint256 _maxTraversal,
address owner
)
ChainlinkSourceAdapter(source)
MutableUnlockersController(_lockWindow, _maxTraversal, unlockers)
ChainlinkDestinationAdapter(source.decimals())
{
_transferOwnership(owner);
}
}

contract MutableUnlockersOvalChainlinkFactory {
function createMutableUnlockerOvalChainlink(
IAggregatorV3Source source,
uint256 lockWindow,
uint256 maxTraversal,
address owner,
address[] memory unlockers
) external returns (address) {
return address(new OvalChainlinkMutableUnlocker(source, unlockers, lockWindow, maxTraversal, owner));
}
}

0 comments on commit 0c2402f

Please sign in to comment.