yeah, if we put owner_lock in script_vec, we will meet the issue.
Maybe we can assign different weights to the scripts in xudt_args, so that some scripts are sufficient conditions for unlocking, and some need to accumulate enough weights to unlock, and use a bitmap to indicate which scripts our unlocking will execute.
4 byte xUDT flags Variable length extension data
table Script {
code_hash: Byte32,
hash_type: byte,
args: Bytes,
weight: Uint32,
}
<required weight> + vector ScriptVec <Script>;
and when call next script, we need to pass the accumulated weights down.
int validate(int is_owner_mode, size_t extension_index, const uint8_t* args, size_t args_length);
if weights is enough, script finish without more execution, if weights is not enough and no more scripts to execute, script return error.
so if required weight = 100, we can set owner_check script’s weight 100.