@instadapp/avocado-base 0.0.0-dev.19925f5 → 0.0.0-dev.2588b9b
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/avoFactoryProxy.json +109 -0
- package/abi/balanceResolver.json +110 -0
- package/abi/erc20.json +350 -0
- package/abi/forwarder.json +331 -0
- package/abi/gaslessWallet.json +289 -0
- package/app.vue +20 -0
- package/components/ChainLogo.vue +140 -0
- package/contracts/AvoFactoryProxy.ts +302 -0
- package/contracts/BalanceResolver.ts +321 -0
- package/contracts/Erc20.ts +526 -0
- package/contracts/Forwarder.ts +790 -0
- package/contracts/GaslessWallet.ts +660 -0
- package/contracts/common.ts +46 -0
- package/contracts/factories/AvoFactoryProxy__factory.ts +181 -0
- package/contracts/factories/BalanceResolver__factory.ts +212 -0
- package/contracts/factories/Erc20__factory.ts +368 -0
- package/contracts/factories/Forwarder__factory.ts +656 -0
- package/contracts/factories/GaslessWallet__factory.ts +499 -0
- package/contracts/factories/index.ts +8 -0
- package/contracts/index.ts +14 -0
- package/nuxt.config.ts +2 -2
- package/package.json +10 -4
- package/server/utils/index.ts +2 -0
- package/utils/bignumber.ts +31 -0
- package/utils/formatter.ts +85 -0
- package/utils/helper.ts +54 -0
- package/utils/metadata.ts +326 -0
- package/utils/network.ts +150 -23
- package/utils/utils.d.ts +87 -3
package/utils/utils.d.ts
CHANGED
|
@@ -1,13 +1,34 @@
|
|
|
1
|
-
type ChainId =
|
|
1
|
+
type ChainId =
|
|
2
|
+
| 1
|
|
3
|
+
| 137
|
|
4
|
+
| 42161
|
|
5
|
+
| 10
|
|
6
|
+
| 56
|
|
7
|
+
| 43114
|
|
8
|
+
| 100
|
|
9
|
+
| 1101
|
|
10
|
+
| 250
|
|
11
|
+
| 634
|
|
12
|
+
| 1313161554
|
|
13
|
+
| 63400;
|
|
14
|
+
|
|
15
|
+
type ISlackMessageType = "danger" | "error" | "success" | "banner";
|
|
2
16
|
|
|
3
17
|
interface Network {
|
|
4
18
|
name: string;
|
|
19
|
+
debankName?: string;
|
|
20
|
+
ankrName?: string;
|
|
21
|
+
zerionName?: string;
|
|
5
22
|
chainId: ChainId;
|
|
23
|
+
isAvocado?: boolean;
|
|
24
|
+
serverRpcUrl: string | undefined;
|
|
25
|
+
balanceResolverAddress?: string;
|
|
26
|
+
usdcAddress: string;
|
|
27
|
+
explorerUrl: string;
|
|
6
28
|
params: {
|
|
7
29
|
chainName?: string;
|
|
8
|
-
rpcUrls: string[];
|
|
9
|
-
blockExplorerUrls?: string[];
|
|
10
30
|
iconUrls?: string[];
|
|
31
|
+
rpcUrls: string[];
|
|
11
32
|
nativeCurrency?: {
|
|
12
33
|
name: string;
|
|
13
34
|
symbol: string;
|
|
@@ -15,3 +36,66 @@ interface Network {
|
|
|
15
36
|
};
|
|
16
37
|
};
|
|
17
38
|
}
|
|
39
|
+
|
|
40
|
+
type SignMetadataProps = {
|
|
41
|
+
token: string;
|
|
42
|
+
spender: string;
|
|
43
|
+
amount: string;
|
|
44
|
+
expiration: string;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
type DappMetadataProps = {
|
|
48
|
+
name: string;
|
|
49
|
+
url: string;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
type SendMetadataProps = {
|
|
53
|
+
token: string;
|
|
54
|
+
amount: string;
|
|
55
|
+
receiver: string;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
type UpgradeMetadataProps = {
|
|
59
|
+
version: string;
|
|
60
|
+
walletImpl: string;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
type TopupMetadataProps = {
|
|
64
|
+
amount: string;
|
|
65
|
+
token: string;
|
|
66
|
+
onBehalf: string;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
type BridgeMetadataProps = {
|
|
70
|
+
amount: string;
|
|
71
|
+
receiver: string;
|
|
72
|
+
fromToken: string;
|
|
73
|
+
toToken: string;
|
|
74
|
+
toChainId: string;
|
|
75
|
+
bridgeFee: string;
|
|
76
|
+
nativeToken: string;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
type SwapMetadataProps = {
|
|
80
|
+
sellToken: string;
|
|
81
|
+
buyToken: string;
|
|
82
|
+
sellAmount: string;
|
|
83
|
+
buyAmount: string;
|
|
84
|
+
receiver: string;
|
|
85
|
+
protocol?: string;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
type MetadataProps = {
|
|
89
|
+
type:
|
|
90
|
+
| "transfer"
|
|
91
|
+
| "bridge"
|
|
92
|
+
| "swap"
|
|
93
|
+
| "multi"
|
|
94
|
+
| "gas-topup"
|
|
95
|
+
| "upgrade"
|
|
96
|
+
| "dapp"
|
|
97
|
+
| "deploy"
|
|
98
|
+
| "permit2";
|
|
99
|
+
encodedData: string;
|
|
100
|
+
version?: string;
|
|
101
|
+
};
|