-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from etherisc/feature/deployer-contract-features
Improve deployer contract
- Loading branch information
Showing
6 changed files
with
183 additions
and
85 deletions.
There are no files selected for viewing
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
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,24 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.20; | ||
|
||
import {BasicDistribution} from "./BasicDistribution.sol"; | ||
import {NftId} from "gif-next/contracts/type/NftId.sol"; | ||
|
||
library DistributionDeployer { | ||
|
||
function deployDistribution(address registry, | ||
NftId instanceNftId, | ||
address initialDistributionOwner, | ||
string memory deploymentId, | ||
address token) public returns (BasicDistribution) { | ||
return new BasicDistribution( | ||
registry, | ||
instanceNftId, | ||
initialDistributionOwner, | ||
string.concat("BasicDistribution", deploymentId), | ||
token, | ||
"", | ||
"" | ||
); | ||
} | ||
} |
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,25 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.20; | ||
|
||
import {BasicPool} from "./BasicPool.sol"; | ||
import {NftId} from "gif-next/contracts/type/NftId.sol"; | ||
|
||
library PoolDeployer { | ||
|
||
function deployPool(address registry, | ||
NftId instanceNftId, | ||
address initialPoolOwner, | ||
string memory deploymentId, | ||
address token) public returns (BasicPool) { | ||
return new BasicPool( | ||
registry, | ||
instanceNftId, | ||
initialPoolOwner, | ||
string.concat("BasicPool", deploymentId), | ||
token, | ||
false, | ||
"", | ||
"" | ||
); | ||
} | ||
} |
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,30 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.20; | ||
|
||
import {InsuranceProduct} from "./InsuranceProduct.sol"; | ||
import {NftId} from "gif-next/contracts/type/NftId.sol"; | ||
|
||
|
||
library ProductDeployer { | ||
|
||
function deployProduct(address registry, | ||
NftId instanceNftId, | ||
address initialProductOwner, | ||
string memory deploymentId, | ||
address token, | ||
address poolAddress, | ||
address distributionAddress) public returns (InsuranceProduct) { | ||
return new InsuranceProduct( | ||
registry, | ||
instanceNftId, | ||
initialProductOwner, | ||
string.concat("InsuranceProduct", deploymentId), | ||
token, | ||
false, | ||
poolAddress, | ||
distributionAddress, | ||
"", | ||
"" | ||
); | ||
} | ||
} |
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
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