sui
sui copied to clipboard
Sui client publish error
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",
}
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.
Is there any corresponding documentation or examples?
Thx.
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?
Yes, documentation on how to split packages.
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.
Thx. Is there any documentation or specifications for developing and using third-party move libraries?
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"