-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refacto(setup): the process for the contribution
- Loading branch information
Showing
11 changed files
with
361 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,78 @@ | ||
# tezart | ||
|
||
A dart library that connects to interact with the tezos blockchain. It connects to a tezos node to send transactions, interact with smart contracts. | ||
A dart library that connects to interact with the tezos blockchain. | ||
It connects to a tezos node to send transactions, interact with smart contracts. | ||
|
||
## Features | ||
|
||
wip | ||
[wip - Classes à exporter](https://www.notion.so/Classes-exposer-fca03549f8ec4800a3ddf734ac0973d9) | ||
|
||
## TODO | ||
|
||
wip | ||
[wip - Classes à exporter](https://www.notion.so/Classes-exposer-fca03549f8ec4800a3ddf734ac0973d9) | ||
|
||
## Usage | ||
|
||
wip | ||
|
||
## Contribution | ||
|
||
### Run a tezos sandbox locally. | ||
You can use: [tqtezos's sandbox](https://assets.tqtezos.com/docs/setup/2-sandbox/) | ||
### Setup your development environment [ for Mac and Linux ] | ||
|
||
**Tezart** is a [dart](https://dart.dev/) package that will help your applications to interact with the tezos blockchain. | ||
|
||
To ensure that you can contribute to this project, you will need to setup your environment with the installation of the following tools : | ||
|
||
- [dart sdk for package development](https://dart.dev/get-dart) | ||
- [docker for local testing](https://docs.docker.com/get-docker/) | ||
- [lefthook to our git hooks](https://github.com/Arkweid/lefthook) | ||
- [test_coverage for our code coverage](https://pub.dev/packages/test_coverage) | ||
|
||
#### A. Dart SDK for Package development | ||
|
||
You can install **Dart SDK**, by following the [official dart documentation](https://dart.dev/get-dart) | ||
#### B. Docker to run a tezos sandbox locally | ||
|
||
1- If you don't have **Docker**, please install it by following the [official docker documentation](https://docs.docker.com/get-docker/) | ||
|
||
2- If you have **Docker**, You will need a running blockchain on your local environment to launch the tests. You can use [tqtezos's sandbox](https://assets.tqtezos.com/docs/setup/2-sandbox/) by running the following command : | ||
|
||
``` | ||
docker run --rm --name my-sandbox --detach -p 20000:20000 tqtezos/flextesa:20201214 delphibox start | ||
docker run --rm \ | ||
--name my-sandbox \ | ||
--detach -p 20000:20000 \ | ||
tqtezos/flextesa:20201214 delphibox start | ||
``` | ||
|
||
### Setup Lefthook | ||
Install lefthook following [this](https://github.com/Arkweid/lefthook/blob/master/docs/full_guide.md#installation) guide, then run : | ||
``` | ||
#### C. Setup Lefthook | ||
|
||
To install lefthook, just follow [this](https://github.com/Arkweid/lefthook/blob/master/docs/full_guide.md#installation) guide, then run : | ||
|
||
```sh | ||
lefthook install | ||
``` | ||
|
||
### Setup env variables | ||
``` | ||
cp .env.dist .env | ||
``` | ||
#### Verify your setup | ||
|
||
### Run tests | ||
``` | ||
./tool/run_tests.sh | ||
To ensure that your environment is ready for contribution, please run the following command at the root of the project: | ||
|
||
```sh | ||
./tezart.sh --run-setup | ||
``` | ||
|
||
Following is a sample of a correct setup : | ||
|
||
 | ||
|
||
### Utility functions | ||
|
||
We provide some utility functions through `tezart.sh` to help you in your development process. | ||
|
||
Following is the output usage : | ||
|
||
 | ||
|
||
## Feature requests and bugs | ||
|
||
If you want to contribute to this project, please fork the project and submit your pull request. Feature requests and bugs at the [issue tracker](https://github.com/moneytrackio/tezart/issues/new) | ||
If you want to contribute to this project, please fork the project and submit your pull request. | ||
Feature requests and bugs at the [issue tracker](https://github.com/moneytrackio/tezart/issues/new) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
# utility functions | ||
/bin/bash ./tool/tezart.sh $@ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.___________. _______ ________ ___ .______ .___________. | ||
| || ____|| / / \ | _ \ | | | ||
`---| |----`| |__ `---/ / / ^ \ | |_) | `---| |----` | ||
| | | __| / / / /_\ \ | / | | | ||
| | | |____ / /----./ _____ \ | |\ \----. | | | ||
|__| |_______| /________/__/ \__\ | _| `._____| |__| | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
#!/bin/bash | ||
|
||
################################################################### | ||
# Description : | ||
# Utility functions to perform logging. | ||
# | ||
################################################################### | ||
|
||
readonly BLUE="\\033[1;34m" | ||
readonly RED="\\033[1;31m" | ||
readonly GREEN="\\033[1;32m" | ||
readonly YELLOW="\\033[1;33m" | ||
readonly MAGENTA="\\033[1;35m" | ||
readonly GRAS="\033[1m" | ||
readonly END="\\033[1;00m" | ||
readonly CHECK_MARK="\xE2\x9C\x94" | ||
readonly SUFFIX="TEZART" | ||
|
||
#### | ||
## Display url link in output | ||
## $1 message | ||
## $2 url | ||
log::url() { | ||
echo -e "\\e]8;;http://example.com\\aThis is a hyperlink\e]8;;\\a" | ||
} | ||
|
||
log::error() { | ||
echo -e "\n$RED [ERROR:$SUFFIX] $* $END" >&2 | ||
} | ||
|
||
log::error_and_exit() { | ||
echo -e "\n$RED [ERROR:$SUFFIX] $*\n $END" >&2 && exit 1 | ||
} | ||
|
||
log::info() { | ||
echo -e "\n$GREEN [INFO:$SUFFIX]$END $* $END" | ||
} | ||
|
||
log::info_success() { | ||
echo -e "\n$GREEN [INFO:$SUFFIX]$END $* $GREEN $CHECK_MARK $END" | ||
} | ||
|
||
log::info_and_exit() { | ||
echo -e "\n$GREEN [INFO:$SUFFIX] $* $END" && exit 0 | ||
} | ||
|
||
log::debug() { | ||
[[ -n $DEBUG ]] && echo -e "\n$BLUE [DEBUG:$SUFFIX---] $* $END" | ||
} | ||
|
||
log::warn() { | ||
echo -e "\n$YELLOW [WARN:$SUFFIX] $* $END" | ||
} | ||
|
||
log::warn_and_exit() { | ||
echo -e "\n$YELLOW [WARN:$SUFFIX] $* $END" && exit 0 | ||
} | ||
|
||
log::message_success() { | ||
echo -e " $* $GREEN $CHECK_MARK $END" | ||
} | ||
|
||
log::message_error() { | ||
echo -e " $* $RED x $END" | ||
} | ||
|
||
log::title() { | ||
echo -e "\n $* " | ||
} | ||
|
||
log::title_success() { | ||
echo -e "\n $* $GREEN $CHECK_MARK $END" | ||
} | ||
|
||
|
||
|
||
log::message() { | ||
echo -e " $* " | ||
} | ||
|
||
|
||
log::application(){ | ||
echo -e "\n\n$GREEN$(cat $BASEDIR/../tool/info-tezart)$END" | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.