Skip to content

Releases: ourzora/zora-protocol

@zoralabs/[email protected]

28 Nov 01:22
16a753c
Compare
Choose a tag to compare

Patch Changes

  • e4edaac: fixed bug where premint config v2 did not have correct eip-712 domain. fixed bug in CreatorAttribution event where structHash was not included in it

@zoralabs/[email protected]

28 Nov 23:33
f58ee95
Compare
Choose a tag to compare

Patch Changes

  • 97f58b3: MintAPIClient is now a class, that takes a chain id and httpClient in the constructor, enabling the httpClient methods fetch, post, and retries to be overridden.

    new methods on MintAPIClient:

    getMintableForToken - takes a token id and token contract address and returns the mintable for it. Easier to use for fetching specific tokens than getMintable.

    MintClient now takes the optional PublicClient in the constructor instead of in each function, and stores it or creates a default one if none is provided in the constructor. It also takes an optional httpClient param in the constructor, allowing the fetch, post, and retries methods to be overridden when using the api. It now internally creates the MintAPIClient.

    MintClient.makePrepareMintTokenParams has the following changes:

    • returns a SimulateContractParams, instead of an object containing it indexed by key
    • no longer takes a PublicClient as an argument (it should be specified in the constructor instead)

    new function MintClient.getMintCosts takes a mintable and quantity to mint and returns the mintFee, paidMintPrice, and totalCost.

  • d02484e: premintClient can have http methods overridable via DI, and now takes publicClient and http overrides in createPremintClient function. it no longer takes publicClient as an argument in functions, and rather uses them from the constructor. executePremint has been renamed ot makeMintParameters

@zoralabs/[email protected]

28 Nov 01:22
16a753c
Compare
Choose a tag to compare

Patch Changes

  • 128b05c: Updated determinstic preminter deployment script to not fail if already deployed
  • 1d58cd1: Deployed 2.5.2 to zora sepolia and zora goerli
  • 128b05c: Deployed 2.5.1 to zora sepolia and zora goerli
  • Updated dependencies [e4edaac]

@zoralabs/[email protected]

21 Nov 02:57
42aa4ca
Compare
Choose a tag to compare

Patch Changes

  • 68566fc: Fixed setting uid when doing a premint v1

@zoralabs/[email protected]

21 Nov 02:57
42aa4ca
Compare
Choose a tag to compare
Pre-release

Patch Changes

@zoralabs/[email protected]

21 Nov 02:57
42aa4ca
Compare
Choose a tag to compare
Pre-release

Patch Changes

  • dba9bb0: Updated determinstic preminter deployment script to not fail if already deployed
  • 4c4ae23: Deployed 2.5.1 to zora sepolia and zora goerli

@zoralabs/[email protected]

20 Nov 20:36
3af6b1f
Compare
Choose a tag to compare

