move
move copied to clipboard
[Bug]chap 5 : address with no value + missing acquires annotation
Hello, when I run the move test for the chap 5 solutions, so basically the same code as in the repo, I get some errors:
┌─ ./sources/BasicCoin.move:1:8
│
1 │ module NamedAddr::BasicCoin {
│ ^^^^^^^^^ address 'NamedAddr' is not assigned a value. Try assigning it a value when calling the compiler
I get multiples address with no value "address 'NamedAddr' is not assigned a value. Try assigning it a value when calling the compiler" so if I change it by @0x3 for example it works but I would like to know how we can "assigning it a value when calling the compiler" ? Maybe with const NamedAddr = @0x3 ?
- the others errors are these :
┌─ ./sources/BasicCoin.move:60:17
│
38 │ public fun balance_of(owner: address): u64 acquires Balance {
│ ------- The call acquires 'NamedAddr::BasicCoin::Balance', but the 'acquires' list for the current function does not contain this type. It must be present in the calling context's acquires list
·
60 │ let balance = balance_of(addr);
│ ^^^^^^^^^^^^^^^^ Invalid call to 'NamedAddr::BasicCoin::balance_of'
So "missing aquires annotation" for each acquires Balance, but Balance is a struct with a key to Coin so I don't get it
Thank you!
Ok I think I understood for the namedaddr but not for the acquires yet