From 61d57474a58fe8ada0a866697ccc4aff391f6e40 Mon Sep 17 00:00:00 2001 From: keiff3r Date: Thu, 23 Jan 2025 18:59:40 +0100 Subject: [PATCH] feat: add SELL_VOUCHER_NEW_POL support and related tests - Introduced SELL_VOUCHER_NEW_POL enum in stakekit_plugin.h. - Updated b2c.json to include new contract and method selectors for SELL_VOUCHER_NEW_POL. - Added ABI definition for ValidatorShareProxy with new methods. - Created tests for SELL_VOUCHER_NEW_POL functionality in ethereum_sell_voucher_new_pol.test.js. --- src/stakekit_plugin.h | 1 + ...a8e0b998c57a428bf1c26a8baca50524e.abi.json | 834 ++++++++++++++++++ tests/networks/ethereum/stakekit/b2c.json | 47 + .../ethereum_sell_voucher_new_pol.test.js | 39 + 4 files changed, 921 insertions(+) create mode 100644 tests/networks/ethereum/stakekit/abis/0x56d783ca8e0b998c57a428bf1c26a8baca50524e.abi.json create mode 100644 tests/src/ethereum/ethereum_sell_voucher_new_pol.test.js diff --git a/src/stakekit_plugin.h b/src/stakekit_plugin.h index 52f45e2..410f7c9 100644 --- a/src/stakekit_plugin.h +++ b/src/stakekit_plugin.h @@ -49,6 +49,7 @@ typedef enum { BUY_VOUCHER, BUY_VOUCHER_POL, SELL_VOUCHER_NEW, + SELL_VOUCHER_NEW_POL, MORPHO_SUPPLY_1, MORPHO_SUPPLY_2, MORPHO_SUPPLY_3, diff --git a/tests/networks/ethereum/stakekit/abis/0x56d783ca8e0b998c57a428bf1c26a8baca50524e.abi.json b/tests/networks/ethereum/stakekit/abis/0x56d783ca8e0b998c57a428bf1c26a8baca50524e.abi.json new file mode 100644 index 0000000..d4ab850 --- /dev/null +++ b/tests/networks/ethereum/stakekit/abis/0x56d783ca8e0b998c57a428bf1c26a8baca50524e.abi.json @@ -0,0 +1,834 @@ +[ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "constant": false, + "inputs": [{ "internalType": "bool", "name": "pol", "type": "bool" }], + "name": "_restake", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "uint256", "name": "claimAmount", "type": "uint256" }, + { + "internalType": "uint256", + "name": "maximumSharesToBurn", + "type": "uint256" + }, + { "internalType": "bool", "name": "pol", "type": "bool" } + ], + "name": "_sellVoucher_new", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "activeAmount", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" }, + { "internalType": "address", "name": "spender", "type": "address" } + ], + "name": "allowance", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "value", "type": "uint256" } + ], + "name": "approve", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" } + ], + "name": "balanceOf", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "uint256", "name": "_amount", "type": "uint256" }, + { + "internalType": "uint256", + "name": "_minSharesToMint", + "type": "uint256" + } + ], + "name": "buyVoucher", + "outputs": [ + { + "internalType": "uint256", + "name": "amountToDeposit", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "uint256", "name": "_amount", "type": "uint256" }, + { + "internalType": "uint256", + "name": "_minSharesToMint", + "type": "uint256" + } + ], + "name": "buyVoucherPOL", + "outputs": [ + { + "internalType": "uint256", + "name": "amountToDeposit", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "uint256", "name": "_amount", "type": "uint256" }, + { + "internalType": "uint256", + "name": "_minSharesToMint", + "type": "uint256" + }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" }, + { "internalType": "uint8", "name": "v", "type": "uint8" }, + { "internalType": "bytes32", "name": "r", "type": "bytes32" }, + { "internalType": "bytes32", "name": "s", "type": "bytes32" } + ], + "name": "buyVoucherWithPermit", + "outputs": [ + { + "internalType": "uint256", + "name": "amountToDeposit", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "commissionRate_deprecated", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "delegation", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "token", "type": "address" }, + { + "internalType": "address payable", + "name": "destination", + "type": "address" + }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "drain", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "eventsHub", + "outputs": [ + { "internalType": "contract EventsHub", "name": "", "type": "address" } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "exchangeRate", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "address", "name": "user", "type": "address" } + ], + "name": "getLiquidRewards", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getRewardPerShare", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "address", "name": "user", "type": "address" } + ], + "name": "getTotalStake", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "addedValue", "type": "uint256" } + ], + "name": "increaseAllowance", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "initalRewardPerShare", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "uint256", "name": "_validatorId", "type": "uint256" }, + { + "internalType": "address", + "name": "_stakingLogger", + "type": "address" + }, + { "internalType": "address", "name": "_stakeManager", "type": "address" } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isOwner", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "lastCommissionUpdate_deprecated", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "lock", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "locked", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "user", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "migrateIn", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "user", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "migrateOut", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "minAmount", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "polToken", + "outputs": [ + { "internalType": "contract IERC20Permit", "name": "", "type": "address" } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "restake", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "restakePOL", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "rewardPerShare", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "uint256", "name": "claimAmount", "type": "uint256" }, + { + "internalType": "uint256", + "name": "maximumSharesToBurn", + "type": "uint256" + } + ], + "name": "sellVoucher", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "uint256", "name": "claimAmount", "type": "uint256" }, + { + "internalType": "uint256", + "name": "maximumSharesToBurn", + "type": "uint256" + } + ], + "name": "sellVoucherPOL", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "uint256", "name": "claimAmount", "type": "uint256" }, + { + "internalType": "uint256", + "name": "maximumSharesToBurn", + "type": "uint256" + } + ], + "name": "sellVoucher_new", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "uint256", "name": "claimAmount", "type": "uint256" }, + { + "internalType": "uint256", + "name": "maximumSharesToBurn", + "type": "uint256" + } + ], + "name": "sellVoucher_newPOL", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "validatorStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "delegatedAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalAmountToSlash", + "type": "uint256" + } + ], + "name": "slash", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "stakeManager", + "outputs": [ + { + "internalType": "contract IStakeManager", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "stakingLogger", + "outputs": [ + { "internalType": "contract StakingInfo", "name": "", "type": "address" } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalStake_deprecated", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "value", "type": "uint256" } + ], + "name": "transfer", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "from", "type": "address" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "value", "type": "uint256" } + ], + "name": "transferFrom", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "newOwner", "type": "address" } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "value", "type": "uint256" } + ], + "name": "transferPOL", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "unbondNonces", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "unbonds", + "outputs": [ + { "internalType": "uint256", "name": "shares", "type": "uint256" }, + { "internalType": "uint256", "name": "withdrawEpoch", "type": "uint256" } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "name": "unbonds_new", + "outputs": [ + { "internalType": "uint256", "name": "shares", "type": "uint256" }, + { "internalType": "uint256", "name": "withdrawEpoch", "type": "uint256" } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "unlock", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "unstakeClaimTokens", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "unstakeClaimTokensPOL", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "uint256", "name": "unbondNonce", "type": "uint256" } + ], + "name": "unstakeClaimTokens_new", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "uint256", "name": "unbondNonce", "type": "uint256" } + ], + "name": "unstakeClaimTokens_newPOL", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bool", "name": "_delegation", "type": "bool" } + ], + "name": "updateDelegation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "validatorId", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "validatorRewards_deprecated", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "withdrawExchangeRate", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "withdrawPool", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "withdrawRewards", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "withdrawRewardsPOL", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "withdrawShares", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + } +] diff --git a/tests/networks/ethereum/stakekit/b2c.json b/tests/networks/ethereum/stakekit/b2c.json index e71f411..3ac500c 100644 --- a/tests/networks/ethereum/stakekit/b2c.json +++ b/tests/networks/ethereum/stakekit/b2c.json @@ -126,6 +126,53 @@ } } }, + + { + "address": "0x56d783ca8e0b998c57a428bf1c26a8baca50524e", + "contractName": "ValidatorShareProxy", + "selectors": { + "0x6ab15071": { + "erc20OfInterest": [], + "method": "buyVoucher", + "plugin": "StakeKit" + }, + "0xe4457a8a": { + "erc20OfInterest": [], + "method": "buyVoucherPOL", + "plugin": "StakeKit" + }, + "0xc83ec04d": { + "erc20OfInterest": [], + "method": "sellVoucher_new", + "plugin": "StakeKit" + }, + "0xe570b78b": { + "erc20OfInterest": [], + "method": "sellVoucher_newPOL", + "plugin": "StakeKit" + }, + "0xe97fddc2": { + "erc20OfInterest": [], + "method": "unstakeClaimTokens_new", + "plugin": "StakeKit" + }, + "0x8759c234": { + "erc20OfInterest": [], + "method": "unstakeClaimTokens_newPOL", + "plugin": "StakeKit" + }, + "0xc7b8981c": { + "erc20OfInterest": [], + "method": "withdrawRewards", + "plugin": "StakeKit" + }, + "0xe0db556b": { + "erc20OfInterest": [], + "method": "withdrawRewardsPOL", + "plugin": "StakeKit" + } + } + }, { "address": "0xc5c9fb6223a989208df27dcee33fc59ff5c26fff", "contractName": "InitializableAdminUpgradeabilityProxy", diff --git a/tests/src/ethereum/ethereum_sell_voucher_new_pol.test.js b/tests/src/ethereum/ethereum_sell_voucher_new_pol.test.js new file mode 100644 index 0000000..a5fb75e --- /dev/null +++ b/tests/src/ethereum/ethereum_sell_voucher_new_pol.test.js @@ -0,0 +1,39 @@ +import { processTest, populateTransaction } from "../test.fixture"; + +const contractName = "ValidatorShareProxy"; // <= Name of the smart contract + +const testLabel = "ethereum_sell_voucher_new_pol"; // <= Name of the test +const testDirSuffix = "ethereum_sell_voucher_new_pol"; // <= directory to compare device snapshots to +const testNetwork = "ethereum"; +const signedPlugin = false; + +const contractAddr = "0x56d783Ca8e0b998C57a428Bf1c26A8baca50524e"; // <= Address of the smart contract +const chainID = 1; + +// From : https://etherscan.io/tx/0x05497a760f918f43533d2608272ac0f9df729063cf10d3f93d823241380b200d +const inputData = "0xe570b78b00000000000000000000000000000000000000000000001491ed349675f9000000000000000000000000000000000000000000000000001491ed349675f90000"; + +// Create serializedTx and remove the "0x" prefix +const serializedTx = populateTransaction(contractAddr, inputData, chainID); + +const devices = [ + { + name: "nanos", + label: "Nano S", + steps: 5, // <= Define the number of steps for this test case and this device + }, + { + name: "nanox", + label: "Nano X", + steps: 4, // <= Define the number of steps for this test case and this device + }, + { + name: "nanosp", + label: "Nano S+", + steps: 4, // <= Define the number of steps for this test case and this device + } +]; + +devices.forEach((device) => + processTest(device, contractName, testLabel, testDirSuffix, "", signedPlugin, serializedTx, testNetwork) +);