diff --git a/DEVELOPING.md b/DEVELOPING.md index eb09b5f6c..8f5bf9225 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -41,7 +41,5 @@ Publishing happens in the following steps: * Running the command `pnpm changeset` will generate **a new changeset** in the `./changesets` directory. This changeset will be used to determine the next version of the bundled packages; this commit should then be pushed. * The changeset and smart contract addresses are pushed to the branch. * The pr is merged into main - any changesets in the PR are detected by a github action `release`, which will then **open a new PR** with proper versions and readme updated in each each package. If more changesets are pushed to main before this branch is merged, the PR will continuously update the version of the packages according to the changeset specification. - -7. That version is merged into main along with the new versions. - -8. The package is then published to npm with the command: `pnpm run publish-packages` and the package is published. +* That version is merged into main along with the new versions. +* The package is then published to npm with the command: `pnpm run publish-packages` and the package is published. diff --git a/docs/pages/bug-bounty/bug-bounty-program.mdx b/docs/pages/bug-bounty/bug-bounty-program.mdx index aa19d74cc..ac2105f3e 100644 --- a/docs/pages/bug-bounty/bug-bounty-program.mdx +++ b/docs/pages/bug-bounty/bug-bounty-program.mdx @@ -53,7 +53,7 @@ _Please note: All bounty rewards will be denoted as USD and will be paid out as ### Program Rules - Only submit one vulnerability per report. -- When duplicates occur, we will only accept the first report that was received, as long as it fulfils our submission criteria and can be fully reproduced. +- When duplicates occur, we will only accept the first report that was received, as long as it fulfills our submission criteria and can be fully reproduced. - Social engineering targeted to Zora employees is prohibited. - Publishing sensitive information discovered during security testing is prohibited. - Vulnerabilities that Zora is aware of will not be rewarded. diff --git a/docs/pages/changelogs/1155-contracts.mdx b/docs/pages/changelogs/1155-contracts.mdx index 749bddcde..4e030f920 100644 --- a/docs/pages/changelogs/1155-contracts.mdx +++ b/docs/pages/changelogs/1155-contracts.mdx @@ -62,7 +62,7 @@ ### Minor Changes -- [d460e79c](https://github.com/ourzora/zora-protocol/commit/d460e79c): - Introduced a `reduceSupply` function allowing an approved minter or admin to reduce the supply for a given token id. New supply must be less than the current maxSupply, and greater than or equal to the total minted so far. +- [d460e79c](https://github.com/ourzora/zora-protocol/commit/d460e79c): - Introduced a `reduceSupply` function allowing an approved minter or admin to reduce the supply for a given token id. The new supply must be less than the current maxSupply, and greater than or equal to the total minted so far. - Removed the deprecated `mintWithRewards` function ## 2.10.1 @@ -251,7 +251,7 @@ #### New ability to do premints against existing contracts - Executing premint against contracts not created via premint can be done with by passing a `premintCollection` argument to the new `premint` function: + Executing premint against contracts not created via premint can be done by passing a `premintCollection` argument to the new `premint` function: ```solidity function premint( @@ -339,7 +339,7 @@ - remove `ZoraCreator1155Impl.adminMintBatch` to save contract size - 50a4e09: - To support the MINTs contract passing the first minter as an argument to `premintV2WithSignerContract` - we add the field `firstMinter` to `premintV2WithSignerContract`, and then in the 1155 check that the firstMinter argument is not address(0) since it now can be passed in manually. -### ZoraCreator1155Impl rewards splits are percentage based instead of a fixed value. +### ZoraCreator1155Impl rewards splits are percentage-based instead of a fixed value. Prior to 2.9.0, rewards were distributed based on a fixed value in ETH per token minted. From 2.9.0 rewards are distributed based on a percentage of the total reward collected for a mint. The following table breaks down the reward splits for both free and paid mints before and after 2.9.0: @@ -377,7 +377,7 @@ Prior to 2.9.0, rewards were distributed based on a fixed value in ETH per token ### Patch Changes -- 52b16aa: Publishing package in format that supports commonjs imports by specifying exports. +- 52b16aa: Publishing package in a format that supports commonjs imports by specifying exports. ## 2.7.2 @@ -397,7 +397,7 @@ Prior to 2.9.0, rewards were distributed based on a fixed value in ETH per token ### Minor Changes -- e990b9d: Remove platform referral from RewardsSplits. Use new signature for 1155 for `mint` which takes an array of reward recipients. +- e990b9d: Remove platform referral from RewardsSplits. Use a new signature for 1155 for `mint` which takes an array of reward recipients. ### Patch Changes @@ -408,7 +408,7 @@ Prior to 2.9.0, rewards were distributed based on a fixed value in ETH per token ### Patch Changes -- 7e00197: \* For premintV1 and V2 - mintReferrer has been changed to an array `mintRewardsRecipients` - which the first element in array is `mintReferral`, and second element is `platformReferral`. `platformReferral is not used by the premint contract yet`. +- 7e00197: \* For premintV1 and V2 - mintReferrer has been changed to an array `mintRewardsRecipients` - which the first element in an array is `mintReferral`, and the second element is `platformReferral`. `platformReferral is not used by the premint contract yet`. ## 2.5.3 @@ -549,7 +549,7 @@ Prior to 2.9.0, rewards were distributed based on a fixed value in ETH per token ### 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 `premintV1` - takes a `PremintConfig`, and premint v1 signature, and executes a premint, with the 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 diff --git a/docs/pages/contracts/ERC721Drop.mdx b/docs/pages/contracts/ERC721Drop.mdx index c1390ef8a..cdfd4c8dc 100644 --- a/docs/pages/contracts/ERC721Drop.mdx +++ b/docs/pages/contracts/ERC721Drop.mdx @@ -217,7 +217,7 @@ Once the contract is deployed, the address that is set as the owner will need to ## Upgrading the Contract Once deployed it is possible to upgrade the NFT contract to have new functionality. -Note, that upgrade options are on the ones that are in the [Zora registry](https://github.com/ourzora/zora-drops-contracts/blob/main/src/FactoryUpgradeGate.sol). +Note, that upgrade options are only the ones that are in the [Zora registry](https://github.com/ourzora/zora-drops-contracts/blob/main/src/FactoryUpgradeGate.sol). All upgrades are opt-in and can only be initiated by a default admin. `upgradeTo` allows the NFT contract to upgrade to a new implementation contract to make delegate calls. diff --git a/docs/pages/contracts/ZoraTimedSaleStrategy.mdx b/docs/pages/contracts/ZoraTimedSaleStrategy.mdx index ccfdc6fa3..24ccb3589 100644 --- a/docs/pages/contracts/ZoraTimedSaleStrategy.mdx +++ b/docs/pages/contracts/ZoraTimedSaleStrategy.mdx @@ -1,6 +1,6 @@ # Zora Timed Sale Strategy -The Zora Sale Timed Sale Strategy introduces a new mint fee and [enables a secondary market that is powered by Uniswap V3](https://support.zora.co/en/categories/577345-secondary-market) +The Zora Sale Timed Sale Strategy introduces a new mint fee and [enables a secondary market that is powered by Uniswap V3](https://support.zora.co/en/categories/577345-secondary-market). New tokens minted will have a mint fee of 0.000111 ETH (✧111). Upon calling `setSale()` a sale will be created for the Zora 1155 NFT along with creating an ERC20z token and a Uniswap V3 Pool. @@ -26,8 +26,7 @@ As soon as the secondary market is launched the mint fees earned by the market w The ZoraTimedSaleStrategy contract is used to create a timed sale for a Zora 1155 token. When it is configured for an 1155 contract and token via the `setSale` function, specifying the `saleStart` and `saleEnd` of the sale, it creates a new ERC20z token and corresponding Uniswap V3 pool for a WETH pair with the ERC20z with a 1% fee. -To mint an 1155 token, the `mint` function is called on the ZoraTimedSaleStrategy contract with the mint fee of 0.000111 eth x quantity to mint sent with the call. In the `mint` call, 0.0000111 eth x quantity is held in escrow to bootstrap liquidity for the Uniswap V3 pool, the rest is distributed as rewards. -via the [ProtocolRewards](./rewards) contract, and x quantity of 1155s is minted to the `recipient`. +To mint an 1155 token, the `mint` function is called on the ZoraTimedSaleStrategy contract with the mint fee of 0.000111 eth x quantity to mint sent with the call. In the `mint` call, 0.0000111 eth x quantity is held in escrow to bootstrap liquidity for the Uniswap V3 pool, the rest is distributed as rewards via the [ProtocolRewards](./rewards) contract, and x quantity of 1155s is minted to the `recipient`. When the sale has ended, the `launchMarket` function can be called to launch the secondary market, which mints ERC20z tokens, wraps the escrowed ETH as WETH, and deposits the WETH and a portion of the minted ERC20z to the Uniswap V3 pool to launch the secondary market. @@ -139,7 +138,7 @@ The logic for launching the secondary market is designed with a few requirements - The secondary market starting price should be 0.000111 eth per token - There should be an equal amount of ERC20 to ERC1155 tokens minted/total supply -- Each owned ERC1155 should be backed and unwrappable by 1 ERC20, and visa versa. +- Each owned ERC1155 should be backed and unwrappable by 1 ERC20, and vice versa. To achieve this, the following logic is used. For the sake of simplicity, one ERC20 represents 10^18 units: diff --git a/docs/pages/protocol-sdk/collect/getTokensOfContract.mdx b/docs/pages/protocol-sdk/collect/getTokensOfContract.mdx index 0b4fd0ad1..d0fb1639c 100644 --- a/docs/pages/protocol-sdk/collect/getTokensOfContract.mdx +++ b/docs/pages/protocol-sdk/collect/getTokensOfContract.mdx @@ -1,6 +1,6 @@ # `getTokensOfContract` -**Both onchain** and **premint (gaslessly created)** tokens of a Zora 1155 contract can be retrieved using the the Collector Client function +**Both onchain** and **premint (gaslessly created)** tokens of a Zora 1155 contract can be retrieved using the Collector Client function `getTokensOfContract()` and passing a token contract address. The function returns a `tokens` array with an item for each token of the contract. Each item in `tokens` contains information the token in the `token` object, and has a function `prepareMint`. The `prepareMint` function takes a quantity to mint and returns the transaction parameters to mint the token, costs to mint the token, and any necessary diff --git a/docs/pages/protocol-sdk/creator/onchain.mdx b/docs/pages/protocol-sdk/creator/onchain.mdx index 3f6250ca8..03d19769a 100644 --- a/docs/pages/protocol-sdk/creator/onchain.mdx +++ b/docs/pages/protocol-sdk/creator/onchain.mdx @@ -128,7 +128,7 @@ with the 1155 contract address and the token creation parameters. ## Setting a price per token -A price per token can be optionally set to earn eth additional on the primary sale when each token is minted, by setting `token.salesConfig.pricePerToken`. +A price per token can be optionally set to earn additional ETH on the primary sale when each token is minted, by setting `token.salesConfig.pricePerToken`. If the `pricePerToken` is set to more than 0, there will be no `creatorReward` earned on the mint fee. If a pricePerToken is set to more than 0, then the token is setup with the [ZoraCreatorFixedPriceSaleStrategy](https://github.com/ourzora/zora-protocol/blob/main/packages/1155-contracts/src/minters/fixed-price/ZoraCreatorFixedPriceSaleStrategy.sol) as its minter. This will also result in not being able to [leverage the onchain secondary market feature](https://support.zora.co/en/articles/2519873) for tokens minted using this minter. diff --git a/docs/pages/protocol-sdk/creator/premint.mdx b/docs/pages/protocol-sdk/creator/premint.mdx index 6411e3788..835e965cf 100644 --- a/docs/pages/protocol-sdk/creator/premint.mdx +++ b/docs/pages/protocol-sdk/creator/premint.mdx @@ -14,7 +14,7 @@ import {Callout} from 'vocs/components' The Zora Protocol allows creators to create 1155 contracts and tokens without needing to pay any gas or have eth in their wallet. This is done by creating what's called a `Premint` - a signed intent to create and setup an 1155 contract and/or token. It is then uploading it to an API, where it can be retrieved later to bring onchain and mint by an account willing to pay the gas to do so. This can either be the first collector, or the -the original creator of the Premint. The account that brings the Premint onchain will earn the first minter reward. +original creator of the Premint. The account that brings the Premint onchain will earn the first minter reward. In order for the Premint to be discoverable in the Zora network, it must be signed by the creator's wallet and uploaded to the Zora Premint API. Before the Premint is brought onchain, the creator of the Premint can sign a message to update or delete it. diff --git a/docs/snippets/protocol-sdk/create/withdrawRewards.ts b/docs/snippets/protocol-sdk/create/withdrawRewards.ts index 3b5d1f2de..d0418fb4b 100644 --- a/docs/snippets/protocol-sdk/create/withdrawRewards.ts +++ b/docs/snippets/protocol-sdk/create/withdrawRewards.ts @@ -17,7 +17,7 @@ const { parameters } = await creatorClient.withdrawRewards({ // set this to false to disable claiming secondary royalties claimSecondaryRoyalties: true, // account to execute the transaction. Any account can withdraw rewards for another account, - // but the the rewards will always be pulled to the account that holds the balance + // but the rewards will always be pulled to the account that holds the balance account: randomAccount, }); diff --git a/packages/erc20z/src/interfaces/IERC20Z.sol b/packages/erc20z/src/interfaces/IERC20Z.sol index 59685f559..14a75b850 100644 --- a/packages/erc20z/src/interfaces/IERC20Z.sol +++ b/packages/erc20z/src/interfaces/IERC20Z.sol @@ -76,7 +76,7 @@ interface IERC20Z is IERC20Metadata { /// @notice Error when trying to swap ERC1155 to ERC20Z without the market being started. error SecondaryMarketHasNotYetStarted(); - /// @notice Only supports recieving ERC1155 associated with ERC20Z NFTs. + /// @notice Only supports receiving ERC1155 associated with ERC20Z NFTs. error OnlySupportReceivingERC1155AssociatedZoraNFT(); /// @notice Unauthorized to call this function diff --git a/packages/erc20z/test/ZoraTimedSaleStrategyMarketTest.t.sol b/packages/erc20z/test/ZoraTimedSaleStrategyMarketTest.t.sol index b069196cd..7502974b7 100644 --- a/packages/erc20z/test/ZoraTimedSaleStrategyMarketTest.t.sol +++ b/packages/erc20z/test/ZoraTimedSaleStrategyMarketTest.t.sol @@ -26,7 +26,7 @@ contract CollectorUniswapCallback { } receive() external payable { - console2.log("recieved eth ", msg.value); + console2.log("received eth ", msg.value); } } diff --git a/packages/protocol-deployments/src/typedData.ts b/packages/protocol-deployments/src/typedData.ts index 445ef4ec0..8ae64c50c 100644 --- a/packages/protocol-deployments/src/typedData.ts +++ b/packages/protocol-deployments/src/typedData.ts @@ -550,7 +550,11 @@ export const permitSparkCommentTypedDataDefinition = ( }; }; -// todo: explain +/** + * Returns the minimum value required for a spark transaction (0.000001 ETH) + * This small amount is used to prevent spam and cover basic gas costs + * @returns The minimum spark value in wei (1e12 wei or 0.000001 ETH) + */ export const sparkValue = () => parseEther("0.000001"); /** diff --git a/packages/protocol-sdk/src/premint/premint-client.ts b/packages/protocol-sdk/src/premint/premint-client.ts index aa43fbe89..990c9114d 100644 --- a/packages/protocol-sdk/src/premint/premint-client.ts +++ b/packages/protocol-sdk/src/premint/premint-client.ts @@ -375,7 +375,7 @@ export function getDataFromPremintReceipt( const premintedLog = getPremintedLogFromReceipt(receipt); return { tokenId: premintedLog?.tokenId, - collectionAddres: premintedLog?.contractAddress, + collectionAddress: premintedLog?.contractAddress, premintedLog, urls: makeUrls({ address: premintedLog?.contractAddress, diff --git a/packages/protocol-sdk/src/sparks/sparks-contracts.ts b/packages/protocol-sdk/src/sparks/sparks-contracts.ts index ba6179fd4..4c7e364aa 100644 --- a/packages/protocol-sdk/src/sparks/sparks-contracts.ts +++ b/packages/protocol-sdk/src/sparks/sparks-contracts.ts @@ -338,7 +338,7 @@ const encodePremintOnManager = ({ * @param chainId - The ID of the chain where the MINTs are to be used * @param deadline - The deadline of the permit. * @param nonce - Random nonce of the permit. - * @param tokenIds - The mint token ids to to use + * @param tokenIds - The mint token ids to use * @param quantities - The quantities of each token to use to collect the Zora Creator 1155 token with. The sum of these quantities will be the total quantity of the Zora Creator 1155 token collected. * @param premint - If this is for a premint, the configuration of the premint to collect * @param collect - If this is for a non-premint, the configuration of the non-premint to collect diff --git a/packages/sparks/src/helpers/SponsoredSparksSpender.sol b/packages/sparks/src/helpers/SponsoredSparksSpender.sol index 9aa66486f..a49d1b331 100644 --- a/packages/sparks/src/helpers/SponsoredSparksSpender.sol +++ b/packages/sparks/src/helpers/SponsoredSparksSpender.sol @@ -312,7 +312,7 @@ contract SponsoredSparksSpender is EIP712, ERC1155TransferRecipientConstants, IS ) external onlySparks returns (bytes4) { _onBatchReceived(from, ids, values, data); - // Validate recieving 1155 tokens in callback + // Validate receiving 1155 tokens in callback return ON_ERC1155_BATCH_RECEIVED_HASH; }