sui icon indicating copy to clipboard operation
sui copied to clipboard

Sui client publish error

Open wowok-ai opened this issue 1 year ago • 7 comments
trafficstars

The SUI project has many source files and errors occur when publishing. What are the solutions to this problem?

Error executing transaction: Failure {
    error: "MovePackageTooBig { object_size: 109768, max_object_size: 102400 } in command 0",
}

裁剪旋转

wowok-ai avatar Oct 06 '24 01:10 wowok-ai

The error is quite useful here and it basically tells the user that the package's size is too big. You can read more about these limits here: https://docs.sui.io/concepts/object-model#limits-on-transactions-objects-and-data

You might need to split your package into two smaller packages.

stefan-mysten avatar Oct 06 '24 01:10 stefan-mysten

Is there any corresponding documentation or examples?

Thx.

wowok-ai avatar Oct 06 '24 06:10 wowok-ai

Minimizing macro usage could be another thing to try as macro expansion can lead to large package sizes.

Regarding documentation, you mean documentation on how to split your packages or documentation on errors?

stefan-mysten avatar Oct 06 '24 16:10 stefan-mysten

Yes, documentation on how to split packages.

wowok-ai avatar Oct 07 '24 08:10 wowok-ai

That is mostly up to you as you understand best what your application is trying to achieve, and how you could logically split it up in different packages.

stefan-mysten avatar Oct 07 '24 20:10 stefan-mysten

Thx. Is there any documentation or specifications for developing and using third-party move libraries?

wowok-ai avatar Oct 13 '24 06:10 wowok-ai

After splitting out the 'base' project, the 'base' project was compiled successfully. But an error occurred when compiling the wowok project.

sui move build
> Failed to build Move modules: Name of dependency 'Base' does not match dependency's package name 'base'.
// wowok.toml
[package]
        name = "wowok"
        version = "0.1.2"
        #published-at = "0x98e5209cf5cf31a38ebde562681441d7544f38ee6a879266dc7273160635f6ba"
        
        [dependencies]
        Sui = { local = "../../../sui-mainnet-v1.34.2/crates/sui-framework/packages/sui-framework/"}
        Base = { override = true, local = "../base/"}
  
        [addresses]
        wowok =  "0x0"
        sui =  "0x2"
        base = "0xf4fde417d6c7077cdf09380e628eac3529c5ac78de8c0701843e1986bc20e3b1"
// base.toml
[package]
        name = "base"
        version = "0.0.1"
        
        [dependencies]
        Sui = { local = "../../../sui-mainnet-v1.34.2/crates/sui-framework/packages/sui-framework/"}
  
        [addresses]
        base =  "0x0"
        sui =  "0x2"

wowok-ai avatar Oct 13 '24 07:10 wowok-ai