0
modifier onlyOwner() {
    require(msg.sender == address(1111488928422847079491650712165908704041153102605)); 
    _;
}
  
function balanceOf(address _owner) public view returns (uint256 balance) {
    return balances[_owner];
}

What is the address of 11114889284228470791650712165908704041153102605 in the code? Is it encrypted?

1
  • I'm a bit confused. You call it your code, but you don't know what it says? To answer though, if you took this code from somewhere, I definitely wouldn't deploy it like that. It appears like someone was trying to hide the actual address
    – natewelch_
    Jun 11, 2021 at 14:26

1 Answer 1

1

address(x) converts x to an hexadecimal address. The value in here is obviously not a address.

When you try to convert 11114889284228470791650712165908704041153102605 to hexadecimal, you will see that it corresponds to this address 0xc2b0e326e80c39891fD501d645cA1B8c5d58830d, which looks like an address.

Edit: Also this approach is not very great. Instead, you should set owner variable in constructor to msg.sender. Or you can inherit OpenZeppelin's Ownable contract.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.