You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that we follow the [LFDT Charter](https://www.lfdecentralizedtrust.org/about/charter).
6
+
All new inbound code contributions to the project shall be made under the Apache License, Version 2.0.
7
+
All outbound code will be made available under the Apache License, Version 2.0.
8
+
9
+
## Code of Conduct
10
+
11
+
Please note that we have a [Code of Conduct](CODE_OF_CONDUCT.md). Please follow it in all your interactions with the project.
12
+
13
+
## How to Contribute
14
+
15
+
1.**Fork the repository** on GitHub.
16
+
2.**Clone your fork** locally.
17
+
3.**Create a new branch** for your feature or bugfix.
18
+
4.**Make your changes**.
19
+
5.**Run tests** (see [Testing Guide](docs/development/testing.md)) to ensure your changes don't break anything.
20
+
6.**Commit your changes** using the sign-off flag (`-s`).
21
+
7.**Push your branch** to your fork.
22
+
8.**Submit a Pull Request** (PR) to the `main` branch of the upstream repository.
23
+
24
+
## Good first issues
25
+
26
+
We maintain a set of issues labeled "good first issue" to help new contributors find approachable tasks and get started quickly.
27
+
If you're contributing for the first time, please consider picking one of these issues:
28
+
29
+
- Browse the current list here: https://github.com/hyperledger-labs/fabric-token-sdk/issues?q=is%3Aissue+state%3Aopen+label%3A%22good+first+issue%22
30
+
- Leave a comment on the issue saying you'd like to work on it and ask to be assigned.
31
+
- If you need clarification or guidance, ask on our Discord channel (`#fabric-token-sdk`) or comment on the issue — maintainers and community members are happy to help.
32
+
- Keep your first PR small and focused. Follow the project guidelines: run tests, sign your commits (`-s`), and rebase to keep a linear history.
33
+
34
+
## Detailed Development Guidelines
35
+
36
+
Please refer to the [Development Guidelines](docs/development/development.md) for detailed information on:
37
+
38
+
***Commit Sign-off**: All commits must be signed off (`git commit -s`).
39
+
***Linear History**: We use rebase workflow, not merge commits.
40
+
***Coding Standards**: See [docs/development/general.md](docs/development/general.md) and [docs/development/idiomatic.md](docs/development/idiomatic.md) for Go coding standards.
41
+
42
+
## Reporting Issues
43
+
44
+
If you find a bug or have a feature request, please search the [Issues](https://github.com/hyperledger-labs/fabric-token-sdk/issues) to see if it has already been reported. If not, please open a new issue.
45
+
46
+
## Community
47
+
48
+
Join us on [Discord](https://discord.gg/hyperledger) in the `#fabric-token-sdk` channel.
Fabric Token SDK uses a system called `NWO` from Fabric Smart Client for its integration tests and samples to programmatically create a fabric network along with the fabric-smart-client nodes. The current version of fabric that is tested can be found in the project [Makefile](https://github.com/hyperledger-labs/fabric-smart-client/blob/main/Makefile) set in the `FABRIC_VERSION` variable.
43
-
44
-
In order for a fabric network to be able to be created you need to ensure you have downloaded the appropriate version of the hyperledger fabric binaries from [Fabric Releases](https://github.com/hyperledger/fabric/releases) and unpack the compressed file onto your file system. This will create a directory structure of /bin and /config. You will then need to set the environment variable `FAB_BINS` to the `bin` directory. For example if you unpacked the compressed file into `/home/name/fabric` then you would
45
-
46
-
```bash
47
-
export FAB_BINS=/home/name/fabric/bin
48
-
```
49
-
50
-
Do not store the fabric binaries within your fabric-token-sdk cloned repo as this will cause problems running the samples and integration tests as they will not be able to install chaincode.
51
-
52
-
Almost all the samples and integration tests require the fabric binaries to be downloaded and the environment variable `FAB_BINS` set to point to the directory where these binaries are stored. One way to ensure this is to execute the following in the root of the fabric-token-sdk project
53
-
54
-
```shell
55
-
make download-fabric
56
-
export FAB_BINS=$PWD/../fabric/bin
57
-
```
58
-
59
-
You can also use this to download a different version of the fabric binaries for example
60
-
61
-
```shell
62
-
FABRIC_VERSION=2.5 make download-fabric
63
-
```
64
-
65
-
If you want to provide your own versions of the fabric binaries then just set `FAB_BINS` to the directory where all the fabric binaries are stored.
66
-
67
30
# Additional Resources
68
31
69
32
- (March 17, 2022) [`Hyperledger in-Depth: Tokens in Hyperledger Fabric: What’s possible today and what’s coming`](https://www.hyperledger.org/learn/webinars/hyperledger-in-depth-tokens-in-hyperledger-fabric-whats-possible-today-and-whats-coming):
@@ -102,13 +65,9 @@ The Fabric Token SDK has evolved beyond its initial focus on Hyperledger Fabric.
102
65
103
66
With a robust Fabric Token SDK, developing secure and efficient enterprise-grade tokenized applications becomes a reality, offering flexibility for developers to choose the platform that best suits their needs.
104
67
105
-
# Development
106
-
107
-
For additional information about the development of the Token SDK, visit this [`section`](./docs/development/development.md).
108
-
109
68
# License
110
69
111
70
This project is licensed under the Apache 2 License - see the [`LICENSE`](LICENSE) file for details
This document explains the targets available in the `Makefile` for the Fabric Token SDK. The Makefile allows you to automate common tasks such as installing tools, running tests, and managing Docker images.
4
+
5
+
## Setup & Installation
6
+
7
+
These targets help you set up your development environment.
8
+
9
+
| Target | Description |
10
+
| :--- | :--- |
11
+
|`make install-tools`| Installs necessary Go tools (linters, generators, etc.) defined in `tools/tools.go`. It also installs `golangci-lint`. |
12
+
|`make download-fabric`| Downloads Hyperledger Fabric binaries. You can specify `FABRIC_VERSION` and `FABRIC_CA_VERSION` env vars to control the versions. |
|`make testing-docker-images`| Pulls images like Postgres and Vault for testing. |
49
+
|`make monitoring-docker-images`| Pulls monitoring tools like Prometheus, Grafana, Jaeger, and Explorer. |
50
+
51
+
## Maintenance
52
+
53
+
These targets help keep your project clean and tidy.
54
+
55
+
| Target | Description |
56
+
| :--- | :--- |
57
+
|`make tidy`| Runs `go mod tidy` in all modules to ensure dependencies are clean. |
58
+
|`make clean`| cleans up Docker artifacts (containers, volumes, networks) and removes generated test output directories. **Use with caution as it removes Docker volumes.**|
59
+
|`make clean-all-containers`| Removes all running and stopped Docker containers. |
60
+
|`make clean-fabric-peer-images`| Removes Docker images related to Fabric peers. |
61
+
|`make lint`| Runs `golangci-lint` to check code quality. |
62
+
|`make lint-auto-fix`| Runs `golangci-lint` and automatically fixes issues where possible. |
63
+
64
+
## Tools Generation
65
+
66
+
| Target | Description |
67
+
| :--- | :--- |
68
+
|`make tokengen`| Installs the `tokengen` tool. |
69
+
|`make traceinspector`| Installs the `traceinspector` tool. |
0 commit comments