@instadapp/avocado-base 0.0.0-dev.e144f0f → 0.0.0-dev.e698742

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 (83) hide show
  1. package/abi/forwarder.json +1253 -149
  2. package/abi/multisigForwarder.json +697 -0
  3. package/app.vue +7 -0
  4. package/assets/images/icons/arrow-left.svg +5 -0
  5. package/assets/images/icons/arrow-right.svg +5 -0
  6. package/assets/images/icons/avocado.svg +4 -0
  7. package/assets/images/icons/bridge-2.svg +3 -0
  8. package/assets/images/icons/bridge.svg +7 -0
  9. package/assets/images/icons/calendar.svg +8 -0
  10. package/assets/images/icons/change-threshold.svg +4 -0
  11. package/assets/images/icons/check-circle.svg +4 -0
  12. package/assets/images/icons/chevron-down.svg +4 -0
  13. package/assets/images/icons/clipboard.svg +7 -0
  14. package/assets/images/icons/clock-circle.svg +5 -0
  15. package/assets/images/icons/copy.svg +5 -0
  16. package/assets/images/icons/cross-transfer.svg +7 -0
  17. package/assets/images/icons/dapp.svg +4 -0
  18. package/assets/images/icons/deploy.svg +12 -0
  19. package/assets/images/icons/error-circle.svg +6 -0
  20. package/assets/images/icons/exclamation-circle.svg +13 -0
  21. package/assets/images/icons/exclamation-octagon.svg +13 -0
  22. package/assets/images/icons/exclamation-triangle.svg +5 -0
  23. package/assets/images/icons/external-link.svg +6 -0
  24. package/assets/images/icons/eye.svg +4 -0
  25. package/assets/images/icons/flowers.svg +8 -0
  26. package/assets/images/icons/gas-emoji.svg +193 -0
  27. package/assets/images/icons/gas.svg +14 -0
  28. package/assets/images/icons/gift.svg +153 -0
  29. package/assets/images/icons/globe.svg +110 -0
  30. package/assets/images/icons/hamburger.svg +6 -0
  31. package/assets/images/icons/info-2.svg +12 -0
  32. package/assets/images/icons/instadapp-pro.svg +4 -0
  33. package/assets/images/icons/logout.svg +3 -0
  34. package/assets/images/icons/moon.svg +3 -0
  35. package/assets/images/icons/multi-send.svg +7 -0
  36. package/assets/images/icons/network.svg +13 -0
  37. package/assets/images/icons/options.svg +5 -0
  38. package/assets/images/icons/permit-sign.svg +11 -0
  39. package/assets/images/icons/plus-circle.svg +6 -0
  40. package/assets/images/icons/plus.svg +5 -0
  41. package/assets/images/icons/power-off-bg.svg +24 -0
  42. package/assets/images/icons/power-off.svg +19 -0
  43. package/assets/images/icons/power-on.svg +19 -0
  44. package/assets/images/icons/qr.svg +20 -0
  45. package/assets/images/icons/question-circle.svg +14 -0
  46. package/assets/images/icons/refresh.svg +6 -0
  47. package/assets/images/icons/reject-proposal.svg +6 -0
  48. package/assets/images/icons/search.svg +12 -0
  49. package/assets/images/icons/sun.svg +3 -0
  50. package/assets/images/icons/transfer.svg +5 -0
  51. package/assets/images/icons/trash-2.svg +8 -0
  52. package/assets/images/icons/upgrade.svg +4 -0
  53. package/assets/images/icons/wave.svg +214 -0
  54. package/assets/images/icons/x.svg +5 -0
  55. package/components/ActionLogo.vue +38 -0
  56. package/components/ActionMetadata.vue +72 -0
  57. package/components/AuthorityAvatar.vue +38 -0
  58. package/components/ChainLogo.vue +14 -556
  59. package/components/CopyClipboard.vue +64 -0
  60. package/components/metadata/Bridge.vue +59 -0
  61. package/components/metadata/CrossTransfer.vue +71 -0
  62. package/components/metadata/GasTopup.vue +39 -0
  63. package/components/metadata/Permit2.vue +42 -0
  64. package/components/metadata/Signers.vue +62 -0
  65. package/components/metadata/Swap.vue +74 -0
  66. package/components/metadata/Transfer.vue +50 -0
  67. package/components.d.ts +13 -0
  68. package/contracts/Forwarder.ts +856 -2
  69. package/contracts/MultisigForwarder.ts +859 -0
  70. package/contracts/factories/Forwarder__factory.ts +816 -16
  71. package/contracts/factories/MultisigForwarder__factory.ts +721 -0
  72. package/contracts/factories/index.ts +1 -0
  73. package/contracts/index.ts +2 -0
  74. package/nuxt.config.ts +17 -1
  75. package/package.json +9 -4
  76. package/utils/avocado.ts +2 -0
  77. package/utils/bignumber.ts +20 -0
  78. package/utils/formatter.ts +1 -1
  79. package/utils/helper.ts +8 -0
  80. package/utils/metadata.ts +316 -136
  81. package/utils/network.ts +155 -87
  82. package/utils/services.ts +21 -0
  83. package/utils/utils.d.ts +129 -105
package/utils/network.ts CHANGED
@@ -1,38 +1,31 @@
1
1
  import { ethers } from "ethers";
2
+ import {
3
+ AVO_PROD_CHAIN_NAME,
4
+ AVO_PROD_CHAIN_ID,
5
+ AVO_PROD_RPC_URL,
6
+ AVO_PROD_EXPLORER_URL,
7
+ AVO_STAGING_CHAIN_NAME,
8
+ AVO_STAGING_CHAIN_ID,
9
+ AVO_STAGING_RPC_URL,
10
+ AVO_STAGING_EXPLORER_URL,
11
+ } from './avocado'
2
12
 
3
- export const bridgeDisabledNetworks = [1101];
13
+ export const bridgeDisabledNetworks = [];
14
+
15
+ export const networksSimulationNotSupported = [1313161554, 1101]
4
16
 
5
17
  export const networks: Network[] = [
6
- {
7
- name: "Mainnet",
8
- debankName: "eth",
9
- ankrName: "eth",
10
- zerionName: "ethereum",
11
- chainId: 1,
12
- explorerUrl: "https://etherscan.io",
13
- get serverRpcUrl() {
14
- return process.env?.MAINNET_RPC_URL || this.params.rpcUrls[0];
15
- },
16
- balanceResolverAddress: "0x5b7D61b389D12e1f5873d0cCEe7E675915AB5F43",
17
- usdcAddress: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
18
- params: {
19
- rpcUrls: ["https://rpc.ankr.com/eth"],
20
- nativeCurrency: {
21
- name: "Ethereum",
22
- symbol: "ETH",
23
- decimals: 18,
24
- },
25
- },
26
- },
27
18
  {
28
19
  name: "Polygon",
29
20
  debankName: "matic",
30
21
  ankrName: "polygon",
31
22
  zerionName: "polygon",
23
+ color: "#7A4ADD",
32
24
  chainId: 137,
33
25
  balanceResolverAddress: "0x58632D23120b20650262b8A629a14e4F4043E0D9",
34
26
  usdcAddress: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
35
27
  explorerUrl: "https://polygonscan.com",
28
+ apiURL: 'https://api.polygonscan.com',
36
29
  get serverRpcUrl() {
37
30
  return process.env?.POLYGON_RPC_URL || this.params.rpcUrls[0];
38
31
  },
@@ -51,10 +44,12 @@ export const networks: Network[] = [
51
44
  debankName: "arb",
52
45
  ankrName: "arbitrum",
53
46
  zerionName: "arbitrum",
47
+ color: "#2D374B",
54
48
  chainId: 42161,
55
49
  usdcAddress: "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",
56
50
  balanceResolverAddress: "0xca5f37e6D8bB24c5A7958d5eccE7Bd9Aacc944f2",
57
51
  explorerUrl: "https://arbiscan.io",
52
+ apiURL: 'https://api.arbiscan.io',
58
53
  get serverRpcUrl() {
59
54
  return process.env?.ARBITRUM_RPC_URL || this.params.rpcUrls[0];
60
55
  },
@@ -68,12 +63,58 @@ export const networks: Network[] = [
68
63
  rpcUrls: ["https://arb1.arbitrum.io/rpc"],
69
64
  },
70
65
  },
66
+ {
67
+ name: "Ethereum",
68
+ debankName: "eth",
69
+ ankrName: "eth",
70
+ zerionName: "ethereum",
71
+ chainId: 1,
72
+ explorerUrl: "https://etherscan.io",
73
+ apiURL: 'https://api.etherscan.io',
74
+ color: "#5D5FEF",
75
+ get serverRpcUrl() {
76
+ return process.env?.MAINNET_RPC_URL || this.params.rpcUrls[0];
77
+ },
78
+ balanceResolverAddress: "0x5b7D61b389D12e1f5873d0cCEe7E675915AB5F43",
79
+ usdcAddress: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
80
+ params: {
81
+ rpcUrls: ["https://rpc.ankr.com/eth"],
82
+ nativeCurrency: {
83
+ name: "Ethereum",
84
+ symbol: "ETH",
85
+ decimals: 18,
86
+ },
87
+ },
88
+ },
89
+ {
90
+ name: 'Base',
91
+ chainId: 8453,
92
+ color: '#1E2024',
93
+ explorerUrl: 'https://basescan.org',
94
+ apiURL: 'https://api.basescan.org',
95
+ get serverRpcUrl() {
96
+ return process.env?.BASE_RPC_URL || this.params.rpcUrls[0];
97
+ },
98
+ usdcAddress: '0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA',
99
+ balanceResolverAddress: '0x23c8EAb8a4373dD16b0947Ebe8bf76Ff7A49d13C',
100
+ params: {
101
+ rpcUrls: ['https://rpc.ankr.com/base'],
102
+ chainName: "Base",
103
+ nativeCurrency: {
104
+ name: "Ethereum",
105
+ symbol: "ETH",
106
+ decimals: 18,
107
+ },
108
+ }
109
+ },
71
110
  {
72
111
  name: "Optimism",
73
112
  debankName: "op",
74
113
  ankrName: "optimism",
75
114
  zerionName: "optimism",
115
+ color: "#FF0420",
76
116
  chainId: 10,
117
+ apiURL: 'https://api-optimistic.etherscan.io',
77
118
  usdcAddress: "0x7f5c764cbc14f9669b88837ca1490cca17c31607",
78
119
  balanceResolverAddress: "0xca5f37e6D8bB24c5A7958d5eccE7Bd9Aacc944f2",
79
120
  explorerUrl: "https://optimistic.etherscan.io",
@@ -91,25 +132,24 @@ export const networks: Network[] = [
91
132
  },
92
133
  },
93
134
  {
94
- name: "Avalanche",
95
- debankName: "avax",
96
- ankrName: "avalanche",
97
- zerionName: "avalanche",
98
- chainId: 43114,
99
- usdcAddress: "0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e",
100
- balanceResolverAddress: "0x63009f31D054E0ac9F321Cf0D642375236A4Bf1E",
101
- explorerUrl: "https://snowtrace.io",
135
+ name: "Polygon zkEVM",
136
+ chainId: 1101,
137
+ color: "#8544f6",
138
+ explorerUrl: "https://zkevm.polygonscan.com",
139
+ apiURL: 'https://api-zkevm.polygonscan.com',
140
+ balanceResolverAddress: "0x48D1Fa5Ee6691a1E0B45d2B515650997BEA27a01",
141
+ usdcAddress: "0xa8ce8aee21bc2a48a5ef670afcc9274c7bbbc035",
102
142
  get serverRpcUrl() {
103
- return process.env?.AVALANCHE_RPC_URL || this.params.rpcUrls[0];
143
+ return process.env?.POLYGON_ZKEVM_RPC_URL || this.params.rpcUrls[0];
104
144
  },
105
145
  params: {
106
- chainName: "Avalanche Network",
146
+ chainName: "polygon zkEVM",
147
+ rpcUrls: ["https://zkevm-rpc.com"],
107
148
  nativeCurrency: {
108
- name: "Avalanche",
109
- symbol: "AVAX",
149
+ name: "Ethereum",
150
+ symbol: "ETH",
110
151
  decimals: 18,
111
152
  },
112
- rpcUrls: ["https://api.avax.network/ext/bc/C/rpc"],
113
153
  },
114
154
  },
115
155
  {
@@ -117,8 +157,10 @@ export const networks: Network[] = [
117
157
  debankName: "bsc",
118
158
  ankrName: "bsc",
119
159
  zerionName: "binance-smart-chain",
160
+ color: "#F3BA2F",
120
161
  chainId: 56,
121
162
  explorerUrl: "https://bscscan.com",
163
+ apiURL: 'https://api.bscscan.com',
122
164
  usdcAddress: "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",
123
165
  balanceResolverAddress: "0xb808cff38706e267067b0af427726aa099f69f89",
124
166
  get serverRpcUrl() {
@@ -135,72 +177,36 @@ export const networks: Network[] = [
135
177
  },
136
178
  },
137
179
  {
138
- name: "Gnosis",
139
- debankName: "xdai",
140
- zerionName: "xdai",
141
- chainId: 100,
142
- balanceResolverAddress: "0xfaa244e276b1597f663975ed007ee4ff70d27849",
143
- explorerUrl: "https://gnosisscan.io",
144
- usdcAddress: "0xddafbb505ad214d7b80b1f830fccc89b60fb7a83",
145
- get serverRpcUrl() {
146
- return process.env?.GNOSIS_RPC_URL || this.params.rpcUrls[0];
147
- },
148
- params: {
149
- chainName: "Gnosis Safe",
150
- rpcUrls: ["https://rpc.ankr.com/gnosis"],
151
- nativeCurrency: {
152
- name: "xdaistable",
153
- symbol: "xDAI",
154
- decimals: 18,
155
- },
156
- },
157
- },
158
- {
159
- name: "Polygon zkEVM",
160
- chainId: 1101,
161
- explorerUrl: "https://zkevm.polygonscan.com",
162
- balanceResolverAddress: "0x48D1Fa5Ee6691a1E0B45d2B515650997BEA27a01",
163
- usdcAddress: "0xa8ce8aee21bc2a48a5ef670afcc9274c7bbbc035",
180
+ name: "Avalanche",
181
+ debankName: "avax",
182
+ ankrName: "avalanche",
183
+ zerionName: "avalanche",
184
+ color: "#EB5757",
185
+ chainId: 43114,
186
+ usdcAddress: "0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e",
187
+ balanceResolverAddress: "0x63009f31D054E0ac9F321Cf0D642375236A4Bf1E",
188
+ explorerUrl: "https://snowtrace.io",
189
+ apiURL: 'https://api.snowtrace.io',
164
190
  get serverRpcUrl() {
165
- return process.env?.POLYGON_ZKEVM_RPC_URL || this.params.rpcUrls[0];
191
+ return process.env?.AVALANCHE_RPC_URL || this.params.rpcUrls[0];
166
192
  },
167
193
  params: {
168
- chainName: "polygon zkEVM",
169
- rpcUrls: ["https://rpc.ankr.com/polygon_zkevm"],
170
-
194
+ chainName: "Avalanche Network",
171
195
  nativeCurrency: {
172
- name: "Ethereum",
173
- symbol: "ETH",
196
+ name: "Avalanche",
197
+ symbol: "AVAX",
174
198
  decimals: 18,
175
199
  },
200
+ rpcUrls: ["https://rpc.ankr.com/avalanche"],
176
201
  },
177
202
  },
178
- // {
179
- // name: "Aurora",
180
- // chainId: 1313161554,
181
- // zerionName: "aurora",
182
- // explorerUrl: "https://explorer.mainnet.aurora.dev",
183
- // get serverRpcUrl() {
184
- // return process.env?.AURORA_RPC_URL || this.params.rpcUrls[0];
185
- // },
186
- // usdcAddress: "0xB12BFcA5A55806AaF64E99521918A4bf0fC40802",
187
- // balanceResolverAddress: "0xdF19Da523DA64bBE82eE0E4DFf00d676A8386474",
188
- // params: {
189
- // rpcUrls: ["https://mainnet.aurora.dev"],
190
- // chainName: "Aurora",
191
- // nativeCurrency: {
192
- // decimals: 18,
193
- // name: "Aurora ETH",
194
- // symbol: "AETH",
195
- // },
196
- // },
197
- // },
198
203
  {
199
204
  name: "Fantom",
200
205
  chainId: 250,
201
206
  zerionName: "fantom",
202
207
  explorerUrl: "https://ftmscan.com",
203
208
  ankrName: "fantom",
209
+ color: "#1969ff",
204
210
  get serverRpcUrl() {
205
211
  return process.env?.FANTOM_RPC_URL || this.params.rpcUrls[0];
206
212
  },
@@ -216,11 +222,56 @@ export const networks: Network[] = [
216
222
  },
217
223
  },
218
224
  },
225
+ {
226
+ name: "Gnosis",
227
+ debankName: "xdai",
228
+ zerionName: "xdai",
229
+ color: "#04795C",
230
+ chainId: 100,
231
+ balanceResolverAddress: "0xfaa244e276b1597f663975ed007ee4ff70d27849",
232
+ explorerUrl: "https://gnosisscan.io",
233
+ apiURL:'https://api.gnosisscan.io',
234
+ usdcAddress: "0xddafbb505ad214d7b80b1f830fccc89b60fb7a83",
235
+ get serverRpcUrl() {
236
+ return process.env?.GNOSIS_RPC_URL || this.params.rpcUrls[0];
237
+ },
238
+ params: {
239
+ chainName: "Gnosis Safe",
240
+ rpcUrls: ["https://rpc.ankr.com/gnosis"],
241
+ nativeCurrency: {
242
+ name: "xdaistable",
243
+ symbol: "xDAI",
244
+ decimals: 18,
245
+ },
246
+ },
247
+ },
248
+ {
249
+ name: "Aurora",
250
+ chainId: 1313161554,
251
+ zerionName: "aurora",
252
+ color: "#78d64b",
253
+ explorerUrl: "https://explorer.mainnet.aurora.dev",
254
+ get serverRpcUrl() {
255
+ return process.env?.AURORA_RPC_URL || this.params.rpcUrls[0];
256
+ },
257
+ usdcAddress: "0xB12BFcA5A55806AaF64E99521918A4bf0fC40802",
258
+ balanceResolverAddress: "0xdF19Da523DA64bBE82eE0E4DFf00d676A8386474",
259
+ params: {
260
+ rpcUrls: ["https://mainnet.aurora.dev"],
261
+ chainName: "Aurora",
262
+ nativeCurrency: {
263
+ decimals: 18,
264
+ name: "Aurora ETH",
265
+ symbol: "AETH",
266
+ },
267
+ },
268
+ },
219
269
  {
220
270
  name: AVO_PROD_CHAIN_NAME,
221
271
  chainId: AVO_PROD_CHAIN_ID,
222
272
  isAvocado: true,
223
273
  balanceResolverAddress: "",
274
+ color: "#16A34A",
224
275
  usdcAddress: "",
225
276
  serverRpcUrl: AVO_PROD_RPC_URL,
226
277
  explorerUrl: AVO_PROD_EXPLORER_URL,
@@ -239,6 +290,7 @@ export const networks: Network[] = [
239
290
  name: AVO_STAGING_CHAIN_NAME,
240
291
  chainId: AVO_STAGING_CHAIN_ID,
241
292
  serverRpcUrl: AVO_STAGING_RPC_URL,
293
+ color: "#16A34A",
242
294
  explorerUrl: AVO_STAGING_EXPLORER_URL,
243
295
  isAvocado: true,
244
296
  balanceResolverAddress: "",
@@ -256,6 +308,22 @@ export const networks: Network[] = [
256
308
  },
257
309
  ];
258
310
 
311
+ export const chainUsdcAddresses = [
312
+ { chainId: 1, address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' },
313
+ { chainId: 10, address: '0x7f5c764cbc14f9669b88837ca1490cca17c31607' },
314
+ { chainId: 56, address: '0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d' },
315
+ { chainId: 100, address: '0xddafbb505ad214d7b80b1f830fccc89b60fb7a83' },
316
+ { chainId: 137, address: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174' },
317
+ { chainId: 250, address: '0x04068da6c83afcfa0e13ba15a6696662335d5b75' },
318
+ { chainId: 42161, address: '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8' },
319
+ { chainId: 42161, address: '0xaf88d065e77c8cc2239327c5edb3a432268e5831' },
320
+ { chainId: 43114, address: '0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e' },
321
+ { chainId: 43114, address: '0xa7d7079b0fead91f3e65f86e8915cb59c1a4c664' },
322
+ { chainId: 1101, address: '0xa8ce8aee21bc2a48a5ef670afcc9274c7bbbc035' },
323
+ { chainId: 1313161554, address: '0xB12BFcA5A55806AaF64E99521918A4bf0fC40802' },
324
+ { chainId: 8453, address: '0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA'}
325
+ ];
326
+
259
327
  export const getNetworkByChainId = (
260
328
  chainId: ChainId | number | string
261
329
  ): Network => {
@@ -0,0 +1,21 @@
1
+ export const fetchTokenByAddress = async (
2
+ address: string,
3
+ chainId: string | number,
4
+ tokens?: ITokenPrice[]
5
+ ) => {
6
+ if (!address || !chainId) return null;
7
+
8
+ if (tokens?.length) {
9
+ const token = tokens.find((token) => token.address?.toLocaleLowerCase() === address?.toLocaleLowerCase() && token.chain_id == chainId);
10
+ if (token) return token;
11
+ }
12
+
13
+ const [token] = (await $fetch(`${blockQueryURL}/${chainId}/tokens`, {
14
+ params: {
15
+ sparkline: false,
16
+ "addresses[]": [address],
17
+ },
18
+ })) as ITokenPrice[];
19
+
20
+ return token;
21
+ };
package/utils/utils.d.ts CHANGED
@@ -1,109 +1,133 @@
1
- type ChainId =
2
- | 1
3
- | 137
4
- | 42161
5
- | 10
6
- | 56
7
- | 43114
8
- | 100
9
- | 1101
10
- | 250
11
- | 634
12
- | 1313161554
13
- | 63400;
14
-
15
- type ISlackMessageType = "danger" | "error" | "success" | "banner";
16
-
17
- interface Network {
18
- name: string;
19
- debankName?: string;
20
- ankrName?: string;
21
- zerionName?: string;
22
- chainId: ChainId;
23
- isAvocado?: boolean;
24
- serverRpcUrl: string | undefined;
25
- balanceResolverAddress?: string;
26
- usdcAddress: string;
27
- explorerUrl: string;
28
- params: {
29
- chainName?: string;
30
- iconUrls?: string[];
31
- rpcUrls: string[];
32
- nativeCurrency?: {
33
- name: string;
34
- symbol: string;
35
- decimals: number;
1
+ declare global {
2
+ type ChainId =
3
+ | 1
4
+ | 137
5
+ | 42161
6
+ | 10
7
+ | 56
8
+ | 43114
9
+ | 100
10
+ | 1101
11
+ | 250
12
+ | 634
13
+ | 1313161554
14
+ | 8453
15
+ | 63400;
16
+
17
+ type ISlackMessageType = "danger" | "error" | "success" | "banner";
18
+
19
+ type MetadataTypes = keyof typeof MetadataEnums;
20
+
21
+ type PayloadFunction = (data: any, type: MetadataTypes) => any;
22
+
23
+ type IPayload = Record<MetadataTypes, PayloadFunction>;
24
+
25
+ interface Network {
26
+ name: string;
27
+ debankName?: string;
28
+ ankrName?: string;
29
+ zerionName?: string;
30
+ chainId: ChainId;
31
+ color: string;
32
+ isAvocado?: boolean;
33
+ serverRpcUrl: string | undefined;
34
+ balanceResolverAddress?: string;
35
+ usdcAddress: string;
36
+ explorerUrl: string;
37
+ apiURL?: string;
38
+ params: {
39
+ chainName?: string;
40
+ iconUrls?: string[];
41
+ rpcUrls: string[];
42
+ nativeCurrency?: {
43
+ name: string;
44
+ symbol: string;
45
+ decimals: number;
46
+ };
36
47
  };
48
+ }
49
+
50
+ type SignMetadataProps = {
51
+ token: string;
52
+ spender: string;
53
+ amount: string;
54
+ expiration: string;
55
+ };
56
+
57
+ type DappMetadataProps = {
58
+ name: string;
59
+ url: string;
60
+ };
61
+
62
+ type SendMetadataProps = {
63
+ token: string;
64
+ amount: string;
65
+ receiver: string;
66
+ };
67
+
68
+ type CrossSendMetadataProps = {
69
+ fromToken: string;
70
+ toToken: string;
71
+ toChainId: string;
72
+ amount: string;
73
+ receiver: string;
74
+ };
75
+
76
+ type AuthMetadataProps = {
77
+ address: string;
78
+ chainId: string;
79
+ remove: boolean;
37
80
  };
81
+
82
+ type UpgradeMetadataProps = {
83
+ version: string;
84
+ walletImpl: string;
85
+ };
86
+
87
+ type TopupMetadataProps = {
88
+ amount: string;
89
+ token: string;
90
+ onBehalf: string;
91
+ };
92
+
93
+ type BridgeMetadataProps = {
94
+ amount: string;
95
+ receiver: string;
96
+ fromToken: string;
97
+ toToken: string;
98
+ toChainId: string;
99
+ bridgeFee: string;
100
+ nativeToken: string;
101
+ };
102
+
103
+ type SwapMetadataProps = {
104
+ sellToken: string;
105
+ buyToken: string;
106
+ sellAmount: string;
107
+ buyAmount: string;
108
+ receiver: string;
109
+ protocol?: string;
110
+ };
111
+
112
+ type MetadataProps = {
113
+ type: MetadataTypes,
114
+ encodedData: string;
115
+ version?: string;
116
+ };
117
+
118
+ interface ITokenPrice {
119
+ address: string;
120
+ chain_id: string;
121
+ name: string;
122
+ symbol: string;
123
+ decimals: number;
124
+ logo_url: string;
125
+ price: string;
126
+ coingecko_id: string;
127
+ sparkline_price_7d: number[];
128
+ }
129
+
38
130
  }
39
131
 
40
- type SignMetadataProps = {
41
- token: string;
42
- spender: string;
43
- amount: string;
44
- expiration: string;
45
- };
46
-
47
- type DappMetadataProps = {
48
- name: string;
49
- url: string;
50
- };
51
-
52
- type SendMetadataProps = {
53
- token: string;
54
- amount: string;
55
- receiver: string;
56
- };
57
-
58
- type CrossSendMetadatProps = {
59
- fromToken: string;
60
- toToken: string;
61
- amount: string;
62
- receiver: string;
63
- };
64
-
65
- type UpgradeMetadataProps = {
66
- version: string;
67
- walletImpl: string;
68
- };
69
-
70
- type TopupMetadataProps = {
71
- amount: string;
72
- token: string;
73
- onBehalf: string;
74
- };
75
-
76
- type BridgeMetadataProps = {
77
- amount: string;
78
- receiver: string;
79
- fromToken: string;
80
- toToken: string;
81
- toChainId: string;
82
- bridgeFee: string;
83
- nativeToken: string;
84
- };
85
-
86
- type SwapMetadataProps = {
87
- sellToken: string;
88
- buyToken: string;
89
- sellAmount: string;
90
- buyAmount: string;
91
- receiver: string;
92
- protocol?: string;
93
- };
94
-
95
- type MetadataProps = {
96
- type:
97
- | "transfer"
98
- | "bridge"
99
- | "swap"
100
- | "multi"
101
- | "gas-topup"
102
- | "upgrade"
103
- | "dapp"
104
- | "deploy"
105
- | "permit2"
106
- | "cross-transfer";
107
- encodedData: string;
108
- version?: string;
109
- };
132
+ export { }
133
+