CommunityPool
Contract contains logic to perform automatic self-recharging ETH for nodes.
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.
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
MinTransactionGasWasChanged MinTransactionGasWasChanged(uint256 oldValue, uint256 newValue) event
Emitted when minimal value in gas for transactions from schain to mainnet was changed