diff --git a/app/Makefile b/app/Makefile index 222f46fd..e8311dbb 100755 --- a/app/Makefile +++ b/app/Makefile @@ -47,8 +47,8 @@ COIN=FIL endif APPVERSION_M=0 -APPVERSION_N=17 -APPVERSION_P=3 +APPVERSION_N=18 +APPVERSION_P=1 $(info COIN = [$(COIN)]) ifeq ($(COIN),FIL) @@ -123,7 +123,7 @@ SDK_SOURCE_PATH += lib_blewbxx lib_blewbxx_impl else # Assume Nano S DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=128 -DEFINES += HAVE_BOLOS_UX COMPLIANCE_UX_160 HAVE_UX_LEGACY +DEFINES += COMPLIANCE_UX_160 HAVE_UX_LEGACY endif # X specific diff --git a/app/script.ld b/app/script.ld index 73e2a6e2..378509c1 100644 --- a/app/script.ld +++ b/app/script.ld @@ -30,7 +30,7 @@ MEMORY } PAGE_SIZE = 64; -STACK_SIZE = 2008; +STACK_SIZE = 1892; END_STACK = ORIGIN(SRAM) + LENGTH(SRAM); SECTIONS diff --git a/app/src/parser.c b/app/src/parser.c index 9a58987e..754a54e9 100644 --- a/app/src/parser.c +++ b/app/src/parser.c @@ -162,11 +162,6 @@ parser_error_t parser_getItem(const parser_context_t *ctx, } if (displayIdx == 4) { - snprintf(outKey, outKeyLen, "Gas Price"); - return parser_printBigIntFixedPoint(&parser_tx_obj.gasprice, outVal, outValLen, pageIdx, pageCount); - } - - if (displayIdx == 5) { snprintf(outKey, outKeyLen, "Gas Limit"); if (int64_to_str(outVal, outValLen, parser_tx_obj.gaslimit) != NULL) { return parser_unexepected_error; @@ -175,7 +170,17 @@ parser_error_t parser_getItem(const parser_context_t *ctx, return parser_ok; } + if (displayIdx == 5) { + snprintf(outKey, outKeyLen, "Gas Premium"); + return parser_printBigIntFixedPoint(&parser_tx_obj.gaspremium, outVal, outValLen, pageIdx, pageCount); + } + if (displayIdx == 6) { + snprintf(outKey, outKeyLen, "Gas Fee Cap"); + return parser_printBigIntFixedPoint(&parser_tx_obj.gasfeecap, outVal, outValLen, pageIdx, pageCount); + } + + if (displayIdx == 7) { snprintf(outKey, outKeyLen, "Method"); *pageCount = 1; switch(parser_tx_obj.method) { @@ -207,7 +212,7 @@ parser_error_t parser_getItem(const parser_context_t *ctx, return parser_unexpected_method; } - if (displayIdx == 7) { + if (displayIdx == 8) { *pageCount = 1; snprintf(outKey, outKeyLen, "Params"); snprintf(outVal, outValLen, "Not Available"); diff --git a/app/src/parser_impl.c b/app/src/parser_impl.c index 5d9a01d7..109d0fb5 100644 --- a/app/src/parser_impl.c +++ b/app/src/parser_impl.c @@ -249,7 +249,7 @@ parser_error_t _read(const parser_context_t *c, parser_tx_t *v) { CHECK_CBOR_MAP_ERR(cbor_value_get_array_length(&it, &arraySize)) // Depends if we have params or not - PARSER_ASSERT_OR_ERROR(arraySize == 9 || arraySize == 8, parser_unexpected_number_items); + PARSER_ASSERT_OR_ERROR(arraySize == 10 || arraySize == 9, parser_unexpected_number_items); CborValue arrayContainer; PARSER_ASSERT_OR_ERROR(cbor_value_is_container(&it), parser_unexpected_type) @@ -286,17 +286,22 @@ parser_error_t _read(const parser_context_t *c, parser_tx_t *v) { PARSER_ASSERT_OR_ERROR(arrayContainer.type != CborInvalidType, parser_unexpected_type) CHECK_CBOR_MAP_ERR(cbor_value_advance(&arrayContainer)) - // "gasPrice" field - CHECK_PARSER_ERR(_readBigInt(&v->gasprice, &arrayContainer)) - PARSER_ASSERT_OR_ERROR(arrayContainer.type != CborInvalidType, parser_unexpected_type) - CHECK_CBOR_MAP_ERR(cbor_value_advance(&arrayContainer)) - // "gasLimit" field PARSER_ASSERT_OR_ERROR(cbor_value_is_integer(&arrayContainer), parser_unexpected_type) CHECK_PARSER_ERR(cbor_value_get_int64(&arrayContainer, &v->gaslimit)) PARSER_ASSERT_OR_ERROR(arrayContainer.type != CborInvalidType, parser_unexpected_type) CHECK_CBOR_MAP_ERR(cbor_value_advance(&arrayContainer)) + // "gasPremium" field + CHECK_PARSER_ERR(_readBigInt(&v->gaspremium, &arrayContainer)) + PARSER_ASSERT_OR_ERROR(arrayContainer.type != CborInvalidType, parser_unexpected_type) + CHECK_CBOR_MAP_ERR(cbor_value_advance(&arrayContainer)) + + // "gasFeeCap" field + CHECK_PARSER_ERR(_readBigInt(&v->gasfeecap, &arrayContainer)) + PARSER_ASSERT_OR_ERROR(arrayContainer.type != CborInvalidType, parser_unexpected_type) + CHECK_CBOR_MAP_ERR(cbor_value_advance(&arrayContainer)) + // "method" field CHECK_PARSER_ERR(_readMethod(v, &arrayContainer)) PARSER_ASSERT_OR_ERROR(arrayContainer.type != CborInvalidType, parser_unexpected_type) @@ -321,11 +326,11 @@ parser_error_t _validateTx(const parser_context_t *c, const parser_tx_t *v) { } uint8_t _getNumItems(const parser_context_t *c, const parser_tx_t *v) { - uint8_t itemCount = 8; + uint8_t itemCount = 9; switch (v->method) { case method0: - itemCount = 6; + itemCount = 7; break; case method1: case method2: @@ -334,7 +339,7 @@ uint8_t _getNumItems(const parser_context_t *c, const parser_tx_t *v) { case method5: case method6: case method7: - itemCount = 8; + break; } return itemCount; diff --git a/app/src/parser_txdef.h b/app/src/parser_txdef.h index 9aa28152..9d04152f 100644 --- a/app/src/parser_txdef.h +++ b/app/src/parser_txdef.h @@ -60,8 +60,9 @@ typedef struct { address_t from; uint64_t nonce; bigint_t value; - bigint_t gasprice; int64_t gaslimit; + bigint_t gaspremium; + bigint_t gasfeecap; uint64_t method; // params are not supported at this moment // char *params diff --git a/tests/testvectors/manual.json b/tests/testvectors/manual.json index 8b9095f4..65b65d53 100644 --- a/tests/testvectors/manual.json +++ b/tests/testvectors/manual.json @@ -1,7 +1,7 @@ [ { "description": "TODO invalid test case ", - "encoded_tx": "iQBAQABCAABCAAAAAEA=", + "encoded_tx": "igBAQABCAAAAQgAAQgAAAEA=", "valid": false, "testnet": false, "message": { @@ -10,15 +10,16 @@ "from": "", "nonce": 0, "value": "0", - "gasprice": "0", "gaslimit": "0", + "gaspremium": "0", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "8900404000420000420000000040" + "encoded_tx_hex": "8a00404000420000004200004200000040" }, { "description": "Basic test case", - "encoded_tx": "iQBVAf0dD0381+ma/Lmagya33EWdMsYoVQG4gmGdRlWPPZ4xbRG0jc8hEycCWgFEAAGGoEMACcQZYagAQA==", + "encoded_tx": "igBVAf0dD0381+ma/Lmagya33EWdMsYoVQG4gmGdRlWPPZ4xbRG0jc8hEycCWgFEAAGGoBlhqEMACcRCAAAAQA==", "valid": true, "testnet": false, "message": { @@ -27,15 +28,16 @@ "from": "f1xcbgdhkgkwht3hrrnui3jdopeejsoas2rujnkdi", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "89005501fd1d0f4dfcd7e99afcb99a8326b7dc459d32c6285501b882619d46558f3d9e316d11b48dcf211327025a0144000186a0430009c41961a80040" + "encoded_tx_hex": "8a005501fd1d0f4dfcd7e99afcb99a8326b7dc459d32c6285501b882619d46558f3d9e316d11b48dcf211327025a0144000186a01961a8430009c44200000040" }, { "description": "Basic test case Testnet", - "encoded_tx": "iQBVAf0dD0381+ma/Lmagya33EWdMsYoVQG4gmGdRlWPPZ4xbRG0jc8hEycCWgFEAAGGoEMACcQZYagAQA==", + "encoded_tx": "igBVAf0dD0381+ma/Lmagya33EWdMsYoVQG4gmGdRlWPPZ4xbRG0jc8hEycCWgFEAAGGoBlhqEMACcRCAAAAQA==", "valid": true, "testnet": true, "message": { @@ -44,15 +46,16 @@ "from": "t1xcbgdhkgkwht3hrrnui3jdopeejsoas2rujnkdi", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "89005501fd1d0f4dfcd7e99afcb99a8326b7dc459d32c6285501b882619d46558f3d9e316d11b48dcf211327025a0144000186a0430009c41961a80040" + "encoded_tx_hex": "8a005501fd1d0f4dfcd7e99afcb99a8326b7dc459d32c6285501b882619d46558f3d9e316d11b48dcf211327025a0144000186a01961a8430009c44200000040" }, { "description": "Using Protocol 0 addresses", - "encoded_tx": "iQBCAABDAJYBAUQAAYagQwAJxBlhqABA", + "encoded_tx": "igBCAABDAJYBAUQAAYagGWGoQwAJxEIAAABA", "valid": true, "testnet": false, "message": { @@ -61,15 +64,16 @@ "from": "f0150", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "8900420000430096010144000186a0430009c41961a80040" + "encoded_tx_hex": "8a00420000430096010144000186a01961a8430009c44200000040" }, { "description": "Using Protocol 0 addresses 2", - "encoded_tx": "iQBDAIAIQwDBDQFEAAGGoEMACcQZYagAQA==", + "encoded_tx": "igBDAIAIQwDBDQFEAAGGoBlhqEMACcRCAAAAQA==", "valid": true, "testnet": false, "message": { @@ -78,15 +82,16 @@ "from": "f01729", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "8900430080084300c10d0144000186a0430009c41961a80040" + "encoded_tx_hex": "8a00430080084300c10d0144000186a01961a8430009c44200000040" }, { "description": "Using Protocol 0 addresses 3", - "encoded_tx": "iQBLAP///////////wFCAAABRAABhqBDAAnEGWGoAEA=", + "encoded_tx": "igBLAP///////////wFCAAABRAABhqAZYahDAAnEQgAAAEA=", "valid": true, "testnet": false, "message": { @@ -95,15 +100,16 @@ "from": "f00", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "89004b00ffffffffffffffffff014200000144000186a0430009c41961a80040" + "encoded_tx_hex": "8a004b00ffffffffffffffffff014200000144000186a01961a8430009c44200000040" }, { "description": "Using Protocol 1 addresses", - "encoded_tx": "iQBVAf0dD0381+ma/Lmagya33EWdMsYoVQG4gmGdRlWPPZ4xbRG0jc8hEycCagFEAAGGoEMACcQZYagAQA==", + "encoded_tx": "igBVAf0dD0381+ma/Lmagya33EWdMsYoVQG4gmGdRlWPPZ4xbRG0jc8hEycCagFEAAGGoBlhqEMACcRCAAAAQA==", "valid": true, "testnet": false, "message": { @@ -112,15 +118,16 @@ "from": "f1xcbgdhkgkwht3hrrnui3jdopeejsoatkzmoltqy", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "89005501fd1d0f4dfcd7e99afcb99a8326b7dc459d32c6285501b882619d46558f3d9e316d11b48dcf211327026a0144000186a0430009c41961a80040" + "encoded_tx_hex": "8a005501fd1d0f4dfcd7e99afcb99a8326b7dc459d32c6285501b882619d46558f3d9e316d11b48dcf211327026a0144000186a01961a8430009c44200000040" }, { "description": "Using Protocol 1 addresses 2", - "encoded_tx": "iQBVAbzsB8BeafkkaOKz4793yHTyxdqMVQGwbnpvD1Ud4mH+Om/hgrQi7gvGtgFEAAGGoEMACcQZYagAQA==", + "encoded_tx": "igBVAbzsB8BeafkkaOKz4793yHTyxdqMVQGwbnpvD1Ud4mH+Om/hgrQi7gvGtgFEAAGGoBlhqEMACcRCAAAAQA==", "valid": true, "testnet": false, "message": { @@ -129,15 +136,16 @@ "from": "f1wbxhu3ypkuo6eyp6hjx6davuelxaxrvwb2kuwva", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "89005501bcec07c05e69f92468e2b3e3bf77c874f2c5da8c5501b06e7a6f0f551de261fe3a6fe182b422ee0bc6b60144000186a0430009c41961a80040" + "encoded_tx_hex": "8a005501bcec07c05e69f92468e2b3e3bf77c874f2c5da8c5501b06e7a6f0f551de261fe3a6fe182b422ee0bc6b60144000186a01961a8430009c44200000040" }, { "description": "Using Protocol 1 addresses 3", - "encoded_tx": "iQBVAdFQBQTk0aw+iayJGkUCWG+r2bQXVQH9HQ9N/Nfpmvy5moMmt9xFnTLGKAFEAAGGoEMACcQZYagAQA==", + "encoded_tx": "igBVAdFQBQTk0aw+iayJGkUCWG+r2bQXVQH9HQ9N/Nfpmvy5moMmt9xFnTLGKAFEAAGGoBlhqEMACcRCAAAAQA==", "valid": true, "testnet": false, "message": { @@ -146,15 +154,16 @@ "from": "f17uoq6tp427uzv7fztkbsnn64iwotfrristwpryy", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "89005501d1500504e4d1ac3e89ac891a4502586fabd9b4175501fd1d0f4dfcd7e99afcb99a8326b7dc459d32c6280144000186a0430009c41961a80040" + "encoded_tx_hex": "8a005501d1500504e4d1ac3e89ac891a4502586fabd9b4175501fd1d0f4dfcd7e99afcb99a8326b7dc459d32c6280144000186a01961a8430009c44200000040" }, { "description": "Using Protocol 2 addresses", - "encoded_tx": "iQBVAuVN6k+bxbR9JhgZgm1eH7+LxVA7VQLrWL0IoVpq3hnQmJZ0FI+pWoFXxgFEAAGGoEMACcQZYagAQA==", + "encoded_tx": "igBVAuVN6k+bxbR9JhgZgm1eH7+LxVA7VQLrWL0IoVpq3hnQmJZ0FI+pWoFXxgFEAAGGoBlhqEMACcRCAAAAQA==", "valid": true, "testnet": false, "message": { @@ -163,15 +172,16 @@ "from": "f25nml2cfbljvn4goqtclhifepvfnicv6g7mfmmvq", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "89005502e54dea4f9bc5b47d261819826d5e1fbf8bc5503b5502eb58bd08a15a6ade19d0989674148fa95a8157c60144000186a0430009c41961a80040" + "encoded_tx_hex": "8a005502e54dea4f9bc5b47d261819826d5e1fbf8bc5503b5502eb58bd08a15a6ade19d0989674148fa95a8157c60144000186a01961a8430009c44200000040" }, { "description": "Using Protocol 2 addresses 2", - "encoded_tx": "iQBVAm0hE360xIFCaeiU0pbPZQDkPNcUVQLgx8dfgtVeXtVdsoAzYw30J0qYTwFEAAGGoEMACcQZYagAQA==", + "encoded_tx": "igBVAm0hE360xIFCaeiU0pbPZQDkPNcUVQLgx8dfgtVeXtVdsoAzYw30J0qYTwFEAAGGoBlhqEMACcRCAAAAQA==", "valid": true, "testnet": false, "message": { @@ -180,15 +190,16 @@ "from": "f24dd4ox4c2vpf5vk5wkadgyyn6qtuvgcpxxon64a", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "890055026d21137eb4c4814269e894d296cf6500e43cd7145502e0c7c75f82d55e5ed55db28033630df4274a984f0144000186a0430009c41961a80040" + "encoded_tx_hex": "8a0055026d21137eb4c4814269e894d296cf6500e43cd7145502e0c7c75f82d55e5ed55db28033630df4274a984f0144000186a01961a8430009c44200000040" }, { "description": "Using Protocol 2 addresses 3", - "encoded_tx": "iQBVAjFrTB/11K+3gmzqtbsPLD4PNkBTVQLlTepPm8W0fSYYGYJtXh+/i8VQOwFEAAGGoEMACcQZYagAQA==", + "encoded_tx": "igBVAjFrTB/11K+3gmzqtbsPLD4PNkBTVQLlTepPm8W0fSYYGYJtXh+/i8VQOwFEAAGGoBlhqEMACcRCAAAAQA==", "valid": true, "testnet": false, "message": { @@ -197,15 +208,16 @@ "from": "f24vg6ut43yw2h2jqydgbg2xq7x6f4kub3bg6as6i", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "89005502316b4c1ff5d4afb7826ceab5bb0f2c3e0f3640535502e54dea4f9bc5b47d261819826d5e1fbf8bc5503b0144000186a0430009c41961a80040" + "encoded_tx_hex": "8a005502316b4c1ff5d4afb7826ceab5bb0f2c3e0f3640535502e54dea4f9bc5b47d261819826d5e1fbf8bc5503b0144000186a01961a8430009c44200000040" }, { "description": "Using Protocol 3 addresses", - "encoded_tx": "iQBYMQOtWN9pbi1OkeqGyIHpOLpOqBs5XhJ5e4S5zzFLlUZwXoOcepnWBrJH3bT5rHo0FN1YMQOzKU8KLingxm68I10v7cpWl794SvYFx1r2COamPVzTjqhcqJieDv3pGIs4L5NyRg0BRAABhqBDAAnEGWGoAEA=", + "encoded_tx": "igBYMQOtWN9pbi1OkeqGyIHpOLpOqBs5XhJ5e4S5zzFLlUZwXoOcepnWBrJH3bT5rHo0FN1YMQOzKU8KLingxm68I10v7cpWl794SvYFx1r2COamPVzTjqhcqJieDv3pGIs4L5NyRg0BRAABhqAZYahDAAnEQgAAAEA=", "valid": true, "testnet": false, "message": { @@ -214,15 +226,16 @@ "from": "f3wmuu6crofhqmm3v4enos73okk2l366ck6yc4owxwbdtkmpk42ohkqxfitcpa57pjdcftql4tojda2poeruwa", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "8900583103ad58df696e2d4e91ea86c881e938ba4ea81b395e12797b84b9cf314b9546705e839c7a99d606b247ddb4f9ac7a3414dd583103b3294f0a2e29e0c66ebc235d2fedca5697bf784af605c75af608e6a63d5cd38ea85ca8989e0efde9188b382f9372460d0144000186a0430009c41961a80040" + "encoded_tx_hex": "8a00583103ad58df696e2d4e91ea86c881e938ba4ea81b395e12797b84b9cf314b9546705e839c7a99d606b247ddb4f9ac7a3414dd583103b3294f0a2e29e0c66ebc235d2fedca5697bf784af605c75af608e6a63d5cd38ea85ca8989e0efde9188b382f9372460d0144000186a01961a8430009c44200000040" }, { "description": "Using Protocol 3 addresses 2", - "encoded_tx": "iQBYMQOWoaPk6noU1JmF5mGyJAHUT+1ALR0JJbJDySNYnA+8fjLNBOKe140V0306qj/m2jNYMQOGtFQljFiUdffRb1qsAYp59sEWnSD8M5Id2LXOHKxsNI+Qo2A2JPauuRtkUYwugJUBRAABhqBDAAnEGWGoAEA=", + "encoded_tx": "igBYMQOWoaPk6noU1JmF5mGyJAHUT+1ALR0JJbJDySNYnA+8fjLNBOKe140V0306qj/m2jNYMQOGtFQljFiUdffRb1qsAYp59sEWnSD8M5Id2LXOHKxsNI+Qo2A2JPauuRtkUYwugJUBRAABhqAZYahDAAnEQgAAAEA=", "valid": true, "testnet": false, "message": { @@ -231,15 +244,16 @@ "from": "f3q22fijmmlckhl56rn5nkyamkph3mcfu5ed6dheq53c244hfmnq2i7efdma3cj5voxenwiummf2ajlsbxc65a", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "890058310396a1a3e4ea7a14d49985e661b22401d44fed402d1d0925b243c923589c0fbc7e32cd04e29ed78d15d37d3aaa3fe6da3358310386b454258c589475f7d16f5aac018a79f6c1169d20fc33921dd8b5ce1cac6c348f90a3603624f6aeb91b64518c2e80950144000186a0430009c41961a80040" + "encoded_tx_hex": "8a0058310396a1a3e4ea7a14d49985e661b22401d44fed402d1d0925b243c923589c0fbc7e32cd04e29ed78d15d37d3aaa3fe6da3358310386b454258c589475f7d16f5aac018a79f6c1169d20fc33921dd8b5ce1cac6c348f90a3603624f6aeb91b64518c2e80950144000186a01961a8430009c44200000040" }, { "description": "Using Protocol 3 addresses 3", - "encoded_tx": "iQBYMQOncmsDgCL3WjhGF1hTYM7mKQcKLZ0ocSll5fJuzECFg4KANyTtNPJyAzbwnbYx8HRYMQOtWN9pbi1OkeqGyIHpOLpOqBs5XhJ5e4S5zzFLlUZwXoOcepnWBrJH3bT5rHo0FN0BRAABhqBDAAnEGWGoAEA=", + "encoded_tx": "igBYMQOncmsDgCL3WjhGF1hTYM7mKQcKLZ0ocSll5fJuzECFg4KANyTtNPJyAzbwnbYx8HRYMQOtWN9pbi1OkeqGyIHpOLpOqBs5XhJ5e4S5zzFLlUZwXoOcepnWBrJH3bT5rHo0FN0BRAABhqAZYahDAAnEQgAAAEA=", "valid": true, "testnet": false, "message": { @@ -248,15 +262,16 @@ "from": "f3vvmn62lofvhjd2ugzca6sof2j2ubwok6cj4xxbfzz4yuxfkgobpihhd2thlanmsh3w2ptld2gqkn2jvlss4a", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "8900583103a7726b038022f75a384617585360cee629070a2d9d28712965e5f26ecc40858382803724ed34f2720336f09db631f074583103ad58df696e2d4e91ea86c881e938ba4ea81b395e12797b84b9cf314b9546705e839c7a99d606b247ddb4f9ac7a3414dd0144000186a0430009c41961a80040" + "encoded_tx_hex": "8a00583103a7726b038022f75a384617585360cee629070a2d9d28712965e5f26ecc40858382803724ed34f2720336f09db631f074583103ad58df696e2d4e91ea86c881e938ba4ea81b395e12797b84b9cf314b9546705e839c7a99d606b247ddb4f9ac7a3414dd0144000186a01961a8430009c44200000040" }, { "description": "Using Protocol 3 addresses 3", - "encoded_tx": "iQBYMQOncmsDgCL3WjhGF1hTYM7mKQcKLZ0ocSll5fJuzECFg4KANyTtNPJyAzbwnbYx8HRYMQOtWN9pbi1OkeqGyIHpOLpOqBs5XhJ5e4S5zzFLlUZwXoOcepnWBrJH3bT5rHo0FN0BRAABhqBDAAnEGWGoAEA=", + "encoded_tx": "igBYMQOncmsDgCL3WjhGF1hTYM7mKQcKLZ0ocSll5fJuzECFg4KANyTtNPJyAzbwnbYx8HRYMQOtWN9pbi1OkeqGyIHpOLpOqBs5XhJ5e4S5zzFLlUZwXoOcepnWBrJH3bT5rHo0FN0BRAABhqAZYahDAAnEQgAAAEA=", "valid": true, "testnet": false, "message": { @@ -265,15 +280,16 @@ "from": "f3vvmn62lofvhjd2ugzca6sof2j2ubwok6cj4xxbfzz4yuxfkgobpihhd2thlanmsh3w2ptld2gqkn2jvlss4a", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "8900583103a7726b038022f75a384617585360cee629070a2d9d28712965e5f26ecc40858382803724ed34f2720336f09db631f074583103ad58df696e2d4e91ea86c881e938ba4ea81b395e12797b84b9cf314b9546705e839c7a99d606b247ddb4f9ac7a3414dd0144000186a0430009c41961a80040" + "encoded_tx_hex": "8a00583103a7726b038022f75a384617585360cee629070a2d9d28712965e5f26ecc40858382803724ed34f2720336f09db631f074583103ad58df696e2d4e91ea86c881e938ba4ea81b395e12797b84b9cf314b9546705e839c7a99d606b247ddb4f9ac7a3414dd0144000186a01961a8430009c44200000040" }, { "description": "Address protocol 1 Invalid payload length of 21 bytes", - "encoded_tx": "iQBWAQAAAAAAAAAAAAAAAAAAAAAAAAAAAVYBAAAAAAAAAAAAAAAAAAAAAAAAAAABAUQAAYagQwAJxBlhqABA", + "encoded_tx": "igBWAQAAAAAAAAAAAAAAAAAAAAAAAAAAAVYBAAAAAAAAAAAAAAAAAAAAAAAAAAABAUQAAYagGWGoQwAJxEIAAABA", "valid": false, "testnet": false, "message": { @@ -282,15 +298,16 @@ "from": "f1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaae6zk5dy", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "8900560100000000000000000000000000000000000000000156010000000000000000000000000000000000000000010144000186a0430009c41961a80040" + "encoded_tx_hex": "8a00560100000000000000000000000000000000000000000156010000000000000000000000000000000000000000010144000186a01961a8430009c44200000040" }, { "description": "Address protocol 1 Invalid payload length of 19 bytes", - "encoded_tx": "iQBUAQAAAAAAAAAAAAAAAAAAAAAAAABUAQAAAAAAAAAAAAAAAAAAAAAAAAABRAABhqBDAAnEGWGoAEA=", + "encoded_tx": "igBUAQAAAAAAAAAAAAAAAAAAAAAAAABUAQAAAAAAAAAAAAAAAAAAAAAAAAABRAABhqAZYahDAAnEQgAAAEA=", "valid": false, "testnet": false, "message": { @@ -299,15 +316,16 @@ "from": "f1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaabh2wd2q", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "89005401000000000000000000000000000000000000005401000000000000000000000000000000000000000144000186a0430009c41961a80040" + "encoded_tx_hex": "8a005401000000000000000000000000000000000000005401000000000000000000000000000000000000000144000186a01961a8430009c44200000040" }, { "description": "Address protocol 0 Invalid payload length of 21 bytes", - "encoded_tx": "iQBWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUQAAYagQwAJxBlhqABA", + "encoded_tx": "igBWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUQAAYagGWGoQwAJxEIAAABA", "valid": false, "testnet": false, "message": { @@ -316,15 +334,16 @@ "from": "f00", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "8900560000000000000000000000000000000000000000000056000000000000000000000000000000000000000000000144000186a0430009c41961a80040" + "encoded_tx_hex": "8a00560000000000000000000000000000000000000000000056000000000000000000000000000000000000000000000144000186a01961a8430009c44200000040" }, { "description": "Address protocol 2 Invalid payload length of 21 bytes", - "encoded_tx": "iQBWAgAAAAAAAAAAAAAAAAAAAAAAAAAAAFYCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUQAAYagQwAJxBlhqABA", + "encoded_tx": "igBWAgAAAAAAAAAAAAAAAAAAAAAAAAAAAFYCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUQAAYagGWGoQwAJxEIAAABA", "valid": false, "testnet": false, "message": { @@ -333,15 +352,16 @@ "from": "f2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa3sien4", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "8900560200000000000000000000000000000000000000000056020000000000000000000000000000000000000000000144000186a0430009c41961a80040" + "encoded_tx_hex": "8a00560200000000000000000000000000000000000000000056020000000000000000000000000000000000000000000144000186a01961a8430009c44200000040" }, { "description": "Address protocol 2 Invalid payload length of 19 bytes", - "encoded_tx": "iQBUAgAAAAAAAAAAAAAAAAAAAAAAAABUAgAAAAAAAAAAAAAAAAAAAAAAAAABRAABhqBDAAnEGWGoAEA=", + "encoded_tx": "igBUAgAAAAAAAAAAAAAAAAAAAAAAAABUAgAAAAAAAAAAAAAAAAAAAAAAAAABRAABhqAZYahDAAnEQgAAAEA=", "valid": false, "testnet": false, "message": { @@ -350,15 +370,16 @@ "from": "f2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaab5nwlky", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "89005402000000000000000000000000000000000000005402000000000000000000000000000000000000000144000186a0430009c41961a80040" + "encoded_tx_hex": "8a005402000000000000000000000000000000000000005402000000000000000000000000000000000000000144000186a01961a8430009c44200000040" }, { "description": "Address protocol 3 Invalid payload length of 47 bytes", - "encoded_tx": "iQBYMAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFgwAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUQAAYagQwAJxBlhqABA", + "encoded_tx": "igBYMAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFgwAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUQAAYagGWGoQwAJxEIAAABA", "valid": false, "testnet": false, "message": { @@ -367,15 +388,16 @@ "from": "f3aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaamqs4am4", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "8900583003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000058300300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000144000186a0430009c41961a80040" + "encoded_tx_hex": "8a00583003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000058300300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000144000186a01961a8430009c44200000040" }, { "description": "Address protocol 3 Invalid payload length of 49 bytes", - "encoded_tx": "iQBYMgMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWDIDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFEAAGGoEMACcQZYagAQA==", + "encoded_tx": "igBYMgMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWDIDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFEAAGGoBlhqEMACcRCAAAAQA==", "valid": false, "testnet": false, "message": { @@ -384,15 +406,16 @@ "from": "f3aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaddp6aeu", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "890058320300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000583203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000144000186a0430009c41961a80040" + "encoded_tx_hex": "8a0058320300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000583203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000144000186a01961a8430009c44200000040" }, { "description": "Address with unknown protocol", - "encoded_tx": "iQBVBAAAAAAAAAAAAAAAAAAAAAAAAAAAVQQAAAAAAAAAAAAAAAAAAAAAAAAAAAFEAAGGoEMACcQZYagAQA==", + "encoded_tx": "igBVBAAAAAAAAAAAAAAAAAAAAAAAAAAAVQQAAAAAAAAAAAAAAAAAAAAAAAAAAAFEAAGGoBlhqEMACcRCAAAAQA==", "valid": false, "testnet": false, "message": { @@ -401,15 +424,16 @@ "from": "faaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaryyc34i", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "890055040000000000000000000000000000000000000000550400000000000000000000000000000000000000000144000186a0430009c41961a80040" + "encoded_tx_hex": "8a0055040000000000000000000000000000000000000000550400000000000000000000000000000000000000000144000186a01961a8430009c44200000040" }, { "description": "Negative sign byte", - "encoded_tx": "iQBVAdFQBQTk0aw+iayJGkUCWG+r2bQXVQG4gmGdRlWPPZ4xbRG0jc8hEycCagFBAUMACcQZYagAQA==", + "encoded_tx": "igBVAdFQBQTk0aw+iayJGkUCWG+r2bQXVQG4gmGdRlWPPZ4xbRG0jc8hEycCagFBARlhqEMACcRCAAAAQA==", "valid": false, "testnet": false, "message": { @@ -418,15 +442,16 @@ "from": "f1xcbgdhkgkwht3hrrnui3jdopeejsoatkzmoltqy", "nonce": 1, "value": "-100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "89005501d1500504e4d1ac3e89ac891a4502586fabd9b4175501b882619d46558f3d9e316d11b48dcf211327026a014101430009c41961a80040" + "encoded_tx_hex": "8a005501d1500504e4d1ac3e89ac891a4502586fabd9b4175501b882619d46558f3d9e316d11b48dcf211327026a0141011961a8430009c44200000040" }, { "description": "Empty value", - "encoded_tx": "iQBVAdFQBQTk0aw+iayJGkUCWG+r2bQXVQG4gmGdRlWPPZ4xbRG0jc8hEycCagFBAEMACcQZYagAQA==", + "encoded_tx": "igBVAdFQBQTk0aw+iayJGkUCWG+r2bQXVQG4gmGdRlWPPZ4xbRG0jc8hEycCagFBABlhqEMACcRCAAAAQA==", "valid": false, "testnet": false, "message": { @@ -435,15 +460,16 @@ "from": "f1xcbgdhkgkwht3hrrnui3jdopeejsoatkzmoltqy", "nonce": 1, "value": "", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "89005501d1500504e4d1ac3e89ac891a4502586fabd9b4175501b882619d46558f3d9e316d11b48dcf211327026a014100430009c41961a80040" + "encoded_tx_hex": "8a005501d1500504e4d1ac3e89ac891a4502586fabd9b4175501b882619d46558f3d9e316d11b48dcf211327026a0141001961a8430009c44200000040" }, { "description": "Wrong version", - "encoded_tx": "iRh7VQHRUAUE5NGsPomsiRpFAlhvq9m0F1UBuIJhnUZVjz2eMW0RtI3PIRMnAmoBQQBDAAnEGWGoAEA=", + "encoded_tx": "ihh7VQHRUAUE5NGsPomsiRpFAlhvq9m0F1UBuIJhnUZVjz2eMW0RtI3PIRMnAmoBQQAZYahDAAnEQgAAAEA=", "valid": false, "testnet": false, "message": { @@ -452,28 +478,11 @@ "from": "f1xcbgdhkgkwht3hrrnui3jdopeejsoatkzmoltqy", "nonce": 1, "value": "", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 }, - "encoded_tx_hex": "89187b5501d1500504e4d1ac3e89ac891a4502586fabd9b4175501b882619d46558f3d9e316d11b48dcf211327026a014100430009c41961a80040" - }, - { - "description": "Method 2", - "encoded_tx": "", - "valid": true, - "expert": true, - "testnet": false, - "message": { - "version": 123, - "to": "f01005", - "from": "f137sjdbgunloi7couiy4l5nc7pd6k2jmq32vizpy", - "nonce": 16, - "value": "0000000000000000000", - "gasprice": "1", - "gaslimit": "1000", - "method": 2 - }, - "encoded_tx_hex": "89004300ed075501dfe49184d46adc8f89d44638beb45f78fcad259010404200011903e8025823845501dfe49184d46adc8f89d44638beb45f78fcad259049000de0b6b3a76400000040" + "encoded_tx_hex": "8a187b5501d1500504e4d1ac3e89ac891a4502586fabd9b4175501b882619d46558f3d9e316d11b48dcf211327026a0141001961a8430009c44200000040" } -] +] \ No newline at end of file diff --git a/tests/utils/expected_output.cpp b/tests/utils/expected_output.cpp index 981581ad..f6681e43 100644 --- a/tests/utils/expected_output.cpp +++ b/tests/utils/expected_output.cpp @@ -77,17 +77,19 @@ std::vector GenerateExpectedUIOutput(const testcaseData_t &tcd) { addTo(answer, "3 | Value : {}", FormatAmount(tcd.value)); - addTo(answer, "4 | Gas Price : {}", FormatAmount(tcd.gasprice)); + addTo(answer, "4 | Gas Limit : {}", tcd.gaslimit); - addTo(answer, "5 | Gas Limit : {}", tcd.gaslimit); + addTo(answer, "5 | Gas Premium : {}", FormatAmount(tcd.gaspremium)); + + addTo(answer, "6 | Gas Fee Cap : {}", FormatAmount(tcd.gasfeecap)); if (tcd.method != 0) { - addTo(answer, "6 | Method : Method{}", tcd.method); + addTo(answer, "7 | Method : Method{}", tcd.method); } // If 0 we have a no parameters if (tcd.method != 0) { - addTo(answer, "7 | Params : Not Available"); + addTo(answer, "8 | Params : Not Available"); } return answer; diff --git a/tests/utils/testcases.cpp b/tests/utils/testcases.cpp index 501593c7..bb178767 100644 --- a/tests/utils/testcases.cpp +++ b/tests/utils/testcases.cpp @@ -45,8 +45,9 @@ testcaseData_t ReadRawTestCase(const std::shared_ptr &jsonSource, i message["from"].asString(), message["nonce"].asUInt64(), message["value"].asString(), - message["gasprice"].asString(), message["gaslimit"].asString(), + message["gaspremium"].asString(), + message["gasfeecap"].asString(), message["method"].asUInt64(), v["encoded_tx"].asString(), v["valid"].asBool(), diff --git a/tests/utils/types.h b/tests/utils/types.h index 76f5226e..12aced4f 100644 --- a/tests/utils/types.h +++ b/tests/utils/types.h @@ -21,8 +21,9 @@ typedef struct { std::string from; uint64_t nonce; std::string value; - std::string gasprice; std::string gaslimit; + std::string gaspremium; + std::string gasfeecap; uint64_t method; std::string encoded_tx; diff --git a/tests_zemu/snapshots-tmp/.gitignore b/tests_zemu/snapshots-tmp/.gitignore deleted file mode 100644 index e33609d2..00000000 --- a/tests_zemu/snapshots-tmp/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.png diff --git a/tests_zemu/snapshots-tmp/show-address/.gitkeep b/tests_zemu/snapshots-tmp/show-address/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/tests_zemu/snapshots/show-address/0.png b/tests_zemu/snapshots-tmp/show_address/0.png similarity index 100% rename from tests_zemu/snapshots/show-address/0.png rename to tests_zemu/snapshots-tmp/show_address/0.png diff --git a/tests_zemu/snapshots/show-address/1.png b/tests_zemu/snapshots-tmp/show_address/1.png similarity index 100% rename from tests_zemu/snapshots/show-address/1.png rename to tests_zemu/snapshots-tmp/show_address/1.png diff --git a/tests_zemu/snapshots/show-address/2.png b/tests_zemu/snapshots-tmp/show_address/2.png similarity index 100% rename from tests_zemu/snapshots/show-address/2.png rename to tests_zemu/snapshots-tmp/show_address/2.png diff --git a/tests_zemu/snapshots/show-address/3.png b/tests_zemu/snapshots-tmp/show_address/3.png similarity index 100% rename from tests_zemu/snapshots/show-address/3.png rename to tests_zemu/snapshots-tmp/show_address/3.png diff --git a/tests_zemu/snapshots-tmp/sign-basic/.gitkeep b/tests_zemu/snapshots-tmp/sign-basic/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/tests_zemu/snapshots-tmp/sign-proposal/.gitkeep b/tests_zemu/snapshots-tmp/sign-proposal/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/tests_zemu/snapshots-tmp/sign_basic/0.png b/tests_zemu/snapshots-tmp/sign_basic/0.png new file mode 100644 index 00000000..f7c9c845 Binary files /dev/null and b/tests_zemu/snapshots-tmp/sign_basic/0.png differ diff --git a/tests_zemu/snapshots-tmp/sign_basic/1.png b/tests_zemu/snapshots-tmp/sign_basic/1.png new file mode 100644 index 00000000..f6b4430d Binary files /dev/null and b/tests_zemu/snapshots-tmp/sign_basic/1.png differ diff --git a/tests_zemu/snapshots-tmp/sign_basic/10.png b/tests_zemu/snapshots-tmp/sign_basic/10.png new file mode 100644 index 00000000..09418c9b Binary files /dev/null and b/tests_zemu/snapshots-tmp/sign_basic/10.png differ diff --git a/tests_zemu/snapshots/sign-basic/8.png b/tests_zemu/snapshots-tmp/sign_basic/11.png similarity index 100% rename from tests_zemu/snapshots/sign-basic/8.png rename to tests_zemu/snapshots-tmp/sign_basic/11.png diff --git a/tests_zemu/snapshots-tmp/sign_basic/12.png b/tests_zemu/snapshots-tmp/sign_basic/12.png new file mode 100644 index 00000000..66b03316 Binary files /dev/null and b/tests_zemu/snapshots-tmp/sign_basic/12.png differ diff --git a/tests_zemu/snapshots-tmp/sign_basic/2.png b/tests_zemu/snapshots-tmp/sign_basic/2.png new file mode 100644 index 00000000..f5a4b0b3 Binary files /dev/null and b/tests_zemu/snapshots-tmp/sign_basic/2.png differ diff --git a/tests_zemu/snapshots-tmp/sign_basic/3.png b/tests_zemu/snapshots-tmp/sign_basic/3.png new file mode 100644 index 00000000..b5db6662 Binary files /dev/null and b/tests_zemu/snapshots-tmp/sign_basic/3.png differ diff --git a/tests_zemu/snapshots-tmp/sign_basic/4.png b/tests_zemu/snapshots-tmp/sign_basic/4.png new file mode 100644 index 00000000..c4894d6d Binary files /dev/null and b/tests_zemu/snapshots-tmp/sign_basic/4.png differ diff --git a/tests_zemu/snapshots-tmp/sign_basic/5.png b/tests_zemu/snapshots-tmp/sign_basic/5.png new file mode 100644 index 00000000..cd4e4ef4 Binary files /dev/null and b/tests_zemu/snapshots-tmp/sign_basic/5.png differ diff --git a/tests_zemu/snapshots/sign-basic/4.png b/tests_zemu/snapshots-tmp/sign_basic/6.png similarity index 100% rename from tests_zemu/snapshots/sign-basic/4.png rename to tests_zemu/snapshots-tmp/sign_basic/6.png diff --git a/tests_zemu/snapshots/sign-basic/5.png b/tests_zemu/snapshots-tmp/sign_basic/7.png similarity index 100% rename from tests_zemu/snapshots/sign-basic/5.png rename to tests_zemu/snapshots-tmp/sign_basic/7.png diff --git a/tests_zemu/snapshots/sign-basic/7.png b/tests_zemu/snapshots-tmp/sign_basic/8.png similarity index 100% rename from tests_zemu/snapshots/sign-basic/7.png rename to tests_zemu/snapshots-tmp/sign_basic/8.png diff --git a/tests_zemu/snapshots-tmp/sign_basic/9.png b/tests_zemu/snapshots-tmp/sign_basic/9.png new file mode 100644 index 00000000..35e5a6c4 Binary files /dev/null and b/tests_zemu/snapshots-tmp/sign_basic/9.png differ diff --git a/tests_zemu/snapshots-tmp/sign_proposal/0.png b/tests_zemu/snapshots-tmp/sign_proposal/0.png new file mode 100644 index 00000000..4eef9982 Binary files /dev/null and b/tests_zemu/snapshots-tmp/sign_proposal/0.png differ diff --git a/tests_zemu/snapshots/sign-proposal/1.png b/tests_zemu/snapshots-tmp/sign_proposal/1.png similarity index 100% rename from tests_zemu/snapshots/sign-proposal/1.png rename to tests_zemu/snapshots-tmp/sign_proposal/1.png diff --git a/tests_zemu/snapshots/sign-proposal/9.png b/tests_zemu/snapshots-tmp/sign_proposal/10.png similarity index 100% rename from tests_zemu/snapshots/sign-proposal/9.png rename to tests_zemu/snapshots-tmp/sign_proposal/10.png diff --git a/tests_zemu/snapshots-tmp/sign_proposal/11.png b/tests_zemu/snapshots-tmp/sign_proposal/11.png new file mode 100644 index 00000000..66b03316 Binary files /dev/null and b/tests_zemu/snapshots-tmp/sign_proposal/11.png differ diff --git a/tests_zemu/snapshots/sign-proposal/2.png b/tests_zemu/snapshots-tmp/sign_proposal/2.png similarity index 100% rename from tests_zemu/snapshots/sign-proposal/2.png rename to tests_zemu/snapshots-tmp/sign_proposal/2.png diff --git a/tests_zemu/snapshots-tmp/sign_proposal/3.png b/tests_zemu/snapshots-tmp/sign_proposal/3.png new file mode 100644 index 00000000..fe67dbb4 Binary files /dev/null and b/tests_zemu/snapshots-tmp/sign_proposal/3.png differ diff --git a/tests_zemu/snapshots/sign-proposal/4.png b/tests_zemu/snapshots-tmp/sign_proposal/4.png similarity index 100% rename from tests_zemu/snapshots/sign-proposal/4.png rename to tests_zemu/snapshots-tmp/sign_proposal/4.png diff --git a/tests_zemu/snapshots-tmp/sign_proposal/5.png b/tests_zemu/snapshots-tmp/sign_proposal/5.png new file mode 100644 index 00000000..464144f4 Binary files /dev/null and b/tests_zemu/snapshots-tmp/sign_proposal/5.png differ diff --git a/tests_zemu/snapshots-tmp/sign_proposal/6.png b/tests_zemu/snapshots-tmp/sign_proposal/6.png new file mode 100644 index 00000000..35e5a6c4 Binary files /dev/null and b/tests_zemu/snapshots-tmp/sign_proposal/6.png differ diff --git a/tests_zemu/snapshots-tmp/sign_proposal/7.png b/tests_zemu/snapshots-tmp/sign_proposal/7.png new file mode 100644 index 00000000..2e97f38f Binary files /dev/null and b/tests_zemu/snapshots-tmp/sign_proposal/7.png differ diff --git a/tests_zemu/snapshots/sign-proposal/7.png b/tests_zemu/snapshots-tmp/sign_proposal/8.png similarity index 100% rename from tests_zemu/snapshots/sign-proposal/7.png rename to tests_zemu/snapshots-tmp/sign_proposal/8.png diff --git a/tests_zemu/snapshots/sign-proposal/8.png b/tests_zemu/snapshots-tmp/sign_proposal/9.png similarity index 100% rename from tests_zemu/snapshots/sign-proposal/8.png rename to tests_zemu/snapshots-tmp/sign_proposal/9.png diff --git a/tests_zemu/snapshots/show_address/0.png b/tests_zemu/snapshots/show_address/0.png new file mode 100644 index 00000000..40074695 Binary files /dev/null and b/tests_zemu/snapshots/show_address/0.png differ diff --git a/tests_zemu/snapshots/show_address/1.png b/tests_zemu/snapshots/show_address/1.png new file mode 100644 index 00000000..cbf9aff4 Binary files /dev/null and b/tests_zemu/snapshots/show_address/1.png differ diff --git a/tests_zemu/snapshots/show_address/2.png b/tests_zemu/snapshots/show_address/2.png new file mode 100644 index 00000000..9c742685 Binary files /dev/null and b/tests_zemu/snapshots/show_address/2.png differ diff --git a/tests_zemu/snapshots/show_address/3.png b/tests_zemu/snapshots/show_address/3.png new file mode 100644 index 00000000..66b03316 Binary files /dev/null and b/tests_zemu/snapshots/show_address/3.png differ diff --git a/tests_zemu/snapshots/sign-basic/0.png b/tests_zemu/snapshots/sign-basic/0.png deleted file mode 100644 index 9ea9bf78..00000000 Binary files a/tests_zemu/snapshots/sign-basic/0.png and /dev/null differ diff --git a/tests_zemu/snapshots/sign-basic/1.png b/tests_zemu/snapshots/sign-basic/1.png deleted file mode 100644 index 5d204451..00000000 Binary files a/tests_zemu/snapshots/sign-basic/1.png and /dev/null differ diff --git a/tests_zemu/snapshots/sign-basic/2.png b/tests_zemu/snapshots/sign-basic/2.png deleted file mode 100644 index 3735a422..00000000 Binary files a/tests_zemu/snapshots/sign-basic/2.png and /dev/null differ diff --git a/tests_zemu/snapshots/sign-basic/3.png b/tests_zemu/snapshots/sign-basic/3.png deleted file mode 100644 index 62a2a2a9..00000000 Binary files a/tests_zemu/snapshots/sign-basic/3.png and /dev/null differ diff --git a/tests_zemu/snapshots/sign-basic/6.png b/tests_zemu/snapshots/sign-basic/6.png deleted file mode 100644 index d75be258..00000000 Binary files a/tests_zemu/snapshots/sign-basic/6.png and /dev/null differ diff --git a/tests_zemu/snapshots/sign-proposal/0.png b/tests_zemu/snapshots/sign-proposal/0.png deleted file mode 100644 index 111e83b7..00000000 Binary files a/tests_zemu/snapshots/sign-proposal/0.png and /dev/null differ diff --git a/tests_zemu/snapshots/sign-proposal/3.png b/tests_zemu/snapshots/sign-proposal/3.png deleted file mode 100644 index da800c79..00000000 Binary files a/tests_zemu/snapshots/sign-proposal/3.png and /dev/null differ diff --git a/tests_zemu/snapshots/sign-proposal/5.png b/tests_zemu/snapshots/sign-proposal/5.png deleted file mode 100644 index b70d608b..00000000 Binary files a/tests_zemu/snapshots/sign-proposal/5.png and /dev/null differ diff --git a/tests_zemu/snapshots/sign-proposal/6.png b/tests_zemu/snapshots/sign-proposal/6.png deleted file mode 100644 index d0396582..00000000 Binary files a/tests_zemu/snapshots/sign-proposal/6.png and /dev/null differ diff --git a/tests_zemu/snapshots/sign_basic/0.png b/tests_zemu/snapshots/sign_basic/0.png new file mode 100644 index 00000000..f7c9c845 Binary files /dev/null and b/tests_zemu/snapshots/sign_basic/0.png differ diff --git a/tests_zemu/snapshots/sign_basic/1.png b/tests_zemu/snapshots/sign_basic/1.png new file mode 100644 index 00000000..f6b4430d Binary files /dev/null and b/tests_zemu/snapshots/sign_basic/1.png differ diff --git a/tests_zemu/snapshots/sign_basic/10.png b/tests_zemu/snapshots/sign_basic/10.png new file mode 100644 index 00000000..09418c9b Binary files /dev/null and b/tests_zemu/snapshots/sign_basic/10.png differ diff --git a/tests_zemu/snapshots/sign_basic/11.png b/tests_zemu/snapshots/sign_basic/11.png new file mode 100644 index 00000000..4aa28b6b Binary files /dev/null and b/tests_zemu/snapshots/sign_basic/11.png differ diff --git a/tests_zemu/snapshots/sign_basic/12.png b/tests_zemu/snapshots/sign_basic/12.png new file mode 100644 index 00000000..66b03316 Binary files /dev/null and b/tests_zemu/snapshots/sign_basic/12.png differ diff --git a/tests_zemu/snapshots/sign_basic/2.png b/tests_zemu/snapshots/sign_basic/2.png new file mode 100644 index 00000000..f5a4b0b3 Binary files /dev/null and b/tests_zemu/snapshots/sign_basic/2.png differ diff --git a/tests_zemu/snapshots/sign_basic/3.png b/tests_zemu/snapshots/sign_basic/3.png new file mode 100644 index 00000000..b5db6662 Binary files /dev/null and b/tests_zemu/snapshots/sign_basic/3.png differ diff --git a/tests_zemu/snapshots/sign_basic/4.png b/tests_zemu/snapshots/sign_basic/4.png new file mode 100644 index 00000000..c4894d6d Binary files /dev/null and b/tests_zemu/snapshots/sign_basic/4.png differ diff --git a/tests_zemu/snapshots/sign_basic/5.png b/tests_zemu/snapshots/sign_basic/5.png new file mode 100644 index 00000000..cd4e4ef4 Binary files /dev/null and b/tests_zemu/snapshots/sign_basic/5.png differ diff --git a/tests_zemu/snapshots/sign_basic/6.png b/tests_zemu/snapshots/sign_basic/6.png new file mode 100644 index 00000000..fe67dbb4 Binary files /dev/null and b/tests_zemu/snapshots/sign_basic/6.png differ diff --git a/tests_zemu/snapshots/sign_basic/7.png b/tests_zemu/snapshots/sign_basic/7.png new file mode 100644 index 00000000..a3700632 Binary files /dev/null and b/tests_zemu/snapshots/sign_basic/7.png differ diff --git a/tests_zemu/snapshots/sign_basic/8.png b/tests_zemu/snapshots/sign_basic/8.png new file mode 100644 index 00000000..b3cc6235 Binary files /dev/null and b/tests_zemu/snapshots/sign_basic/8.png differ diff --git a/tests_zemu/snapshots/sign_basic/9.png b/tests_zemu/snapshots/sign_basic/9.png new file mode 100644 index 00000000..35e5a6c4 Binary files /dev/null and b/tests_zemu/snapshots/sign_basic/9.png differ diff --git a/tests_zemu/snapshots/sign_proposal/0.png b/tests_zemu/snapshots/sign_proposal/0.png new file mode 100644 index 00000000..4eef9982 Binary files /dev/null and b/tests_zemu/snapshots/sign_proposal/0.png differ diff --git a/tests_zemu/snapshots/sign_proposal/1.png b/tests_zemu/snapshots/sign_proposal/1.png new file mode 100644 index 00000000..0acc9b79 Binary files /dev/null and b/tests_zemu/snapshots/sign_proposal/1.png differ diff --git a/tests_zemu/snapshots/sign_proposal/10.png b/tests_zemu/snapshots/sign_proposal/10.png new file mode 100644 index 00000000..4aa28b6b Binary files /dev/null and b/tests_zemu/snapshots/sign_proposal/10.png differ diff --git a/tests_zemu/snapshots/sign_proposal/11.png b/tests_zemu/snapshots/sign_proposal/11.png new file mode 100644 index 00000000..66b03316 Binary files /dev/null and b/tests_zemu/snapshots/sign_proposal/11.png differ diff --git a/tests_zemu/snapshots/sign_proposal/2.png b/tests_zemu/snapshots/sign_proposal/2.png new file mode 100644 index 00000000..da85b150 Binary files /dev/null and b/tests_zemu/snapshots/sign_proposal/2.png differ diff --git a/tests_zemu/snapshots/sign_proposal/3.png b/tests_zemu/snapshots/sign_proposal/3.png new file mode 100644 index 00000000..fe67dbb4 Binary files /dev/null and b/tests_zemu/snapshots/sign_proposal/3.png differ diff --git a/tests_zemu/snapshots/sign_proposal/4.png b/tests_zemu/snapshots/sign_proposal/4.png new file mode 100644 index 00000000..b16f0a0d Binary files /dev/null and b/tests_zemu/snapshots/sign_proposal/4.png differ diff --git a/tests_zemu/snapshots/sign_proposal/5.png b/tests_zemu/snapshots/sign_proposal/5.png new file mode 100644 index 00000000..464144f4 Binary files /dev/null and b/tests_zemu/snapshots/sign_proposal/5.png differ diff --git a/tests_zemu/snapshots/sign_proposal/6.png b/tests_zemu/snapshots/sign_proposal/6.png new file mode 100644 index 00000000..35e5a6c4 Binary files /dev/null and b/tests_zemu/snapshots/sign_proposal/6.png differ diff --git a/tests_zemu/snapshots/sign_proposal/7.png b/tests_zemu/snapshots/sign_proposal/7.png new file mode 100644 index 00000000..2e97f38f Binary files /dev/null and b/tests_zemu/snapshots/sign_proposal/7.png differ diff --git a/tests_zemu/snapshots/sign_proposal/8.png b/tests_zemu/snapshots/sign_proposal/8.png new file mode 100644 index 00000000..67537dc8 Binary files /dev/null and b/tests_zemu/snapshots/sign_proposal/8.png differ diff --git a/tests_zemu/snapshots/sign_proposal/9.png b/tests_zemu/snapshots/sign_proposal/9.png new file mode 100644 index 00000000..90747c0c Binary files /dev/null and b/tests_zemu/snapshots/sign_proposal/9.png differ diff --git a/tests_zemu/tests/test.js b/tests_zemu/tests/test.js index 15a04677..ea6bd5d2 100644 --- a/tests_zemu/tests/test.js +++ b/tests_zemu/tests/test.js @@ -33,14 +33,6 @@ const sim_options = { jest.setTimeout(25000) -function compareSnapshots(snapshotPrefixTmp, snapshotPrefixGolden, snapshotCount) { - for (let i = 0; i < snapshotCount; i++) { - const img1 = Zemu.LoadPng2RGB(`${snapshotPrefixTmp}${i}.png`); - const img2 = Zemu.LoadPng2RGB(`${snapshotPrefixGolden}${i}.png`); - expect(img1).toEqual(img2); - } -} - describe('Basic checks', function () { it('can start and stop container', async function () { const sim = new Zemu(APP_PATH); @@ -133,16 +125,11 @@ describe('Basic checks', function () { await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()); // Now navigate the address / path - await sim.snapshot(`${snapshotPrefixTmp}${snapshotCount++}.png`); - await sim.clickRight(`${snapshotPrefixTmp}${snapshotCount++}.png`); - await sim.clickRight(`${snapshotPrefixTmp}${snapshotCount++}.png`); - await sim.clickBoth(`${snapshotPrefixTmp}${snapshotCount++}.png`); + await sim.compareSnapshotsAndAccept(".", "show_address", 3); const resp = await respRequest; console.log(resp); - compareSnapshots(snapshotPrefixTmp, snapshotPrefixGolden, snapshotCount); - expect(resp.return_code).toEqual(0x9000); expect(resp.error_message).toEqual("No errors"); @@ -157,10 +144,6 @@ describe('Basic checks', function () { }); it('sign basic & verify', async function () { - const snapshotPrefixGolden = "snapshots/sign-basic/"; - const snapshotPrefixTmp = "snapshots-tmp/sign-basic/"; - let snapshotCount = 0; - const sim = new Zemu(APP_PATH); try { await sim.start(sim_options); @@ -168,7 +151,7 @@ describe('Basic checks', function () { const path = "m/44'/461'/0'/0/1"; const txBlob = Buffer.from( - "890055026d21137eb4c4814269e894d296cf6500e43cd7145502e0c7c75f82d55e5ed55db28033630df4274a984f0144000186a0430009c41961a80040", + "8a0058310396a1a3e4ea7a14d49985e661b22401d44fed402d1d0925b243c923589c0fbc7e32cd04e29ed78d15d37d3aaa3fe6da3358310386b454258c589475f7d16f5aac018a79f6c1169d20fc33921dd8b5ce1cac6c348f90a3603624f6aeb91b64518c2e80950144000186a01961a8430009c44200000040", "hex", ); @@ -182,18 +165,11 @@ describe('Basic checks', function () { // Wait until we are not in the main menu await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()); - // Reference window - await sim.snapshot(`${snapshotPrefixTmp}${snapshotCount++}.png`); - for (let i = 0; i < 8; i++) { - await sim.clickRight(Resolve(`${snapshotPrefixTmp}${snapshotCount++}.png`)); - } - await sim.clickBoth(); + await sim.compareSnapshotsAndAccept(".", "sign_basic", 12); let resp = await signatureRequest; console.log(resp); - compareSnapshots(snapshotPrefixTmp, snapshotPrefixGolden, snapshotCount); - expect(resp.return_code).toEqual(0x9000); expect(resp.error_message).toEqual("No errors"); @@ -254,7 +230,7 @@ describe('Basic checks', function () { const path = "m/44'/461'/0'/0/1"; const txBlob = Buffer.from( - "89004300ed075501dfe49184d46adc8f89d44638beb45f78fcad259010404200011903e8025823845501dfe49184d46adc8f89d44638beb45f78fcad259049000de0b6b3a76400000040", + "8a004300ec075501dfe49184d46adc8f89d44638beb45f78fcad259001401a000f4240430009c4430009c402581d845501dfe49184d46adc8f89d44638beb45f78fcad2590430003e80040", "hex", ); @@ -268,18 +244,11 @@ describe('Basic checks', function () { // Wait until we are not in the main menu await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()); - // Reference window - await sim.snapshot(`${snapshotPrefixTmp}${snapshotCount++}.png`); - for (let i = 0; i < 9; i++) { - await sim.clickRight(Resolve(`${snapshotPrefixTmp}${snapshotCount++}.png`)); - } - await sim.clickBoth(); + await sim.compareSnapshotsAndAccept(".", "sign_proposal", 11); let resp = await signatureRequest; console.log(resp); - compareSnapshots(snapshotPrefixTmp, snapshotPrefixGolden, snapshotCount); - expect(resp.return_code).toEqual(0x9000); expect(resp.error_message).toEqual("No errors"); } finally { diff --git a/tests_zemu/yarn.lock b/tests_zemu/yarn.lock index aaeccfb3..1c315a23 100644 --- a/tests_zemu/yarn.lock +++ b/tests_zemu/yarn.lock @@ -1528,7 +1528,7 @@ acorn@^7.1.1, acorn@^7.3.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.0.tgz#e1ad486e6c54501634c6c397c5c121daa383607c" integrity sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w== -ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5: +ajv@^6.10.0, ajv@^6.10.2: version "6.12.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.2.tgz#c629c5eced17baf314437918d2da88c99d5958cd" integrity sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ== @@ -1538,6 +1538,16 @@ ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ajv@^6.12.3: + version "6.12.4" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.4.tgz#0614facc4522127fa713445c6bfd3ebd376e2234" + integrity sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + ansi-colors@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" @@ -1874,9 +1884,9 @@ bindings@^1.5.0: file-uri-to-path "1.0.0" bl@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/bl/-/bl-4.0.2.tgz#52b71e9088515d0606d9dd9cc7aa48dc1f98e73a" - integrity sha512-j4OH8f6Qg2bGuWfRiltT2HYGx0e1QcBTrK9KAHNMwMZdQnDZFk0ZSYIpADjYCB3U12nicC5tVJwSIhwOWjb4RQ== + version "4.0.3" + resolved "https://registry.yarnpkg.com/bl/-/bl-4.0.3.tgz#12d6287adc29080e22a705e5764b2a9522cdc489" + integrity sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg== dependencies: buffer "^5.5.0" inherits "^2.0.4" diff --git a/tools/generate.js b/tools/generate.js index d3d43033..c032db17 100644 --- a/tools/generate.js +++ b/tools/generate.js @@ -44,13 +44,17 @@ function toCBOR(tc) { let buf = bigintToArray(tc.message.value); answer.push(buf); - // "gasprice" - buf = bigintToArray(tc.message.gasprice); - answer.push(buf); - // "gaslimit" answer.push( parseInt(tc.message.gaslimit, 10)); + // "gaspremium" + buf = bigintToArray(tc.message.gaspremium); + answer.push(buf); + + // "gasfeecap" + buf = bigintToArray(tc.message.gasfeecap); + answer.push(buf); + // "method" answer.push(tc.message.method); diff --git a/tools/package.json b/tools/package.json index 80807478..69dedee2 100644 --- a/tools/package.json +++ b/tools/package.json @@ -2,10 +2,10 @@ "name": "tools", "version": "1.0.0", "dependencies": { + "@webassemblyjs/leb128": "^1.9.0", "base32-encode": "^1.1.1", - "blake2": "^4.0.0", - "cbor": "^5.0.1", - "@webassemblyjs/leb128": "^1.9.0" + "blake2": "^4.0.1", + "cbor": "^5.1.0" }, "scripts": { "generate": "node generate.js" diff --git a/tools/template.json b/tools/template.json index 530b889e..5756f906 100644 --- a/tools/template.json +++ b/tools/template.json @@ -10,8 +10,9 @@ "from": "", "nonce": 0, "value": "0", - "gasprice": "0", "gaslimit": "0", + "gaspremium": "0", + "gasfeecap": "0", "method": 0 } }, @@ -26,8 +27,9 @@ "from": "01B882619D46558F3D9E316D11B48DCF211327025A", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 } }, @@ -42,8 +44,9 @@ "from": "01B882619D46558F3D9E316D11B48DCF211327025A", "nonce": 1, "value": "100000", - "gasprice": "2500", "gaslimit": "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method": 0 } }, @@ -58,8 +61,9 @@ "from": "009601", "nonce": 1, "value" : "100000", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } }, @@ -74,8 +78,9 @@ "from": "00c10d", "nonce": 1, "value" : "100000", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } }, @@ -90,8 +95,9 @@ "from": "0000", "nonce": 1, "value" : "100000", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } }, @@ -106,8 +112,9 @@ "from": "01b882619d46558f3d9e316d11b48dcf211327026a", "nonce": 1, "value" : "100000", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } }, @@ -122,8 +129,9 @@ "from": "01b06e7a6f0f551de261fe3a6fe182b422ee0bc6b6", "nonce": 1, "value" : "100000", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } }, @@ -138,8 +146,9 @@ "from": "01fd1d0f4dfcd7e99afcb99a8326b7dc459d32c628", "nonce": 1, "value" : "100000", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } }, @@ -154,8 +163,9 @@ "from": "02eb58bd08a15a6ade19d0989674148fa95a8157c6", "nonce": 1, "value" : "100000", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } }, @@ -170,8 +180,9 @@ "from": "02e0c7c75f82d55e5ed55db28033630df4274a984f", "nonce": 1, "value" : "100000", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } }, @@ -186,8 +197,9 @@ "from": "02e54dea4f9bc5b47d261819826d5e1fbf8bc5503b", "nonce": 1, "value" : "100000", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } }, @@ -202,8 +214,9 @@ "from": "03b3294f0a2e29e0c66ebc235d2fedca5697bf784af605c75af608e6a63d5cd38ea85ca8989e0efde9188b382f9372460d", "nonce": 1, "value" : "100000", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } }, @@ -218,8 +231,9 @@ "from": "0386b454258c589475f7d16f5aac018a79f6c1169d20fc33921dd8b5ce1cac6c348f90a3603624f6aeb91b64518c2e8095", "nonce": 1, "value" : "100000", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } }, @@ -234,8 +248,9 @@ "from": "03ad58df696e2d4e91ea86c881e938ba4ea81b395e12797b84b9cf314b9546705e839c7a99d606b247ddb4f9ac7a3414dd", "nonce": 1, "value" : "100000", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } }, @@ -250,8 +265,9 @@ "from": "03ad58df696e2d4e91ea86c881e938ba4ea81b395e12797b84b9cf314b9546705e839c7a99d606b247ddb4f9ac7a3414dd", "nonce": 1, "value" : "100000", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } }, @@ -266,8 +282,9 @@ "from": "01000000000000000000000000000000000000000001", "nonce": 1, "value" : "100000", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } }, @@ -282,8 +299,9 @@ "from": "0100000000000000000000000000000000000000", "nonce": 1, "value" : "100000", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } }, @@ -298,8 +316,9 @@ "from": "00000000000000000000000000000000000000000000", "nonce": 1, "value" : "100000", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } }, @@ -314,8 +333,9 @@ "from": "02000000000000000000000000000000000000000000", "nonce": 1, "value" : "100000", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } }, @@ -330,8 +350,9 @@ "from": "0200000000000000000000000000000000000000", "nonce": 1, "value" : "100000", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } }, @@ -346,8 +367,9 @@ "from": "030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "nonce": 1, "value" : "100000", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } }, @@ -362,8 +384,9 @@ "from": "0300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "nonce": 1, "value" : "100000", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } }, @@ -378,8 +401,9 @@ "from": "040000000000000000000000000000000000000000", "nonce": 1, "value" : "100000", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } }, @@ -394,8 +418,9 @@ "from": "01b882619d46558f3d9e316d11b48dcf211327026a", "nonce": 1, "value" : "-100000", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } }, @@ -410,8 +435,9 @@ "from": "01b882619d46558f3d9e316d11b48dcf211327026a", "nonce": 1, "value" : "", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } }, @@ -426,8 +452,9 @@ "from": "01b882619d46558f3d9e316d11b48dcf211327026a", "nonce": 1, "value" : "", - "gasprice" : "2500", "gaslimit" : "25000", + "gaspremium": "2500", + "gasfeecap": "0", "method" : 0 } } diff --git a/tools/yarn.lock b/tools/yarn.lock index 51859273..a50950a0 100644 --- a/tools/yarn.lock +++ b/tools/yarn.lock @@ -24,27 +24,27 @@ bignumber.js@^9.0.0: resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.0.tgz#805880f84a329b5eac6e7cb6f8274b6d82bdf075" integrity sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A== -blake2@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/blake2/-/blake2-4.0.0.tgz#32ae4c3568ef5ee4d74c50b99d774abf8fff4f60" - integrity sha512-PIOc6RXAZYBYcdpyMzI6/SCU3BH8EbmA9vr0BAVyQv48CQTXDN6viHOTM+8KQue2IPsyHNpIR3UDisz8rZDPTA== +blake2@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/blake2/-/blake2-4.0.1.tgz#b66072203b3c7fdf2155906a02db2a07d9496525" + integrity sha512-x154iqs8j4IMyxLyFOYb0tvTw+BZlXR8n1HBf/jVNJw5DGCvMNPl6wxHhWQDzIBHRYSc9sb3nsuM/G9AVO6psg== dependencies: - nan "^2.14.0" + nan "^2.14.1" -cbor@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/cbor/-/cbor-5.0.1.tgz#243eea46b19c6e54ffb18fb07fa52c1c627a6f05" - integrity sha512-l4ghwqioCyuAaD3LvY4ONwv8NMuERz62xjbMHGdWBqERJPygVmoFER1b4+VS6iW0rXwoVGuKZPPPTofwWOg3YQ== +cbor@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cbor/-/cbor-5.1.0.tgz#c3be220dcbbd96a338d279a664237aed3f596904" + integrity sha512-qzEc7kUShdMbWTaUH7X+aHW8owvBU3FS0dfYR1lGYpoZr0mGJhhojLlZJH653x/DfeMZ56h315FRNBUIG1R7qg== dependencies: bignumber.js "^9.0.0" - nofilter "^1.0.3" + nofilter "^1.0.4" -nan@^2.14.0: - version "2.14.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" - integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== +nan@^2.14.1: + version "2.14.1" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" + integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== -nofilter@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-1.0.3.tgz#34e54b4cc9757de0cad38cc0d19462489b1b7f5d" - integrity sha512-FlUlqwRK6reQCaFLAhMcF+6VkVG2caYjKQY3YsRDTl4/SEch595Qb3oLjJRDr8dkHAAOVj2pOx3VknfnSgkE5g== +nofilter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-1.0.4.tgz#78d6f4b6a613e7ced8b015cec534625f7667006e" + integrity sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA==