Contract 0x7426dBE5207C2b5DaC57d8e55F0959fcD99661D4

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x7acc9fc20aab825fc840ce4ec5e4f091c395667e3a53a6fa462c5f786fce18430x60806040168786842021-09-11 9:14:52385 days 4 hrs agoFantom: Deployer IN  Create: codex0 FTM0.034252313387
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x7acc9fc20aab825fc840ce4ec5e4f091c395667e3a53a6fa462c5f786fce1843168786842021-09-11 9:14:52385 days 4 hrs ago Fantom: Deployer  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
codex

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU LGPLv3 license
/**
 *Submitted for verification at FtmScan.com on 2021-09-11
*/

// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;

contract codex {
    string constant public index = "Base";
    string constant public class = "Random";
    
    function d100(uint _summoner) external view returns (uint) {
        return dn(_summoner, 100);
    }
    
    function d20(uint _summoner) external view returns (uint) {
        return dn(_summoner, 20);
    }
    
    function d12(uint _summoner) external view returns (uint) {
        return dn(_summoner, 12);
    }
    
    function d10(uint _summoner) external view returns (uint) {
        return dn(_summoner, 10);
    }
    
    function d8(uint _summoner) external view returns (uint) {
        return dn(_summoner, 8);
    }
    
    function d6(uint _summoner) external view returns (uint) {
        return dn(_summoner, 6);
    }
    
    function d4(uint _summoner) external view returns (uint) {
        return dn(_summoner, 4);
    }
    
    function dn(uint _summoner, uint _number) public view returns (uint) {
        return _seed(_summoner) % _number;
    }
    
    function _random(string memory input) internal pure returns (uint256) {
        return uint256(keccak256(abi.encodePacked(input)));
    }
    
    function _seed(uint _summoner) internal view returns (uint rand) {
        rand = _random(
            string(
                abi.encodePacked(
                    block.timestamp,
                    blockhash(block.number - 1),
                    _summoner,
                    msg.sender
                )
            )
        );
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"class","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_summoner","type":"uint256"}],"name":"d10","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_summoner","type":"uint256"}],"name":"d100","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_summoner","type":"uint256"}],"name":"d12","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_summoner","type":"uint256"}],"name":"d20","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_summoner","type":"uint256"}],"name":"d4","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_summoner","type":"uint256"}],"name":"d6","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_summoner","type":"uint256"}],"name":"d8","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_summoner","type":"uint256"},{"internalType":"uint256","name":"_number","type":"uint256"}],"name":"dn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"index","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b506103d9806100206000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063438303bf11610066578063438303bf146101325780636d0772d714610145578063952bbefe14610158578063bff852fa1461016b578063e668f6b61461019057600080fd5b80631386fa88146100a357806321183e8d146100c95780632986c0e5146100dc5780632ee41bdd1461010c5780633f9fdf3c1461011f575b600080fd5b6100b66100b13660046102a2565b6101a3565b6040519081526020015b60405180910390f35b6100b66100d73660046102a2565b6101b6565b6100ff604051806040016040528060048152602001634261736560e01b81525081565b6040516100c091906102f9565b6100b661011a3660046102a2565b6101c3565b6100b661012d3660046102bb565b6101cc565b6100b66101403660046102a2565b6101e9565b6100b66101533660046102a2565b6101f6565b6100b66101663660046102a2565b610203565b6100ff6040518060400160405280600681526020016552616e646f6d60d01b81525081565b6100b661019e3660046102a2565b610210565b60006101b08260086101cc565b92915050565b60006101b08260046101cc565b60006101b082600c5b6000816101d88461021d565b6101e29190610381565b9392505050565b60006101b08260146101cc565b60006101b08260646101cc565b60006101b082600a6101cc565b60006101b08260066101cc565b60006101b04261022e60014361032c565b604080516020810193909352904090820152606080820185905233901b6bffffffffffffffffffffffff1916608082015260940160405160208183030381529060405260008160405160200161028491906102dd565b60408051601f19818403018152919052805160209091012092915050565b6000602082840312156102b457600080fd5b5035919050565b600080604083850312156102ce57600080fd5b50508035926020909101359150565b600082516102ef818460208701610351565b9190910192915050565b6020815260008251806020840152610318816040850160208701610351565b601f01601f19169190910160400192915050565b60008282101561034c57634e487b7160e01b600052601160045260246000fd5b500390565b60005b8381101561036c578181015183820152602001610354565b8381111561037b576000848401525b50505050565b60008261039e57634e487b7160e01b600052601260045260246000fd5b50069056fea26469706673582212203d00ef84d1356e631a7d9830d8d5300778af22e592c6755f3154d250bfaee36f64736f6c63430008070033

