@instadapp/avocado-base 0.0.0-dev.f6bd350 → 0.0.0-dev.f823550

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.
@@ -24,6 +24,7 @@ const token = asyncComputed(() => {
24
24
  const formattedAmount = computed(() =>
25
25
  formatDecimal(
26
26
  fromWei(props.metadata?.amount, token?.value?.decimals).toFixed(),
27
+ 5,
27
28
  ),
28
29
  )
29
30
  </script>
package/nuxt.config.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // import ViteComponents from "unplugin-vue-components/vite";
3
3
 
4
4
  export default defineNuxtConfig({
5
- modules: ['@nuxtjs/tailwindcss', 'nuxt-svgo', '@vueuse/nuxt', '@nuxt/eslint'],
5
+ modules: ['@nuxtjs/tailwindcss', 'nuxt-svgo', '@vueuse/nuxt'],
6
6
 
7
7
  svgo: {
8
8
  defaultImport: 'component',
@@ -11,19 +11,5 @@ export default defineNuxtConfig({
11
11
  plugins: ['prefixIds'],
12
12
  },
13
13
  },
14
-
15
- // vite: {
16
- // plugins: [
17
- // ViteComponents({
18
- // dts: true,
19
- // }),
20
- // ],
21
- // },
22
- eslint: {
23
- config: {
24
- standalone: false,
25
- },
26
- },
27
-
28
14
  compatibilityDate: '2024-09-18',
29
15
  })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@instadapp/avocado-base",
3
3
  "type": "module",
4
- "version": "0.0.0-dev.f6bd350",
4
+ "version": "0.0.0-dev.f823550",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "global.d.ts",
7
7
  "engines": {
@@ -15,18 +15,16 @@
15
15
  "typecheck": "nuxi typecheck"
16
16
  },
17
17
  "dependencies": {
18
- "@antfu/eslint-config": "^3.6.2",
19
- "@vueuse/nuxt": "^10.2.0",
20
- "bignumber.js": "^9.1.1",
21
- "ethers": "^5.7.2",
22
- "viem": "^2.21.54",
23
- "xxhashjs": "^0.2.2"
18
+ "@vueuse/nuxt": "10.2.0",
19
+ "bignumber.js": "9.1.1",
20
+ "ethers": "5.7.2",
21
+ "viem": "2.47.4",
22
+ "xxhashjs": "0.2.2"
24
23
  },
25
24
  "devDependencies": {
26
- "@nuxt/eslint": "^0.5.7",
27
- "@nuxtjs/tailwindcss": "^6.12.1",
25
+ "@nuxtjs/tailwindcss": "6.12.1",
28
26
  "nuxt": "3.13.2",
29
- "nuxt-svgo": "^4.0.6",
30
- "vue-tippy": "^6.0.0"
27
+ "nuxt-svgo": "4.2.6",
28
+ "vue-tippy": "6.0.0"
31
29
  }
32
30
  }
package/utils/network.ts CHANGED
@@ -18,6 +18,8 @@ import {
18
18
  polygon,
19
19
  polygonZkEvm,
20
20
  scroll,
21
+ ink,
22
+ plasma,
21
23
  } from 'viem/chains'
22
24
  import {
23
25
  AVO_PROD_CHAIN_ID,
@@ -64,26 +66,7 @@ const avocadoStaging = defineChain({
64
66
  blockExplorers: {
65
67
  default: { name: 'Avoscan', url: AVO_STAGING_EXPLORER_URL },
66
68
  },
67
- })
68
69
 
69
- const sonic = defineChain({
70
- id: 146,
71
- name: 'Sonic',
72
- nativeCurrency: {
73
- decimals: 18,
74
- name: 'Sonic',
75
- symbol: 'S',
76
- },
77
- rpcUrls: {
78
- default: { http: ['https://rpc.soniclabs.com'] },
79
- },
80
- blockExplorers: {
81
- default: {
82
- name: 'Sonic Explorer',
83
- url: 'https://explorer.soniclabs.com',
84
- },
85
- },
86
- testnet: false,
87
70
  })
88
71
 
89
72
  export const networks: Network[] = [
@@ -108,8 +91,8 @@ export const networks: Network[] = [
108
91
  params: {
109
92
  chainName: 'Matic(Polygon) Mainnet',
110
93
  nativeCurrency: {
111
- name: 'Matic',
112
- symbol: 'MATIC',
94
+ name: 'POL (ex-MATIC)',
95
+ symbol: 'POL',
113
96
  decimals: 18,
114
97
  },
115
98
  rpcUrls: ['https://polygon-rpc.com'],
@@ -528,24 +511,68 @@ export const networks: Network[] = [
528
511
  ankrName: 'linea',
529
512
  },
530
513
  {
531
- name: sonic.name,
532
- chainId: sonic.id,
533
- explorerUrl: sonic.blockExplorers.default.url,
534
- legacySupported: false,
535
- viemChain: sonic,
514
+ chainId: plasma.id,
515
+ name: plasma.name,
516
+ apiURL: null,
536
517
  color: '#78d64b',
518
+ explorerUrl: plasma.blockExplorers.default.url,
519
+ fakeTransactionHash: '0x3523aad6a790c81ef57e1afd4320760b7cea6dd3424ccd582e00ffc9bdc316e6',
520
+ legacySupported: false,
521
+ get serverRpcUrl() {
522
+ return process.env?.PLASMA_RPC_URL || this.params.rpcUrls[0]
523
+ },
524
+ viemChain: plasma,
525
+ params: {
526
+ rpcUrls: plasma.rpcUrls.default.http,
527
+ chainName: plasma.name,
528
+ nativeCurrency: {
529
+ name: plasma.nativeCurrency.name,
530
+ symbol: plasma.nativeCurrency.symbol,
531
+ decimals: plasma.nativeCurrency.decimals,
532
+ },
533
+ },
534
+ },
535
+ {
536
+ chainId: ink.id,
537
+ name: ink.name,
537
538
  apiURL: null,
538
- fakeTransactionHash: '0xc8fe01a980987295c36e898b4681fa8c937eb8dfd48a3ae080956b36a66195ee',
539
+ color: '#78d64b',
540
+ explorerUrl: ink.blockExplorers.default.url,
541
+ fakeTransactionHash: '0x3523aad6a790c81ef57e1afd4320760b7cea6dd3424ccd582e00ffc9bdc316e6',
542
+ legacySupported: false,
539
543
  get serverRpcUrl() {
540
- return process.env?.SONIC_RPC_URL || this.params.rpcUrls[0]
544
+ return process.env?.INK_RPC_URL || this.params.rpcUrls[0]
541
545
  },
546
+ viemChain: ink,
542
547
  params: {
543
- rpcUrls: sonic.rpcUrls.default.http as any,
544
- chainName: sonic.name,
545
- nativeCurrency: sonic.nativeCurrency,
548
+ rpcUrls: ink.rpcUrls.default.http,
549
+ chainName: ink.name,
550
+ nativeCurrency: {
551
+ name: ink.nativeCurrency.name,
552
+ symbol: ink.nativeCurrency.symbol,
553
+ decimals: ink.nativeCurrency.decimals,
554
+ },
546
555
  },
547
556
  },
548
557
  // {
558
+ // name: sonic.name,
559
+ // chainId: sonic.id,
560
+ // explorerUrl: sonic.blockExplorers.default.url,
561
+ // legacySupported: false,
562
+ // viemChain: sonic,
563
+ // color: '#78d64b',
564
+ // apiURL: null,
565
+ // fakeTransactionHash: '0xc8fe01a980987295c36e898b4681fa8c937eb8dfd48a3ae080956b36a66195ee',
566
+ // get serverRpcUrl() {
567
+ // return process.env?.SONIC_RPC_URL || this.params.rpcUrls[0]
568
+ // },
569
+ // params: {
570
+ // rpcUrls: sonic.rpcUrls.default.http as any,
571
+ // chainName: sonic.name,
572
+ // nativeCurrency: sonic.nativeCurrency,
573
+ // },
574
+ // },
575
+ // {
549
576
  // name: "Manta Pacific",
550
577
  // chainId: 169,
551
578
  // explorerUrl: "https://pacific-explorer.manta.network",
package/utils/utils.d.ts CHANGED
@@ -23,6 +23,8 @@ declare global {
23
23
  | 81457
24
24
  | 59144
25
25
  | 146
26
+ | 9745
27
+ | 57073
26
28
 
27
29
  type ISlackMessageType = 'danger' | 'error' | 'success' | 'banner'
28
30
 
@@ -52,7 +54,7 @@ declare global {
52
54
  params: {
53
55
  chainName?: string
54
56
  iconUrls?: string[]
55
- rpcUrls: string[]
57
+ rpcUrls: string[] | readonly string[]
56
58
  nativeCurrency?: {
57
59
  name: string
58
60
  symbol: string
package/components.d.ts DELETED
@@ -1,13 +0,0 @@
1
- /* eslint-disable */
2
- /* prettier-ignore */
3
- // @ts-nocheck
4
- // Generated by unplugin-vue-components
5
- // Read more: https://github.com/vuejs/core/pull/3399
6
- export {}
7
-
8
- declare module 'vue' {
9
- export interface GlobalComponents {
10
- RouterLink: typeof import('vue-router')['RouterLink']
11
- RouterView: typeof import('vue-router')['RouterView']
12
- }
13
- }
package/eslint.config.mjs DELETED
@@ -1,34 +0,0 @@
1
- // @ts-check
2
- import antfu from '@antfu/eslint-config'
3
- import withNuxt from './.nuxt/eslint.config.mjs'
4
-
5
- export default withNuxt(
6
- antfu({
7
- ignores: [
8
- '*.png',
9
- '*.ico',
10
- '*.toml',
11
- '*.yml',
12
- '.github/',
13
- 'deployments/',
14
- '*.patch',
15
- '*.txt',
16
- 'Dockerfile',
17
- 'public/',
18
- 'contracts/',
19
- 'yarn.lock',
20
- ],
21
- yaml: false,
22
- rules: {
23
- 'style/max-statements-per-line': 'off',
24
- 'max-statements-per-line': 'off',
25
- '@stylistic/max-statements-per-line': 'off',
26
- 'vue/return-in-computed-property': 'off',
27
- 'no-console': 'off',
28
- 'ts/ban-ts-comment': 'off',
29
- 'vue/prop-name-casing': 'off',
30
- 'node/prefer-global/process': 'off',
31
- 'eqeqeq': 'off',
32
- },
33
- }),
34
- )