hardhat-deploy
Advanced tools
Comparing version 0.11.24 to 0.11.25
@@ -11,3 +11,3 @@ "use strict"; | ||
const debug_1 = __importDefault(require("debug")); | ||
const log = debug_1.default('hardhat:wighawag:hardhat-deploy'); | ||
const log = (0, debug_1.default)('hardhat:wighawag:hardhat-deploy'); | ||
const utils_1 = require("./utils"); | ||
@@ -82,3 +82,3 @@ const helpers_1 = require("./helpers"); | ||
if (this.db.onlyArtifacts) { | ||
const artifactFromFolder = await utils_1.getArtifactFromFolders(contractName, this.db.onlyArtifacts); | ||
const artifactFromFolder = await (0, utils_1.getArtifactFromFolders)(contractName, this.db.onlyArtifacts); | ||
if (!artifactFromFolder) { | ||
@@ -89,3 +89,3 @@ throw new Error(`cannot find artifact "${contractName}" from folder ${this.db.onlyArtifacts}`); | ||
} | ||
let artifact = await utils_1.getArtifactFromFolders(contractName, [ | ||
let artifact = await (0, utils_1.getArtifactFromFolders)(contractName, [ | ||
this.env.config.paths.artifacts, | ||
@@ -97,3 +97,3 @@ ]); | ||
const importPaths = this.getImportPaths(); | ||
artifact = await utils_1.getArtifactFromFolders(contractName, importPaths); | ||
artifact = await (0, utils_1.getArtifactFromFolders)(contractName, importPaths); | ||
if (!artifact) { | ||
@@ -106,3 +106,3 @@ throw new Error(`cannot find artifact "${contractName}"`); | ||
if (this.db.onlyArtifacts) { | ||
const artifactFromFolder = await utils_1.getExtendedArtifactFromFolders(contractName, this.db.onlyArtifacts); | ||
const artifactFromFolder = await (0, utils_1.getExtendedArtifactFromFolders)(contractName, this.db.onlyArtifacts); | ||
if (!artifactFromFolder) { | ||
@@ -113,3 +113,3 @@ throw new Error(`cannot find artifact "${contractName}" from folder ${this.db.onlyArtifacts}`); | ||
} | ||
let artifact = await utils_1.getExtendedArtifactFromFolders(contractName, [ | ||
let artifact = await (0, utils_1.getExtendedArtifactFromFolders)(contractName, [ | ||
this.env.config.paths.artifacts, | ||
@@ -121,3 +121,3 @@ ]); | ||
const importPaths = this.getImportPaths(); | ||
artifact = await utils_1.getExtendedArtifactFromFolders(contractName, importPaths); | ||
artifact = await (0, utils_1.getExtendedArtifactFromFolders)(contractName, importPaths); | ||
if (artifact) { | ||
@@ -224,3 +224,3 @@ return artifact; | ||
log('adding helpers'); | ||
const helpers = helpers_1.addHelpers(this, this.partialExtension, this.network, this.partialExtension.getArtifact, async (name, deployment, artifactName) => { | ||
const helpers = (0, helpers_1.addHelpers)(this, this.partialExtension, this.network, this.partialExtension.getArtifact, async (name, deployment, artifactName) => { | ||
if (artifactName && | ||
@@ -412,3 +412,3 @@ this.db.writeDeploymentsToFiles && | ||
const networkName = this.getDeploymentNetworkName(); | ||
utils_1.addDeployments(this.db, this.deploymentsPath, this.deploymentFolder(), networkName === this.network.name ? chainId : undefined // fork mode, we do not care about chainId ? | ||
(0, utils_1.addDeployments)(this.db, this.deploymentsPath, this.deploymentFolder(), networkName === this.network.name ? chainId : undefined // fork mode, we do not care about chainId ? | ||
); | ||
@@ -420,3 +420,3 @@ const extraDeploymentPaths = this.env.config.external && | ||
for (const deploymentFolderPath of extraDeploymentPaths) { | ||
utils_1.addDeployments(this.db, deploymentFolderPath, '', undefined, chainId); | ||
(0, utils_1.addDeployments)(this.db, deploymentFolderPath, '', undefined, chainId); | ||
} | ||
@@ -429,3 +429,3 @@ } | ||
folderPath = folderPath || this.deploymentFolder(); | ||
utils_1.deleteDeployments(this.deploymentsPath, folderPath); | ||
(0, utils_1.deleteDeployments)(this.deploymentsPath, folderPath); | ||
} | ||
@@ -586,3 +586,3 @@ getSolcInputPath() { | ||
try { | ||
receiptFetched = await helpers_1.waitForTx(this.network.provider, obj.transactionHash, true); | ||
receiptFetched = await (0, helpers_1.waitForTx)(this.network.provider, obj.transactionHash, true); | ||
// TODO add receipt ? | ||
@@ -709,3 +709,3 @@ obj.address = receiptFetched.contractAddress; | ||
} | ||
const deployPaths = utils_1.getDeployPaths(this.network); | ||
const deployPaths = (0, utils_1.getDeployPaths)(this.network); | ||
await this.executeDeployScripts(deployPaths, tags); | ||
@@ -721,3 +721,3 @@ await this.export(options); | ||
try { | ||
filepaths = utils_1.traverseMultipleDirectory(deployScriptsPaths); | ||
filepaths = (0, utils_1.traverseMultipleDirectory)(deployScriptsPaths); | ||
} | ||
@@ -916,3 +916,3 @@ catch (e) { | ||
log('load all deployments for export-all'); | ||
const all = utils_1.loadAllDeployments(this.env, this.deploymentsPath, true, this.env.config.external && this.env.config.external.deployments); | ||
const all = (0, utils_1.loadAllDeployments)(this.env, this.deploymentsPath, true, this.env.config.external && this.env.config.external.deployments); | ||
const currentNetworkDeployments = {}; | ||
@@ -940,4 +940,3 @@ const currentDeployments = this.db.deployments; | ||
}); | ||
const out = JSON.stringify(all, null, ' '); | ||
this._writeExports(options.exportAll, out); | ||
this._writeExports(options.exportAll, all); | ||
log('export-all complete'); | ||
@@ -967,8 +966,8 @@ } | ||
}; | ||
const out = JSON.stringify(singleExport, null, ' '); | ||
this._writeExports(options.export, out); | ||
this._writeExports(options.export, singleExport); | ||
log('single export complete'); | ||
} | ||
} | ||
_writeExports(dests, output) { | ||
_writeExports(dests, outputObject) { | ||
const output = JSON.stringify(outputObject, null, ' '); // TODO remove bytecode ? | ||
const splitted = dests.split(','); | ||
@@ -984,3 +983,8 @@ for (const split of splitted) { | ||
fs_extra_1.default.ensureDirSync(path_1.default.dirname(split)); | ||
fs_extra_1.default.writeFileSync(split, output); // TODO remove bytecode ? | ||
if (split.endsWith('.ts')) { | ||
fs_extra_1.default.writeFileSync(split, `export default ${output} as const;`); | ||
} | ||
else { | ||
fs_extra_1.default.writeFileSync(split, output); | ||
} | ||
} | ||
@@ -1072,3 +1076,3 @@ } | ||
getNetworkName() { | ||
return utils_1.getNetworkName(this.network); | ||
return (0, utils_1.getNetworkName)(this.network); | ||
} | ||
@@ -1079,3 +1083,3 @@ getDeploymentNetworkName() { | ||
} | ||
return utils_1.getNetworkName(this.network); | ||
return (0, utils_1.getNetworkName)(this.network); | ||
} | ||
@@ -1106,3 +1110,3 @@ deploymentFolder() { | ||
const accounts = await this.network.provider.send('eth_accounts'); | ||
const { namedAccounts, unnamedAccounts, unknownAccounts, addressesToProtocol, } = utils_1.processNamedAccounts(this.network, this.env.config.namedAccounts, accounts, chainId); // TODO pass in network name | ||
const { namedAccounts, unnamedAccounts, unknownAccounts, addressesToProtocol, } = (0, utils_1.processNamedAccounts)(this.network, this.env.config.namedAccounts, accounts, chainId); // TODO pass in network name | ||
await this.impersonateAccounts(unknownAccounts); | ||
@@ -1109,0 +1113,0 @@ this.db.namedAccounts = namedAccounts; |
@@ -57,3 +57,3 @@ "use strict"; | ||
const regex = /\/\/\s*\t*SPDX-License-Identifier:\s*\t*(.*?)[\s\\]/g; | ||
const matches = match_all_1.default(metadata, regex).toArray(); | ||
const matches = (0, match_all_1.default)(metadata, regex).toArray(); | ||
const licensesFound = {}; | ||
@@ -60,0 +60,0 @@ const licenses = []; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -37,3 +41,3 @@ if (k2 === undefined) k2 = k; | ||
const debug_1 = __importDefault(require("debug")); | ||
const log = debug_1.default('hardhat:wighawag:hardhat-deploy'); | ||
const log = (0, debug_1.default)('hardhat:wighawag:hardhat-deploy'); | ||
const DeploymentsManager_1 = require("./DeploymentsManager"); | ||
@@ -77,3 +81,3 @@ const chokidar_1 = __importDefault(require("chokidar")); | ||
} | ||
config_1.extendConfig((config, userConfig) => { | ||
(0, config_1.extendConfig)((config, userConfig) => { | ||
var _a, _b, _c; | ||
@@ -229,6 +233,6 @@ config.paths.deployments = normalizePath(config, (_a = userConfig.paths) === null || _a === void 0 ? void 0 : _a.deployments, 'deployments'); | ||
let deploymentsManager; | ||
config_1.extendEnvironment((env) => { | ||
(0, config_1.extendEnvironment)((env) => { | ||
networkFromConfig(env, env.network, true); | ||
if (deploymentsManager === undefined || env.deployments === undefined) { | ||
deploymentsManager = new DeploymentsManager_1.DeploymentsManager(env, plugins_2.lazyObject(() => env.network) // IMPORTANT, else other plugin cannot set env.network before end, like solidity-coverage does here in the coverage task : https://github.com/sc-forks/solidity-coverage/blob/3c0f3a5c7db26e82974873bbf61cf462072a7c6d/plugins/resources/nomiclabs.utils.js#L93-L98 | ||
deploymentsManager = new DeploymentsManager_1.DeploymentsManager(env, (0, plugins_2.lazyObject)(() => env.network) // IMPORTANT, else other plugin cannot set env.network before end, like solidity-coverage does here in the coverage task : https://github.com/sc-forks/solidity-coverage/blob/3c0f3a5c7db26e82974873bbf61cf462072a7c6d/plugins/resources/nomiclabs.utils.js#L93-L98 | ||
); | ||
@@ -261,3 +265,3 @@ env.deployments = deploymentsManager.deploymentsExtension; | ||
getChainId: () => deploymentsManager.getChainId(), | ||
provider: plugins_2.lazyObject(() => env.network.provider), | ||
provider: (0, plugins_2.lazyObject)(() => env.network.provider), | ||
}; | ||
@@ -275,3 +279,3 @@ env.companionNetworks[name] = extraNetwork; | ||
} | ||
network.provider = construction_1.createProvider(networkName, config, env.config.paths, env.artifacts); | ||
network.provider = (0, construction_1.createProvider)(networkName, config, env.config.paths, env.artifacts); | ||
const networkDeploymentsManager = new DeploymentsManager_1.DeploymentsManager(env, network); | ||
@@ -332,3 +336,3 @@ deploymentsManager.addCompanionManager(name, networkDeploymentsManager); | ||
} | ||
config_1.subtask(exports.TASK_DEPLOY_RUN_DEPLOY, 'deploy run only') | ||
(0, config_1.subtask)(exports.TASK_DEPLOY_RUN_DEPLOY, 'deploy run only') | ||
.addOptionalParam('export', 'export current network deployments') | ||
@@ -366,3 +370,3 @@ .addOptionalParam('exportAll', 'export all deployments into one file') | ||
}); | ||
config_1.subtask(exports.TASK_DEPLOY_MAIN, 'deploy') | ||
(0, config_1.subtask)(exports.TASK_DEPLOY_MAIN, 'deploy') | ||
.addOptionalParam('export', 'export current network deployments') | ||
@@ -394,3 +398,3 @@ .addOptionalParam('exportAll', 'export all deployments into one file') | ||
if (args.watch || args.watchOnly) { | ||
const deployPaths = utils_1.getDeployPaths(hre.network); | ||
const deployPaths = (0, utils_1.getDeployPaths)(hre.network); | ||
const watcher = chokidar_1.default.watch([hre.config.paths.sources, ...deployPaths], { | ||
@@ -465,3 +469,3 @@ ignored: /(^|[/\\])\../, | ||
}); | ||
config_1.task(task_names_1.TASK_TEST, 'Runs mocha tests') | ||
(0, config_1.task)(task_names_1.TASK_TEST, 'Runs mocha tests') | ||
.addFlag('deployFixture', 'run the global fixture before tests') | ||
@@ -486,3 +490,3 @@ .addFlag('noImpersonation', 'do not impersonate unknown accounts') | ||
}); | ||
config_1.task(exports.TASK_DEPLOY, 'Deploy contracts') | ||
(0, config_1.task)(exports.TASK_DEPLOY, 'Deploy contracts') | ||
.addOptionalParam('export', 'export current network deployments') | ||
@@ -512,4 +516,4 @@ .addOptionalParam('exportAll', 'export all deployments into one file') | ||
]; | ||
if (globalStore_1.store.networks[utils_1.getNetworkName(hre.network)]) { | ||
globalStore_1.store.networks[utils_1.getNetworkName(hre.network)].deploy = hre.network.deploy; // fallback to global store | ||
if (globalStore_1.store.networks[(0, utils_1.getNetworkName)(hre.network)]) { | ||
globalStore_1.store.networks[(0, utils_1.getNetworkName)(hre.network)].deploy = hre.network.deploy; // fallback to global store | ||
} | ||
@@ -525,3 +529,3 @@ } | ||
}); | ||
config_1.task(exports.TASK_EXPORT, 'export contract deployment of the specified network into one file') | ||
(0, config_1.task)(exports.TASK_EXPORT, 'export contract deployment of the specified network into one file') | ||
.addOptionalParam('export', 'export current network deployments') | ||
@@ -542,3 +546,3 @@ .addOptionalParam('exportAll', 'export all deployments into one file') | ||
} | ||
config_1.task(task_names_1.TASK_NODE, 'Starts a JSON-RPC server on top of Hardhat EVM') | ||
(0, config_1.task)(task_names_1.TASK_NODE, 'Starts a JSON-RPC server on top of Hardhat EVM') | ||
.addOptionalParam('export', 'export current network deployments') | ||
@@ -573,3 +577,3 @@ .addOptionalParam('exportAll', 'export all deployments into one file') | ||
}); | ||
config_1.subtask(task_names_1.TASK_NODE_GET_PROVIDER).setAction(async (args, hre, runSuper) => { | ||
(0, config_1.subtask)(task_names_1.TASK_NODE_GET_PROVIDER).setAction(async (args, hre, runSuper) => { | ||
const provider = await runSuper(args); | ||
@@ -585,3 +589,3 @@ if (!nodeTaskArgs.noReset) { | ||
await enableProviderLogging(provider, false); | ||
const networkName = utils_1.getNetworkName(hre.network); | ||
const networkName = (0, utils_1.getNetworkName)(hre.network); | ||
if (networkName !== hre.network.name) { | ||
@@ -599,3 +603,3 @@ console.log(`copying ${networkName}'s deployment to localhost...`); | ||
}); | ||
config_1.subtask(task_names_1.TASK_NODE_SERVER_READY).setAction(async (args, hre, runSuper) => { | ||
(0, config_1.subtask)(task_names_1.TASK_NODE_SERVER_READY).setAction(async (args, hre, runSuper) => { | ||
await runSuper(args); | ||
@@ -606,3 +610,3 @@ if (nodeTaskArgs.watch) { | ||
}); | ||
config_1.task(exports.TASK_ETHERSCAN_VERIFY, 'submit contract source code to etherscan') | ||
(0, config_1.task)(exports.TASK_ETHERSCAN_VERIFY, 'submit contract source code to etherscan') | ||
.addOptionalParam('apiKey', 'etherscan api key', undefined, types.string) | ||
@@ -626,3 +630,3 @@ .addOptionalParam('license', 'SPDX license (useful if SPDX is not listed in the sources), need to be supported by etherscan: https://etherscan.io/contract-license-types', undefined, types.string) | ||
const solcInputsPath = await deploymentsManager.getSolcInputPath(); | ||
await etherscan_1.submitSources(hre, solcInputsPath, { | ||
await (0, etherscan_1.submitSources)(hre, solcInputsPath, { | ||
contractName: args.contractName, | ||
@@ -638,3 +642,3 @@ etherscanApiKey, | ||
}); | ||
config_1.task(exports.TASK_SOURCIFY, 'submit contract source code to sourcify (https://sourcify.dev)') | ||
(0, config_1.task)(exports.TASK_SOURCIFY, 'submit contract source code to sourcify (https://sourcify.dev)') | ||
.addOptionalParam('endpoint', 'endpoint url for sourcify', undefined, types.string) | ||
@@ -644,5 +648,5 @@ .addOptionalParam('contractName', 'specific contract name to verify', undefined, types.string) | ||
.setAction(async (args, hre) => { | ||
await sourcify_1.submitSourcesToSourcify(hre, args); | ||
await (0, sourcify_1.submitSourcesToSourcify)(hre, args); | ||
}); | ||
config_1.task('export-artifacts') | ||
(0, config_1.task)('export-artifacts') | ||
.addPositionalParam('dest', 'destination folder where the extended artifacts files will be written to', undefined, types.string) | ||
@@ -721,3 +725,3 @@ .addFlag('solcInput', 'if set, artifacts will have an associated solcInput files (required for old version of solidity to ensure verifiability') | ||
const solcInput = JSON.stringify(buildInfo.input, null, ' '); | ||
const solcInputHash = Buffer.from(murmur_128_1.default(solcInput)).toString('hex'); | ||
const solcInputHash = Buffer.from((0, murmur_128_1.default)(solcInput)).toString('hex'); | ||
extendedArtifact.solcInput = solcInput; | ||
@@ -724,0 +728,0 @@ extendedArtifact.solcInputHash = solcInputHash; |
@@ -27,3 +27,3 @@ import * as path from 'path'; | ||
export declare function traverseMultipleDirectory(dirs: string[]): string[]; | ||
export declare const traverse: (dir: string, result?: any[], topDir?: string | undefined, filter?: ((name: string, stats: any) => boolean) | undefined) => Array<{ | ||
export declare const traverse: (dir: string, result?: any[], topDir?: string, filter?: ((name: string, stats: any) => boolean) | undefined) => Array<{ | ||
name: string; | ||
@@ -30,0 +30,0 @@ path: string; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -96,3 +100,3 @@ if (k2 === undefined) k2 = k; | ||
const solcInput = JSON.stringify(buildInfo.input, null, ' '); | ||
const solcInputHash = Buffer.from(murmur_128_1.default(solcInput)).toString('hex'); | ||
const solcInputHash = Buffer.from((0, murmur_128_1.default)(solcInput)).toString('hex'); | ||
artifact = Object.assign(Object.assign(Object.assign({}, hardhatArtifact), buildInfo.output.contracts[hardhatArtifact.sourceName][contractName]), { solcInput, | ||
@@ -185,3 +189,3 @@ solcInputHash }); | ||
try { | ||
filesStats = exports.traverse(deployPath, undefined, undefined, (name) => !name.startsWith('.') && name !== 'solcInputs'); | ||
filesStats = (0, exports.traverse)(deployPath, undefined, undefined, (name) => !name.startsWith('.') && name !== 'solcInputs'); | ||
} | ||
@@ -301,3 +305,3 @@ catch (e) { | ||
if (spec.slice(0, 2).toLowerCase() === '0x') { | ||
if (!address_1.isAddress(spec)) { | ||
if (!(0, address_1.isAddress)(spec)) { | ||
throw new Error(`"${spec}" is not a valid address, if you used to put privateKey there, use the "privatekey://" prefix instead`); | ||
@@ -335,3 +339,3 @@ } | ||
if (typeof address === 'string') { | ||
address = address_1.getAddress(address); | ||
address = (0, address_1.getAddress)(address); | ||
} | ||
@@ -356,3 +360,3 @@ } | ||
if (!usedAccounts[address.toLowerCase()]) { | ||
unnamedAccounts.push(address_1.getAddress(address)); | ||
unnamedAccounts.push((0, address_1.getAddress)(address)); | ||
} | ||
@@ -411,3 +415,3 @@ } | ||
for (const dir of dirs) { | ||
let filesStats = exports.traverse(dir); | ||
let filesStats = (0, exports.traverse)(dir); | ||
filesStats = filesStats.filter((v) => !v.directory); | ||
@@ -436,3 +440,3 @@ for (const filestat of filesStats) { | ||
result.push(fileStats); | ||
return exports.traverse(fPath, result, topDir || dir, filter); | ||
return (0, exports.traverse)(fPath, result, topDir || dir, filter); | ||
} | ||
@@ -439,0 +443,0 @@ result.push(fileStats); |
@@ -5,3 +5,3 @@ import 'hardhat/types/runtime'; | ||
import type { BigNumber } from '@ethersproject/bignumber'; | ||
export declare type ExtendedArtifact = { | ||
export type ExtendedArtifact = { | ||
abi: any[]; | ||
@@ -29,5 +29,5 @@ bytecode: string; | ||
} | ||
export declare type Address = string; | ||
export declare type ABI = any[]; | ||
export declare type Log = { | ||
export type Address = string; | ||
export type ABI = any[]; | ||
export type Log = { | ||
blockNumber: number; | ||
@@ -43,3 +43,3 @@ blockHash: string; | ||
}; | ||
export declare type Receipt = { | ||
export type Receipt = { | ||
from: Address; | ||
@@ -61,3 +61,3 @@ transactionHash: string; | ||
}; | ||
export declare type FacetOptions = { | ||
export type FacetOptions = { | ||
name?: string; | ||
@@ -70,3 +70,3 @@ contract?: string | ArtifactData; | ||
}; | ||
export declare type DiamondFacets = Array<string> | Array<FacetOptions>; | ||
export type DiamondFacets = Array<string> | Array<FacetOptions>; | ||
export interface DiamondOptions extends TxOptions { | ||
@@ -95,3 +95,3 @@ diamondContract?: string | ArtifactData; | ||
} | ||
declare type ProxyOptionsBase = { | ||
type ProxyOptionsBase = { | ||
owner?: Address; | ||
@@ -108,3 +108,3 @@ upgradeIndex?: number; | ||
}; | ||
export declare type ProxyOptions = (ProxyOptionsBase & { | ||
export type ProxyOptions = (ProxyOptionsBase & { | ||
methodName?: string; | ||
@@ -126,3 +126,3 @@ }) | (ProxyOptionsBase & { | ||
}); | ||
export declare type ArtifactData = { | ||
export type ArtifactData = { | ||
abi: ABI; | ||
@@ -186,3 +186,3 @@ bytecode: string; | ||
} | ||
export declare type FixtureFunc<T, O> = (env: HardhatRuntimeEnvironment, options?: O) => Promise<T>; | ||
export type FixtureFunc<T, O> = (env: HardhatRuntimeEnvironment, options?: O) => Promise<T>; | ||
export interface DeploymentsExtension { | ||
@@ -267,6 +267,6 @@ deploy(name: string, options: DeployOptions): Promise<DeployResult>; | ||
} | ||
export declare type MultiExport = { | ||
export type MultiExport = { | ||
[chainId: string]: Export[]; | ||
}; | ||
export declare type Libraries = { | ||
export type Libraries = { | ||
[libraryName: string]: Address; | ||
@@ -279,6 +279,6 @@ }; | ||
} | ||
export declare type FacetCut = Facet & { | ||
export type FacetCut = Facet & { | ||
action: FacetCutAction; | ||
}; | ||
export declare type Facet = { | ||
export type Facet = { | ||
facetAddress: string; | ||
@@ -285,0 +285,0 @@ functionSelectors: string[]; |
{ | ||
"name": "hardhat-deploy", | ||
"version": "0.11.24", | ||
"version": "0.11.25", | ||
"description": "Hardhat Plugin For Replicable Deployments And Tests", | ||
@@ -5,0 +5,0 @@ "repository": "github:wighawag/hardhat-deploy", |
@@ -1326,4 +1326,3 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
}); | ||
const out = JSON.stringify(all, null, ' '); | ||
this._writeExports(options.exportAll, out); | ||
this._writeExports(options.exportAll, all); | ||
@@ -1360,4 +1359,4 @@ log('export-all complete'); | ||
}; | ||
const out = JSON.stringify(singleExport, null, ' '); | ||
this._writeExports(options.export, out); | ||
this._writeExports(options.export, singleExport); | ||
log('single export complete'); | ||
@@ -1367,3 +1366,4 @@ } | ||
private _writeExports(dests: string, output: string) { | ||
private _writeExports(dests: string, outputObject: any) { | ||
const output = JSON.stringify(outputObject, null, ' '); // TODO remove bytecode ? | ||
const splitted = dests.split(','); | ||
@@ -1378,3 +1378,7 @@ for (const split of splitted) { | ||
fs.ensureDirSync(path.dirname(split)); | ||
fs.writeFileSync(split, output); // TODO remove bytecode ? | ||
if (split.endsWith('.ts')) { | ||
fs.writeFileSync(split, `export default ${output} as const;`); | ||
} else { | ||
fs.writeFileSync(split, output); | ||
} | ||
} | ||
@@ -1381,0 +1385,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11865164
163985
1506