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

catalyst-audit: L-04 ERC20 transfer return value lacks validation #1108

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
13fd8e1
refactor : ERC20 transfer call using SafeERC20
Aug 26, 2023
486e6f6
fix : added royaltyBPS into royaltyConfigs
Aug 26, 2023
4725c5f
feat : added test case
Aug 26, 2023
c1decd9
refactor: removed unused code
Aug 30, 2023
9032009
fix: fixed and removed test cases
Aug 30, 2023
0e0ff10
fix : updated docstrings
Aug 26, 2023
7b7ec59
fix: updated doc string
Aug 30, 2023
05fef1d
fix: fixed docstring
Aug 31, 2023
53a6374
fix : added onlyInitializing modifier
Aug 26, 2023
21f766c
feat : added events after sensitive changes
Aug 28, 2023
6d9ddbd
feat : added events in interface
Aug 28, 2023
00771c0
feat : added test cases
Aug 28, 2023
d63f605
refactor : update function structure for event handling
Aug 29, 2023
cdf0039
refactor : _setBaseURI with super call
Aug 30, 2023
9221caf
fix: removed merge markers
Aug 30, 2023
8c77b1c
fix: fixed test cases
Aug 30, 2023
180bc8d
feat : added events after sensitive changes
Aug 28, 2023
06c30ea
feat : added test cases
Aug 28, 2023
377d1a2
feat : added a gap variable
Aug 28, 2023
9770d4b
fix : fixed merge conflict
Aug 31, 2023
d4638b6
Fix the gap length
wojciech-turek Sep 1, 2023
d12d52b
feat : added events after sensitive changes
Aug 28, 2023
c3721c8
fix : updated missing docstring
Aug 28, 2023
f30085d
fix: updated comment format
Aug 31, 2023
30ae019
fix: fixed merge conflict
Sep 7, 2023
f051694
feat : added failing test cases for burn and transfer
Aug 28, 2023
3d13ddd
refactor : variables names
Aug 29, 2023
cdd001e
fix : updated splitter abi
Aug 29, 2023
d80750d
fix : updated test cases
Aug 29, 2023
68f6003
fix: fixed test case
Aug 31, 2023
7068bb6
fix : updated splitter abi
Aug 29, 2023
9d058bf
fix : updated constant format
Aug 29, 2023
a7acda6
refactor : marked RoyaltyDistributor as abstract
Aug 29, 2023
7124016
fix : updated a test case
Aug 29, 2023
075ce61
feat : added events after sensitive changes
Aug 28, 2023
e6fd61f
fix : added '_disableInitializers()' in constructor
Aug 29, 2023
0418b69
fix: fixed merge conflict
Sep 7, 2023
f333356
feat : added events after sensitive changes
Aug 28, 2023
7a790c8
fix : updated missing docstring
Aug 28, 2023
d2c1701
fix : added '_disableInitializers()' in constructor
Aug 29, 2023
7281bcb
fix : updated incomplete docstrings
Aug 29, 2023
d14e82f
fix: removed duplicate constructor
Aug 31, 2023
9f119ea
feat : added events after sensitive changes
Aug 28, 2023
6c6aed4
fix : updated missing docstring
Aug 28, 2023
63be1a8
fix : added named return values
Aug 30, 2023
b28c1f1
refactor : enhance function with named return values
Aug 30, 2023
37c0e45
fix: updated contracts and interfaces
Aug 31, 2023
ffda588
fix: format fixed
Aug 31, 2023
b385c33
return the values directly
wojciech-turek Sep 1, 2023
63a5fe0
feat : added events after sensitive changes
Aug 28, 2023
1532cea
fix : updated missing docstring
Aug 28, 2023
4bd0fa2
refactor : enhance function with named return values
Aug 30, 2023
5595489
return the values directly
wojciech-turek Sep 1, 2023
899aea3
refactor : variables names
Aug 29, 2023
c810488
fix : added '_disableInitializers()' in constructor
Aug 29, 2023
a4749ac
fix : updated incomplete docstrings
Aug 29, 2023
12672d6
fix : added indexed params in events
Aug 30, 2023
6ae72f9
fix: removed duplicate constructor
Aug 31, 2023
85979b2
feat : added events after sensitive changes
Aug 28, 2023
d7b6d5e
fix : updated missing docstring
Aug 28, 2023
de639e8
refactor : enhance function with named return values
Aug 30, 2023
a09b5f3
return the values directly
wojciech-turek Sep 1, 2023
608ded4
fix : added missing parent initializer calls in contract
Aug 30, 2023
19060f8
feat : added events after sensitive changes
Aug 28, 2023
0a7ad20
fix : updated missing docstring
Aug 28, 2023
18a0221
refactor : enhance function with named return values
Aug 30, 2023
ad384de
return the values directly
wojciech-turek Sep 1, 2023
444b4f0
fix : updated functions visibility to external
Aug 30, 2023
301ca73
fix: function visibility
Sep 1, 2023
66dd01b
fix: updated function visibility
Sep 8, 2023
3a7921f
feat : added events after sensitive changes
Aug 28, 2023
5aa7c28
fix : updated missing docstring
Aug 28, 2023
a59b101
refactor : enhance function with named return values
Aug 30, 2023
2d6acf2
return the values directly
wojciech-turek Sep 1, 2023
3ccafc5
fix : fixed redundant code
Aug 30, 2023
c61fedf
fix: removed redundent code
Sep 1, 2023
bacfb0b
refactor : enhance function with named return values
Aug 30, 2023
9ddbacc
return the values directly
wojciech-turek Sep 1, 2023
f19841a
refactor : enhance function with named return values
Aug 30, 2023
ccc6408
return the values directly
wojciech-turek Sep 1, 2023
db219fe
fix : fixed typographical errors
Aug 30, 2023
e14cfa4
Fix typographical errors
wojciech-turek Sep 1, 2023
b95984a
refactor : enhance function with named return values
Aug 30, 2023
d5d799a
return the values directly
wojciech-turek Sep 1, 2023
de75a07
refactor : enhance function with named return values
Aug 30, 2023
a822c01
return the values directly
wojciech-turek Sep 1, 2023
bd489c0
refactor : enhance function with named return values
Aug 30, 2023
1eb60f2
return the values directly
wojciech-turek Sep 1, 2023
74cdcd8
refactor : used named return royalBps variable
Aug 30, 2023
26a6a93
fix: added missing function
Sep 1, 2023
920c1e3
fix: format:fix
Sep 1, 2023
129a667
refactor : enhance function with named return values
Aug 30, 2023
b87dbe7
return the values directly
wojciech-turek Sep 1, 2023
925452a
fix: added missing function
Sep 1, 2023
a594e5f
fix : removed unused variables
Aug 30, 2023
2cb5258
fix: fixed format
Sep 7, 2023
80d6ba2
refactor: removed royaltyBps value allocation
Sep 8, 2023
907b8bf
Update the gap size
wojciech-turek Sep 8, 2023
fdfdd31
Merge pull request #1130 from thesandboxgame/catalyst-audit/N-18-unus…
rishabh0x00 Sep 11, 2023
711d9e0
Merge pull request #1128 from thesandboxgame/catalyst-audit/N-14-typo…
rishabh0x00 Sep 11, 2023
61067e9
Merge pull request #1127 from thesandboxgame/catalyst-audit/N-12-redu…
rishabh0x00 Sep 11, 2023
bf2172b
Merge pull request #1126 from thesandboxgame/catalyst-audit/N-11-publ…
rishabh0x00 Sep 11, 2023
083d8fd
Merge pull request #1125 from thesandboxgame/catalyst-audit/N-10-miss…
rishabh0x00 Sep 11, 2023
943a005
Merge pull request #1124 from thesandboxgame/catalyst-audit/N-09-lack…
rishabh0x00 Sep 11, 2023
1273521
Merge pull request #1123 from thesandboxgame/catalyst-audit/N-08-inco…
rishabh0x00 Sep 11, 2023
15b07e1
Merge pull request #1122 from thesandboxgame/catalyst-audit/N-06-inco…
rishabh0x00 Sep 11, 2023
e3f416e
Merge pull request #1121 from thesandboxgame/catalyst-audit/N-05-disa…
rishabh0x00 Sep 11, 2023
50a12fe
Merge pull request #1120 from thesandboxgame/catalyst-audit/N-04-cont…
rishabh0x00 Sep 11, 2023
494369c
Merge pull request #1119 from thesandboxgame/catalyst-audit/N-03-cons…
rishabh0x00 Sep 11, 2023
65fa9d4
Merge pull request #1118 from thesandboxgame/catalyst-audit/N-02-codi…
rishabh0x00 Sep 11, 2023
63641ab
Merge pull request #1117 from thesandboxgame/catalyst-audit/L-11-the-…
rishabh0x00 Sep 11, 2023
ca28aec
Merge pull request #1115 from thesandboxgame/catalyst-audit/L-10-miss…
rishabh0x00 Sep 11, 2023
dab5fb9
Merge pull request #1114 from thesandboxgame/catalyst-audit/L-09-lack…
rishabh0x00 Sep 11, 2023
c25dea5
Merge pull request #1113 from thesandboxgame/catalyst-audit/L-08-lack…
rishabh0x00 Sep 11, 2023
b719ab3
Merge pull request #1112 from thesandboxgame/catalyst-audit/L-07-init…
rishabh0x00 Sep 11, 2023
b469006
Merge pull request #1111 from thesandboxgame/catalyst-audit/L-06-inco…
rishabh0x00 Sep 11, 2023
e2f46c7
Merge pull request #1109 from thesandboxgame/catalyst-audit/L-05-inco…
rishabh0x00 Sep 11, 2023
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 packages/asset/contracts/Asset.sol
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ contract Asset is
return TokenIdUtils.isBridged(tokenId);
}

/// @notice This function is used to register Asset contract on the Operator Filterer Registry of Opensea.can only be called by admin.
/// @notice This function is used to register Asset contract on the Operator Filterer Registry of OpenSea.can only be called by admin.
/// @dev used to register contract and subscribe to the subscriptionOrRegistrantToCopy's black list.
/// @param subscriptionOrRegistrantToCopy registration address of the list to subscribe.
/// @param subscribe bool to signify subscription "true"" or to copy the list "false".
Expand Down
24 changes: 17 additions & 7 deletions packages/asset/contracts/Catalyst.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {ICatalyst} from "./interfaces/ICatalyst.sol";

/// @title Catalyst
/// @author The Sandbox
/// @notice THis contract manages catalysts which are used to mint new assets.
/// @notice This contract manages catalysts which are used to mint new assets.
/// @dev An ERC1155 contract that manages catalysts, extends multiple OpenZeppelin contracts to
/// provide a variety of features including, AccessControl, URIStorage, Burnable and more.
/// The contract includes support for meta transactions.
Expand Down Expand Up @@ -77,7 +77,7 @@ contract Catalyst is
address _defaultMinter,
string[] memory _catalystIpfsCID,
address _royaltyManager
) public initializer {
) external initializer {
require(bytes(_baseUri).length != 0, "Catalyst: base uri can't be empty");
require(_trustedForwarder != address(0), "Catalyst: trusted forwarder can't be zero");
require(_subscription != address(0), "Catalyst: subscription can't be zero");
Expand Down Expand Up @@ -154,7 +154,7 @@ contract Catalyst is
}

