-
Notifications
You must be signed in to change notification settings - Fork 11.4k
Move Contract Compilation Errors - TreasuryCap, Mint, Burn, and Struct Visibility Issues #21342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank you for opening this issue, a team member will review it shortly. Until then, please do not interact with any users that claim to be from Sui support and do not click on any links! |
Your Sui CLI version is very old. We do not have access to your source code |
[package] [dependencies] [addresses] |
Done |
Does it work after updating your CLI? |
lqx@DESKTOP-D6DNN8E:~/lqx_token$ sui --version Yes, it did work. |
Change these to your Move.toml [package]
name = "lquix_token"
version = "0.0.1"
edition = "2024"
published-at = "0x0"
[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/testnet">
[addresses]
lquix_token = "0x0" |
These are imported by default
|
For the rest, I think you have issues in your Move code. Check the coin module here: https://docs.sui.io/references/framework/sui/coin |
For the rest, I would recommend to go through the move-book: https://move-book.com/ |
I still receive the following error:
|
Delete the Also delete the |
Done, it didn't help. I also tried to deploy the smart contract in movestudio.dev, but it seems there is a server issue. |
I am facing multiple compilation errors while trying to build and deploy a Move smart contract on Sui. The contract is designed to create a token (LQX) with functionalities such as minting, burning, and rebalancing based on a price feed. However, multiple issues are preventing successful compilation.
Steps to Reproduce
Errors Encountered
🔹 1. TreasuryCap Function Missing
Error:
✅ Expected Fix:
create_treasury_cap()
is not available insui::coin
, yet it is needed forTreasuryCap<LQX>
.🔹 2. Struct Declarations Require Visibility Modifiers
Error:
✅ Expected Fix:
Example:
🔹 3. Mint Function Issues (
mint<LQX>
Wrong Arguments)Error:
✅ Expected Fix:
mint<LQX>
use a different number of arguments?mint<LQX>()
expects different parameters than currently used.🔹 4. Burn Function Requires Different Arguments
Error:
✅ Expected Fix:
burn
function be structured?sui::coin::burn()
require?🔹 5. Structs with
drop
Ability Must Have Drop-Able FieldsError:
✅ Expected Fix:
drop
ability?id
field inside objects withdrop
?🔹 6. Transfer Function (
ctx.sender()
Not Supported in Legacy Move)Error:
Expected Fix:
ctx.sender()
?System Information
1.17.0
Legacy
TreasuryCap<LQX>
in Move 2024?ctx.sender()
if Move 2024 is unavailable?mint()
andburn()
expected to have different parameter structures?public struct
visibility?The text was updated successfully, but these errors were encountered: