Skip to content

Commit 2a3893a

Browse files
committed
feat: added contract abis and contract addresses(just minimal version)
1 parent 51f7239 commit 2a3893a

File tree

9 files changed

+3007
-0
lines changed

9 files changed

+3007
-0
lines changed

src/config/abis/erc20ABI.ts

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
export const erc20ABI = [
2+
{
3+
constant: false,
4+
inputs: [
5+
{ name: '_spender', type: 'address' },
6+
{ name: '_value', type: 'uint256' },
7+
],
8+
name: 'approve',
9+
outputs: [{ name: 'success', type: 'bool' }],
10+
payable: false,
11+
stateMutability: 'nonpayable',
12+
type: 'function',
13+
},
14+
{
15+
constant: false,
16+
inputs: [
17+
{ name: '_to', type: 'address' },
18+
{ name: '_value', type: 'uint256' },
19+
],
20+
name: 'showMeTheMoney',
21+
outputs: [],
22+
payable: false,
23+
stateMutability: 'nonpayable',
24+
type: 'function',
25+
},
26+
{
27+
constant: false,
28+
inputs: [
29+
{ name: '_to', type: 'address' },
30+
{ name: '_value', type: 'uint256' },
31+
],
32+
name: 'transfer',
33+
outputs: [{ name: 'success', type: 'bool' }],
34+
payable: false,
35+
stateMutability: 'nonpayable',
36+
type: 'function',
37+
},
38+
{
39+
constant: false,
40+
inputs: [
41+
{ name: '_from', type: 'address' },
42+
{ name: '_to', type: 'address' },
43+
{ name: '_value', type: 'uint256' },
44+
],
45+
name: 'transferFrom',
46+
outputs: [{ name: 'success', type: 'bool' }],
47+
payable: false,
48+
stateMutability: 'nonpayable',
49+
type: 'function',
50+
},
51+
{
52+
anonymous: false,
53+
inputs: [
54+
{ indexed: true, name: '_from', type: 'address' },
55+
{ indexed: true, name: '_to', type: 'address' },
56+
{ indexed: false, name: '_value', type: 'uint256' },
57+
],
58+
name: 'Transfer',
59+
type: 'event',
60+
},
61+
{
62+
anonymous: false,
63+
inputs: [
64+
{ indexed: true, name: '_owner', type: 'address' },
65+
{ indexed: true, name: '_spender', type: 'address' },
66+
{ indexed: false, name: '_value', type: 'uint256' },
67+
],
68+
name: 'Approval',
69+
type: 'event',
70+
},
71+
{
72+
constant: true,
73+
inputs: [
74+
{ name: '_owner', type: 'address' },
75+
{ name: '_spender', type: 'address' },
76+
],
77+
name: 'allowance',
78+
outputs: [{ name: 'remaining', type: 'uint256' }],
79+
payable: false,
80+
stateMutability: 'view',
81+
type: 'function',
82+
},
83+
{
84+
constant: true,
85+
inputs: [{ name: '_owner', type: 'address' }],
86+
name: 'balanceOf',
87+
outputs: [{ name: 'balance', type: 'uint256' }],
88+
payable: false,
89+
stateMutability: 'view',
90+
type: 'function',
91+
},
92+
{
93+
constant: true,
94+
inputs: [],
95+
name: 'decimals',
96+
outputs: [{ name: '', type: 'uint256' }],
97+
payable: false,
98+
stateMutability: 'view',
99+
type: 'function',
100+
},
101+
{
102+
constant: true,
103+
inputs: [],
104+
name: 'name',
105+
outputs: [{ name: '', type: 'string' }],
106+
payable: false,
107+
stateMutability: 'view',
108+
type: 'function',
109+
},
110+
{
111+
constant: true,
112+
inputs: [],
113+
name: 'symbol',
114+
outputs: [{ name: '', type: 'string' }],
115+
payable: false,
116+
stateMutability: 'view',
117+
type: 'function',
118+
},
119+
{
120+
constant: true,
121+
inputs: [],
122+
name: 'totalSupply',
123+
outputs: [{ name: '', type: 'uint256' }],
124+
payable: false,
125+
stateMutability: 'view',
126+
type: 'function',
127+
},
128+
] as const;

