ETH Price: $2,228.98 (-2.65%)

Contract

0xB6B08a9ed9282c695ddFbfA81d9ebF208b4c1De0
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ArrayMappingUint256

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 99999 runs

Other Settings:
london EvmVersion
File 1 of 1 : ArrayMapping.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.17;

library ArrayMappingUint256 {
    /**
     * @notice Map mapping(uint256 => uint256)) values to an array.
     */
    function toArray(mapping(uint256 => uint256) storage _self, uint256 length)
        external
        view
        returns (uint256[] memory)
    {
        uint256[] memory arrayOut = new uint256[](length);
        for (uint256 i; i < length; ++i) {
            arrayOut[i] = _self[i];
        }
        return arrayOut;
    }

    /**
     * @notice Set array values to mapping slots.
     */
    function setValues(mapping(uint256 => uint256) storage _self, uint256[] calldata values) external {
        for (uint256 i; i < values.length; ++i) {
            _self[i] = values[i];
        }
    }
}

library ArrayMappingAddress {
    /**
     * @notice Map mapping(uint256 => address)) values to an array.
     */
    function toArray(mapping(uint256 => address) storage _self, uint256 length)
        external
        view
        returns (address[] memory)
    {
        address[] memory arrayOut = new address[](length);
        for (uint256 i; i < length; ++i) {
            arrayOut[i] = _self[i];
        }
        return arrayOut;
    }

    /**
     * @notice Set array values to mapping slots.
     */
    function setValues(mapping(uint256 => address) storage _self, address[] calldata values) external {
        for (uint256 i; i < values.length; ++i) {
            _self[i] = values[i];
        }
    }
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "@openzeppelin/=lib/openzeppelin-contracts/contracts/",
    "@openzeppelin-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@solmate/=lib/solmate/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "solmate/=lib/solmate/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 99999
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[]

61034f61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100405760003560e01c80630b17002c14610045578063d865977e14610067575b600080fd5b81801561005157600080fd5b50610065610060366004610177565b610090565b005b61007a6100753660046101f6565b6100dd565b6040516100879190610218565b60405180910390f35b60005b818110156100d7578282828181106100ad576100ad61025c565b60008481526020888152604090912091029290920135909155506100d08161028b565b9050610093565b50505050565b606060008267ffffffffffffffff8111156100fa576100fa6102ea565b604051908082528060200260200182016040528015610123578160200160208202803683370190505b50905060005b8381101561016f5760008181526020869052604090205482518390839081106101545761015461025c565b60209081029190910101526101688161028b565b9050610129565b509392505050565b60008060006040848603121561018c57600080fd5b83359250602084013567ffffffffffffffff808211156101ab57600080fd5b818601915086601f8301126101bf57600080fd5b8135818111156101ce57600080fd5b8760208260051b85010111156101e357600080fd5b6020830194508093505050509250925092565b6000806040838503121561020957600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b8181101561025057835183529284019291840191600101610234565b50909695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036102e3577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea2646970667358221220399ac0264fd66e9aa854bd96c2a1e8ca6b54ec88a6b5f83c9fa254c60e8eec8664736f6c63430008110033

Deployed Bytecode

0x73b6b08a9ed9282c695ddfbfa81d9ebf208b4c1de030146080604052600436106100405760003560e01c80630b17002c14610045578063d865977e14610067575b600080fd5b81801561005157600080fd5b50610065610060366004610177565b610090565b005b61007a6100753660046101f6565b6100dd565b6040516100879190610218565b60405180910390f35b60005b818110156100d7578282828181106100ad576100ad61025c565b60008481526020888152604090912091029290920135909155506100d08161028b565b9050610093565b50505050565b606060008267ffffffffffffffff8111156100fa576100fa6102ea565b604051908082528060200260200182016040528015610123578160200160208202803683370190505b50905060005b8381101561016f5760008181526020869052604090205482518390839081106101545761015461025c565b60209081029190910101526101688161028b565b9050610129565b509392505050565b60008060006040848603121561018c57600080fd5b83359250602084013567ffffffffffffffff808211156101ab57600080fd5b818601915086601f8301126101bf57600080fd5b8135818111156101ce57600080fd5b8760208260051b85010111156101e357600080fd5b6020830194508093505050509250925092565b6000806040838503121561020957600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b8181101561025057835183529284019291840191600101610234565b50909695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036102e3577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea2646970667358221220399ac0264fd66e9aa854bd96c2a1e8ca6b54ec88a6b5f83c9fa254c60e8eec8664736f6c63430008110033

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

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.