You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

hardhat-deploy

Package Overview
Dependencies
Maintainers
1
Versions
189
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.11.23 to 0.11.37

dist/src/DeploymentFactory.d.ts

3

dist/src/DeploymentsManager.d.ts

@@ -58,6 +58,7 @@ import { Deployment, DeploymentsExtension, DeploymentSubmission } from '../types';

maxPriorityFeePerGas?: string;
tagsRequireAll?: boolean;
}): Promise<{
[name: string]: Deployment;
}>;
executeDeployScripts(deployScriptsPaths: string[], tags?: string[]): Promise<void>;
executeDeployScripts(deployScriptsPaths: string[], tags?: string[], tagsRequireAll?: boolean): Promise<void>;
export(options: {

@@ -64,0 +65,0 @@ exportAll?: string;

@@ -15,2 +15,3 @@ "use strict";

const globalStore_1 = require("./globalStore");
const utils_2 = require("./internal/utils");
class DeploymentsManager {

@@ -190,3 +191,3 @@ constructor(env, network) {

if (options !== undefined) {
id = id + JSON.stringify(options);
id = id + JSON.stringify(options, utils_2.bnReplacer);
}

@@ -333,3 +334,3 @@ const saved = this.db.pastFixtures[id];

: { rawTx, decoded };
fs_extra_1.default.writeFileSync(pendingTxPath, JSON.stringify(this.db.pendingTransactions, null, ' '));
fs_extra_1.default.writeFileSync(pendingTxPath, JSON.stringify(this.db.pendingTransactions, utils_2.bnReplacer, ' '));
// await new Promise(r => setTimeout(r, 20000));

@@ -345,3 +346,3 @@ const wait = tx.wait.bind(tx);

else {
fs_extra_1.default.writeFileSync(pendingTxPath, JSON.stringify(this.db.pendingTransactions, null, ' '));
fs_extra_1.default.writeFileSync(pendingTxPath, JSON.stringify(this.db.pendingTransactions, utils_2.bnReplacer, ' '));
}

@@ -480,3 +481,3 @@ this.db.gasUsed = this.db.gasUsed.add(receipt.gasUsed);

async saveDeployment(name, deployment) {
var _a, _b;
var _a, _b, _c;
if (name.includes('/') || name.includes(':')) {

@@ -575,3 +576,6 @@ throw new Error(`deployment name must not be a path or Fully Qualified Name - for such purposes consider using the "contract" field of deployment options`);

gasEstimates: deployment.gasEstimates, // TODO double check : use evm field ?
}));
}, utils_2.bnReplacer));
if ((_c = deployment.factoryDeps) === null || _c === void 0 ? void 0 : _c.length) {
obj.factoryDeps = deployment.factoryDeps;
}
this.db.deployments[name] = obj;

@@ -615,3 +619,3 @@ if (obj.address === undefined && obj.transactionHash !== undefined) {

}
fs_extra_1.default.writeFileSync(filepath, JSON.stringify(obj, null, ' '));
fs_extra_1.default.writeFileSync(filepath, JSON.stringify(obj, utils_2.bnReplacer, ' '));
if (deployment.solcInputHash && deployment.solcInput) {

@@ -696,3 +700,3 @@ const solcInputsFolderpath = path_1.default.join(this.deploymentsPath, this.deploymentFolder(), 'solcInputs');

try {
await this.executeDeployScripts([externalContracts.deploy], tags);
await this.executeDeployScripts([externalContracts.deploy], tags, options.tagsRequireAll);
}

@@ -706,7 +710,7 @@ finally {

const deployPaths = utils_1.getDeployPaths(this.network);
await this.executeDeployScripts(deployPaths, tags);
await this.executeDeployScripts(deployPaths, tags, options.tagsRequireAll);
await this.export(options);
return this.db.deployments;
}
async executeDeployScripts(deployScriptsPaths, tags) {
async executeDeployScripts(deployScriptsPaths, tags = [], tagsRequireAll = false) {
const wasWrittingToFiles = this.db.writeDeploymentsToFiles;

@@ -755,35 +759,17 @@ // TODO loop over companion networks ?

// console.log("get tags if any for " + scriptFilePath);
let scriptTags = deployFunc.tags;
if (scriptTags !== undefined) {
if (typeof scriptTags === 'string') {
scriptTags = [scriptTags];
let scriptTags = deployFunc.tags || [];
if (typeof scriptTags === 'string') {
scriptTags = [scriptTags];
}
for (const tag of scriptTags) {
if (tag.indexOf(',') >= 0) {
throw new Error('Tag cannot contain commas');
}
for (const tag of scriptTags) {
if (tag.indexOf(',') >= 0) {
throw new Error('Tag cannot contains commas');
}
const bag = scriptPathBags[tag] || [];
scriptPathBags[tag] = bag;
bag.push(scriptFilePath);
}
const bag = scriptPathBags[tag] || [];
scriptPathBags[tag] = bag;
bag.push(scriptFilePath);
}
// console.log("tags found " + scriptFilePath, scriptTags);
if (tags !== undefined) {
let found = false;
if (scriptTags !== undefined) {
for (const tagToFind of tags) {
for (const tag of scriptTags) {
if (tag === tagToFind) {
scriptFilePaths.push(scriptFilePath);
found = true;
break;
}
}
if (found) {
break;
}
}
}
}
else {
if (tagsRequireAll && tags.every(tag => scriptTags.includes(tag))
|| !tagsRequireAll && (tags.length == 0 || tags.some(tag => scriptTags.includes(tag)))) {
scriptFilePaths.push(scriptFilePath);

@@ -885,3 +871,3 @@ }

catch (e) { }
fs_extra_1.default.writeFileSync(path_1.default.join(this.deploymentsPath, deploymentFolderPath, '.migrations.json'), JSON.stringify(this.db.migrations, null, ' '));
fs_extra_1.default.writeFileSync(path_1.default.join(this.deploymentsPath, deploymentFolderPath, '.migrations.json'), JSON.stringify(this.db.migrations, utils_2.bnReplacer, ' '));
}

@@ -936,4 +922,3 @@ }

});
const out = JSON.stringify(all, null, ' ');
this._writeExports(options.exportAll, out);
this._writeExports(options.exportAll, all);
log('export-all complete');

@@ -963,8 +948,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, utils_2.bnReplacer, ' '); // TODO remove bytecode ?
const splitted = dests.split(',');

@@ -980,3 +965,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);
}
}

@@ -983,0 +973,0 @@ }

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UnknownSignerError = void 0;
const utils_1 = require("./internal/utils");
class UnknownSignerError extends Error {
constructor(data) {
super(`Unknown Signer for account: ${data.from} Trying to execute the following::\n ${JSON.stringify(data, null, ' ')}`);
super(`Unknown Signer for account: ${data.from} Trying to execute the following::\n ${JSON.stringify(data, utils_1.bnReplacer, ' ')}`);
this.data = data;

@@ -8,0 +9,0 @@ Error.captureStackTrace(this, UnknownSignerError);

@@ -331,2 +331,3 @@ "use strict";

.addOptionalParam('tags', 'specify which deploy script to execute via tags, separated by commas', undefined, types.string)
.addFlag('tagsRequireAll', 'execute only deploy scripts containing all the tags specified')
.addOptionalParam('write', 'whether to write deployments to file', true, types.boolean)

@@ -356,2 +357,3 @@ .addOptionalParam('pendingtx', 'whether to save pending tx', false, types.boolean)

maxPriorityFeePerGas: args.priorityfee,
tagsRequireAll: args.tagsRequireAll,
});

@@ -366,2 +368,3 @@ if (args.reportGas) {

.addOptionalParam('tags', 'specify which deploy script to execute via tags, separated by commas', undefined, types.string)
.addFlag('tagsRequireAll', 'execute only deploy scripts containing all the tags specified')
.addOptionalParam('write', 'whether to write deployments to file', true, types.boolean)

@@ -484,2 +487,3 @@ .addOptionalParam('pendingtx', 'whether to save pending tx', false, types.boolean)

.addOptionalParam('tags', 'specify which deploy script to execute via tags, separated by commas', undefined, types.string)
.addFlag('tagsRequireAll', 'execute only deploy scripts containing all the tags specified')
.addOptionalParam('write', 'whether to write deployments to file', undefined, types.boolean)

@@ -523,3 +527,6 @@ // TODO pendingtx

await deploymentsManager.loadDeployments(false);
await deploymentsManager.export(args);
await deploymentsManager.export({
export: args.export || process.env.HARDHAT_DEPLOY_EXPORT,
exportAll: args.exportAll || process.env.HARDHAT_DEPLOY_EXPORT_ALL,
});
});

@@ -526,0 +533,0 @@ async function enableProviderLogging(provider, enabled) {

import * as path from 'path';
import { Artifact, HardhatRuntimeEnvironment, Network } from 'hardhat/types';
import { ExtendedArtifact, MultiExport } from '../types';
import { ABI, ExtendedArtifact, MultiExport } from '../types';
import { Transaction } from '@ethersproject/transactions';

@@ -36,2 +36,3 @@ export declare function getArtifactFromFolders(name: string, folderPaths: string[]): Promise<Artifact | ExtendedArtifact | undefined>;

export declare function getDeployPaths(network: Network): string[];
export declare function filterABI(abi: ABI, excludeSighashes: Set<string>): any[];
export declare function mergeABIs(abis: any[][], options: {

@@ -38,0 +39,0 @@ check: boolean;

@@ -25,3 +25,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.recode = exports.mergeABIs = exports.getDeployPaths = exports.getNetworkName = exports.traverse = exports.traverseMultipleDirectory = exports.processNamedAccounts = exports.addDeployments = exports.deleteDeployments = exports.loadAllDeployments = exports.getExtendedArtifactFromFolders = exports.getArtifactFromFolders = void 0;
exports.recode = exports.mergeABIs = exports.filterABI = exports.getDeployPaths = exports.getNetworkName = exports.traverse = exports.traverseMultipleDirectory = exports.processNamedAccounts = exports.addDeployments = exports.deleteDeployments = exports.loadAllDeployments = exports.getExtendedArtifactFromFolders = exports.getArtifactFromFolders = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */

@@ -283,6 +283,18 @@ const fs = __importStar(require("fs-extra"));

}
else if (protocolSplit[0].toLowerCase() === 'ledger') {
else if (protocolSplit[0].toLowerCase() === 'trezor') {
address = protocolSplit[1];
addressesToProtocol[address.toLowerCase()] =
protocolSplit[0].toLowerCase();
}
else if (protocolSplit[0].toLowerCase() === 'ledger') {
const addressSplit = protocolSplit[1].split(':');
if (addressSplit.length > 1) {
address = addressSplit[1];
addressesToProtocol[address.toLowerCase()] = `ledger://${addressSplit[0]}`;
}
else {
address = protocolSplit[1];
addressesToProtocol[address.toLowerCase()] =
"ledger://m/44'/60'/0'/0/0";
}
// knownAccountsDict[address.toLowerCase()] = true; // TODO ? this would prevent auto impersonation in fork/test

@@ -462,2 +474,6 @@ }

exports.getDeployPaths = getDeployPaths;
function filterABI(abi, excludeSighashes) {
return abi.filter(fragment => fragment.type !== 'function' || !excludeSighashes.has(abi_1.Interface.getSighash(abi_1.Fragment.from(fragment))));
}
exports.filterABI = filterABI;
function mergeABIs(abis, options) {

@@ -464,0 +480,0 @@ if (abis.length === 0) {

@@ -87,2 +87,5 @@ import 'hardhat/types/runtime';

};
excludeSelectors?: {
[facetName: string]: string[];
};
deterministicSalt?: string;

@@ -102,2 +105,4 @@ facetsArgs?: any[];

implementationName?: string;
checkABIConflict?: boolean;
checkProxyAdmin?: boolean;
};

@@ -303,2 +308,3 @@ export declare type ProxyOptions = (ProxyOptionsBase & {

gasEstimates?: any;
factoryDeps?: string[];
}

@@ -326,2 +332,3 @@ export interface Deployment {

gasEstimates?: any;
factoryDeps?: string[];
}

@@ -328,0 +335,0 @@ export interface DeterministicDeploymentInfo {

@@ -57,3 +57,3 @@ {

},
"metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"ERC165\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setImplementation(implementationAddress, data);\\n _setOwner(ownerAddress);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xb9c14a66c8a4eefabca13cc8dd8133c1587909bb1124fa793c50ab46358b63e4\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}",
"metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"ERC165\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}",
"storageLayout": {

@@ -68,4 +68,4 @@ "storage": [],

},
"solcInput": "{\n \"language\": \"Solidity\",\n \"sources\": {\n \"solc_0.8/proxy/EIP173Proxy.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setImplementation(implementationAddress, data);\\n _setOwner(ownerAddress);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\"\n },\n \"solc_0.8/proxy/Proxy.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\"\n },\n \"solc_0.8/proxy/EIP173ProxyWithReceive.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./EIP173Proxy.sol\\\";\\n\\n///@notice Proxy implementing EIP173 for ownership management that accept ETH via receive\\ncontract EIP173ProxyWithReceive is EIP173Proxy {\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable EIP173Proxy(implementationAddress, ownerAddress, data) {}\\n\\n receive() external payable override {}\\n}\\n\"\n }\n },\n \"settings\": {\n \"optimizer\": {\n \"enabled\": true,\n \"runs\": 999999\n },\n \"outputSelection\": {\n \"*\": {\n \"*\": [\n \"abi\",\n \"evm.bytecode\",\n \"evm.deployedBytecode\",\n \"evm.methodIdentifiers\",\n \"metadata\",\n \"devdoc\",\n \"userdoc\",\n \"storageLayout\",\n \"evm.gasEstimates\"\n ],\n \"\": [\n \"ast\"\n ]\n }\n },\n \"metadata\": {\n \"useLiteralContent\": true\n }\n }\n}",
"solcInputHash": "41a8600e180880fe88609322a6b2ac21"
"solcInput": "{\n \"language\": \"Solidity\",\n \"sources\": {\n \"solc_0.8/proxy/EIP173Proxy.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\"\n },\n \"solc_0.8/proxy/Proxy.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\"\n },\n \"solc_0.8/proxy/EIP173ProxyWithReceive.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./EIP173Proxy.sol\\\";\\n\\n///@notice Proxy implementing EIP173 for ownership management that accept ETH via receive\\ncontract EIP173ProxyWithReceive is EIP173Proxy {\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable EIP173Proxy(implementationAddress, ownerAddress, data) {}\\n\\n receive() external payable override {}\\n}\\n\"\n }\n },\n \"settings\": {\n \"optimizer\": {\n \"enabled\": true,\n \"runs\": 999999\n },\n \"outputSelection\": {\n \"*\": {\n \"*\": [\n \"abi\",\n \"evm.bytecode\",\n \"evm.deployedBytecode\",\n \"evm.methodIdentifiers\",\n \"metadata\",\n \"devdoc\",\n \"userdoc\",\n \"storageLayout\",\n \"evm.gasEstimates\"\n ],\n \"\": [\n \"ast\"\n ]\n }\n },\n \"metadata\": {\n \"useLiteralContent\": true\n }\n }\n}",
"solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172"
}

@@ -73,4 +73,4 @@ {

},
"solcInput": "{\n \"language\": \"Solidity\",\n \"sources\": {\n \"solc_0.8/proxy/EIP173Proxy.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setImplementation(implementationAddress, data);\\n _setOwner(ownerAddress);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\"\n },\n \"solc_0.8/proxy/Proxy.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\"\n },\n \"solc_0.8/proxy/EIP173ProxyWithReceive.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./EIP173Proxy.sol\\\";\\n\\n///@notice Proxy implementing EIP173 for ownership management that accept ETH via receive\\ncontract EIP173ProxyWithReceive is EIP173Proxy {\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable EIP173Proxy(implementationAddress, ownerAddress, data) {}\\n\\n receive() external payable override {}\\n}\\n\"\n }\n },\n \"settings\": {\n \"optimizer\": {\n \"enabled\": true,\n \"runs\": 999999\n },\n \"outputSelection\": {\n \"*\": {\n \"*\": [\n \"abi\",\n \"evm.bytecode\",\n \"evm.deployedBytecode\",\n \"evm.methodIdentifiers\",\n \"metadata\",\n \"devdoc\",\n \"userdoc\",\n \"storageLayout\",\n \"evm.gasEstimates\"\n ],\n \"\": [\n \"ast\"\n ]\n }\n },\n \"metadata\": {\n \"useLiteralContent\": true\n }\n }\n}",
"solcInputHash": "41a8600e180880fe88609322a6b2ac21"
"solcInput": "{\n \"language\": \"Solidity\",\n \"sources\": {\n \"solc_0.8/proxy/EIP173Proxy.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\"\n },\n \"solc_0.8/proxy/Proxy.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\"\n },\n \"solc_0.8/proxy/EIP173ProxyWithReceive.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./EIP173Proxy.sol\\\";\\n\\n///@notice Proxy implementing EIP173 for ownership management that accept ETH via receive\\ncontract EIP173ProxyWithReceive is EIP173Proxy {\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable EIP173Proxy(implementationAddress, ownerAddress, data) {}\\n\\n receive() external payable override {}\\n}\\n\"\n }\n },\n \"settings\": {\n \"optimizer\": {\n \"enabled\": true,\n \"runs\": 999999\n },\n \"outputSelection\": {\n \"*\": {\n \"*\": [\n \"abi\",\n \"evm.bytecode\",\n \"evm.deployedBytecode\",\n \"evm.methodIdentifiers\",\n \"metadata\",\n \"devdoc\",\n \"userdoc\",\n \"storageLayout\",\n \"evm.gasEstimates\"\n ],\n \"\": [\n \"ast\"\n ]\n }\n },\n \"metadata\": {\n \"useLiteralContent\": true\n }\n }\n}",
"solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172"
}
{
"name": "hardhat-deploy",
"version": "0.11.23",
"version": "0.11.37",
"description": "Hardhat Plugin For Replicable Deployments And Tests",

@@ -61,2 +61,13 @@ "repository": "github:wighawag/hardhat-deploy",

"dependencies": {
"@ethersproject/abi": "^5.7.0",
"@ethersproject/abstract-signer": "^5.7.0",
"@ethersproject/address": "^5.7.0",
"@ethersproject/bignumber": "^5.7.0",
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/constants": "^5.7.0",
"@ethersproject/contracts": "^5.7.0",
"@ethersproject/providers": "^5.7.2",
"@ethersproject/solidity": "^5.7.0",
"@ethersproject/transactions": "^5.7.0",
"@ethersproject/wallet": "^5.7.0",
"@types/qs": "^6.9.7",

@@ -74,6 +85,5 @@ "axios": "^0.21.1",

"qs": "^6.9.4",
"zksync-web3": "^0.8.1"
"zksync-web3": "^0.14.3"
},
"scripts": {
"prepare": "node ./.setup.js",
"compile": "hardhat compile",

@@ -87,5 +97,4 @@ "lint": "eslint \"**/*.{js,ts}\" && solhint src/**/*.sol",

"publish:next": "npm publish --tag next",
"publish:release": "npm publish",
"prepublishOnly": "npm run build"
"publish:release": "npm publish"
}
}

@@ -37,2 +37,3 @@ /* eslint-disable @typescript-eslint/no-explicit-any */

import {store} from './globalStore';
import {bnReplacer} from './internal/utils';

@@ -332,3 +333,3 @@ export class DeploymentsManager {

if (options !== undefined) {
id = id + JSON.stringify(options);
id = id + JSON.stringify(options, bnReplacer);
}

@@ -545,3 +546,3 @@ const saved = this.db.pastFixtures[id];

pendingTxPath,
JSON.stringify(this.db.pendingTransactions, null, ' ')
JSON.stringify(this.db.pendingTransactions, bnReplacer, ' ')
);

@@ -559,3 +560,3 @@ // await new Promise(r => setTimeout(r, 20000));

pendingTxPath,
JSON.stringify(this.db.pendingTransactions, null, ' ')
JSON.stringify(this.db.pendingTransactions, bnReplacer, ' ')
);

