-
Notifications
You must be signed in to change notification settings - Fork 26
Description
我在测试中在发现IssueSudtExample测试用例中,当ckb账户存在TypeScript为UniqueCell的时候,SudtTransactionBuilder会将这些Cell作为Input放到交易中,导致发送交易出错Error如下:
{
"code": "0xfffffed2",
"message": "TransactionFailedToVerify: Verification failed Script(TransactionScriptError { source: Inputs[1].Type, cause: ScriptNotFound: code_hash: Byte32(0x8e341bcfec6393dcd41e635733ff2dca00a6af546949f70c57a706c0f344df8b) })"
}
错误原因是DepCell没有中UniqueCell的DepCell。
我使用的是测试链的账号:ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqgu5e2rss3rmkelj0xgwmxnalv7aa30d9gdmj7vn
分析是由于代码中 new InputIterator构造的SearchKey只限定了LockScript
Iterator<TransactionInput> iterator = new InputIterator(sender); TransactionWithScriptGroups txWithGroups = new SudtTransactionBuilder(configuration, iterator, SudtTransactionBuilder.TransactionType.ISSUE, sender)。
建议是否考虑新增InputIterator构造函数 new InputIterator(tring address,Filter filter)自定义过滤条件