ETH Price: $3,645.69 (+10.21%)

Contract

0xb4Da52336092Db22fe8e036866d59C6488604f89
 

Multichain Info

1 address found via
Transaction Hash
Method
Block
From
To
Exec Transaction212419172024-11-22 7:55:595 days ago1732262159IN
0xb4Da5233...488604f89
0 ETH0.00113469.82511814
Exec Transaction212342562024-11-21 6:16:116 days ago1732169771IN
0xb4Da5233...488604f89
0 ETH0.001325219.72009443
Exec Transaction212342062024-11-21 6:06:116 days ago1732169171IN
0xb4Da5233...488604f89
0 ETH0.00053589.83936657
Transfer212176802024-11-18 22:45:599 days ago1731969959IN
0xb4Da5233...488604f89
0.04678212 ETH0.0003000210.97821899
Transfer211746812024-11-12 22:46:3515 days ago1731451595IN
0xb4Da5233...488604f89
0.15167998 ETH0.0007864228.77617937
Transfer211746812024-11-12 22:46:3515 days ago1731451595IN
0xb4Da5233...488604f89
1 wei0.063242722,314.125
Transfer208812472024-10-02 23:57:1156 days ago1727913431IN
0xb4Da5233...488604f89
0.03687368 ETH0.00011874.34370316
Transfer206360512024-08-29 18:32:3590 days ago1724956355IN
0xb4Da5233...488604f89
0.1893259 ETH0.000065842.40942347
Exec Transaction203783182024-07-24 18:53:47126 days ago1721847227IN
0xb4Da5233...488604f89
0 ETH0.000782299
Transfer203721132024-07-23 22:06:35127 days ago1721772395IN
0xb4Da5233...488604f89
27.45 ETH0.000106543.8985333
Exec Transaction196267482024-04-10 17:34:11231 days ago1712770451IN
0xb4Da5233...488604f89
0 ETH0.0021672735
Exec Transaction196260412024-04-10 15:12:11231 days ago1712761931IN
0xb4Da5233...488604f89
0 ETH0.0021732935
Transfer195398592024-03-29 13:08:23243 days ago1711717703IN
0xb4Da5233...488604f89
1 wei0.01984085726
Exec Transaction187421902023-12-08 14:39:11355 days ago1702046351IN
0xb4Da5233...488604f89
0 ETH0.0075771787
Exec Transaction186286892023-11-22 17:13:11371 days ago1700673191IN
0xb4Da5233...488604f89
0 ETH0.0062882255.97697323
Exec Transaction186286802023-11-22 17:11:23371 days ago1700673083IN
0xb4Da5233...488604f89
0 ETH0.0055401463.61107678
Exec Transaction185353802023-11-09 15:47:35384 days ago1699544855IN
0xb4Da5233...488604f89
0 ETH0.01849166125.20253901
Transfer184151272023-10-23 19:43:11401 days ago1698090191IN
0xb4Da5233...488604f89
10.50120537 ETH0.0010043836.75170211
Exec Transaction183710142023-10-17 15:33:47407 days ago1697556827IN
0xb4Da5233...488604f89
0 ETH0.0014849315.31581999
Exec Transaction183709672023-10-17 15:24:23407 days ago1697556263IN
0xb4Da5233...488604f89
0 ETH0.0028510312.89169714
Transfer170733812023-04-18 11:50:35589 days ago1681818635IN
0xb4Da5233...488604f89
38 ETH0.0011469341.96755775

