Skip to content

Commit 1c974b8

Browse files
committed
add haifu launchpad
1 parent 050923e commit 1c974b8

File tree

4 files changed

+74
-189
lines changed

4 files changed

+74
-189
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@standardweb3/default-token-list",
3-
"version": "0.0.57",
3+
"version": "0.0.60",
44
"description": "Standard default token list",
55
"main": "build/standard-default.tokenlist.json",
66
"scripts": {

src/abis/MatchingEngineABI.json

+58-182
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,32 @@
2626
"type": "uint256",
2727
"internalType": "uint256"
2828
},
29-
{ "name": "listingDate", "type": "uint256", "internalType": "uint256" }
29+
{ "name": "listingDate", "type": "uint256", "internalType": "uint256" },
30+
{ "name": "payment", "type": "address", "internalType": "address" }
3031
],
3132
"outputs": [
3233
{ "name": "book", "type": "address", "internalType": "address" }
3334
],
3435
"stateMutability": "nonpayable"
3536
},
37+
{
38+
"type": "function",
39+
"name": "addPairETH",
40+
"inputs": [
41+
{ "name": "base", "type": "address", "internalType": "address" },
42+
{ "name": "quote", "type": "address", "internalType": "address" },
43+
{
44+
"name": "listingPrice",
45+
"type": "uint256",
46+
"internalType": "uint256"
47+
},
48+
{ "name": "listingDate", "type": "uint256", "internalType": "uint256" }
49+
],
50+
"outputs": [
51+
{ "name": "book", "type": "address", "internalType": "address" }
52+
],
53+
"stateMutability": "payable"
54+
},
3655
{
3756
"type": "function",
3857
"name": "cancelOrder",
@@ -80,49 +99,6 @@
8099
"outputs": [{ "name": "", "type": "uint32", "internalType": "uint32" }],
81100
"stateMutability": "view"
82101
},
83-
{
84-
"type": "function",
85-
"name": "getBaseQuote",
86-
"inputs": [
87-
{ "name": "orderbook", "type": "address", "internalType": "address" }
88-
],
89-
"outputs": [
90-
{ "name": "base", "type": "address", "internalType": "address" },
91-
{ "name": "quote", "type": "address", "internalType": "address" }
92-
],
93-
"stateMutability": "view"
94-
},
95-
{
96-
"type": "function",
97-
"name": "getMktPrices",
98-
"inputs": [
99-
{ "name": "start", "type": "uint256", "internalType": "uint256" },
100-
{ "name": "end", "type": "uint256", "internalType": "uint256" }
101-
],
102-
"outputs": [
103-
{
104-
"name": "mktPrices",
105-
"type": "uint256[]",
106-
"internalType": "uint256[]"
107-
}
108-
],
109-
"stateMutability": "view"
110-
},
111-
{
112-
"type": "function",
113-
"name": "getMktPricesWithIds",
114-
"inputs": [
115-
{ "name": "ids", "type": "uint256[]", "internalType": "uint256[]" }
116-
],
117-
"outputs": [
118-
{
119-
"name": "mktPrices",
120-
"type": "uint256[]",
121-
"internalType": "uint256[]"
122-
}
123-
],
124-
"stateMutability": "view"
125-
},
126102
{
127103
"type": "function",
128104
"name": "getOrder",
@@ -160,54 +136,20 @@
160136
{ "name": "price", "type": "uint256", "internalType": "uint256" },
161137
{ "name": "n", "type": "uint32", "internalType": "uint32" }
162138
],
163-
"outputs": [{ "name": "", "type": "uint32[]", "internalType": "uint32[]" }],
164-
"stateMutability": "view"
165-
},
166-
{
167-
"type": "function",
168-
"name": "getOrderbookById",
169-
"inputs": [{ "name": "id", "type": "uint256", "internalType": "uint256" }],
170-
"outputs": [{ "name": "", "type": "address", "internalType": "address" }],
171-
"stateMutability": "view"
172-
},
173-
{
174-
"type": "function",
175-
"name": "getOrders",
176-
"inputs": [
177-
{ "name": "base", "type": "address", "internalType": "address" },
178-
{ "name": "quote", "type": "address", "internalType": "address" },
179-
{ "name": "isBid", "type": "bool", "internalType": "bool" },
180-
{ "name": "price", "type": "uint256", "internalType": "uint256" },
181-
{ "name": "n", "type": "uint32", "internalType": "uint32" }
182-
],
183139
"outputs": [
184-
{
185-
"name": "",
186-
"type": "tuple[]",
187-
"internalType": "struct ExchangeOrderbook.Order[]",
188-
"components": [
189-
{ "name": "owner", "type": "address", "internalType": "address" },
190-
{ "name": "price", "type": "uint256", "internalType": "uint256" },
191-
{
192-
"name": "depositAmount",
193-
"type": "uint256",
194-
"internalType": "uint256"
195-
}
196-
]
197-
}
140+
{ "name": "", "type": "uint32[]", "internalType": "uint32[]" }
198141
],
199142
"stateMutability": "view"
200143
},
201144
{
202145
"type": "function",
203-
"name": "getOrdersPaginated",
146+
"name": "getOrders",
204147
"inputs": [
205148
{ "name": "base", "type": "address", "internalType": "address" },
206149
{ "name": "quote", "type": "address", "internalType": "address" },
207150
{ "name": "isBid", "type": "bool", "internalType": "bool" },
208151
{ "name": "price", "type": "uint256", "internalType": "uint256" },
209-
{ "name": "start", "type": "uint32", "internalType": "uint32" },
210-
{ "name": "end", "type": "uint32", "internalType": "uint32" }
152+
{ "name": "n", "type": "uint32", "internalType": "uint32" }
211153
],
212154
"outputs": [
213155
{
@@ -239,68 +181,6 @@
239181
],
240182
"stateMutability": "view"
241183
},
242-
{
243-
"type": "function",
244-
"name": "getPairNames",
245-
"inputs": [
246-
{ "name": "start", "type": "uint256", "internalType": "uint256" },
247-
{ "name": "end", "type": "uint256", "internalType": "uint256" }
248-
],
249-
"outputs": [
250-
{ "name": "names", "type": "string[]", "internalType": "string[]" }
251-
],
252-
"stateMutability": "view"
253-
},
254-
{
255-
"type": "function",
256-
"name": "getPairNamesWithIds",
257-
"inputs": [
258-
{ "name": "ids", "type": "uint256[]", "internalType": "uint256[]" }
259-
],
260-
"outputs": [
261-
{ "name": "names", "type": "string[]", "internalType": "string[]" }
262-
],
263-
"stateMutability": "view"
264-
},
265-
{
266-
"type": "function",
267-
"name": "getPairs",
268-
"inputs": [
269-
{ "name": "start", "type": "uint256", "internalType": "uint256" },
270-
{ "name": "end", "type": "uint256", "internalType": "uint256" }
271-
],
272-
"outputs": [
273-
{
274-
"name": "pairs",
275-
"type": "tuple[]",
276-
"internalType": "struct IOrderbookFactory.Pair[]",
277-
"components": [
278-
{ "name": "base", "type": "address", "internalType": "address" },
279-
{ "name": "quote", "type": "address", "internalType": "address" }
280-
]
281-
}
282-
],
283-
"stateMutability": "view"
284-
},
285-
{
286-
"type": "function",
287-
"name": "getPairsWithIds",
288-
"inputs": [
289-
{ "name": "ids", "type": "uint256[]", "internalType": "uint256[]" }
290-
],
291-
"outputs": [
292-
{
293-
"name": "pairs",
294-
"type": "tuple[]",
295-
"internalType": "struct IOrderbookFactory.Pair[]",
296-
"components": [
297-
{ "name": "base", "type": "address", "internalType": "address" },
298-
{ "name": "quote", "type": "address", "internalType": "address" }
299-
]
300-
}
301-
],
302-
"stateMutability": "view"
303-
},
304184
{
305185
"type": "function",
306186
"name": "getPrices",
@@ -315,21 +195,6 @@
315195
],
316196
"stateMutability": "view"
317197
},
318-
{
319-
"type": "function",
320-
"name": "getPricesPaginated",
321-
"inputs": [
322-
{ "name": "base", "type": "address", "internalType": "address" },
323-
{ "name": "quote", "type": "address", "internalType": "address" },
324-
{ "name": "isBid", "type": "bool", "internalType": "bool" },
325-
{ "name": "start", "type": "uint32", "internalType": "uint32" },
326-
{ "name": "end", "type": "uint32", "internalType": "uint32" }
327-
],
328-
"outputs": [
329-
{ "name": "", "type": "uint256[]", "internalType": "uint256[]" }
330-
],
331-
"stateMutability": "view"
332-
},
333198
{
334199
"type": "function",
335200
"name": "getRoleAdmin",
@@ -617,7 +482,9 @@
617482
{ "name": "buy", "type": "uint32", "internalType": "uint32" },
618483
{ "name": "sell", "type": "uint32", "internalType": "uint32" }
619484
],
620-
"outputs": [{ "name": "success", "type": "bool", "internalType": "bool" }],
485+
"outputs": [
486+
{ "name": "success", "type": "bool", "internalType": "bool" }
487+
],
621488
"stateMutability": "nonpayable"
622489
},
623490
{
@@ -626,7 +493,19 @@
626493
"inputs": [
627494
{ "name": "feeTo_", "type": "address", "internalType": "address" }
628495
],
629-
"outputs": [{ "name": "success", "type": "bool", "internalType": "bool" }],
496+
"outputs": [
497+
{ "name": "success", "type": "bool", "internalType": "bool" }
498+
],
499+
"stateMutability": "nonpayable"
500+
},
501+
{
502+
"type": "function",
503+
"name": "setListingCost",
504+
"inputs": [
505+
{ "name": "payment", "type": "address", "internalType": "address" },
506+
{ "name": "amount", "type": "uint256", "internalType": "uint256" }
507+
],
508+
"outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }],
630509
"stateMutability": "nonpayable"
631510
},
632511
{
@@ -638,7 +517,9 @@
638517
{ "name": "buy", "type": "uint32", "internalType": "uint32" },
639518
{ "name": "sell", "type": "uint32", "internalType": "uint32" }
640519
],
641-
"outputs": [{ "name": "success", "type": "bool", "internalType": "bool" }],
520+
"outputs": [
521+
{ "name": "success", "type": "bool", "internalType": "bool" }
522+
],
642523
"stateMutability": "nonpayable"
643524
},
644525
{
@@ -680,13 +561,19 @@
680561
},
681562
{
682563
"type": "event",
683-
"name": "Initialized",
564+
"name": "ListingCostSet",
684565
"inputs": [
685566
{
686-
"name": "version",
687-
"type": "uint64",
567+
"name": "payment",
568+
"type": "address",
569+
"indexed": false,
570+
"internalType": "address"
571+
},
572+
{
573+
"name": "amount",
574+
"type": "uint256",
688575
"indexed": false,
689-
"internalType": "uint64"
576+
"internalType": "uint256"
690577
}
691578
],
692579
"anonymous": false
@@ -976,12 +863,6 @@
976863
"indexed": false,
977864
"internalType": "address"
978865
},
979-
{
980-
"name": "listingPrice",
981-
"type": "uint256",
982-
"indexed": false,
983-
"internalType": "uint256"
984-
},
985866
{
986867
"name": "listingDate",
987868
"type": "uint256",
@@ -1075,6 +956,11 @@
1075956
{ "name": "neededRole", "type": "bytes32", "internalType": "bytes32" }
1076957
]
1077958
},
959+
{
960+
"type": "error",
961+
"name": "AlreadyInitialized",
962+
"inputs": [{ "name": "init", "type": "bool", "internalType": "bool" }]
963+
},
1078964
{ "type": "error", "name": "AmountIsZero", "inputs": [] },
1079965
{
1080966
"type": "error",
@@ -1101,15 +987,6 @@
1101987
{ "name": "factory", "type": "address", "internalType": "address" }
1102988
]
1103989
},
1104-
{
1105-
"type": "error",
1106-
"name": "InvalidFeeRate",
1107-
"inputs": [
1108-
{ "name": "feeNum", "type": "uint256", "internalType": "uint256" },
1109-
{ "name": "feeDenom", "type": "uint256", "internalType": "uint256" }
1110-
]
1111-
},
1112-
{ "type": "error", "name": "InvalidInitialization", "inputs": [] },
1113990
{
1114991
"type": "error",
1115992
"name": "InvalidPair",
@@ -1143,7 +1020,6 @@
11431020
{ "name": "quote", "type": "address", "internalType": "address" }
11441021
]
11451022
},
1146-
{ "type": "error", "name": "NotInitializing", "inputs": [] },
11471023
{
11481024
"type": "error",
11491025
"name": "OrderSizeTooSmall",
@@ -1177,4 +1053,4 @@
11771053
"name": "TooManyMatches",
11781054
"inputs": [{ "name": "n", "type": "uint256", "internalType": "uint256" }]
11791055
}
1180-
]
1056+
]

src/buildList.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,16 @@ module.exports = function buildList() {
5555
},
5656
matchingEngine: {
5757
"Story Odyssey Testnet": {
58-
address: "0x8c1F7817657aAe22E22ce84d552fE0C01bD8A254",
59-
startBlock: 440605,
58+
address: "0x39800D00B0573317E8EABA8BFce1c71a59fD26ee",
59+
startBlock: 2299914,
6060
},
6161
},
62+
haifuLaunchpad: {
63+
"Story Odyssey Testnet": {
64+
address: "0x3623A3cF0098B603ba89133ECD7D7f2E26D74Ba7",
65+
startBlock: 2386633,
66+
}
67+
},
6268
tags: {},
6369
logoURI: "https://avatars.githubusercontent.com/u/73440097?s=200&v=4",
6470
keywords: ["standard", "default"],

0 commit comments

Comments
 (0)