@instadapp/avocado-base 0.0.0-dev.19925f5 → 0.0.0-dev.21292ef

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.
Files changed (107) hide show
  1. package/.github/workflows/npm-publish-dev.yml +2 -5
  2. package/.vscode/settings.json +68 -0
  3. package/abi/avoFactoryProxy.json +109 -0
  4. package/abi/balanceResolver.json +110 -0
  5. package/abi/erc20.json +350 -0
  6. package/abi/forwarder.json +1435 -0
  7. package/abi/gaslessWallet.json +289 -0
  8. package/abi/multisigAgnosticForwarder.json +938 -0
  9. package/abi/multisigForwarder.json +697 -0
  10. package/app.vue +27 -0
  11. package/assets/images/icons/arrow-left.svg +5 -0
  12. package/assets/images/icons/arrow-right.svg +5 -0
  13. package/assets/images/icons/avocado.svg +4 -0
  14. package/assets/images/icons/bridge-2.svg +3 -0
  15. package/assets/images/icons/bridge.svg +7 -0
  16. package/assets/images/icons/calendar.svg +8 -0
  17. package/assets/images/icons/change-threshold.svg +4 -0
  18. package/assets/images/icons/check-circle.svg +4 -0
  19. package/assets/images/icons/check.svg +3 -0
  20. package/assets/images/icons/chevron-down.svg +4 -0
  21. package/assets/images/icons/clipboard.svg +7 -0
  22. package/assets/images/icons/clock-circle.svg +5 -0
  23. package/assets/images/icons/copy.svg +12 -0
  24. package/assets/images/icons/cross-transfer.svg +7 -0
  25. package/assets/images/icons/dapp.svg +4 -0
  26. package/assets/images/icons/deploy.svg +12 -0
  27. package/assets/images/icons/error-circle.svg +6 -0
  28. package/assets/images/icons/exclamation-circle.svg +13 -0
  29. package/assets/images/icons/exclamation-octagon.svg +13 -0
  30. package/assets/images/icons/exclamation-triangle.svg +5 -0
  31. package/assets/images/icons/external-link.svg +6 -0
  32. package/assets/images/icons/eye.svg +4 -0
  33. package/assets/images/icons/flowers.svg +8 -0
  34. package/assets/images/icons/gas-emoji.svg +193 -0
  35. package/assets/images/icons/gas.svg +14 -0
  36. package/assets/images/icons/gift.svg +153 -0
  37. package/assets/images/icons/globe.svg +110 -0
  38. package/assets/images/icons/hamburger.svg +6 -0
  39. package/assets/images/icons/hammer.svg +5 -0
  40. package/assets/images/icons/info-2.svg +12 -0
  41. package/assets/images/icons/instadapp-pro.svg +4 -0
  42. package/assets/images/icons/logout.svg +3 -0
  43. package/assets/images/icons/moon.svg +3 -0
  44. package/assets/images/icons/multi-send.svg +7 -0
  45. package/assets/images/icons/network.svg +13 -0
  46. package/assets/images/icons/options.svg +5 -0
  47. package/assets/images/icons/permit-sign.svg +11 -0
  48. package/assets/images/icons/plus-circle.svg +6 -0
  49. package/assets/images/icons/plus.svg +5 -0
  50. package/assets/images/icons/power-off-bg.svg +24 -0
  51. package/assets/images/icons/power-off.svg +19 -0
  52. package/assets/images/icons/power-on.svg +19 -0
  53. package/assets/images/icons/qr.svg +20 -0
  54. package/assets/images/icons/question-circle.svg +14 -0
  55. package/assets/images/icons/refresh.svg +6 -0
  56. package/assets/images/icons/reject-proposal.svg +6 -0
  57. package/assets/images/icons/search.svg +12 -0
  58. package/assets/images/icons/stars.svg +4 -0
  59. package/assets/images/icons/sun.svg +3 -0
  60. package/assets/images/icons/transfer.svg +5 -0
  61. package/assets/images/icons/trash-2.svg +8 -0
  62. package/assets/images/icons/upgrade.svg +4 -0
  63. package/assets/images/icons/wave.svg +214 -0
  64. package/assets/images/icons/x.svg +5 -0
  65. package/components/ActionLogo.vue +42 -0
  66. package/components/ActionMetadata.vue +88 -0
  67. package/components/Address.vue +74 -0
  68. package/components/AuthorityAvatar.vue +37 -0
  69. package/components/ChainLogo.vue +14 -423
  70. package/components/CopyClipboard.vue +42 -0
  71. package/components/metadata/Bridge.vue +59 -0
  72. package/components/metadata/CrossTransfer.vue +76 -0
  73. package/components/metadata/GasTopup.vue +39 -0
  74. package/components/metadata/Permit2.vue +42 -0
  75. package/components/metadata/Signers.vue +19 -0
  76. package/components/metadata/Swap.vue +66 -0
  77. package/components/metadata/Transfer.vue +48 -0
  78. package/components.d.ts +13 -0
  79. package/contracts/AvoFactoryProxy.ts +302 -0
  80. package/contracts/BalanceResolver.ts +321 -0
  81. package/contracts/Erc20.ts +526 -0
  82. package/contracts/Forwarder.ts +1644 -0
  83. package/contracts/GaslessWallet.ts +660 -0
  84. package/contracts/MultisigAgnosticForwarder.ts +1423 -0
  85. package/contracts/MultisigForwarder.ts +859 -0
  86. package/contracts/common.ts +46 -0
  87. package/contracts/factories/AvoFactoryProxy__factory.ts +181 -0
  88. package/contracts/factories/BalanceResolver__factory.ts +212 -0
  89. package/contracts/factories/Erc20__factory.ts +368 -0
  90. package/contracts/factories/Forwarder__factory.ts +1456 -0
  91. package/contracts/factories/GaslessWallet__factory.ts +499 -0
  92. package/contracts/factories/MultisigAgnosticForwarder__factory.ts +2135 -0
  93. package/contracts/factories/MultisigForwarder__factory.ts +721 -0
  94. package/contracts/factories/index.ts +10 -0
  95. package/contracts/index.ts +18 -0
  96. package/eslint.config.mjs +20 -0
  97. package/nuxt.config.ts +23 -2
  98. package/package.json +24 -8
  99. package/server/utils/index.ts +2 -0
  100. package/utils/avocado.ts +2 -0
  101. package/utils/bignumber.ts +51 -0
  102. package/utils/formatter.ts +94 -0
  103. package/utils/helper.ts +62 -0
  104. package/utils/metadata.ts +694 -0
  105. package/utils/network.ts +560 -91
  106. package/utils/services.ts +21 -0
  107. package/utils/utils.d.ts +146 -16
@@ -0,0 +1,46 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ import type { Listener } from "@ethersproject/providers";
5
+ import type { Event, EventFilter } from "ethers";
6
+
7
+ export interface TypedEvent<
8
+ TArgsArray extends Array<any> = any,
9
+ TArgsObject = any
10
+ > extends Event {
11
+ args: TArgsArray & TArgsObject;
12
+ }
13
+
14
+ export interface TypedEventFilter<_TEvent extends TypedEvent>
15
+ extends EventFilter {}
16
+
17
+ export interface TypedListener<TEvent extends TypedEvent> {
18
+ (...listenerArg: [...__TypechainArgsArray<TEvent>, TEvent]): void;
19
+ }
20
+
21
+ type __TypechainArgsArray<T> = T extends TypedEvent<infer U> ? U : never;
22
+
23
+ export interface OnEvent<TRes> {
24
+ <TEvent extends TypedEvent>(
25
+ eventFilter: TypedEventFilter<TEvent>,
26
+ listener: TypedListener<TEvent>
27
+ ): TRes;
28
+ (eventName: string, listener: Listener): TRes;
29
+ }
30
+
31
+ export type MinEthersFactory<C, ARGS> = {
32
+ deploy(...a: ARGS[]): Promise<C>;
33
+ };
34
+
35
+ export type GetContractTypeFromFactory<F> = F extends MinEthersFactory<
36
+ infer C,
37
+ any
38
+ >
39
+ ? C
40
+ : never;
41
+
42
+ export type GetARGsTypeFromFactory<F> = F extends MinEthersFactory<any, any>
43
+ ? Parameters<F["deploy"]>
44
+ : never;
45
+
46
+ export type PromiseOrValue<T> = T | Promise<T>;
@@ -0,0 +1,181 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import { Contract, Signer, utils } from "ethers";
6
+ import type { Provider } from "@ethersproject/providers";
7
+ import type {
8
+ AvoFactoryProxy,
9
+ AvoFactoryProxyInterface,
10
+ } from "../AvoFactoryProxy";
11
+
12
+ const _abi = [
13
+ {
14
+ inputs: [
15
+ {
16
+ internalType: "contract IAvoVersionsRegistry",
17
+ name: "avoVersionsRegistry_",
18
+ type: "address",
19
+ },
20
+ ],
21
+ stateMutability: "nonpayable",
22
+ type: "constructor",
23
+ },
24
+ {
25
+ inputs: [],
26
+ name: "AvoFactory__InvalidParams",
27
+ type: "error",
28
+ },
29
+ {
30
+ inputs: [],
31
+ name: "AvoFactory__NotEOA",
32
+ type: "error",
33
+ },
34
+ {
35
+ inputs: [],
36
+ name: "AvoFactory__Unauthorized",
37
+ type: "error",
38
+ },
39
+ {
40
+ anonymous: false,
41
+ inputs: [
42
+ {
43
+ indexed: true,
44
+ internalType: "address",
45
+ name: "owner",
46
+ type: "address",
47
+ },
48
+ {
49
+ indexed: true,
50
+ internalType: "address",
51
+ name: "avoSafe",
52
+ type: "address",
53
+ },
54
+ ],
55
+ name: "AvoSafeDeployed",
56
+ type: "event",
57
+ },
58
+ {
59
+ anonymous: false,
60
+ inputs: [
61
+ {
62
+ indexed: false,
63
+ internalType: "uint8",
64
+ name: "version",
65
+ type: "uint8",
66
+ },
67
+ ],
68
+ name: "Initialized",
69
+ type: "event",
70
+ },
71
+ {
72
+ inputs: [],
73
+ name: "avoSafeBytecode",
74
+ outputs: [
75
+ {
76
+ internalType: "bytes32",
77
+ name: "",
78
+ type: "bytes32",
79
+ },
80
+ ],
81
+ stateMutability: "view",
82
+ type: "function",
83
+ },
84
+ {
85
+ inputs: [],
86
+ name: "avoVersionsRegistry",
87
+ outputs: [
88
+ {
89
+ internalType: "contract IAvoVersionsRegistry",
90
+ name: "",
91
+ type: "address",
92
+ },
93
+ ],
94
+ stateMutability: "view",
95
+ type: "function",
96
+ },
97
+ {
98
+ inputs: [],
99
+ name: "avoWalletImpl",
100
+ outputs: [
101
+ {
102
+ internalType: "address",
103
+ name: "",
104
+ type: "address",
105
+ },
106
+ ],
107
+ stateMutability: "view",
108
+ type: "function",
109
+ },
110
+ {
111
+ inputs: [
112
+ {
113
+ internalType: "address",
114
+ name: "owner_",
115
+ type: "address",
116
+ },
117
+ ],
118
+ name: "computeAddress",
119
+ outputs: [
120
+ {
121
+ internalType: "address",
122
+ name: "",
123
+ type: "address",
124
+ },
125
+ ],
126
+ stateMutability: "view",
127
+ type: "function",
128
+ },
129
+ {
130
+ inputs: [
131
+ {
132
+ internalType: "address",
133
+ name: "owner_",
134
+ type: "address",
135
+ },
136
+ ],
137
+ name: "deploy",
138
+ outputs: [
139
+ {
140
+ internalType: "address",
141
+ name: "",
142
+ type: "address",
143
+ },
144
+ ],
145
+ stateMutability: "nonpayable",
146
+ type: "function",
147
+ },
148
+ {
149
+ inputs: [],
150
+ name: "initialize",
151
+ outputs: [],
152
+ stateMutability: "nonpayable",
153
+ type: "function",
154
+ },
155
+ {
156
+ inputs: [
157
+ {
158
+ internalType: "address",
159
+ name: "avoWalletImpl_",
160
+ type: "address",
161
+ },
162
+ ],
163
+ name: "setAvoWalletImpl",
164
+ outputs: [],
165
+ stateMutability: "nonpayable",
166
+ type: "function",
167
+ },
168
+ ] as const;
169
+
170
+ export class AvoFactoryProxy__factory {
171
+ static readonly abi = _abi;
172
+ static createInterface(): AvoFactoryProxyInterface {
173
+ return new utils.Interface(_abi) as AvoFactoryProxyInterface;
174
+ }
175
+ static connect(
176
+ address: string,
177
+ signerOrProvider: Signer | Provider
178
+ ): AvoFactoryProxy {
179
+ return new Contract(address, _abi, signerOrProvider) as AvoFactoryProxy;
180
+ }
181
+ }
@@ -0,0 +1,212 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import { Contract, Signer, utils } from "ethers";
6
+ import type { Provider } from "@ethersproject/providers";
7
+ import type {
8
+ BalanceResolver,
9
+ BalanceResolverInterface,
10
+ } from "../BalanceResolver";
11
+
12
+ const _abi = [
13
+ {
14
+ inputs: [
15
+ {
16
+ internalType: "address",
17
+ name: "owner",
18
+ type: "address",
19
+ },
20
+ {
21
+ internalType: "address",
22
+ name: "spender",
23
+ type: "address",
24
+ },
25
+ {
26
+ internalType: "address[]",
27
+ name: "tknAddress",
28
+ type: "address[]",
29
+ },
30
+ ],
31
+ name: "getAllowances",
32
+ outputs: [
33
+ {
34
+ internalType: "uint256[]",
35
+ name: "",
36
+ type: "uint256[]",
37
+ },
38
+ ],
39
+ stateMutability: "view",
40
+ type: "function",
41
+ },
42
+ {
43
+ inputs: [
44
+ {
45
+ internalType: "address",
46
+ name: "owner",
47
+ type: "address",
48
+ },
49
+ {
50
+ internalType: "address[]",
51
+ name: "tknAddress",
52
+ type: "address[]",
53
+ },
54
+ ],
55
+ name: "getBalances",
56
+ outputs: [
57
+ {
58
+ internalType: "uint256[]",
59
+ name: "",
60
+ type: "uint256[]",
61
+ },
62
+ ],
63
+ stateMutability: "view",
64
+ type: "function",
65
+ },
66
+ {
67
+ inputs: [
68
+ {
69
+ internalType: "address[]",
70
+ name: "owners",
71
+ type: "address[]",
72
+ },
73
+ {
74
+ internalType: "address[]",
75
+ name: "tokens",
76
+ type: "address[]",
77
+ },
78
+ ],
79
+ name: "getBalancesOfOwners",
80
+ outputs: [
81
+ {
82
+ components: [
83
+ {
84
+ internalType: "address",
85
+ name: "owner",
86
+ type: "address",
87
+ },
88
+ {
89
+ internalType: "uint256[]",
90
+ name: "balances",
91
+ type: "uint256[]",
92
+ },
93
+ ],
94
+ internalType: "struct Resolver.BalanceReturnData[]",
95
+ name: "",
96
+ type: "tuple[]",
97
+ },
98
+ ],
99
+ stateMutability: "view",
100
+ type: "function",
101
+ },
102
+ {
103
+ inputs: [
104
+ {
105
+ components: [
106
+ {
107
+ internalType: "address",
108
+ name: "owner",
109
+ type: "address",
110
+ },
111
+ {
112
+ internalType: "address[]",
113
+ name: "tokens",
114
+ type: "address[]",
115
+ },
116
+ ],
117
+ internalType: "struct Resolver.BalanceData[]",
118
+ name: "datas",
119
+ type: "tuple[]",
120
+ },
121
+ ],
122
+ name: "getBalancesOfOwnersWithTokens",
123
+ outputs: [
124
+ {
125
+ components: [
126
+ {
127
+ internalType: "address",
128
+ name: "owner",
129
+ type: "address",
130
+ },
131
+ {
132
+ internalType: "uint256[]",
133
+ name: "balances",
134
+ type: "uint256[]",
135
+ },
136
+ ],
137
+ internalType: "struct Resolver.BalanceReturnData[]",
138
+ name: "",
139
+ type: "tuple[]",
140
+ },
141
+ ],
142
+ stateMutability: "view",
143
+ type: "function",
144
+ },
145
+ {
146
+ inputs: [
147
+ {
148
+ internalType: "address[]",
149
+ name: "tknAddress",
150
+ type: "address[]",
151
+ },
152
+ ],
153
+ name: "getTokenDetails",
154
+ outputs: [
155
+ {
156
+ components: [
157
+ {
158
+ internalType: "bool",
159
+ name: "isToken",
160
+ type: "bool",
161
+ },
162
+ {
163
+ internalType: "string",
164
+ name: "name",
165
+ type: "string",
166
+ },
167
+ {
168
+ internalType: "string",
169
+ name: "symbol",
170
+ type: "string",
171
+ },
172
+ {
173
+ internalType: "uint256",
174
+ name: "decimals",
175
+ type: "uint256",
176
+ },
177
+ ],
178
+ internalType: "struct Resolver.TokenData[]",
179
+ name: "",
180
+ type: "tuple[]",
181
+ },
182
+ ],
183
+ stateMutability: "view",
184
+ type: "function",
185
+ },
186
+ {
187
+ inputs: [],
188
+ name: "name",
189
+ outputs: [
190
+ {
191
+ internalType: "string",
192
+ name: "",
193
+ type: "string",
194
+ },
195
+ ],
196
+ stateMutability: "view",
197
+ type: "function",
198
+ },
199
+ ] as const;
200
+
201
+ export class BalanceResolver__factory {
202
+ static readonly abi = _abi;
203
+ static createInterface(): BalanceResolverInterface {
204
+ return new utils.Interface(_abi) as BalanceResolverInterface;
205
+ }
206
+ static connect(
207
+ address: string,
208
+ signerOrProvider: Signer | Provider
209
+ ): BalanceResolver {
210
+ return new Contract(address, _abi, signerOrProvider) as BalanceResolver;
211
+ }
212
+ }