NEO smart contract for BlockAuth.
- Official NEO smart contract for BlockAuth.
- Written in Python.
See releases for full details:
2f228c37687d474d0a65d7d82d4ebf8a24a3fcbc
The smart contract can be compiled using the coz/neo-boa-compiler
Docker image
from neo-compiler-docker:
make compile
The smart contract takes two arguments:
- alpha: a UUID, used as the first part of the key for
Storage.Put()
.- string
- NEO parameter value:
07
- Example:
50801e46-a161-4297-8771-61dbebe9f19d
- beta: a UUID, used as the second part of the key for
Storage.Put()
.- string
- NEO parameter value:
07
- Example:
f88d2cda-2da2-4c6a-95d5-b31f06433604
The smart contract returns an integer (parameter value 02
), which repesents if the
invocation was a success. The following values can occur:
200
- Success.101
- Error, as alpha parameter has an invalid RFC UUID format.102
- Error, as beta parameter has an invalid RFC UUID format.103
- Error, the hash of the current transaction is invalid.
The smart contract can be tested locally using neo-python. The following command can be used:
build /path/to/blockauth/smart-contract/src/BlockAuth.py test 0707 02 True ae6d0adc-5168-4cc4-8ba0-741380e68e35 f88d2cda-2da2-4c6a-95d5-b31f06433604
Check out the BlockAuth Demo.
🔐