ERC20PaymentResolver

Git Source

Resolver contract for EAS attestations that enforces payment in an ERC-20 token.

State Variables

paymentToken

IERC20 public immutable paymentToken;

attestationFee

uint256 public immutable attestationFee;

feeRecipient

address public immutable feeRecipient;

Functions

constructor

constructor(address _token, uint256 _fee, address _feeRecipient);

Parameters

Name
Type
Description

_token

address

The ERC-20 token address used for payment.

_fee

uint256

The fee required per attestation (in token's smallest unit).

_feeRecipient

address

The address that will receive the fees.

resolve

Called by the EAS contract when processing an attestation.

This function performs an ERC-20 transferFrom() to collect the fee. The attester must have approved this contract for the required fee amount.

function resolve(address attester, bytes calldata) external;

Parameters

Name
Type
Description

attester

address

The address initiating the attestation.

<none>

bytes

Last updated

Was this helpful?