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

chore: zksync-ethers 5.8.0-beta.5 #1763

Merged
merged 638 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
638 commits
Select commit Hold shift + click to select a range
1e22b58
Commitment utils fix
ly0va Mar 15, 2024
599d318
fix init and zk test i server
juan518munoz Mar 15, 2024
35df259
Merge pull request #1440 from lambdaclass/kl-factory
benceharomi Mar 15, 2024
cb6b373
Merge branch 'kl-factory' into base-token-addr-endpoint
fkrause98 Mar 15, 2024
28f6523
feat: Handle Web3Error::NotImplemented after merge
fkrause98 Mar 15, 2024
9cd48b7
fix: update protobuf config
fkrause98 Mar 15, 2024
5680df8
zk fmt
juan518munoz Mar 19, 2024
47c444f
Merge remote-tracking branch 'matter-labs/kl-factory' into gas-oracle
juan518munoz Mar 20, 2024
df9664c
update package.json
Mar 21, 2024
3baab56
initial commit
juan518munoz Mar 21, 2024
b6baace
zk fmt
juan518munoz Mar 21, 2024
aa868fb
fix test
juan518munoz Mar 21, 2024
b520744
rename native token to base token
juan518munoz Mar 25, 2024
29289c9
fix env load
juan518munoz Mar 25, 2024
53aa529
Merge pull request #1479 from lambdaclass/kl-factory-integration-test…
ly0va Mar 26, 2024
7c8ec45
add gas oracle documentation
Mar 27, 2024
2a7761d
fmt
Mar 27, 2024
55ae89f
Merge branch 'kl-factory' into gas-oracle
fkrause98 Mar 27, 2024
911e1de
Merge pull request #1481 from lambdaclass/kl-factory-fix-contracts-tests
ly0va Mar 28, 2024
cef5baa
Update yarn.lock
ly0va Mar 29, 2024
8166d7f
Switch contracts to without-1.5.0 branch
ly0va Apr 2, 2024
3c284b3
Bump contracts again
ly0va Apr 3, 2024
4735e34
Upgrade test works
ly0va Apr 3, 2024
b2bb23c
Minor integration tests fixes
ly0va Apr 3, 2024
4b58ffa
zk fmt
ly0va Apr 3, 2024
e16c3e7
add hyperchain upgrade script
kelemeno Apr 3, 2024
c684bf4
changing back bridge names in server for backwards
kelemeno Mar 26, 2024
d4b3842
bridge names in server for backwards comp
kelemeno Mar 26, 2024
6e4e4c9
generating upgrade data
kelemeno Mar 27, 2024
f5e39dc
latest to genesis protocol version
kelemeno Apr 3, 2024
dc320c3
yarn lock
kelemeno Apr 3, 2024
e3014e7
updated contracts.toml
kelemeno Apr 3, 2024
e415f74
Merge branch 'main' into kl-factory
Deniallugo Apr 4, 2024
78dabaa
zk compiles
Deniallugo Apr 4, 2024
206b682
Fix configs
Deniallugo Apr 4, 2024
7d2fc46
Fix configs
Deniallugo Apr 4, 2024
83f246a
Fix vm version
Deniallugo Apr 4, 2024
6668cf9
Switch to calldata
Deniallugo Apr 4, 2024
2d5d584
Fix tests
Deniallugo Apr 4, 2024
bb287d6
Merge branch 'main' into kl-factory
Deniallugo Apr 4, 2024
3e59eb1
feat(init): hardcode initial chain id
Deniallugo Apr 5, 2024
930eb77
Merge pull request #1581 from matter-labs/deniallugo-hardcode-initial…
kelemeno Apr 5, 2024
1a638f4
rpc endpoints added back weth
kelemeno Apr 4, 2024
23d7d67
fix multiple proofs error t4 for dummy batches
kelemeno Apr 5, 2024
9cb3105
zk lint fmt
kelemeno Apr 5, 2024
797a67e
updated yarn lock
kelemeno Apr 5, 2024
1c057d6
Remove bridge config from genesis
Deniallugo Apr 5, 2024
c8c552e
Merge pull request #1582 from matter-labs/deniallugo-slighlty-rearran…
kelemeno Apr 5, 2024
6cb4a51
update contracts submodule
juan518munoz Apr 5, 2024
0eb0be1
feat(genesis): Add genesis config generator
Deniallugo Apr 5, 2024
2bbecac
Add sqlx_offline=true
Deniallugo Apr 5, 2024
40825d6
Make sqlx work offline
Deniallugo Apr 5, 2024
f4b67c0
fix path
juan518munoz Apr 5, 2024
712bcd2
Merge remote-tracking branch 'matter-labs/kl-factory' into kl-factory
juan518munoz Apr 5, 2024
fb39e9e
fix first zk test i server
juan518munoz Apr 5, 2024
f135f9b
Fix suggestions
Deniallugo Apr 5, 2024
ee214a7
Merge pull request #1591 from lambdaclass/kl-factory
kelemeno Apr 5, 2024
0ffd1fe
Merge branch 'kl-factory' into base-token-addr-endpoint
fkrause98 Apr 5, 2024
eae48e5
CI and init fixes
ly0va Apr 8, 2024
c7cd528
Merge pull request #1592 from matter-labs/deniallugo-add-genesis-conf…
Deniallugo Apr 8, 2024
4aafcd8
fix(genesis): remove set-chain-id
Deniallugo Apr 5, 2024
a6a49df
Merge branch 'kl-factory' into deniallugo-remove-set-chain-id
Deniallugo Apr 8, 2024
99d90ee
Merge pull request #1593 from matter-labs/deniallugo-remove-set-chain-id
Deniallugo Apr 8, 2024
e6cc008
zk fmt
ly0va Apr 8, 2024
9f2c3ed
Fix ci
ly0va Apr 8, 2024
44aaa1b
Fix zk
ly0va Apr 8, 2024
633f15e
Bump contracts
ly0va Apr 8, 2024
5bccb09
Update yarn lock
ly0va Apr 8, 2024
b48b325
renaming and tests
kelemeno Apr 5, 2024
ef878c2
updated abis,
kelemeno Apr 8, 2024
cb17f04
Bump contracts again
ly0va Apr 8, 2024
04e6eba
Fix chain_eth_network
ly0va Apr 8, 2024
b4bbc8e
More fixes
ly0va Apr 8, 2024
a0868d5
Merge pull request #1031 from lambdaclass/base-token-addr-endpoint
lferrigno Apr 8, 2024
c97b667
Merge branch 'main' of github.com:matter-labs/zksync-era into kl-factory
kelemeno Apr 8, 2024
bdbf665
fixing merge errors
kelemeno Apr 8, 2024
d326e66
bump contracts
kelemeno Apr 8, 2024
bac7a4c
Merge branch 'kl-factory' into gas-oracle
fkrause98 Apr 8, 2024
cd2e52b
chore(fmt): zk fmt
fkrause98 Apr 8, 2024
b3ea30b
linting
kelemeno Apr 9, 2024
1831eaf
merge errors
kelemeno Apr 9, 2024
818f157
merge issue
kelemeno Apr 9, 2024
b19b7fc
protobuf fixes
kelemeno Apr 9, 2024
5fea3c4
Bump contracts
ly0va Apr 9, 2024
add9cf3
Merge remote-tracking branch 'origin/kl-factory' into kl-factory-ci
ly0va Apr 9, 2024
3d7921b
Update zk with validium-mode
ly0va Apr 9, 2024
d43d4fe
Switch contracts to dev
ly0va Apr 9, 2024
48bc261
fix first init
Apr 9, 2024
07103f2
Revert
ly0va Apr 9, 2024
2497d74
Fix docker.toml config
ly0va Apr 9, 2024
f4ee050
protobuf fixes
kelemeno Apr 9, 2024
fc749ea
remove init.env
Mar 25, 2024
72ddc7d
delete dev.env
Mar 25, 2024
3803823
fix web3 test
Apr 3, 2024
0fa0b04
update setup to support different base tokens & erc20 non-eth based c…
Apr 3, 2024
78dd836
update erc20 test
Apr 3, 2024
23e8b50
resolve conflicts in ether test
Apr 5, 2024
0a4e78d
add base-token test & small fixes
Apr 3, 2024
3490459
delete test
Apr 5, 2024
975126e
resolve yarn
Apr 5, 2024
e53c6e4
remove custom bridge test
Apr 5, 2024
e25b33e
feat: add resources/conversion_rate_fetcher.rs
fborello-lambda Apr 8, 2024
3b280b4
added extra script to
kelemeno Apr 9, 2024
bac9345
remove test & fix shared bridge addres is zksync_core
Apr 9, 2024
f971469
zk fmt
Apr 9, 2024
20574f7
Merge pull request #1492 from matter-labs/feat/update-integration-tests
kelemeno Apr 9, 2024
1d85502
Merge branch 'kl-factory' into gas-oracle
fkrause98 Apr 9, 2024
2a9b9bd
Merge pull request #996 from lambdaclass/gas-oracle
lferrigno Apr 9, 2024
17bce52
Merge branch 'kl-factory' into kl-factory-ci
ly0va Apr 10, 2024
b67fd20
Update sqlx
ly0va Apr 10, 2024
0fee8ca
Merge pull request #1620 from lambdaclass/kl-factory-fix-first-init
kelemeno Apr 10, 2024
62ef505
bump contracts, base_token in rpc
kelemeno Apr 10, 2024
5136c1c
remove validium mode zk init
kelemeno Apr 10, 2024
58d45df
Merge remote-tracking branch 'origin/kl-factory' into kl-factory-ci
ly0va Apr 10, 2024
a020f51
small lint fixes, abi, and
kelemeno Apr 11, 2024
67ef103
linting
kelemeno Apr 11, 2024
08d67f5
Revert "Merge pull request #996 from lambdaclass/gas-oracle"
ly0va Apr 11, 2024
c327083
upgrade preperation
kelemeno Apr 11, 2024
88713e0
bump contracts and config vars
kelemeno Apr 11, 2024
884e03c
Merge branch 'main' of github.com:matter-labs/zksync-era into kl-factory
kelemeno Apr 11, 2024
31035b5
bumping contracts
kelemeno Apr 11, 2024
6b8daba
update contracts.toml
kelemeno Apr 11, 2024
a94fb7b
upgrade script fixes
kelemeno Apr 11, 2024
616dce8
lint
kelemeno Apr 11, 2024
42a1d7f
spellcheck
kelemeno Apr 11, 2024
a28d23e
Merge remote-tracking branch 'origin/kl-factory' into kl-factory-ci
ly0va Apr 11, 2024
036a5bf
Fix some unit tests
ly0va Apr 11, 2024
8123f4f
Fix more tests
ly0va Apr 11, 2024
01e29cd
linkcheck
kelemeno Apr 12, 2024
db0c797
Disable validium mode in ci
ly0va Apr 12, 2024
896f48d
Remove zk test l1-contracts
ly0va Apr 12, 2024
0deea96
Fix some more tests
ly0va Apr 12, 2024
c4e7539
fix ci
StanislavBreadless Apr 12, 2024
4b4df79
Fix configs
ly0va Apr 12, 2024
e59c53d
remove unnecessary files to limit diff to main
mm-zk Apr 12, 2024
c547df3
Fix the last unit test
ly0va Apr 12, 2024
dd4a6fd
Merge pull request #1668 from matter-labs/mmzk_0412_kl
kelemeno Apr 12, 2024
5c65c93
Merge pull request #1604 from matter-labs/kl-factory-ci
ly0va Apr 12, 2024
92861f7
remove vm local from kl-factory
StanislavBreadless Apr 12, 2024
b09fb49
sync with base
StanislavBreadless Apr 12, 2024
1d5ec81
Merge pull request #1672 from matter-labs/sb-remove-vm-local
StanislavBreadless Apr 12, 2024
6d0ffee
fix compile in kl factory
StanislavBreadless Apr 12, 2024
8e0bd2c
Merge pull request #1676 from matter-labs/sb-fix-compile
StanislavBreadless Apr 12, 2024
98e5f98
fix: Fixing integration test for custom base token & temporarily disa…
mm-zk Apr 15, 2024
08fc82a
fix: Fixes EVM-556 - unitests (#1686)
mm-zk Apr 15, 2024
52b22b6
chore: Enable fee projection tests (#1689)
StanislavBreadless Apr 15, 2024
8a8283d
fix: Fixing issues with lint (#1687)
mm-zk Apr 15, 2024
f3737fe
fix ext node test
StanislavBreadless Apr 15, 2024
ed57e75
fix some changes
StanislavBreadless Apr 15, 2024
86366b1
consistency checker fix
benceharomi Apr 15, 2024
0b7f7b8
uncommented snapshot-recovery-test ci job
benceharomi Apr 15, 2024
8252edc
at least partially fix unit tests
StanislavBreadless Apr 15, 2024
dd9bcb2
seemingly fix integration tests for custom token
StanislavBreadless Apr 15, 2024
37c8fba
fix lint
StanislavBreadless Apr 15, 2024
4b5fa6b
remove ls
benceharomi Apr 16, 2024
bf60ce5
one more iteration
StanislavBreadless Apr 16, 2024
c5c6727
take base token from provider in tests
StanislavBreadless Apr 16, 2024
e34cc07
use is address eq
StanislavBreadless Apr 16, 2024
26a2f49
Merge pull request #1691 from matter-labs/sb-return-ext-node-tests
StanislavBreadless Apr 16, 2024
05d2775
Merge branch 'kl-factory' into bh-evm-540-test-and-fix-snapshot-test
benceharomi Apr 16, 2024
b2b31aa
Revert "consistency checker fix"
benceharomi Apr 16, 2024
b142de7
Merge pull request #1692 from matter-labs/bh-evm-540-test-and-fix-sna…
StanislavBreadless Apr 16, 2024
a38c7ef
merge + server compiles
StanislavBreadless Apr 16, 2024
c2797ae
fix lint
StanislavBreadless Apr 16, 2024
79d39c1
Merge pull request #1702 from matter-labs/sb-merge-main-to-kl-factory
StanislavBreadless Apr 17, 2024
2e334d5
chore: Enable upgrade test (#1698)
StanislavBreadless Apr 17, 2024
7fbaf7c
chore(kl-factory): Restore build core images workflow (#1710)
StanislavBreadless Apr 17, 2024
77540c4
Merge branch 'main' into sb-merge-main-to-kl-factory-2
StanislavBreadless Apr 17, 2024
b250b43
fix lint
StanislavBreadless Apr 17, 2024
7a397c9
Merge pull request #1716 from matter-labs/sb-merge-main-to-kl-factory-2
StanislavBreadless Apr 18, 2024
59d65b2
fix(yarn.lock): zksync-ethers commit fix
benceharomi Apr 18, 2024
df56d38
Merge pull request #1728 from matter-labs/bh-zksync-ethers-fix
StanislavBreadless Apr 18, 2024
2da3cc4
fix: zksync-ethers branch changed to sb-old-sdk (#1732)
benceharomi Apr 18, 2024
f02b8eb
sync with main
StanislavBreadless Apr 19, 2024
42479b5
fix lint
StanislavBreadless Apr 19, 2024
1160c68
Merge pull request #1740 from matter-labs/sb-merge-main-into-kl-factory
StanislavBreadless Apr 19, 2024
82d7f2f
feat: Adding local-node support for bridgehub (#1715)
mm-zk Apr 19, 2024
8588aa8
chore: Cleanup + minor fixes with kl-factory PR (#1741)
StanislavBreadless Apr 19, 2024
188ffc2
zksync-ethers 5.8.0-beta.3
benceharomi Apr 19, 2024
fa28075
zksync-ethers imports updated
benceharomi Apr 19, 2024
9a69264
5.8.0-beta.4
benceharomi Apr 19, 2024
ad064d7
local-setup-preparation zksync-ethers 5.8.0-beta.4
benceharomi Apr 19, 2024
6c4790d
contracts bump
benceharomi Apr 19, 2024
bf7c867
fix: fixed ethers.test for ETH based chain. (#1742)
mm-zk Apr 19, 2024
0871472
Merge remote-tracking branch 'origin/kl-factory' into bh/kl-factory-z…
benceharomi Apr 19, 2024
45b0e06
isBaseToken removed from estimateDefaultBridgeDepositL2Gas
benceharomi Apr 19, 2024
fcf0b25
fix cargo deny
StanislavBreadless Apr 19, 2024
9980619
try 2
StanislavBreadless Apr 19, 2024
5afb110
Merge pull request #1749 from matter-labs/sb-fix-cargo-deny
kelemeno Apr 19, 2024
01974b3
fix: More migration fixes, bumping contracts (#1694)
kelemeno Apr 19, 2024
f09f4b7
chore: Merge main to kl factory 3 (#1748)
StanislavBreadless Apr 20, 2024
919fc1e
chore: Some additional fixes from review to kl-factory (#1745)
StanislavBreadless Apr 21, 2024
4704f19
fix: kl-factory revert test (#1744)
Raid5594 Apr 22, 2024
4ceb1b0
mempool test fix
benceharomi Apr 22, 2024
651407e
fix(shared bridge): fix loadtest (#1750)
ly0va Apr 22, 2024
c029392
Merge branch 'kl-factory' into bh/kl-factory-zksync-ethers-v5-beta
benceharomi Apr 22, 2024
fa9a708
contracts
benceharomi Apr 22, 2024
953f960
contracts.test.ts fix
benceharomi Apr 22, 2024
0c5bd0a
merge main to kl-factory
StanislavBreadless Apr 22, 2024
c2b1beb
fixed "Should test web3 response extensions" test
benceharomi Apr 22, 2024
9ef148e
chore(kl-factory): Respond to comments by mm-zk (#1756)
StanislavBreadless Apr 22, 2024
a9d1c24
Merge pull request #1759 from matter-labs/sb-merge-main-to-kl-factory-4
StanislavBreadless Apr 22, 2024
65d72f0
Merge branch 'kl-factory' into bh/kl-factory-zksync-ethers-v5-beta
benceharomi Apr 22, 2024
a82b882
chore: factory l2 erc20 removal (#1762)
kelemeno Apr 22, 2024
1897d59
Merge remote-tracking branch 'origin/kl-factory' into bh-evm-575-star…
benceharomi Apr 23, 2024
066439b
contracts
benceharomi Apr 23, 2024
3bdb021
Revert "contracts"
benceharomi Apr 23, 2024
fc2a3ed
fix: Add test for migration (#1765)
StanislavBreadless Apr 23, 2024
23231a0
mempool test to use type 0 transaction
benceharomi Apr 23, 2024
e4b4b6a
chore: Respond to comments by mm-zk 2 (#1768)
StanislavBreadless Apr 23, 2024
52002b5
chore: factory stops CI, final PR (#1766)
kelemeno Apr 23, 2024
d900455
chore: Fix comments from mishap (#1770)
StanislavBreadless Apr 23, 2024
c1f0bdd
fix(web3.test.ts): metamask interoperability
benceharomi Apr 23, 2024
e1d59df
contracts
benceharomi Apr 23, 2024
e74d874
Merge branch 'kl-factory' into bh-evm-575-start-using-beta-release-fr…
benceharomi Apr 23, 2024
d892e79
Merge branch 'main' into bh-evm-575-start-using-beta-release-from-the…
benceharomi Apr 23, 2024
579be83
contracts
benceharomi Apr 23, 2024
3ff21cc
Merge branch 'main' into bh-evm-575-start-using-beta-release-from-the…
benceharomi Apr 23, 2024
954fddc
contracts
benceharomi Apr 23, 2024
1c86cfd
Merge remote-tracking branch 'origin/main' into bh-evm-575-start-usin…
benceharomi Apr 24, 2024
f9af5b8
contracts
benceharomi Apr 24, 2024
e46d854
contracts
benceharomi Apr 24, 2024
74bde5c
zksync-ethers 5.8.0-beta.5
benceharomi Apr 24, 2024
0a316c8
Merge remote-tracking branch 'origin/main' into bh-evm-575-start-usin…
benceharomi Apr 24, 2024
c33f1c6
Merge remote-tracking branch 'origin/main' into bh-evm-575-start-usin…
benceharomi Apr 24, 2024
a0f83f5
fix(contracts.test.ts): gasPerPubdataByte param to gasPerPubdata
benceharomi Apr 24, 2024
b1f228c
fix(ether.test.ts): estimateDefaultBridgeDepositL2Gas call todo
benceharomi Apr 24, 2024
84e063c
Merge remote-tracking branch 'origin/main' into bh-evm-575-start-usin…
benceharomi Apr 24, 2024
0ce5da1
fix(fees.test.ts): "Test gas consumption under large L1 gas" fix
benceharomi Apr 24, 2024
b414a53
revert test fix
benceharomi Apr 24, 2024
4e951cc
fix(revert-and-restart-en.test.ts): sendTransaction type 0
benceharomi Apr 24, 2024
1aa2600
fix(upgrade.test.ts): sendTransaction type 0
benceharomi Apr 24, 2024
e1f3a35
Merge branch 'main' into bh-evm-575-start-using-beta-release-from-the…
benceharomi Apr 24, 2024
c3abd86
contracts
benceharomi Apr 24, 2024
3f93b08
Merge branch 'main' into bh-evm-575-start-using-beta-release-from-the…
benceharomi May 7, 2024
aab6056
contracts dependency update
benceharomi May 7, 2024
150ec60
Merge branch 'main' into bh-evm-575-start-using-beta-release-from-the…
benceharomi May 8, 2024
308fc02
fix: zksync-ethers dependency commit changed
benceharomi May 8, 2024
2085884
fix(yarn.lock): zksync-ethers version in contracts
benceharomi May 8, 2024
b3e7883
Merge branch 'main' into bh-evm-575-start-using-beta-release-from-the…
benceharomi May 9, 2024
4b7e074
Merge branch 'main' into bh-evm-575-start-using-beta-release-from-the…
benceharomi May 14, 2024
4315b54
chore(upgrade.test.ts): zksync-web3 dependency removed
benceharomi May 14, 2024
d99086c
chore(snapshot-recovery-test): zksync-web3 dependency removed
benceharomi May 14, 2024
b1a7900
chore(revert-test): zksync-web3 dependency removed
benceharomi May 14, 2024
bff80a6
chore(protocol-upgrade): zksync-web3 dependency removed
benceharomi May 14, 2024
9c26e7f
yarn.lock
benceharomi May 14, 2024
daf8577
chore(tests): zkweb3 imports renamed to zksync
benceharomi May 14, 2024
6d4d627
Merge branch 'main' into bh-evm-575-start-using-beta-release-from-the…
benceharomi May 14, 2024
809e12c
Merge remote-tracking branch 'origin/main' into bh-evm-575-start-usin…
benceharomi May 15, 2024
cdcfb11
Merge branch 'main' into bh-evm-575-start-using-beta-release-from-the…
benceharomi May 15, 2024
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
3 changes: 1 addition & 2 deletions core/tests/revert-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"mocha-steps": "^1.3.0",
"node-fetch": "^2.6.1",
"ts-node": "^10.1.0",
"typescript": "^4.3.5",
"zksync-web3": "^0.15.5"
"typescript": "^4.3.5"
}
}
23 changes: 11 additions & 12 deletions core/tests/revert-test/tests/revert-and-restart-en.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
// NOTE:
// main_contract.getTotalBatchesCommitted actually checks the number of batches committed.
// main_contract.getTotalBatchesExecuted actually checks the number of batches executed.
// TODO: Migrate from zksync-web3 to zksync-ethers.
import * as utils from 'zk/build/utils';
import { Tester } from './tester';
import * as zkweb3 from 'zksync-ethers';
import * as zksync from 'zksync-ethers';
import { BigNumber, ethers } from 'ethers';
import { expect, assert } from 'chai';
import fs from 'fs';
Expand Down Expand Up @@ -249,14 +248,14 @@ describe('Block reverting test', function () {

const main_contract = await mainNode.tester.syncWallet.getMainContract();
const baseTokenAddress = await mainNode.tester.syncWallet.getBaseToken();
const isETHBasedChain = baseTokenAddress == zkweb3.utils.ETH_ADDRESS_IN_CONTRACTS;
const alice: zkweb3.Wallet = extNode.tester.emptyWallet();
const isETHBasedChain = baseTokenAddress == zksync.utils.ETH_ADDRESS_IN_CONTRACTS;
const alice: zksync.Wallet = extNode.tester.emptyWallet();

console.log(
'Finalize an L1 transaction to ensure at least 1 executed L1 batch and that all transactions are processed'
);
const h: zkweb3.types.PriorityOpResponse = await extNode.tester.syncWallet.deposit({
token: isETHBasedChain ? zkweb3.utils.LEGACY_ETH_ADDRESS : baseTokenAddress,
const h: zksync.types.PriorityOpResponse = await extNode.tester.syncWallet.deposit({
token: isETHBasedChain ? zksync.utils.LEGACY_ETH_ADDRESS : baseTokenAddress,
amount: depositAmount,
to: alice.address,
approveBaseERC20: true,
Expand All @@ -274,7 +273,7 @@ describe('Block reverting test', function () {
// it gets updated with some batch logs only at the start of the next batch.
const initialL1BatchNumber = (await main_contract.getTotalBatchesCommitted()).toNumber();
const firstDepositHandle = await extNode.tester.syncWallet.deposit({
token: isETHBasedChain ? zkweb3.utils.LEGACY_ETH_ADDRESS : baseTokenAddress,
token: isETHBasedChain ? zksync.utils.LEGACY_ETH_ADDRESS : baseTokenAddress,
amount: depositAmount,
to: alice.address,
approveBaseERC20: true,
Expand All @@ -287,7 +286,7 @@ describe('Block reverting test', function () {
}

const secondDepositHandle = await extNode.tester.syncWallet.deposit({
token: isETHBasedChain ? zkweb3.utils.LEGACY_ETH_ADDRESS : baseTokenAddress,
token: isETHBasedChain ? zksync.utils.LEGACY_ETH_ADDRESS : baseTokenAddress,
amount: depositAmount,
to: alice.address,
approveBaseERC20: true,
Expand Down Expand Up @@ -358,7 +357,7 @@ describe('Block reverting test', function () {

console.log('Execute an L1 transaction');
const depositHandle = await extNode.tester.syncWallet.deposit({
token: isETHBasedChain ? zkweb3.utils.LEGACY_ETH_ADDRESS : baseTokenAddress,
token: isETHBasedChain ? zksync.utils.LEGACY_ETH_ADDRESS : baseTokenAddress,
amount: depositAmount,
to: alice.address,
approveBaseERC20: true,
Expand Down Expand Up @@ -406,10 +405,10 @@ describe('Block reverting test', function () {
});

// Transfers amount from sender to a random wallet in an L2 transaction.
async function checkedRandomTransfer(sender: zkweb3.Wallet, amount: BigNumber) {
async function checkedRandomTransfer(sender: zksync.Wallet, amount: BigNumber) {
const senderBalanceBefore = await sender.getBalance();
const receiver = zkweb3.Wallet.createRandom().connect(sender.provider);
const transferHandle = await sender.sendTransaction({ to: receiver.address, value: amount });
const receiver = zksync.Wallet.createRandom().connect(sender.provider);
const transferHandle = await sender.sendTransaction({ to: receiver.address, value: amount, type: 0 });

// ethers doesn't work well with block reversions, so we poll for the receipt manually.
let txReceipt = null;
Expand Down
17 changes: 9 additions & 8 deletions core/tests/revert-test/tests/revert-and-restart.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as utils from 'zk/build/utils';
import { Tester } from './tester';
import * as zkweb3 from 'zksync-ethers';
import * as zksync from 'zksync-ethers';
import { BigNumber, Contract, ethers } from 'ethers';
import { expect } from 'chai';
import fs from 'fs';
Expand Down Expand Up @@ -55,7 +55,7 @@ const depositAmount = ethers.utils.parseEther('0.001');

describe('Block reverting test', function () {
let tester: Tester;
let alice: zkweb3.Wallet;
let alice: zksync.Wallet;
let mainContract: Contract;
let blocksCommittedBeforeRevert: number;
let logs: fs.WriteStream;
Expand Down Expand Up @@ -110,7 +110,7 @@ describe('Block reverting test', function () {
// it gets updated with some batch logs only at the start of the next batch.
const initialL1BatchNumber = await tester.web3Provider.getL1BatchNumber();
const firstDepositHandle = await tester.syncWallet.deposit({
token: tester.isETHBasedChain ? zkweb3.utils.LEGACY_ETH_ADDRESS : tester.baseTokenAddress,
token: tester.isETHBasedChain ? zksync.utils.LEGACY_ETH_ADDRESS : tester.baseTokenAddress,
amount: depositAmount,
to: alice.address,
approveBaseERC20: true,
Expand All @@ -121,7 +121,7 @@ describe('Block reverting test', function () {
await utils.sleep(1);
}
const secondDepositHandle = await tester.syncWallet.deposit({
token: tester.isETHBasedChain ? zkweb3.utils.LEGACY_ETH_ADDRESS : tester.baseTokenAddress,
token: tester.isETHBasedChain ? zksync.utils.LEGACY_ETH_ADDRESS : tester.baseTokenAddress,
amount: depositAmount,
to: alice.address,
approveBaseERC20: true,
Expand Down Expand Up @@ -194,7 +194,7 @@ describe('Block reverting test', function () {

// Execute a transaction
const depositHandle = await tester.syncWallet.deposit({
token: tester.isETHBasedChain ? zkweb3.utils.LEGACY_ETH_ADDRESS : tester.baseTokenAddress,
token: tester.isETHBasedChain ? zksync.utils.LEGACY_ETH_ADDRESS : tester.baseTokenAddress,
amount: depositAmount,
to: alice.address,
approveBaseERC20: true,
Expand Down Expand Up @@ -244,12 +244,13 @@ describe('Block reverting test', function () {
});
});

async function checkedRandomTransfer(sender: zkweb3.Wallet, amount: BigNumber) {
async function checkedRandomTransfer(sender: zksync.Wallet, amount: BigNumber) {
const senderBalanceBefore = await sender.getBalance();
const receiver = zkweb3.Wallet.createRandom().connect(sender.provider);
const receiver = zksync.Wallet.createRandom().connect(sender.provider);
const transferHandle = await sender.sendTransaction({
to: receiver.address,
value: amount
value: amount,
type: 0
});

// ethers doesn't work well with block reversions, so we poll for the receipt manually.
Expand Down
22 changes: 11 additions & 11 deletions core/tests/revert-test/tests/tester.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { expect } from 'chai';
import * as ethers from 'ethers';
import * as zkweb3 from 'zksync-ethers';
import * as zksync from 'zksync-ethers';
import * as fs from 'fs';
import * as path from 'path';

const BASE_ERC20_TO_MINT = ethers.utils.parseEther('100');

export class Tester {
public runningFee: Map<zkweb3.types.Address, ethers.BigNumber>;
public runningFee: Map<zksync.types.Address, ethers.BigNumber>;
constructor(
public ethProvider: ethers.providers.Provider,
public ethWallet: ethers.Wallet,
public syncWallet: zkweb3.Wallet,
public web3Provider: zkweb3.Provider,
public syncWallet: zksync.Wallet,
public web3Provider: zksync.Provider,
public hyperchainAdmin: ethers.Wallet, // We need to add validator to ValidatorTimelock with admin rights
public isETHBasedChain: boolean,
public baseTokenAddress: string
Expand All @@ -35,9 +35,9 @@ export class Tester {
ethTestConfig.mnemonic as string,
"m/44'/60'/0'/0/1"
).connect(ethProvider);
const web3Provider = new zkweb3.Provider(l2_rpc_addr);
const web3Provider = new zksync.Provider(l2_rpc_addr);
web3Provider.pollingInterval = 100; // It's OK to keep it low even on stage.
const syncWallet = new zkweb3.Wallet(ethWallet.privateKey, web3Provider, ethProvider);
const syncWallet = new zksync.Wallet(ethWallet.privateKey, web3Provider, ethProvider);


// Since some tx may be pending on stage, we don't want to get stuck because of it.
Expand All @@ -60,7 +60,7 @@ export class Tester {
}

const baseTokenAddress = process.env.CONTRACTS_BASE_TOKEN_ADDR!;
const isETHBasedChain = baseTokenAddress == zkweb3.utils.ETH_ADDRESS_IN_CONTRACTS;
const isETHBasedChain = baseTokenAddress == zksync.utils.ETH_ADDRESS_IN_CONTRACTS;

return new Tester(ethProvider, ethWallet, syncWallet, web3Provider, hyperchainAdmin, isETHBasedChain, baseTokenAddress);
}
Expand All @@ -70,7 +70,7 @@ export class Tester {
/// L2 RPC is active, but we need the L2 RPC to get the base token address.
async fundSyncWallet() {
const baseTokenAddress = await this.syncWallet.provider.getBaseTokenContractAddress();
if (!(baseTokenAddress === zkweb3.utils.ETH_ADDRESS_IN_CONTRACTS)) {
if (!(baseTokenAddress === zksync.utils.ETH_ADDRESS_IN_CONTRACTS)) {
const l1Erc20ABI = ['function mint(address to, uint256 amount)'];
const l1Erc20Contract = new ethers.Contract(baseTokenAddress, l1Erc20ABI, this.ethWallet);
await (await l1Erc20Contract.mint(this.ethWallet.address, BASE_ERC20_TO_MINT)).wait();
Expand All @@ -79,10 +79,10 @@ export class Tester {

async fundedWallet(
ethAmount: ethers.BigNumberish,
l1Token: zkweb3.types.Address,
l1Token: zksync.types.Address,
tokenAmount: ethers.BigNumberish
) {
const newWallet = zkweb3.Wallet.createRandom().connect(this.web3Provider).connectToL1(this.ethProvider);
const newWallet = zksync.Wallet.createRandom().connect(this.web3Provider).connectToL1(this.ethProvider);

let ethBalance = await this.syncWallet.getBalanceL1();
expect(ethBalance.gt(ethAmount), 'Insufficient eth balance to create funded wallet').to.be.true;
Expand Down Expand Up @@ -111,6 +111,6 @@ export class Tester {
}

emptyWallet() {
return zkweb3.Wallet.createRandom().connect(this.web3Provider).connectToL1(this.ethProvider);
return zksync.Wallet.createRandom().connect(this.web3Provider).connectToL1(this.ethProvider);
}
}
3 changes: 1 addition & 2 deletions core/tests/snapshot-recovery-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"node-fetch": "^2.6.1",
"protobufjs": "^7.2.5",
"ts-node": "^10.1.0",
"typescript": "^4.3.5",
"zksync-web3": "^0.15.5"
"typescript": "^4.3.5"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { expect } from 'chai';
import fetch, { FetchError } from 'node-fetch';
import * as protobuf from 'protobufjs';
import * as zlib from 'zlib';
import * as zkweb3 from 'zksync-web3';
import fs, { FileHandle } from 'node:fs/promises';
import { ChildProcess, spawn, exec } from 'node:child_process';
import path from 'node:path';
Expand Down Expand Up @@ -111,26 +110,26 @@ describe('snapshot recovery', () => {
};

let snapshotMetadata: GetSnapshotResponse;
let mainNode: zkweb3.Provider;
let externalNode: zkweb3.Provider;
let mainNode: zksync.Provider;
let externalNode: zksync.Provider;
let externalNodeLogs: FileHandle;
let externalNodeProcess: ChildProcess;

let fundedWallet: zkweb3.Wallet;
let fundedWallet: zksync.Wallet;

before('prepare environment', async () => {
expect(process.env.ZKSYNC_ENV, '`ZKSYNC_ENV` should not be set to allow running both server and EN components')
.to.be.undefined;
mainNode = new zkweb3.Provider('http://127.0.0.1:3050');
externalNode = new zkweb3.Provider('http://127.0.0.1:3060');
mainNode = new zksync.Provider('http://127.0.0.1:3050');
externalNode = new zksync.Provider('http://127.0.0.1:3060');
await killExternalNode();
});

before('create test wallet', async () => {
const testConfigPath = path.join(process.env.ZKSYNC_HOME!, `etc/test_config/constant/eth.json`);
const ethTestConfig = JSON.parse(await fs.readFile(testConfigPath, { encoding: 'utf-8' }));
const mnemonic = ethTestConfig.test_mnemonic as string;
fundedWallet = zkweb3.Wallet.fromMnemonic(mnemonic, "m/44'/60'/0'/0/0").connect(mainNode);
fundedWallet = zksync.Wallet.fromMnemonic(mnemonic, "m/44'/60'/0'/0/0").connect(mainNode);
});

after(async () => {
Expand All @@ -151,7 +150,7 @@ describe('snapshot recovery', () => {
return output as GetSnapshotResponse;
}

async function getAllTokens(provider: zkweb3.Provider, atBlock?: number) {
async function getAllTokens(provider: zksync.Provider, atBlock?: number) {
const output = await provider.send('en_syncTokens', atBlock ? [atBlock] : []);
return output as TokenInfo[];
}
Expand Down
2 changes: 1 addition & 1 deletion core/tests/ts-integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"ts-jest": "^29.0.1",
"ts-node": "^10.1.0",
"typescript": "^4.3.5",
"zksync-ethers": "https://github.com/zksync-sdk/zksync-ethers#sb-old-sdk",
"zksync-ethers": "5.8.0-beta.5",
"elliptic": "^6.5.5"
}
}
2 changes: 1 addition & 1 deletion core/tests/ts-integration/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as ethers from 'ethers';
import * as zksync from 'zksync-ethers';
import { TestEnvironment } from './types';
import { Reporter } from './reporter';
import { L2_BASE_TOKEN_ADDRESS } from 'zksync-ethers/build/src/utils';
import { L2_BASE_TOKEN_ADDRESS } from 'zksync-ethers/build/utils';

/**
* Attempts to connect to server.
Expand Down
2 changes: 1 addition & 1 deletion core/tests/ts-integration/src/retry-provider.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as zksync from 'zksync-ethers';
import * as ethers from 'ethers';
import { Reporter } from './reporter';
import { TransactionResponse } from 'zksync-web3/src/types';
import { TransactionResponse } from 'zksync-ethers/build/types';

/**
* RetryProvider retries every RPC request if it detects a timeout-related issue on the server side.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as ethers from 'ethers';
import fetch from 'node-fetch';
import fs from 'fs';
import { deployContract, getContractSource, getTestContract } from '../../src/helpers';
import { sleep } from 'zksync-ethers/build/src/utils';
import { sleep } from 'zksync-ethers/build/utils';

// Regular expression to match ISO dates.
const DATE_REGEX = /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{6})?/;
Expand Down
2 changes: 1 addition & 1 deletion core/tests/ts-integration/tests/api/debug.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Token } from '../../src/types';

import * as zksync from 'zksync-ethers';
import { ethers } from 'ethers';
import { BOOTLOADER_FORMAL_ADDRESS } from 'zksync-ethers/build/src/utils';
import { BOOTLOADER_FORMAL_ADDRESS } from 'zksync-ethers/build/utils';
import fs from 'fs';

describe('Debug methods', () => {
Expand Down
10 changes: 6 additions & 4 deletions core/tests/ts-integration/tests/api/web3.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import { serialize } from '@ethersproject/transactions';
import { deployContract, getTestContract, waitForNewL1Batch, anyTransaction } from '../../src/helpers';
import { shouldOnlyTakeFee } from '../../src/modifiers/balance-checker';
import fetch, { RequestInit } from 'node-fetch';
import { EIP712_TX_TYPE, PRIORITY_OPERATION_L2_TX_TYPE } from 'zksync-ethers/build/src/utils';
import { EIP712_TX_TYPE, PRIORITY_OPERATION_L2_TX_TYPE } from 'zksync-ethers/build/utils';

// Regular expression to match variable-length hex number.
const HEX_VALUE_REGEX = /^0x[\da-fA-F]*$/;
const DATE_REGEX = /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{6})?/;
Expand Down Expand Up @@ -174,6 +175,7 @@ describe('web3 API compatibility tests', () => {
return;
}

const EIP1559_TX_TYPE = 2;
const amount = 1;
const erc20ABI = ['function transfer(address to, uint256 amount)'];
const erc20contract = new ethers.Contract(l2Token, erc20ABI, alice);
Expand All @@ -196,7 +198,7 @@ describe('web3 API compatibility tests', () => {
expect(tx1.l1BatchNumber).toEqual(expect.anything()); // Can be anything except `null` or `undefined`.
expect(tx1.l1BatchTxIndex).toEqual(expect.anything()); // Can be anything except `null` or `undefined`.
expect(tx1.chainId).toEqual(+process.env.CHAIN_ETH_ZKSYNC_NETWORK_ID!);
expect(tx1.type).toEqual(0);
expect(tx1.type).toEqual(EIP1559_TX_TYPE);

expect(receipt.l1BatchNumber).toEqual(expect.anything()); // Can be anything except `null` or `undefined`.
expect(receipt.l1BatchTxIndex).toEqual(expect.anything()); // Can be anything except `null` or `undefined`.
Expand All @@ -210,7 +212,7 @@ describe('web3 API compatibility tests', () => {
expect(txInBlock.l1BatchNumber).toEqual(expect.anything()); // Can be anything except `null` or `undefined`.
expect(txInBlock.l1BatchTxIndex).toEqual(expect.anything()); // Can be anything except `null` or `undefined`.
expect(txInBlock.chainId).toEqual(+process.env.CHAIN_ETH_ZKSYNC_NETWORK_ID!);
expect([0, EIP712_TX_TYPE, PRIORITY_OPERATION_L2_TX_TYPE]).toContain(txInBlock.type);
expect([0, EIP712_TX_TYPE, PRIORITY_OPERATION_L2_TX_TYPE, EIP1559_TX_TYPE]).toContain(txInBlock.type);
});
});

Expand Down Expand Up @@ -607,7 +609,7 @@ describe('web3 API compatibility tests', () => {
const from = new MockMetamask(alice);
const to = alice.address;
const web3Provider = new zksync.Web3Provider(from);
const signer = web3Provider.getSigner();
const signer = zksync.Signer.from(web3Provider.getSigner(), alice.provider);

// Check to ensure that tx was correctly processed.
const feeCheck = await shouldOnlyTakeFee(alice);
Expand Down
2 changes: 1 addition & 1 deletion core/tests/ts-integration/tests/contracts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ async function invalidBytecodeTestTransaction(
maxFeePerGas: gasPrice,

customData: {
gasPerPubdataByte: zksync.utils.DEFAULT_GAS_PER_PUBDATA_LIMIT,
gasPerPubdata: zksync.utils.DEFAULT_GAS_PER_PUBDATA_LIMIT,
factoryDeps,
customSignature: new Uint8Array(17)
}
Expand Down
Loading
Loading