Closed Braqzen closed 3 weeks ago
This error is expected. StorageMap
does not have the get()
function implemented on Self
.
get()
is implemented on the StorageKey
type: impl<K, V> StorageKey<StorageMap<K, V>>
.
https://github.com/FuelLabs/sway/blob/de242ad1e4d4cc2de98848a29c137cb8d36bc70c/sway-lib-std/src/storage/storage_map.sw#L18
Your struct should look like this:
struct Queue {
queue: StorageKey<StorageMap<u256, b256>>,
}
Forc
0.63.3
Given the import below, the method
get()
(and others) ought to be discoverable on the map. It is in the standard library but it does not find it.Error:
No method named "get" found for type "StorageMap<u256, b256>".