Skip to content

Commit

Permalink
Merge branch 'oz-audit-sep-base' into library-fix-review
Browse files Browse the repository at this point in the history
  • Loading branch information
Raid5594 authored Dec 17, 2024
2 parents 5ca0ffd + 9b940ef commit d4af332
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 123 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/l1-contracts-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ jobs:
l2-contracts/artifacts-zk
l2-contracts/cache-zk
l2-contracts/typechain
l1-contracts/lib
- name: Run tests
working-directory: ./l1-contracts
Expand Down Expand Up @@ -162,6 +163,7 @@ jobs:
l2-contracts/artifacts-zk
l2-contracts/cache-zk
l2-contracts/typechain
l1-contracts/lib
- name: Install foundry zksync
run: |
Expand Down Expand Up @@ -217,9 +219,6 @@ jobs:
- name: Build L2 contracts
run: yarn l2 build

- name: Build L2 contracts
run: yarn l2 build

- name: Run tests
run: yarn l1 test --no-compile

Expand Down Expand Up @@ -283,6 +282,7 @@ jobs:
l2-contracts/artifacts-zk
l2-contracts/cache-zk
l2-contracts/typechain
l1-contracts/lib
- name: Run coverage
run: FOUNDRY_PROFILE=default yarn test:foundry && FOUNDRY_PROFILE=default yarn coverage:foundry --report summary --report lcov
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ decentralization. Since it's EVM compatible (Solidity/Vyper), 99% of Ethereum pr
or re-auditing a single line of code. ZKsync Era also uses an LLVM-based compiler that will eventually let developers
write smart contracts in C++, Rust and other popular languages.

This repository contains both L1 and L2 ZKsync smart contracts. For their description see the
[system overview](docs/overview.md).
This repository contains both L1 and L2 ZKsync smart contracts.

## Disclaimer

Expand Down
1 change: 0 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
The order of the files here only roughly represents the order of reading. A lot of topics are intertwined, so it is recommended to read everything first to have a complete picture and then refer to specific documents for more details.

- [Glossary](./glossary.md)
- [Overview](./overview.md)
- Contracts of an individual chain
- [ZK Chain basics](./settlement_contracts/zkchain_basics.md)
- Data availability
Expand Down
7 changes: 7 additions & 0 deletions l1-contracts/contracts/common/libraries/UnsafeBytes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ library UnsafeBytes {
}
}

function readUint128(bytes memory _bytes, uint256 _start) internal pure returns (uint128 result, uint256 offset) {
assembly {
offset := add(_start, 16)
result := mload(add(_bytes, offset))
}
}

function readUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256 result, uint256 offset) {
assembly {
offset := add(_start, 32)
Expand Down
Loading

0 comments on commit d4af332

Please sign in to comment.