@instadapp/avocado-base 0.0.0-dev.fd1507c → 0.0.0-dev.ff927bc
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/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/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 +40 -0
- package/components/ActionMetadata.vue +45 -17
- package/components/AuthorityAvatar.vue +37 -0
- package/components/ChainLogo.vue +14 -563
- package/components/CopyClipboard.vue +58 -0
- package/components/metadata/Bridge.vue +30 -8
- package/components/metadata/CrossTransfer.vue +19 -5
- package/components/metadata/GasTopup.vue +10 -2
- package/components/metadata/Permit2.vue +6 -1
- package/components/metadata/Signers.vue +66 -0
- package/components/metadata/Swap.vue +26 -25
- package/components/metadata/Transfer.vue +14 -7
- 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 +14 -9
- package/utils/formatter.ts +2 -2
- package/utils/helper.ts +8 -0
- package/utils/metadata.ts +345 -191
- package/utils/network.ts +335 -74
- package/utils/services.ts +8 -1
- package/utils/utils.d.ts +136 -126
package/contracts/index.ts
CHANGED
|
@@ -6,9 +6,11 @@ export type { BalanceResolver } from "./BalanceResolver";
|
|
|
6
6
|
export type { Erc20 } from "./Erc20";
|
|
7
7
|
export type { Forwarder } from "./Forwarder";
|
|
8
8
|
export type { GaslessWallet } from "./GaslessWallet";
|
|
9
|
+
export type { MultisigForwarder } from "./MultisigForwarder";
|
|
9
10
|
export * as factories from "./factories";
|
|
10
11
|
export { AvoFactoryProxy__factory } from "./factories/AvoFactoryProxy__factory";
|
|
11
12
|
export { BalanceResolver__factory } from "./factories/BalanceResolver__factory";
|
|
12
13
|
export { Erc20__factory } from "./factories/Erc20__factory";
|
|
13
14
|
export { Forwarder__factory } from "./factories/Forwarder__factory";
|
|
14
15
|
export { GaslessWallet__factory } from "./factories/GaslessWallet__factory";
|
|
16
|
+
export { MultisigForwarder__factory } from "./factories/MultisigForwarder__factory";
|
package/package.json
CHANGED
|
@@ -1,30 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instadapp/avocado-base",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.ff927bc",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./nuxt.config.ts",
|
|
6
6
|
"types": "global.d.ts",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=v18.18.0"
|
|
9
|
+
},
|
|
7
10
|
"scripts": {
|
|
8
11
|
"build": "nuxt build",
|
|
9
12
|
"dev": "nuxt dev",
|
|
10
13
|
"generate": "nuxt generate",
|
|
11
14
|
"preview": "nuxt preview",
|
|
12
|
-
"generate:contracts": "rimraf contracts && typechain --target=ethers-v5 'abi/*.json' --out-dir 'contracts'"
|
|
15
|
+
"generate:contracts": "rimraf contracts && typechain --target=ethers-v5 'abi/*.json' --out-dir 'contracts'",
|
|
16
|
+
"typecheck": "nuxi typecheck"
|
|
13
17
|
},
|
|
14
18
|
"devDependencies": {
|
|
15
|
-
"@
|
|
16
|
-
"@instadapp/avocado-dev": "npm:@instadapp/avocado@dev",
|
|
17
|
-
"@nuxtjs/tailwindcss": "^6.6.5",
|
|
19
|
+
"@nuxtjs/tailwindcss": "^6.11.3",
|
|
18
20
|
"@typechain/ethers-v5": "^10.2.0",
|
|
19
|
-
"nuxt": "^3.
|
|
20
|
-
"nuxt-svgo": "^
|
|
21
|
+
"nuxt": "^3.10.1",
|
|
22
|
+
"nuxt-svgo": "^4.0.0",
|
|
21
23
|
"rimraf": "^3.0.2",
|
|
22
24
|
"typechain": "^8.1.1",
|
|
23
|
-
"unplugin-vue-components": "^0.25.1"
|
|
25
|
+
"unplugin-vue-components": "^0.25.1",
|
|
26
|
+
"vue-tippy": "^6.0.0"
|
|
24
27
|
},
|
|
25
28
|
"dependencies": {
|
|
26
29
|
"@vueuse/nuxt": "^10.2.0",
|
|
27
30
|
"bignumber.js": "^9.1.1",
|
|
28
|
-
"ethers": "^5.7.2"
|
|
31
|
+
"ethers": "^5.7.2",
|
|
32
|
+
"viem": "^2.7.16",
|
|
33
|
+
"xxhashjs": "^0.2.2"
|
|
29
34
|
}
|
|
30
35
|
}
|
package/utils/formatter.ts
CHANGED
|
@@ -19,7 +19,7 @@ export function formatPercent(
|
|
|
19
19
|
return formatter.format(valueAsNumber);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
export function shortenHash(hash: string
|
|
22
|
+
export function shortenHash(hash: string | `0x${string}`, length: number = 4) {
|
|
23
23
|
if (!hash) return;
|
|
24
24
|
if (hash.length < 12) return hash;
|
|
25
25
|
const beginningChars = hash.startsWith("0x") ? length + 2 : length;
|
|
@@ -72,7 +72,7 @@ export function formatDecimal(value: string | number, fractionDigits?: number) {
|
|
|
72
72
|
let decimals;
|
|
73
73
|
|
|
74
74
|
if (num.lt(1)) {
|
|
75
|
-
decimals =
|
|
75
|
+
decimals = 4;
|
|
76
76
|
} else if (num.lt(10)) {
|
|
77
77
|
decimals = 6;
|
|
78
78
|
} else if (num.lt(100)) {
|
package/utils/helper.ts
CHANGED
|
@@ -52,3 +52,11 @@ export function onImageError(this: HTMLImageElement) {
|
|
|
52
52
|
parentElement.classList.add("bg-gray-300");
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
+
|
|
56
|
+
export function formatMultipleAddresses(addresses: string[], shorten = true) {
|
|
57
|
+
const formatter = new Intl.ListFormat('en', { style: 'long', type: 'conjunction' })
|
|
58
|
+
const formattedString = formatter.format(addresses.map(i => shorten ? shortenHash(i) || '' : i))
|
|
59
|
+
|
|
60
|
+
return formattedString
|
|
61
|
+
}
|
|
62
|
+
|