ETH Price: $2,537.47 (+1.16%)

Contract

0xFf2C87b3E7D1613DE5EF914087aF60A3CCC5BEF2
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x61034a61158507182022-10-29 2:25:11730 days ago1667010311IN
 Create: BitDegas
0 ETH0.00197928.41375284

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BitDegas

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
/**
 *Submitted for verification at Etherscan.io on 2022-10-29
*/

// SPDX-License-Identifier: CC-BY-ND-4.0

pragma solidity ^0.8.17;

// SECTION BitWise 

library BitDegas {

    /// Efficient retrieve
    function get_element(uint8 bit_array, uint8 index) public pure returns(uint8 value) {
        return ((bit_array & index) > 0) ? 1 : 0;
    }


    function TrueOrFalse(uint8 boolean_array, uint8 bool_index) public pure returns(bool bool_result) {
        return (boolean_array & bool_index) > 0;
    }

    function setTrue(uint8 boolean_array, uint8 bool_index) public pure returns(uint8 resulting_array){
        return boolean_array | (((boolean_array & bool_index) > 0) ? 1 : 0);
    }

    function setFalse(uint8 boolean_array, uint8 bool_index) public pure returns(uint8 resulting_array){
         return boolean_array & (((boolean_array & bool_index) > 0) ? 1 : 0);
    }

    /// Mathematics

    function addition(uint a, uint b) public pure returns(uint) {
        while(!(b==0)) {
            uint carry = a & b;
            a = a^b;
            b = carry << 1;
        }
        return a;
    }

    function subtraction(uint a, uint b) public pure returns(uint) {
        while(!(b==0)) {
            uint carry = (~a) & b;
            a = a^b;
            b = carry << 1;
        }
        return a;
    }

    function multiply(uint x, uint y) public pure returns (uint) {
        uint reg = 0;
        while (y != 0)
        {
            if (!((y) & uint(1)==0))
            {
                reg += x;
            }
            x <<= 1;
            y >>= 1;
        }
        return reg;
    }


    function division(uint dividend, uint divisor) public pure returns(uint) {
        uint quotient = 0;
        while (dividend >= divisor) {
            dividend -= divisor;
            quotient+=1;
        }

        // Return the value of quotient with the appropriate sign.
        return quotient;
    }
        
}
// !SECTION BitWise

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint8","name":"boolean_array","type":"uint8"},{"internalType":"uint8","name":"bool_index","type":"uint8"}],"name":"TrueOrFalse","outputs":[{"internalType":"bool","name":"bool_result","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"a","type":"uint256"},{"internalType":"uint256","name":"b","type":"uint256"}],"name":"addition","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"dividend","type":"uint256"},{"internalType":"uint256","name":"divisor","type":"uint256"}],"name":"division","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint8","name":"bit_array","type":"uint8"},{"internalType":"uint8","name":"index","type":"uint8"}],"name":"get_element","outputs":[{"internalType":"uint8","name":"value","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"name":"multiply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint8","name":"boolean_array","type":"uint8"},{"internalType":"uint8","name":"bool_index","type":"uint8"}],"name":"setFalse","outputs":[{"internalType":"uint8","name":"resulting_array","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint8","name":"boolean_array","type":"uint8"},{"internalType":"uint8","name":"bool_index","type":"uint8"}],"name":"setTrue","outputs":[{"internalType":"uint8","name":"resulting_array","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"a","type":"uint256"},{"internalType":"uint256","name":"b","type":"uint256"}],"name":"subtraction","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"}]

61034a61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100925760003560e01c806354f363a31161006557806354f363a314610118578063900683d01461012b578063c81c92641461013e578063e00680521461015157600080fd5b80630bf8bebb14610097578063165c4a16146100bf57806323b04d6a146100e05780634fa0514714610105575b600080fd5b6100aa6100a5366004610283565b610164565b60405190151581526020015b60405180910390f35b6100d26100cd3660046102b6565b610173565b6040519081526020016100b6565b6100f36100ee366004610283565b6101aa565b60405160ff90911681526020016100b6565b6100f3610113366004610283565b6101c8565b6100d26101263660046102b6565b6101e9565b6100d26101393660046102b6565b610209565b6100f361014c366004610283565b610223565b6100d261015f3660046102b6565b610244565b60ff8282161615155b92915050565b6000805b82156101a35760018316156101935761019084826102ee565b90505b600193841b939290921c91610177565b9392505050565b60008082841660ff16116101bf5760006101a3565b60019392505050565b60008082841660ff16116101dd5760006101e0565b60015b90921692915050565b60005b8115610202578282189290911660011b906101ec565b5090919050565b60005b811561020257828218921990911660011b9061020c565b60008082841660ff161161023857600061023b565b60015b90921792915050565b6000805b8284106101a3576102598385610301565b93506102666001826102ee565b9050610248565b803560ff8116811461027e57600080fd5b919050565b6000806040838503121561029657600080fd5b61029f8361026d565b91506102ad6020840161026d565b90509250929050565b600080604083850312156102c957600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b8082018082111561016d5761016d6102d8565b8181038181111561016d5761016d6102d856fea2646970667358221220e0623a0ced64f3c674bda4062cea7f82a626f67e3a4c45558c47e94b04dfa65e64736f6c63430008110033

Deployed Bytecode

0x73ff2c87b3e7d1613de5ef914087af60a3ccc5bef230146080604052600436106100925760003560e01c806354f363a31161006557806354f363a314610118578063900683d01461012b578063c81c92641461013e578063e00680521461015157600080fd5b80630bf8bebb14610097578063165c4a16146100bf57806323b04d6a146100e05780634fa0514714610105575b600080fd5b6100aa6100a5366004610283565b610164565b60405190151581526020015b60405180910390f35b6100d26100cd3660046102b6565b610173565b6040519081526020016100b6565b6100f36100ee366004610283565b6101aa565b60405160ff90911681526020016100b6565b6100f3610113366004610283565b6101c8565b6100d26101263660046102b6565b6101e9565b6100d26101393660046102b6565b610209565b6100f361014c366004610283565b610223565b6100d261015f3660046102b6565b610244565b60ff8282161615155b92915050565b6000805b82156101a35760018316156101935761019084826102ee565b90505b600193841b939290921c91610177565b9392505050565b60008082841660ff16116101bf5760006101a3565b60019392505050565b60008082841660ff16116101dd5760006101e0565b60015b90921692915050565b60005b8115610202578282189290911660011b906101ec565b5090919050565b60005b811561020257828218921990911660011b9061020c565b60008082841660ff161161023857600061023b565b60015b90921792915050565b6000805b8284106101a3576102598385610301565b93506102666001826102ee565b9050610248565b803560ff8116811461027e57600080fd5b919050565b6000806040838503121561029657600080fd5b61029f8361026d565b91506102ad6020840161026d565b90509250929050565b600080604083850312156102c957600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b8082018082111561016d5761016d6102d8565b8181038181111561016d5761016d6102d856fea2646970667358221220e0623a0ced64f3c674bda4062cea7f82a626f67e3a4c45558c47e94b04dfa65e64736f6c63430008110033

Deployed Bytecode Sourcemap

95:1854:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;302:156;;;;;;:::i;:::-;;:::i;:::-;;;605:14:1;;598:22;580:41;;568:2;553:18;302:156:0;;;;;;;;1313:298;;;;;;:::i;:::-;;:::i;:::-;;;1039:25:1;;;1027:2;1012:18;1313:298:0;885:185:1;149:143:0;;;;;;:::i;:::-;;:::i;:::-;;;1255:4:1;1243:17;;;1225:36;;1213:2;1198:18;149:143:0;1075:192:1;658:186:0;;;;;;:::i;:::-;;:::i;875:208::-;;;;;;:::i;:::-;;:::i;1091:214::-;;;;;;:::i;:::-;;:::i;466:184::-;;;;;;:::i;:::-;;:::i;1621:315::-;;;;;;:::i;:::-;;:::i;302:156::-;418:32;419:26;;;418:32;;;302:156;;;;;:::o;1313:298::-;1368:4;;1408:175;1415:6;;1408:175;;1464:1;1453:13;;:16;1447:81;;1504:8;1511:1;1504:8;;:::i;:::-;;;1447:81;1548:1;1542:7;;;;1564;;;;;1408:175;;;1600:3;1313:298;-1:-1:-1;;;1313:298:0:o;149:143::-;220:11;274:1;265:5;253:9;:17;252:23;;;251:33;;283:1;251:33;;;279:1;244:40;149:143;-1:-1:-1;;;149:143:0:o;658:186::-;735:21;825:1;811:10;795:13;:26;794:32;;;793:42;;834:1;793:42;;;830:1;793:42;776:60;;;;658:186;-1:-1:-1;;658:186:0:o;875:208::-;929:4;946:111;954:4;;946:111;;1013:3;;;;989:5;;;1044:1;1035:10;;946:111;;;-1:-1:-1;1074:1:0;;875:208;-1:-1:-1;875:208:0:o;1091:214::-;1148:4;1165:114;1173:4;;1165:114;;1235:3;;;;1209:2;1208:8;;;1266:1;1257:10;;1165:114;;466:184;542:21;631:1;617:10;601:13;:26;600:32;;;599:42;;640:1;599:42;;;636:1;599:42;582:60;;;;466:184;-1:-1:-1;;466:184:0:o;1621:315::-;1688:4;;1733:100;1752:7;1740:8;:19;1733:100;;1776:19;1788:7;1776:19;;:::i;:::-;;-1:-1:-1;1810:11:0;1820:1;1810:11;;:::i;:::-;;;1733:100;;14:156:1;80:20;;140:4;129:16;;119:27;;109:55;;160:1;157;150:12;109:55;14:156;;;:::o;175:252::-;239:6;247;300:2;288:9;279:7;275:23;271:32;268:52;;;316:1;313;306:12;268:52;339:27;356:9;339:27;:::i;:::-;329:37;;385:36;417:2;406:9;402:18;385:36;:::i;:::-;375:46;;175:252;;;;;:::o;632:248::-;700:6;708;761:2;749:9;740:7;736:23;732:32;729:52;;;777:1;774;767:12;729:52;-1:-1:-1;;800:23:1;;;870:2;855:18;;;842:32;;-1:-1:-1;632:248:1:o;1272:127::-;1333:10;1328:3;1324:20;1321:1;1314:31;1364:4;1361:1;1354:15;1388:4;1385:1;1378:15;1404:125;1469:9;;;1490:10;;;1487:36;;;1503:18;;:::i;1534:128::-;1601:9;;;1622:11;;;1619:37;;;1636:18;;:::i

Swarm Source

ipfs://e0623a0ced64f3c674bda4062cea7f82a626f67e3a4c45558c47e94b04dfa65e

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ 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.