CommunityPool

initialize initialize(contract IContractManager contractManagerOfSkaleManagerValue, contract ILinker linker, contract IMessageProxyForMainnet messageProxyValue) external

refundGasByUser refundGasByUser(bytes32 schainHash, address payable node, address user, uint256 gas) → uint256 external

Allows MessageProxyForMainnet to reimburse gas for transactions that transfer funds from schain to mainnet.

Requirements:

  • User that receives funds should have enough funds in their gas wallet.

  • Address that should be reimbursed for executing transaction must not be null.

refundGasBySchainWallet refundGasBySchainWallet(bytes32 schainHash, address payable node, uint256 gas) → bool external

rechargeUserWallet rechargeUserWallet(string schainName, address user) external

Allows msg.sender to recharge their wallet for further gas reimbursement.

Requirements:

  • 'msg.sender` should recharge their gas wallet for amount that enough to reimburse any transaction from schain to mainnet.

withdrawFunds withdrawFunds(string schainName, uint256 amount) external

Allows msg.sender to withdraw funds from their gas wallet. If msg.sender withdraws too much funds, then he will no longer be able to transfer their tokens on ETH from schain to mainnet.

Requirements:

  • 'msg.sender` must have sufficient amount of ETH on their gas wallet.

setMinTransactionGas setMinTransactionGas(uint256 newMinTransactionGas) external

Allows msg.sender set the amount of gas that should be enough for reimbursing any transaction from schain to mainnet.

Requirements:

  • 'msg.sender` must have sufficient amount of ETH on their gas wallet.

setMultiplier setMultiplier(uint256 newMultiplierNumerator, uint256 newMultiplierDivider) external

Allows msg.sender set the amount of gas that should be enough for reimbursing any transaction from schain to mainnet.

Requirements:

  • 'msg.sender` must have sufficient amount of ETH on their gas wallet.

getBalance getBalance(address user, string schainName) → uint256 external

Returns the amount of ETH on gas wallet for particular user.

checkUserBalance checkUserBalance(bytes32 schainHash, address receiver) → bool external

Checks whether user is active and wallet was recharged for sufficient amount.

getRecommendedRechargeAmount getRecommendedRechargeAmount(bytes32 schainHash, address receiver) → uint256 external

Checks whether passed amount is enough to recharge user wallet with current basefee.

MinTransactionGasWasChanged MinTransactionGasWasChanged(uint256 oldValue, uint256 newValue) event

Emitted when minimal value in gas for transactions from schain to mainnet was changed

MultiplierWasChanged MultiplierWasChanged(uint256 oldMultiplierNumerator, uint256 oldMultiplierDivider, uint256 newMultiplierNumerator, uint256 newMultiplierDivider) event

Emitted when basefee multiplier was changed