Skip to content

Commit 66a9f01

Browse files
authored
Merge pull request #30 from clober-dex/refactor/names
Refactor/names
2 parents cbebf9c + 14c0334 commit 66a9f01

16 files changed

+323
-273
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@clober/v2-sdk",
3-
"version": "0.0.20",
3+
"version": "0.0.21",
44
"description": "🛠 An SDK for building applications on top of Clober V2",
55
"files": [
66
"dist"

src/abis/core/book-manager-abi.ts

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
export const BOOK_MANAGER_ABI = [
2+
{
3+
inputs: [
4+
{
5+
internalType: 'OrderId',
6+
name: 'id',
7+
type: 'uint256',
8+
},
9+
],
10+
name: 'getOrder',
11+
outputs: [
12+
{
13+
components: [
14+
{
15+
internalType: 'address',
16+
name: 'provider',
17+
type: 'address',
18+
},
19+
{
20+
internalType: 'uint64',
21+
name: 'open',
22+
type: 'uint64',
23+
},
24+
{
25+
internalType: 'uint64',
26+
name: 'claimable',
27+
type: 'uint64',
28+
},
29+
],
30+
internalType: 'struct IBookManager.OrderInfo',
31+
name: '',
32+
type: 'tuple',
33+
},
34+
],
35+
stateMutability: 'view',
36+
type: 'function',
37+
},
38+
{
39+
inputs: [
40+
{
41+
internalType: 'uint256',
42+
name: 'tokenId',
43+
type: 'uint256',
44+
},
45+
],
46+
name: 'ownerOf',
47+
outputs: [
48+
{
49+
internalType: 'address',
50+
name: '',
51+
type: 'address',
52+
},
53+
],
54+
stateMutability: 'view',
55+
type: 'function',
56+
},
57+
{
58+
inputs: [
59+
{
60+
internalType: 'BookId',
61+
name: 'id',
62+
type: 'uint192',
63+
},
64+
],
65+
name: 'getBookKey',
66+
outputs: [
67+
{
68+
components: [
69+
{
70+
internalType: 'Currency',
71+
name: 'base',
72+
type: 'address',
73+
},
74+
{
75+
internalType: 'uint64',
76+
name: 'unitSize',
77+
type: 'uint64',
78+
},
79+
{
80+
internalType: 'Currency',
81+
name: 'quote',
82+
type: 'address',
83+
},
84+
{
85+
internalType: 'FeePolicy',
86+
name: 'makerPolicy',
87+
type: 'uint24',
88+
},
89+
{
90+
internalType: 'contract IHooks',
91+
name: 'hooks',
92+
type: 'address',
93+
},
94+
{
95+
internalType: 'FeePolicy',
96+
name: 'takerPolicy',
97+
type: 'uint24',
98+
},
99+
],
100+
internalType: 'struct IBookManager.BookKey',
101+
name: '',
102+
type: 'tuple',
103+
},
104+
],
105+
stateMutability: 'view',
106+
type: 'function',
107+
},
108+
] as const

src/abis/core/book-viewer-abi.ts

Lines changed: 135 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,125 @@
11
export const BOOK_VIEWER_ABI = [
22
{
3+
anonymous: false,
34
inputs: [
45
{
5-
internalType: 'contract IBookManager',
6-
name: 'bookManager_',
6+
indexed: true,
7+
internalType: 'address',
8+
name: 'previousOwner',
9+
type: 'address',
10+
},
11+
{
12+
indexed: true,
13+
internalType: 'address',
14+
name: 'newOwner',
15+
type: 'address',
16+
},
17+
],
18+
name: 'OwnershipTransferred',
19+
type: 'event',
20+
},
21+
{
22+
anonymous: false,
23+
inputs: [
24+
{
25+
indexed: true,
26+
internalType: 'address',
27+
name: 'previousImplementation',
28+
type: 'address',
29+
},
30+
{
31+
indexed: true,
32+
internalType: 'address',
33+
name: 'newImplementation',
34+
type: 'address',
35+
},
36+
],
37+
name: 'ProxyImplementationUpdated',
38+
type: 'event',
39+
},
40+
{
41+
stateMutability: 'payable',
42+
type: 'fallback',
43+
},
44+
{
45+
inputs: [],
46+
name: 'owner',
47+
outputs: [
48+
{
49+
internalType: 'address',
50+
name: '',
51+
type: 'address',
52+
},
53+
],
54+
stateMutability: 'view',
55+
type: 'function',
56+
},
57+
{
58+
inputs: [
59+
{
60+
internalType: 'bytes4',
61+
name: 'id',
62+
type: 'bytes4',
63+
},
64+
],
65+
name: 'supportsInterface',
66+
outputs: [
67+
{
68+
internalType: 'bool',
69+
name: '',
70+
type: 'bool',
71+
},
72+
],
73+
stateMutability: 'view',
74+
type: 'function',
75+
},
76+
{
77+
inputs: [
78+
{
79+
internalType: 'address',
80+
name: 'newOwner',
781
type: 'address',
882
},
983
],
84+
name: 'transferOwnership',
85+
outputs: [],
1086
stateMutability: 'nonpayable',
11-
type: 'constructor',
87+
type: 'function',
88+
},
89+
{
90+
inputs: [
91+
{
92+
internalType: 'address',
93+
name: 'newImplementation',
94+
type: 'address',
95+
},
96+
],
97+
name: 'upgradeTo',
98+
outputs: [],
99+
stateMutability: 'nonpayable',
100+
type: 'function',
101+
},
102+
{
103+
inputs: [
104+
{
105+
internalType: 'address',
106+
name: 'newImplementation',
107+
type: 'address',
108+
},
109+
{
110+
internalType: 'bytes',
111+
name: 'data',
112+
type: 'bytes',
113+
},
114+
],
115+
name: 'upgradeToAndCall',
116+
outputs: [],
117+
stateMutability: 'payable',
118+
type: 'function',
119+
},
120+
{
121+
stateMutability: 'payable',
122+
type: 'receive',
12123
},
13124
{
14125
inputs: [],
@@ -182,4 +293,25 @@ export const BOOK_VIEWER_ABI = [
182293
stateMutability: 'view',
183294
type: 'function',
184295
},
296+
{
297+
inputs: [
298+
{
299+
internalType: 'address',
300+
name: 'implementationAddress',
301+
type: 'address',
302+
},
303+
{
304+
internalType: 'address',
305+
name: 'ownerAddress',
306+
type: 'address',
307+
},
308+
{
309+
internalType: 'bytes',
310+
name: 'data',
311+
type: 'bytes',
312+
},
313+
],
314+
stateMutability: 'payable',
315+
type: 'constructor',
316+
},
185317
] as const

src/abis/core/controller-abi.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,6 @@ export const CONTROLLER_ABI = [
7272
name: 'InvalidLength',
7373
type: 'error',
7474
},
75-
{
76-
inputs: [],
77-
name: 'InvalidMarket',
78-
type: 'error',
79-
},
8075
{
8176
inputs: [],
8277
name: 'InvalidPrice',
@@ -732,7 +727,7 @@ export const CONTROLLER_ABI = [
732727
},
733728
{
734729
internalType: 'uint64',
735-
name: 'unit',
730+
name: 'unitSize',
736731
type: 'uint64',
737732
},
738733
{

src/abis/core/params-abi.ts

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)