VaultFallback
Constants
_FALLBACK_TRANSFERRED_EVENT_SIGNATURE
keccak256(bytes("FallbackTransferred(address,address)")).
uint256 private constant _FALLBACK_TRANSFERRED_EVENT_SIGNATURE =
0x76b6ff30b9c54394454c961c5c1860e047b141beb52f06e45509097109524797
_VAULT_SLOT
The fallback vault slot is given by:
bytes32(~uint256(uint32(bytes4(keccak256("_VAULT_SLOT_NOT"))))).
It is intentionally chosen to be a high value
to avoid collision with lower slots.
The choice of manual storage layout is to enable compatibility
with both regular and upgradeable contracts.
bytes32 internal constant _VAULT_SLOT = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffbaf973c6
Functions
_initializeVault
function _initializeVault(address newVault) internal virtual;
_setVault
function _setVault(address newVault) internal virtual;
_sendToVault
Send ALL remaining funds to treasury
function _sendToVault(address token) internal;
Parameters
| Name | Type | Description |
|---|---|---|
token | address | The token address (follows ERC7528 for native) |
vault
function vault() public view virtual returns (address result);
Events
FallbackTransferred
The vault fallback is transferred from oldVault to newVault.
event FallbackTransferred(address indexed oldVault, address indexed newVault);
Errors
VaultIsZeroAddress
The vault to be set cannot be the zero address
error VaultIsZeroAddress();