Verified contractPartialBUSL-1.1
SwapVerifierEVM2x2x1
Address0xec138727d8779e61054dd5dfe158b77b6ef28702
- Balance
0 ETH
- Transactions
1
- Compiler
solc 0.8.28
- Same code
Only this contract
Details
- Compiler
- solc 0.8.28+commit.7893614a
- Language
- solidity
- Optimization
- Yes, 500 runs
- EVM version
- paris
- License
- BUSL-1.1
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 25,595,236
- Creation transaction
- 0x45abb4503f…14c61d8ada
contracts/swap/SwapVerifierEVM2x2x1.sol
// SPDX-License-Identifier: BUSL-1.1
// NOTE: The original source of this contract is not public. This file was reconstructed from the
// deployed bytecode, starting from the VerifierEVM*v4 adapters of the public
// Hinkal-Contracts-Circuits repository (commit 61b6839). It compiles to the deployed bytecode
// (solc 0.8.28, optimizer 500 runs, evmVersion paris) except for the metadata hash. The contract
// name is not the original one.
pragma solidity ^0.8.17;
import "../types/IVerifier.sol";
import "./ISwapGroth16VerifierEVM2x2x1.sol";
contract SwapVerifierEVM2x2x1 is IVerifier {
ISwapGroth16VerifierEVM2x2x1 public immutable verifier;
uint16 constant inputAmount = 20;
constructor(address verifierInstance) {
verifier = ISwapGroth16VerifierEVM2x2x1(verifierInstance);
}
function verifyProof(
uint256[2] memory a,
uint256[2][2] memory b,
uint256[2] memory c,
uint256[] memory input,
uint256
) external view returns (bool) {
uint256[inputAmount] memory fixedInput;
for (uint16 i = 0; i < input.length; i++) {
fixedInput[i] = input[i];
}
return verifier.verifyProof(a, b, c, fixedInput);
}
}
contracts/swap/ISwapGroth16VerifierEVM2x2x1.sol
// SPDX-License-Identifier: BUSL-1.1
// NOTE: The original source of this contract is not public. This file was reconstructed from the
// deployed bytecode, starting from the VerifierEVM*v4 adapters of the public
// Hinkal-Contracts-Circuits repository (commit 61b6839). It compiles to the deployed bytecode
// (solc 0.8.28, optimizer 500 runs, evmVersion paris) except for the metadata hash. The contract
// name is not the original one.
pragma solidity ^0.8.17;
interface ISwapGroth16VerifierEVM2x2x1 {
function verifyProof(
uint256[2] memory a,
uint256[2][2] memory b,
uint256[2] memory c,
uint256[20] memory input
) external view returns (bool);
}
contracts/types/IVerifier.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.6;
interface IVerifier {
function verifyProof(
uint256[2] memory a,
uint256[2][2] memory b,
uint256[2] memory c,
uint256[] memory input,
uint256 verifierId
) view external returns (bool);
}
Compiler settingsShow
{
"viaIR": false,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "ipfs",
"useLiteralContent": false
},
"libraries": {},
"optimizer": {
"runs": 500,
"enabled": true
},
"evmVersion": "paris",
"remappings": [
"@openzeppelin/=node_modules/@openzeppelin/"
]
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.