Conditional Escrow

ConditionalEscrow

Base abstract escrow to only allow withdrawal if a condition is met.Intended usage: See {Escrow}. Same usage guidelines apply here.

Methods

deposit

function deposit(address payee) external payable

Stores the sent amount as credit to be withdrawn.

Parameters

NameTypeDescription

payee

address

The destination address of the funds.

depositsOf

function depositsOf(address payee) external view returns (uint256)

Parameters

NameTypeDescription

payee

address

undefined

Returns

NameTypeDescription

_0

uint256

undefined

owner

function owner() external view returns (address)

Returns the address of the current owner.

Returns

NameTypeDescription

_0

address

undefined

renounceOwnership

function renounceOwnership() external nonpayable

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.

transferOwnership

function transferOwnership(address newOwner) external nonpayable

Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.

Parameters

NameTypeDescription

newOwner

address

undefined

withdraw

function withdraw(address payable payee) external nonpayable

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

NameTypeDescription

payee

address payable

The address whose funds will be withdrawn and transferred to.

withdrawalAllowed

function withdrawalAllowed(address payee) external view returns (bool)

Returns whether an address is allowed to withdraw their funds. To be implemented by derived contracts.

Parameters

NameTypeDescription

payee

address

The destination address of the funds.

Returns

NameTypeDescription

_0

bool

undefined

Events

Deposited

event Deposited(address indexed payee, uint256 weiAmount)

Parameters

NameTypeDescription

payee indexed

address

undefined

weiAmount

uint256

undefined

OwnershipTransferred

event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

Parameters

NameTypeDescription

previousOwner indexed

address

undefined

newOwner indexed

address

undefined

Withdrawn

event Withdrawn(address indexed payee, uint256 weiAmount)

Parameters

NameTypeDescription

payee indexed

address

undefined

weiAmount

uint256

undefined

Last updated