Deployed ByteCode Sourcemap

59:1544:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;631:99;;;;;;:::i;:::-;;:::i;:::-;;;1697:25:1;;;1685:2;1670:18;631:99:0;;;;;;;;853;;;;;;:::i;:::-;;:::i;81:37::-;;;;;;;;;;;;;;;-1:-1:-1;;;81:37:0;;;;;;;;;;;;:::i;405:101::-;;;;;;:::i;:::-;;:::i;964:121::-;;;;;;:::i;:::-;;:::i;292:101::-;;;;;;:::i;:::-;;:::i;177:103::-;;;;;;:::i;:::-;;:::i;518:101::-;;;;;;:::i;:::-;;:::i;125:39::-;;;;;;;;;;;;;;;-1:-1:-1;;;125:39:0;;;;;742:99;;;;;;:::i;:::-;;:::i;631:::-;682:4;706:16;709:9;720:1;706:2;:16::i;:::-;699:23;631:99;-1:-1:-1;;631:99:0:o;853:::-;904:4;928:16;931:9;942:1;928:2;:16::i;405:101::-;457:4;481:17;484:9;495:2;964:121;1027:4;1070:7;1051:16;1057:9;1051:5;:16::i;:::-;:26;;;;:::i;:::-;1044:33;964:121;-1:-1:-1;;;964:121:0:o;292:101::-;344:4;368:17;371:9;382:2;368;:17::i;177:103::-;230:4;254:18;257:9;268:3;254:2;:18::i;518:101::-;570:4;594:17;597:9;608:2;594;:17::i;742:99::-;793:4;817:16;820:9;831:1;817:2;:16::i;1248:352::-;1302:9;1331:261;1417:15;1465:16;1480:1;1465:12;:16;:::i;:::-;1378:188;;;;;;946:19:1;;;;1455:27:0;;981:12:1;;;974:28;1018:12;;;;1011:28;;;1537:10:0;1073:15:1;;-1:-1:-1;;1069:53:1;1055:12;;;1048:75;1139:13;;1378:188:0;;;;;;;;;;;;1158:7;1220:5;1203:23;;;;;;;;:::i;:::-;;;;-1:-1:-1;;1203:23:0;;;;;;;;;1193:34;;1203:23;1193:34;;;;;1097:139;-1:-1:-1;;1097:139:0:o;14:180:1:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;-1:-1:-1;165:23:1;;14:180;-1:-1:-1;14:180:1:o;199:248::-;267:6;275;328:2;316:9;307:7;303:23;299:32;296:52;;;344:1;341;334:12;296:52;-1:-1:-1;;367:23:1;;;437:2;422:18;;;409:32;;-1:-1:-1;199:248:1:o;452:276::-;583:3;621:6;615:13;637:53;683:6;678:3;671:4;663:6;659:17;637:53;:::i;:::-;706:16;;;;;452:276;-1:-1:-1;;452:276:1:o;1163:383::-;1312:2;1301:9;1294:21;1275:4;1344:6;1338:13;1387:6;1382:2;1371:9;1367:18;1360:34;1403:66;1462:6;1457:2;1446:9;1442:18;1437:2;1429:6;1425:15;1403:66;:::i;:::-;1530:2;1509:15;-1:-1:-1;;1505:29:1;1490:45;;;;1537:2;1486:54;;1163:383;-1:-1:-1;;1163:383:1:o;1733:222::-;1773:4;1801:1;1798;1795:8;1792:131;;;1845:10;1840:3;1836:20;1833:1;1826:31;1880:4;1877:1;1870:15;1908:4;1905:1;1898:15;1792:131;-1:-1:-1;1940:9:1;;1733:222::o;1960:258::-;2032:1;2042:113;2056:6;2053:1;2050:13;2042:113;;;2132:11;;;2126:18;2113:11;;;2106:39;2078:2;2071:10;2042:113;;;2173:6;2170:1;2167:13;2164:48;;;2208:1;2199:6;2194:3;2190:16;2183:27;2164:48;;1960:258;;;:::o;2223:209::-;2255:1;2281;2271:132;;2325:10;2320:3;2316:20;2313:1;2306:31;2360:4;2357:1;2350:15;2388:4;2385:1;2378:15;2271:132;-1:-1:-1;2417:9:1;;2223:209::o

Swarm Source

ipfs://3d00ef84d1356e631a7d9830d8d5300778af22e592c6755f3154d250bfaee36f
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.