Skip to content

Commit

Permalink
Fix on catalog factory, transfer ownership to deployer.
Browse files Browse the repository at this point in the history
  • Loading branch information
steven2308 committed Apr 29, 2024
1 parent 67d5853 commit 85f9e55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions contracts/implementations/catalog/RMRKCatalogFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ contract RMRKCatalogFactory {
) public returns (address) {
RMRKCatalogImpl catalog = new RMRKCatalogImpl(metadataURI, type_);
_deployerCatalogs[msg.sender].push(address(catalog));
catalog.transferOwnership(msg.sender);
emit CatalogDeployed(msg.sender, address(catalog));
return address(catalog);
}
Expand Down
7 changes: 3 additions & 4 deletions test/implementations/catalogFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@ describe('CatalogImpl', async () => {
throw new Error('Catalog address not found');
}
const catalog = await ethers.getContractAt('RMRKCatalogImpl', catalogAddress);
const metadataURI = await catalog.getMetadataURI();
const mediaType = await catalog.getType();

expect(metadataURI).to.equal('ipfs://catalogMetadata');
expect(mediaType).to.equal('img/jpeg');
expect(await catalog.getMetadataURI()).to.equal('ipfs://catalogMetadata');
expect(await catalog.getType()).to.equal('img/jpeg');
expect(await catalog.owner()).to.equal(deployer1.address);
});

it('can get catalogs deployed by a deployer', async () => {
Expand Down

0 comments on commit 85f9e55

Please sign in to comment.