PapayaInteraction
Class for using writable methods of Papaya Contract
Last updated
Class for using writable methods of Papaya Contract
Last updated
papayaAddress(
`0x{string}`
)
- smart-contract address
provider( JsonRpcProvider )
- jsonRpc blockchain provider from
secretKey(
string
)
- wallet private key
This method assigns a unique number to your wallet, it needed for current functionality of projects
The default settings are the fee settings that will be set for all users of your project
initialized(
boolean
)
- unambiguously determine that the settings have been set
projectFee(
number
)
- the amount of fee
projectId(
number
)
- unique number of project
The settings of a specific user allow you to set up the fee more precisely in relation to a specific wallet, this is necessary, for example, in cases of interaction with opinion leaders
user(
string
)
- address of certain user
initialized(
boolean
)
- unambiguously determine that the settings have been set
projectFee(
number
)
- the amount of fee
projectId(
number
)
- unique number of project
Allows depositing funds into the contract. To use this method, you must first approve the necessary amount of tokens for the Papaya contract.
amount(
number
)
- amount of funds
isPermit2(
boolean
)
- a flag indicating the specificity of the token
This method is used if you need to deposit funds into another user's account, this is necessary in case of integration of third-party paid systems, for example fiat on ramp
amount(
number
)
- amount of funds
to(
string
)
- address of receiever
isPermit2(
boolean
)
- a flag indicating the specificity of the token
Allows withdrawing your funds at any time. When this method is called, your balance will be synchronized, and you can withdraw any available amount.
amount (
number
)
- amount of funds
This method is used if you want to withdraw your funds to another wallet
to(
string
)
- address of receiver
amount(
number
)
- amount of funds
Allows sending funds without using the subscription mechanism, similar to the classic transfer method.
to(
string
)
- address of receiver
amount(
number
)
- amount of funds
Responsible for creating and modifying subscriptions. Since it is impossible to efficiently predefine costs, users need to specify how much they want to pay monthly, for example.
author(
string
)
- address of certain author
subscriptionRate(
number
)
- the size of a per-second subscription
projectId(
number
)
- unique number of project
Responsible for disabling a subscription. This method can be called at any time to stop payments from an individual user.
author(
string
)
- address of certain author
target(
string
)
- address of user that would be liquidated
This method gives you access to liquidation mechanism. More information