Skip to content
Snippets Groups Projects
Commit 9c05d90c authored by Agustin Sacramento's avatar Agustin Sacramento
Browse files

Merge branch 'desarrollo' into 'master'

Desarrollo

See merge request Blockchain/TsaAPI!2
parents 3b15593b 28649de2
No related branches found
No related tags found
No related merge requests found
Showing
with 163 additions and 4 deletions
# Created by .ignore support plugin (hsz.mobi)
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries
# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
# Gradle:
.idea/**/gradle.xml
.idea/**/libraries
# CMake
cmake-build-debug/
# Mongo Explorer plugin:
.idea/**/mongoSettings.xml
## File-based project format:
*.iws
## Plugin-specific files:
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
# Translations
*.mo
*.pot
# Django stuff:
*.log
.static_storage/
.media/
local_settings.py
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
TsaApi/local_settings.py
db.sqlite3 db.sqlite3
.idea .idea
TsaApi/local_settings.py TsaApi/local_settings.py
......
File added
File added
File added
File added
File added
File added
local_settings_dev.py
\ No newline at end of file
File added
...@@ -26,8 +26,8 @@ ACCOUNT_ADDRESS = '0xac952ae0716e8aded07dda498f182f4983af682a' ...@@ -26,8 +26,8 @@ ACCOUNT_ADDRESS = '0xac952ae0716e8aded07dda498f182f4983af682a'
#Contracts info #Contracts info
CONTRACTS = { CONTRACTS = {
'01':{ '01':{
'address': '0x88933138A9Ef6474ee4f255A6395210F4f014d6B', 'address': '0x7cbf323520d6fda0858b85dc357db6143fbe997b',
'abi': [{"constant":True,"inputs":[{"name":"ots","type":"string"}],"name":"getHash","outputs":[{"name":"","type":"string"}],"payable":False,"stateMutability":"view","type":"function"},{"constant":True,"inputs":[{"name":"ots","type":"string"}],"name":"getBlockNumber","outputs":[{"name":"","type":"uint256"}],"payable":False,"stateMutability":"view","type":"function"},{"constant":True,"inputs":[{"name":"ots","type":"string"},{"name":"file_hash","type":"string"}],"name":"verify","outputs":[{"name":"","type":"bool"}],"payable":False,"stateMutability":"view","type":"function"},{"constant":False,"inputs":[{"name":"ots","type":"string"},{"name":"file_hash","type":"string"}],"name":"stamp","outputs":[],"payable":False,"stateMutability":"nonpayable","type":"function"}], 'abi': [ { "constant": False, "inputs": [], "name": "selfDestroy", "outputs": [], "payable": False, "stateMutability": "nonpayable", "type": "function" }, { "constant": False, "inputs": [ { "name": "ots", "type": "string" }, { "name": "file_hash", "type": "string" } ], "name": "stamp", "outputs": [], "payable": False, "stateMutability": "nonpayable", "type": "function" }, { "anonymous": False, "inputs": [ { "indexed": True, "name": "from", "type": "address" }, { "indexed": True, "name": "hash", "type": "string" }, { "indexed": True, "name": "ots", "type": "string" } ], "name": "Stamped", "type": "event" }, { "anonymous": False, "inputs": [ { "indexed": True, "name": "from", "type": "address" }, { "indexed": True, "name": "contract_address", "type": "address" } ], "name": "Deploy", "type": "event" }, { "anonymous": False, "inputs": [ { "indexed": True, "name": "from", "type": "address" }, { "indexed": True, "name": "contract_address", "type": "address" } ], "name": "SelfDestroy", "type": "event" }, { "inputs": [], "payable": False, "stateMutability": "nonpayable", "type": "constructor" }, { "constant": True, "inputs": [ { "name": "ots", "type": "string" } ], "name": "getBlockNumber", "outputs": [ { "name": "", "type": "uint256" } ], "payable": False, "stateMutability": "view", "type": "function" }, { "constant": True, "inputs": [ { "name": "ots", "type": "string" } ], "name": "getHash", "outputs": [ { "name": "", "type": "string" } ], "payable": False, "stateMutability": "view", "type": "function" }, { "constant": True, "inputs": [ { "name": "ots", "type": "string" }, { "name": "file_hash", "type": "string" } ], "name": "verify", "outputs": [ { "name": "", "type": "bool" } ], "payable": False, "stateMutability": "view", "type": "function" } ],
}, },
} }
......
File added
File added
File added
File added
File added
File added
File added
File added
...@@ -108,7 +108,7 @@ class Verify(APIView): ...@@ -108,7 +108,7 @@ class Verify(APIView):
required=True, required=True,
location='form', location='form',
schema=coreschema.String(), schema=coreschema.String(),
description='El recibo digital recibido al hacer el stamp del archivo encodeado en sha256', description='El recibo digital recibido al hacer el stamp del archivo encodeado en sha256',
) )
]) ])
...@@ -181,4 +181,4 @@ class Verify(APIView): ...@@ -181,4 +181,4 @@ class Verify(APIView):
return Response({_('status'): _('failure'), _('messages'): _('could_not_connect')}, status=status.HTTP_503_SERVICE_UNAVAILABLE) return Response({_('status'): _('failure'), _('messages'): _('could_not_connect')}, status=status.HTTP_503_SERVICE_UNAVAILABLE)
except Exception as e: except Exception as e:
client.captureException() client.captureException()
return Response({_('status'): _('failure'), _('messages'): _('operation_failed')}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) return Response({_('status'): _('failure'), _('messages'): _('operation_failed')}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
\ No newline at end of file
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment