TokenManager

onlyAutomaticDeploy onlyAutomaticDeploy() modifier

Modifier to make a function callable only if caller is granted with AUTOMATIC_DEPLOY_ROLE.

onlyTokenRegistrar onlyTokenRegistrar() modifier

Modifier to make a function callable only if caller is granted with TOKEN_REGISTRAR_ROLE.

onlyMessageProxy onlyMessageProxy() modifier

Modifier to make a function callable only if caller is messageProxy.

rightTransaction rightTransaction(string targetSchainName, address to) modifier

Modifier to make a function callable only if a message does not aim mainnet, target SKALE chain has token manager and receiver is set.

checkReceiverChain checkReceiverChain(bytes32 fromChainHash, address sender) modifier

Modifier to make a function callable only if sender is deposit box on mainnet or token manager on other SKALE chain.

enableAutomaticDeploy enableAutomaticDeploy() external

Turn on automatic deploy on schain.

Requirements:

disableAutomaticDeploy disableAutomaticDeploy() external

Turn off automatic deploy on schain.

Requirements:

addTokenManager addTokenManager(string schainName, address newTokenManager) external

Adds a TokenManagerEth address to depositBox.

Requirements:

  • msg.sender must be contract owner or tokenManagerLinker contract.

  • SKALE chain must not already be added.

  • TokenManager address must be non-zero.

removeTokenManager removeTokenManager(string schainName) external

Remove a TokenManager on SKALE chain from TokenManager.

Requirements:

  • msg.sender must be contract owner or tokenManagerLinker contract.

  • SKALE chain must already be set.

changeDepositBoxAddress changeDepositBoxAddress(address newDepositBox) external

Change Deposit Box address This function should be executed only in emergency.

Requirements:

  • msg.sender must be contract owner.

  • {newDepositBox} must be set.

hasTokenManager hasTokenManager(string schainName) → bool external

Checks whether TokenManager is connected to a {schainName} SKALE chain TokenManager.

initializeTokenManager initializeTokenManager(string newSchainName, contract MessageProxyForSchain newMessageProxy, contract TokenManagerLinker newIMALinker, contract CommunityLocker newCommunityLocker, address newDepositBox) public

Is called once during contract deployment.

DepositBoxWasChanged DepositBoxWasChanged(address oldValue, address newValue) event

Emitted when deposit box address was changed.