DECOMPILED SOLIDITY (Heimdall)
VERIFY
// 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 {
uint256 public constant decimals = 18 ;
mapping ( bytes32 = > bytes32 ) storage_map_a;
uint256 public unresolved_18160ddd;
bytes32 store_d;
bytes32 store_c;
event Event_8c5be1e5( ) ;
error ERC20InvalidReceiver( address ) ;
event Transfer( address , address , uint256 ) ;
/// @custom:selector 0x095ea7b3
/// @custom:signature Unresolved_095ea7b3(address arg0, uint256 arg1) public payable returns (bool)
/// @param arg0 ["address", "uint160", "bytes20", "int160"]
/// @param arg1 ["uint256", "bytes32", "int256"]
function Unresolved_095ea7b3( address arg0, uint256 arg1) public payable returns ( bool ) {
require ( arg0 = = ( address ( arg0) ) ) ;
require ( address ( msg. sender) , CustomError_94280d62( ) ) ;
require ( address ( arg0) , CustomError_94280d62( ) ) ;
var_a = address ( arg0) ;
storage_map_a[ var_a] = arg1;
require ( ! 0x01 , CustomError_94280d62( ) ) ;
return 0x01 ;
emit Event_8c5be1e5( address ( msg. sender) , address ( arg0) , arg1) ;
return 0x01 ;
}
/// @custom:selector 0xdd62ed3e
/// @custom:signature Unresolved_dd62ed3e(address arg0) public pure
/// @param arg0 ["address", "uint160", "bytes20", "int160"]
function Unresolved_dd62ed3e( address arg0) public pure {
require ( arg0 = = ( address ( arg0) ) ) ;
}
/// @custom:selector 0xa9059cbb
/// @custom:signature transfer(address arg0, uint256 arg1) public payable returns (bool)
/// @param arg0 ["address", "uint160", "bytes20", "int160"]
/// @param arg1 ["uint256", "bytes32", "int256"]
function transfer( address arg0, uint256 arg1) public payable returns ( bool ) {
require ( arg0 = = ( address ( arg0) ) ) ;
require ( address ( msg. sender) , CustomError_e450d38c( ) ) ;
require ( address ( arg0) , CustomError_e450d38c( ) ) ;
require ( address ( msg. sender) , CustomError_e450d38c( ) ) ;
address var_a = address ( msg. sender) ;
require ( ! ( storage_map_a[ var_a] < arg1) , CustomError_e450d38c( ) ) ;
uint256 var_f = arg1;
var_a = address ( msg. sender) ;
storage_map_a[ var_a] = storage_map_a[ var_a] - arg1;
require ( address ( arg0) , CustomError_ec442f05( ) ) ;
var_a = address ( arg0) ;
storage_map_a[ var_a] = var_f + storage_map_a[ var_a] ;
emit Transfer( address ( msg. sender) , address ( arg0) , arg1) ;
return 0x01 ;
unresolved_18160ddd = unresolved_18160ddd - arg1;
emit Transfer( address ( msg. sender) , address ( arg0) , arg1) ;
return 0x01 ;
require ( ! ( unresolved_18160ddd > ( arg1 + unresolved_18160ddd) ) , CustomError_ec442f05( ) ) ;
}
/// @custom:selector 0x23b872dd
/// @custom:signature Unresolved_23b872dd(address arg0) public pure
/// @param arg0 ["address", "uint160", "bytes20", "int160"]
function Unresolved_23b872dd( address arg0) public pure {
require ( arg0 = = ( address ( arg0) ) ) ;
}
/// @custom:selector 0x70a08231
/// @custom:signature Unresolved_70a08231(address arg0) public view returns (uint256)
/// @param arg0 ["address", "uint160", "bytes20", "int160"]
function Unresolved_70a08231( address arg0) public view returns ( uint256 ) {
require ( arg0 = = ( address ( arg0) ) ) ;
address var_a = address ( arg0) ;
return storage_map_a[ var_a] ;
}
/// @custom:selector 0x06fdde03
/// @custom:signature Unresolved_06fdde03() public view returns (string memory)
function Unresolved_06fdde03( ) public view returns ( string memory ) {
if ( store_c) {
if ( store_c - ( ( store_c > > 0x01 ) < 0x20 ) ) {
uint256 var_c = var_c + ( 0x20 + ( ( ( 0x1f + ( store_c > > 0x01 ) ) / 0x20 ) * 0x20 ) ) ;
if ( store_c) {
if ( store_c - ( ( store_c > > 0x01 ) < 0x20 ) ) {
if ( ! store_c > > 0x01 ) {
if ( 0x1f < ( store_c > > 0x01 ) ) {
var_a = 0x03 ;
if ( ( 0x20 + var_c) + ( store_c > > 0x01 ) > ( 0x20 + ( 0x20 + var_c) ) ) {
return abi. encodePacked( 0x20 , var_c. length) ;
}
}
}
}
}
}
}
}
/// @custom:selector 0x95d89b41
/// @custom:signature Unresolved_95d89b41() public view returns (string memory)
function Unresolved_95d89b41( ) public view returns ( string memory ) {
if ( store_d) {
if ( store_d - ( ( store_d > > 0x01 ) < 0x20 ) ) {
uint256 var_c = var_c + ( 0x20 + ( ( ( 0x1f + ( store_d > > 0x01 ) ) / 0x20 ) * 0x20 ) ) ;
if ( store_d) {
if ( store_d - ( ( store_d > > 0x01 ) < 0x20 ) ) {
if ( ! store_d > > 0x01 ) {
if ( 0x1f < ( store_d > > 0x01 ) ) {
var_a = 0x04 ;
if ( ( 0x20 + var_c) + ( store_d > > 0x01 ) > ( 0x20 + ( 0x20 + var_c) ) ) {
return abi. encodePacked( 0x20 , var_c. length) ;
}
}
}
}
}
}
}
}
}
ABI
[
{
"type": "function",
"name": "Unresolved_06fdde03",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "Unresolved_095ea7b3",
"inputs": [
{
"name": "arg0",
"type": "address"
},
{
"name": "arg1",
"type": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool"
}
],
"stateMutability": "payable"
},
{
"type": "function",
"name": "Unresolved_18160ddd",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "Unresolved_23b872dd",
"inputs": [
{
"name": "arg0",
"type": "address"
}
],
"outputs": [],
"stateMutability": "pure"
},
{
"type": "function",
"name": "Unresolved_70a08231",
"inputs": [
{
"name": "arg0",
"type": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "Unresolved_95d89b41",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "Unresolved_dd62ed3e",
"inputs": [
{
"name": "arg0",
"type": "address"
}
],
"outputs": [],
"stateMutability": "pure"
},
{
"type": "function",
"name": "decimals",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure"
},
{
"type": "function",
"name": "transfer",
"inputs": [
{
"name": "arg0",
"type": "address"
},
{
"name": "arg1",
"type": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool"
}
],
"stateMutability": "payable"
},
{
"type": "event",
"name": "Event_8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
"inputs": [],
"anonymous": false
},
{
"type": "event",
"name": "Transfer",
"inputs": [
{
"name": "arg0",
"type": "address",
"indexed": false
},
{
"name": "arg1",
"type": "address",
"indexed": false
},
{
"name": "arg2",
"type": "uint256",
"indexed": false
}
],
"anonymous": false
},
{
"type": "error",
"name": "ERC20InsufficientBalance",
"inputs": [
{
"name": "arg0",
"type": "address"
},
{
"name": "arg1",
"type": "uint256"
},
{
"name": "arg2",
"type": "uint256"
}
]
},
{
"type": "error",
"name": "ERC20InvalidApprover",
"inputs": [
{
"name": "arg0",
"type": "address"
}
]
},
{
"type": "error",
"name": "ERC20InvalidReceiver",
"inputs": [
{
"name": "arg0",
"type": "address"
}
]
},
{
"type": "error",
"name": "ERC20InvalidSender",
"inputs": [
{
"name": "arg0",
"type": "address"
}
]
},
{
"type": "error",
"name": "ERC20InvalidSpender",
"inputs": [
{
"name": "arg0",
"type": "address"
}
]
}
]