Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IERC1363

Inherits: IERC20, IERC165

Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363]. Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract after transfer or transferFrom, or code on a spender contract after approve, in a single transaction.

Functions

transferAndCall

Moves a value amount of tokens from the caller's account to to and then calls {IERC1363Receiver-onTransferReceived} on to.

function transferAndCall(address to, uint256 value) external returns (bool);

Parameters

NameTypeDescription
toaddressThe address which you want to transfer to.
valueuint256The amount of tokens to be transferred.

Returns

NameTypeDescription
<none>boolA boolean value indicating whether the operation succeeded unless throwing.

transferAndCall

Moves a value amount of tokens from the caller's account to to and then calls {IERC1363Receiver-onTransferReceived} on to.

function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);

Parameters

NameTypeDescription
toaddressThe address which you want to transfer to.
valueuint256The amount of tokens to be transferred.
databytesAdditional data with no specified format, sent in call to to.

Returns

NameTypeDescription
<none>boolA boolean value indicating whether the operation succeeded unless throwing.

transferFromAndCall

Moves a value amount of tokens from from to to using the allowance mechanism and then calls {IERC1363Receiver-onTransferReceived} on to.

function transferFromAndCall(address from, address to, uint256 value) external returns (bool);

Parameters

NameTypeDescription
fromaddressThe address which you want to send tokens from.
toaddressThe address which you want to transfer to.
valueuint256The amount of tokens to be transferred.

Returns

NameTypeDescription
<none>boolA boolean value indicating whether the operation succeeded unless throwing.

transferFromAndCall

Moves a value amount of tokens from from to to using the allowance mechanism and then calls {IERC1363Receiver-onTransferReceived} on to.

function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);

Parameters

NameTypeDescription
fromaddressThe address which you want to send tokens from.
toaddressThe address which you want to transfer to.
valueuint256The amount of tokens to be transferred.
databytesAdditional data with no specified format, sent in call to to.

Returns

NameTypeDescription
<none>boolA boolean value indicating whether the operation succeeded unless throwing.

approveAndCall

Sets a value amount of tokens as the allowance of spender over the caller's tokens and then calls IERC1363Spender-onApprovalReceived on spender.

function approveAndCall(address spender, uint256 value) external returns (bool);

Parameters

NameTypeDescription
spenderaddressThe address which will spend the funds.
valueuint256The amount of tokens to be spent.

Returns

NameTypeDescription
<none>boolA boolean value indicating whether the operation succeeded unless throwing.

approveAndCall

Sets a value amount of tokens as the allowance of spender over the caller's tokens and then calls IERC1363Spender-onApprovalReceived on spender.

function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);

Parameters

NameTypeDescription
spenderaddressThe address which will spend the funds.
valueuint256The amount of tokens to be spent.
databytesAdditional data with no specified format, sent in call to spender.

Returns

NameTypeDescription
<none>boolA boolean value indicating whether the operation succeeded unless throwing.