@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.
@@ -2,25 +2,25 @@ import type * as types from '../types';
2
2
  import { IS_VE_SCA_TEST } from './common';
3
3
 
4
4
  export const coinDecimals: types.SupportCoinDecimals = {
5
- eth: 8,
6
- btc: 8,
7
- usdc: 6,
8
- usdt: 6,
5
+ weth: 8,
6
+ wbtc: 8,
7
+ wusdc: 6,
8
+ wusdt: 6,
9
9
  sui: 9,
10
- apt: 8,
11
- sol: 8,
10
+ wapt: 8,
11
+ wsol: 8,
12
12
  cetus: 9,
13
13
  afsui: 9,
14
14
  hasui: 9,
15
15
  vsui: 9,
16
16
  sca: 9,
17
- seth: 8,
18
- sbtc: 8,
19
- susdc: 6,
20
- susdt: 6,
17
+ sweth: 8,
18
+ swbtc: 8,
19
+ swusdc: 6,
20
+ swusdt: 6,
21
21
  ssui: 9,
22
- sapt: 8,
23
- ssol: 8,
22
+ swapt: 8,
23
+ swsol: 8,
24
24
  scetus: 9,
25
25
  safsui: 9,
26
26
  shasui: 9,
@@ -29,13 +29,13 @@ export const coinDecimals: types.SupportCoinDecimals = {
29
29
  };
30
30
 
31
31
  export const assetCoins: types.AssetCoins = {
32
- eth: 'eth',
33
- btc: 'btc',
34
- usdc: 'usdc',
35
- usdt: 'usdt',
32
+ weth: 'weth',
33
+ wbtc: 'wbtc',
34
+ wusdc: 'wusdc',
35
+ wusdt: 'wusdt',
36
36
  sui: 'sui',
37
- apt: 'apt',
38
- sol: 'sol',
37
+ wapt: 'wapt',
38
+ wsol: 'wsol',
39
39
  cetus: 'cetus',
40
40
  afsui: 'afsui',
41
41
  hasui: 'hasui',
@@ -44,13 +44,13 @@ export const assetCoins: types.AssetCoins = {
44
44
  };
45
45
 
46
46
  export const marketCoins: types.MarketCoins = {
47
- seth: 'seth',
48
- sbtc: 'sbtc',
49
- susdc: 'susdc',
50
- susdt: 'susdt',
47
+ sweth: 'sweth',
48
+ swbtc: 'swbtc',
49
+ swusdc: 'swusdc',
50
+ swusdt: 'swusdt',
51
51
  ssui: 'ssui',
52
- sapt: 'sapt',
53
- ssol: 'ssol',
52
+ swapt: 'swapt',
53
+ swsol: 'swsol',
54
54
  scetus: 'scetus',
55
55
  safsui: 'safsui',
56
56
  shasui: 'shasui',
@@ -59,24 +59,24 @@ export const marketCoins: types.MarketCoins = {
59
59
  };
60
60
 
61
61
  export const sCoins: types.SCoins = {
62
- seth: 'seth',
63
- susdc: 'susdc',
64
- susdt: 'susdt',
62
+ sweth: 'sweth',
63
+ swusdc: 'swusdc',
64
+ swusdt: 'swusdt',
65
65
  ssui: 'ssui',
66
66
  scetus: 'scetus',
67
67
  safsui: 'safsui',
68
68
  shasui: 'shasui',
69
69
  svsui: 'svsui',
70
70
  ssca: 'ssca',
71
- ssol: 'ssol',
72
- sbtc: 'sbtc',
71
+ swsol: 'swsol',
72
+ swbtc: 'swbtc',
73
73
  };
74
74
 
75
75
  export const stakeMarketCoins: types.StakeMarketCoins = {
76
- seth: 'seth',
76
+ sweth: 'sweth',
77
77
  ssui: 'ssui',
78
- susdc: 'susdc',
79
- susdt: 'susdt',
78
+ swusdc: 'swusdc',
79
+ swusdt: 'swusdt',
80
80
  scetus: 'scetus',
81
81
  safsui: 'safsui',
82
82
  shasui: 'shasui',
@@ -84,10 +84,10 @@ export const stakeMarketCoins: types.StakeMarketCoins = {
84
84
  };
85
85
 
86
86
  export const spoolRewardCoins: types.StakeRewardCoins = {
87
- seth: 'sui',
87
+ sweth: 'sui',
88
88
  ssui: 'sui',
89
- susdc: 'sui',
90
- susdt: 'sui',
89
+ swusdc: 'sui',
90
+ swusdt: 'sui',
91
91
  scetus: 'sui',
92
92
  safsui: 'sui',
93
93
  shasui: 'sui',
@@ -96,23 +96,23 @@ export const spoolRewardCoins: types.StakeRewardCoins = {
96
96
 
97
97
  export const borrowIncentiveRewardCoins: types.BorrowIncentiveRewardCoins = {
98
98
  sui: ['sui', 'sca'],
99
- usdc: ['sui', 'sca'],
100
- usdt: ['sui', 'sca'],
99
+ wusdc: ['sui', 'sca'],
100
+ wusdt: ['sui', 'sca'],
101
101
  sca: ['sui', 'sca'],
102
102
  afsui: ['sui'],
103
103
  hasui: ['sui'],
104
104
  vsui: ['sui'],
105
- eth: ['sui'],
105
+ weth: ['sui'],
106
106
  };
107
107
 
108
108
  export const coinIds: types.AssetCoinIds = {
109
109
  sui: '0x0000000000000000000000000000000000000000000000000000000000000002',
110
- eth: '0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5',
111
- btc: '0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881',
112
- usdc: '0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf',
113
- usdt: '0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c',
114
- apt: '0x3a5143bb1196e3bcdfab6203d1683ae29edd26294fc8bfeafe4aaa9d2704df37',
115
- sol: '0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8',
110
+ weth: '0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5',
111
+ wbtc: '0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881',
112
+ wusdc: '0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf',
113
+ wusdt: '0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c',
114
+ wapt: '0x3a5143bb1196e3bcdfab6203d1683ae29edd26294fc8bfeafe4aaa9d2704df37',
115
+ wsol: '0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8',
116
116
  cetus: '0x06864a6f921804860930db6ddbe2e16acdf8504495ea7481637a1c8b9a8fe54b',
117
117
  afsui: '0xf325ce1300e8dac124071d3152c5c5ee6174914f8bc2161e88329cf579246efc',
118
118
  hasui: '0xbde4ba4c2e274a60ce15c1cfff9e5c42e41654ac8b6d906a57efa4bd3c29f47d',
@@ -123,12 +123,12 @@ export const coinIds: types.AssetCoinIds = {
123
123
  };
124
124
 
125
125
  export const wormholeCoinIds: types.WormholeCoinIds = {
126
- eth: '0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5',
127
- btc: '0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881',
128
- usdc: '0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf',
129
- usdt: '0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c',
130
- apt: '0x3a5143bb1196e3bcdfab6203d1683ae29edd26294fc8bfeafe4aaa9d2704df37',
131
- sol: '0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8',
126
+ weth: '0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5',
127
+ wbtc: '0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881',
128
+ wusdc: '0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf',
129
+ wusdt: '0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c',
130
+ wapt: '0x3a5143bb1196e3bcdfab6203d1683ae29edd26294fc8bfeafe4aaa9d2704df37',
131
+ wsol: '0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8',
132
132
  };
133
133
 
134
134
  export const voloCoinIds: types.VoloCoinIds = {
@@ -141,19 +141,22 @@ export const sCoinIds: types.SCoinIds = {
141
141
  scetus:
142
142
  '0xea346ce428f91ab007210443efcea5f5cdbbb3aae7e9affc0ca93f9203c31f0c::scallop_cetus::SCALLOP_CETUS',
143
143
  ssca: '0x5ca17430c1d046fae9edeaa8fd76c7b4193a00d764a0ecfa9418d733ad27bc1e::scallop_sca::SCALLOP_SCA',
144
- susdc:
144
+ swusdc:
145
145
  '0xad4d71551d31092230db1fd482008ea42867dbf27b286e9c70a79d2a6191d58d::scallop_wormhole_usdc::SCALLOP_WORMHOLE_USDC',
146
- susdt:
146
+ swusdt:
147
147
  '0xe6e5a012ec20a49a3d1d57bd2b67140b96cd4d3400b9d79e541f7bdbab661f95::scallop_wormhole_usdt::SCALLOP_WORMHOLE_USDT',
148
- seth: '0x67540ceb850d418679e69f1fb6b2093d6df78a2a699ffc733f7646096d552e9b::scallop_wormhole_eth::SCALLOP_WORMHOLE_ETH',
148
+ sweth:
149
+ '0x67540ceb850d418679e69f1fb6b2093d6df78a2a699ffc733f7646096d552e9b::scallop_wormhole_eth::SCALLOP_WORMHOLE_ETH',
149
150
  safsui:
150
151
  '0x00671b1fa2a124f5be8bdae8b91ee711462c5d9e31bda232e70fd9607b523c88::scallop_af_sui::SCALLOP_AF_SUI',
151
152
  shasui:
152
153
  '0x9a2376943f7d22f88087c259c5889925f332ca4347e669dc37d54c2bf651af3c::scallop_ha_sui::SCALLOP_HA_SUI',
153
154
  svsui:
154
155
  '0xe1a1cc6bcf0001a015eab84bcc6713393ce20535f55b8b6f35c142e057a25fbe::scallop_v_sui::SCALLOP_V_SUI',
155
- ssol: '0x1392650f2eca9e3f6ffae3ff89e42a3590d7102b80e2b430f674730bc30d3259::scallop_wormhole_sol::SCALLOP_WORMHOLE_SOL',
156
- sbtc: '0x2cf76a9cf5d3337961d1154283234f94da2dcff18544dfe5cbdef65f319591b5::scallop_wormhole_btc::SCALLOP_WORMHOLE_BTC',
156
+ swsol:
157
+ '0x1392650f2eca9e3f6ffae3ff89e42a3590d7102b80e2b430f674730bc30d3259::scallop_wormhole_sol::SCALLOP_WORMHOLE_SOL',
158
+ swbtc:
159
+ '0x2cf76a9cf5d3337961d1154283234f94da2dcff18544dfe5cbdef65f319591b5::scallop_wormhole_btc::SCALLOP_WORMHOLE_BTC',
157
160
  } as const;
158
161
 
159
162
  // TEST VERSION
@@ -162,11 +165,11 @@ export const sCoinIds: types.SCoinIds = {
162
165
  // scetus:
163
166
  // '0x8b71e6d323ed78515af2bead13bf3d0da1562ba4a99234eb7c4f14fd39ef0427::scallop_cetus::SCALLOP_CETUS',
164
167
  // ssca: '0x0a9d3c6c9af9f6e8def82921541bcbd17f73ed31bed3adcb684f2a4c267e42f0::scallop_sca::SCALLOP_SCA',
165
- // susdc:
168
+ // swusdc:
166
169
  // '0xaedc3ab75db8680b81a755015fa90124d217be93457b893c05bac033817defaf::scallop_wormhole_usdc::SCALLOP_WORMHOLE_USDC',
167
- // susdt:
170
+ // swusdt:
168
171
  // '0xbf02fc87ddc104b342ad8414c85ceadf5b0c823c055a06fb0ed776272c01a52a::scallop_wormhole_usdt::SCALLOP_WORMHOLE_USDT',
169
- // seth: '0x27d54f43e3eda701be56b82e5756e41c84467cd202f5cf713d5f9e45a9f1b6bc::scallop_wormhole_eth::SCALLOP_WORMHOLE_ETH',
172
+ // sweth: '0x27d54f43e3eda701be56b82e5756e41c84467cd202f5cf713d5f9e45a9f1b6bc::scallop_wormhole_eth::SCALLOP_WORMHOLE_ETH',
170
173
  // safsui:
171
174
  // '0xb75b46d975d8d80670b53a6bee90baaa8ce2e0b7d397f079447d641eef6b44ad::scallop_af_sui::SCALLOP_AF_SUI',
172
175
  // shasui:
@@ -179,9 +182,9 @@ export const sCoinIds: types.SCoinIds = {
179
182
  // ssui: '0xd2c65de0495a060114c6ecc45f5573b8a4519e9538b93075aa2116e94209db55',
180
183
  // scetus: '0x24ba523450908240698628d554d910ed9aba6ff6c73ad735ee571cebd833fc4c',
181
184
  // ssca: '0xda98f336dd1d5827bfaee0fda75c9618d4c730df79623baca7b13037b514643d',
182
- // susdc: '0xd74d585df52333ac463746225b2ae1a48d7f6b037ee97dd43f746e0f6b6a4723',
183
- // susdt: '0x7bc99da1e37d838c49b018ed061f115d26c364a6b1a25059aebb372dfadba753',
184
- // seth: '0xc2a793057fffb91be6cb026cd35e1fc51d5fdd9fae73d2c1cde19ddde0463c2d',
185
+ // swusdc: '0xd74d585df52333ac463746225b2ae1a48d7f6b037ee97dd43f746e0f6b6a4723',
186
+ // swusdt: '0x7bc99da1e37d838c49b018ed061f115d26c364a6b1a25059aebb372dfadba753',
187
+ // sweth: '0xc2a793057fffb91be6cb026cd35e1fc51d5fdd9fae73d2c1cde19ddde0463c2d',
185
188
  // safsui: '0x20df47fa386c9948e255072df3f4e79e32921846770a0d2e01eb4336b5581aa9',
186
189
  // shasui: '0x5bb658edbd3f905494862e4b69101922fb3bea9ac5b035c32e66ec3ee1f4e685',
187
190
  // svsui: '0x3718f9350999e8be4c20064eaf874f470de4f36e3a7ca580fcd94d640a128936',
@@ -192,9 +195,9 @@ export const sCoinIds: types.SCoinIds = {
192
195
  // ssui: '0x5fe57239383098ef93f75912b145e5937a1b3fc78451c78bb1964bc8c4189d5c',
193
196
  // scetus: '0x065ab504806e2a013308de3d60940d9550d39ef83c8a3882f5cbc9019388eeee',
194
197
  // ssca: '0xa9aa774956ec3ee0cafef4084e16e37aacd15564f6e6eb646a63bd96cb959b27',
195
- // susdc: '0x2081a7fe4847aef473729bd6755686a7f232db46a2ff1be187fca961a6767363',
196
- // susdt: '0xc19b204eee6306c794d4d8c1b02b6f58862a52d2cdfc2f580131abd967292450',
197
- // seth: '0x0517d6380ff1687faf0385ccf758c815f114399e408d8b761fbcac4a3bf32495',
198
+ // swusdc: '0x2081a7fe4847aef473729bd6755686a7f232db46a2ff1be187fca961a6767363',
199
+ // swusdt: '0xc19b204eee6306c794d4d8c1b02b6f58862a52d2cdfc2f580131abd967292450',
200
+ // sweth: '0x0517d6380ff1687faf0385ccf758c815f114399e408d8b761fbcac4a3bf32495',
198
201
  // safsui: '0x088d0c107a29f250ead75e561a0f5039397da69fffd09392b33939ddc191cd31',
199
202
  // shasui: '0xa883cc4c09d51d3c3713124efce616a343a1158d3430cb42147488321db22fcf',
200
203
  // svsui: '0x8bd37d8aee69f17c5bb54c77d0d40ff6020b7b4a2c295ed455a79f72fb1c07e7',
@@ -205,9 +208,9 @@ export const sCoinIds: types.SCoinIds = {
205
208
  // ssui: '0x9cb4551b36c17d37e19d700147fa819ea1c487ff8bcf18374de2cceb2e9d4845',
206
209
  // scetus: '0xd786f4b2d26278cc7911a3445b1b085eab60f269ef9dbb6b87e803d52f155003',
207
210
  // ssca: '0xe818636d1d6c46d6ea1a2dce9d94696d7cbc18ce27451b603eeaa47aba8d75e0',
208
- // susdc: '0xfc6971648f867f7fd6928d1b873af71577e2eaf2c7543ef8bc82c431d833ae78',
209
- // susdt: '0xb9593e2c3a0ba796ee815012b75ae46468ea78cda0188b9ac6816efe65503521',
210
- // seth: '0x032b4c8fac94c038dbe986f7587e9b1e4ef580b5ee06d2ef249d85459b7ef05d',
211
+ // swusdc: '0xfc6971648f867f7fd6928d1b873af71577e2eaf2c7543ef8bc82c431d833ae78',
212
+ // swusdt: '0xb9593e2c3a0ba796ee815012b75ae46468ea78cda0188b9ac6816efe65503521',
213
+ // sweth: '0x032b4c8fac94c038dbe986f7587e9b1e4ef580b5ee06d2ef249d85459b7ef05d',
211
214
  // safsui: '0x21450ef0570ef3d224ffa3b873ab802e439ece7b93cc7efad10ae0c1e3b3fcfe',
212
215
  // shasui: '0xf822fc1402207e47d2e3ba8ff6e1e594bf1de777dc5ebd2744619cd2726e3b0d',
213
216
  // svsui: '0x327114f0bf3559d7e2de10282147ed76a236c7c6775029165c4db09a6062ead6',
@@ -4,15 +4,15 @@ export const FlashLoanFeeObjectMap: OptionalKeys<
4
4
  Record<SupportPoolCoins, string>
5
5
  > = {
6
6
  vsui: '0x0069cddee7a5c0b1d34beb5ef0620f978096525f1830b055f38b110f40d73fbb',
7
- btc: '0x2078490aa37d8fb42b511e5c95e217cb957d141267e16980bc802d76b42719f7',
7
+ wbtc: '0x2078490aa37d8fb42b511e5c95e217cb957d141267e16980bc802d76b42719f7',
8
8
  sui: '0x27614284a8f0a699ffd35aae8f2572c937ec76771cb21b0d7930ec4491a76ed4',
9
- usdt: '0x5b61983a19b5159ca348d291e4b595f42db70ccda32852a2ed85528aa65171e4',
10
- apt: '0x9d5898edcd1e4abcb044273242293a9d036f6a977bf3fe57ab71f5a87c505ee6',
9
+ wusdt: '0x5b61983a19b5159ca348d291e4b595f42db70ccda32852a2ed85528aa65171e4',
10
+ wapt: '0x9d5898edcd1e4abcb044273242293a9d036f6a977bf3fe57ab71f5a87c505ee6',
11
11
  afsui: '0xac87fde83d434554ec300c1334c9a622aa5b59e82a04334dc99e1cc1f75d4eae',
12
12
  hasui: '0xb9f505d532de1d6c9f3a8522a2d16f2958b75c0ed939d4f80b96f584a2a8ed5e',
13
- usdc: '0xd241d6a7e44ac11a6689370ed9a98eec389b98b8a6695c61fddede9fa7567b90',
14
- eth: '0xd252acb058e77877810c1290564e290a8f9fcab5bc9aca2884ede8a38810cf34',
13
+ wusdc: '0xd241d6a7e44ac11a6689370ed9a98eec389b98b8a6695c61fddede9fa7567b90',
14
+ weth: '0xd252acb058e77877810c1290564e290a8f9fcab5bc9aca2884ede8a38810cf34',
15
15
  sca: '0xe04e46471754b6f48d81c549ecfec09de02733715a63bec02364c6ac7c4dd2dc',
16
16
  cetus: '0xe65a73d11c31b2d323ad2b9f6b4bb0a3c0df9c1b212eef66c854941186a5ddc7',
17
- sol: '0xe84bdb35b790fc7bdd1645122ac6ac0fc904531d6772c9e25904fece322c5f34',
17
+ wsol: '0xe84bdb35b790fc7bdd1645122ac6ac0fc904531d6772c9e25904fece322c5f34',
18
18
  };
@@ -40,7 +40,7 @@ export const TEST_ADDRESSES: AddressesInterface = {
40
40
  },
41
41
  },
42
42
  },
43
- apt: {
43
+ wapt: {
44
44
  id: '0x3a5143bb1196e3bcdfab6203d1683ae29edd26294fc8bfeafe4aaa9d2704df37',
45
45
  metaData:
46
46
  '0xc969c5251f372c0f34c32759f1d315cf1ea0ee5e4454b52aea08778eacfdd0a8',
@@ -55,7 +55,7 @@ export const TEST_ADDRESSES: AddressesInterface = {
55
55
  },
56
56
  },
57
57
  },
58
- sol: {
58
+ wsol: {
59
59
  id: '0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8',
60
60
  metaData:
61
61
  '0x4d2c39082b4477e3e79dc4562d939147ab90c42fc5f3e4acf03b94383cd69b6e',
@@ -70,7 +70,7 @@ export const TEST_ADDRESSES: AddressesInterface = {
70
70
  },
71
71
  },
72
72
  },
73
- btc: {
73
+ wbtc: {
74
74
  id: '0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881',
75
75
  metaData:
76
76
  '0x5d3c6e60eeff8a05b693b481539e7847dfe33013e7070cdcb387f5c0cac05dfd',
@@ -85,7 +85,7 @@ export const TEST_ADDRESSES: AddressesInterface = {
85
85
  },
86
86
  },
87
87
  },
88
- eth: {
88
+ weth: {
89
89
  id: '0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5',
90
90
  metaData:
91
91
  '0x8900e4ceede3363bef086d6b50ca89d816d0e90bf6bc46efefe1f8455e08f50f',
@@ -100,7 +100,7 @@ export const TEST_ADDRESSES: AddressesInterface = {
100
100
  },
101
101
  },
102
102
  },
103
- usdc: {
103
+ wusdc: {
104
104
  id: '0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf',
105
105
  metaData:
106
106
  '0x4fbf84f3029bd0c0b77164b587963be957f853eccf834a67bb9ecba6ec80f189',
@@ -115,7 +115,7 @@ export const TEST_ADDRESSES: AddressesInterface = {
115
115
  },
116
116
  },
117
117
  },
118
- usdt: {
118
+ wusdt: {
119
119
  id: '0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c',
120
120
  metaData:
121
121
  '0xfb0e3eb97dd158a5ae979dddfa24348063843c5b20eb8381dd5fa7c93699e45c',
@@ -298,7 +298,7 @@ export const TEST_ADDRESSES: AddressesInterface = {
298
298
  object:
299
299
  '0x1742655fe5872dfa6456673f9e38612a4965e6979e6cd7696a7f1225f28bae21',
300
300
  pools: {
301
- seth: {
301
+ sweth: {
302
302
  id: '0xeec40beccb07c575bebd842eeaabb835f77cd3dab73add433477e57f583a6787',
303
303
  rewardPoolId:
304
304
  '0x957de68a18d87817de8309b30c1ec269a4d87ae513abbeed86b5619cb9ce1077',
@@ -310,14 +310,14 @@ export const TEST_ADDRESSES: AddressesInterface = {
310
310
  // '0x162250ef72393a4ad3d46294c4e1bdfcb03f04c869d390e7efbfc995353a7ee9',
311
311
  '0xc3206071a8d43212efb6e3b5504f2321f8df97ab122b466c0bc7cfdf398dc13a',
312
312
  },
313
- susdc: {
313
+ swusdc: {
314
314
  // id: '0x4ace6648ddc64e646ba47a957c562c32c9599b3bba8f5ac1aadb2ae23a2f8ca0',
315
315
  id: '0xf1b383b9cf2e9f515fc69567df1053098f273849d09cd84b0278a773429bd2b2',
316
316
  rewardPoolId:
317
317
  // '0xf4268cc9b9413b9bfe09e8966b8de650494c9e5784bf0930759cfef4904daff8',
318
318
  '0xc71c53ee6505d928ba15bea4fe4f45d98c9c31eced94b72d00a7827d4b7ba3ff',
319
319
  },
320
- susdt: {
320
+ swusdt: {
321
321
  // id: '0xcb328f7ffa7f9342ed85af3fdb2f22919e1a06dfb2f713c04c73543870d7548f',
322
322
  id: '0xb5567dfa5c7fc17a249e959732664c50713dd8c23db1a11376b27df800c17418',
323
323
  rewardPoolId:
@@ -436,19 +436,19 @@ export const TEST_ADDRESSES: AddressesInterface = {
436
436
  treasury:
437
437
  '0xe818636d1d6c46d6ea1a2dce9d94696d7cbc18ce27451b603eeaa47aba8d75e0',
438
438
  },
439
- susdc: {
439
+ swusdc: {
440
440
  coinType:
441
441
  '0xaedc3ab75db8680b81a755015fa90124d217be93457b893c05bac033817defaf::scallop_wormhole_usdc::SCALLOP_WORMHOLE_USDC',
442
442
  treasury:
443
443
  '0xfc6971648f867f7fd6928d1b873af71577e2eaf2c7543ef8bc82c431d833ae78',
444
444
  },
445
- susdt: {
445
+ swusdt: {
446
446
  coinType:
447
447
  '0xbf02fc87ddc104b342ad8414c85ceadf5b0c823c055a06fb0ed776272c01a52a::scallop_wormhole_usdt::SCALLOP_WORMHOLE_USDT',
448
448
  treasury:
449
449
  '0xb9593e2c3a0ba796ee815012b75ae46468ea78cda0188b9ac6816efe65503521',
450
450
  },
451
- seth: {
451
+ sweth: {
452
452
  coinType:
453
453
  '0x27d54f43e3eda701be56b82e5756e41c84467cd202f5cf713d5f9e45a9f1b6bc::scallop_wormhole_eth::SCALLOP_WORMHOLE_ETH',
454
454
  treasury:
@@ -34,7 +34,7 @@ const EMPTY_ADDRESSES: AddressesInterface = {
34
34
  },
35
35
  },
36
36
  },
37
- apt: {
37
+ wapt: {
38
38
  id: '',
39
39
  metaData: '',
40
40
  treasury: '',
@@ -47,7 +47,7 @@ const EMPTY_ADDRESSES: AddressesInterface = {
47
47
  },
48
48
  },
49
49
  },
50
- sol: {
50
+ wsol: {
51
51
  id: '',
52
52
  metaData: '',
53
53
  treasury: '',
@@ -60,7 +60,7 @@ const EMPTY_ADDRESSES: AddressesInterface = {
60
60
  },
61
61
  },
62
62
  },
63
- btc: {
63
+ wbtc: {
64
64
  id: '',
65
65
  metaData: '',
66
66
  treasury: '',
@@ -73,7 +73,7 @@ const EMPTY_ADDRESSES: AddressesInterface = {
73
73
  },
74
74
  },
75
75
  },
76
- eth: {
76
+ weth: {
77
77
  id: '',
78
78
  metaData: '',
79
79
  treasury: '',
@@ -86,7 +86,7 @@ const EMPTY_ADDRESSES: AddressesInterface = {
86
86
  },
87
87
  },
88
88
  },
89
- usdc: {
89
+ wusdc: {
90
90
  id: '',
91
91
  metaData: '',
92
92
  treasury: '',
@@ -99,7 +99,7 @@ const EMPTY_ADDRESSES: AddressesInterface = {
99
99
  },
100
100
  },
101
101
  },
102
- usdt: {
102
+ wusdt: {
103
103
  id: '',
104
104
  metaData: '',
105
105
  treasury: '',
@@ -238,7 +238,7 @@ const EMPTY_ADDRESSES: AddressesInterface = {
238
238
  adminCap: '',
239
239
  object: '',
240
240
  pools: {
241
- seth: {
241
+ sweth: {
242
242
  id: '',
243
243
  rewardPoolId: '',
244
244
  },
@@ -246,11 +246,11 @@ const EMPTY_ADDRESSES: AddressesInterface = {
246
246
  id: '',
247
247
  rewardPoolId: '',
248
248
  },
249
- susdc: {
249
+ swusdc: {
250
250
  id: '',
251
251
  rewardPoolId: '',
252
252
  },
253
- susdt: {
253
+ swusdt: {
254
254
  id: '',
255
255
  rewardPoolId: '',
256
256
  },
@@ -325,15 +325,15 @@ const EMPTY_ADDRESSES: AddressesInterface = {
325
325
  coinType: '',
326
326
  treasury: '',
327
327
  },
328
- susdc: {
328
+ swusdc: {
329
329
  coinType: '',
330
330
  treasury: '',
331
331
  },
332
- susdt: {
332
+ swusdt: {
333
333
  coinType: '',
334
334
  treasury: '',
335
335
  },
336
- seth: {
336
+ sweth: {
337
337
  coinType: '',
338
338
  treasury: '',
339
339
  },
@@ -72,7 +72,7 @@ export class ScallopIndexer {
72
72
  return await this._requestClient.get<{
73
73
  pools: MarketPool[];
74
74
  collaterals: MarketCollateral[];
75
- }>(`/api/market`);
75
+ }>(`/api/market/migrate`);
76
76
  },
77
77
  });
78
78
 
@@ -149,7 +149,7 @@ export class ScallopIndexer {
149
149
  queryFn: async () => {
150
150
  return await this._requestClient.get<{
151
151
  spools: Spool[];
152
- }>(`/api/spools`);
152
+ }>(`/api/spools/migrate`);
153
153
  },
154
154
  });
155
155
 
@@ -187,7 +187,7 @@ export class ScallopIndexer {
187
187
  queryFn: async () => {
188
188
  return await this._requestClient.get<{
189
189
  borrowIncentivePools: BorrowIncentivePool[];
190
- }>(`/api/borrowIncentivePools`);
190
+ }>(`/api/borrowIncentivePools/migrate`);
191
191
  },
192
192
  });
193
193
 
@@ -163,12 +163,12 @@ export class ScallopUtils {
163
163
  if (coinName === 'sui')
164
164
  return normalizeStructTag(`${coinPackageId}::sui::SUI`);
165
165
  const wormHolePackageIds = [
166
- this.address.get('core.coins.usdc.id') ?? wormholeCoinIds.usdc,
167
- this.address.get('core.coins.usdt.id') ?? wormholeCoinIds.usdt,
168
- this.address.get('core.coins.eth.id') ?? wormholeCoinIds.eth,
169
- this.address.get('core.coins.btc.id') ?? wormholeCoinIds.btc,
170
- this.address.get('core.coins.sol.id') ?? wormholeCoinIds.sol,
171
- this.address.get('core.coins.apt.id') ?? wormholeCoinIds.apt,
166
+ this.address.get('core.coins.wusdc.id') ?? wormholeCoinIds.wusdc,
167
+ this.address.get('core.coins.wusdt.id') ?? wormholeCoinIds.wusdt,
168
+ this.address.get('core.coins.weth.id') ?? wormholeCoinIds.weth,
169
+ this.address.get('core.coins.wbtc.id') ?? wormholeCoinIds.wbtc,
170
+ this.address.get('core.coins.wsol.id') ?? wormholeCoinIds.wsol,
171
+ this.address.get('core.coins.wapt.id') ?? wormholeCoinIds.wapt,
172
172
  ];
173
173
  const voloPackageIds = [
174
174
  this.address.get('core.coins.vsui.id') ?? voloCoinIds.vsui,
@@ -191,7 +191,7 @@ export class ScallopUtils {
191
191
  public parseSCoinName<T extends SupportSCoin>(
192
192
  coinName: SupportCoins | SupportMarketCoins
193
193
  ) {
194
- // need more check because sbtc, ssol and sapt has no sCoin type
194
+ // need more check because swapt has no sCoin type
195
195
  if (
196
196
  isMarketCoin(coinName) &&
197
197
  SUPPORT_SCOIN.includes(coinName as SupportSCoin)
@@ -275,23 +275,23 @@ export class ScallopUtils {
275
275
 
276
276
  const wormHoleCoinTypeMap: Record<string, SupportAssetCoins> = {
277
277
  [`${
278
- this.address.get('core.coins.usdc.id') ?? wormholeCoinIds.usdc
279
- }::coin::COIN`]: 'usdc',
278
+ this.address.get('core.coins.wusdc.id') ?? wormholeCoinIds.wusdc
279
+ }::coin::COIN`]: 'wusdc',
280
280
  [`${
281
- this.address.get('core.coins.usdt.id') ?? wormholeCoinIds.usdt
282
- }::coin::COIN`]: 'usdt',
281
+ this.address.get('core.coins.wusdt.id') ?? wormholeCoinIds.wusdt
282
+ }::coin::COIN`]: 'wusdt',
283
283
  [`${
284
- this.address.get('core.coins.eth.id') ?? wormholeCoinIds.eth
285
- }::coin::COIN`]: 'eth',
284
+ this.address.get('core.coins.weth.id') ?? wormholeCoinIds.weth
285
+ }::coin::COIN`]: 'weth',
286
286
  [`${
287
- this.address.get('core.coins.btc.id') ?? wormholeCoinIds.btc
288
- }::coin::COIN`]: 'btc',
287
+ this.address.get('core.coins.wbtc.id') ?? wormholeCoinIds.wbtc
288
+ }::coin::COIN`]: 'wbtc',
289
289
  [`${
290
- this.address.get('core.coins.sol.id') ?? wormholeCoinIds.sol
291
- }::coin::COIN`]: 'sol',
290
+ this.address.get('core.coins.wsol.id') ?? wormholeCoinIds.wsol
291
+ }::coin::COIN`]: 'wsol',
292
292
  [`${
293
- this.address.get('core.coins.apt.id') ?? wormholeCoinIds.apt
294
- }::coin::COIN`]: 'apt',
293
+ this.address.get('core.coins.wapt.id') ?? wormholeCoinIds.wapt
294
+ }::coin::COIN`]: 'wapt',
295
295
  };
296
296
  const voloCoinTypeMap: Record<string, SupportAssetCoins> = {
297
297
  [`${
@@ -370,12 +370,12 @@ export class ScallopUtils {
370
370
  * return Coin wrapped type.
371
371
  */
372
372
  public getCoinWrappedType(assetCoinName: SupportAssetCoins): CoinWrappedType {
373
- return assetCoinName === 'usdc' ||
374
- assetCoinName === 'usdt' ||
375
- assetCoinName === 'eth' ||
376
- assetCoinName === 'btc' ||
377
- assetCoinName === 'apt' ||
378
- assetCoinName === 'sol'
373
+ return assetCoinName === 'wusdc' ||
374
+ assetCoinName === 'wusdt' ||
375
+ assetCoinName === 'weth' ||
376
+ assetCoinName === 'wbtc' ||
377
+ assetCoinName === 'wapt' ||
378
+ assetCoinName === 'wsol'
379
379
  ? {
380
380
  from: 'Wormhole',
381
381
  type: 'Portal from Ethereum',
@@ -113,7 +113,7 @@ export const queryBorrowIncentivePools = async (
113
113
  const coinDecimal = query.utils.getCoinDecimal(rewardCoinName);
114
114
 
115
115
  const calculatedPoolPoint = calculateBorrowIncentivePoolPointData(
116
- parsedBorrowIncentivePoolData,
116
+ // parsedBorrowIncentivePoolData,
117
117
  poolPoint,
118
118
  rewardCoinPrice,
119
119
  rewardCoinDecimal,
@@ -768,24 +768,29 @@ export const getObligations = async (
768
768
  * Query obligation locked status.
769
769
  *
770
770
  * @param query - The Scallop query instance.
771
- * @param obligationId - The obligation id.
771
+ * @param obligation - The obligation id or the obligation object.
772
772
  * @return Obligation locked status.
773
773
  */
774
774
  export const getObligationLocked = async (
775
775
  cache: ScallopCache,
776
- obligationId: string
776
+ obligation: string | SuiObjectData
777
777
  ) => {
778
- const obligationObjectResponse = await cache.queryGetObject(obligationId, {
779
- showContent: true,
780
- });
778
+ const obligationObjectResponse =
779
+ typeof obligation === 'string'
780
+ ? (
781
+ await cache.queryGetObject(obligation, {
782
+ showContent: true,
783
+ })
784
+ )?.data
785
+ : obligation;
781
786
  let obligationLocked = false;
782
787
  if (
783
- obligationObjectResponse?.data &&
784
- obligationObjectResponse?.data?.content?.dataType === 'moveObject' &&
785
- 'lock_key' in obligationObjectResponse.data.content.fields
788
+ obligationObjectResponse &&
789
+ obligationObjectResponse?.content?.dataType === 'moveObject' &&
790
+ 'lock_key' in obligationObjectResponse.content.fields
786
791
  ) {
787
792
  obligationLocked = Boolean(
788
- obligationObjectResponse.data.content.fields.lock_key
793
+ obligationObjectResponse.content.fields.lock_key
789
794
  );
790
795
  }
791
796