Skip to content

Commit

Permalink
feat: filter contract of type script
Browse files Browse the repository at this point in the history
Signed-off-by: Miles Zhang <[email protected]>
  • Loading branch information
zmcNotafraid committed Oct 19, 2023
1 parent e2797f5 commit 5948c40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tasks/migration/generate_referring_cells.rake
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace :migration do

desc "Usage: RAILS_ENV=production bundle exec rake migration:generate_missed_type_script_contract_referring_cells"
task generate_missed_type_script_contract_referring_cells: :environment do
contract_hashes = Contract.pluck(:code_hash)
contract_hashes = Contract.where(role: "type_script").pluck(:code_hash)
binary_hashes = CkbUtils.hexes_to_bins(contract_hashes)
contract_type_ids = TypeScript.where(code_hash: binary_hashes).pluck(:id)
live_cells = CellOutput.live.where(type_script_id: contract_type_ids)
Expand Down

0 comments on commit 5948c40

Please sign in to comment.