Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Merkle
Compiler Version
v0.5.11+commit.c082d0b4
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2020-05-30
*/
/**
Matic network contracts
*/
pragma solidity ^0.5.2;
library Merkle {
function checkMembership(
bytes32 leaf,
uint256 index,
bytes32 rootHash,
bytes memory proof
) public pure returns (bool) {
require(proof.length % 32 == 0, "Invalid proof length");
uint256 proofHeight = proof.length / 32;
// Proof of size n means, height of the tree is n+1.
// In a tree of height n+1, max #leafs possible is 2 ^ n
require(index < 2 ** proofHeight, "Leaf index is too big");
bytes32 proofElement;
bytes32 computedHash = leaf;
for (uint256 i = 32; i <= proof.length; i += 32) {
assembly {
proofElement := mload(add(proof, i))
}
if (index % 2 == 0) {
computedHash = keccak256(
abi.encodePacked(computedHash, proofElement)
);
} else {
computedHash = keccak256(
abi.encodePacked(proofElement, computedHash)
);
}
index = index / 2;
}
return computedHash == rootHash;
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"constant":true,"inputs":[{"internalType":"bytes32","name":"leaf","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"bytes","name":"proof","type":"bytes"}],"name":"checkMembership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"}]Contract Creation Code
610292610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100355760003560e01c80636c8f455c1461003a575b600080fd5b6100f36004803603608081101561005057600080fd5b8135916020810135916040820135919081019060808101606082013564010000000081111561007e57600080fd5b82018360208201111561009057600080fd5b803590602001918460018302840111640100000000831117156100b257600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610107945050505050565b604080519115158252519081900360200190f35b6000602082518161011457fe5b061561015e576040805162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c840e0e4dedecc40d8cadccee8d60631b604482015290519081900360640190fd5b6000602083518161016b57fe5b0490508060020a85106101bd576040805162461bcd60e51b81526020600482015260156024820152744c65616620696e64657820697320746f6f2062696760581b604482015290519081900360640190fd5b60008660205b8551811161024f578581015192506002880661020f5781836040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209150610241565b828260405160200180838152602001828152602001925050506040516020818303038152906040528051906020012091505b6002880497506020016101c3565b50909414969550505050505056fea265627a7a72315820d06b08a658e0f7ce50d62528b3b64b3a7861dace80d4d1933be189b1f9e6acb964736f6c634300050b0032
Deployed Bytecode
0x738b90c7633f1f751e19e76433990b1663c625b25830146080604052600436106100355760003560e01c80636c8f455c1461003a575b600080fd5b6100f36004803603608081101561005057600080fd5b8135916020810135916040820135919081019060808101606082013564010000000081111561007e57600080fd5b82018360208201111561009057600080fd5b803590602001918460018302840111640100000000831117156100b257600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610107945050505050565b604080519115158252519081900360200190f35b6000602082518161011457fe5b061561015e576040805162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c840e0e4dedecc40d8cadccee8d60631b604482015290519081900360640190fd5b6000602083518161016b57fe5b0490508060020a85106101bd576040805162461bcd60e51b81526020600482015260156024820152744c65616620696e64657820697320746f6f2062696760581b604482015290519081900360640190fd5b60008660205b8551811161024f578581015192506002880661020f5781836040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209150610241565b828260405160200180838152602001828152602001925050506040516020818303038152906040528051906020012091505b6002880497506020016101c3565b50909414969550505050505056fea265627a7a72315820d06b08a658e0f7ce50d62528b3b64b3a7861dace80d4d1933be189b1f9e6acb964736f6c634300050b0032
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
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.