-
Notifications
You must be signed in to change notification settings - Fork 47
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
Pranav Bhardwaj
authored and
Pranav Bhardwaj
committed
Aug 25, 2023
1 parent
f052eb1
commit 50ac613
Showing
15 changed files
with
2,869 additions
and
3 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,27 @@ | ||
import { Signer } from "ethers"; | ||
import { | ||
Address | ||
} from "../types"; | ||
|
||
import { DelegatedManagerFactory } from "../contracts/index"; | ||
import { DelegatedManagerFactory__factory } from "../../typechain/factories/DelegatedManagerFactory__factory"; | ||
|
||
export default class DeployFactories { | ||
private _deployerSigner: Signer; | ||
|
||
constructor(deployerSigner: Signer) { | ||
this._deployerSigner = deployerSigner; | ||
} | ||
|
||
public async deployDelegatedManagerFactory( | ||
managerCore: Address, | ||
controller: Address, | ||
setTokenFactory: Address | ||
): Promise<DelegatedManagerFactory> { | ||
return await new DelegatedManagerFactory__factory(this._deployerSigner).deploy( | ||
managerCore, | ||
controller, | ||
setTokenFactory | ||
); | ||
} | ||
} |
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,91 @@ | ||
import { Signer } from "ethers"; | ||
import { Address } from "../types"; | ||
import { | ||
GlobalBatchTradeExtension, | ||
GlobalClaimExtension, | ||
GlobalIssuanceExtension, | ||
GlobalStreamingFeeSplitExtension, | ||
GlobalTradeExtension, | ||
GlobalWrapExtension | ||
} from "../contracts/index"; | ||
|
||
import { GlobalBatchTradeExtension__factory } from "../../typechain/factories/GlobalBatchTradeExtension__factory"; | ||
import { GlobalClaimExtension__factory } from "../../typechain/factories/GlobalClaimExtension__factory"; | ||
import { GlobalIssuanceExtension__factory } from "../../typechain/factories/GlobalIssuanceExtension__factory"; | ||
import { GlobalStreamingFeeSplitExtension__factory } from "../../typechain/factories/GlobalStreamingFeeSplitExtension__factory"; | ||
import { GlobalTradeExtension__factory } from "../../typechain/factories/GlobalTradeExtension__factory"; | ||
import { GlobalWrapExtension__factory } from "../../typechain/factories/GlobalWrapExtension__factory"; | ||
|
||
export default class DeployGlobalExtensions { | ||
private _deployerSigner: Signer; | ||
|
||
constructor(deployerSigner: Signer) { | ||
this._deployerSigner = deployerSigner; | ||
} | ||
|
||
public async deployGlobalBatchTradeExtension( | ||
managerCore: Address, | ||
tradeModule: Address, | ||
integrations: string[] | ||
): Promise<GlobalBatchTradeExtension> { | ||
return await new GlobalBatchTradeExtension__factory(this._deployerSigner).deploy( | ||
managerCore, | ||
tradeModule, | ||
integrations | ||
); | ||
} | ||
|
||
public async deployGlobalClaimExtension( | ||
managerCore: Address, | ||
airdropModule: Address, | ||
claimModule: Address, | ||
integrationRegistry: Address | ||
): Promise<GlobalClaimExtension> { | ||
return await new GlobalClaimExtension__factory(this._deployerSigner).deploy( | ||
managerCore, | ||
airdropModule, | ||
claimModule, | ||
integrationRegistry | ||
); | ||
} | ||
|
||
public async deployGlobalIssuanceExtension( | ||
managerCore: Address, | ||
basicIssuanceModule: Address | ||
): Promise<GlobalIssuanceExtension> { | ||
return await new GlobalIssuanceExtension__factory(this._deployerSigner).deploy( | ||
managerCore, | ||
basicIssuanceModule, | ||
); | ||
} | ||
|
||
public async deployGlobalStreamingFeeSplitExtension( | ||
managerCore: Address, | ||
streamingFeeModule: Address | ||
): Promise<GlobalStreamingFeeSplitExtension> { | ||
return await new GlobalStreamingFeeSplitExtension__factory(this._deployerSigner).deploy( | ||
managerCore, | ||
streamingFeeModule, | ||
); | ||
} | ||
|
||
public async deployGlobalTradeExtension( | ||
managerCore: Address, | ||
tradeModule: Address | ||
): Promise<GlobalTradeExtension> { | ||
return await new GlobalTradeExtension__factory(this._deployerSigner).deploy( | ||
managerCore, | ||
tradeModule, | ||
); | ||
} | ||
|
||
public async deployGlobalWrapExtension( | ||
managerCore: Address, | ||
wrapModule: Address | ||
): Promise<GlobalWrapExtension> { | ||
return await new GlobalWrapExtension__factory(this._deployerSigner).deploy( | ||
managerCore, | ||
wrapModule, | ||
); | ||
} | ||
} |
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,16 @@ | ||
import { Signer } from "ethers"; | ||
|
||
import { ManagerCore } from "../contracts/index"; | ||
import { ManagerCore__factory } from "../../typechain/factories/ManagerCore__factory"; | ||
|
||
export default class DeployFactories { | ||
private _deployerSigner: Signer; | ||
|
||
constructor(deployerSigner: Signer) { | ||
this._deployerSigner = deployerSigner; | ||
} | ||
|
||
public async deployManagerCore(): Promise<ManagerCore> { | ||
return await new ManagerCore__factory(this._deployerSigner).deploy(); | ||
} | ||
} |
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
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
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