Skip to content
Compare
Choose a tag to compare
@jnsdls jnsdls released this 12 Sep 18:23
· 714 commits to main since this release
22e066c

Minor Changes

  • #4527 b76a82c Thanks @joaquim-verges! - Update React Native dependencies and add support for React Native 0.75

  • #4499 fe1ff63 Thanks @joaquim-verges! - Breaking Change in deployPublishedContract

    Contract constructor/ initializer params are now passed as a single object instead of an array. The object should have the same shape as the params defined in the contract's ABI.

    Example of old way (using constructorParams or initializeParams):

    const address = await deployPublishedContract({
      account,
      chain,
      client,
      contractId: "Airdrop",
      contractParams: [TEST_ACCOUNT_A.address, ""],
    });

    New way (using contractParams):

    const address = await deployPublishedContract({
      account,
      chain,
      client,
      contractId: "Airdrop",
      contractParams: {
        defaultAdmin: TEST_ACCOUNT_A.address,
        contractURI: "",
      },
    });
  • #4528 c96e2d9 Thanks @joaquim-verges! - Handle salt parameter for deterministic deploys of published contracts

    You can now pass a salt parameter to the deployPublishedContract function to deploy a contract deterministically.

    const address = await deployPublishedContract({
      client,
      chain,
      account,
      contractId: "Airdrop",
      contractParams: {
        defaultAdmin: "0x...",
        contractURI: "ipfs://...",
      },
      salt: "test", // <--- deterministic deploy
    });

    This also works for unpublished contracts, via the deployContract function.

    const address = await deployContract({
      client,
      chain,
      account,
      bytecode: "0x...",
      abi: contractAbi,
      constructorParams: {
        param1: "value1",
        param2: 123,
      },
      salt: "test", // <--- deterministic deploy
    });
  • #4541 0596fa2 Thanks @gregfromstl! - Adds getUsers function to query users on the server

    import { getUser } from "thirdweb/wallets";
    
    const user = await getUser({
      client,
      walletAddress: "0x123...",
    });

Patch Changes