Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
jolestar committed Oct 11, 2023
1 parent 221a981 commit aa85fd7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
processed 4 tasks

task 1 'publish'. lines 3-33:
task 1 'publish'. lines 3-30:
status EXECUTED

task 2 'run'. lines 35-43:
task 2 'run'. lines 32-40:
status EXECUTED

task 3 'view'. lines 45-47:
task 3 'view'. lines 42-44:
store key 0x42::test::Foo {
x: 500
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ module creator::test {
use std::string;
use moveos_std::account_storage;
use moveos_std::context::{Self, Context};
use moveos_std::object;
use moveos_std::object_id::ObjectID;
use std::debug;

Expand All @@ -26,7 +25,6 @@ module creator::test {
public fun call_moveos_std<T: store>(ctx: &mut Context, sender: &signer, object_id: ObjectID) {
debug::print(&object_id);
let (_id,_owner,value) = context::remove_object<Foo>(ctx, object_id);
debug::print(&obj);
account_storage::global_move_to<Foo>(ctx, sender, value);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,23 @@ processed 3 tasks
task 1 'publish'. lines 3-8:
status EXECUTED

task 2 'publish'. lines 10-41:
task 2 'publish'. lines 10-38:
Error: error: resource type "KeyStruct" in function "0x2::context::remove_object" not defined in current module or not allowed
┌─ /tmp/tempfile:32:19
┌─ /tmp/tempfile:31:34
32 │ let obj = context::remove_object<KeyStruct>(ctx, object_id);
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: resource type "KeyStruct" in function "0x2::object::unpack" not defined in current module or not allowed
┌─ /tmp/tempfile:34:34
34 │ let (_id,_owner,value) = object::unpack(obj);
│ ^^^^^^^^^^^^^^^^^^^
31 │ let (_id,_owner,value) = context::remove_object<KeyStruct>(ctx, object_id);
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: resource type "KeyStruct" in function "0x2::account_storage::global_move_to" not defined in current module or not allowed
┌─ /tmp/tempfile:35:9
┌─ /tmp/tempfile:32:9
35 │ account_storage::global_move_to(ctx, sender, value);
32 │ account_storage::global_move_to(ctx, sender, value);
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: resource type "KeyStruct" in function "0x42::test::publish_foo" not defined in current module or not allowed
┌─ /tmp/tempfile:28:9
┌─ /tmp/tempfile:27:9
28 │ publish_foo<KeyStruct>(ctx, s)
27 │ publish_foo<KeyStruct>(ctx, s)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ module creator::test {
use creator::test0::KeyStruct;
use moveos_std::account_storage;
use moveos_std::context::{Self, Context};
use moveos_std::object;
use moveos_std::object_id::ObjectID;

struct Foo has key {
Expand Down

0 comments on commit aa85fd7

Please sign in to comment.