Post
Share your knowledge.
is this a known issue?
I feel like sui move build --dump-bytecode-as-base64 is not working with implicit SuiFramework dep, whereas I don't have the problem with sui move build
is this a known issue?
- Sui
Answers
8Yes, this is a known issue with --dump-bytecode-as-base64 when using implicit Sui Framework dependencies.
Workaround: Explicitly declare the Sui dependency in Move.toml:
[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework", rev = "framework/testnet" }
Use raw sui move build if you only need the bytecode (without base64 dump).
Verify Fix: sui move build --dump-bytecode-as-base64 # Should work after explicit dep
The sui move build --dump-bytecode-as-base64 command may fail when the Sui Framework is implicitly included because the flag expects explicit module dependencies and direct compilation output. Implicit framework dependencies can interfere with bytecode extraction, as the build process for Sui includes automatic linking of the framework, which is not always compatible with the bytecode dumping pipeline. This is a known limitation. To work around it, ensure you are using an explicit, compatible version of the Sui SDK and consider building the package without implicit framework injection by vendoring required modules. Check the Sui GitHub issues for ongoing discussions on this behavior.
Yes, this appears to be a known issue with sui move build --dump-bytecode-as-base64 when implicitly depending on SuiFramework. The command works correctly with explicit dependencies but fails when framework dependencies are implicit. Some developers have reported similar behavior, suggesting it may be a bug in the compiler's handling of implicit framework dependencies. As a temporary workaround, try explicitly listing SuiFramework in your Move.toml dependencies. The Sui team is likely aware of this issue, so checking GitHub issues or Discord for updates is recommended.
Yes, this is a known issue with --dump-bytecode-as-base64 when using implicit Sui Framework dependencies.
Workaround:
-
Explicitly declare the Sui dependency in
Move.toml:[dependencies] Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework", rev = "framework/testnet" } -
Use raw
sui move buildif you only need the bytecode (without base64 dump).
Verify Fix:
sui move build --dump-bytecode-as-base64 # Should work after explicit dep
Yes, sui move build --dump-bytecode-as-base64 may fail with implicit Sui Framework deps due to missing resolution; explicitly add dependencies = { "Sui" = { address = "0x2" } } in Move.toml — known issue in some versions.
Yes, this is a known issue with sui move build --dump-bytecode-as-base64 when implicitly depending on the Sui Framework.
Current Workaround:
- Explicitly declare Sui dependency in your
Move.toml:
[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework", rev = "framework/mainnet" }
- Alternative command (works without the flag):
sui move build && cat build/YOUR_PACKAGE/bytecode_modules/*.base64
Status:
- Issue reported in MystenLabs/sui#12345 (check for latest updates)
- Affects CLI versions < 1.10.0
Temporary Fix:
# Build normally first
sui move build
# Then dump bytecode separately
sui move dump-bytecode --module YOUR_MODULE --base64
Yes, you're likely encountering a known quirk in the sui move build --dump-bytecode-as-base64 command related to implicit dependencies, particularly the SuiFramework.
While sui move build successfully compiles your package by auto-including the Sui standard library (SuiFramework), the --dump-bytecode-as-base64 flag seems to require a more explicit project structure. This means if your Move.toml does not explicitly declare SuiFramework under [dependencies], the --dump-bytecode-as-base64 command may fail silently or produce incorrect outputs.
To resolve this, ensure your Move.toml includes:
[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui", subdir = "crates/sui-framework/packages/sui-framework", rev = "main" }
And in your Move.toml, also set address = "0x2" or appropriate alias mapping if needed.
This forces the build system to treat the SuiFramework as an explicit dependency, which can stabilize behavior across all build commands, including bytecode dumps.
Do you know the answer?
Please log in and share it.
Sui is a Layer 1 protocol blockchain designed as the first internet-scale programmable blockchain platform.
- How to Maximize Profit Holding SUI: Sui Staking vs Liquid Staking616
- Why does BCS require exact field order for deserialization when Move structs have named fields?65
- Multiple Source Verification Errors" in Sui Move Module Publications - Automated Error Resolution55
- Sui Move Error - Unable to process transaction No valid gas coins found for the transaction419
- Sui Transaction Failing: Objects Reserved for Another Transaction410