forked from kilnfi/app-plugin-kiln
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from LedgerHQ/release_1.4.0
Plugin release 1.4.0
- Loading branch information
Showing
97 changed files
with
1,142 additions
and
394 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Checklist | ||
<!-- Put an `x` in each box when you have completed the items. --> | ||
- [ ] App update process has been followed <!-- See comment below --> | ||
- [ ] Target branch is `develop` <!-- unless you have a very good reason --> | ||
- [ ] Application version has been bumped <!-- required if your changes are to be deployed --> | ||
|
||
<!-- Make sure you followed the process described in https://developers.ledger.com/docs/embedded-app/maintenance/ before opening your Pull Request. | ||
Don't hesitate to contact us directly on Discord if you have any questions ! https://developers.ledger.com/discord --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
name: Check SDK submodule version | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
- develop | ||
pull_request: | ||
|
||
jobs: | ||
job_check_SDK: | ||
name: Check Ethereum plugin SDK submodule is up-to-date | ||
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_check_ethereum_sdk.yml@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,158 +1,25 @@ | ||
#******************************************************************************* | ||
# Ledger App | ||
# (c) 2017 Ledger | ||
# **************************************************************************** | ||
# Ledger Ethereum Plugin Boilerplate | ||
# (c) 2023 Ledger SAS. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
#******************************************************************************* | ||
|
||
ifeq ($(BOLOS_SDK),) | ||
$(error Environment variable BOLOS_SDK is not set) | ||
endif | ||
|
||
include $(BOLOS_SDK)/Makefile.defines | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# **************************************************************************** | ||
|
||
APPNAME = "Kiln" | ||
|
||
ifeq ($(ETHEREUM_PLUGIN_SDK),) | ||
ETHEREUM_PLUGIN_SDK=ethereum-plugin-sdk | ||
endif | ||
|
||
APP_LOAD_PARAMS += --appFlags 0x800 --path "44'/60'" --curve secp256k1 | ||
|
||
APP_LOAD_PARAMS += $(COMMON_LOAD_PARAMS) | ||
|
||
APPVERSION_M = 1 | ||
APPVERSION_N = 3 | ||
APPVERSION_P = 0 | ||
APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)" | ||
|
||
ifeq ($(TARGET_NAME), TARGET_NANOS) | ||
ICONNAME=icons/nanos_app_kiln.gif | ||
else ifeq ($(TARGET_NAME), TARGET_STAX) | ||
ICONNAME=icons/stax_app_kiln.gif | ||
DEFINES += ICONGLYPH=C_stax_kiln_64px | ||
DEFINES += ICONBITMAP=C_stax_kiln_64px_bitmap | ||
GLYPH_FILES += $(ICONNAME) | ||
else | ||
ICONNAME=icons/nanox_app_kiln.gif | ||
endif | ||
|
||
################ | ||
# Default rule # | ||
################ | ||
all: default | ||
|
||
############ | ||
# Platform # | ||
############ | ||
|
||
DEFINES += OS_IO_SEPROXYHAL | ||
DEFINES += HAVE_SPRINTF | ||
DEFINES += LEDGER_MAJOR_VERSION=$(APPVERSION_M) LEDGER_MINOR_VERSION=$(APPVERSION_N) LEDGER_PATCH_VERSION=$(APPVERSION_P) | ||
DEFINES += IO_HID_EP_LENGTH=64 | ||
|
||
DEFINES += UNUSED\(x\)=\(void\)x | ||
DEFINES += APPVERSION=\"$(APPVERSION)\" | ||
CFLAGS += -DAPPNAME=\"$(APPNAME)\" | ||
|
||
ifneq (,$(filter $(TARGET_NAME),TARGET_NANOX TARGET_STAX)) | ||
DEFINES += HAVE_BLE BLE_COMMAND_TIMEOUT_MS=2000 | ||
DEFINES += HAVE_BLE_APDU # basic ledger apdu transport over BLE | ||
endif | ||
|
||
ifeq ($(TARGET_NAME),TARGET_NANOS) | ||
DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=128 | ||
else | ||
DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=300 | ||
endif | ||
|
||
ifneq ($(TARGET_NAME),TARGET_STAX) | ||
DEFINES += HAVE_BAGL | ||
ifneq ($(TARGET_NAME),TARGET_NANOS) | ||
DEFINES += HAVE_GLO096 | ||
DEFINES += HAVE_BAGL BAGL_WIDTH=128 BAGL_HEIGHT=64 | ||
DEFINES += HAVE_BAGL_ELLIPSIS # long label truncation feature | ||
DEFINES += HAVE_BAGL_FONT_OPEN_SANS_REGULAR_11PX | ||
DEFINES += HAVE_BAGL_FONT_OPEN_SANS_EXTRABOLD_11PX | ||
DEFINES += HAVE_BAGL_FONT_OPEN_SANS_LIGHT_16PX | ||
DEFINES += HAVE_UX_FLOW | ||
endif | ||
endif | ||
|
||
# Enabling debug PRINTF | ||
ifneq ($(DEBUG),0) | ||
DEFINES += HAVE_SEMIHOSTED_PRINTF PRINTF=semihosted_printf | ||
CFLAGS += -include src/dbg/debug.h | ||
else | ||
DEFINES += PRINTF\(...\)= | ||
endif | ||
|
||
############## | ||
# Compiler # | ||
############## | ||
ifneq ($(BOLOS_ENV),) | ||
$(info BOLOS_ENV=$(BOLOS_ENV)) | ||
CLANGPATH := $(BOLOS_ENV)/clang-arm-fropi/bin/ | ||
GCCPATH := $(BOLOS_ENV)/gcc-arm-none-eabi-5_3-2016q1/bin/ | ||
else | ||
$(info BOLOS_ENV is not set: falling back to CLANGPATH and GCCPATH) | ||
endif | ||
ifeq ($(CLANGPATH),) | ||
$(info CLANGPATH is not set: clang will be used from PATH) | ||
endif | ||
ifeq ($(GCCPATH),) | ||
$(info GCCPATH is not set: arm-none-eabi-* will be used from PATH) | ||
endif | ||
|
||
CC := $(CLANGPATH)clang | ||
|
||
CFLAGS += -Wno-format-invalid-specifier -Wno-format-extra-args | ||
|
||
AS := $(GCCPATH)arm-none-eabi-gcc | ||
|
||
LD := $(GCCPATH)arm-none-eabi-gcc | ||
LDLIBS += -lm -lgcc -lc | ||
|
||
# import rules to compile glyphs(/pone) | ||
include $(BOLOS_SDK)/Makefile.glyphs | ||
|
||
### variables processed by the common makefile.rules of the SDK to grab source files and include dirs | ||
APP_SOURCE_PATH += src $(ETHEREUM_PLUGIN_SDK) | ||
ifneq ($(TARGET_NAME), TARGET_STAX) | ||
SDK_SOURCE_PATH += lib_ux | ||
endif | ||
ifneq (,$(findstring HAVE_BLE,$(DEFINES))) | ||
SDK_SOURCE_PATH += lib_blewbxx lib_blewbxx_impl | ||
endif | ||
|
||
### initialize plugin SDK submodule if needed | ||
ifneq ($(shell git submodule status | grep '^[-+]'),) | ||
$(info INFO: Need to reinitialize git submodules) | ||
$(shell git submodule update --init) | ||
endif | ||
|
||
load: all | ||
python3 -m ledgerblue.loadApp $(APP_LOAD_PARAMS) | ||
|
||
delete: | ||
python3 -m ledgerblue.deleteApp $(COMMON_DELETE_PARAMS) | ||
|
||
# import generic rules from the sdk | ||
include $(BOLOS_SDK)/Makefile.rules | ||
|
||
|
||
#add dependency on custom makefile filename | ||
dep/%.d: %.c Makefile | ||
# Application version | ||
APPVERSION_M = 1 | ||
APPVERSION_N = 4 | ||
APPVERSION_P = 0 | ||
|
||
listvariants: | ||
@echo VARIANTS NONE kiln | ||
include ethereum-plugin-sdk/standard_plugin.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule ethereum-plugin-sdk
updated
15 files
+68 −0 | CHANGELOG.md | |
+2 −3 | README.md | |
+0 −122 | include/eth_internals.h | |
+0 −182 | include/eth_plugin_interface.h | |
+51 −0 | src/asset_info.h | |
+34 −0 | src/caller_api.h | |
+228 −156 | src/common_utils.c | |
+93 −0 | src/common_utils.h | |
+21 −0 | src/eth_internals.h | |
+224 −0 | src/eth_plugin_interface.h | |
+129 −0 | src/main.c | |
+42 −0 | src/plugin_utils.c | |
+37 −0 | src/plugin_utils.h | |
+43 −0 | src/tx_content.h | |
+59 −0 | standard_plugin.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[app] | ||
build_directory = "./" | ||
sdk = "C" | ||
devices = ["nanos", "nanox", "nanos+"] | ||
|
||
[tests] | ||
pytest_directory = "./tests/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.