MATIC Price: $0.736191 (+1.36%)
Gas: 35 GWei
 

Overview

MATIC Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo0 MATIC

MATIC Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Value
0x6103c161227450862021-12-20 10:12:20889 days ago1639995140IN
 Create: Utils
0 MATIC0.0091229235

Parent Transaction Hash Block From To Value
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Utils

Compiler Version
v0.5.14+commit.01f1aaa4

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU LGPLv2.1 license
/**
 *Submitted for verification at polygonscan.com on 2021-12-20
*/

pragma solidity 0.5.14;



library Utils{

    function _isETH(address globalConfig, address _token) public view returns (bool) {
        return IConstant(IGlobalConfig(globalConfig).constants()).ETH_ADDR() == _token;
    }

    function getDivisor(address globalConfig, address _token) public view returns (uint256) {
        if(_isETH(globalConfig, _token)) return IConstant(IGlobalConfig(globalConfig).constants()).INT_UNIT();
        return 10 ** uint256(ITokenRegistry(IGlobalConfig(globalConfig).tokenInfoRegistry()).getTokenDecimals(_token));
    }

}

interface IGlobalConfig {
    function constants() external view returns (address);
    function tokenInfoRegistry() external view returns (address);
}

interface IConstant {
    function ETH_ADDR() external view returns (address);
    function INT_UNIT() external view returns (uint256);
}

interface ITokenRegistry {
    function getTokenDecimals(address) external view returns (uint8);
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[{"internalType":"address","name":"globalConfig","type":"address"},{"internalType":"address","name":"_token","type":"address"}],"name":"_isETH","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"globalConfig","type":"address"},{"internalType":"address","name":"_token","type":"address"}],"name":"getDivisor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}]

6103c1610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100405760003560e01c8063d182f33514610045578063f171178e14610085575b600080fd5b6100736004803603604081101561005b57600080fd5b506001600160a01b03813581169160200135166100c7565b60408051918252519081900360200190f35b6100b36004803603604081101561009b57600080fd5b506001600160a01b038135811691602001351661029c565b604080519115158252519081900360200190f35b60006100d3838361029c565b156101b257826001600160a01b03166372de5b2f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561011157600080fd5b505afa158015610125573d6000803e3d6000fd5b505050506040513d602081101561013b57600080fd5b505160408051633630b61360e21b815290516001600160a01b039092169163d8c2d84c91600480820192602092909190829003018186803b15801561017f57600080fd5b505afa158015610193573d6000803e3d6000fd5b505050506040513d60208110156101a957600080fd5b50519050610296565b826001600160a01b0316639895880f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156101eb57600080fd5b505afa1580156101ff573d6000803e3d6000fd5b505050506040513d602081101561021557600080fd5b505160408051633c2e3e7b60e11b81526001600160a01b0385811660048301529151919092169163785c7cf6916024808301926020929190829003018186803b15801561026157600080fd5b505afa158015610275573d6000803e3d6000fd5b505050506040513d602081101561028b57600080fd5b505160ff16600a0a90505b92915050565b6000816001600160a01b0316836001600160a01b03166372de5b2f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102e157600080fd5b505afa1580156102f5573d6000803e3d6000fd5b505050506040513d602081101561030b57600080fd5b505160408051637753f47b60e01b815290516001600160a01b0390921691637753f47b91600480820192602092909190829003018186803b15801561034f57600080fd5b505afa158015610363573d6000803e3d6000fd5b505050506040513d602081101561037957600080fd5b50516001600160a01b031614939250505056fea265627a7a72315820e17f00527f7f97333ff7d3b421db561d70e3be4c97e5ce01e234bd787815059d64736f6c634300050e0032

Deployed Bytecode

