Skip to content

Commit

Permalink
add setSoulboundIdentity()
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcabot committed Aug 31, 2022
1 parent 300d81b commit 966cc05
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions contracts/SoulFactory.sol
Expand Up @@ -46,6 +46,7 @@ contract SoulFactory is Pausable, AccessControl {
address _reserveWallet
) {
require(_reserveWallet != address(0), "ZERO_ADDRESS");
require(_soulBoundIdentity != address(0), "ZERO_ADDRESS");

_grantRole(DEFAULT_ADMIN_ROLE, owner);
_grantRole(PAUSER_ROLE, owner);
Expand Down Expand Up @@ -73,6 +74,18 @@ contract SoulFactory is Pausable, AccessControl {
_unpause();
}

/// @notice Sets the SoulboundIdentity contract address linked to this factory
/// @dev The caller must have the admin role to call this function
/// @param _soulboundIdentity New SoulboundIdentity contract address
function setSoulboundIdentity(SoulboundIdentity _soulboundIdentity)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
require(address(_soulboundIdentity) != address(0), "ZERO_ADDRESS");
require(soulboundIdentity != _soulboundIdentity, "SAME_VALUE");
soulboundIdentity = _soulboundIdentity;
}

/// @notice Set the reserve wallet
/// @dev Let change the reserve walled. It can be triggered by an authorized account.
/// @param _reserveWallet New reserve wallet
Expand Down

0 comments on commit 966cc05

Please sign in to comment.