Closed cosinlink closed 4 years ago
ckb-vm
? Deploy & Run the contract on a real chain?in ckb-vm
== Deploy & Run the contract on a real chain
expected behavior
load_cell_data_hash(index, Source::Input)
should return Err(_) under any circumstances;Script(ValidationFailur(2))
In capsule, the contract code load_cell_datahash(index, Source::Input) should return Err() under any circumstances;
I don't really understand this, why load_cell_data_hash
should return an error?
Describe the bug in capsule, I can use the code 'load_cell_data_hash(0, Source::Input)?' to get the hash of CellData from tx.inputs[0], however, I failed to get the hash of CellData from tx.inputs[0] by using the same code in ckb-vm. Ckb-vm is not allowed user to get the CellDataHash from tx.inputs.
Additional context I use the typescript contract by c to check if I can get the CellDataHash in ckb chain:
It failed.