@@ -865,27 +866,33 @@ }

const obj = JSON.parse(
JSON.stringify({
address: deployment.address || actualReceipt?.contractAddress,
abi: deployment.abi,
transactionHash:
deployment.transactionHash || actualReceipt?.transactionHash,
receipt: actualReceipt,
args: actualArgs,
numDeployments,
linkedData: deployment.linkedData,
solcInputHash: deployment.solcInputHash,
metadata: deployment.metadata,
bytecode: deployment.bytecode,
deployedBytecode: deployment.deployedBytecode,
libraries: deployment.libraries,
facets: deployment.facets,
execute: deployment.execute,
history: deployment.history,
implementation: deployment.implementation,
devdoc: deployment.devdoc,
userdoc: deployment.userdoc,
storageLayout: deployment.storageLayout,
methodIdentifiers: deployment.methodIdentifiers,
gasEstimates: deployment.gasEstimates, // TODO double check : use evm field ?
})
JSON.stringify(
{
address: deployment.address || actualReceipt?.contractAddress,
abi: deployment.abi,
transactionHash:
deployment.transactionHash || actualReceipt?.transactionHash,
receipt: actualReceipt,
args: actualArgs,
numDeployments,
linkedData: deployment.linkedData,
solcInputHash: deployment.solcInputHash,
metadata: deployment.metadata,
bytecode: deployment.bytecode,
deployedBytecode: deployment.deployedBytecode,
libraries: deployment.libraries,
facets: deployment.facets,
execute: deployment.execute,
history: deployment.history,
implementation: deployment.implementation,
devdoc: deployment.devdoc,
userdoc: deployment.userdoc,
storageLayout: deployment.storageLayout,
methodIdentifiers: deployment.methodIdentifiers,
gasEstimates: deployment.gasEstimates, // TODO double check : use evm field ?
},
bnReplacer
)
);
if (deployment.factoryDeps?.length) {
obj.factoryDeps = deployment.factoryDeps;
}
this.db.deployments[name] = obj;

