Skip to content
Compare
Choose a tag to compare
@jnsdls jnsdls released this 23 Nov 04:28
· 21 commits to main since this release
de2a7ba

Minor Changes

  • #5501 ac42c45 Thanks @gregfromstl! - Added new deployment utility functions to help manage infrastructure contracts and initialization:

    • getInitializeTransaction: Prepare initialization transaction for contract deployment
    • getOrDeployInfraForPublishedContract: Get or deploy required infrastructure for published contracts
    import {
      getInitializeTransaction,
      getOrDeployInfraForPublishedContract,
    } from "thirdweb";
    
    // Get initialization transaction
    const initTx = await getInitializeTransaction({
      client,
      chain,
      account,
      implementationContract,
      deployMetadata,
      initializeParams: {
        name: "My Contract",
        symbol: "CNTRCT",
      },
    });
    
    // Get or deploy infrastructure
    const infra = await getOrDeployInfraForPublishedContract({
      chain,
      client,
      account,
      contractId: "MyContract",
      constructorParams: params,
    });