Skip to content
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

fix: aptos move compile for 0.3.1 #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

munanadi
Copy link

aptos move compile was failing due to improper destructuring of values from coin::initialize from here shown below

    public fun initialize<CoinType>(
        account: &signer,
        name: string::String,
        symbol: string::String,
        decimals: u8,
        monitor_supply: bool,
    ): (BurnCapability<CoinType>, FreezeCapability<CoinType>, MintCapability<CoinType>) {
        initialize_internal(account, name, symbol, decimals, monitor_supply, false)
    }
$ aptos move compile
error[E04007]: incompatible types
    ┌─ /home/aadhi/Desktop/tutorial-lending/sources/lending.move:422:13
    │
422 │         let (btc_cap, btc_burn) = coin::initialize<FakeBTC>(admin, copy name, copy name, 0, false);
    │             ^^^^^^^^^^^^^^^^^^^
    │             │
    │             Invalid value for binding
    │             Expected expression list of length 2: '(_, _)'
    │
    ┌─ /home/aadhi/.move/https___github_com_aptos-labs_aptos-core_git_3910637893b6aed4af73b19a2c429ef717e1ee26/aptos-move/framework/aptos-framework/sources/coin.move:313:8
    │
313 │     ): (BurnCapability<CoinType>, FreezeCapability<CoinType>, MintCapability<CoinType>) {
    │        -------------------------------------------------------------------------------- Given expression list of length 3: '((aptos_framework=0x1)::coin::BurnCapability<(hippo_tutorial=0xA61E1E86E9F596E483283727D2739BA24B919012720648C29380F9CD0A96C11A)::lend2::FakeBTC>, (aptos_framework=0x1)::coin::FreezeCapability<(hippo_tutorial=0xA61E1E86E9F596E483283727D2739BA24B919012720648C29380F9CD0A96C11A)::lend2::FakeBTC>, (aptos_framework=0x1)::coin::MintCapability<(hippo_tutorial=0xA61E1E86E9F596E483283727D2739BA24B919012720648C29380F9CD0A96C11A)::lend2::FakeBTC>)'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant