Transpile 2d97b6b4
This commit is contained in:
@ -13,10 +13,7 @@ import "../../proxy/utils/Initializable.sol";
|
||||
*/
|
||||
abstract contract ConditionalEscrowUpgradeable is Initializable, EscrowUpgradeable {
|
||||
function __ConditionalEscrow_init() internal onlyInitializing {
|
||||
__Context_init_unchained();
|
||||
__Ownable_init_unchained();
|
||||
__Escrow_init_unchained();
|
||||
__ConditionalEscrow_init_unchained();
|
||||
}
|
||||
|
||||
function __ConditionalEscrow_init_unchained() internal onlyInitializing {
|
||||
@ -32,5 +29,11 @@ abstract contract ConditionalEscrowUpgradeable is Initializable, EscrowUpgradeab
|
||||
require(withdrawalAllowed(payee), "ConditionalEscrow: payee is not allowed to withdraw");
|
||||
super.withdraw(payee);
|
||||
}
|
||||
|
||||
/**
|
||||
* This empty reserved space is put in place to allow future versions to add new
|
||||
* variables without shifting down storage in the inheritance chain.
|
||||
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
|
||||
*/
|
||||
uint256[50] private __gap;
|
||||
}
|
||||
|
||||
@ -25,9 +25,7 @@ contract EscrowUpgradeable is Initializable, OwnableUpgradeable {
|
||||
__Escrow_init();
|
||||
}
|
||||
function __Escrow_init() internal onlyInitializing {
|
||||
__Context_init_unchained();
|
||||
__Ownable_init_unchained();
|
||||
__Escrow_init_unchained();
|
||||
}
|
||||
|
||||
function __Escrow_init_unchained() internal onlyInitializing {
|
||||
@ -72,5 +70,11 @@ contract EscrowUpgradeable is Initializable, OwnableUpgradeable {
|
||||
|
||||
emit Withdrawn(payee, payment);
|
||||
}
|
||||
|
||||
/**
|
||||
* This empty reserved space is put in place to allow future versions to add new
|
||||
* variables without shifting down storage in the inheritance chain.
|
||||
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
|
||||
*/
|
||||
uint256[49] private __gap;
|
||||
}
|
||||
|
||||
@ -36,10 +36,7 @@ contract RefundEscrowUpgradeable is Initializable, ConditionalEscrowUpgradeable
|
||||
* @param beneficiary_ The beneficiary of the deposits.
|
||||
*/
|
||||
function __RefundEscrow_init(address payable beneficiary_) internal onlyInitializing {
|
||||
__Context_init_unchained();
|
||||
__Ownable_init_unchained();
|
||||
__Escrow_init_unchained();
|
||||
__ConditionalEscrow_init_unchained();
|
||||
__RefundEscrow_init_unchained(beneficiary_);
|
||||
}
|
||||
|
||||
@ -106,5 +103,11 @@ contract RefundEscrowUpgradeable is Initializable, ConditionalEscrowUpgradeable
|
||||
function withdrawalAllowed(address) public view override returns (bool) {
|
||||
return state() == State.Refunding;
|
||||
}
|
||||
|
||||
/**
|
||||
* This empty reserved space is put in place to allow future versions to add new
|
||||
* variables without shifting down storage in the inheritance chain.
|
||||
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
|
||||
*/
|
||||
uint256[49] private __gap;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user