Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gh-1622] remove resource account in account.move. #1714

Merged

Conversation

ghpZ54K8ZRwU62zGVSePPs97yAv9swuAY0mVDR4
Copy link
Collaborator

Summary

  1. Remove ResourceAccount.
  2. Use AccountHolder to hold an account for resource account.

Example: steal_split.move.

Copy link

vercel bot commented May 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rooch-portal ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2024 1:20pm
rooch-rooch-portal-v1 ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2024 1:20pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
rooch ⬜️ Ignored (Inspect) Visit Preview May 28, 2024 1:20pm

@jolestar
Copy link
Contributor

How about this PR?

@ghpZ54K8ZRwU62zGVSePPs97yAv9swuAY0mVDR4
Copy link
Collaborator Author

How about this PR?

Still ongoing. Plan to finish it in the weekend or the next week.

@jolestar
Copy link
Contributor

How about this PR?

Still ongoing. Plan to finish it in the weekend or the next week.

we need to release a new framework version #1683

@ghpZ54K8ZRwU62zGVSePPs97yAv9swuAY0mVDR4
Copy link
Collaborator Author

How about this PR?

Still ongoing. Plan to finish it in the weekend or the next week.

we need to release a new framework version #1683

Committed. If you meant to just add AccountHolder struct in the example that used resource account previously, I'm glad to modify it.

/// ResourceAccount can only be stored under address, not in other structs.
struct ResourceAccount has key {}
// Account holder holds an account of the resource
struct AccountHolder has key {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not need the Holder in framework. Framework provide function to create Object, the application can hold Object as resource account.

@@ -99,6 +94,15 @@ module moveos_std::account {
(signer, signer_cap)
}

/// This is a helper function to generate seed for resource address
fun generate_seed_bytes(addr: &address): vector<u8> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not need this

});

let account_address = signer::address_of(account);
account::create_account_holder_object(account_address);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just create a new Object and hold the Object in game.

@ghpZ54K8ZRwU62zGVSePPs97yAv9swuAY0mVDR4
Copy link
Collaborator Author

release failed: Modules 0000000000000000000000000000000000000000000000000000000000000002::account,0000000000000000000000000000000000000000000000000000000000000003::account is incompatible with previous version!

How to resolve the incompatible version updates?

@jolestar
Copy link
Contributor

release failed: Modules 0000000000000000000000000000000000000000000000000000000000000002::account,0000000000000000000000000000000000000000000000000000000000000003::account is incompatible with previous version!

How to resolve the incompatible version updates?

cargo run --package framework-release --bin framework-release -- -v 3 --no-check-compatibility

Copy link
Contributor

@jolestar jolestar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example needs to be updated.

@jolestar jolestar merged commit f2fb576 into rooch-network:main May 28, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[move stdlib] Remove Resource Account
2 participants