src/config/abis/factoryABI.ts

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
export const factoryABI = [
2+
{ type: 'constructor', stateMutability: 'nonpayable', inputs: [] },
3+
{
4+
type: 'event',
5+
name: 'PairCreated',
6+
inputs: [
7+
{
8+
type: 'address',
9+
name: 'token0',
10+
internalType: 'address',
11+
indexed: true,
12+
},
13+
{
14+
type: 'address',
15+
name: 'token1',
16+
internalType: 'address',
17+
indexed: true,
18+
},
19+
{ type: 'bool', name: 'stable', internalType: 'bool', indexed: false },
20+
{
21+
type: 'address',
22+
name: 'pair',
23+
internalType: 'address',
24+
indexed: false,
25+
},
26+
{ type: 'uint256', name: '', internalType: 'uint256', indexed: false },
27+
],
28+
anonymous: false,
29+
},
30+
{
31+
type: 'function',
32+
stateMutability: 'view',
33+
outputs: [{ type: 'uint256', name: '', internalType: 'uint256' }],
34+
name: 'MAX_FEE',
35+
inputs: [],
36+
},
37+
{
38+
type: 'function',
39+
stateMutability: 'nonpayable',
40+
outputs: [],
41+
name: 'acceptFeeManager',
42+
inputs: [],
43+
},
44+
{
45+
type: 'function',
46+
stateMutability: 'nonpayable',
47+
outputs: [],
48+
name: 'acceptPauser',
49+
inputs: [],
50+
},
51+
{
52+
type: 'function',
53+
stateMutability: 'view',
54+
outputs: [{ type: 'address', name: '', internalType: 'address' }],
55+
name: 'allPairs',
56+
inputs: [{ type: 'uint256', name: '', internalType: 'uint256' }],
57+
},
58+
{
59+
type: 'function',
60+
stateMutability: 'view',
61+
outputs: [{ type: 'uint256', name: '', internalType: 'uint256' }],
62+
name: 'allPairsLength',
63+
inputs: [],
64+
},
65+
{
66+
type: 'function',
67+
stateMutability: 'nonpayable',
68+
outputs: [{ type: 'address', name: 'pair', internalType: 'address' }],
69+
name: 'createPair',
70+
inputs: [
71+
{ type: 'address', name: 'tokenA', internalType: 'address' },
72+
{ type: 'address', name: 'tokenB', internalType: 'address' },
73+
{ type: 'bool', name: 'stable', internalType: 'bool' },
74+
],
75+
},
76+
{
77+
type: 'function',
78+
stateMutability: 'view',
79+
outputs: [{ type: 'address', name: '', internalType: 'address' }],
80+
name: 'feeManager',
81+
inputs: [],
82+
},
83+
{
84+
type: 'function',
85+
stateMutability: 'view',
86+
outputs: [{ type: 'uint256', name: '', internalType: 'uint256' }],
87+
name: 'getFee',
88+
inputs: [{ type: 'bool', name: '_stable', internalType: 'bool' }],
89+
},
90+
{
91+
type: 'function',
92+
stateMutability: 'view',
93+
outputs: [
94+
{ type: 'address', name: '', internalType: 'address' },
95+
{ type: 'address', name: '', internalType: 'address' },
96+
{ type: 'bool', name: '', internalType: 'bool' },
97+
],
98+
name: 'getInitializable',
99+
inputs: [],
100+
},
101+
{
102+
type: 'function',
103+
stateMutability: 'view',
104+
outputs: [{ type: 'address', name: '', internalType: 'address' }],
105+
name: 'getPair',
106+
inputs: [
107+
{ type: 'address', name: '', internalType: 'address' },
108+
{ type: 'address', name: '', internalType: 'address' },
109+
{ type: 'bool', name: '', internalType: 'bool' },
110+
],
111+
},
112+
{
113+
type: 'function',
114+
stateMutability: 'view',
115+
outputs: [{ type: 'bool', name: '', internalType: 'bool' }],
116+
name: 'isPair',
117+
inputs: [{ type: 'address', name: '', internalType: 'address' }],
118+
},
119+
{
120+
type: 'function',
121+
stateMutability: 'view',
122+
outputs: [{ type: 'bool', name: '', internalType: 'bool' }],
123+
name: 'isPaused',
124+
inputs: [],
125+
},
126+
{
127+
type: 'function',
128+
stateMutability: 'pure',
129+
outputs: [{ type: 'bytes32', name: '', internalType: 'bytes32' }],
130+
name: 'pairCodeHash',
131+
inputs: [],
132+
},
133+
{
134+
type: 'function',
135+
stateMutability: 'view',
136+
outputs: [{ type: 'address', name: '', internalType: 'address' }],
137+
name: 'pauser',
138+
inputs: [],
139+
},
140+
{
141+
type: 'function',
142+
stateMutability: 'view',
143+
outputs: [{ type: 'address', name: '', internalType: 'address' }],
144+
name: 'pendingFeeManager',
145+
inputs: [],
146+
},
147+
{
148+
type: 'function',
149+
stateMutability: 'view',
150+
outputs: [{ type: 'address', name: '', internalType: 'address' }],
151+
name: 'pendingPauser',
152+
inputs: [],
153+
},
154+
{
155+
type: 'function',
156+
stateMutability: 'nonpayable',
157+
outputs: [],
158+
name: 'setFee',
159+
inputs: [
160+
{ type: 'bool', name: '_stable', internalType: 'bool' },
161+
{ type: 'uint256', name: '_fee', internalType: 'uint256' },
162+
],
163+
},
164+
{
165+
type: 'function',
166+
stateMutability: 'nonpayable',
167+
outputs: [],
168+
name: 'setFeeManager',
169+
inputs: [{ type: 'address', name: '_feeManager', internalType: 'address' }],
170+
},
171+
{
172+
type: 'function',
173+
stateMutability: 'nonpayable',
174+
outputs: [],
175+
name: 'setPause',
176+
inputs: [{ type: 'bool', name: '_state', internalType: 'bool' }],
177+
},
178+
{
179+
type: 'function',
180+
stateMutability: 'nonpayable',
181+
outputs: [],
182+
name: 'setPauser',
183+
inputs: [{ type: 'address', name: '_pauser', internalType: 'address' }],
184+
},
185+
{
186+
type: 'function',
187+
stateMutability: 'view',
188+
outputs: [{ type: 'uint256', name: '', internalType: 'uint256' }],
189+
name: 'stableFee',
190+
inputs: [],
191+
},
192+
{
193+
type: 'function',
194+
stateMutability: 'view',
195+
outputs: [{ type: 'uint256', name: '', internalType: 'uint256' }],
196+
name: 'volatileFee',
197+
inputs: [],
198+
},
199+
] as const;

src/config/abis/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export * from './erc20ABI';
2+
export * from './factoryABI';
3+
export * from './pairABI';
4+
export * from './routerABI';
5+
export * from './tokenABI';

0 commit comments

Comments
 (0)