class IERC677

Defines the interface for an ERC677 token contract.

Extends the standard ERC20 interface with the additional transferAndCall method, enabling token transfers that also trigger contract calls.

{IERC20}

Properties

events

The events emitted by the contract.

{IERC677Events}
Signature
events: IERC677Events;

Methods

transferAndCall(to, value, data0, data1, data2, data3)

Transfers tokens to a recipient and calls a contract method.

Parameters
Name Type Description

to

PublicKey

The address of the recipient.

value

UInt64

The amount of tokens to transfer.

data0

Field

The first additional field to be passed to the contract method, if applicable.

data1

Field

The second additional field to be passed to the contract method, if applicable.

data2

Field

The third additional field to be passed to the contract method, if applicable.

data3

Field

The fourth additional field to be passed to the contract method, if applicable.

Returns

Promise<void>

{Bool} - True if the transfer and call were successful, false otherwise. Transfer - Emitted when the transfer is successful.

Signature
abstract transferAndCall(to: PublicKey, value: UInt64, data0: Field, data1: Field, data2: Field, data3: Field): Promise<void>;
© OpenNautilus 2024-