Skip to content

Commit

Permalink
chore: rename metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico Elzer committed Jun 23, 2021
1 parent 427fc1a commit bf9b6b9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
5 changes: 3 additions & 2 deletions contracts/MesaFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,15 @@ contract MesaFactory {
/// @dev function to launch a template on Mesa
/// @param _templateId template to be deployed
/// @param _data encoded template parameters
/// @param _metaData ipfsHash pointing to the metadata
function launchTemplate(
uint256 _templateId,
bytes calldata _data,
bytes calldata _ipfsMetaData
string calldata _metaData
) external payable returns (address newTemplate) {
newTemplate = ITemplateLauncher(templateLauncher).launchTemplate{
value: msg.value
}(_templateId, _data, _ipfsMetaData, msg.sender);
}(_templateId, _data, _metaData, msg.sender);
allTemplates.push(newTemplate);
emit TemplateLaunched(newTemplate, _templateId);
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/shared/interfaces/ITemplateLauncher.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ interface ITemplateLauncher {
function launchTemplate(
uint256 _templateId,
bytes calldata _data,
bytes calldata _metaData,
string calldata _metaData,
address _templateDeployer
) external payable returns (address newSale);
}
12 changes: 6 additions & 6 deletions contracts/templates/TemplateLauncher.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ contract TemplateLauncher is CloneFactory {
event TemplateLaunched(
address indexed newTemplate,
uint256 templateId,
address templatedeployer,
bytes metaData
address templateDeployer,
string metaData
);
event TemplateAdded(address indexed template, uint256 templateId);
event TemplateRemoved(address indexed template, uint256 templateId);
event TemplateVerified(address indexed template, uint256 templateId);
event TemplateRestrictionUpdated(bool restrictedTemplates);
event TemplateMetaDataUpdated(
address _launchedTemplate,
bytes _newMetaData
string _newMetaData
);

mapping(uint256 => address) private template;
Expand All @@ -30,7 +30,7 @@ contract TemplateLauncher is CloneFactory {

struct TemplateData {
address deployer;
bytes metaData;
string metaData;
}

mapping(address => TemplateData) public launchedTemplate;
Expand Down Expand Up @@ -75,7 +75,7 @@ contract TemplateLauncher is CloneFactory {
function launchTemplate(
uint256 _templateId,
bytes calldata _data,
bytes calldata _metaData,
string calldata _metaData,
address _templateDeployer
) external payable returns (address newTemplate) {
require(address(msg.sender) == factory, "TemplateLauncher: FORBIDDEN");
Expand Down Expand Up @@ -157,7 +157,7 @@ contract TemplateLauncher is CloneFactory {
/// @param _newMetaData ipfs hash to be set
function updateTemplateMetadata(
address _template,
bytes calldata _newMetaData
string calldata _newMetaData
) external isTemplateDeployer(_template) {
launchedTemplate[_template].metaData = _newMetaData;
emit TemplateMetaDataUpdated(_template, _newMetaData);
Expand Down

0 comments on commit bf9b6b9

Please sign in to comment.