Core Events
This section covers the core events emitted by the Papaya protocol.
Transfer
Emitted when tokens are transferred.
event Transfer(address indexed _from, address indexed _to, uint256 _value)Parameters
_from(address, indexed): The address tokens are transferred from_to(address, indexed): The address tokens are transferred to_value(uint256): The amount of tokens transferred
Description
Standard ERC20 transfer event emitted when tokens are moved between addresses.
Example
// Listen for transfer events
papayaContract.on("Transfer", (from, to, value) => {
console.log(`Transfer: ${value} tokens from ${from} to ${to}`);
});Refill
Emitted when funds are deposited into an account.
Parameters
user(address, indexed): The user who received the fundsamount(uint256): The amount of tokens deposited
Description
Emitted when tokens are deposited into a user's account through the deposit or depositFor functions.
Example
Liquidated
Emitted when an account is liquidated.
Parameters
user(address, indexed): The address of the liquidated userliquidator(address, indexed): The address of the liquidator
Description
Emitted when an underfunded account is liquidated by the liquidate function.
Example
OwnershipTransferred
Emitted when contract ownership is transferred.
Parameters
previousOwner(address, indexed): The previous owner's addressnewOwner(address, indexed): The new owner's address
Description
Emitted when the contract ownership is transferred to a new address.
Example
EIP712DomainChanged
Emitted when the EIP-712 domain is changed.
Description
Emitted when the EIP-712 domain information is updated.
Example
Last updated