Portfolio
function DOMAIN_SEPARATOR() external view returns (bytes32)
Name | Type | Description |
---|---|---|
_0 | bytes32 | undefined |
function PERMIT_TYPEHASH() external view returns (bytes32)
Name | Type | Description |
---|---|---|
_0 | bytes32 | undefined |
function allowance(address, address) external view returns (uint256)
Name | Type | Description |
---|---|---|
_0 | address | undefined |
_1 | address | undefined |
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
function approve(address, uint256) external pure returns (bool)
transferFrom
disabled on Portfolio tokens.Name | Type | Description |
---|---|---|
_0 | address | undefined |
_1 | uint256 | undefined |
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
function asset() external view returns (address)
Name | Type | Description |
---|---|---|
_0 | address | undefined |
function authority() external view returns (contract RolesAuthority)
The contract used to source permissions for accounts targeting this contract.
Name | Type | Description |
---|---|---|
_0 | contract RolesAuthority | undefined |
function balanceOf(address) external view returns (uint256)
Name | Type | Description |
---|---|---|
_0 | address | undefined |
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
function callAsPortfolio(address _target, uint256 _value, bytes _data) external payable returns (bytes)
Permissioned method that allows Endaoment admin to make arbitrary calls acting as this Portfolio.
Name | Type | Description |
---|---|---|
_target | address | The address to which the call will be made. |
_value | uint256 | The ETH value that should be forwarded with the call. |
_data | bytes | The calldata that will be sent with the call. |
Name | Type | Description |
---|---|---|
_0 | bytes | _return The data returned by the call. |
function cap() external view returns (uint256)
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
function convertToAssets(uint256 _amountShares) external view returns (uint256)
The amount of assets that the Portfolio should exchange for the amount of shares provided.
Name | Type | Description |
---|---|---|
_amountShares | uint256 | Amount of shares. |
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
function convertToShares(uint256 _amountAssets) external view returns (uint256)
The amount of shares that the Portfolio should exchange for the amount of assets provided.
Name | Type | Description |
---|---|---|
_amountAssets | uint256 | Amount of assets. |
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
function decimals() external view returns (uint8)
Name | Type | Description |
---|---|---|
_0 | uint8 | undefined |
function deposit(uint256 _amountBaseToken, bytes _data) external nonpayable returns (uint256 shares)
Exchange
_amountBaseToken
for some amount of Portfolio shares.Name | Type | Description |
---|---|---|
_amountBaseToken | uint256 | The amount of the Entity's baseToken to deposit. |
_data | bytes | Data that the portfolio needs to make the deposit. In some cases, this will be swap parameters. |
Name | Type | Description |
---|---|---|
shares | uint256 | The amount of shares that this deposit yields to the Entity. |
function depositFee() external view returns (uint256)
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
function initialize(contract RolesAuthority _authority, bytes20 _specialTarget) external nonpayable
One time method to be called at deployment to configure the contract. Required so EndaomentAuth contracts can be deployed as minimal proxies (clones).
Name | Type | Description |
---|---|---|
_authority | contract RolesAuthority | Contract that will be used to source permissions for accounts targeting this contract. |
_specialTarget | bytes20 | The bytes that this contract will pass as the "target" when looking up permissions from the authority. If set to empty bytes, this contract will pass its own address instead. |
function name() external view returns (string)
Name | Type | Description |
---|---|---|
_0 | string | undefined |
function nonces(address) external view returns (uint256)
Name | Type | Description |
---|---|---|
_0 | address | undefined |
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external nonpayable
Name | Type | Description |
---|---|---|
owner | address | undefined |
spender | address | undefined |
value | uint256 | undefined |
deadline | uint256 | undefined |
v | uint8 | undefined |
r | bytes32 | undefined |
s | bytes32 | undefined |
function redeem(uint256 _amountShares, bytes _data) external nonpayable returns (uint256 baseTokenOut)
Exchange
_amountShares
for some amount of baseToken.Name | Type | Description |
---|---|---|
_amountShares | uint256 | The amount of the Entity's portfolio shares to exchange. |
_data | bytes | Data that the portfolio needs to make the redemption. In some cases, this will be swap parameters. |
Name | Type | Description |
---|---|---|
baseTokenOut | uint256 | The amount of baseToken that this redemption yields to the Entity. |
function redemptionFee() external view returns (uint256)
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
function registry() external view returns (contract Registry)
Name | Type | Description |
---|---|---|
_0 | contract Registry | undefined |
function setCap(uint256 _amount) external nonpayable
Set the Portfolio cap.
Name | Type | Description |
---|---|---|
_amount | uint256 | Amount, denominated in baseToken. |
function setDepositFee(uint256 _pct) external nonpayable
Set deposit fee.
Name | Type | Description |
---|---|---|
_pct | uint256 | Percentage as ZOC (e.g. 1000 = 10%). |
function setRedemptionFee(uint256 _pct) external nonpayable
Set redemption fee.
Name | Type | Description |
---|---|---|
_pct | uint256 | Percentage as ZOC (e.g. 1000 = 10%). |
function specialTarget() external view returns (bytes20)
If set to a non-zero value, this contract will pass these byes as the target contract to the RolesAuthority's
canCall
method, rather than its own contract. This allows a single RolesAuthority permission to manage permissions simultaneously for a group of contracts that identify themselves as a certain type. For example: set a permission for all "entity" contracts.Name | Type | Description |
---|---|---|
_0 | bytes20 | undefined |
function symbol() external view returns (string)
Name | Type | Description |
---|---|---|
_0 | string | undefined |
function takeFees(uint256 _amountAssets) external nonpayable
Takes some amount of assets from this portfolio as assets under management fee.
Name | Type | Description |
---|---|---|
_amountAssets | uint256 | Amount of assets to take. |
function totalAssets() external view returns (uint256)
Total amount of the underlying asset that is managed by the Portfolio.
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
function totalSupply() external view returns (uint256)
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
function transfer(address, uint256) external pure returns (bool)
transfer
disabled on Portfolio tokens.Name | Type | Description |
---|---|---|
_0 | address | undefined |
_1 | uint256 | undefined |
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
function transferFrom(address, address, uint256) external pure returns (bool)
transferFrom
disabled on Portfolio tokens.Name | Type | Description |
---|---|---|
_0 | address | undefined |
_1 | address | undefined |
_2 | uint256 | undefined |
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
event Approval(address indexed owner, address indexed spender, uint256 amount)
Name | Type | Description |
---|---|---|
owner indexed | address | undefined |
spender indexed | address | undefined |
amount | uint256 | undefined |
event CapSet(uint256 cap)
Event emitted when
cap
is set.Name | Type | Description |
---|---|---|
cap | uint256 | undefined |
event Deposit(address indexed sender, address indexed receiver, uint256 assets, uint256 shares)
sender
has exchanged assets
for shares
, and transferred those shares
to receiver
.Name | Type | Description |
---|---|---|
sender indexed | address | undefined |
receiver indexed | address | undefined |
assets | uint256 | undefined |
shares | uint256 | undefined |
event DepositFeeSet(uint256 fee)
Event emitted when
depositFee
is set.Name | Type | Description |
---|---|---|
fee | uint256 | undefined |
event FeesTaken(uint256 amount)
Name | Type | Description |
---|---|---|
amount | uint256 | undefined |
event Redeem(address indexed sender, address indexed receiver, uint256 assets, uint256 shares)
sender
has exchanged shares
for assets
, and transferred those assets
to receiver
.Name | Type |
---|