@instadapp/avocado-base 0.0.0-dev.bf2fef7 → 0.0.0-dev.c2f5e67
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/.github/workflows/npm-publish-dev.yml +2 -5
- package/abi/multisigAgnosticForwarder.json +1 -0
- package/abi/multisigForwarder.json +697 -0
- package/app.vue +7 -0
- package/assets/images/icons/change-threshold.svg +4 -0
- package/assets/images/icons/cross-transfer.svg +7 -0
- package/assets/images/icons/dapp.svg +4 -0
- package/assets/images/icons/deploy.svg +12 -0
- package/assets/images/icons/gas.svg +12 -5
- package/assets/images/icons/hammer.svg +5 -0
- package/assets/images/icons/info-2.svg +12 -0
- package/assets/images/icons/instadapp-pro.svg +4 -0
- package/assets/images/icons/multi-send.svg +7 -0
- package/assets/images/icons/permit-sign.svg +11 -0
- package/assets/images/icons/plus-circle.svg +6 -0
- package/assets/images/icons/refresh.svg +4 -4
- package/assets/images/icons/reject-proposal.svg +6 -0
- package/assets/images/icons/stars.svg +4 -0
- package/assets/images/icons/transfer.svg +5 -0
- package/assets/images/icons/trash-2.svg +8 -0
- package/assets/images/icons/upgrade.svg +4 -0
- package/components/ActionLogo.vue +42 -0
- package/components/ActionMetadata.vue +35 -26
- package/components/AuthorityAvatar.vue +37 -0
- package/components/ChainLogo.vue +14 -563
- package/components/CopyClipboard.vue +58 -0
- 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 +66 -0
- package/components/metadata/Swap.vue +25 -25
- package/components/metadata/Transfer.vue +6 -2
- package/contracts/MultisigAgnosticForwarder.ts +1413 -0
- package/contracts/MultisigForwarder.ts +859 -0
- package/contracts/factories/MultisigAgnosticForwarder__factory.ts +2051 -0
- package/contracts/factories/MultisigForwarder__factory.ts +721 -0
- package/contracts/factories/index.ts +2 -0
- package/contracts/index.ts +4 -0
- package/package.json +14 -9
- package/utils/formatter.ts +2 -2
- package/utils/helper.ts +2 -1
- package/utils/metadata.ts +232 -59
- package/utils/network.ts +388 -74
- package/utils/services.ts +8 -1
- package/utils/utils.d.ts +143 -134
package/utils/utils.d.ts
CHANGED
|
@@ -1,138 +1,147 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
26
|
-
| "
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
type
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
1
|
+
import type { Chain } from "viem";
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
type ChainId =
|
|
5
|
+
| 1
|
|
6
|
+
| 137
|
|
7
|
+
| 42161
|
|
8
|
+
| 10
|
|
9
|
+
| 56
|
|
10
|
+
| 43114
|
|
11
|
+
| 100
|
|
12
|
+
| 1101
|
|
13
|
+
| 250
|
|
14
|
+
| 634
|
|
15
|
+
| 1313161554
|
|
16
|
+
| 8453
|
|
17
|
+
| 122
|
|
18
|
+
| 534352
|
|
19
|
+
| 204
|
|
20
|
+
| 63400
|
|
21
|
+
| 169
|
|
22
|
+
| 34443
|
|
23
|
+
| 81457
|
|
24
|
+
| 59144
|
|
25
|
+
|
|
26
|
+
type ISlackMessageType = "danger" | "error" | "success" | "banner";
|
|
27
|
+
|
|
28
|
+
type MetadataTypes = keyof typeof MetadataEnums;
|
|
29
|
+
|
|
30
|
+
type PayloadFunction = (data: any, type: MetadataTypes) => any;
|
|
31
|
+
|
|
32
|
+
type IPayload = Record<MetadataTypes, PayloadFunction>;
|
|
33
|
+
|
|
34
|
+
interface Network {
|
|
35
|
+
name: string;
|
|
36
|
+
debankName?: string;
|
|
37
|
+
ankrName?: string;
|
|
38
|
+
zerionName?: string;
|
|
39
|
+
chainId: ChainId;
|
|
40
|
+
color: string;
|
|
41
|
+
isAvocado?: boolean;
|
|
42
|
+
serverRpcUrl: string | undefined;
|
|
43
|
+
balanceResolverAddress?: string;
|
|
44
|
+
usdcAddress?: string;
|
|
45
|
+
explorerUrl: string;
|
|
46
|
+
fakeTransactionHash: string;
|
|
47
|
+
viemChain: Chain;
|
|
48
|
+
// must start with https://
|
|
49
|
+
apiURL: `https://${string}` | null;
|
|
50
|
+
params: {
|
|
51
|
+
chainName?: string;
|
|
52
|
+
iconUrls?: string[];
|
|
53
|
+
rpcUrls: string[];
|
|
54
|
+
nativeCurrency?: {
|
|
55
|
+
name: string;
|
|
56
|
+
symbol: string;
|
|
57
|
+
decimals: number;
|
|
58
|
+
};
|
|
56
59
|
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
type SignMetadataProps = {
|
|
63
|
+
token: string;
|
|
64
|
+
spender: string;
|
|
65
|
+
amount: string;
|
|
66
|
+
expiration: string;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
type DappMetadataProps = {
|
|
70
|
+
name: string;
|
|
71
|
+
url: string;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
type SendMetadataProps = {
|
|
75
|
+
token: string;
|
|
76
|
+
amount: string;
|
|
77
|
+
receiver: string;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
type CrossSendMetadataProps = {
|
|
81
|
+
fromToken: string;
|
|
82
|
+
toToken: string;
|
|
83
|
+
toChainId: string;
|
|
84
|
+
amount: string;
|
|
85
|
+
receiver: string;
|
|
86
|
+
provider?: string;
|
|
57
87
|
};
|
|
58
|
-
}
|
|
59
88
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
type
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
type
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
type
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
sellAmount: string;
|
|
117
|
-
buyAmount: string;
|
|
118
|
-
receiver: string;
|
|
119
|
-
protocol?: string;
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
type MetadataProps = {
|
|
123
|
-
type: MetadataTypes,
|
|
124
|
-
encodedData: string;
|
|
125
|
-
version?: string;
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
interface ITokenPrice {
|
|
129
|
-
address: string;
|
|
130
|
-
chain_id: string;
|
|
131
|
-
name: string;
|
|
132
|
-
symbol: string;
|
|
133
|
-
decimals: number;
|
|
134
|
-
logo_url: string;
|
|
135
|
-
price: string;
|
|
136
|
-
coingecko_id: string;
|
|
137
|
-
sparkline_price_7d: number[];
|
|
89
|
+
|
|
90
|
+
type AuthMetadataProps = {
|
|
91
|
+
address: string;
|
|
92
|
+
chainId: string;
|
|
93
|
+
remove: boolean;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
type UpgradeMetadataProps = {
|
|
97
|
+
version: string;
|
|
98
|
+
walletImpl: string;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
type TopupMetadataProps = {
|
|
102
|
+
amount: string;
|
|
103
|
+
token: string;
|
|
104
|
+
onBehalf: string;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
type BridgeMetadataProps = {
|
|
108
|
+
amount: string;
|
|
109
|
+
receiver: string;
|
|
110
|
+
fromToken: string;
|
|
111
|
+
toToken: string;
|
|
112
|
+
toChainId: string;
|
|
113
|
+
bridgeFee: string;
|
|
114
|
+
nativeToken: string;
|
|
115
|
+
version?: string;
|
|
116
|
+
provider: string;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
type SwapMetadataProps = {
|
|
120
|
+
sellToken: string;
|
|
121
|
+
buyToken: string;
|
|
122
|
+
sellAmount: string;
|
|
123
|
+
buyAmount: string;
|
|
124
|
+
receiver: string;
|
|
125
|
+
protocol?: string;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
type MetadataProps = {
|
|
129
|
+
type: MetadataTypes;
|
|
130
|
+
encodedData: string;
|
|
131
|
+
version?: string;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
interface ITokenPrice {
|
|
135
|
+
address: string;
|
|
136
|
+
chain_id: string;
|
|
137
|
+
name: string;
|
|
138
|
+
symbol: string;
|
|
139
|
+
decimals: number;
|
|
140
|
+
logo_url: string;
|
|
141
|
+
price: string;
|
|
142
|
+
coingecko_id: string;
|
|
143
|
+
sparkline_price_7d: number[];
|
|
144
|
+
}
|
|
138
145
|
}
|
|
146
|
+
|
|
147
|
+
export {};
|