@openzeppelin/contracts-mcp 0.5.5 → 0.5.7
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/dist/cairo/tools/account.js +2 -2
- package/dist/cairo/tools/account.js.map +1 -1
- package/dist/cairo/tools/custom.js +2 -2
- package/dist/cairo/tools/custom.js.map +1 -1
- package/dist/cairo/tools/erc1155.js +2 -2
- package/dist/cairo/tools/erc1155.js.map +1 -1
- package/dist/cairo/tools/erc20.js +2 -2
- package/dist/cairo/tools/erc20.js.map +1 -1
- package/dist/cairo/tools/erc721.js +2 -2
- package/dist/cairo/tools/erc721.js.map +1 -1
- package/dist/cairo/tools/governor.js +2 -2
- package/dist/cairo/tools/governor.js.map +1 -1
- package/dist/cairo/tools/multisig.js +2 -2
- package/dist/cairo/tools/multisig.js.map +1 -1
- package/dist/cairo/tools/vesting.js +2 -2
- package/dist/cairo/tools/vesting.js.map +1 -1
- package/dist/confidential/tools/erc7984.js +2 -2
- package/dist/confidential/tools/erc7984.js.map +1 -1
- package/dist/solidity/tools/account.js +2 -2
- package/dist/solidity/tools/account.js.map +1 -1
- package/dist/solidity/tools/custom.js +2 -2
- package/dist/solidity/tools/custom.js.map +1 -1
- package/dist/solidity/tools/erc1155.js +2 -2
- package/dist/solidity/tools/erc1155.js.map +1 -1
- package/dist/solidity/tools/erc20.js +2 -2
- package/dist/solidity/tools/erc20.js.map +1 -1
- package/dist/solidity/tools/erc721.js +2 -2
- package/dist/solidity/tools/erc721.js.map +1 -1
- package/dist/solidity/tools/governor.js +2 -2
- package/dist/solidity/tools/governor.js.map +1 -1
- package/dist/solidity/tools/rwa.js +2 -2
- package/dist/solidity/tools/rwa.js.map +1 -1
- package/dist/solidity/tools/stablecoin.js +2 -2
- package/dist/solidity/tools/stablecoin.js.map +1 -1
- package/dist/stellar/tools/fungible.js +2 -2
- package/dist/stellar/tools/fungible.js.map +1 -1
- package/dist/stellar/tools/non-fungible.js +2 -2
- package/dist/stellar/tools/non-fungible.js.map +1 -1
- package/dist/stellar/tools/stablecoin.js +2 -2
- package/dist/stellar/tools/stablecoin.js.map +1 -1
- package/dist/stylus/tools/erc1155.js +2 -2
- package/dist/stylus/tools/erc1155.js.map +1 -1
- package/dist/stylus/tools/erc20.js +2 -2
- package/dist/stylus/tools/erc20.js.map +1 -1
- package/dist/stylus/tools/erc721.js +2 -2
- package/dist/stylus/tools/erc721.js.map +1 -1
- package/dist/uniswap-hooks/tools/hooks.js +2 -2
- package/dist/uniswap-hooks/tools/hooks.js.map +1 -1
- package/package.json +6 -6
- package/src/cairo/tools/account.ts +2 -2
- package/src/cairo/tools/custom.ts +2 -2
- package/src/cairo/tools/erc1155.ts +2 -2
- package/src/cairo/tools/erc20.ts +2 -2
- package/src/cairo/tools/erc721.ts +2 -2
- package/src/cairo/tools/governor.ts +2 -2
- package/src/cairo/tools/multisig.ts +2 -2
- package/src/cairo/tools/vesting.ts +2 -2
- package/src/confidential/tools/erc7984.ts +2 -2
- package/src/solidity/tools/account.ts +2 -2
- package/src/solidity/tools/custom.ts +2 -2
- package/src/solidity/tools/erc1155.ts +2 -2
- package/src/solidity/tools/erc20.ts +2 -2
- package/src/solidity/tools/erc721.ts +2 -2
- package/src/solidity/tools/governor.ts +2 -2
- package/src/solidity/tools/rwa.ts +2 -2
- package/src/solidity/tools/stablecoin.ts +2 -2
- package/src/stellar/tools/fungible.ts +2 -2
- package/src/stellar/tools/non-fungible.ts +2 -2
- package/src/stellar/tools/stablecoin.ts +2 -2
- package/src/stylus/tools/erc1155.ts +2 -2
- package/src/stylus/tools/erc20.ts +2 -2
- package/src/stylus/tools/erc721.ts +2 -2
- package/src/uniswap-hooks/tools/hooks.ts +2 -2
- package/dist/cairo/schemas.d.ts +0 -342
- package/dist/cairo/schemas.d.ts.map +0 -1
- package/dist/cairo/schemas.js +0 -153
- package/dist/cairo/schemas.js.map +0 -1
- package/dist/confidential/schemas.d.ts +0 -33
- package/dist/confidential/schemas.d.ts.map +0 -1
- package/dist/confidential/schemas.js +0 -33
- package/dist/confidential/schemas.js.map +0 -1
- package/dist/solidity/schemas.d.ts +0 -211
- package/dist/solidity/schemas.d.ts.map +0 -1
- package/dist/solidity/schemas.js +0 -166
- package/dist/solidity/schemas.js.map +0 -1
- package/dist/stellar/schemas.d.ts +0 -84
- package/dist/stellar/schemas.d.ts.map +0 -1
- package/dist/stellar/schemas.js +0 -58
- package/dist/stellar/schemas.js.map +0 -1
- package/dist/stylus/schemas.d.ts +0 -60
- package/dist/stylus/schemas.d.ts.map +0 -1
- package/dist/stylus/schemas.js +0 -44
- package/dist/stylus/schemas.js.map +0 -1
- package/dist/uniswap-hooks/schemas.d.ts +0 -106
- package/dist/uniswap-hooks/schemas.d.ts.map +0 -1
- package/dist/uniswap-hooks/schemas.js +0 -78
- package/dist/uniswap-hooks/schemas.js.map +0 -1
- package/src/cairo/schemas.ts +0 -176
- package/src/confidential/schemas.ts +0 -35
- package/src/solidity/schemas.ts +0 -186
- package/src/stellar/schemas.ts +0 -69
- package/src/stylus/schemas.ts +0 -54
- package/src/uniswap-hooks/schemas.ts +0 -92
package/dist/stylus/schemas.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.erc1155Schema = exports.erc721Schema = exports.erc20Schema = exports.commonSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const wizard_common_1 = require("@openzeppelin/wizard-common");
|
|
6
|
-
/**
|
|
7
|
-
* Static type assertions to ensure schemas satisfy the Wizard API types. Not called at runtime.
|
|
8
|
-
*/
|
|
9
|
-
function _typeAssertions() {
|
|
10
|
-
const _assertions = {
|
|
11
|
-
ERC20: zod_1.z.object(exports.erc20Schema).parse({}),
|
|
12
|
-
ERC721: zod_1.z.object(exports.erc721Schema).parse({}),
|
|
13
|
-
ERC1155: zod_1.z.object(exports.erc1155Schema).parse({}),
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
exports.commonSchema = {
|
|
17
|
-
info: zod_1.z
|
|
18
|
-
.object({
|
|
19
|
-
securityContact: zod_1.z.string().optional().describe(wizard_common_1.infoDescriptions.securityContact),
|
|
20
|
-
license: zod_1.z.string().optional().describe(wizard_common_1.infoDescriptions.license),
|
|
21
|
-
})
|
|
22
|
-
.optional()
|
|
23
|
-
.describe(wizard_common_1.infoDescriptions.info),
|
|
24
|
-
};
|
|
25
|
-
exports.erc20Schema = {
|
|
26
|
-
name: zod_1.z.string().describe(wizard_common_1.commonDescriptions.name),
|
|
27
|
-
burnable: zod_1.z.boolean().optional().describe(wizard_common_1.commonDescriptions.burnable),
|
|
28
|
-
permit: zod_1.z.boolean().optional().describe(wizard_common_1.stylusERC20Descriptions.permit),
|
|
29
|
-
flashmint: zod_1.z.boolean().optional().describe(wizard_common_1.stylusERC20Descriptions.flashmint),
|
|
30
|
-
...exports.commonSchema,
|
|
31
|
-
};
|
|
32
|
-
exports.erc721Schema = {
|
|
33
|
-
name: zod_1.z.string().describe(wizard_common_1.commonDescriptions.name),
|
|
34
|
-
burnable: zod_1.z.boolean().optional().describe(wizard_common_1.commonDescriptions.burnable),
|
|
35
|
-
enumerable: zod_1.z.boolean().optional().describe(wizard_common_1.stylusERC721Descriptions.enumerable),
|
|
36
|
-
...exports.commonSchema,
|
|
37
|
-
};
|
|
38
|
-
exports.erc1155Schema = {
|
|
39
|
-
name: zod_1.z.string().describe(wizard_common_1.commonDescriptions.name),
|
|
40
|
-
burnable: zod_1.z.boolean().optional().describe(wizard_common_1.commonDescriptions.burnable),
|
|
41
|
-
supply: zod_1.z.boolean().optional().describe(wizard_common_1.stylusERC1155Descriptions.supply),
|
|
42
|
-
...exports.commonSchema,
|
|
43
|
-
};
|
|
44
|
-
//# sourceMappingURL=schemas.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/stylus/schemas.ts"],"names":[],"mapp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AC1B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kCAAkB,CAAC,IAAI,CAAC;IAClD,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kCAAkB,CAAC,QAAQ,CAAC;IACtE,UAAU,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wCAAwB,CAAC,UAAU,CAAC;IAChF,GAAG,oBAAY;CACiB,CAAC;AAEtB,QAAA,aAAa,GAAG;IAC3B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kCAAkB,CAAC,IAAI,CAAC;IAClD,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kCAAkB,CAAC,QAAQ,CAAC;IACtE,MAAM,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yCAAyB,CAAC,MAAM,CAAC;IACzE,GAAG,oBAAY;CACiB,CAAC"}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const commonSchema: {
|
|
3
|
-
readonly access: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"ownable">, z.ZodLiteral<"roles">]>, z.ZodLiteral<"managed">]>>;
|
|
4
|
-
readonly info: z.ZodOptional<z.ZodObject<{
|
|
5
|
-
securityContact: z.ZodOptional<z.ZodString>;
|
|
6
|
-
license: z.ZodOptional<z.ZodString>;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
securityContact?: string | undefined;
|
|
9
|
-
license?: string | undefined;
|
|
10
|
-
}, {
|
|
11
|
-
securityContact?: string | undefined;
|
|
12
|
-
license?: string | undefined;
|
|
13
|
-
}>>;
|
|
14
|
-
};
|
|
15
|
-
export declare const hooksSchema: {
|
|
16
|
-
readonly access: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"ownable">, z.ZodLiteral<"roles">]>, z.ZodLiteral<"managed">]>>;
|
|
17
|
-
readonly info: z.ZodOptional<z.ZodObject<{
|
|
18
|
-
securityContact: z.ZodOptional<z.ZodString>;
|
|
19
|
-
license: z.ZodOptional<z.ZodString>;
|
|
20
|
-
}, "strip", z.ZodTypeAny, {
|
|
21
|
-
securityContact?: string | undefined;
|
|
22
|
-
license?: string | undefined;
|
|
23
|
-
}, {
|
|
24
|
-
securityContact?: string | undefined;
|
|
25
|
-
license?: string | undefined;
|
|
26
|
-
}>>;
|
|
27
|
-
readonly hook: z.ZodEnum<["BaseHook" | "BaseAsyncSwap" | "BaseCustomAccounting" | "BaseCustomCurve" | "BaseDynamicFee" | "BaseOverrideFee" | "BaseDynamicAfterFee" | "BaseHookFee" | "AntiSandwichHook" | "LiquidityPenaltyHook" | "LimitOrderHook" | "ReHypothecationHook" | "BaseOracleHook" | "OracleHookWithV3Adapters", ...("BaseHook" | "BaseAsyncSwap" | "BaseCustomAccounting" | "BaseCustomCurve" | "BaseDynamicFee" | "BaseOverrideFee" | "BaseDynamicAfterFee" | "BaseHookFee" | "AntiSandwichHook" | "LiquidityPenaltyHook" | "LimitOrderHook" | "ReHypothecationHook" | "BaseOracleHook" | "OracleHookWithV3Adapters")[]]>;
|
|
28
|
-
readonly name: z.ZodString;
|
|
29
|
-
readonly pausable: z.ZodBoolean;
|
|
30
|
-
readonly currencySettler: z.ZodBoolean;
|
|
31
|
-
readonly safeCast: z.ZodBoolean;
|
|
32
|
-
readonly transientStorage: z.ZodBoolean;
|
|
33
|
-
readonly shares: z.ZodObject<{
|
|
34
|
-
options: z.ZodUnion<[z.ZodLiteral<false>, z.ZodEnum<["ERC20", "ERC6909", "ERC1155"]>]>;
|
|
35
|
-
name: z.ZodOptional<z.ZodString>;
|
|
36
|
-
symbol: z.ZodOptional<z.ZodString>;
|
|
37
|
-
uri: z.ZodOptional<z.ZodString>;
|
|
38
|
-
}, "strip", z.ZodTypeAny, {
|
|
39
|
-
options: false | "ERC20" | "ERC1155" | "ERC6909";
|
|
40
|
-
symbol?: string | undefined;
|
|
41
|
-
name?: string | undefined;
|
|
42
|
-
uri?: string | undefined;
|
|
43
|
-
}, {
|
|
44
|
-
options: false | "ERC20" | "ERC1155" | "ERC6909";
|
|
45
|
-
symbol?: string | undefined;
|
|
46
|
-
name?: string | undefined;
|
|
47
|
-
uri?: string | undefined;
|
|
48
|
-
}>;
|
|
49
|
-
readonly permissions: z.ZodObject<{
|
|
50
|
-
beforeInitialize: z.ZodBoolean;
|
|
51
|
-
afterInitialize: z.ZodBoolean;
|
|
52
|
-
beforeAddLiquidity: z.ZodBoolean;
|
|
53
|
-
beforeRemoveLiquidity: z.ZodBoolean;
|
|
54
|
-
afterAddLiquidity: z.ZodBoolean;
|
|
55
|
-
afterRemoveLiquidity: z.ZodBoolean;
|
|
56
|
-
beforeSwap: z.ZodBoolean;
|
|
57
|
-
afterSwap: z.ZodBoolean;
|
|
58
|
-
beforeDonate: z.ZodBoolean;
|
|
59
|
-
afterDonate: z.ZodBoolean;
|
|
60
|
-
beforeSwapReturnDelta: z.ZodBoolean;
|
|
61
|
-
afterSwapReturnDelta: z.ZodBoolean;
|
|
62
|
-
afterAddLiquidityReturnDelta: z.ZodBoolean;
|
|
63
|
-
afterRemoveLiquidityReturnDelta: z.ZodBoolean;
|
|
64
|
-
}, "strip", z.ZodTypeAny, {
|
|
65
|
-
beforeInitialize: boolean;
|
|
66
|
-
afterInitialize: boolean;
|
|
67
|
-
beforeAddLiquidity: boolean;
|
|
68
|
-
beforeRemoveLiquidity: boolean;
|
|
69
|
-
afterAddLiquidity: boolean;
|
|
70
|
-
afterRemoveLiquidity: boolean;
|
|
71
|
-
beforeSwap: boolean;
|
|
72
|
-
afterSwap: boolean;
|
|
73
|
-
beforeDonate: boolean;
|
|
74
|
-
afterDonate: boolean;
|
|
75
|
-
beforeSwapReturnDelta: boolean;
|
|
76
|
-
afterSwapReturnDelta: boolean;
|
|
77
|
-
afterAddLiquidityReturnDelta: boolean;
|
|
78
|
-
afterRemoveLiquidityReturnDelta: boolean;
|
|
79
|
-
}, {
|
|
80
|
-
beforeInitialize: boolean;
|
|
81
|
-
afterInitialize: boolean;
|
|
82
|
-
beforeAddLiquidity: boolean;
|
|
83
|
-
beforeRemoveLiquidity: boolean;
|
|
84
|
-
afterAddLiquidity: boolean;
|
|
85
|
-
afterRemoveLiquidity: boolean;
|
|
86
|
-
beforeSwap: boolean;
|
|
87
|
-
afterSwap: boolean;
|
|
88
|
-
beforeDonate: boolean;
|
|
89
|
-
afterDonate: boolean;
|
|
90
|
-
beforeSwapReturnDelta: boolean;
|
|
91
|
-
afterSwapReturnDelta: boolean;
|
|
92
|
-
afterAddLiquidityReturnDelta: boolean;
|
|
93
|
-
afterRemoveLiquidityReturnDelta: boolean;
|
|
94
|
-
}>;
|
|
95
|
-
readonly inputs: z.ZodObject<{
|
|
96
|
-
blockNumberOffset: z.ZodNumber;
|
|
97
|
-
maxAbsTickDelta: z.ZodNumber;
|
|
98
|
-
}, "strip", z.ZodTypeAny, {
|
|
99
|
-
blockNumberOffset: number;
|
|
100
|
-
maxAbsTickDelta: number;
|
|
101
|
-
}, {
|
|
102
|
-
blockNumberOffset: number;
|
|
103
|
-
maxAbsTickDelta: number;
|
|
104
|
-
}>;
|
|
105
|
-
};
|
|
106
|
-
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/uniswap-hooks/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA2BxB,eAAO,MAAM,YAAY;;;;;;;;;;;;CAcS,CAAC;AAuCnC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWU,CAAC"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.hooksSchema = exports.commonSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const wizard_common_1 = require("@openzeppelin/wizard-common");
|
|
6
|
-
const wizard_uniswap_hooks_1 = require("@openzeppelin/wizard-uniswap-hooks");
|
|
7
|
-
/**
|
|
8
|
-
* Static type assertions to ensure schemas satisfy the Wizard API types. Not called at runtime.
|
|
9
|
-
*/
|
|
10
|
-
function _typeAssertions() {
|
|
11
|
-
const _assertions = {
|
|
12
|
-
Hooks: zod_1.z.object(exports.hooksSchema).parse({}),
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
const hookEnum = zod_1.z.enum(wizard_uniswap_hooks_1.HooksNames);
|
|
16
|
-
const sharesOptionsSchema = zod_1.z.union([zod_1.z.literal(false), zod_1.z.enum(wizard_uniswap_hooks_1.ShareOptions)]);
|
|
17
|
-
exports.commonSchema = {
|
|
18
|
-
access: zod_1.z
|
|
19
|
-
.literal('ownable')
|
|
20
|
-
.or(zod_1.z.literal('roles'))
|
|
21
|
-
.or(zod_1.z.literal('managed'))
|
|
22
|
-
.optional()
|
|
23
|
-
.describe(wizard_common_1.solidityCommonDescriptions.access),
|
|
24
|
-
info: zod_1.z
|
|
25
|
-
.object({
|
|
26
|
-
securityContact: zod_1.z.string().optional().describe(wizard_common_1.infoDescriptions.securityContact),
|
|
27
|
-
license: zod_1.z.string().optional().describe(wizard_common_1.infoDescriptions.license),
|
|
28
|
-
})
|
|
29
|
-
.optional()
|
|
30
|
-
.describe(wizard_common_1.infoDescriptions.info),
|
|
31
|
-
};
|
|
32
|
-
const sharesSchema = zod_1.z
|
|
33
|
-
.object({
|
|
34
|
-
options: sharesOptionsSchema.describe(wizard_common_1.uniswapHooksSharesDescriptions.options),
|
|
35
|
-
name: zod_1.z.string().optional().describe(wizard_common_1.uniswapHooksSharesDescriptions.name),
|
|
36
|
-
symbol: zod_1.z.string().optional().describe(wizard_common_1.uniswapHooksSharesDescriptions.symbol),
|
|
37
|
-
uri: zod_1.z.string().optional().describe(wizard_common_1.uniswapHooksSharesDescriptions.uri),
|
|
38
|
-
})
|
|
39
|
-
.describe(wizard_common_1.uniswapHooksDescriptions.shares);
|
|
40
|
-
const permissionsSchema = zod_1.z
|
|
41
|
-
.object({
|
|
42
|
-
beforeInitialize: zod_1.z.boolean().describe(wizard_common_1.uniswapHooksPermissionDescriptions.beforeInitialize),
|
|
43
|
-
afterInitialize: zod_1.z.boolean().describe(wizard_common_1.uniswapHooksPermissionDescriptions.afterInitialize),
|
|
44
|
-
beforeAddLiquidity: zod_1.z.boolean().describe(wizard_common_1.uniswapHooksPermissionDescriptions.beforeAddLiquidity),
|
|
45
|
-
beforeRemoveLiquidity: zod_1.z.boolean().describe(wizard_common_1.uniswapHooksPermissionDescriptions.beforeRemoveLiquidity),
|
|
46
|
-
afterAddLiquidity: zod_1.z.boolean().describe(wizard_common_1.uniswapHooksPermissionDescriptions.afterAddLiquidity),
|
|
47
|
-
afterRemoveLiquidity: zod_1.z.boolean().describe(wizard_common_1.uniswapHooksPermissionDescriptions.afterRemoveLiquidity),
|
|
48
|
-
beforeSwap: zod_1.z.boolean().describe(wizard_common_1.uniswapHooksPermissionDescriptions.beforeSwap),
|
|
49
|
-
afterSwap: zod_1.z.boolean().describe(wizard_common_1.uniswapHooksPermissionDescriptions.afterSwap),
|
|
50
|
-
beforeDonate: zod_1.z.boolean().describe(wizard_common_1.uniswapHooksPermissionDescriptions.beforeDonate),
|
|
51
|
-
afterDonate: zod_1.z.boolean().describe(wizard_common_1.uniswapHooksPermissionDescriptions.afterDonate),
|
|
52
|
-
beforeSwapReturnDelta: zod_1.z.boolean().describe(wizard_common_1.uniswapHooksPermissionDescriptions.beforeSwapReturnDelta),
|
|
53
|
-
afterSwapReturnDelta: zod_1.z.boolean().describe(wizard_common_1.uniswapHooksPermissionDescriptions.afterSwapReturnDelta),
|
|
54
|
-
afterAddLiquidityReturnDelta: zod_1.z.boolean().describe(wizard_common_1.uniswapHooksPermissionDescriptions.afterAddLiquidityReturnDelta),
|
|
55
|
-
afterRemoveLiquidityReturnDelta: zod_1.z
|
|
56
|
-
.boolean()
|
|
57
|
-
.describe(wizard_common_1.uniswapHooksPermissionDescriptions.afterRemoveLiquidityReturnDelta),
|
|
58
|
-
})
|
|
59
|
-
.describe(wizard_common_1.uniswapHooksDescriptions.permissions);
|
|
60
|
-
const inputsSchema = zod_1.z
|
|
61
|
-
.object({
|
|
62
|
-
blockNumberOffset: zod_1.z.number().describe(wizard_common_1.uniswapHooksInputsDescriptions.blockNumberOffset),
|
|
63
|
-
maxAbsTickDelta: zod_1.z.number().describe(wizard_common_1.uniswapHooksInputsDescriptions.maxAbsTickDelta),
|
|
64
|
-
})
|
|
65
|
-
.describe(wizard_common_1.uniswapHooksDescriptions.inputs);
|
|
66
|
-
exports.hooksSchema = {
|
|
67
|
-
hook: hookEnum.describe(wizard_common_1.uniswapHooksDescriptions.hook),
|
|
68
|
-
name: zod_1.z.string().describe(wizard_common_1.commonDescriptions.name),
|
|
69
|
-
pausable: zod_1.z.boolean().describe(wizard_common_1.commonDescriptions.pausable),
|
|
70
|
-
currencySettler: zod_1.z.boolean().describe(wizard_common_1.uniswapHooksDescriptions.currencySettler),
|
|
71
|
-
safeCast: zod_1.z.boolean().describe(wizard_common_1.uniswapHooksDescriptions.safeCast),
|
|
72
|
-
transientStorage: zod_1.z.boolean().describe(wizard_common_1.uniswapHooksDescriptions.transientStorage),
|
|
73
|
-
shares: sharesSchema,
|
|
74
|
-
permissions: permissionsSchema,
|
|
75
|
-
inputs: inputsSchema,
|
|
76
|
-
...exports.commonSchema,
|
|
77
|
-
};
|
|
78
|
-
//# sourceMappingURL=schemas.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schemas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QAAQ,CAAC,wCAAwB,CAAC,QAAQ,CAAC;IACjE,gBAAgB,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,wCAAwB,CAAC,gBAAgB,CAAC;IACjF,MAAM,EAAE,YAAY;IACpB,WAAW,EAAE,iBAAiB;IAC9B,MAAM,EAAE,YAAY;IACpB,GAAG,oBAAY;CACiB,CAAC"}
|
package/src/cairo/schemas.ts
DELETED
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
commonDescriptions,
|
|
4
|
-
infoDescriptions,
|
|
5
|
-
cairoCommonDescriptions,
|
|
6
|
-
cairoAccessDescriptions,
|
|
7
|
-
cairoMacrosDescriptions,
|
|
8
|
-
cairoERC20Descriptions,
|
|
9
|
-
cairoERC721Descriptions,
|
|
10
|
-
cairoRoyaltyInfoDescriptions,
|
|
11
|
-
cairoERC1155Descriptions,
|
|
12
|
-
cairoAccountDescriptions,
|
|
13
|
-
cairoGovernorDescriptions,
|
|
14
|
-
cairoMultisigDescriptions,
|
|
15
|
-
cairoVestingDescriptions,
|
|
16
|
-
} from '@openzeppelin/wizard-common';
|
|
17
|
-
import type { KindedOptions } from '@openzeppelin/wizard-cairo';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Static type assertions to ensure schemas satisfy the Wizard API types. Not called at runtime.
|
|
21
|
-
*/
|
|
22
|
-
function _typeAssertions() {
|
|
23
|
-
const _assertions: {
|
|
24
|
-
[K in keyof KindedOptions]: Omit<KindedOptions[K], 'kind'>;
|
|
25
|
-
} = {
|
|
26
|
-
ERC20: z.object(erc20Schema).parse({}),
|
|
27
|
-
ERC721: z.object(erc721Schema).parse({}),
|
|
28
|
-
ERC1155: z.object(erc1155Schema).parse({}),
|
|
29
|
-
Account: z.object(accountSchema).parse({}),
|
|
30
|
-
Multisig: z.object(multisigSchema).parse({}),
|
|
31
|
-
Governor: z.object(governorSchema).parse({}),
|
|
32
|
-
Vesting: z.object(vestingSchema).parse({}),
|
|
33
|
-
Custom: z.object(customSchema).parse({}),
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export const commonSchema = {
|
|
38
|
-
access: z.object({
|
|
39
|
-
type: z
|
|
40
|
-
.literal('ownable')
|
|
41
|
-
.or(z.literal('roles'))
|
|
42
|
-
.or(z.literal('roles-dar'))
|
|
43
|
-
.or(z.literal(false))
|
|
44
|
-
.describe(cairoAccessDescriptions.accessType),
|
|
45
|
-
darInitialDelay: z.string().describe(cairoAccessDescriptions.darInitialDelay),
|
|
46
|
-
darDefaultDelayIncrease: z.string().describe(cairoAccessDescriptions.darDefaultDelayIncrease),
|
|
47
|
-
darMaxTransferDelay: z.string().describe(cairoAccessDescriptions.darMaxTransferDelay),
|
|
48
|
-
}),
|
|
49
|
-
upgradeable: z.boolean().optional().describe(cairoCommonDescriptions.upgradeable),
|
|
50
|
-
info: z
|
|
51
|
-
.object({
|
|
52
|
-
securityContact: z.string().optional().describe(infoDescriptions.securityContact),
|
|
53
|
-
license: z.string().optional().describe(infoDescriptions.license),
|
|
54
|
-
})
|
|
55
|
-
.optional()
|
|
56
|
-
.describe(infoDescriptions.info),
|
|
57
|
-
macros: z
|
|
58
|
-
.object({
|
|
59
|
-
withComponents: z.boolean().describe(cairoMacrosDescriptions.withComponents),
|
|
60
|
-
})
|
|
61
|
-
.optional()
|
|
62
|
-
.describe(cairoMacrosDescriptions.macros),
|
|
63
|
-
} as const satisfies z.ZodRawShape;
|
|
64
|
-
|
|
65
|
-
export const erc20Schema = {
|
|
66
|
-
name: z.string().describe(commonDescriptions.name),
|
|
67
|
-
symbol: z.string().describe(commonDescriptions.symbol),
|
|
68
|
-
decimals: z.string().optional().describe(cairoERC20Descriptions.decimals),
|
|
69
|
-
burnable: z.boolean().optional().describe(commonDescriptions.burnable),
|
|
70
|
-
pausable: z.boolean().optional().describe(commonDescriptions.pausable),
|
|
71
|
-
premint: z.string().optional().describe(cairoERC20Descriptions.premint),
|
|
72
|
-
mintable: z.boolean().optional().describe(commonDescriptions.mintable),
|
|
73
|
-
votes: z.boolean().optional().describe(cairoERC20Descriptions.votes),
|
|
74
|
-
appName: z.string().optional().describe(cairoCommonDescriptions.appName),
|
|
75
|
-
appVersion: z.string().optional().describe(cairoCommonDescriptions.appVersion),
|
|
76
|
-
...commonSchema,
|
|
77
|
-
} as const satisfies z.ZodRawShape;
|
|
78
|
-
|
|
79
|
-
export const erc721Schema = {
|
|
80
|
-
name: z.string().describe(commonDescriptions.name),
|
|
81
|
-
symbol: z.string().describe(commonDescriptions.symbol),
|
|
82
|
-
baseUri: z.string().optional().describe(cairoERC721Descriptions.baseUri),
|
|
83
|
-
burnable: z.boolean().optional().describe(commonDescriptions.burnable),
|
|
84
|
-
pausable: z.boolean().optional().describe(commonDescriptions.pausable),
|
|
85
|
-
mintable: z.boolean().optional().describe(commonDescriptions.mintable),
|
|
86
|
-
enumerable: z.boolean().optional().describe(cairoERC721Descriptions.enumerable),
|
|
87
|
-
votes: z.boolean().optional().describe(cairoERC721Descriptions.votes),
|
|
88
|
-
royaltyInfo: z
|
|
89
|
-
.object({
|
|
90
|
-
enabled: z.boolean().describe(cairoRoyaltyInfoDescriptions.enabled),
|
|
91
|
-
defaultRoyaltyFraction: z.string().describe(cairoRoyaltyInfoDescriptions.defaultRoyaltyFraction),
|
|
92
|
-
feeDenominator: z.string().describe(cairoRoyaltyInfoDescriptions.feeDenominator),
|
|
93
|
-
})
|
|
94
|
-
.optional()
|
|
95
|
-
.describe(cairoCommonDescriptions.royaltyInfo),
|
|
96
|
-
appName: z.string().optional().describe(cairoCommonDescriptions.appName),
|
|
97
|
-
appVersion: z.string().optional().describe(cairoCommonDescriptions.appVersion),
|
|
98
|
-
...commonSchema,
|
|
99
|
-
} as const satisfies z.ZodRawShape;
|
|
100
|
-
|
|
101
|
-
export const erc1155Schema = {
|
|
102
|
-
name: z.string().describe(commonDescriptions.name),
|
|
103
|
-
baseUri: z.string().describe(cairoERC1155Descriptions.baseUri),
|
|
104
|
-
burnable: z.boolean().optional().describe(commonDescriptions.burnable),
|
|
105
|
-
pausable: z.boolean().optional().describe(commonDescriptions.pausable),
|
|
106
|
-
mintable: z.boolean().optional().describe(commonDescriptions.mintable),
|
|
107
|
-
updatableUri: z.boolean().optional().describe(cairoERC1155Descriptions.updatableUri),
|
|
108
|
-
royaltyInfo: z
|
|
109
|
-
.object({
|
|
110
|
-
enabled: z.boolean().describe(cairoRoyaltyInfoDescriptions.enabled),
|
|
111
|
-
defaultRoyaltyFraction: z.string().describe(cairoRoyaltyInfoDescriptions.defaultRoyaltyFraction),
|
|
112
|
-
feeDenominator: z.string().describe(cairoRoyaltyInfoDescriptions.feeDenominator),
|
|
113
|
-
})
|
|
114
|
-
.optional()
|
|
115
|
-
.describe(cairoCommonDescriptions.royaltyInfo),
|
|
116
|
-
...commonSchema,
|
|
117
|
-
} as const satisfies z.ZodRawShape;
|
|
118
|
-
|
|
119
|
-
export const accountSchema = {
|
|
120
|
-
name: z.string().describe(commonDescriptions.name),
|
|
121
|
-
type: z.enum(['stark', 'eth']).describe(cairoAccountDescriptions.type),
|
|
122
|
-
declare: z.boolean().optional().describe(cairoAccountDescriptions.declare),
|
|
123
|
-
deploy: z.boolean().optional().describe(cairoAccountDescriptions.deploy),
|
|
124
|
-
pubkey: z.boolean().optional().describe(cairoAccountDescriptions.pubkey),
|
|
125
|
-
outsideExecution: z.boolean().optional().describe(cairoAccountDescriptions.outsideExecution),
|
|
126
|
-
upgradeable: commonSchema.upgradeable,
|
|
127
|
-
info: commonSchema.info,
|
|
128
|
-
macros: commonSchema.macros,
|
|
129
|
-
} as const satisfies z.ZodRawShape;
|
|
130
|
-
|
|
131
|
-
export const multisigSchema = {
|
|
132
|
-
name: z.string().describe(commonDescriptions.name),
|
|
133
|
-
quorum: z.string().describe(cairoMultisigDescriptions.quorum),
|
|
134
|
-
upgradeable: commonSchema.upgradeable,
|
|
135
|
-
info: commonSchema.info,
|
|
136
|
-
macros: commonSchema.macros,
|
|
137
|
-
} as const satisfies z.ZodRawShape;
|
|
138
|
-
|
|
139
|
-
export const governorSchema = {
|
|
140
|
-
name: z.string().describe(commonDescriptions.name),
|
|
141
|
-
delay: z.string().describe(cairoGovernorDescriptions.delay),
|
|
142
|
-
period: z.string().describe(cairoGovernorDescriptions.period),
|
|
143
|
-
votes: z.enum(['erc20votes', 'erc721votes']).optional().describe(cairoGovernorDescriptions.votes),
|
|
144
|
-
clockMode: z.enum(['timestamp']).optional().describe(cairoGovernorDescriptions.clockMode),
|
|
145
|
-
timelock: z
|
|
146
|
-
.union([z.literal(false), z.literal('openzeppelin')])
|
|
147
|
-
.optional()
|
|
148
|
-
.describe(cairoGovernorDescriptions.timelock),
|
|
149
|
-
decimals: z.number().optional().describe(cairoGovernorDescriptions.decimals),
|
|
150
|
-
proposalThreshold: z.string().optional().describe(cairoGovernorDescriptions.proposalThreshold),
|
|
151
|
-
quorumMode: z.enum(['percent', 'absolute']).optional().describe(cairoGovernorDescriptions.quorumMode),
|
|
152
|
-
quorumPercent: z.number().optional().describe(cairoGovernorDescriptions.quorumPercent),
|
|
153
|
-
quorumAbsolute: z.string().optional().describe(cairoGovernorDescriptions.quorumAbsolute),
|
|
154
|
-
settings: z.boolean().optional().describe(cairoGovernorDescriptions.settings),
|
|
155
|
-
upgradeable: commonSchema.upgradeable,
|
|
156
|
-
appName: z.string().optional().describe(cairoCommonDescriptions.appName),
|
|
157
|
-
appVersion: z.string().optional().describe(cairoCommonDescriptions.appVersion),
|
|
158
|
-
info: commonSchema.info,
|
|
159
|
-
macros: commonSchema.macros,
|
|
160
|
-
} as const satisfies z.ZodRawShape;
|
|
161
|
-
|
|
162
|
-
export const vestingSchema = {
|
|
163
|
-
name: z.string().describe(commonDescriptions.name),
|
|
164
|
-
startDate: z.string().describe(cairoVestingDescriptions.startDate),
|
|
165
|
-
duration: z.string().describe(cairoVestingDescriptions.duration),
|
|
166
|
-
cliffDuration: z.string().describe(cairoVestingDescriptions.cliffDuration),
|
|
167
|
-
schedule: z.enum(['linear', 'custom']).describe(cairoVestingDescriptions.schedule),
|
|
168
|
-
info: commonSchema.info,
|
|
169
|
-
macros: commonSchema.macros,
|
|
170
|
-
} as const satisfies z.ZodRawShape;
|
|
171
|
-
|
|
172
|
-
export const customSchema = {
|
|
173
|
-
name: z.string().describe(commonDescriptions.name),
|
|
174
|
-
pausable: z.boolean().optional().describe(commonDescriptions.pausable),
|
|
175
|
-
...commonSchema,
|
|
176
|
-
} as const satisfies z.ZodRawShape;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { commonDescriptions, infoDescriptions, confidentialERC7984Descriptions } from '@openzeppelin/wizard-common';
|
|
3
|
-
import type { KindedOptions } from '@openzeppelin/wizard-confidential';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Static type assertions to ensure schemas satisfy the Wizard API types. Not called at runtime.
|
|
7
|
-
*/
|
|
8
|
-
function _typeAssertions() {
|
|
9
|
-
const _assertions: {
|
|
10
|
-
[K in keyof KindedOptions]: Omit<KindedOptions[K], 'kind'>;
|
|
11
|
-
} = {
|
|
12
|
-
ERC7984: z.object(erc7984Schema).parse({}),
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const commonSchema = {
|
|
17
|
-
info: z
|
|
18
|
-
.object({
|
|
19
|
-
securityContact: z.string().optional().describe(infoDescriptions.securityContact),
|
|
20
|
-
license: z.string().optional().describe(infoDescriptions.license),
|
|
21
|
-
})
|
|
22
|
-
.optional()
|
|
23
|
-
.describe(infoDescriptions.info),
|
|
24
|
-
} as const satisfies z.ZodRawShape;
|
|
25
|
-
|
|
26
|
-
export const erc7984Schema = {
|
|
27
|
-
name: z.string().describe(commonDescriptions.name),
|
|
28
|
-
symbol: z.string().describe(commonDescriptions.symbol),
|
|
29
|
-
contractURI: z.string().describe(confidentialERC7984Descriptions.contractURI),
|
|
30
|
-
premint: z.string().optional().describe(confidentialERC7984Descriptions.premint),
|
|
31
|
-
networkConfig: z.literal('zama-ethereum').describe(confidentialERC7984Descriptions.networkConfig),
|
|
32
|
-
wrappable: z.boolean().optional().describe(confidentialERC7984Descriptions.wrappable),
|
|
33
|
-
votes: z.literal('blocknumber').or(z.literal('timestamp')).optional().describe(confidentialERC7984Descriptions.votes),
|
|
34
|
-
...commonSchema,
|
|
35
|
-
} as const satisfies z.ZodRawShape;
|
package/src/solidity/schemas.ts
DELETED
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
commonDescriptions,
|
|
4
|
-
infoDescriptions,
|
|
5
|
-
solidityCommonDescriptions,
|
|
6
|
-
solidityERC20Descriptions,
|
|
7
|
-
solidityERC721Descriptions,
|
|
8
|
-
solidityERC1155Descriptions,
|
|
9
|
-
solidityGovernorDescriptions,
|
|
10
|
-
solidityAccountDescriptions,
|
|
11
|
-
solidityStablecoinDescriptions,
|
|
12
|
-
} from '@openzeppelin/wizard-common';
|
|
13
|
-
import type { KindedOptions } from '@openzeppelin/wizard';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Static type assertions to ensure schemas satisfy the Wizard API types. Not called at runtime.
|
|
17
|
-
*/
|
|
18
|
-
function _typeAssertions() {
|
|
19
|
-
const _assertions: {
|
|
20
|
-
[K in keyof KindedOptions]: Omit<KindedOptions[K], 'kind'>;
|
|
21
|
-
} = {
|
|
22
|
-
ERC20: z.object(erc20Schema).parse({}),
|
|
23
|
-
ERC721: z.object(erc721Schema).parse({}),
|
|
24
|
-
ERC1155: z.object(erc1155Schema).parse({}),
|
|
25
|
-
Stablecoin: z.object(stablecoinSchema).parse({}),
|
|
26
|
-
RealWorldAsset: z.object(rwaSchema).parse({}),
|
|
27
|
-
Account: z.object(accountSchema).parse({}),
|
|
28
|
-
Governor: z.object(governorSchema).parse({}),
|
|
29
|
-
Custom: z.object(customSchema).parse({}),
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export const commonSchema = {
|
|
34
|
-
access: z
|
|
35
|
-
.literal('ownable')
|
|
36
|
-
.or(z.literal('roles'))
|
|
37
|
-
.or(z.literal('managed'))
|
|
38
|
-
.optional()
|
|
39
|
-
.describe(solidityCommonDescriptions.access),
|
|
40
|
-
upgradeable: z
|
|
41
|
-
.literal('transparent')
|
|
42
|
-
.or(z.literal('uups'))
|
|
43
|
-
.optional()
|
|
44
|
-
.describe(solidityCommonDescriptions.upgradeable),
|
|
45
|
-
info: z
|
|
46
|
-
.object({
|
|
47
|
-
securityContact: z.string().optional().describe(infoDescriptions.securityContact),
|
|
48
|
-
license: z.string().optional().describe(infoDescriptions.license),
|
|
49
|
-
})
|
|
50
|
-
.optional()
|
|
51
|
-
.describe(infoDescriptions.info),
|
|
52
|
-
} as const satisfies z.ZodRawShape;
|
|
53
|
-
|
|
54
|
-
export const erc20Schema = {
|
|
55
|
-
name: z.string().describe(commonDescriptions.name),
|
|
56
|
-
symbol: z.string().describe(commonDescriptions.symbol),
|
|
57
|
-
burnable: z.boolean().optional().describe(commonDescriptions.burnable),
|
|
58
|
-
pausable: z.boolean().optional().describe(commonDescriptions.pausable),
|
|
59
|
-
premint: z.string().optional().describe(solidityERC20Descriptions.premint),
|
|
60
|
-
premintChainId: z.string().optional().describe(solidityERC20Descriptions.premintChainId),
|
|
61
|
-
mintable: z.boolean().optional().describe(commonDescriptions.mintable),
|
|
62
|
-
callback: z.boolean().optional().describe(solidityERC20Descriptions.callback),
|
|
63
|
-
permit: z.boolean().optional().describe(solidityERC20Descriptions.permit),
|
|
64
|
-
votes: z.literal('blocknumber').or(z.literal('timestamp')).optional().describe(solidityERC20Descriptions.votes),
|
|
65
|
-
flashmint: z.boolean().optional().describe(solidityERC20Descriptions.flashmint),
|
|
66
|
-
crossChainBridging: z
|
|
67
|
-
.literal('custom')
|
|
68
|
-
.or(z.literal('erc7786native'))
|
|
69
|
-
.or(z.literal('superchain'))
|
|
70
|
-
.optional()
|
|
71
|
-
.describe(solidityERC20Descriptions.crossChainBridging),
|
|
72
|
-
crossChainLinkAllowOverride: z.boolean().optional().describe(solidityERC20Descriptions.crossChainLinkAllowOverride),
|
|
73
|
-
namespacePrefix: z.string().optional().describe(solidityCommonDescriptions.namespacePrefix),
|
|
74
|
-
...commonSchema,
|
|
75
|
-
} as const satisfies z.ZodRawShape;
|
|
76
|
-
|
|
77
|
-
export const erc721Schema = {
|
|
78
|
-
name: z.string().describe(commonDescriptions.name),
|
|
79
|
-
symbol: z.string().describe(commonDescriptions.symbol),
|
|
80
|
-
baseUri: z.string().optional().describe(solidityERC721Descriptions.baseUri),
|
|
81
|
-
enumerable: z.boolean().optional().describe(solidityERC721Descriptions.enumerable),
|
|
82
|
-
uriStorage: z.boolean().optional().describe(solidityERC721Descriptions.uriStorage),
|
|
83
|
-
burnable: z.boolean().optional().describe(commonDescriptions.burnable),
|
|
84
|
-
pausable: z.boolean().optional().describe(commonDescriptions.pausable),
|
|
85
|
-
mintable: z.boolean().optional().describe(commonDescriptions.mintable),
|
|
86
|
-
incremental: z.boolean().optional().describe(solidityERC721Descriptions.incremental),
|
|
87
|
-
votes: z.literal('blocknumber').or(z.literal('timestamp')).optional().describe(solidityERC721Descriptions.votes),
|
|
88
|
-
...commonSchema,
|
|
89
|
-
namespacePrefix: z.string().optional().describe(solidityCommonDescriptions.namespacePrefix),
|
|
90
|
-
} as const satisfies z.ZodRawShape;
|
|
91
|
-
|
|
92
|
-
export const erc1155Schema = {
|
|
93
|
-
name: z.string().describe(commonDescriptions.name),
|
|
94
|
-
uri: z.string().describe(solidityERC1155Descriptions.uri),
|
|
95
|
-
burnable: z.boolean().optional().describe(commonDescriptions.burnable),
|
|
96
|
-
pausable: z.boolean().optional().describe(commonDescriptions.pausable),
|
|
97
|
-
mintable: z.boolean().optional().describe(commonDescriptions.mintable),
|
|
98
|
-
supply: z.boolean().optional().describe(solidityERC1155Descriptions.supply),
|
|
99
|
-
updatableUri: z.boolean().optional().describe(solidityERC1155Descriptions.updatableUri),
|
|
100
|
-
...commonSchema,
|
|
101
|
-
} as const satisfies z.ZodRawShape;
|
|
102
|
-
|
|
103
|
-
const { upgradeable: _, ...erc20SchemaOmitUpgradeable } = erc20Schema;
|
|
104
|
-
|
|
105
|
-
export const stablecoinSchema = {
|
|
106
|
-
...erc20SchemaOmitUpgradeable,
|
|
107
|
-
restrictions: z
|
|
108
|
-
.literal(false)
|
|
109
|
-
.or(z.literal('allowlist'))
|
|
110
|
-
.or(z.literal('blocklist'))
|
|
111
|
-
.optional()
|
|
112
|
-
.describe(solidityStablecoinDescriptions.restrictions),
|
|
113
|
-
freezable: z.boolean().optional().describe(solidityStablecoinDescriptions.freezable),
|
|
114
|
-
} as const satisfies z.ZodRawShape;
|
|
115
|
-
|
|
116
|
-
export const rwaSchema = stablecoinSchema;
|
|
117
|
-
|
|
118
|
-
export const accountSchema = {
|
|
119
|
-
name: z.string().describe('The name of the account contract'),
|
|
120
|
-
signatureValidation: z
|
|
121
|
-
.literal(false)
|
|
122
|
-
.or(z.literal('ERC1271'))
|
|
123
|
-
.or(z.literal('ERC7739'))
|
|
124
|
-
.optional()
|
|
125
|
-
.describe(solidityAccountDescriptions.signatureValidation),
|
|
126
|
-
ERC721Holder: z.boolean().optional().describe(solidityAccountDescriptions.ERC721Holder),
|
|
127
|
-
ERC1155Holder: z.boolean().optional().describe(solidityAccountDescriptions.ERC1155Holder),
|
|
128
|
-
signer: z
|
|
129
|
-
.literal(false)
|
|
130
|
-
.or(z.literal('ECDSA'))
|
|
131
|
-
.or(z.literal('EIP7702'))
|
|
132
|
-
.or(z.literal('Multisig'))
|
|
133
|
-
.or(z.literal('MultisigWeighted'))
|
|
134
|
-
.or(z.literal('P256'))
|
|
135
|
-
.or(z.literal('RSA'))
|
|
136
|
-
.or(z.literal('WebAuthn'))
|
|
137
|
-
.optional()
|
|
138
|
-
.describe(solidityAccountDescriptions.signer),
|
|
139
|
-
batchedExecution: z.boolean().optional().describe(solidityAccountDescriptions.batchedExecution),
|
|
140
|
-
ERC7579Modules: z
|
|
141
|
-
.literal(false)
|
|
142
|
-
.or(z.literal('AccountERC7579'))
|
|
143
|
-
.or(z.literal('AccountERC7579Hooked'))
|
|
144
|
-
.optional()
|
|
145
|
-
.describe(solidityAccountDescriptions.ERC7579Modules),
|
|
146
|
-
info: commonSchema.info,
|
|
147
|
-
upgradeable: commonSchema.upgradeable,
|
|
148
|
-
} as const satisfies z.ZodRawShape;
|
|
149
|
-
|
|
150
|
-
export const governorSchema = {
|
|
151
|
-
name: z.string().describe(commonDescriptions.name),
|
|
152
|
-
delay: z.string().describe(solidityGovernorDescriptions.delay),
|
|
153
|
-
period: z.string().describe(solidityGovernorDescriptions.period),
|
|
154
|
-
votes: z.literal('erc20votes').or(z.literal('erc721votes')).optional().describe(solidityGovernorDescriptions.votes),
|
|
155
|
-
clockMode: z
|
|
156
|
-
.literal('blocknumber')
|
|
157
|
-
.or(z.literal('timestamp'))
|
|
158
|
-
.optional()
|
|
159
|
-
.describe(solidityGovernorDescriptions.clockMode),
|
|
160
|
-
timelock: z
|
|
161
|
-
.literal(false)
|
|
162
|
-
.or(z.literal('openzeppelin'))
|
|
163
|
-
.or(z.literal('compound'))
|
|
164
|
-
.optional()
|
|
165
|
-
.describe(solidityGovernorDescriptions.timelock),
|
|
166
|
-
blockTime: z.number().optional().describe(solidityGovernorDescriptions.blockTime),
|
|
167
|
-
decimals: z.number().optional().describe(solidityGovernorDescriptions.decimals),
|
|
168
|
-
proposalThreshold: z.string().optional().describe(solidityGovernorDescriptions.proposalThreshold),
|
|
169
|
-
quorumMode: z
|
|
170
|
-
.literal('percent')
|
|
171
|
-
.or(z.literal('absolute'))
|
|
172
|
-
.optional()
|
|
173
|
-
.describe(solidityGovernorDescriptions.quorumMode),
|
|
174
|
-
quorumPercent: z.number().optional().describe(solidityGovernorDescriptions.quorumPercent),
|
|
175
|
-
quorumAbsolute: z.string().optional().describe(solidityGovernorDescriptions.quorumAbsolute),
|
|
176
|
-
storage: z.boolean().optional().describe(solidityGovernorDescriptions.storage),
|
|
177
|
-
settings: z.boolean().optional().describe(solidityGovernorDescriptions.settings),
|
|
178
|
-
upgradeable: commonSchema.upgradeable,
|
|
179
|
-
info: commonSchema.info,
|
|
180
|
-
} as const satisfies z.ZodRawShape;
|
|
181
|
-
|
|
182
|
-
export const customSchema = {
|
|
183
|
-
name: z.string().describe(commonDescriptions.name),
|
|
184
|
-
pausable: z.boolean().optional().describe(commonDescriptions.pausable),
|
|
185
|
-
...commonSchema,
|
|
186
|
-
} as const satisfies z.ZodRawShape;
|