@@ -935,3 +942,3 @@ if (obj.address === undefined && obj.transactionHash !== undefined) {

fs.writeFileSync(filepath, JSON.stringify(obj, null, ' '));
fs.writeFileSync(filepath, JSON.stringify(obj, bnReplacer, ' '));

@@ -983,2 +990,3 @@ if (deployment.solcInputHash && deployment.solcInput) {

maxPriorityFeePerGas?: string;
tagsRequireAll?: boolean;
} = {

@@ -1049,3 +1057,3 @@ log: false,

try {
await this.executeDeployScripts([externalContracts.deploy], tags);
await this.executeDeployScripts([externalContracts.deploy], tags, options.tagsRequireAll);
} finally {

@@ -1060,3 +1068,3 @@ this.db.onlyArtifacts = undefined;

await this.executeDeployScripts(deployPaths, tags);
await this.executeDeployScripts(deployPaths, tags, options.tagsRequireAll);

@@ -1070,3 +1078,4 @@ await this.export(options);

deployScriptsPaths: string[],
tags?: string[]
tags: string[] = [],
tagsRequireAll = false,
): Promise<void> {

@@ -1118,34 +1127,17 @@ const wasWrittingToFiles = this.db.writeDeploymentsToFiles;

// console.log("get tags if any for " + scriptFilePath);
let scriptTags = deployFunc.tags;
if (scriptTags !== undefined) {
if (typeof scriptTags === 'string') {
scriptTags = [scriptTags];
let scriptTags = deployFunc.tags || [];
if (typeof scriptTags === 'string') {
scriptTags = [scriptTags];
}
for (const tag of scriptTags) {
if (tag.indexOf(',') >= 0) {
throw new Error('Tag cannot contain commas');
}
for (const tag of scriptTags) {
if (tag.indexOf(',') >= 0) {
throw new Error('Tag cannot contains commas');
}
const bag = scriptPathBags[tag] || [];
scriptPathBags[tag] = bag;
bag.push(scriptFilePath);
}
const bag = scriptPathBags[tag] || [];
scriptPathBags[tag] = bag;
bag.push(scriptFilePath);
}
// console.log("tags found " + scriptFilePath, scriptTags);
if (tags !== undefined) {
let found = false;
if (scriptTags !== undefined) {
for (const tagToFind of tags) {
for (const tag of scriptTags) {
if (tag === tagToFind) {
scriptFilePaths.push(scriptFilePath);
found = true;
break;
}
}
if (found) {
break;
}
}
}
} else {
if (tagsRequireAll && tags.every(tag => scriptTags.includes(tag))
|| !tagsRequireAll && (tags.length == 0 || tags.some(tag => scriptTags.includes(tag)))) {
scriptFilePaths.push(scriptFilePath);

@@ -1271,3 +1263,3 @@ }

),
JSON.stringify(this.db.migrations, null, ' ')
JSON.stringify(this.db.migrations, bnReplacer, ' ')
);

@@ -1338,4 +1330,3 @@ }

});
const out = JSON.stringify(all, null, ' ');
this._writeExports(options.exportAll, out);
this._writeExports(options.exportAll, all);

@@ -1372,4 +1363,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');

@@ -1379,3 +1370,4 @@ }

