sui
sui copied to clipboard
The UID must come directly from sui::object::new
Steps to Reproduce Issue
- Prepare any contract
- sui move build
- compilation failed
Expected Result
no errors
Actual Result
System Information
- OS: macOS 12.0.1 (21A559)
- Compiler:
- sui 1.8.0-a583613cb
- sui-move 0.1.0
Thanks for flagging this issue. Could you share a minimal reproducible example in Move code to understand better where this error comes from?
Have similar issue
│
53 │ let self = Random {
│ ╭────────────────────^
54 │ │ id: object::randomness_state(),
│ │ -- -------------------------- Non fresh UID from this position
│ │ │
│ │ The UID must come directly from sui::object::new. Or for tests, it can come from sui::test_scenario::new_object
55 │ │ inner: versioned::create(version, inner, ctx),
56 │ │ };
│ ╰─────────^ Invalid object creation without a newly created UID.
Failed to build Move modules: Compilation error.
https://github.com/MystenLabs/sui/issues/15239
You need to update your Sui version (1.2x.x)!