This is where everyone can add new examples/templates to Neo Playground.
Neo Playground is a non-funded project developed by AxLabs and the Neo community.
👉 Please, consider donating! 💰 ❤️
It's simple and anyone can do it. 😎
Let's assume you would like to add the code found in https://github.com/neow3j/neow3j-examples-java
as a template, more precisely to include Neo3-related templates. First you need to get a <TEMPLATE_ID>
, which is composed as:
<CHAIN>.<LANGUAGE_IDENTIFIER>.<GIT_ORG_NAME>-<TEMPLATE_NAME>
where:
<GIT_ORG_NAME>
: the organization name, for example,AxLabs
inhttps://github.com/AxLabs/neo-playground-templates
<TEMPLATE_NAME>
: any name that represents the given template. We suggest to set as the git repository name, for example,neo-playground-templates
inhttps://github.com/AxLabs/neo-playground-templates
<CHAIN>
:neo3
<LANGUAGE_IDENTIFIER>
: eitherdotnet50
,dotnet31
,java8
,go115
, orpython37
So, in our example, a valid <TEMPLATE_ID>
is neo3.java8.neow3j-java-neo3-examples
.
git submodule add https://github.com/<GIT_ORG_NAME>/<GIT_REPO_NAME> <TEMPLATE_ID>/git-repo
For example, it could be:
git submodule add https://github.com/neow3j/neow3j-examples-java neo3.java8.neow3j-java-neo3-examples/git-repo
5. Edit the neo-playground-templates.json
to include a JSON object that represents the neo3.java8.neow3j-java-neo3-examples
template:
{
"id": "neo3.java8.neow3j-java-neo3-examples",
"title": "Java Examples for Neo3",
"description": "Various Java examples for Neo3, mainly focusing on how develop smart contracts using Java. It includes how to develop, compile, and deploy contracts, as well as how to write an application to issue transactions to interact with the created smart contract.",
"logoUrl": "https://neow3j.io/images/neow3j-neo3.png",
"projectUrl": "https://neow3j.io",
"git": {
"url": "https://github.com/neow3j/neow3j-examples-java.git",
"modulePath": "./neo3.java8.neow3j-java-neo3-examples/git-repo"
},
"workspace": {
"path": "./git-repo/neo3-examples"
},
"imageBuild": {
"customCmd": "cd ~/workspace && sh gradlew downloadDependencies && sh gradlew buildDependents && sh gradlew compileJava"
},
"codeTour": {
"path": "./.tours"
},
"welcome": {
"path": "./.neo-playground-welcome"
},
"chain": "neo3",
"languages": [
"java"
],
"tags": [
"java",
"neo3"
]
}
Some things to note about the JSON file:
- The attribute
modulePath
within the objectgit
is relative to the root of theAxLabs/neo-playground-templates
repository. - The objects
codeTour
andwelcome
are optional. - The attribute
path
within the objectsworkspace
,codeTour
, orwelcome
are relative to the<TEMPLATE_ID>
directory which, in this case, is./neo3.java8.neow3j-java-neo3-examples/
. - Pay attention to the
path
attribute within theworkspace
object: if you want to set a sub-directory as the template's workspace, you need to accordingly set this attribute. In the example above, theneo3-examples
directory is where the code related to Neo3 is located. 😅
7. Create a pull request to the neo-playground-templates repository
8. Your template will automatically appear on the Neo Playground as soon as we merge it! 🚀
1. If I submit a pull request following the steps above, will it automatically appear to Neo Playground?
Yes. 🙌
Well, yes. 😅
We will check if the template you're providing is reasonable, and adds value to Neo Playground.
We mainly look at these points:
- Does the template have a
README.md
file, explaining what is about, how to execute the examples, etc? - Does the template include a
default.neo-express
file to start a Neo Express node for testing? - Does the template have code that actually run without errors?
- Are you trying to educate or show something meaningful for the Neo ecosystem?
- Does the code which is included in the template contains all dependencies?
Yes! If you have a good and sound template to include in the Neo Playground we will include there with no extra costs.
5. So, I will host a Neo workshop/tutorial and I would like to offer a template for all the attendees. Is that possible?
Of course!
Unfortunately not. 😂😂😂
Yes and no.
AxLabs is a Neo community member developing and maintaining some projects in the Neo ecosystem. For example, we're the team behind neow3j SDK and neow3j devpack & compiler.
However, we're not part of the Neo Foundation nor the Neo Global Development. We're simply contributors to the Neo blockchain.
Not yet. 💔
We're dedicating some of our fun time. 😄 ⏰
However, if you want to donate something to keep this project going, please, please, please consider sending any amount to:
- NEO:
ARfCuLcGv8x5b9PrBj4m1GUNd5TBTpPfAe
- BTC:
3EkLBPkP5uh6eK6KhVQPxbAhqJRnQp3Vot
- GitHub Sponsors
Thanks! 🙏