-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
1,821 additions
and
1,673 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,42 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.17; | ||
|
||
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; | ||
import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; | ||
import "./IronVest.sol"; | ||
|
||
interface IIronVest { | ||
function initialize( | ||
string memory _vestingName, | ||
address _signer, | ||
address _defaultAdmin | ||
) external; | ||
} | ||
|
||
contract IronVestProxyDeployer { | ||
event VestingDeployed(address ironVest, bytes data); | ||
event ProxyContsuctorArgs(bytes args); | ||
|
||
function deployIronVest( | ||
address logic, | ||
string memory _vestingName, | ||
address _signer, | ||
address _defaultAdmin, | ||
address admin | ||
) external returns (address) { | ||
bytes memory data = abi.encodeWithSelector( | ||
IIronVest.initialize.selector, | ||
_vestingName, | ||
_signer, | ||
_defaultAdmin | ||
); | ||
|
||
address ironVest = address( | ||
new TransparentUpgradeableProxy(logic, admin, data) | ||
); | ||
emit VestingDeployed(ironVest, data); | ||
bytes memory args = abi.encode(logic, admin, data); | ||
emit ProxyContsuctorArgs(args); | ||
return ironVest; | ||
} | ||
} |
Oops, something went wrong.