@instadapp/avocado-base 0.2.3 → 0.2.7

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@instadapp/avocado-base",
3
3
  "type": "module",
4
- "version": "0.2.3",
4
+ "version": "0.2.7",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "global.d.ts",
7
7
  "engines": {
@@ -19,7 +19,7 @@
19
19
  "@vueuse/nuxt": "^10.2.0",
20
20
  "bignumber.js": "^9.1.1",
21
21
  "ethers": "^5.7.2",
22
- "viem": "^2.19.6",
22
+ "viem": "^2.21.54",
23
23
  "xxhashjs": "^0.2.2"
24
24
  },
25
25
  "devDependencies": {
package/utils/network.ts CHANGED
@@ -66,6 +66,26 @@ const avocadoStaging = defineChain({
66
66
  },
67
67
  })
68
68
 
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
+ })
88
+
69
89
  export const networks: Network[] = [
70
90
  {
71
91
  name: 'Polygon',
@@ -507,6 +527,24 @@ export const networks: Network[] = [
507
527
  viemChain: linea,
508
528
  ankrName: 'linea',
509
529
  },
530
+ {
531
+ name: sonic.name,
532
+ chainId: sonic.id,
533
+ explorerUrl: sonic.blockExplorers.default.url,
534
+ legacySupported: false,
535
+ viemChain: sonic,
536
+ color: '#78d64b',
537
+ apiURL: null,
538
+ fakeTransactionHash: '0xc8fe01a980987295c36e898b4681fa8c937eb8dfd48a3ae080956b36a66195ee',
539
+ get serverRpcUrl() {
540
+ return process.env?.SONIC_RPC_URL || this.params.rpcUrls[0]
541
+ },
542
+ params: {
543
+ rpcUrls: sonic.rpcUrls.default.http as any,
544
+ chainName: sonic.name,
545
+ nativeCurrency: sonic.nativeCurrency,
546
+ },
547
+ },
510
548
  // {
511
549
  // name: "Manta Pacific",
512
550
  // chainId: 169,
package/utils/utils.d.ts CHANGED
@@ -22,6 +22,7 @@ declare global {
22
22
  | 34443
23
23
  | 81457
24
24
  | 59144
25
+ | 146
25
26
 
26
27
  type ISlackMessageType = 'danger' | 'error' | 'success' | 'banner'
27
28