Skip to content

Commit

Permalink
fix(adapter-transactional-tests): fix indexes in tests (stable sort p…
Browse files Browse the repository at this point in the history
…roblem)
  • Loading branch information
jkrvivian committed Nov 8, 2024
1 parent b54d054 commit f304d7a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ Contents: tto::M1::A {
}

task 7, line 47:
//# run tto::M1::receive --args object(2,2) receiving(2,3) --sender A
Error: Error checking transaction input objects: IncorrectUserSignature { error: "Object object(2,2) is owned by account address object(2,1), but given owner/signer address is @A" }
//# run tto::M1::receive --args object(2,1) receiving(2,2) --sender A
created: object(7,0)
mutated: object(0,0), object(2,1), object(2,2)
gas summary: computation_cost: 1000000, storage_cost: 5966000, storage_rebate: 3518800, non_refundable_storage_fee: 0

task 8, line 49:
//# view-object 2,0
Expand All @@ -97,7 +99,7 @@ Contents: iota::dynamic_field::Field<iota::dynamic_object_field::Wrapper<u64>, i
task 9, line 51:
//# view-object 2,1
Owner: Account Address ( A )
Version: 2
Version: 3
Contents: tto::M1::A {
id: iota::object::UID {
id: iota::object::ID {
Expand All @@ -109,15 +111,15 @@ Contents: tto::M1::A {

task 10, line 53:
//# view-object 2,2
Owner: Account Address ( fake(2,1) )
Version: 2
Owner: Object ID: ( fake(7,0) )
Version: 3
Contents: tto::M1::A {
id: iota::object::UID {
id: iota::object::ID {
bytes: fake(2,2),
},
},
value: 0u64,
value: 100u64,
}

task 11, line 55:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module tto::M1 {

//# view-object 2,3

//# run tto::M1::receive --args object(2,2) receiving(2,3) --sender A
//# run tto::M1::receive --args object(2,1) receiving(2,2) --sender A

//# view-object 2,0

Expand Down
21 changes: 12 additions & 9 deletions crates/iota-adapter-transactional-tests/tests/shared/upgrade.exp
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,28 @@ mutated: object(0,0)
gas summary: computation_cost: 1000000, storage_cost: 7797600, storage_rebate: 0, non_refundable_storage_fee: 0

task 3, line 41:
//# view-object 2,2
Owner: Object ID: ( fake(2,0) )
//# view-object 2,3
Owner: Account Address ( A )
Version: 2
Contents: t::m::Obj {
id: iota::object::UID {
id: iota::object::ID {
bytes: fake(2,2),
bytes: fake(2,3),
},
},
}

task 4, line 43:
//# run t::m::share --args object(2,2) --sender A
Error: Error checking transaction input objects: InvalidChildObjectArgument { child_id: object(2,2), parent_id: object(2,0) }
//# run t::m::share --args object(2,3) --sender A
Error: Transaction Effects Status: Move Runtime Abort. Location: iota::transfer::share_object_impl (function index 10) at offset 0, Abort Code: 0
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: MoveAbort(MoveLocation { module: ModuleId { address: iota, name: Identifier("transfer") }, function: 10, instruction: 0, function_name: Some("share_object_impl") }, 0), source: Some(VMError { major_status: ABORTED, sub_status: Some(0), message: None, exec_state: None, location: Module(ModuleId { address: iota, name: Identifier("transfer") }), indices: [], offsets: [(FunctionDefinitionIndex(10), 0)] }), command: Some(0) } }

task 5, line 45:
//# run t::m::share_wrapped --args object(2,2) --sender A
Error: Error checking transaction input objects: InvalidChildObjectArgument { child_id: object(2,2), parent_id: object(2,0) }
//# run t::m::share_wrapped --args object(2,3) --sender A
Error: Transaction Effects Status: Move Runtime Abort. Location: iota::transfer::share_object_impl (function index 10) at offset 0, Abort Code: 0
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: MoveAbort(MoveLocation { module: ModuleId { address: iota, name: Identifier("transfer") }, function: 10, instruction: 0, function_name: Some("share_object_impl") }, 0), source: Some(VMError { major_status: ABORTED, sub_status: Some(0), message: None, exec_state: None, location: Module(ModuleId { address: iota, name: Identifier("transfer") }), indices: [], offsets: [(FunctionDefinitionIndex(10), 0)] }), command: Some(0) } }

task 6, line 47:
//# run t::m::share_child --args object(2,2) --sender A
Error: Error checking transaction input objects: InvalidChildObjectArgument { child_id: object(2,2), parent_id: object(2,0) }
//# run t::m::share_child --args object(2,3) --sender A
Error: Transaction Effects Status: Move Runtime Abort. Location: iota::transfer::share_object_impl (function index 10) at offset 0, Abort Code: 0
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: MoveAbort(MoveLocation { module: ModuleId { address: iota, name: Identifier("transfer") }, function: 10, instruction: 0, function_name: Some("share_object_impl") }, 0), source: Some(VMError { major_status: ABORTED, sub_status: Some(0), message: None, exec_state: None, location: Module(ModuleId { address: iota, name: Identifier("transfer") }), indices: [], offsets: [(FunctionDefinitionIndex(10), 0)] }), command: Some(0) } }
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ module t::m {

//# run t::m::create --sender A

//# view-object 2,2
//# view-object 2,3

//# run t::m::share --args object(2,2) --sender A
//# run t::m::share --args object(2,3) --sender A

//# run t::m::share_wrapped --args object(2,2) --sender A
//# run t::m::share_wrapped --args object(2,3) --sender A

//# run t::m::share_child --args object(2,2) --sender A
//# run t::m::share_child --args object(2,3) --sender A

0 comments on commit f304d7a

Please sign in to comment.