diff --git a/examples/.gitignore b/examples/.gitignore deleted file mode 100644 index d1c64d9185..0000000000 --- a/examples/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -build -package \ No newline at end of file diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000000..aa3de9f1fe --- /dev/null +++ b/examples/README.md @@ -0,0 +1,3 @@ +# Starcoin Move examples + +All example code has been migrated to https://github.com/starcoinorg/guide-to-move-package-manager \ No newline at end of file diff --git a/examples/debug/scripts/debug.move b/examples/debug/scripts/debug.move deleted file mode 100644 index f4943e174c..0000000000 --- a/examples/debug/scripts/debug.move +++ /dev/null @@ -1,8 +0,0 @@ -script { - use StarcoinFramework::Debug; - use StarcoinFramework::Signer; - - fun test_debug(account: signer){ - Debug::print(&Signer::address_of(&account)); - } -} \ No newline at end of file diff --git a/examples/my_counter/module/MyCounter.move b/examples/my_counter/module/MyCounter.move deleted file mode 100644 index 8e663c53b2..0000000000 --- a/examples/my_counter/module/MyCounter.move +++ /dev/null @@ -1,22 +0,0 @@ -module {{sender}}::MyCounter { - use StarcoinFramework::Signer; - - struct Counter has key, store { - value:u64, - } - public fun init(account: &signer){ - move_to(account, Counter{value:0}); - } - public fun incr(account: &signer) acquires Counter { - let counter = borrow_global_mut(Signer::address_of(account)); - counter.value = counter.value + 1; - } - - public(script) fun init_counter(account: signer){ - Self::init(&account) - } - - public(script) fun incr_counter(account: signer) acquires Counter { - Self::incr(&account) - } -} \ No newline at end of file diff --git a/examples/my_token/MyToken.move b/examples/my_token/MyToken.move deleted file mode 100644 index bfb74be1ea..0000000000 --- a/examples/my_token/MyToken.move +++ /dev/null @@ -1,16 +0,0 @@ -module {{sender}}::MyToken { - use StarcoinFramework::Token; - use StarcoinFramework::Account; - - struct MyToken has copy, drop, store { } - - public(script) fun init(account: signer) { - Token::register_token(&account, 3); - Account::do_accept_token(&account); - } - - public(script) fun mint(account: signer, amount: u128) { - let token = Token::mint(&account, amount); - Account::deposit_to_self(&account, token) - } -} diff --git a/examples/my_token/README.md b/examples/my_token/README.md deleted file mode 100644 index 087a03283c..0000000000 --- a/examples/my_token/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Move contract examples - -1. [MyCounter](./my_counter) a simple Move module example. -2. [MyToken](./my_token) a simple User defined Coin example. diff --git a/examples/simple_nft/README.md b/examples/simple_nft/README.md deleted file mode 100644 index 1118fc59c3..0000000000 --- a/examples/simple_nft/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# A Move NFT example - -The code has been migrated to https://github.com/starcoinorg/guide-to-move-package-manager/tree/main/simple-nft \ No newline at end of file