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

build: add zksync unit tests to ci #246

Open
wants to merge 33 commits into
base: main
Choose a base branch
from

Conversation

uri-99
Copy link
Collaborator

@uri-99 uri-99 commented Apr 19, 2024

No description provided.

uri-99 and others added 30 commits March 26, 2024 10:45
* fix: read emited events in zksync tests

* fix: workaround for nonce used twice + hardhat not using network flag

* fix: test back to dockerizedNode mode

* refactor: Update contracts/zksync/test/main.test.ts

Co-authored-by: Santos Rosati <[email protected]>

* refactor: Update contracts/zksync/test/main.test.ts

Co-authored-by: Santos Rosati <[email protected]>

---------

Co-authored-by: Santos Rosati <[email protected]>
* feat: claim payment batch

* feat (ethereum): claim payment batch)

* fix (ethereum): add caller restrictions on claimPaymentBatch

* fix: call claim payment batch when batching from layer 1 + serialization issue

* fix: add missing CLAIM_PAYMENT_BATCH_NAME env variable to .env.test

* fix: set claim payment batch selector correctly

* test: permissons & missing order tests for batch

* refactor: use constants for ETH_USER address

* feat: emit event on claim payment batch

* refactor: rename _claimPaymentStarknet -> _verifyTransferExistsStarknet to make it more descriptive

* refactor (starknet): rename tests & remove commented code
* docs(mm-bot): improve mm deploy instructions
build(mm-bot): add deps target to makefile

* docs(mm-bot): set python version to 3.10
docs(mm-bot): copy deploy instructions to mm README.md
* feat: move ethereum submodules

* refactor: contracts/solidity to contracts/ethereum

* refactor: contracts/cairo to contracts/starknet

* feat(wip): zksync escrow contract

* fet(wip): compile+deploy contract

* feat: yarn compile + yarn deploy working for Escrow.sol

* feat: zksync make targets for clean, build, deploy

* feat: Escrow.sol is ownable, upgradeable, pausable. Bugs with ownable

* feat(wip): make escrow.sol UUPS Proxy upgradeable

* fix: make deps

* remove: upgradeable from escrow.sol, will be implemented in a later commit

* feat: set_order(Order) on escrow.sol

* feat: add: getters, setters, pause, unpause

* feat: untested l2 handler claim_payment

* fix: removed unused var from l2 handler

* feat(wip): claimPaymentZKSync + refactor variables

* feat: chainID on TransferInfo Struct

* feat: claimPaymentZKSync advances + deploy_and_connect_zksync make target script

* feat: claimPaymentZKSync advances, only missing "byes data" for msg to L2

* feat: msg to L2, UNTESTED

* feat: add era-contracts in PaymentRegistry lib

* fix: .sol to version compatible with era-contracts

* feat(wip): call to L2, having trouble building calldata

* refactor: separate claimPaymentZKSync from claimPayment(starknet)

* fix: adapted previous test to new yab.init() and yab.transfer() formats

* fix: ZKSync messaging (mailbox) variable name

* feat: make zksync-deploy + make zksync-deploy-and-connect

* feat: zksync init after deploy

* fix: sending eth funds to escrow

* test(wip): yarn test init (trying to refactor to forge test)

* chore: forge init

* forge install: forge-std

v1.7.6

* remove: zksync using forge, zkforge is not ready for usage

* test: yarn hardhat test working

* test: run them on local dockerized blockchains (L1 and L2)

* refactor: escrow.sol set_order no longer recieves amount, + fix event set order

* test: initial setOrder test

* test(wip): using L1 for more tests

* test(wip): deploying PaymentRegistry in local blockchain for zksync tests

* fix: add packageManager in package.json + auto-generated file in .gitignore

* test: separated integration test from unit tests

* test: ZKSync, Pausable and Ownable unit tests

* feat: add zksync-test to make test

* fix: appropriate name for sol tests (naame.t.sol)

* test: fix old tests to new version of PaymentRegistry

* test: refactor test and file names for better understanding and simpler adding new tests

* test: started unit tests of PaymentRegistry for ZKSync cases

* remove: old generated files from upgradeable ZKSync

* test: PaymentRegistry unit tests for ZKSync

* test: add mock calls to ZKSync mailbox

* test: add PaymentRegistry ACL tests for ZKsync

* test: add TransferNotFound for wrong chain and wrong tx id

* remove: 'amount' parameter on PaymentRegistry.transfer

* feat: add target make zksync-connect

* feat: L1 -> L2 message arrives. new bug: from_address != L1 contract

* feat: correct selector for L1-L2

* feat(wip): apply mask for L1->L2

* fix: update .gitignore to help branch-switching , temporary until PR#170 is resolved

* test: added test for contract variables setter functions

* test: add pending order test

* test: PaymentRegistry setters ACL

* test: set and get for PaymentRegistry setter functions

* test: add assert in escrow test to make an extra check transfer has transferred funds

* refactor: removed unnecesarry comments

* refactor: removed unnecesarry vars from escrow (native_token_eth_in_zksync, mm_ethereum_wallet)

* feat: new make targets to deploy: ETH+ZKSYNC or ETH+SN

* fix: make deploys for eth and zksync

* feat: add display info after deploy-eth-and-zks

* docs: added some details to zksync/readme.md

* feat: integration test deploys eth in local, using same deploy script as non-tests

* fix: tests ZKSync were failing to old escrow.init() signature

* fix: changed ZKSyncMailbox to appropriate ZKSyncDiamondProxy

* test: removed tests of removed functions

* fix: removed wrong todo comments

* feat: deploy ZKS Escrow on devnet

* feat: do setOrder on integration test

* feat: do transfer in integration test

* feat(wip): do claimPayment on integration test + refactor .env vars usage for tests

* test: detail advances on integration test

* perf: gas usage optimization on PaymentRegistry

* fix: env.example ZKSYNC_DIAMOND_PROXY_ADDRESS

* fix(wip): new diamondProxy address for integration tests. cant execute a function but there is a contract

* test: add --gas-report to eth-test + cast call to verify address is a contract in set_order.sh

* perf: apply keccak performance refactor to transfer and claimPaymentZKSync

* test: apply changes to tests for this performance upgrade

* fix: add diamond_proxy_address to CI for eth/deploy

* fix: CI correct export of diamondProxy var

* fix: CI set_starknet_escrow call

* fix: CI set SN claim_payment_selector

* test: removing onlyOwner to setStarknetEscrowAddress to see if CI fixes

* fix: adding onlyOwner back to setSNEscroAddress. removing it fixed that part of CI but dont know why

* fix: CI transfer.sh

* feat: apply optimization to SN claimPayment

* fix: claimPayment for SN

* fix: (wip) CI transfer

* fix(wip): removed onlyOwnerOrMM restriction to transfer to see if it runs OK on CI

* fix: transfer signature needed uint8 for chainid, not u256

* fix: claimPayment on CI

* fix: SN CI does transfer in CI chain

* test: finished aligning unit tests affected by this perf

* perf(wip): applying change of lowering L1->L2 message size in SN

* test(wip): fixing cairo unit tests to recent perf upgrade

* test(wip): fix test_fail_random_eth_user_calls_l1_handler SN unit test

* test(wip): fixing SN unit tests, now test_fail_call_l1_handler_while_paused

* test: finished SN unit tests fixing

* removed: temporal disabling in gitignore of cairo/x and solidity/x folders

* refactor: set chain_sn variable in transfer call from github workflow

* feat: now using uint8 as 8 booleans in transfers mapping in PaymentRegistry

* test: unit tests of previous feat

* fix: make eth-and-sn-deploy

* refactor: changed "SN_RPC_URL" to appropriate variable name "STARKNET_RPC"

* remove: id->uint8 feature, now back to id->bool

* test(wip): adding L1->L2 max amount unit test

* Fix: env vars from merge conflict

* fix: add export ZKSYNC_DIAMOND_PROXY_ADDRESS in CI

* fix: change file names in CI

* fix: various fixes for CI, made previously but stepped over in merge

* fix: env var names in CI

* fix: another .env var in CI

* fix: data type in transfer in CI

* fix: data type in claimPayment CI

* remove: optimization about lowering the size of payload in SN L1->L2 claimPayment. it was not correct

