Skip to content

Commit

Permalink
Merge pull request #562 from shaojunda/rc/v0.9.3
Browse files Browse the repository at this point in the history
[ᚬmaster] Rc/v0.9.3
  • Loading branch information
shaojunda authored Feb 7, 2020
2 parents 08ee674 + 416c219 commit 528db01
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 61 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# [v0.9.3](https://github.com/shaojunda/ckb-explorer/compare/v0.9.2...v0.9.3) (2020-02-06)


### Features

* add cell_index to display input ([c700eea](https://github.com/shaojunda/ckb-explorer/commit/c700eea))



# [0.9.2](https://github.com/shaojunda/ckb-explorer/compare/v0.9.1...v0.9.2) (2020-01-31)


Expand Down
2 changes: 1 addition & 1 deletion app/models/ckb_transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def normal_tx_display_inputs(previews)
cell_inputs_for_display = previews ? cell_inputs.order(:id).limit(10) : cell_inputs.order(:id)
cell_inputs_for_display.each_with_index.map do |cell_input, index|
previous_cell_output = cell_input.previous_cell_output
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 }
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 }
display_input.merge!(attributes_for_dao_input(previous_cell_output)) if previous_cell_output.nervos_dao_withdrawing?
display_input.merge!(attributes_for_dao_input(cell_outputs[index], false)) if previous_cell_output.nervos_dao_deposit?

Expand Down
78 changes: 54 additions & 24 deletions doc/api.raml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ types:
"cell_type": {
type: "string"
},
"cell_index": {
type: "string"
},
"compensation_started_block_number": {
type: string,
required: false
Expand Down Expand Up @@ -1262,15 +1265,17 @@ types:
"capacity": 100,
"target_block_number": 759,
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "0"
},
{
"from_cellbase": false,
"input_id": 102,
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
"capacity": 100,
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae321",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "1"
},
{
"from_cellbase": false,
Expand All @@ -1286,6 +1291,7 @@ types:
"locked_until_block_timestamp": "1579665264926",
"interest": 100000,
"cell_type": "dao",
"cell_index": "0"
"dao_type_hash": "0xa20df8e80518e9b2eabc1a0efb0ebe1de83f8df9c867edf99d0c5895654fcde1",
}
],
Expand All @@ -1300,15 +1306,17 @@ types:
"secondary_reward": 476623447,
"consumed_by_tx_hash": null,
"status": "live",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "0"
},
{
"output_id": 104,
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
"capacity": 100,
"consumed_by_tx_hash": null,
"status": "live",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "0"
},
{
"output_id": 105,
Expand All @@ -1317,6 +1325,7 @@ types:
"consumed_by_tx_hash": null,
"status": "live",
"cell_type": "dao",
"cell_index": "0"
"dao_type_hash": "0xa20df8e80518e9b2eabc1a0efb0ebe1de83f8df9c867edf99d0c5895654fcde1"
}
]
Expand Down Expand Up @@ -1413,15 +1422,18 @@ types:
"capacity": 100,
"target_block_number": 759,
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "0"
},
{
"from_cellbase": false,
"input_id": 102,
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
"capacity": 100,
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae321",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "1"
}
],
"display_outputs": [
Expand Down Expand Up @@ -1490,15 +1502,17 @@ types:
"capacity": 100,
"target_block_number": 759,
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "0"
},
{
"from_cellbase": false,
"input_id": 102,
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
"capacity": 100,
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae321",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "0"
}
],
"display_outputs": [
Expand Down Expand Up @@ -1622,15 +1636,17 @@ types:
"capacity": 100,
"target_block_number": 759,
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "0"
},
{
"from_cellbase": false,
"input_id": 102,
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
"capacity": 100,
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae321",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "0"
}
],
"display_outputs": [
Expand Down Expand Up @@ -1697,15 +1713,17 @@ types:
"capacity": 100,
"target_block_number": 759,
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "0"
},
{
"from_cellbase": true,
"input_id": 102,
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
"capacity": 100,
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae321",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "0"
}
],
"display_outputs": [
Expand Down Expand Up @@ -2473,15 +2491,17 @@ types:
"capacity": 100,
"target_block_number": 100,
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "0"
},
{
"from_cellbase": false,
"input_id": 102,
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
"capacity": 100,
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae321",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "0"
}
],
"display_outputs": [
Expand Down Expand Up @@ -2617,15 +2637,17 @@ types:
"capacity": 100,
"target_block_number": 759,
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "0"
},
{
"from_cellbase": false,
"input_id": 102,
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
"capacity": 100,
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae321",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "0"
}
],
"display_outputs": [
Expand Down Expand Up @@ -2692,15 +2714,17 @@ types:
"capacity": 100,
"target_block_number": 759,
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "0"
},
{
"from_cellbase": true,
"input_id": 102,
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
"capacity": 100,
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae321",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "0"
}
],
"display_outputs": [
Expand Down Expand Up @@ -2865,15 +2889,17 @@ types:
"capacity": 100,
"target_block_number": 100,
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "0"
},
{
"from_cellbase": false,
"input_id": 102,
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
"capacity": 100,
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae321",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "0"
}
],
"display_outputs": [
Expand Down Expand Up @@ -2981,15 +3007,17 @@ types:
"capacity": 100,
"target_block_number": 759,
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "0"
},
{
"from_cellbase": false,
"input_id": 102,
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
"capacity": 100,
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae321",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "0"
}
],
"display_outputs": [
Expand Down Expand Up @@ -3058,15 +3086,17 @@ types:
"capacity": 100,
"target_block_number": 759,
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "0"
},
{
"from_cellbase": false,
"input_id": 102,
"address_hash": "0xddbd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae323",
"capacity": 100,
"generated_tx_hash": "0x3abd21e6e51674bb961bb4c5f3cee9faa5da30e64be10628dc1cef292cbae321",
"cell_type": "normal"
"cell_type": "normal",
"cell_index": "0"
}
],
"display_outputs": [
Expand Down
Loading

0 comments on commit 528db01

Please sign in to comment.