Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge released refs/heads/master into develop #1697

Merged
merged 33 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d76afbc
Merge pull request #1593 from nervosnetwork/develop
zmcNotafraid Jan 18, 2024
35a2f88
Merge pull request #1597 from nervosnetwork/testnet
zmcNotafraid Jan 18, 2024
6f16556
Merge pull request #1598 from nervosnetwork/develop
rabbitz Jan 23, 2024
6006554
Merge pull request #1603 from nervosnetwork/develop
zmcNotafraid Jan 23, 2024
4ea9c0d
Merge pull request #1601 from nervosnetwork/testnet
rabbitz Jan 23, 2024
3807b85
Merge pull request #1606 from nervosnetwork/develop
zmcNotafraid Jan 27, 2024
c021797
Merge pull request #1608 from nervosnetwork/testnet
zmcNotafraid Jan 27, 2024
78df21f
Merge pull request #1611 from nervosnetwork/develop
rabbitz Jan 31, 2024
d4268ae
Merge pull request #1614 from nervosnetwork/testnet
rabbitz Feb 4, 2024
4f8c70d
Merge pull request #1616 from nervosnetwork/develop
zmcNotafraid Feb 5, 2024
cb3ee9d
Merge pull request #1619 from nervosnetwork/develop
rabbitz Feb 6, 2024
cc40034
Merge pull request #1617 from nervosnetwork/testnet
rabbitz Feb 6, 2024
e3cc632
Merge pull request #1623 from nervosnetwork/develop
rabbitz Feb 20, 2024
d77219e
Merge pull request #1634 from nervosnetwork/develop
Keith-CY Feb 21, 2024
8b50d25
Merge pull request #1632 from nervosnetwork/testnet
rabbitz Feb 21, 2024
1f09492
Merge pull request #1636 from nervosnetwork/develop
rabbitz Feb 22, 2024
06471dc
Merge pull request #1637 from nervosnetwork/testnet
rabbitz Feb 22, 2024
7cf4890
Merge pull request #1639 from nervosnetwork/develop
zmcNotafraid Feb 22, 2024
4782fb7
Merge pull request #1642 from nervosnetwork/develop
zmcNotafraid Feb 22, 2024
a8f949e
Merge pull request #1644 from nervosnetwork/develop
zmcNotafraid Feb 23, 2024
3f8ae04
Merge pull request #1640 from nervosnetwork/testnet
zmcNotafraid Feb 26, 2024
c08451c
Merge pull request #1650 from nervosnetwork/develop
zmcNotafraid Feb 27, 2024
df55a8f
Merge pull request #1654 from nervosnetwork/develop
zmcNotafraid Feb 27, 2024
45034de
Merge pull request #1657 from nervosnetwork/develop
zmcNotafraid Feb 28, 2024
c2ffdbe
Merge pull request #1652 from nervosnetwork/testnet
zmcNotafraid Feb 29, 2024
26e4a0f
Merge pull request #1661 from nervosnetwork/develop
zmcNotafraid Mar 1, 2024
74d7706
Merge pull request #1662 from nervosnetwork/testnet
zmcNotafraid Mar 1, 2024
36e89b0
Merge pull request #1666 from nervosnetwork/develop
zmcNotafraid Mar 5, 2024
c58eb40
Merge pull request #1668 from nervosnetwork/testnet
zmcNotafraid Mar 5, 2024
13af18b
fix: contract with data1 hash_type needs to handle
zmcNotafraid Mar 21, 2024
b363288
Merge pull request #1693 from zmcNotafraid/issue-578
zmcNotafraid Mar 21, 2024
e196e45
chore: update permission of auto-merge action
zmcNotafraid Mar 21, 2024
34cdd09
Merge pull request #1696 from zmcNotafraid/update-ci
zmcNotafraid Mar 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/merge-master-to-develop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Merge master to develop

permissions:
pull-requests: write

on:
push:
branches:
Expand All @@ -16,8 +19,8 @@ jobs:
with:
source_branch: master
destination_branch: develop
pr_title: 'Merge released ${{ github.ref }} into develop'
pr_title: "Merge released ${{ github.ref }} into develop"
pr_reviewer: keith-cy
pr_label: auto-pr
pr_body: ':crown: *Anautomated PR*'
pr_body: ":crown: *Anautomated PR*"
github_token: ${{ secrets.GITHUB_TOKEN }}
13 changes: 8 additions & 5 deletions .github/workflows/request-to-deploy-mainnet.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Request to deploy mainnet

permissions:
pull-requests: write

