Skip to content

Commit 528db01

Browse files
authored
Merge pull request #562 from shaojunda/rc/v0.9.3
[ᚬmaster] Rc/v0.9.3
2 parents 08ee674 + 416c219 commit 528db01

File tree

5 files changed

+127
-61
lines changed

5 files changed

+127
-61
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# [v0.9.3](https://github.com/shaojunda/ckb-explorer/compare/v0.9.2...v0.9.3) (2020-02-06)
2+
3+
4+
### Features
5+
6+
* add cell_index to display input ([c700eea](https://github.com/shaojunda/ckb-explorer/commit/c700eea))
7+
8+
9+
110
# [0.9.2](https://github.com/shaojunda/ckb-explorer/compare/v0.9.1...v0.9.2) (2020-01-31)
211

312

app/models/ckb_transaction.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def normal_tx_display_inputs(previews)
8686
cell_inputs_for_display = previews ? cell_inputs.order(:id).limit(10) : cell_inputs.order(:id)
8787
cell_inputs_for_display.each_with_index.map do |cell_input, index|
8888
previous_cell_output = cell_input.previous_cell_output
89-
display_input = { id: previous_cell_output.id, from_cellbase: false, capacity: previous_cell_output.capacity, address_hash: previous_cell_output.address_hash, generated_tx_hash: previous_cell_output.generated_by.tx_hash, cell_type: previous_cell_output.cell_type }
89+
display_input = { id: previous_cell_output.id, from_cellbase: false, capacity: previous_cell_output.capacity, address_hash: previous_cell_output.address_hash, generated_tx_hash: previous_cell_output.generated_by.tx_hash, cell_index: previous_cell_output.cell_index, cell_type: previous_cell_output.cell_type }
9090
display_input.merge!(attributes_for_dao_input(previous_cell_output)) if previous_cell_output.nervos_dao_withdrawing?
9191
display_input.merge!(attributes_for_dao_input(cell_outputs[index], false)) if previous_cell_output.nervos_dao_deposit?
9292

doc/api.raml

Lines changed: 54 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ types:
225225
"cell_type": {
226226
type: "string"
227227
},
228+
"cell_index": {
229+
type: "string"
230+
},
228231
"compensation_started_block_number": {
229232
type: string,
230233
required: false
@@ -1262,15 +1265,17 @@ types:
12621265
"capacity": 100,
12631266
"target_block_number": 759,
12641267
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
1265-
"cell_type": "normal"
1268+
"cell_type": "normal",
1269+
"cell_index": "0"
12661270
},
12671271
{
12681272
"from_cellbase": false,
12691273
"input_id": 102,
12701274
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
12711275
"capacity": 100,
12721276
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae321",
1273-
"cell_type": "normal"
1277+
"cell_type": "normal",
1278+
"cell_index": "1"
12741279
},
12751280
{
12761281
"from_cellbase": false,
@@ -1286,6 +1291,7 @@ types:
12861291
"locked_until_block_timestamp": "1579665264926",
12871292
"interest": 100000,
12881293
"cell_type": "dao",
1294+
"cell_index": "0"
12891295
"dao_type_hash": "0xa20df8e80518e9b2eabc1a0efb0ebe1de83f8df9c867edf99d0c5895654fcde1",
12901296
}
12911297
],
@@ -1300,15 +1306,17 @@ types:
13001306
"secondary_reward": 476623447,
13011307
"consumed_by_tx_hash": null,
13021308
"status": "live",
1303-
"cell_type": "normal"
1309+
"cell_type": "normal",
1310+
"cell_index": "0"
13041311
},
13051312
{
13061313
"output_id": 104,
13071314
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
13081315
"capacity": 100,
13091316
"consumed_by_tx_hash": null,
13101317
"status": "live",
1311-
"cell_type": "normal"
1318+
"cell_type": "normal",
1319+
"cell_index": "0"
13121320
},
13131321
{
13141322
"output_id": 105,
@@ -1317,6 +1325,7 @@ types:
13171325
"consumed_by_tx_hash": null,
13181326
"status": "live",
13191327
"cell_type": "dao",
1328+
"cell_index": "0"
13201329
"dao_type_hash": "0xa20df8e80518e9b2eabc1a0efb0ebe1de83f8df9c867edf99d0c5895654fcde1"
13211330
}
13221331
]
@@ -1413,15 +1422,18 @@ types:
14131422
"capacity": 100,
14141423
"target_block_number": 759,
14151424
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
1416-
"cell_type": "normal"
1425+
"cell_type": "normal",
1426+
"cell_index": "0"
14171427
},
14181428
{
14191429
"from_cellbase": false,
14201430
"input_id": 102,
14211431
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
14221432
"capacity": 100,
14231433
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae321",
1424-
"cell_type": "normal"
1434+
"cell_type": "normal",
1435+
"cell_index": "1"
1436+
14251437
}
14261438
],
14271439
"display_outputs": [
@@ -1490,15 +1502,17 @@ types:
14901502
"capacity": 100,
14911503
"target_block_number": 759,
14921504
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
1493-
"cell_type": "normal"
1505+
"cell_type": "normal",
1506+
"cell_index": "0"
14941507
},
14951508
{
14961509
"from_cellbase": false,
14971510
"input_id": 102,
14981511
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
14991512
"capacity": 100,
15001513
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae321",
1501-
"cell_type": "normal"
1514+
"cell_type": "normal",
1515+
"cell_index": "0"
15021516
}
15031517
],
15041518
"display_outputs": [
@@ -1622,15 +1636,17 @@ types:
16221636
"capacity": 100,
16231637
"target_block_number": 759,
16241638
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
1625-
"cell_type": "normal"
1639+
"cell_type": "normal",
1640+
"cell_index": "0"
16261641
},
16271642
{
16281643
"from_cellbase": false,
16291644
"input_id": 102,
16301645
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
16311646
"capacity": 100,
16321647
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae321",
1633-
"cell_type": "normal"
1648+
"cell_type": "normal",
1649+
"cell_index": "0"
16341650
}
16351651
],
16361652
"display_outputs": [
@@ -1697,15 +1713,17 @@ types:
16971713
"capacity": 100,
16981714
"target_block_number": 759,
16991715
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
1700-
"cell_type": "normal"
1716+
"cell_type": "normal",
1717+
"cell_index": "0"
17011718
},
17021719
{
17031720
"from_cellbase": true,
17041721
"input_id": 102,
17051722
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
17061723
"capacity": 100,
17071724
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae321",
1708-
"cell_type": "normal"
1725+
"cell_type": "normal",
1726+
"cell_index": "0"
17091727
}
17101728
],
17111729
"display_outputs": [
@@ -2473,15 +2491,17 @@ types:
24732491
"capacity": 100,
24742492
"target_block_number": 100,
24752493
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
2476-
"cell_type": "normal"
2494+
"cell_type": "normal",
2495+
"cell_index": "0"
24772496
},
24782497
{
24792498
"from_cellbase": false,
24802499
"input_id": 102,
24812500
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
24822501
"capacity": 100,
24832502
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae321",
2484-
"cell_type": "normal"
2503+
"cell_type": "normal",
2504+
"cell_index": "0"
24852505
}
24862506
],
24872507
"display_outputs": [
@@ -2617,15 +2637,17 @@ types:
26172637
"capacity": 100,
26182638
"target_block_number": 759,
26192639
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
2620-
"cell_type": "normal"
2640+
"cell_type": "normal",
2641+
"cell_index": "0"
26212642
},
26222643
{
26232644
"from_cellbase": false,
26242645
"input_id": 102,
26252646
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
26262647
"capacity": 100,
26272648
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae321",
2628-
"cell_type": "normal"
2649+
"cell_type": "normal",
2650+
"cell_index": "0"
26292651
}
26302652
],
26312653
"display_outputs": [
@@ -2692,15 +2714,17 @@ types:
26922714
"capacity": 100,
26932715
"target_block_number": 759,
26942716
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
2695-
"cell_type": "normal"
2717+
"cell_type": "normal",
2718+
"cell_index": "0"
26962719
},
26972720
{
26982721
"from_cellbase": true,
26992722
"input_id": 102,
27002723
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
27012724
"capacity": 100,
27022725
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae321",
2703-
"cell_type": "normal"
2726+
"cell_type": "normal",
2727+
"cell_index": "0"
27042728
}
27052729
],
27062730
"display_outputs": [
@@ -2865,15 +2889,17 @@ types:
28652889
"capacity": 100,
28662890
"target_block_number": 100,
28672891
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
2868-
"cell_type": "normal"
2892+
"cell_type": "normal",
2893+
"cell_index": "0"
28692894
},
28702895
{
28712896
"from_cellbase": false,
28722897
"input_id": 102,
28732898
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
28742899
"capacity": 100,
28752900
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae321",
2876-
"cell_type": "normal"
2901+
"cell_type": "normal",
2902+
"cell_index": "0"
28772903
}
28782904
],
28792905
"display_outputs": [
@@ -2981,15 +3007,17 @@ types:
29813007
"capacity": 100,
29823008
"target_block_number": 759,
29833009
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
2984-
"cell_type": "normal"
3010+
"cell_type": "normal",
3011+
"cell_index": "0"
29853012
},
29863013
{
29873014
"from_cellbase": false,
29883015
"input_id": 102,
29893016
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
29903017
"capacity": 100,
29913018
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae321",
2992-
"cell_type": "normal"
3019+
"cell_type": "normal",
3020+
"cell_index": "0"
29933021
}
29943022
],
29953023
"display_outputs": [
@@ -3058,15 +3086,17 @@ types:
30583086
"capacity": 100,
30593087
"target_block_number": 759,
30603088
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
3061-
"cell_type": "normal"
3089+
"cell_type": "normal",
3090+
"cell_index": "0"
30623091
},
30633092
{
30643093
"from_cellbase": false,
30653094
"input_id": 102,
30663095
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
30673096
"capacity": 100,
30683097
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae321",
3069-
"cell_type": "normal"
3098+
"cell_type": "normal",
3099+
"cell_index": "0"
30703100
}
30713101
],
30723102
"display_outputs": [

0 commit comments

Comments
 (0)