SOCI4L

A number that survives

Step 1 of 3
0 of 2 goals

Give it something to remember

Add a state variable inside the contract:

uint256 public total;

Watch the right panel. A storage slot appears, labelled with the name you just typed. That slot is where the value lives between transactions.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

contract Vault {
    // Your state goes here.
}

Goals

The contract compiles
nothing to compile yet
Declare `uint256 total`
no state variables declared yet

Contract storage

Write a contract and it will deploy itself here.