IPaymentCoordinator

Git Source

Author: Layr Labs, Inc.

Functions

merkleRootPostsLength

Getter function for the length of the merkleRootPosts array

function merkleRootPostsLength() external view returns (uint256);

cumulativeTokenAmountClaimedByRecipient

getter cumulativeTokenAmountClaimedByRecipient (mapping(IERC20 => mapping(address => uint256))

function cumulativeTokenAmountClaimedByRecipient(IERC20 token, address recipient) external view returns (uint256);

merkleRootPosts

getter for merkleRootPosts

function merkleRootPosts(uint256 index) external view returns (MerkleRootPost memory);

makePayment

Makes a payment of sum(amounts) paid in token, for operator's contributions to an AVS, between startBlockNumber (inclusive) and endBlockNumber (inclusive)

Emits a PaymentReceived event

Transfers the total payment from the msg.sender to this contract, so the caller must have previously approved this contract to transfer at least sum(amounts) of token

function makePayment(Payment calldata payment) external;

postMerkleRoot

Permissioned function which allows posting a new Merkle root

function postMerkleRoot(bytes32 newRoot, uint256 height, uint256 calculatedUpToBlockNumber) external;

withdrawEigenLayerShare

Permissioned function which allows withdrawal of EigenLayer's share of token from all received payments

function withdrawEigenLayerShare(IERC20 token, address recipient) external;

proveAndClaimEarnings

Called by a staker or operator to prove the inclusion of their earnings in a posted Merkle root and claim them.

function proveAndClaimEarnings(bytes memory proof, uint256 rootIndex, MerkleLeaf memory leaf, uint256 leafIndex)
    external;

Parameters

Structs

Payment

Struct used by AVSs when informing EigenLayer of a payment made to an operator, but that could be earned at least in part with funds from stakers who have delegated to the operator

struct Payment {
    IERC20 token;
    address operator;
    uint256[] amounts;
    uint256[] quorums;
    uint256 startBlockNumber;
    uint256 endBlockNumber;
}

MerkleRootPost

Struct used when posting new Merkle roots

struct MerkleRootPost {
    bytes32 root;
    uint256 height;
    uint256 confirmedAtBlockNumber;
    uint256 calculatedUpToBlockNumber;
}

MerkleLeaf

Struct used for leaves of posted Merkle trees

struct MerkleLeaf {
    address recipient;
    IERC20[] tokens;
    uint256[] amounts;
}

Last updated