sui icon indicating copy to clipboard operation
sui copied to clipboard

The UID must come directly from sui::object::new

Open TheStarBoys opened this issue 2 years ago • 3 comments
trafficstars

Steps to Reproduce Issue

  1. Prepare any contract
  2. sui move build
  3. compilation failed

Expected Result

no errors

Actual Result

image

System Information

  • OS: macOS 12.0.1 (21A559)
  • Compiler:
    • sui 1.8.0-a583613cb
    • sui-move 0.1.0

TheStarBoys avatar Oct 08 '23 06:10 TheStarBoys

Thanks for flagging this issue. Could you share a minimal reproducible example in Move code to understand better where this error comes from?

stefan-mysten avatar Oct 19 '23 16:10 stefan-mysten

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.

inanisvitae avatar Nov 30 '23 18:11 inanisvitae

https://github.com/MystenLabs/sui/issues/15239

qiaopengjun5162 avatar Dec 08 '23 10:12 qiaopengjun5162

You need to update your Sui version (1.2x.x)!

stefan-mysten avatar Mar 28 '24 01:03 stefan-mysten