CommonHelpers ​
Inherits:ReentrancyGuard
Functions ​
_getGovernanceAddr ​
Returns the current admin (governance).
solidity
function _getGovernanceAddr() internal view returns (address governance_);_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
| Name | Type | Description |
|---|---|---|
token_ | address | The address of the transferred-in token. |
amount_ | uint256 | The 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
| Name | Type | Description |
|---|---|---|
token_ | address | The address of the token to be transferred out. |
amount_ | uint256 | The 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
| Name | Type | Description |
|---|---|---|
token_ | address | The address of the token to check. |
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | The total balance of the contract re-hypothecated assets. |