0x730e49feefdd3b297a38cd512981a7b33c2b451a9b30146080604052600436106100405760003560e01c8063d182f33514610045578063f171178e14610085575b600080fd5b6100736004803603604081101561005b57600080fd5b506001600160a01b03813581169160200135166100c7565b60408051918252519081900360200190f35b6100b36004803603604081101561009b57600080fd5b506001600160a01b038135811691602001351661029c565b604080519115158252519081900360200190f35b60006100d3838361029c565b156101b257826001600160a01b03166372de5b2f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561011157600080fd5b505afa158015610125573d6000803e3d6000fd5b505050506040513d602081101561013b57600080fd5b505160408051633630b61360e21b815290516001600160a01b039092169163d8c2d84c91600480820192602092909190829003018186803b15801561017f57600080fd5b505afa158015610193573d6000803e3d6000fd5b505050506040513d60208110156101a957600080fd5b50519050610296565b826001600160a01b0316639895880f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156101eb57600080fd5b505afa1580156101ff573d6000803e3d6000fd5b505050506040513d602081101561021557600080fd5b505160408051633c2e3e7b60e11b81526001600160a01b0385811660048301529151919092169163785c7cf6916024808301926020929190829003018186803b15801561026157600080fd5b505afa158015610275573d6000803e3d6000fd5b505050506040513d602081101561028b57600080fd5b505160ff16600a0a90505b92915050565b6000816001600160a01b0316836001600160a01b03166372de5b2f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102e157600080fd5b505afa1580156102f5573d6000803e3d6000fd5b505050506040513d602081101561030b57600080fd5b505160408051637753f47b60e01b815290516001600160a01b0390921691637753f47b91600480820192602092909190829003018186803b15801561034f57600080fd5b505afa158015610363573d6000803e3d6000fd5b505050506040513d602081101561037957600080fd5b50516001600160a01b031614939250505056fea265627a7a72315820e17f00527f7f97333ff7d3b421db561d70e3be4c97e5ce01e234bd787815059d64736f6c634300050e0032

Deployed Bytecode Sourcemap

31:542:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;239:329;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;239:329:0;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;53:178;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;53:178:0;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;239:329;318:7;341:28;348:12;362:6;341;:28::i;:::-;338:101;;;402:12;-1:-1:-1;;;;;388:37:0;;:39;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;388:39:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;388:39:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;388:39:0;378:61;;;-1:-1:-1;;;378:61:0;;;;-1:-1:-1;;;;;378:59:0;;;;;;:61;;;;;388:39;;378:61;;;;;;;;:59;:61;;;5:2:-1;;;;30:1;27;20:12;5:2;378:61:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;378:61:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;378:61:0;;-1:-1:-1;371:68:0;;338:101;500:12;-1:-1:-1;;;;;486:45:0;;:47;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;486:47:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;486:47:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;486:47:0;471:88;;;-1:-1:-1;;;471:88:0;;-1:-1:-1;;;;;471:88:0;;;;;;;;;:80;;;;;;;:88;;;;;486:47;;471:88;;;;;;;:80;:88;;;5:2:-1;;;;30:1;27;20:12;5:2;471:88:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;471:88:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;471:88:0;463:97;;457:2;:103;;-1:-1:-1;239:329:0;;;;;:::o;53:178::-;128:4;217:6;-1:-1:-1;;;;;152:71:0;176:12;-1:-1:-1;;;;;162:37:0;;:39;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;162:39:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;162:39:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;162:39:0;152:61;;;-1:-1:-1;;;152:61:0;;;;-1:-1:-1;;;;;152:59:0;;;;;;:61;;;;;162:39;;152:61;;;;;;;;:59;:61;;;5:2:-1;;;;30:1;27;20:12;5:2;152:61:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;152:61:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;152:61:0;-1:-1:-1;;;;;152:71:0;;;53:178;-1:-1:-1;;;53:178:0:o

Swarm Source

bzzr://e17f00527f7f97333ff7d3b421db561d70e3be4c97e5ce01e234bd787815059d

Block Transaction Gas Used Reward
view all blocks produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.