forked from rmrk-team/rmrk-minimal-evm-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRMRKEquippableFactory.sol
41 lines (34 loc) · 1.21 KB
/
RMRKEquippableFactory.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
41
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.16;
import "@rmrk-team/evm-contracts/contracts/implementations/RMRKEquippableImpl.sol";
contract RMRKEquippableFactory {
address[] public equippableCollections;
event NewRMRKEquippableContract(
address indexed equippableContract,
address indexed deployer
);
function getCollections() external view returns (address[] memory) {
return equippableCollections;
}
function deployRMRKEquippable(
string memory name,
string memory symbol,
uint256 maxSupply,
uint256 pricePerMint, //in WEI
string memory collectionMetadata //in WEI
) public {
RMRKEquippableImpl equippableContract = new RMRKEquippableImpl(
name,
symbol,
maxSupply,
pricePerMint,
collectionMetadata,
collectionMetadata, // token URI
msg.sender, // royalty reciever
0 // royalty basis points
);
equippableCollections.push(address(equippableContract));
equippableContract.transferOwnership(msg.sender);
emit NewRMRKEquippableContract(address(equippableContract), msg.sender);
}
}