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

Update ERC-6220: fix some typos #970

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ERCS/erc-6220.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ interface IERC6220 is IERC5773 /*, ERC165 */ {

/**
* @notice Used to equip a child into a token.
* @dev The `IntakeEquip` stuct contains the following data:
* @dev The `IntakeEquip` struct contains the following data:
* [
* tokenId,
* childIndex,
Expand Down
4 changes: 2 additions & 2 deletions assets/erc-6220/contracts/Catalog.sol
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ contract Catalog is ICatalog {
/**
* @notice Used to limit execution of functions intended for the `Slot` parts to only execute when used with such
* parts.
* @dev Reverts execution of a function if the part with associated `partId` is uninitailized or is `Fixed`.
* @dev Reverts execution of a function if the part with associated `partId` is uninitialized or is `Fixed`.
* @param partId ID of the part that we want the function to interact with
*/
modifier onlySlot(uint64 partId) {
Expand Down Expand Up @@ -161,7 +161,7 @@ contract Catalog is ICatalog {
* @notice Internal function used to set the new list of `equippableAddresses`.
* @dev Overwrites existing `equippableAddresses`.
* @dev Can only be called on `Part`s of `Slot` type.
* @param partId ID of the `Part`s that we are overwiting the `equippableAddresses` for
* @param partId ID of the `Part`s that we are overwriting the `equippableAddresses` for
* @param equippableAddresses A full array of addresses that can be equipped into this `Part`
*/
function _setEquippableAddresses(
Expand Down
14 changes: 7 additions & 7 deletions assets/erc-6220/contracts/EquippableToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ contract EquippableToken is
// At this point we know pendingRecursiveBurns must be at least 1
pendingRecursiveBurns = maxChildrenBurns - totalChildBurns;
}
// We substract one to the next level to count for the token being burned, then add it again on returns
// We subtract one to the next level to count for the token being burned, then add it again on returns
// This is to allow the behavior of 0 recursive burns meaning only the current token is deleted.
totalChildBurns +=
IERC6059(children[i].contractAddress).burn(
Expand Down Expand Up @@ -788,7 +788,7 @@ contract EquippableToken is
* ]
* @param parentId ID of the parent token for which the pending child token is being retrieved
* @param index Index of the child token in the parent token's pending child tokens array
* @return struct A Child struct containting data about the specified child
* @return struct A Child struct containing data about the specified child
*/
function pendingChildOf(
uint256 parentId,
Expand Down Expand Up @@ -1398,7 +1398,7 @@ contract EquippableToken is

/**
* @notice Rejects all assets from the pending array of a given token.
* @dev Effecitvely deletes the pending array.
* @dev Effectively deletes the pending array.
* @dev Requirements:
*
* - The caller must own the token or be approved to manage the token's assets
Expand All @@ -1419,7 +1419,7 @@ contract EquippableToken is
* @notice Sets a new priority array for a given token.
* @dev The priority array is a non-sequential list of `uint16`s, where the lowest value is considered highest
* priority.
* @dev Value `0` of a priority is a special case equivalent to unitialized.
* @dev Value `0` of a priority is a special case equivalent to uninitialized.
* @dev Requirements:
*
* - The caller must own the token or be approved to manage the token's assets
Expand Down Expand Up @@ -1575,7 +1575,7 @@ contract EquippableToken is
/**
* @notice Used to reject all of the pending assets for the given token.
* @dev When rejecting all assets, the pending array is indiscriminately cleared.
* @dev If the number of pending assets is greater than the value of `maxRejections`, the exectuion will be
* @dev If the number of pending assets is greater than the value of `maxRejections`, the execution will be
* reverted.
* @param tokenId ID of the token to reject all of the pending assets.
* @param maxRejections Maximum number of expected assets to reject, used to prevent from
Expand Down Expand Up @@ -1775,7 +1775,7 @@ contract EquippableToken is
* @dev If the `Slot` already has an item equipped, the execution will be reverted.
* @dev If the child can't be used in the given `Slot`, the execution will be reverted.
* @dev If the catalog doesn't allow this equip to happen, the execution will be reverted.
* @dev The `IntakeEquip` stuct contains the following data:
* @dev The `IntakeEquip` struct contains the following data:
* [
* tokenId,
* childIndex,
Expand Down Expand Up @@ -2269,7 +2269,7 @@ contract EquippableToken is
* ]
* @dev To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
* @param parentId ID of the token that has accepted a pending child token
* @param childIndex Index of the child token that was accpeted in the given parent token's pending children array
* @param childIndex Index of the child token that was accepted in the given parent token's pending children array
* @param childAddress Address of the collection smart contract of the child token that was expected to be located
* at the specified index of the given parent token's pending children array
* @param childId ID of the child token that was expected to be located at the specified index of the given parent
Expand Down
2 changes: 1 addition & 1 deletion assets/erc-6220/contracts/IERC6220.sol
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ interface IERC6220 is IERC5773 {

/**
* @notice Used to equip a child into a token.
* @dev The `IntakeEquip` stuct contains the following data:
* @dev The `IntakeEquip` struct contains the following data:
* [
* tokenId,
* childIndex,
Expand Down
2 changes: 1 addition & 1 deletion assets/erc-6220/contracts/utils/EquipRenderUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ contract EquipRenderUtils {
* @return metadataURI Metadata URI of the asset
* @return equippableGroupId Equippable group ID of the asset
* @return catalogAddress Address of the catalog to which the asset belongs to
* @return fixedParts An array of fixed parts respresented by the `FixedPart` structs present on the asset
* @return fixedParts An array of fixed parts represented by the `FixedPart` structs present on the asset
* @return slotParts An array of slot parts represented by the `EquippedSlotPart` structs present on the asset
*/
function composeEquippables(
Expand Down
2 changes: 1 addition & 1 deletion assets/erc-6220/test/multiasset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ describe("MultiAsset", async () => {
});

describe("Overwriting assets", async function () {
it("can add asset to token overwritting an existing one", async function () {
it("can add asset to token overwriting an existing one", async function () {
const resId = 1;
const resId2 = 2;
const tokenId = 1;
Expand Down
22 changes: 11 additions & 11 deletions assets/erc-6220/test/nestable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ describe("NestableToken", function () {
const childId1 = 99;
await child.nestMint(parent.address, childId1, parentId);

// owner is the same adress
// owner is the same address
expect(await parent.ownerOf(parentId)).to.equal(tokenOwner.address);
expect(await child.ownerOf(childId1)).to.equal(tokenOwner.address);

Expand Down Expand Up @@ -1356,7 +1356,7 @@ describe("NestableToken", function () {
await child.mint(firstOwner.address, childId1);
});

it("cannot nest tranfer from non immediate owner (owner of parent)", async function () {
it("cannot nest transfer from non immediate owner (owner of parent)", async function () {
const otherParentId = 2;
await parent.mint(firstOwner.address, otherParentId);
// We send it to the parent first
Expand All @@ -1371,7 +1371,7 @@ describe("NestableToken", function () {
).to.be.revertedWithCustomError(child, "NotApprovedOrDirectOwner");
});

it("cannot nest tranfer to same NFT", async function () {
it("cannot nest transfer to same NFT", async function () {
// We can no longer nest transfer it, even if we are the root owner:
await expect(
child
Expand All @@ -1380,7 +1380,7 @@ describe("NestableToken", function () {
).to.be.revertedWithCustomError(child, "NestableTransferToSelf");
});

it("cannot nest tranfer a descendant same NFT", async function () {
it("cannot nest transfer a descendant same NFT", async function () {
// We can no longer nest transfer it, even if we are the root owner:
await child
.connect(firstOwner)
Expand All @@ -1402,7 +1402,7 @@ describe("NestableToken", function () {
).to.be.revertedWithCustomError(child, "NestableTransferToDescendant");
});

it("cannot nest tranfer if ancestors tree is too deep", async function () {
it("cannot nest transfer if ancestors tree is too deep", async function () {
let lastId = childId1;
for (let i = 101; i <= 200; i++) {
await child.nestMint(child.address, i, lastId);
Expand All @@ -1415,20 +1415,20 @@ describe("NestableToken", function () {
).to.be.revertedWithCustomError(child, "NestableTooDeep");
});

it("cannot nest tranfer if not owner", async function () {
it("cannot nest transfer if not owner", async function () {
const notOwner = addrs[3];
await expect(
child.connect(notOwner).nestTransfer(parent.address, childId1, parentId)
).to.be.revertedWithCustomError(child, "NotApprovedOrDirectOwner");
});

it("cannot nest tranfer to address 0", async function () {
it("cannot nest transfer to address 0", async function () {
await expect(
child.connect(firstOwner).nestTransfer(ADDRESS_ZERO, childId1, parentId)
).to.be.revertedWithCustomError(child, "ERC721TransferToTheZeroAddress");
});

it("cannot nest tranfer to a non contract", async function () {
it("cannot nest transfer to a non contract", async function () {
const newOwner = addrs[2];
await expect(
child
Expand All @@ -1437,7 +1437,7 @@ describe("NestableToken", function () {
).to.be.revertedWithCustomError(child, "IsNotContract");
});

it("cannot nest tranfer to contract if it does implement INestable", async function () {
it("cannot nest transfer to contract if it does implement INestable", async function () {
const ERC721 = await ethers.getContractFactory("ERC721Mock");
const nonNestable = await ERC721.deploy("Non receiver", "NR");
await nonNestable.deployed();
Expand All @@ -1451,7 +1451,7 @@ describe("NestableToken", function () {
);
});

it("can nest tranfer to INestable contract", async function () {
it("can nest transfer to INestable contract", async function () {
await child
.connect(firstOwner)
.nestTransfer(parent.address, childId1, parentId);
Expand All @@ -1463,7 +1463,7 @@ describe("NestableToken", function () {
]);
});

it("cannot nest tranfer to non existing parent token", async function () {
it("cannot nest transfer to non existing parent token", async function () {
const notExistingParentId = 9999;
await expect(
child
Expand Down
Loading