Skip to content

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