@instadapp/avocado-base 0.0.74 → 0.0.75
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.
|
@@ -36,5 +36,5 @@ defineProps<{
|
|
|
36
36
|
<InstadappProSVG v-else-if="action === 'instadapp-pro'"/>
|
|
37
37
|
<PermitSignSVG v-else-if="action === 'permit2'"/>
|
|
38
38
|
<UpgradeSVG v-else-if="action === 'upgrade'"/>
|
|
39
|
-
<HammerSVG v-else-if="action === '
|
|
39
|
+
<HammerSVG v-else-if="action === 'tx-builder'"/>
|
|
40
40
|
</template>
|
|
@@ -53,8 +53,10 @@ provide('tokens', props.tokens);
|
|
|
53
53
|
{{ chainIdToName(metadata.chainId) }}
|
|
54
54
|
</div>
|
|
55
55
|
</div>
|
|
56
|
-
<div v-if="metadata.type === '
|
|
57
|
-
|
|
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' }})
|
|
58
60
|
</div>
|
|
59
61
|
<div v-if="metadata.type === 'instadapp-pro'" class="self-start capitalize flex gap-3">
|
|
60
62
|
Instadapp Pro |
|
package/package.json
CHANGED
package/utils/metadata.ts
CHANGED
|
@@ -19,7 +19,7 @@ export const MetadataEnums = {
|
|
|
19
19
|
"remove-signers": "remove-signers",
|
|
20
20
|
"change-threshold": "change-threshold",
|
|
21
21
|
import: "import",
|
|
22
|
-
"
|
|
22
|
+
"tx-builder": "tx-builder",
|
|
23
23
|
} as const;
|
|
24
24
|
|
|
25
25
|
const multiMetadataTypes = ["bytes[]"];
|
|
@@ -58,7 +58,7 @@ const actionMetadataTypes: Record<MetadataTypes, string[]> = {
|
|
|
58
58
|
import: ["bytes32 protocol", "uint256 valueInUsd"],
|
|
59
59
|
auth: ["address address", "uint256 chainId", "bool remove"],
|
|
60
60
|
deploy: [],
|
|
61
|
-
"
|
|
61
|
+
"tx-builder": ["bytes32 actionCount"],
|
|
62
62
|
permit2: [
|
|
63
63
|
"address token",
|
|
64
64
|
"address spender",
|
|
@@ -182,12 +182,12 @@ export const encodeTransactionBuilderMetadata = (
|
|
|
182
182
|
single = true
|
|
183
183
|
) => {
|
|
184
184
|
const encodedData = ethers.utils.defaultAbiCoder.encode(
|
|
185
|
-
actionMetadataTypes["
|
|
185
|
+
actionMetadataTypes["tx-builder"],
|
|
186
186
|
[actionCount]
|
|
187
187
|
);
|
|
188
188
|
|
|
189
189
|
const data = encodeMetadata({
|
|
190
|
-
type: MetadataEnums["
|
|
190
|
+
type: MetadataEnums["tx-builder"],
|
|
191
191
|
encodedData,
|
|
192
192
|
});
|
|
193
193
|
|
|
@@ -476,9 +476,9 @@ const typesPayload: IPayload = {
|
|
|
476
476
|
deploy: (data, type) => ({
|
|
477
477
|
type,
|
|
478
478
|
}),
|
|
479
|
-
"
|
|
479
|
+
"tx-builder": (data, type) => ({
|
|
480
480
|
type,
|
|
481
|
-
actionCount:
|
|
481
|
+
actionCount: utils.parseBytes32String(data.actionCount || ""),
|
|
482
482
|
}),
|
|
483
483
|
permit2: (data, type) => ({
|
|
484
484
|
type,
|