Spaces:
Sleeping
Sleeping
Arshit-Verma
feat: Complete SolidityGuard v2.0 with exploit proofs, auto-fix suggestions, multi-agent verification, and advanced reporting
5de1250 Download data/samples/task3/integer_overflow.sol from tanaymitra01/solidityguard-openenv: direct link, hf CLI and curl.
- Browser
- Download file 645 Bytes
-
https://huggingface.co/spaces/tanaymitra01/solidityguard-openenv/resolve/main/data/samples/task3/integer_overflow.sol
- Command line
-
hf download hf://spaces/tanaymitra01/solidityguard-openenv/data/samples/task3/integer_overflow.sol
-
curl -L -o integer_overflow.sol https://huggingface.co/spaces/tanaymitra01/solidityguard-openenv/resolve/main/data/samples/task3/integer_overflow.sol
645 Bytes
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.20; | |
| contract IntegerOverflow { | |
| mapping(address => uint256) public balances; | |
| constructor() { | |
| balances[msg.sender] = 100; | |
| } | |
| function transfer(address to, uint256 amount) external { | |
| // Potential integer overflow/underflow | |
| balances[msg.sender] -= amount; | |
| balances[to] += amount; | |
| // No checks for overflow/underflow | |
| // In older Solidity versions this was critical | |
| } | |
| function mint(address to, uint256 amount) external { | |
| // Potential overflow when adding | |
| balances[to] += amount; | |
| } | |
| } |