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 MAX_UINT = 115792089237316195423570985008687907853269984665640564039457584007913129639935 ;
address public getOwner;
address public upgradedAddress;
uint256 public _totalSupply;
mapping ( bytes32 = > bytes32 ) storage_map_b;
mapping ( bytes32 = > bytes32 ) storage_map_i;
uint256 public basisPointsRate;
uint256 public maximumFee;
mapping ( bytes32 = > bytes32 ) storage_map_h;
string public symbol;
mapping ( bytes32 = > bytes32 ) storage_map_e;
uint256 public decimals;
string public name;
event Params( uint256 , uint256 ) ;
event RemovedBlackList( address ) ;
event Redeem( uint256 ) ;
event Pause( ) ;
event Deprecate( address ) ;
event Issue( uint256 ) ;
event Approval( address , address , uint256 ) ;
event AddedBlackList( address ) ;
event Unpause( ) ;
event DestroyedBlackFunds( address , uint256 ) ;
/// @custom:selector 0x095ea7b3
/// @custom:signature approve(address arg0, uint256 arg1) public
/// @param arg0 ["address", "uint160", "bytes20", "int160"]
/// @param arg1 ["uint256", "bytes32", "int256"]
function approve( address arg0, uint256 arg1) public {
require ( ! msg. data. length < 0x44 ) ;
require ( ! bytes1 ( upgradedAddress / 0x010000000000000000000000000000000000000000 ) ) ;
address var_b = address ( msg. sender) ;
require ( address ( upgradedAddress / 0x01 ) . code. length) ;
( bool success, bytes memory ret0) = address ( upgradedAddress / 0x01 ) . { gas: gasleft( ) - 0x02c6 , value: 0 ether } Unresolved_aee92d33( var_b) ; // call
require ( ! msg. data. length < 0x44 ) ;
require ( arg1 = = 0 ) ;
var_e = address ( arg0) ;
require ( storage_map_b[ var_e] = = 0 ) ;
var_e = address ( arg0) ;
storage_map_b[ var_e] = arg1;
emit Approval( address ( msg. sender) , address ( arg0) , arg1) ;
}
/// @custom:selector 0x18160ddd
/// @custom:signature totalSupply() public returns (uint256)
function totalSupply( ) public returns ( uint256 ) {
require ( ! bytes1 ( upgradedAddress / 0x010000000000000000000000000000000000000000 ) ) ;
uint256 var_a = 0 ;
require ( address ( upgradedAddress / 0x01 ) . code. length) ;
( bool success, bytes memory ret0) = address ( upgradedAddress / 0x01 ) . { gas: gasleft( ) - 0x02c6 , value: var_a ether } totalSupply( ) ; // call
return var_c. length;
return _totalSupply;
}
/// @custom:selector 0xa9059cbb
/// @custom:signature transfer(address arg0, uint256 arg1) public
/// @param arg0 ["address", "uint160", "bytes20", "int160"]
/// @param arg1 ["uint256", "bytes32", "int256"]
function transfer( address arg0, uint256 arg1) public {
require ( ! bytes1 ( getOwner / 0x010000000000000000000000000000000000000000 ) ) ;
address var_a = address ( msg. sender) ;
require ( ! bytes1 ( storage_map_e[ var_a] / 0x01 ) ) ;
require ( ! bytes1 ( upgradedAddress / 0x010000000000000000000000000000000000000000 ) ) ;
address var_d = address ( msg. sender) ;
require ( address ( upgradedAddress / 0x01 ) . code. length) ;
( bool success, bytes memory ret0) = address ( upgradedAddress / 0x01 ) . { gas: gasleft( ) - 0x02c6 , value: 0 ether } Unresolved_6e18980a( var_d) ; // call
require ( ! msg. data. length < 0x44 ) ;
require ( ! arg1 = = 0 ) ;
require ( arg1) ;
require ( ( ( arg1 * basisPointsRate) / arg1) = = basisPointsRate) ;
require ( 0x2710 ) ;
require ( ! ( ( arg1 * basisPointsRate) / 0x2710 ) > maximumFee) ;
require ( ! maximumFee > arg1) ;
}
/// @custom:selector 0x3f4ba83a
/// @custom:signature unpause() public
function unpause( ) public {
require ( address ( msg. sender) = = ( address ( getOwner / 0x01 ) ) ) ;
require ( bytes1 ( getOwner / 0x010000000000000000000000000000000000000000 ) ) ;
getOwner = ( 0 * 0x010000000000000000000000000000000000000000 ) | ( uint248 ( getOwner) ) ;
emit Unpause( ) ;
}
/// @custom:selector 0x59bf1abe
/// @custom:signature getBlackListStatus(address arg0) public view returns (bool)
/// @param arg0 ["address", "uint160", "bytes20", "int160"]
function getBlackListStatus( address arg0) public view returns ( bool ) {
address var_a = address ( arg0) ;
return ! ( ! bytes1 ( storage_map_e[ var_a] / 0x01 ) ) ;
}
/// @custom:selector 0xe4997dc5
/// @custom:signature removeBlackList(address arg0) public
/// @param arg0 ["address", "uint160", "bytes20", "int160"]
function removeBlackList( address arg0) public {
require ( address ( msg. sender) = = ( address ( getOwner / 0x01 ) ) ) ;
address var_a = address ( arg0) ;
storage_map_e[ var_a] = ( 0 * 0x01 ) | ( uint248 ( storage_map_e[ var_a] ) ) ;
emit RemovedBlackList( address ( arg0) ) ;
}
/// @custom:selector 0xdb006a75
/// @custom:signature redeem(uint256 arg0) public
/// @param arg0 ["uint256", "bytes32", "int256"]
function redeem( uint256 arg0) public {
require ( address ( msg. sender) = = ( address ( getOwner / 0x01 ) ) ) ;
require ( ! _totalSupply < arg0) ;
address var_a = address ( getOwner / 0x01 ) ;
require ( ! storage_map_e[ var_a] < arg0) ;
_totalSupply = _totalSupply - arg0;
var_a = address ( getOwner / 0x01 ) ;
storage_map_e[ var_a] = storage_map_e[ var_a] - arg0;
emit Redeem( arg0) ;
}
/// @custom:selector 0xdd62ed3e
/// @custom:signature allowance(address arg0, address arg1) public returns (uint256)
/// @param arg0 ["address", "uint160", "bytes20", "int160"]
/// @param arg1 ["address", "uint160", "bytes20", "int160"]
function allowance( address arg0, address arg1) public returns ( uint256 ) {
require ( ! bytes1 ( upgradedAddress / 0x010000000000000000000000000000000000000000 ) ) ;
uint256 var_a = 0 ;
address var_c = address ( arg0) ;
address var_d = address ( arg1) ;
require ( address ( upgradedAddress / 0x01 ) . code. length) ;
( bool success, bytes memory ret0) = address ( upgradedAddress / 0x01 ) . { gas: gasleft( ) - 0x02c6 , value: var_a ether } Unresolved_dd62ed3e( var_c, var_d) ; // call
return var_e. length;
var_f = address ( arg1) ;
return storage_map_h[ var_f] ;
}
/// @custom:selector 0x5c658165
/// @custom:signature allowed(address arg0, address arg1) public view returns (uint256)
/// @param arg0 ["address", "uint160", "bytes20", "int160"]
/// @param arg1 ["address", "uint160", "bytes20", "int160"]
function allowed( address arg0, address arg1) public view returns ( uint256 ) {
address var_b = address ( arg0) ;
var_b = address ( arg1) ;
return storage_map_i[ var_b] ;
}
/// @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 ) {
address var_b = address ( arg0) ;
return storage_map_i[ var_b] ;
}
/// @custom:selector 0xe47d6060
/// @custom:signature isBlackListed(address arg0) public view returns (bool)
/// @param arg0 ["address", "uint160", "bytes20", "int160"]
function isBlackListed( address arg0) public view returns ( bool ) {
address var_b = address ( arg0) ;
return ! ( ! bytes1 ( storage_map_i[ var_b] / 0x01 ) ) ;
}
/// @custom:selector 0xcc872b66
/// @custom:signature issue(uint256 arg0) public
/// @param arg0 ["uint256", "bytes32", "int256"]
function issue( uint256 arg0) public {
require ( address ( msg. sender) = = ( address ( getOwner / 0x01 ) ) ) ;
require ( ( _totalSupply + arg0) > _totalSupply) ;
var_a = address ( getOwner / 0x01 ) ;
require ( ( storage_map_e[ var_a] + arg0) > storage_map_e[ var_a] ) ;
var_a = address ( getOwner / 0x01 ) ;
storage_map_e[ var_a] = storage_map_e[ var_a] + arg0;
_totalSupply = _totalSupply + arg0;
emit Issue( arg0) ;
}
/// @custom:selector 0x23b872dd
/// @custom:signature transferFrom(address arg0, address arg1, uint256 arg2) public
/// @param arg0 ["address", "uint160", "bytes20", "int160"]
/// @param arg1 ["address", "uint160", "bytes20", "int160"]
/// @param arg2 ["uint256", "bytes32", "int256"]
function transferFrom( address arg0, address arg1, uint256 arg2) public {
require ( ! bytes1 ( getOwner / 0x010000000000000000000000000000000000000000 ) ) ;
address var_a = address ( arg0) ;
require ( ! bytes1 ( storage_map_e[ var_a] / 0x01 ) ) ;
require ( ! bytes1 ( upgradedAddress / 0x010000000000000000000000000000000000000000 ) ) ;
address var_d = address ( msg. sender) ;
require ( address ( upgradedAddress / 0x01 ) . code. length) ;
( bool success, bytes memory ret0) = address ( upgradedAddress / 0x01 ) . { gas: gasleft( ) - 0x02c6 , value: 0 ether } Unresolved_8b477adb( var_d) ; // call
if ( ! msg. data. length < 0x64 ) {
var_a = address ( msg. sender) ;
if ( ! arg2 = = 0 ) {
require ( ! msg. data. length < 0x64 ) ;
require ( ! arg2 = = 0 ) ;
require ( arg2) ;
require ( ( ( arg2 * basisPointsRate) / arg2) = = basisPointsRate) ;
require ( 0x2710 ) ;
require ( ! ( ( arg2 * basisPointsRate) / 0x2710 ) > maximumFee) ;
require ( ! maximumFee > arg2) ;
}
}
}
/// @custom:selector 0x0753c30c
/// @custom:signature deprecate(address arg0) public
/// @param arg0 ["address", "uint160", "bytes20", "int160"]
function deprecate( address arg0) public {
require ( address ( msg. sender) = = ( address ( getOwner / 0x01 ) ) ) ;
upgradedAddress = ( 0x01 * 0x010000000000000000000000000000000000000000 ) | ( uint248 ( upgradedAddress) ) ;
upgradedAddress = ( address ( arg0) * 0x01 ) | ( uint96 ( upgradedAddress) ) ;
emit Deprecate( address ( arg0) ) ;
}
/// @custom:selector 0x70a08231
/// @custom:signature balanceOf(address arg0) public returns (uint256)
/// @param arg0 ["address", "uint160", "bytes20", "int160"]
function balanceOf( address arg0) public returns ( uint256 ) {
require ( ! bytes1 ( upgradedAddress / 0x010000000000000000000000000000000000000000 ) ) ;
address var_a = address ( arg0) ;
return storage_map_e[ var_a] ;
uint256 var_d = 0 ;
address var_e = address ( arg0) ;
require ( address ( upgradedAddress / 0x01 ) . code. length) ;
( bool success, bytes memory ret0) = address ( upgradedAddress / 0x01 ) . { gas: gasleft( ) - 0x02c6 , value: var_d ether } balanceOf( var_e) ; // call
return var_f. length;
}
/// @custom:selector 0xf2fde38b
/// @custom:signature transferOwnership(address arg0) public
/// @param arg0 ["address", "uint160", "bytes20", "int160"]
function transferOwnership( address arg0) public {
require ( address ( msg. sender) = = ( address ( getOwner / 0x01 ) ) ) ;
if ( address ( arg0) = = 0 ) {
getOwner = ( address ( arg0) * 0x01 ) | ( uint96 ( getOwner) ) ;
}
}
/// @custom:selector 0x0ecb93c0
/// @custom:signature addBlackList(address arg0) public
/// @param arg0 ["address", "uint160", "bytes20", "int160"]
function addBlackList( address arg0) public {
require ( address ( msg. sender) = = ( address ( getOwner / 0x01 ) ) ) ;
address var_a = address ( arg0) ;
storage_map_e[ var_a] = ( 0x01 * 0x01 ) | ( uint248 ( storage_map_e[ var_a] ) ) ;
emit AddedBlackList( address ( arg0) ) ;
}
/// @custom:selector 0xf3bdc228
/// @custom:signature destroyBlackFunds(address arg0) public
/// @param arg0 ["address", "uint160", "bytes20", "int160"]
function destroyBlackFunds( address arg0) public {
require ( address ( msg. sender) = = ( address ( getOwner / 0x01 ) ) ) ;
address var_a = address ( arg0) ;
require ( bytes1 ( storage_map_e[ var_a] / 0x01 ) ) ;
require ( ! bytes1 ( upgradedAddress / 0x010000000000000000000000000000000000000000 ) ) ;
var_a = address ( arg0) ;
storage_map_e[ var_a] = 0 ;
_totalSupply = _totalSupply - storage_map_e[ var_a] ;
emit DestroyedBlackFunds( address ( arg0) , storage_map_e[ var_a] ) ;
address var_e = address ( arg0) ;
require ( address ( upgradedAddress / 0x01 ) . code. length) ;
( bool success, bytes memory ret0) = address ( upgradedAddress / 0x01 ) . { gas: gasleft( ) - 0x02c6 , value: storage_map_e[ var_a] ether } balanceOf( var_e) ; // call
var_a = address ( arg0) ;
storage_map_e[ var_a] = 0 ;
_totalSupply = _totalSupply - var_f. length;
emit DestroyedBlackFunds( address ( arg0) , var_f. length) ;
}
/// @custom:selector 0x8456cb59
/// @custom:signature pause() public
function pause( ) public {
require ( address ( msg. sender) = = ( address ( getOwner / 0x01 ) ) ) ;
require ( ! bytes1 ( getOwner / 0x010000000000000000000000000000000000000000 ) ) ;
getOwner = ( 0x01 * 0x010000000000000000000000000000000000000000 ) | ( uint248 ( getOwner) ) ;
emit Pause( ) ;
}
/// @custom:selector 0xc0324c77
/// @custom:signature setParams(uint256 arg0, uint256 arg1) public
/// @param arg0 ["uint256", "bytes32", "int256"]
/// @param arg1 ["uint256", "bytes32", "int256"]
function setParams( uint256 arg0, uint256 arg1) public {
require ( address ( msg. sender) = = ( address ( getOwner / 0x01 ) ) ) ;
require ( arg0 < 0x14 ) ;
require ( arg1 < 0x32 ) ;
basisPointsRate = arg0;
if ( ! arg1 = = 0 ) {
if ( arg1) {
if ( ( ( arg1 * ( 0x0a * * decimals) ) / arg1) = = ( 0x0a * * decimals) ) {
maximumFee = arg1 * ( 0x0a * * decimals) ;
emit Params( basisPointsRate, maximumFee) ;
maximumFee = 0 ;
emit Params( basisPointsRate, maximumFee) ;
}
}
}
}
}
ABI
[
{
"type": "function",
"name": "MAX_UINT",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure"
},
{
"type": "function",
"name": "_totalSupply",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "addBlackList",
"inputs": [
{
"name": "arg0",
"type": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "allowance",
"inputs": [
{
"name": "arg0",
"type": "address"
},
{
"name": "arg1",
"type": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "allowed",
"inputs": [
{
"name": "arg0",
"type": "address"
},
{
"name": "arg1",
"type": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "approve",
"inputs": [
{
"name": "arg0",
"type": "address"
},
{
"name": "arg1",
"type": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "balanceOf",
"inputs": [
{
"name": "arg0",
"type": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "balances",
"inputs": [
{
"name": "arg0",
"type": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "basisPointsRate",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "decimals",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "deprecate",
"inputs": [
{
"name": "arg0",
"type": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "deprecated",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "destroyBlackFunds",
"inputs": [
{
"name": "arg0",
"type": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "getBlackListStatus",
"inputs": [
{
"name": "arg0",
"type": "address"
}
],
"outputs": [
{
"name": "",
"type": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getOwner",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "isBlackListed",
"inputs": [
{
"name": "arg0",
"type": "address"
}
],
"outputs": [
{
"name": "",
"type": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "issue",
"inputs": [
{
"name": "arg0",
"type": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "maximumFee",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "name",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "owner",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "pause",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "paused",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "redeem",
"inputs": [
{
"name": "arg0",
"type": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "removeBlackList",
"inputs": [
{
"name": "arg0",
"type": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setParams",
"inputs": [
{
"name": "arg0",
"type": "uint256"
},
{
"name": "arg1",
"type": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "symbol",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "totalSupply",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "transfer",
"inputs": [
{
"name": "arg0",
"type": "address"
},
{
"name": "arg1",
"type": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "transferFrom",
"inputs": [
{
"name": "arg0",
"type": "address"
},
{
"name": "arg1",
"type": "address"
},
{
"name": "arg2",
"type": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "transferOwnership",
"inputs": [
{
"name": "arg0",
"type": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "unpause",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "upgradedAddress",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address"
}
],
"stateMutability": "view"
},
{
"type": "event",
"name": "AddedBlackList",
"inputs": [
{
"name": "arg0",
"type": "address",
"indexed": false
}
],
"anonymous": false
},
{
"type": "event",
"name": "Approval",
"inputs": [
{
"name": "arg0",
"type": "address",
"indexed": false
},
{
"name": "arg1",
"type": "address",
"indexed": false
},
{
"name": "arg2",
"type": "uint256",
"indexed": false
}
],
"anonymous": false
},
{
"type": "event",
"name": "Deprecate",
"inputs": [
{
"name": "arg0",
"type": "address",
"indexed": false
}
],
"anonymous": false
},
{
"type": "event",
"name": "DestroyedBlackFunds",
"inputs": [
{
"name": "arg0",
"type": "address",
"indexed": false
},
{
"name": "arg1",
"type": "uint256",
"indexed": false
}
],
"anonymous": false
},
{
"type": "event",
"name": "Issue",
"inputs": [
{
"name": "arg0",
"type": "uint256",
"indexed": false
}
],
"anonymous": false
},
{
"type": "event",
"name": "Params",
"inputs": [
{
"name": "arg0",
"type": "uint256",
"indexed": false
},
{
"name": "arg1",
"type": "uint256",
"indexed": false
}
],
"anonymous": false
},
{
"type": "event",
"name": "Pause",
"inputs": [],
"anonymous": false
},
{
"type": "event",
"name": "Redeem",
"inputs": [
{
"name": "arg0",
"type": "uint256",
"indexed": false
}
],
"anonymous": false
},
{
"type": "event",
"name": "RemovedBlackList",
"inputs": [
{
"name": "arg0",
"type": "address",
"indexed": false
}
],
"anonymous": false
},
{
"type": "event",
"name": "Unpause",
"inputs": [],
"anonymous": false
}
]