Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Load Input OutPoint #62

Open
u2 opened this issue Mar 7, 2019 · 1 comment
Open

Load Input OutPoint #62

u2 opened this issue Mar 7, 2019 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@u2
Copy link
Contributor

u2 commented Mar 7, 2019

https://github.com/nervosnetwork/ckb-demo-ruby-sdk/blob/develop/docs/how-to-write-contracts.md#load-input-outpoint

It's also possible to load input OutPoint from different index:

CKB.load_input_out_point(1, CKB::Source::INPUT)
# This won't trigger errors but would always return nil since output doesn't have
# OutPoint
CKB.load_input_out_point(1, CKB::Source::OUTPUT)

The demo is not consistent with the description. We want to show a different index, but the demo shows a different source.

Another question: what's CKB.load_input_out_point(0, CKB::Source::CURRENT) different from CKB.load_input_out_point(0, CKB::Source::INPUT)

@u2
Copy link
Contributor Author

u2 commented Mar 7, 2019

Another question: what's CKB.load_input_out_point(0, CKB::Source::CURRENT) different from CKB.load_input_out_point(0, CKB::Source::INPUT)

I see, for this https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0009-vm-syscalls/0009-vm-syscalls.md#load-input-by-field.

But I think it's better to remove outputs and deps these two kinds of source, they are meaningless, just
lead to confuse, cause only inputs have out_points.

@ashchan ashchan added the question Further information is requested label Mar 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants