Skip to content

Commit

Permalink
Merge branch 'release/1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
taha-abbasi committed Nov 8, 2022
2 parents 5825dc3 + dad64e1 commit 409eb90
Show file tree
Hide file tree
Showing 8 changed files with 1,821 additions and 1,673 deletions.
732 changes: 732 additions & 0 deletions contracts/IronVestAdminRequired.sol

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions contracts/IronVestDeployer.sol
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;
}
}
Loading

0 comments on commit 409eb90

Please sign in to comment.