No LLM evaluation was recorded.
Score: 95/100
All seven externally reachable functions (setBalance, setOwner, register, getBalance and the three auto-generated getters) are recovered with correct storage slot assignment (balances=0x00, owners=0x01, registered=0x02) and correct mapping keying. Writes and reads match the original state changes exactly, including the masked sub-word stores for the address and bool mappings. Only mutability annotation and some artifact noise differ.
@@ -1,0 +1,86 @@+// SPDX-License-Identifier: MIT+pragma solidity >=0.8.0;++/// @title Decompiled Contract+/// @author Jonathan Becker <jonathan@jbecker.dev>+/// @custom:version heimdall-rs v0.9.2+///+/// @notice This contract was decompiled using the heimdall-rs decompiler.+/// It was generated directly by tracing the EVM opcodes from this contract.+/// As a result, it may not compile or even be valid solidity code.+/// Despite this, it should be obvious what each function does. Overall+/// logic should have been preserved throughout decompiling.+///+/// @custom:github You can find the open-source decompiler here:+/// https://heimdall.rs++contract DecompiledContract {+ mapping(address => uint256) storage_map_b; // storage slot: 0x00+ mapping(uint256 => bytes32) storage_map_a; // storage slot: 0x01+ mapping(address => bytes32) storage_map_c; // storage slot: 0x02+ + + /// @custom:selector 0x7fd39247+ /// @custom:signature setOwner(uint256 arg0, address arg1) public payable+ /// @param arg0 ["uint256", "bytes32", "int256"]+ /// @param arg1 ["address", "uint160", "bytes20", "int160"]+ function setOwner(uint256 arg0, address arg1) public payable {+ require(0x04 + (msg.data.length - 0x04) - 0x04 >= 0x40);+ require(true);+ storage_map_a[arg0] = arg1 | 0xffffffffffffffffffffffff0000000000000000000000000000000000000000 & storage_map_a[arg0];+ }+ + /// @custom:selector 0xe30443bc+ /// @custom:signature setBalance(address arg0, uint256 arg1) public payable+ /// @param arg0 ["address", "uint160", "bytes20", "int160"]+ /// @param arg1 ["uint256", "bytes32", "int256"]+ function setBalance(address arg0, uint256 arg1) public payable {+ require(0x04 + (msg.data.length - 0x04) - 0x04 >= 0x40);+ require(true);+ storage_map_b[arg0] = arg1;+ }+ + /// @custom:selector 0x4420e486+ /// @custom:signature register(address arg0) public payable+ /// @param arg0 ["address", "uint160", "bytes20", "int160"]+ function register(address arg0) public payable {+ require(0x04 + (msg.data.length - 0x04) - 0x04 >= 0x20);+ require(true);+ storage_map_c[arg0] = 0x01 | 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00 & storage_map_c[arg0];+ }+ + /// @custom:selector 0x27e235e3+ /// @custom:signature balances(address arg0) public view returns (uint256)+ /// @param arg0 ["address", "uint160", "bytes20", "int160"]+ function balances(address arg0) public view returns (uint256) {+ require(0x04 + (msg.data.length - 0x04) - 0x04 >= 0x20);+ require(true);+ return storage_map_b[arg0];+ }+ + /// @custom:selector 0xf8b2cb4f+ /// @custom:signature getBalance(address arg0) public view returns (uint256)+ /// @param arg0 ["address", "uint160", "bytes20", "int160"]+ function getBalance(address arg0) public view returns (uint256) {+ require(0x04 + (msg.data.length - 0x04) - 0x04 >= 0x20);+ require(true);+ return storage_map_b[arg0];+ }+ + /// @custom:selector 0xb2dd5c07+ /// @custom:signature registered(address arg0) public view returns (bool)+ /// @param arg0 ["address", "uint160", "bytes20", "int160"]+ function registered(address arg0) public view returns (bool) {+ require(0x04 + (msg.data.length - 0x04) - 0x04 >= 0x20);+ require(true);+ return storage_map_c[arg0].field_0;+ }+ + /// @custom:selector 0x025e7c27+ /// @custom:signature owners(uint256 arg0) public view returns (address)+ /// @param arg0 ["uint256", "bytes32", "int256"]+ function owners(uint256 arg0) public view returns (address) {+ require(0x04 + (msg.data.length - 0x04) - 0x04 >= 0x20);+ return storage_map_a[arg0].field_0.field_0;+ }+}