Skip to content

CommonHelpers ​

Git Source

Inherits:StatusGuard

Constants ​

WSTUSR_MAINNET_ADDRESS ​

solidity
address internal constant WSTUSR_MAINNET_ADDRESS = 0x1202F5C7b4B9E47a1A484E8B270be34dbbC75055

Functions ​

_getGovernanceAddr ​

Returns the current admin (governance).

solidity
function _getGovernanceAddr() internal view returns (address governance_);

_isWstUsrToken ​

wstUSR blacklists Liquidity, so withdraw / revenue transfers of it are skipped; remove once claims settle

solidity
function _isWstUsrToken(address token_) internal view returns (bool);

_afterTransferIn ​

Hook invoked after assets are transferred into the contract. Must be implemented for chain specific implementation version.

ATTENTION: THIS IS NOT CALLED FOR NATIVE TOKEN (e.g. ETH).

solidity
function _afterTransferIn(address token_, uint256 amount_) internal virtual;

Parameters

NameTypeDescription
token_addressThe address of the transferred-in token.
amount_uint256The amount of tokens transferred in.

_preTransferOut ​

Hook invoked before assets are transferred out of the contract. Must be implemented for chain specific implementation version.

ATTENTION: THIS IS NOT CALLED FOR NATIVE TOKEN (e.g. ETH).

solidity
function _preTransferOut(address token_, uint256 amount_) internal virtual;

Parameters

NameTypeDescription
token_addressThe address of the token to be transferred out.
amount_uint256The amount of tokens to be transferred out.

_getExternalBalances ​

Returns the contract's own balance of the given token currently re-hypothecated or otherwise sitting externally.

solidity
function _getExternalBalances(address token_) internal view virtual returns (uint256);

Parameters

NameTypeDescription
token_addressThe address of the token to check.

Returns

NameTypeDescription
<none>uint256The total balance of the contract re-hypothecated assets.