Refund Escrow Upgradeable
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
Name | Type | Description |
---|---|---|
_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
Name | Type | Description |
---|---|---|
refundee | address | The address funds will be sent to if a refund occurs. |
depositsOf
Parameters
Name | Type | Description |
---|---|---|
payee | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
enableRefunds
Allows for refunds to take place, rejecting further deposits.
initialize
owner
Returns the address of the current owner.
Returns
Name | Type | Description |
---|---|---|
_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
Name | Type | Description |
---|---|---|
_0 | enum RefundEscrowUpgradeable.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
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
_0 | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
Events
Deposited
Parameters
Name | Type | Description |
---|---|---|
payee | address | undefined |
weiAmount | uint256 | undefined |
OwnershipTransferred
Parameters
Name | Type | Description |
---|---|---|
previousOwner | address | undefined |
newOwner | address | undefined |
RefundsClosed
RefundsEnabled
Withdrawn
Parameters
Name | Type | Description |
---|---|---|
payee | address | undefined |
weiAmount | uint256 | undefined |
Last updated