1use alloy::primitives::Address;
7
8pub const TEMPO_CHAIN_ID: u64 = 42431;
10
11pub const TEMPO_NETWORK: &str = "eip155:42431";
13
14pub const SCHEME_NAME: &str = "tempo-tip20";
16
17pub const DEFAULT_TOKEN: Address = Address::new([
19 0x20, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
20 0x00, 0x00, 0x00, 0x00,
21]);
22
23pub const TOKEN_DECIMALS: u32 = 6;
25
26pub const RPC_URL: &str = "https://rpc.moderato.tempo.xyz";
28
29pub const EXPLORER_BASE: &str = "https://explore.moderato.tempo.xyz";
31
32#[derive(Debug, Clone, PartialEq, Eq)]
35pub struct ChainConfig {
36 pub chain_id: u64,
37 pub network: String,
38 pub scheme_name: String,
39 pub default_token: Address,
40 pub token_decimals: u32,
41 pub rpc_url: String,
42 pub explorer_base: String,
43 pub eip712_domain_name: String,
44 pub eip712_domain_version: String,
45}
46
47impl Default for ChainConfig {
48 fn default() -> Self {
50 Self {
51 chain_id: TEMPO_CHAIN_ID,
52 network: TEMPO_NETWORK.to_string(),
53 scheme_name: SCHEME_NAME.to_string(),
54 default_token: DEFAULT_TOKEN,
55 token_decimals: TOKEN_DECIMALS,
56 rpc_url: RPC_URL.to_string(),
57 explorer_base: EXPLORER_BASE.to_string(),
58 eip712_domain_name: "x402-tempo".to_string(),
59 eip712_domain_version: "1".to_string(),
60 }
61 }
62}