@instadapp/avocado-base 0.3.2 → 0.3.4

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,7 +24,7 @@ const token = asyncComputed(() => {
24
24
  const formattedAmount = computed(() =>
25
25
  formatDecimal(
26
26
  fromWei(props.metadata?.amount, token?.value?.decimals).toFixed(),
27
- 3,
27
+ 5,
28
28
  ),
29
29
  )
30
30
  </script>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@instadapp/avocado-base",
3
3
  "type": "module",
4
- "version": "0.3.2",
4
+ "version": "0.3.4",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "global.d.ts",
7
7
  "engines": {
package/utils/network.ts CHANGED
@@ -34,6 +34,32 @@ export const bridgeDisabledNetworks = []
34
34
 
35
35
  export const networksSimulationNotSupported = [1313161554, 1101]
36
36
 
37
+ const plasma = defineChain({
38
+ id: 9745,
39
+ name: 'Plasma',
40
+ nativeCurrency: {
41
+ name: 'Plasma',
42
+ symbol: 'XPL',
43
+ decimals: 18,
44
+ },
45
+ rpcUrls: {
46
+ default: {
47
+ http: ['https://rpc.plasma.to'],
48
+ },
49
+ },
50
+ blockExplorers: {
51
+ default: {
52
+ name: 'PlasmaScan',
53
+ url: 'https://plasmascan.to',
54
+ },
55
+ },
56
+ contracts: {
57
+ multicall3: {
58
+ address: '0xcA11bde05977b3631167028862bE2a173976CA11',
59
+ },
60
+ },
61
+ })
62
+
37
63
  const avocado = defineChain({
38
64
  id: AVO_PROD_CHAIN_ID,
39
65
  name: AVO_PROD_CHAIN_NAME,
@@ -67,32 +93,6 @@ const avocadoStaging = defineChain({
67
93
 
68
94
  })
69
95
 
70
- const sonic = defineChain({
71
- id: 146,
72
- name: 'Sonic',
73
- nativeCurrency: {
74
- decimals: 18,
75
- name: 'Sonic',
76
- symbol: 'S',
77
- },
78
- rpcUrls: {
79
- default: { http: ['https://rpc.soniclabs.com'] },
80
- },
81
- blockExplorers: {
82
- default: {
83
- name: 'Sonic Explorer',
84
- url: 'https://sonicscan.org',
85
- },
86
- },
87
- testnet: false,
88
- contracts: {
89
- multicall3: {
90
- address: '0x266F33e4E7B44Af88F5B9171d3b5222cc1502b27',
91
- blockCreated: 269715,
92
- },
93
- },
94
- })
95
-
96
96
  export const networks: Network[] = [
97
97
  {
98
98
  name: 'Polygon',
@@ -534,6 +534,29 @@ export const networks: Network[] = [
534
534
  viemChain: linea,
535
535
  ankrName: 'linea',
536
536
  },
537
+ {
538
+ chainId: plasma.id,
539
+ name: plasma.name,
540
+ apiURL: null,
541
+ color: '#78d64b',
542
+ explorerUrl: plasma.blockExplorers.default.url,
543
+ fakeTransactionHash: '0x3523aad6a790c81ef57e1afd4320760b7cea6dd3424ccd582e00ffc9bdc316e6',
544
+ legacySupported: false,
545
+ get serverRpcUrl() {
546
+ return process.env?.PLASMA_RPC_URL || this.params.rpcUrls[0]
547
+ },
548
+ viemChain: plasma,
549
+ params: {
550
+ rpcUrls: plasma.rpcUrls.default.http,
551
+ chainName: plasma.name,
552
+ nativeCurrency: {
553
+ name: plasma.nativeCurrency.name,
554
+ symbol: plasma.nativeCurrency.symbol,
555
+ decimals: plasma.nativeCurrency.decimals,
556
+ },
557
+ },
558
+
559
+ },
537
560
  // {
538
561
  // name: sonic.name,
539
562
  // chainId: sonic.id,
package/utils/utils.d.ts CHANGED
@@ -23,6 +23,7 @@ declare global {
23
23
  | 81457
24
24
  | 59144
25
25
  | 146
26
+ | 9745
26
27
 
27
28
  type ISlackMessageType = 'danger' | 'error' | 'success' | 'banner'
28
29
 
@@ -52,7 +53,7 @@ declare global {
52
53
  params: {
53
54
  chainName?: string
54
55
  iconUrls?: string[]
55
- rpcUrls: string[]
56
+ rpcUrls: string[] | readonly string[]
56
57
  nativeCurrency?: {
57
58
  name: string
58
59
  symbol: string