From 19f9c8e496bd024facd05e02bb6aa5db74b1599d Mon Sep 17 00:00:00 2001 From: Corey Rice Date: Tue, 28 Nov 2023 12:06:26 -0300 Subject: [PATCH 1/2] feat: add README.md --- README.md | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 117 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e253158..26a4706 100644 --- a/README.md +++ b/README.md @@ -1 +1,117 @@ -# token-bridge \ No newline at end of file +[![GitHub Actions](https://github.com/VenusProtocol/token-bridge/actions/workflows/cd.yaml/badge.svg)](https://github.com/VenusProtocol/token-bridge/actions/workflows/cd.yaml) [![GitHub Actions](https://github.com/VenusProtocol/token-bridge/actions/workflows/ci.yaml/badge.svg)](https://github.com/VenusProtocol/token-bridge/actions/workflows/ci.yaml) + +# Development + +## Prerequisites + +- NodeJS - 18.x + +- Solc - v0.8.13 (https://github.com/ethereum/solidity/releases/tag/v0.8.13) + +## Installing + +``` + +yarn install + +``` + +## Linting and code formatting + +Linting is done using eslint for typescript and solhint for solidity. Prettier is used to format solidity and typescript files. + +To check linting and formatting on all files run: + +```sh +$ yarn lint +``` + +Linting command can be run with the fix flag to fix eligible errors automatically + +```sh +$ yarn lint:sol --fix +$ yarn lint:ts --fix +``` + +To pretty all files run: + +```sh +$ yarn prettier +``` + +## Run Tests + +``` + +npx hardhat test + +``` + +- To run fork tests add FORK=true, FORKED_NETWORK and one ARCHIVE_NODE var in the .env file. + +## Releases and Versioning + +Releases are automatically managed using semantic-release and commit messages. + +## Deployment + +``` + +npx hardhat deploy + +``` + +- This command will execute all the deployment scripts in `./deploy` directory +- The default network will be `hardhat` +- Deployment to another network: - Make sure the desired network is configured in `hardhat.config.ts` - Add `PRIVATE_KEY` variable in `.env` file - Execute deploy command by adding `--network ` in the deploy command above - E.g. `npx hardhat deploy --network bsctestnet` +- Execution of single or custom set of scripts is possible, if: + - In the deployment scripts you have added `tags` for example: - `func.tags = ["MockTokens"];` + - Once this is done, adding `--tags ",..."` to the deployment command will execute only the scripts containing the tags. + +## Verify Contracts + +``` +npx hardhat etherscan-verify --network +``` + +## Hardhat Commands + +``` + +npx hardhat accounts + +npx hardhat compile + +npx hardhat clean + +npx hardhat test + +npx hardhat node + +npx hardhat help + +REPORT_GAS=true npx hardhat test + +npx hardhat coverage + +TS_NODE_FILES=true npx ts-node scripts/deploy.ts + +npx eslint '**/*.{js,ts}' + +npx eslint '**/*.{js,ts}' --fix + +npx prettier '**/*.{json,sol,md}' --check + +npx prettier '**/*.{json,sol,md}' --write + +npx solhint 'contracts/**/*.sol' + +npx solhint 'contracts/**/*.sol' --fix + +``` + +## Documentation + +Documentation is autogenerated using [solidity-docgen](https://github.com/OpenZeppelin/solidity-docgen). + +They can be generated by running `yarn docgen` From b65864fd32a716a9d7aaa9a4a0e10aefe25a1a72 Mon Sep 17 00:00:00 2001 From: Venus Tools Date: Tue, 9 Jan 2024 16:20:10 +0000 Subject: [PATCH 2/2] chore(release): 1.0.0 [skip ci] ## 1.0.0 (2024-01-09) ### Features * add isEligibleToSend function ([acc9dfb](https://github.com/VenusProtocol/token-bridge/commit/acc9dfbfba60da0c615b8145a772d1d1013b13fb)) * add opbnbmainnet and verify config ([0c10381](https://github.com/VenusProtocol/token-bridge/commit/0c1038102245add2cf9d34f8794c71da00c247e1)) * add README.md ([19f9c8e](https://github.com/VenusProtocol/token-bridge/commit/19f9c8e496bd024facd05e02bb6aa5db74b1599d)) * add sepolia deployments of xvs-bridge ([5fe32a2](https://github.com/VenusProtocol/token-bridge/commit/5fe32a2cfbda2ad9074a641bf5ea5ee69b89037c)) * add support of bridge replacement ([da1310f](https://github.com/VenusProtocol/token-bridge/commit/da1310f1c2c5514eea111df238cfd7aadf9100b3)) * add testnet deployments of xvs bridge ([67dc312](https://github.com/VenusProtocol/token-bridge/commit/67dc312bdfaf6f177264c1c2c85b0d1844e36f5a)) * add xvs bridge deployment script ([b2e8ae4](https://github.com/VenusProtocol/token-bridge/commit/b2e8ae4aa854eeb73b96b0fa8e7ff06e54fdca5a)) * add XVS deployment scripts ([b0d9440](https://github.com/VenusProtocol/token-bridge/commit/b0d94402c4301094522fcbd04a2c139822c0c0b2)) * add xvs token deployments of opBNB Testnet ([ccb65a4](https://github.com/VenusProtocol/token-bridge/commit/ccb65a43c27b12a1ac3b5847c5fae91508042121)) * add xvs-token-bridge ([bf0ff62](https://github.com/VenusProtocol/token-bridge/commit/bf0ff623194e65189993ad1a77068a67ad1f65f8)) * deployments of token bridge on Ethereum and BSC ([ff4e18c](https://github.com/VenusProtocol/token-bridge/commit/ff4e18c98c20711cc3ba81e9a492826726db2830)) * export deployments ([6b10063](https://github.com/VenusProtocol/token-bridge/commit/6b1006308a8b10981845f187f42d0ea144b9530c)) * generate file only with addresses of deployed contracts ([0012b29](https://github.com/VenusProtocol/token-bridge/commit/0012b29e28f285fd6b61e90eda59ca121aabb7e9)) * override sendAndCall function to enable and disable it ([6229b5e](https://github.com/VenusProtocol/token-bridge/commit/6229b5e6082608fef2215cb7cc5f5f6588d79df9)) * revert on transfer of XVS for blacklisted address ([f659dee](https://github.com/VenusProtocol/token-bridge/commit/f659dee63bd5a3713e7ad0f81fa9bc515b0e8e62)) * update deployment for latest impl ([62aba9c](https://github.com/VenusProtocol/token-bridge/commit/62aba9cba377d1cedb36aac75fd3600eca6df797)) * updating deployment files ([951114e](https://github.com/VenusProtocol/token-bridge/commit/951114edf7b409404868fbc021028ca68c37fc64)) * updating deployment files ([d465299](https://github.com/VenusProtocol/token-bridge/commit/d465299e5b702f97c0f306170775d0907fdf17d0)) * updating deployment files ([55e2bf1](https://github.com/VenusProtocol/token-bridge/commit/55e2bf10e6c0df7848f533e586f03a7e2e2dac01)) * updating deployment files ([9a4c39c](https://github.com/VenusProtocol/token-bridge/commit/9a4c39c78ff944e38a7d31afb4a474626eb9fe50)) * updating deployment files ([db0c067](https://github.com/VenusProtocol/token-bridge/commit/db0c06700608e9772d580c41eb2b4b3462e836cf)) * updating deployment files ([73592e0](https://github.com/VenusProtocol/token-bridge/commit/73592e03346c143194c0076a6007f4a63099e66b)) * updating deployment files ([138428f](https://github.com/VenusProtocol/token-bridge/commit/138428facfc86518040157bdeadb3607868a8826)) * updating deployment files ([34f33ed](https://github.com/VenusProtocol/token-bridge/commit/34f33ed5b124c1e9bdc0aedbe96f81a54b5b53d6)) * updating deployment files ([5ded843](https://github.com/VenusProtocol/token-bridge/commit/5ded843b4d4d28693183a6584bf26406665196cb)) * updating deployment files ([05a1ba9](https://github.com/VenusProtocol/token-bridge/commit/05a1ba9dbe6d95099be72b543e8b71273bcfc9b4)) * updating deployment files ([08854aa](https://github.com/VenusProtocol/token-bridge/commit/08854aa30494e6fd4d35f046e1b8a2bfa3e61961)) * updating deployment files ([c37302e](https://github.com/VenusProtocol/token-bridge/commit/c37302e345f386834906e9273f48258f9d1c60cb)) * upgrade the version of the governance package ([009b4e8](https://github.com/VenusProtocol/token-bridge/commit/009b4e8006994d755e0bbd35478cd4e1f232db77)) * upgrade the version of the oracle package ([3824a92](https://github.com/VenusProtocol/token-bridge/commit/3824a92999c40df71393806a7c37590f23c385d9)) * use contract addresses from packages ([9384b3c](https://github.com/VenusProtocol/token-bridge/commit/9384b3cb5a872fb1edad6f741112d51c4c699f2e)) * use custom error instead of require check ([ad17933](https://github.com/VenusProtocol/token-bridge/commit/ad17933cc37c4f9d13018b6dd5508001374f1f66)) ### Bug Fixes * BRI-02 ([8ce11e6](https://github.com/VenusProtocol/token-bridge/commit/8ce11e679649956014e700aac2e7b622e1886970)) * BRI-03 ([60d4c5c](https://github.com/VenusProtocol/token-bridge/commit/60d4c5c88fe4f6a83b5cedb615fd20ed5f055301)) * BRI-03 ([7c63f14](https://github.com/VenusProtocol/token-bridge/commit/7c63f14cb6ebae8f97ddbba719be6d196c59593f)) * BRI-06 ([85a718c](https://github.com/VenusProtocol/token-bridge/commit/85a718c299a1e65034b52c9494bc8479adfb3a87)) * BRI-07 ([66e0995](https://github.com/VenusProtocol/token-bridge/commit/66e0995d302b91621362d18d58db2cea634b4c2b)) * BRI-07 ([52ff112](https://github.com/VenusProtocol/token-bridge/commit/52ff1120d828b50ff110acb2df939abe28a3dd28)) * bscmainnet lz end point ([5de26e4](https://github.com/VenusProtocol/token-bridge/commit/5de26e4a71319c5f9d38e1a4f4462c8e4540f2e0)) * build ([8fc946f](https://github.com/VenusProtocol/token-bridge/commit/8fc946f0e90b202d6ec6fb03da9804cbc51c201e)) * BXV-01 ([5293d3e](https://github.com/VenusProtocol/token-bridge/commit/5293d3e5c1d33e0aa41500431e1f529adf612902)) * BXV-03 ([7c2193b](https://github.com/VenusProtocol/token-bridge/commit/7c2193bd7e7d9de4dff59982b98050844a9b3e51)) * comments ([ccb3fbc](https://github.com/VenusProtocol/token-bridge/commit/ccb3fbc403cfe463a9e065196eefae5710201ae5)) * deployment scripts ([a5200a4](https://github.com/VenusProtocol/token-bridge/commit/a5200a4cf722d46e47571199b80e48fe6521958a)) * exclude external deployments when exporting ([e183ec7](https://github.com/VenusProtocol/token-bridge/commit/e183ec7a381d4ed8aeabbc1ef42fdfc3f8d3de74)) * natspec comments ([c017c2c](https://github.com/VenusProtocol/token-bridge/commit/c017c2c32f6e9cbef1d76a04b8ed3a6e84e5c1e3)) * natspec comments ([51168ba](https://github.com/VenusProtocol/token-bridge/commit/51168baa96a6ce64b5448726af26c3cdc105618e)) * record the right function signatures ([684c5e0](https://github.com/VenusProtocol/token-bridge/commit/684c5e013caffc5142629b7a8420f969e3ecd948)) * remove redundant code ([c8d7365](https://github.com/VenusProtocol/token-bridge/commit/c8d7365c5830cc0c9719f8961d5f712a40a50a8d)) * resolve comment ([42617bb](https://github.com/VenusProtocol/token-bridge/commit/42617bbc277ba86aac8a670623b0db477e060b5d)) * resolve comments ([c1ecdaa](https://github.com/VenusProtocol/token-bridge/commit/c1ecdaa4bcabe417807850c8a6767d6f51e1006f)) * resolve comments ([4ef1a4c](https://github.com/VenusProtocol/token-bridge/commit/4ef1a4c27fd824d8d4915f44a0c6c37d714a07c0)) * resolve comments ([9d3a335](https://github.com/VenusProtocol/token-bridge/commit/9d3a335283ddfbf9ba26a3f1fe81a008a114e21e)) * resolve comments ([aba9539](https://github.com/VenusProtocol/token-bridge/commit/aba9539f61aa34f2189e28601e2e2bbcd09166b0)) * TCB-02 ([df7b43a](https://github.com/VenusProtocol/token-bridge/commit/df7b43aa9c1fc3d188b7e9a33290d587bd185470)) * TCB-04 ([b017f57](https://github.com/VenusProtocol/token-bridge/commit/b017f579abd2c5709075f581fe1168e4ed9e3d2e)) * TCB-05 ([2ddf4c0](https://github.com/VenusProtocol/token-bridge/commit/2ddf4c02544c010ca8d669ae02c71d8ea976f76e)) * TCV-01 ([981401f](https://github.com/VenusProtocol/token-bridge/commit/981401f49eef5427643eb5158d1edbae680bc358)) * test styles ([15bd3cb](https://github.com/VenusProtocol/token-bridge/commit/15bd3cbac794fb891efbde9655e85692458181a5)) * typo ([0d4d8ea](https://github.com/VenusProtocol/token-bridge/commit/0d4d8eaf15e5b6957e7e67291ddf80b747162144)) * XVB-02 ([f57a9ab](https://github.com/VenusProtocol/token-bridge/commit/f57a9ab2d4688ba7269abcaaeced316aad1ccbc4)) * XVO-02 ([06c6009](https://github.com/VenusProtocol/token-bridge/commit/06c6009e01411182d738b2249cbbb06019926b54)) * XVP-02 ([8b8dbce](https://github.com/VenusProtocol/token-bridge/commit/8b8dbce9f75029203e6011f34a58a64684fc3379)) * XVP-03 ([e65ada3](https://github.com/VenusProtocol/token-bridge/commit/e65ada340d44c9fd93f7a88a63bdee7421a55673)) * XVS-01 ([6785b84](https://github.com/VenusProtocol/token-bridge/commit/6785b84e085eaf455e35f66a6d04f79570279e5f)) * XVS-02 ([6bacbf7](https://github.com/VenusProtocol/token-bridge/commit/6bacbf7b9a265afeb99188bfe3c3d864ae06c145)) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6a98677..8b8f6ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@venusprotocol/token-bridge", - "version": "1.0.0-dev.12", + "version": "1.0.0", "description": "Contracts to bridge tokens using LayerZero technology and applying some rules on top of it", "files": [ "artifacts",