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 funds

  • amount (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 user

  • liquidator (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 address

  • newOwner (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