@instadapp/avocado-base 0.0.0-dev.8596b31 → 0.0.0-dev.85c1e27

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.
@@ -3,7 +3,7 @@ name: NPM Publish(Dev)
3
3
  on:
4
4
  push:
5
5
  branches:
6
- - 'main'
6
+ - "main"
7
7
 
8
8
  jobs:
9
9
  dev-npm-publish:
@@ -18,7 +18,7 @@ jobs:
18
18
 
19
19
  - uses: actions/setup-node@v3
20
20
  with:
21
- node-version: 16
21
+ node-version: ">=v18.18.0"
22
22
 
23
23
  - uses: actions/cache@v3
24
24
  with:
@@ -48,6 +48,3 @@ jobs:
48
48
  token: ${{ secrets.NPM_AUTH_TOKEN }}
49
49
  tag: dev
50
50
  access: public
51
-
52
-
53
-
@@ -1,19 +1,19 @@
1
1
  <script setup lang="ts">
2
- import RefreshSVG from '~/assets/images/icons/refresh.svg'
3
- import BridgeSVG from '~/assets/images/icons/bridge.svg'
4
- import CrossTransferSVG from '~/assets/images/icons/cross-transfer.svg'
5
- import TransferSVG from '~/assets/images/icons/transfer.svg'
6
- import PlusCircleSVG from '~/assets/images/icons/plus-circle.svg'
7
- import Trash2SVG from '~/assets/images/icons/trash-2.svg'
8
- import ChangeThresholdSVG from '~/assets/images/icons/change-threshold.svg'
9
- import DappSVG from '~/assets/images/icons/dapp.svg'
10
- import DeploySVG from '~/assets/images/icons/deploy.svg'
11
- import GasSVG from '~/assets/images/icons/gas.svg'
12
- import InstadappProSVG from '~/assets/images/icons/instadapp-pro.svg'
13
- import PermitSignSVG from '~/assets/images/icons/permit-sign.svg'
14
- import RejectProposalSVG from '~/assets/images/icons/reject-proposal.svg'
15
- import UpgradeSVG from '~/assets/images/icons/upgrade.svg'
16
- import HammerSVG from '~/assets/images/icons/hammer.svg'
2
+ import RefreshSVG from '../assets/images/icons/refresh.svg'
3
+ import BridgeSVG from '../assets/images/icons/bridge.svg'
4
+ import CrossTransferSVG from '../assets/images/icons/cross-transfer.svg'
5
+ import TransferSVG from '../assets/images/icons/transfer.svg'
6
+ import PlusCircleSVG from '../assets/images/icons/plus-circle.svg'
7
+ import Trash2SVG from '../assets/images/icons/trash-2.svg'
8
+ import ChangeThresholdSVG from '../assets/images/icons/change-threshold.svg'
9
+ import DappSVG from '../assets/images/icons/dapp.svg'
10
+ import DeploySVG from '../assets/images/icons/deploy.svg'
11
+ import GasSVG from '../assets/images/icons/gas.svg'
12
+ import InstadappProSVG from '../assets/images/icons/instadapp-pro.svg'
13
+ import PermitSignSVG from '../assets/images/icons/permit-sign.svg'
14
+ import RejectProposalSVG from '../assets/images/icons/reject-proposal.svg'
15
+ import UpgradeSVG from '../assets/images/icons/upgrade.svg'
16
+ import HammerSVG from '../assets/images/icons/hammer.svg'
17
17
 
