@xyo-network/erc1822-witness 3.4.3 → 3.4.4

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.
@@ -1,8 +1,5 @@
1
1
  // src/lib/getErc1822SlotStatus.ts
2
- import {
3
- hexFromHexString,
4
- isHexZero
5
- } from "@xylabs/hex";
2
+ import { hexFromHexString, isHexZero } from "@xylabs/hex";
6
3
  var ERC1822_PROXY_LOGIC_SLOT = "0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7";
7
4
  var readAddressFromSlot = async (provider, address, slot, block) => {
8
5
  try {
@@ -30,10 +27,7 @@ var Erc1822StatusSchema = "network.xyo.erc1822.status";
30
27
  // src/Witness.ts
31
28
  import { assertEx } from "@xylabs/assert";
32
29
  import { isPayloadOfSchemaType } from "@xyo-network/payload-model";
33
- import {
34
- AbstractEvmWitness,
35
- EvmAddressSchema
36
- } from "@xyo-network/witness-evm-abstract";
30
+ import { AbstractEvmWitness, EvmAddressSchema } from "@xyo-network/witness-evm-abstract";
37
31
  var Erc1822WitnessConfigSchema = "network.xyo.erc1822.witness.config";
38
32
  var Erc1822Witness = class extends AbstractEvmWitness {
39
33
  static configSchemas = [...super.configSchemas, Erc1822WitnessConfigSchema];
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/lib/getErc1822SlotStatus.ts","../../src/Payload.ts","../../src/Witness.ts"],"sourcesContent":["import {\n Address, hexFromHexString, isHexZero,\n} from '@xylabs/hex'\nimport { Provider } from 'ethers'\n\nexport const ERC1822_PROXY_LOGIC_SLOT = '0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7'\n\nexport interface Erc1822DataSlots {\n implementation?: Address\n}\n\nexport interface Erc1822SlotStatus {\n address: string\n implementation: string\n slots: Erc1822DataSlots\n}\n\nconst readAddressFromSlot = async (provider: Provider, address: string, slot: string, block?: number) => {\n try {\n const slotValue = await provider.getStorage(address, slot, block)\n return hexFromHexString(slotValue, { prefix: true })\n } catch {\n return\n }\n}\n\nexport const getErc1822SlotStatus = async (provider: Provider, address: string, block?: number): Promise<Erc1822SlotStatus> => {\n const status: Erc1822SlotStatus = {\n address,\n implementation: address,\n slots: { implementation: await readAddressFromSlot(provider, address, ERC1822_PROXY_LOGIC_SLOT, block) },\n }\n\n if (status.slots.implementation && !isHexZero(status.slots.implementation)) {\n status.implementation = status.slots.implementation\n }\n\n return status\n}\n","import { Payload } from '@xyo-network/payload-model'\n\nimport { Erc1822SlotStatus } from './lib/index.ts'\n\nexport const Erc1822StatusSchema = 'network.xyo.erc1822.status'\nexport type Erc1822StatusSchema = typeof Erc1822StatusSchema\n\nexport type Erc1822Status = Payload<\n {\n address: string\n block: number\n chainId: number\n implementation?: Erc1822SlotStatus['implementation']\n slots?: Erc1822SlotStatus['slots']\n },\n Erc1822StatusSchema\n>\n","import { assertEx } from '@xylabs/assert'\nimport { isPayloadOfSchemaType, Schema } from '@xyo-network/payload-model'\nimport {\n AbstractEvmWitness, EvmAddress, EvmAddressSchema,\n EvmWitnessConfig, EvmWitnessParams,\n} from '@xyo-network/witness-evm-abstract'\n\nimport { getErc1822SlotStatus } from './lib/index.ts'\nimport { Erc1822Status, Erc1822StatusSchema } from './Payload.ts'\n\nexport const Erc1822WitnessConfigSchema = 'network.xyo.erc1822.witness.config'\nexport type Erc1822WitnessConfigSchema = typeof Erc1822WitnessConfigSchema\n\nexport type Erc1822WitnessConfig = EvmWitnessConfig<{ address?: string }, Erc1822WitnessConfigSchema>\n\nexport type Erc1822WitnessParams = EvmWitnessParams<Erc1822WitnessConfig>\n\nexport class Erc1822Witness<TParams extends Erc1822WitnessParams = Erc1822WitnessParams> extends AbstractEvmWitness<\n TParams,\n EvmAddress,\n Erc1822Status\n> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, Erc1822WitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = Erc1822WitnessConfigSchema\n\n protected override async observeHandler(inPayloads: EvmAddress[] = []): Promise<Erc1822Status[]> {\n await this.started('throw')\n // calling it here to make sure we rests the cache\n await this.getProviders()\n try {\n const observations = await Promise.all(\n inPayloads.filter(isPayloadOfSchemaType<EvmAddress>(EvmAddressSchema)).map(async ({ address }) => {\n const validatedAddress = assertEx(address ?? this.config.address, () => 'Missing address').toLowerCase()\n\n const provider = await this.getProvider(true, true)\n\n const block = await provider.getBlockNumber()\n\n const { implementation, slots } = await getErc1822SlotStatus(provider, validatedAddress, block)\n\n const observation: Erc1822Status = {\n address: validatedAddress,\n block,\n chainId: Number((await provider.getNetwork()).chainId),\n implementation,\n schema: Erc1822StatusSchema,\n slots,\n }\n return observation\n }),\n )\n return observations\n } catch (ex) {\n const error = ex as Error\n console.log(`Error [${this.config.name}]: ${error.message}`)\n throw error\n }\n }\n}\n"],"mappings":";AAAA;AAAA,EACW;AAAA,EAAkB;AAAA,OACtB;AAGA,IAAM,2BAA2B;AAYxC,IAAM,sBAAsB,OAAO,UAAoB,SAAiB,MAAc,UAAmB;AACvG,MAAI;AACF,UAAM,YAAY,MAAM,SAAS,WAAW,SAAS,MAAM,KAAK;AAChE,WAAO,iBAAiB,WAAW,EAAE,QAAQ,KAAK,CAAC;AAAA,EACrD,QAAQ;AACN;AAAA,EACF;AACF;AAEO,IAAM,uBAAuB,OAAO,UAAoB,SAAiB,UAA+C;AAC7H,QAAM,SAA4B;AAAA,IAChC;AAAA,IACA,gBAAgB;AAAA,IAChB,OAAO,EAAE,gBAAgB,MAAM,oBAAoB,UAAU,SAAS,0BAA0B,KAAK,EAAE;AAAA,EACzG;AAEA,MAAI,OAAO,MAAM,kBAAkB,CAAC,UAAU,OAAO,MAAM,cAAc,GAAG;AAC1E,WAAO,iBAAiB,OAAO,MAAM;AAAA,EACvC;AAEA,SAAO;AACT;;;AClCO,IAAM,sBAAsB;;;ACJnC,SAAS,gBAAgB;AACzB,SAAS,6BAAqC;AAC9C;AAAA,EACE;AAAA,EAAgC;AAAA,OAE3B;AAKA,IAAM,6BAA6B;AAOnC,IAAM,iBAAN,cAA0F,mBAI/F;AAAA,EACA,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,0BAA0B;AAAA,EACtG,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,eAAe,aAA2B,CAAC,GAA6B;AAC/F,UAAM,KAAK,QAAQ,OAAO;AAE1B,UAAM,KAAK,aAAa;AACxB,QAAI;AACF,YAAM,eAAe,MAAM,QAAQ;AAAA,QACjC,WAAW,OAAO,sBAAkC,gBAAgB,CAAC,EAAE,IAAI,OAAO,EAAE,QAAQ,MAAM;AAChG,gBAAM,mBAAmB,SAAS,WAAW,KAAK,OAAO,SAAS,MAAM,iBAAiB,EAAE,YAAY;AAEvG,gBAAM,WAAW,MAAM,KAAK,YAAY,MAAM,IAAI;AAElD,gBAAM,QAAQ,MAAM,SAAS,eAAe;AAE5C,gBAAM,EAAE,gBAAgB,MAAM,IAAI,MAAM,qBAAqB,UAAU,kBAAkB,KAAK;AAE9F,gBAAM,cAA6B;AAAA,YACjC,SAAS;AAAA,YACT;AAAA,YACA,SAAS,QAAQ,MAAM,SAAS,WAAW,GAAG,OAAO;AAAA,YACrD;AAAA,YACA,QAAQ;AAAA,YACR;AAAA,UACF;AACA,iBAAO;AAAA,QACT,CAAC;AAAA,MACH;AACA,aAAO;AAAA,IACT,SAAS,IAAI;AACX,YAAM,QAAQ;AACd,cAAQ,IAAI,UAAU,KAAK,OAAO,IAAI,MAAM,MAAM,OAAO,EAAE;AAC3D,YAAM;AAAA,IACR;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/lib/getErc1822SlotStatus.ts","../../src/Payload.ts","../../src/Witness.ts"],"sourcesContent":["import type { Address } from '@xylabs/hex'\nimport { hexFromHexString, isHexZero } from '@xylabs/hex'\nimport type { Provider } from 'ethers'\n\nexport const ERC1822_PROXY_LOGIC_SLOT = '0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7'\n\nexport interface Erc1822DataSlots {\n implementation?: Address\n}\n\nexport interface Erc1822SlotStatus {\n address: string\n implementation: string\n slots: Erc1822DataSlots\n}\n\nconst readAddressFromSlot = async (provider: Provider, address: string, slot: string, block?: number) => {\n try {\n const slotValue = await provider.getStorage(address, slot, block)\n return hexFromHexString(slotValue, { prefix: true })\n } catch {\n return\n }\n}\n\nexport const getErc1822SlotStatus = async (provider: Provider, address: string, block?: number): Promise<Erc1822SlotStatus> => {\n const status: Erc1822SlotStatus = {\n address,\n implementation: address,\n slots: { implementation: await readAddressFromSlot(provider, address, ERC1822_PROXY_LOGIC_SLOT, block) },\n }\n\n if (status.slots.implementation && !isHexZero(status.slots.implementation)) {\n status.implementation = status.slots.implementation\n }\n\n return status\n}\n","import type { Payload } from '@xyo-network/payload-model'\n\nimport type { Erc1822SlotStatus } from './lib/index.ts'\n\nexport const Erc1822StatusSchema = 'network.xyo.erc1822.status'\nexport type Erc1822StatusSchema = typeof Erc1822StatusSchema\n\nexport type Erc1822Status = Payload<\n {\n address: string\n block: number\n chainId: number\n implementation?: Erc1822SlotStatus['implementation']\n slots?: Erc1822SlotStatus['slots']\n },\n Erc1822StatusSchema\n>\n","import { assertEx } from '@xylabs/assert'\nimport type { Schema } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\nimport type {\n EvmAddress,\n EvmWitnessConfig, EvmWitnessParams,\n} from '@xyo-network/witness-evm-abstract'\nimport { AbstractEvmWitness, EvmAddressSchema } from '@xyo-network/witness-evm-abstract'\n\nimport { getErc1822SlotStatus } from './lib/index.ts'\nimport type { Erc1822Status } from './Payload.ts'\nimport { Erc1822StatusSchema } from './Payload.ts'\n\nexport const Erc1822WitnessConfigSchema = 'network.xyo.erc1822.witness.config'\nexport type Erc1822WitnessConfigSchema = typeof Erc1822WitnessConfigSchema\n\nexport type Erc1822WitnessConfig = EvmWitnessConfig<{ address?: string }, Erc1822WitnessConfigSchema>\n\nexport type Erc1822WitnessParams = EvmWitnessParams<Erc1822WitnessConfig>\n\nexport class Erc1822Witness<TParams extends Erc1822WitnessParams = Erc1822WitnessParams> extends AbstractEvmWitness<\n TParams,\n EvmAddress,\n Erc1822Status\n> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, Erc1822WitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = Erc1822WitnessConfigSchema\n\n protected override async observeHandler(inPayloads: EvmAddress[] = []): Promise<Erc1822Status[]> {\n await this.started('throw')\n // calling it here to make sure we rests the cache\n await this.getProviders()\n try {\n const observations = await Promise.all(\n inPayloads.filter(isPayloadOfSchemaType<EvmAddress>(EvmAddressSchema)).map(async ({ address }) => {\n const validatedAddress = assertEx(address ?? this.config.address, () => 'Missing address').toLowerCase()\n\n const provider = await this.getProvider(true, true)\n\n const block = await provider.getBlockNumber()\n\n const { implementation, slots } = await getErc1822SlotStatus(provider, validatedAddress, block)\n\n const observation: Erc1822Status = {\n address: validatedAddress,\n block,\n chainId: Number((await provider.getNetwork()).chainId),\n implementation,\n schema: Erc1822StatusSchema,\n slots,\n }\n return observation\n }),\n )\n return observations\n } catch (ex) {\n const error = ex as Error\n console.log(`Error [${this.config.name}]: ${error.message}`)\n throw error\n }\n }\n}\n"],"mappings":";AACA,SAAS,kBAAkB,iBAAiB;AAGrC,IAAM,2BAA2B;AAYxC,IAAM,sBAAsB,OAAO,UAAoB,SAAiB,MAAc,UAAmB;AACvG,MAAI;AACF,UAAM,YAAY,MAAM,SAAS,WAAW,SAAS,MAAM,KAAK;AAChE,WAAO,iBAAiB,WAAW,EAAE,QAAQ,KAAK,CAAC;AAAA,EACrD,QAAQ;AACN;AAAA,EACF;AACF;AAEO,IAAM,uBAAuB,OAAO,UAAoB,SAAiB,UAA+C;AAC7H,QAAM,SAA4B;AAAA,IAChC;AAAA,IACA,gBAAgB;AAAA,IAChB,OAAO,EAAE,gBAAgB,MAAM,oBAAoB,UAAU,SAAS,0BAA0B,KAAK,EAAE;AAAA,EACzG;AAEA,MAAI,OAAO,MAAM,kBAAkB,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{ Erc1822SlotStatus } from './lib/index.ts';
1
+ import type { Payload } from '@xyo-network/payload-model';
2
+ import type { Erc1822SlotStatus } from './lib/index.ts';
3
3
  export declare const Erc1822StatusSchema = "network.xyo.erc1822.status";
4
4
  export type Erc1822StatusSchema = typeof Erc1822StatusSchema;
5
5
  export type Erc1822Status = Payload<{
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAEvD,eAAO,MAAM,mBAAmB,+BAA+B,CAAA;AAC/D,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAA;AAE5D,MAAM,MAAM,aAAa,GAAG,OAAO,CACjC;IACE,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,CAAC,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAA;IACpD,KAAK,CAAC,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAA;CACnC,EACD,mBAAmB,CACpB,CAAA"}
@@ -1,6 +1,7 @@
1
- import { Schema } from '@xyo-network/payload-model';
2
- import { AbstractEvmWitness, EvmAddress, EvmWitnessConfig, EvmWitnessParams } from '@xyo-network/witness-evm-abstract';
3
- import { Erc1822Status } from './Payload.ts';
1
+ import type { Schema } from '@xyo-network/payload-model';
2
+ import type { EvmAddress, EvmWitnessConfig, EvmWitnessParams } from '@xyo-network/witness-evm-abstract';
3
+ import { AbstractEvmWitness } from '@xyo-network/witness-evm-abstract';
4
+ import type { Erc1822Status } from './Payload.ts';
4
5
  export declare const Erc1822WitnessConfigSchema = "network.xyo.erc1822.witness.config";
5
6
  export type Erc1822WitnessConfigSchema = typeof Erc1822WitnessConfigSchema;
6
7
  export type Erc1822WitnessConfig = EvmWitnessConfig<{
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAExD,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EAAE,gBAAgB,EACnC,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,kBAAkB,EAAoB,MAAM,mCAAmC,CAAA;AAGxF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAGjD,eAAO,MAAM,0BAA0B,uCAAuC,CAAA;AAC9E,MAAM,MAAM,0BAA0B,GAAG,OAAO,0BAA0B,CAAA;AAE1E,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,CAAC;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,0BAA0B,CAAC,CAAA;AAErG,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,CAAC,oBAAoB,CAAC,CAAA;AAEzE,qBAAa,cAAc,CAAC,OAAO,SAAS,oBAAoB,GAAG,oBAAoB,CAAE,SAAQ,kBAAkB,CACjH,OAAO,EACP,UAAU,EACV,aAAa,CACd;IACC,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAuD;IACvG,gBAAyB,mBAAmB,EAAE,MAAM,CAA6B;cAExD,cAAc,CAAC,UAAU,GAAE,UAAU,EAAO,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;CAiCjG"}
@@ -1,5 +1,5 @@
1
- import { Address } from '@xylabs/hex';
2
- import { Provider } from 'ethers';
1
+ import type { Address } from '@xylabs/hex';
2
+ import type { Provider } from 'ethers';
3
3
  export declare const ERC1822_PROXY_LOGIC_SLOT = "0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7";
4
4
  export interface Erc1822DataSlots {
5
5
  implementation?: Address;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getErc1822SlotStatus.d.ts","sourceRoot":"","sources":["../../../src/lib/getErc1822SlotStatus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEtC,eAAO,MAAM,wBAAwB,uEAAuE,CAAA;AAE5G,MAAM,WAAW,gBAAgB;IAC/B,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,EAAE,MAAM,CAAA;IACtB,KAAK,EAAE,gBAAgB,CAAA;CACxB;AAWD,eAAO,MAAM,oBAAoB,GAAU,UAAU,QAAQ,EAAE,SAAS,MAAM,EAAE,QAAQ,MAAM,KAAG,OAAO,CAAC,iBAAiB,CAYzH,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/erc1822-witness",
3
- "version": "3.4.3",
3
+ "version": "3.4.4",
4
4
  "description": "Typescript/Javascript Plugins for XYO Platform",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -21,26 +21,26 @@
21
21
  "type": "module",
22
22
  "exports": {
23
23
  ".": {
24
- "types": "./dist/neutral/index.d.ts",
24
+ "types": "./dist/types/index.d.ts",
25
25
  "default": "./dist/neutral/index.mjs"
26
26
  },
27
27
  "./package.json": "./package.json"
28
28
  },
29
29
  "module": "dist/neutral/index.mjs",
30
- "types": "dist/neutral/index.d.ts",
30
+ "types": "dist/types/index.d.ts",
31
31
  "dependencies": {
32
- "@xylabs/assert": "^4.5.1",
33
- "@xylabs/hex": "^4.5.1",
34
- "@xyo-network/payload-model": "^3.9.23",
35
- "@xyo-network/witness-evm-abstract": "^3.9.23",
32
+ "@xylabs/assert": "^4.6.0",
33
+ "@xylabs/hex": "^4.6.0",
34
+ "@xyo-network/payload-model": "^3.9.36",
35
+ "@xyo-network/witness-evm-abstract": "^3.9.36",
36
36
  "ethers": "^6.13.5"
37
37
  },
38
38
  "devDependencies": {
39
- "@xylabs/ts-scripts-yarn3": "^5.0.39",
40
- "@xylabs/tsconfig": "^5.0.39",
41
- "@xylabs/vitest-extended": "^4.5.1",
39
+ "@xylabs/ts-scripts-yarn3": "^6.0.5",
40
+ "@xylabs/tsconfig": "^6.0.5",
41
+ "@xylabs/vitest-extended": "^4.6.0",
42
42
  "typescript": "^5.8.2",
43
- "vitest": "^3.0.7"
43
+ "vitest": "^3.0.8"
44
44
  },
45
45
  "publishConfig": {
46
46
  "access": "public"
package/src/Payload.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { Payload } from '@xyo-network/payload-model'
1
+ import type { Payload } from '@xyo-network/payload-model'
2
2
 
3
- import { Erc1822SlotStatus } from './lib/index.ts'
3
+ import type { Erc1822SlotStatus } from './lib/index.ts'
4
4
 
5
5
  export const Erc1822StatusSchema = 'network.xyo.erc1822.status'
6
6
  export type Erc1822StatusSchema = typeof Erc1822StatusSchema
package/src/Witness.ts CHANGED
@@ -1,12 +1,15 @@
1
1
  import { assertEx } from '@xylabs/assert'
2
- import { isPayloadOfSchemaType, Schema } from '@xyo-network/payload-model'
3
- import {
4
- AbstractEvmWitness, EvmAddress, EvmAddressSchema,
2
+ import type { Schema } from '@xyo-network/payload-model'
3
+ import { isPayloadOfSchemaType } from '@xyo-network/payload-model'
4
+ import type {
5
+ EvmAddress,
5
6
  EvmWitnessConfig, EvmWitnessParams,
6
7
  } from '@xyo-network/witness-evm-abstract'
8
+ import { AbstractEvmWitness, EvmAddressSchema } from '@xyo-network/witness-evm-abstract'
7
9
 
8
10
  import { getErc1822SlotStatus } from './lib/index.ts'
9
- import { Erc1822Status, Erc1822StatusSchema } from './Payload.ts'
11
+ import type { Erc1822Status } from './Payload.ts'
12
+ import { Erc1822StatusSchema } from './Payload.ts'
10
13
 
11
14
  export const Erc1822WitnessConfigSchema = 'network.xyo.erc1822.witness.config'
12
15
  export type Erc1822WitnessConfigSchema = typeof Erc1822WitnessConfigSchema
@@ -1,7 +1,6 @@
1
- import {
2
- Address, hexFromHexString, isHexZero,
3
- } from '@xylabs/hex'
4
- import { Provider } from 'ethers'
1
+ import type { Address } from '@xylabs/hex'
2
+ import { hexFromHexString, isHexZero } from '@xylabs/hex'
3
+ import type { Provider } from 'ethers'
5
4
 
6
5
  export const ERC1822_PROXY_LOGIC_SLOT = '0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7'
7
6
 
package/xy.config.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
1
+ import type { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
2
2
  const config: XyTsupConfig = {
3
3
  compile: {
4
4
  browser: {},
@@ -1 +0,0 @@
1
- {"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAElD,eAAO,MAAM,mBAAmB,+BAA+B,CAAA;AAC/D,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAA;AAE5D,MAAM,MAAM,aAAa,GAAG,OAAO,CACjC;IACE,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,CAAC,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAA;IACpD,KAAK,CAAC,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAA;CACnC,EACD,mBAAmB,CACpB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AACA,OAAO,EAAyB,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAC1E,OAAO,EACL,kBAAkB,EAAE,UAAU,EAC9B,g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zH,CAAA"}
File without changes
File without changes
File without changes
File without changes