azeth_execute_agreement
Execute a due payment from an on-chain agreement. Automatically validates interval, caps, and limits, with pro-rata accrual for scaling payout by elapsed time.
Instructions
Execute a due payment from an on-chain agreement. Anyone can call this — the payer, payee, or a third-party keeper.
Use this when: You are a service provider collecting a recurring payment owed to you, a payer triggering your own agreement manually, or a keeper bot executing due agreements.
Keeper support: When the "account" is a foreign address (not owned by your private key), execution routes through your own account or EOA automatically. No special configuration needed.
The contract validates all conditions on-chain: interval elapsed, active, within caps and limits. Pro-rata accrual means the payout scales with elapsed time (capped at 3x the interval).
Returns: Transaction hash, amount paid, execution count, and next execution time. If the agreement soft-fails (insufficient balance, guardian limit), it returns the failure reason without reverting.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | Target chain. Defaults to AZETH_CHAIN env var or "baseSepolia". Accepts "base", "baseSepolia", "ethereumSepolia", "ethereum" (and aliases like "base-sepolia", "eth-sepolia", "sepolia", "eth", "mainnet"). | |
| account | Yes | The payer smart account whose agreement to execute: Ethereum address, participant name, "me", or "#N". | |
| agreementId | Yes | The agreement ID to execute (from azeth_create_payment_agreement or azeth_list_agreements). |