18
18
  defineProps<{
19
19
  action: MetadataTypes
@@ -22,19 +22,19 @@ defineProps<{
22
22
  </script>
23
23
 
24
24
  <template>
25
- <RefreshSVG class="text-primary" v-if="action === 'swap'"/>
26
- <BridgeSVG class="text-primary" v-else-if="action === 'bridge'"/>
27
- <CrossTransferSVG class="text-primary" v-else-if="action === 'cross-transfer'"/>
28
- <TransferSVG class="text-primary" v-else-if="action === 'transfer'"/>
29
- <PlusCircleSVG class="text-primary" v-else-if="action === 'add-signers' || (action === 'auth' && !remove)"/>
30
- <Trash2SVG class="text-[#EB5757]" v-else-if="action === 'remove-signers' || (action === 'auth' && remove)"/>
31
- <RejectProposalSVG class="text-[#EB5757]" v-else-if="action === 'rejection'"/>
32
- <ChangeThresholdSVG v-else-if="action === 'change-threshold'"/>
33
- <DappSVG v-else-if="action === 'dapp'"/>
34
- <DeploySVG v-else-if="action === 'deploy'"/>
35
- <GasSVG v-else-if="action === 'gas-topup'"/>
36
- <InstadappProSVG v-else-if="action === 'instadapp-pro'"/>
37
- <PermitSignSVG v-else-if="action === 'permit2'"/>
38
- <UpgradeSVG v-else-if="action === 'upgrade'"/>
39
- <HammerSVG v-else-if="action === 'tx-builder'"/>
25
+ <RefreshSVG class="text-primary" v-if="action === 'swap'" />
26
+ <BridgeSVG class="text-primary" v-else-if="action === 'bridge'" />
27
+ <CrossTransferSVG class="text-primary" v-else-if="action === 'cross-transfer'" />
28
+ <TransferSVG class="text-primary" v-else-if="action === 'transfer'" />
29
+ <PlusCircleSVG class="text-primary" v-else-if="action === 'add-signers' || (action === 'auth' && !remove)" />
30
+ <Trash2SVG class="text-[#EB5757]" v-else-if="action === 'remove-signers' || (action === 'auth' && remove)" />
31
+ <RejectProposalSVG class="text-[#EB5757]" v-else-if="action === 'rejection'" />
32
+ <ChangeThresholdSVG v-else-if="action === 'change-threshold'" />
33
+ <DappSVG v-else-if="action === 'dapp'" />
34
+ <DeploySVG v-else-if="action === 'deploy'" />
35
+ <GasSVG v-else-if="action === 'gas-topup'" />
36
+ <InstadappProSVG v-else-if="action === 'instadapp-pro'" />
37
+ <PermitSignSVG v-else-if="action === 'permit2'" />
38
+ <UpgradeSVG v-else-if="action === 'upgrade'" />
39
+ <HammerSVG v-else-if="action === 'tx-builder'" />
40
40
  </template>
@@ -1,4 +1,5 @@
1
1
  <script setup lang="ts">
2
+ // @ts-expect-error
2
3
  import * as XXH from 'xxhashjs';
3
4
 
4
5
  defineProps<{
@@ -19,11 +20,9 @@ function generateColor(address: string): string {
19
20
  </script>
20
21
 
21
22
  <template>
22
- <svg
23
- :style="{
24
- color: generateColor(address),
25
- }" width="30" height="30" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 30 30"
26
- >
23
+ <svg :style="{
24
+ color: generateColor(address),
25
+ }" width="30" height="30" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 30 30">
27
26
  <g fill="currentColor" :clip-path="`url(#${randomId})`">
28
27
  <rect width="30" height="30" fill-opacity=".4" rx="15" />
29
28
  <ellipse cx="15.004" cy="26.399" rx="11.4" ry="6.6" />
@@ -1,22 +1,15 @@
1
1
  <template>
2
- <template v-if="isNetworkNotAvailable">
3
- <svg v-bind="$attrs" class="dark:hidden block" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20">
4
- <rect width="20" height="20" fill="#CBD5E1" rx="10" />
5
- <path fill="#fff" fill-rule="evenodd"
6
- 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"
7
- clip-rule="evenodd" />
8
- </svg>
9
- <svg v-bind="$attrs" class="dark:block hidden" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20">
10
- <rect width="20" height="20" fill="#334155" rx="10" />
11
- <path fill="#97A2B7" fill-rule="evenodd"
12
- 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"
13
- clip-rule="evenodd" />
14
- </svg>
15
- </template>
16
- <span v-else-if="stroke" class="outline stroke-color dark:outline-[#161E2D] outline-[#F8FAFC] outline-2 shrink-0 outline outline-offset-[-1.5px] rounded-full">
17
- <img class="w-full h-full" :src="`https://cdn.instadapp.io/avocado/networks/${chain}.svg`"/>
2
+ <svg v-if="isNetworkNotAvailable" v-bind="$attrs" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20">
3
+ <rect width="20" height="20" fill="#334155" rx="10" />
4
+ <path fill="#97A2B7" fill-rule="evenodd"
5
+ 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"
6
+ clip-rule="evenodd" />
7
+ </svg>
8
+ <span v-else-if="stroke"
9
+ class="outline stroke-color outline-[#161E2D] outline-2 shrink-0 outline outline-offset-[-1.5px] rounded-full">
10
+ <img class="w-full h-full" :src="`https://cdn.instadapp.io/avocado/networks/${chain}.svg`" />
18
11
  </span>
19
- <img v-else :src="`https://cdn.instadapp.io/avocado/networks/${chain}.svg`"/>
12
+ <img v-else :src="`https://cdn.instadapp.io/avocado/networks/${chain}.svg`" />
20
13
  </template>
21
14
 
22
15
  <script lang="ts" setup>
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
- import CopySVG from '~/assets/images/icons/copy.svg'
3
- import CheckCircle from '~/assets/images/icons/check-circle.svg'
2
+ import CopySVG from '../assets/images/icons/copy.svg'
3
+ import CheckCircle from '../assets/images/icons/check-circle.svg'
4
4
 
5
5
  defineProps<{
6
6
  text: string
@@ -12,22 +12,16 @@ const slots = useSlots()
12
12
  </script>
13
13
 
14
14
  <template>
15
- <button
16
- class="text-slate-400 font-semibold inline-flex items-center gap-2.5"
17
- @click.stop="copy(text)"
18
- >
15
+ <button class="text-slate-400 font-semibold inline-flex items-center gap-2.5" @click.stop="copy(text)">
19
16
  <Transition mode="out-in" name="slide-left">
20
- <span v-if="copied && !iconOnly"> {{ successText || 'Copied' }} </span>
17
+ <span v-if="copied && !iconOnly"> {{ successText || 'Copied' }} </span>
21
18
  <span v-else-if="slots.content">
22
19
  <slot name="content" />
23
20
  </span>
24
21
  </Transition>
25
22
 
26
23
  <Transition mode="out-in" name="slide">
27
- <CheckCircle
28
- v-if="copied"
29
- class="w-4 h-4 shrink-0 dark:text-slate-900 text-white svg-circle"
30
- />
24
+ <CheckCircle v-if="copied" class="w-4 h-4 shrink-0 dark:text-slate-900 text-white svg-circle" />
31
25
  <slot v-else-if="slots.copy" name="copy" />
32
26
  <slot v-else name="copy-icon">
33
27
  <CopySVG />
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { Tippy } from 'vue-tippy'
3
- import Info2 from '~/assets/images/icons/info-2.svg'
3
+ import Info2 from '../../assets/images/icons/info-2.svg'
4
4
 
5
5
  defineProps<{
6
6
  metadata: {
@@ -14,44 +14,47 @@ defineProps<{
14
14
  <template>
15
15
  <div class="font-medium">
16
16
  <div v-if="!compact || metadata.addresses.length < 3" class="flex gap-[14px] flex-wrap items-end">
17
- <p v-if="!compact" class="text-xs"> {{ formatTxType(metadata.type) }} </p>
18
- <div v-for="address of metadata.addresses" :key="address" class="flex gap-2 rounded-full bg-slate-100 dark:bg-slate-800 justify-start items-center px-2 py-1.5">
19
- <AuthorityAvatar :address="address" class="w-[18px] h-[18px]" />
20
- <Tippy max-width="none" interactive>
21
- <template #default>
22
- <p class="text-xs leading-5 text-slate-500 dark:text-slate-400">
17
+ <p v-if="!compact" class="text-xs"> {{ formatTxType(metadata.type) }} </p>
18
+ <div v-for="address of metadata.addresses" :key="address"
19
+ class="flex gap-2 rounded-full bg-slate-100 dark:bg-slate-800 justify-start items-center px-2 py-1.5">
20
+ <AuthorityAvatar :address="address" class="w-[18px] h-[18px]" />
21
+ <Tippy max-width="none" interactive>
22
+ <template #default>
23
+ <p class="text-xs leading-5 text-slate-500 dark:text-slate-400">
23
24
  {{ shortenHash(address, compact ? 2 : 4) }}
24
25
  </p>
25
- </template>
26
- <template #content>
26
+ </template>
27
+ <template #content>
27
28
  {{ address }}
28
- </template>
29
- </Tippy>
30
- </div>
29
+ </template>
30
+ </Tippy>
31
+ </div>
31
32
  </div>
32
33
  <div v-else class="flex gap-2 flex-wrap items-center">
33
- <div v-for="address of [metadata.addresses[0], metadata.addresses[1]].filter(Boolean)" :key="address" class="flex gap-2 rounded-full bg-slate-100 dark:bg-slate-800 justify-start items-center px-2 py-1.5">
34
+ <div v-for="address of [metadata.addresses[0], metadata.addresses[1]].filter(Boolean)" :key="address"
35
+ class="flex gap-2 rounded-full bg-slate-100 dark:bg-slate-800 justify-start items-center px-2 py-1.5">
34
36
  <AuthorityAvatar :address="address" class="w-[18px] h-[18px]" />
35
37
 
36
38
  <Tippy max-width="none" interactive>
37
- <template #default>
38
- <p class="text-xs leading-5 text-slate-400">
39
- {{ shortenHash(address, 2) }}
40
- </p>
41
- </template>
42
- <template #content>
39
+ <template #default>
40
+ <p class="text-xs leading-5 text-slate-400">
41
+ {{ shortenHash(address, 2) }}
42
+ </p>
43
+ </template>
44
+ <template #content>
43
45
  {{ address }}
44
- </template>
45
- </Tippy>
46
+ </template>
47
+ </Tippy>
46
48
  </div>
47
-
49
+
48
50
  <Tippy max-width="none" interactive tag="button" content-tag="div" content-class="content-wrapper">
49
51
  <template #default>
50
52
  <Info2 class="w-[16px] h-[16px] text-slate-500 rounded-full" />
51
53
  </template>
52
54
  <template #content>
53
55
  <ul class="flex flex-col gap-2.5">
54
- <li v-for="address in metadata.addresses" :key="address" class="flex text-xs text-slate-400 items-center gap-2.5">
56
+ <li v-for="address in metadata.addresses" :key="address"
57
+ class="flex text-xs text-slate-400 items-center gap-2.5">
55
58
  <AuthorityAvatar class="shrink-0 w-5 h-5" :address="address" />
56
59
  {{ address }}
57
60
  </li>
@@ -8,17 +8,15 @@ const props = defineProps<{
8
8
  const compact = inject('compact');
9
9
  const tokens = inject<ITokenPrice[]>('tokens');
10
10
 
11
- const buyToken = asyncComputed(() =>
12
- {
11
+ const buyToken = asyncComputed(() => {
13
12
  if (Array.isArray(tokens) && !tokens.length) return null;
14
- return fetchTokenByAddress(props.metadata?.buyToken, props?.chain_id, tokens)
15
- }
13
+ return fetchTokenByAddress(props.metadata?.buyToken, props?.chain_id, tokens)
14
+ }
16
15
  );
17
- const sellToken = asyncComputed(() =>
18
- {
16
+ const sellToken = asyncComputed(() => {
19
17
  if (Array.isArray(tokens) && !tokens.length) return null;
20
- return fetchTokenByAddress(props.metadata?.sellToken, props?.chain_id, tokens)
21
- }
18
+ return fetchTokenByAddress(props.metadata?.sellToken, props?.chain_id, tokens)
19
+ }
22
20
  );
23
21
 
24
22
  const sellAmountFormatted = computed(() =>
@@ -49,26 +47,21 @@ const formatProtocol = (protocol: string) => {
49
47
 
50
48
  <template>
51
49
  <div v-if="!sellToken || !buyToken" class="rounded-5 w-24 h-4 loading-box" />
52
- <div
53
- class="flex items-center gap-5"
54
- v-else
55
- >
56
- <span v-if="!compact" class="capitalize text-xs sm:text-sm">{{ metadata.type }}</span>
57
- <span class="inline-flex gap-2.5 items-center">
58
- <img width="20" height="20" class="w-5 h-5" :src="sellToken?.logo_url" />
59
- {{ sellAmountFormatted }}
60
- <span class="uppercase">{{ sellToken?.symbol }}</span>
61
- <SvgoRefresh class="w-4 h-4 text-slate-400 mx-2" />
62
- <img width="20" height="20" class="w-5 h-5" :src="buyToken?.logo_url" />
63
- {{ buyAmountFormatted }}
64
- <span class="uppercase">{{ buyToken?.symbol }}</span>
65
- <span
66
- class="capitalize hidden sm:flex items-center gap-2.5"
67
- v-if="metadata.protocol && !compact"
68
- >
69
- On <ProtocolLogo class="w-5 h-5" :name="metadata.protocol" />
70
- {{ formatProtocol(metadata.protocol) }}
71
- </span>
50
+ <div class="flex items-center gap-5" v-else>
51
+ <span v-if="!compact" class="capitalize text-xs sm:text-sm">{{ metadata.type }}</span>
52
+ <span class="inline-flex gap-2.5 items-center">
53
+ <img width="20" height="20" class="w-5 h-5" :src="sellToken?.logo_url" />
54
+ {{ sellAmountFormatted }}
55
+ <span class="uppercase">{{ sellToken?.symbol }}</span>
56
+ <SvgoRefresh class="w-4 h-4 text-slate-400 mx-2" />
57
+ <img width="20" height="20" class="w-5 h-5" :src="buyToken?.logo_url" />
58
+ ~ {{ buyAmountFormatted }}
59
+ <span class="uppercase">{{ buyToken?.symbol }}</span>
60
+ <span class="capitalize hidden sm:flex items-center gap-2.5" v-if="metadata.protocol && !compact">
61
+ On
62
+ <ProtocolLogo class="w-5 h-5" :name="metadata.protocol" />
63
+ {{ formatProtocol(metadata.protocol) }}
72
64
  </span>
73
- </div>
65
+ </span>
66
+ </div>
74
67
  </template>
package/package.json CHANGED
@@ -1,23 +1,25 @@
1
1
  {
2
2
  "name": "@instadapp/avocado-base",
3
- "version": "0.0.0-dev.8596b31",
3
+ "version": "0.0.0-dev.85c1e27",
4
4
  "type": "module",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "global.d.ts",
7
+ "engines": {
8
+ "node": ">=v18.18.0"
9
+ },
7
10
  "scripts": {
8
11
  "build": "nuxt build",
9
12
  "dev": "nuxt dev",
10
13
  "generate": "nuxt generate",
11
14
  "preview": "nuxt preview",
12
- "generate:contracts": "rimraf contracts && typechain --target=ethers-v5 'abi/*.json' --out-dir 'contracts'"
15
+ "generate:contracts": "rimraf contracts && typechain --target=ethers-v5 'abi/*.json' --out-dir 'contracts'",
16
+ "typecheck": "nuxi typecheck"
13
17
  },
14
18
  "devDependencies": {
15
- "@instadapp/avocado": "^0.1.10",
16
- "@instadapp/avocado-dev": "npm:@instadapp/avocado@dev",
17
- "@nuxtjs/tailwindcss": "^6.6.5",
19
+ "@nuxtjs/tailwindcss": "^6.11.3",
18
20
  "@typechain/ethers-v5": "^10.2.0",
19
- "nuxt": "^3.6.1",
20
- "nuxt-svgo": "^3.1.0",
21
+ "nuxt": "^3.10.1",
22
+ "nuxt-svgo": "^4.0.0",
21
23
  "rimraf": "^3.0.2",
22
24
  "typechain": "^8.1.1",
23
25
  "unplugin-vue-components": "^0.25.1",
package/utils/metadata.ts CHANGED
@@ -20,6 +20,7 @@ export const MetadataEnums = {
20
20
  "change-threshold": "change-threshold",
21
21
  import: "import",
22
22
  "tx-builder": "tx-builder",
23
+ "avocado-bridge": "avocado-bridge",
23
24
  } as const;
24
25
 
25
26
  const multiMetadataTypes = ["bytes[]"];
@@ -70,6 +71,7 @@ const actionMetadataTypes: Record<MetadataTypes, string[]> = {
70
71
  "remove-signers": ["address[] signers"],
71
72
  "change-threshold": ["uint8 count"],
72
73
  rejection: ["bytes32 id"],
74
+ "avocado-bridge": ["bytes32 id", "uint256 toChainId"],
73
75
  };
74
76
 
75
77
  const encodeMetadata = (props: MetadataProps) => {
@@ -97,6 +99,24 @@ export const encodeDappMetadata = (
97
99
  return single ? encodeMultipleActions(data) : data;
98
100
  };
99
101
 
102
+ export const encodeAvocadoBridgeMetadata = (
103
+ id: string,
104
+ toChainId: string | number,
105
+ single = true
106
+ ) => {
107
+ const encodedData = ethers.utils.defaultAbiCoder.encode(
108
+ actionMetadataTypes["avocado-bridge"],
109
+ [id, toChainId]
110
+ );
111
+
112
+ const data = encodeMetadata({
113
+ type: MetadataEnums["avocado-bridge"],
114
+ encodedData,
115
+ });
116
+
117
+ return single ? encodeMultipleActions(data) : data;
118
+ };
119
+
100
120
  export const encodeTransferMetadata = (
101
121
  params: SendMetadataProps,
102
122
  single = true
@@ -521,6 +541,11 @@ const typesPayload: IPayload = {
521
541
  type,
522
542
  count: data.count,
523
543
  }),
544
+ "avocado-bridge": (data, type) => ({
545
+ type,
546
+ id: data.id,
547
+ toChainId: data.toChainId ? data.toChainId.toString() : null,
548
+ }),
524
549
  };
525
550
 
526
551
  const parseMetadata = (metadata: string) => {
package/utils/network.ts CHANGED
@@ -26,6 +26,8 @@ export const networks: Network[] = [
26
26
  usdcAddress: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
27
27
  explorerUrl: "https://polygonscan.com",
28
28
  apiURL: "https://api.polygonscan.com",
29
+ fakeTransactionHash:
30
+ "0x906c551abd5873a428505b6530ac14d91367820706c7ee525f6d7313265d1c92",
29
31
  get serverRpcUrl() {
30
32
  return process.env?.POLYGON_RPC_URL || this.params.rpcUrls[0];
31
33
  },
@@ -48,6 +50,8 @@ export const networks: Network[] = [
48
50
  chainId: 42161,
49
51
  usdcAddress: "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",
50
52
  balanceResolverAddress: "0xca5f37e6D8bB24c5A7958d5eccE7Bd9Aacc944f2",
53
+ fakeTransactionHash:
54
+ "0x9fa291c3b09d31f19b1fa5dd05f30169d1364036d5f7c14b026410bc07bd8843",
51
55
  explorerUrl: "https://arbiscan.io",
52
56
  apiURL: "https://api.arbiscan.io",
53
57
  get serverRpcUrl() {
@@ -70,6 +74,8 @@ export const networks: Network[] = [
70
74
  zerionName: "ethereum",
71
75
  chainId: 1,
72
76
  explorerUrl: "https://etherscan.io",
77
+ fakeTransactionHash:
78
+ "0x13232dd32cef2f641ead890a507710c96560c8c9c3d5fab6facb5ec563c49433",
73
79
  apiURL: "https://api.etherscan.io",
74
80
  color: "#5D5FEF",
75
81
  get serverRpcUrl() {
@@ -92,6 +98,8 @@ export const networks: Network[] = [
92
98
  color: "#1E2024",
93
99
  ankrName: "base",
94
100
  explorerUrl: "https://basescan.org",
101
+ fakeTransactionHash:
102
+ "0xf7833d80da33730c4fc5d4c64151f0eaa64c0c0535be022af0228a44cc4e9c8e",
95
103
  apiURL: "https://api.basescan.org",
96
104
  get serverRpcUrl() {
97
105
  return process.env?.BASE_RPC_URL || this.params.rpcUrls[0];
@@ -118,6 +126,8 @@ export const networks: Network[] = [
118
126
  apiURL: "https://api-optimistic.etherscan.io",
119
127
  usdcAddress: "0x7f5c764cbc14f9669b88837ca1490cca17c31607",
120
128
  balanceResolverAddress: "0xca5f37e6D8bB24c5A7958d5eccE7Bd9Aacc944f2",
129
+ fakeTransactionHash:
130
+ "0xee7311d68059732b05088f2144dfec6c7a4f5fd0433eb85306afcd6bdf17cebc",
121
131
  explorerUrl: "https://optimistic.etherscan.io",
122
132
  get serverRpcUrl() {
123
133
  return process.env?.OPTIMISM_RPC_URL || this.params.rpcUrls[0];
@@ -140,6 +150,8 @@ export const networks: Network[] = [
140
150
  explorerUrl: "https://zkevm.polygonscan.com",
141
151
  apiURL: "https://api-zkevm.polygonscan.com",
142
152
  balanceResolverAddress: "0x48D1Fa5Ee6691a1E0B45d2B515650997BEA27a01",
153
+ fakeTransactionHash:
154
+ "0x1077130463ade91ad4e9c43c3195298e26a99970975238128912490eea12bf41",
143
155
  usdcAddress: "0xa8ce8aee21bc2a48a5ef670afcc9274c7bbbc035",
144
156
  get serverRpcUrl() {
145
157
  return process.env?.POLYGON_ZKEVM_RPC_URL || this.params.rpcUrls[0];
@@ -162,6 +174,8 @@ export const networks: Network[] = [
162
174
  color: "#F3BA2F",
163
175
  chainId: 56,
164
176
  explorerUrl: "https://bscscan.com",
177
+ fakeTransactionHash:
178
+ "0x897d54bf8e492f840bd4d8f1e743bfcab8226ab4d5a899e47ee433dcd6d6abf7",
165
179
  apiURL: "https://api.bscscan.com",
166
180
  usdcAddress: "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",
167
181
  balanceResolverAddress: "0xb808cff38706e267067b0af427726aa099f69f89",
@@ -188,6 +202,8 @@ export const networks: Network[] = [
188
202
  usdcAddress: "0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e",
189
203
  balanceResolverAddress: "0x63009f31D054E0ac9F321Cf0D642375236A4Bf1E",
190
204
  explorerUrl: "https://snowtrace.io",
205
+ fakeTransactionHash:
206
+ "0x233aac7402558dd4e23f938a50f983e67f5c9604233981c7ac74e63737b8294e",
191
207
  apiURL: "https://api.snowtrace.io",
192
208
  get serverRpcUrl() {
193
209
  return process.env?.AVALANCHE_RPC_URL || this.params.rpcUrls[0];
@@ -214,6 +230,8 @@ export const networks: Network[] = [
214
230
  },
215
231
  usdcAddress: "0x04068da6c83afcfa0e13ba15a6696662335d5b75",
216
232
  balanceResolverAddress: "0x929376c77a2fb8152375a089a4fccf84ff481479",
233
+ fakeTransactionHash:
234
+ "0x1e9a8405d660172314124e06896212c0786d7fb1550b89410d4bc87e9e8054e4",
217
235
  params: {
218
236
  rpcUrls: ["https://rpc.ankr.com/fantom"],
219
237
  chainName: "Fantom",
@@ -233,6 +251,8 @@ export const networks: Network[] = [
233
251
  chainId: 100,
234
252
  balanceResolverAddress: "0xfaa244e276b1597f663975ed007ee4ff70d27849",
235
253
  explorerUrl: "https://gnosisscan.io",
254
+ fakeTransactionHash:
255
+ "0x1513033806310a2c3b29f2276f8aa7388461b0ef9f8499c297e68c12187c179b",
236
256
  apiURL: "https://api.gnosisscan.io",
237
257
  usdcAddress: "0xddafbb505ad214d7b80b1f830fccc89b60fb7a83",
238
258
  get serverRpcUrl() {
@@ -254,6 +274,8 @@ export const networks: Network[] = [
254
274
  zerionName: "aurora",
255
275
  color: "#78d64b",
256
276
  explorerUrl: "https://explorer.mainnet.aurora.dev",
277
+ fakeTransactionHash:
278
+ "0x0923401c5a80c39a5cd57c098a6c4729edbefd0db6894def7d349493f4ff3ec6",
257
279
  get serverRpcUrl() {
258
280
  return process.env?.AURORA_RPC_URL || this.params.rpcUrls[0];
259
281
  },
@@ -275,6 +297,8 @@ export const networks: Network[] = [
275
297
  zerionName: "fuse",
276
298
  color: "#78d64b",
277
299
  explorerUrl: "https://explorer.fuse.io",
300
+ fakeTransactionHash:
301
+ "0xf22a8031de9b978a57c728e18c6b54633356c39db4d0466e53b9b7c3ee7f8def",
278
302
  get serverRpcUrl() {
279
303
  return process.env?.FUSE_RPC_URL || this.params.rpcUrls[0];
280
304
  },
@@ -295,6 +319,8 @@ export const networks: Network[] = [
295
319
  chainId: 534352,
296
320
  color: "#78d64b",
297
321
  explorerUrl: "https://scrollscan.com",
322
+ fakeTransactionHash:
323
+ "0x6bf297c414264fc8cddd47224632b4426a02138df2f50fe891eca87f6aefea01",
298
324
  get serverRpcUrl() {
299
325
  return process.env?.SCROLL_RPC_URL || this.params.rpcUrls[0];
300
326
  },
@@ -313,6 +339,8 @@ export const networks: Network[] = [
313
339
  chainId: 204,
314
340
  color: "#78d64b",
315
341
  explorerUrl: "https://opbnbscan.com",
342
+ fakeTransactionHash:
343
+ "0xb9438a3eae61442bc7d419d79930370ce09ac0f46e0695025751e3bfe1a931e7",
316
344
  get serverRpcUrl() {
317
345
  return process.env?.OPBNB_RPC_URL || this.params.rpcUrls[0];
318
346
  },
@@ -326,11 +354,31 @@ export const networks: Network[] = [
326
354
  },
327
355
  },
328
356
  },
357
+ // {
358
+ // name: "Manta Pacific",
359
+ // chainId: 169,
360
+ // explorerUrl: "https://pacific-explorer.manta.network",
361
+ // params: {
362
+ // rpcUrls: ["https://pacific-rpc.manta.network/http"],
363
+ // chainName: "Manta Pacific",
364
+ // nativeCurrency: {
365
+ // name: "Ethereum",
366
+ // symbol: "ETH",
367
+ // decimals: 18,
368
+ // },
369
+ // },
370
+ // color: "#78d64b",
371
+ // fakeTransactionHash: "0x3fB128aA5AC254C8539996B11C587E521AE0d3ab",
372
+ // get serverRpcUrl() {
373
+ // return process.env?.MANTA_RPC_URL || this.params.rpcUrls[0];
374
+ // },
375
+ // },
329
376
  {
330
377
  name: AVO_PROD_CHAIN_NAME,
331
378
  chainId: AVO_PROD_CHAIN_ID,
332
379
  isAvocado: true,
333
380
  balanceResolverAddress: "",
381
+ fakeTransactionHash: "",
334
382
  color: "#16A34A",
335
383
  usdcAddress: "",
336
384
  serverRpcUrl: AVO_PROD_RPC_URL,
@@ -352,6 +400,7 @@ export const networks: Network[] = [
352
400
  serverRpcUrl: AVO_STAGING_RPC_URL,
353
401
  color: "#16A34A",
354
402
  explorerUrl: AVO_STAGING_EXPLORER_URL,
403
+ fakeTransactionHash: "",
355
404
  isAvocado: true,
356
405
  balanceResolverAddress: "",
357
406
  usdcAddress: "",
@@ -374,6 +423,7 @@ export const chainUsdcAddresses = [
374
423
  { chainId: 56, address: "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d" },
375
424
  { chainId: 100, address: "0xddafbb505ad214d7b80b1f830fccc89b60fb7a83" },
376
425
  { chainId: 137, address: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174" },
426
+ { chainId: 137, address: "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359" },
377
427
  { chainId: 250, address: "0x04068da6c83afcfa0e13ba15a6696662335d5b75" },
378
428
  { chainId: 42161, address: "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8" },
379
429
  { chainId: 42161, address: "0xaf88d065e77c8cc2239327c5edb3a432268e5831" },
@@ -450,5 +500,6 @@ export const getExplorerUrl = (
450
500
  suffix: `/${string}` = "/"
451
501
  ) => {
452
502
  const network = getNetworkByChainId(chainId);
503
+ if (!network) return "";
453
504
  return `${network.explorerUrl}${suffix}`;
454
505
  };
package/utils/utils.d.ts CHANGED
@@ -15,7 +15,8 @@ declare global {
15
15
  | 122
16
16
  | 534352
17
17
  | 204
18
- | 63400;
18
+ | 63400
19
+ | 169;
19
20
 
20
21
  type ISlackMessageType = "danger" | "error" | "success" | "banner";
21
22
 
@@ -37,6 +38,7 @@ declare global {
37
38
  balanceResolverAddress?: string;
38
39
  usdcAddress?: string;
39
40
  explorerUrl: string;
41
+ fakeTransactionHash: string;
40
42
  apiURL?: string;
41
43
  params: {
42
44
  chainName?: string;