/// @notice Add a new catalyst type, limited to DEFAULT_ADMIN_ROLE only
/// @param ipfsCID The royalty bps for the catalyst
/// @param ipfsCID The IPFS content identifiers for the catalyst
function addNewCatalystType(string memory ipfsCID) external onlyRole(DEFAULT_ADMIN_ROLE) {
require(bytes(ipfsCID).length != 0, "Catalyst: CID can't be empty");
uint256 newCatId = ++highestTierIndex;
Expand Down Expand Up @@ -187,6 +187,7 @@ contract Catalyst is
function setBaseURI(string memory baseURI) external onlyRole(DEFAULT_ADMIN_ROLE) {
require(bytes(baseURI).length != 0, "Catalyst: base uri can't be empty");
_setBaseURI(baseURI);
emit BaseURISet(baseURI);
}

/// @notice returns full token URI, including baseURI and token metadata URI
Expand Down Expand Up @@ -223,12 +224,18 @@ contract Catalyst is
return ERC2771HandlerUpgradeable._msgData();
}

/// @dev Sets `baseURI` as the `_baseURI` for all tokens
function _setBaseURI(string memory baseURI) internal virtual override {
super._setBaseURI(baseURI);
emit BaseURISet(baseURI);
}

/// @notice Transfers `value` tokens of type `id` from `from` to `to` (with safety call).
/// @param from address from which tokens are transfered.
/// @param to address to which the token will be transfered.
/// @param id the token type transfered.
/// @param value amount of token transfered.
/// @param data aditional data accompanying the transfer.
/// @param data additional data accompanying the transfer.
function safeTransferFrom(
address from,
address to,
Expand All @@ -245,7 +252,7 @@ contract Catalyst is
/// @param to address to which the token will be transfered.
/// @param ids ids of each token type transfered.
/// @param values amount of each token type transfered.
/// @param data aditional data accompanying the transfer.
/// @param data additional data accompanying the transfer.
function safeBatchTransferFrom(
address from,
address to,
Expand Down Expand Up @@ -286,7 +293,7 @@ contract Catalyst is
return super.supportsInterface(interfaceId);
}

/// @notice This function is used to register Catalyst contract on the Operator Filterer Registry of Opensea.can only be called by admin.
/// @notice This function is used to register Catalyst contract on the Operator Filterer Registry of OpenSea. Can only be called by admin.
/// @dev used to register contract and subscribe to the subscriptionOrRegistrantToCopy's black list.
/// @param subscriptionOrRegistrantToCopy registration address of the list to subscribe.
/// @param subscribe bool to signify subscription "true"" or to copy the list "false".
Expand All @@ -298,10 +305,13 @@ contract Catalyst is
_registerAndSubscribe(subscriptionOrRegistrantToCopy, subscribe);
}

