-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: adjust contract and cell_dependencies table * feat: adjust api Signed-off-by: Miles Zhang <[email protected]> * feat: use task fix data Signed-off-by: Miles Zhang <[email protected]> * feat: comment code Signed-off-by: Miles Zhang <[email protected]> * feat: sync cell dependency Signed-off-by: Miles Zhang <[email protected]> * feat: add contract_analyzed to cell_dependencies Signed-off-by: Miles Zhang <[email protected]> * feat: use worker to analyze contract Signed-off-by: Miles Zhang <[email protected]> * fix: use new cell dependency unique index Signed-off-by: Miles Zhang <[email protected]> * feat: add index to contract_analyzed Signed-off-by: Miles Zhang <[email protected]> * chore: set statement_timeout for migration Signed-off-by: Miles Zhang <[email protected]> * feat: enhance analyze contract worker Signed-off-by: Miles Zhang <[email protected]> * test: fix test Signed-off-by: Miles Zhang <[email protected]> * fix: some contract's script count is too many Signed-off-by: Miles Zhang <[email protected]> * feat: stop create contract in node processor Signed-off-by: Miles Zhang <[email protected]> * feat: fill contract info task Signed-off-by: Miles Zhang <[email protected]> --------- Signed-off-by: Miles Zhang <[email protected]>
- Loading branch information
1 parent
66aafa6
commit 82dd84f
Showing
51 changed files
with
1,438 additions
and
642 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
class CellDepsOutPoint < ApplicationRecord | ||
belongs_to :contract, foreign_key: :deployed_cell_output_id, primary_key: :deployed_cell_output_id, optional: true | ||
has_many :cell_dependencies, foreign_key: :contract_cell_id, primary_key: :contract_cell_id | ||
|
||
scope :list_contract_cell_ids_by_contract, ->(contract_ids) { joins(:contract).where(contracts: { id: contract_ids }).pluck(:contract_cell_id) } | ||
end | ||
|
||
# == Schema Information | ||
# | ||
# Table name: cell_deps_out_points | ||
# | ||
# id :bigint not null, primary key | ||
# tx_hash :binary | ||
# cell_index :integer | ||
# deployed_cell_output_id :bigint | ||
# contract_cell_id :bigint | ||
# created_at :datetime not null | ||
# updated_at :datetime not null | ||
# | ||
# Indexes | ||
# | ||
# index_cell_deps_out_points_on_contract_cell_id_deployed_cell_id (contract_cell_id,deployed_cell_output_id) UNIQUE | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.