Skip to content

FortaCommon

Contract that contains the common functionality for all FORT versions in different chains.

This contracts and inheriting contracts do not use AccessManager so they must define their roles.

FortaCommon is an upgradeable ERC20 currently not open to the public, so transfers are restricted via check if the sender has WHITELIST_ROLE in _beforeTokenTransfer hook. Access to the whitelist is granted by WHITELISTER_ROLE

This restriction will be removed at a later date via upgrade.

FortaCommon supports Compound-like on-chain governance inheriting from ERC20VotesUpgradeable

ADMIN_ROLE

bytes32 ADMIN_ROLE

WHITELISTER_ROLE

bytes32 WHITELISTER_ROLE

WHITELIST_ROLE

bytes32 WHITELIST_ROLE

whitelistDisabled

bool whitelistDisabled

NotWhitelisted

error NotWhitelisted(string name, address guilty)

constructor

constructor() internal

__FortaCommon_init

function __FortaCommon_init(address admin) internal

Initializer method, access point to initialize inheritance tree.

sets token name and symbol, permit init and RBAC structure.

Name Type Description
admin address address for the ADMIN_ROLE of the token.

grantWhitelister

function grantWhitelister(address to) public

Allow whitelister to assign other whitelisters

_beforeTokenTransfer

function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual

Only allow transfer to whitelisted accounts

_authorizeUpgrade

function _authorizeUpgrade(address newImplementation) internal virtual

Access control for the upgrade process

setName

function setName(address ensRegistry, string ensName) external

disableWhitelist

function disableWhitelist() public

enableWhitelist

function enableWhitelist() public

__gap

uint256[49] __gap
Back to top