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
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Verifying Ke... | 123808358 | 163 days ago | IN | 0 ETH | 0.000041237256 |
Loading...
Loading
Contract Name:
VkRegistry
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { SnarkCommon } from "./crypto/SnarkCommon.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { IVkRegistry } from "./interfaces/IVkRegistry.sol"; import { DomainObjs } from "./utilities/DomainObjs.sol"; /// @title VkRegistry /// @notice Stores verifying keys for the circuits. /// Each circuit has a signature which is its compile-time constants represented /// as a uint256. contract VkRegistry is Ownable(msg.sender), DomainObjs, SnarkCommon, IVkRegistry { mapping(Mode => mapping(uint256 => VerifyingKey)) internal processVks; mapping(Mode => mapping(uint256 => bool)) internal processVkSet; mapping(Mode => mapping(uint256 => VerifyingKey)) internal tallyVks; mapping(Mode => mapping(uint256 => bool)) internal tallyVkSet; event ProcessVkSet(uint256 _sig, Mode _mode); event TallyVkSet(uint256 _sig, Mode _mode); error ProcessVkAlreadySet(); error TallyVkAlreadySet(); error ProcessVkNotSet(); error TallyVkNotSet(); error SubsidyVkNotSet(); error InvalidKeysParams(); /// @notice Create a new instance of the VkRegistry contract // solhint-disable-next-line no-empty-blocks constructor() payable {} /// @notice Check if the process verifying key is set /// @param _sig The signature /// @param _mode QV or Non-QV /// @return isSet whether the verifying key is set function isProcessVkSet(uint256 _sig, Mode _mode) public view returns (bool isSet) { isSet = processVkSet[_mode][_sig]; } /// @notice Check if the tally verifying key is set /// @param _sig The signature /// @param _mode QV or Non-QV /// @return isSet whether the verifying key is set function isTallyVkSet(uint256 _sig, Mode _mode) public view returns (bool isSet) { isSet = tallyVkSet[_mode][_sig]; } /// @notice generate the signature for the process verifying key /// @param _stateTreeDepth The state tree depth /// @param _messageTreeDepth The message tree depth /// @param _voteOptionTreeDepth The vote option tree depth /// @param _messageBatchSize The message batch size function genProcessVkSig( uint256 _stateTreeDepth, uint256 _messageTreeDepth, uint256 _voteOptionTreeDepth, uint256 _messageBatchSize ) public pure returns (uint256 sig) { sig = (_messageBatchSize << 192) + (_stateTreeDepth << 128) + (_messageTreeDepth << 64) + _voteOptionTreeDepth; } /// @notice generate the signature for the tally verifying key /// @param _stateTreeDepth The state tree depth /// @param _intStateTreeDepth The intermediate state tree depth /// @param _voteOptionTreeDepth The vote option tree depth /// @return sig The signature function genTallyVkSig( uint256 _stateTreeDepth, uint256 _intStateTreeDepth, uint256 _voteOptionTreeDepth ) public pure returns (uint256 sig) { sig = (_stateTreeDepth << 128) + (_intStateTreeDepth << 64) + _voteOptionTreeDepth; } /// @notice Set the process and tally verifying keys for a certain combination /// of parameters and modes /// @param _stateTreeDepth The state tree depth /// @param _intStateTreeDepth The intermediate state tree depth /// @param _messageTreeDepth The message tree depth /// @param _voteOptionTreeDepth The vote option tree depth /// @param _messageBatchSize The message batch size /// @param _modes Array of QV or Non-QV modes (must have the same length as process and tally keys) /// @param _processVks The process verifying keys (must have the same length as modes) /// @param _tallyVks The tally verifying keys (must have the same length as modes) function setVerifyingKeysBatch( uint256 _stateTreeDepth, uint256 _intStateTreeDepth, uint256 _messageTreeDepth, uint256 _voteOptionTreeDepth, uint256 _messageBatchSize, Mode[] calldata _modes, VerifyingKey[] calldata _processVks, VerifyingKey[] calldata _tallyVks ) public onlyOwner { if (_modes.length != _processVks.length || _modes.length != _tallyVks.length) { revert InvalidKeysParams(); } uint256 length = _modes.length; for (uint256 index = 0; index < length; ) { setVerifyingKeys( _stateTreeDepth, _intStateTreeDepth, _messageTreeDepth, _voteOptionTreeDepth, _messageBatchSize, _modes[index], _processVks[index], _tallyVks[index] ); unchecked { index++; } } } /// @notice Set the process and tally verifying keys for a certain combination /// of parameters /// @param _stateTreeDepth The state tree depth /// @param _intStateTreeDepth The intermediate state tree depth /// @param _messageTreeDepth The message tree depth /// @param _voteOptionTreeDepth The vote option tree depth /// @param _messageBatchSize The message batch size /// @param _mode QV or Non-QV /// @param _processVk The process verifying key /// @param _tallyVk The tally verifying key function setVerifyingKeys( uint256 _stateTreeDepth, uint256 _intStateTreeDepth, uint256 _messageTreeDepth, uint256 _voteOptionTreeDepth, uint256 _messageBatchSize, Mode _mode, VerifyingKey calldata _processVk, VerifyingKey calldata _tallyVk ) public onlyOwner { uint256 processVkSig = genProcessVkSig(_stateTreeDepth, _messageTreeDepth, _voteOptionTreeDepth, _messageBatchSize); if (processVkSet[_mode][processVkSig]) revert ProcessVkAlreadySet(); uint256 tallyVkSig = genTallyVkSig(_stateTreeDepth, _intStateTreeDepth, _voteOptionTreeDepth); if (tallyVkSet[_mode][tallyVkSig]) revert TallyVkAlreadySet(); VerifyingKey storage processVk = processVks[_mode][processVkSig]; processVk.alpha1 = _processVk.alpha1; processVk.beta2 = _processVk.beta2; processVk.gamma2 = _processVk.gamma2; processVk.delta2 = _processVk.delta2; uint256 processIcLength = _processVk.ic.length; for (uint256 i = 0; i < processIcLength; ) { processVk.ic.push(_processVk.ic[i]); unchecked { i++; } } processVkSet[_mode][processVkSig] = true; VerifyingKey storage tallyVk = tallyVks[_mode][tallyVkSig]; tallyVk.alpha1 = _tallyVk.alpha1; tallyVk.beta2 = _tallyVk.beta2; tallyVk.gamma2 = _tallyVk.gamma2; tallyVk.delta2 = _tallyVk.delta2; uint256 tallyIcLength = _tallyVk.ic.length; for (uint256 i = 0; i < tallyIcLength; ) { tallyVk.ic.push(_tallyVk.ic[i]); unchecked { i++; } } tallyVkSet[_mode][tallyVkSig] = true; emit TallyVkSet(tallyVkSig, _mode); emit ProcessVkSet(processVkSig, _mode); } /// @notice Check if the process verifying key is set /// @param _stateTreeDepth The state tree depth /// @param _messageTreeDepth The message tree depth /// @param _voteOptionTreeDepth The vote option tree depth /// @param _messageBatchSize The message batch size /// @param _mode QV or Non-QV /// @return isSet whether the verifying key is set function hasProcessVk( uint256 _stateTreeDepth, uint256 _messageTreeDepth, uint256 _voteOptionTreeDepth, uint256 _messageBatchSize, Mode _mode ) public view returns (bool isSet) { uint256 sig = genProcessVkSig(_stateTreeDepth, _messageTreeDepth, _voteOptionTreeDepth, _messageBatchSize); isSet = processVkSet[_mode][sig]; } /// @notice Get the process verifying key by signature /// @param _sig The signature /// @param _mode QV or Non-QV /// @return vk The verifying key function getProcessVkBySig(uint256 _sig, Mode _mode) public view returns (VerifyingKey memory vk) { if (!processVkSet[_mode][_sig]) revert ProcessVkNotSet(); vk = processVks[_mode][_sig]; } /// @inheritdoc IVkRegistry function getProcessVk( uint256 _stateTreeDepth, uint256 _messageTreeDepth, uint256 _voteOptionTreeDepth, uint256 _messageBatchSize, Mode _mode ) public view returns (VerifyingKey memory vk) { uint256 sig = genProcessVkSig(_stateTreeDepth, _messageTreeDepth, _voteOptionTreeDepth, _messageBatchSize); vk = getProcessVkBySig(sig, _mode); } /// @notice Check if the tally verifying key is set /// @param _stateTreeDepth The state tree depth /// @param _intStateTreeDepth The intermediate state tree depth /// @param _voteOptionTreeDepth The vote option tree depth /// @param _mode QV or Non-QV /// @return isSet whether the verifying key is set function hasTallyVk( uint256 _stateTreeDepth, uint256 _intStateTreeDepth, uint256 _voteOptionTreeDepth, Mode _mode ) public view returns (bool isSet) { uint256 sig = genTallyVkSig(_stateTreeDepth, _intStateTreeDepth, _voteOptionTreeDepth); isSet = tallyVkSet[_mode][sig]; } /// @notice Get the tally verifying key by signature /// @param _sig The signature /// @param _mode QV or Non-QV /// @return vk The verifying key function getTallyVkBySig(uint256 _sig, Mode _mode) public view returns (VerifyingKey memory vk) { if (!tallyVkSet[_mode][_sig]) revert TallyVkNotSet(); vk = tallyVks[_mode][_sig]; } /// @inheritdoc IVkRegistry function getTallyVk( uint256 _stateTreeDepth, uint256 _intStateTreeDepth, uint256 _voteOptionTreeDepth, Mode _mode ) public view returns (VerifyingKey memory vk) { uint256 sig = genTallyVkSig(_stateTreeDepth, _intStateTreeDepth, _voteOptionTreeDepth); vk = getTallyVkBySig(sig, _mode); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // Copyright 2017 Christian Reitwiessner // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to // deal in the Software without restriction, including without limitation the // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or // sell copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. // 2019 OKIMS pragma solidity ^0.8.20; /// @title Pairing /// @notice A library implementing the alt_bn128 elliptic curve operations. library Pairing { uint256 public constant PRIME_Q = 21888242871839275222246405745257275088696311157297823662689037894645226208583; struct G1Point { uint256 x; uint256 y; } // Encoding of field elements is: X[0] * z + X[1] struct G2Point { uint256[2] x; uint256[2] y; } /// @notice custom errors error PairingAddFailed(); error PairingMulFailed(); error PairingOpcodeFailed(); /// @notice The negation of p, i.e. p.plus(p.negate()) should be zero. function negate(G1Point memory p) internal pure returns (G1Point memory) { // The prime q in the base field F_q for G1 if (p.x == 0 && p.y == 0) { return G1Point(0, 0); } else { return G1Point(p.x, PRIME_Q - (p.y % PRIME_Q)); } } /// @notice r Returns the sum of two points of G1. function plus(G1Point memory p1, G1Point memory p2) internal view returns (G1Point memory r) { uint256[4] memory input; input[0] = p1.x; input[1] = p1.y; input[2] = p2.x; input[3] = p2.y; bool success; // solhint-disable-next-line no-inline-assembly assembly { success := staticcall(sub(gas(), 2000), 6, input, 0xc0, r, 0x60) // Use "invalid" to make gas estimation work switch success case 0 { invalid() } } if (!success) { revert PairingAddFailed(); } } /// @notice r Return the product of a point on G1 and a scalar, i.e. /// p == p.scalarMul(1) and p.plus(p) == p.scalarMul(2) for all /// points p. function scalarMul(G1Point memory p, uint256 s) internal view returns (G1Point memory r) { uint256[3] memory input; input[0] = p.x; input[1] = p.y; input[2] = s; bool success; // solhint-disable-next-line no-inline-assembly assembly { success := staticcall(sub(gas(), 2000), 7, input, 0x80, r, 0x60) // Use "invalid" to make gas estimation work switch success case 0 { invalid() } } if (!success) { revert PairingMulFailed(); } } /// @return isValid The result of computing the pairing check /// e(p1[0], p2[0]) * .... * e(p1[n], p2[n]) == 1 /// For example, /// pairing([P1(), P1().negate()], [P2(), P2()]) should return true. function pairing( G1Point memory a1, G2Point memory a2, G1Point memory b1, G2Point memory b2, G1Point memory c1, G2Point memory c2, G1Point memory d1, G2Point memory d2 ) internal view returns (bool isValid) { G1Point[4] memory p1; p1[0] = a1; p1[1] = b1; p1[2] = c1; p1[3] = d1; G2Point[4] memory p2; p2[0] = a2; p2[1] = b2; p2[2] = c2; p2[3] = d2; uint256 inputSize = 24; uint256[] memory input = new uint256[](inputSize); for (uint8 i = 0; i < 4; ) { uint8 j = i * 6; input[j + 0] = p1[i].x; input[j + 1] = p1[i].y; input[j + 2] = p2[i].x[0]; input[j + 3] = p2[i].x[1]; input[j + 4] = p2[i].y[0]; input[j + 5] = p2[i].y[1]; unchecked { i++; } } uint256[1] memory out; bool success; // solhint-disable-next-line no-inline-assembly assembly { success := staticcall(sub(gas(), 2000), 8, add(input, 0x20), mul(inputSize, 0x20), out, 0x20) // Use "invalid" to make gas estimation work switch success case 0 { invalid() } } if (!success) { revert PairingOpcodeFailed(); } isValid = out[0] != 0; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { Pairing } from "./Pairing.sol"; /// @title SnarkCommon /// @notice a Contract which holds a struct /// representing a Groth16 verifying key contract SnarkCommon { /// @notice a struct representing a Groth16 verifying key struct VerifyingKey { Pairing.G1Point alpha1; Pairing.G2Point beta2; Pairing.G2Point gamma2; Pairing.G2Point delta2; Pairing.G1Point[] ic; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; import { SnarkCommon } from "../crypto/SnarkCommon.sol"; import { DomainObjs } from "../utilities/DomainObjs.sol"; /// @title IVkRegistry /// @notice VkRegistry interface interface IVkRegistry { /// @notice Get the tally verifying key /// @param _stateTreeDepth The state tree depth /// @param _intStateTreeDepth The intermediate state tree depth /// @param _voteOptionTreeDepth The vote option tree depth /// @param _mode QV or Non-QV /// @return The verifying key function getTallyVk( uint256 _stateTreeDepth, uint256 _intStateTreeDepth, uint256 _voteOptionTreeDepth, DomainObjs.Mode _mode ) external view returns (SnarkCommon.VerifyingKey memory); /// @notice Get the process verifying key /// @param _stateTreeDepth The state tree depth /// @param _messageTreeDepth The message tree depth /// @param _voteOptionTreeDepth The vote option tree depth /// @param _messageBatchSize The message batch size /// @param _mode QV or Non-QV /// @return The verifying key function getProcessVk( uint256 _stateTreeDepth, uint256 _messageTreeDepth, uint256 _voteOptionTreeDepth, uint256 _messageBatchSize, DomainObjs.Mode _mode ) external view returns (SnarkCommon.VerifyingKey memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; /// @title DomainObjs /// @notice An utility contract that holds /// a number of domain objects and functions contract DomainObjs { /// @notice the length of a MACI message uint8 public constant MESSAGE_DATA_LENGTH = 10; /// @notice voting modes enum Mode { QV, NON_QV } /// @title Message /// @notice this struct represents a MACI message /// @dev msgType: 1 for vote message struct Message { uint256[MESSAGE_DATA_LENGTH] data; } /// @title PubKey /// @notice A MACI public key struct PubKey { uint256 x; uint256 y; } /// @title StateLeaf /// @notice A MACI state leaf /// @dev used to represent a user's state /// in the state Merkle tree struct StateLeaf { PubKey pubKey; uint256 voiceCreditBalance; uint256 timestamp; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"payable","type":"constructor"},{"inputs":[],"name":"InvalidKeysParams","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ProcessVkAlreadySet","type":"error"},{"inputs":[],"name":"ProcessVkNotSet","type":"error"},{"inputs":[],"name":"SubsidyVkNotSet","type":"error"},{"inputs":[],"name":"TallyVkAlreadySet","type":"error"},{"inputs":[],"name":"TallyVkNotSet","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_sig","type":"uint256"},{"indexed":false,"internalType":"enum DomainObjs.Mode","name":"_mode","type":"uint8"}],"name":"ProcessVkSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_sig","type":"uint256"},{"indexed":false,"internalType":"enum DomainObjs.Mode","name":"_mode","type":"uint8"}],"name":"TallyVkSet","type":"event"},{"inputs":[],"name":"MESSAGE_DATA_LENGTH","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stateTreeDepth","type":"uint256"},{"internalType":"uint256","name":"_messageTreeDepth","type":"uint256"},{"internalType":"uint256","name":"_voteOptionTreeDepth","type":"uint256"},{"internalType":"uint256","name":"_messageBatchSize","type":"uint256"}],"name":"genProcessVkSig","outputs":[{"internalType":"uint256","name":"sig","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stateTreeDepth","type":"uint256"},{"internalType":"uint256","name":"_intStateTreeDepth","type":"uint256"},{"internalType":"uint256","name":"_voteOptionTreeDepth","type":"uint256"}],"name":"genTallyVkSig","outputs":[{"internalType":"uint256","name":"sig","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stateTreeDepth","type":"uint256"},{"internalType":"uint256","name":"_messageTreeDepth","type":"uint256"},{"internalType":"uint256","name":"_voteOptionTreeDepth","type":"uint256"},{"internalType":"uint256","name":"_messageBatchSize","type":"uint256"},{"internalType":"enum DomainObjs.Mode","name":"_mode","type":"uint8"}],"name":"getProcessVk","outputs":[{"components":[{"components":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"internalType":"struct Pairing.G1Point","name":"alpha1","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"beta2","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"gamma2","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"delta2","type":"tuple"},{"components":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"internalType":"struct Pairing.G1Point[]","name":"ic","type":"tuple[]"}],"internalType":"struct SnarkCommon.VerifyingKey","name":"vk","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sig","type":"uint256"},{"internalType":"enum DomainObjs.Mode","name":"_mode","type":"uint8"}],"name":"getProcessVkBySig","outputs":[{"components":[{"components":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"internalType":"struct Pairing.G1Point","name":"alpha1","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"beta2","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"gamma2","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"delta2","type":"tuple"},{"components":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"internalType":"struct Pairing.G1Point[]","name":"ic","type":"tuple[]"}],"internalType":"struct SnarkCommon.VerifyingKey","name":"vk","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stateTreeDepth","type":"uint256"},{"internalType":"uint256","name":"_intStateTreeDepth","type":"uint256"},{"internalType":"uint256","name":"_voteOptionTreeDepth","type":"uint256"},{"internalType":"enum DomainObjs.Mode","name":"_mode","type":"uint8"}],"name":"getTallyVk","outputs":[{"components":[{"components":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"internalType":"struct Pairing.G1Point","name":"alpha1","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"beta2","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"gamma2","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"delta2","type":"tuple"},{"components":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"internalType":"struct Pairing.G1Point[]","name":"ic","type":"tuple[]"}],"internalType":"struct SnarkCommon.VerifyingKey","name":"vk","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sig","type":"uint256"},{"internalType":"enum DomainObjs.Mode","name":"_mode","type":"uint8"}],"name":"getTallyVkBySig","outputs":[{"components":[{"components":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"internalType":"struct Pairing.G1Point","name":"alpha1","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"beta2","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"gamma2","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"delta2","type":"tuple"},{"components":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"internalType":"struct Pairing.G1Point[]","name":"ic","type":"tuple[]"}],"internalType":"struct SnarkCommon.VerifyingKey","name":"vk","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stateTreeDepth","type":"uint256"},{"internalType":"uint256","name":"_messageTreeDepth","type":"uint256"},{"internalType":"uint256","name":"_voteOptionTreeDepth","type":"uint256"},{"internalType":"uint256","name":"_messageBatchSize","type":"uint256"},{"internalType":"enum DomainObjs.Mode","name":"_mode","type":"uint8"}],"name":"hasProcessVk","outputs":[{"internalType":"bool","name":"isSet","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stateTreeDepth","type":"uint256"},{"internalType":"uint256","name":"_intStateTreeDepth","type":"uint256"},{"internalType":"uint256","name":"_voteOptionTreeDepth","type":"uint256"},{"internalType":"enum DomainObjs.Mode","name":"_mode","type":"uint8"}],"name":"hasTallyVk","outputs":[{"internalType":"bool","name":"isSet","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sig","type":"uint256"},{"internalType":"enum DomainObjs.Mode","name":"_mode","type":"uint8"}],"name":"isProcessVkSet","outputs":[{"internalType":"bool","name":"isSet","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sig","type":"uint256"},{"internalType":"enum DomainObjs.Mode","name":"_mode","type":"uint8"}],"name":"isTallyVkSet","outputs":[{"internalType":"bool","name":"isSet","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stateTreeDepth","type":"uint256"},{"internalType":"uint256","name":"_intStateTreeDepth","type":"uint256"},{"internalType":"uint256","name":"_messageTreeDepth","type":"uint256"},{"internalType":"uint256","name":"_voteOptionTreeDepth","type":"uint256"},{"internalType":"uint256","name":"_messageBatchSize","type":"uint256"},{"internalType":"enum DomainObjs.Mode","name":"_mode","type":"uint8"},{"components":[{"components":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"internalType":"struct Pairing.G1Point","name":"alpha1","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"beta2","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"gamma2","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"delta2","type":"tuple"},{"components":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"internalType":"struct Pairing.G1Point[]","name":"ic","type":"tuple[]"}],"internalType":"struct SnarkCommon.VerifyingKey","name":"_processVk","type":"tuple"},{"components":[{"components":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"internalType":"struct Pairing.G1Point","name":"alpha1","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"beta2","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"gamma2","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"delta2","type":"tuple"},{"components":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"internalType":"struct Pairing.G1Point[]","name":"ic","type":"tuple[]"}],"internalType":"struct SnarkCommon.VerifyingKey","name":"_tallyVk","type":"tuple"}],"name":"setVerifyingKeys","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stateTreeDepth","type":"uint256"},{"internalType":"uint256","name":"_intStateTreeDepth","type":"uint256"},{"internalType":"uint256","name":"_messageTreeDepth","type":"uint256"},{"internalType":"uint256","name":"_voteOptionTreeDepth","type":"uint256"},{"internalType":"uint256","name":"_messageBatchSize","type":"uint256"},{"internalType":"enum DomainObjs.Mode[]","name":"_modes","type":"uint8[]"},{"components":[{"components":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"internalType":"struct Pairing.G1Point","name":"alpha1","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"beta2","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"gamma2","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"delta2","type":"tuple"},{"components":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"internalType":"struct Pairing.G1Point[]","name":"ic","type":"tuple[]"}],"internalType":"struct SnarkCommon.VerifyingKey[]","name":"_processVks","type":"tuple[]"},{"components":[{"components":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"internalType":"struct Pairing.G1Point","name":"alpha1","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"beta2","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"gamma2","type":"tuple"},{"components":[{"internalType":"uint256[2]","name":"x","type":"uint256[2]"},{"internalType":"uint256[2]","name":"y","type":"uint256[2]"}],"internalType":"struct Pairing.G2Point","name":"delta2","type":"tuple"},{"components":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"internalType":"struct Pairing.G1Point[]","name":"ic","type":"tuple[]"}],"internalType":"struct SnarkCommon.VerifyingKey[]","name":"_tallyVks","type":"tuple[]"}],"name":"setVerifyingKeysBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052338061002a57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61003381610039565b50610089565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6113db806100986000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063715018a611610097578063c42569b211610066578063c42569b214610223578063d88ff4f514610236578063f2fde38b14610249578063f8e254dd1461025c57600080fd5b8063715018a6146101da5780638da5cb5b146101e2578063b2e39530146101fd578063b4da51fc1461021057600080fd5b80633141a13c116100d35780633141a13c146101875780633b6c7c111461019a578063486b58fa146101ad578063683f3dc3146101c057600080fd5b806310b37e4d1461010557806318f61b631461012e5780631afe11ef146101435780632360a41914610164575b600080fd5b610118610113366004610e2f565b61026f565b6040516101259190610eb9565b60405180910390f35b61014161013c366004610fb8565b61029a565b005b610156610151366004611089565b610369565b604051908152602001610125565b6101776101723660046110b5565b610390565b6040519015158152602001610125565b610177610195366004610e2f565b6103e2565b6101416101a83660046110fa565b610444565b6101776101bb36600461119f565b61089b565b6101c8600a81565b60405160ff9091168152602001610125565b6101416108ff565b6000546040516001600160a01b039091168152602001610125565b61015661020b3660046111e8565b610913565b61011861021e3660046110b5565b61094a565b6101776102313660046110b5565b610c00565b61011861024436600461119f565b610c18565b61014161025736600461121a565b610c45565b61011861026a3660046110b5565b610c88565b610277610d87565b6000610284868686610369565b90506102908184610c88565b9695505050505050565b6102a2610d0a565b84831415806102b15750848114155b156102cf576040516335c0365760e11b815260040160405180910390fd5b8460005b8181101561035a576103528d8d8d8d8d8d8d888181106102f5576102f561124a565b905060200201602081019061030a9190611260565b8c8c8981811061031c5761031c61124a565b905060200281019061032e919061127b565b8b8b8a8181106103405761034061124a565b90506020028101906101a8919061127b565b6001016102d3565b50505050505050505050505050565b60008161037e604085901b608087901b61129c565b610388919061129c565b949350505050565b6000600260008360018111156103a8576103a86112c3565b60018111156103b9576103b96112c3565b815260208082019290925260409081016000908120958152949091529092205460ff1692915050565b6000806103f0868686610369565b905060046000846001811115610408576104086112c3565b6001811115610419576104196112c3565b8152602080820192909252604090810160009081209381529290915290205460ff1695945050505050565b61044c610d0a565b600061045a89888888610913565b905060026000856001811115610472576104726112c3565b6001811115610483576104836112c3565b81526020808201929092526040908101600090812084825290925290205460ff16156104c2576040516329fae11360e01b815260040160405180910390fd5b60006104cf8a8a89610369565b9050600460008660018111156104e7576104e76112c3565b60018111156104f8576104f86112c3565b81526020808201929092526040908101600090812084825290925290205460ff161561053757604051630877857960e21b815260040160405180910390fd5b60006001600087600181111561054f5761054f6112c3565b6001811115610560576105606112c3565b815260208082019290925260409081016000908120868252835220863581559086013560018201559050604085016002820161059c82826112d9565b505060c08501600682016105b082826112d9565b50506101408501600a82016105c582826112d9565b50600090506105d86101c0870187611329565b9050905060005b8181101561064e57600e83016105f96101c0890189611329565b838181106106095761060961124a565b835460018101855560009485526020909420604090910292909201926002029091019050610644828281358155602082013560018201555050565b50506001016105df565b50600160026000896001811115610667576106676112c3565b6001811115610678576106786112c3565b8152602080820192909252604090810160009081208882529092528120805460ff1916921515929092179091556003818960018111156106ba576106ba6112c3565b60018111156106cb576106cb6112c3565b815260208082019290925260409081016000908120878252835220873581559087013560018201559050604086016002820161070782826112d9565b505060c086016006820161071b82826112d9565b50506101408601600a820161073082826112d9565b50600090506107436101c0880188611329565b9050905060005b818110156107b957600e83016107646101c08a018a611329565b838181106107745761077461124a565b8354600181018555600094855260209094206040909102929092019260020290910190506107af828281358155602082013560018201555050565b505060010161074a565b506001600460008b60018111156107d2576107d26112c3565b60018111156107e3576107e36112c3565b8152602001908152602001600020600087815260200190815260200160002060006101000a81548160ff0219169083151502179055507fb5eb693cc6c3cf0ba2a0f9d96dc6ed50059fc43caa9253d6202f2d48c15d1377858a60405161084a929190611373565b60405180910390a17f298d1d2d7c689e7717ba543af4cc2524314974d1522a4240b2cda0f362496e1f868a604051610883929190611373565b60405180910390a15050505050505050505050505050565b6000806108aa87878787610913565b9050600260008460018111156108c2576108c26112c3565b60018111156108d3576108d36112c3565b8152602080820192909252604090810160009081209381529290915290205460ff169695505050505050565b610907610d0a565b6109116000610d37565b565b600082604085901b61092d608088901b60c086901b61129c565b610937919061129c565b610941919061129c565b95945050505050565b610952610d87565b60026000836001811115610968576109686112c3565b6001811115610979576109796112c3565b81526020808201929092526040908101600090812086825290925290205460ff166109b757604051632f257a9d60e11b815260040160405180910390fd5b600160008360018111156109cd576109cd6112c3565b60018111156109de576109de6112c3565b8152602080820192909252604090810160009081208682528352819020815160e081018352815460a08201908152600183015460c0830152815282516080810180855291949293928501929091600280860192849290830191849182845b815481526020019060010190808311610a3c57505050918352505060408051808201918290526020909201919060028481019182845b815481526020019060010190808311610a72575050509190925250505081526040805160808101808352602090930192909160068501918391820190839060029082845b815481526020019060010190808311610ab657505050918352505060408051808201918290526020909201919060028481019182845b815481526020019060010190808311610aec5750505091909252505050815260408051608081018083526020909301929091600a8501918391820190839060029082845b815481526020019060010190808311610b3057505050918352505060408051808201918290526020909201919060028481019182845b815481526020019060010190808311610b66575050505050815250508152602001600e8201805480602002602001604051908101604052809291908181526020016000905b82821015610bf157838290600052602060002090600202016040518060400160405290816000820154815260200160018201548152505081526020019060010190610bab565b50505091525090949350505050565b6000600460008360018111156103a8576103a86112c3565b610c20610d87565b6000610c2e87878787610913565b9050610c3a818461094a565b979650505050505050565b610c4d610d0a565b6001600160a01b038116610c7c57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b610c8581610d37565b50565b610c90610d87565b60046000836001811115610ca657610ca66112c3565b6001811115610cb757610cb76112c3565b81526020808201929092526040908101600090812086825290925290205460ff16610cf45760405162f7dd2f60e71b815260040160405180910390fd5b600360008360018111156109cd576109cd6112c3565b6000546001600160a01b031633146109115760405163118cdaa760e01b8152336004820152602401610c73565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040805160e08101909152600060a0820181815260c0830191909152815260208101610db1610dd8565b8152602001610dbe610dd8565b8152602001610dcb610dd8565b8152602001606081525090565b6040518060400160405280610deb610dfd565b8152602001610df8610dfd565b905290565b60405180604001604052806002906020820280368337509192915050565b803560028110610e2a57600080fd5b919050565b60008060008060808587031215610e4557600080fd5b843593506020850135925060408501359150610e6360608601610e1b565b905092959194509250565b8060005b6002811015610e91578151845260209384019390910190600101610e72565b50505050565b610ea2828251610e6e565b6020810151610eb46040840182610e6e565b505050565b602080825282518051838301528101516040830152600090610200830181850151610ee76060860182610e97565b50604080860151610efb60e0870182610e97565b506060860151610f0f610160870182610e97565b5060808601516101e0868101528051928390528301916000906102208701905b80831015610f6057610f4c82865180518252602090810151910152565b938501936001929092019190830190610f2f565b50979650505050505050565b60008083601f840112610f7e57600080fd5b50813567ffffffffffffffff811115610f9657600080fd5b6020830191508360208260051b8501011115610fb157600080fd5b9250929050565b60008060008060008060008060008060006101008c8e031215610fda57600080fd5b8b359a5060208c0135995060408c0135985060608c0135975060808c0135965067ffffffffffffffff8060a08e0135111561101457600080fd5b6110248e60a08f01358f01610f6c565b909750955060c08d013581101561103a57600080fd5b61104a8e60c08f01358f01610f6c565b909550935060e08d013581101561106057600080fd5b506110718d60e08e01358e01610f6c565b81935080925050509295989b509295989b9093969950565b60008060006060848603121561109e57600080fd5b505081359360208301359350604090920135919050565b600080604083850312156110c857600080fd5b823591506110d860208401610e1b565b90509250929050565b60006101e082840312156110f457600080fd5b50919050565b600080600080600080600080610100898b03121561111757600080fd5b883597506020890135965060408901359550606089013594506080890135935061114360a08a01610e1b565b925060c089013567ffffffffffffffff8082111561116057600080fd5b61116c8c838d016110e1565b935060e08b013591508082111561118257600080fd5b5061118f8b828c016110e1565b9150509295985092959890939650565b600080600080600060a086880312156111b757600080fd5b853594506020860135935060408601359250606086013591506111dc60808701610e1b565b90509295509295909350565b600080600080608085870312156111fe57600080fd5b5050823594602084013594506040840135936060013592509050565b60006020828403121561122c57600080fd5b81356001600160a01b038116811461124357600080fd5b9392505050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561127257600080fd5b61124382610e1b565b600082356101de1983360301811261129257600080fd5b9190910192915050565b808201808211156112bd57634e487b7160e01b600052601160045260246000fd5b92915050565b634e487b7160e01b600052602160045260246000fd5b8160005b60028110156112fa578135838201556020909101906001016112dd565b50506040820160005b60028082106113125750610e91565b823584830190910155602090910190600101611303565b6000808335601e1984360301811261134057600080fd5b83018035915067ffffffffffffffff82111561135b57600080fd5b6020019150600681901b3603821315610fb157600080fd5b828152604081016002831061139857634e487b7160e01b600052602160045260246000fd5b826020830152939250505056fea2646970667358221220512c6c32f2b1c27b19ebb6e766288226105418ae72fa22b3dce74944ba691b6064736f6c63430008140033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063715018a611610097578063c42569b211610066578063c42569b214610223578063d88ff4f514610236578063f2fde38b14610249578063f8e254dd1461025c57600080fd5b8063715018a6146101da5780638da5cb5b146101e2578063b2e39530146101fd578063b4da51fc1461021057600080fd5b80633141a13c116100d35780633141a13c146101875780633b6c7c111461019a578063486b58fa146101ad578063683f3dc3146101c057600080fd5b806310b37e4d1461010557806318f61b631461012e5780631afe11ef146101435780632360a41914610164575b600080fd5b610118610113366004610e2f565b61026f565b6040516101259190610eb9565b60405180910390f35b61014161013c366004610fb8565b61029a565b005b610156610151366004611089565b610369565b604051908152602001610125565b6101776101723660046110b5565b610390565b6040519015158152602001610125565b610177610195366004610e2f565b6103e2565b6101416101a83660046110fa565b610444565b6101776101bb36600461119f565b61089b565b6101c8600a81565b60405160ff9091168152602001610125565b6101416108ff565b6000546040516001600160a01b039091168152602001610125565b61015661020b3660046111e8565b610913565b61011861021e3660046110b5565b61094a565b6101776102313660046110b5565b610c00565b61011861024436600461119f565b610c18565b61014161025736600461121a565b610c45565b61011861026a3660046110b5565b610c88565b610277610d87565b6000610284868686610369565b90506102908184610c88565b9695505050505050565b6102a2610d0a565b84831415806102b15750848114155b156102cf576040516335c0365760e11b815260040160405180910390fd5b8460005b8181101561035a576103528d8d8d8d8d8d8d888181106102f5576102f561124a565b905060200201602081019061030a9190611260565b8c8c8981811061031c5761031c61124a565b905060200281019061032e919061127b565b8b8b8a8181106103405761034061124a565b90506020028101906101a8919061127b565b6001016102d3565b50505050505050505050505050565b60008161037e604085901b608087901b61129c565b610388919061129c565b949350505050565b6000600260008360018111156103a8576103a86112c3565b60018111156103b9576103b96112c3565b815260208082019290925260409081016000908120958152949091529092205460ff1692915050565b6000806103f0868686610369565b905060046000846001811115610408576104086112c3565b6001811115610419576104196112c3565b8152602080820192909252604090810160009081209381529290915290205460ff1695945050505050565b61044c610d0a565b600061045a89888888610913565b905060026000856001811115610472576104726112c3565b6001811115610483576104836112c3565b81526020808201929092526040908101600090812084825290925290205460ff16156104c2576040516329fae11360e01b815260040160405180910390fd5b60006104cf8a8a89610369565b9050600460008660018111156104e7576104e76112c3565b60018111156104f8576104f86112c3565b81526020808201929092526040908101600090812084825290925290205460ff161561053757604051630877857960e21b815260040160405180910390fd5b60006001600087600181111561054f5761054f6112c3565b6001811115610560576105606112c3565b815260208082019290925260409081016000908120868252835220863581559086013560018201559050604085016002820161059c82826112d9565b505060c08501600682016105b082826112d9565b50506101408501600a82016105c582826112d9565b50600090506105d86101c0870187611329565b9050905060005b8181101561064e57600e83016105f96101c0890189611329565b838181106106095761060961124a565b835460018101855560009485526020909420604090910292909201926002029091019050610644828281358155602082013560018201555050565b50506001016105df565b50600160026000896001811115610667576106676112c3565b6001811115610678576106786112c3565b8152602080820192909252604090810160009081208882529092528120805460ff1916921515929092179091556003818960018111156106ba576106ba6112c3565b60018111156106cb576106cb6112c3565b815260208082019290925260409081016000908120878252835220873581559087013560018201559050604086016002820161070782826112d9565b505060c086016006820161071b82826112d9565b50506101408601600a820161073082826112d9565b50600090506107436101c0880188611329565b9050905060005b818110156107b957600e83016107646101c08a018a611329565b838181106107745761077461124a565b8354600181018555600094855260209094206040909102929092019260020290910190506107af828281358155602082013560018201555050565b505060010161074a565b506001600460008b60018111156107d2576107d26112c3565b60018111156107e3576107e36112c3565b8152602001908152602001600020600087815260200190815260200160002060006101000a81548160ff0219169083151502179055507fb5eb693cc6c3cf0ba2a0f9d96dc6ed50059fc43caa9253d6202f2d48c15d1377858a60405161084a929190611373565b60405180910390a17f298d1d2d7c689e7717ba543af4cc2524314974d1522a4240b2cda0f362496e1f868a604051610883929190611373565b60405180910390a15050505050505050505050505050565b6000806108aa87878787610913565b9050600260008460018111156108c2576108c26112c3565b60018111156108d3576108d36112c3565b8152602080820192909252604090810160009081209381529290915290205460ff169695505050505050565b610907610d0a565b6109116000610d37565b565b600082604085901b61092d608088901b60c086901b61129c565b610937919061129c565b610941919061129c565b95945050505050565b610952610d87565b60026000836001811115610968576109686112c3565b6001811115610979576109796112c3565b81526020808201929092526040908101600090812086825290925290205460ff166109b757604051632f257a9d60e11b815260040160405180910390fd5b600160008360018111156109cd576109cd6112c3565b60018111156109de576109de6112c3565b8152602080820192909252604090810160009081208682528352819020815160e081018352815460a08201908152600183015460c0830152815282516080810180855291949293928501929091600280860192849290830191849182845b815481526020019060010190808311610a3c57505050918352505060408051808201918290526020909201919060028481019182845b815481526020019060010190808311610a72575050509190925250505081526040805160808101808352602090930192909160068501918391820190839060029082845b815481526020019060010190808311610ab657505050918352505060408051808201918290526020909201919060028481019182845b815481526020019060010190808311610aec5750505091909252505050815260408051608081018083526020909301929091600a8501918391820190839060029082845b815481526020019060010190808311610b3057505050918352505060408051808201918290526020909201919060028481019182845b815481526020019060010190808311610b66575050505050815250508152602001600e8201805480602002602001604051908101604052809291908181526020016000905b82821015610bf157838290600052602060002090600202016040518060400160405290816000820154815260200160018201548152505081526020019060010190610bab565b50505091525090949350505050565b6000600460008360018111156103a8576103a86112c3565b610c20610d87565b6000610c2e87878787610913565b9050610c3a818461094a565b979650505050505050565b610c4d610d0a565b6001600160a01b038116610c7c57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b610c8581610d37565b50565b610c90610d87565b60046000836001811115610ca657610ca66112c3565b6001811115610cb757610cb76112c3565b81526020808201929092526040908101600090812086825290925290205460ff16610cf45760405162f7dd2f60e71b815260040160405180910390fd5b600360008360018111156109cd576109cd6112c3565b6000546001600160a01b031633146109115760405163118cdaa760e01b8152336004820152602401610c73565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040805160e08101909152600060a0820181815260c0830191909152815260208101610db1610dd8565b8152602001610dbe610dd8565b8152602001610dcb610dd8565b8152602001606081525090565b6040518060400160405280610deb610dfd565b8152602001610df8610dfd565b905290565b60405180604001604052806002906020820280368337509192915050565b803560028110610e2a57600080fd5b919050565b60008060008060808587031215610e4557600080fd5b843593506020850135925060408501359150610e6360608601610e1b565b905092959194509250565b8060005b6002811015610e91578151845260209384019390910190600101610e72565b50505050565b610ea2828251610e6e565b6020810151610eb46040840182610e6e565b505050565b602080825282518051838301528101516040830152600090610200830181850151610ee76060860182610e97565b50604080860151610efb60e0870182610e97565b506060860151610f0f610160870182610e97565b5060808601516101e0868101528051928390528301916000906102208701905b80831015610f6057610f4c82865180518252602090810151910152565b938501936001929092019190830190610f2f565b50979650505050505050565b60008083601f840112610f7e57600080fd5b50813567ffffffffffffffff811115610f9657600080fd5b6020830191508360208260051b8501011115610fb157600080fd5b9250929050565b60008060008060008060008060008060006101008c8e031215610fda57600080fd5b8b359a5060208c0135995060408c0135985060608c0135975060808c0135965067ffffffffffffffff8060a08e0135111561101457600080fd5b6110248e60a08f01358f01610f6c565b909750955060c08d013581101561103a57600080fd5b61104a8e60c08f01358f01610f6c565b909550935060e08d013581101561106057600080fd5b506110718d60e08e01358e01610f6c565b81935080925050509295989b509295989b9093969950565b60008060006060848603121561109e57600080fd5b505081359360208301359350604090920135919050565b600080604083850312156110c857600080fd5b823591506110d860208401610e1b565b90509250929050565b60006101e082840312156110f457600080fd5b50919050565b600080600080600080600080610100898b03121561111757600080fd5b883597506020890135965060408901359550606089013594506080890135935061114360a08a01610e1b565b925060c089013567ffffffffffffffff8082111561116057600080fd5b61116c8c838d016110e1565b935060e08b013591508082111561118257600080fd5b5061118f8b828c016110e1565b9150509295985092959890939650565b600080600080600060a086880312156111b757600080fd5b853594506020860135935060408601359250606086013591506111dc60808701610e1b565b90509295509295909350565b600080600080608085870312156111fe57600080fd5b5050823594602084013594506040840135936060013592509050565b60006020828403121561122c57600080fd5b81356001600160a01b038116811461124357600080fd5b9392505050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561127257600080fd5b61124382610e1b565b600082356101de1983360301811261129257600080fd5b9190910192915050565b808201808211156112bd57634e487b7160e01b600052601160045260246000fd5b92915050565b634e487b7160e01b600052602160045260246000fd5b8160005b60028110156112fa578135838201556020909101906001016112dd565b50506040820160005b60028082106113125750610e91565b823584830190910155602090910190600101611303565b6000808335601e1984360301811261134057600080fd5b83018035915067ffffffffffffffff82111561135b57600080fd5b6020019150600681901b3603821315610fb157600080fd5b828152604081016002831061139857634e487b7160e01b600052602160045260246000fd5b826020830152939250505056fea2646970667358221220512c6c32f2b1c27b19ebb6e766288226105418ae72fa22b3dce74944ba691b6064736f6c63430008140033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.