MessageProxyForMainnet

messageInProgressLocker messageInProgressLocker() modifier

initializeAllRegisteredContracts initializeAllRegisteredContracts(bytes32 schainHash, address[] contracts) external

Allows DEFAULT_ADMIN_ROLE to initialize registered contracts Notice - this function will be executed only once during upgrade

Requirements:

msg.sender should have DEFAULT_ADMIN_ROLE

addConnectedChain addConnectedChain(string schainName) external

Allows msg.sender to connect schain with MessageProxyOnMainnet for transferring messages.

Requirements:

  • Schain name must not be Mainnet.

setCommunityPool setCommunityPool(contract ICommunityPool newCommunityPoolAddress) external

Allows owner of the contract to set CommunityPool address for gas reimbursement.

Requirements:

  • msg.sender must be granted as DEFAULT_ADMIN_ROLE.

  • Address of CommunityPool contract must not be null.

registerExtraContract registerExtraContract(string schainName, address extraContract) external

Allows msg.sender to register extra contract for being able to transfer messages from custom contracts.

Requirements:

  • msg.sender must be granted as EXTRA_CONTRACT_REGISTRAR_ROLE.

  • Schain name must not be Mainnet.

removeExtraContract removeExtraContract(string schainName, address extraContract) external

Allows msg.sender to remove extra contract, thus extraContract will no longer be available to transfer messages from mainnet to schain.

Requirements:

  • msg.sender must be granted as EXTRA_CONTRACT_REGISTRAR_ROLE.

  • Schain name must not be Mainnet.

postIncomingMessages postIncomingMessages(string fromSchainName, uint256 startingCounter, struct IMessageProxy.Message[] messages, struct IMessageProxy.Signature sign) external

Posts incoming message from fromSchainName.

Requirements:

  • msg.sender must be authorized caller.

  • fromSchainName must be initialized.

  • startingCounter must be equal to the chain’s incoming message counter.

  • If destination chain is Mainnet, message signature must be valid.

setNewHeaderMessageGasCost setNewHeaderMessageGasCost(uint256 newHeaderMessageGasCost) external

Sets headerMessageGasCost to a new value.

Requirements:

  • msg.sender must be granted as CONSTANT_SETTER_ROLE.

setNewMessageGasCost setNewMessageGasCost(uint256 newMessageGasCost) external

Sets messageGasCost to a new value.

Requirements:

  • msg.sender must be granted as CONSTANT_SETTER_ROLE.

setVersion setVersion(string newVersion) external

Sets new version of contracts on mainnet

Requirements:

  • msg.sender must be granted DEFAULT_ADMIN_ROLE.

initialize initialize(contract IContractManager contractManagerOfSkaleManagerValue) public

Creates a new MessageProxyForMainnet contract.

isConnectedChain isConnectedChain(string schainName) → bool public

Checks whether chain is currently connected.

Note: Mainnet chain does not have a public key, and is implicitly connected to MessageProxy.

Requirements:

  • schainName must not be Mainnet.

_authorizeOutgoingMessageSender _authorizeOutgoingMessageSender(bytes32 targetChainHash) internal

_verifyMessages _verifyMessages(string fromSchainName, bytes32 hashedMessages, struct IMessageProxy.Signature sign) → bool internal

Converts calldata structure to memory structure and checks whether message BLS signature is valid.

_checkSchainBalance _checkSchainBalance(bytes32 schainHash) → bool internal

_getRegistryContracts _getRegistryContracts() → mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet) internal

GasCostMessageHeaderWasChanged GasCostMessageHeaderWasChanged(uint256 oldValue, uint256 newValue) event

Emitted when gas cost for message header was changed.

GasCostMessageWasChanged GasCostMessageWasChanged(uint256 oldValue, uint256 newValue) event

Emitted when gas cost for message was changed.