Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: native-staking; pytest; squash #4

Open
wants to merge 1 commit into
base: develop-staking
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
Language: Cpp
BasedOnStyle: Google
AlignOperands: true
BreakStringLiterals: true
ColumnLimit: 80
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
FixNamespaceComments: true
IndentCaseLabels: true
IndentWidth: 4
MaxEmptyLinesToKeep: 1
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: true
UseTab: Never
---
Language: Proto
BasedOnStyle: LLVM
17 changes: 12 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
{
"python.linting.pylintEnabled": false,
"python.linting.pylamaEnabled": true,
"python.linting.pylamaEnabled": false,
"python.linting.enabled": true,
"files.associations": {
"*.h": "c",
".clang-tidy": "yaml",
"string_view": "c",
"regex": "c"
"*.h": "c",
".clang-tidy": "yaml",
"string_view": "c",
"regex": "c",
"system_error": "c",
"array": "c",
"functional": "c",
"tuple": "c",
"type_traits": "c",
"utility": "c"
},
"C_Cpp.dimInactiveRegions": false,
"python.linting.mypyEnabled": true,
}
201 changes: 0 additions & 201 deletions LICENSE

This file was deleted.

47 changes: 16 additions & 31 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ DFEFINES += PB_FIELD_32BIT=1

# vendor/printf
DEFINES += PRINTF_DISABLE_SUPPORT_FLOAT PRINTF_DISABLE_SUPPORT_EXPONENTIAL PRINTF_DISABLE_SUPPORT_PTRDIFF_T
DEFINES += PRINTF_NTOA_BUFFER_SIZE=9U PRINTF_FTOA_BUFFER_SIZE=0
DEFINES += PRINTF_FTOA_BUFFER_SIZE=0
# endif

# U2F
Expand Down Expand Up @@ -160,39 +160,24 @@ DEFINES += PB_NO_ERRMSG=1
SOURCE_FILES += $(NANOPB_CORE)
CFLAGS += "-I$(NANOPB_DIR)"

# Build rule for proto files
SOURCE_FILES += proto/BasicTypes.pb.c
SOURCE_FILES += proto/Wrappers.pb.c
SOURCE_FILES += proto/CryptoCreate.pb.c
SOURCE_FILES += proto/Transfer.pb.c
SOURCE_FILES += proto/TransactionBody.pb.c
SOURCE_FILES += proto/TokenAssociate.pb.c
SOURCE_FILES += proto/TokenMint.pb.c
SOURCE_FILES += proto/TokenBurn.pb.c
PB_FILES = $(wildcard proto/*.proto)
C_PB_FILES = $(patsubst %.proto,%.pb.c,$(PB_FILES))
PYTHON_PB_FILES = $(patsubst %.proto,%_pb2.py,$(PB_FILES))

proto/BasicTypes.pb.c: proto/BasicTypes.proto
$(PROTOC) $(PROTOC_OPTS) --nanopb_out=. proto/BasicTypes.proto
# Build rule for C proto files
SOURCE_FILES += $(C_PB_FILES)
$(C_PB_FILES): %.pb.c: $(PB_FILES)
$(PROTOC) $(PROTOC_OPTS) --nanopb_out=. $*.proto

proto/Wrappers.pb.c: proto/Wrappers.proto
$(PROTOC) $(PROTOC_OPTS) --nanopb_out=. proto/Wrappers.proto
# Build rule for Python proto files
$(PYTHON_PB_FILES): %_pb2.py: $(PB_FILES)
$(PROTOC) $(PROTOC_OPTS) --python_out=. --mypy_out=. $*.proto

proto/CryptoCreate.pb.c: proto/BasicTypes.proto
$(PROTOC) $(PROTOC_OPTS) --nanopb_out=. proto/CryptoCreate.proto

proto/Transfer.pb.c: proto/BasicTypes.proto
$(PROTOC) $(PROTOC_OPTS) --nanopb_out=. proto/Transfer.proto

proto/TransactionBody.pb.c: proto/BasicTypes.proto
$(PROTOC) $(PROTOC_OPTS) --nanopb_out=. proto/TransactionBody.proto

proto/TokenAssociate.pb.c: proto/BasicTypes.proto
$(PROTOC) $(PROTOC_OPTS) --nanopb_out=. proto/TokenAssociate.proto

proto/TokenMint.pb.c: proto/BasicTypes.proto
$(PROTOC) $(PROTOC_OPTS) --nanopb_out=. proto/TokenMint.proto

proto/TokenBurn.pb.c: proto/BasicTypes.proto
$(PROTOC) $(PROTOC_OPTS) --nanopb_out=. proto/TokenBurn.proto
.PHONY: python_pb clean_python_pb
c_pb: $(C_PB_FILES)
python_pb: $(PYTHON_PB_FILES)
clean_python_pb:
rm -f $(PYTHON_PB_FILES)

# target to also clean generated proto c files
.SILENT : cleanall
Expand Down
27 changes: 0 additions & 27 deletions README.md

This file was deleted.

43 changes: 0 additions & 43 deletions proto/BasicTypes.proto

This file was deleted.

5 changes: 0 additions & 5 deletions proto/CryptoCreate.proto

This file was deleted.

Loading