move setup to parms to try to save space
This commit is contained in:
parent
31aa432ed7
commit
da0a4a98f3
|
@ -19,10 +19,15 @@ contract CurioERC1155Wrapper is ERC1155, ERC1155Metadata_URI, ERC1155Metadata, E
|
||||||
mapping (uint256 => address) public contracts;
|
mapping (uint256 => address) public contracts;
|
||||||
mapping (uint256 => string) public urls;
|
mapping (uint256 => string) public urls;
|
||||||
|
|
||||||
string public name = "Masters of the Fediverse";
|
string public name;
|
||||||
string public symbol = "MASTERS";
|
string public symbol;
|
||||||
|
|
||||||
uint96 internal defaultRoyalty = 100;
|
uint96 internal defaultRoyalty;
|
||||||
|
|
||||||
|
struct InitPair {
|
||||||
|
address token;
|
||||||
|
string url;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@notice Initialize an nft id's data
|
@notice Initialize an nft id's data
|
||||||
|
@ -38,18 +43,15 @@ contract CurioERC1155Wrapper is ERC1155, ERC1155Metadata_URI, ERC1155Metadata, E
|
||||||
emit TransferSingle(msg.sender, address(0), msg.sender, _id, 0);
|
emit TransferSingle(msg.sender, address(0), msg.sender, _id, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor() {
|
constructor(string memory _name, string memory _symbol, InitPair[] memory _tokens, uint96 _defaultRoyalty) {
|
||||||
create(1, 0x2f873FCc3F4B84E9A62AFf28E9a897ce1BC8814B, "https://shitposter.club");
|
name = _name;
|
||||||
create(2, 0x13a9914Ad2e0be57eB2Abb3E159021Eab6D7a80E, "https://tuusin.misono-ya.info/users/hakui");
|
symbol = _symbol;
|
||||||
create(3, 0xdeCAa5B6901dc465FBf90f9C0c70c96132aF51Db, "https://shitposter.club/users/augustus");
|
|
||||||
create(4, 0xc1de7E95663FB3A0e8F8C6E6a64297d7AbcBF7f7, "https://xj-ix.luxe/bin/fedi");
|
|
||||||
create(5, 0xB70F9A809693B8c6a4c331342B96F15252521dC7, "https://varishangout.net/users/nepfag");
|
|
||||||
create(6, 0x3f2592136d90dE35615A409B4fe710B3764366F4, "https://shitposter.club/dokidoki@pl.smuglo.li");
|
|
||||||
create(7, 0x5e7318f75b177a0F27A31CB20bB26bd0C049620c, "https://twitter.com/sonyasupposedly");
|
|
||||||
create(8, 0x5539907D45a608828756765429f2B4e6311c295c, "https://shpposter.club/users/shpuld");
|
|
||||||
create(9, 0x0a0e64067B1F7aDfbF876Dde4322633Ff7Df9702, "https://bbs.kawa-kun.com/users/tk");
|
|
||||||
|
|
||||||
_setDefaultRoyalty(msg.sender, defaultRoyalty);
|
for(uint256 i = 1; i <= _tokens.length; i++) {
|
||||||
|
create(i, _tokens[i].token, _tokens[i].url);
|
||||||
|
}
|
||||||
|
|
||||||
|
_setDefaultRoyalty(msg.sender, _defaultRoyalty);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlyOwner {
|
function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlyOwner {
|
||||||
|
|
|
@ -1,5 +1,23 @@
|
||||||
const CurioWrapper = artifacts.require("CurioERC1155Wrapper");
|
const CurioWrapper = artifacts.require("CurioERC1155Wrapper");
|
||||||
|
|
||||||
|
const tokens = [
|
||||||
|
{ token: "0x2f873FCc3F4B84E9A62AFf28E9a897ce1BC8814B", url: "https://shitposter.club" }, // 1 is the ERC-223
|
||||||
|
{ token: "0x13a9914Ad2e0be57eB2Abb3E159021Eab6D7a80E", url: "https://tuusin.misono-ya.info/users/hakui" },
|
||||||
|
{ token: "0xdeCAa5B6901dc465FBf90f9C0c70c96132aF51Db", url: "https://shitposter.club/users/augustus" },
|
||||||
|
{ token: "0xc1de7E95663FB3A0e8F8C6E6a64297d7AbcBF7f7", url: "https://xj-ix.luxe/bin/fedi" },
|
||||||
|
{ token: "0xB70F9A809693B8c6a4c331342B96F15252521dC7", url: "https://varishangout.net/users/nepfag" },
|
||||||
|
{ token: "0x3f2592136d90dE35615A409B4fe710B3764366F4", url: "https://shitposter.club/dokidoki@pl.smuglo.li" },
|
||||||
|
{ token: "0x5e7318f75b177a0F27A31CB20bB26bd0C049620c", url: "https://twitter.com/sonyasupposedly" },
|
||||||
|
{ token: "0x5539907D45a608828756765429f2B4e6311c295c", url: "https://shpposter.club/users/shpuld" },
|
||||||
|
{ token: "0x0a0e64067B1F7aDfbF876Dde4322633Ff7Df9702", url: "https://bbs.kawa-kun.com/users/tk" }
|
||||||
|
];
|
||||||
|
|
||||||
module.exports = function(deployer) {
|
module.exports = function(deployer) {
|
||||||
deployer.deploy(CurioWrapper);
|
deployer.deploy(
|
||||||
|
CurioWrapper,
|
||||||
|
"Masters of the Fediverse",
|
||||||
|
"MASTERS",
|
||||||
|
tokens,
|
||||||
|
200 // default royalty 2%
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue