diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..c0a6a6081 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,89 @@ +# Contributing + +When contributing to this repository, please first discuss the change you wish to make via issue, or any other method with the owners of this repository before making a change. + +Please note we have a code of conduct, please follow it in all your interactions with the project. + +## Pull Request Process + +1. Ensure any install or build dependencies are removed before the end of the layer when doing a + build. +2. Update the README.md with details of changes to the interface, this includes new environment + variables, exposed ports, useful file locations and container parameters. +3. You may merge the Pull Request in once you have the sign-off of the owner, or if you + do not have permission to do that, you may request the reviewer to merge it for you. + +## Code of Conduct + +### Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +### Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +- The use of sexualized language or imagery and unwelcome sexual attention or + advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic + address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +### Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +### Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +### Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +### Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/README.md b/README.md new file mode 100644 index 000000000..b59763a64 --- /dev/null +++ b/README.md @@ -0,0 +1,86 @@ + +![Logo](https://www.vmware.com/content/dam/digitalmarketing/microsites/en/images/timeline/vmware-logo-2009-latest.jpg) + + +# VMWare Blockchain Samples + +VMware Blockchain is an enterprise-grade blockchain platform that enables multi-party workflows. It uses advanced techniques such as byzantine fault-tolerant state machine replication, authenticated data structures, and integration with smart contract execution engines to enable customers to build and run decentralized multi-party applications. + + +This repo contains multiple sample examples which will help in bootstapping. + + + +## Documentation + +[Product Documentation](https://docs.vmware.com/en/VMware-Blockchain) + +### Samples + +Refer to `README.md` inside sample directory for detailed description. + +| Directory | Description | +|-----------|-------------| +| [Artemis](https://github.com/vmware-samples/vmware-blockchain-samples/tree/master/artemis) | Sample NFT Platform with ERC 721 Standards| +| [Asset Transfer](https://github.com/vmware-samples/vmware-blockchain-samples/tree/master/asset-transfer) | DApp with asset transfer sample| +| [Token Swap](https://github.com/vmware-samples/vmware-blockchain-samples/tree/master/erc20-swap) | ERC-20 Token Creation and Swap with React Sample | +| [Token Deploy](https://github.com/vmware-samples/vmware-blockchain-samples/tree/master/hardhat) | Deploying ERC 20 Token using Hardhat | +| [Ocen Bound Plastics](https://github.com/vmware-samples/vmware-blockchain-samples/tree/master/obp) | Supply Chain Sample Smart Contract with Solidity and Truffle| +| [Supply Chain With](https://github.com/vmware-samples/vmware-blockchain-samples/tree/master/on-chain-privacy) | Supply Chain example with On-Chain Privacy | +| [Web3 Python](https://github.com/vmware-samples/vmware-blockchain-samples/tree/master/simple-examples)| Sample App on Python using Web3 | +| [Supply Chain DApp](https://github.com/vmware-samples/vmware-blockchain-samples/tree/master/supply-chain)| Extensive Supply Chain DApp Sample | +| [Truffle Sample](https://github.com/vmware-samples/vmware-blockchain-samples/tree/master/truffle) | Basic Truffle Contract Migration Sample | +| [Load Testing](https://github.com/vmware-samples/vmware-blockchain-samples/tree/master/erc20-load-test-tool) | A Sample Load Testing Tool with ERC 20 Token and Web3js| + +#### Util +[Util Scripts](https://github.com/vmware-samples/vmware-blockchain-samples/tree/master/tools) Scripts to aid in development + + + +## Tech Stack + +**Client:** React, etherjs, web3js + +**Server:** Node, NPM, Java, Maven, Spring, + +**Blockchain:** Solidity, Hardhat, Truffle + +**Infra:** Docker + + +## Contributing + +Contributions are always welcome! + +See `contributing.md` for ways to get started. + +Please adhere to this project's `code of conduct`. + + +## FAQ + +## Authors + +- [@ramkri123](https://github.com/ramkri123) +- [@dparmar](https://github.com/dparmar) + +## Contributors + +- [@MRHarrison](https://github.com/MRHarrison) +- [@pengluhyd](https://github.com/pengluhyd) +- [@rkischuk](https://github.com/rkischuk) +- [@robem](https://github.com/robem) +- [@teoparvanov](https://github.com/teoparvanov) +- [@tompscanlan](https://github.com/tompscanlan) +- [@sedhuait](https://github.com/sedhuait) +- [@NickSneo](https://github.com/NickSneo) + +## License + +[MIT](https://choosealicense.com/licenses/mit/) + + +## Feedback + +If you have any issues | feedback | suggestions, [please raise a ticket](https://github.com/vmware-samples/vmware-blockchain-samples/issues) + diff --git a/web3j/.gitignore b/erc20-load-test-tool/.gitignore similarity index 100% rename from web3j/.gitignore rename to erc20-load-test-tool/.gitignore diff --git a/web3j/CONTRIBUTING.md b/erc20-load-test-tool/CONTRIBUTING.md similarity index 100% rename from web3j/CONTRIBUTING.md rename to erc20-load-test-tool/CONTRIBUTING.md diff --git a/web3j/LICENSE.txt b/erc20-load-test-tool/LICENSE.txt similarity index 100% rename from web3j/LICENSE.txt rename to erc20-load-test-tool/LICENSE.txt diff --git a/web3j/README.md b/erc20-load-test-tool/README.md similarity index 100% rename from web3j/README.md rename to erc20-load-test-tool/README.md diff --git a/web3j/monitoring/influxdb/erc-20_token_transfer.json b/erc20-load-test-tool/monitoring/influxdb/erc-20_token_transfer.json similarity index 100% rename from web3j/monitoring/influxdb/erc-20_token_transfer.json rename to erc20-load-test-tool/monitoring/influxdb/erc-20_token_transfer.json diff --git a/web3j/monitoring/prometheus/prometheus.yml b/erc20-load-test-tool/monitoring/prometheus/prometheus.yml similarity index 100% rename from web3j/monitoring/prometheus/prometheus.yml rename to erc20-load-test-tool/monitoring/prometheus/prometheus.yml diff --git a/web3j/pom.xml b/erc20-load-test-tool/pom.xml similarity index 100% rename from web3j/pom.xml rename to erc20-load-test-tool/pom.xml diff --git a/web3j/src/main/java/com/vmware/ethereum/LoadRunner.java b/erc20-load-test-tool/src/main/java/com/vmware/ethereum/LoadRunner.java similarity index 100% rename from web3j/src/main/java/com/vmware/ethereum/LoadRunner.java rename to erc20-load-test-tool/src/main/java/com/vmware/ethereum/LoadRunner.java diff --git a/web3j/src/main/java/com/vmware/ethereum/config/AppConfig.java b/erc20-load-test-tool/src/main/java/com/vmware/ethereum/config/AppConfig.java similarity index 100% rename from web3j/src/main/java/com/vmware/ethereum/config/AppConfig.java rename to erc20-load-test-tool/src/main/java/com/vmware/ethereum/config/AppConfig.java diff --git a/web3j/src/main/java/com/vmware/ethereum/config/DatabaseConfig.java b/erc20-load-test-tool/src/main/java/com/vmware/ethereum/config/DatabaseConfig.java similarity index 100% rename from web3j/src/main/java/com/vmware/ethereum/config/DatabaseConfig.java rename to erc20-load-test-tool/src/main/java/com/vmware/ethereum/config/DatabaseConfig.java diff --git a/web3j/src/main/java/com/vmware/ethereum/config/TokenConfig.java b/erc20-load-test-tool/src/main/java/com/vmware/ethereum/config/TokenConfig.java similarity index 100% rename from web3j/src/main/java/com/vmware/ethereum/config/TokenConfig.java rename to erc20-load-test-tool/src/main/java/com/vmware/ethereum/config/TokenConfig.java diff --git a/web3j/src/main/java/com/vmware/ethereum/config/Web3jConfig.java b/erc20-load-test-tool/src/main/java/com/vmware/ethereum/config/Web3jConfig.java similarity index 100% rename from web3j/src/main/java/com/vmware/ethereum/config/Web3jConfig.java rename to erc20-load-test-tool/src/main/java/com/vmware/ethereum/config/Web3jConfig.java diff --git a/web3j/src/main/java/com/vmware/ethereum/config/WorkloadConfig.java b/erc20-load-test-tool/src/main/java/com/vmware/ethereum/config/WorkloadConfig.java similarity index 100% rename from web3j/src/main/java/com/vmware/ethereum/config/WorkloadConfig.java rename to erc20-load-test-tool/src/main/java/com/vmware/ethereum/config/WorkloadConfig.java diff --git a/web3j/src/main/java/com/vmware/ethereum/config/WorkloadModel.java b/erc20-load-test-tool/src/main/java/com/vmware/ethereum/config/WorkloadModel.java similarity index 100% rename from web3j/src/main/java/com/vmware/ethereum/config/WorkloadModel.java rename to erc20-load-test-tool/src/main/java/com/vmware/ethereum/config/WorkloadModel.java diff --git a/web3j/src/main/java/com/vmware/ethereum/controller/MainController.java b/erc20-load-test-tool/src/main/java/com/vmware/ethereum/controller/MainController.java similarity index 100% rename from web3j/src/main/java/com/vmware/ethereum/controller/MainController.java rename to erc20-load-test-tool/src/main/java/com/vmware/ethereum/controller/MainController.java diff --git a/web3j/src/main/java/com/vmware/ethereum/controller/TestController.java b/erc20-load-test-tool/src/main/java/com/vmware/ethereum/controller/TestController.java similarity index 100% rename from web3j/src/main/java/com/vmware/ethereum/controller/TestController.java rename to erc20-load-test-tool/src/main/java/com/vmware/ethereum/controller/TestController.java diff --git a/web3j/src/main/java/com/vmware/ethereum/model/Contract.java b/erc20-load-test-tool/src/main/java/com/vmware/ethereum/model/Contract.java similarity index 100% rename from web3j/src/main/java/com/vmware/ethereum/model/Contract.java rename to erc20-load-test-tool/src/main/java/com/vmware/ethereum/model/Contract.java diff --git a/web3j/src/main/java/com/vmware/ethereum/model/EthClientInfo.java b/erc20-load-test-tool/src/main/java/com/vmware/ethereum/model/EthClientInfo.java similarity index 100% rename from web3j/src/main/java/com/vmware/ethereum/model/EthClientInfo.java rename to erc20-load-test-tool/src/main/java/com/vmware/ethereum/model/EthClientInfo.java diff --git a/web3j/src/main/java/com/vmware/ethereum/model/ProgressReport.java b/erc20-load-test-tool/src/main/java/com/vmware/ethereum/model/ProgressReport.java similarity index 100% rename from web3j/src/main/java/com/vmware/ethereum/model/ProgressReport.java rename to erc20-load-test-tool/src/main/java/com/vmware/ethereum/model/ProgressReport.java diff --git a/web3j/src/main/java/com/vmware/ethereum/service/ClosedWorkload.java b/erc20-load-test-tool/src/main/java/com/vmware/ethereum/service/ClosedWorkload.java similarity index 100% rename from web3j/src/main/java/com/vmware/ethereum/service/ClosedWorkload.java rename to erc20-load-test-tool/src/main/java/com/vmware/ethereum/service/ClosedWorkload.java diff --git a/web3j/src/main/java/com/vmware/ethereum/service/CurrentMetrics.java b/erc20-load-test-tool/src/main/java/com/vmware/ethereum/service/CurrentMetrics.java similarity index 100% rename from web3j/src/main/java/com/vmware/ethereum/service/CurrentMetrics.java rename to erc20-load-test-tool/src/main/java/com/vmware/ethereum/service/CurrentMetrics.java diff --git a/web3j/src/main/java/com/vmware/ethereum/service/MetricsConstant.java b/erc20-load-test-tool/src/main/java/com/vmware/ethereum/service/MetricsConstant.java similarity index 100% rename from web3j/src/main/java/com/vmware/ethereum/service/MetricsConstant.java rename to erc20-load-test-tool/src/main/java/com/vmware/ethereum/service/MetricsConstant.java diff --git a/web3j/src/main/java/com/vmware/ethereum/service/MetricsService.java b/erc20-load-test-tool/src/main/java/com/vmware/ethereum/service/MetricsService.java similarity index 100% rename from web3j/src/main/java/com/vmware/ethereum/service/MetricsService.java rename to erc20-load-test-tool/src/main/java/com/vmware/ethereum/service/MetricsService.java diff --git a/web3j/src/main/java/com/vmware/ethereum/service/OpenWorkload.java b/erc20-load-test-tool/src/main/java/com/vmware/ethereum/service/OpenWorkload.java similarity index 100% rename from web3j/src/main/java/com/vmware/ethereum/service/OpenWorkload.java rename to erc20-load-test-tool/src/main/java/com/vmware/ethereum/service/OpenWorkload.java diff --git a/web3j/src/main/java/com/vmware/ethereum/service/ProgressService.java b/erc20-load-test-tool/src/main/java/com/vmware/ethereum/service/ProgressService.java similarity index 100% rename from web3j/src/main/java/com/vmware/ethereum/service/ProgressService.java rename to erc20-load-test-tool/src/main/java/com/vmware/ethereum/service/ProgressService.java diff --git a/web3j/src/main/java/com/vmware/ethereum/service/SecureTokenApi.java b/erc20-load-test-tool/src/main/java/com/vmware/ethereum/service/SecureTokenApi.java similarity index 100% rename from web3j/src/main/java/com/vmware/ethereum/service/SecureTokenApi.java rename to erc20-load-test-tool/src/main/java/com/vmware/ethereum/service/SecureTokenApi.java diff --git a/web3j/src/main/java/com/vmware/ethereum/service/TimedWrapper.java b/erc20-load-test-tool/src/main/java/com/vmware/ethereum/service/TimedWrapper.java similarity index 100% rename from web3j/src/main/java/com/vmware/ethereum/service/TimedWrapper.java rename to erc20-load-test-tool/src/main/java/com/vmware/ethereum/service/TimedWrapper.java diff --git a/web3j/src/main/java/com/vmware/ethereum/service/WorkloadCommand.java b/erc20-load-test-tool/src/main/java/com/vmware/ethereum/service/WorkloadCommand.java similarity index 100% rename from web3j/src/main/java/com/vmware/ethereum/service/WorkloadCommand.java rename to erc20-load-test-tool/src/main/java/com/vmware/ethereum/service/WorkloadCommand.java diff --git a/web3j/src/main/java/com/vmware/ethereum/service/WorkloadRunner.java b/erc20-load-test-tool/src/main/java/com/vmware/ethereum/service/WorkloadRunner.java similarity index 100% rename from web3j/src/main/java/com/vmware/ethereum/service/WorkloadRunner.java rename to erc20-load-test-tool/src/main/java/com/vmware/ethereum/service/WorkloadRunner.java diff --git a/web3j/src/main/java/com/vmware/ethereum/service/WorkloadService.java b/erc20-load-test-tool/src/main/java/com/vmware/ethereum/service/WorkloadService.java similarity index 100% rename from web3j/src/main/java/com/vmware/ethereum/service/WorkloadService.java rename to erc20-load-test-tool/src/main/java/com/vmware/ethereum/service/WorkloadService.java diff --git a/web3j/src/main/resources/config/application.yml b/erc20-load-test-tool/src/main/resources/config/application.yml similarity index 100% rename from web3j/src/main/resources/config/application.yml rename to erc20-load-test-tool/src/main/resources/config/application.yml diff --git a/web3j/src/main/resources/static/js/progress.js b/erc20-load-test-tool/src/main/resources/static/js/progress.js similarity index 100% rename from web3j/src/main/resources/static/js/progress.js rename to erc20-load-test-tool/src/main/resources/static/js/progress.js diff --git a/web3j/src/main/resources/templates/report.html b/erc20-load-test-tool/src/main/resources/templates/report.html similarity index 100% rename from web3j/src/main/resources/templates/report.html rename to erc20-load-test-tool/src/main/resources/templates/report.html diff --git a/web3j/src/main/resources/wallets/demo-wallet.json b/erc20-load-test-tool/src/main/resources/wallets/demo-wallet.json similarity index 100% rename from web3j/src/main/resources/wallets/demo-wallet.json rename to erc20-load-test-tool/src/main/resources/wallets/demo-wallet.json