ERC-1363 (Payable Tokens)
Last updated
Was this helpful?
Last updated
Was this helpful?
The standard, also known as the payable token standard, is an upgrade to tokens. While ERC-20 tokens can only be sent from one person to another, ERC-1363 tokens can trigger actions in a smart contract immediately after being sent or approved for spending.
For example, if you use one of these tokens to pay for a subscription, the contract can instantly recognize the payment and activate your subscription with no extra steps. This makes the standard useful for quick transactions like buying services, paying invoices, or managing subscriptions, all in one easy step.
ERC-1363
FunctionsThe original EIP can be found
For a more in-depth understanding, please see the below links:
ERC-1363 Interface Specification:
Description: This section defines the ERC1363
interface, detailing functions like transferAndCall
and approveAndCall
, and explains how they interact with recipient contracts.
Link:
IERC1363Receiver Interface:
Description: Defines the interface for contracts that want to handle incoming token transfers, specifying the onTransferReceived
function.
Link:
IERC1363Spender Interface:
Description: Specifies the interface for contracts that intend to handle token approvals, detailing the onApprovalReceived
function.
Link:
ERC-1363 Reference Implementation: Description: Provides a comprehensive implementation of the ERC-1363 standard, including how token transfers and approvals are handled with immediate contract interactions. Link:
ERC-165 Standard Overview:
Description: Offers an understanding of the ERC-165 standard, which ERC-1363 utilizes to ensure recipient contracts implement the necessary interfaces. ERC-165 compliance is essential because it allows contracts to query whether a recipient implements required functions like onTransferReceived
or onApprovalReceived
, ensuring seamless interaction and preventing errors.
Link:
ERC1363Payable Contract Example:
Description: An example contract demonstrating how to accept ERC-1363 token transfers and approvals, including handling the onTransferReceived
and onApprovalReceived
functions.
Link:
Contributor: