SOCI4L

Say no

Step 1 of 3
0 of 2 goals

Refuse a pointless deposit

First line of deposit:

require(amount > 0, "amount must be positive");

Three calls run: 40, then 0, then 60. The middle one is now rejected.

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

contract Vault {
    uint256 public total;

    function deposit(uint256 amount) external {
        total += amount;
    }
}

Goals

The contract compiles
nothing to compile yet
Reject it with "amount must be positive"
the contract has not run yet

Contract storage

Write a contract and it will deploy itself here.