Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Merkle
Compiler Version
v0.5.17+commit.d19bba13
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2023-08-06
*/
/**
*Submitted for verification at Etherscan.io on 2023-07-28
*/
pragma solidity ^0.5.2;
library Merkle {
function checkMembership(
bytes32 leaf,
uint256 index,
bytes32 rootHash,
bytes memory proof
) internal 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 Creation Code
60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158207b7acb89c7147795ae82d2f73ae02042fafb3b703e07df50dbfc1409f828741364736f6c63430005110032
Deployed Bytecode
0x7332262ddd01fff9bb367586317a5e40dbe2bccbe230146080604052600080fdfea265627a7a723158207b7acb89c7147795ae82d2f73ae02042fafb3b703e07df50dbfc1409f828741364736f6c63430005110032
Deployed Bytecode Sourcemap
100:1153:0:-;;;;;;;;
Swarm Source
bzzr://7b7acb89c7147795ae82d2f73ae02042fafb3b703e07df50dbfc1409f8287413
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 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.