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

Fix default output validator #314

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

chenyukang
Copy link
Contributor

Type OutputsValidator

Transaction output validators that prevent common mistakes.

It's an enum value from one of:

@@ -128,7 +128,7 @@ def generate_tx(target_address, capacity, data = "0x", key: nil, fee: 0, use_dep
# @param data [String] "0x..."
# @param key [CKB::Key | String] Key or private key hex string
# @param fee [Integer] transaction fee, in shannon
def send_capacity(target_address, capacity, data = "0x", key: nil, fee: 0, outputs_validator: "default", from_block_number: 0)
def send_capacity(target_address, capacity, data = "0x", key: nil, fee: 0, outputs_validator: "passthrough", from_block_number: 0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it is safer to set the default value of outputs_validator to 'default'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CKB provides two built-in validators, well_known_scripts_only and passthrough. When no validator is specified, well_known_scripts_only is used.

you means set well_known_scripts_only to be default?
now outputs_validator: "default" will report an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants