Kind: global class
- ExchangeRates
- new ExchangeRates(signer, exchangeRatesAddress)
- .rateForCurrency(key) ⇒
Promise.<BigNumber>
- .getEffectiveValue(source, amount, destination) ⇒
Promise.<BigNumber>
Param | Type |
---|---|
signer | Signer |
exchangeRatesAddress | string |
Returns the rate for supplied currency.
Kind: instance method of ExchangeRates
Param | Type |
---|---|
key | string |
Returns the effective value for source currency amount to the destination currency.
Kind: instance method of ExchangeRates
Param | Type |
---|---|
source | string |
amount | BigNumber | string |
destination | string |
Kind: global class
- Factory
- new Factory(signer, factoryAddress)
- instance
- .getAddressResolver() ⇒
Promise.<string>
- .getExchangeRates() ⇒
Promise.<ExchangeRates>
- .getAddress() ⇒
string
- .loadPool(address) ⇒
Promise.<Pool>
- .isPool(address) ⇒
Promise.<boolean>
- .validatePool(address) ⇒
Promise.<void>
- .getPoolCount(raw) ⇒
Promise.<(number|BigNumber)>
- .getDaoAddress() ⇒
Promise.<string>
- .getManagerFee(address, raw) ⇒
Promise.<(number|Array.<BigNumber>)>
- .getMaximumManagerFee(raw) ⇒
Promise.<(number|Array.<BigNumber>)>
- .getExitFee(raw) ⇒
Promise.<(number|Array.<BigNumber>)>
- .getDaoFee(raw) ⇒
Promise.<(number|Array.<BigNumber>)>
- .getExitFeeCooldown(raw) ⇒
Promise.<(number|BigNumber)>
- .getMaximumAssetCount(raw) ⇒
Promise.<(number|BigNumber)>
- .createPool(privatePool, managerName, poolName, assets, managerFeeNumerator) ⇒
Promise.<Pool>
- .getAddressResolver() ⇒
- static
Param | Type |
---|---|
signer | Signer |
factoryAddress | string |
Returns the address resolver of the factory.
Kind: instance method of Factory
factory.getExchangeRates() ⇒ Promise.<ExchangeRates>
Returns an ExchangeRates instance.
Kind: instance method of Factory
Returns the address of the factory contract.
Kind: instance method of Factory
factory.loadPool(address) ⇒ Promise.<Pool>
Loads a pool based on the supplied address. Fails if pool doesn't belong to the given factory.
Kind: instance method of Factory
Param | Type |
---|---|
address | string |
Returns if supplied address is a pool.
Kind: instance method of Factory
Param | Type |
---|---|
address | string |
Kind: instance method of Factory
Param | Type |
---|---|
address | string |
Returns the number of pools in the given factory.
Kind: instance method of Factory
Param | Type | Default |
---|---|---|
raw | boolean |
false |
Returns the DAO address.
Kind: instance method of Factory
Returns tha manager fee of the given pool.
Kind: instance method of Factory
Param | Type | Default |
---|---|---|
address | string |
|
raw | boolean |
false |
Returns the maximal manager fee in the current factory.
Kind: instance method of Factory
Param | Type | Default |
---|---|---|
raw | boolean |
false |
Returns the exit fee.
Kind: instance method of Factory
Param | Type | Default |
---|---|---|
raw | boolean |
false |
Returns the DAO fee.
Kind: instance method of Factory
Param | Type | Default |
---|---|---|
raw | boolean |
false |
Returns the exit fee cooldown.
Kind: instance method of Factory
Param | Type | Default |
---|---|---|
raw | boolean |
false |
Returns the maximum number of assets that a pool can support.
Kind: instance method of Factory
Param | Type | Default |
---|---|---|
raw | boolean |
false |
factory.createPool(privatePool, managerName, poolName, assets, managerFeeNumerator) ⇒ Promise.<Pool>
Creates a pool.
Kind: instance method of Factory
Param | Type | Default |
---|---|---|
privatePool | boolean |
|
managerName | string |
|
poolName | string |
|
assets | Array.<string> |
|
managerFeeNumerator | number | BigNumber |
100 |
Factory.initialize() ⇒ Factory
Initializes a Factory instance based on the .env file.
Kind: static method of Factory
Kind: global class
- Pool
- new Pool(signer, poolAddress)
- .token() ⇒
Token
- .getAddress() ⇒
string
- .getManager() ⇒
Promise.<string>
- .getManagerName() ⇒
Promise.<string>
- .isMember(address) ⇒
Promise.<boolean>
- .getMembers() ⇒
Promise.<Array.<string>>
- .getMemberCount(raw) ⇒
Promise.<(number|BigNumber)>
- .changeManager(address, name) ⇒
Promise.<void>
- .addMembers(members) ⇒
Promise.<void>
- .removeMembers(members) ⇒
Promise.<void>
- .addMember(member) ⇒
Promise.<void>
- .removeMember(member) ⇒
Promise.<void>
- .isPrivate() ⇒
Promise.<boolean>
- .getCreator() ⇒
Promise.<string>
- .getCreationTime(raw) ⇒
Promise.<(number|BigNumber)>
- .getFactory() ⇒
Promise.<string>
- .getAssets() ⇒
Promise.<Array.<string>>
- .getTokenPriceAtLastFeeMint() ⇒
Promise.<BigNumber>
- .getLastDepositByAddress(address, raw) ⇒
Promise.<(number|BigNumber)>
- .getManagerFee(raw) ⇒
Promise.<(number|BigNumber)>
- .getExitFee(raw) ⇒
Promise.<(number|BigNumber)>
- .getAssetCount(raw) ⇒
Promise.<(number|BigNumber)>
- .isAssetSupported(key, convert) ⇒
Promise.<boolean>
- .getAsset(key) ⇒
Promise.<Token>
- .getPoolValue() ⇒
Promise.<BigNumber>
- .assetValue(key) ⇒
Promise.<BigNumber>
- .getSummary() ⇒
Promise.<{exitFee: number, managerFee: number, private: boolean, managerAddress: string, creationTime: number, totalSupply: BigNumber, name: string, managerName: string, totalPoolValue: BigNumber}>
- .getComposition() ⇒
Promise.<any>
- .getWaitingPeriods() ⇒
Promise.<Object>
- .getSuspendedAssets() ⇒
Promise.<Object>
- .addAsset(key) ⇒
Promise.<void>
- .removeAsset(key) ⇒
Promise.<void>
- .deposit(amount) ⇒
Promise.<void>
- .withdraw(amount, forfeit) ⇒
Promise.<void>
- .exchange(sourceKey, sourceAmount, destinationKey) ⇒
Promise.<void>
Param | Type |
---|---|
signer | Signer |
poolAddress | string |
pool.token() ⇒ Token
Returns the pool token instance.
Kind: instance method of Pool
Returns the pool address.
Kind: instance method of Pool
Returns the pool manager address.
Kind: instance method of Pool
Returns the pool manager name.
Kind: instance method of Pool
Returns if the supplied address is a pool member.
Kind: instance method of Pool
Param | Type |
---|---|
address | string |
Returns all pool member addresses.
Kind: instance method of Pool
Returns the member count.
Kind: instance method of Pool
Param | Default |
---|---|
raw | false |
Transfers the manager role to the supplied address with and changes the manager name.
Kind: instance method of Pool
Param | Type |
---|---|
address | string |
name | string |
Batch add members.
Kind: instance method of Pool
Param | Type |
---|---|
members | Array.<string> |
Batch remove members.
Kind: instance method of Pool
Param | Type |
---|---|
members | Array.<string> |
Add a member.
Kind: instance method of Pool
Param | Type |
---|---|
member | string |
Remove a member.
Kind: instance method of Pool
Param | Type |
---|---|
member | string |
Returns if a pool is private
Kind: instance method of Pool
Returns the address of the pool creator.
Kind: instance method of Pool
Returns the pool creation time.
Kind: instance method of Pool
Param | Type | Default |
---|---|---|
raw | boolean |
false |
Returns the factory address.
Kind: instance method of Pool
Returns all pool assets.
Kind: instance method of Pool
Returns the last token price at which the manager fee was minted.
Kind: instance method of Pool
Returns the timestamp of the last deposit of the supplied address.
Kind: instance method of Pool
Param | Type | Default |
---|---|---|
address | string |
|
raw | boolean |
false |
Returns the manager fee.
Kind: instance method of Pool
Param | Type | Default |
---|---|---|
raw | boolean |
false |
Returns the exit fee.
Kind: instance method of Pool
Param | Type | Default |
---|---|---|
raw | boolean |
false |
Returns the asset count.
Kind: instance method of Pool
Param | Type | Default |
---|---|---|
raw | boolean |
false |
Returns true if the asset is supported.
Kind: instance method of Pool
Param | Type | Default |
---|---|---|
key | string |
|
convert | boolean |
false |
pool.getAsset(key) ⇒ Promise.<Token>
Returns the Token instance of the supplied asset.
Kind: instance method of Pool
Param | Type |
---|---|
key | string |
Returns the pool value.
Kind: instance method of Pool
Returns the asset value of the given asset.
Kind: instance method of Pool
Param | Type |
---|---|
key | string |
pool.getSummary() ⇒ Promise.<{exitFee: number, managerFee: number, private: boolean, managerAddress: string, creationTime: number, totalSupply: BigNumber, name: string, managerName: string, totalPoolValue: BigNumber}>
Returns the fund summary
Kind: instance method of Pool
Returns the fund composition.
Kind: instance method of Pool
Returns waiting periods for all assets.
Kind: instance method of Pool
Get a map of suspended assets.
Kind: instance method of Pool
Add a supported asset.
Kind: instance method of Pool
Param | Type |
---|---|
key | string |
Remove a supported asset.
Kind: instance method of Pool
Param | Type |
---|---|
key | string |
Deposit
Kind: instance method of Pool
Param | Type |
---|---|
amount | string | BigNumber |
Withdraw
Kind: instance method of Pool
Param | Type | Default |
---|---|---|
amount | string | BigNumber |
|
forfeit | boolean |
false |
Exchange
Kind: instance method of Pool
Param | Type |
---|---|
sourceKey | string |
sourceAmount | string | BigNumber |
destinationKey | string |
Kind: global class
- Token
- new Token(signer, address)
- .getAddress() ⇒
string
- .totalSupply() ⇒
Promise.<BigNumber>
- .balanceOf(address) ⇒
Promise.<BigNumber>
- .allowance(owner, spender) ⇒
Promise.<BigNumber>
- .transfer(recipient, amount) ⇒
Promise.<void>
- .approve(spender, amount) ⇒
Promise.<void>
- .transferFrom(sender, recipient, amount) ⇒
Promise.<void>
Param | Type |
---|---|
signer | Signer |
address | string |
Kind: instance method of Token
Returns the total supply of the token.
Kind: instance method of Token
Returns the balance of the given address.
Kind: instance method of Token
Param | Type |
---|---|
address | string |
Returns the allowance of the given owner to the given spender.
Kind: instance method of Token
Param | Type |
---|---|
owner | string |
spender | string |
Transfers the specified amount to the specified recipient
Kind: instance method of Token
Param | Type |
---|---|
recipient | string |
amount | BigNumber | string |
Approves the allowance to the given spender.
Kind: instance method of Token
Param | Type |
---|---|
spender | string |
amount | BigNumber | string |
Transfers from using allowance.
Kind: instance method of Token
Param | Type |
---|---|
sender | string |
recipient | string |
amount | BigNumber | string |