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

hardhat-deploy - npm Package Compare versions

Comparing version 0.12.1 to 0.12.2

5

dist/src/DeploymentFactory.d.ts

@@ -1,6 +0,6 @@

import { TransactionRequest, TransactionResponse } from '@ethersproject/providers';
import { TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/providers';
import { PayableOverrides, Signer } from 'ethers';
import { Artifact } from 'hardhat/types';
import * as zk from 'zksync-ethers';
import { Address, ExtendedArtifact } from '../types';
import { Address, DeployOptions, ExtendedArtifact } from '../types';
export declare class DeploymentFactory {

@@ -20,3 +20,4 @@ private factory;

compareDeploymentTransaction(transaction: TransactionResponse): Promise<boolean>;
getDeployedAddress(receipt: TransactionReceipt, options: DeployOptions, create2Address: string | undefined): string;
}
//# sourceMappingURL=DeploymentFactory.d.ts.map

@@ -106,4 +106,14 @@ "use strict";

}
getDeployedAddress(receipt, options, create2Address) {
if (options.deterministicDeployment && create2Address) {
return create2Address;
}
if (this.isZkSync) {
const deployedAddresses = zk.utils.getDeployedContracts(receipt).map((info) => info.deployedAddress);
return deployedAddresses[deployedAddresses.length - 1];
}
return receipt.contractAddress;
}
}
exports.DeploymentFactory = DeploymentFactory;
//# sourceMappingURL=DeploymentFactory.js.map

2

package.json
{
"name": "hardhat-deploy",
"version": "0.12.1",
"version": "0.12.2",
"description": "Hardhat Plugin For Replicable Deployments And Tests",

@@ -5,0 +5,0 @@ "repository": "github:wighawag/hardhat-deploy",

import {
TransactionReceipt,
TransactionRequest,
TransactionResponse,
} from '@ethersproject/providers';
import {ContractFactory, PayableOverrides, Signer} from 'ethers';
import {Artifact} from 'hardhat/types';
import { ContractFactory, PayableOverrides, Signer, ethers } from 'ethers';
import { Artifact } from 'hardhat/types';
import * as zk from 'zksync-ethers';
import {Address, ExtendedArtifact} from '../types';
import {getAddress} from '@ethersproject/address';
import {keccak256 as solidityKeccak256} from '@ethersproject/solidity';
import {hexConcat} from '@ethersproject/bytes';
import { Address, DeployOptions, ExtendedArtifact } from '../types';
import { getAddress } from '@ethersproject/address';
import { keccak256 as solidityKeccak256 } from '@ethersproject/solidity';
import { hexConcat } from '@ethersproject/bytes';

@@ -98,10 +99,10 @@ export class DeploymentFactory {

'0x' +
solidityKeccak256(
['bytes'],
[
`0xff${create2DeployerAddress.slice(2)}${salt.slice(
2
)}${solidityKeccak256(['bytes'], [deploymentTx.data]).slice(2)}`,
]
).slice(-40)
solidityKeccak256(
['bytes'],
[
`0xff${create2DeployerAddress.slice(2)}${salt.slice(
2
)}${solidityKeccak256(['bytes'], [deploymentTx.data]).slice(2)}`,
]
).slice(-40)
);

@@ -155,2 +156,22 @@ }

}
getDeployedAddress(
receipt: TransactionReceipt,
options: DeployOptions,
create2Address: string | undefined
): string {
if (options.deterministicDeployment && create2Address) {
return create2Address;
}
if (this.isZkSync) {
const deployedAddresses = zk.utils.getDeployedContracts(receipt).map(
(info) => info.deployedAddress,
);
return deployedAddresses[deployedAddresses.length - 1];
}
return receipt.contractAddress;
}
}

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

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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc