Refund Escrow
RefundEscrow
Escrow that holds funds for a beneficiary, deposited from multiple parties.Intended usage: See {Escrow}. Same usage guidelines apply here.The owner account (that is, the contract that instantiates this contract) may deposit, close the deposit period, and allow for either withdrawal by the beneficiary, or refunds to the depositors. All interactions with RefundEscrow
will be made through the owner contract.
Methods
beneficiary
Returns
_0
address payable
The beneficiary of the escrow.
beneficiaryWithdraw
Withdraws the beneficiary's funds.
close
Allows for the beneficiary to withdraw their funds, rejecting further deposits.
deposit
Stores funds that may later be refunded.
Parameters
refundee
address
The address funds will be sent to if a refund occurs.
depositsOf
Parameters
payee
address
undefined
Returns
_0
uint256
undefined
enableRefunds
Allows for refunds to take place, rejecting further deposits.
owner
Returns the address of the current owner.
Returns
_0
address
undefined
renounceOwnership
Leaves the contract without owner. It will not be possible to call onlyOwner
functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
state
Returns
_0
enum RefundEscrow.State
The current state of the escrow.
transferOwnership
Transfers ownership of the contract to a new account (newOwner
). Can only be called by the current owner.
Parameters
newOwner
address
undefined
withdraw
Withdraw accumulated balance for a payee, forwarding all gas to the recipient. WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities. Make sure you trust the recipient, or are either following the checks-effects-interactions pattern or using {ReentrancyGuard}.
Parameters
payee
address payable
The address whose funds will be withdrawn and transferred to.
withdrawalAllowed
Returns whether refundees can withdraw their deposits (be refunded). The overridden function receives a 'payee' argument, but we ignore it here since the condition is global, not per-payee.
Parameters
_0
address
undefined
Returns
_0
bool
undefined
Events
Deposited
Parameters
payee indexed
address
undefined
weiAmount
uint256
undefined
OwnershipTransferred
Parameters
previousOwner indexed
address
undefined
newOwner indexed
address
undefined
RefundsClosed
RefundsEnabled
Withdrawn
Parameters
payee indexed
address
undefined
weiAmount
uint256
undefined
Last updated