SOCI4L

The order you declare them in

Step 1 of 3
0 of 2 goals

Three slots for three small numbers

Count the slots in the grid: three. Every one is a separate write, and a storage write is the most expensive thing a contract does.

None of these needs 256 bits. A fee of 5, a limit of 100, a window of 3600 seconds.

A slot is 256 bits, so two uint64 fit in one with room to spare. Narrow fee and window, and leave limit where it is for now:

uint256 public fee;   ->  uint64 public fee;
uint256 public window; ->  uint64 public window;
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

contract Config {
    uint256 public fee;
    uint256 public limit;
    uint256 public window;

    function update(uint64 f, uint64 l, uint64 w) external {
        fee = f;
        limit = l;
        window = w;
    }
}

Goals

The contract compiles
nothing to compile yet
Down from three slots to two
the contract has not run yet

Contract storage

Write a contract and it will deploy itself here.