Skip to content

Commit fae4aac

Browse files
Merge pull request #557 from HathorNetwork/master
Release candidate process of v0.36.0-rc1
2 parents a67f756 + 3b00db7 commit fae4aac

File tree

22 files changed

+1029
-288
lines changed

22 files changed

+1029
-288
lines changed

__tests__/__fixtures__/http-fixtures.js

Lines changed: 239 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,8 +1020,7 @@ export default {
10201020
success: true,
10211021
tx: {
10221022
hash: '00000008707722cde59ac9e7f4d44efbd3a5bd5f244223816ee676d328943b1b',
1023-
version: 4,
1024-
nc_blueprint_id: '3cb032600bdf7db784800e4ea911b10676fa2f67591f82bb62628c234e771595',
1023+
version: 0,
10251024
nonce: '0',
10261025
timestamp: 1572636346,
10271026
weight: 1,
@@ -1065,7 +1064,7 @@ export default {
10651064
},
10661065
spent_outputs: {},
10671066
meta: {
1068-
hash: '5c02adea056d7b43e83171a0e2d226d564c791d583b32e9a404ef53a2e1b363a',
1067+
hash: '00000008707722cde59ac9e7f4d44efbd3a5bd5f244223816ee676d328943b1b',
10691068
spent_outputs: [],
10701069
received_by: [],
10711070
children: [],
@@ -1082,39 +1081,166 @@ export default {
10821081
first_block_height: 1234,
10831082
},
10841083
},
1085-
'/transaction?id=5c02adea056d7b43e83171a0e2d226d564c791d583b32e9a404ef53a2e1b363a': {
1084+
'/transaction?id=000033ef9affbd741d477ff62450253a60b5a082c6cf803340ad1a6369ab9f16': {
10861085
success: true,
10871086
tx: {
1088-
hash: '5c02adea056d7b43e83171a0e2d226d564c791d583b32e9a404ef53a2e1b363a',
1089-
version: 4,
1090-
nc_blueprint_id: '3cb032600bdf7db784800e4ea911b10676fa2f67591f82bb62628c234e771595',
1091-
nonce: '0',
1092-
timestamp: 1572636346,
1093-
weight: 1,
1087+
hash: '000033ef9affbd741d477ff62450253a60b5a082c6cf803340ad1a6369ab9f16',
1088+
nonce: '61170',
1089+
timestamp: 1748361389,
1090+
version: 1,
1091+
weight: 17.441808058055496,
10941092
signal_bits: 0,
1095-
parents: ['1234', '5678'],
1093+
parents: [
1094+
'000002977efa41879690fb304cb03583e5a8b74080401f770633faf9091ef695',
1095+
'039906854ce6309b3180945f2a23deb9edff369753f7082e19053f5ac11bfbae'
1096+
],
10961097
inputs: [],
10971098
outputs: [],
10981099
tokens: [],
1099-
raw: '',
1100+
nc_id: '000033ef9affbd741d477ff62450253a60b5a082c6cf803340ad1a6369ab9f16',
1101+
nc_blueprint_id: '3cb032600bdf7db784800e4ea911b10676fa2f67591f82bb62628c234e771595',
1102+
nc_method: 'initialize',
1103+
nc_args: '03200000298f16599418b0475762c9ce570fe966fd8a62fd933888a96a16c0b893b720000002977efa41879690fb304cb03583e5a8b74080401f770633faf9091ef6957196bd49',
1104+
nc_address: 'WiGFcSYHhfRqWJ7PXYvhjULXtXCYD1VFdS',
1105+
nc_context: {
1106+
actions: [],
1107+
address: 'WiGFcSYHhfRqWJ7PXYvhjULXtXCYD1VFdS',
1108+
timestamp: 1748361396
1109+
},
1110+
raw: '00010000004031711a553875276835e0ad02000002977efa41879690fb304cb03583e5a8b74080401f770633faf9091ef695039906854ce6309b3180945f2a23deb9edff369753f7082e19053f5ac11bfbae0000eef210013cb032600bdf7db784800e4ea911b10676fa2f67591f82bb62628c234e7715950a696e697469616c697a65004703200000298f16599418b0475762c9ce570fe966fd8a62fd933888a96a16c0b893b720000002977efa41879690fb304cb03583e5a8b74080401f770633faf9091ef6957196bd490049d6e3295bdb3fd0b01c626fe3d088499d0511aba4806d6159006a47304502210096279fdcc336040aa9cb517241d968b73738de19102ed5f893891a5131644ab00220424091f8efe7b2413669d034e907215dd0ab7386cf983d22019a922d6b4385692102f327b0e8f23b5a714d14786b81f5bd1254cdd6fd096c8f606f743dc90011c2ac'
11001111
},
1101-
spent_outputs: {},
11021112
meta: {
1103-
hash: '5c02adea056d7b43e83171a0e2d226d564c791d583b32e9a404ef53a2e1b363a',
1113+
hash: '000033ef9affbd741d477ff62450253a60b5a082c6cf803340ad1a6369ab9f16',
11041114
spent_outputs: [],
11051115
received_by: [],
1106-
children: [],
1116+
children: [
1117+
'000000234b8a4d9024fdd8cfa83a8a3c74edbab644c61e81f2d62dbc586ec4af',
1118+
'0000045a5460cc1d00489c39ae4438c92d26180d996243d2dca8f7c4c62b7b50',
1119+
'00000027e3066bbae2e00d25b9b00bdfb6930ff6c4bf2fe35ea830f9e9d8ea48',
1120+
'000000232911c20646ab3608dde21fd93d88414e1ee1a9654e11bc103e6d274d',
1121+
],
11071122
conflict_with: [],
11081123
voided_by: [],
11091124
twins: [],
1110-
accumulated_weight: 1,
1111-
score: 0,
1125+
accumulated_weight_raw: '178036',
1126+
score_raw: '0',
1127+
min_height: 18,
11121128
height: 0,
1113-
min_height: 0,
1114-
feature_activation_bit_counts: null,
1115-
first_block: null,
1116-
validation: 'full'
1129+
feature_activation_bit_counts: [],
1130+
first_block: '000000234b8a4d9024fdd8cfa83a8a3c74edbab644c61e81f2d62dbc586ec4af',
1131+
validation: 'full',
1132+
nc_block_root_id: null,
1133+
nc_calls: [
1134+
[
1135+
'3cb032600bdf7db784800e4ea911b10676fa2f67591f82bb62628c234e771595',
1136+
'000033ef9affbd741d477ff62450253a60b5a082c6cf803340ad1a6369ab9f16',
1137+
'initialize'
1138+
]
1139+
],
1140+
nc_execution: 'success',
1141+
accumulated_weight: 17.441809467146022,
1142+
score: 0.0,
1143+
first_block_height: 19
1144+
},
1145+
spent_outputs: {}
1146+
},
1147+
'/transaction?id=0000045a5460cc1d00489c39ae4438c92d26180d996243d2dca8f7c4c62b7b50': {
1148+
success: true,
1149+
tx: {
1150+
hash: '0000045a5460cc1d00489c39ae4438c92d26180d996243d2dca8f7c4c62b7b50',
1151+
nonce: '3680606',
1152+
timestamp: 1748361399,
1153+
version: 1,
1154+
weight: 21.77244466692441,
1155+
signal_bits: 0,
1156+
parents: ['000033ef9affbd741d477ff62450253a60b5a082c6cf803340ad1a6369ab9f16', '000002977efa41879690fb304cb03583e5a8b74080401f770633faf9091ef695'],
1157+
inputs: [
1158+
{
1159+
value: 50000,
1160+
token_data: 1,
1161+
script: 'dqkUlAFxSzjwTo7LN8gk5FC/2SDhz+iIrA==',
1162+
decoded: {
1163+
type: 'P2PKH',
1164+
address: 'WcAccYo8pMZLVJ573KmSHGacKDUeCaYtki',
1165+
timelock: null,
1166+
value: 50000,
1167+
token_data: 1
1168+
},
1169+
tx_id: '000002977efa41879690fb304cb03583e5a8b74080401f770633faf9091ef695',
1170+
index: 1
1171+
}
1172+
],
1173+
outputs: [
1174+
{
1175+
value: 49900,
1176+
token_data: 1,
1177+
script: 'dqkU6ymVHxS2pJf/bHDgpHEQp4KlnASIrA==',
1178+
decoded: {
1179+
type: 'P2PKH',
1180+
address: 'Wk7TVDBzd5vg2EmKWTxk4Tt11TXoPB5Woi',
1181+
timelock: null,
1182+
value: 49900,
1183+
token_data: 1
1184+
}
1185+
}
1186+
],
1187+
tokens: [
1188+
{
1189+
uid: '000002977efa41879690fb304cb03583e5a8b74080401f770633faf9091ef695',
1190+
name: 'Alice Token',
1191+
symbol: 'alice'
1192+
}
1193+
],
1194+
nc_id: '000033ef9affbd741d477ff62450253a60b5a082c6cf803340ad1a6369ab9f16',
1195+
nc_blueprint_id: '3cb032600bdf7db784800e4ea911b10676fa2f67591f82bb62628c234e771595',
1196+
nc_method: 'bet',
1197+
nc_args: '021949d6e3295bdb3fd0b01c626fe3d088499d0511aba4806d6159175265616c2d4d616472696432783242617263656c6f6e61',
1198+
nc_address: 'WiGFcSYHhfRqWJ7PXYvhjULXtXCYD1VFdS',
1199+
nc_context: {
1200+
actions: [
1201+
{
1202+
type: 'deposit',
1203+
token_uid: '000002977efa41879690fb304cb03583e5a8b74080401f770633faf9091ef695',
1204+
amount: 100
1205+
}
1206+
],
1207+
address: 'WiGFcSYHhfRqWJ7PXYvhjULXtXCYD1VFdS',
1208+
timestamp: 1748361399
1209+
},
1210+
raw: '0001010101000002977efa41879690fb304cb03583e5a8b74080401f770633faf9091ef695000002977efa41879690fb304cb03583e5a8b74080401f770633faf9091ef69501006a473045022100a341137acf18c9ac4b42b13d2b8db23a719d2e79510ece61408dffd42cd126e502202f38f44530f990fbb28a3aa9a7a01878dc16e8dcbba341320bb6b9acff5458f5210201917d707d8346ba1daf7225fc4037328085f9291e763e736e26fe74e62d5fd50000c2ec01001976a914eb29951f14b6a497ff6c70e0a47110a782a59c0488ac4035c5beef0668f36835e0b702000033ef9affbd741d477ff62450253a60b5a082c6cf803340ad1a6369ab9f16000002977efa41879690fb304cb03583e5a8b74080401f770633faf9091ef6950038295e1001000033ef9affbd741d477ff62450253a60b5a082c6cf803340ad1a6369ab9f16036265740033021949d6e3295bdb3fd0b01c626fe3d088499d0511aba4806d6159175265616c2d4d616472696432783242617263656c6f6e610101010000006449d6e3295bdb3fd0b01c626fe3d088499d0511aba4806d615900694630440220657cc9e7e362ad20bcf5008d0085943e984f63dc513f5523aaff53d08050a4bb022004c2e32ef271f2544edf48b699456f307b13dd4e468a47e5570f77a5bf4132022102f327b0e8f23b5a714d14786b81f5bd1254cdd6fd096c8f606f743dc90011c2ac'
11171211
},
1212+
meta: {
1213+
hash: '0000045a5460cc1d00489c39ae4438c92d26180d996243d2dca8f7c4c62b7b50',
1214+
spent_outputs: [[0, []]],
1215+
received_by: [],
1216+
children: [
1217+
'00000027e3066bbae2e00d25b9b00bdfb6930ff6c4bf2fe35ea830f9e9d8ea48',
1218+
'000000232911c20646ab3608dde21fd93d88414e1ee1a9654e11bc103e6d274d',
1219+
],
1220+
conflict_with: [],
1221+
voided_by: [],
1222+
twins: [],
1223+
accumulated_weight_raw: '3582275',
1224+
score_raw: '0',
1225+
min_height: 18,
1226+
height: 0,
1227+
feature_activation_bit_counts: [],
1228+
first_block: '00000027e3066bbae2e00d25b9b00bdfb6930ff6c4bf2fe35ea830f9e9d8ea48',
1229+
validation: 'full',
1230+
nc_block_root_id: null,
1231+
nc_calls: [
1232+
[
1233+
'3cb032600bdf7db784800e4ea911b10676fa2f67591f82bb62628c234e771595',
1234+
'000033ef9affbd741d477ff62450253a60b5a082c6cf803340ad1a6369ab9f16',
1235+
'bet'
1236+
]
1237+
],
1238+
nc_execution: 'success',
1239+
accumulated_weight: 21.772444662066132,
1240+
score: 0.0,
1241+
first_block_height: 20
1242+
},
1243+
spent_outputs: {}
11181244
},
11191245
'/getmininginfo': {
11201246
success: true,
@@ -1140,39 +1266,99 @@ export default {
11401266
},
11411267
'/nano_contract/history': {
11421268
success: true,
1143-
count: 100,
1144-
history: [{
1145-
hash: '5c02adea056d7b43e83171a0e2d226d564c791d583b32e9a404ef53a2e1b363a',
1146-
nonce: 0,
1147-
timestamp: 1572636346,
1148-
version: 4,
1149-
weight: 1,
1150-
signal_bits: 0,
1151-
parents: ['1234', '5678'],
1152-
inputs: [],
1153-
outputs: [],
1154-
metadata: {
1155-
hash: '5c02adea056d7b43e83171a0e2d226d564c791d583b32e9a404ef53a2e1b363a',
1156-
spent_outputs: [],
1157-
received_by: [],
1158-
children: [],
1159-
conflict_with: [],
1160-
voided_by: [],
1161-
twins: [],
1162-
accumulated_weight: 1,
1163-
score: 0,
1164-
height: 0,
1165-
min_height: 0,
1166-
feature_activation_bit_counts: null,
1167-
first_block: null,
1168-
validation: 'full'
1269+
history: [
1270+
{
1271+
hash: '0000045a5460cc1d00489c39ae4438c92d26180d996243d2dca8f7c4c62b7b50',
1272+
nonce: 3680606,
1273+
timestamp: 1748361399,
1274+
version: 1,
1275+
weight: 21.77244466692441,
1276+
signal_bits: 0,
1277+
parents: [
1278+
'000033ef9affbd741d477ff62450253a60b5a082c6cf803340ad1a6369ab9f16',
1279+
'000002977efa41879690fb304cb03583e5a8b74080401f770633faf9091ef695'
1280+
],
1281+
inputs: [
1282+
{
1283+
value: 50000,
1284+
token_data: 1,
1285+
script: 'dqkUlAFxSzjwTo7LN8gk5FC/2SDhz+iIrA==',
1286+
decoded: {
1287+
type: 'P2PKH',
1288+
address: 'WcAccYo8pMZLVJ573KmSHGacKDUeCaYtki',
1289+
timelock: null
1290+
},
1291+
token: '000002977efa41879690fb304cb03583e5a8b74080401f770633faf9091ef695',
1292+
tx_id: '000002977efa41879690fb304cb03583e5a8b74080401f770633faf9091ef695',
1293+
index: 1
1294+
}
1295+
],
1296+
outputs: [
1297+
{
1298+
value: 49900,
1299+
token_data: 1,
1300+
script: 'dqkU6ymVHxS2pJf/bHDgpHEQp4KlnASIrA==',
1301+
decoded: {
1302+
type: 'P2PKH',
1303+
address: 'Wk7TVDBzd5vg2EmKWTxk4Tt11TXoPB5Woi',
1304+
timelock: null
1305+
},
1306+
token: '000002977efa41879690fb304cb03583e5a8b74080401f770633faf9091ef695',
1307+
spent_by: null
1308+
}
1309+
],
1310+
tokens: [
1311+
'000002977efa41879690fb304cb03583e5a8b74080401f770633faf9091ef695'
1312+
],
1313+
nc_id: '000033ef9affbd741d477ff62450253a60b5a082c6cf803340ad1a6369ab9f16',
1314+
nc_blueprint_id: '3cb032600bdf7db784800e4ea911b10676fa2f67591f82bb62628c234e771595',
1315+
nc_method: 'bet',
1316+
nc_args: '021949d6e3295bdb3fd0b01c626fe3d088499d0511aba4806d6159175265616c2d4d616472696432783242617263656c6f6e61',
1317+
nc_address: 'WiGFcSYHhfRqWJ7PXYvhjULXtXCYD1VFdS',
1318+
nc_context: {
1319+
actions: [
1320+
{
1321+
type: 'deposit',
1322+
token_uid: '000002977efa41879690fb304cb03583e5a8b74080401f770633faf9091ef695',
1323+
amount: 100
1324+
}
1325+
],
1326+
address: 'WiGFcSYHhfRqWJ7PXYvhjULXtXCYD1VFdS',
1327+
timestamp: 1748361466
1328+
},
1329+
tx_id: '0000045a5460cc1d00489c39ae4438c92d26180d996243d2dca8f7c4c62b7b50',
1330+
is_voided: false,
1331+
first_block: '00000027e3066bbae2e00d25b9b00bdfb6930ff6c4bf2fe35ea830f9e9d8ea48'
11691332
},
1170-
tokens: [],
1171-
nc_id: '5c02adea056d7b43e83171a0e2d226d564c791d583b32e9a404ef53a2e1b363a',
1172-
nc_method: 'initialize',
1173-
nc_args: '0004313233340001000004654d8749',
1174-
nc_pubkey: '033f5d238afaa9e2218d05dd7fa50eb6f9e55431e6359e04b861cd991ae24dc655'
1175-
}]
1333+
{
1334+
hash: '000033ef9affbd741d477ff62450253a60b5a082c6cf803340ad1a6369ab9f16',
1335+
nonce: 61170,
1336+
timestamp: 1748361389,
1337+
version: 1,
1338+
weight: 17.441808058055496,
1339+
signal_bits: 0,
1340+
parents: [
1341+
'000002977efa41879690fb304cb03583e5a8b74080401f770633faf9091ef695',
1342+
'039906854ce6309b3180945f2a23deb9edff369753f7082e19053f5ac11bfbae'
1343+
],
1344+
inputs: [],
1345+
outputs: [],
1346+
tokens: [],
1347+
nc_id: '000033ef9affbd741d477ff62450253a60b5a082c6cf803340ad1a6369ab9f16',
1348+
nc_blueprint_id: '3cb032600bdf7db784800e4ea911b10676fa2f67591f82bb62628c234e771595',
1349+
nc_method: 'initialize',
1350+
nc_args: '03200000298f16599418b0475762c9ce570fe966fd8a62fd933888a96a16c0b893b720000002977efa41879690fb304cb03583e5a8b74080401f770633faf9091ef6957196bd49',
1351+
nc_address: 'WiGFcSYHhfRqWJ7PXYvhjULXtXCYD1VFdS',
1352+
nc_context: {
1353+
actions: [],
1354+
address: 'WiGFcSYHhfRqWJ7PXYvhjULXtXCYD1VFdS',
1355+
timestamp: 1748361396
1356+
},
1357+
tx_id: '000033ef9affbd741d477ff62450253a60b5a082c6cf803340ad1a6369ab9f16',
1358+
is_voided: false,
1359+
first_block: '000000234b8a4d9024fdd8cfa83a8a3c74edbab644c61e81f2d62dbc586ec4af'
1360+
}
1361+
]
11761362
},
11771363
'/nano_contract/blueprint/info': {
11781364
id: '3cb032600bdf7db784800e4ea911b10676fa2f67591f82bb62628c234e771595',

__tests__/create-token.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe('create-token api', () => {
4141
});
4242

4343
it('should not create a token without the required parameters', async () => {
44-
['name', 'symbol', 'amount'].forEach(async field => {
44+
for (const field of ['name', 'symbol', 'amount']) {
4545
const token = {
4646
name: 'stub_token',
4747
symbol: '03',
@@ -54,7 +54,7 @@ describe('create-token api', () => {
5454
.set({ 'x-wallet-id': walletId });
5555
expect(response.status).toBe(400);
5656
expect(response.body.success).toBe(false);
57-
});
57+
}
5858
});
5959

6060
it('should not create a token without the required funds to cover it', async () => {

0 commit comments

Comments
 (0)