Skip to content

Commit

Permalink
Add utils (#3)
Browse files Browse the repository at this point in the history
* add ABI files and some types and do few naming and formatting

* add .history to .gitignore

* add some util functions

* update a test

* fix spelling

* tiny renaming

* add unit test and apply padding fixes + organize test files

* move constants to a separate file

* add some utils constants and types

* update web3js version

* fix and test the signature validation function

* fix and add a test case but still need investigation

* add contracts inside the plugin instance

* tiny fix

* eip712 class

* eip712

* remove tx type

* fix tests

* all tests covered

* fixes

* remove unnecessary things

* fix

* use baseTransaction for signing

* latest version web3js

* test

* fix tests

* test

* fix tests

* fix to test network

* [DRAFT] MS2 (#11)

* add the draft for `Web3ZkSync`

* add a very early draft for `ZKSyncWallet`

* apply lint:fx

* add very early draft for AdapterL1 and AdapterL2

* fix

* Adapters, zk l2, zk l1

* add 1 unit test for Web3ZkSyncL2

* fix build

* fix a test

* added test file and a method with a TODO

* Fix tests. implement Wallet

* tiny fix and apply lint:fix

* deposit + withdraw

* add wallet methods

* few code fixes to wallet2.test.ts and apply lint:fix

* fix build

* apply lint:fix

* populate transaction, sign, send refactor

* fix withdraw and deposit

* fix tests

* apply lint:fix

* add gasLimit

* fixes

* fixes and tests

* update fixtures

* fix wallet. tests

* feat: enhance plugin context (#20)

* enhance plugin context

* enhance plugin contracts init

* enhance plugin contracts init and add a test

* ensure the correct provider used inside the plugin

* revert a draft change

* tiny to fix provider usage at plugin

* link to a web3.js issue

* pre deploy state

* fix tests

* fix

* add env

* test

* secret to env

* test

* test

* use envs

* test

* test

* test

* test var

* test

* test

* fix

* move web3 to dependencies

* fix web3 version compatibility

* apply yarn lint:fix

* fix version

* v1.0.0-alpha.0

* ignore file

---------

Co-authored-by: Oleksii Kosynskyi <[email protected]>

---------

Co-authored-by: Oleksii Kosynskyi <[email protected]>
  • Loading branch information
Muhammad-Altabba and avkos authored Jul 17, 2024
1 parent 9e7025a commit 4b5d064
Show file tree
Hide file tree
Showing 51 changed files with 16,796 additions and 796 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
test:
strategy:
matrix:
node: [18, 20]
node: [20]
name: Install and test
runs-on: ubuntu-latest
steps:
Expand All @@ -17,4 +17,5 @@ jobs:
node-version: ${{ matrix.node }}
cache: yarn
- run: yarn install
- run: yarn test
- run: yarn build
- run: export PRIVATE_KEY=${{secrets.PRIVATE_KEY}} && yarn test
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules
lib
lib
.history
.idea
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
.prettierrc.json
.prettierignore
*.log
.idea

coverage/
benchmark/
Expand Down
92 changes: 49 additions & 43 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,50 @@
{
"name": "web3-plugin-zksync",
"version": "0.1.5",
"description": "web3.js plugin for ZkSync",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"homepage": "https://github.com/web3/web3-plugin-zksync#readme",
"bugs": {
"url": "https://github.com/web3/web3-plugin-zksync/issues"
},
"scripts": {
"lint": "eslint '{src,test}/**/*.ts'",
"build": "tsc --project tsconfig.build.json",
"test": "jest --config=./test/jest.config.js"
},
"contributors": [
"ChainSafe <[email protected]>"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "git+ssh://[email protected]/web3/web3-plugin-zksync.git"
},
"dependencies": {
"hardhat": "^2.19.4",
"web3-utils": "^4.1.1"
},
"devDependencies": {
"@chainsafe/eslint-config": "^2.1.1",
"@types/jest": "^29.5.11",
"@types/node": "^20.11.10",
"eslint": "8.56.0",
"jest": "^29.7.0",
"jest-extended": "^4.0.2",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",
"typedoc": "^0.25.13",
"typescript": "^5.3.3",
"web3": "^4.4.0"
},
"peerDependencies": {
"web3": ">= 4.0.3"
}
}
"name": "web3-plugin-zksync",
"version": "1.0.0-alpha.0",
"description": "web3.js plugin for ZkSync",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"homepage": "https://github.com/web3/web3-plugin-zksync#readme",
"bugs": {
"url": "https://github.com/web3/web3-plugin-zksync/issues"
},
"scripts": {
"lint": "eslint '{src,test}/**/*.ts'",
"lint:fix": "eslint '{src,test}/**/*.ts' --fix",
"build": "tsc --project tsconfig.build.json",
"test": "jest --config=./test/jest.config.js"
},
"contributors": [
"ChainSafe <[email protected]>"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "git+ssh://[email protected]/web3/web3-plugin-zksync.git"
},
"dependencies": {
"ethereum-cryptography": "^2.1.3",
"hardhat": "^2.19.4",
"web3": "4.10.1-dev.1436228.0",
"web3-core": "4.5.1-dev.1436228.0",
"web3-eth-abi": "^4.2.2",
"web3-eth-accounts": "^4.1.2",
"web3-eth-contract": "4.5.1-dev.1436228.0",
"web3-types": "1.7.1-dev.1436228.0",
"web3-utils": "4.3.1-dev.1436228.0"
},
"devDependencies": {
"@chainsafe/eslint-config": "^2.1.1",
"@types/jest": "^29.5.11",
"@types/node": "^20.11.10",
"eslint": "8.56.0",
"jest": "^29.7.0",
"jest-extended": "^4.0.2",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
},
"peerDependencies": {
"web3": ">= 4.0.3"
}
}
Loading

0 comments on commit 4b5d064

Please sign in to comment.