Skip to content

Commit

Permalink
Merge pull request #75 from The-Poolz/multiSenderV2
Browse files Browse the repository at this point in the history
added support for MultiSenderV2
  • Loading branch information
ashwinarora authored Mar 25, 2024
2 parents ac0c5b9 + 633e710 commit ddda293
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/contracts/configs/BinanceTest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ export const BinanceTestChainConfig: TChainConfig = {
address: "0xCEC38FA35B3ea4cB56019C4e00d33F5C2307E7eB",
nameVersion: "[email protected]"
},
multiSenderV2: {
address: "0x2206E8B1639800AF0868e503A1e51276E93B47a7",
nameVersion: "[email protected]"
},
delayVaultProvider: {
address: "0x9fd743f499d852E3A2cFEAC037e5562126468D28",
nameVersion: "[email protected]"
Expand Down
13 changes: 13 additions & 0 deletions src/poolz/ThePoolz.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class ThePoolz implements IThePoolzInterface {
public simpleBuilderContract: IThePoolzInterface["simpleBuilderContract"]
public simpleRefundBuilderContract: IThePoolzInterface["simpleRefundBuilderContract"]
public multiSenderContract: IThePoolzInterface["multiSenderContract"]
public multiSenderV2Contract: IThePoolzInterface["multiSenderV2Contract"]
public delayVaultProviderContract: IThePoolzInterface["delayVaultProviderContract"]
public delayVaultMigratorContract: IThePoolzInterface["delayVaultMigratorContract"]
public tokenNFTConnectorContract: IThePoolzInterface["tokenNFTConnectorContract"]
Expand Down Expand Up @@ -101,6 +102,7 @@ class ThePoolz implements IThePoolzInterface {
simpleBuilder,
simpleRefundBuilder,
multiSender,
multiSenderV2,
delayVaultProvider,
delayVaultMigrator,
tokenNFTConnector
Expand Down Expand Up @@ -297,6 +299,17 @@ class ThePoolz implements IThePoolzInterface {
})
)
}
if (multiSenderV2) {
abifetchPromises.push(
this.fetchContractAbi(multiSenderV2.nameVersion)
.then((abi) => {
this.multiSenderV2Contract = { ...multiSenderV2, contract: new this.web3.eth.Contract(abi as AbiItem[], multiSenderV2.address) }
})
.catch((e) => {
console.error(e)
})
)
}
if (delayVaultProvider) {
abifetchPromises.push(
this.fetchContractAbi(delayVaultProvider.nameVersion)
Expand Down
2 changes: 2 additions & 0 deletions src/types/IThePoolzInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export interface IThePoolzInterface {
simpleBuilderContract?: IContractInfo
simpleRefundBuilderContract?: IContractInfo
multiSenderContract?: IContractInfo
multiSenderV2Contract?: IContractInfo
delayVaultProviderContract?: IContractInfo
delayVaultMigratorContract?: IContractInfo
tokenNFTConnectorContract?: IContractInfo
Expand Down Expand Up @@ -120,6 +121,7 @@ export interface IChainConfig {
simpleBuilder: Omit<NonNullable<IThePoolzInterface["simpleBuilderContract"]>, "contract">
simpleRefundBuilder: Omit<NonNullable<IThePoolzInterface["simpleRefundBuilderContract"]>, "contract">
multiSender: Omit<NonNullable<IThePoolzInterface["multiSenderContract"]>, "contract">
multiSenderV2: Omit<NonNullable<IThePoolzInterface["multiSenderV2Contract"]>, "contract">
delayVaultProvider: Omit<NonNullable<IThePoolzInterface["delayVaultProviderContract"]>, "contract">
delayVaultMigrator: Omit<NonNullable<IThePoolzInterface["delayVaultMigratorContract"]>, "contract">
tokenNFTConnector: Omit<NonNullable<IThePoolzInterface["tokenNFTConnectorContract"]>, "contract">
Expand Down

0 comments on commit ddda293

Please sign in to comment.