Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix test deploys
  • Loading branch information
joaquim-verges committed Aug 31, 2022
commit 6c81e87dcb73bfe7b66f9fe758ca82e21065d7de
19 changes: 11 additions & 8 deletions packages/sdk/test/before-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,19 @@ before(async () => {
const thirdwebRegistryAddress = await thirdwebFactoryDeployer.registry();
registryAddress = thirdwebFactoryDeployer.address;

await thirdwebFactoryDeployer.deployed();

await registryContract.grantRole(
await registryContract.OPERATOR_ROLE(),
thirdwebFactoryDeployer.address,
);

const thirdwebFeeDeployer = await new ethers.ContractFactory(
TWFee__factory.abi,
TWFee__factory.bytecode,
)
.connect(signer)
.deploy(trustedForwarderAddress, thirdwebFactoryDeployer.address);
await thirdwebFactoryDeployer.deployed();

// Mock publisher for tests
const mockPublisher = (await new ethers.ContractFactory(
MockContractPublisher__factory.abi,
Expand All @@ -135,18 +141,15 @@ before(async () => {
contractType: ContractType,
): Promise<ethers.Contract> {
switch (contractType) {
case Vote.contractType:
case SignatureDrop.contractType:
case NFTDrop.contractType:
case EditionDrop.contractType:
case TokenDrop.contractType:
return await contractFactory.deploy();
case Marketplace.contractType:
case Pack.contractType:
case Multiwrap.contractType:
const nativeTokenWrapperAddress = getNativeTokenByChainId(
ChainId.Hardhat,
).wrapped.address;
return await contractFactory.deploy(nativeTokenWrapperAddress);
default:
console.log("deploying", contractType);
return await contractFactory.deploy();
}
}
Expand Down