Skip to content

Commit

Permalink
Create repo
Browse files Browse the repository at this point in the history
First version of Gnosis Safe services
  • Loading branch information
Uxio0 committed Aug 30, 2018
0 parents commit 9ca52e7
Show file tree
Hide file tree
Showing 26 changed files with 12,131 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
PYTHONPATH=/app/safe_relay_service
C_FORCE_ROOT=true
DEBUG=0
USE_DOCKER=True
DJANGO_SETTINGS_MODULE=config.settings.local
DJANGO_SECRET_KEY=test-secret#-!key
DATABASE_URL=psql://postgres@db:5432/postgres
REDIS_URL=redis://redis/0
CELERY_BROKER_URL=redis://redis/0
ETHEREUM_NODE_URL=http://ganache:8545
SAFE_PERSONAL_CONTRACT_ADDRESS=0xEc7C75C1548765AB51A165873b0B1b71663c1266
SAFE_FUNDER_PRIVATE_KEY=4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d
SAFE_TX_SENDER_PRIVATE_KEY=6cbed15c793ce57650b9877cf6fa156fbef513c4e6134f022a85b1ffdd59b2a1
75 changes: 75 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

.coverage
.vagrant
.idea/
*.pyc
*~

.python-version
*.egg-info
.pytest_cache/
dist/
build/

.ipfs

.idea

venv/
config/settings/dev.py
db.sqlite3
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
language: python
cache: pip
python:
- "3.6"
dist: trusty
services:
- postgresql
env:
global:
- SOURCE_FOLDER=gnosis
- PIP_USE_MIRRORS=true
install:
- pip install -r requirements.txt
- pip install coveralls
- npm install -g [email protected]
script:
- ganache-cli -d -p 8545 --defaultBalanceEther 10000 -a 30 > /dev/null &
- sleep 5
- coverage run --source=$SOURCE_FOLDER manage.py test --settings=config.settings.test
after_success:
- coveralls
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 Gnosis Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
46 changes: 46 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Django Ethereum (gnosis-py)
############################

.. class:: no-web no-pdf

|travis| |coveralls| |python| |django| |pipy|

Django ethereum is a set of helpers for working with
ethereum using Django and Django Rest framework.

It includes:

- Basic serializers (signature, transaction)
- Serializer fields (Ethereum address field, hexadecimal field)
- Model fields (Ethereum address, Ethereum big integer field)
- Signing messages
- Utils for testing

Quick start
-----------

Just run ``pip install gnosis-py`` or add it to your **requirements.txt**

Contributors
------------
- Denís Graña ([email protected])
- Giacomo Licari ([email protected])
- Uxío Fuentefría ([email protected])

.. |travis| image:: https://travis-ci.org/gnosis/gnosis-py.svg?branch=master
:target: https://travis-ci.org/gnosis/gnosis-py
:alt: Travis CI build

.. |coveralls| image:: https://coveralls.io/repos/github/gnosis/gnosis-py/badge.svg?branch=master
:target: https://coveralls.io/github/gnosis/gnosis-py?branch=master
:alt: Coveralls

.. |python| image:: https://img.shields.io/badge/Python-3.6-blue.svg
:alt: Python 3.6

.. |django| image:: https://img.shields.io/badge/Django-2-blue.svg
:alt: Django 2

.. |pipy| image:: https://badge.fury.io/py/gnosis-py.svg
:target: https://badge.fury.io/py/gnosis-py
:alt: Pypi package
Empty file added config/settings/__init__.py
Empty file.
2 changes: 2 additions & 0 deletions config/settings/base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
INSTALLED_APPS = (
)
17 changes: 17 additions & 0 deletions config/settings/local.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from .base import *

SECRET_KEY = 'localkey'
DEBUG = True

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
'LOCATION': '/var/tmp/django_cache',
}
}
25 changes: 25 additions & 0 deletions config/settings/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from .base import *

INSTALLED_APPS += (
)

SECRET_KEY = 'testtest'
DEBUG = True

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'postgres',
'USER': 'postgres',
# 'PASSWORD': '',
'HOST': '127.0.0.1',
'PORT': '5432',
}
}

CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
'LOCATION': '/var/tmp/django_cache',
}
}
1 change: 1 addition & 0 deletions docs/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
recursive-include docs *
Empty file added gnosis/__init__.py
Empty file.
Empty file added gnosis/safe/__init__.py
Empty file.
Loading

0 comments on commit 9ca52e7

Please sign in to comment.