@chainflip/sdk 1.5.1-react-native.2 → 1.5.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.
@@ -1,7 +1,224 @@
1
- import { getInternalAsset, __name, __publicField, ChainflipNetworks, Chains, InternalAssets } from './chunk-EBZERIHA.mjs';
2
1
  import { constants, HttpClient } from '@chainflip/rpc';
3
2
  import { Interface, Contract } from 'ethers';
4
3
 
4
+ var __defProp = Object.defineProperty;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
8
+
9
+ // ../shared/src/enums.ts
10
+ var arrayToMap = /* @__PURE__ */ __name((array) => Object.fromEntries(array.map((key) => [
11
+ key,
12
+ key
13
+ ])), "arrayToMap");
14
+ var InternalAssets = arrayToMap([
15
+ "Flip",
16
+ "Usdc",
17
+ "Dot",
18
+ "Eth",
19
+ "Btc",
20
+ "Usdt",
21
+ "ArbUsdc",
22
+ "ArbEth"
23
+ ]);
24
+ var Chains = arrayToMap([
25
+ "Bitcoin",
26
+ "Ethereum",
27
+ "Polkadot",
28
+ "Arbitrum"
29
+ ]);
30
+ var Assets = arrayToMap([
31
+ "FLIP",
32
+ "USDC",
33
+ "DOT",
34
+ "ETH",
35
+ "BTC",
36
+ "USDT"
37
+ ]);
38
+ var ChainflipNetworks = arrayToMap([
39
+ "backspin",
40
+ "sisyphos",
41
+ "perseverance",
42
+ "mainnet"
43
+ ]);
44
+ var isTestnet = /* @__PURE__ */ __name((network) => network !== ChainflipNetworks.mainnet, "isTestnet");
45
+ var assetConstants = {
46
+ [InternalAssets.Eth]: {
47
+ chain: Chains.Ethereum,
48
+ asset: Assets.ETH,
49
+ name: "Ether",
50
+ decimals: 18,
51
+ contractId: 1
52
+ },
53
+ [InternalAssets.Flip]: {
54
+ chain: Chains.Ethereum,
55
+ asset: Assets.FLIP,
56
+ name: "FLIP",
57
+ decimals: 18,
58
+ contractId: 2
59
+ },
60
+ [InternalAssets.Usdc]: {
61
+ chain: Chains.Ethereum,
62
+ asset: Assets.USDC,
63
+ name: "USDC",
64
+ decimals: 6,
65
+ contractId: 3
66
+ },
67
+ [InternalAssets.Usdt]: {
68
+ chain: Chains.Ethereum,
69
+ asset: Assets.USDT,
70
+ name: "USDT",
71
+ decimals: 6,
72
+ contractId: 8
73
+ },
74
+ [InternalAssets.Dot]: {
75
+ chain: Chains.Polkadot,
76
+ asset: Assets.DOT,
77
+ name: "Polkadot",
78
+ decimals: 10,
79
+ contractId: 4
80
+ },
81
+ [InternalAssets.Btc]: {
82
+ chain: Chains.Bitcoin,
83
+ asset: Assets.BTC,
84
+ name: "Bitcoin",
85
+ decimals: 8,
86
+ contractId: 5
87
+ },
88
+ [InternalAssets.ArbEth]: {
89
+ chain: Chains.Arbitrum,
90
+ asset: Assets.ETH,
91
+ name: "Arbitrum Ether",
92
+ decimals: 18,
93
+ contractId: 6
94
+ },
95
+ [InternalAssets.ArbUsdc]: {
96
+ chain: Chains.Arbitrum,
97
+ asset: Assets.USDC,
98
+ name: "Arbitrum USDC",
99
+ decimals: 6,
100
+ contractId: 7
101
+ }
102
+ };
103
+ var chainConstants = {
104
+ [Chains.Ethereum]: {
105
+ assets: [
106
+ Assets.ETH,
107
+ Assets.FLIP,
108
+ Assets.USDC,
109
+ Assets.USDT
110
+ ],
111
+ gasAsset: Assets.ETH,
112
+ contractId: 1,
113
+ blockTimeSeconds: 12
114
+ },
115
+ [Chains.Polkadot]: {
116
+ assets: [
117
+ Assets.DOT
118
+ ],
119
+ gasAsset: Assets.DOT,
120
+ contractId: 2,
121
+ blockTimeSeconds: 6
122
+ },
123
+ [Chains.Bitcoin]: {
124
+ assets: [
125
+ Assets.BTC
126
+ ],
127
+ gasAsset: Assets.BTC,
128
+ contractId: 3,
129
+ blockTimeSeconds: 10 * 60
130
+ },
131
+ [Chains.Arbitrum]: {
132
+ assets: [
133
+ Assets.ETH,
134
+ Assets.USDC
135
+ ],
136
+ gasAsset: Assets.ETH,
137
+ contractId: 4,
138
+ blockTimeSeconds: 0.26
139
+ }
140
+ };
141
+ function isValidAssetAndChain(assetAndChain) {
142
+ const { asset, chain } = assetAndChain;
143
+ if (!(chain in Chains)) return false;
144
+ const validAssets = chainConstants[chain].assets;
145
+ return validAssets.includes(asset);
146
+ }
147
+ __name(isValidAssetAndChain, "isValidAssetAndChain");
148
+ var readChainAssetValue = /* @__PURE__ */ __name((map, asset) => {
149
+ const { chain, asset: symbol } = assetConstants[asset];
150
+ const chainValues = map[chain];
151
+ return chainValues[symbol];
152
+ }, "readChainAssetValue");
153
+ function getInternalAsset(asset, assert2 = true) {
154
+ if (!isValidAssetAndChain(asset)) {
155
+ if (assert2) {
156
+ throw new Error(`invalid asset and chain combination: ${JSON.stringify(asset)}`);
157
+ }
158
+ return null;
159
+ }
160
+ const map = {
161
+ [Chains.Ethereum]: {
162
+ [Assets.USDC]: InternalAssets.Usdc,
163
+ [Assets.FLIP]: InternalAssets.Flip,
164
+ [Assets.ETH]: InternalAssets.Eth,
165
+ [Assets.USDT]: InternalAssets.Usdt
166
+ },
167
+ [Chains.Bitcoin]: {
168
+ [Assets.BTC]: InternalAssets.Btc
169
+ },
170
+ [Chains.Polkadot]: {
171
+ [Assets.DOT]: InternalAssets.Dot
172
+ },
173
+ [Chains.Arbitrum]: {
174
+ [Assets.USDC]: InternalAssets.ArbUsdc,
175
+ [Assets.ETH]: InternalAssets.ArbEth
176
+ }
177
+ };
178
+ const chain = map[asset.chain];
179
+ return chain[asset.asset];
180
+ }
181
+ __name(getInternalAsset, "getInternalAsset");
182
+ function getInternalAssets({ srcAsset, srcChain, destAsset, destChain }, assert2 = true) {
183
+ return {
184
+ srcAsset: getInternalAsset({
185
+ asset: srcAsset,
186
+ chain: srcChain
187
+ }, assert2),
188
+ destAsset: getInternalAsset({
189
+ asset: destAsset,
190
+ chain: destChain
191
+ }, assert2)
192
+ };
193
+ }
194
+ __name(getInternalAssets, "getInternalAssets");
195
+ function getAssetAndChain(internalAsset, prefix) {
196
+ const { chain, asset } = assetConstants[internalAsset];
197
+ if (prefix) {
198
+ return {
199
+ [`${prefix}Asset`]: asset,
200
+ [`${prefix}Chain`]: chain
201
+ };
202
+ }
203
+ return {
204
+ chain,
205
+ asset
206
+ };
207
+ }
208
+ __name(getAssetAndChain, "getAssetAndChain");
209
+
210
+ // ../shared/src/guards.ts
211
+ var isString = /* @__PURE__ */ __name((value) => typeof value === "string", "isString");
212
+ var isNotNullish = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isNotNullish");
213
+ function assert(condition, message) {
214
+ if (condition) return;
215
+ const error = new Error(message);
216
+ if (error.stack) {
217
+ error.stack = error.stack.replace(/\n.+/, "\n");
218
+ }
219
+ throw error;
220
+ }
221
+ __name(assert, "assert");
5
222
  var camelCase = /* @__PURE__ */ __name((str) => str.replace(/_([a-z])/g, (_, char) => char.toUpperCase()), "camelCase");
