Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated zksync-web3 with zksync-ethers #514

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"match-all": "^1.2.6",
"murmur-128": "^0.2.1",
"qs": "^6.9.4",
"zksync-web3": "^0.14.3"
"zksync-ethers": "^5.0.0"
},
"scripts": {
"prepare": "node ./.setup.js",
Expand Down
13 changes: 7 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/DeploymentFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
} from '@ethersproject/providers';
import {ContractFactory, PayableOverrides, Signer} from 'ethers';
import {Artifact} from 'hardhat/types';
import * as zk from 'zksync-web3';
import * as zk from 'zksync-ethers';
import {Address, ExtendedArtifact} from '../types';
import {getAddress} from '@ethersproject/address';
import {keccak256 as solidityKeccak256} from '@ethersproject/solidity';
Expand Down
8 changes: 4 additions & 4 deletions src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
ContractFactory,
PayableOverrides,
} from '@ethersproject/contracts';
import * as zk from 'zksync-web3';
import * as zk from 'zksync-ethers';
import {AddressZero} from '@ethersproject/constants';
import {BigNumber} from '@ethersproject/bignumber';
import {Wallet} from '@ethersproject/wallet';
Expand Down Expand Up @@ -527,7 +527,7 @@ export function addHelpers(
options
);

let overrides: PayableOverrides = {
const overrides: PayableOverrides = {
gasLimit: options.gasLimit,
gasPrice: options.gasPrice,
maxFeePerGas: options.maxFeePerGas,
Expand Down Expand Up @@ -1495,8 +1495,8 @@ Note that in this case, the contract deployment will not behave the same if depl
upgradeArgsTemplate = ['{implementation}', '{data}'];
}

let proxyAddress = proxy.address;
let upgradeArgs = replaceTemplateArgs(upgradeArgsTemplate, {
const proxyAddress = proxy.address;
const upgradeArgs = replaceTemplateArgs(upgradeArgsTemplate, {
implementationAddress: implementation.address,
proxyAdmin,
data,
Expand Down