private _writeExports(dests: string, output: string) {
private _writeExports(dests: string, outputObject: any) {
const output = JSON.stringify(outputObject, bnReplacer, ' '); // TODO remove bytecode ?
const splitted = dests.split(',');

@@ -1390,3 +1382,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);
}
}

@@ -1393,0 +1389,0 @@ }

import {BigNumber} from '@ethersproject/bignumber';
import {bnReplacer} from './internal/utils';

@@ -16,3 +17,7 @@ export class UnknownSignerError extends Error {

data.from
} Trying to execute the following::\n ${JSON.stringify(data, null, ' ')}`
} Trying to execute the following::\n ${JSON.stringify(
data,
bnReplacer,
' '
)}`
);

@@ -19,0 +24,0 @@ Error.captureStackTrace(this, UnknownSignerError);

@@ -405,2 +405,6 @@ import './type-extensions';

)
.addFlag(
'tagsRequireAll',
'execute only deploy scripts containing all the tags specified'
)
.addOptionalParam(

@@ -450,2 +454,3 @@ 'write',

maxPriorityFeePerGas: args.priorityfee,
tagsRequireAll: args.tagsRequireAll,
});

@@ -466,2 +471,6 @@ if (args.reportGas) {

)
.addFlag(
'tagsRequireAll',
'execute only deploy scripts containing all the tags specified'
)
.addOptionalParam(

@@ -621,2 +630,6 @@ 'write',

)
.addFlag(
'tagsRequireAll',
'execute only deploy scripts containing all the tags specified'
)
.addOptionalParam(

@@ -684,3 +697,6 @@ 'write',

await deploymentsManager.loadDeployments(false);
await deploymentsManager.export(args);
await deploymentsManager.export({
export: args.export || process.env.HARDHAT_DEPLOY_EXPORT,
exportAll: args.exportAll || process.env.HARDHAT_DEPLOY_EXPORT_ALL,
});
});

