@instadapp/avocado-base 0.0.0-dev.0d5070b

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.
@@ -0,0 +1,53 @@
1
+ name: NPM Publish(Dev)
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - 'main'
7
+
8
+ jobs:
9
+ dev-npm-publish:
10
+ name: dev-npm-publish
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v3
14
+
15
+ - name: Get yarn cache directory path
16
+ id: yarn-cache
17
+ run: echo "YARN_CACHE_DIR=$(yarn cache dir)" >> $GITHUB_OUTPUT
18
+
19
+ - uses: actions/setup-node@v3
20
+ with:
21
+ node-version: 16
22
+
23
+ - uses: actions/cache@v3
24
+ with:
25
+ path: |
26
+ **/node_modules
27
+ ${{ steps.yarn-cache.outputs.YARN_CACHE_DIR }}
28
+ key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
29
+ restore-keys: |
30
+ ${{ runner.os }}-yarn-
31
+
32
+ - name: Resolve version
33
+ id: version
34
+ run: echo "GIT_SHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
35
+
36
+ - name: "Version based on commit: 0.0.0-dev.${{ steps.vars.outputs.sha_short }}"
37
+ run: npm version 0.0.0-dev.${{ steps.version.outputs.GIT_SHA_SHORT }} --force --no-git-tag-version
38
+
39
+ - name: Install Dependencies
40
+ run: yarn --frozen-lockfile
41
+
42
+ - name: Build
43
+ run: yarn run build
44
+
45
+ - name: Publish Dev Release
46
+ uses: JS-DevTools/npm-publish@v1
47
+ with:
48
+ token: ${{ secrets.NPM_AUTH_TOKEN }}
49
+ tag: dev
50
+ access: public
51
+
52
+
53
+
@@ -0,0 +1,20 @@
1
+ name: NPM Publish(Release)
2
+
3
+ on:
4
+ release:
5
+ types: [released]
6
+
7
+ jobs:
8
+ npm-publish:
9
+ name: npm-publish
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v3
13
+ - uses: actions/setup-node@v3
14
+ with:
15
+ node-version: 16
16
+ - uses: JS-DevTools/npm-publish@v1
17
+ with:
18
+ token: ${{ secrets.NPM_AUTH_TOKEN }}
19
+ access: public
20
+ check-version: true
package/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # Nuxt 3 Minimal Starter
2
+
3
+ Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
4
+
5
+ ## Setup
6
+
7
+ Make sure to install the dependencies:
8
+
9
+ ```bash
10
+ # yarn
11
+ yarn install
12
+
13
+ # npm
14
+ npm install
15
+
16
+ # pnpm
17
+ pnpm install
18
+ ```
19
+
20
+ ## Development Server
21
+
22
+ Start the development server on `http://localhost:3000`
23
+
24
+ ```bash
25
+ npm run dev
26
+ ```
27
+
28
+ ## Production
29
+
30
+ Build the application for production:
31
+
32
+ ```bash
33
+ npm run build
34
+ ```
35
+
36
+ Locally preview production build:
37
+
38
+ ```bash
39
+ npm run preview
40
+ ```
41
+
42
+ Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
@@ -0,0 +1,431 @@
1
+ <template>
2
+ <svg
3
+ v-if="chain == 137"
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ fill="none"
6
+ viewBox="0 0 24 24"
7
+ >
8
+ <rect
9
+ width="22"
10
+ height="22"
11
+ x="1"
12
+ y="1"
13
+ :fill="generateID('polygon', true)"
14
+ rx="11"
15
+ />
16
+ <path
17
+ fill="#fff"
18
+ d="M15.086 9.927a.791.791 0 0 0-.752 0L12.58 10.97l-1.191.665-1.723 1.045a.791.791 0 0 1-.752 0l-1.347-.823a.773.773 0 0 1-.376-.665V9.61c0-.253.125-.506.376-.664l1.347-.792a.791.791 0 0 1 .752 0l1.347.823c.22.127.376.38.376.665v1.045l1.19-.697V8.914a.782.782 0 0 0-.375-.665L9.697 6.762a.791.791 0 0 0-.752 0L6.376 8.28A.697.697 0 0 0 6 8.914v2.975c0 .254.125.507.376.665l2.538 1.488c.22.126.501.126.752 0l1.723-1.013 1.19-.697 1.724-1.012a.791.791 0 0 1 .752 0l1.347.79c.22.128.376.38.376.666v1.582a.782.782 0 0 1-.376.665l-1.316.791a.791.791 0 0 1-.752 0l-1.347-.791a.773.773 0 0 1-.376-.665v-1.013l-1.19.697v1.044c0 .253.125.507.375.665l2.538 1.487c.22.127.502.127.752 0l2.538-1.487a.773.773 0 0 0 .376-.665V12.08a.782.782 0 0 0-.376-.665l-2.538-1.487Z"
19
+ />
20
+ <rect
21
+ v-if="stroke"
22
+ :class="strokeClass"
23
+ width="22"
24
+ height="22"
25
+ x="1"
26
+ y="1"
27
+ rx="11"
28
+ />
29
+ <defs>
30
+ <linearGradient
31
+ :id="generateID('polygon')"
32
+ x1="12"
33
+ x2="12"
34
+ y1="2"
35
+ y2="22"
36
+ gradientUnits="userSpaceOnUse"
37
+ >
38
+ <stop stop-color="#A177FA" />
39
+ <stop offset="1" stop-color="#7A4ADD" />
40
+ </linearGradient>
41
+ </defs>
42
+ </svg>
43
+ <svg
44
+ v-else-if="chain == 42161"
45
+ xmlns="http://www.w3.org/2000/svg"
46
+ fill="none"
47
+ viewBox="0 0 24 24"
48
+ >
49
+ <rect
50
+ width="22"
51
+ height="22"
52
+ x="1"
53
+ y="1"
54
+ :fill="generateID('arb', true)"
55
+ rx="11"
56
+ />
57
+ <path
58
+ fill="#28A0F0"
59
+ d="m12.031 13.969 1.704 2.673 1.574-.912-2.238-3.526-1.04 1.765ZM16.743 14.658v-.73l-2.445-3.808-.907 1.539 2.36 3.817.853-.495a.378.378 0 0 0 .14-.275v-.048Z"
60
+ />
61
+ <path
62
+ fill="#fff"
63
+ d="m6.5 15.347 1.205.694 4.01-6.43-.68-.018c-.58-.008-1.205.142-1.492.61l-2.277 3.53L6.5 14.91v.437ZM14.023 9.61l-1.793.007-4.058 6.696 1.418.817.386-.654 4.047-6.865Z"
64
+ />
65
+ <path
66
+ fill="#96BEDC"
67
+ d="M17.5 9.602a1.143 1.143 0 0 0-.536-.919l-4.46-2.564a1.16 1.16 0 0 0-1.022 0c-.037.019-4.336 2.512-4.336 2.512a1.146 1.146 0 0 0-.646.968v5.31l.766-1.176-.007-4.098a.377.377 0 0 1 .158-.285 2599 2599 0 0 1 4.406-2.552.388.388 0 0 1 .337-.002l4.401 2.532c.104.066.17.179.175.302v5.076a.37.37 0 0 1-.131.275l-.854.494-.44.255-1.574.912-1.595.925a.387.387 0 0 1-.272-.005l-1.888-1.086-.386.654 1.697.977a43.674 43.674 0 0 0 .27.15c.12.059.293.093.45.093.143 0 .283-.026.415-.078l4.635-2.685c.266-.206.423-.517.437-.854V9.602Z"
68
+ />
69
+ <rect
70
+ v-if="stroke"
71
+ :class="strokeClass"
72
+ width="22"
73
+ height="22"
74
+ x="1"
75
+ y="1"
76
+ rx="11"
77
+ />
78
+ <defs>
79
+ <linearGradient
80
+ :id="generateID('arb')"
81
+ x1="12"
82
+ x2="12"
83
+ y1="2"
84
+ y2="22"
85
+ gradientUnits="userSpaceOnUse"
86
+ >
87
+ <stop stop-color="#495775" />
88
+ <stop offset="1" stop-color="#2D374B" />
89
+ </linearGradient>
90
+ </defs>
91
+ </svg>
92
+
93
+ <svg
94
+ v-else-if="chain == 43114"
95
+ xmlns="http://www.w3.org/2000/svg"
96
+ fill="none"
97
+ viewBox="0 0 24 24"
98
+ >
99
+ <rect
100
+ width="22"
101
+ height="22"
102
+ x="1"
103
+ y="1"
104
+ :fill="generateID('avax', true)"
105
+ rx="11"
106
+ />
107
+ <path
108
+ fill="#fff"
109
+ fill-rule="evenodd"
110
+ d="M12.447 6.96c-.259-.447-.67-.447-.93 0l-4.696 8.27c-.258.453-.047.812.47.812H9.65c.476-.03.905-.283 1.164-.682l2.839-4.92a1.545 1.545 0 0 0 0-1.346l-.847-1.487-.358-.647Zm3.121 5.443c-.259-.447-.676-.447-.934 0l-1.64 2.827c-.253.447-.042.811.47.811h3.244c.518 0 .73-.364.47-.81l-1.61-2.828Z"
111
+ clip-rule="evenodd"
112
+ />
113
+ <rect
114
+ v-if="stroke"
115
+ :class="strokeClass"
116
+ width="22"
117
+ height="22"
118
+ x="1"
119
+ y="1"
120
+ rx="11"
121
+ />
122
+ <defs>
123
+ <linearGradient
124
+ :id="generateID('avax')"
125
+ x1="12"
126
+ x2="12"
127
+ y1="2"
128
+ y2="22"
129
+ gradientUnits="userSpaceOnUse"
130
+ >
131
+ <stop stop-color="#FF8585" />
132
+ <stop offset="1" stop-color="#EB5757" />
133
+ </linearGradient>
134
+ </defs>
135
+ </svg>
136
+
137
+ <svg
138
+ v-else-if="chain == 1"
139
+ xmlns="http://www.w3.org/2000/svg"
140
+ fill="none"
141
+ viewBox="0 0 24 24"
142
+ >
143
+ <rect
144
+ width="22"
145
+ height="22"
146
+ x="1"
147
+ y="1"
148
+ :fill="generateID('eth', true)"
149
+ rx="11"
150
+ />
151
+ <path
152
+ fill="#fff"
153
+ d="M8 12.111 11.998 6v.003L12 6l3.998 6.11.002.001-3.998 2.177h-.002L8 12.111Z"
154
+ />
155
+ <path
156
+ fill="#fff"
157
+ d="M11.998 17.997V18L8 12.81l3.998 2.176H12L16 12.81 12 18l-.002-.003Z"
158
+ />
159
+ <rect
160
+ v-if="stroke"
161
+ :class="strokeClass"
162
+ width="22"
163
+ height="22"
164
+ x="1"
165
+ y="1"
166
+ rx="11"
167
+ />
168
+ <defs>
169
+ <linearGradient
170
+ :id="generateID('eth')"
171
+ x1="12"
172
+ x2="12"
173
+ y1="2"
174
+ y2="22"
175
+ gradientUnits="userSpaceOnUse"
176
+ >
177
+ <stop stop-color="#8E90FF" />
178
+ <stop offset="1" stop-color="#5D5FEF" />
179
+ </linearGradient>
180
+ </defs>
181
+ </svg>
182
+
183
+ <svg
184
+ v-else-if="chain == 10"
185
+ xmlns="http://www.w3.org/2000/svg"
186
+ fill="none"
187
+ viewBox="0 0 24 24"
188
+ >
189
+ <rect
190
+ width="22"
191
+ height="22"
192
+ x="1"
193
+ y="1"
194
+ :fill="generateID('opt', true)"
195
+ rx="11"
196
+ />
197
+ <path
198
+ fill="#fff"
199
+ d="M9.084 14.656c-.596 0-1.084-.14-1.464-.42-.376-.284-.564-.692-.564-1.216 0-.112.012-.244.036-.404a24.3 24.3 0 0 1 .276-1.3c.34-1.376 1.22-2.064 2.636-2.064.384 0 .732.064 1.036.196a1.532 1.532 0 0 1 .984 1.472c0 .104-.012.236-.036.396-.076.444-.164.88-.272 1.3-.176.684-.476 1.2-.908 1.54-.428.336-1.004.5-1.724.5Zm.108-1.08c.28 0 .516-.084.712-.248.2-.164.344-.416.428-.76.116-.472.204-.88.264-1.232.02-.104.032-.212.032-.324 0-.456-.236-.684-.712-.684a1.1 1.1 0 0 0-.72.248c-.196.164-.336.416-.42.76-.092.336-.18.744-.272 1.232-.02.1-.032.204-.032.316-.004.464.24.692.72.692ZM12.372 14.584c-.056 0-.096-.016-.128-.052-.024-.04-.032-.084-.024-.136l1.036-4.88a.2.2 0 0 1 .084-.136.22.22 0 0 1 .144-.052h1.996c.556 0 1 .116 1.336.344.34.232.512.564.512 1 0 .124-.016.256-.044.392-.124.576-.376 1-.76 1.276-.376.276-.892.412-1.548.412h-1.012l-.344 1.644a.215.215 0 0 1-.084.136.22.22 0 0 1-.144.052h-1.02Zm2.656-2.868a.886.886 0 0 0 .548-.172.822.822 0 0 0 .316-.496c.016-.084.024-.16.024-.224 0-.144-.044-.256-.128-.332-.084-.08-.232-.12-.436-.12h-.9l-.284 1.344h.86Z"
200
+ />
201
+ <rect
202
+ v-if="stroke"
203
+ :class="strokeClass"
204
+ width="22"
205
+ height="22"
206
+ x="1"
207
+ y="1"
208
+ rx="11"
209
+ />
210
+ <defs>
211
+ <linearGradient
212
+ :id="generateID('opt')"
213
+ x1="12"
214
+ x2="12"
215
+ y1="2"
216
+ y2="22"
217
+ gradientUnits="userSpaceOnUse"
218
+ >
219
+ <stop stop-color="#FF697A" />
220
+ <stop offset="1" stop-color="#FF0420" />
221
+ </linearGradient>
222
+ </defs>
223
+ </svg>
224
+
225
+ <svg
226
+ v-else-if="chain == 100"
227
+ xmlns="http://www.w3.org/2000/svg"
228
+ fill="none"
229
+ viewBox="0 0 24 24"
230
+ >
231
+ <rect
232
+ width="22"
233
+ height="22"
234
+ x="1"
235
+ y="1"
236
+ :fill="generateID('gnosis', true)"
237
+ rx="11"
238
+ />
239
+ <g fill="#fff" clip-path="url(#clip0_1_911)">
240
+ <path
241
+ d="M9.527 12.833c.345 0 .681-.115.953-.325L8.293 10.32c-.527.68-.4 1.662.28 2.19.276.207.61.322.954.322ZM16.032 11.271c0-.345-.115-.681-.325-.953l-2.187 2.187a1.559 1.559 0 0 0 2.512-1.234Z"
242
+ />
243
+ <path
244
+ d="m17.134 8.89-.968.968a2.204 2.204 0 0 1-3.103 3.104L12 14.024l-1.06-1.06a2.204 2.204 0 0 1-3.104-3.103l-.496-.497-.47-.473A6 6 0 1 0 18 12a5.985 5.985 0 0 0-.866-3.11Z"
245
+ />
246
+ <path
247
+ d="M16.34 7.859a5.997 5.997 0 0 0-9.1.49L12 13.114l4.76-4.763a5.804 5.804 0 0 0-.42-.491ZM12 6.785c1.402 0 2.708.541 3.69 1.528L12 12.003l-3.69-3.69A5.157 5.157 0 0 1 12 6.785Z"
248
+ />
249
+ </g>
250
+ <rect
251
+ v-if="stroke"
252
+ :class="strokeClass"
253
+ width="22"
254
+ height="22"
255
+ x="1"
256
+ y="1"
257
+ rx="11"
258
+ />
259
+ <defs>
260
+ <linearGradient
261
+ :id="generateID('gnosis')"
262
+ x1="12"
263
+ x2="12"
264
+ y1="2"
265
+ y2="22"
266
+ gradientUnits="userSpaceOnUse"
267
+ >
268
+ <stop stop-color="#2BA889" />
269
+ <stop offset="1" stop-color="#04795C" />
270
+ </linearGradient>
271
+ <clipPath id="clip0_1_911">
272
+ <path fill="#fff" d="M6 6h12v12H6z" />
273
+ </clipPath>
274
+ </defs>
275
+ </svg>
276
+
277
+ <svg
278
+ v-else-if="chain == 56"
279
+ xmlns="http://www.w3.org/2000/svg"
280
+ fill="none"
281
+ viewBox="0 0 24 24"
282
+ >
283
+ <rect
284
+ width="22"
285
+ height="22"
286
+ x="1"
287
+ y="1"
288
+ :fill="generateID('bsc', true)"
289
+ rx="11"
290
+ />
291
+ <path
292
+ fill="#fff"
293
+ d="M13.13 15.965v1.346L11.983 18l-1.113-.69v-1.345l1.113.69 1.145-.69ZM7 11.31l1.113.69v2.308l1.916 1.173v1.346L7 14.997V11.31Zm9.967 0v3.693l-3.061 1.83v-1.346l1.916-1.174v-2.307l1.145-.696ZM13.9 9.481l1.146.69v1.345l-1.917 1.174v2.34l-1.113.69-1.107-.69v-2.346l-1.987-1.173v-1.346l1.145-.69 1.917 1.174L13.9 9.48Zm-4.978 2.997 1.113.69v1.345l-1.113-.69v-1.345Zm6.124 0v1.346l-1.113.69v-1.346l1.113-.69Zm-6.933-4.17 1.145.69-1.145.689v1.345L7 10.342V8.998l1.113-.69Zm7.742 0 1.145.69v1.345l-1.146.69V9.686l-1.112-.69 1.112-.69Zm-3.871 0 1.145.69-1.145.689-1.113-.69 1.113-.69Zm0-2.308 3.062 1.83-1.113.689-1.917-1.173-1.954 1.173-1.113-.69L11.984 6Z"
294
+ />
295
+ <rect
296
+ v-if="stroke"
297
+ :class="strokeClass"
298
+ width="22"
299
+ height="22"
300
+ x="1"
301
+ y="1"
302
+ rx="11"
303
+ />
304
+ <defs>
305
+ <linearGradient
306
+ :id="generateID('bsc')"
307
+ x1="12"
308
+ x2="12"
309
+ y1="2"
310
+ y2="22"
311
+ gradientUnits="userSpaceOnUse"
312
+ >
313
+ <stop stop-color="#FFD97C" />
314
+ <stop offset="1" stop-color="#F3BA2F" />
315
+ </linearGradient>
316
+ </defs>
317
+ </svg>
318
+ <svg
319
+ v-else-if="chain == 1101"
320
+ width="24"
321
+ height="24"
322
+ viewBox="0 0 24 24"
323
+ fill="none"
324
+ xmlns="http://www.w3.org/2000/svg"
325
+ >
326
+ <rect
327
+ x="1"
328
+ y="1"
329
+ width="22"
330
+ height="22"
331
+ rx="11"
332
+ :fill="generateID('zkevm', true)"
333
+ />
334
+ <g clip-path="url(#clip0_0_68)">
335
+ <path
336
+ d="M16.4587 8.44406L12.8483 6.35851C12.5897 6.21032 12.2968 6.13235 11.9988 6.13235C11.7007 6.13235 11.4079 6.21032 11.1493 6.35851L7.53885 8.44406C7.28051 8.59322 7.06599 8.80775 6.91687 9.06611C6.76774 9.32446 6.68927 9.61753 6.68934 9.91583V14.0954C6.6915 14.3916 6.77102 14.682 6.92004 14.9379C7.06905 15.1939 7.28237 15.4064 7.53885 15.5545L11.1493 17.64C11.4076 17.7891 11.7005 17.8676 11.9988 17.8676C12.297 17.8676 12.59 17.7891 12.8483 17.64L16.4587 15.5545C16.7171 15.4053 16.9316 15.1908 17.0807 14.9324C17.2298 14.6741 17.3083 14.381 17.3082 14.0827V9.90309C17.3061 9.60696 17.2265 9.31652 17.0775 9.06058C16.9285 8.80467 16.7152 8.59213 16.4587 8.44406ZM7.53885 9.91583C7.53864 9.7665 7.57778 9.61975 7.65234 9.49037C7.72693 9.36098 7.83428 9.25356 7.9636 9.1789L11.574 7.09546C11.703 7.02038 11.8496 6.98082 11.9988 6.98082C12.148 6.98082 12.2946 7.02038 12.4235 7.09546L16.034 9.1789C16.1614 9.25247 16.2676 9.3579 16.3421 9.48485C16.4165 9.6118 16.4567 9.75594 16.4587 9.90309V10.3278C16.4576 10.6585 16.3256 10.9753 16.0916 11.2089C15.8576 11.4425 15.5406 11.5739 15.2099 11.5745H8.78763C8.33748 11.5734 7.89916 11.7188 7.53885 11.9886V9.91583ZM16.4587 14.0827C16.4589 14.232 16.4198 14.3788 16.3452 14.5082C16.2706 14.6375 16.1633 14.745 16.034 14.8196L12.4235 16.9031C12.2944 16.9776 12.1479 17.0169 11.9988 17.0169C11.8497 17.0169 11.7032 16.9776 11.574 16.9031L7.9636 14.8196C7.83613 14.7461 7.72997 14.6406 7.65551 14.5137C7.58105 14.3867 7.54084 14.2426 7.53885 14.0954V13.6707C7.53998 13.34 7.67196 13.0233 7.90597 12.7896C8.13999 12.556 8.45697 12.4246 8.78763 12.424H15.2099C15.6601 12.4251 16.0984 12.2797 16.4587 12.0099V14.0827Z"
337
+ fill="white"
338
+ />
339
+ <path
340
+ d="M10.026 9.70346H10.85V10.9374H11.6995V9.70346C11.6995 9.47816 11.61 9.26208 11.4507 9.10276C11.2914 8.94345 11.0753 8.85395 10.85 8.85395H10.026C9.80068 8.85395 9.58461 8.94345 9.42528 9.10276C9.26597 9.26208 9.17647 9.47816 9.17647 9.70346V10.9374H10.026V9.70346Z"
341
+ fill="white"
342
+ />
343
+ <path
344
+ d="M10.85 14.295H10.026V13.0611H9.17647V14.295C9.17647 14.5203 9.26597 14.7364 9.42528 14.8957C9.58461 15.055 9.80068 15.1445 10.026 15.1445H10.85C11.0753 15.1445 11.2914 15.055 11.4507 14.8957C11.61 14.7364 11.6995 14.5203 11.6995 14.295V13.0611H10.85V14.295Z"
345
+ fill="white"
346
+ />
347
+ <path
348
+ d="M13.3707 9.70346H14.1968V10.9374H15.0463V9.70346C15.0463 9.47816 14.9568 9.26208 14.7975 9.10276C14.6382 8.94345 14.4221 8.85395 14.1968 8.85395H13.3707C13.1454 8.85395 12.9293 8.94345 12.77 9.10276C12.6106 9.26208 12.5211 9.47816 12.5211 9.70346V10.9374H13.3707V9.70346Z"
349
+ fill="white"
350
+ />
351
+ <path
352
+ d="M14.1968 14.295H13.3707V13.0611H12.5211V14.295C12.5211 14.5203 12.6106 14.7364 12.77 14.8957C12.9293 15.055 13.1454 15.1445 13.3707 15.1445H14.1968C14.4221 15.1445 14.6382 15.055 14.7975 14.8957C14.9568 14.7364 15.0463 14.5203 15.0463 14.295V13.0611H14.1968V14.295Z"
353
+ fill="white"
354
+ />
355
+ </g>
356
+ <rect
357
+ x="1"
358
+ y="1"
359
+ width="22"
360
+ height="22"
361
+ rx="11"
362
+ v-if="stroke"
363
+ :class="strokeClass"
364
+ />
365
+ <defs>
366
+ <linearGradient
367
+ :id="generateID('zkevm')"
368
+ x1="12"
369
+ y1="2"
370
+ x2="12"
371
+ y2="22"
372
+ gradientUnits="userSpaceOnUse"
373
+ >
374
+ <stop stop-color="#A177FA" />
375
+ <stop offset="1" stop-color="#7A4ADD" />
376
+ </linearGradient>
377
+ <clipPath id="clip0_0_68">
378
+ <rect width="12" height="12" fill="white" transform="translate(6 6)" />
379
+ </clipPath>
380
+ </defs>
381
+ </svg>
382
+
383
+ <template v-else>
384
+ <svg
385
+ v-bind="$attrs"
386
+ class="dark:hidden block"
387
+ xmlns="http://www.w3.org/2000/svg"
388
+ fill="none"
389
+ viewBox="0 0 20 20"
390
+ >
391
+ <rect width="20" height="20" fill="#CBD5E1" rx="10" />
392
+ <path
393
+ fill="#fff"
394
+ fill-rule="evenodd"
395
+ d="M10 3.999A6 6 0 1 0 10 16a6 6 0 0 0 0-12.001Zm0 10.8a4.8 4.8 0 1 1 0-9.6 4.8 4.8 0 0 1 0 9.6ZM6.399 9.67A3.6 3.6 0 0 1 9.68 6.4a.3.3 0 0 1 .318.318v.6a.294.294 0 0 1-.264.282A2.4 2.4 0 0 0 7.6 9.735a.294.294 0 0 1-.3.264h-.6a.312.312 0 0 1-.222-.096.336.336 0 0 1-.078-.234Z"
396
+ clip-rule="evenodd"
397
+ />
398
+ </svg>
399
+ <svg
400
+ v-bind="$attrs"
401
+ class="dark:block hidden"
402
+ xmlns="http://www.w3.org/2000/svg"
403
+ fill="none"
404
+ viewBox="0 0 20 20"
405
+ >
406
+ <rect width="20" height="20" fill="#334155" rx="10" />
407
+ <path
408
+ fill="#97A2B7"
409
+ fill-rule="evenodd"
410
+ d="M10 3.999A6 6 0 1 0 10 16a6 6 0 0 0 0-12.001Zm0 10.8a4.8 4.8 0 1 1 0-9.6 4.8 4.8 0 0 1 0 9.6ZM6.399 9.67A3.6 3.6 0 0 1 9.68 6.4a.3.3 0 0 1 .318.318v.6a.294.294 0 0 1-.264.282A2.4 2.4 0 0 0 7.6 9.735a.294.294 0 0 1-.3.264h-.6a.312.312 0 0 1-.222-.096.336.336 0 0 1-.078-.234Z"
411
+ clip-rule="evenodd"
412
+ />
413
+ </svg>
414
+ </template>
415
+ </template>
416
+
417
+ <script lang="ts" setup>
418
+ defineProps<{
419
+ chain: ChainId;
420
+ stroke?: boolean;
421
+ }>();
422
+
423
+ const randomId = Math.random().toString(36).substr(2, 9);
424
+
425
+ const generateID = (prefix: string, wrapURL = false) => {
426
+ const merged = `${prefix}-${randomId}`;
427
+ return wrapURL ? `url(#${merged})` : merged;
428
+ };
429
+
430
+ const strokeClass = "dark:stroke-gray-900 stroke-slate-50 stroke-2";
431
+ </script>
package/nuxt.config.ts ADDED
@@ -0,0 +1,4 @@
1
+ // https://nuxt.com/docs/api/configuration/nuxt-config
2
+ export default defineNuxtConfig({
3
+
4
+ })
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@instadapp/avocado-base",
3
+ "version": "0.0.0-dev.0d5070b",
4
+ "type": "module",
5
+ "main": "./nuxt.config.ts",
6
+ "scripts": {
7
+ "build": "nuxt build",
8
+ "dev": "nuxt dev",
9
+ "generate": "nuxt generate",
10
+ "preview": "nuxt preview"
11
+ },
12
+ "devDependencies": {
13
+ "nuxt": "^3.3.3",
14
+ "@instadapp/avocado": "^0.1.9",
15
+ "@instadapp/avocado-dev": "npm:@instadapp/avocado@dev"
16
+ },
17
+ "dependencies": {
18
+ "ethers": "^5.7.2"
19
+ }
20
+ }
@@ -0,0 +1,2 @@
1
+ export * from "../../utils/avocado";
2
+ export * from "../../utils/network";
package/tsconfig.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ // https://nuxt.com/docs/guide/concepts/typescript
3
+ "extends": "./.nuxt/tsconfig.json"
4
+ }
@@ -0,0 +1,22 @@
1
+ export const AVO_PROD_CHAIN_ID = 634;
2
+ export const AVO_PROD_CHAIN_NAME = "Avocado";
3
+
4
+ export const AVO_STAGING_CHAIN_ID = 63400;
5
+ export const AVO_STAGING_CHAIN_NAME = "Avocado Testnet";
6
+
7
+ export const AVO_PROD_EXPLORER_URL = "https://avoscan.co";
8
+ export const AVO_STAGING_EXPLORER_URL = "https://explorer.avocado.instad.app";
9
+
10
+ export const AVO_PROD_FORWARDER_ADDR =
11
+ "0x375F6B0CD12b34Dc28e34C26853a37012C24dDE5";
12
+ export const AVO_STAGING_FORWARDER_ADDR =
13
+ "0x8CDaAC0371a443985c6Faf07938dDAa7A5818674";
14
+
15
+ export const AVO_PROD_DEPOSIT_ADDRESS =
16
+ "0xE8385fB3A5F15dED06EB5E20E5A81BF43115eb8E";
17
+ export const AVO_STAGING_DEPOSIT_ADDRESS =
18
+ "0x853e991d800Dfd6bC1F83AED3310e859482323dc";
19
+
20
+ export const AVO_PROD_RPC_URL = "https://rpc.avocado.instadapp.io";
21
+
22
+ export const AVO_STAGING_RPC_URL = "https://rpc.avocado.instad.app";
@@ -0,0 +1,192 @@
1
+ import { ethers } from "ethers";
2
+ import {
3
+ AVO_PROD_CHAIN_NAME,
4
+ AVO_PROD_CHAIN_ID,
5
+ AVO_STAGING_CHAIN_NAME,
6
+ AVO_STAGING_RPC_URL,
7
+ AVO_PROD_RPC_URL,
8
+ AVO_STAGING_CHAIN_ID,
9
+ } from "./avocado";
10
+
11
+ export const bridgeDisabledNetworks = [1101];
12
+
13
+ export const networks: Network[] = [
14
+ {
15
+ name: "Mainnet",
16
+ chainId: 1,
17
+ params: {
18
+ rpcUrls: ["https://rpc.ankr.com/eth"],
19
+ nativeCurrency: {
20
+ name: "Ethereum",
21
+ symbol: "ETH",
22
+ decimals: 18,
23
+ },
24
+ },
25
+ },
26
+ {
27
+ name: "Polygon",
28
+ chainId: 137,
29
+ params: {
30
+ chainName: "Matic(Polygon) Mainnet",
31
+ nativeCurrency: {
32
+ name: "Matic",
33
+ symbol: "MATIC",
34
+ decimals: 18,
35
+ },
36
+ rpcUrls: ["https://polygon-rpc.com"],
37
+ blockExplorerUrls: ["https://polygonscan.com/"],
38
+ },
39
+ },
40
+ {
41
+ name: "Arbitrum",
42
+ chainId: 42161,
43
+ params: {
44
+ chainName: "Arbitrum One",
45
+ nativeCurrency: {
46
+ name: "Ethereum",
47
+ symbol: "ETH",
48
+ decimals: 18,
49
+ },
50
+ rpcUrls: ["https://arb1.arbitrum.io/rpc"],
51
+ blockExplorerUrls: ["https://arbiscan.io"],
52
+ },
53
+ },
54
+ {
55
+ name: "Optimism",
56
+ chainId: 10,
57
+ params: {
58
+ chainName: "Optimistic Ethereum",
59
+ nativeCurrency: {
60
+ name: "Ethereum",
61
+ symbol: "ETH",
62
+ decimals: 18,
63
+ },
64
+ rpcUrls: ["https://mainnet.optimism.io"],
65
+ blockExplorerUrls: ["https://optimistic.etherscan.io"],
66
+ },
67
+ },
68
+ {
69
+ name: "Avalanche",
70
+ chainId: 43114,
71
+ params: {
72
+ chainName: "Avalanche Network",
73
+ nativeCurrency: {
74
+ name: "Avalanche",
75
+ symbol: "AVAX",
76
+ decimals: 18,
77
+ },
78
+ rpcUrls: ["https://api.avax.network/ext/bc/C/rpc"],
79
+ blockExplorerUrls: ["https://snowtrace.io/"],
80
+ },
81
+ },
82
+ {
83
+ name: "BSC",
84
+ chainId: 56,
85
+ params: {
86
+ chainName: "Binance Smart Chain",
87
+ rpcUrls: ["https://rpc.ankr.com/bsc"],
88
+ nativeCurrency: {
89
+ name: "Binance Coin",
90
+ symbol: "BNB",
91
+ decimals: 18,
92
+ },
93
+ },
94
+ },
95
+ {
96
+ name: "Gnosis",
97
+ chainId: 100,
98
+ params: {
99
+ chainName: "Gnosis Safe",
100
+ rpcUrls: ["https://rpc.ankr.com/gnosis"],
101
+ nativeCurrency: {
102
+ name: "xdaistable",
103
+ symbol: "xDAI",
104
+ decimals: 18,
105
+ },
106
+ },
107
+ },
108
+ {
109
+ name: "Polygon zkEVM",
110
+ chainId: 1101,
111
+ params: {
112
+ chainName: "polygon zkEVM",
113
+ rpcUrls: ["https://rpc.ankr.com/polygon_zkevm"],
114
+ nativeCurrency: {
115
+ name: "Ethereum",
116
+ symbol: "ETH",
117
+ decimals: 18,
118
+ },
119
+ },
120
+ },
121
+ {
122
+ name: AVO_PROD_CHAIN_NAME,
123
+ chainId: AVO_PROD_CHAIN_ID,
124
+ params: {
125
+ chainName: AVO_PROD_CHAIN_NAME,
126
+ nativeCurrency: {
127
+ name: "Avocado",
128
+ symbol: "USDC",
129
+ decimals: 18,
130
+ },
131
+ iconUrls: ["https://avocado.instadapp.io/logo.svg"],
132
+ rpcUrls: [AVO_PROD_RPC_URL],
133
+ blockExplorerUrls: ["https://avocado.instadapp.io"],
134
+ },
135
+ },
136
+ {
137
+ name: AVO_STAGING_CHAIN_NAME,
138
+ chainId: AVO_STAGING_CHAIN_ID,
139
+ params: {
140
+ chainName: AVO_STAGING_CHAIN_NAME,
141
+ nativeCurrency: {
142
+ name: "Avocado",
143
+ symbol: "USDC",
144
+ decimals: 18,
145
+ },
146
+ iconUrls: ["https://avocado.instadapp.io/logo.svg"],
147
+ rpcUrls: [AVO_STAGING_RPC_URL],
148
+ blockExplorerUrls: ["https://avocado.instadapp.io"],
149
+ },
150
+ },
151
+ ];
152
+
153
+ export const getNetworkByChainId = (
154
+ chainId: Network["chainId"] | number | string
155
+ ) => {
156
+ return networks.find((i) => i.chainId === Number(chainId))!;
157
+ };
158
+
159
+ export const availableNetworks = networks.filter(
160
+ (network) =>
161
+ network.chainId != AVO_STAGING_CHAIN_ID &&
162
+ network.chainId != AVO_PROD_CHAIN_ID
163
+ );
164
+
165
+ export const chainIdToName = (chainId: ChainId | number | string) => {
166
+ const network = getNetworkByChainId(chainId);
167
+ return network.name;
168
+ };
169
+
170
+ export const getRpcURLByChainId = (chainId: ChainId | number | string) => {
171
+ const network = getNetworkByChainId(chainId);
172
+ return network.params.rpcUrls[0];
173
+ };
174
+
175
+ export const RPCMap = networks.reduce((acc, network) => {
176
+ acc[network.chainId] = network.params.rpcUrls[0];
177
+ return acc;
178
+ }, {} as Record<number, string>);
179
+
180
+ export const networkIds = networks.map((network) => network.chainId);
181
+
182
+ const rpcInstances: Record<string, ethers.providers.JsonRpcProvider> = {};
183
+
184
+ export const getRpcProvider = (chainId: number | string) => {
185
+ if (!rpcInstances[chainId]) {
186
+ rpcInstances[chainId] = new ethers.providers.JsonRpcProvider(
187
+ getRpcURLByChainId(Number(chainId))
188
+ );
189
+ }
190
+
191
+ return rpcInstances[chainId];
192
+ };
@@ -0,0 +1,17 @@
1
+ type ChainId = 1 | 137 | 42161 | 10 | 56 | 43114 | 100 | 1101 | 634 | 63400;
2
+
3
+ interface Network {
4
+ name: string;
5
+ chainId: ChainId;
6
+ params: {
7
+ chainName?: string;
8
+ rpcUrls: string[];
9
+ blockExplorerUrls?: string[];
10
+ iconUrls?: string[];
11
+ nativeCurrency?: {
12
+ name: string;
13
+ symbol: string;
14
+ decimals: number;
15
+ };
16
+ };
17
+ }