Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Typos corrected in comments and variables #472

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
6 changes: 2 additions & 4 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion docs/pages/bug-bounty/bug-bounty-program.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
14 changes: 7 additions & 7 deletions docs/pages/changelogs/1155-contracts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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:

Expand Down Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/contracts/ERC721Drop.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 3 additions & 4 deletions docs/pages/contracts/ZoraTimedSaleStrategy.mdx
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/protocol-sdk/collect/getTokensOfContract.mdx
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/protocol-sdk/creator/onchain.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/protocol-sdk/creator/premint.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/protocol-sdk/create/withdrawRewards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});

Expand Down
2 changes: 1 addition & 1 deletion packages/erc20z/src/interfaces/IERC20Z.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/erc20z/test/ZoraTimedSaleStrategyMarketTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ contract CollectorUniswapCallback {
}

receive() external payable {
console2.log("recieved eth ", msg.value);
console2.log("received eth ", msg.value);
}
}

Expand Down
6 changes: 5 additions & 1 deletion packages/protocol-deployments/src/typedData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol-sdk/src/premint/premint-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol-sdk/src/sparks/sparks-contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/sparks/src/helpers/SponsoredSparksSpender.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down