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
8 changes: 8 additions & 0 deletions typescript/packages/x402/src/types/shared/evm/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ export const config: Record<string, ChainConfig> = {
usdcAddress: "0x2e08028E3C4c2356572E096d8EF835cD5C6030bD",
usdcName: "Bridged USDC (SKALE Bridge)",
},
"143": {
usdcAddress: "0x754704Bc059F8C67012fEd69BC8A327a5aafb603",
usdcName: "USDC",
},
"10143": {
usdcAddress: "0x534b2f3A21130d7a60830c2Df862319e593943A3",
usdcName: "USDC",
},
};

export type ChainConfig = {
Expand Down
6 changes: 6 additions & 0 deletions typescript/packages/x402/src/types/shared/evm/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import {
abstractTestnet,
story,
eduChain,
monad,
monadTestnet,
} from "viem/chains";
import { skaleBaseSepolia } from "../custom-chains";
import { privateKeyToAccount } from "viem/accounts";
Expand Down Expand Up @@ -235,6 +237,10 @@ export function getChainFromNetwork(network: string | undefined): Chain {
return iotexTestnet;
case "skale-base-sepolia":
return skaleBaseSepolia;
case "monad":
return monad;
case "monad-testnet":
return monadTestnet;
default:
throw new Error(`Unsupported network: ${network}`);
}
Expand Down
6 changes: 6 additions & 0 deletions typescript/packages/x402/src/types/shared/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export const NetworkSchema = z.enum([
"story",
"educhain",
"skale-base-sepolia",
"monad",
"monad-testnet",
]);
export type Network = z.infer<typeof NetworkSchema>;

Expand All @@ -38,6 +40,8 @@ export const SupportedEVMNetworks: Network[] = [
"story",
"educhain",
"skale-base-sepolia",
"monad",
"monad-testnet",
];
export const EvmNetworkToChainId = new Map<Network, number>([
["abstract", 2741],
Expand All @@ -55,6 +59,8 @@ export const EvmNetworkToChainId = new Map<Network, number>([
["story", 1514],
["educhain", 41923],
["skale-base-sepolia", 324705682],
["monad", 143],
["monad-testnet", 10143],
]);

// svm
Expand Down