Files
smom-dbis-138/contracts/dbis/DBIS_RootRegistry.sol
defiQUG d36a8947b2 feat: Introduce MINTER_ROLE for minting control in CompliantFiatToken
- Added MINTER_ROLE constant to manage minting permissions.
- Updated mint function to restrict access to addresses with MINTER_ROLE, enhancing security and compliance.
- Granted MINTER_ROLE to the initial owner during contract deployment.
2026-03-02 14:22:35 -08:00

32 lines
1.0 KiB
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/access/AccessControl.sol";
contract DBIS_RootRegistry is AccessControl {
bytes32 public constant ROOT_ADMIN_ROLE = keccak256("ROOT_ADMIN");
mapping(bytes32 => address) private _components;
string public railVersion;
event ComponentUpdated(bytes32 indexed key, address indexed addr, string railVersion);
constructor(address admin, string memory _railVersion) {
_grantRole(DEFAULT_ADMIN_ROLE, admin);
_grantRole(ROOT_ADMIN_ROLE, admin);
railVersion = _railVersion;
}
function setComponent(bytes32 key, address addr) external onlyRole(ROOT_ADMIN_ROLE) {
_components[key] = addr;
emit ComponentUpdated(key, addr, railVersion);
}
function getComponent(bytes32 key) external view returns (address) {
return _components[key];
}
function setRailVersion(string calldata _version) external onlyRole(ROOT_ADMIN_ROLE) {
railVersion = _version;
}
}