forked from rmrk-team/rmrk-minimal-evm-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRMRKNestingFactory.sol
40 lines (34 loc) · 1.23 KB
/
RMRKNestingFactory.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.16;
import "@rmrk-team/evm-contracts/contracts/implementations/RMRKNestingMultiResourceImpl.sol";
contract RMRKNestingFactory {
address[] public nestingCollections;
event NewRMRKNestingContract(
address indexed nestingContract,
address indexed deployer
);
function getCollections() external view returns (address[] memory) {
return nestingCollections;
}
function deployRMRKNesting(
string memory name,
string memory symbol,
uint256 maxSupply,
uint256 pricePerMint, //in WEI
string memory collectionMetadata
) public {
RMRKNestingMultiResourceImpl nestingContract = new RMRKNestingMultiResourceImpl(
name,
symbol,
maxSupply,
pricePerMint,
collectionMetadata,
collectionMetadata, // token URI
msg.sender, // royalty reciever
0 // royalty basis points
);
nestingCollections.push(address(nestingContract));
nestingContract.transferOwnership(msg.sender);
emit NewRMRKNestingContract(address(nestingContract), msg.sender);
}
}