Latest 23 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
212419512024-11-22 8:02:475 days ago1732262567
0xb4Da5233...488604f89
39.978119 ETH
212419172024-11-22 7:55:595 days ago1732262159
0xb4Da5233...488604f89
119.99 ETH
212342742024-11-21 6:19:476 days ago1732169987
0xb4Da5233...488604f89
39.989279 ETH
212342562024-11-21 6:16:116 days ago1732169771
0xb4Da5233...488604f89
0.01 ETH
203803322024-07-25 1:39:47125 days ago1721871587
0xb4Da5233...488604f89
7.25 ETH
203783182024-07-24 18:53:47126 days ago1721847227
0xb4Da5233...488604f89
32.1 ETH
196267482024-04-10 17:34:11231 days ago1712770451
0xb4Da5233...488604f89
44 ETH
196260412024-04-10 15:12:11231 days ago1712761931
0xb4Da5233...488604f89
10.999 ETH
187421902023-12-08 14:39:11355 days ago1702046351
0xb4Da5233...488604f89
1.56611161 ETH
186286892023-11-22 17:13:11371 days ago1700673191
0xb4Da5233...488604f89
1.55904613 ETH
186286892023-11-22 17:13:11371 days ago1700673191
0xb4Da5233...488604f89
0.89956366 ETH
186286892023-11-22 17:13:11371 days ago1700673191
0xb4Da5233...488604f89
1.65948247 ETH
186286802023-11-22 17:11:23371 days ago1700673083
0xb4Da5233...488604f89
1.06396333 ETH
185353802023-11-09 15:47:35384 days ago1699544855
0xb4Da5233...488604f89
1.94252238 ETH
185353802023-11-09 15:47:35384 days ago1699544855
0xb4Da5233...488604f89
1.99049312 ETH
185353802023-11-09 15:47:35384 days ago1699544855
0xb4Da5233...488604f89
2.81498237 ETH
185353802023-11-09 15:47:35384 days ago1699544855
0xb4Da5233...488604f89
3.25046166 ETH
184346582023-10-26 13:22:35398 days ago1698326555
0xb4Da5233...488604f89
0.011 ETH
183710142023-10-17 15:33:47407 days ago1697556827
0xb4Da5233...488604f89
0.5 ETH
183709672023-10-17 15:24:23407 days ago1697556263
0xb4Da5233...488604f89
0.07005572 ETH
183709672023-10-17 15:24:23407 days ago1697556263
0xb4Da5233...488604f89
12.75598375 ETH
171679732023-05-01 19:12:47576 days ago1682968367
0xb4Da5233...488604f89
119.6 ETH
170472542023-04-14 18:47:23593 days ago1681498043  Contract Creation0 ETH
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xDaB5dc22...0ba42d2a6
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
GnosisSafeProxy

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, GNU LGPLv3 license
/**
 *Submitted for verification at Etherscan.io on 2021-07-09
*/

// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;

/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain
/// @author Richard Meissner - <[email protected]>
interface IProxy {
    function masterCopy() external view returns (address);
}

/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.
/// @author Stefan George - <[email protected]>
/// @author Richard Meissner - <[email protected]>
contract GnosisSafeProxy {
    // singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.
    // To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`
    address internal singleton;

    /// @dev Constructor function sets address of singleton contract.
    /// @param _singleton Singleton address.
    constructor(address _singleton) {
        require(_singleton != address(0), "Invalid singleton address provided");
        singleton = _singleton;
    }

    /// @dev Fallback function forwards all transactions and returns all received return data.
    fallback() external payable {
        // solhint-disable-next-line no-inline-assembly
        assembly {
            let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)
            // 0xa619486e == keccak("masterCopy()"). The value is right padded to 32-bytes with 0s
            if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {
                mstore(0, _singleton)
                return(0, 0x20)
            }
            calldatacopy(0, 0, calldatasize())
            let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)
            returndatacopy(0, 0, returndatasize())
            if eq(success, 0) {
                revert(0, returndatasize())
            }
            return(0, returndatasize())
        }
    }
}