* fix(wip): reverting changes made to adapt SN tests to payload size optimization

* fix(wip): reverting changes made to SN tests, done test_Escrow_allowance

* fix(wip): reverting changes made to SN tests, now done test_escrow_pause.cairo

* Squashed commit of the following:

commit 52e1d91
Author: Urix <[email protected]>
Date:   Tue Mar 19 14:43:43 2024 -0300

    fix: data type in claimPayment CI

commit e4c8d02
Author: Urix <[email protected]>
Date:   Tue Mar 19 14:41:02 2024 -0300

    fix: data type in transfer in CI

commit c9a0d78
Author: Urix <[email protected]>
Date:   Tue Mar 19 14:36:30 2024 -0300

    fix: another .env var in CI

commit 2686e5e
Author: Urix <[email protected]>
Date:   Tue Mar 19 14:31:45 2024 -0300

    fix: env var names in CI

commit 218b7be
Author: Urix <[email protected]>
Date:   Tue Mar 19 14:24:27 2024 -0300

    fix: various fixes for CI, made previously but stepped over in merge

commit 09e35e2
Author: Urix <[email protected]>
Date:   Tue Mar 19 14:13:31 2024 -0300

    fix: change file names in CI

commit 4f4e72e
Author: Urix <[email protected]>
Date:   Tue Mar 19 14:09:02 2024 -0300

    fix: add export ZKSYNC_DIAMOND_PROXY_ADDRESS in CI

commit bf922b8
Author: Urix <[email protected]>
Date:   Tue Mar 19 14:04:11 2024 -0300

    Fix: env vars from merge conflict

commit 432ec12
Merge: 9d5f0ea 40dc365
Author: Urix <[email protected]>
Date:   Tue Mar 19 13:57:06 2024 -0300

    Merge branch 'main' into 108-feat-implement-escrow-contract-in-solidity-for-zksync

commit 40dc365
Author: urimihura <[email protected]>
Date:   Mon Mar 18 10:01:48 2024 -0300

    Refactor: rename contracts/x , cairo to starknet and solidity to ethereum (#170)

    * feat: move ethereum submodules

    * refactor: contracts/solidity to contracts/ethereum

    * refactor: contracts/cairo to contracts/starknet

    * docs: remove unused README.md

    ---------

    Co-authored-by: JuArce <[email protected]>

commit a456035
Author: Julian Arce <[email protected]>
Date:   Tue Feb 27 17:35:13 2024 -0300

    chore: divide message fee value by 100 (#177)

commit 79f99d9
Author: Julian Arce <[email protected]>
Date:   Mon Feb 26 14:22:45 2024 -0300

    refactor: standardize env files names (#175)

    * refactor: standardize env file names

    * docs: update docs with new env variables names

    * fix(integration-test.yml): use anvil env names for Starknet Messaging Contract

    * fix: use correct starknet wallet address name

commit b5207b5
Author: Julian Arce <[email protected]>
Date:   Mon Feb 26 13:55:54 2024 -0300

    docs: move all documentation to docs directory (#174)

    * docs(SUMMARY.md): add main sections

    * docs: add starknet wallet setup

    * docs: add mm bot architecture

    * fix(docs): missing item number

    * docs(mm-bot): add introduction
    docs(mm-bots): add architecture
    docs(mm-bots): add deploy guide

    * docs(mm-bot): do not mention cloud provider

    * docs(mm-bot): remove starknet wallet setup

    * docs(mm-bot): add physical view image

    * docs: add SUMMARY sections

    * docs: remove mm bot docs from mm-bot directory

    * docs: rename introduction to README

    * docs: add README and how_it_works to about_yab section

    * fix(SUMMARY.md): missing .md extension

    * docs: add contracts sections

    * docs(how_it_works.md): add risks

    * docs(about_yab/README.md): add index

    * fix(contracts/README.md): use letters instead of numbers

    * chore: check if symlink works in github

    * Revert "chore: check if symlink works in github"

    This reverts commit f4c8fa1.

    * chore: remove contracts README.md

    * chore: add symlink to contracts README.md

    * Revert "chore: add symlink to contracts README.md"

    This reverts commit 1008a02.

    * chore: move README outside about_yab directory

    * chore: remove main README.md

    * docs: set correct links to sections

    * docs: set README as main section

    * docs(README.md): set correct link to image

    * docs: add features section

    * docs: remove unused assets

    * docs(about): format and language check
    docs(about-index): remove deprecated align property and use grid instead

    * docs(about): formatting issues with how it works section and switch grid to flex for image

    * docs(about): switch image to margins from flex

    * docs: rename "how it works" to "how does it work"

    * docs: rename "how it works" to "how does it work"

    * docs: add missing .md extension

    ---------

    Co-authored-by: Gian <[email protected]>

commit 452f634
Author: urimihura <[email protected]>
Date:   Mon Feb 26 11:05:29 2024 -0300

    fix: change order or variable setting, following CEI pattern (#173)

commit f51428f
Author: Julian Arce <[email protected]>
Date:   Fri Feb 23 17:23:08 2024 -0300

    build(production-workflow.yml): do not mention cloud provider (#164)

commit 2e2ba0f
Author: Julian Arce <[email protected]>
Date:   Fri Feb 23 17:22:55 2024 -0300

    chore: and env files to gitignore (#165)

commit 1e15771
Author: Julian Arce <[email protected]>
Date:   Fri Feb 23 17:22:41 2024 -0300

    docs(starknet_wallet_setup.md): add starknet accounts (#166)

* fix: from merge, variable name in CI

* fix: from merge, variable name in CI

* refactor: remove repeated code line

* refactor: \n at EOF + STARKNET_CHAIN_ID variable name

* refactor: style + uncommented existing code

* refactor: Update contracts/ethereum/.env.example

Co-authored-by: Julian Arce <[email protected]>

* feat: add new make target with eth-test-gas-report

* fix: rolled back eth/.env.test file

* remove: unnecesarry comment

* remove: wrong comment

* refactor: add \n at EOF

* fix: print with colors using printf in SN/deploy.sh

* fix: print with printf in SN/deploy.sh

* fix: make sn-deploy-and-connect target

* refactor: make targets to && \ format, removed .ONESHELL format

* fix: wrongly named "ETH_RPC_URL" and "ETH_PRIVATE_KEY" env variables

* refactor: TransferInfo setting in transfers[index] rolled back to previous version

* refactor: PRIVATE_ADDRESS var changed to PRIVATE_KEY

* refactor: rolled back SKIP_VERIFY variable in eth/deploy.sh

* fix: ${{vars.ETHEREUM_RPC}} in CI to access env var

* refactor: style, \n in EOF

* refactor: style add \n at EOF

* refactor: remove some comments about to-dos, as they were set as Issues in github

* refactor(mm-bot): implement new storage model for transfers and claims. use address instead of uint256 for addresses
chore: update PaymentRegistry.json

* fix: set address type instead of uint256 for destAddress

---------

Co-authored-by: Julian Arce <[email protected]>
* hotfix: run cicd on pushes to develop
* feat: claim payment batch

* feat (ethereum): claim payment batch)

* fix (ethereum): add caller restrictions on claimPaymentBatch

* fix: call claim payment batch when batching from layer 1 + serialization issue

* fix: add missing CLAIM_PAYMENT_BATCH_NAME env variable to .env.test

* fix: set claim payment batch selector correctly

* feat (zksync): batching for claim payment

* test: failing cases for claimPaymentBatchZKSync

* test (zksync): uncomment test-suite

* test (zksync): claim payment batch
* refactor: move SN/change_pause_state to SN/scripts folder

* refactor: move SN/upgrades.sh to SN/scripts folder

* refcator: move SN/deploy.sh to SN/scripts/deploy.sh

* fix: change_pause_state ande upgrade make targets
* remove: unused var native_token_eth_in_zksync from test/urils

* test(wip): making a zksync test with a mocked call from L1 paymentRegistrry

* test: mock call from paymentRegistry on zksync unit test

* test: added basic claim_payment unit tests for zksync

* refactor: reorder zksync unit tests

* feat: add make zksync-test-in-memory target

* fix: add test-in-memory in zksync/package.json

* refactor: call to claim_batch test, now from paymentRegistry

* refactor: remove unused comment

---------

Co-authored-by: Santos Rosati <[email protected]>
…it (#191)

* feat: moved SN set_claim_payment to paymentRegistry.init()

* feat: add ZKSYNC_CLAIM_PAYMENT_SELECTOR to .env

* feat: add ZKSYNC_CLAIM_PAYMENT_SELECTOR parameter to deploy script

* refactor: add ZKSYNC_CLAIM_PAYMENT_SELECTOR and removed EscrowAddress from init

* fix: adapt tests to new changes

* refactor: removed old comment

* fix: add ZKSYNC_CLAIM_PAYMENT_SELECTOR in CI

* refactor: change marketMaker for MM_ETHEREUM_WALLET_ADDRESS in tests and deploy script

* remove: order_id=0 in initialize,

* fix: add STARKNET_CLAIM_PAYMENT_BATCH_SELECTOR to .envs

* fix: add STARKNET_CLAIM_PAYMENT_BATCH_SELECTOR to CI

* refactor: rename STARKNET_CLAIM_PAYMENT_BATCH_SELECTOR variable + removed unused snEscrowAddress variable

* fix: revert removing unused snEscrowAddress variable in test to fix CI

* fix: change marketMaker to MM_ETHEREUM_WALLET_ADDRESS to fix tests

* refactor: removed unused snEscrowAddress on tests

* fix: add ZKSYNC_CLAIM_PAYMENT_BATCH_SELECTOR to .envs

* feat: zksync claim batch now in init

* feat: add ZKSYNC_CLAIM_PAYMENT_BATCH_SELECTOR to CI

* test: fix, add ZKSYNC_CLAIM_PAYMENT_BATCH_SELECTOR in eth tests

* feat: add setZKSyncEscrowClaimPaymentBatchSelector to PaymentRegistry

* refactor: remove unused variable

Co-authored-by: Santos Rosati <[email protected]>

---------

Co-authored-by: Santos Rosati <[email protected]>
* refactor: change chainId from enum to unit128

* feat: add variables in .envs

* feat: use .env variables in Deploy.s.sol when initializing paymentRegistry

* refactor: tests to new chainId data types

* refactor: add comments for easier understanding

* refactor: fix EIP number in comment

* fix: add chainIds in CI

* fix: chainId data type in CI

* test: refactor, using STARKNET_CHAIN_ID var instead of value

* feat (mm-bot): read Starknet and ZKSync Chain ID actual values from .env

* fix: add new line

---------

Co-authored-by: Santos Rosati <[email protected]>
Co-authored-by: Julian Arce <[email protected]>
* docs: splic docs/contracts/ecrow to escrow.md (general escrow idea), + starknet.md + zksync.md (our specific implementations of Escrow)

* docs(wip): adding ZKSync to deploy.md

* docs: ZKSync docs on deploy.md, + adding our other make targets

* docs: removed extra repeated 'recap' paragraph

* docs: fix link and add todo of ZKSync upgradeable

* docs: add ZKSync in faq.md

* docs: more ZKSync readme to docs/

* docs: tidy up ZKSyncV2.md

* docs: remove old tests.md file

* docs: add selector generating on zksync docs

* docs: using new ZKSync selector generation + refactor "Lx smart contract" to "Payment Registry" or "Escrow"

* docs: add missing ".sh" + remove "ZK" when talking about L2 rollups

* docs: merge ZKSync and ZKSyncV2 to a single .md file

* docs: add info about project structure on docs/contracts/escrow/starknet.md

* docs: add /scripts in starknet.md

* docs: move SN wallet setup.md to docs folder

* docs: beautify starknet_wallet_setup.md

* docs: small fixes from PR comments

* docs: add claim_batch env var to deploy.md

* docs: removed extra indentations

* docs: add claim_payment_batch to contracts/ sn.md + zksync.md

* docs: update summary.md

* docs: move sn_wallet_detup to sn folder

* fix: docs, typo in starkli

* docs: update SUMMARY.md

---------

Co-authored-by: JuArce <[email protected]>
* fix: changed venve python version to 3.10

* refactor: remove todo comment

* refactor: unremove comment (will remove in appropriate PR)

---------

Co-authored-by: Julian Arce <[email protected]>
* refactor: claimPayment to claimPaymentStarknet

* fix: update PaymentRegistry abi in mm-bot
* feat: add from_address column to orders table

* feat: add from_address to order model

* feat: add from_address to mmevent class

* chore: add hexbytes dependency

* feat: add zksynclog model

* feat: add from_address to zksync and starknet get_order methods

* fix: change from_address column from varchar(64) to varchar(66)

* fix: move from_address underneath origin_network

* fix: from address after origin in __str__ method

* fix: change comment to standard python convention

* fix: move external import

* feat: parallelize get_transaction in starknet

* fix: add docs comment in get_order_events from starknet

* feat: parallelize get_transaction in zksync

* fix: remove address

* fix: assign event.from_address directly

* fix: assign task directly in starknet

* fix: assign task directly in zksync

* fix: swap event and transaction in for loop in starknet

* fix: swap log and transaction in for loop in zksync

* refactor: change for loop to asyncio.gather in starknet
* fix: change chain_id from uint8 to uint128

* feat: add long range orders processor for zksync

* feat: add catch_up_orders_processor

* feat: add long_range_orders_processor

* refactor: long range orders processor initializer order
* fix: remove first block insert from schema

* feat: add initialize blocks function
* feat: fee estimate on ZKSync (WIP)

* feat (zksync): estimate message fee & gas limit

* refactor: remove debug print

* refactor: fallback error message on estimate_gas_limit

Co-authored-by: Julian Arce <[email protected]>

---------

Co-authored-by: Julian Arce <[email protected]>
* chore(mm-bot): update claim payment fees for each L2

* chore(mm-bot): add comment to update gas values
* docs(mm-bot): update class diagrams

* docs(mm-bot): update architecture diagrams

* docs(mm-bot): update architecture description

* docs(mm-bot): update scenarios

* docs(mm-bot): improve README.md

* docs(mm-bot): update diagrams from review comments

* docs(mm-bot): update physical_view from review comments

* docs(mm-bot): update order_processing.svg from review comments

* docs(mm-bot): pply suggestions from code review

Co-authored-by: urimihura <[email protected]>
Co-authored-by: Santos Rosati <[email protected]>

* docs(mm-bot): update architecture.md

* docs(mm-bot): apply suggestions from code review

Co-authored-by: Uriel Mihura <[email protected]>

* docs(mm-bot): apply suggestions from review

* docs: apply suggestions from code review

Co-authored-by: Uriel Mihura <[email protected]>

---------

Co-authored-by: urimihura <[email protected]>
Co-authored-by: Santos Rosati <[email protected]>
* fix: transfer refactored to new PaymentRegistry.tranfer() version

* fix: added eth/.env.test missing variables

* fix: refactored claimPaymentZKSync to latest version

* fix: L1->L2 message on zksync integration test, was reading wrong env var

* refactor: remove old comments

* feat: add files to CI, wip CI development

* feat: zksync-integration-test.yml

* feat(wip): send Dockerized L1-L2 to bg, + fixed zksync setup

* test(wip): trying to execute make target to avoid migrating whole process

* test(wip): trying to execute make target

* fix: make target name

* fix: add zksync/test/.env.test to repo (was gitignored)

* fix: comment make install-eth-foundry

* fix: run make target on same CI step as start dockerized L1L2

* fix: add sleep to let docker set up

* fix: more wait time + skip_verify on test

* fix: add fake etherscan_api_key

* fix(wip): test deploy without --verify

* fix: undo previous remove

* add ETHERSCAN_API_KEY in CI

* fix: (temp) lower sleep in run Dockerized L1-L2

* fix: add more explicit env var sourcing in CI

* fix: CI run Docker command

* feat: new CI.env to make source .env in CI

* fix: .env file path

* refactor: echos during CI to visualize progress + removed extra . file sourcing

* fix: make target refactored for CI

* remove: commented setup in CI

* fix: viewing if ETH_RPC var is read correctly

* fix: trying to correctly source .env in CI

* fix: change source to .

* fix: source .env worked, trying whole CI test again

* fix: added ETHERSCAN_API_KEY in CI again

* feat: redirect docker output to /dev.null

* fix: add . to deploy.s.sol to see if it gets its env vars as it should

* fix: correctly redirect output to dev/null

* fix: exporting vars in deploy.sh to make seploy.s.sol get env vars

* fix: build in make-integration-ci

* fix: zksync-integration-ci make target

* fix: prefunded deployer ZKSync wallet private key in CI

* fix: increment CI sleep to let docker setup correctly

* fix: more sleep in ZKSync CI

* refactor: run docker at the beggining of CI

* refactor: remove build from make target, added directly to ci

* test(wip): CI cheching if docker runs parallely

* fix: fixing dockerized setup, geth is not starting

* feat: read ZKSYNC_DIAMOND_PROXY_ADDRESS from docker ./start.sh output

* fix: remove ZKSYNC_DIAMOND_PROXY_ADDRESS from .env

* fix: re-trigger CI, github actions had an outage

* fix: CI export diamond proxy from ./start.sh

* fix: better prints in CI to view if new technique works

* fix: more sleep to give time to ./start to create diamond proxy

* test: in CI if another step can read a previously generated step's file

* test: reading files in CI environment

* fix: move to local-setup dir in the other target

* feat: integration test runner reads ZKSYNC_DIAMOND_PROXY_ADDRESS from log file

* fix: tuning env var reading

* refactor: changed prefunded account for deployments

* refactor: uncomment line for debugging failed tx

* fix: more time so ./start funds initial wallets

* refactor: debugging ZKSync deploy

* fix: zksync netowkr deploying

* fix: if test==true in deploy.sh zksync

* fix: use alternative operator that should work in CI

* fix: change --chain to --rpc in zksync-cli usage

* feat: add node in ci for zksync-cli

* fix: debugging set_order.sh in ZKSync CI, npx having issued

* fix: set --gas-price in L1 transfer

* fix: add --gas-price to claim_payment (worked on transfer)

* feat: wrapping up claim_payment

* feat: add assert.sh at the end of CI

* fix: assert.sh in CI

* fix: remove decimals from eth get balance

* fix(wip): asseert.sh values at the end of CI

* feat: save all balances during zksync integration test process

* refactor: format of saved variables

* feat: set assert values

* refactor: tidy .yml

* refactor: tidy up comments and prints for PR

* refactor: clean up code

* refactor: assert tidy + .env pub key of MM L1

* fix: new correct expected assert values

* refactor: tuning assert.sh values

* fix: tuning assert.sh

* fix: zksync values in wei

* fix: separated deployer from user/mm addresses

* fix: BALANCE_MM_L2_AFTER_CLAIMPAYMENT takes logical value

* refactor: change npx wallet balance to cast balance

* fix: overflow on BALANCE_MM_L2_AFTER_CLAIMPAYMENT in assert

* refactor: use vars in assert

* refactor: mm zksync has no initial funds

* refactor: remove () in BALANCE_MM_L2_AFTER_CLAIMPAYMENT in assert

* fix: exit 0 at the end of assert

* refactor: small clean un code and comments

* refactor: move integratio test executor files to .githubb/workflows folder

* refactor: removed comment

* refactor: change log formats

* refactor: eth for logs, wei for asserts

* refactor: remove claimPayment tx logs

* refactor: wei or eth comments + set_order logging

* refactor: CI logs with less \n

* refactor: remove 'asserting values' echo in integration ci

* refactor: move some export vars from deploy.sh to zksync-integration.yml

* fix: checking if current CI declaration of MM_ETHEREUM_WALLET_ADDRESS is compatible with this CI test

* refactor: Update .github/workflows/zksync-scripts/claim_payment.sh

Co-authored-by: Santos Rosati <[email protected]>

* refactor: removed commented lines

* fix(wip): print docker output to check why CI has broken

* fix: git clone a specific stable commit of local-setup.git

* fix: use stable version of dockerized local-node

* fix: changed folder name to cd after git clone

* refactor: finished, removing debug prints

---------

Co-authored-by: Santos Rosati <[email protected]>
@uri-99 uri-99 linked an issue Apr 19, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

build: add ZKSync unit tests to CI
4 participants