PapayaGetter
Class for using read-only methods of Papaya Contract
Last updated
Class for using read-only methods of Papaya Contract
Last updated
papayaAddress(
`0x{string}`
)
- smart-contract address
provider( JsonRpcProvider )
- jsonRpc blockchain provider from
To know the subscriptions of a particular user, use the allSubscription
method, which returns arrays of addresses and encoded subscription data (cost, author’s share, project number).
user(
string
)
- address of certain user
The standard method for ERC 20 shows the balance, but with some changes. Due to the fact that streams change the balance every second, this method will show the current balance, even if there was no synchronization
projectId(
number
)
- unique number of project
If the settings of a specific user are set, you can familiarize yourself with them using this method
projectId(
number
)
- number of certain projectId
user(
string
)
- address of certain user
This method returns an array of addresses that are the owners of the projects
This method returns four fields: balance, incoming stream, outgoing stream, last synchronization timestamp. Note: Since user balance synchronization occurs on request, balance data may be outdated.
user(
string
)
- address of certain user
This method returns the floor of every calculation, it is necessary to calculate the value of assets and fees
This method returns the maximum possible fee value
This method returns the approximate cost of completing the liquidation if the person does not have subscriptions.
This method returns the approximate cost of performing liquidation for each subscription
This method returns the maximum possible count of subcriptions per user
This method returns address of coin price feed, that used in smart-contract
This method returns address of token price feed, that used in smart-contract
This method returns address of underlying token, because we masked it into pp*, where * is an asset name
This method returns the number for which the token was needed to be converted to the form 1e18