@@ -687,0 +703,0 @@

@@ -9,3 +9,3 @@ /* eslint-disable @typescript-eslint/no-explicit-any */

import {BigNumber} from '@ethersproject/bignumber';
import {Export, ExtendedArtifact, MultiExport} from '../types';
import {ABI, Export, ExtendedArtifact, MultiExport} from '../types';
import {Artifacts} from 'hardhat/internal/artifacts';

@@ -344,6 +344,20 @@ import murmur128 from 'murmur-128';

// knownAccountsDict[address.toLowerCase()] = true; // TODO ? this would prevent auto impersonation in fork/test
} else if (protocolSplit[0].toLowerCase() === 'ledger') {
} else if (
protocolSplit[0].toLowerCase() === 'trezor'
) {
address = protocolSplit[1];
addressesToProtocol[address.toLowerCase()] =
protocolSplit[0].toLowerCase();
} else if (protocolSplit[0].toLowerCase() === 'ledger') {
const addressSplit = protocolSplit[1].split(':');
if (addressSplit.length > 1) {
address = addressSplit[1];
addressesToProtocol[
address.toLowerCase()
] = `ledger://${addressSplit[0]}`;
} else {
address = protocolSplit[1];
addressesToProtocol[address.toLowerCase()] =
"ledger://m/44'/60'/0'/0/0";
}
// knownAccountsDict[address.toLowerCase()] = true; // TODO ? this would prevent auto impersonation in fork/test

@@ -554,2 +568,9 @@ } else if (protocolSplit[0].toLowerCase() === 'privatekey') {

export function filterABI(
abi: ABI,
excludeSighashes: Set<string>,
): any[] {
return abi.filter(fragment => fragment.type !== 'function' || !excludeSighashes.has(Interface.getSighash(Fragment.from(fragment) as FunctionFragment)));
}
export function mergeABIs(

@@ -556,0 +577,0 @@ abis: any[][],

@@ -99,2 +99,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */

};
excludeSelectors?: {
[facetName: string]: string[]
};
deterministicSalt?: string;

@@ -117,2 +120,4 @@ facetsArgs?: any[];

implementationName?: string;
checkABIConflict?: boolean;
checkProxyAdmin?: boolean;
};

@@ -354,2 +359,3 @@

gasEstimates?: any;
factoryDeps?: string[];
}

@@ -382,2 +388,3 @@

gasEstimates?: any;
factoryDeps?: string[];
}

@@ -384,0 +391,0 @@

Sorry, the diff of this file is too big to display

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

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 not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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 too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc