Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions .changeset/weak-meals-lay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@thirdweb-dev/sdk": patch
---

Allow forcing direct deploys to deploy implementations from release flow
8 changes: 6 additions & 2 deletions packages/sdk/src/core/classes/contract-deployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,10 +502,14 @@ export class ContractDeployer extends RPCConnectionHandler {
* @internal
* @param publishMetadataUri
* @param constructorParamValues
* @param options
*/
public async deployContractFromUri(
publishMetadataUri: string,
constructorParamValues: any[],
options?: {
forceDirectDeploy?: boolean;
},
) {
const signer = this.getSigner();
invariant(signer, "A signer is required");
Expand All @@ -527,8 +531,8 @@ export class ContractDeployer extends RPCConnectionHandler {
} catch (e) {
// not a factory deployment, ignore
}

if (isDeployableViaFactory && factoryDeploymentData) {
const forceDirectDeploy = options?.forceDirectDeploy || false;
if (isDeployableViaFactory && factoryDeploymentData && !forceDirectDeploy) {
const chainId = (await this.getProvider().getNetwork()).chainId;
invariant(
factoryDeploymentData.factoryAddresses,
Expand Down