/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @author Stefan George - <[email protected]>
contract GnosisSafeProxyFactory {
    event ProxyCreation(GnosisSafeProxy proxy, address singleton);

    /// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
    /// @param singleton Address of singleton contract.
    /// @param data Payload for message call sent to new proxy contract.
    function createProxy(address singleton, bytes memory data) public returns (GnosisSafeProxy proxy) {
        proxy = new GnosisSafeProxy(singleton);
        if (data.length > 0)
            // solhint-disable-next-line no-inline-assembly
            assembly {
                if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) {
                    revert(0, 0)
                }
            }
        emit ProxyCreation(proxy, singleton);
    }

    /// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.
    function proxyRuntimeCode() public pure returns (bytes memory) {
        return type(GnosisSafeProxy).runtimeCode;
    }

    /// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
    function proxyCreationCode() public pure returns (bytes memory) {
        return type(GnosisSafeProxy).creationCode;
    }

    /// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer.
    ///      This method is only meant as an utility to be called from other methods
    /// @param _singleton Address of singleton contract.
    /// @param initializer Payload for message call sent to new proxy contract.
    /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
    function deployProxyWithNonce(
        address _singleton,
        bytes memory initializer,
        uint256 saltNonce
    ) internal returns (GnosisSafeProxy proxy) {
        // If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it
        bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));
        bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));
        // solhint-disable-next-line no-inline-assembly
        assembly {
            proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)
        }
        require(address(proxy) != address(0), "Create2 call failed");
    }

    /// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
    /// @param _singleton Address of singleton contract.
    /// @param initializer Payload for message call sent to new proxy contract.
    /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
    function createProxyWithNonce(
        address _singleton,
        bytes memory initializer,
        uint256 saltNonce
    ) public returns (GnosisSafeProxy proxy) {
        proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
        if (initializer.length > 0)
            // solhint-disable-next-line no-inline-assembly
            assembly {
                if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) {
                    revert(0, 0)
                }
            }
        emit ProxyCreation(proxy, _singleton);
    }

    /// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction
    /// @param _singleton Address of singleton contract.
    /// @param initializer Payload for message call sent to new proxy contract.
    /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
    /// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized.
    function createProxyWithCallback(
        address _singleton,
        bytes memory initializer,
        uint256 saltNonce,
        IProxyCreationCallback callback
    ) public returns (GnosisSafeProxy proxy) {
        uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback)));
        proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback);
        if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce);
    }

    /// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce`
    ///      This method is only meant for address calculation purpose when you use an initializer that would revert,
    ///      therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory.
    /// @param _singleton Address of singleton contract.
    /// @param initializer Payload for message call sent to new proxy contract.
    /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
    function calculateCreateProxyWithNonceAddress(
        address _singleton,
        bytes calldata initializer,
        uint256 saltNonce
    ) external returns (GnosisSafeProxy proxy) {
        proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
        revert(string(abi.encodePacked(proxy)));
    }
}

interface IProxyCreationCallback {
    function proxyCreated(
        GnosisSafeProxy proxy,
        address _singleton,
        bytes calldata initializer,
        uint256 saltNonce
    ) external;
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_singleton","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"stateMutability":"payable","type":"fallback"}]

Deployed Bytecode

0x608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033

Deployed Bytecode Sourcemap

524:1528:0:-:0;;;1376:42;1372:1;1366:8;1362:57;1556:66;1552:1;1539:15;1536:87;1533:2;;;1653:10;1650:1;1643:21;1692:4;1689:1;1682:15;1533:2;1745:14;1742:1;1739;1726:34;1843:1;1840;1824:14;1821:1;1809:10;1802:5;1789:56;1880:16;1877:1;1874;1859:38;1926:1;1917:7;1914:14;1911:2;;;1958:16;1955:1;1948:27;1911:2;2014:16;2011:1;2004:27

Swarm Source

ipfs://d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b9552

 Latest 25 blocks (From a total of 191 blocks with 2.78 Ether produced)

Block Transaction Difficulty Gas Used Reward
212546102024-11-24 2:26:353 days ago1732415195950.00 TH6,702,650 (22.34%)
0.015601319162933235 ETH
212539702024-11-24 0:18:114 days ago17324074911020.00 TH16,321,703 (54.41%)
0.007779743243734393 ETH
212484912024-11-23 5:57:234 days ago17323414431190.00 TH8,152,070 (27.17%)
0.005760770740872886 ETH
212376712024-11-21 17:43:116 days ago1732210991990.00 TH6,591,760 (21.97%)
0.007809779490770624 ETH
212180082024-11-18 23:51:479 days ago1731973907940.00 TH12,060,813 (40.20%)
0.014881885987646586 ETH
211854472024-11-14 10:50:1113 days ago17315814111240.00 TH7,193,860 (23.98%)
0.013134479293841646 ETH
211669512024-11-11 20:52:4716 days ago17313583671010.00 TH7,761,705 (25.87%)
0.010940535548923202 ETH
211275422024-11-06 8:53:1121 days ago1730883191810.00 TH5,380,324 (17.93%)
0.010610432261074751 ETH
211221672024-11-05 14:52:4722 days ago1730818367980.00 TH5,601,365 (18.67%)
0.009634987308133289 ETH
210727172024-10-29 17:14:3529 days ago17302220751150.00 TH9,708,562 (32.36%)
0.01898488194995753 ETH
210486432024-10-26 8:35:4732 days ago1729931747870.00 TH5,588,896 (18.63%)
0.007432234201910562 ETH
210446812024-10-25 19:20:1133 days ago17298840111220.00 TH9,006,124 (30.02%)
0.015050779749095991 ETH
210413702024-10-25 8:15:3533 days ago1729844135880.00 TH8,452,557 (28.18%)
0.006313289305608556 ETH
210349022024-10-24 10:36:4734 days ago1729766207820.00 TH9,926,540 (33.09%)
0.011584191178738788 ETH
210219552024-10-22 15:16:1136 days ago1729610171970.00 TH7,082,995 (23.61%)
0.008280178255523158 ETH
210036672024-10-20 2:01:1138 days ago17293896711030.00 TH5,148,409 (17.16%)
0.004522390253831105 ETH
209309802024-10-09 22:19:1149 days ago1728512351960.00 TH6,210,703 (20.70%)
0.012033542006230774 ETH
209299222024-10-09 18:46:4749 days ago1728499607830.00 TH4,818,190 (16.06%)
0.008224060540387481 ETH
209206042024-10-08 11:36:4750 days ago1728387407970.00 TH6,093,167 (20.31%)
0.025751545286934759 ETH
209122042024-10-07 7:31:3551 days ago17282862951130.00 TH9,795,938 (32.65%)
0.013444913261351512 ETH
209033632024-10-06 1:55:5952 days ago17281797591190.00 TH7,438,017 (24.79%)
0.011081583317011023 ETH
208764932024-10-02 8:03:1156 days ago17278561911110.00 TH6,345,389 (21.15%)
0.005594535149033876 ETH
208717472024-10-01 16:10:1157 days ago17277990111420.00 TH7,735,959 (25.79%)
0.014619825237469575 ETH
208611982024-09-30 4:53:1158 days ago1727671991650.00 TH5,139,536 (17.13%)
0.005872142750365309 ETH
208423442024-09-27 13:45:2361 days ago1727444723980.00 TH5,913,465 (19.71%)
0.011490522935572865 ETH
View All Blocks Produced

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

Latest 25 from a total of 1315 withdrawals (106.598776409 ETH withdrawn)

Validator Index Block Amount
270096212500932024-11-23 11:18:234 days ago17323607030.019492564 ETH
270095212500932024-11-23 11:18:234 days ago17323607030.01952974 ETH
270094212500932024-11-23 11:18:234 days ago17323607030.019550537 ETH
270093212500932024-11-23 11:18:234 days ago17323607030.06351338 ETH
270092212500932024-11-23 11:18:234 days ago17323607030.019518272 ETH
270091212500932024-11-23 11:18:234 days ago17323607030.019518574 ETH
270090212500932024-11-23 11:18:234 days ago17323607030.019523933 ETH
270089212500932024-11-23 11:18:234 days ago17323607030.019518575 ETH
270088212500932024-11-23 11:18:234 days ago17323607030.019495023 ETH
270087212500932024-11-23 11:18:234 days ago17323607030.019486598 ETH
270086212500932024-11-23 11:18:234 days ago17323607030.019532469 ETH
270085212500932024-11-23 11:18:234 days ago17323607030.019498054 ETH
270084212500932024-11-23 11:18:234 days ago17323607030.019501993 ETH
270083212500932024-11-23 11:18:234 days ago17323607030.019491496 ETH
270082212500932024-11-23 11:18:234 days ago17323607030.019464283 ETH
270081212500922024-11-23 11:18:114 days ago17323606910.019489226 ETH
270080212500922024-11-23 11:18:114 days ago17323606910.019503842 ETH
270079212500922024-11-23 11:18:114 days ago17323606910.019493198 ETH
270078212500922024-11-23 11:18:114 days ago17323606910.019507041 ETH
270077212500922024-11-23 11:18:114 days ago17323606910.019493758 ETH
270076212500922024-11-23 11:18:114 days ago17323606910.019516948 ETH
270075212500922024-11-23 11:18:114 days ago17323606910.0195163 ETH
270074212500922024-11-23 11:18:114 days ago17323606910.019491844 ETH
270073212500922024-11-23 11:18:114 days ago17323606910.019520336 ETH
270072212500922024-11-23 11:18:114 days ago17323606910.019504752 ETH
View All Withdrawals

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

`; } let ensZeroWidthWarningHtml = ""; if ($("#hdnIsEnsContainZeroWidthChars").val() == "true") { ensZeroWidthWarningHtml = `
${zeroWidthWarningMessage} Check the actual text at ENS.
`; } const contentHtml = `
Additional Info
Full Name:
ENS Name


