@instadapp/avocado-base 0.0.0-dev.d63c845 → 0.0.0-dev.d8050bd
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/abi/multisigForwarder.json +697 -0
- package/assets/images/icons/hammer.svg +5 -0
- package/assets/images/icons/info-2.svg +12 -0
- package/components/ActionLogo.vue +2 -0
- package/components/ActionMetadata.vue +29 -24
- package/components/AuthorityAvatar.vue +38 -0
- package/components/ChainLogo.vue +14 -556
- package/components/metadata/Bridge.vue +26 -6
- package/components/metadata/CrossTransfer.vue +16 -4
- package/components/metadata/GasTopup.vue +7 -1
- package/components/metadata/Permit2.vue +6 -1
- package/components/metadata/Signers.vue +63 -0
- package/components/metadata/Swap.vue +9 -2
- package/components/metadata/Transfer.vue +5 -1
- package/contracts/MultisigForwarder.ts +859 -0
- package/contracts/factories/MultisigForwarder__factory.ts +721 -0
- package/contracts/factories/index.ts +1 -0
- package/contracts/index.ts +2 -0
- package/package.json +5 -3
- package/utils/formatter.ts +2 -2
- package/utils/helper.ts +2 -1
- package/utils/metadata.ts +113 -51
- package/utils/network.ts +224 -86
- package/utils/services.ts +8 -1
- package/utils/utils.d.ts +10 -6
|
@@ -5,8 +5,14 @@ const props = defineProps<{
|
|
|
5
5
|
chain_id: number | string
|
|
6
6
|
}>();
|
|
7
7
|
|
|
8
|
+
const tokens = inject<ITokenPrice[]>('tokens');
|
|
9
|
+
|
|
8
10
|
const token = asyncComputed(() =>
|
|
9
|
-
|
|
11
|
+
{
|
|
12
|
+
if (Array.isArray(tokens) && !tokens.length) return null;
|
|
13
|
+
|
|
14
|
+
return fetchTokenByAddress(props.metadata?.token, props?.chain_id, tokens)
|
|
15
|
+
}
|
|
10
16
|
);
|
|
11
17
|
|
|
12
18
|
const compact = inject('compact');
|
|
@@ -5,8 +5,13 @@ const props = defineProps<{
|
|
|
5
5
|
chain_id: number | string
|
|
6
6
|
}>();
|
|
7
7
|
|
|
8
|
+
const tokens = inject<ITokenPrice[]>('tokens');
|
|
9
|
+
|
|
8
10
|
const token = asyncComputed(() =>
|
|
9
|
-
|
|
11
|
+
{
|
|
12
|
+
if (Array.isArray(tokens) && !tokens.length) return null;
|
|
13
|
+
return fetchTokenByAddress(props.metadata?.token, props?.chain_id, tokens)
|
|
14
|
+
}
|
|
10
15
|
);
|
|
11
16
|
|
|
12
17
|
const calculateDate = (timestamp: number) => {
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { Tippy } from 'vue-tippy'
|
|
3
|
+
import Info2 from '~/assets/images/icons/info-2.svg'
|
|
4
|
+
|
|
5
|
+
defineProps<{
|
|
6
|
+
metadata: {
|
|
7
|
+
type: MetadataTypes,
|
|
8
|
+
[key: string]: any
|
|
9
|
+
};
|
|
10
|
+
compact?: boolean;
|
|
11
|
+
}>();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div class="font-medium">
|
|
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">
|
|
23
|
+
{{ shortenHash(address, compact ? 2 : 4) }}
|
|
24
|
+
</p>
|
|
25
|
+
</template>
|
|
26
|
+
<template #content>
|
|
27
|
+
{{ address }}
|
|
28
|
+
</template>
|
|
29
|
+
</Tippy>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<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
|
+
<AuthorityAvatar :address="address" class="w-[18px] h-[18px]" />
|
|
35
|
+
|
|
36
|
+
<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>
|
|
43
|
+
{{ address }}
|
|
44
|
+
</template>
|
|
45
|
+
</Tippy>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<Tippy max-width="none" interactive tag="button" content-tag="div" content-class="content-wrapper">
|
|
49
|
+
<template #default>
|
|
50
|
+
<Info2 class="w-[16px] h-[16px] text-slate-500 rounded-full" />
|
|
51
|
+
</template>
|
|
52
|
+
<template #content>
|
|
53
|
+
<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">
|
|
55
|
+
<AuthorityAvatar class="shrink-0 w-5 h-5" :address="address" />
|
|
56
|
+
{{ address }}
|
|
57
|
+
</li>
|
|
58
|
+
</ul>
|
|
59
|
+
</template>
|
|
60
|
+
</Tippy>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
@@ -6,12 +6,19 @@ const props = defineProps<{
|
|
|
6
6
|
}>();
|
|
7
7
|
|
|
8
8
|
const compact = inject('compact');
|
|
9
|
+
const tokens = inject<ITokenPrice[]>('tokens');
|
|
9
10
|
|
|
10
11
|
const buyToken = asyncComputed(() =>
|
|
11
|
-
|
|
12
|
+
{
|
|
13
|
+
if (Array.isArray(tokens) && !tokens.length) return null;
|
|
14
|
+
return fetchTokenByAddress(props.metadata?.buyToken, props?.chain_id, tokens)
|
|
15
|
+
}
|
|
12
16
|
);
|
|
13
17
|
const sellToken = asyncComputed(() =>
|
|
14
|
-
|
|
18
|
+
{
|
|
19
|
+
if (Array.isArray(tokens) && !tokens.length) return null;
|
|
20
|
+
return fetchTokenByAddress(props.metadata?.sellToken, props?.chain_id, tokens)
|
|
21
|
+
}
|
|
15
22
|
);
|
|
16
23
|
|
|
17
24
|
const sellAmountFormatted = computed(() =>
|
|
@@ -6,13 +6,17 @@ const props = defineProps<{
|
|
|
6
6
|
}>();
|
|
7
7
|
|
|
8
8
|
const compact = inject('compact');
|
|
9
|
+
const tokens = inject<ITokenPrice[]>('tokens');
|
|
9
10
|
|
|
10
11
|
const token = asyncComputed(() => {
|
|
11
12
|
if (!props?.chain_id) return null;
|
|
12
13
|
|
|
14
|
+
if (Array.isArray(tokens) && !tokens.length) return null;
|
|
15
|
+
|
|
13
16
|
return fetchTokenByAddress(
|
|
14
17
|
props.metadata?.token,
|
|
15
|
-
props?.chain_id
|
|
18
|
+
props?.chain_id,
|
|
19
|
+
tokens
|
|
16
20
|
);
|
|
17
21
|
});
|
|
18
22
|
|