Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
kind: added
body: Add Mezo mainnet (chain ID 31612) support with mUSD as the default stablecoin
13 changes: 13 additions & 0 deletions go/mechanisms/evm/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ var (
ChainIDBaseSepolia = big.NewInt(84532)
ChainIDMegaETH = big.NewInt(4326)
ChainIDMonad = big.NewInt(143)
ChainIDMezo = big.NewInt(31612)
ChainIDMezoTestnet = big.NewInt(31611)
ChainIDStable = big.NewInt(988)
ChainIDStableTestnet = big.NewInt(2201)
Expand Down Expand Up @@ -140,6 +141,18 @@ var (
Decimals: DefaultDecimals,
},
},
// Mezo Mainnet (uses Permit2 instead of EIP-3009, supports EIP-2612)
"eip155:31612": {
ChainID: ChainIDMezo,
DefaultAsset: AssetInfo{
Address: "0xdD468A1DDc392dcdbEf6db6e34E89AA338F9F186", // mUSD on Mezo
Name: "Mezo USD",
Version: "1",
Decimals: 18,
AssetTransferMethod: AssetTransferMethodPermit2,
SupportsEip2612: true,
},
},
// Mezo Testnet (uses Permit2 instead of EIP-3009, supports EIP-2612)
"eip155:31611": {
ChainID: ChainIDMezoTestnet,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add Mezo mainnet (chain ID 31612) support with mUSD as the default stablecoin
12 changes: 12 additions & 0 deletions python/x402/mechanisms/evm/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,18 @@ class NetworkConfig(_NetworkConfigRequired, total=False):
"decimals": 6,
},
},
# Mezo Mainnet (uses Permit2 instead of EIP-3009, supports EIP-2612)
"eip155:31612": {
"chain_id": 31612,
"default_asset": {
"address": "0xdD468A1DDc392dcdbEf6db6e34E89AA338F9F186",
"name": "Mezo USD",
"version": "1",
"decimals": 18,
"asset_transfer_method": "permit2",
"supports_eip2612": True,
},
},
# Mezo Testnet (uses Permit2 instead of EIP-3009, supports EIP-2612)
"eip155:31611": {
"chain_id": 31611,
Expand Down
5 changes: 5 additions & 0 deletions typescript/.changeset/add-mezo-mainnet-default-stablecoin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@x402/evm": minor
---

Add Mezo mainnet (chain ID 31612) support with mUSD as the default stablecoin
1 change: 1 addition & 0 deletions typescript/packages/http/paywall/src/evm/gen/decimals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
*/
export const NETWORK_DECIMALS: Record<string, number> = {
"eip155:31611": 18,
"eip155:31612": 18,
"eip155:4326": 18,
};
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ export const DEFAULT_STABLECOINS: Record<string, ExactDefaultAssetInfo> = {
version: "2",
decimals: 6,
}, // Arbitrum Sepolia USDC
"eip155:31612": {
address: "0xdD468A1DDc392dcdbEf6db6e34E89AA338F9F186",
name: "Mezo USD",
version: "1",
decimals: 18,
assetTransferMethod: "permit2",
supportsEip2612: true,
}, // Mezo mainnet mUSD (no EIP-3009, supports EIP-2612)
"eip155:31611": {
address: "0x118917a40FAF1CD7a13dB0Ef56C86De7973Ac503",
name: "Mezo USD",
Expand Down
Loading