@scallop-io/sui-scallop-sdk 0.46.40 → 0.46.42

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.
Files changed (61) hide show
  1. package/dist/builders/loyaltyProgramBuilder.d.ts +1 -1
  2. package/dist/builders/sCoinBuilder.d.ts +4 -0
  3. package/dist/constants/common.d.ts +3 -1
  4. package/dist/constants/enum.d.ts +12 -10
  5. package/dist/index.js +660 -97
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +658 -92
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/models/scallopBuilder.d.ts +16 -1
  10. package/dist/models/scallopClient.d.ts +5 -0
  11. package/dist/models/scallopQuery.d.ts +21 -2
  12. package/dist/models/scallopUtils.d.ts +32 -2
  13. package/dist/queries/portfolioQuery.d.ts +1 -1
  14. package/dist/queries/sCoinQuery.d.ts +27 -0
  15. package/dist/test.d.ts +1 -0
  16. package/dist/types/address.d.ts +8 -1
  17. package/dist/types/builder/core.d.ts +12 -4
  18. package/dist/types/builder/index.d.ts +6 -1
  19. package/dist/types/builder/sCoin.d.ts +37 -0
  20. package/dist/types/builder/spool.d.ts +2 -1
  21. package/dist/types/constant/common.d.ts +3 -2
  22. package/dist/types/constant/enum.d.ts +13 -1
  23. package/dist/types/query/core.d.ts +2 -1
  24. package/dist/types/query/index.d.ts +1 -0
  25. package/dist/types/query/portfolio.d.ts +1 -0
  26. package/dist/types/query/sCoin.d.ts +1 -0
  27. package/package.json +3 -3
  28. package/src/builders/coreBuilder.ts +72 -17
  29. package/src/builders/index.ts +5 -1
  30. package/src/builders/loyaltyProgramBuilder.ts +1 -1
  31. package/src/builders/referralBuilder.ts +1 -1
  32. package/src/builders/sCoinBuilder.ts +119 -0
  33. package/src/builders/spoolBuilder.ts +1 -1
  34. package/src/builders/vescaBuilder.ts +3 -3
  35. package/src/constants/common.ts +19 -5
  36. package/src/constants/enum.ts +98 -20
  37. package/src/constants/testAddress.ts +115 -21
  38. package/src/models/scallopAddress.ts +44 -3
  39. package/src/models/scallopBuilder.ts +43 -7
  40. package/src/models/scallopCache.ts +32 -4
  41. package/src/models/scallopClient.ts +121 -0
  42. package/src/models/scallopQuery.ts +46 -0
  43. package/src/models/scallopUtils.ts +56 -2
  44. package/src/queries/coreQuery.ts +10 -4
  45. package/src/queries/portfolioQuery.ts +26 -4
  46. package/src/queries/sCoinQuery.ts +94 -0
  47. package/src/queries/vescaQuery.ts +0 -1
  48. package/src/test.ts +19 -0
  49. package/src/types/address.ts +13 -0
  50. package/src/types/builder/core.ts +19 -4
  51. package/src/types/builder/index.ts +11 -3
  52. package/src/types/builder/sCoin.ts +61 -0
  53. package/src/types/builder/spool.ts +2 -0
  54. package/src/types/constant/common.ts +4 -1
  55. package/src/types/constant/enum.ts +17 -0
  56. package/src/types/query/core.ts +3 -0
  57. package/src/types/query/index.ts +1 -0
  58. package/src/types/query/portfolio.ts +1 -0
  59. package/src/types/query/sCoin.ts +1 -0
  60. package/src/utils/builder.ts +1 -1
  61. package/src/utils/util.ts +13 -17
@@ -0,0 +1,119 @@
1
+ import {
2
+ TransactionBlock,
3
+ SuiTxBlock as SuiKitTxBlock,
4
+ } from '@scallop-io/sui-kit';
5
+ import { ScallopBuilder } from 'src/models';
6
+ import {
7
+ GenerateSCoinNormalMethod,
8
+ GenerateSCoinQuickMethod,
9
+ SCoinTxBlock,
10
+ ScallopTxBlock,
11
+ SuiTxBlockWithSCoinNormalMethods,
12
+ sCoinPkgIds,
13
+ } from 'src/types';
14
+ import { requireSender } from 'src/utils';
15
+
16
+ const generateSCoinNormalMethod: GenerateSCoinNormalMethod = ({
17
+ builder,
18
+ txBlock,
19
+ }) => {
20
+ const sCoinPkgIds: sCoinPkgIds = {
21
+ pkgId: builder.address.get('scoin.id'),
22
+ };
23
+
24
+ return {
25
+ mintSCoin: (marketCoinName, marketCoin) => {
26
+ return txBlock.moveCall(
27
+ `${sCoinPkgIds.pkgId}::s_coin_converter::mint_s_coin`,
28
+ [builder.utils.getSCoinTreasury(marketCoinName), marketCoin],
29
+ [
30
+ builder.utils.parseSCoinType(marketCoinName),
31
+ builder.utils.parseUnderlyingSCoinType(marketCoinName),
32
+ ]
33
+ );
34
+ },
35
+ burnSCoin: (sCoinName, sCoin) => {
36
+ return txBlock.moveCall(
37
+ `${sCoinPkgIds.pkgId}::s_coin_converter::burn_s_coin`,
38
+ [builder.utils.getSCoinTreasury(sCoinName), sCoin],
39
+ [
40
+ builder.utils.parseSCoinType(sCoinName),
41
+ builder.utils.parseUnderlyingSCoinType(sCoinName),
42
+ ]
43
+ );
44
+ },
45
+ };
46
+ };
47
+
48
+ const generateSCoinQuickMethod: GenerateSCoinQuickMethod = ({
49
+ builder,
50
+ txBlock,
51
+ }) => {
52
+ return {
53
+ mintSCoinQuick: async (marketCoinName, amount) => {
54
+ const sender = requireSender(txBlock);
55
+ const { leftCoin, takeCoin } = await builder.selectMarketCoin(
56
+ txBlock,
57
+ marketCoinName,
58
+ amount,
59
+ sender
60
+ );
61
+
62
+ txBlock.transferObjects([leftCoin], sender);
63
+ return txBlock.mintSCoin(marketCoinName, takeCoin);
64
+ },
65
+ burnSCoinQuick: async (sCoinName, amount) => {
66
+ const sender = requireSender(txBlock);
67
+ const { leftCoin, takeCoin } = await builder.selectSCoin(
68
+ txBlock,
69
+ sCoinName,
70
+ amount,
71
+ sender
72
+ );
73
+
74
+ txBlock.transferObjects([leftCoin], sender);
75
+ return txBlock.burnSCoin(sCoinName, takeCoin);
76
+ },
77
+ };
78
+ };
79
+
80
+ export const newSCoinTxBlock = (
81
+ builder: ScallopBuilder,
82
+ initTxBlock?: ScallopTxBlock | SuiKitTxBlock | TransactionBlock
83
+ ) => {
84
+ const txBlock =
85
+ initTxBlock instanceof TransactionBlock
86
+ ? new SuiKitTxBlock(initTxBlock)
87
+ : initTxBlock
88
+ ? initTxBlock
89
+ : new SuiKitTxBlock();
90
+
91
+ const normalMethod = generateSCoinNormalMethod({
92
+ builder,
93
+ txBlock,
94
+ });
95
+
96
+ const normalTxBlock = new Proxy(txBlock, {
97
+ get: (target, prop) => {
98
+ if (prop in normalMethod) {
99
+ return Reflect.get(normalMethod, prop);
100
+ }
101
+ return Reflect.get(target, prop);
102
+ },
103
+ }) as SuiTxBlockWithSCoinNormalMethods;
104
+
105
+ const quickMethod = generateSCoinQuickMethod({
106
+ builder,
107
+ txBlock: normalTxBlock,
108
+ });
109
+
110
+ return new Proxy(normalTxBlock, {
111
+ get: (target, prop) => {
112
+ if (prop in quickMethod) {
113
+ return Reflect.get(quickMethod, prop);
114
+ }
115
+
116
+ return Reflect.get(target, prop);
117
+ },
118
+ }) as SCoinTxBlock;
119
+ };
@@ -189,7 +189,7 @@ const generateSpoolQuickMethod: GenerateSpoolQuickMethod = ({
189
189
  const marketCoinType =
190
190
  builder.utils.parseMarketCoinType(stakeMarketCoinName);
191
191
  if (typeof amountOrMarketCoin === 'number') {
192
- const coins = await builder.utils.selectCoinIds(
192
+ const coins = await builder.utils.selectCoins(
193
193
  amountOrMarketCoin,
194
194
  marketCoinType,
195
195
  sender
@@ -192,7 +192,7 @@ const generateQuickVeScaMethod: GenerateVeScaQuickMethod = ({
192
192
  undefined;
193
193
  const transferObjects = [];
194
194
  if (amountOrCoin !== undefined && typeof amountOrCoin === 'number') {
195
- const coins = await builder.utils.selectCoinIds(
195
+ const coins = await builder.utils.selectCoins(
196
196
  amountOrCoin,
197
197
  SCA_COIN_TYPE,
198
198
  sender
@@ -283,7 +283,7 @@ const generateQuickVeScaMethod: GenerateVeScaQuickMethod = ({
283
283
  if (autoCheck) checkExtendLockAmount(scaAmount, veSca?.unlockAt);
284
284
 
285
285
  if (veSca) {
286
- const scaCoins = await builder.utils.selectCoinIds(
286
+ const scaCoins = await builder.utils.selectCoins(
287
287
  scaAmount,
288
288
  SCA_COIN_TYPE,
289
289
  sender
@@ -319,7 +319,7 @@ const generateQuickVeScaMethod: GenerateVeScaQuickMethod = ({
319
319
  const unlockedSca = txBlock.redeemSca(veSca.keyId);
320
320
  transferObjects.push(unlockedSca);
321
321
  }
322
- const scaCoins = await builder.utils.selectCoinIds(
322
+ const scaCoins = await builder.utils.selectCoins(
323
323
  scaAmount,
324
324
  SCA_COIN_TYPE,
325
325
  sender
@@ -1,13 +1,15 @@
1
- export const API_BASE_URL = 'https://sui.api.scallop.io';
1
+ // export const API_BASE_URL = 'https://sui.api.scallop.io';
2
+ export const API_BASE_URL = 'https://sui.apis.scallop.io';
2
3
  export const SDK_API_BASE_URL = 'https://sdk.api.scallop.io';
3
4
 
4
5
  export const IS_VE_SCA_TEST = false;
6
+ export const USE_TEST_ADDRESS = false;
5
7
 
6
8
  // export const ADDRESSES_ID = '';
7
- export const ADDRESSES_ID = IS_VE_SCA_TEST
8
- ? // ? ('65fb07c39c845425d71d7b18' as const)
9
- ('65fb07c39c845425d71d7b18' as const)
10
- : ('664dfe22898c36c159e28bc8' as const);
9
+ export const ADDRESSES_ID =
10
+ IS_VE_SCA_TEST || USE_TEST_ADDRESS
11
+ ? ('65fb07c39c845425d71d7b18' as const)
12
+ : ('664dfe22898c36c159e28bc8' as const);
11
13
  // : ('6601955b8b0024600a917079' as const);
12
14
  // : ('6462a088a7ace142bb6d7e9b' as const);
13
15
 
@@ -71,6 +73,18 @@ export const SUPPORT_SPOOLS = [
71
73
  'svsui',
72
74
  ] as const;
73
75
 
76
+ export const SUPPORT_SCOIN = [
77
+ 'ssui',
78
+ 'susdc',
79
+ 'susdt',
80
+ 'safsui',
81
+ 'shasui',
82
+ 'svsui',
83
+ 'seth',
84
+ 'ssca',
85
+ 'scetus',
86
+ ] as const;
87
+
74
88
  export const SUPPORT_SPOOLS_REWARDS = ['sui'] as const;
75
89
 
76
90
  export const SUPPORT_BORROW_INCENTIVE_POOLS = [
@@ -1,17 +1,7 @@
1
- import type {
2
- SupportCoinDecimals,
3
- AssetCoins,
4
- MarketCoins,
5
- StakeMarketCoins,
6
- StakeRewardCoins,
7
- BorrowIncentiveRewardCoins,
8
- AssetCoinIds,
9
- WormholeCoinIds,
10
- VoloCoinIds,
11
- } from '../types';
1
+ import type * as types from '../types';
12
2
  import { IS_VE_SCA_TEST } from './common';
13
3
 
14
- export const coinDecimals: SupportCoinDecimals = {
4
+ export const coinDecimals: types.SupportCoinDecimals = {
15
5
  eth: 8,
16
6
  btc: 8,
17
7
  usdc: 6,
@@ -38,7 +28,7 @@ export const coinDecimals: SupportCoinDecimals = {
38
28
  ssca: 9,
39
29
  };
40
30
 
41
- export const assetCoins: AssetCoins = {
31
+ export const assetCoins: types.AssetCoins = {
42
32
  eth: 'eth',
43
33
  btc: 'btc',
44
34
  usdc: 'usdc',
@@ -53,7 +43,7 @@ export const assetCoins: AssetCoins = {
53
43
  sca: 'sca',
54
44
  };
55
45
 
56
- export const marketCoins: MarketCoins = {
46
+ export const marketCoins: types.MarketCoins = {
57
47
  seth: 'seth',
58
48
  sbtc: 'sbtc',
59
49
  susdc: 'susdc',
@@ -68,7 +58,19 @@ export const marketCoins: MarketCoins = {
68
58
  ssca: 'ssca',
69
59
  };
70
60
 
71
- export const stakeMarketCoins: StakeMarketCoins = {
61
+ export const sCoins: types.SCoins = {
62
+ seth: 'seth',
63
+ susdc: 'susdc',
64
+ susdt: 'susdt',
65
+ ssui: 'ssui',
66
+ scetus: 'scetus',
67
+ safsui: 'safsui',
68
+ shasui: 'shasui',
69
+ svsui: 'svsui',
70
+ ssca: 'ssca',
71
+ };
72
+
73
+ export const stakeMarketCoins: types.StakeMarketCoins = {
72
74
  seth: 'seth',
73
75
  ssui: 'ssui',
74
76
  susdc: 'susdc',
@@ -79,7 +81,7 @@ export const stakeMarketCoins: StakeMarketCoins = {
79
81
  svsui: 'svsui',
80
82
  };
81
83
 
82
- export const spoolRewardCoins: StakeRewardCoins = {
84
+ export const spoolRewardCoins: types.StakeRewardCoins = {
83
85
  seth: 'sui',
84
86
  ssui: 'sui',
85
87
  susdc: 'sui',
@@ -90,7 +92,7 @@ export const spoolRewardCoins: StakeRewardCoins = {
90
92
  svsui: 'sui',
91
93
  };
92
94
 
93
- export const borrowIncentiveRewardCoins: BorrowIncentiveRewardCoins = {
95
+ export const borrowIncentiveRewardCoins: types.BorrowIncentiveRewardCoins = {
94
96
  sui: ['sui', 'sca'],
95
97
  usdc: ['sui', 'sca'],
96
98
  usdt: ['sui', 'sca'],
@@ -101,7 +103,7 @@ export const borrowIncentiveRewardCoins: BorrowIncentiveRewardCoins = {
101
103
  eth: ['sui'],
102
104
  };
103
105
 
104
- export const coinIds: AssetCoinIds = {
106
+ export const coinIds: types.AssetCoinIds = {
105
107
  sui: '0x0000000000000000000000000000000000000000000000000000000000000002',
106
108
  eth: '0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5',
107
109
  btc: '0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881',
@@ -118,7 +120,7 @@ export const coinIds: AssetCoinIds = {
118
120
  : '0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6',
119
121
  };
120
122
 
121
- export const wormholeCoinIds: WormholeCoinIds = {
123
+ export const wormholeCoinIds: types.WormholeCoinIds = {
122
124
  eth: '0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5',
123
125
  btc: '0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881',
124
126
  usdc: '0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf',
@@ -127,6 +129,82 @@ export const wormholeCoinIds: WormholeCoinIds = {
127
129
  sol: '0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8',
128
130
  };
129
131
 
130
- export const voloCoinIds: VoloCoinIds = {
132
+ export const voloCoinIds: types.VoloCoinIds = {
131
133
  vsui: '0x549e8b69270defbfafd4f94e17ec44cdbdd99820b33bda2278dea3b9a32d3f55',
132
134
  };
135
+
136
+ // PROD VERSION
137
+ export const sCoinIds: types.SCoinIds = {
138
+ ssui: '0xaafc4f740de0dd0dde642a31148fb94517087052f19afb0f7bed1dc41a50c77b::scallop_sui::SCALLOP_SUI',
139
+ scetus:
140
+ '0xea346ce428f91ab007210443efcea5f5cdbbb3aae7e9affc0ca93f9203c31f0c::scallop_cetus::SCALLOP_CETUS',
141
+ ssca: '0x5ca17430c1d046fae9edeaa8fd76c7b4193a00d764a0ecfa9418d733ad27bc1e::scallop_sca::SCALLOP_SCA',
142
+ susdc:
143
+ '0xad4d71551d31092230db1fd482008ea42867dbf27b286e9c70a79d2a6191d58d::scallop_wormhole_usdc::SCALLOP_WORMHOLE_USDC',
144
+ susdt:
145
+ '0xe6e5a012ec20a49a3d1d57bd2b67140b96cd4d3400b9d79e541f7bdbab661f95::scallop_wormhole_usdt::SCALLOP_WORMHOLE_USDT',
146
+ seth: '0x67540ceb850d418679e69f1fb6b2093d6df78a2a699ffc733f7646096d552e9b::scallop_wormhole_eth::SCALLOP_WORMHOLE_ETH',
147
+ safsui:
148
+ '0x00671b1fa2a124f5be8bdae8b91ee711462c5d9e31bda232e70fd9607b523c88::scallop_af_sui::SCALLOP_AF_SUI',
149
+ shasui:
150
+ '0x9a2376943f7d22f88087c259c5889925f332ca4347e669dc37d54c2bf651af3c::scallop_ha_sui::SCALLOP_HA_SUI',
151
+ svsui:
152
+ '0xe1a1cc6bcf0001a015eab84bcc6713393ce20535f55b8b6f35c142e057a25fbe::scallop_v_sui::SCALLOP_V_SUI',
153
+ } as const;
154
+
155
+ // TEST VERSION
156
+ // export const sCoinIds: types.SCoinIds = {
157
+ // ssui: '0xfac769100bccc0caebcf4f4e2d00ac2f8883f07f724be28940df90605f5e7e9a::scallop_sui::SCALLOP_SUI',
158
+ // scetus:
159
+ // '0x8b71e6d323ed78515af2bead13bf3d0da1562ba4a99234eb7c4f14fd39ef0427::scallop_cetus::SCALLOP_CETUS',
160
+ // ssca: '0x0a9d3c6c9af9f6e8def82921541bcbd17f73ed31bed3adcb684f2a4c267e42f0::scallop_sca::SCALLOP_SCA',
161
+ // susdc:
162
+ // '0xaedc3ab75db8680b81a755015fa90124d217be93457b893c05bac033817defaf::scallop_wormhole_usdc::SCALLOP_WORMHOLE_USDC',
163
+ // susdt:
164
+ // '0xbf02fc87ddc104b342ad8414c85ceadf5b0c823c055a06fb0ed776272c01a52a::scallop_wormhole_usdt::SCALLOP_WORMHOLE_USDT',
165
+ // seth: '0x27d54f43e3eda701be56b82e5756e41c84467cd202f5cf713d5f9e45a9f1b6bc::scallop_wormhole_eth::SCALLOP_WORMHOLE_ETH',
166
+ // safsui:
167
+ // '0xb75b46d975d8d80670b53a6bee90baaa8ce2e0b7d397f079447d641eef6b44ad::scallop_af_sui::SCALLOP_AF_SUI',
168
+ // shasui:
169
+ // '0xd973a723874e2c7cde196602a79155a1343a933f8cf87d9b1bb7408bc1acbc58::scallop_ha_sui::SCALLOP_HA_SUI',
170
+ // svsui:
171
+ // '0x97023a317320c4498cc4cd239dd02fd30c28246e5e8f81325d63f2bd8d70f6b3::scallop_v_sui::SCALLOP_V_SUI',
172
+ // } as const;
173
+
174
+ // export const sCoinTreasuryCaps: types.SCoinTreasuryCaps = {
175
+ // ssui: '0xd2c65de0495a060114c6ecc45f5573b8a4519e9538b93075aa2116e94209db55',
176
+ // scetus: '0x24ba523450908240698628d554d910ed9aba6ff6c73ad735ee571cebd833fc4c',
177
+ // ssca: '0xda98f336dd1d5827bfaee0fda75c9618d4c730df79623baca7b13037b514643d',
178
+ // susdc: '0xd74d585df52333ac463746225b2ae1a48d7f6b037ee97dd43f746e0f6b6a4723',
179
+ // susdt: '0x7bc99da1e37d838c49b018ed061f115d26c364a6b1a25059aebb372dfadba753',
180
+ // seth: '0xc2a793057fffb91be6cb026cd35e1fc51d5fdd9fae73d2c1cde19ddde0463c2d',
181
+ // safsui: '0x20df47fa386c9948e255072df3f4e79e32921846770a0d2e01eb4336b5581aa9',
182
+ // shasui: '0x5bb658edbd3f905494862e4b69101922fb3bea9ac5b035c32e66ec3ee1f4e685',
183
+ // svsui: '0x3718f9350999e8be4c20064eaf874f470de4f36e3a7ca580fcd94d640a128936',
184
+ // };
185
+
186
+ // PROD VERSION
187
+ // export const sCoinConverterTreasury: types.SCoinConverterTreasury = {
188
+ // ssui: '0x5fe57239383098ef93f75912b145e5937a1b3fc78451c78bb1964bc8c4189d5c',
189
+ // scetus: '0x065ab504806e2a013308de3d60940d9550d39ef83c8a3882f5cbc9019388eeee',
190
+ // ssca: '0xa9aa774956ec3ee0cafef4084e16e37aacd15564f6e6eb646a63bd96cb959b27',
191
+ // susdc: '0x2081a7fe4847aef473729bd6755686a7f232db46a2ff1be187fca961a6767363',
192
+ // susdt: '0xc19b204eee6306c794d4d8c1b02b6f58862a52d2cdfc2f580131abd967292450',
193
+ // seth: '0x0517d6380ff1687faf0385ccf758c815f114399e408d8b761fbcac4a3bf32495',
194
+ // safsui: '0x088d0c107a29f250ead75e561a0f5039397da69fffd09392b33939ddc191cd31',
195
+ // shasui: '0xa883cc4c09d51d3c3713124efce616a343a1158d3430cb42147488321db22fcf',
196
+ // svsui: '0x8bd37d8aee69f17c5bb54c77d0d40ff6020b7b4a2c295ed455a79f72fb1c07e7',
197
+ // };
198
+
199
+ // TEST VERSION
200
+ // export const sCoinConverterTreasury: types.SCoinConverterTreasury = {
201
+ // ssui: '0x9cb4551b36c17d37e19d700147fa819ea1c487ff8bcf18374de2cceb2e9d4845',
202
+ // scetus: '0xd786f4b2d26278cc7911a3445b1b085eab60f269ef9dbb6b87e803d52f155003',
203
+ // ssca: '0xe818636d1d6c46d6ea1a2dce9d94696d7cbc18ce27451b603eeaa47aba8d75e0',
204
+ // susdc: '0xfc6971648f867f7fd6928d1b873af71577e2eaf2c7543ef8bc82c431d833ae78',
205
+ // susdt: '0xb9593e2c3a0ba796ee815012b75ae46468ea78cda0188b9ac6816efe65503521',
206
+ // seth: '0x032b4c8fac94c038dbe986f7587e9b1e4ef580b5ee06d2ef249d85459b7ef05d',
207
+ // safsui: '0x21450ef0570ef3d224ffa3b873ab802e439ece7b93cc7efad10ae0c1e3b3fcfe',
208
+ // shasui: '0xf822fc1402207e47d2e3ba8ff6e1e594bf1de777dc5ebd2744619cd2726e3b0d',
209
+ // svsui: '0x327114f0bf3559d7e2de10282147ed76a236c7c6775029165c4db09a6062ead6',
210
+ // };
@@ -2,20 +2,28 @@ import { AddressesInterface } from 'src/types';
2
2
 
3
3
  export const TEST_ADDRESSES: AddressesInterface = {
4
4
  core: {
5
+ // version:
6
+ // '0x07871c4b3c847a0f674510d4978d5cf6f960452795e8ff6f189fd2088a3f6ac7',
5
7
  version:
6
- '0x07871c4b3c847a0f674510d4978d5cf6f960452795e8ff6f189fd2088a3f6ac7',
8
+ '0x6156d5cd1538bec8a167a40fe1209a4ec9cf8137921fe0a697f191ac561f0b09',
7
9
  versionCap:
8
10
  '0x590a4011cb649b3878f3ea14b3a78674642a9548d79b7e091ef679574b158a07',
11
+ // object:
12
+ // '0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf',
9
13
  object:
10
- '0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf',
14
+ '0x87ddec2984645dbbe2403a509cc6edf393a43acdba9b77d45da2bcbefcf733c1',
15
+ // market:
16
+ // '0xa757975255146dc9686aa823b7838b507f315d704f428cbadad2f4ea061939d9',
11
17
  market:
12
- '0xa757975255146dc9686aa823b7838b507f315d704f428cbadad2f4ea061939d9',
18
+ '0x8606ed145cc887985b8ed793f7753ff5dc762a42c379dac035f568e1bac58490',
13
19
  adminCap:
14
20
  '0x09689d018e71c337d9db6d67cbca06b74ed92196103624028ccc3ecea411777c',
15
21
  coinDecimalsRegistry:
16
22
  '0x200abe9bf19751cc566ae35aa58e2b7e4ff688fc1130f8d8909ea09bc137d668',
23
+ // obligationAccessStore:
24
+ // '0x733e30b7c94d619d78cb8f5bc4bfbb759ced9a531239028caabb2474e5be59c9',
17
25
  obligationAccessStore:
18
- '0x733e30b7c94d619d78cb8f5bc4bfbb759ced9a531239028caabb2474e5be59c9',
26
+ '0x48b472d68ca910c45f7f3b6c26836b6aa6d2569810d94b1b939023da05ae0a23',
19
27
  coins: {
20
28
  cetus: {
21
29
  id: '0x06864a6f921804860930db6ddbe2e16acdf8504495ea7481637a1c8b9a8fe54b',
@@ -241,17 +249,27 @@ export const TEST_ADDRESSES: AddressesInterface = {
241
249
  '0x3f203f6fff6a69d151e4f1cd931f22b68c489ef2759765662fc7baf673943c9e',
242
250
  },
243
251
  protocol: {
244
- id: '0x6e641f0dca8aedab3101d047e96439178f16301bf0b57fe8745086ff1195eb3e',
252
+ id: '0x87ddec2984645dbbe2403a509cc6edf393a43acdba9b77d45da2bcbefcf733c1',
245
253
  upgradeCap:
246
254
  '0x38527d154618d1fd5a644b90717fe07cf0e9f26b46b63e9568e611a3f86d5c1a',
247
255
  },
256
+ // protocol: {
257
+ // id: '0x6e641f0dca8aedab3101d047e96439178f16301bf0b57fe8745086ff1195eb3e',
258
+ // upgradeCap:
259
+ // '0x38527d154618d1fd5a644b90717fe07cf0e9f26b46b63e9568e611a3f86d5c1a',
260
+ // },
248
261
  protocolWhitelist: {
249
262
  id: '0x4c262d9343dac53ecb28f482a2a3f62c73d0ebac5b5f03d57383d56ff219acdf',
250
263
  upgradeCap:
251
264
  '0x4a5e88a75039b00988f633f811f58117f31b8627a46bf822aa114d9010049449',
252
265
  },
266
+ // query: {
267
+ // id: '0xb8d603a39114a5efef3dd0bf84df0bed1be1fbd39b78b7dd6e8a61ccc5e6006f',
268
+ // upgradeCap:
269
+ // '0x0d535c35f608b9b01b7ccce11acf43b1dd80c1b72bf8b541744a6e28e8d2745f',
270
+ // },
253
271
  query: {
254
- id: '0xb8d603a39114a5efef3dd0bf84df0bed1be1fbd39b78b7dd6e8a61ccc5e6006f',
272
+ id: '0xe4f9d62d17746d5b9dbf0d5557747430021a71575780b515161210cdba0a4c1c',
255
273
  upgradeCap:
256
274
  '0x0d535c35f608b9b01b7ccce11acf43b1dd80c1b72bf8b541744a6e28e8d2745f',
257
275
  },
@@ -271,11 +289,14 @@ export const TEST_ADDRESSES: AddressesInterface = {
271
289
  },
272
290
  },
273
291
  spool: {
274
- id: '0x7c4fdabe81c31b19a45d1e572a52a539997a90903fbb5bfab71480abe0fa62c3',
292
+ // id: '0x7c4fdabe81c31b19a45d1e572a52a539997a90903fbb5bfab71480abe0fa62c3',
293
+ id: '0x1742655fe5872dfa6456673f9e38612a4965e6979e6cd7696a7f1225f28bae21',
275
294
  adminCap:
276
295
  '0xdd8a047cbbf802bfcde5288b8ef1910965d789cc614da11d39af05fca0bd020a',
296
+ // object:
297
+ // '0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a',
277
298
  object:
278
- '0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a',
299
+ '0x1742655fe5872dfa6456673f9e38612a4965e6979e6cd7696a7f1225f28bae21',
279
300
  pools: {
280
301
  seth: {
281
302
  id: '0xeec40beccb07c575bebd842eeaabb835f77cd3dab73add433477e57f583a6787',
@@ -283,19 +304,25 @@ export const TEST_ADDRESSES: AddressesInterface = {
283
304
  '0x957de68a18d87817de8309b30c1ec269a4d87ae513abbeed86b5619cb9ce1077',
284
305
  },
285
306
  ssui: {
286
- id: '0x4f0ba970d3c11db05c8f40c64a15b6a33322db3702d634ced6536960ab6f3ee4',
307
+ // id: '0x4f0ba970d3c11db05c8f40c64a15b6a33322db3702d634ced6536960ab6f3ee4',
308
+ id: '0xb9617f83c06ebdeac0a8834782b1015e1cc7ea23739e30c132c4bfb95c37a579',
287
309
  rewardPoolId:
288
- '0x162250ef72393a4ad3d46294c4e1bdfcb03f04c869d390e7efbfc995353a7ee9',
310
+ // '0x162250ef72393a4ad3d46294c4e1bdfcb03f04c869d390e7efbfc995353a7ee9',
311
+ '0xc3206071a8d43212efb6e3b5504f2321f8df97ab122b466c0bc7cfdf398dc13a',
289
312
  },
290
313
  susdc: {
291
- id: '0x4ace6648ddc64e646ba47a957c562c32c9599b3bba8f5ac1aadb2ae23a2f8ca0',
314
+ // id: '0x4ace6648ddc64e646ba47a957c562c32c9599b3bba8f5ac1aadb2ae23a2f8ca0',
315
+ id: '0xf1b383b9cf2e9f515fc69567df1053098f273849d09cd84b0278a773429bd2b2',
292
316
  rewardPoolId:
293
- '0xf4268cc9b9413b9bfe09e8966b8de650494c9e5784bf0930759cfef4904daff8',
317
+ // '0xf4268cc9b9413b9bfe09e8966b8de650494c9e5784bf0930759cfef4904daff8',
318
+ '0xc71c53ee6505d928ba15bea4fe4f45d98c9c31eced94b72d00a7827d4b7ba3ff',
294
319
  },
295
320
  susdt: {
296
- id: '0xcb328f7ffa7f9342ed85af3fdb2f22919e1a06dfb2f713c04c73543870d7548f',
321
+ // id: '0xcb328f7ffa7f9342ed85af3fdb2f22919e1a06dfb2f713c04c73543870d7548f',
322
+ id: '0xb5567dfa5c7fc17a249e959732664c50713dd8c23db1a11376b27df800c17418',
297
323
  rewardPoolId:
298
- '0x2c9f934d67a5baa586ceec2cc24163a2f049a6af3d5ba36b84d8ac40f25c4080',
324
+ // '0x2c9f934d67a5baa586ceec2cc24163a2f049a6af3d5ba36b84d8ac40f25c4080',
325
+ '0x60768b0687ff0235e376a039709a683e4c436098785e473b67b32dbab47b69ab',
299
326
  },
300
327
  scetus: {
301
328
  id: '0xac1bb13bf4472a637c18c2415fb0e3c1227ea2bcf35242e50563c98215bd298e',
@@ -303,19 +330,25 @@ export const TEST_ADDRESSES: AddressesInterface = {
303
330
  '0x6835c1224126a45086fc6406adc249e3f30df18d779ca4f4e570e38716a17f3f',
304
331
  },
305
332
  safsui: {
306
- id: '0xeedf438abcaa6ce4d9625ffca110920592d5867e4c5637d84ad9f466c4feb800',
333
+ // id: '0xeedf438abcaa6ce4d9625ffca110920592d5867e4c5637d84ad9f466c4feb800',
334
+ id: '0xc568bb4c991258e839aa54802ecda04fcd9838c826bc3b42b40af81b23c458c8',
307
335
  rewardPoolId:
308
- '0x89255a2f86ed7fbfef35ab8b7be48cc7667015975be2685dd9a55a9a64baf76e',
336
+ // '0x89255a2f86ed7fbfef35ab8b7be48cc7667015975be2685dd9a55a9a64baf76e',
337
+ '0x389a3cbeda742b918941bb24fd00e077bad3367484394d6234f8209b9a6aa03d',
309
338
  },
310
339
  shasui: {
311
- id: '0xa6148bc1b623e936d39a952ceb5bea79e8b37228a8f595067bf1852efd3c34aa',
340
+ // id: '0xa6148bc1b623e936d39a952ceb5bea79e8b37228a8f595067bf1852efd3c34aa',
341
+ id: '0x93f3f4499bf89f2d05ddc1f8b15f51701a7c6c4d0ac0b9c3bc99462cbbd8e321',
312
342
  rewardPoolId:
313
- '0x6f3563644d3e2ef13176dbf9d865bd93479df60ccbe07b7e66db57f6309f5a66',
343
+ // '0x6f3563644d3e2ef13176dbf9d865bd93479df60ccbe07b7e66db57f6309f5a66',
344
+ '0x94cee1be7f5ff34193f3aabef0b14142cb28af4d905fe487a9a7d85a15edb6aa',
314
345
  },
315
346
  svsui: {
316
- id: '0x69ce8e537e750a95381e6040794afa5ab1758353a1a2e1de7760391b01f91670',
347
+ // id: '0x69ce8e537e750a95381e6040794afa5ab1758353a1a2e1de7760391b01f91670',
348
+ id: '0xa970e9087f80cb59e9299b8e7af7175d977ad6c9af0322aa4440e138fbd7ae00',
317
349
  rewardPoolId:
318
- '0xbca914adce058ad0902c7f3cfcd698392a475f00dcfdc3f76001d0370b98777a',
350
+ // '0xbca914adce058ad0902c7f3cfcd698392a475f00dcfdc3f76001d0370b98777a',
351
+ '0x38eee9699c4fc132a6623e54b865f047df4fc6eb83af807300f44e8f4b235ff0',
319
352
  },
320
353
  },
321
354
  config: '',
@@ -352,8 +385,10 @@ export const TEST_ADDRESSES: AddressesInterface = {
352
385
  '0x962cb903d8d7346190c5204785ccbb91b61086aa764f674c8145df82335cf83e',
353
386
  tiersTableId:
354
387
  '0xeac755a7a8b7798530905ac79e8c114f19d0f130f6eab012954f08faac29c75d',
388
+ // authorizedWitnessList:
389
+ // '0xf21b0ed043c9bb70842c0129159f4943dbcc3c9ef2f2f808af65f8be25cfd20e',
355
390
  authorizedWitnessList:
356
- '0xf21b0ed043c9bb70842c0129159f4943dbcc3c9ef2f2f808af65f8be25cfd20e',
391
+ '0x9d6223dc52015b8a3986a573590ef2af8f1b8f3e4685513888c052f001b87e7f',
357
392
  version:
358
393
  '0x1bd4b7285f72e11c316b828c7c47b3f4da18dcec9f9b3dba6d8629cbb6f93e5e',
359
394
  },
@@ -380,4 +415,63 @@ export const TEST_ADDRESSES: AddressesInterface = {
380
415
  userRewardTableId:
381
416
  '0x748a80395849ed37db1b0e14f2ab5d1d96458d2359ab3a84eb079d0f4ac7cf2e',
382
417
  },
418
+ scoin: {
419
+ id: '0xad2ca2aa5089df94bb2d444d5eb3520378c2f2dfb3a0bd2a2c994145ac4b0a53',
420
+ coins: {
421
+ ssui: {
422
+ coinType:
423
+ '0xfac769100bccc0caebcf4f4e2d00ac2f8883f07f724be28940df90605f5e7e9a::scallop_sui::SCALLOP_SUI',
424
+ treasury:
425
+ '0x9cb4551b36c17d37e19d700147fa819ea1c487ff8bcf18374de2cceb2e9d4845',
426
+ },
427
+ scetus: {
428
+ coinType:
429
+ '0x8b71e6d323ed78515af2bead13bf3d0da1562ba4a99234eb7c4f14fd39ef0427::scallop_cetus::SCALLOP_CETUS',
430
+ treasury:
431
+ '0xd786f4b2d26278cc7911a3445b1b085eab60f269ef9dbb6b87e803d52f155003',
432
+ },
433
+ ssca: {
434
+ coinType:
435
+ '0x0a9d3c6c9af9f6e8def82921541bcbd17f73ed31bed3adcb684f2a4c267e42f0::scallop_sca::SCALLOP_SCA',
436
+ treasury:
437
+ '0xe818636d1d6c46d6ea1a2dce9d94696d7cbc18ce27451b603eeaa47aba8d75e0',
438
+ },
439
+ susdc: {
440
+ coinType:
441
+ '0xaedc3ab75db8680b81a755015fa90124d217be93457b893c05bac033817defaf::scallop_wormhole_usdc::SCALLOP_WORMHOLE_USDC',
442
+ treasury:
443
+ '0xfc6971648f867f7fd6928d1b873af71577e2eaf2c7543ef8bc82c431d833ae78',
444
+ },
445
+ susdt: {
446
+ coinType:
447
+ '0xbf02fc87ddc104b342ad8414c85ceadf5b0c823c055a06fb0ed776272c01a52a::scallop_wormhole_usdt::SCALLOP_WORMHOLE_USDT',
448
+ treasury:
449
+ '0xb9593e2c3a0ba796ee815012b75ae46468ea78cda0188b9ac6816efe65503521',
450
+ },
451
+ seth: {
452
+ coinType:
453
+ '0x27d54f43e3eda701be56b82e5756e41c84467cd202f5cf713d5f9e45a9f1b6bc::scallop_wormhole_eth::SCALLOP_WORMHOLE_ETH',
454
+ treasury:
455
+ '0x032b4c8fac94c038dbe986f7587e9b1e4ef580b5ee06d2ef249d85459b7ef05d',
456
+ },
457
+ safsui: {
458
+ coinType:
459
+ '0xb75b46d975d8d80670b53a6bee90baaa8ce2e0b7d397f079447d641eef6b44ad::scallop_af_sui::SCALLOP_AF_SUI',
460
+ treasury:
461
+ '0x21450ef0570ef3d224ffa3b873ab802e439ece7b93cc7efad10ae0c1e3b3fcfe',
462
+ },
463
+ shasui: {
464
+ coinType:
465
+ '0xd973a723874e2c7cde196602a79155a1343a933f8cf87d9b1bb7408bc1acbc58::scallop_ha_sui::SCALLOP_HA_SUI',
466
+ treasury:
467
+ '0xf822fc1402207e47d2e3ba8ff6e1e594bf1de777dc5ebd2744619cd2726e3b0d',
468
+ },
469
+ svsui: {
470
+ coinType:
471
+ '0x97023a317320c4498cc4cd239dd02fd30c28246e5e8f81325d63f2bd8d70f6b3::scallop_v_sui::SCALLOP_V_SUI',
472
+ treasury:
473
+ '0x327114f0bf3559d7e2de10282147ed76a236c7c6775029165c4db09a6062ead6ƒ',
474
+ },
475
+ },
476
+ },
383
477
  };
@@ -1,4 +1,4 @@
1
- import { API_BASE_URL, IS_VE_SCA_TEST } from '../constants';
1
+ import { API_BASE_URL, USE_TEST_ADDRESS } from '../constants';
2
2
  import type { NetworkType } from '@scallop-io/sui-kit';
3
3
  import type {
4
4
  ScallopAddressParams,
@@ -309,6 +309,47 @@ const EMPTY_ADDRESSES: AddressesInterface = {
309
309
  rewardPool: '',
310
310
  userRewardTableId: '',
311
311
  },
312
+ scoin: {
313
+ id: '',
314
+ coins: {
315
+ ssui: {
316
+ coinType: '',
317
+ treasury: '',
318
+ },
319
+ scetus: {
320
+ coinType: '',
321
+ treasury: '',
322
+ },
323
+ ssca: {
324
+ coinType: '',
325
+ treasury: '',
326
+ },
327
+ susdc: {
328
+ coinType: '',
329
+ treasury: '',
330
+ },
331
+ susdt: {
332
+ coinType: '',
333
+ treasury: '',
334
+ },
335
+ seth: {
336
+ coinType: '',
337
+ treasury: '',
338
+ },
339
+ safsui: {
340
+ coinType: '',
341
+ treasury: '',
342
+ },
343
+ shasui: {
344
+ coinType: '',
345
+ treasury: '',
346
+ },
347
+ svsui: {
348
+ coinType: '',
349
+ treasury: '',
350
+ },
351
+ },
352
+ },
312
353
  };
313
354
  /**
314
355
  * @description
@@ -345,10 +386,10 @@ export class ScallopAddress {
345
386
  if (auth) this._auth = auth;
346
387
  this._id = id;
347
388
  this._network = network || 'mainnet';
348
- this._addressesMap = IS_VE_SCA_TEST
389
+ this._addressesMap = USE_TEST_ADDRESS
349
390
  ? new Map([['mainnet', TEST_ADDRESSES]])
350
391
  : new Map();
351
- if (IS_VE_SCA_TEST) this._currentAddresses = TEST_ADDRESSES;
392
+ if (USE_TEST_ADDRESS) this._currentAddresses = TEST_ADDRESSES;
352
393
  }
353
394
 
354
395
  /**