Skip to content
Discussion options

You must be logged in to vote

First of all, type signature of coin::deposit is
public fun deposit<CoinType>(account_addr: address, coin: Coin<CoinType>) acquires CoinStore

Types of what you provided are:
&mut holder.balance: &mut Coin<CoinType>, coin: Coin<CoinType>
You should provide address type for account_addr param.

It worked when you provided @box as account_addr arg because @box is an alias for the deployer address in this case.

In Aptos Move, when you deploy a smart contract (Move module), it is published under an Account. "Module" itself doesn't hold APT balance. Account holds "Modules" and "Resources", and APT is one of the "Resources". So, basically your Move module is under the account you used when deploy…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Ghonghito
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
move Questions related to the Move Language
3 participants