morph-altfee

Signs and broadcasts Morph L2 transactions paying gas with ERC20 tokens.

3|Updated Apr 15, 2026
One-click install
npx skills add https://github.com/Pieverse-Eng/purrfect-skills --skill morph-altfee-pieverse-eng
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: morph-altfee
Source: https://github.com/Pieverse-Eng/purrfect-skills/tree/main/morph/vendor/morph-altfee
Command: npx skills add https://github.com/Pieverse-Eng/purrfect-skills --skill morph-altfee-pieverse-eng

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enable transactions on Morph L2 without requiring native ETH for gas by allowing gas payment with alternative ERC20 tokens, reducing friction for users and dapps that prefer stablecoins or other tokens.

Core Features & Use Cases

  • List and inspect fee tokens: Query the on-chain TokenRegistry to enumerate supported fee tokens and view metadata such as contract address, scale, feeRate, decimals, and active status.
  • Estimate token-denominated fees: Calculate the required feeLimit from gasFeeCap, gasLimit, L1DataFee, tokenScale and feeRate and include a safety margin for reliable payments.
  • Sign and broadcast alt-fee transactions locally: Construct and send Morph tx type 0x7f transactions with local private-key signing for simple transfers or contract calls while ensuring user confirmation before signing.
  • Use Case: Obtain a dex swap calldata from the morph-dex skill, estimate the alt-fee cost for the call, then sign and broadcast the swap transaction paying gas in USDT.

Quick Start

Use the morph-altfee skill to list supported fee tokens, estimate the feeLimit for a planned transaction, and sign and broadcast the transaction locally with your private key.

Frequently Asked Questions about morph-altfee

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I pay gas fees with ERC20 tokens on Morph L2?

You can pay gas fees with ERC20 tokens on Morph L2 by constructing and broadcasting tx type 0x7f transactions. The process involves querying the on-chain TokenRegistry for supported fee tokens, calculating the required feeLimit, and signing the transaction locally with your private key.

What is the Morph alt-fee transaction type 0x7f?

Morph tx type 0x7f is a specialized transaction format that enables paying gas with alternative ERC20 tokens instead of native ETH. It allows users to execute simple transfers or contract calls on Morph Mainnet without needing ETH for gas.

How do I estimate token-denominated gas fees for a Morph transaction?

To estimate token-denominated gas fees, you calculate the feeLimit from gasFeeCap, gasLimit, L1DataFee, tokenScale, and feeRate. The calculation includes a safety margin to ensure reliable payment processing when using ERC20 tokens for gas.

Can I use stablecoins to pay for gas on Morph Mainnet?

Yes, you can use stablecoins or other supported ERC20 tokens to pay for gas on Morph Mainnet (chain id 2818). The on-chain TokenRegistry enumerates all active fee tokens, allowing you to view metadata like contract address, scale, feeRate, and decimals.

How do I list supported fee tokens on the Morph TokenRegistry?

You can list supported fee tokens by querying the on-chain TokenRegistry on Morph Mainnet. This returns metadata for each token including contract address, scale, feeRate, decimals, and active status, enabling you to select a valid ERC20 token for gas payment.

Does morph-altfee support local private-key signing for contract calls?

Yes, morph-altfee supports local private-key signing for both simple transfers and contract calls. It constructs type 0x7f transactions and ensures user confirmation before signing and broadcasting, allowing dapps to execute contract interactions while paying gas in ERC20 tokens.