@0xtorch/evm 0.0.12 → 0.0.14
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/_cjs/analyzer/json/generator.js +3 -575
- package/_cjs/analyzer/json/generator.js.map +1 -1
- package/_cjs/analyzer/json/schemas/generator.js +1 -0
- package/_cjs/analyzer/json/schemas/generator.js.map +1 -1
- package/_cjs/analyzer/json/schemas/index.js +2 -2
- package/_cjs/analyzer/json/schemas/index.js.map +1 -1
- package/_esm/analyzer/json/generator.js +5 -628
- package/_esm/analyzer/json/generator.js.map +1 -1
- package/_esm/analyzer/json/schemas/generator.js +2 -1
- package/_esm/analyzer/json/schemas/generator.js.map +1 -1
- package/_esm/analyzer/json/schemas/index.js +2 -2
- package/_esm/analyzer/json/schemas/index.js.map +1 -1
- package/_types/analyzer/json/generator.d.ts.map +1 -1
- package/_types/analyzer/json/schemas/generator.d.ts +2 -1
- package/_types/analyzer/json/schemas/generator.d.ts.map +1 -1
- package/_types/analyzer/json/schemas/index.d.ts +2 -2
- package/_types/analyzer/json/schemas/index.d.ts.map +1 -1
- package/analyzer/.DS_Store +0 -0
- package/analyzer/json/generator.ts +7 -892
- package/analyzer/json/schemas/generator.ts +3 -1
- package/analyzer/json/schemas/index.ts +4 -4
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createBigDecimal } from '@0xtorch/big-decimal'
|
|
2
|
-
import { normalActionActionSchema } from '@0xtorch/core'
|
|
2
|
+
import { crossTypeSchema, normalActionActionSchema } from '@0xtorch/core'
|
|
3
3
|
import { z } from 'zod'
|
|
4
4
|
import { isHex, toLowerHex } from '../../../types'
|
|
5
5
|
import { premitiveAddressSchema } from './utils'
|
|
@@ -367,6 +367,7 @@ type ActionGeneratorSchema = z.ZodObject<{
|
|
|
367
367
|
action: typeof normalActionActionSchema
|
|
368
368
|
comment: z.ZodOptional<z.ZodArray<typeof commentComponentSchema>>
|
|
369
369
|
crossId: z.ZodOptional<z.ZodArray<typeof idComponentSchema>>
|
|
370
|
+
crossType: z.ZodOptional<typeof crossTypeSchema>
|
|
370
371
|
loanId: z.ZodOptional<z.ZodArray<typeof idComponentSchema>>
|
|
371
372
|
transfers: z.ZodArray<typeof transferComponentSchema>
|
|
372
373
|
}>
|
|
@@ -379,6 +380,7 @@ export const actionGeneratorSchema: ActionGeneratorSchema = z.object({
|
|
|
379
380
|
comment: z.array(commentComponentSchema).optional(),
|
|
380
381
|
/** id component で取得した値を結合して crossId 生成 */
|
|
381
382
|
crossId: z.array(idComponentSchema).optional(),
|
|
383
|
+
crossType: crossTypeSchema.optional(),
|
|
382
384
|
/** id component で取得した値を結合して loanId 生成 */
|
|
383
385
|
loanId: z.array(idComponentSchema).optional(),
|
|
384
386
|
// TODO transfer は任意の値を用いて生成できるようにする
|
|
@@ -333,8 +333,8 @@ export const actionGeneratorSpecificTokenTransferSchema = z
|
|
|
333
333
|
|
|
334
334
|
type EvmAnalyzerSchema = z.ZodObject<{
|
|
335
335
|
chainId: z.ZodOptional<z.ZodNumber>
|
|
336
|
-
from: z.ZodOptional<typeof premitiveAddressSchema
|
|
337
|
-
to: z.ZodOptional<typeof premitiveAddressSchema
|
|
336
|
+
from: z.ZodOptional<z.ZodArray<typeof premitiveAddressSchema>>
|
|
337
|
+
to: z.ZodOptional<z.ZodArray<typeof premitiveAddressSchema>>
|
|
338
338
|
value: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<'plus'>, z.ZodLiteral<'zero'>]>>
|
|
339
339
|
functionSignature: typeof methodIdSchema
|
|
340
340
|
functionInterface: z.ZodOptional<z.ZodString>
|
|
@@ -348,8 +348,8 @@ type EvmAnalyzerSchema = z.ZodObject<{
|
|
|
348
348
|
|
|
349
349
|
export const evmAnalyzerSchema: EvmAnalyzerSchema = z.object({
|
|
350
350
|
chainId: z.number().int().optional(),
|
|
351
|
-
from: premitiveAddressSchema.optional(),
|
|
352
|
-
to: premitiveAddressSchema.optional(),
|
|
351
|
+
from: z.array(premitiveAddressSchema).optional(),
|
|
352
|
+
to: z.array(premitiveAddressSchema).optional(),
|
|
353
353
|
value: z.union([z.literal('plus'), z.literal('zero')]).optional(),
|
|
354
354
|
functionSignature: methodIdSchema,
|
|
355
355
|
functionInterface: z.string().optional(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xtorch/evm",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"description": "Cryptorch EVM extension",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cryptorch",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@0xtorch/big-decimal": "^0.0.9",
|
|
41
|
-
"@0xtorch/core": "^0.0.
|
|
41
|
+
"@0xtorch/core": "^0.0.16",
|
|
42
42
|
"@supercharge/promise-pool": "^3.1.1",
|
|
43
43
|
"viem": "^2.9.16",
|
|
44
44
|
"zod": "^3.22.4"
|