Проверенный контрактЧастичноеBUSL-1.1
SwapVerifierEVM2x6x1
Адрес0x054388101d8a799541b4e094bbeb6dff783e2c76
- Баланс
0 ETH
- Транзакций
1
- Компилятор
solc 0.8.28
- Тот же код
Только этот контракт
Подробности
- Компилятор
- solc 0.8.28+commit.7893614a
- Язык
- solidity
- Оптимизация
- Да, 500 прогонов
- Версия EVM
- paris
- Лицензия
- BUSL-1.1
- Совпадение
- Частичноекод создания: да, код в сети: да
- Проверен на Sourcify
- Создан в блоке
- 25 595 242
- Транзакция создания
- 0xa419e75a26…a4312a38f4
3 файла
contracts/swap/SwapVerifierEVM2x6x1.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 "./ISwapGroth16VerifierEVM2x6x1.sol";
contract SwapVerifierEVM2x6x1 is IVerifier {
ISwapGroth16VerifierEVM2x6x1 public immutable verifier;
uint16 constant inputAmount = 28;
constructor(address verifierInstance) {
verifier = ISwapGroth16VerifierEVM2x6x1(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/ISwapGroth16VerifierEVM2x6x1.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 ISwapGroth16VerifierEVM2x6x1 {
function verifyProof(
uint256[2] memory a,
uint256[2][2] memory b,
uint256[2] memory c,
uint256[28] 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);
}
Настройки компилятораПоказать
{
"viaIR": false,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "ipfs",
"useLiteralContent": false
},
"libraries": {},
"optimizer": {
"runs": 500,
"enabled": true
},
"evmVersion": "paris",
"remappings": [
"@openzeppelin/=node_modules/@openzeppelin/"
]
}Исходный код и метаданные: Sourcify.
Исходный код принадлежит авторам контракта.