Skip to content
Open
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
2 changes: 2 additions & 0 deletions go/.changes/unreleased/telos-support.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
kind: added
body: Add Telos EVM mainnet (chain ID 40) support with USDC.e (Stargate) as the default stablecoin
21 changes: 21 additions & 0 deletions go/mechanisms/evm/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ var (
ChainIDBase = big.NewInt(8453)
ChainIDBaseSepolia = big.NewInt(84532)
ChainIDMegaETH = big.NewInt(4326)
ChainIDTelos = big.NewInt(40)

// Network configurations
// See DEFAULT_ASSET.md for guidelines on adding new chains
Expand Down Expand Up @@ -131,6 +132,26 @@ var (
Decimals: 18,
},
},
// Telos EVM Mainnet
"eip155:40": {
ChainID: ChainIDTelos,
DefaultAsset: AssetInfo{
Address: "0xF1815bd50389c46847f0Bda824eC8da914045D14", // USDC.e (Stargate) - FiatTokenV2
Name: "Bridged USDC (Stargate)",
Version: "2",
Decimals: DefaultDecimals,
},
},
// Telos EVM Mainnet (legacy v1 format)
"telos": {
ChainID: ChainIDTelos,
DefaultAsset: AssetInfo{
Address: "0xF1815bd50389c46847f0Bda824eC8da914045D14",
Name: "Bridged USDC (Stargate)",
Version: "2",
Decimals: DefaultDecimals,
},
},
}

// EIP-3009 ABI for transferWithAuthorization with v,r,s (EOA signatures)
Expand Down
1 change: 1 addition & 0 deletions python/x402/changelog.d/telos-support.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add Telos EVM mainnet (chain ID 40) support with USDC.e (Stargate) as the default stablecoin
21 changes: 21 additions & 0 deletions python/x402/mechanisms/evm/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,24 @@ class NetworkConfig(TypedDict):
},
},
},
# Telos EVM Mainnet
"eip155:40": {
"chain_id": 40,
"default_asset": {
"address": "0xF1815bd50389c46847f0Bda824eC8da914045D14",
"name": "Bridged USDC (Stargate)",
"version": "2",
"decimals": 6,
},
"supported_assets": {
"USDC.e": {
"address": "0xF1815bd50389c46847f0Bda824eC8da914045D14",
"name": "Bridged USDC (Stargate)",
"version": "2",
"decimals": 6,
},
},
},
}

# Network aliases (legacy names to CAIP-2)
Expand All @@ -189,6 +207,7 @@ class NetworkConfig(TypedDict):
"polygon": "eip155:137",
"avalanche": "eip155:43114",
"megaeth": "eip155:4326",
"telos": "eip155:40",
}

# V1 supported networks (legacy name-based)
Expand All @@ -209,6 +228,7 @@ class NetworkConfig(TypedDict):
"educhain",
"skale-base-sepolia",
"megaeth",
"telos",
]

# V1 network name to chain ID mapping
Expand All @@ -230,6 +250,7 @@ class NetworkConfig(TypedDict):
"educhain": 656476,
"skale-base-sepolia": 1444673419,
"megaeth": 4326,
"telos": 40,
}

# EIP-3009 ABIs
Expand Down
5 changes: 5 additions & 0 deletions typescript/.changeset/add-telos-support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@x402/evm": minor
---

Add Telos EVM mainnet (chain ID 40) support with USDC.e (Stargate) as the default stablecoin
6 changes: 6 additions & 0 deletions typescript/packages/mechanisms/evm/src/exact/server/scheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,12 @@ export class ExactEvmScheme implements SchemeNetworkServer {
version: "1",
decimals: 18,
}, // MegaETH mainnet USDM
"eip155:40": {
address: "0xF1815bd50389c46847f0Bda824eC8da914045D14",
name: "Bridged USDC (Stargate)",
version: "2",
decimals: 6,
}, // Telos EVM mainnet USDC.e
};

const assetInfo = stablecoins[network];
Expand Down
1 change: 1 addition & 0 deletions typescript/packages/mechanisms/evm/src/v1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const EVM_NETWORK_CHAIN_ID_MAP = {
educhain: 41923,
"skale-base-sepolia": 324705682,
megaeth: 4326,
telos: 40,
} as const;

export type EvmNetworkV1 = keyof typeof EVM_NETWORK_CHAIN_ID_MAP;
Expand Down