@instadapp/avocado-base 0.0.0-dev.c3dc65c → 0.0.0-dev.c8dd0df
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 +17 -11
- package/components/AuthorityAvatar.vue +38 -0
- package/components/ChainLogo.vue +14 -556
- package/components/metadata/Bridge.vue +26 -6
- package/components/metadata/CrossTransfer.vue +5 -1
- 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 +1 -4
- package/utils/helper.ts +2 -1
- package/utils/metadata.ts +88 -51
- package/utils/network.ts +160 -92
- package/utils/services.ts +8 -1
- package/utils/utils.d.ts +6 -5
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_13856_490518)">
|
|
3
|
+
<path d="M7 -6.11959e-07C3.13401 -9.49935e-07 9.49935e-07 3.13401 6.11959e-07 7C2.73984e-07 10.866 3.13401 14 7 14C10.866 14 14 10.866 14 7C14 3.13401 10.866 -2.73984e-07 7 -6.11959e-07Z" fill="currentColor"/>
|
|
4
|
+
<path d="M7.00391 9.72217L7.00391 7.38883" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
<path d="M7.00391 4.27783L6.99391 4.27783" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
+
</g>
|
|
7
|
+
<defs>
|
|
8
|
+
<clipPath id="clip0_13856_490518">
|
|
9
|
+
<rect width="14" height="14" fill="white" transform="translate(14 14) rotate(-180)"/>
|
|
10
|
+
</clipPath>
|
|
11
|
+
</defs>
|
|
12
|
+
</svg>
|
|
@@ -13,6 +13,7 @@ import InstadappProSVG from '~/assets/images/icons/instadapp-pro.svg'
|
|
|
13
13
|
import PermitSignSVG from '~/assets/images/icons/permit-sign.svg'
|
|
14
14
|
import RejectProposalSVG from '~/assets/images/icons/reject-proposal.svg'
|
|
15
15
|
import UpgradeSVG from '~/assets/images/icons/upgrade.svg'
|
|
16
|
+
import HammerSVG from '~/assets/images/icons/hammer.svg'
|
|
16
17
|
|
|
17
18
|
defineProps<{
|
|
18
19
|
action: MetadataTypes
|
|
@@ -35,4 +36,5 @@ defineProps<{
|
|
|
35
36
|
<InstadappProSVG v-else-if="action === 'instadapp-pro'"/>
|
|
36
37
|
<PermitSignSVG v-else-if="action === 'permit2'"/>
|
|
37
38
|
<UpgradeSVG v-else-if="action === 'upgrade'"/>
|
|
39
|
+
<HammerSVG v-else-if="action === 'tx-builder'"/>
|
|
38
40
|
</template>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
|
|
3
2
|
const props = defineProps<{
|
|
4
3
|
metadata: {
|
|
5
4
|
type: MetadataTypes
|
|
@@ -7,9 +6,11 @@ const props = defineProps<{
|
|
|
7
6
|
};
|
|
8
7
|
chain_id: number | string;
|
|
9
8
|
compact?: boolean;
|
|
9
|
+
tokens?: ITokenPrice[];
|
|
10
10
|
}>();
|
|
11
11
|
|
|
12
12
|
provide('compact', props.compact);
|
|
13
|
+
provide('tokens', props.tokens);
|
|
13
14
|
|
|
14
15
|
</script>
|
|
15
16
|
|
|
@@ -22,6 +23,10 @@ provide('compact', props.compact);
|
|
|
22
23
|
<MetadataBridge v-if="metadata.type === 'bridge'" :metadata="metadata" :chain_id="chain_id" />
|
|
23
24
|
<MetadataPermit2 v-if="metadata.type === 'permit2'" :metadata="metadata" :chain_id="chain_id" />
|
|
24
25
|
|
|
26
|
+
<div class="text-left w-fit capitalize" v-if="metadata.type === 'import'">
|
|
27
|
+
Import from {{ metadata.protocol }} ({{ (formatUsd(fromWei(metadata.valueInUsd, 10)))}})
|
|
28
|
+
</div>
|
|
29
|
+
|
|
25
30
|
<div v-if="metadata.type === 'upgrade'" class="self-start">
|
|
26
31
|
Wallet upgraded to {{ metadata?.version }}
|
|
27
32
|
</div>
|
|
@@ -48,28 +53,29 @@ provide('compact', props.compact);
|
|
|
48
53
|
{{ chainIdToName(metadata.chainId) }}
|
|
49
54
|
</div>
|
|
50
55
|
</div>
|
|
56
|
+
<div v-if="metadata.type === 'tx-builder'" class="self-start capitalize flex gap-3">
|
|
57
|
+
<span v-if="!compact">
|
|
58
|
+
Transaction Builder
|
|
59
|
+
</span> ({{ metadata?.actionCount }} {{ toBN(metadata?.actionCount).lt(2) ? 'action' : 'actions' }})
|
|
60
|
+
</div>
|
|
51
61
|
<div v-if="metadata.type === 'instadapp-pro'" class="self-start capitalize flex gap-3">
|
|
52
62
|
Instadapp Pro |
|
|
53
63
|
{{ metadata?.castDetails }}
|
|
54
64
|
</div>
|
|
55
65
|
|
|
56
|
-
<
|
|
57
|
-
{{ formatMultipleAddresses(metadata.addresses) }}
|
|
58
|
-
</div>
|
|
66
|
+
<MetadataSigners v-if="metadata.type === 'add-signers' || metadata.type === 'remove-signers'" :metadata="metadata" :compact="compact" />
|
|
59
67
|
|
|
60
68
|
<div v-if="metadata.type === 'change-threshold'" class="text-left w-fit" >
|
|
61
69
|
Change Threshold to {{ metadata.count }}
|
|
62
70
|
</div>
|
|
63
71
|
|
|
64
|
-
<div
|
|
65
|
-
<div v-tippy="{
|
|
72
|
+
<div v-tippy="{
|
|
66
73
|
content: metadata.id,
|
|
67
74
|
maxWidth: 'none',
|
|
75
|
+
interactive: true,
|
|
68
76
|
}"
|
|
69
|
-
class="text-left w-fit">
|
|
70
|
-
|
|
71
|
-
</div>
|
|
72
|
-
<CopyClipboard icon-only :text="metadata.id" />
|
|
77
|
+
v-if="metadata.type === 'rejection'" class="text-left w-fit">
|
|
78
|
+
{{ shortenHash(metadata.id) }}
|
|
73
79
|
</div>
|
|
74
80
|
</div>
|
|
75
|
-
</template>
|
|
81
|
+
</template>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import * as XXH from 'xxhashjs';
|
|
3
|
+
|
|
4
|
+
defineProps<{
|
|
5
|
+
address: string
|
|
6
|
+
}>();
|
|
7
|
+
|
|
8
|
+
const randomId = Math.random().toString(36).substr(2, 9);
|
|
9
|
+
|
|
10
|
+
function generateColor(address: string): string {
|
|
11
|
+
const hash = XXH.h32(address, 0xABCD).toNumber()
|
|
12
|
+
|
|
13
|
+
const hue = hash % 360
|
|
14
|
+
const saturation = 80 + (hash % 30)
|
|
15
|
+
const lightness = 70 + (hash % 20)
|
|
16
|
+
|
|
17
|
+
return `hsl(${hue}, ${saturation}%, ${lightness}%)`
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<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
|
+
>
|
|
27
|
+
<g fill="currentColor" :clip-path="`url(#${randomId})`">
|
|
28
|
+
<rect width="30" height="30" fill-opacity=".4" rx="15" />
|
|
29
|
+
<ellipse cx="15.004" cy="26.399" rx="11.4" ry="6.6" />
|
|
30
|
+
<circle cx="15" cy="12.75" r="5.4" />
|
|
31
|
+
</g>
|
|
32
|
+
<defs>
|
|
33
|
+
<clipPath :id="randomId">
|
|
34
|
+
<rect width="30" height="30" fill="#fff" rx="15" />
|
|
35
|
+
</clipPath>
|
|
36
|
+
</defs>
|
|
37
|
+
</svg>
|
|
38
|
+
</template>
|