Note:
  • Name tag is displayed due to forward and reverse resolution. Find out more.
  • A Domain Name is not necessarily held by a person popularly associated with the name.
${ensUnicodeWarningHtml} ${ensZeroWidthWarningHtml}
`; $('#ensName').popover({ html: true, content: contentHtml, trigger: 'manual' }); $('#ensName').click(function (event) { $("#ensName").popover('toggle'); event.stopPropagation(); }); $('#ensName').on('shown.bs.popover', async () => { //disable tooltip when hovering over ens name in the main page $("[rel='tooltipEns']").each(function () { $(this).tooltip('hide'); $(this).tooltip('disable'); }); //call ajax here to get result if (!otherENSNamesHtml) { const resolvedAddressesModel = await getEnsResolvedAddress($("#hdnAddress").val(), $("#hdnEnsText").val()); otherENSNamesHtml = generateEnsPopoverGrid(resolvedAddressesModel.d); if (!otherENSNamesHtml) { otherENSNamesHtml = "There are no other names resolving to this address." } } $(".popOverEnsOwnedAddressTable").html(otherENSNamesHtml); $("#divENSDisplayName").html(ensDisplayName); $("[data-bs-toggle='tooltip']").tooltip(); }); $('#ensName').on('hidden.bs.popover', () => { $("[rel='tooltipEns']").each(function () { $(this).tooltip('enable'); }); }); $('#ensName').on('hide.bs.popover', () => { $("[data-bs-toggle='tooltip']").tooltip('hide'); }); $(document).click(function () { $("#ensName").popover('hide'); }) } async function getEnsResolvedAddress(address, currentEnsText) { try { const requestModel = { "lookupAddress": address, "primaryDomainName": currentEnsText, "provider": "ENS" }; const response = await $.ajax({ url: "/name-lookup-search.aspx/GetOtherDomainNameForAddress", type: "POST", contentType: "application/json", dataType: "json", data: JSON.stringify({ requestModel: requestModel }) }) return response; } catch { return ""; } } function generateEnsPopoverGrid(model) { if (!model || model.DomainNames.length == 0) { return ""; } let listOtherENSNames = ""; model.DomainNames.forEach(x => listOtherENSNames += x.Name); let moreOtherENSNames = ""; if (model.Total > 5) { moreOtherENSNames = `More ` } const result = `
Other names resolving to this address:
${listOtherENSNames} ${moreOtherENSNames}
`; return result; } // ===== end ENS name tag var adjustPosition = 0; $(document).ready(function () { switchAmountToValue(document.getElementById("headerAmountValue"), 'Value (USD)', 'Amount', true); switchAmountToValue(document.getElementById("headerIntAmountValue"), 'Value (USD)', 'Amount', true); onDocumentReady(); $("[rel='tooltip']").tooltip(); $("[data-bs-toggle-second='tooltip']").tooltip({ trigger: 'hover' }); $("[rel='tooltipEns']").each(function () { $(this).tooltip({ title: $(this).attr("tooltip-title") }); }); //if (hash != '') { // activaTab(hash); //}; onAddressDocReady(); //// Note: this is causing "Copied" tooltip not showing when copy button is clicked in V3, and seems like not applicable to v3, comment out first in case there is issue //$('[data-bs-toggle="tooltip"]').click(function () { // $('[data-bs-toggle="tooltip"]').tooltip("hide"); //}); document.getElementById("copyaddressbutton").classList.remove("disabled"); if ($("#txtSearchContract").length) { initialiseKeyupOnDocReady(); } if (!!$('#ensName')[0]) { initEnsNamePopOver(); } handleToggle(); $("#btnLoginRequired").attr("href", "/login?ref=" + window.location.pathname.slice(1)); if (window.matchMedia("(max-width: 767px)").matches) { // Mobile adjustPosition = 90; } else { // Others adjustPosition = 50; } }); function displayAudit() { $('html, body').animate({ scrollTop: $("#auditReportId").offset().top - adjustPosition }); } function handleToggle() { var className = document.getElementsByClassName('editor'); var classNameCount = className.length; for (var j = 0; j < classNameCount; j++) { var editorSearch = ace.edit(className[j].id); if (getCookie('displaymode') === 'light' || themeMode === 'light') { editorSearch.setTheme('ace/theme/dawn'); } else if (getCookie('displaymode') === 'dim' || themeMode === 'dim') { editorSearch.setTheme('ace/theme/tomorrow_night_blue'); } else if (getCookie('displaymode') === 'dark' || themeMode === 'dark') { editorSearch.setTheme('ace/theme/tomorrow_night'); } if (editorSearch.session.getLength() < parseInt(MaxLines)) { var x = className[j].id.replace("editor", ""); if (x.trim() !== "") { $("#panel-sourcecode_" + x).hide(); } } } if ($('#panel-sourcecode').length) { var editorSetting = ace.edit("editor"); if (editorSetting.session.getLength() < parseInt(MaxLines)) { $("#panel-sourcecode").hide(); } } } // Bootstrap Dropdown in Table Responsive $('.table-responsive').on('shown.bs.dropdown', function (e) { var t = $(this), m = $(e.target).find('.dropdown-menu'), tb = t.offset().top + t.height(), mb = m.offset().top + m.outerHeight(true), d = 20; // Space for shadow + scrollbar. if (t[0].scrollWidth > t.innerWidth()) { if (mb + d > tb) { t.css('padding-bottom', ((mb + d) - tb)); } } else { t.css('overflow', 'visible'); } }).on('hidden.bs.dropdown', function () { $(this).css({ 'padding-bottom': '', 'overflow': '' }); }); var btn_ERC20_sort = { count: 0, reminder_count: 2, list: [], default_list: [], ERC20_sort_start: function (count) { if (document.getElementsByClassName('list-custom-divider-ERC20')[0]) { var self = this if (count != undefined) { self.count = count } var before_el = document.getElementsByClassName('list-custom-divider-ERC20')[0] var parent_el = before_el.parentNode var element_selector = parent_el.querySelectorAll(".list-custom-ERC20"); if (self.list.length == 0) { element_selector.forEach(function (e) { self.list.push(e); self.default_list.push(e); }); } $(".list-custom-ERC20").remove() var type = self.count % self.reminder_count self.sortList(type, parent_el, before_el); self.count++ } }, sortList: function (type, parent_el, before_el) { var self = this var sorted_list = [] var icon_el = $(before_el).find('button').find('i') switch (type) { case 1: icon_el.attr("class", "fad fa-sort-up") sorted_list = self.sortUsdAsc() break; default: icon_el.attr("class", "fad fa-sort-down") sorted_list = self.sortUsdDesc() } for (var i = sorted_list.length - 1; i >= 0; i--) { before_el.insertAdjacentElement('afterend', sorted_list[i]) } }, sortUsdAsc: function () { var self = this var sort_list = self.list sort_list.sort(function (a, b) { var target_a_value = self.formatCurrencyToNumber(a.querySelector('.list-usd-value').textContent.trim() || -1); var target_b_value = self.formatCurrencyToNumber(b.querySelector('.list-usd-value').textContent.trim() || -1); if (target_a_value == -1 || target_b_value == -1) { return 1; } if (target_a_value < target_b_value) { return -1; } if (target_a_value > target_b_value) { return 1; } return 0 }); return sort_list }, sortUsdDesc: function () { var self = this var sort_list = self.list sort_list.sort(function (a, b) { var target_a_value = self.formatCurrencyToNumber(a.querySelector('.list-usd-value').textContent.trim() || -1); var target_b_value = self.formatCurrencyToNumber(b.querySelector('.list-usd-value').textContent.trim() || -1); if (target_a_value < target_b_value) { return 1; } if (target_a_value > target_b_value) { return -1; } return 0 }); return sort_list }, formatCurrencyToNumber: function (strCurrency) { if (typeof strCurrency == "number") return strCurrency else return Number(strCurrency.replace(/[^0-9.-]+/g, "")); }, } $("#btn_ERC20_sort").on("click", function (event) { event.preventDefault(); setTimeout(function () { btn_ERC20_sort.ERC20_sort_start() }, 10) }) function hrefTokenHolding() { var location = "/tokenholdings?a=0xb4da52336092db22fe8e036866d59c6488604f89" var queryString = $("input.form-control.form-control-xs.search.mb-3")[0].value if (queryString) { location += "&q=" + queryString } window.location.href = location } function toggleLoginModal() { $('#loginRequiredModal').modal('toggle'); }