/// @notice sets filter registry address deployed in test
/// @notice sets filter registry address
/// @param registry the address of the registry
function setOperatorRegistry(address registry) external onlyRole(DEFAULT_ADMIN_ROLE) {
require(registry != address(0), "Catalyst: registry can't be zero address");
OperatorFiltererUpgradeable._setOperatorFilterRegistry(registry);
emit OperatorRegistrySet(registry);
}

uint256[49] private __gap;
}
2 changes: 2 additions & 0 deletions packages/asset/contracts/interfaces/ICatalyst.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ interface ICatalyst {
event TrustedForwarderChanged(address indexed newTrustedForwarderAddress);
event NewCatalystTypeAdded(uint256 catalystId);
event DefaultRoyaltyChanged(address indexed newDefaultRoyaltyRecipient, uint256 newDefaultRoyaltyAmount);
event BaseURISet(string baseURI);
event OperatorRegistrySet(address indexed registry);

/// @notice Mints a new token, limited to MINTER_ROLE only
/// @param to The address that will own the minted token
Expand Down
8 changes: 4 additions & 4 deletions packages/asset/docs/Asset.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,15 @@ Sets a new trusted forwarder for meta-transactions.
Parameters:

- `trustedForwarder` - The new trusted forwarder.

### setTokenRoyalties

```solidity
function setTokenRoyalties(
uint256 tokenId,
address payable recipient,
address creator
) external override onlyRole(DEFAULT_ADMIN_ROLE)
) external override onlyRole(DEFAULT_ADMIN_ROLE)
```

Sets token royalty i.e. the creator splitter address as EIP2981 royalty recipient. deploys a splitter if there is none deployed for a creator. Only admin can call it.
Expand Down Expand Up @@ -254,7 +255,6 @@ Parameters:

- `tokenId` - the id of the token.


### isBridged

```solidity
Expand All @@ -275,7 +275,7 @@ function registerAndSubscribe(address subscriptionOrRegistrantToCopy, bool subsc
onlyRole(DEFAULT_ADMIN_ROLE)
```

Used to register and subscribe on the operator filter registry of Opensea
Used to register and subscribe on the operator filter registry of OpenSea

Parameters:

Expand All @@ -286,7 +286,7 @@ Parameters:

```solidity
function setOperatorRegistry(address registry) external onlyRole(DEFAULT_ADMIN_ROLE)
```fu
```

Used to the address of the operator filter registry

Expand Down
55 changes: 12 additions & 43 deletions packages/asset/test/AssetRoyalty.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('Asset Royalties', function () {
seller.address,
true
);
const splitter = await RoyaltyManagerContract._creatorRoyaltiesSplitter(
const splitter = await RoyaltyManagerContract.creatorRoyaltiesSplitter(
creator.address
);

Expand Down Expand Up @@ -103,7 +103,7 @@ describe('Asset Royalties', function () {
seller.address,
true
);
const splitter = await RoyaltyManagerContract._creatorRoyaltiesSplitter(
const splitter = await RoyaltyManagerContract.creatorRoyaltiesSplitter(
creator.address
);

Expand Down Expand Up @@ -170,7 +170,7 @@ describe('Asset Royalties', function () {
seller.address,
true
);
const splitter = await RoyaltyManagerContract._creatorRoyaltiesSplitter(
const splitter = await RoyaltyManagerContract.creatorRoyaltiesSplitter(
creator.address
);

Expand Down Expand Up @@ -416,7 +416,7 @@ describe('Asset Royalties', function () {
const id = generateAssetId(creator.address, 1);
await assetAsMinter.mint(seller.address, id, 1, '0x');

const splitter = await RoyaltyManagerContract._creatorRoyaltiesSplitter(
const splitter = await RoyaltyManagerContract.creatorRoyaltiesSplitter(
creator.address
);

Expand All @@ -425,15 +425,15 @@ describe('Asset Royalties', function () {
splitter
);

expect(await splitterContract._recipient()).to.be.equal(creator.address);
expect(await splitterContract.recipient()).to.be.equal(creator.address);

const tnx = await RoyaltyManagerContract.connect(
await ethers.getSigner(creator.address)
).setRoyaltyRecipient(royaltyReceiver.address);

await tnx.wait();

expect(await splitterContract._recipient()).to.be.equal(
expect(await splitterContract.recipient()).to.be.equal(
royaltyReceiver.address
);

Expand Down Expand Up @@ -666,22 +666,22 @@ describe('Asset Royalties', function () {

const id = generateAssetId(creator.address, 1);
await assetAsMinter.mint(seller.address, id, 1, '0x');
const splitter = await RoyaltyManagerContract._creatorRoyaltiesSplitter(
const splitter = await RoyaltyManagerContract.creatorRoyaltiesSplitter(
creator.address
);
const splitterContract = await ethers.getContractAt(
splitterAbi,
splitter
);

expect(await splitterContract._recipient()).to.be.equal(creator.address);
expect(await splitterContract.recipient()).to.be.equal(creator.address);
const tnx = await RoyaltyManagerContract.connect(
await ethers.getSigner(creator.address)
).setRoyaltyRecipient(royaltyReceiver.address);

await tnx.wait();

expect(await splitterContract._recipient()).to.be.equal(
expect(await splitterContract.recipient()).to.be.equal(
royaltyReceiver.address
);

Expand Down Expand Up @@ -828,58 +828,27 @@ describe('Asset Royalties', function () {
});
});

it('Can view all the royalty recipient of each asset', async function () {
const {
Asset,
seller,
commonRoyaltyReceiver,
creator,
deployer,
assetAsMinter,
} = await assetRoyaltyDistribution();

const id = generateAssetId(creator.address, 1);
await assetAsMinter.mint(seller.address, id, 1, '0x');
const id2 = generateAssetId(deployer.address, 1);
await assetAsMinter.mint(seller.address, id2, 1, '0x01');
const tokenRoyalties = await Asset.getTokenRoyalties();
expect(tokenRoyalties[0].tokenId).to.be.equal(id);
expect(tokenRoyalties[0].recipients[0].recipient).to.be.equal(
creator.address
);
expect(tokenRoyalties[0].recipients[1].recipient).to.be.equal(
commonRoyaltyReceiver.address
);
expect(tokenRoyalties[1].tokenId).to.be.equal(id2);
expect(tokenRoyalties[1].recipients[0].recipient).to.be.equal(
deployer.address
);
expect(tokenRoyalties[1].recipients[1].recipient).to.be.equal(
commonRoyaltyReceiver.address
);
});

describe('Roles on Asset and Manager contract', function () {
it('creator could change the recipient for his splitter', async function () {
const {seller, RoyaltyManagerContract, creator, assetAsMinter} =
await assetRoyaltyDistribution();

const id = generateAssetId(creator.address, 1);
await assetAsMinter.mint(seller.address, id, 1, '0x');
const splitter = await RoyaltyManagerContract._creatorRoyaltiesSplitter(
const splitter = await RoyaltyManagerContract.creatorRoyaltiesSplitter(
creator.address
);
const splitterContract = await ethers.getContractAt(
splitterAbi,
splitter
);

expect(await splitterContract._recipient()).to.be.equal(creator.address);
expect(await splitterContract.recipient()).to.be.equal(creator.address);
const tnx = await RoyaltyManagerContract.connect(
await ethers.getSigner(creator.address)
).setRoyaltyRecipient(seller.address);
await tnx.wait();
expect(await splitterContract._recipient()).to.be.equal(seller.address);
expect(await splitterContract.recipient()).to.be.equal(seller.address);
});

it('only creator could change the recipient for his splitter', async function () {
Expand Down
51 changes: 51 additions & 0 deletions packages/asset/test/Catalyst.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,14 @@ describe('Catalyst (/packages/asset/contracts/Catalyst.sol)', function () {
`AccessControl: account ${user1.address.toLocaleLowerCase()} is missing role ${catalystAdminRole}`
);
});
it('emits BaseURISet event on setting base uri', async function () {
const {catalystAsAdmin, catalyst} = await runCatalystSetup();

const setBaseURITx = await catalystAsAdmin.setBaseURI('ipfs////');
await expect(setBaseURITx)
.to.emit(catalyst, 'BaseURISet')
.withArgs(`ipfs////`);
});
it('cant add invalid token uri', async function () {
const {catalystAsAdmin} = await runCatalystSetup();
await expect(catalystAsAdmin.addNewCatalystType('')).to.be.revertedWith(
Expand Down Expand Up @@ -605,6 +613,24 @@ describe('Catalyst (/packages/asset/contracts/Catalyst.sol)', function () {
expect(await catalyst.balanceOf(user1.address, 1)).to.be.equal(3);
expect(await catalyst.balanceOf(user1.address, 2)).to.be.equal(4);
});
it('should fail on burning non existing token', async function () {
const {catalystAsBurner, user1} = await runCatalystSetup();
await expect(
catalystAsBurner.burnFrom(user1.address, 1, 1)
).to.be.revertedWith('ERC1155: burn amount exceeds totalSupply');
});
it('should fail on batch burning non existing tokens', async function () {
const {catalystAsBurner, user1} = await runCatalystSetup();
const catalystId = [1, 2];
const catalystAmount = [2, 2];
await expect(
catalystAsBurner.burnBatchFrom(
user1.address,
catalystId,
catalystAmount
)
).to.be.revertedWith('ERC1155: burn amount exceeds totalSupply');
});
});
describe('Metadata', function () {
it("user can view token's metadata", async function () {
Expand Down Expand Up @@ -670,6 +696,31 @@ describe('Catalyst (/packages/asset/contracts/Catalyst.sol)', function () {
expect(await catalyst.balanceOf(user2.address, 1)).to.be.equal(10);
expect(await catalyst.balanceOf(user2.address, 2)).to.be.equal(10);
});
it('should fail on transfering non existing token', async function () {
const {catalyst, user1, user2} = await runCatalystSetup();

await expect(
catalyst
.connect(user1)
.safeTransferFrom(user1.address, user2.address, 1, 1, '0x')
).to.be.revertedWith('ERC1155: insufficient balance for transfer');
});
it('should fail on batch transfering non existing tokens', async function () {
const {catalyst, user1, user2} = await runCatalystSetup();
const catalystId = [1, 2];
const catalystAmount = [2, 2];
await expect(
catalyst
.connect(user1)
.safeBatchTransferFrom(
user1.address,
user2.address,
catalystId,
catalystAmount,
'0x'
)
).to.be.revertedWith('ERC1155: insufficient balance for transfer');
});
});
describe('OperatorFilterer', function () {
describe('common subscription setup', function () {
Expand Down
Loading