/
klaytn-abi.ts
138 lines (137 loc) · 5.82 KB
/
klaytn-abi.ts
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
import { AbiItem } from 'web3-utils';
export const KLAY_ABI = [
{
type: 'function',
stateMutability: 'view',
outputs: [{ type: 'uint256[]', name: 'amounts', internalType: 'uint256[]' }],
name: 'getAmountsIn',
inputs: [
{ type: 'uint256', name: 'amountOut', internalType: 'uint256' },
{ type: 'address[]', name: 'path', internalType: 'address[]' }
]
},
{
type: 'function',
stateMutability: 'view',
outputs: [{ type: 'uint256[]', name: 'amounts', internalType: 'uint256[]' }],
name: 'getAmountsOut',
inputs: [
{ type: 'uint256', name: 'amountIn', internalType: 'uint256' },
{ type: 'address[]', name: 'path', internalType: 'address[]' }
]
},
{
type: 'function',
stateMutability: 'payable',
outputs: [{ type: 'uint256[]', name: 'amounts', internalType: 'uint256[]' }],
name: 'swapExactKLAYForTokens',
inputs: [
{ type: 'uint256', name: 'amountOutMin', internalType: 'uint256' },
{ type: 'address[]', name: 'path', internalType: 'address[]' },
{ type: 'address', name: 'to', internalType: 'address' },
{ type: 'uint256', name: 'deadline', internalType: 'uint256' }
]
},
{
type: 'function',
stateMutability: 'payable',
outputs: [],
name: 'swapExactKLAYForTokensSupportingFeeOnTransferTokens',
inputs: [
{ type: 'uint256', name: 'amountOutMin', internalType: 'uint256' },
{ type: 'address[]', name: 'path', internalType: 'address[]' },
{ type: 'address', name: 'to', internalType: 'address' },
{ type: 'uint256', name: 'deadline', internalType: 'uint256' }
]
},
{
type: 'function',
stateMutability: 'nonpayable',
outputs: [{ type: 'uint256[]', name: 'amounts', internalType: 'uint256[]' }],
name: 'swapExactTokensForKLAY',
inputs: [
{ type: 'uint256', name: 'amountIn', internalType: 'uint256' },
{ type: 'uint256', name: 'amountOutMin', internalType: 'uint256' },
{ type: 'address[]', name: 'path', internalType: 'address[]' },
{ type: 'address', name: 'to', internalType: 'address' },
{ type: 'uint256', name: 'deadline', internalType: 'uint256' }
]
},
{
type: 'function',
stateMutability: 'nonpayable',
outputs: [],
name: 'swapExactTokensForKLAYSupportingFeeOnTransferTokens',
inputs: [
{ type: 'uint256', name: 'amountIn', internalType: 'uint256' },
{ type: 'uint256', name: 'amountOutMin', internalType: 'uint256' },
{ type: 'address[]', name: 'path', internalType: 'address[]' },
{ type: 'address', name: 'to', internalType: 'address' },
{ type: 'uint256', name: 'deadline', internalType: 'uint256' }
]
},
{
type: 'function',
stateMutability: 'nonpayable',
outputs: [{ type: 'uint256[]', name: 'amounts', internalType: 'uint256[]' }],
name: 'swapExactTokensForTokens',
inputs: [
{ type: 'uint256', name: 'amountIn', internalType: 'uint256' },
{ type: 'uint256', name: 'amountOutMin', internalType: 'uint256' },
{ type: 'address[]', name: 'path', internalType: 'address[]' },
{ type: 'address', name: 'to', internalType: 'address' },
{ type: 'uint256', name: 'deadline', internalType: 'uint256' }
]
},
{
type: 'function',
stateMutability: 'nonpayable',
outputs: [],
name: 'swapExactTokensForTokensSupportingFeeOnTransferTokens',
inputs: [
{ type: 'uint256', name: 'amountIn', internalType: 'uint256' },
{ type: 'uint256', name: 'amountOutMin', internalType: 'uint256' },
{ type: 'address[]', name: 'path', internalType: 'address[]' },
{ type: 'address', name: 'to', internalType: 'address' },
{ type: 'uint256', name: 'deadline', internalType: 'uint256' }
]
},
{
type: 'function',
stateMutability: 'payable',
outputs: [{ type: 'uint256[]', name: 'amounts', internalType: 'uint256[]' }],
name: 'swapKLAYForExactTokens',
inputs: [
{ type: 'uint256', name: 'amountOut', internalType: 'uint256' },
{ type: 'address[]', name: 'path', internalType: 'address[]' },
{ type: 'address', name: 'to', internalType: 'address' },
{ type: 'uint256', name: 'deadline', internalType: 'uint256' }
]
},
{
type: 'function',
stateMutability: 'nonpayable',
outputs: [{ type: 'uint256[]', name: 'amounts', internalType: 'uint256[]' }],
name: 'swapTokensForExactKLAY',
inputs: [
{ type: 'uint256', name: 'amountOut', internalType: 'uint256' },
{ type: 'uint256', name: 'amountInMax', internalType: 'uint256' },
{ type: 'address[]', name: 'path', internalType: 'address[]' },
{ type: 'address', name: 'to', internalType: 'address' },
{ type: 'uint256', name: 'deadline', internalType: 'uint256' }
]
},
{
type: 'function',
stateMutability: 'nonpayable',
outputs: [{ type: 'uint256[]', name: 'amounts', internalType: 'uint256[]' }],
name: 'swapTokensForExactTokens',
inputs: [
{ type: 'uint256', name: 'amountOut', internalType: 'uint256' },
{ type: 'uint256', name: 'amountInMax', internalType: 'uint256' },
{ type: 'address[]', name: 'path', internalType: 'address[]' },
{ type: 'address', name: 'to', internalType: 'address' },
{ type: 'uint256', name: 'deadline', internalType: 'uint256' }
]
}
] as AbiItem[];