-
Notifications
You must be signed in to change notification settings - Fork 573
Add optional metadata URI to registry.add() #263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
function add( | ||
address _deployer, | ||
address _deployment, | ||
uint256 _chainId, | ||
string memory metadataUri | ||
) external { | ||
require(hasRole(OPERATOR_ROLE, _msgSender()) || _deployer == _msgSender(), "not operator or deployer."); | ||
|
||
bool added = deployments[_deployer][_chainId].add(_deployment); | ||
require(added, "failed to add"); | ||
|
||
chainIds.add(_chainId); | ||
|
||
if (bytes(metadataUri).length > 0) { | ||
addressToMetadataUri[_chainId][_deployment] = metadataUri; | ||
} | ||
|
||
emit Added(_deployer, _deployment, _chainId, metadataUri); | ||
} |
Check warning
Code scanning / Slither
Unused return
} | ||
} | ||
|
||
function getMetadataUri(uint256 _chainId, address _deployment) external view returns (string memory metadataUri) { |
Check warning
Code scanning / Slither
Variable names too similar
// slither-disable-next-line similar-names | ||
function remove( | ||
address _deployer, | ||
address _deployment, |
Check warning
Code scanning / Slither
Variable names too similar
// slither-disable-next-line similar-names | ||
function add( | ||
address _deployer, | ||
address _deployment, |
Check warning
Code scanning / Slither
Variable names too similar
Check warning
Code scanning / Slither
Variable names too similar
/// @notice Add a deployment for a deployer. | ||
function add( | ||
address _deployer, | ||
address _deployment, |
Check warning
Code scanning / Slither
Variable names too similar
/// @notice Remove a deployment for a deployer. | ||
function remove( | ||
address _deployer, | ||
address _deployment, |
Check warning
Code scanning / Slither
Variable names too similar
No description provided.