Commit Graph
107 Commits
Author SHA1 Message Date
Alexandre Paillier 2474bdb81a Merge remote-tracking branch 'origin/develop' into HEAD 2022-10-17 11:44:28 +02:00
Clement Bouvet 51e4ab2a6f move some stack utility functions to common 2022-10-14 11:02:11 +02:00
Clement Bouvet 2dd757786d commonise plugins 2022-10-14 10:40:00 +02:00
Alexandre Paillier 971a02dfcf Code space optimization (192 bytes) 2022-09-15 16:49:20 +02:00
Alexandre Paillier edac57df06 Increased memory allocator pool to 8K 2022-09-14 17:27:33 +02:00
Alexandre Paillier ab67ae1cb3 Merge remote-tracking branch 'origin/develop' into HEAD 2022-09-14 17:27:25 +02:00
tjulien-ledgerandGitHub a0d16023d5 Light integration (#334)
* adding XDC

* adding meter

* adding multivac

* adding id4good

* adding tecracoin

* minor typo

* adding apothem

* adding apothem 2

* apothem and tecratestnet on network.c

* fix nettwork.c

* 1st additions

* last additions

* adding fix from develop

* update apothem coin name

* removing id4good

* adding Cronos
2022-09-14 10:50:57 +02:00
Jorge MartinsandGitHub b2ec3eff0a Security review (#331)
* Fix some issues

* add typed_data.c changes

* Make attribution after the check
2022-08-08 13:53:41 +02:00
Alexandre Paillier de9e895ad9 EIP-712 code linting 2022-08-05 18:15:59 +02:00
Alexandre Paillier a375e5b07d Moved the memory allocator and its util functions out of the EIP712 subdirectory and gave it its own compilation flag
Also removed dead code
2022-08-05 18:15:51 +02:00
Alexandre Paillier bbcfe5abc3 Added a util function to convert from byte buffer to uint128_t 2022-08-05 18:15:38 +02:00
Alexandre Paillier 10fbb8d5bc Unify all the hex digits used in the app 2022-08-05 18:15:37 +02:00
Alexandre Paillier f99804de08 Added a signed int256 formatting function 2022-08-05 18:15:37 +02:00
Alexandre Paillier 59d8ace99e Split the uint256 lib into multiple more meaningful files 2022-08-05 18:15:36 +02:00
Alexandre Paillier 50225d72d0 Some const correctness in the uint256 functions 2022-08-05 18:15:36 +02:00
Alexandre Paillier f458fcd6ac Better naming for uint256 type functions 2022-08-05 18:15:36 +02:00
Alexandre Paillier 2fa6379470 Now only compiles full EIP-712 support for capable devices 2022-08-05 17:52:47 +02:00
Jorge Martins 2811917658 Mark pointer to databuffer/workbuffer as const 2022-07-15 12:33:19 +02:00
Jorge Martins e0218520d8 Fix multiple vulnerabilities 2022-07-08 11:12:50 +02:00
BenjyskanandGitHub 3c0ae7e737 add missing variable in processTx's PRINTF (#279) 2022-06-23 11:37:25 +02:00
Alexandre Paillier b483804ff4 adding astar&shiden 2022-06-15 13:35:46 +02:00
tjulien-ledgerandAlexandre Paillier c74ca70a1f adding cube icons + network.c fix 2022-06-15 13:35:46 +02:00
Alexandre Paillier 785cfdc2ea cube 2022-06-15 13:35:44 +02:00
Alexandre Paillier fb28efc012 Removed the helper getNftContractAddress helper function and some NULL checks
Useless since we don't allow NFT signing without the NFT metadata anymore
2022-03-09 16:40:45 +01:00
Alexandre Paillier c548aba364 Unify the include guards accross all header files 2022-03-09 11:52:03 +01:00
Jean-Baptiste Bédrune ed4e10628a Change type of output length in amountToString
Defining out_buffer_size as uint8_t triggers warnings with static
analysers when sizeof() is used on the output buffer.

There is no reason to use uint8_t here.
2022-02-21 23:56:08 +01:00
Jean-Baptiste Bédrune 458ef9af52 Define better prototype for "network" functions 2022-02-21 23:46:54 +01:00
Alexandre Paillier ce2df92741 New common function to get the NFT contract address 2022-02-15 14:33:55 +01:00
fcc3dd6d31 Add support for ERC-721 and ERC-1155 (v3) (#218)
* First draft for erc721 token allowance

* Split ui and provide parameters into their own files

* Print txtype when not supported

* fix compilation for erc721

* Use pluginType

* Add debug statement in compound plugin

* add debug error msg in plugin error

* Add parameter parsing for all methods

* Remove debug logs

* Add SET_APPROVAL_FOR_ALL; Add correct parsing method on contract init

* Add dst_size parameter to copy functions

* Add query contract id code

* format

* Add UIs

* update ethapp.asc

* Change setExternalPlugin to setPlugin; Add support for ERC721

* clang-format

* Fix typo Unconsistent -> Inconsistent

* Add support for 721; use extraInfo

* Add extraInfo to ethpluginQueryConractUI

* Rename extraInfo to item

* Add txFromEtherscan to tests

* Add nft key and temp padding

* Remove comments around HAVE_BYPASS_SIGNATURES

* Rename TESTING_KEY to NFT_TESTING_KEY

* Add comments regarding value of queryContractUI->item

* Fix comment regarding method selector

* Rename provideToken to provideInfo; Update plugin doc

* fix caps of eth_plugin_prepare_provide_info

* fix caps of handle_provide_info

* Use verificationFn insead of hardcoded cx_ecdsa_verify

* Add comments about nftInfo_t and tokenDefinition_t

* Add erc721 test

* Remove comment from plugin interface version

* Fix network_ticker duplicate

* Add setPlugin and provideNFTInfo to doc.asc

* Add back setExternalPlugin; implement new setPlugin

* Update plugin sdk

* Call setPlugin instead of setExternalPlugin

* setPlugin work without checking sig

* Remove printf of displayed fees

* Add working 721 test

* Finalize ERC721 and add simple test

* Display NFT address on set approval and operator

* Support set approval for all for erc721

* Finish UI for set approval for all erc721

* Move copy_parameter and copy_address to eth_plugin_internal; Add tests for erc721

* update plugin sdk

* Add erc1155 plugin and 1155 tests placeholder

* Add restriction for AWS key and setPlugin

* Add NOT_OLD_INTERNAL variant; Add erc_1155_plugin_call

* Fixed compilation warnings (function pointer casting)

Co-authored-by: pscott <[email protected]>
2021-11-22 14:39:36 +01:00
Salvatore IngalaandEdouard Merle f2ec9b296e Small improvements in app size
Signed-off-by: Edouard Merle <[email protected]>
2021-11-17 10:45:35 +01:00
TamtamHeroandEdouard Merle 6bad1c4b05 Fix stark order signatures on LNX 2021-11-17 09:50:03 +01:00
pscott 330dd64338 Add arbitrum to networks 2021-09-14 10:51:16 +02:00
pscott f8f160f809 Merge branch 'kobigurk-clabs-patch-1' into bigger_chainid 2021-09-03 15:15:53 +02:00
TamtamHero 15d729532e Fix broken array 2021-08-31 10:33:46 +02:00
TamtamHero 0d45d2e2d0 Update some prototypes to use chainId value instead of chainConfig structure 2021-08-30 11:02:55 +02:00
TamtamHero 3e25f04d05 Refactoring helper to get printable eth address from hex 2021-08-30 11:00:51 +02:00
kobigurk-clabsandGitHub 913346b9a8 Add Celo mainnet and long-running testnets 2021-08-28 21:49:32 +03:00
pscott 847db91cfb Remove debugging statements 2021-08-27 17:28:24 +02:00
pscott f2ff741767 Increase size of V 2021-08-27 14:47:59 +02:00
pscott 1fbbc33cc0 Fix offest calc in 1191 2021-08-27 11:51:27 +02:00
pscott 94363738fe Move u64_to_string 2021-08-26 13:59:42 +02:00
pscott ef91934b23 Update NETWORK_STRING_MAX_SIZE 2021-08-26 13:21:10 +02:00
pscott b2172e4627 Use uint64_t for chainID 2021-08-26 13:02:07 +02:00
pscott c8bad8b2f8 Remove debug prints; secure copy of chainid into v 2021-08-06 21:07:22 +02:00
pscott c5fb10dd47 Remove check for v length 2021-08-06 15:20:58 +02:00
pscott d04dcd8dc6 Add printf for txtype; Fix txtype init 2021-08-04 17:42:09 +02:00
pscott 24541034c6 Merge branch 'master' into support_eip1559 2021-08-03 12:01:58 +02:00
pscott aa2415125e Remove parsing of sender_r, sender_s and y_parity 2021-07-31 13:03:56 +02:00
Jean-Baptiste Bédruneandpscott c27d59d792 Fix last compilation warnings
Signed-off-by: pscott <[email protected]>
2021-07-27 12:09:22 +02:00
pscottandTamtamHero d541f1f524 Add pointer to msg_sender in Eth_plugin_finalize (#170)
* Add some PRINTF debug statements and fir additional screens init

* Memzero struture and use two pointers less

* Clang-format

* Use ADDRESS_LENGTH where possible; Add printf statements when failing to compare contracts

* clang-format

* Remove 'token1' and 'token2' locals

* Fix typo

* apply clang-format

* Add bip32path to sharedRO for plugins

* Change getEthAddressStringFromKey to accept char instead of uint8_t

* Update ethereum plugin sdk

* Add BYPASS_SIGNATURES compilation option

* Remove bip32path and pathLength from sharedRO; add msg_sender pointer to pluginFinalize.address

* clang format eth_plugin_interface

* Update submodule

* Set address BEFORE making the finalize call

* Update SDK

Co-authored-by: TamtamHero <[email protected]>
2021-07-09 11:46:36 +02:00