Skip to content

Commit

Permalink
test: add unit test for util.checkBaseCost
Browse files Browse the repository at this point in the history
  • Loading branch information
WillXing committed Jan 7, 2024
1 parent 659d6a9 commit c52801c
Show file tree
Hide file tree
Showing 32 changed files with 3,330 additions and 4,759 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
commits:
name: Check commits
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -45,4 +46,28 @@ jobs:
npx commitlint \
--from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} \
--to ${{ github.event.pull_request.head.sha }} \
--verbose
commits-fork:
name: Check commits from forks
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Install dependencies
run: npm install -g @commitlint/cli @commitlint/config-conventional
- name: Configure
run: |
echo 'module.exports = {"extends": ["@commitlint/config-conventional"]}' > commitlint.config.js
- name: Validate
run: |
git fetch origin "+refs/pull/${{ github.event.pull_request.number }}/head:refs/pull/${{ github.event.pull_request.number }}/head"
git checkout "refs/pull/${{ github.event.pull_request.number }}/head"
npx commitlint \
--from HEAD~${{ github.event.pull_request.commits }} \
--to HEAD \
--verbose
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 🚀 zksync-ethers JavaScript SDK 🚀

![Era Logo](https://github.com/matter-labs/era-contracts/raw/main/eraLogo.svg)

In order to provide easy access to all the features of zkSync Era, the `zksync-ethers` JavaScript SDK was created,
which is made in a way that has an interface very similar to those of [ethers](https://docs.ethers.io/v6/). In
fact, `ethers` is a peer dependency of our library and most of the objects exported by `zksync-ethers` (
Expand Down Expand Up @@ -46,8 +48,8 @@ The complete examples with various use cases are available [here](https://github
import { Provider, utils, types } from "zksync-ethers";
import { ethers } from "ethers";

const provider = Provider.getDefaultProvider(types.Network.Goerli); // zkSync Era testnet (L2)
const ethProvider = ethers.getDefaultProvider("goerli"); // goerli testnet (L1)
const provider = Provider.getDefaultProvider(types.Network.Sepolia); // zkSync Era testnet (L2)
const ethProvider = ethers.getDefaultProvider("sepolia"); // Sepolia testnet (L1)
```

### Get the latest block number
Expand Down Expand Up @@ -115,7 +117,7 @@ const withdrawal = await wallet.withdraw({

## 🤖 Running tests

In order to run test you need run [local-setup](https://github.com/matter-labs/local-setup) on your machine.
In order to run test you need to run [local-setup](https://github.com/matter-labs/local-setup) on your machine.
For running tests, use:

```shell
Expand Down
Loading

0 comments on commit c52801c

Please sign in to comment.