Skip to content

SudtTransactionBuilder不能过滤Cell,导致IssueSudt失败 #696

@jokeray819

Description

@jokeray819

我在测试中在发现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)自定义过滤条件

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions