ReimbursementPool
ReimbursementPool
This file documents a contract which is not yet deployed to Mainnet.
isAuthorized
Authorized contracts that can interact with the reimbursment pool. Authorization can be granted and removed by the owner.
staticGas
Static gas includes:
cost of the refund function
base transaction cost
maxGasPrice
Max gas price used to reimburse a transaction submitter. Protects against malicious operator-miners.
StaticGasUpdated
MaxGasPriceUpdated
SendingEtherFailed
AuthorizedContract
UnauthorizedContract
FundsWithdrawn
constructor
receive
Receive ETH
refund
Refunds ETH to a spender for executing specific transactions.
Ignoring the result of sending ETH to a receiver is made on purpose. For EOA receiving ETH should always work. If a receiver is a smart contract, then we do not want to fail a transaction, because in some cases the refund is done at the very end of multiple calls where all the previous calls were already paid off. It is a receiver's smart contract resposibility to make sure it can receive ETH. Only authorized contracts are allowed calling this function.
Parameters
gasSpent
uint256
Gas spent on a transaction that needs to be reimbursed.
receiver
address
Address where the reimbursment is sent.
authorize
Authorize a contract that can interact with this reimbursment pool. Can be authorized by the owner only.
Parameters
_contract
address
Authorized contract.
unauthorize
Unauthorize a contract that was previously authorized to interact with this reimbursment pool. Can be unauthorized by the owner only.
Parameters
_contract
address
Authorized contract.
setStaticGas
Setting a static gas cost for executing a transaction. Can be set by the owner only.
Parameters
_staticGas
uint256
Static gas cost.
setMaxGasPrice
Setting a max gas price for transactions. Can be set by the owner only.
Parameters
_maxGasPrice
uint256
Max gas price used to reimburse tx submitters.
withdrawAll
Withdraws all ETH from this pool which are sent to a given address. Can be set by the owner only.
Parameters
receiver
address
An address where ETH is sent.
withdraw
Withdraws ETH amount from this pool which are sent to a given address. Can be set by the owner only.
Parameters
amount
uint256
Amount to withdraw from the pool.
receiver
address
An address where ETH is sent.
Last updated