on:
push:
branches: [testnet]
Expand All @@ -13,9 +16,9 @@ jobs:
- name: Request PR
uses: repo-sync/pull-request@v2
with:
source_branch: 'testnet'
destination_branch: 'master'
pr_title: 'Deploy to mainnet'
pr_reviewer: 'rabbitz,zmcNotafraid,keith-cy'
pr_label: 'auto-pr'
source_branch: "testnet"
destination_branch: "master"
pr_title: "Deploy to mainnet"
pr_reviewer: "rabbitz,zmcNotafraid,keith-cy"
pr_label: "auto-pr"
github_token: ${{ secrets.GITHUB_TOKEN }}
13 changes: 8 additions & 5 deletions .github/workflows/request-to-deploy-testnet.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Request to deploy testnet

permissions:
pull-requests: write

on:
push:
branches: [develop]
Expand All @@ -13,9 +16,9 @@ jobs:
- name: Request PR
uses: repo-sync/pull-request@v2
with:
source_branch: 'develop'
destination_branch: 'testnet'
pr_title: 'Deploy to testnet'
pr_reviewer: 'rabbitz,zmcNotafraid,keith-cy'
pr_label: 'auto-pr'
source_branch: "develop"
destination_branch: "testnet"
pr_title: "Deploy to testnet"
pr_reviewer: "rabbitz,zmcNotafraid,keith-cy"
pr_label: "auto-pr"
github_token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion app/jobs/import_transaction_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def process_deployed_cell(lock_script_or_type_script)

dep =
case lock_script_or_type_script.hash_type
when "data"
when "data", "data1"
by_data_hash[lock_script_or_type_script.code_hash]
when "type"
by_type_hash[lock_script_or_type_script.code_hash]
Expand Down
22 changes: 11 additions & 11 deletions app/models/deployed_cell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class DeployedCell < ApplicationRecord
# @param cell_output_id [Integer] deployed cell output id
def self.cell_output_id_to_contract_id(cell_output_id)
Rails.cache.fetch(["cell_output_id_to_contract_id", cell_output_id], expires_in: 1.day) do
DeployedCell.where(cell_output_id: cell_output_id).pick(:contract_id)
DeployedCell.where(cell_output_id:).pick(:contract_id)
end
end

Expand Down Expand Up @@ -73,7 +73,7 @@ def self.create_initial_data_for_ckb_transaction(ckb_transaction, cell_deps)
dep_type: cell_dep["dep_type"],
ckb_transaction_id: ckb_transaction.id,
contract_id: DeployedCell.cell_output_id_to_contract_id(cell_output.id), # check if we already known the relationship between the contract cell and contract
implicit: cell_dep["implicit"] || false
implicit: cell_dep["implicit"] || false,
}

# we don't know how the cells in transaction may refer to the contract cell
Expand Down Expand Up @@ -106,7 +106,7 @@ def self.create_initial_data_for_ckb_transaction(ckb_transaction, cell_deps)
dep_type: cell_dep["dep_type"],
ckb_transaction_id: ckb_transaction.id,
contract_id: nil,
implicit: false
implicit: false,
}
binary_data = mid_cell.binary_data
# binary_data = [hex_data[2..-1]].pack("H*")
Expand All @@ -121,10 +121,10 @@ def self.create_initial_data_for_ckb_transaction(ckb_transaction, cell_deps)
co = parse_code_dep[{
"out_point" => {
"tx_hash" => "0x#{tx_hash}",
"index" => cell_index
"index" => cell_index,
},
"dep_type" => "code",
"implicit" => true # this is an implicit dependency
"implicit" => true, # this is an implicit dependency
}]
end
end
Expand All @@ -138,10 +138,10 @@ def self.create_initial_data_for_ckb_transaction(ckb_transaction, cell_deps)
scripts.each do |lock_script_or_type_script|
dep =
case lock_script_or_type_script.hash_type
when "data"
by_data_hash[lock_script_or_type_script.code_hash]
when "type"
by_type_hash[lock_script_or_type_script.code_hash]
when "data", "data1"
by_data_hash[lock_script_or_type_script.code_hash]
when "type"
by_type_hash[lock_script_or_type_script.code_hash]
end
next unless dep

Expand All @@ -158,7 +158,7 @@ def self.create_initial_data_for_ckb_transaction(ckb_transaction, cell_deps)

deployed_cells_attrs << {
contract_id: contract.id,
cell_output_id: dep[:contract_cell_id]
cell_output_id: dep[:contract_cell_id],
}
end
end
Expand All @@ -168,7 +168,7 @@ def self.create_initial_data_for_ckb_transaction(ckb_transaction, cell_deps)
if cell_dependencies_attrs.present?
CellDependency.upsert_all cell_dependencies_attrs.uniq { |a|
a[:contract_cell_id]
}, unique_by: [:ckb_transaction_id, :contract_cell_id]
}, unique_by: %i[ckb_transaction_id contract_cell_id]
end
DeployedCell.upsert_all deployed_cells_attrs, unique_by: [:cell_output_id] if deployed_cells_attrs.present?
deployed_cells_attrs.each do |deployed_cell_attr|
Expand Down
Loading