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 #1576

Merged
merged 25 commits into from
Jan 18, 2024
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a663d3c
Merge pull request #1478 from nervosnetwork/testnet
zmcNotafraid Oct 20, 2023
9119781
Merge pull request #1485 from nervosnetwork/testnet
zmcNotafraid Oct 23, 2023
9ccfdd4
Merge pull request #1492 from nervosnetwork/testnet
rabbitz Nov 6, 2023
1fefe97
Merge pull request #1495 from nervosnetwork/testnet
rabbitz Nov 7, 2023
2f06417
feat: adjust halving miner reward (#1505)
zmcNotafraid Nov 19, 2023
30ae902
Fix conflict with testnet branch
zmcNotafraid Nov 20, 2023
f7a912f
Merge pull request #1511 from zmcNotafraid/fix-conflict-with-testnet
zmcNotafraid Nov 20, 2023
b926c32
Merge pull request #1516 from nervosnetwork/testnet
zmcNotafraid Nov 27, 2023
fdd9cb1
Merge pull request #1521 from nervosnetwork/testnet
rabbitz Dec 1, 2023
ef6b728
Merge pull request #1524 from nervosnetwork/testnet
zmcNotafraid Dec 4, 2023
cd8c2c5
Merge pull request #1527 from nervosnetwork/testnet
zmcNotafraid Dec 8, 2023
c311576
Merge pull request #1529 from nervosnetwork/testnet
rabbitz Dec 26, 2023
7c006dc
Merge pull request #1545 from nervosnetwork/testnet
zmcNotafraid Dec 29, 2023
94473da
Merge pull request #1546 from nervosnetwork/develop
zmcNotafraid Dec 31, 2023
5377096
Merge pull request #1549 from nervosnetwork/testnet
zmcNotafraid Jan 2, 2024
f8ed5e4
Merge pull request #1551 from nervosnetwork/develop
rabbitz Jan 2, 2024
9749704
Merge pull request #1552 from nervosnetwork/testnet
rabbitz Jan 2, 2024
a28c572
Merge pull request #1554 from nervosnetwork/develop
zmcNotafraid Jan 8, 2024
d2d4176
Merge pull request #1559 from nervosnetwork/develop
zmcNotafraid Jan 16, 2024
b85a730
Merge pull request #1569 from nervosnetwork/develop
zmcNotafraid Jan 16, 2024
676d60b
Merge pull request #1556 from nervosnetwork/testnet
zmcNotafraid Jan 16, 2024
08e498c
fix: xudt mainnet hash_type was data1
zmcNotafraid Jan 16, 2024
ad48ce8
Merge pull request #1572 from zmcNotafraid/issue-508-12
zmcNotafraid Jan 16, 2024
0950030
chore: optimize cell_type query
rabbitz Jan 18, 2024
5569f27
Merge pull request #1575 from rabbitz/feat/block_syncer
rabbitz Jan 18, 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
22 changes: 21 additions & 1 deletion app/utils/ckb_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,25 @@ def self.decode_header_deps(raw_header_deps)
# @param [String] output_data
# @return [String] cell type
def self.cell_type(type_script, output_data)
if type_script&.code_hash == CkbSync::Api.instance.xudt_code_hash &&
((CkbSync::Api.instance.mode == CKB::MODE::TESTNET && type_script&.hash_type == "type") ||
(CkbSync::Api.instance.mode == CKB::MODE::MAINNET && type_script&.hash_type == "data1"))
str = Kredis.string type_script.compute_hash
unless str.value
if OmigaInscriptionInfo.exists?(udt_hash: type_script.compute_hash)
str.value ="omiga_inscription"
else
str.value = "xudt"
end
end

return str.value
end

if type_script&.code_hash == CkbSync::Api.instance.omiga_inscription_info_code_hash
return "omiga_inscription_info"
end

return "normal" unless ([
Settings.dao_code_hash, Settings.dao_type_hash, Settings.sudt_cell_type_hash, Settings.sudt1_cell_type_hash,
CkbSync::Api.instance.issuer_script_code_hash, CkbSync::Api.instance.token_class_script_code_hash,
Expand All @@ -416,7 +435,8 @@ def self.cell_type(type_script, output_data)
[
CkbSync::Api.instance.spore_cluster_code_hash,
*CkbSync::Api.instance.spore_cell_code_hashes,
].include?(type_script&.code_hash) && type_script&.hash_type == "data1"
].include?(type_script&.code_hash) && type_script&.hash_type == "data1" ||
CkbSync::Api.instance.mode == CKB::MODE::MAINNET && [CkbSync::Api.instance.xudt_code_hash].include?(type_script&.code_hash) && type_script&.hash_type == "data1"

case type_script&.code_hash
when Settings.dao_code_hash, Settings.dao_type_hash
Expand Down
Loading