forked from V-SK/synthlaunch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontracts.ts
More file actions
95 lines (91 loc) · 3.13 KB
/
Copy pathcontracts.ts
File metadata and controls
95 lines (91 loc) · 3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// Multi-chain contract addresses
export const CHAIN_CONFIG = {
// BSC Mainnet
56: {
flapAddress: '0xe2cE6ab80874Fa9Fa2aAE65D277Dd6B8e65C9De0' as const,
custodyAddress: '0x3Fa33A0fb85f11A901e3616E10876d10018f43B7' as const,
rpc: 'https://bsc-dataseed.binance.org',
nativeSymbol: 'BNB',
explorer: 'https://bscscan.com',
flapUrl: 'https://flap.sh',
vanitySuffix: { standard: '8888', tax: '7777' },
tokenImpl: {
standard: '0x8B4329947e34B6d56D71A3385caC122BaDe7d78D' as const,
tax: '0x29e6383F0ce68507b5A72a53c2B118a118332aA8' as const,
},
},
// X Layer Mainnet
196: {
flapAddress: '0xb30D8c4216E1f21F27444D2FfAee3ad577808678' as const,
custodyAddress: '0xb381e840AAB505132506781eAFD3c38398B58462' as const,
rpc: 'https://xlayerrpc.okx.com',
nativeSymbol: 'OKB',
explorer: 'https://www.oklink.com/x-layer',
flapUrl: 'https://flap.sh',
vanitySuffix: { standard: '1111', tax: '7777' },
tokenImpl: {
standard: '0x12Dc83157Bf1cfCB8Db5952b3ba5bb56Cc38f8C9' as const,
tax: '0xa9918579C9eD0899eCc7e449B9c59916Fb89bAF1' as const,
},
},
} as const;
export type SupportedChainId = keyof typeof CHAIN_CONFIG;
export const DEFAULT_CHAIN_ID: SupportedChainId = 56;
// Legacy BSC exports (backward compat)
export const FLAP_ADDRESS = CHAIN_CONFIG[56].flapAddress;
export const CLAIM_WRAPPER_ADDRESS = '0x5E0E823D56f3DB90c86dfccff935670595e92047' as const;
export const SYNTH_TOKEN_ADDRESS = '0x83c8c815bbf6a239816aa0b14ba9d9222b817777' as const;
export const FLAP_ABI = [
{
inputs: [
{
name: 'params',
type: 'tuple',
components: [
{ name: 'name', type: 'string' },
{ name: 'symbol', type: 'string' },
{ name: 'meta', type: 'string' },
{ name: 'dexThresh', type: 'uint8' },
{ name: 'salt', type: 'bytes32' },
{ name: 'taxRate', type: 'uint16' },
{ name: 'migratorType', type: 'uint8' },
{ name: 'quoteToken', type: 'address' },
{ name: 'quoteAmt', type: 'uint256' },
{ name: 'beneficiary', type: 'address' },
{ name: 'permitData', type: 'bytes' },
],
},
],
name: 'newTokenV2',
outputs: [{ name: 'token', type: 'address' }],
stateMutability: 'payable',
type: 'function',
},
{
inputs: [{ name: 'token', type: 'address' }],
name: 'getTokenInfo',
outputs: [
{ name: 'name', type: 'string' },
{ name: 'symbol', type: 'string' },
{ name: 'description', type: 'string' },
{ name: 'image', type: 'string' },
{ name: 'creator', type: 'address' },
{ name: 'totalSupply', type: 'uint256' },
{ name: 'taxRate', type: 'uint256' },
{ name: 'taxRecipient', type: 'address' },
],
stateMutability: 'view',
type: 'function',
},
{
anonymous: false,
inputs: [
{ indexed: true, name: 'token', type: 'address' },
{ indexed: true, name: 'creator', type: 'address' },
{ indexed: false, name: 'name', type: 'string' },
{ indexed: false, name: 'symbol', type: 'string' },
],
name: 'TokenCreated',
type: 'event',
},
] as const;