From f39bb27ae5077a0f90c0e8c19a8af46c789440d2 Mon Sep 17 00:00:00 2001 From: Z4karia <92750334+Z4karia@users.noreply.github.com> Date: Wed, 1 Mar 2023 11:11:32 +0000 Subject: [PATCH 1/6] feat: implemented new method --- src/contract.c | 19 +++++-- src/handle_finalize.c | 17 +++++- src/handle_init_contract.c | 3 + src/handle_provide_parameter.c | 52 ++++++++++++++++- src/handle_query_contract_id.c | 3 + src/handle_query_contract_ui.c | 100 ++++++++++++++++++++++++++++----- src/ledger_nft_plugin.h | 21 ++++++- 7 files changed, 190 insertions(+), 25 deletions(-) diff --git a/src/contract.c b/src/contract.c index f602f63..bc36740 100644 --- a/src/contract.c +++ b/src/contract.c @@ -24,15 +24,22 @@ static const uint8_t MINT_SIGN_SELECTOR[SELECTOR_SIZE] = {0xf3, 0x92, 0x47, 0xa9 // Selector: 0xa0712d68 static const uint8_t MINT_V2_SELECTOR[SELECTOR_SIZE] = {0xa0, 0x71, 0x2d, 0x68}; +// Function: mintSign (v2) +// Selector: 0x657bb113 +static const uint8_t MINT_SIGN_V2_SELECTOR[SELECTOR_SIZE] = {0x65, 0x7b, 0xb1, 0x13}; + // Plugin uses 0x00000 as a dummy address to reprecent ETH. const uint8_t NULL_ETH_ADDRESS[ADDRESS_LENGTH] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; // Array of all the different nft selectors. -const uint8_t *const LEDGER_NFT_SELECTORS[NUM_SELECTORS] = {MINT_SELECTOR, - PRE_SALE_MINT_SELECTOR, - STABLE_MINT_SIGN_SELECTOR, - STABLE_MINT_SELECTOR, - MINT_SIGN_SELECTOR, - MINT_V2_SELECTOR}; +const uint8_t *const LEDGER_NFT_SELECTORS[NUM_SELECTORS] = { + MINT_SELECTOR, + PRE_SALE_MINT_SELECTOR, + STABLE_MINT_SIGN_SELECTOR, + STABLE_MINT_SELECTOR, + MINT_SIGN_SELECTOR, + MINT_V2_SELECTOR, + MINT_SIGN_V2_SELECTOR, +}; diff --git a/src/handle_finalize.c b/src/handle_finalize.c index 2c744a0..1709ed9 100644 --- a/src/handle_finalize.c +++ b/src/handle_finalize.c @@ -2,9 +2,20 @@ void handle_finalize(void *parameters) { ethPluginFinalize_t *msg = (ethPluginFinalize_t *) parameters; + context_t *context = (context_t *) msg->pluginContext; msg->uiType = ETH_UI_TYPE_GENERIC; - - // 2 additional screens are required to display the `token and `beneficiary` fields - msg->numScreens = 2; + switch (context->selectorIndex) { + case MINT: + case PRE_SALE_MINT: + case STABLE_MINT_SIGN: + case STABLE_MINT: + case MINT_SIGN: + case MINT_V2: + msg->numScreens = 2; + break; + case MINT_SIGN_V2: + msg->numScreens = 4; + break; + } msg->result = ETH_PLUGIN_RESULT_OK; } diff --git a/src/handle_init_contract.c b/src/handle_init_contract.c index e7189c8..bc1da76 100644 --- a/src/handle_init_contract.c +++ b/src/handle_init_contract.c @@ -40,6 +40,9 @@ void handle_init_contract(void *parameters) { case MINT_V2: context->next_param = AMOUNT; break; + case MINT_SIGN_V2: + context->next_param = OFFSET; + break; default: PRINTF("Missing selectorIndex: %d\n", context->selectorIndex); msg->result = ETH_PLUGIN_RESULT_ERROR; diff --git a/src/handle_provide_parameter.c b/src/handle_provide_parameter.c index 90517ef..fc34062 100644 --- a/src/handle_provide_parameter.c +++ b/src/handle_provide_parameter.c @@ -4,6 +4,14 @@ void handle_amount(const ethPluginProvideParameter_t *msg, context_t *context) { copy_parameter(context->amount, msg->parameter, sizeof(context->amount)); } +void handle_token_id(const ethPluginProvideParameter_t *msg, context_t *context) { + copy_parameter(context->token_id, msg->parameter, sizeof(context->token_id)); +} + +void handle_address(const ethPluginProvideParameter_t *msg, context_t *context) { + copy_address(context->address, msg->parameter, sizeof(context->address)); +} + void handle_mint(ethPluginProvideParameter_t *msg, context_t *context) { switch (context->next_param) { case AMOUNT: // tokenA @@ -19,6 +27,44 @@ void handle_mint(ethPluginProvideParameter_t *msg, context_t *context) { } } +void handle_mint_sign_v2(ethPluginProvideParameter_t *msg, context_t *context) { + switch (context->next_param) { + case OFFSET: + // Offset to the args tuple + context->offset = U2BE(msg->parameter, PARAMETER_LENGTH - sizeof(context->offset)); + context->next_param = SKIP; + break; + case SKIP: + // Skip the nb of objects in args tuple + // Already skipped 1 by going through this case + context->next_param = TOKEN_ID; + break; + case TOKEN_ID: + handle_token_id(msg, context); + context->next_param = AMOUNT; + break; + case AMOUNT: + handle_amount(msg, context); + context->next_param = SKIP_2; + break; + case SKIP_2: + // Skip the tokenGateId + // Already skipped 1 by going through this case + context->next_param = ADDRESS; + break; + case ADDRESS: + handle_address(msg, context); + context->next_param = NONE; + break; + case NONE: + break; + default: + PRINTF("Param not supported\n"); + msg->result = ETH_PLUGIN_RESULT_ERROR; + break; + } +} + void handle_provide_parameter(void *parameters) { ethPluginProvideParameter_t *msg = (ethPluginProvideParameter_t *) parameters; context_t *context = (context_t *) msg->pluginContext; @@ -29,7 +75,8 @@ void handle_provide_parameter(void *parameters) { // Skip this step, and don't forget to decrease skipping counter. context->skip--; } else { - if ((context->offset) && msg->parameterOffset != context->checkpoint + context->offset) { + if ((context->offset) && + msg->parameterOffset != context->checkpoint + context->offset + SELECTOR_SIZE) { PRINTF("offset: %d, checkpoint: %d, parameterOffset: %d\n", context->offset, context->checkpoint, @@ -46,6 +93,9 @@ void handle_provide_parameter(void *parameters) { case MINT_V2: handle_mint(msg, context); break; + case MINT_SIGN_V2: + handle_mint_sign_v2(msg, context); + break; default: PRINTF("Selector Index not supported: %d\n", context->selectorIndex); msg->result = ETH_PLUGIN_RESULT_ERROR; diff --git a/src/handle_query_contract_id.c b/src/handle_query_contract_id.c index 6b438f0..f2cc2c0 100644 --- a/src/handle_query_contract_id.c +++ b/src/handle_query_contract_id.c @@ -25,6 +25,9 @@ void handle_query_contract_id(void *parameters) { case MINT_V2: strlcpy(msg->version, "Mint", msg->versionLength); break; + case MINT_SIGN_V2: + strlcpy(msg->version, "Mint Sign", msg->versionLength); + break; default: PRINTF("Selector index: %d not supported\n", context->selectorIndex); msg->result = ETH_PLUGIN_RESULT_ERROR; diff --git a/src/handle_query_contract_ui.c b/src/handle_query_contract_ui.c index d618e9c..fc3c444 100644 --- a/src/handle_query_contract_ui.c +++ b/src/handle_query_contract_ui.c @@ -23,16 +23,58 @@ static void set_amount_ui(ethQueryContractUI_t *msg, context_t *context) { amountToString(context->amount, sizeof(context->amount), 0, "", msg->msg, msg->msgLength); } +static void set_token_id_ui(ethQueryContractUI_t *msg, context_t *context) { + strlcpy(msg->title, "Token ID", msg->titleLength); + + amountToString(context->token_id, sizeof(context->token_id), 0, "", msg->msg, msg->msgLength); +} + +static void set_address_ui(ethQueryContractUI_t *msg, context_t *context) { + strlcpy(msg->title, "Address", msg->titleLength); + msg->msg[0] = '0'; + msg->msg[1] = 'x'; + getEthAddressStringFromBinary((uint8_t *) context->address, + msg->msg + 2, + msg->pluginSharedRW->sha3, + 0); +} + // Helper function that returns the enum corresponding to the screen that should be displayed. static screens_t get_screen(const ethQueryContractUI_t *msg, const context_t *context __attribute__((unused))) { uint8_t index = msg->screenIndex; - switch (index) { - case 0: - return AMOUNT_SCREEN; - case 1: - return PAYABLE_AMOUNT_SCREEN; + switch (context->selectorIndex) { + case MINT: + case PRE_SALE_MINT: + case STABLE_MINT_SIGN: + case STABLE_MINT: + case MINT_SIGN: + case MINT_V2: + switch (index) { + case 0: + return AMOUNT_SCREEN; + case 1: + return PAYABLE_AMOUNT_SCREEN; + default: + return ERROR; + } + break; + case MINT_SIGN_V2: + switch (index) { + case 0: + return TOKEN_ID_SCREEN; + case 1: + return AMOUNT_SCREEN; + case 2: + return PAYABLE_AMOUNT_SCREEN; + case 3: + return ADDRESS_SCREEN; + default: + return ERROR; + } + break; default: + PRINTF("Selector index: %d not supported\n", context->selectorIndex); return ERROR; } } @@ -46,17 +88,49 @@ void handle_query_contract_ui(void *parameters) { msg->result = ETH_PLUGIN_RESULT_OK; screens_t screen = get_screen(msg, context); - - switch (screen) { - case AMOUNT_SCREEN: - set_amount_ui(msg, context); + switch (context->selectorIndex) { + case MINT: + case PRE_SALE_MINT: + case STABLE_MINT_SIGN: + case STABLE_MINT: + case MINT_SIGN: + case MINT_V2: + switch (screen) { + case AMOUNT_SCREEN: + set_amount_ui(msg, context); + break; + case PAYABLE_AMOUNT_SCREEN: + set_payable_amount_ui(msg, context); + break; + default: + PRINTF("Received an invalid screenIndex\n"); + msg->result = ETH_PLUGIN_RESULT_ERROR; + return; + } break; - case PAYABLE_AMOUNT_SCREEN: - set_payable_amount_ui(msg, context); + case MINT_SIGN_V2: + switch (screen) { + case TOKEN_ID_SCREEN: + set_token_id_ui(msg, context); + break; + case AMOUNT_SCREEN: + set_amount_ui(msg, context); + break; + case PAYABLE_AMOUNT_SCREEN: + set_payable_amount_ui(msg, context); + break; + case ADDRESS_SCREEN: + set_address_ui(msg, context); + break; + default: + PRINTF("Received an invalid screenIndex\n"); + msg->result = ETH_PLUGIN_RESULT_ERROR; + return; + } break; default: - PRINTF("Received an invalid screenIndex\n"); + PRINTF("Selector index: %d not supported\n", context->selectorIndex); msg->result = ETH_PLUGIN_RESULT_ERROR; return; } -} +} \ No newline at end of file diff --git a/src/ledger_nft_plugin.h b/src/ledger_nft_plugin.h index 2d69daa..36ce774 100644 --- a/src/ledger_nft_plugin.h +++ b/src/ledger_nft_plugin.h @@ -4,7 +4,7 @@ #include "eth_internals.h" #include "eth_plugin_interface.h" -#define NUM_SELECTORS 6 +#define NUM_SELECTORS 7 #define PLUGIN_NAME "Ledger NFT" #define TOKEN_FOUND 1 << 1 #define SELECTOR_SIZE 4 @@ -15,18 +15,33 @@ extern const uint8_t NULL_ETH_ADDRESS[ADDRESS_LENGTH]; #define ADDRESS_IS_NETWORK_TOKEN(_addr) (!memcmp(_addr, NULL_ETH_ADDRESS, ADDRESS_LENGTH)) -typedef enum { MINT, PRE_SALE_MINT, STABLE_MINT_SIGN, STABLE_MINT, MINT_SIGN, MINT_V2 } selector_t; +typedef enum { + MINT, + PRE_SALE_MINT, + STABLE_MINT_SIGN, + STABLE_MINT, + MINT_SIGN, + MINT_V2, + MINT_SIGN_V2, +} selector_t; // Enumeration used to parse the smart contract data. typedef enum { PAYABLE_AMOUNT, AMOUNT, + OFFSET, + TOKEN_ID, + ADDRESS, + SKIP, + SKIP_2, NONE, } parameter; typedef enum { AMOUNT_SCREEN, PAYABLE_AMOUNT_SCREEN, + TOKEN_ID_SCREEN, + ADDRESS_SCREEN, ERROR, } screens_t; @@ -36,7 +51,9 @@ extern const uint8_t *const LEDGER_NFT_SELECTORS[NUM_SELECTORS]; typedef struct context_t { // For display. uint8_t amount[PARAMETER_LENGTH]; + uint8_t token_id[PARAMETER_LENGTH]; uint8_t payable_amount[PARAMETER_LENGTH]; + uint8_t address[ADDRESS_LENGTH]; uint8_t contract_address_sent[ADDRESS_LENGTH]; char ticker_sent[MAX_TICKER_LEN]; From 7d08aed05912e8da9f378d4c26d7f4712dcc5187 Mon Sep 17 00:00:00 2001 From: Z4karia <92750334+Z4karia@users.noreply.github.com> Date: Wed, 1 Mar 2023 11:11:58 +0000 Subject: [PATCH 2/6] feat: added new abi + updated b2c --- ...53db389b6200e6f646949e6ab7b385d40.abi.json | 1765 +++++++++++++++++ tests/networks/ethereum/ledgerNFT/b2c.json | 11 + 2 files changed, 1776 insertions(+) create mode 100644 tests/networks/ethereum/ledgerNFT/abis/0x12b180053db389b6200e6f646949e6ab7b385d40.abi.json diff --git a/tests/networks/ethereum/ledgerNFT/abis/0x12b180053db389b6200e6f646949e6ab7b385d40.abi.json b/tests/networks/ethereum/ledgerNFT/abis/0x12b180053db389b6200e6f646949e6ab7b385d40.abi.json new file mode 100644 index 0000000..c8ff30f --- /dev/null +++ b/tests/networks/ethereum/ledgerNFT/abis/0x12b180053db389b6200e6f646949e6ab7b385d40.abi.json @@ -0,0 +1,1765 @@ +[ + { + "inputs": [ + { + "internalType": "string", + "name": "_baseContractURI", + "type": "string" + }, + { + "internalType": "address", + "name": "_royaltiesSplitAddress", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint96", + "name": "percentage", + "type": "uint96" + } + ], + "internalType": "struct MultiMint1155.WithdrawalAddress[]", + "name": "_withdrawalAddresses", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AccountAlreadyMintedMax", + "type": "error" + }, + { + "inputs": [], + "name": "DeadlineNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "InsufficientFunds", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBaseContractURL", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBaseURI", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidDeadlineLength", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "MintDeadlinePassed", + "type": "error" + }, + { + "inputs": [], + "name": "MintNotAvailable", + "type": "error" + }, + { + "inputs": [], + "name": "MismatchLengths", + "type": "error" + }, + { + "inputs": [], + "name": "NewSignerCantBeZero", + "type": "error" + }, + { + "inputs": [], + "name": "NothingToWithdraw", + "type": "error" + }, + { + "inputs": [], + "name": "RoyaltiesPercentageTooHigh", + "type": "error" + }, + { + "inputs": [], + "name": "SupplyLimitReached", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenGatedId", + "type": "uint256" + } + ], + "name": "TokenGatedIdAlreadyUsed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenGatedId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "seasonId", + "type": "uint256" + } + ], + "name": "TokenGatedIdAlreadyUsedInSeason", + "type": "error" + }, + { + "inputs": [], + "name": "TokenNotSupported", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "TokenSaleClosed", + "type": "error" + }, + { + "inputs": [], + "name": "WithdrawalPercentageNot100", + "type": "error" + }, + { + "inputs": [], + "name": "WithdrawalPercentageWrongSize", + "type": "error" + }, + { + "inputs": [], + "name": "WithdrawalPercentageZero", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "contractUri", + "type": "string" + } + ], + "name": "ContractURIChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "defaultMaxMint", + "type": "uint256" + } + ], + "name": "DefaultMaxMintChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "prices", + "type": "uint256[]" + } + ], + "name": "ETHMintPricePerTokenChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "enum MultiMint1155.Feature", + "name": "features", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "name": "FeatureStatusChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "enum MultiMint1155.Feature[]", + "name": "features", + "type": "uint8[]" + } + ], + "name": "FeaturesEnabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "maxMints", + "type": "uint256[]" + } + ], + "name": "MaxMintPerTokenChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "maxSupplies", + "type": "uint256[]" + } + ], + "name": "MaxSupplyPerTokenChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "percentage", + "type": "uint256" + } + ], + "name": "RoyaltiesPercentageChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "royaltiesSplitAddress", + "type": "address" + } + ], + "name": "RoyaltiesSplitAddressChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "seasonId", + "type": "uint16" + } + ], + "name": "SeasonUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[][]", + "name": "deadlines", + "type": "uint256[][]" + } + ], + "name": "TokenDeadlinesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "enum MultiMint1155.TokenType[]", + "name": "tokenTypes", + "type": "uint8[]" + } + ], + "name": "TokenTypesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "tokenURI", + "type": "string" + } + ], + "name": "TokenURIChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "inputs": [], + "name": "BURNER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "owners", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "balances", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "tokenOwner", + "type": "address" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "contractURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "currentSupplyPerToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "defaultMaxMint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getMaxMintPerToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum MultiMint1155.Feature", + "name": "feature", + "type": "uint8" + } + ], + "name": "isFeatureEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "maxMintPerToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "maxSupplyPerToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "mintPrices", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenGatedId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "pass", + "type": "address" + } + ], + "internalType": "struct Types.TokenGatedMintArgs[]", + "name": "args", + "type": "tuple[]" + }, + { + "internalType": "bytes[]", + "name": "signatures", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "deadlines", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "mintSign", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "minted", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "minterMint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenGatedId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "pass", + "type": "address" + } + ], + "internalType": "struct Types.TokenGatedMintArgs[]", + "name": "args", + "type": "tuple[]" + }, + { + "internalType": "bytes[]", + "name": "signatures", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "deadlines", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "minterMintSign", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "priceETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "royaltiesSplitAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "salePrice", + "type": "uint256" + } + ], + "name": "royaltyInfo", + "outputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "royaltyAmount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "seasonId", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "baseContractURI_", + "type": "string" + } + ], + "name": "setContractURI", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "defaultMaxMint_", + "type": "uint256" + } + ], + "name": "setDefaultMaxMint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "tokenIds_", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "mintPrices_", + "type": "uint256[]" + } + ], + "name": "setETHMintPricePerToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum MultiMint1155.Feature[]", + "name": "features", + "type": "uint8[]" + } + ], + "name": "setEnabledFeatures", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum MultiMint1155.Feature", + "name": "feature", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "name": "setFeatureStatus", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "tokenIds_", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "maxMints_", + "type": "uint256[]" + } + ], + "name": "setMaxMintPerToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "tokenIds_", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "maxSupplies_", + "type": "uint256[]" + } + ], + "name": "setMaxSupplyPerToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "royaltiesPercentage_", + "type": "uint256" + } + ], + "name": "setRoyaltiesPercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "royaltiesSplitAddress_", + "type": "address" + } + ], + "name": "setRoyaltiesSplitAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "tokenIds_", + "type": "uint256[]" + }, + { + "internalType": "uint256[][]", + "name": "deadlines_", + "type": "uint256[][]" + } + ], + "name": "setTokenDeadlines", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "addresses_", + "type": "address[]" + }, + { + "internalType": "enum MultiMint1155.TokenType[]", + "name": "types_", + "type": "uint8[]" + } + ], + "name": "setTokenTypes", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "uri_", + "type": "string" + } + ], + "name": "setTokenURI", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "signer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "tokenDeadlines", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokenTypes", + "outputs": [ + { + "internalType": "enum MultiMint1155.TokenType", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "name": "totalPriceETH", + "outputs": [ + { + "internalType": "uint256", + "name": "totalPrice", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newSigner", + "type": "address" + } + ], + "name": "transferSigner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateSeason", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId_", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "usedGenesisPasses", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "usedInfinityPasses", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "withdrawalAddresses", + "outputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint96", + "name": "percentage", + "type": "uint96" + } + ], + "stateMutability": "view", + "type": "function" + } +] \ No newline at end of file diff --git a/tests/networks/ethereum/ledgerNFT/b2c.json b/tests/networks/ethereum/ledgerNFT/b2c.json index 616f822..6da908c 100644 --- a/tests/networks/ethereum/ledgerNFT/b2c.json +++ b/tests/networks/ethereum/ledgerNFT/b2c.json @@ -42,6 +42,17 @@ "plugin": "LedgerNFT" } } + }, + { + "address": "0x12b180053db389b6200e6f646949e6ab7b385d40", + "contractName": "MultiMint1155", + "selectors": { + "0x657bb113": { + "erc20OfInterest": [], + "method": "mintSign", + "plugin": "LedgerNFT" + } + } } ], "name": "LedgerNFT" From 2cf4e981505ac1018166cf9d6b62820a5439d6b3 Mon Sep 17 00:00:00 2001 From: Z4karia <92750334+Z4karia@users.noreply.github.com> Date: Wed, 1 Mar 2023 11:12:51 +0000 Subject: [PATCH 3/6] test: test method mintSign v2 --- .../ethereum_nanos_mint_sign_v2/00000.png | Bin 0 -> 374 bytes .../ethereum_nanos_mint_sign_v2/00001.png | Bin 0 -> 380 bytes .../ethereum_nanos_mint_sign_v2/00002.png | Bin 0 -> 263 bytes .../ethereum_nanos_mint_sign_v2/00003.png | Bin 0 -> 287 bytes .../ethereum_nanos_mint_sign_v2/00004.png | Bin 0 -> 307 bytes .../ethereum_nanos_mint_sign_v2/00005.png | Bin 0 -> 462 bytes .../ethereum_nanos_mint_sign_v2/00006.png | Bin 0 -> 496 bytes .../ethereum_nanos_mint_sign_v2/00007.png | Bin 0 -> 390 bytes .../ethereum_nanos_mint_sign_v2/00008.png | Bin 0 -> 358 bytes .../ethereum_nanos_mint_sign_v2/00009.png | Bin 0 -> 414 bytes .../ethereum_nanos_mint_sign_v2/00010.png | Bin 0 -> 349 bytes .../ethereum_nanosp_mint_sign_v2/00000.png | Bin 0 -> 414 bytes .../ethereum_nanosp_mint_sign_v2/00001.png | Bin 0 -> 427 bytes .../ethereum_nanosp_mint_sign_v2/00002.png | Bin 0 -> 305 bytes .../ethereum_nanosp_mint_sign_v2/00003.png | Bin 0 -> 325 bytes .../ethereum_nanosp_mint_sign_v2/00004.png | Bin 0 -> 362 bytes .../ethereum_nanosp_mint_sign_v2/00005.png | Bin 0 -> 743 bytes .../ethereum_nanosp_mint_sign_v2/00006.png | Bin 0 -> 417 bytes .../ethereum_nanosp_mint_sign_v2/00007.png | Bin 0 -> 472 bytes .../ethereum_nanosp_mint_sign_v2/00008.png | Bin 0 -> 382 bytes .../ethereum_nanox_mint_sign_v2/00000.png | Bin 0 -> 414 bytes .../ethereum_nanox_mint_sign_v2/00001.png | Bin 0 -> 427 bytes .../ethereum_nanox_mint_sign_v2/00002.png | Bin 0 -> 305 bytes .../ethereum_nanox_mint_sign_v2/00003.png | Bin 0 -> 325 bytes .../ethereum_nanox_mint_sign_v2/00004.png | Bin 0 -> 362 bytes .../ethereum_nanox_mint_sign_v2/00005.png | Bin 0 -> 743 bytes .../ethereum_nanox_mint_sign_v2/00006.png | Bin 0 -> 417 bytes .../ethereum_nanox_mint_sign_v2/00007.png | Bin 0 -> 472 bytes .../ethereum_nanox_mint_sign_v2/00008.png | Bin 0 -> 382 bytes tests/src/mintSignV2.test.js | 58 ++++++++++++++++++ 30 files changed, 58 insertions(+) create mode 100644 tests/snapshots/ethereum_nanos_mint_sign_v2/00000.png create mode 100644 tests/snapshots/ethereum_nanos_mint_sign_v2/00001.png create mode 100644 tests/snapshots/ethereum_nanos_mint_sign_v2/00002.png create mode 100644 tests/snapshots/ethereum_nanos_mint_sign_v2/00003.png create mode 100644 tests/snapshots/ethereum_nanos_mint_sign_v2/00004.png create mode 100644 tests/snapshots/ethereum_nanos_mint_sign_v2/00005.png create mode 100644 tests/snapshots/ethereum_nanos_mint_sign_v2/00006.png create mode 100644 tests/snapshots/ethereum_nanos_mint_sign_v2/00007.png create mode 100644 tests/snapshots/ethereum_nanos_mint_sign_v2/00008.png create mode 100644 tests/snapshots/ethereum_nanos_mint_sign_v2/00009.png create mode 100644 tests/snapshots/ethereum_nanos_mint_sign_v2/00010.png create mode 100644 tests/snapshots/ethereum_nanosp_mint_sign_v2/00000.png create mode 100644 tests/snapshots/ethereum_nanosp_mint_sign_v2/00001.png create mode 100644 tests/snapshots/ethereum_nanosp_mint_sign_v2/00002.png create mode 100644 tests/snapshots/ethereum_nanosp_mint_sign_v2/00003.png create mode 100644 tests/snapshots/ethereum_nanosp_mint_sign_v2/00004.png create mode 100644 tests/snapshots/ethereum_nanosp_mint_sign_v2/00005.png create mode 100644 tests/snapshots/ethereum_nanosp_mint_sign_v2/00006.png create mode 100644 tests/snapshots/ethereum_nanosp_mint_sign_v2/00007.png create mode 100644 tests/snapshots/ethereum_nanosp_mint_sign_v2/00008.png create mode 100644 tests/snapshots/ethereum_nanox_mint_sign_v2/00000.png create mode 100644 tests/snapshots/ethereum_nanox_mint_sign_v2/00001.png create mode 100644 tests/snapshots/ethereum_nanox_mint_sign_v2/00002.png create mode 100644 tests/snapshots/ethereum_nanox_mint_sign_v2/00003.png create mode 100644 tests/snapshots/ethereum_nanox_mint_sign_v2/00004.png create mode 100644 tests/snapshots/ethereum_nanox_mint_sign_v2/00005.png create mode 100644 tests/snapshots/ethereum_nanox_mint_sign_v2/00006.png create mode 100644 tests/snapshots/ethereum_nanox_mint_sign_v2/00007.png create mode 100644 tests/snapshots/ethereum_nanox_mint_sign_v2/00008.png create mode 100644 tests/src/mintSignV2.test.js diff --git a/tests/snapshots/ethereum_nanos_mint_sign_v2/00000.png b/tests/snapshots/ethereum_nanos_mint_sign_v2/00000.png new file mode 100644 index 0000000000000000000000000000000000000000..8d84cc70fea8013b7e8b25c0982ce142fa103d5c GIT binary patch literal 374 zcmV-+0g3*JP)K?4J2QqX3 zXn7ePqhBDwvA-|J28LIrjF%tX0z{3v6!_gF&(SYH)S*7TN;1RxW-%}TLH9_+sttDO z-T32w&rL(!1@Vr`jm5G(8dd=Ruu#)JAN?l#rFLU`oQ(r?$33AC7s0}pw!fi~(9k^# zU9aci?pXN=I7A<-f!Mw2untnw9MivqZYw}c5&)gweYhbTnv#2#t$0X2wST7_1F;LR zw?>Da2SkSfG>qWq1mej-6nW@2l+Z=0om5jdB%3o3Qx19_LNUlTqF4R_1Iaj%@^2O= z@;n%h1N>H$2;%-~Dvx1!0LtkT-;cq73rgisOElFtPbcL{d3TfNQvm<~003s>1*i4o Uje8$F8UO$Q07*qoM6N<$g5rpv%m4rY literal 0 HcmV?d00001 diff --git a/tests/snapshots/ethereum_nanos_mint_sign_v2/00001.png b/tests/snapshots/ethereum_nanos_mint_sign_v2/00001.png new file mode 100644 index 0000000000000000000000000000000000000000..68bd3aa802dc25899f014ee9365d7daf15153d68 GIT binary patch literal 380 zcmV-?0fYXDP)jSkO5*{* zcxhL-?P1#oTaHCnq_<{e8qn^G`lS>q=Xv~YsX@Gs-zM_UrRZF3k1I|=G(EfJ8R<{l zn49?sxJ9@7sP7B2%w$;s(saQmifra7W~8}HryBJ|7=a`n02m{HubiVw>q5oImSvlf zG1WCL6b|F6W9T$zc57>UtNX?aQEk!lnhHyytG)M?aSbf-S;!LObvUc55!bx-%9JhL zXfB2IJi`OaSj`iGu@Nhh0tU4Jr)0ZSEF`ea@B;&%654UiMmRInM?megM_8;nz$4%S z)Y%ttY5)Nmam||rW1TP9e(itEswB4x`WVkR)&Ib$36e{)!MXOU1j1XecdW8BmRrtB$v8% znR66pzWQ}W+@>`<`rg7Pw~g(%JR@aPfB#}h_Ex)nO=4BA)Yq-2`rK?8U4NP?oPDPs zW2&$wlmAbBy4)*qiC19A z{wY7WG<{3?-_PDJKF|GMIS11@=?8DakCbFINbm|QW=t{x`h|f>Kk8m;#IdWlCW3gL Lu6{1-oD!M;P)8m+ivS zZ)RPGeKV4Xh=_=s_yAoxeGxOEPjUbN002ovPDHLkV1lv2gY^Ia literal 0 HcmV?d00001 diff --git a/tests/snapshots/ethereum_nanos_mint_sign_v2/00004.png b/tests/snapshots/ethereum_nanos_mint_sign_v2/00004.png new file mode 100644 index 0000000000000000000000000000000000000000..2471e45a9abba0a0f07005f3c5bc01b74fc69a66 GIT binary patch literal 307 zcmV-30nGl1P)=alLLI@!Q&+~zvL1y0SZ}T9G*?05= z#%PVo@qH{uKS1}`cK1Khnq9|d$G!n>+cy61gmObqKt$AP)hj&*VInA*?v*eG*ksQ^ z00VU8lursRYolA1<%)kni*T|9xSNH%RDT0Qk*WSR9I2`PX6OMDrVx@=hjy& zgR~zBVtBv^0z(791dE`PHDHbndi%jAM*a{&2qA=|C+Hny6sOH|N3^=9t;Yk6|#+=pr4}@`b zdVeq(gFDGAbSK|VUYKTjGt;kPMIZZRjt(A>6fXeDfHS&b>|NGn1}l#|5-mkRrP8UZ zD+Qw154!=zVrSS4PchZ`5~f2N<4H^H52+SV!^SeI9Bp}9;zQRP8!6{l#$gRB)QyHI zxl7h{2Egv4z#|@2T)O&U5Zh;kI%^nPO2MXc@Yv2D`s{$8sz*jp!r;Vz22?BN(|f-u z>JDh0l=Y$LbQXzmF6sQYs9PolAt}Wim?TM(BuO$mZ^M&hi#es!5C8xG07*qoM6N<$ Eg4ch|xc~qF literal 0 HcmV?d00001 diff --git a/tests/snapshots/ethereum_nanos_mint_sign_v2/00006.png b/tests/snapshots/ethereum_nanos_mint_sign_v2/00006.png new file mode 100644 index 0000000000000000000000000000000000000000..34e81548580e6d7104f8e7e957015ffdf49c333a GIT binary patch literal 496 zcmVsC`pneNn%--wjnV8$kW$l`>Rfn zqhrmujN%>`^#~6dph>`J{096*KS0G9_ad3*=6{n7c>}7SJA`b*{FezBeSEzO( zqIKEM<1`O&#te|>5yd3-nTV!&jGb;yNkIesVY#Jbp0dXzVk(WfQ-X@W0rY>Y;@oCu z798Q5MW2YKSoPB3B4HsbqfE#&^u2_&hhpVb`@?xi<-4cbso~Ku6h1Qgbf*nKI-eT- z8&U~%M*n1T53VG$(3R|iEXq(>vB^RWNN{l}Ye6ZLWuK>5tS;2n;>yx&C{=4yvw#L` z4L}FRY|eB`zK6Oym)hFa-gwiT#!l*W-B1so^U{|XoohYky`bIcZsj2xprr_CN5i*J zr#8<`uYN;j`pxXhQXFgTS@u{P(2=v`eBdPQ{q!7mtPSJIeoTLGVFEWGt`lOaUH3mB z088Wv)z;#(Y+CEdX6@n9H{jaFA-LC}Yfs0z0Uy{eD#ax!@vM?~=4dmW@5AcM@3%Ct m79_62FX1Ffk|arz-{cMbOLlsT00~t90000 zb{fOr{6*aTc-K&E!fa+fO&nwC=ynaR9%9^5H&H|@d%Ah zM6@p3ew^k8izy0J9AcV(X2R1mz43G@K@HaQkl!crpJ~{e&1&L;cPm z2O~ih8cE*ou-U5A?a954CY^0X^yD5}-0AuF3ov_m#TL_0#&ts*;xxL`pNf+u;4Ky( zK3P8hFl-*AZ_*J;mH?rtzA&}EGhLc-{rUcjky2+X*&EObQL+-(qTp`mApy!C9JIc{)5O z@z$QeIQ9`eWZ?jWi`t2Mo$*Db2R}Hn&;ifF{eG`PbQ=vzUeGZ$-(viTv&jx{*n>+F z$sJSlS-F{}u|NPAS#vt({Ipt{4zxMEv>x1pQ_2Ty6vG|1u)q#rxT8xbt6SjIvSJcm zATRwh1$m*q09lctz8DFqp}sJPfhIVGH2D>obVJ8hCB^DASqdfRP^^LZu4>Ved?oGf z&gPIV`f^(;vh%m0~_?r8>V7uBj~f|{k#}B z4)Di%0(GQh%XXzDG$sKK-Q2JkKR-`QsiPFD-4d_!i{fwH;J|_aEL%ZYNu#B0FJ7G| z;=_VQWOA9;dQ4Y9)LpKCV=ri`X({49JagUwO3&5UdSK)wEJxPN%9wG}45n;lzK(aC zKtbL$y*-#9uSql`7 zENOEh^0jsFWbV&<+yj5)WEX_aERLO-`${sQhD#B5ZCio#Fr4qHlr^7X|9DL69eFa= z#kf#}$Pcl(QEE=tNl8Pt$o;~Fk*8r@j8mpwSGW8d!1&11FbzPh@^gWj=oh7f%f7G)4s^6#xJL07*qo IM6N<$g02I(Gynhq literal 0 HcmV?d00001 diff --git a/tests/snapshots/ethereum_nanos_mint_sign_v2/00010.png b/tests/snapshots/ethereum_nanos_mint_sign_v2/00010.png new file mode 100644 index 0000000000000000000000000000000000000000..ce795f34e8569e986af689fded3b59c9a8af2961 GIT binary patch literal 349 zcmV-j0iyniP)O41}p;-~WL<=z+0=1Om1tEU@3H#qtw22}5*_5JCvCo4!52c$FXo$VhXU?0M$^Bekqgf%Ka;M*^X|4 zEs9YCQ(xfJKmNC#+8dY%2&wT+>D^<3C%}_*k1^mvtO~`RE00000NkvXXu0mjf-kqOA literal 0 HcmV?d00001 diff --git a/tests/snapshots/ethereum_nanosp_mint_sign_v2/00000.png b/tests/snapshots/ethereum_nanosp_mint_sign_v2/00000.png new file mode 100644 index 0000000000000000000000000000000000000000..487ea10fcfeb2f3e6b79239459672251d49addd7 GIT binary patch literal 414 zcmV;P0b%}$P)vpO}&+|8}fC)JNq`>?#dJ%s{^>GN_4usXQirk{^@^BA?p!El9&T9q~zMsh2=YdLB`_ONiP zKy6XlUGFZ>Cn7mP3u*?kZ@~`+GJA#%uo}Lw=>vdqS6UV*Z*^@Tyb&rdA*>rO6$C5IsI`ylo5AEMs z?C^SJkSe%?@yI_e?L2C1iC0?m_ZtF7^)oApJCNB(`IkQ~0$?nhgQ#LQx zbxaW!xM#Os>)4n0t*U?B?%9Pcv`p6D@He|W+JyZ}`M35XvJ4EN*O&I`NY3t^yi_H) z%GZ|hY_&Ca@8;d2g5^inRnKwvJb%e7y3_i7qKWp;D5Jim!R39iwK*rtRz7oFxy|&= zw+6JB_=kEP76L8sD3WM;a;a$|s&AXdU7Ph8i;P`OKdG-ga?@ R@6FdBVNX{-mvv4FO#n=`rt^JPgj=Hc$)J-oc z_OrR%dMf{YNFW2ly?1Q>hs3wJu4g#8F0Ntcyq5optRBl4PKqc*MmMaUpE>!rV%$sq z0*Osu+HZD7{c2w6s1~a+x!7WI1tZYA5bz*(ALIKo9l=@wa+g6Op00i_>zopr08NO5 Au>b%7 literal 0 HcmV?d00001 diff --git a/tests/snapshots/ethereum_nanosp_mint_sign_v2/00003.png b/tests/snapshots/ethereum_nanosp_mint_sign_v2/00003.png new file mode 100644 index 0000000000000000000000000000000000000000..6b8ceef85cb8d17b6cbab1139cc11252d7f5e2c7 GIT binary patch literal 325 zcmeAS@N?(olHy`uVBq!ia0vp^4M6O`!2~2@x4h6`U|{6&ba4!+nDh2VB44utPg~-) zH)?nOd+a@3r=u);_>Awv#gA+MNp8&QZk-_n)MRkSwIbj6bGzm9y7HGIHU`F@Sy%A+ z_w4yR<&^JV2HwCJj$&Y|_&F{Z&{xc=c_{WMy`De$& z1-ChI-oDZk?{GP1?PDFoeGNv==jSdlUUSBf>%!Es*(%x&nFmwTgO(mJFSq}(`owR4 zUEdjkm4?eQ9N$+<>p0r|WpwcVY5qmwKexwkmDSvPC-`mTjg@3QV7TzNe??0COZ!dn z>lruRJN4g(_u=8iY*mwYm`(Qi)}Fa!)*F5|-YGAfyw)7{S|Seg4>EZ1j89zopr08DXJ#I)F?4Kx{nnzpB=r7fG+dLY=gaZ1pth5K`OAFcWB zZQJOYHmz7MaaHf7b+T>me*~VbofZ8vPwSWZf}g6trmL3iyI8V1Jly^e|N6IcHkX>S>-c9~J>0ji;^ht-EmMF}hQqC*+ZqeU1L&>_^ z>ij@wzg{@+K)bylUpCL-O-DXlu+;qIvf@9>))JNZBHe9^)wW)JeR|z$r$2(bH*0KN zuxP!(`Q2}?hOAQV*vcUN_|hB3+wbjH=C7X6bR?o7q2)Mpv08AHE$h;CXKrrUdjI2* z)SAOd6FUE;vMp5mC7#SX<%E;ho5Nl$;y_O$gC8@^A6~!pbxCdbVUVz=tDnm{r-UW| DC_tSw literal 0 HcmV?d00001 diff --git a/tests/snapshots/ethereum_nanosp_mint_sign_v2/00005.png b/tests/snapshots/ethereum_nanosp_mint_sign_v2/00005.png new file mode 100644 index 0000000000000000000000000000000000000000..01d28110df0b7497e676a41c3366e00bdd928a8a GIT binary patch literal 743 zcmV?P)yr6w zF$09Nz_CBpLg{fUqBB{)280_H)uSM^oW6GLSs8%*8xLdZL5Y(tT=qNr2u?sJLS0&+BMmN;8XwNA5RwRvwh)bf$d zE}~PWOTKvET&-oC;SYERK>c;N8(sQt-$}S`8VqdwBbRJ){HZ%OnMq%hxA(6_&Hyoeu1(5*Q}ykT67XKu`j40+Hw{KostrA7uKj7^C74d8_otz_ zn%JNAboQxY>((VasI~)&g43q3Dxc_@^Uz6c za;&7hqza8r_nNkdfa=hzq55p`W}HPV-ut}C78&pPbFa#eRJ%R^W5;0C%J~_m*%~ta zOO?%PznNV{iYvb&2jE5k1`=6a-+9RJ`JBjL_gnKpvY%-G?p=u&fcs=MM9mJLUT}Uz zC`}w&e=Ik9i)6C_cbNfLD{4CP`c~WdG-g2hkVjBcn?$T?aM=|UCXvS}Tl0JCB(C#| zFd>8xLdZK=`4=StqQClQC`+g86-3`om)fctmL>rd`$5*`a2_g{QXhVz&ikP!?ePc9Z*U2SvI~Pt|xq0uB$Jg$J ze#whrey*8eb96b^VzrHvBiH{_*Rf!I8tl7h--_Rw+K+O?SNHDIPXzj}eAaI1TlXtY zN_UF}|Fygkx$@d_y)7$Fo2-BOF*!6P)Nkl`l1;k+@4An6g^M6kcbtxu@7*hfO000000DuchDWw$aQJnB& zJ%BsK3VrpQ1hnYqoNY&PO0WdV>i`7cs)e_@w@x()p@w=B24`klR6(CLpxqtlZO|2 zIWjpO-F~*EHtLqUMt)Wc_@bMv^h#{CUFW0M(vJ1P=5N1GhWcHM(-Xu*&bc@D4_o$^ z7Y|pL)I@*DzttR=&yLH#^{|TW)8Sp0qphw%epiuSUG#WHS~ht|j~;`U4>BXmdi9@& zuz>%00000G5i7^TsbXePb2LB O0000sAjk5Y(@*V#~rbuHu`7A_H&AxgwHf8y4cdKvg$JbB4n%ez%sZ31aBYd&Oo@(7)_WJ(Znl2o8^PD` zFE`_Y-IS+Kdq0Q2-7r_C=}F(5ev`U`H~)QH|9$1FHE$YjoVax+e0xei%S`SAGlOm! zp7{T3NA-mVOYb&rdU8MdyIHo@@7cE*uj@I+Zu{2i)KMSV-E~ovpO}&+|8}fC)JNq`>?#dJ%s{^>GN_4usXQirk{^@^BA?p!El9&T9q~zMsh2=YdLB`_ONiP zKy6XlUGFZ>Cn7mP3u*?kZ@~`+GJA#%uo}Lw=>vdqS6UV*Z*^@Tyb&rdA*>rO6$C5IsI`ylo5AEMs z?C^SJkSe%?@yI_e?L2C1iC0?m_ZtF7^)oApJCNB(`IkQ~0$?nhgQ#LQx zbxaW!xM#Os>)4n0t*U?B?%9Pcv`p6D@He|W+JyZ}`M35XvJ4EN*O&I`NY3t^yi_H) z%GZ|hY_&Ca@8;d2g5^inRnKwvJb%e7y3_i7qKWp;D5Jim!R39iwK*rtRz7oFxy|&= zw+6JB_=kEP76L8sD3WM;a;a$|s&AXdU7Ph8i;P`OKdG-ga?@ R@6FdBVNX{-mvv4FO#n=`rt^JPgj=Hc$)J-oc z_OrR%dMf{YNFW2ly?1Q>hs3wJu4g#8F0Ntcyq5optRBl4PKqc*MmMaUpE>!rV%$sq z0*Osu+HZD7{c2w6s1~a+x!7WI1tZYA5bz*(ALIKo9l=@wa+g6Op00i_>zopr08NO5 Au>b%7 literal 0 HcmV?d00001 diff --git a/tests/snapshots/ethereum_nanox_mint_sign_v2/00003.png b/tests/snapshots/ethereum_nanox_mint_sign_v2/00003.png new file mode 100644 index 0000000000000000000000000000000000000000..6b8ceef85cb8d17b6cbab1139cc11252d7f5e2c7 GIT binary patch literal 325 zcmeAS@N?(olHy`uVBq!ia0vp^4M6O`!2~2@x4h6`U|{6&ba4!+nDh2VB44utPg~-) zH)?nOd+a@3r=u);_>Awv#gA+MNp8&QZk-_n)MRkSwIbj6bGzm9y7HGIHU`F@Sy%A+ z_w4yR<&^JV2HwCJj$&Y|_&F{Z&{xc=c_{WMy`De$& z1-ChI-oDZk?{GP1?PDFoeGNv==jSdlUUSBf>%!Es*(%x&nFmwTgO(mJFSq}(`owR4 zUEdjkm4?eQ9N$+<>p0r|WpwcVY5qmwKexwkmDSvPC-`mTjg@3QV7TzNe??0COZ!dn z>lruRJN4g(_u=8iY*mwYm`(Qi)}Fa!)*F5|-YGAfyw)7{S|Seg4>EZ1j89zopr08DXJ#I)F?4Kx{nnzpB=r7fG+dLY=gaZ1pth5K`OAFcWB zZQJOYHmz7MaaHf7b+T>me*~VbofZ8vPwSWZf}g6trmL3iyI8V1Jly^e|N6IcHkX>S>-c9~J>0ji;^ht-EmMF}hQqC*+ZqeU1L&>_^ z>ij@wzg{@+K)bylUpCL-O-DXlu+;qIvf@9>))JNZBHe9^)wW)JeR|z$r$2(bH*0KN zuxP!(`Q2}?hOAQV*vcUN_|hB3+wbjH=C7X6bR?o7q2)Mpv08AHE$h;CXKrrUdjI2* z)SAOd6FUE;vMp5mC7#SX<%E;ho5Nl$;y_O$gC8@^A6~!pbxCdbVUVz=tDnm{r-UW| DC_tSw literal 0 HcmV?d00001 diff --git a/tests/snapshots/ethereum_nanox_mint_sign_v2/00005.png b/tests/snapshots/ethereum_nanox_mint_sign_v2/00005.png new file mode 100644 index 0000000000000000000000000000000000000000..01d28110df0b7497e676a41c3366e00bdd928a8a GIT binary patch literal 743 zcmV?P)yr6w zF$09Nz_CBpLg{fUqBB{)280_H)uSM^oW6GLSs8%*8xLdZL5Y(tT=qNr2u?sJLS0&+BMmN;8XwNA5RwRvwh)bf$d zE}~PWOTKvET&-oC;SYERK>c;N8(sQt-$}S`8VqdwBbRJ){HZ%OnMq%hxA(6_&Hyoeu1(5*Q}ykT67XKu`j40+Hw{KostrA7uKj7^C74d8_otz_ zn%JNAboQxY>((VasI~)&g43q3Dxc_@^Uz6c za;&7hqza8r_nNkdfa=hzq55p`W}HPV-ut}C78&pPbFa#eRJ%R^W5;0C%J~_m*%~ta zOO?%PznNV{iYvb&2jE5k1`=6a-+9RJ`JBjL_gnKpvY%-G?p=u&fcs=MM9mJLUT}Uz zC`}w&e=Ik9i)6C_cbNfLD{4CP`c~WdG-g2hkVjBcn?$T?aM=|UCXvS}Tl0JCB(C#| zFd>8xLdZK=`4=StqQClQC`+g86-3`om)fctmL>rd`$5*`a2_g{QXhVz&ikP!?ePc9Z*U2SvI~Pt|xq0uB$Jg$J ze#whrey*8eb96b^VzrHvBiH{_*Rf!I8tl7h--_Rw+K+O?SNHDIPXzj}eAaI1TlXtY zN_UF}|Fygkx$@d_y)7$Fo2-BOF*!6P)Nkl`l1;k+@4An6g^M6kcbtxu@7*hfO000000DuchDWw$aQJnB& zJ%BsK3VrpQ1hnYqoNY&PO0WdV>i`7cs)e_@w@x()p@w=B24`klR6(CLpxqtlZO|2 zIWjpO-F~*EHtLqUMt)Wc_@bMv^h#{CUFW0M(vJ1P=5N1GhWcHM(-Xu*&bc@D4_o$^ z7Y|pL)I@*DzttR=&yLH#^{|TW)8Sp0qphw%epiuSUG#WHS~ht|j~;`U4>BXmdi9@& zuz>%00000G5i7^TsbXePb2LB O0000sAjk5Y(@*V#~rbuHu`7A_H&AxgwHf8y4cdKvg$JbB4n%ez%sZ31aBYd&Oo@(7)_WJ(Znl2o8^PD` zFE`_Y-IS+Kdq0Q2-7r_C=}F(5ev`U`H~)QH|9$1FHE$YjoVax+e0xei%S`SAGlOm! zp7{T3NA-mVOYb&rdU8MdyIHo@@7cE*uj@I+Zu{2i)KMSV-E~o { + processTest(device, contractName, testLabel, testDirSuffix, "", signedPlugin, serializedTx, testNetwork); +}); \ No newline at end of file From da06e2169ff4ff7a9314b6e9ceec01e014375f4a Mon Sep 17 00:00:00 2001 From: Z4karia <92750334+Z4karia@users.noreply.github.com> Date: Wed, 1 Mar 2023 11:13:14 +0000 Subject: [PATCH 4/6] docs: updated readme --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 011b85f..d4e7b71 100644 --- a/README.md +++ b/README.md @@ -27,10 +27,12 @@ Need more information about the interface, the architecture, or general stuff ab Smart contracts covered by this plugin are: -| Network | Version | Smart Contract | -| --- | --- | --- | -| Goerli | V0 | `0x6c304a1f99cecd3a9983001e943f3de00ed811d0`| -| Goerli | V0 | `0x9ea4571a739a1d644e17d34a86e7dee97609b256`| +| Network | Version | Smart Contract | Address | +| ---- | --- | ---- | --- | +| Goerli | V0 | MultiMintContractNFT | `0x6c304a1f99cecd3a9983001e943f3de00ed811d0` | +| Goerli | V0 | StableMultiMintERC721 | `0x9ea4571a739a1d644e17d34a86e7dee97609b256` | +| Goerli | V0 | MultiMint1155 | `0x12b180053db389b6200e6f646949e6ab7b385d40` | + On these smart contracts, the functions covered by this plugin are: @@ -42,6 +44,7 @@ On these smart contracts, the functions covered by this plugin are: |stableMint | 0x804b936f|
uint256 amount
| |mintSign | 0xf39247a9|
uint256 amount
| |mint (v2) | 0xa0712d68|
uint256 amount
| +|mintSign (v2) | 0x657bb113|
uint256 tokenId
uint256 amount
address pass
| ## Build From e002100da949455952e2782cc2bacb7d7ddd9d8b Mon Sep 17 00:00:00 2001 From: Z4karia <92750334+Z4karia@users.noreply.github.com> Date: Wed, 1 Mar 2023 11:13:48 +0000 Subject: [PATCH 5/6] build: upgrade plugin version --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 15245d7..e6d55bf 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ APP_LOAD_PARAMS += --appFlags 0x800 --path "44'/60'" --path "45'" --path "44'/1' APP_LOAD_PARAMS += $(COMMON_LOAD_PARAMS) APPVERSION_M = 1 -APPVERSION_N = 2 +APPVERSION_N = 3 APPVERSION_P = 0 APPVERSION = $(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P) From 04dfc8cde0d92cbf09d7e3f5ea24f951ed76761d Mon Sep 17 00:00:00 2001 From: Z4karia <92750334+Z4karia@users.noreply.github.com> Date: Wed, 1 Mar 2023 11:27:48 +0000 Subject: [PATCH 6/6] fix: add default case in finalize --- src/handle_finalize.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/handle_finalize.c b/src/handle_finalize.c index 1709ed9..077602b 100644 --- a/src/handle_finalize.c +++ b/src/handle_finalize.c @@ -16,6 +16,10 @@ void handle_finalize(void *parameters) { case MINT_SIGN_V2: msg->numScreens = 4; break; + default: + PRINTF("Selector Index not supported: %d\n", context->selectorIndex); + msg->result = ETH_PLUGIN_RESULT_ERROR; + return; } msg->result = ETH_PLUGIN_RESULT_OK; }