Skip to content

Commit

Permalink
fix: add jbuilder file
Browse files Browse the repository at this point in the history
Signed-off-by: Miles Zhang <[email protected]>
  • Loading branch information
zmcNotafraid committed Dec 12, 2024
1 parent 7c98d09 commit a5a24f2
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
29 changes: 29 additions & 0 deletions app/views/api/v2/scripts/deployed_cells.json.jbuilder
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
json.data do
json.deployed_cells @deployed_cells do |deployed_cell|
json.id deployed_cell.id
json.capacity deployed_cell.capacity
json.ckb_transaction_id deployed_cell.ckb_transaction_id
json.created_at deployed_cell.created_at
json.updated_at deployed_cell.updated_at
json.status deployed_cell.status
json.address_id deployed_cell.address_id
json.block_id deployed_cell.block_id
json.tx_hash deployed_cell.tx_hash
json.cell_index deployed_cell.cell_index
json.consumed_by_id deployed_cell.consumed_by_id
json.cell_type deployed_cell.cell_type
json.data_size deployed_cell.data_size
json.occupied_capacity deployed_cell.occupied_capacity
json.block_timestamp deployed_cell.block_timestamp
json.consumed_block_timestamp deployed_cell.consumed_block_timestamp
json.type_hash deployed_cell.type_hash
json.udt_amount deployed_cell.udt_amount
json.dao deployed_cell.dao
json.lock_script_id deployed_cell.lock_script_id
json.type_script_id deployed_cell.type_script_id
end
json.meta do
json.total @deployed_cells.total_count
json.page_size @page_size.to_i
end
end
29 changes: 29 additions & 0 deletions app/views/api/v2/scripts/referring_cells.json.jbuilder
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
json.data do
json.referring_cells @referring_cells do |referring_cell|
json.id referring_cell.id
json.capacity referring_cell.capacity
json.ckb_transaction_id referring_cell.ckb_transaction_id
json.created_at referring_cell.created_at
json.updated_at referring_cell.updated_at
json.status referring_cell.status
json.address_id referring_cell.address_id
json.block_id referring_cell.block_id
json.tx_hash referring_cell.tx_hash
json.cell_index referring_cell.cell_index
json.consumed_by_id referring_cell.consumed_by_id
json.cell_type referring_cell.cell_type
json.data_size referring_cell.data_size
json.occupied_capacity referring_cell.occupied_capacity
json.block_timestamp referring_cell.block_timestamp
json.consumed_block_timestamp referring_cell.consumed_block_timestamp
json.type_hash referring_cell.type_hash
json.udt_amount referring_cell.udt_amount
json.dao referring_cell.dao
json.lock_script_id referring_cell.lock_script_id
json.type_script_id referring_cell.type_script_id
end
json.meta do
json.total @referring_cells.total_count
json.page_size @page_size.to_i
end
end

0 comments on commit a5a24f2

Please sign in to comment.