Skip to content
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.

Commit

Permalink
Merge branch 'release/v2020.0322'
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreMiras committed Mar 22, 2020
2 parents 47917f5 + 8ea9f3a commit 4696b84
Show file tree
Hide file tree
Showing 25 changed files with 105 additions and 789 deletions.
14 changes: 6 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
VIRTUAL_ENV ?= venv
ACTIVATE_PATH=$(VIRTUAL_ENV)/bin/activate
PIP=$(VIRTUAL_ENV)/bin/pip
PYTHON_MAJOR_VERSION=3
PYTHON_MINOR_VERSION=7
PYTHON_VERSION=$(PYTHON_MAJOR_VERSION).$(PYTHON_MINOR_VERSION)
PYTHON_MAJOR_MINOR=$(PYTHON_MAJOR_VERSION)$(PYTHON_MINOR_VERSION)
PYTHON_WITH_VERSION=python$(PYTHON_VERSION)
PYTHON=$(VIRTUAL_ENV)/bin/python
ISORT=$(VIRTUAL_ENV)/bin/isort
Expand Down Expand Up @@ -51,18 +49,18 @@ endif
all: virtualenv

system_dependencies:
sudo apt update -qq > /dev/null && sudo apt -qq install --yes --no-install-recommends $(SYSTEM_DEPENDENCIES_BASE)
apt update -qq > /dev/null && sudo apt -qq install --yes --no-install-recommends $(SYSTEM_DEPENDENCIES_BASE)

system_dependencies/linux: system_dependencies
sudo apt update -qq > /dev/null && sudo apt -qq install --yes --no-install-recommends $(SYSTEM_DEPENDENCIES_LINUX)
apt update -qq > /dev/null && sudo apt -qq install --yes --no-install-recommends $(SYSTEM_DEPENDENCIES_LINUX)

system_dependencies/android: system_dependencies
sudo apt update -qq > /dev/null && sudo apt -qq install --yes --no-install-recommends $(SYSTEM_DEPENDENCIES_ANDROID)
apt update -qq > /dev/null && sudo apt -qq install --yes --no-install-recommends $(SYSTEM_DEPENDENCIES_ANDROID)

$(VIRTUAL_ENV):
virtualenv --python $(PYTHON_WITH_VERSION) $(VIRTUAL_ENV)
$(PIP) install Cython==0.28.6
$(PIP) install --timeout 120 --requirement requirements.txt
$(PIP) install --requirement requirements.txt

virtualenv: $(VIRTUAL_ENV)

Expand All @@ -88,7 +86,7 @@ lint/flake8: virtualenv
$(FLAKE8) $(SOURCES)

lint/mypy: virtualenv
@$(MYPY) --ignore-missing-imports $(shell find src/etherollapp/ -name "*.py")
$(MYPY) --ignore-missing-imports $(shell find src/etherollapp/ -name "*.py")

lint: lint/isort-check lint/flake8 lint/mypy

Expand All @@ -108,7 +106,7 @@ clean:
find . -type d -name "*.egg-info" -exec rm -r {} +

clean/venv: clean
rm -rf $(VIRTUAL_ENV) .tox/
rm -rf $(VIRTUAL_ENV)

buildozer/android/debug:
@if test -n "$$CI"; then sed 's/log_level = [0-9]/log_level = 1/' -i buildozer.spec; fi; \
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<a href="https://f-droid.org/packages/com.github.andremiras.etheroll">
<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" height="75">
</a>
<a href="https://github.com/AndreMiras/EtherollApp/releases/tag/v2019.1101">
<a href="https://github.com/AndreMiras/EtherollApp/releases/tag/v2020.0322">
<img src="https://www.livenettv.to/img/landing-page-1/google-play.png" height="75">
</a>

Expand Down Expand Up @@ -51,3 +51,7 @@ And debug with `logcat`.
```sh
buildozer android adb -- logcat
```

## Documentation
Find out more browsing the documentation directory:
https://github.com/AndreMiras/EtherollApp/tree/develop/docs/
13 changes: 8 additions & 5 deletions buildozer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ package.domain = com.github.andremiras
source.dir = src

# (list) Source files to include (let empty to include all the files)
source.include_exts = py,png,jpg,kv,atlas,md,json
source.include_exts = py,png,jpg,kv,atlas,md,json,env

# (list) List of inclusions using pattern matching
#source.include_patterns = assets/*,images/*.png
Expand Down Expand Up @@ -42,11 +42,12 @@ requirements =
android,
attrdict==2.0.0,
certifi==2018.10.15,
cffi,
cffi==1.13.2,
chardet==3.0.4,
cytoolz==0.9.0,
eth-abi==2.0.0,
eth-account==0.4.0,
eth-accounts==20191226,
eth-hash==0.2.0,
eth-keyfile==0.5.1,
eth-keys==0.2.0b3,
Expand All @@ -55,6 +56,7 @@ requirements =
eth-utils==1.7.0,
gevent,
hexbytes==0.1.0,
hostpython3==3.7.1,
https://github.com/corpetty/py-etherscan-api/archive/cb91fb3.tar.gz,
idna==2.7,
Kivy==1.11.1,
Expand All @@ -67,19 +69,20 @@ requirements =
openssl,
oscpy==0.3.0,
parsimonious==0.8.1,
Pillow==5.2.0,
Pillow==7.0.0,
plyer==1.3.1,
pycryptodome==3.4.6,
pyetheroll==20191108,
pyetheroll==20200320,
Pygments==2.2.0,
python-dotenv==0.12.0,
python3==3.7.1,
pyzbar==0.1.8,
qrcode==6.0,
raven==6.10.0,
requests==2.20.0,
requests-cache==0.4.13,
rlp==1.0.3,
setuptools==40.9.0,
setuptools==42.0.2,
toolz==0.9.0,
urllib3==1.24.1,
web3==5.2.0
Expand Down
6 changes: 4 additions & 2 deletions dockerfiles/Dockerfile-android
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ WORKDIR ${WORK_DIR}

# install system dependencies
# install buildozer & dependencies and enforces buildozer master (d483847) until next release
# TODO: d483847 -> a294071
COPY Makefile /tmp/Makefile
RUN sudo make --file /tmp/Makefile system_dependencies/android && \
sudo rm /tmp/Makefile && \
sudo rm -rf /var/lib/apt/lists/* && \
pip3 install --no-cache-dir --upgrade \
Cython==0.28.6 \
https://github.com/kivy/buildozer/archive/d483847.zip && \
Cython==0.28.6 \
'virtualenv<20' \
https://github.com/kivy/buildozer/archive/a294071.zip && \
rm -rf ~/.cache/

COPY . ${WORK_DIR}
4 changes: 2 additions & 2 deletions dockerfiles/Dockerfile-linux
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ ENV LANG="en_US.UTF-8" \
# install minimal system dependencies
RUN apt update -qq > /dev/null && apt install -qq --yes --no-install-recommends \
make \
sudo && \
rm -rf /var/lib/apt/lists/*
sudo \
&& rm -rf /var/lib/apt/lists/*

# prepare non root env, with sudo access and no password
RUN useradd --create-home --home-dir ${HOME_DIR} --shell /bin/bash ${USER} && \
Expand Down
18 changes: 6 additions & 12 deletions docs/HowToTransferOut.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
# How to transfer out

Transfering ether to a different address is currently not possible within the application.
However since the keystore is on device, it's possible to access it to withdraw coins.
From the navigation drawer and select "Wallet".

You can connect your computer to your mobile device and copy over the keystore folder.
Or you can also do it from you mobile phone with any [file manager](https://play.google.com/store/search?q=file) and go to the keystore folder.
If you don't know where you keystore folder is, check from the EtherollApp.
Open the side bar, go to "Wallet" then "Import". The keystore folder location is listed here.
It's usually `/sdcard/etheroll/.config/pyethapp/keystore/`
![Navigation drawer](https://i.imgur.com/6H0b4hu.png)

Then you can use that keystore file with any wallet such as [MEW](https://www.myetherwallet.com) or [MyCrypto](https://mycrypto.com).

In the wallet screen click the "Send" tab.

See related issues:
![Send subscreen](https://i.imgur.com/SOHmSyL.png)

- <https://github.com/AndreMiras/EtherollApp/issues/80>
- <https://github.com/AndreMiras/EtherollApp/issues/95>
- <https://github.com/AndreMiras/EtherollApp/issues/105>
Make sure you have the correct source and receivers accounts selected.
Put the amount to transfer out and click "Send". Note it's possible to adjust gas fees from the "Settings" menu if needed.
7 changes: 7 additions & 0 deletions docs/Release.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ git push origin master:master
git push --tags
```

## PyPI
We also publish the desktop app to PyPI on https://pypi.org/project/EtherollApp/ via:
```sh
make release/build
make release/upload
```

## GitHub

Got to GitHub [Release/Tags](https://github.com/AndreMiras/EtherollApp/tags), click "Add release notes" for the tag just created.
Expand Down
19 changes: 19 additions & 0 deletions docs/Settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Settings screen

This screen is used to update global application settings.

![Settings screen](https://i.imgur.com/tzUk8KR.png)


## Network
Selects between Mainnet and Testnet (Ropsten) which network should be used for rolling and tranfering out.

## Gas price
Sets the gas price for all the transactions.
The higher the gas price, the faster the transaction to the contract is validated.
Note that this the gas price used for the Oracle (bet resolution) transaction can't be updated from the app.
To adjust for the best price e recommend using <https://www.ethgasstation.info/>.

## Persist keystore
This should be enable to backup the (encrypted) private key to the external phone storage (SD card).
Make sure this is always enabled (like in the screenshot) to not lose your key on app uninstall or update.
6 changes: 4 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
eth-account<0.5.0
eth-accounts==20191226
eth-utils==1.7.0
flake8
future
Expand All @@ -12,10 +13,11 @@ kivyunittest==0.1.8
layoutmargin==20190911
mypy==0.730
oscpy==0.3.0
Pillow==5.2.0
Pillow==7.0.0
plyer==1.3.1
pyetheroll==20191108
pyetheroll>=20200320
pytest
python-dotenv==0.12.0
pyzbar==0.1.8
qrcode==6.0
raven==6.10.0
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ def read(fname):
},
'python_requires': '>=3',
'install_requires': (
'eth-account<0.4.0',
'eth-account<=0.4.0',
'eth-utils',
'kivy-garden.kivymd',
'layoutmargin',
'oscpy',
'pyetheroll',
'pyetheroll>=20200320',
'python-dotenv',
'raven',
'requests-cache',
'web3',
Expand Down
5 changes: 5 additions & 0 deletions src/etherollapp/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change Log


## [v2020.0322]

- Support Infura API key, refs #170


## [v2019.1108]

- Fix Kivy low FPS performances issue
Expand Down
1 change: 0 additions & 1 deletion src/etherollapp/api_key.json

This file was deleted.

2 changes: 2 additions & 0 deletions src/etherollapp/env.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ETHERSCAN_API_KEY=E9K4A1AC8H1V3ZIR1DAIKZ6B961CRXF2DR
WEB3_INFURA_PROJECT_ID=90d5bc91c74e4c6899001dc189da590f
94 changes: 0 additions & 94 deletions src/etherollapp/ethereum_utils.py

This file was deleted.

4 changes: 2 additions & 2 deletions src/etherollapp/etheroll/constants.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os

BASE_DIR = os.path.dirname(os.path.dirname(__file__))
BASE_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
# default pyethapp keystore path
KEYSTORE_DIR_SUFFIX = ".config/pyethapp/keystore/"
API_KEY_PATH = os.path.join(BASE_DIR, 'api_key.json')
ENV_PATH = os.path.join(BASE_DIR, 'env.env')
NO_ACCOUNT_SELECTED_STRING = 'No account selected'
Loading

0 comments on commit 4696b84

Please sign in to comment.