Commit 77452aca authored by Andreas Bigger's avatar Andreas Bigger Committed by Mark Tyneway

Initialize dgf in constructor

parent ae8a3a74
......@@ -43,18 +43,18 @@ contract DisputeGameFactory is OwnableUpgradeable, IDisputeGameFactory, IVersion
IDisputeGame[] public disputeGameList;
/**
* @notice Constructs a new DisputeGameFactory contract. Set the owner
* to `address(0)` to prevent accidental usage of the implementation.
* @notice Constructs a new DisputeGameFactory contract.
* @param _owner The owner of the contract.
*/
constructor() OwnableUpgradeable() {
_transferOwnership(address(0));
constructor(address _owner) OwnableUpgradeable() {
initialize(_owner);
}
/**
* @notice Initializes the contract.
* @param _owner The owner of the contract.
*/
function initialize(address _owner) external initializer {
function initialize(address _owner) public initializer {
__Ownable_init();
_transferOwnership(_owner);
}
......
......@@ -22,7 +22,7 @@ contract DisputeGameFactory_Initializer is Test {
function setUp() public virtual {
Proxy proxy = new Proxy(address(this));
DisputeGameFactory impl = new DisputeGameFactory();
DisputeGameFactory impl = new DisputeGameFactory(address(this));
proxy.upgradeToAndCall({
_implementation: address(impl),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment