@sparkdotfi/abi-cli 0.2.0-20251002.9dd3cd7f → 0.2.0-20251007.3d03bbce
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/src/AbiCli.js +3 -1
- package/dist/src/{metadata-store/abi-registry → abi-registry}/AbiRegistry.js +9 -1
- package/dist/src/{metadata-store/abi-registry → abi-registry}/buildAbiRegistry.js +7 -11
- package/dist/src/{metadata-store/abi-registry → abi-registry}/getAbiForContract.js +4 -3
- package/dist/src/{metadata-store/abi-registry → abi-registry}/getAbiForInterface.js +4 -3
- package/dist/src/abi-registry/index.js +6 -0
- package/dist/src/abi-registry/types.js +1 -0
- package/dist/src/build.js +1 -1
- package/dist/src/manifest/manifest.js +8 -5
- package/dist/src/metadata-store/buildMetadataStore.js +12 -16
- package/dist/types/src/AbiCli.d.ts +1 -1
- package/dist/types/src/AbiCli.d.ts.map +1 -1
- package/dist/types/src/abi-registry/AbiRegistry.d.ts +11 -0
- package/dist/types/src/abi-registry/AbiRegistry.d.ts.map +1 -0
- package/dist/types/src/{metadata-store → abi-registry}/abi-fetcher/AbiFetcher.d.ts +2 -6
- package/dist/types/src/abi-registry/abi-fetcher/AbiFetcher.d.ts.map +1 -0
- package/dist/types/src/{metadata-store → abi-registry}/abi-fetcher/AbiFetcherClient.d.ts +1 -10
- package/dist/types/src/abi-registry/abi-fetcher/AbiFetcherClient.d.ts.map +1 -0
- package/dist/types/src/abi-registry/abi-fetcher/BlockchainClient.d.ts.map +1 -0
- package/dist/types/src/{metadata-store → abi-registry}/abi-fetcher/index.d.ts +0 -1
- package/dist/types/src/abi-registry/abi-fetcher/index.d.ts.map +1 -0
- package/dist/types/src/{metadata-store/abi-registry → abi-registry}/buildAbiRegistry.d.ts +3 -3
- package/dist/types/src/abi-registry/buildAbiRegistry.d.ts.map +1 -0
- package/dist/types/src/abi-registry/getAbiForContract.d.ts +5 -0
- package/dist/types/src/abi-registry/getAbiForContract.d.ts.map +1 -0
- package/dist/types/src/{metadata-store/abi-registry → abi-registry}/getAbiForInterface.d.ts +2 -2
- package/dist/types/src/abi-registry/getAbiForInterface.d.ts.map +1 -0
- package/dist/types/src/abi-registry/index.d.ts +7 -0
- package/dist/types/src/abi-registry/index.d.ts.map +1 -0
- package/dist/types/src/abi-registry/types.d.ts +17 -0
- package/dist/types/src/abi-registry/types.d.ts.map +1 -0
- package/dist/types/src/build.d.ts.map +1 -1
- package/dist/types/src/codegen/sections.d.ts +2 -1
- package/dist/types/src/codegen/sections.d.ts.map +1 -1
- package/dist/types/src/manifest/manifest.d.ts +88 -21
- package/dist/types/src/manifest/manifest.d.ts.map +1 -1
- package/dist/types/src/metadata-store/MetadataStore.d.ts +2 -3
- package/dist/types/src/metadata-store/MetadataStore.d.ts.map +1 -1
- package/dist/types/src/metadata-store/buildMetadataStore.d.ts +2 -4
- package/dist/types/src/metadata-store/buildMetadataStore.d.ts.map +1 -1
- package/dist/types/src/test/abis.d.ts +1 -1
- package/dist/types/src/test/abis.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/types/src/metadata-store/abi-fetcher/AbiFetcher.d.ts.map +0 -1
- package/dist/types/src/metadata-store/abi-fetcher/AbiFetcherClient.d.ts.map +0 -1
- package/dist/types/src/metadata-store/abi-fetcher/BlockchainClient.d.ts.map +0 -1
- package/dist/types/src/metadata-store/abi-fetcher/index.d.ts.map +0 -1
- package/dist/types/src/metadata-store/abi-registry/AbiRegistry.d.ts +0 -9
- package/dist/types/src/metadata-store/abi-registry/AbiRegistry.d.ts.map +0 -1
- package/dist/types/src/metadata-store/abi-registry/buildAbiRegistry.d.ts.map +0 -1
- package/dist/types/src/metadata-store/abi-registry/getAbiForContract.d.ts +0 -5
- package/dist/types/src/metadata-store/abi-registry/getAbiForContract.d.ts.map +0 -1
- package/dist/types/src/metadata-store/abi-registry/getAbiForInterface.d.ts.map +0 -1
- /package/dist/src/{metadata-store → abi-registry}/abi-fetcher/AbiFetcher.js +0 -0
- /package/dist/src/{metadata-store → abi-registry}/abi-fetcher/AbiFetcherClient.js +0 -0
- /package/dist/src/{metadata-store → abi-registry}/abi-fetcher/BlockchainClient.js +0 -0
- /package/dist/src/{metadata-store → abi-registry}/abi-fetcher/index.js +0 -0
- /package/dist/types/src/{metadata-store → abi-registry}/abi-fetcher/BlockchainClient.d.ts +0 -0
package/dist/src/AbiCli.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { buildAbiRegistry } from './abi-registry/buildAbiRegistry.js';
|
|
1
2
|
import { codegenModule } from './codegen/codegenModule.js';
|
|
2
3
|
import { buildMetadataStore } from './metadata-store/buildMetadataStore.js';
|
|
3
4
|
export class AbiCli {
|
|
@@ -35,7 +36,8 @@ export class AbiCli {
|
|
|
35
36
|
this.logger = logger.for(this);
|
|
36
37
|
}
|
|
37
38
|
async run(manifest) {
|
|
38
|
-
const
|
|
39
|
+
const abiRegistry = await buildAbiRegistry(manifest, this.abiFetcher, this.logger, this.progressBarFactory);
|
|
40
|
+
const metadataStore = buildMetadataStore(manifest, abiRegistry);
|
|
39
41
|
const module = await codegenModule(manifest, metadataStore);
|
|
40
42
|
this.logger.info(`✨ Writing to "${manifest.config.out}"`);
|
|
41
43
|
await this.fileSystem.write(this.options.outPath, module);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { assert } from '@sparkdotfi/common-universal';
|
|
2
|
+
import { getAbiForContract } from './getAbiForContract.js';
|
|
3
|
+
import { getAbiForInterface } from './getAbiForInterface.js';
|
|
2
4
|
export class AbiRegistry {
|
|
3
5
|
constructor(contracts) {
|
|
4
6
|
Object.defineProperty(this, "map", {
|
|
@@ -11,7 +13,13 @@ export class AbiRegistry {
|
|
|
11
13
|
this.map.set(makeKey(contract.domain, contract.address), contract.abi);
|
|
12
14
|
}
|
|
13
15
|
}
|
|
14
|
-
|
|
16
|
+
getContractAbi(config, name) {
|
|
17
|
+
return getAbiForContract(this, config, name);
|
|
18
|
+
}
|
|
19
|
+
getInterfaceAbi(ifaceDefinition, name) {
|
|
20
|
+
return getAbiForInterface(this, ifaceDefinition, name);
|
|
21
|
+
}
|
|
22
|
+
getAbi(domain, address) {
|
|
15
23
|
const value = this.map.get(makeKey(domain, address));
|
|
16
24
|
assert(value, `No value for ${domain}:${address}`);
|
|
17
25
|
return value;
|
|
@@ -50,8 +50,7 @@ var __disposeResources = (this && this.__disposeResources) || (function (Suppres
|
|
|
50
50
|
var e = new Error(message);
|
|
51
51
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
52
52
|
});
|
|
53
|
-
import {
|
|
54
|
-
import { uniqueBy } from 'remeda';
|
|
53
|
+
import { entries, uniqueBy } from 'remeda';
|
|
55
54
|
import { AbiRegistry } from './AbiRegistry.js';
|
|
56
55
|
export async function buildAbiRegistry(manifest, abiFetcher, logger, progressBarFactory) {
|
|
57
56
|
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
@@ -71,19 +70,16 @@ export async function buildAbiRegistry(manifest, abiFetcher, logger, progressBar
|
|
|
71
70
|
}
|
|
72
71
|
}
|
|
73
72
|
function extractContractsToFetch(manifest) {
|
|
74
|
-
const chainIdAndAddressOfContracts = Object.entries(manifest.contracts).flatMap(([_name,
|
|
75
|
-
return
|
|
73
|
+
const chainIdAndAddressOfContracts = Object.entries(manifest.contracts).flatMap(([_name, multiDomainAddress]) => {
|
|
74
|
+
return entries(multiDomainAddress)
|
|
76
75
|
.filter(([_, address]) => !address.skipAbiVerification)
|
|
77
|
-
.map(([
|
|
76
|
+
.map(([domain, fullAddress]) => [domain, fullAddress.address]);
|
|
78
77
|
});
|
|
79
78
|
const chainIdAndAddressOfInterfaces = Object.entries(manifest.interfaces).flatMap(([_name, iface]) => {
|
|
80
|
-
return
|
|
79
|
+
return entries(iface.addresses)
|
|
81
80
|
.filter(([_, address]) => !address.skipAbiVerification)
|
|
82
|
-
.map(([
|
|
83
|
-
});
|
|
84
|
-
const chainIdAndAddress = [...chainIdAndAddressOfContracts, ...chainIdAndAddressOfInterfaces];
|
|
85
|
-
const domainAndAddress = chainIdAndAddress.map(([chainId, address]) => {
|
|
86
|
-
return [getUnsafeChainIdToDomain(Number.parseInt(chainId)), address];
|
|
81
|
+
.map(([domain, fullAddress]) => [domain, fullAddress.address]);
|
|
87
82
|
});
|
|
83
|
+
const domainAndAddress = [...chainIdAndAddressOfContracts, ...chainIdAndAddressOfInterfaces];
|
|
88
84
|
return uniqueBy(domainAndAddress, ([domain, address]) => `${domain}-${address}`);
|
|
89
85
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { assert
|
|
1
|
+
import { assert } from '@sparkdotfi/common-universal';
|
|
2
|
+
import { entries } from 'remeda';
|
|
2
3
|
export function getAbiForContract(abiRegistry, config, name) {
|
|
3
|
-
const abis =
|
|
4
|
+
const abis = entries(config)
|
|
4
5
|
.filter(([_, fullAddress]) => {
|
|
5
6
|
return !fullAddress.skipAbiVerification;
|
|
6
7
|
})
|
|
7
|
-
.map(([
|
|
8
|
+
.map(([domain, fullAddress]) => abiRegistry.getAbi(domain, fullAddress.address));
|
|
8
9
|
assert(abis.length > 0);
|
|
9
10
|
const rootAbi = abis[0];
|
|
10
11
|
const rootAbiStringified = JSON.stringify(rootAbi);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { assert
|
|
1
|
+
import { assert } from '@sparkdotfi/common-universal';
|
|
2
|
+
import { entries } from 'remeda';
|
|
2
3
|
export function getAbiForInterface(abiRegistry, ifaceDefinition, name) {
|
|
3
|
-
const abis =
|
|
4
|
+
const abis = entries(ifaceDefinition.addresses)
|
|
4
5
|
.filter(([_, fullAddress]) => {
|
|
5
6
|
return !fullAddress.skipAbiVerification;
|
|
6
7
|
})
|
|
7
|
-
.map(([
|
|
8
|
+
.map(([domain, fullAddress]) => abiRegistry.getAbi(domain, fullAddress.address));
|
|
8
9
|
assert(abis.length > 0);
|
|
9
10
|
const missingMethods = ifaceDefinition.methods.filter((method) => {
|
|
10
11
|
return !abis.every((abi) => abi.some((m) => m.type === 'function' && m.name && m.name === method));
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { BlockchainClient } from './abi-fetcher/BlockchainClient.js';
|
|
2
|
+
export { AbiFetcher } from './abi-fetcher/AbiFetcher.js';
|
|
3
|
+
export { AbiFetcherClient } from './abi-fetcher/AbiFetcherClient.js';
|
|
4
|
+
export { AbiRegistry } from './AbiRegistry.js';
|
|
5
|
+
export { buildAbiRegistry } from './buildAbiRegistry.js';
|
|
6
|
+
export * from './types.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/src/build.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AbiCli } from './AbiCli.js';
|
|
2
|
+
import { AbiFetcher, AbiFetcherClient, BlockchainClient } from './abi-registry/index.js';
|
|
2
3
|
import { CliProgressBarFactory } from './common/CliProgressBarFactory.js';
|
|
3
4
|
import { createLogger } from './common/Logger.js';
|
|
4
5
|
import { Path } from './common/Path.js';
|
|
5
6
|
import { NodeFileSystem } from './common/file-system/index.js';
|
|
6
|
-
import { AbiFetcher, AbiFetcherClient, BlockchainClient } from './metadata-store/abi-fetcher/index.js';
|
|
7
7
|
export async function build(config) {
|
|
8
8
|
const fileSystem = new NodeFileSystem();
|
|
9
9
|
const blockchainClient = new BlockchainClient({ drpcApiKey: config.secrets.drpcApiKey });
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { CheckedAddress } from '@sparkdotfi/common-universal';
|
|
1
|
+
import { CheckedAddress, getUnsafeChainIdToDomain } from '@sparkdotfi/common-universal';
|
|
2
|
+
import { mapKeys } from 'remeda';
|
|
2
3
|
import { z } from 'zod';
|
|
3
4
|
export const CheckedAddressSchema = z.string().transform(CheckedAddress);
|
|
4
5
|
export const FullAddressSchema = z.object({
|
|
@@ -13,13 +14,15 @@ export const NakedOrFullAddressSchema = z
|
|
|
13
14
|
}
|
|
14
15
|
return union;
|
|
15
16
|
});
|
|
16
|
-
export const
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
export const MultiDomainAddressDefinitionSchema = z
|
|
18
|
+
.record(z.string(), NakedOrFullAddressSchema)
|
|
19
|
+
.transform((multiChainAddress) => mapKeys(multiChainAddress, (key) => getUnsafeChainIdToDomain(key)));
|
|
20
|
+
export const EoasSchema = z.record(z.string(), MultiDomainAddressDefinitionSchema);
|
|
21
|
+
export const ContractsSchema = z.record(z.string(), MultiDomainAddressDefinitionSchema);
|
|
19
22
|
export const InterfaceDefinitionSchema = z.object({
|
|
20
23
|
methods: z.array(z.string()).default([]),
|
|
21
24
|
events: z.array(z.string()).default([]),
|
|
22
|
-
addresses:
|
|
25
|
+
addresses: MultiDomainAddressDefinitionSchema,
|
|
23
26
|
});
|
|
24
27
|
export const InterfacesSchema = z.record(z.string(), InterfaceDefinitionSchema);
|
|
25
28
|
export const ManifestSchema = z.object({
|
|
@@ -1,37 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { MetadataStore
|
|
4
|
-
|
|
5
|
-
import { getAbiForContract } from './abi-registry/getAbiForContract.js';
|
|
6
|
-
import { getAbiForInterface } from './abi-registry/getAbiForInterface.js';
|
|
7
|
-
export async function buildMetadataStore(manifest, abiFetcher, logger, progressBar) {
|
|
8
|
-
const abiRegistry = await buildAbiRegistry(manifest, abiFetcher, logger, progressBar);
|
|
1
|
+
import { groupByOne } from '@sparkdotfi/common-universal';
|
|
2
|
+
import { mapValues } from 'remeda';
|
|
3
|
+
import { MetadataStore } from './MetadataStore.js';
|
|
4
|
+
export function buildMetadataStore(manifest, abiRegistry) {
|
|
9
5
|
const metadata = [
|
|
10
|
-
...Object.entries(manifest.eoa).map(([name,
|
|
6
|
+
...Object.entries(manifest.eoa).map(([name, multiChainAddressDefinition]) => ({
|
|
11
7
|
type: 'eoa',
|
|
12
8
|
name,
|
|
13
|
-
addresses:
|
|
9
|
+
addresses: multiChainAddressDefinitionToMultiChainAddress(multiChainAddressDefinition),
|
|
14
10
|
})),
|
|
15
11
|
...Object.entries(manifest.contracts).map(([name, multiChainAddress]) => {
|
|
16
12
|
return {
|
|
17
13
|
type: 'contract',
|
|
18
14
|
name,
|
|
19
|
-
addresses:
|
|
20
|
-
abi:
|
|
15
|
+
addresses: multiChainAddressDefinitionToMultiChainAddress(multiChainAddress),
|
|
16
|
+
abi: abiRegistry.getContractAbi(multiChainAddress, name),
|
|
21
17
|
};
|
|
22
18
|
}),
|
|
23
19
|
...Object.entries(manifest.interfaces).map(([name, ifaceDefinition]) => {
|
|
24
20
|
return {
|
|
25
21
|
type: 'interface',
|
|
26
22
|
name,
|
|
27
|
-
addresses:
|
|
28
|
-
abi:
|
|
23
|
+
addresses: multiChainAddressDefinitionToMultiChainAddress(ifaceDefinition.addresses),
|
|
24
|
+
abi: abiRegistry.getInterfaceAbi(ifaceDefinition, name),
|
|
29
25
|
};
|
|
30
26
|
}),
|
|
31
27
|
];
|
|
32
28
|
const data = groupByOne(metadata, (c) => c.name);
|
|
33
29
|
return new MetadataStore(data);
|
|
34
30
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
31
|
+
function multiChainAddressDefinitionToMultiChainAddress(multiChainAddressDefinition) {
|
|
32
|
+
return mapValues(multiChainAddressDefinition, (c) => c.address);
|
|
37
33
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Logger } from '@sparkdotfi/common-universal/logger';
|
|
2
|
+
import { AbiFetcher } from './abi-registry/index.js';
|
|
2
3
|
import { CliProgressBarFactory } from './common/CliProgressBarFactory.js';
|
|
3
4
|
import { Path } from './common/Path.js';
|
|
4
5
|
import { IFileSystem } from './common/file-system/index.js';
|
|
5
6
|
import { Manifest } from './manifest/manifest.js';
|
|
6
|
-
import { AbiFetcher } from './metadata-store/abi-fetcher/index.js';
|
|
7
7
|
interface AbiCliOptions {
|
|
8
8
|
outPath: Path;
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbiCli.d.ts","sourceRoot":"","sources":["../../../src/AbiCli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAA;AAE5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"AbiCli.d.ts","sourceRoot":"","sources":["../../../src/AbiCli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAA;AAE5D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAGjD,UAAU,aAAa;IACrB,OAAO,EAAE,IAAI,CAAA;CACd;AAED,qBAAa,MAAM;IAGf,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAE3B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO;IAN1B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAQ;gBAEZ,UAAU,EAAE,WAAW,EACvB,UAAU,EAAE,UAAU,EACvC,MAAM,EAAE,MAAM,EACG,kBAAkB,EAAE,qBAAqB,EACzC,OAAO,EAAE,aAAa;IAKnC,GAAG,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CAW7C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CheckedAddress, SparkDomain } from '@sparkdotfi/common-universal';
|
|
2
|
+
import { InterfaceDefinition, MultiDomainContractDefinition } from '../manifest/manifest.js';
|
|
3
|
+
import { Abi, FetchedContract } from './types.js';
|
|
4
|
+
export declare class AbiRegistry {
|
|
5
|
+
private readonly map;
|
|
6
|
+
constructor(contracts: FetchedContract[]);
|
|
7
|
+
getContractAbi(config: MultiDomainContractDefinition, name: string): Abi;
|
|
8
|
+
getInterfaceAbi(ifaceDefinition: InterfaceDefinition, name: string): Abi;
|
|
9
|
+
getAbi(domain: SparkDomain, address: CheckedAddress): Abi;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=AbiRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AbiRegistry.d.ts","sourceRoot":"","sources":["../../../../src/abi-registry/AbiRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,cAAc,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAClF,OAAO,EAAE,mBAAmB,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAA;AAG5F,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAIjD,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAkC;gBAE1C,SAAS,EAAE,eAAe,EAAE;IAMjC,cAAc,CAAC,MAAM,EAAE,6BAA6B,EAAE,IAAI,EAAE,MAAM,GAAG,GAAG;IAIxE,eAAe,CAAC,eAAe,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,GAAG,GAAG;IAIxE,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,GAAG,GAAG;CAOjE"}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { CheckedAddress, SparkDomain } from '@sparkdotfi/common-universal';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
domain: SparkDomain;
|
|
5
|
-
address: CheckedAddress;
|
|
6
|
-
abi: Abi;
|
|
7
|
-
}
|
|
2
|
+
import { FetchedContract } from '../types.js';
|
|
3
|
+
import { AbiFetcherClient } from './AbiFetcherClient.js';
|
|
8
4
|
export declare class AbiFetcher {
|
|
9
5
|
private readonly abiFetcher;
|
|
10
6
|
constructor(abiFetcher: AbiFetcherClient);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AbiFetcher.d.ts","sourceRoot":"","sources":["../../../../../src/abi-registry/abi-fetcher/AbiFetcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAiC,MAAM,8BAA8B,CAAA;AACzG,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAExD,qBAAa,UAAU;IACT,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,gBAAgB;IAEnD,cAAc,CAClB,SAAS,EAAE,CAAC,WAAW,EAAE,cAAc,CAAC,EAAE,EAC1C,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAC9B,OAAO,CAAC,eAAe,EAAE,CAAC;CAyB9B"}
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import { CheckedAddress, SparkDomain } from '@sparkdotfi/common-universal';
|
|
2
|
+
import { Abi } from '../types.js';
|
|
2
3
|
import { BlockchainClient } from './BlockchainClient.js';
|
|
3
|
-
export type Abi = {
|
|
4
|
-
name: string;
|
|
5
|
-
type?: 'function' | 'event';
|
|
6
|
-
payable?: unknown;
|
|
7
|
-
inputs?: unknown;
|
|
8
|
-
outputs?: unknown;
|
|
9
|
-
stateMutability?: unknown;
|
|
10
|
-
selector?: unknown;
|
|
11
|
-
sig?: string;
|
|
12
|
-
}[];
|
|
13
4
|
interface AbiFetcherClientOptions {
|
|
14
5
|
etherscanApiKey: string;
|
|
15
6
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AbiFetcherClient.d.ts","sourceRoot":"","sources":["../../../../../src/abi-registry/abi-fetcher/AbiFetcherClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,WAAW,EAA6C,MAAM,8BAA8B,CAAA;AAErH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAExD,UAAU,uBAAuB;IAC/B,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBADP,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,EAAE,uBAAuB;IAG7C,KAAK,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;CAYxE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlockchainClient.d.ts","sourceRoot":"","sources":["../../../../../src/abi-registry/abi-fetcher/BlockchainClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAgC,MAAM,8BAA8B,CAAA;AACxF,OAAO,EAAe,YAAY,EAAsB,MAAM,MAAM,CAAA;AAEpE,UAAU,uBAAuB;IAC/B,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,uBAAuB;IAE5D,aAAa,CAAC,MAAM,EAAE,WAAW,GAAG,YAAY;CAUjD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/abi-registry/abi-fetcher/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Logger } from '@sparkdotfi/common-universal/logger';
|
|
2
|
-
import { CliProgressBarFactory } from '
|
|
3
|
-
import { Manifest } from '
|
|
4
|
-
import { AbiFetcher } from '../abi-fetcher/index.js';
|
|
2
|
+
import { CliProgressBarFactory } from '../common/CliProgressBarFactory.js';
|
|
3
|
+
import { Manifest } from '../manifest/manifest.js';
|
|
5
4
|
import { AbiRegistry } from './AbiRegistry.js';
|
|
5
|
+
import { AbiFetcher } from './abi-fetcher/index.js';
|
|
6
6
|
export declare function buildAbiRegistry(manifest: Manifest, abiFetcher: AbiFetcher, logger: Logger, progressBarFactory: CliProgressBarFactory): Promise<AbiRegistry>;
|
|
7
7
|
//# sourceMappingURL=buildAbiRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildAbiRegistry.d.ts","sourceRoot":"","sources":["../../../../src/abi-registry/buildAbiRegistry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAA;AAE5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAA;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEnD,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,kBAAkB,EAAE,qBAAqB,GACxC,OAAO,CAAC,WAAW,CAAC,CAQtB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { MultiDomainContractDefinition } from '../manifest/manifest.js';
|
|
2
|
+
import { AbiRegistry } from './AbiRegistry.js';
|
|
3
|
+
import { Abi } from './types.js';
|
|
4
|
+
export declare function getAbiForContract(abiRegistry: AbiRegistry, config: MultiDomainContractDefinition, name: string): Abi;
|
|
5
|
+
//# sourceMappingURL=getAbiForContract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAbiForContract.d.ts","sourceRoot":"","sources":["../../../../src/abi-registry/getAbiForContract.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAA;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAA;AAEhC,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,6BAA6B,EAAE,IAAI,EAAE,MAAM,GAAG,GAAG,CAkBpH"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { InterfaceDefinition } from '
|
|
2
|
-
import { Abi } from '../abi-fetcher/AbiFetcherClient.js';
|
|
1
|
+
import { InterfaceDefinition } from '../manifest/manifest.js';
|
|
3
2
|
import { AbiRegistry } from './AbiRegistry.js';
|
|
3
|
+
import { Abi } from './types.js';
|
|
4
4
|
export declare function getAbiForInterface(abiRegistry: AbiRegistry, ifaceDefinition: InterfaceDefinition, name: string): Abi;
|
|
5
5
|
export declare function trimAbi(abi: Abi, ifaceDefinition: InterfaceDefinition): Abi;
|
|
6
6
|
//# sourceMappingURL=getAbiForInterface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAbiForInterface.d.ts","sourceRoot":"","sources":["../../../../src/abi-registry/getAbiForInterface.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAA;AAEhC,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,GAAG,GAAG,CA8BpH;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,eAAe,EAAE,mBAAmB,GAAG,GAAG,CAa3E"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { BlockchainClient } from './abi-fetcher/BlockchainClient.js';
|
|
2
|
+
export { AbiFetcher } from './abi-fetcher/AbiFetcher.js';
|
|
3
|
+
export { AbiFetcherClient } from './abi-fetcher/AbiFetcherClient.js';
|
|
4
|
+
export { AbiRegistry } from './AbiRegistry.js';
|
|
5
|
+
export { buildAbiRegistry } from './buildAbiRegistry.js';
|
|
6
|
+
export * from './types.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/abi-registry/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAA;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAA;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CheckedAddress, SparkDomain } from '@sparkdotfi/common-universal';
|
|
2
|
+
export type Abi = {
|
|
3
|
+
name: string;
|
|
4
|
+
type?: 'function' | 'event';
|
|
5
|
+
payable?: unknown;
|
|
6
|
+
inputs?: unknown;
|
|
7
|
+
outputs?: unknown;
|
|
8
|
+
stateMutability?: unknown;
|
|
9
|
+
selector?: unknown;
|
|
10
|
+
sig?: string;
|
|
11
|
+
}[];
|
|
12
|
+
export interface FetchedContract {
|
|
13
|
+
domain: SparkDomain;
|
|
14
|
+
address: CheckedAddress;
|
|
15
|
+
abi: Abi;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/abi-registry/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAE1E,MAAM,MAAM,GAAG,GAAG;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,UAAU,GAAG,OAAO,CAAA;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,EAAE,CAAA;AAEH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,WAAW,CAAA;IACnB,OAAO,EAAE,cAAc,CAAA;IACvB,GAAG,EAAE,GAAG,CAAA;CACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAMpC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAE/C,wBAAsB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAe3D"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MultiDomainAddress } from '../manifest/manifest.js';
|
|
2
|
+
import { ContractMetadata, EoaMetadata, InterfaceMetadata } from '../metadata-store/MetadataStore.js';
|
|
2
3
|
import { EntityType } from './types.js';
|
|
3
4
|
export declare function eoaSection(name: string, metadata: EoaMetadata): string;
|
|
4
5
|
export declare function contractSection(name: string, metadata: ContractMetadata | InterfaceMetadata): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sections.d.ts","sourceRoot":"","sources":["../../../../src/codegen/sections.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sections.d.ts","sourceRoot":"","sources":["../../../../src/codegen/sections.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AACrG,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAEvC,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,GAAG,MAAM,CAMtE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,GAAG,iBAAiB,GAAG,MAAM,CAQpG;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,CAepE;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,kBAAkB,GAAG,MAAM,CASlE;AAOD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,CAGtG"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CheckedAddress, SparkDomain } from '@sparkdotfi/common-universal';
|
|
1
2
|
import { z } from 'zod';
|
|
2
3
|
export declare const CheckedAddressSchema: z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
3
4
|
readonly __TAG__: "CheckedAddress";
|
|
@@ -40,7 +41,7 @@ export declare const NakedOrFullAddressSchema: z.ZodEffects<z.ZodUnion<[z.ZodEff
|
|
|
40
41
|
address: string;
|
|
41
42
|
skipAbiVerification?: boolean | undefined;
|
|
42
43
|
}>;
|
|
43
|
-
export declare const
|
|
44
|
+
export declare const MultiDomainAddressDefinitionSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
44
45
|
readonly __TAG__: "CheckedAddress";
|
|
45
46
|
}, string>, z.ZodObject<{
|
|
46
47
|
address: z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
@@ -63,8 +64,16 @@ export declare const MultiChainAddressSchema: z.ZodRecord<z.ZodString, z.ZodEffe
|
|
|
63
64
|
}, string | {
|
|
64
65
|
address: string;
|
|
65
66
|
skipAbiVerification?: boolean | undefined;
|
|
67
|
+
}>>, Partial<Record<"mainnet" | "base" | "gnosis" | "arbitrum" | "optimism" | "worldchain" | "unichain" | "sepolia" | "baseSepolia", {
|
|
68
|
+
address: `0x${string}` & {
|
|
69
|
+
readonly __TAG__: "CheckedAddress";
|
|
70
|
+
};
|
|
71
|
+
skipAbiVerification: boolean;
|
|
72
|
+
}>>, Record<string, string | {
|
|
73
|
+
address: string;
|
|
74
|
+
skipAbiVerification?: boolean | undefined;
|
|
66
75
|
}>>;
|
|
67
|
-
export declare const EoasSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
76
|
+
export declare const EoasSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
68
77
|
readonly __TAG__: "CheckedAddress";
|
|
69
78
|
}, string>, z.ZodObject<{
|
|
70
79
|
address: z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
@@ -87,8 +96,16 @@ export declare const EoasSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodStrin
|
|
|
87
96
|
}, string | {
|
|
88
97
|
address: string;
|
|
89
98
|
skipAbiVerification?: boolean | undefined;
|
|
99
|
+
}>>, Partial<Record<"mainnet" | "base" | "gnosis" | "arbitrum" | "optimism" | "worldchain" | "unichain" | "sepolia" | "baseSepolia", {
|
|
100
|
+
address: `0x${string}` & {
|
|
101
|
+
readonly __TAG__: "CheckedAddress";
|
|
102
|
+
};
|
|
103
|
+
skipAbiVerification: boolean;
|
|
104
|
+
}>>, Record<string, string | {
|
|
105
|
+
address: string;
|
|
106
|
+
skipAbiVerification?: boolean | undefined;
|
|
90
107
|
}>>>;
|
|
91
|
-
export declare const ContractsSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
108
|
+
export declare const ContractsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
92
109
|
readonly __TAG__: "CheckedAddress";
|
|
93
110
|
}, string>, z.ZodObject<{
|
|
94
111
|
address: z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
@@ -111,11 +128,19 @@ export declare const ContractsSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.Zod
|
|
|
111
128
|
}, string | {
|
|
112
129
|
address: string;
|
|
113
130
|
skipAbiVerification?: boolean | undefined;
|
|
131
|
+
}>>, Partial<Record<"mainnet" | "base" | "gnosis" | "arbitrum" | "optimism" | "worldchain" | "unichain" | "sepolia" | "baseSepolia", {
|
|
132
|
+
address: `0x${string}` & {
|
|
133
|
+
readonly __TAG__: "CheckedAddress";
|
|
134
|
+
};
|
|
135
|
+
skipAbiVerification: boolean;
|
|
136
|
+
}>>, Record<string, string | {
|
|
137
|
+
address: string;
|
|
138
|
+
skipAbiVerification?: boolean | undefined;
|
|
114
139
|
}>>>;
|
|
115
140
|
export declare const InterfaceDefinitionSchema: z.ZodObject<{
|
|
116
141
|
methods: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
117
142
|
events: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
118
|
-
addresses: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
143
|
+
addresses: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
119
144
|
readonly __TAG__: "CheckedAddress";
|
|
120
145
|
}, string>, z.ZodObject<{
|
|
121
146
|
address: z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
@@ -138,16 +163,24 @@ export declare const InterfaceDefinitionSchema: z.ZodObject<{
|
|
|
138
163
|
}, string | {
|
|
139
164
|
address: string;
|
|
140
165
|
skipAbiVerification?: boolean | undefined;
|
|
166
|
+
}>>, Partial<Record<"mainnet" | "base" | "gnosis" | "arbitrum" | "optimism" | "worldchain" | "unichain" | "sepolia" | "baseSepolia", {
|
|
167
|
+
address: `0x${string}` & {
|
|
168
|
+
readonly __TAG__: "CheckedAddress";
|
|
169
|
+
};
|
|
170
|
+
skipAbiVerification: boolean;
|
|
171
|
+
}>>, Record<string, string | {
|
|
172
|
+
address: string;
|
|
173
|
+
skipAbiVerification?: boolean | undefined;
|
|
141
174
|
}>>;
|
|
142
175
|
}, "strip", z.ZodTypeAny, {
|
|
143
176
|
methods: string[];
|
|
144
177
|
events: string[];
|
|
145
|
-
addresses: Record<
|
|
178
|
+
addresses: Partial<Record<"mainnet" | "base" | "gnosis" | "arbitrum" | "optimism" | "worldchain" | "unichain" | "sepolia" | "baseSepolia", {
|
|
146
179
|
address: `0x${string}` & {
|
|
147
180
|
readonly __TAG__: "CheckedAddress";
|
|
148
181
|
};
|
|
149
182
|
skipAbiVerification: boolean;
|
|
150
|
-
}
|
|
183
|
+
}>>;
|
|
151
184
|
}, {
|
|
152
185
|
addresses: Record<string, string | {
|
|
153
186
|
address: string;
|
|
@@ -159,7 +192,7 @@ export declare const InterfaceDefinitionSchema: z.ZodObject<{
|
|
|
159
192
|
export declare const InterfacesSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
160
193
|
methods: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
161
194
|
events: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
162
|
-
addresses: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
195
|
+
addresses: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
163
196
|
readonly __TAG__: "CheckedAddress";
|
|
164
197
|
}, string>, z.ZodObject<{
|
|
165
198
|
address: z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
@@ -182,16 +215,24 @@ export declare const InterfacesSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
182
215
|
}, string | {
|
|
183
216
|
address: string;
|
|
184
217
|
skipAbiVerification?: boolean | undefined;
|
|
218
|
+
}>>, Partial<Record<"mainnet" | "base" | "gnosis" | "arbitrum" | "optimism" | "worldchain" | "unichain" | "sepolia" | "baseSepolia", {
|
|
219
|
+
address: `0x${string}` & {
|
|
220
|
+
readonly __TAG__: "CheckedAddress";
|
|
221
|
+
};
|
|
222
|
+
skipAbiVerification: boolean;
|
|
223
|
+
}>>, Record<string, string | {
|
|
224
|
+
address: string;
|
|
225
|
+
skipAbiVerification?: boolean | undefined;
|
|
185
226
|
}>>;
|
|
186
227
|
}, "strip", z.ZodTypeAny, {
|
|
187
228
|
methods: string[];
|
|
188
229
|
events: string[];
|
|
189
|
-
addresses: Record<
|
|
230
|
+
addresses: Partial<Record<"mainnet" | "base" | "gnosis" | "arbitrum" | "optimism" | "worldchain" | "unichain" | "sepolia" | "baseSepolia", {
|
|
190
231
|
address: `0x${string}` & {
|
|
191
232
|
readonly __TAG__: "CheckedAddress";
|
|
192
233
|
};
|
|
193
234
|
skipAbiVerification: boolean;
|
|
194
|
-
}
|
|
235
|
+
}>>;
|
|
195
236
|
}, {
|
|
196
237
|
addresses: Record<string, string | {
|
|
197
238
|
address: string;
|
|
@@ -226,7 +267,7 @@ export declare const ManifestSchema: z.ZodObject<{
|
|
|
226
267
|
etherscanApiKey: string;
|
|
227
268
|
};
|
|
228
269
|
}>;
|
|
229
|
-
eoa: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
270
|
+
eoa: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
230
271
|
readonly __TAG__: "CheckedAddress";
|
|
231
272
|
}, string>, z.ZodObject<{
|
|
232
273
|
address: z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
@@ -249,8 +290,16 @@ export declare const ManifestSchema: z.ZodObject<{
|
|
|
249
290
|
}, string | {
|
|
250
291
|
address: string;
|
|
251
292
|
skipAbiVerification?: boolean | undefined;
|
|
293
|
+
}>>, Partial<Record<"mainnet" | "base" | "gnosis" | "arbitrum" | "optimism" | "worldchain" | "unichain" | "sepolia" | "baseSepolia", {
|
|
294
|
+
address: `0x${string}` & {
|
|
295
|
+
readonly __TAG__: "CheckedAddress";
|
|
296
|
+
};
|
|
297
|
+
skipAbiVerification: boolean;
|
|
298
|
+
}>>, Record<string, string | {
|
|
299
|
+
address: string;
|
|
300
|
+
skipAbiVerification?: boolean | undefined;
|
|
252
301
|
}>>>>;
|
|
253
|
-
contracts: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
302
|
+
contracts: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
254
303
|
readonly __TAG__: "CheckedAddress";
|
|
255
304
|
}, string>, z.ZodObject<{
|
|
256
305
|
address: z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
@@ -273,11 +322,19 @@ export declare const ManifestSchema: z.ZodObject<{
|
|
|
273
322
|
}, string | {
|
|
274
323
|
address: string;
|
|
275
324
|
skipAbiVerification?: boolean | undefined;
|
|
325
|
+
}>>, Partial<Record<"mainnet" | "base" | "gnosis" | "arbitrum" | "optimism" | "worldchain" | "unichain" | "sepolia" | "baseSepolia", {
|
|
326
|
+
address: `0x${string}` & {
|
|
327
|
+
readonly __TAG__: "CheckedAddress";
|
|
328
|
+
};
|
|
329
|
+
skipAbiVerification: boolean;
|
|
330
|
+
}>>, Record<string, string | {
|
|
331
|
+
address: string;
|
|
332
|
+
skipAbiVerification?: boolean | undefined;
|
|
276
333
|
}>>>>;
|
|
277
334
|
interfaces: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
278
335
|
methods: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
279
336
|
events: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
280
|
-
addresses: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
337
|
+
addresses: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
281
338
|
readonly __TAG__: "CheckedAddress";
|
|
282
339
|
}, string>, z.ZodObject<{
|
|
283
340
|
address: z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
@@ -300,16 +357,24 @@ export declare const ManifestSchema: z.ZodObject<{
|
|
|
300
357
|
}, string | {
|
|
301
358
|
address: string;
|
|
302
359
|
skipAbiVerification?: boolean | undefined;
|
|
360
|
+
}>>, Partial<Record<"mainnet" | "base" | "gnosis" | "arbitrum" | "optimism" | "worldchain" | "unichain" | "sepolia" | "baseSepolia", {
|
|
361
|
+
address: `0x${string}` & {
|
|
362
|
+
readonly __TAG__: "CheckedAddress";
|
|
363
|
+
};
|
|
364
|
+
skipAbiVerification: boolean;
|
|
365
|
+
}>>, Record<string, string | {
|
|
366
|
+
address: string;
|
|
367
|
+
skipAbiVerification?: boolean | undefined;
|
|
303
368
|
}>>;
|
|
304
369
|
}, "strip", z.ZodTypeAny, {
|
|
305
370
|
methods: string[];
|
|
306
371
|
events: string[];
|
|
307
|
-
addresses: Record<
|
|
372
|
+
addresses: Partial<Record<"mainnet" | "base" | "gnosis" | "arbitrum" | "optimism" | "worldchain" | "unichain" | "sepolia" | "baseSepolia", {
|
|
308
373
|
address: `0x${string}` & {
|
|
309
374
|
readonly __TAG__: "CheckedAddress";
|
|
310
375
|
};
|
|
311
376
|
skipAbiVerification: boolean;
|
|
312
|
-
}
|
|
377
|
+
}>>;
|
|
313
378
|
}, {
|
|
314
379
|
addresses: Record<string, string | {
|
|
315
380
|
address: string;
|
|
@@ -319,12 +384,12 @@ export declare const ManifestSchema: z.ZodObject<{
|
|
|
319
384
|
events?: string[] | undefined;
|
|
320
385
|
}>>>;
|
|
321
386
|
}, "strip", z.ZodTypeAny, {
|
|
322
|
-
contracts: Record<string, Record<
|
|
387
|
+
contracts: Record<string, Partial<Record<"mainnet" | "base" | "gnosis" | "arbitrum" | "optimism" | "worldchain" | "unichain" | "sepolia" | "baseSepolia", {
|
|
323
388
|
address: `0x${string}` & {
|
|
324
389
|
readonly __TAG__: "CheckedAddress";
|
|
325
390
|
};
|
|
326
391
|
skipAbiVerification: boolean;
|
|
327
|
-
}
|
|
392
|
+
}>>>;
|
|
328
393
|
config: {
|
|
329
394
|
out: string;
|
|
330
395
|
secrets: {
|
|
@@ -332,21 +397,21 @@ export declare const ManifestSchema: z.ZodObject<{
|
|
|
332
397
|
etherscanApiKey: string;
|
|
333
398
|
};
|
|
334
399
|
};
|
|
335
|
-
eoa: Record<string, Record<
|
|
400
|
+
eoa: Record<string, Partial<Record<"mainnet" | "base" | "gnosis" | "arbitrum" | "optimism" | "worldchain" | "unichain" | "sepolia" | "baseSepolia", {
|
|
336
401
|
address: `0x${string}` & {
|
|
337
402
|
readonly __TAG__: "CheckedAddress";
|
|
338
403
|
};
|
|
339
404
|
skipAbiVerification: boolean;
|
|
340
|
-
}
|
|
405
|
+
}>>>;
|
|
341
406
|
interfaces: Record<string, {
|
|
342
407
|
methods: string[];
|
|
343
408
|
events: string[];
|
|
344
|
-
addresses: Record<
|
|
409
|
+
addresses: Partial<Record<"mainnet" | "base" | "gnosis" | "arbitrum" | "optimism" | "worldchain" | "unichain" | "sepolia" | "baseSepolia", {
|
|
345
410
|
address: `0x${string}` & {
|
|
346
411
|
readonly __TAG__: "CheckedAddress";
|
|
347
412
|
};
|
|
348
413
|
skipAbiVerification: boolean;
|
|
349
|
-
}
|
|
414
|
+
}>>;
|
|
350
415
|
}>;
|
|
351
416
|
}, {
|
|
352
417
|
config: {
|
|
@@ -376,6 +441,8 @@ export declare const ManifestSchema: z.ZodObject<{
|
|
|
376
441
|
export type ManifestRaw = z.input<typeof ManifestSchema>;
|
|
377
442
|
export type Manifest = z.output<typeof ManifestSchema>;
|
|
378
443
|
export type Config = Manifest['config'];
|
|
379
|
-
export type MultiChainAddress = z.output<typeof MultiChainAddressSchema>;
|
|
380
444
|
export type InterfaceDefinition = z.output<typeof InterfaceDefinitionSchema>;
|
|
445
|
+
export type MultiDomainContractDefinition = z.output<typeof MultiDomainAddressDefinitionSchema>;
|
|
446
|
+
export type AddressDefinition = z.output<typeof NakedOrFullAddressSchema>;
|
|
447
|
+
export type MultiDomainAddress = Partial<Record<SparkDomain, CheckedAddress>>;
|
|
381
448
|
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../../src/manifest/manifest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../../src/manifest/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAA4B,MAAM,8BAA8B,CAAA;AAEpG,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,oBAAoB;;UAAuC,CAAA;AACxE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;EAG5B,CAAA;AACF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;EAQjC,CAAA;AAEJ,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAK5C,CAAA;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAA2D,CAAA;AAElF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAA2D,CAAA;AAEvF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIpC,CAAA;AACF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAkD,CAAA;AAE/E,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWzB,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AACxD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,cAAc,CAAC,CAAA;AACtD,MAAM,MAAM,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAA;AACvC,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAC5E,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,kCAAkC,CAAC,CAAA;AAC/F,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAEzE,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Abi } from '../abi-registry/index.js';
|
|
2
|
+
import { MultiDomainAddress } from '../manifest/manifest.js';
|
|
3
3
|
export type Metadata = EoaMetadata | ContractMetadata | InterfaceMetadata;
|
|
4
4
|
export type EoaMetadata = {
|
|
5
5
|
type: 'eoa';
|
|
@@ -18,7 +18,6 @@ export type InterfaceMetadata = {
|
|
|
18
18
|
abi: Abi;
|
|
19
19
|
addresses: MultiDomainAddress;
|
|
20
20
|
};
|
|
21
|
-
export type MultiDomainAddress = Partial<Record<SparkDomain, CheckedAddress>>;
|
|
22
21
|
type MetadataMap = Record<string, Metadata>;
|
|
23
22
|
export declare class MetadataStore {
|
|
24
23
|
private readonly data;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetadataStore.d.ts","sourceRoot":"","sources":["../../../../src/metadata-store/MetadataStore.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MetadataStore.d.ts","sourceRoot":"","sources":["../../../../src/metadata-store/MetadataStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAE5D,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG,gBAAgB,GAAG,iBAAiB,CAAA;AAEzE,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,KAAK,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,kBAAkB,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,UAAU,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,GAAG,CAAA;IACR,SAAS,EAAE,kBAAkB,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,WAAW,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,GAAG,CAAA;IACR,SAAS,EAAE,kBAAkB,CAAA;CAC9B,CAAA;AAED,KAAK,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;AAE3C,qBAAa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,WAAW;IAE9C,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW;IAQjC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB;IAQ3C,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB;CAO9C"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CliProgressBarFactory } from '../common/CliProgressBarFactory.js';
|
|
1
|
+
import { AbiRegistry } from '../abi-registry/AbiRegistry.js';
|
|
3
2
|
import { Manifest } from '../manifest/manifest.js';
|
|
4
3
|
import { MetadataStore } from './MetadataStore.js';
|
|
5
|
-
|
|
6
|
-
export declare function buildMetadataStore(manifest: Manifest, abiFetcher: AbiFetcher, logger: Logger, progressBar: CliProgressBarFactory): Promise<MetadataStore>;
|
|
4
|
+
export declare function buildMetadataStore(manifest: Manifest, abiRegistry: AbiRegistry): MetadataStore;
|
|
7
5
|
//# sourceMappingURL=buildMetadataStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildMetadataStore.d.ts","sourceRoot":"","sources":["../../../../src/metadata-store/buildMetadataStore.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"buildMetadataStore.d.ts","sourceRoot":"","sources":["../../../../src/metadata-store/buildMetadataStore.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAC5D,OAAO,EAAE,QAAQ,EAAqD,MAAM,yBAAyB,CAAA;AACrG,OAAO,EAA8D,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAE9G,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,GAAG,aAAa,CA8B9F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abis.d.ts","sourceRoot":"","sources":["../../../../src/test/abis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"abis.d.ts","sourceRoot":"","sources":["../../../../src/test/abis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAA;AAE9C,eAAO,MAAM,WAAW,EA6QZ,GAAG,CAAA;AAEf,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbiFetcher.d.ts","sourceRoot":"","sources":["../../../../../src/metadata-store/abi-fetcher/AbiFetcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAiC,MAAM,8BAA8B,CAAA;AACzG,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE7D,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,WAAW,CAAA;IACnB,OAAO,EAAE,cAAc,CAAA;IACvB,GAAG,EAAE,GAAG,CAAA;CACT;AAED,qBAAa,UAAU;IACT,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,gBAAgB;IAEnD,cAAc,CAClB,SAAS,EAAE,CAAC,WAAW,EAAE,cAAc,CAAC,EAAE,EAC1C,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAC9B,OAAO,CAAC,eAAe,EAAE,CAAC;CAyB9B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbiFetcherClient.d.ts","sourceRoot":"","sources":["../../../../../src/metadata-store/abi-fetcher/AbiFetcherClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,WAAW,EAA6C,MAAM,8BAA8B,CAAA;AAErH,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAExD,MAAM,MAAM,GAAG,GAAG;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,UAAU,GAAG,OAAO,CAAA;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,EAAE,CAAA;AAEH,UAAU,uBAAuB;IAC/B,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBADP,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,EAAE,uBAAuB;IAG7C,KAAK,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;CAYxE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BlockchainClient.d.ts","sourceRoot":"","sources":["../../../../../src/metadata-store/abi-fetcher/BlockchainClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAgC,MAAM,8BAA8B,CAAA;AACxF,OAAO,EAAe,YAAY,EAAsB,MAAM,MAAM,CAAA;AAEpE,UAAU,uBAAuB;IAC/B,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,uBAAuB;IAE5D,aAAa,CAAC,MAAM,EAAE,WAAW,GAAG,YAAY;CAUjD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/metadata-store/abi-fetcher/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,YAAY,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { CheckedAddress, SparkDomain } from '@sparkdotfi/common-universal';
|
|
2
|
-
import { FetchedContract } from '../abi-fetcher/AbiFetcher.js';
|
|
3
|
-
import { Abi } from '../abi-fetcher/AbiFetcherClient.js';
|
|
4
|
-
export declare class AbiRegistry {
|
|
5
|
-
private readonly map;
|
|
6
|
-
constructor(contracts: FetchedContract[]);
|
|
7
|
-
get(domain: SparkDomain, address: CheckedAddress): Abi;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=AbiRegistry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbiRegistry.d.ts","sourceRoot":"","sources":["../../../../../src/metadata-store/abi-registry/AbiRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,cAAc,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAA;AAIxD,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAkC;gBAE1C,SAAS,EAAE,eAAe,EAAE;IAMxC,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,GAAG,GAAG;CAOvD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"buildAbiRegistry.d.ts","sourceRoot":"","sources":["../../../../../src/metadata-store/abi-registry/buildAbiRegistry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAA;AAE5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAA;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,kBAAkB,EAAE,qBAAqB,GACxC,OAAO,CAAC,WAAW,CAAC,CAQtB"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { MultiChainAddress } from '../../manifest/manifest.js';
|
|
2
|
-
import { Abi } from '../abi-fetcher/AbiFetcherClient.js';
|
|
3
|
-
import { AbiRegistry } from './AbiRegistry.js';
|
|
4
|
-
export declare function getAbiForContract(abiRegistry: AbiRegistry, config: MultiChainAddress, name: string): Abi;
|
|
5
|
-
//# sourceMappingURL=getAbiForContract.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getAbiForContract.d.ts","sourceRoot":"","sources":["../../../../../src/metadata-store/abi-registry/getAbiForContract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,GAAG,GAAG,CAoBxG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getAbiForInterface.d.ts","sourceRoot":"","sources":["../../../../../src/metadata-store/abi-registry/getAbiForInterface.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAChE,OAAO,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,GAAG,GAAG,CAgCpH;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,eAAe,EAAE,mBAAmB,GAAG,GAAG,CAa3E"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|