Minor Changes

  • d84721a: # Premint v2

    New fields on signature

    Adding a new PremintConfigV2 struct that can be signed, that now contains a createReferral. ZoraCreator1155PremintExecutor recognizes new version of the premint config, and still works with the v1 (legacy) version of the PremintConfig. Version one of the premint config still works and is still defined in the PremintConfig struct.

    Additional changes included in PremintConfigV2:

    • tokenConfig.royaltyMintSchedule has been removed as it is deprecated and no longer recognized by new versions of the 1155 contract
    • tokenConfig.royaltyRecipient has been renamed to tokenConfig.payoutRecipient to better reflect the fact that this address is used to receive creator rewards, secondary royalties, and paid mint funds. This is the address that will be set on the royaltyRecipient for the created token on the 1155 contract, which is the address that receives creator rewards and secondary royalties for the token, and on the fundsRecipient on the ZoraCreatorFixedPriceSaleStrategy contract for the token, which is the address that receives paid mint funds for the token.

    New MintArguments on premint functions, specifying mintRecipient and mintReferral

    mintReferral and mintRecipient are now specified in the premint functions on the ZoraCreator1155PremintExecutor, via the MintArguments mintArguments param; new premintV1 and premintV2 functions take a MintArguments struct as an argument which contains mintRecipient, defining which account will receive the minted tokens, mintComment, and mintReferral, defining which account will receive a mintReferral reward, if any. mintRecipient must be specified or else it reverts.

    Replacing external signature validation and authorization check with just authorization check

    ZoraCreator1155PremintExecutor's function isValidSignature(contractConfig, premintConfig) is deprecated in favor of:

    isAuthorizedToCreatePremint(
          address signer,
          address premintContractConfigContractAdmin,
          address contractAddress
    ) public view returns (bool isAuthorized)

    which instead of validating signatures and checking if the signer is authorized to create premints, just checks if an signer is authorized to create premints on the contract. This offloads signature decoding/validation to calling clients offchain, and reduces needing to create different signatures for this function on the contract for each version of the premint config. It also allows Premints to be validated on contracts that were not created using premints, such as contracts that are upgraded, and contracts created directly via the factory.

    Changes to handling of setting of fundsRecipient

    Previously the fundsRecipient on the fixed priced minters' sales config for the token was set to the signer of the premint. This has been changed to be set to the payoutRecipient of the premint config on PremintConfigV2, and to the royaltyRecipient of the premint config for v1 of the premint config, for 1155 contracts that are to be newly created, and for existing 1155 contracts that are upgraded to the latest version.

    Changes to 1155's delegateSetupNewToken

    delegateSetupNewToken on 1155 contract has been updated to now take an abi encoded premint config, premint config version, and send it to an external library to decode the config, the signer, and setup actions. Previously it took a non-encoded PremintConfig. This new change allows this function signature to support multiple versions of a premint config, while offloading decoding of the config and the corresponding setup actions to the external library. This ultimately allows supporting multiple versions of a premint config and corresponding signature without increasing codespace.

    PremintConfigV2 are updated to contain createReferral, and now look like:

    struct PremintConfigV2 {
      // The config for the token to be created
      TokenCreationConfigV2 tokenConfig;
      // Unique id of the token, used to ensure that multiple signatures can't be used to create the same intended token.
      // only one signature per token id, scoped to the contract hash can be executed.
      uint32 uid;
      // Version of this premint, scoped to the uid and contract.  Not used for logic in the contract, but used externally to track the newest version
      uint32 version;
      // If executing this signature results in preventing any signature with this uid from being minted.
      bool deleted;
    }
    
    struct TokenCreationConfigV2 {
      // Metadata URI for the created token
      string tokenURI;
      // Max supply of the created token
      uint256 maxSupply;
      // Max tokens that can be minted for an address, 0 if unlimited
      uint64 maxTokensPerAddress;
      // Price per token in eth wei. 0 for a free mint.
      uint96 pricePerToken;
      // The start time of the mint, 0 for immediate.  Prevents signatures from being used until the start time.
      uint64 mintStart;
      // The duration of the mint, starting from the first mint of this token. 0 for infinite
      uint64 mintDuration;
      // RoyaltyBPS for created tokens. The royalty amount in basis points for secondary sales.
      uint32 royaltyBPS;
      // The address that will receive creatorRewards, secondary royalties, and paid mint funds.  This is the address that will be set on the `royaltyRecipient` for the created token on the 1155 contract, which is the address that receives creator rewards and secondary royalties for the token, and on the `fundsRecipient` on the ZoraCreatorFixedPriceSaleStrategy contract for the token, which is the address that receives paid mint funds for the token.
      address payoutRecipient;
      // Fixed price minter address
      address fixedPriceMinter;
      // create referral
      address createReferral;
    }

    PremintConfig fields are the same as they were before, but are treated as a version 1:

    struct PremintConfig {
      // The config for the token to be created
      TokenCreationConfig tokenConfig;
      // Unique id of the token, used to ensure that multiple signatures can't be used to create the same intended token.
      // only one signature per token id, scoped to the contract hash can be executed.
      uint32 uid;
      // Version of this premint, scoped to the uid and contract.  Not used for logic in the contract, but used externally to track the newest version
      uint32 version;
      // If executing this signature results in preventing any signature with this uid from being minted.
      bool deleted;
    }
    
    struct TokenCreationConfig {
      // Metadata URI for the created token
      string tokenURI;
      // Max supply of the created token
      uint256 maxSupply;
      // Max tokens that can be minted for an address, 0 if unlimited
      uint64 maxTokensPerAddress;
      // Price per token in eth wei. 0 for a free mint.
      uint96 pricePerToken;
      // The start time of the mint, 0 for immediate.  Prevents signatures from being used until the start time.
      uint64 mintStart;
      // The duration of the mint, starting from the first mint of this token. 0 for infinite
      uint64 mintDuration;
      // deperecated field; will be ignored.
      uint32 royaltyMintSchedule;
      // RoyaltyBPS for created tokens. The royalty amount in basis points for secondary sales.
      uint32 royaltyBPS;
      // The address that will receive creatorRewards, secondary royalties, and paid mint funds.  This is the address that will be set on the `royaltyRecipient` for the created token on the 1155 contract, which is the address that receives creator rewards and secondary royalties for the token, and on the `fundsRecipient` on the ZoraCreatorFixedPriceSaleStrategy contract for the token, which is the address that receives paid mint funds for the token.
      address royaltyRecipient;
      // Fixed price minter address
      address fixedPriceMinter;
    }

    Changes to ZoraCreator1155PremintExecutorImpl:

    • new function premintV1 - takes a PremintConfig, and premint v1 signature, and executes a premint, with added functionality of being able to specify mint referral and mint recipient
    • new function premintV2 - takes a PremintConfigV2 signature and executes a premint, with being able to specify mint referral and mint recipient
    • deprecated function premint - call premintV1 instead
    • new function
    isAuthorizedToCreatePremint(
            address signer,
            address premintContractConfigContractAdmin,
            address contractAddress
    ) public view returns (bool isAuthorized)

    takes a signer, contractConfig.contractAdmin, and 1155 address, and determines if the signer is authorized to sign premints on the given contract. Replaces isValidSignature - by putting the burden on clients to first decode the signature, then pass the recovered signer to this function to determine if the signer has premint authorization on the contract.

    • deprecated function isValidSignature - call isAuthorizedToCreatePremint instead

Patch Changes

  • 885ffa4: Premint executor can still execute premint mints that were created with V1 signatures for delegateSetupNewToken
  • ffb5cb7: Premint - added method getSupportedPremintSignatureVersions(contractAddress) that returns an array of the premint signature versions an 1155 contract supports. If the contract hasn't been created yet, assumes that when it will be created it will support the latest versions of the signatures, so the function returns all versions.
  • ffb5cb7: Added method IZoraCreator1155PremintExecutor.supportedPremintSignatureVersions(contractAddress) that tells what version of the premint signat...
Read more

@zoralabs/[email protected]

20 Nov 20:36
3af6b1f
Compare
Choose a tag to compare

Patch Changes

  • de0b0b7: preminter exposes new function isValidSignatureV1 that recovers a signer from a signed premint and determines if that signer is authorized to sign
  • Updated dependencies [f3b7df8]

@zoralabs/[email protected]

20 Nov 20:36
3af6b1f
Compare
Choose a tag to compare

Patch Changes

@zoralabs/[email protected]

15 Nov 01:01
e0fbd5f
Compare
Choose a tag to compare

Patch Changes