Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60a06040 | 18306933 | 363 days ago | IN | 0 ETH | 0.00210737 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x17407F76...42978c4A2 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
ZkEvmVerifierV1
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity =0.8.16; import {IZkEvmVerifier} from "./IZkEvmVerifier.sol"; // solhint-disable no-inline-assembly contract ZkEvmVerifierV1 is IZkEvmVerifier { /********** * Errors * **********/ /// @dev Thrown when aggregate zk proof verification is failed. error VerificationFailed(); /************* * Constants * *************/ /// @notice The address of highly optimized plonk verifier contract. address public immutable plonkVerifier; /*************** * Constructor * ***************/ constructor(address _verifier) { plonkVerifier = _verifier; } /************************* * Public View Functions * *************************/ /// @inheritdoc IZkEvmVerifier function verify(bytes calldata aggrProof, bytes32 publicInputHash) external view override { address _verifier = plonkVerifier; bool success; // 1. the first 12 * 32 (0x180) bytes of `aggrProof` is `accumulator` // 2. the rest bytes of `aggrProof` is the actual `batch_aggregated_proof` // 3. each byte of the `public_input_hash` should be converted to a `uint256` and the // 1024 (0x400) bytes should inserted between `accumulator` and `batch_aggregated_proof`. assembly { let p := mload(0x40) calldatacopy(p, aggrProof.offset, 0x180) for { let i := 0 } lt(i, 0x400) { i := add(i, 0x20) } { mstore(add(p, sub(0x560, i)), and(publicInputHash, 0xff)) publicInputHash := shr(8, publicInputHash) } calldatacopy(add(p, 0x580), add(aggrProof.offset, 0x180), sub(aggrProof.length, 0x180)) success := staticcall(gas(), _verifier, p, add(aggrProof.length, 0x400), 0x00, 0x00) } if (!success) { revert VerificationFailed(); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; interface IZkEvmVerifier { /// @notice Verify aggregate zk proof. /// @param aggrProof The aggregated proof. /// @param publicInputHash The public input hash. function verify(bytes calldata aggrProof, bytes32 publicInputHash) external view; }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_verifier","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"VerificationFailed","type":"error"},{"inputs":[],"name":"plonkVerifier","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"aggrProof","type":"bytes"},{"internalType":"bytes32","name":"publicInputHash","type":"bytes32"}],"name":"verify","outputs":[],"stateMutability":"view","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100365760003560e01c80636b4063411461003b578063e4886e5014610050575b600080fd5b61004e61004936600461012f565b610093565b005b6100777f0000000000000000000000004b8aa8a96078689384dab49691e9ba51f9d2f9e181565b6040516001600160a01b03909116815260200160405180910390f35b6040517f0000000000000000000000004b8aa8a96078689384dab49691e9ba51f9d2f9e19060009061018086823760005b6104008110156100ea5760ff851661056082900383015260089490941c936020016100c4565b5061018085036101808701610580830137600080610400870183865afa915050806101285760405163439cc0cd60e01b815260040160405180910390fd5b5050505050565b60008060006040848603121561014457600080fd5b833567ffffffffffffffff8082111561015c57600080fd5b818601915086601f83011261017057600080fd5b81358181111561017f57600080fd5b87602082850101111561019157600080fd5b602092830198909750959091013594935050505056fea26469706673582212200c1729bbb9403e0d80c6c37fdafb5ef22970958b901c8635ff7aefa525f2f2fa64736f6c63430008100033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.