sources/. The scripts to interact with Modules are listed under
scripts/. And all test files appropriately go under
The project was successfully builtalong with an execution time
/scripts/get_u128.moveand make the following modification:
let _ = Storage::get<u128>(&account);
let A = Storage::get<u128>(&account);.
get_u128file uses external dependencies, the actual error may be buried at the bottom of a list. Scroll to the bottom of the console and you'll find the culprit (Fig.3):
let Aback to a
let _, hit 'Build' and we are back in business.
store_u128()functions. Both of these interact with our
Storageresource, which is defined locally in our
sources/Storage.movefile. We are also going to be using a new demo address
Storagemodule at address
code 102. If we remember from earlier in the tutorial that address
0x1is our example-project's pre-defined
Senderaddress, we can really understand the error message to be read as below:
Storagemodule to see what is going on.
Storageas a module is bound to the
Senderaddress (0x1) as defined locally within the
Storagemodule reveals that error
code 102is a result of nothing being found at the specified address
0x5holds no values by default. Let's now use a script to store a value there.
Sendermay be replaced by other addresses. And in production, all modules will have unique addresses.
0x5and then to retrieve it later.
123u128is now stored under address
0x5, we cannot overwrite what already exists there or replace it with another Storage resource.
0x5, and you can even see it has been deleted as a resource in the previous line, freeing the space for another Storage resource.