6
223
  var camelCaseKeys = /* @__PURE__ */ __name((obj) => {
7
224
  if (typeof obj !== "object" || obj === null) return obj;
@@ -2049,9 +2266,7 @@ var ADDRESSES = {
2049
2266
  ARBUSDC_CONTRACT_ADDRESS: "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9",
2050
2267
  VAULT_CONTRACT_ADDRESS: "0xB7A5bd0345EF1Cc5E66bf61BdeC17D2461fBd968",
2051
2268
  STATE_CHAIN_GATEWAY_ADDRESS: "0xeEBe00Ac0756308ac4AaBfD76c05c4F3088B8883",
2052
- ARB_VAULT_CONTRACT_ADDRESS: "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",
2053
- // TODO(solana)
2054
- SOLUSDC_CONTRACT_ADDRESS: ""
2269
+ ARB_VAULT_CONTRACT_ADDRESS: "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512"
2055
2270
  },
2056
2271
  [ChainflipNetworks.sisyphos]: {
2057
2272
  FLIP_CONTRACT_ADDRESS: "0xcD079EAB6B5443b545788Fd210C8800FEADd87fa",
@@ -2060,8 +2275,7 @@ var ADDRESSES = {
2060
2275
  ARBUSDC_CONTRACT_ADDRESS: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d",
2061
2276
  VAULT_CONTRACT_ADDRESS: "0xa94d6b1853F3cb611Ed3cCb701b4fdA5a9DACe85",
2062
2277
  STATE_CHAIN_GATEWAY_ADDRESS: "0x1F7fE41C798cc7b1D34BdC8de2dDDA4a4bE744D9",
2063
- ARB_VAULT_CONTRACT_ADDRESS: "0x8155BdD48CD011e1118b51A1C82be020A3E5c2f2",
2064
- SOLUSDC_CONTRACT_ADDRESS: "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU"
2278
+ ARB_VAULT_CONTRACT_ADDRESS: "0x8155BdD48CD011e1118b51A1C82be020A3E5c2f2"
2065
2279
  },
2066
2280
  [ChainflipNetworks.perseverance]: {
2067
2281
  FLIP_CONTRACT_ADDRESS: "0xdC27c60956cB065D19F08bb69a707E37b36d8086",
@@ -2070,8 +2284,7 @@ var ADDRESSES = {
2070
2284
  ARBUSDC_CONTRACT_ADDRESS: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d",
2071
2285
  VAULT_CONTRACT_ADDRESS: "0x36eaD71325604DC15d35FAE584D7b50646D81753",
2072
2286
  STATE_CHAIN_GATEWAY_ADDRESS: "0xA34a967197Ee90BB7fb28e928388a573c5CFd099",
2073
- ARB_VAULT_CONTRACT_ADDRESS: "0x2bb150e6d4366A1BDBC4275D1F35892CD63F27e3",
2074
- SOLUSDC_CONTRACT_ADDRESS: "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU"
2287
+ ARB_VAULT_CONTRACT_ADDRESS: "0x2bb150e6d4366A1BDBC4275D1F35892CD63F27e3"
2075
2288
  },
2076
2289
  [ChainflipNetworks.mainnet]: {
2077
2290
  FLIP_CONTRACT_ADDRESS: "0x826180541412D574cf1336d22c0C0a287822678A",
@@ -2080,8 +2293,7 @@ var ADDRESSES = {
2080
2293
  ARBUSDC_CONTRACT_ADDRESS: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
2081
2294
  VAULT_CONTRACT_ADDRESS: "0xF5e10380213880111522dd0efD3dbb45b9f62Bcc",
2082
2295
  STATE_CHAIN_GATEWAY_ADDRESS: "0x6995Ab7c4D7F4B03f467Cf4c8E920427d9621DBd",
2083
- ARB_VAULT_CONTRACT_ADDRESS: "0x79001a5e762f3bEFC8e5871b42F6734e00498920",
2084
- SOLUSDC_CONTRACT_ADDRESS: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
2296
+ ARB_VAULT_CONTRACT_ADDRESS: "0x79001a5e762f3bEFC8e5871b42F6734e00498920"
2085
2297
  }
2086
2298
  };
2087
2299
 
@@ -2095,7 +2307,6 @@ function getTokenContractAddress(asset, network) {
2095
2307
  if (asset === InternalAssets.Usdc) return ADDRESSES[network].USDC_CONTRACT_ADDRESS;
2096
2308
  if (asset === InternalAssets.Usdt) return ADDRESSES[network].USDT_CONTRACT_ADDRESS;
2097
2309
  if (asset === InternalAssets.ArbUsdc) return ADDRESSES[network].ARBUSDC_CONTRACT_ADDRESS;
2098
- if (asset === InternalAssets.SolUsdc) return ADDRESSES[network].SOLUSDC_CONTRACT_ADDRESS;
2099
2310
  throw new Error(`No contract address for ${asset} on ${network}`);
2100
2311
  }
2101
2312
  __name(getTokenContractAddress, "getTokenContractAddress");
@@ -2127,4 +2338,4 @@ var getFlipBalance = /* @__PURE__ */ __name(async (network, signer) => {
2127
2338
  return flip.balanceOf(await signer.getAddress());
2128
2339
  }, "getFlipBalance");
2129
2340
 
2130
- export { StateChainGateway__factory, Vault__factory, approve, checkAllowance, extractOverrides, getAllBoostPoolsDepth, getEnvironment, getEvmChainId, getFlipBalance, getFundingEnvironment, getStateChainGatewayContractAddress, getSupportedAssets, getTokenContractAddress, getVaultContractAddress };
2341
+ export { Assets, ChainflipNetworks, Chains, InternalAssets, StateChainGateway__factory, Vault__factory, __name, __publicField, approve, assert, assetConstants, chainConstants, checkAllowance, extractOverrides, getAllBoostPoolsDepth, getAssetAndChain, getEnvironment, getEvmChainId, getFlipBalance, getFundingEnvironment, getInternalAsset, getInternalAssets, getStateChainGatewayContractAddress, getSupportedAssets, getTokenContractAddress, getVaultContractAddress, isNotNullish, isString, isTestnet, isValidAssetAndChain, readChainAssetValue };
@@ -1,11 +1,11 @@
1
1
  type ArrayToMap<T extends readonly string[]> = {
2
2
  [K in T[number]]: K;
3
3
  };
4
- declare const InternalAssets: ArrayToMap<readonly ["Flip", "Usdc", "Dot", "Eth", "Btc", "Usdt", "ArbUsdc", "ArbEth", "Sol", "SolUsdc"]>;
4
+ declare const InternalAssets: ArrayToMap<readonly ["Flip", "Usdc", "Dot", "Eth", "Btc", "Usdt", "ArbUsdc", "ArbEth"]>;
5
5
  type InternalAsset = (typeof InternalAssets)[keyof typeof InternalAssets];
6
- declare const Chains: ArrayToMap<readonly ["Bitcoin", "Ethereum", "Polkadot", "Arbitrum", "Solana"]>;
6
+ declare const Chains: ArrayToMap<readonly ["Bitcoin", "Ethereum", "Polkadot", "Arbitrum"]>;
7
7
  type Chain = (typeof Chains)[keyof typeof Chains];
8
- declare const Assets: ArrayToMap<readonly ["FLIP", "USDC", "DOT", "ETH", "BTC", "USDT", "SOL"]>;
8
+ declare const Assets: ArrayToMap<readonly ["FLIP", "USDC", "DOT", "ETH", "BTC", "USDT"]>;
9
9
  type Asset = (typeof Assets)[keyof typeof Assets];
10
10
  declare const ChainflipNetworks: ArrayToMap<readonly ["backspin", "sisyphos", "perseverance", "mainnet"]>;
11
11
  type ChainflipNetwork = (typeof ChainflipNetworks)[keyof typeof ChainflipNetworks];
@@ -34,12 +34,6 @@ declare const chainConstants: {
34
34
  readonly contractId: 4;
35
35
  readonly blockTimeSeconds: 0.26;
36
36
  };
37
- readonly Solana: {
38
- readonly assets: ["SOL", "USDC"];
39
- readonly gasAsset: "SOL";
40
- readonly contractId: 5;
41
- readonly blockTimeSeconds: number;
42
- };
43
37
  };
44
38
  type AssetOfChain<C extends Chain> = (typeof chainConstants)[C]['assets'][number];
45
39
  type UncheckedAssetAndChain = {
@@ -1,11 +1,11 @@
1
1
  type ArrayToMap<T extends readonly string[]> = {
2
2
  [K in T[number]]: K;
3
3
  };
4
- declare const InternalAssets: ArrayToMap<readonly ["Flip", "Usdc", "Dot", "Eth", "Btc", "Usdt", "ArbUsdc", "ArbEth", "Sol", "SolUsdc"]>;
4
+ declare const InternalAssets: ArrayToMap<readonly ["Flip", "Usdc", "Dot", "Eth", "Btc", "Usdt", "ArbUsdc", "ArbEth"]>;
5
5
  type InternalAsset = (typeof InternalAssets)[keyof typeof InternalAssets];
6
- declare const Chains: ArrayToMap<readonly ["Bitcoin", "Ethereum", "Polkadot", "Arbitrum", "Solana"]>;
6
+ declare const Chains: ArrayToMap<readonly ["Bitcoin", "Ethereum", "Polkadot", "Arbitrum"]>;
7
7
  type Chain = (typeof Chains)[keyof typeof Chains];
8
- declare const Assets: ArrayToMap<readonly ["FLIP", "USDC", "DOT", "ETH", "BTC", "USDT", "SOL"]>;
8
+ declare const Assets: ArrayToMap<readonly ["FLIP", "USDC", "DOT", "ETH", "BTC", "USDT"]>;
9
9
  type Asset = (typeof Assets)[keyof typeof Assets];
10
10
  declare const ChainflipNetworks: ArrayToMap<readonly ["backspin", "sisyphos", "perseverance", "mainnet"]>;
11
11
  type ChainflipNetwork = (typeof ChainflipNetworks)[keyof typeof ChainflipNetworks];
@@ -34,12 +34,6 @@ declare const chainConstants: {
34
34
  readonly contractId: 4;
35
35
  readonly blockTimeSeconds: 0.26;
36
36
  };
37
- readonly Solana: {
38
- readonly assets: ["SOL", "USDC"];
39
- readonly gasAsset: "SOL";
40
- readonly contractId: 5;
41
- readonly blockTimeSeconds: number;
42
- };
43
37
  };
44
38
  type AssetOfChain<C extends Chain> = (typeof chainConstants)[C]['assets'][number];
45
39
  type UncheckedAssetAndChain = {
@@ -1,5 +1,5 @@
1
1
  import { Signer } from 'ethers';
2
- import { c as ChainflipNetwork, T as TransactionOptions } from './contracts-DmShvHR7.mjs';
2
+ import { c as ChainflipNetwork, T as TransactionOptions } from './contracts-Cb-5VdIi.mjs';
3
3
 
4
4
  type PendingRedemption = {
5
5
  amount: bigint;
package/dist/funding.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Signer } from 'ethers';
2
- import { c as ChainflipNetwork, T as TransactionOptions } from './contracts-DmShvHR7.js';
2
+ import { c as ChainflipNetwork, T as TransactionOptions } from './contracts-Cb-5VdIi.js';
3
3
 
4
4
  type PendingRedemption = {
5
5
  amount: bigint;
package/dist/funding.js CHANGED
@@ -772,16 +772,13 @@ var InternalAssets = arrayToMap([
772
772
  "Btc",
773
773
  "Usdt",
774
774
  "ArbUsdc",
775
- "ArbEth",
776
- "Sol",
777
- "SolUsdc"
775
+ "ArbEth"
778
776
  ]);
779
777
  var Chains = arrayToMap([
780
778
  "Bitcoin",
781
779
  "Ethereum",
782
780
  "Polkadot",
783
- "Arbitrum",
784
- "Solana"
781
+ "Arbitrum"
785
782
  ]);
786
783
  var Assets = arrayToMap([
787
784
  "FLIP",
@@ -789,8 +786,7 @@ var Assets = arrayToMap([
789
786
  "DOT",
790
787
  "ETH",
791
788
  "BTC",
792
- "USDT",
793
- "SOL"
789
+ "USDT"
794
790
  ]);
795
791
  var ChainflipNetworks = arrayToMap([
796
792
  "backspin",
@@ -854,20 +850,6 @@ var ChainflipNetworks = arrayToMap([
854
850
  name: "Arbitrum USDC",
855
851
  decimals: 6,
856
852
  contractId: 7
857
- },
858
- [InternalAssets.Sol]: {
859
- chain: Chains.Solana,
860
- asset: Assets.SOL,
861
- name: "Solana",
862
- decimals: 9,
863
- contractId: 9
864
- },
865
- [InternalAssets.SolUsdc]: {
866
- chain: Chains.Solana,
867
- asset: Assets.USDC,
868
- name: "Solana USDC",
869
- decimals: 6,
870
- contractId: 10
871
853
  }
872
854
  });
873
855
  var chainConstants = {
@@ -906,15 +888,6 @@ var chainConstants = {
906
888
  gasAsset: Assets.ETH,
907
889
  contractId: 4,
908
890
  blockTimeSeconds: 0.26
909
- },
910
- [Chains.Solana]: {
911
- assets: [
912
- Assets.SOL,
913
- Assets.USDC
914
- ],
915
- gasAsset: Assets.SOL,
916
- contractId: 5,
917
- blockTimeSeconds: (400 + 800) / 2 / 1e3
918
891
  }
919
892
  };
920
893
  function isValidAssetAndChain(assetAndChain) {
@@ -947,10 +920,6 @@ function getInternalAsset(asset, assert2 = true) {
947
920
  [Chains.Arbitrum]: {
948
921
  [Assets.USDC]: InternalAssets.ArbUsdc,
949
922
  [Assets.ETH]: InternalAssets.ArbEth
950
- },
951
- [Chains.Solana]: {
952
- [Assets.SOL]: InternalAssets.Sol,
953
- [Assets.USDC]: InternalAssets.SolUsdc
954
923
  }
955
924
  };
956
925
  const chain = map[asset.chain];
@@ -987,9 +956,7 @@ var ADDRESSES = {
987
956
  ARBUSDC_CONTRACT_ADDRESS: "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9",
988
957
  VAULT_CONTRACT_ADDRESS: "0xB7A5bd0345EF1Cc5E66bf61BdeC17D2461fBd968",
989
958
  STATE_CHAIN_GATEWAY_ADDRESS: "0xeEBe00Ac0756308ac4AaBfD76c05c4F3088B8883",
990
- ARB_VAULT_CONTRACT_ADDRESS: "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",
991
- // TODO(solana)
992
- SOLUSDC_CONTRACT_ADDRESS: ""
959
+ ARB_VAULT_CONTRACT_ADDRESS: "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512"
993
960
  },
994
961
  [ChainflipNetworks.sisyphos]: {
995
962
  FLIP_CONTRACT_ADDRESS: "0xcD079EAB6B5443b545788Fd210C8800FEADd87fa",
@@ -998,8 +965,7 @@ var ADDRESSES = {
998
965
  ARBUSDC_CONTRACT_ADDRESS: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d",
999
966
  VAULT_CONTRACT_ADDRESS: "0xa94d6b1853F3cb611Ed3cCb701b4fdA5a9DACe85",
1000
967
  STATE_CHAIN_GATEWAY_ADDRESS: "0x1F7fE41C798cc7b1D34BdC8de2dDDA4a4bE744D9",
1001
- ARB_VAULT_CONTRACT_ADDRESS: "0x8155BdD48CD011e1118b51A1C82be020A3E5c2f2",
1002
- SOLUSDC_CONTRACT_ADDRESS: "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU"
968
+ ARB_VAULT_CONTRACT_ADDRESS: "0x8155BdD48CD011e1118b51A1C82be020A3E5c2f2"
1003
969
  },
1004
970
  [ChainflipNetworks.perseverance]: {
1005
971
  FLIP_CONTRACT_ADDRESS: "0xdC27c60956cB065D19F08bb69a707E37b36d8086",
@@ -1008,8 +974,7 @@ var ADDRESSES = {
1008
974
  ARBUSDC_CONTRACT_ADDRESS: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d",
1009
975
  VAULT_CONTRACT_ADDRESS: "0x36eaD71325604DC15d35FAE584D7b50646D81753",
1010
976
  STATE_CHAIN_GATEWAY_ADDRESS: "0xA34a967197Ee90BB7fb28e928388a573c5CFd099",
1011
- ARB_VAULT_CONTRACT_ADDRESS: "0x2bb150e6d4366A1BDBC4275D1F35892CD63F27e3",
1012
- SOLUSDC_CONTRACT_ADDRESS: "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU"
977
+ ARB_VAULT_CONTRACT_ADDRESS: "0x2bb150e6d4366A1BDBC4275D1F35892CD63F27e3"
1013
978
  },
1014
979
  [ChainflipNetworks.mainnet]: {
1015
980
  FLIP_CONTRACT_ADDRESS: "0x826180541412D574cf1336d22c0C0a287822678A",
@@ -1018,8 +983,7 @@ var ADDRESSES = {
1018
983
  ARBUSDC_CONTRACT_ADDRESS: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
1019
984
  VAULT_CONTRACT_ADDRESS: "0xF5e10380213880111522dd0efD3dbb45b9f62Bcc",
1020
985
  STATE_CHAIN_GATEWAY_ADDRESS: "0x6995Ab7c4D7F4B03f467Cf4c8E920427d9621DBd",
1021
- ARB_VAULT_CONTRACT_ADDRESS: "0x79001a5e762f3bEFC8e5871b42F6734e00498920",
1022
- SOLUSDC_CONTRACT_ADDRESS: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
986
+ ARB_VAULT_CONTRACT_ADDRESS: "0x79001a5e762f3bEFC8e5871b42F6734e00498920"
1023
987
  }
1024
988
  };
1025
989
 
@@ -1033,7 +997,6 @@ function getTokenContractAddress(asset, network) {
1033
997
  if (asset === InternalAssets.Usdc) return ADDRESSES[network].USDC_CONTRACT_ADDRESS;
1034
998
  if (asset === InternalAssets.Usdt) return ADDRESSES[network].USDT_CONTRACT_ADDRESS;
1035
999
  if (asset === InternalAssets.ArbUsdc) return ADDRESSES[network].ARBUSDC_CONTRACT_ADDRESS;
1036
- if (asset === InternalAssets.SolUsdc) return ADDRESSES[network].SOLUSDC_CONTRACT_ADDRESS;
1037
1000
  throw new Error(`No contract address for ${asset} on ${network}`);
1038
1001
  }
1039
1002
  __name(getTokenContractAddress, "getTokenContractAddress");
package/dist/funding.mjs CHANGED
@@ -1,5 +1,4 @@
1
- import { getFlipBalance, getFundingEnvironment, getStateChainGatewayContractAddress, approve, getTokenContractAddress, checkAllowance, extractOverrides, StateChainGateway__factory } from './chunk-AXKJJ3VI.mjs';
2
- import { __name, __publicField, ChainflipNetworks, InternalAssets, assert } from './chunk-EBZERIHA.mjs';
1
+ import { __name, __publicField, ChainflipNetworks, getFlipBalance, getFundingEnvironment, getStateChainGatewayContractAddress, approve, getTokenContractAddress, InternalAssets, checkAllowance, assert, extractOverrides, StateChainGateway__factory } from './chunk-URS5YVDJ.mjs';
3
2
 
4
3
  // ../shared/src/stateChainGateway/utils.ts
5
4
  var getStateChainGateway = /* @__PURE__ */ __name((networkOpts) => {
package/dist/swap.d.mts CHANGED
@@ -1,22 +1,19 @@
1
1
  import { Signer } from 'ethers';
2
- import { A as AssetAndChain, C as Chain, a as Asset, I as InternalAsset, b as AssetOfChain, c as ChainflipNetwork, T as TransactionOptions, d as ChainAssetMap, e as ChainMap } from './contracts-DmShvHR7.mjs';
3
- export { g as Assets, h as ChainflipIds, i as ChainflipNetworks, f as Chains, U as UncheckedAssetAndChain, j as getChainflipId } from './contracts-DmShvHR7.mjs';
2
+ import { A as AssetAndChain, C as Chain, a as Asset, I as InternalAsset, b as AssetOfChain, c as ChainflipNetwork, T as TransactionOptions, d as ChainAssetMap, e as ChainMap } from './contracts-Cb-5VdIi.mjs';
3
+ export { g as Assets, h as ChainflipIds, i as ChainflipNetworks, f as Chains, U as UncheckedAssetAndChain, j as getChainflipId } from './contracts-Cb-5VdIi.mjs';
4
4
  import { z } from 'zod';
5
5
 
6
6
  declare const ccmParamsSchema: z.ZodObject<{
7
- gasBudget: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodString, `0x${string}`, string>]>, `0x${string}`, string>;
7
+ gasBudget: z.ZodString;
8
8
  message: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>;
9
- cfParameters: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>>;
10
9
  }, "strip", z.ZodTypeAny, {
11
10
  message: `0x${string}`;
12
- gasBudget: `0x${string}`;
13
- cfParameters?: `0x${string}` | undefined;
11
+ gasBudget: string;
14
12
  }, {
15
13
  message: string;
16
14
  gasBudget: string;
17
- cfParameters?: string | undefined;
18
15
  }>;
19
- type CcmParams = z.input<typeof ccmParamsSchema>;
16
+ type CcmParams = z.infer<typeof ccmParamsSchema>;
20
17
  declare const affiliateBroker: z.ZodEffects<z.ZodObject<{
21
18
  account: z.ZodEffects<z.ZodString, string, string>;
22
19
  commissionBps: z.ZodNumber;
package/dist/swap.d.ts CHANGED
@@ -1,22 +1,19 @@
1
1
  import { Signer } from 'ethers';
2
- import { A as AssetAndChain, C as Chain, a as Asset, I as InternalAsset, b as AssetOfChain, c as ChainflipNetwork, T as TransactionOptions, d as ChainAssetMap, e as ChainMap } from './contracts-DmShvHR7.js';
3
- export { g as Assets, h as ChainflipIds, i as ChainflipNetworks, f as Chains, U as UncheckedAssetAndChain, j as getChainflipId } from './contracts-DmShvHR7.js';
2
+ import { A as AssetAndChain, C as Chain, a as Asset, I as InternalAsset, b as AssetOfChain, c as ChainflipNetwork, T as TransactionOptions, d as ChainAssetMap, e as ChainMap } from './contracts-Cb-5VdIi.js';
3
+ export { g as Assets, h as ChainflipIds, i as ChainflipNetworks, f as Chains, U as UncheckedAssetAndChain, j as getChainflipId } from './contracts-Cb-5VdIi.js';
4
4
  import { z } from 'zod';
5
5
 
6
6
  declare const ccmParamsSchema: z.ZodObject<{
7
- gasBudget: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodString, `0x${string}`, string>]>, `0x${string}`, string>;
7
+ gasBudget: z.ZodString;
8
8
  message: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>;
9
- cfParameters: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>>;
10
9
  }, "strip", z.ZodTypeAny, {
11
10
  message: `0x${string}`;
12
- gasBudget: `0x${string}`;
13
- cfParameters?: `0x${string}` | undefined;
11
+ gasBudget: string;
14
12
  }, {
15
13
  message: string;
16
14
  gasBudget: string;
17
- cfParameters?: string | undefined;
18
15
  }>;
19
- type CcmParams = z.input<typeof ccmParamsSchema>;
16
+ type CcmParams = z.infer<typeof ccmParamsSchema>;
20
17
  declare const affiliateBroker: z.ZodEffects<z.ZodObject<{
21
18
  account: z.ZodEffects<z.ZodString, string, string>;
22
19
  commissionBps: z.ZodNumber;