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/lapp 5 implement minttoken tests 2 #5

Merged
merged 136 commits into from
Nov 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
dcfa8cf
Add .gitignore
pscott Apr 23, 2021
d5e51f5
Initial commit
pscott May 7, 2021
9cbd190
Add submodule
pscott May 7, 2021
a6c244b
Add source code
pscott May 7, 2021
2dc90a7
fix warnings
pscott May 7, 2021
9d4141a
Add tests
pscott May 7, 2021
20bf8c3
Add elfs for 1.6
pscott May 7, 2021
7d27ed3
Add megaswap test
pscott May 7, 2021
2a803d0
Add setExternalPlugin command to tests
pscott May 7, 2021
8b2b9bc
Fix test, remove comments
pscott May 7, 2021
c004fb0
Have SELECTOR array respect the same order as corresponding enum
pscott May 9, 2021
9975383
Remove need to skip leading zeros
pscott May 9, 2021
a49ae4b
Update ethereum plugin sdk
pscott May 9, 2021
f48aa29
Add default to selectorIndex switch
pscott May 9, 2021
435d22a
Update binaries
pscott May 9, 2021
c99ba2e
Remove -k 2.0 from speculos
pscott May 9, 2021
b685275
Remove \&
pscott May 9, 2021
4725dc2
Update elfs
pscott May 9, 2021
a73924f
Remove -k 2.0 for simpleswap
pscott May 9, 2021
e9e587d
Fix enum and array selector order
pscott May 10, 2021
5f98660
Update paraswap elf
pscott May 10, 2021
13b3022
Add APDUS to tests
pscott May 10, 2021
96b744a
Add parapswap icon and update binary
pscott May 10, 2021
78090d5
Remove compound giff
pscott May 11, 2021
643b1a6
Add paraswap nanos gif
pscott May 11, 2021
5704c4e
Update paraswap elf
pscott May 11, 2021
0e6fe40
Merge swap/buy with swap on uni / buy on uni
pscott May 11, 2021
d167e13
Merge initialization for buy/swap on uni fork
pscott May 11, 2021
7b8553f
Update comment about skipping value
pscott May 11, 2021
da46c58
Rename list_len to array_len: fix checkpoint value for parsing
pscott May 11, 2021
5bdb00e
Update elfs
pscott May 11, 2021
99d2408
Add apdus and links for other tests
pscott May 11, 2021
c06d053
Clang-format
pscott May 11, 2021
796ff6d
Update plugin sdk
pscott May 11, 2021
1fd2e5f
Use SHARED_CTX_FIELD_SIZE
pscott May 11, 2021
c3203a8
Throw 0x6503
pscott May 11, 2021
e18a7d2
Split UI query and use safer functions
pscott May 11, 2021
d06946f
Add comments about skipping fields
pscott May 11, 2021
63337f3
Clang-format
pscott May 11, 2021
11fc5bb
Rename CI to Paraswap: Update CI to 2.0.0-1: Add submodules
pscott May 12, 2021
200138f
FAdd SDK_SOURCE_PATH
pscott May 12, 2021
865d4e0
Use Receive Min instead of Receive min
pscott May 12, 2021
f8fb124
Add icon for nanox
pscott May 12, 2021
8f383f8
check context size on plugin initialization
jibeee May 17, 2021
06bd734
remove use of SHARED_CTX_FIELD_1_SIZE and SHARED_CTX_FIELD_2_SIZE
jibeee May 17, 2021
5869cd5
Check plugin interface version on startup
jibeee May 17, 2021
45883a5
Merge pull request #1 from LedgerHQ/security-review
pscott May 18, 2021
d13fea1
Update plugin sdk
pscott May 18, 2021
7a0d2ea
Merge branch 'master' of github.com:LedgerHQ/app-plugin-paraswap
pscott May 18, 2021
55e27a4
Use strncpy temporarily
pscott May 18, 2021
dff20d0
Bump version to 1.0.1
pscott May 18, 2021
ace0114
Update readme
pscott May 18, 2021
e924b7c
Remove newline
pscott May 18, 2021
3a2c378
Update documentation
pscott May 18, 2021
eea5563
Comment about readme
pscott May 18, 2021
a430ef6
Update binaries
pscott May 18, 2021
5977552
Fix typo
pscott May 18, 2021
e65db22
Update tests
pscott May 18, 2021
4ea513b
Remove debug_write
pscott May 19, 2021
402ae13
update binaries for tests
pscott May 19, 2021
26fb24b
Bump 1.0.2
pscott May 19, 2021
162a5de
Update plugin sdk
pscott May 19, 2021
b36c495
Bump to 1.0.3
pscott May 19, 2021
d2cf246
Update plugin sdk
pscott May 20, 2021
5687766
Bump version to 1.0.4
pscott May 20, 2021
d063e63
Add support for unknown tokens; Add debug_write function; Move ui to …
pscott May 20, 2021
9411341
Update version and plugin sdk
pscott May 20, 2021
6a8cbb6
Use defines for default_decimal and default_ticker
pscott May 20, 2021
fc6c7b1
Fix typo in comments
pscott May 28, 2021
0783c68
Add comments for debug_write
pscott Jun 8, 2021
67727d9
Update plugin sdk
pscott Jun 8, 2021
ac38211
Bump to 1.0.6 and update Changelog
pscott Jun 8, 2021
b9125cf
adding missing BLE SDK lib includes
Jun 30, 2021
ce28989
Add semi-hosted PRINTF
pscott Jul 6, 2021
ed47690
Clang-format
pscott Jul 6, 2021
bb883d0
Use strlcpy instead of strncpy
pscott Jul 7, 2021
13971c0
Update docker image
pscott Jul 7, 2021
06c2e5e
Remove includes of string.h
pscott Jul 8, 2021
afa165b
Remove include of /usr/include
pscott Jul 8, 2021
c1bfdbf
Update CI docker image
TamtamHero Jul 13, 2021
ea53c31
Update plugin sdk submodule
TamtamHero Sep 1, 2021
dd54ff8
Update to latest plugin SDK
TamtamHero Sep 3, 2021
fcd909d
Update test elfs
TamtamHero Sep 3, 2021
5c1c0bf
Update plugin interface version
TamtamHero Sep 3, 2021
4ab54e8
Add helper script to build test elfs
TamtamHero Sep 3, 2021
457f364
Update Zemu & hw-app-eth
TamtamHero Sep 3, 2021
eca698e
Snapshot helpers for tests
TamtamHero Sep 3, 2021
e8cb66a
Remove eth2 stuff
pscott Sep 3, 2021
6f905ac
Update tests
pscott Sep 3, 2021
c19c65e
Update to latest plugin SDK
TamtamHero Sep 3, 2021
6217a0e
Update plugin interface version
TamtamHero Sep 3, 2021
87d0035
Bump version 1.0.8
TamtamHero Sep 7, 2021
eb8a029
Remove unused printf
pscott Sep 8, 2021
ecf4023
Update tests and binaries
pscott Sep 8, 2021
b332c0c
Remove eth2 reference
pscott Sep 8, 2021
ac8dc9f
Add security check for ETH being sent when no eth is being swapped
pscott Sep 8, 2021
b6c697a
Bump to 1.0.8
pscott Sep 8, 2021
018cf80
Add debug statement on failure
pscott Sep 8, 2021
0fdc35e
Merge branch 'master' into fix-tests
pscott Sep 8, 2021
6987a0f
Merge pull request #2 from LedgerHQ/fix-tests
TamtamHero Sep 8, 2021
727e2c1
Bump version 1.0.9
TamtamHero Sep 8, 2021
9a1154c
Update derivaiton path
pscott Sep 16, 2021
d385d64
Restrict derivation to secp256k1
pscott Sep 17, 2021
7f2bc43
feat: migration including v5 methods
n4l5u0r Oct 19, 2021
f12c855
Merge pull request #1 from blooo-io/feat/paraswap-v5-migration
n4l5u0r Oct 19, 2021
c9fb9c8
Upgrade sdk version and fix incorrect ticker for sidechains
TamtamHero Oct 12, 2021
d3b5778
Update test elfs
TamtamHero Oct 12, 2021
eb7f1d7
Upgrade hw-app-eth test dependancy
TamtamHero Oct 12, 2021
7a64fde
Update tests
TamtamHero Oct 12, 2021
c46f735
Bump version 1.1.2
TamtamHero Oct 12, 2021
a71e68d
Merge pull request #3 from LedgerHQ/fix-plugins-ticker
TamtamHero Oct 28, 2021
065d74e
fix(sonar): rollback sonar RSPEC-5813
n4l5u0r Oct 29, 2021
6e5cfaa
Merge pull request #2 from blooo-io/rollback-secure-len-RSPEC-5813
n4l5u0r Oct 29, 2021
8b2cff2
fix: switch from strlen to strnlen
n4l5u0r Oct 29, 2021
10b976a
Merge pull request #3 from blooo-io/switch-to-strnlen
n4l5u0r Oct 29, 2021
56ed37f
fix: Change max length strnlen in parsing data
n4l5u0r Nov 1, 2021
ba64fd4
Merge pull request #4 from blooo-io/fix-changes-max-length-strnlen
n4l5u0r Nov 1, 2021
0f310c9
feat(dependency): alignement with app-ethereum 1.9.10
n4l5u0r Nov 6, 2021
e04cfc5
Merge branch 'master' of https://github.com/LedgerHQ/app-plugin-paras…
n4l5u0r Nov 6, 2021
e8e4dd3
fix(merge): merge confict fix, scope reduced to nanos only
n4l5u0r Nov 8, 2021
f16f42f
Merge pull request #6 from blooo-io/merge-conflict-resolution
n4l5u0r Nov 8, 2021
0c90a8b
feat: enhanced ci actions
n4l5u0r Nov 16, 2021
8cf347a
fix: fix branch name
n4l5u0r Nov 16, 2021
87d0fbd
fix: removed strlcopy
n4l5u0r Nov 16, 2021
864cdcd
refactor: removal prepend_ticker
n4l5u0r Nov 16, 2021
53ac9c5
ci: fix on lint workflow action
n4l5u0r Nov 16, 2021
c06d4a1
Merge pull request #7 from blooo-io/refactor-code-optimization
n4l5u0r Nov 16, 2021
2807830
mint token test unstable version
lisaoulmi Nov 23, 2021
15de1e2
poap plugin unstable version
lisaoulmi Nov 23, 2021
5148616
Merge branch 'poap_plugin_unstable_version' into feat/LAPP-5-implemen…
lisaoulmi Nov 23, 2021
93bb19f
mint token(bug fix tests): unstable version
lisaoulmi Nov 23, 2021
382f730
test : removed signed in mint token test
lisaoulmi Nov 24, 2021
53ba097
test: removed useless comments
lisaoulmi Nov 24, 2021
48a4270
Merge branch 'main' into feat/LAPP-5-implement-minttoken-tests-2
lisaoulmi Nov 24, 2021
6558b49
test : fix linter
lisaoulmi Nov 24, 2021
de45202
Merge branch 'feat/LAPP-5-implement-minttoken-tests-2' of https://git…
lisaoulmi Nov 24, 2021
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
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "ethereum-plugin-sdk"]
path = ethereum-plugin-sdk
url = https://github.com/LedgerHQ/ethereum-plugin-sdk
url = git@github.com:LedgerHQ/ethereum-plugin-sdk.git
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.2](https://github.com/ledgerhq/app-ethereum/compare/1.1.1...1.1.2) - 2021-10-12

### Fixed

- Network ticker is correctly displayed for sidechains

## [1.1.1](https://github.com/ledgerhq/app-ethereum/compare/1.1.0...1.1.1) - 2021-9-17

### Fixed

- Fixed derivation curve access

## [1.1.0](https://github.com/ledgerhq/app-ethereum/compare/1.0.6...1.1.0) - 2021-9-16

### Added

- Update to work with the latest plugin sdk

### Fixed

- Fixed derivation path access

## [1.0.6] - 2021-06-08

### Added

- Inital version of the brand new Paraswap plugin for Ethereum application.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Ledger Plugin App Poap

## Formatting

The C source code is expected to be formatted with `clang-format` 11.0.0 or higher.
The C source code is expected to be formatted with `clang-format` 11.0.0 or higher.
Binary file added icons/nanos_app_paraswap.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/nanox_app_paraswap.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 1 addition & 7 deletions src/handle_query_contract_ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ static void set_send_ui(ethQueryContractUI_t *msg, poap_parameters_t *context) {
msg->result = ETH_PLUGIN_RESULT_ERROR;
return;
}
// amountToString(context->amount_sent,
// sizeof(context->amount_sent),
// context->decimals_sent,
// context->ticker_sent,
// msg->msg,
// msg->msgLength);
}
// Set UI for "Receive" screen.
static void set_receive_ui(ethQueryContractUI_t *msg, poap_parameters_t *context) {
Expand Down Expand Up @@ -103,7 +97,7 @@ void handle_query_contract_ui(void *parameters) {
set_beneficiary_ui(msg, context);
break;
case BENEFICIARY_SCREEN:
set_warning_ui(msg, context);
set_beneficiary_ui(msg, context);
break;
default:
PRINTF("Received an invalid screenIndex\n");
Expand Down
2 changes: 1 addition & 1 deletion src/poap_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#define RUN_APPLICATION 1

#define NUM_POAP_SELECTORS 1
#define SELECTOR_SIZE 4

#define PLUGIN_NAME "Poap"

Expand All @@ -30,6 +29,7 @@ typedef enum {

// Would've loved to make this an enum but we don't have enough room because enums are `int` and not
// `uint8_t`.

#define EVENT_ID 0
#define TOKEN_RECEIVED 1
#define BENEFICIARY 2
Expand Down
10 changes: 5 additions & 5 deletions tests/build_local_test_elfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,30 @@ cd ..

echo "*Building elfs for Nano S..."

echo "**Building app-plugin for Nano S..."
echo "**Building app-poap for Nano S..."
make clean BOLOS_SDK=$NANOS_SDK
make -j DEBUG=1 BOLOS_SDK=$NANOS_SDK
cp bin/app.elf "tests/elfs/poap_nanos.elf"

echo "**Building app-ethereum for Nano S..."
cd $APP_ETHEREUM
make clean BOLOS_SDK=$NANOS_SDK
make -j DEBUG=1 BYPASS_SIGNATURES=1 BOLOS_SDK=$NANOS_SDK CHAIN=ethereum
make -j DEBUG=1 BOLOS_SDK=$NANOS_SDK CHAIN=ethereum BYPASS_SIGNATURES=1 ALLOW_DATA=1
cd -
cp "${APP_ETHEREUM}/bin/app.elf" "tests/elfs/ethereum_nanos.elf"


# echo "*Building elfs for Nano X..."

# echo "**Building plugin for Nano X..."
# echo "**Building app-poap for Nano X..."
# make clean BOLOS_SDK=$NANOX_SDK
# make -j DEBUG=1 BOLOS_SDK=$NANOX_SDK
# cp bin/app.elf "tests/elfs/plugin_nanox.elf"
# cp bin/app.elf "tests/elfs/poap_nanox.elf"

# echo "**Building app-ethereum for Nano X..."
# cd $APP_ETHEREUM
# make clean BOLOS_SDK=$NANOX_SDK
# make -j DEBUG=1 BYPASS_SIGNATURES=1 BOLOS_SDK=$NANOX_SDK CHAIN=ethereum
# make -j DEBUG=1 BOLOS_SDK=$NANOX_SDK CHAIN=ethereum BYPASS_SIGNATURES=1 ALLOW_DATA=1
# cd -
# cp "${APP_ETHEREUM}/bin/app.elf" "tests/elfs/ethereum_nanox.elf"

Expand Down
Empty file modified tests/elfs/ethereum_nanos.elf
100644 → 100755
Empty file.
Empty file modified tests/elfs/ethereum_nanox.elf
100644 → 100755
Empty file.
Binary file modified tests/elfs/poap_nanos.elf
100644 → 100755
Binary file not shown.