CommunityLocker
Contract contains logic to perform automatic reimbursement of gas fees for sent messages
postMessage postMessage(bytes32 fromChainHash, address sender, bytes data) → address external
Allows MessageProxy to post operational message from mainnet or SKALE chains.
Requirements:
- 
MessageProxy must be the caller of the function. 
- 
CommunityPool must be an origin of the message on mainnet. 
- 
The message must come from the mainnet. 
- 
The message must contains status of a user. 
- 
Status of a user in the message must be different from the current status. 
checkAllowedToSendMessage checkAllowedToSendMessage(address receiver) external
Reverts if {receiver} is not allowed to send a message.
Requirements:
- 
Function caller has to be registered in TokenManagerLinker as a TokenManager. 
- 
{receiver} must be an active user. 
- 
Previous message sent by {receiver} must be sent earlier then timeLimitPerMessageseconds before current time or there are no messages sent by {receiver}.
setTimeLimitPerMessage setTimeLimitPerMessage(uint256 newTimeLimitPerMessage) external
Set value of timeLimitPerMessage.
Requirements:
- 
Function caller has to be granted with CONSTANT_SETTER_ROLE.
Emits a ConstantUpdated event.
setGasPrice setGasPrice(uint256 gasPrice, uint256 timestamp, struct IMessageProxy.Signature) external
Set value of mainnetGasPrice.
Requirements:
- 
Signature should be verified. 
Emits a ConstantUpdated event.
initialize initialize(string newSchainName, contract IMessageProxyForSchain newMessageProxy, contract ITokenManagerLinker newTokenManagerLinker, address newCommunityPool) external
Is called once during contract deployment.
ActivateUser ActivateUser(bytes32 schainHash, address user) event
Emitted when a user becomes active.
LockUser LockUser(bytes32 schainHash, address user) event
Emitted when a user stops being active.
ConstantUpdated ConstantUpdated(bytes32 constantHash, uint256 previousValue, uint256 newValue) event
Emitted when constants updated.