You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.
In the scripts/bitcoin folder, there are 8 different sighash combination, but there are many duplicated codes in the script.
All the sighash without the anyonecanpay modifier, the sha3 of inputs are the same:
tx["inputs"].each_with_index do |input, i|
sha3.update(input["hash"])
sha3.update(input["index"].to_s)
sha3.update(CKB.load_script_hash(i, CKB::Source::INPUT, CKB::Category::LOCK))
end
Any good way to optimize it? If we want to develop some complicated scripts, like the contract for the layer2 protocol or implement EVM by ruby, it's better to modulize it. It's a universal problem.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In the scripts/bitcoin folder, there are 8 different sighash combination, but there are many duplicated codes in the script.
All the sighash without the anyonecanpay modifier, the sha3 of inputs are the same:
All the sighash with the anyonecanpay modifier:
Any good way to optimize it? If we want to develop some complicated scripts, like the contract for the layer2 protocol or implement EVM by ruby, it's better to modulize it. It's a universal problem.
The text was updated successfully, but these errors were encountered: