@scallop-io/sui-scallop-sdk 0.46.63 → 0.47.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -3,19 +3,19 @@ var API_BASE_URL = "https://sui.apis.scallop.io";
3
3
  var SDK_API_BASE_URL = "https://sdk.api.scallop.io";
4
4
  var IS_VE_SCA_TEST = false;
5
5
  var USE_TEST_ADDRESS = false;
6
- var ADDRESSES_ID = IS_VE_SCA_TEST || USE_TEST_ADDRESS ? "65fb07c39c845425d71d7b18" : "664dfe22898c36c159e28bc8";
6
+ var ADDRESSES_ID = IS_VE_SCA_TEST || USE_TEST_ADDRESS ? "65fb07c39c845425d71d7b18" : "66f8e7ed9bb9e07fdfb86bbb";
7
7
  var PROTOCOL_OBJECT_ID = IS_VE_SCA_TEST ? "0xc9f859f98ca352a11b97a038c4b4162bee437b8df8caa047990fe9cb03d4f778" : "0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf";
8
8
  var BORROW_FEE_PROTOCOL_ID = IS_VE_SCA_TEST ? "0xc9f859f98ca352a11b97a038c4b4162bee437b8df8caa047990fe9cb03d4f778" : "0xc38f849e81cfe46d4e4320f508ea7dda42934a329d5a6571bb4c3cb6ea63f5da";
9
9
  var SCA_COIN_TYPE = IS_VE_SCA_TEST ? `0x6cd813061a3adf3602b76545f076205f0c8e7ec1d3b1eab9a1da7992c18c0524::sca::SCA` : "0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6::sca::SCA";
10
10
  var OLD_BORROW_INCENTIVE_PROTOCOL_ID = "0xc63072e7f5f4983a2efaf5bdba1480d5e7d74d57948e1c7cc436f8e22cbeb410";
11
11
  var SUPPORT_POOLS = [
12
- "eth",
13
- "btc",
14
- "usdc",
15
- "usdt",
12
+ "weth",
13
+ "wbtc",
14
+ "wusdc",
15
+ "wusdt",
16
16
  "sui",
17
- "apt",
18
- "sol",
17
+ "wapt",
18
+ "wsol",
19
19
  "cetus",
20
20
  "afsui",
21
21
  "hasui",
@@ -23,13 +23,13 @@ var SUPPORT_POOLS = [
23
23
  "sca"
24
24
  ];
25
25
  var SUPPORT_COLLATERALS = [
26
- "eth",
27
- "btc",
28
- "usdc",
29
- "usdt",
26
+ "weth",
27
+ "wbtc",
28
+ "wusdc",
29
+ "wusdt",
30
30
  "sui",
31
- "apt",
32
- "sol",
31
+ "wapt",
32
+ "wsol",
33
33
  "cetus",
34
34
  "afsui",
35
35
  "hasui",
@@ -37,10 +37,10 @@ var SUPPORT_COLLATERALS = [
37
37
  "sca"
38
38
  ];
39
39
  var SUPPORT_SPOOLS = [
40
- "seth",
40
+ "sweth",
41
41
  "ssui",
42
- "susdc",
43
- "susdt",
42
+ "swusdc",
43
+ "swusdt",
44
44
  "scetus",
45
45
  "safsui",
46
46
  "shasui",
@@ -48,26 +48,26 @@ var SUPPORT_SPOOLS = [
48
48
  ];
49
49
  var SUPPORT_SCOIN = [
50
50
  "ssui",
51
- "susdc",
52
- "susdt",
51
+ "swusdc",
52
+ "swusdt",
53
53
  "safsui",
54
54
  "shasui",
55
55
  "svsui",
56
- "seth",
56
+ "sweth",
57
57
  "ssca",
58
58
  "scetus",
59
- "ssol",
60
- "sbtc"
59
+ "swsol",
60
+ "swbtc"
61
61
  ];
62
62
  var SUPPORT_SPOOLS_REWARDS = ["sui"];
63
63
  var SUPPORT_BORROW_INCENTIVE_POOLS = [
64
64
  "sui",
65
- "usdc",
66
- "usdt",
65
+ "wusdc",
66
+ "wusdt",
67
67
  "afsui",
68
68
  "hasui",
69
69
  "vsui",
70
- "eth",
70
+ "weth",
71
71
  "sca"
72
72
  ];
73
73
  var SUPPORT_BORROW_INCENTIVE_REWARDS = ["sui", "sca"];
@@ -89,25 +89,25 @@ var SUPPORT_PACKAGES = [
89
89
 
90
90
  // src/constants/enum.ts
91
91
  var coinDecimals = {
92
- eth: 8,
93
- btc: 8,
94
- usdc: 6,
95
- usdt: 6,
92
+ weth: 8,
93
+ wbtc: 8,
94
+ wusdc: 6,
95
+ wusdt: 6,
96
96
  sui: 9,
97
- apt: 8,
98
- sol: 8,
97
+ wapt: 8,
98
+ wsol: 8,
99
99
  cetus: 9,
100
100
  afsui: 9,
101
101
  hasui: 9,
102
102
  vsui: 9,
103
103
  sca: 9,
104
- seth: 8,
105
- sbtc: 8,
106
- susdc: 6,
107
- susdt: 6,
104
+ sweth: 8,
105
+ swbtc: 8,
106
+ swusdc: 6,
107
+ swusdt: 6,
108
108
  ssui: 9,
109
- sapt: 8,
110
- ssol: 8,
109
+ swapt: 8,
110
+ swsol: 8,
111
111
  scetus: 9,
112
112
  safsui: 9,
113
113
  shasui: 9,
@@ -115,13 +115,13 @@ var coinDecimals = {
115
115
  ssca: 9
116
116
  };
117
117
  var assetCoins = {
118
- eth: "eth",
119
- btc: "btc",
120
- usdc: "usdc",
121
- usdt: "usdt",
118
+ weth: "weth",
119
+ wbtc: "wbtc",
120
+ wusdc: "wusdc",
121
+ wusdt: "wusdt",
122
122
  sui: "sui",
123
- apt: "apt",
124
- sol: "sol",
123
+ wapt: "wapt",
124
+ wsol: "wsol",
125
125
  cetus: "cetus",
126
126
  afsui: "afsui",
127
127
  hasui: "hasui",
@@ -129,13 +129,13 @@ var assetCoins = {
129
129
  sca: "sca"
130
130
  };
131
131
  var marketCoins = {
132
- seth: "seth",
133
- sbtc: "sbtc",
134
- susdc: "susdc",
135
- susdt: "susdt",
132
+ sweth: "sweth",
133
+ swbtc: "swbtc",
134
+ swusdc: "swusdc",
135
+ swusdt: "swusdt",
136
136
  ssui: "ssui",
137
- sapt: "sapt",
138
- ssol: "ssol",
137
+ swapt: "swapt",
138
+ swsol: "swsol",
139
139
  scetus: "scetus",
140
140
  safsui: "safsui",
141
141
  shasui: "shasui",
@@ -143,33 +143,33 @@ var marketCoins = {
143
143
  ssca: "ssca"
144
144
  };
145
145
  var sCoins = {
146
- seth: "seth",
147
- susdc: "susdc",
148
- susdt: "susdt",
146
+ sweth: "sweth",
147
+ swusdc: "swusdc",
148
+ swusdt: "swusdt",
149
149
  ssui: "ssui",
150
150
  scetus: "scetus",
151
151
  safsui: "safsui",
152
152
  shasui: "shasui",
153
153
  svsui: "svsui",
154
154
  ssca: "ssca",
155
- ssol: "ssol",
156
- sbtc: "sbtc"
155
+ swsol: "swsol",
156
+ swbtc: "swbtc"
157
157
  };
158
158
  var stakeMarketCoins = {
159
- seth: "seth",
159
+ sweth: "sweth",
160
160
  ssui: "ssui",
161
- susdc: "susdc",
162
- susdt: "susdt",
161
+ swusdc: "swusdc",
162
+ swusdt: "swusdt",
163
163
  scetus: "scetus",
164
164
  safsui: "safsui",
165
165
  shasui: "shasui",
166
166
  svsui: "svsui"
167
167
  };
168
168
  var spoolRewardCoins = {
169
- seth: "sui",
169
+ sweth: "sui",
170
170
  ssui: "sui",
171
- susdc: "sui",
172
- susdt: "sui",
171
+ swusdc: "sui",
172
+ swusdt: "sui",
173
173
  scetus: "sui",
174
174
  safsui: "sui",
175
175
  shasui: "sui",
@@ -177,22 +177,22 @@ var spoolRewardCoins = {
177
177
  };
178
178
  var borrowIncentiveRewardCoins = {
179
179
  sui: ["sui", "sca"],
180
- usdc: ["sui", "sca"],
181
- usdt: ["sui", "sca"],
180
+ wusdc: ["sui", "sca"],
181
+ wusdt: ["sui", "sca"],
182
182
  sca: ["sui", "sca"],
183
183
  afsui: ["sui"],
184
184
  hasui: ["sui"],
185
185
  vsui: ["sui"],
186
- eth: ["sui"]
186
+ weth: ["sui"]
187
187
  };
188
188
  var coinIds = {
189
189
  sui: "0x0000000000000000000000000000000000000000000000000000000000000002",
190
- eth: "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5",
191
- btc: "0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881",
192
- usdc: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf",
193
- usdt: "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c",
194
- apt: "0x3a5143bb1196e3bcdfab6203d1683ae29edd26294fc8bfeafe4aaa9d2704df37",
195
- sol: "0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8",
190
+ weth: "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5",
191
+ wbtc: "0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881",
192
+ wusdc: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf",
193
+ wusdt: "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c",
194
+ wapt: "0x3a5143bb1196e3bcdfab6203d1683ae29edd26294fc8bfeafe4aaa9d2704df37",
195
+ wsol: "0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8",
196
196
  cetus: "0x06864a6f921804860930db6ddbe2e16acdf8504495ea7481637a1c8b9a8fe54b",
197
197
  afsui: "0xf325ce1300e8dac124071d3152c5c5ee6174914f8bc2161e88329cf579246efc",
198
198
  hasui: "0xbde4ba4c2e274a60ce15c1cfff9e5c42e41654ac8b6d906a57efa4bd3c29f47d",
@@ -200,12 +200,12 @@ var coinIds = {
200
200
  sca: IS_VE_SCA_TEST ? "0x6cd813061a3adf3602b76545f076205f0c8e7ec1d3b1eab9a1da7992c18c0524" : "0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6"
201
201
  };
202
202
  var wormholeCoinIds = {
203
- eth: "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5",
204
- btc: "0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881",
205
- usdc: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf",
206
- usdt: "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c",
207
- apt: "0x3a5143bb1196e3bcdfab6203d1683ae29edd26294fc8bfeafe4aaa9d2704df37",
208
- sol: "0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8"
203
+ weth: "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5",
204
+ wbtc: "0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881",
205
+ wusdc: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf",
206
+ wusdt: "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c",
207
+ wapt: "0x3a5143bb1196e3bcdfab6203d1683ae29edd26294fc8bfeafe4aaa9d2704df37",
208
+ wsol: "0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8"
209
209
  };
210
210
  var voloCoinIds = {
211
211
  vsui: "0x549e8b69270defbfafd4f94e17ec44cdbdd99820b33bda2278dea3b9a32d3f55"
@@ -214,14 +214,14 @@ var sCoinIds = {
214
214
  ssui: "0xaafc4f740de0dd0dde642a31148fb94517087052f19afb0f7bed1dc41a50c77b::scallop_sui::SCALLOP_SUI",
215
215
  scetus: "0xea346ce428f91ab007210443efcea5f5cdbbb3aae7e9affc0ca93f9203c31f0c::scallop_cetus::SCALLOP_CETUS",
216
216
  ssca: "0x5ca17430c1d046fae9edeaa8fd76c7b4193a00d764a0ecfa9418d733ad27bc1e::scallop_sca::SCALLOP_SCA",
217
- susdc: "0xad4d71551d31092230db1fd482008ea42867dbf27b286e9c70a79d2a6191d58d::scallop_wormhole_usdc::SCALLOP_WORMHOLE_USDC",
218
- susdt: "0xe6e5a012ec20a49a3d1d57bd2b67140b96cd4d3400b9d79e541f7bdbab661f95::scallop_wormhole_usdt::SCALLOP_WORMHOLE_USDT",
219
- seth: "0x67540ceb850d418679e69f1fb6b2093d6df78a2a699ffc733f7646096d552e9b::scallop_wormhole_eth::SCALLOP_WORMHOLE_ETH",
217
+ swusdc: "0xad4d71551d31092230db1fd482008ea42867dbf27b286e9c70a79d2a6191d58d::scallop_wormhole_usdc::SCALLOP_WORMHOLE_USDC",
218
+ swusdt: "0xe6e5a012ec20a49a3d1d57bd2b67140b96cd4d3400b9d79e541f7bdbab661f95::scallop_wormhole_usdt::SCALLOP_WORMHOLE_USDT",
219
+ sweth: "0x67540ceb850d418679e69f1fb6b2093d6df78a2a699ffc733f7646096d552e9b::scallop_wormhole_eth::SCALLOP_WORMHOLE_ETH",
220
220
  safsui: "0x00671b1fa2a124f5be8bdae8b91ee711462c5d9e31bda232e70fd9607b523c88::scallop_af_sui::SCALLOP_AF_SUI",
221
221
  shasui: "0x9a2376943f7d22f88087c259c5889925f332ca4347e669dc37d54c2bf651af3c::scallop_ha_sui::SCALLOP_HA_SUI",
222
222
  svsui: "0xe1a1cc6bcf0001a015eab84bcc6713393ce20535f55b8b6f35c142e057a25fbe::scallop_v_sui::SCALLOP_V_SUI",
223
- ssol: "0x1392650f2eca9e3f6ffae3ff89e42a3590d7102b80e2b430f674730bc30d3259::scallop_wormhole_sol::SCALLOP_WORMHOLE_SOL",
224
- sbtc: "0x2cf76a9cf5d3337961d1154283234f94da2dcff18544dfe5cbdef65f319591b5::scallop_wormhole_btc::SCALLOP_WORMHOLE_BTC"
223
+ swsol: "0x1392650f2eca9e3f6ffae3ff89e42a3590d7102b80e2b430f674730bc30d3259::scallop_wormhole_sol::SCALLOP_WORMHOLE_SOL",
224
+ swbtc: "0x2cf76a9cf5d3337961d1154283234f94da2dcff18544dfe5cbdef65f319591b5::scallop_wormhole_btc::SCALLOP_WORMHOLE_BTC"
225
225
  };
226
226
 
227
227
  // src/constants/vesca.ts
@@ -234,17 +234,17 @@ var MIN_TOP_UP_AMOUNT = 1e9;
234
234
  // src/constants/flashloan.ts
235
235
  var FlashLoanFeeObjectMap = {
236
236
  vsui: "0x0069cddee7a5c0b1d34beb5ef0620f978096525f1830b055f38b110f40d73fbb",
237
- btc: "0x2078490aa37d8fb42b511e5c95e217cb957d141267e16980bc802d76b42719f7",
237
+ wbtc: "0x2078490aa37d8fb42b511e5c95e217cb957d141267e16980bc802d76b42719f7",
238
238
  sui: "0x27614284a8f0a699ffd35aae8f2572c937ec76771cb21b0d7930ec4491a76ed4",
239
- usdt: "0x5b61983a19b5159ca348d291e4b595f42db70ccda32852a2ed85528aa65171e4",
240
- apt: "0x9d5898edcd1e4abcb044273242293a9d036f6a977bf3fe57ab71f5a87c505ee6",
239
+ wusdt: "0x5b61983a19b5159ca348d291e4b595f42db70ccda32852a2ed85528aa65171e4",
240
+ wapt: "0x9d5898edcd1e4abcb044273242293a9d036f6a977bf3fe57ab71f5a87c505ee6",
241
241
  afsui: "0xac87fde83d434554ec300c1334c9a622aa5b59e82a04334dc99e1cc1f75d4eae",
242
242
  hasui: "0xb9f505d532de1d6c9f3a8522a2d16f2958b75c0ed939d4f80b96f584a2a8ed5e",
243
- usdc: "0xd241d6a7e44ac11a6689370ed9a98eec389b98b8a6695c61fddede9fa7567b90",
244
- eth: "0xd252acb058e77877810c1290564e290a8f9fcab5bc9aca2884ede8a38810cf34",
243
+ wusdc: "0xd241d6a7e44ac11a6689370ed9a98eec389b98b8a6695c61fddede9fa7567b90",
244
+ weth: "0xd252acb058e77877810c1290564e290a8f9fcab5bc9aca2884ede8a38810cf34",
245
245
  sca: "0xe04e46471754b6f48d81c549ecfec09de02733715a63bec02364c6ac7c4dd2dc",
246
246
  cetus: "0xe65a73d11c31b2d323ad2b9f6b4bb0a3c0df9c1b212eef66c854941186a5ddc7",
247
- sol: "0xe84bdb35b790fc7bdd1645122ac6ac0fc904531d6772c9e25904fece322c5f34"
247
+ wsol: "0xe84bdb35b790fc7bdd1645122ac6ac0fc904531d6772c9e25904fece322c5f34"
248
248
  };
249
249
 
250
250
  // src/models/scallop.ts
@@ -649,7 +649,7 @@ var parseOriginBorrowIncentivePoolData = (originBorrowIncentivePoolData) => {
649
649
  )
650
650
  };
651
651
  };
652
- var calculateBorrowIncentivePoolPointData = (parsedBorrowIncentivePoolData, parsedBorrowIncentivePoolPointData, rewardCoinPrice, rewardCoinDecimal, poolCoinPrice, poolCoinDecimal) => {
652
+ var calculateBorrowIncentivePoolPointData = (parsedBorrowIncentivePoolPointData, rewardCoinPrice, rewardCoinDecimal, poolCoinPrice, poolCoinDecimal) => {
653
653
  const baseIndexRate = 1e9;
654
654
  const distributedPointPerSec = BigNumber(
655
655
  parsedBorrowIncentivePoolPointData.distributedPointPerPeriod
@@ -772,6 +772,10 @@ var isMarketCoin = (coinName) => {
772
772
  return coinName.charAt(0).toLowerCase() === "s" && COIN_SET.includes(assetCoinName);
773
773
  };
774
774
  var parseAssetSymbol = (coinName) => {
775
+ const isWormhole = coinName.charAt(0) === "w";
776
+ if (isWormhole) {
777
+ return `w${coinName.slice(1).toUpperCase()}`;
778
+ }
775
779
  switch (coinName) {
776
780
  case "afsui":
777
781
  return "afSUI";
@@ -1171,7 +1175,7 @@ var TEST_ADDRESSES = {
1171
1175
  }
1172
1176
  }
1173
1177
  },
1174
- apt: {
1178
+ wapt: {
1175
1179
  id: "0x3a5143bb1196e3bcdfab6203d1683ae29edd26294fc8bfeafe4aaa9d2704df37",
1176
1180
  metaData: "0xc969c5251f372c0f34c32759f1d315cf1ea0ee5e4454b52aea08778eacfdd0a8",
1177
1181
  treasury: "",
@@ -1184,7 +1188,7 @@ var TEST_ADDRESSES = {
1184
1188
  }
1185
1189
  }
1186
1190
  },
1187
- sol: {
1191
+ wsol: {
1188
1192
  id: "0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8",
1189
1193
  metaData: "0x4d2c39082b4477e3e79dc4562d939147ab90c42fc5f3e4acf03b94383cd69b6e",
1190
1194
  treasury: "",
@@ -1197,7 +1201,7 @@ var TEST_ADDRESSES = {
1197
1201
  }
1198
1202
  }
1199
1203
  },
1200
- btc: {
1204
+ wbtc: {
1201
1205
  id: "0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881",
1202
1206
  metaData: "0x5d3c6e60eeff8a05b693b481539e7847dfe33013e7070cdcb387f5c0cac05dfd",
1203
1207
  treasury: "",
@@ -1210,7 +1214,7 @@ var TEST_ADDRESSES = {
1210
1214
  }
1211
1215
  }
1212
1216
  },
1213
- eth: {
1217
+ weth: {
1214
1218
  id: "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5",
1215
1219
  metaData: "0x8900e4ceede3363bef086d6b50ca89d816d0e90bf6bc46efefe1f8455e08f50f",
1216
1220
  treasury: "",
@@ -1223,7 +1227,7 @@ var TEST_ADDRESSES = {
1223
1227
  }
1224
1228
  }
1225
1229
  },
1226
- usdc: {
1230
+ wusdc: {
1227
1231
  id: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf",
1228
1232
  metaData: "0x4fbf84f3029bd0c0b77164b587963be957f853eccf834a67bb9ecba6ec80f189",
1229
1233
  treasury: "",
@@ -1236,7 +1240,7 @@ var TEST_ADDRESSES = {
1236
1240
  }
1237
1241
  }
1238
1242
  },
1239
- usdt: {
1243
+ wusdt: {
1240
1244
  id: "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c",
1241
1245
  metaData: "0xfb0e3eb97dd158a5ae979dddfa24348063843c5b20eb8381dd5fa7c93699e45c",
1242
1246
  treasury: "",
@@ -1388,7 +1392,7 @@ var TEST_ADDRESSES = {
1388
1392
  // '0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a',
1389
1393
  object: "0x1742655fe5872dfa6456673f9e38612a4965e6979e6cd7696a7f1225f28bae21",
1390
1394
  pools: {
1391
- seth: {
1395
+ sweth: {
1392
1396
  id: "0xeec40beccb07c575bebd842eeaabb835f77cd3dab73add433477e57f583a6787",
1393
1397
  rewardPoolId: "0x957de68a18d87817de8309b30c1ec269a4d87ae513abbeed86b5619cb9ce1077"
1394
1398
  },
@@ -1400,7 +1404,7 @@ var TEST_ADDRESSES = {
1400
1404
  "0xc3206071a8d43212efb6e3b5504f2321f8df97ab122b466c0bc7cfdf398dc13a"
1401
1405
  )
1402
1406
  },
1403
- susdc: {
1407
+ swusdc: {
1404
1408
  // id: '0x4ace6648ddc64e646ba47a957c562c32c9599b3bba8f5ac1aadb2ae23a2f8ca0',
1405
1409
  id: "0xf1b383b9cf2e9f515fc69567df1053098f273849d09cd84b0278a773429bd2b2",
1406
1410
  rewardPoolId: (
@@ -1408,7 +1412,7 @@ var TEST_ADDRESSES = {
1408
1412
  "0xc71c53ee6505d928ba15bea4fe4f45d98c9c31eced94b72d00a7827d4b7ba3ff"
1409
1413
  )
1410
1414
  },
1411
- susdt: {
1415
+ swusdt: {
1412
1416
  // id: '0xcb328f7ffa7f9342ed85af3fdb2f22919e1a06dfb2f713c04c73543870d7548f',
1413
1417
  id: "0xb5567dfa5c7fc17a249e959732664c50713dd8c23db1a11376b27df800c17418",
1414
1418
  rewardPoolId: (
@@ -1501,15 +1505,15 @@ var TEST_ADDRESSES = {
1501
1505
  coinType: "0x0a9d3c6c9af9f6e8def82921541bcbd17f73ed31bed3adcb684f2a4c267e42f0::scallop_sca::SCALLOP_SCA",
1502
1506
  treasury: "0xe818636d1d6c46d6ea1a2dce9d94696d7cbc18ce27451b603eeaa47aba8d75e0"
1503
1507
  },
1504
- susdc: {
1508
+ swusdc: {
1505
1509
  coinType: "0xaedc3ab75db8680b81a755015fa90124d217be93457b893c05bac033817defaf::scallop_wormhole_usdc::SCALLOP_WORMHOLE_USDC",
1506
1510
  treasury: "0xfc6971648f867f7fd6928d1b873af71577e2eaf2c7543ef8bc82c431d833ae78"
1507
1511
  },
1508
- susdt: {
1512
+ swusdt: {
1509
1513
  coinType: "0xbf02fc87ddc104b342ad8414c85ceadf5b0c823c055a06fb0ed776272c01a52a::scallop_wormhole_usdt::SCALLOP_WORMHOLE_USDT",
1510
1514
  treasury: "0xb9593e2c3a0ba796ee815012b75ae46468ea78cda0188b9ac6816efe65503521"
1511
1515
  },
1512
- seth: {
1516
+ sweth: {
1513
1517
  coinType: "0x27d54f43e3eda701be56b82e5756e41c84467cd202f5cf713d5f9e45a9f1b6bc::scallop_wormhole_eth::SCALLOP_WORMHOLE_ETH",
1514
1518
  treasury: "0x032b4c8fac94c038dbe986f7587e9b1e4ef580b5ee06d2ef249d85459b7ef05d"
1515
1519
  },
@@ -1553,7 +1557,7 @@ var EMPTY_ADDRESSES = {
1553
1557
  }
1554
1558
  }
1555
1559
  },
1556
- apt: {
1560
+ wapt: {
1557
1561
  id: "",
1558
1562
  metaData: "",
1559
1563
  treasury: "",
@@ -1566,7 +1570,7 @@ var EMPTY_ADDRESSES = {
1566
1570
  }
1567
1571
  }
1568
1572
  },
1569
- sol: {
1573
+ wsol: {
1570
1574
  id: "",
1571
1575
  metaData: "",
1572
1576
  treasury: "",
@@ -1579,7 +1583,7 @@ var EMPTY_ADDRESSES = {
1579
1583
  }
1580
1584
  }
1581
1585
  },
1582
- btc: {
1586
+ wbtc: {
1583
1587
  id: "",
1584
1588
  metaData: "",
1585
1589
  treasury: "",
@@ -1592,7 +1596,7 @@ var EMPTY_ADDRESSES = {
1592
1596
  }
1593
1597
  }
1594
1598
  },
1595
- eth: {
1599
+ weth: {
1596
1600
  id: "",
1597
1601
  metaData: "",
1598
1602
  treasury: "",
@@ -1605,7 +1609,7 @@ var EMPTY_ADDRESSES = {
1605
1609
  }
1606
1610
  }
1607
1611
  },
1608
- usdc: {
1612
+ wusdc: {
1609
1613
  id: "",
1610
1614
  metaData: "",
1611
1615
  treasury: "",
@@ -1618,7 +1622,7 @@ var EMPTY_ADDRESSES = {
1618
1622
  }
1619
1623
  }
1620
1624
  },
1621
- usdt: {
1625
+ wusdt: {
1622
1626
  id: "",
1623
1627
  metaData: "",
1624
1628
  treasury: "",
@@ -1757,7 +1761,7 @@ var EMPTY_ADDRESSES = {
1757
1761
  adminCap: "",
1758
1762
  object: "",
1759
1763
  pools: {
1760
- seth: {
1764
+ sweth: {
1761
1765
  id: "",
1762
1766
  rewardPoolId: ""
1763
1767
  },
@@ -1765,11 +1769,11 @@ var EMPTY_ADDRESSES = {
1765
1769
  id: "",
1766
1770
  rewardPoolId: ""
1767
1771
  },
1768
- susdc: {
1772
+ swusdc: {
1769
1773
  id: "",
1770
1774
  rewardPoolId: ""
1771
1775
  },
1772
- susdt: {
1776
+ swusdt: {
1773
1777
  id: "",
1774
1778
  rewardPoolId: ""
1775
1779
  },
@@ -1844,15 +1848,15 @@ var EMPTY_ADDRESSES = {
1844
1848
  coinType: "",
1845
1849
  treasury: ""
1846
1850
  },
1847
- susdc: {
1851
+ swusdc: {
1848
1852
  coinType: "",
1849
1853
  treasury: ""
1850
1854
  },
1851
- susdt: {
1855
+ swusdt: {
1852
1856
  coinType: "",
1853
1857
  treasury: ""
1854
1858
  },
1855
- seth: {
1859
+ sweth: {
1856
1860
  coinType: "",
1857
1861
  treasury: ""
1858
1862
  },
@@ -2714,14 +2718,14 @@ var getObligations = async ({
2714
2718
  );
2715
2719
  return obligations;
2716
2720
  };
2717
- var getObligationLocked = async (cache, obligationId) => {
2718
- const obligationObjectResponse = await cache.queryGetObject(obligationId, {
2721
+ var getObligationLocked = async (cache, obligation) => {
2722
+ const obligationObjectResponse = typeof obligation === "string" ? (await cache.queryGetObject(obligation, {
2719
2723
  showContent: true
2720
- });
2724
+ }))?.data : obligation;
2721
2725
  let obligationLocked = false;
2722
- if (obligationObjectResponse?.data && obligationObjectResponse?.data?.content?.dataType === "moveObject" && "lock_key" in obligationObjectResponse.data.content.fields) {
2726
+ if (obligationObjectResponse && obligationObjectResponse?.content?.dataType === "moveObject" && "lock_key" in obligationObjectResponse.content.fields) {
2723
2727
  obligationLocked = Boolean(
2724
- obligationObjectResponse.data.content.fields.lock_key
2728
+ obligationObjectResponse.content.fields.lock_key
2725
2729
  );
2726
2730
  }
2727
2731
  return obligationLocked;
@@ -3016,10 +3020,10 @@ var getStakeAccounts = async ({
3016
3020
  }
3017
3021
  } while (hasNextPage);
3018
3022
  const stakeAccounts = {
3019
- seth: [],
3023
+ sweth: [],
3020
3024
  ssui: [],
3021
- susdc: [],
3022
- susdt: [],
3025
+ swusdc: [],
3026
+ swusdt: [],
3023
3027
  scetus: [],
3024
3028
  safsui: [],
3025
3029
  shasui: [],
@@ -3051,8 +3055,8 @@ var getStakeAccounts = async ({
3051
3055
  const index = Number(fields.index);
3052
3056
  const points = Number(fields.points);
3053
3057
  const totalPoints = Number(fields.total_points);
3054
- if (normalizeStructTag4(type) === stakeMarketCoinTypes.seth) {
3055
- stakeAccounts.seth.push({
3058
+ if (normalizeStructTag4(type) === stakeMarketCoinTypes.sweth) {
3059
+ stakeAccounts.sweth.push({
3056
3060
  id,
3057
3061
  type: normalizeStructTag4(type),
3058
3062
  stakePoolId,
@@ -3073,8 +3077,8 @@ var getStakeAccounts = async ({
3073
3077
  points,
3074
3078
  totalPoints
3075
3079
  });
3076
- } else if (normalizeStructTag4(type) === stakeMarketCoinTypes.susdc) {
3077
- stakeAccounts.susdc.push({
3080
+ } else if (normalizeStructTag4(type) === stakeMarketCoinTypes.swusdc) {
3081
+ stakeAccounts.swusdc.push({
3078
3082
  id,
3079
3083
  type: normalizeStructTag4(type),
3080
3084
  stakePoolId,
@@ -3084,8 +3088,8 @@ var getStakeAccounts = async ({
3084
3088
  points,
3085
3089
  totalPoints
3086
3090
  });
3087
- } else if (normalizeStructTag4(type) === stakeMarketCoinTypes.susdt) {
3088
- stakeAccounts.susdt.push({
3091
+ } else if (normalizeStructTag4(type) === stakeMarketCoinTypes.swusdt) {
3092
+ stakeAccounts.swusdt.push({
3089
3093
  id,
3090
3094
  type: normalizeStructTag4(type),
3091
3095
  stakePoolId,
@@ -3286,7 +3290,7 @@ var queryBorrowIncentivePools = async (query, borrowIncentiveCoinNames, indexer
3286
3290
  const symbol = query.utils.parseSymbol(rewardCoinName);
3287
3291
  const coinDecimal = query.utils.getCoinDecimal(rewardCoinName);
3288
3292
  const calculatedPoolPoint = calculateBorrowIncentivePoolPointData(
3289
- parsedBorrowIncentivePoolData,
3293
+ // parsedBorrowIncentivePoolData,
3290
3294
  poolPoint,
3291
3295
  rewardCoinPrice,
3292
3296
  rewardCoinDecimal,
@@ -4343,12 +4347,12 @@ var ScallopUtils = class {
4343
4347
  if (coinName === "sui")
4344
4348
  return normalizeStructTag6(`${coinPackageId}::sui::SUI`);
4345
4349
  const wormHolePackageIds = [
4346
- this.address.get("core.coins.usdc.id") ?? wormholeCoinIds.usdc,
4347
- this.address.get("core.coins.usdt.id") ?? wormholeCoinIds.usdt,
4348
- this.address.get("core.coins.eth.id") ?? wormholeCoinIds.eth,
4349
- this.address.get("core.coins.btc.id") ?? wormholeCoinIds.btc,
4350
- this.address.get("core.coins.sol.id") ?? wormholeCoinIds.sol,
4351
- this.address.get("core.coins.apt.id") ?? wormholeCoinIds.apt
4350
+ this.address.get("core.coins.wusdc.id") ?? wormholeCoinIds.wusdc,
4351
+ this.address.get("core.coins.wusdt.id") ?? wormholeCoinIds.wusdt,
4352
+ this.address.get("core.coins.weth.id") ?? wormholeCoinIds.weth,
4353
+ this.address.get("core.coins.wbtc.id") ?? wormholeCoinIds.wbtc,
4354
+ this.address.get("core.coins.wsol.id") ?? wormholeCoinIds.wsol,
4355
+ this.address.get("core.coins.wapt.id") ?? wormholeCoinIds.wapt
4352
4356
  ];
4353
4357
  const voloPackageIds = [
4354
4358
  this.address.get("core.coins.vsui.id") ?? voloCoinIds.vsui
@@ -4422,12 +4426,12 @@ var ScallopUtils = class {
4422
4426
  const isMarketCoinType = coinType.includes("reserve::MarketCoin");
4423
4427
  coinType = coinTypeMatch?.[1] || coinType;
4424
4428
  const wormHoleCoinTypeMap = {
4425
- [`${this.address.get("core.coins.usdc.id") ?? wormholeCoinIds.usdc}::coin::COIN`]: "usdc",
4426
- [`${this.address.get("core.coins.usdt.id") ?? wormholeCoinIds.usdt}::coin::COIN`]: "usdt",
4427
- [`${this.address.get("core.coins.eth.id") ?? wormholeCoinIds.eth}::coin::COIN`]: "eth",
4428
- [`${this.address.get("core.coins.btc.id") ?? wormholeCoinIds.btc}::coin::COIN`]: "btc",
4429
- [`${this.address.get("core.coins.sol.id") ?? wormholeCoinIds.sol}::coin::COIN`]: "sol",
4430
- [`${this.address.get("core.coins.apt.id") ?? wormholeCoinIds.apt}::coin::COIN`]: "apt"
4429
+ [`${this.address.get("core.coins.wusdc.id") ?? wormholeCoinIds.wusdc}::coin::COIN`]: "wusdc",
4430
+ [`${this.address.get("core.coins.wusdt.id") ?? wormholeCoinIds.wusdt}::coin::COIN`]: "wusdt",
4431
+ [`${this.address.get("core.coins.weth.id") ?? wormholeCoinIds.weth}::coin::COIN`]: "weth",
4432
+ [`${this.address.get("core.coins.wbtc.id") ?? wormholeCoinIds.wbtc}::coin::COIN`]: "wbtc",
4433
+ [`${this.address.get("core.coins.wsol.id") ?? wormholeCoinIds.wsol}::coin::COIN`]: "wsol",
4434
+ [`${this.address.get("core.coins.wapt.id") ?? wormholeCoinIds.wapt}::coin::COIN`]: "wapt"
4431
4435
  };
4432
4436
  const voloCoinTypeMap = {
4433
4437
  [`${this.address.get("core.coins.vsui.id") ?? voloCoinIds.vsui}::cert::CERT`]: "vsui"
@@ -4467,7 +4471,7 @@ var ScallopUtils = class {
4467
4471
  * return Coin wrapped type.
4468
4472
  */
4469
4473
  getCoinWrappedType(assetCoinName) {
4470
- return assetCoinName === "usdc" || assetCoinName === "usdt" || assetCoinName === "eth" || assetCoinName === "btc" || assetCoinName === "apt" || assetCoinName === "sol" ? {
4474
+ return assetCoinName === "wusdc" || assetCoinName === "wusdt" || assetCoinName === "weth" || assetCoinName === "wbtc" || assetCoinName === "wapt" || assetCoinName === "wsol" ? {
4471
4475
  from: "Wormhole",
4472
4476
  type: "Portal from Ethereum"
4473
4477
  } : void 0;
@@ -6328,7 +6332,7 @@ var ScallopIndexer = class {
6328
6332
  const response = await this.cache.queryClient.fetchQuery({
6329
6333
  queryKey: ["market"],
6330
6334
  queryFn: async () => {
6331
- return await this._requestClient.get(`/api/market`);
6335
+ return await this._requestClient.get(`/api/market/migrate`);
6332
6336
  }
6333
6337
  });
6334
6338
  if (response.status === 200) {
@@ -6391,7 +6395,7 @@ var ScallopIndexer = class {
6391
6395
  const response = await this.cache.queryClient.fetchQuery({
6392
6396
  queryKey: ["spools"],
6393
6397
  queryFn: async () => {
6394
- return await this._requestClient.get(`/api/spools`);
6398
+ return await this._requestClient.get(`/api/spools/migrate`);
6395
6399
  }
6396
6400
  });
6397
6401
  if (response.status === 200) {
@@ -6420,7 +6424,7 @@ var ScallopIndexer = class {
6420
6424
  const response = await this.cache.queryClient.fetchQuery({
6421
6425
  queryKey: ["borrowIncentivePools"],
6422
6426
  queryFn: async () => {
6423
- return await this._requestClient.get(`/api/borrowIncentivePools`);
6427
+ return await this._requestClient.get(`/api/borrowIncentivePools/migrate`);
6424
6428
  }
6425
6429
  });
6426
6430
  if (response.status === 200) {