@instadapp/avocado-base 0.3.0 → 0.3.3
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 +1 -1
- package/utils/network.ts +62 -39
- package/utils/utils.d.ts +2 -1
package/package.json
CHANGED
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',
|
|
@@ -115,8 +115,8 @@ export const networks: Network[] = [
|
|
|
115
115
|
params: {
|
|
116
116
|
chainName: 'Matic(Polygon) Mainnet',
|
|
117
117
|
nativeCurrency: {
|
|
118
|
-
name: '
|
|
119
|
-
symbol: '
|
|
118
|
+
name: 'POL (ex-MATIC)',
|
|
119
|
+
symbol: 'POL',
|
|
120
120
|
decimals: 18,
|
|
121
121
|
},
|
|
122
122
|
rpcUrls: ['https://polygon-rpc.com'],
|
|
@@ -535,24 +535,47 @@ export const networks: Network[] = [
|
|
|
535
535
|
ankrName: 'linea',
|
|
536
536
|
},
|
|
537
537
|
{
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
explorerUrl: sonic.blockExplorers.default.url,
|
|
541
|
-
legacySupported: false,
|
|
542
|
-
viemChain: sonic,
|
|
543
|
-
color: '#78d64b',
|
|
538
|
+
chainId: plasma.id,
|
|
539
|
+
name: plasma.name,
|
|
544
540
|
apiURL: null,
|
|
545
|
-
|
|
541
|
+
color: '#78d64b',
|
|
542
|
+
explorerUrl: plasma.blockExplorers.default.url,
|
|
543
|
+
fakeTransactionHash: '0x3523aad6a790c81ef57e1afd4320760b7cea6dd3424ccd582e00ffc9bdc316e6',
|
|
544
|
+
legacySupported: false,
|
|
546
545
|
get serverRpcUrl() {
|
|
547
|
-
return process.env?.
|
|
546
|
+
return process.env?.PLASMA_RPC_URL || this.params.rpcUrls[0]
|
|
548
547
|
},
|
|
548
|
+
viemChain: plasma,
|
|
549
549
|
params: {
|
|
550
|
-
rpcUrls:
|
|
551
|
-
chainName:
|
|
552
|
-
nativeCurrency:
|
|
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
|
+
},
|
|
553
557
|
},
|
|
558
|
+
|
|
554
559
|
},
|
|
555
560
|
// {
|
|
561
|
+
// name: sonic.name,
|
|
562
|
+
// chainId: sonic.id,
|
|
563
|
+
// explorerUrl: sonic.blockExplorers.default.url,
|
|
564
|
+
// legacySupported: false,
|
|
565
|
+
// viemChain: sonic,
|
|
566
|
+
// color: '#78d64b',
|
|
567
|
+
// apiURL: null,
|
|
568
|
+
// fakeTransactionHash: '0xc8fe01a980987295c36e898b4681fa8c937eb8dfd48a3ae080956b36a66195ee',
|
|
569
|
+
// get serverRpcUrl() {
|
|
570
|
+
// return process.env?.SONIC_RPC_URL || this.params.rpcUrls[0]
|
|
571
|
+
// },
|
|
572
|
+
// params: {
|
|
573
|
+
// rpcUrls: sonic.rpcUrls.default.http as any,
|
|
574
|
+
// chainName: sonic.name,
|
|
575
|
+
// nativeCurrency: sonic.nativeCurrency,
|
|
576
|
+
// },
|
|
577
|
+
// },
|
|
578
|
+
// {
|
|
556
579
|
// name: "Manta Pacific",
|
|
557
580
|
// chainId: 169,
|
|
558
581
|
// explorerUrl: "https://pacific-explorer.manta.network",
|
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
|