diff --git a/contracts/src/consensus/Consensus.sol b/contracts/src/consensus/Consensus.sol index 73bb50f0d..6867fe178 100644 --- a/contracts/src/consensus/Consensus.sol +++ b/contracts/src/consensus/Consensus.sol @@ -12,6 +12,16 @@ struct Validator { ValidatorData data; } +struct RoundValidator { + address addr; + uint256 voteBalance; +} + +struct Round { + uint256 round; + RoundValidator[] validators; +} + struct Vote { address validator; uint256 balance; @@ -24,16 +34,6 @@ struct VoteResult { address validator; } -struct ValidatorRoundValidator { - address validatorAddress; - uint256 voteBalance; -} - -struct ValidatorRound { - uint256 round; - ValidatorRoundValidator[] validators; -} - event ValidatorRegistered(address addr, bytes bls12_381_public_key); event ValidatorResigned(address addr); @@ -82,7 +82,7 @@ contract Consensus { uint256 private _topValidatorsCount = 0; address[] private _calculatedTopValidators; - ValidatorRound[] private _validatorRounds; + RoundValidator[][] private _rounds; constructor() { _owner = msg.sender; @@ -160,13 +160,14 @@ contract Consensus { } } - // TODO: update _validatorRounds + RoundValidator[] storage round = _rounds.push(); address next = _topValidatorsHead; delete _calculatedTopValidators; _calculatedTopValidators = new address[](top); for (uint256 i = 0; i < top; i++) { _calculatedTopValidators[i] = next; + round.push(RoundValidator({addr: next, voteBalance: _registeredValidatorData[next].voteBalance})); next = _topValidators[next]; } } @@ -413,13 +414,21 @@ contract Consensus { } } - // TODO: allow passing limit to cap maximum number of returned items in case validator count is very high. - // the caller can paginate to retrieve all items. - function getValidatorRounds() public view onlyOwner returns (ValidatorRound[] memory) { - ValidatorRound[] memory result = new ValidatorRound[](_validatorRounds.length); - for (uint256 i = 0; i < _validatorRounds.length; i++) { - ValidatorRound storage data = _validatorRounds[i]; - result[i] = data; + function getRoundsCount() public view returns (uint256) { + return _rounds.length; + } + + function getRounds(uint256 offset, uint256 count) public view onlyOwner returns (Round[] memory) { + uint256 total = count; + if (offset >= _rounds.length) { + total = 0; + } else if (offset + count > _rounds.length) { + total = _rounds.length - offset; + } + + Round[] memory result = new Round[](total); + for (uint256 i = 0; i < total; i++) { + result[i] = Round({round: offset + i + 1, validators: _rounds[offset + i]}); } return result; diff --git a/contracts/test/consensus/Consensus-Rounds.sol b/contracts/test/consensus/Consensus-Rounds.sol new file mode 100644 index 000000000..9af54d652 --- /dev/null +++ b/contracts/test/consensus/Consensus-Rounds.sol @@ -0,0 +1,152 @@ +// SPDX-License-Identifier: GNU GENERAL PUBLIC LICENSE +pragma solidity ^0.8.13; + +import {Test, console} from "@forge-std/Test.sol"; +import {Consensus, Round} from "@contracts/consensus/Consensus.sol"; +import {Base} from "./Base.sol"; + +contract ConsensusTest is Base { + Consensus public consensus; + + function setUp() public { + consensus = new Consensus(); + } + + function test_revert_if_caller_is_not_owner() public { + vm.startPrank(address(1)); + + vm.expectRevert("Caller is not the contract owner"); + consensus.getRounds(0, 10); + } + + function test_should_return_empty() public view { + assertEq(consensus.getRoundsCount(), 0); + assertEq(consensus.getRounds(0, 10).length, 0); + } + + function test_should_return_round_with_one_validator() public { + address addr = address(1); + vm.startPrank(addr); + consensus.registerValidator(prepareBLSKey(addr)); + vm.stopPrank(); + + consensus.calculateTopValidators(1); + + assertEq(consensus.getRoundsCount(), 1); + Round[] memory rounds = consensus.getRounds(0, 10); + assertEq(rounds.length, 1); + assertEq(rounds[0].round, 1); + assertEq(rounds[0].validators.length, 1); + assertEq(rounds[0].validators[0].addr, addr); + } + + function test_should_keep_historic_vote_balance() public { + address addr = address(1); + vm.startPrank(addr); + consensus.registerValidator(prepareBLSKey(addr)); + vm.stopPrank(); + + // Round 1 + consensus.calculateTopValidators(1); + assertEq(consensus.getRoundsCount(), 1); + Round[] memory rounds = consensus.getRounds(0, 10); + assertEq(rounds.length, 1); + assertEq(rounds[0].round, 1); + assertEq(rounds[0].validators.length, 1); + assertEq(rounds[0].validators[0].addr, addr); + assertEq(rounds[0].validators[0].voteBalance, 0 ether); + + // Vote + address voterAddr1 = address(2); + vm.deal(voterAddr1, 100 ether); + vm.startPrank(voterAddr1); + consensus.vote(addr); + vm.stopPrank(); + + // Round 2 + consensus.calculateTopValidators(1); + assertEq(consensus.getRoundsCount(), 2); + rounds = consensus.getRounds(0, 10); + assertEq(rounds.length, 2); + assertEq(rounds[0].round, 1); + assertEq(rounds[0].validators.length, 1); + assertEq(rounds[0].validators[0].addr, addr); + assertEq(rounds[0].validators[0].voteBalance, 0 ether); + assertEq(rounds[1].round, 2); + assertEq(rounds[1].validators.length, 1); + assertEq(rounds[1].validators[0].addr, addr); + assertEq(rounds[1].validators[0].voteBalance, 100 ether); + + // Vote + address voterAddr2 = address(3); + vm.deal(voterAddr2, 100 ether); + vm.startPrank(voterAddr2); + consensus.vote(addr); + vm.stopPrank(); + + // Round 3 + consensus.calculateTopValidators(1); + assertEq(consensus.getRoundsCount(), 3); + rounds = consensus.getRounds(0, 10); + assertEq(rounds.length, 3); + assertEq(rounds[0].round, 1); + assertEq(rounds[0].validators.length, 1); + assertEq(rounds[0].validators[0].addr, addr); + assertEq(rounds[0].validators[0].voteBalance, 0 ether); + assertEq(rounds[1].round, 2); + assertEq(rounds[1].validators.length, 1); + assertEq(rounds[1].validators[0].addr, addr); + assertEq(rounds[1].validators[0].voteBalance, 100 ether); + assertEq(rounds[2].round, 3); + assertEq(rounds[2].validators.length, 1); + assertEq(rounds[2].validators[0].addr, addr); + assertEq(rounds[2].validators[0].voteBalance, 200 ether); + } + + function test_slice_should_work() public { + address addr = address(1); + vm.startPrank(addr); + consensus.registerValidator(prepareBLSKey(addr)); + vm.stopPrank(); + + // Create 3 rounds + consensus.calculateTopValidators(1); + consensus.calculateTopValidators(1); + consensus.calculateTopValidators(1); + + // Assert rounds count + assertEq(consensus.getRoundsCount(), 3); + + // Shoudl slice array if count is greater than rounds left + Round[] memory rounds = consensus.getRounds(0, 10); + assertEq(rounds.length, 3); + assertEq(rounds[0].round, 1); + assertEq(rounds[1].round, 2); + assertEq(rounds[2].round, 3); + + // Shoudl work with count 0 + rounds = consensus.getRounds(0, 0); + assertEq(rounds.length, 0); + + // Shoudl work with count 1 + rounds = consensus.getRounds(0, 1); + assertEq(rounds.length, 1); + assertEq(rounds[0].round, 1); + + // Shoudl respect offset + rounds = consensus.getRounds(1, 1); + assertEq(rounds.length, 1); + assertEq(rounds[0].round, 2); + + rounds = consensus.getRounds(2, 1); + assertEq(rounds.length, 1); + assertEq(rounds[0].round, 3); + + // Should return empty if out of range + rounds = consensus.getRounds(3, 1); + assertEq(rounds.length, 0); + + rounds = consensus.getRounds(100, 100); + assertEq(rounds.length, 0); + } +} diff --git a/contracts/test/consensus/Consensus-ValidatorRounds.sol b/contracts/test/consensus/Consensus-ValidatorRounds.sol deleted file mode 100644 index 90795486e..000000000 --- a/contracts/test/consensus/Consensus-ValidatorRounds.sol +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-License-Identifier: GNU GENERAL PUBLIC LICENSE -pragma solidity ^0.8.13; - -import {Test, console} from "@forge-std/Test.sol"; -import {Consensus, ValidatorRound, ValidatorRoundValidator} from "@contracts/consensus/Consensus.sol"; - -contract ConsensusTest is Test { - Consensus public consensus; - - function setUp() public { - consensus = new Consensus(); - } - - function test_getValidatorRounds() public view { - ValidatorRound[] memory validatorRounds = new ValidatorRound[](0); - - validatorRounds = consensus.getValidatorRounds(); - - assertEq(validatorRounds.length, 0); - } -} diff --git a/packages/api-sync/source/restore.ts b/packages/api-sync/source/restore.ts index 021837ce0..cf92a4e68 100644 --- a/packages/api-sync/source/restore.ts +++ b/packages/api-sync/source/restore.ts @@ -432,27 +432,11 @@ export class Restore { const t0 = performance.now(); let totalRounds = 0; + let validatorRounds: Models.ValidatorRound[] = []; - const rounds = await this.consensusContractService.getValidatorRounds(); - - for (const batch of chunk(rounds, 256)) { - const validatorRounds: Models.ValidatorRound[] = []; - - for (const { round, roundHeight, validators } of batch) { - const validatorAddresses: string[] = []; - const votes: string[] = []; - - for (const validator of validators) { - validatorAddresses.push(validator.address); - votes.push(Utils.BigNumber.make(validator.voteBalance).toFixed()); - } - - validatorRounds.push({ - round, - roundHeight, - validators: validatorAddresses, - votes, - }); + const insert = async () => { + if (validatorRounds.length === 0) { + return; } await context.validatorRoundRepository @@ -462,9 +446,33 @@ export class Restore { .values(validatorRounds) .execute(); - totalRounds += validatorRounds.length; + validatorRounds = []; + }; + + for await (const { round, roundHeight, validators } of this.consensusContractService.getValidatorRounds()) { + const validatorAddresses: string[] = []; + const votes: string[] = []; + + for (const validator of validators) { + validatorAddresses.push(validator.address); + votes.push(validator.voteBalance.toFixed()); + } + + validatorRounds.push({ + round, + roundHeight, + validators: validatorAddresses, + votes, + }); + totalRounds += 1; + + if (validatorRounds.length === 256) { + await insert(); + } } + await insert(); + const t1 = performance.now(); this.logger.info(`Restored ${totalRounds.toLocaleString()} validator rounds in ${t1 - t0}ms`); } diff --git a/packages/contracts/source/contracts/evm/contract-service.ts b/packages/contracts/source/contracts/evm/contract-service.ts index de1fb6f34..05a9bed7d 100644 --- a/packages/contracts/source/contracts/evm/contract-service.ts +++ b/packages/contracts/source/contracts/evm/contract-service.ts @@ -1,3 +1,5 @@ +import { BigNumber } from "@mainsail/utils"; + import { ValidatorWallet } from "../state/wallets.js"; export interface Vote { @@ -6,7 +8,7 @@ export interface Vote { } export interface ValidatorRoundValidator { - readonly voteBalance: bigint; + readonly voteBalance: BigNumber; readonly address: string; } @@ -21,5 +23,5 @@ export interface ConsensusContractService { getAllValidators(): Promise; getVotesCount(): Promise; getVotes(): AsyncIterable; - getValidatorRounds(): Promise; + getValidatorRounds(): AsyncIterable; } diff --git a/packages/evm-consensus/source/services/consensus-contract-service.ts b/packages/evm-consensus/source/services/consensus-contract-service.ts index 14b1554fc..03d08b7b7 100644 --- a/packages/evm-consensus/source/services/consensus-contract-service.ts +++ b/packages/evm-consensus/source/services/consensus-contract-service.ts @@ -5,6 +5,7 @@ import { BigNumber } from "@mainsail/utils"; import { ethers } from "ethers"; import { Identifiers as EvmConsensusIdentifiers } from "../identifiers.js"; +import { AsyncValidatorRoundsIterator } from "./rounds-iterator.js"; import { AsyncVotesIterator } from "./votes-iterator.js"; @injectable() @@ -97,46 +98,8 @@ export class ConsensusContractService implements Contracts.Evm.ConsensusContract return validatorWallets; } - async getValidatorRounds(): Promise { - const consensusContractAddress = this.app.get(EvmConsensusIdentifiers.Contracts.Addresses.Consensus); - const deployerAddress = this.app.get(EvmConsensusIdentifiers.Internal.Addresses.Deployer); - const { evmSpec } = this.configuration.getMilestone(); - - const iface = new ethers.Interface(ConsensusAbi.abi); - const data = iface.encodeFunctionData("getValidatorRounds").slice(2); - - const result = await this.evm.view({ - caller: deployerAddress, - data: Buffer.from(data, "hex"), - recipient: consensusContractAddress, - specId: evmSpec, - }); - - if (!result.success) { - await this.app.terminate("getValidatorRounds failed"); - } - - const [results] = iface.decodeFunctionResult("getValidatorRounds", result.output!); - - const validatorRounds: Contracts.Evm.ValidatorRound[] = []; - for (const [, validatorRound] of results.entries()) { - const [round, [validators]] = validatorRound; - - validatorRounds.push({ - round, - roundHeight: round, // TODO - validators: validators.map((validator) => { - const [validatorAddress, voteBalance] = validator; - - return { - address: validatorAddress, - voteBalance, - }; - }), - }); - } - - return validatorRounds; + getValidatorRounds(): AsyncIterable { + return this.app.resolve(AsyncValidatorRoundsIterator); } async getVotesCount(): Promise { diff --git a/packages/evm-consensus/source/services/rounds-iterator.ts b/packages/evm-consensus/source/services/rounds-iterator.ts new file mode 100644 index 000000000..8860164c2 --- /dev/null +++ b/packages/evm-consensus/source/services/rounds-iterator.ts @@ -0,0 +1,91 @@ +import { inject, injectable, tagged } from "@mainsail/container"; +import { Contracts, Identifiers } from "@mainsail/contracts"; +import { ConsensusAbi } from "@mainsail/evm-contracts"; +import { Utils } from "@mainsail/kernel"; +import { BigNumber } from "@mainsail/utils"; +import { ethers } from "ethers"; + +import { Identifiers as EvmConsensusIdentifiers } from "../identifiers.js"; + +const ROUNDS_PER_REQUEST = 10_000; + +@injectable() +export class AsyncValidatorRoundsIterator implements AsyncIterable { + @inject(Identifiers.Application.Instance) + private readonly app!: Contracts.Kernel.Application; + + @inject(Identifiers.Cryptography.Configuration) + private readonly configuration!: Contracts.Crypto.Configuration; + + @inject(Identifiers.Evm.Instance) + @tagged("instance", "evm") + private readonly evm!: Contracts.Evm.Instance; + + #rounds: Contracts.Evm.ValidatorRound[] = []; + #index = 0; // Index of returned round in chunk + #offset = 0; // Offset for querying rounds + + [Symbol.asyncIterator](): AsyncIterator { + return this; + } + + async next(): Promise> { + if (this.#rounds.length === this.#index) { + this.#rounds = await this.getRounds(); + + if (this.#rounds.length === 0) { + return { done: true, value: undefined }; + } + + this.#index = 0; + this.#offset += this.#rounds.length; + } + + return { done: false, value: this.#rounds[this.#index++] }; + } + + private async getRounds(): Promise { + const consensusContractAddress = this.app.get(EvmConsensusIdentifiers.Contracts.Addresses.Consensus); + const deployerAddress = this.app.get(EvmConsensusIdentifiers.Internal.Addresses.Deployer); + const { evmSpec } = this.configuration.getMilestone(); + + const iface = new ethers.Interface(ConsensusAbi.abi); + const data = iface.encodeFunctionData("getRounds", [this.#offset, ROUNDS_PER_REQUEST]).slice(2); + + const result = await this.evm.view({ + caller: deployerAddress, + data: Buffer.from(data, "hex"), + recipient: consensusContractAddress, + specId: evmSpec, + }); + + if (!result.success) { + await this.app.terminate("getRounds failed"); + } + + const [results] = iface.decodeFunctionResult("getRounds", result.output!); + + const validatorRounds: Contracts.Evm.ValidatorRound[] = []; + for (const validatorRound of results) { + const [round, validators] = validatorRound; + + const roundNumber = Number(round); + + validatorRounds.push({ + round: roundNumber, + roundHeight: Utils.roundCalculator.calculateRoundInfoByRound(roundNumber, this.configuration) + .roundHeight, + validators: validators.map((validator) => { + const [validatorAddress, voteBalance] = validator; + + return { + address: validatorAddress, + voteBalance: BigNumber.make(voteBalance), + }; + }), + }); + } + + return validatorRounds; + } +} diff --git a/packages/evm-contracts/source/abis/Consensus.json b/packages/evm-contracts/source/abis/Consensus.json index ec8435334..ff0234cd8 100644 --- a/packages/evm-contracts/source/abis/Consensus.json +++ b/packages/evm-contracts/source/abis/Consensus.json @@ -1,33 +1,17 @@ { "abi": [ - { - "type": "constructor", - "inputs": [], - "stateMutability": "nonpayable" - }, + { "type": "constructor", "inputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "activeValidatorsCount", "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "calculateTopValidators", - "inputs": [ - { - "name": "n", - "type": "uint8", - "internalType": "uint8" - } - ], + "inputs": [{ "name": "n", "type": "uint8", "internalType": "uint8" }], "outputs": [], "stateMutability": "nonpayable" }, @@ -41,36 +25,16 @@ "type": "tuple[]", "internalType": "struct Validator[]", "components": [ - { - "name": "addr", - "type": "address", - "internalType": "address" - }, + { "name": "addr", "type": "address", "internalType": "address" }, { "name": "data", "type": "tuple", "internalType": "struct ValidatorData", "components": [ - { - "name": "votersCount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "voteBalance", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "isResigned", - "type": "bool", - "internalType": "bool" - }, - { - "name": "bls12_381_public_key", - "type": "bytes", - "internalType": "bytes" - } + { "name": "votersCount", "type": "uint256", "internalType": "uint256" }, + { "name": "voteBalance", "type": "uint256", "internalType": "uint256" }, + { "name": "isResigned", "type": "bool", "internalType": "bool" }, + { "name": "bls12_381_public_key", "type": "bytes", "internalType": "bytes" } ] } ] @@ -80,44 +44,25 @@ }, { "type": "function", - "name": "getTopValidators", - "inputs": [], + "name": "getRounds", + "inputs": [ + { "name": "offset", "type": "uint256", "internalType": "uint256" }, + { "name": "count", "type": "uint256", "internalType": "uint256" } + ], "outputs": [ { "name": "", "type": "tuple[]", - "internalType": "struct Validator[]", + "internalType": "struct Round[]", "components": [ + { "name": "round", "type": "uint256", "internalType": "uint256" }, { - "name": "addr", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "tuple", - "internalType": "struct ValidatorData", + "name": "validators", + "type": "tuple[]", + "internalType": "struct RoundValidator[]", "components": [ - { - "name": "votersCount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "voteBalance", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "isResigned", - "type": "bool", - "internalType": "bool" - }, - { - "name": "bls12_381_public_key", - "type": "bytes", - "internalType": "bytes" - } + { "name": "addr", "type": "address", "internalType": "address" }, + { "name": "voteBalance", "type": "uint256", "internalType": "uint256" } ] } ] @@ -127,50 +72,31 @@ }, { "type": "function", - "name": "getValidator", - "inputs": [ - { - "name": "_addr", - "type": "address", - "internalType": "address" - } - ], + "name": "getRoundsCount", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getTopValidators", + "inputs": [], "outputs": [ { "name": "", - "type": "tuple", - "internalType": "struct Validator", + "type": "tuple[]", + "internalType": "struct Validator[]", "components": [ - { - "name": "addr", - "type": "address", - "internalType": "address" - }, + { "name": "addr", "type": "address", "internalType": "address" }, { "name": "data", "type": "tuple", "internalType": "struct ValidatorData", "components": [ - { - "name": "votersCount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "voteBalance", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "isResigned", - "type": "bool", - "internalType": "bool" - }, - { - "name": "bls12_381_public_key", - "type": "bytes", - "internalType": "bytes" - } + { "name": "votersCount", "type": "uint256", "internalType": "uint256" }, + { "name": "voteBalance", "type": "uint256", "internalType": "uint256" }, + { "name": "isResigned", "type": "bool", "internalType": "bool" }, + { "name": "bls12_381_public_key", "type": "bytes", "internalType": "bytes" } ] } ] @@ -180,34 +106,24 @@ }, { "type": "function", - "name": "getValidatorRounds", - "inputs": [], + "name": "getValidator", + "inputs": [{ "name": "_addr", "type": "address", "internalType": "address" }], "outputs": [ { "name": "", - "type": "tuple[]", - "internalType": "struct ValidatorRound[]", + "type": "tuple", + "internalType": "struct Validator", "components": [ + { "name": "addr", "type": "address", "internalType": "address" }, { - "name": "round", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "validators", - "type": "tuple[]", - "internalType": "struct ValidatorRoundValidator[]", + "name": "data", + "type": "tuple", + "internalType": "struct ValidatorData", "components": [ - { - "name": "validatorAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "voteBalance", - "type": "uint256", - "internalType": "uint256" - } + { "name": "votersCount", "type": "uint256", "internalType": "uint256" }, + { "name": "voteBalance", "type": "uint256", "internalType": "uint256" }, + { "name": "isResigned", "type": "bool", "internalType": "bool" }, + { "name": "bls12_381_public_key", "type": "bytes", "internalType": "bytes" } ] } ] @@ -219,16 +135,8 @@ "type": "function", "name": "getVotes", "inputs": [ - { - "name": "addr", - "type": "address", - "internalType": "address" - }, - { - "name": "count", - "type": "uint256", - "internalType": "uint256" - } + { "name": "addr", "type": "address", "internalType": "address" }, + { "name": "count", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { @@ -236,16 +144,8 @@ "type": "tuple[]", "internalType": "struct VoteResult[]", "components": [ - { - "name": "voter", - "type": "address", - "internalType": "address" - }, - { - "name": "validator", - "type": "address", - "internalType": "address" - } + { "name": "voter", "type": "address", "internalType": "address" }, + { "name": "validator", "type": "address", "internalType": "address" } ] } ], @@ -255,44 +155,20 @@ "type": "function", "name": "getVotesCount", "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "isValidatorRegistered", - "inputs": [ - { - "name": "addr", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], + "inputs": [{ "name": "addr", "type": "address", "internalType": "address" }], + "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], "stateMutability": "view" }, { "type": "function", "name": "registerValidator", - "inputs": [ - { - "name": "bls12_381_public_key", - "type": "bytes", - "internalType": "bytes" - } - ], + "inputs": [{ "name": "bls12_381_public_key", "type": "bytes", "internalType": "bytes" }], "outputs": [], "stateMutability": "nonpayable" }, @@ -300,42 +176,18 @@ "type": "function", "name": "registeredValidatorsCount", "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, - { - "type": "function", - "name": "resignValidator", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, + { "type": "function", "name": "resignValidator", "inputs": [], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "resignedValidatorsCount", "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, - { - "type": "function", - "name": "unvote", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, + { "type": "function", "name": "unvote", "inputs": [], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "updateValidator", @@ -345,36 +197,16 @@ "type": "tuple", "internalType": "struct Validator", "components": [ - { - "name": "addr", - "type": "address", - "internalType": "address" - }, + { "name": "addr", "type": "address", "internalType": "address" }, { "name": "data", "type": "tuple", "internalType": "struct ValidatorData", "components": [ - { - "name": "votersCount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "voteBalance", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "isResigned", - "type": "bool", - "internalType": "bool" - }, - { - "name": "bls12_381_public_key", - "type": "bytes", - "internalType": "bytes" - } + { "name": "votersCount", "type": "uint256", "internalType": "uint256" }, + { "name": "voteBalance", "type": "uint256", "internalType": "uint256" }, + { "name": "isResigned", "type": "bool", "internalType": "bool" }, + { "name": "bls12_381_public_key", "type": "bytes", "internalType": "bytes" } ] } ] @@ -386,26 +218,14 @@ { "type": "function", "name": "updateVoters", - "inputs": [ - { - "name": "voters", - "type": "address[]", - "internalType": "address[]" - } - ], + "inputs": [{ "name": "voters", "type": "address[]", "internalType": "address[]" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "vote", - "inputs": [ - { - "name": "addr", - "type": "address", - "internalType": "address" - } - ], + "inputs": [{ "name": "addr", "type": "address", "internalType": "address" }], "outputs": [], "stateMutability": "nonpayable" }, @@ -413,18 +233,8 @@ "type": "event", "name": "Unvoted", "inputs": [ - { - "name": "voter", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "validator", - "type": "address", - "indexed": false, - "internalType": "address" - } + { "name": "voter", "type": "address", "indexed": false, "internalType": "address" }, + { "name": "validator", "type": "address", "indexed": false, "internalType": "address" } ], "anonymous": false }, @@ -432,66 +242,55 @@ "type": "event", "name": "ValidatorRegistered", "inputs": [ - { - "name": "addr", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "bls12_381_public_key", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - } + { "name": "addr", "type": "address", "indexed": false, "internalType": "address" }, + { "name": "bls12_381_public_key", "type": "bytes", "indexed": false, "internalType": "bytes" } ], "anonymous": false }, { "type": "event", "name": "ValidatorResigned", - "inputs": [ - { - "name": "addr", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], + "inputs": [{ "name": "addr", "type": "address", "indexed": false, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "Voted", "inputs": [ - { - "name": "voter", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "validator", - "type": "address", - "indexed": false, - "internalType": "address" - } + { "name": "voter", "type": "address", "indexed": false, "internalType": "address" }, + { "name": "validator", "type": "address", "indexed": false, "internalType": "address" } ], "anonymous": false } ], "bytecode": { - "object": "0x60a06040525f80805560018190556007819055600880546001600160a01b0319908116909155600980549091169055600c5534801561003c575f5ffd5b5033608052608051612a7661007c5f395f81816103c6015281816106df01528181610a5501528181610da2015281816110c7015261160c0152612a765ff3fe608060405234801561000f575f5ffd5b5060043610610106575f3560e01c80636dd7d8ea1161009e578063b85f5da21161006e578063b85f5da2146101e4578063d04a68c7146101ec578063eb9019d414610227578063f1bd0b3714610247578063f3513a371461024e575f5ffd5b80636dd7d8ea14610194578063a721c30a146101a7578063afeea115146101bc578063b5cfa68c146101d1575f5ffd5b80632bdf6d43116100d95780632bdf6d43146101515780633174b68914610166578063602a9eee1461016e5780636252587914610181575f5ffd5b80630777cbef1461010a5780630d2bd909146101215780631904bb2e146101295780631b605b8614610149575b5f5ffd5b6001545b6040519081526020015b60405180910390f35b600d5461010e565b61013c61013736600461230b565b610256565b60405161011891906123af565b60075461010e565b61016461015f3660046123c1565b6103bb565b005b610164610449565b61016461017c366004612430565b6106d5565b61016461018f36600461248c565b6109b0565b6101646101a236600461230b565b610a4b565b6101af610d95565b60405161011891906124c2565b6101c4610f25565b604051610118919061257b565b6101646101df3660046125d2565b6110bc565b6101646114de565b6102176101fa36600461230b565b6001600160a01b03165f9081526003602052604090205460ff1690565b6040519015158152602001610118565b61023a6102353660046125f2565b6115ff565b604051610118919061261a565b5f5461010e565b6101c4611842565b61025e612215565b6001600160a01b0382165f9081526003602052604090205460ff166102ca5760405162461bcd60e51b815260206004820152601c60248201527f56616c696461746f724461746120646f65736e2774206578697374730000000060448201526064015b60405180910390fd5b6040805180820182526001600160a01b0384168082525f90815260026020818152918490208451608081018652815481526001820154818501529181015460ff1615159482019490945260038401805493949285019391929160608401919061033290612674565b80601f016020809104026020016040519081016040528092919081815260200182805461035e90612674565b80156103a95780601f10610380576101008083540402835291602001916103a9565b820191905f5260205f20905b81548152906001019060200180831161038c57829003601f168201915b50505091909252505050905292915050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104035760405162461bcd60e51b81526004016102c1906126ac565b5f5b818110156104445761043c838383818110610422576104226126e1565b9050602002016020810190610437919061230b565b6119d9565b600101610405565b505050565b335f90815260066020526040902080546001600160a01b03166104a05760405162461bcd60e51b815260206004820152600f60248201526e1513d113ce881b9bdd081d9bdd1959608a1b60448201526064016102c1565b6009546008546001600160a01b039182169116036104d957600880546001600160a01b03199081169091556009805490911690556105ec565b600954336001600160a01b0390911603610532576002810180546001600160a01b039081165f90815260066020526040902060030180546001600160a01b031990811690915591546009805490931691161790556105ec565b600854336001600160a01b0390911603610596576009546001600160a01b039081165f9081526006602052604080822060020180546001600160a01b03199081169091556008805480861685529290932060030154911692169190911790556105ec565b60038181018054600280850180546001600160a01b039081165f9081526006602052604080822090970180549583166001600160a01b031996871617905591549454811682529490200180549290931691161790555b8054604080513381526001600160a01b0390921660208301527f6572af8bf9a0a86efb88dcc30011626a15c9c4603503aa4466a3f87a1867deef910160405180910390a180546001600160a01b03165f908152600260205260408120600180840154908201805492939192909190610665908490612709565b9091555050805460019082905f9061067e908490612709565b9091555050335f90815260066020526040812080546001600160a01b03199081168255600182018390556002820180548216905560039091018054909116905560078054916106cc8361271c565b91905055505050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361074d5760405162461bcd60e51b815260206004820152601c60248201527f43616c6c65722069732074686520636f6e7472616374206f776e65720000000060448201526064016102c1565b335f9081526003602052604090205460ff16156107ac5760405162461bcd60e51b815260206004820152601f60248201527f56616c696461746f7220697320616c726561647920726567697374657265640060448201526064016102c1565b5f82826040516107bd929190612731565b60408051918290039091205f8181526004602052919091205490915060ff16156108355760405162461bcd60e51b815260206004820152602360248201527f424c5331322d333831206b657920697320616c726561647920726567697374656044820152621c995960ea1b60648201526084016102c1565b61083f8383611ab9565b5f60405180608001604052805f81526020015f81526020015f1515815260200185858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92018290525093909452505080549293509050806108a783612740565b9091555050335f9081526003602081815260408084208054600160ff19918216811790925560028085529583902087518155938701519184019190915590850151938201805490911693151593909317909255606083015183929182019061090f90826127b7565b5050505f82815260046020526040808220805460ff191660019081179091556005805491820181559092527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090910180546001600160a01b0319163390811790915590517f61809fa303a3a57f4d70552f533f3e0b003173d424590cd4bb22a2afe000990c916109a29187908790612871565b60405180910390a150505050565b6109c06101fa602083018361230b565b610a0c5760405162461bcd60e51b815260206004820152601c60248201527f56616c696461746f724461746120646f65736e2774206578697374730000000060448201526064016102c1565b610a1960208201826128b0565b60025f610a29602085018561230b565b6001600160a01b0316815260208101919091526040015f206104448282612987565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303610ac35760405162461bcd60e51b815260206004820152601c60248201527f43616c6c65722069732074686520636f6e7472616374206f776e65720000000060448201526064016102c1565b6001600160a01b0381165f9081526003602052604090205460ff16610b2a5760405162461bcd60e51b815260206004820152601760248201527f4d75737420766f746520666f722076616c696461746f7200000000000000000060448201526064016102c1565b335f908152600660205260409020546001600160a01b031615610b7f5760405162461bcd60e51b815260206004820152600d60248201526c105b1c9958591e481d9bdd1959609a1b60448201526064016102c1565b6001600160a01b0381165f9081526002602081905260409091209081015460ff1615610bf85760405162461bcd60e51b815260206004820152602260248201527f4d75737420766f746520666f7220756e72657369676e65642076616c6964617460448201526137b960f11b60648201526084016102c1565b604080516080810182526001600160a01b03808516825233803160208085019182525f85870181815260608701828152948252600690925295909520935184549084166001600160a01b03199182161785559051600185015593516002840180549184169186169190911790555160039092018054928216929093169190911790915560085416610caa5760088054336001600160a01b03199182168117909255600980549091169091179055610d01565b600980546001600160a01b039081165f9081526006602052604080822060030180546001600160a01b0319908116339081179092558554828552929093206002018054841692909416919091179092558254161790555b60078054905f610d1083612740565b9190505550336001600160a01b031631816001015f828254610d329190612a0e565b9091555050805460019082905f90610d4b908490612a0e565b9091555050604080513381526001600160a01b03841660208201527fce0c7a2a940807f7dc2ce7a615c2532e915e6c0ac9a08bc4ed9d515a710a53e2910160405180910390a15050565b6060336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610ddf5760405162461bcd60e51b81526004016102c1906126ac565b600e545f906001600160401b03811115610dfb57610dfb612758565b604051908082528060200260200182016040528015610e4057816020015b604080518082019091525f815260606020820152815260200190600190039081610e195790505b5090505f5b600e54811015610f1f575f600e8281548110610e6357610e636126e1565b905f5260205f2090600202019050806040518060400160405290815f820154815260200160018201805480602002602001604051908101604052809291908181526020015f905b82821015610ef1575f848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101610eaa565b5050505081525050838381518110610f0b57610f0b6126e1565b602090810291909101015250600101610e45565b50905090565b600d546060905f906001600160401b03811115610f4457610f44612758565b604051908082528060200260200182016040528015610f7d57816020015b610f6a612215565b815260200190600190039081610f625790505b5090505f5b600d54811015610f1f575f600d8281548110610fa057610fa06126e1565b5f9182526020808320909101546001600160a01b03168083526002808352604093849020845180860186528381528551608081018752825481526001830154818701529282015460ff161515958301959095526003810180549396509094938401928591606084019161101290612674565b80601f016020809104026020016040519081016040528092919081815260200182805461103e90612674565b80156110895780601f1061106057610100808354040283529160200191611089565b820191905f5260205f20905b81548152906001019060200180831161106c57829003601f168201915b5050505050815250508152508484815181106110a7576110a76126e1565b60209081029190910101525050600101610f82565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146111045760405162461bcd60e51b81526004016102c1906126ac565b61110c611b1b565b611114611c6a565b600a80546001600160a01b03191690556001545f805490916111469160ff85169184916111419190612709565b611cbb565b90508060ff165f03611156575050565b5f5b600554811015611401575f60058281548110611176576111766126e1565b5f9182526020808320909101546001600160a01b03168083526002918290526040909220908101549192509060ff16156111b15750506113f9565b600a546001600160a01b03166111ec5750600a80546001600160a01b0319166001600160a01b03929092169190911790556001600c556113f9565b8360ff16600c54101561120a576112038285611d4c565b50506113f9565b600a546001600160a01b039081165f908152600260208181526040928390208351808501855294871685528351608081018552865481526001870154818401529286015460ff1615159383019390935260038501805493946113e69490939284019291879160608401919061127e90612674565b80601f01602080910402602001604051908101604052809291908181526020018280546112aa90612674565b80156112f55780601f106112cc576101008083540402835291602001916112f5565b820191905f5260205f20905b8154815290600101906020018083116112d857829003601f168201915b505050919092525050509052604080518082018252600a546001600160a01b031681528151608081018352855481526001860154602082810191909152600287015460ff1615159382019390935260038601805492938401928791606084019161135e90612674565b80601f016020809104026020016040519081016040528092919081815260200182805461138a90612674565b80156113d55780601f106113ac576101008083540402835291602001916113d5565b820191905f5260205f20905b8154815290600101906020018083116113b857829003601f168201915b50505050508152505081525061212b565b156113f5576113f58386611d4c565b5050505b600101611158565b50600a546001600160a01b0316611419600d5f61225e565b8160ff166001600160401b0381111561143457611434612758565b60405190808252806020026020018201604052801561145d578160200160208202803683370190505b50805161147291600d91602090910190612279565b505f5b8260ff168110156114d75781600d8281548110611494576114946126e1565b5f91825260208083209190910180546001600160a01b0319166001600160a01b039485161790559382168152600b90935260409092205490911690600101611475565b5050505b50565b335f9081526003602052604090205460ff1661153c5760405162461bcd60e51b815260206004820152601960248201527f43616c6c6572206973206e6f7420612076616c696461746f720000000000000060448201526064016102c1565b335f9081526002602081905260409091209081015460ff16156115a15760405162461bcd60e51b815260206004820152601d60248201527f56616c696461746f7220697320616c72656164792072657369676e656400000060448201526064016102c1565b60028101805460ff19166001908117909155805481905f906115c4908390612a0e565b90915550506040513381527f24250fc1ec78a1405ddd4cc8b75964858af228d05faa8d4bc1302966d8a541179060200160405180910390a150565b6060336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146116495760405162461bcd60e51b81526004016102c1906126ac565b5f611657835f600754611cbb565b6001600160401b0381111561166e5761166e612758565b6040519080825280602002602001820160405280156116b257816020015b604080518082019091525f808252602082015281526020019060019003908161168c5790505b506008549091506001600160a01b03908116908516156116eb57506001600160a01b038085165f90815260066020526040902060030154165b5f5b6001600160a01b0382161580159061170457508481105b15611779576001600160a01b038083165f81815260066020908152604091829020825180840190935292825282549093169281019290925290848361174881612740565b94508151811061175a5761175a6126e1565b6020908102919091010152600301546001600160a01b031691506116ed565b8083510361178c5782935050505061183c565b5f816001600160401b038111156117a5576117a5612758565b6040519080825280602002602001820160405280156117e957816020015b604080518082019091525f80825260208201528152602001906001900390816117c35790505b5090505f5b8281101561183557848181518110611808576118086126e1565b6020026020010151828281518110611822576118226126e1565b60209081029190910101526001016117ee565b5093505050505b92915050565b6005546060905f906001600160401b0381111561186157611861612758565b60405190808252806020026020018201604052801561189a57816020015b611887612215565b81526020019060019003908161187f5790505b5090505f5b600554811015610f1f575f600582815481106118bd576118bd6126e1565b5f9182526020808320909101546001600160a01b03168083526002808352604093849020845180860186528381528551608081018752825481526001830154818701529282015460ff161515958301959095526003810180549396509094938401928591606084019161192f90612674565b80601f016020809104026020016040519081016040528092919081815260200182805461195b90612674565b80156119a65780601f1061197d576101008083540402835291602001916119a6565b820191905f5260205f20905b81548152906001019060200180831161198957829003601f168201915b5050505050815250508152508484815181106119c4576119c46126e1565b6020908102919091010152505060010161189f565b6001600160a01b038082165f90815260066020526040902080549091166119fe575050565b60018101546001600160a01b03831631811015611a5f57611a29816001600160a01b03851631612709565b82546001600160a01b03165f9081526002602052604081206001018054909190611a54908490612a0e565b90915550611aa49050565b611a736001600160a01b0384163182612709565b82546001600160a01b03165f9081526002602052604081206001018054909190611a9e908490612709565b90915550505b506001600160a01b0390911631600190910155565b60308114611b175760405162461bcd60e51b815260206004820152602560248201527f424c5331322d333831207075626c69634b6579206c656e67746820697320696e6044820152641d985b1a5960da1b60648201526084016102c1565b5050565b6005545f611b2a600183612709565b90505b8015611b17575f611b3f826001612a0e565b60408051426020820152449181019190915260608101849052608001604051602081830303815290604052805190602001205f1c611b7d9190612a21565b90505f60058381548110611b9357611b936126e1565b5f91825260209091200154600580546001600160a01b0390921692509083908110611bc057611bc06126e1565b5f91825260209091200154600580546001600160a01b039092169185908110611beb57611beb6126e1565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055508060058381548110611c2a57611c2a6126e1565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555050508080611c629061271c565b915050611b2d565b600a546001600160a01b03165b6001600160a01b03811615611cb4576001600160a01b039081165f908152600b6020526040902080546001600160a01b0319811690915516611c77565b505f600c55565b5f81831115611d245760405162461bcd60e51b815260206004820152602f60248201527f4d696e696d756d2073686f756c64206265206c657373207468616e206f72206560448201526e7175616c20746f206d6178696d756d60881b60648201526084016102c1565b82841015611d33575081611d45565b81841115611d42575080611d45565b50825b9392505050565b6001600160a01b0382165f9081526002602081815260408084208151608081018352815481526001820154938101939093529283015460ff16151590820152600382018054919291606084019190611da390612674565b80601f0160208091040260200160405190810160405280929190818152602001828054611dcf90612674565b8015611e1a5780601f10611df157610100808354040283529160200191611e1a565b820191905f5260205f20905b815481529060010190602001808311611dfd57829003601f168201915b505050919092525050604080518082018252600a546001600160a01b03168082525f90815260026020818152918490208451608081018652815481526001820154818501529181015460ff16151594820194909452600384018054969750611f3b9693955091850193909290916060840191611e9590612674565b80601f0160208091040260200160405190810160405280929190818152602001828054611ec190612674565b8015611f0c5780601f10611ee357610100808354040283529160200191611f0c565b820191905f5260205f20905b815481529060010190602001808311611eef57829003601f168201915b5050505050815250508152506040518060400160405280866001600160a01b031681526020018481525061212b565b15611f4e57611f498361216f565b6120cc565b600a546001600160a01b039081165f818152600b6020526040902054909116905b6001600160a01b038216611f8c57611f8781866121c0565b6120c9565b6040805180820182526001600160a01b0384168082525f90815260026020818152918490208451608081018652815481526001820154818501529181015460ff161515948201949094526003840180546120999593850193916060840191611ff390612674565b80601f016020809104026020016040519081016040528092919081815260200182805461201f90612674565b801561206a5780601f106120415761010080835404028352916020019161206a565b820191905f5260205f20905b81548152906001019060200180831161204d57829003601f168201915b5050505050815250508152506040518060400160405280886001600160a01b031681526020018681525061212b565b156120a857611f8781866121c0565b506001600160a01b038082165f908152600b60205260409020541690611f6f565b50505b8160ff16600c54111561044457600a80546001600160a01b039081165f908152600b6020526040812080546001600160a01b03198082169092558454931692168217909255600c805491926121208361271c565b919050555050505050565b5f8160200151602001518360200151602001510361215b5750805182516001600160a01b0391821691161161183c565b506020908101518101519181015101511190565b600a80546001600160a01b038381165f818152600b602052604081208054939094166001600160a01b031993841617909355835490911617909155600c8054916121b883612740565b919050555050565b6001600160a01b038281165f818152600b602052604080822080548686168085529284208054919096166001600160a01b03199182161790955592825282549093169092179055600c8054916106cc83612740565b60405180604001604052805f6001600160a01b0316815260200161225960405180608001604052805f81526020015f81526020015f15158152602001606081525090565b905290565b5080545f8255905f5260205f20908101906114db91906122dc565b828054828255905f5260205f209081019282156122cc579160200282015b828111156122cc57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612297565b506122d89291506122dc565b5090565b5b808211156122d8575f81556001016122dd565b80356001600160a01b0381168114612306575f5ffd5b919050565b5f6020828403121561231b575f5ffd5b611d45826122f0565b60018060a01b0381511682525f602082015160406020850152805160408501526020810151606085015260408101511515608085015260608101519050608060a085015280518060c08601525f5b8181101561238f57602081840181015160e0888401015201612372565b505f60e0828701015260e0601f19601f8301168601019250505092915050565b602081525f611d456020830184612324565b5f5f602083850312156123d2575f5ffd5b82356001600160401b038111156123e7575f5ffd5b8301601f810185136123f7575f5ffd5b80356001600160401b0381111561240c575f5ffd5b8560208260051b8401011115612420575f5ffd5b6020919091019590945092505050565b5f5f60208385031215612441575f5ffd5b82356001600160401b03811115612456575f5ffd5b8301601f81018513612466575f5ffd5b80356001600160401b0381111561247b575f5ffd5b856020828401011115612420575f5ffd5b5f6020828403121561249c575f5ffd5b81356001600160401b038111156124b1575f5ffd5b820160408185031215611d45575f5ffd5b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b8281101561256f57868503603f19018452815180518652602090810151604082880181905281519088018190529101905f9060608801905b8083101561255757835180516001600160a01b03168352602090810151818401529093019260019290920191604090910190612520565b509650505060209384019391909101906001016124e8565b50929695505050505050565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b8281101561256f57603f198786030184526125bd858351612324565b945060209384019391909101906001016125a1565b5f602082840312156125e2575f5ffd5b813560ff81168114611d45575f5ffd5b5f5f60408385031215612603575f5ffd5b61260c836122f0565b946020939093013593505050565b602080825282518282018190525f918401906040840190835b8181101561266957835180516001600160a01b039081168552602091820151168185015290930192604090920191600101612633565b509095945050505050565b600181811c9082168061268857607f821691505b6020821081036126a657634e487b7160e01b5f52602260045260245ffd5b50919050565b6020808252818101527f43616c6c6572206973206e6f742074686520636f6e7472616374206f776e6572604082015260600190565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b8181038181111561183c5761183c6126f5565b5f8161272a5761272a6126f5565b505f190190565b818382375f9101908152919050565b5f60018201612751576127516126f5565b5060010190565b634e487b7160e01b5f52604160045260245ffd5b601f82111561044457805f5260205f20601f840160051c810160208510156127915750805b601f840160051c820191505b818110156127b0575f815560010161279d565b5050505050565b81516001600160401b038111156127d0576127d0612758565b6127e4816127de8454612674565b8461276c565b6020601f821160018114612816575f83156127ff5750848201515b5f19600385901b1c1916600184901b1784556127b0565b5f84815260208120601f198516915b828110156128455787850151825560209485019460019092019101612825565b508482101561286257868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b6001600160a01b03841681526040602082018190528101829052818360608301375f818301606090810191909152601f909201601f1916010192915050565b5f8235607e198336030181126128c4575f5ffd5b9190910192915050565b6001600160401b038311156128e5576128e5612758565b6128f9836128f38354612674565b8361276c565b5f601f84116001811461292a575f85156129135750838201355b5f19600387901b1c1916600186901b1783556127b0565b5f83815260208120601f198716915b828110156129595786850135825560209485019460019092019101612939565b5086821015612975575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81358155602082013560018201556002810160408301358015158082146129ac575f5ffd5b60ff19835416915060ff8116821783555050506060820135601e198336030181126129d5575f5ffd5b820180356001600160401b038111156129ec575f5ffd5b602082019150803603821315612a00575f5ffd5b6114d78183600386016128ce565b8082018082111561183c5761183c6126f5565b5f82612a3b57634e487b7160e01b5f52601260045260245ffd5b50069056fea2646970667358221220d90b972d50037d21377b7a807e45398c22fd367517bb6aea9337d2d9fccf443764736f6c634300081b0033", - "sourceMap": "1639:13765:23:-:0;;;1740:1;1695:46;;;1747:44;;;;2083:32;;;;2121:40;;;-1:-1:-1;;;;;;2121:40:23;;;;;;2167;;;;;;;;2310:39;;2452:50;;;;;;;;;-1:-1:-1;2485:10:23;2476:19;;1639:13765;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", + "object": "0x60a06040525f80805560018190556007819055600880546001600160a01b0319908116909155600980549091169055600c5534801561003c575f5ffd5b5033608052608051612b7761007c5f395f81816103e401528181610700015281816108d001528181610c460152818161112e01526116f60152612b775ff3fe608060405234801561000f575f5ffd5b5060043610610111575f3560e01c80636dd7d8ea1161009e578063b85f5da21161006e578063b85f5da214610202578063d04a68c71461020a578063eb9019d414610245578063f1bd0b3714610265578063f3513a371461026c575f5ffd5b80636dd7d8ea146101bf578063a09686c4146101d2578063afeea115146101da578063b5cfa68c146101ef575f5ffd5b80632bdf6d43116100e45780632bdf6d431461015c5780633174b6891461017157806340f74f4714610179578063602a9eee1461019957806362525879146101ac575f5ffd5b80630777cbef146101155780630d2bd9091461012c5780631904bb2e146101345780631b605b8614610154575b5f5ffd5b6001545b6040519081526020015b60405180910390f35b600d54610119565b6101476101423660046123f3565b610274565b6040516101239190612497565b600754610119565b61016f61016a3660046124a9565b6103d9565b005b61016f610467565b61018c610187366004612518565b6106f3565b6040516101239190612538565b61016f6101a73660046125f1565b6108c6565b61016f6101ba36600461264d565b610ba1565b61016f6101cd3660046123f3565b610c3c565b600e54610119565b6101e2610f86565b6040516101239190612683565b61016f6101fd3660046126da565b611123565b61016f6115c8565b6102356102183660046123f3565b6001600160a01b03165f9081526003602052604090205460ff1690565b6040519015158152602001610123565b6102586102533660046126fa565b6116e9565b6040516101239190612722565b5f54610119565b6101e261192a565b61027c6122fd565b6001600160a01b0382165f9081526003602052604090205460ff166102e85760405162461bcd60e51b815260206004820152601c60248201527f56616c696461746f724461746120646f65736e2774206578697374730000000060448201526064015b60405180910390fd5b6040805180820182526001600160a01b0384168082525f90815260026020818152918490208451608081018652815481526001820154818501529181015460ff161515948201949094526003840180549394928501939192916060840191906103509061277c565b80601f016020809104026020016040519081016040528092919081815260200182805461037c9061277c565b80156103c75780601f1061039e576101008083540402835291602001916103c7565b820191905f5260205f20905b8154815290600101906020018083116103aa57829003601f168201915b50505091909252505050905292915050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104215760405162461bcd60e51b81526004016102df906127ae565b5f5b818110156104625761045a838383818110610440576104406127e3565b905060200201602081019061045591906123f3565b611ac1565b600101610423565b505050565b335f90815260066020526040902080546001600160a01b03166104be5760405162461bcd60e51b815260206004820152600f60248201526e1513d113ce881b9bdd081d9bdd1959608a1b60448201526064016102df565b6009546008546001600160a01b039182169116036104f757600880546001600160a01b031990811690915560098054909116905561060a565b600954336001600160a01b0390911603610550576002810180546001600160a01b039081165f90815260066020526040902060030180546001600160a01b0319908116909155915460098054909316911617905561060a565b600854336001600160a01b03909116036105b4576009546001600160a01b039081165f9081526006602052604080822060020180546001600160a01b031990811690915560088054808616855292909320600301549116921691909117905561060a565b60038181018054600280850180546001600160a01b039081165f9081526006602052604080822090970180549583166001600160a01b031996871617905591549454811682529490200180549290931691161790555b8054604080513381526001600160a01b0390921660208301527f6572af8bf9a0a86efb88dcc30011626a15c9c4603503aa4466a3f87a1867deef910160405180910390a180546001600160a01b03165f90815260026020526040812060018084015490820180549293919290919061068390849061280b565b9091555050805460019082905f9061069c90849061280b565b9091555050335f90815260066020526040812080546001600160a01b03199081168255600182018390556002820180548216905560039091018054909116905560078054916106ea8361281e565b91905055505050565b6060336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461073d5760405162461bcd60e51b81526004016102df906127ae565b600e548290841061074f57505f610773565b600e5461075c8486612833565b111561077357600e5461077090859061280b565b90505b5f816001600160401b0381111561078c5761078c612846565b6040519080825280602002602001820160405280156107d157816020015b604080518082019091525f8152606060208201528152602001906001900390816107aa5790505b5090505f5b828110156108bb57604051806040016040528082886107f59190612833565b610800906001612833565b8152602001600e610811848a612833565b81548110610821576108216127e3565b905f5260205f2001805480602002602001604051908101604052809291908181526020015f905b8282101561088f575f848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101610848565b505050508152508282815181106108a8576108a86127e3565b60209081029190910101526001016107d6565b509150505b92915050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361093e5760405162461bcd60e51b815260206004820152601c60248201527f43616c6c65722069732074686520636f6e7472616374206f776e65720000000060448201526064016102df565b335f9081526003602052604090205460ff161561099d5760405162461bcd60e51b815260206004820152601f60248201527f56616c696461746f7220697320616c726561647920726567697374657265640060448201526064016102df565b5f82826040516109ae92919061285a565b60408051918290039091205f8181526004602052919091205490915060ff1615610a265760405162461bcd60e51b815260206004820152602360248201527f424c5331322d333831206b657920697320616c726561647920726567697374656044820152621c995960ea1b60648201526084016102df565b610a308383611ba1565b5f60405180608001604052805f81526020015f81526020015f1515815260200185858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201829052509390945250508054929350905080610a9883612869565b9091555050335f9081526003602081815260408084208054600160ff199182168117909255600280855295839020875181559387015191840191909155908501519382018054909116931515939093179092556060830151839291820190610b0090826128c5565b5050505f82815260046020526040808220805460ff191660019081179091556005805491820181559092527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090910180546001600160a01b0319163390811790915590517f61809fa303a3a57f4d70552f533f3e0b003173d424590cd4bb22a2afe000990c91610b93918790879061297f565b60405180910390a150505050565b610bb161021860208301836123f3565b610bfd5760405162461bcd60e51b815260206004820152601c60248201527f56616c696461746f724461746120646f65736e2774206578697374730000000060448201526064016102df565b610c0a60208201826129be565b60025f610c1a60208501856123f3565b6001600160a01b0316815260208101919091526040015f206104628282612a95565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303610cb45760405162461bcd60e51b815260206004820152601c60248201527f43616c6c65722069732074686520636f6e7472616374206f776e65720000000060448201526064016102df565b6001600160a01b0381165f9081526003602052604090205460ff16610d1b5760405162461bcd60e51b815260206004820152601760248201527f4d75737420766f746520666f722076616c696461746f7200000000000000000060448201526064016102df565b335f908152600660205260409020546001600160a01b031615610d705760405162461bcd60e51b815260206004820152600d60248201526c105b1c9958591e481d9bdd1959609a1b60448201526064016102df565b6001600160a01b0381165f9081526002602081905260409091209081015460ff1615610de95760405162461bcd60e51b815260206004820152602260248201527f4d75737420766f746520666f7220756e72657369676e65642076616c6964617460448201526137b960f11b60648201526084016102df565b604080516080810182526001600160a01b03808516825233803160208085019182525f85870181815260608701828152948252600690925295909520935184549084166001600160a01b03199182161785559051600185015593516002840180549184169186169190911790555160039092018054928216929093169190911790915560085416610e9b5760088054336001600160a01b03199182168117909255600980549091169091179055610ef2565b600980546001600160a01b039081165f9081526006602052604080822060030180546001600160a01b0319908116339081179092558554828552929093206002018054841692909416919091179092558254161790555b60078054905f610f0183612869565b9190505550336001600160a01b031631816001015f828254610f239190612833565b9091555050805460019082905f90610f3c908490612833565b9091555050604080513381526001600160a01b03841660208201527fce0c7a2a940807f7dc2ce7a615c2532e915e6c0ac9a08bc4ed9d515a710a53e2910160405180910390a15050565b600d546060905f906001600160401b03811115610fa557610fa5612846565b604051908082528060200260200182016040528015610fde57816020015b610fcb6122fd565b815260200190600190039081610fc35790505b5090505f5b600d5481101561111d575f600d8281548110611001576110016127e3565b5f9182526020808320909101546001600160a01b03168083526002808352604093849020845180860186528381528551608081018752825481526001830154818701529282015460ff16151595830195909552600381018054939650909493840192859160608401916110739061277c565b80601f016020809104026020016040519081016040528092919081815260200182805461109f9061277c565b80156110ea5780601f106110c1576101008083540402835291602001916110ea565b820191905f5260205f20905b8154815290600101906020018083116110cd57829003601f168201915b505050505081525050815250848481518110611108576111086127e3565b60209081029190910101525050600101610fe3565b50919050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461116b5760405162461bcd60e51b81526004016102df906127ae565b611173611c03565b61117b611d52565b600a80546001600160a01b03191690556001545f805490916111ad9160ff85169184916111a8919061280b565b611da3565b90508060ff165f036111bd575050565b5f5b600554811015611468575f600582815481106111dd576111dd6127e3565b5f9182526020808320909101546001600160a01b03168083526002918290526040909220908101549192509060ff1615611218575050611460565b600a546001600160a01b03166112535750600a80546001600160a01b0319166001600160a01b03929092169190911790556001600c55611460565b8360ff16600c5410156112715761126a8285611e34565b5050611460565b600a546001600160a01b039081165f908152600260208181526040928390208351808501855294871685528351608081018552865481526001870154818401529286015460ff16151593830193909352600385018054939461144d949093928401929187916060840191906112e59061277c565b80601f01602080910402602001604051908101604052809291908181526020018280546113119061277c565b801561135c5780601f106113335761010080835404028352916020019161135c565b820191905f5260205f20905b81548152906001019060200180831161133f57829003601f168201915b505050919092525050509052604080518082018252600a546001600160a01b031681528151608081018352855481526001860154602082810191909152600287015460ff161515938201939093526003860180549293840192879160608401916113c59061277c565b80601f01602080910402602001604051908101604052809291908181526020018280546113f19061277c565b801561143c5780601f106114135761010080835404028352916020019161143c565b820191905f5260205f20905b81548152906001019060200180831161141f57829003601f168201915b505050505081525050815250612213565b1561145c5761145c8386611e34565b5050505b6001016111bf565b50600e80546001810182555f918252600a547fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd909101916001600160a01b03909116906114b790600d90612346565b8260ff166001600160401b038111156114d2576114d2612846565b6040519080825280602002602001820160405280156114fb578160200160208202803683370190505b50805161151091600d91602090910190612361565b505f5b8360ff168110156115c05781600d8281548110611532576115326127e3565b5f918252602080832090910180546001600160a01b039485166001600160a01b03199182161790915560408051808201825296851680885280855260028085528286206001908101548a87019081528b548083018d558c89528789209b519302909a01805492891692909516919091178455975192880192909255908352600b909152902054169101611513565b505050505b50565b335f9081526003602052604090205460ff166116265760405162461bcd60e51b815260206004820152601960248201527f43616c6c6572206973206e6f7420612076616c696461746f720000000000000060448201526064016102df565b335f9081526002602081905260409091209081015460ff161561168b5760405162461bcd60e51b815260206004820152601d60248201527f56616c696461746f7220697320616c72656164792072657369676e656400000060448201526064016102df565b60028101805460ff19166001908117909155805481905f906116ae908390612833565b90915550506040513381527f24250fc1ec78a1405ddd4cc8b75964858af228d05faa8d4bc1302966d8a541179060200160405180910390a150565b6060336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146117335760405162461bcd60e51b81526004016102df906127ae565b5f611741835f600754611da3565b6001600160401b0381111561175857611758612846565b60405190808252806020026020018201604052801561179c57816020015b604080518082019091525f80825260208201528152602001906001900390816117765790505b506008549091506001600160a01b03908116908516156117d557506001600160a01b038085165f90815260066020526040902060030154165b5f5b6001600160a01b038216158015906117ee57508481105b15611863576001600160a01b038083165f81815260066020908152604091829020825180840190935292825282549093169281019290925290848361183281612869565b945081518110611844576118446127e3565b6020908102919091010152600301546001600160a01b031691506117d7565b80835103611876578293505050506108c0565b5f816001600160401b0381111561188f5761188f612846565b6040519080825280602002602001820160405280156118d357816020015b604080518082019091525f80825260208201528152602001906001900390816118ad5790505b5090505f5b8281101561191f578481815181106118f2576118f26127e3565b602002602001015182828151811061190c5761190c6127e3565b60209081029190910101526001016118d8565b509695505050505050565b6005546060905f906001600160401b0381111561194957611949612846565b60405190808252806020026020018201604052801561198257816020015b61196f6122fd565b8152602001906001900390816119675790505b5090505f5b60055481101561111d575f600582815481106119a5576119a56127e3565b5f9182526020808320909101546001600160a01b03168083526002808352604093849020845180860186528381528551608081018752825481526001830154818701529282015460ff1615159583019590955260038101805493965090949384019285916060840191611a179061277c565b80601f0160208091040260200160405190810160405280929190818152602001828054611a439061277c565b8015611a8e5780601f10611a6557610100808354040283529160200191611a8e565b820191905f5260205f20905b815481529060010190602001808311611a7157829003601f168201915b505050505081525050815250848481518110611aac57611aac6127e3565b60209081029190910101525050600101611987565b6001600160a01b038082165f9081526006602052604090208054909116611ae6575050565b60018101546001600160a01b03831631811015611b4757611b11816001600160a01b0385163161280b565b82546001600160a01b03165f9081526002602052604081206001018054909190611b3c908490612833565b90915550611b8c9050565b611b5b6001600160a01b038416318261280b565b82546001600160a01b03165f9081526002602052604081206001018054909190611b8690849061280b565b90915550505b506001600160a01b0390911631600190910155565b60308114611bff5760405162461bcd60e51b815260206004820152602560248201527f424c5331322d333831207075626c69634b6579206c656e67746820697320696e6044820152641d985b1a5960da1b60648201526084016102df565b5050565b6005545f611c1260018361280b565b90505b8015611bff575f611c27826001612833565b60408051426020820152449181019190915260608101849052608001604051602081830303815290604052805190602001205f1c611c659190612b22565b90505f60058381548110611c7b57611c7b6127e3565b5f91825260209091200154600580546001600160a01b0390921692509083908110611ca857611ca86127e3565b5f91825260209091200154600580546001600160a01b039092169185908110611cd357611cd36127e3565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055508060058381548110611d1257611d126127e3565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555050508080611d4a9061281e565b915050611c15565b600a546001600160a01b03165b6001600160a01b03811615611d9c576001600160a01b039081165f908152600b6020526040902080546001600160a01b0319811690915516611d5f565b505f600c55565b5f81831115611e0c5760405162461bcd60e51b815260206004820152602f60248201527f4d696e696d756d2073686f756c64206265206c657373207468616e206f72206560448201526e7175616c20746f206d6178696d756d60881b60648201526084016102df565b82841015611e1b575081611e2d565b81841115611e2a575080611e2d565b50825b9392505050565b6001600160a01b0382165f9081526002602081815260408084208151608081018352815481526001820154938101939093529283015460ff16151590820152600382018054919291606084019190611e8b9061277c565b80601f0160208091040260200160405190810160405280929190818152602001828054611eb79061277c565b8015611f025780601f10611ed957610100808354040283529160200191611f02565b820191905f5260205f20905b815481529060010190602001808311611ee557829003601f168201915b505050919092525050604080518082018252600a546001600160a01b03168082525f90815260026020818152918490208451608081018652815481526001820154818501529181015460ff161515948201949094526003840180549697506120239693955091850193909290916060840191611f7d9061277c565b80601f0160208091040260200160405190810160405280929190818152602001828054611fa99061277c565b8015611ff45780601f10611fcb57610100808354040283529160200191611ff4565b820191905f5260205f20905b815481529060010190602001808311611fd757829003601f168201915b5050505050815250508152506040518060400160405280866001600160a01b0316815260200184815250612213565b156120365761203183612257565b6121b4565b600a546001600160a01b039081165f818152600b6020526040902054909116905b6001600160a01b0382166120745761206f81866122a8565b6121b1565b6040805180820182526001600160a01b0384168082525f90815260026020818152918490208451608081018652815481526001820154818501529181015460ff1615159482019490945260038401805461218195938501939160608401916120db9061277c565b80601f01602080910402602001604051908101604052809291908181526020018280546121079061277c565b80156121525780601f1061212957610100808354040283529160200191612152565b820191905f5260205f20905b81548152906001019060200180831161213557829003601f168201915b5050505050815250508152506040518060400160405280886001600160a01b0316815260200186815250612213565b156121905761206f81866122a8565b506001600160a01b038082165f908152600b60205260409020541690612057565b50505b8160ff16600c54111561046257600a80546001600160a01b039081165f908152600b6020526040812080546001600160a01b03198082169092558454931692168217909255600c805491926122088361281e565b919050555050505050565b5f816020015160200151836020015160200151036122435750805182516001600160a01b039182169116116108c0565b506020908101518101519181015101511190565b600a80546001600160a01b038381165f818152600b602052604081208054939094166001600160a01b031993841617909355835490911617909155600c8054916122a083612869565b919050555050565b6001600160a01b038281165f818152600b602052604080822080548686168085529284208054919096166001600160a01b03199182161790955592825282549093169092179055600c8054916106ea83612869565b60405180604001604052805f6001600160a01b0316815260200161234160405180608001604052805f81526020015f81526020015f15158152602001606081525090565b905290565b5080545f8255905f5260205f20908101906115c591906123c4565b828054828255905f5260205f209081019282156123b4579160200282015b828111156123b457825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061237f565b506123c09291506123c4565b5090565b5b808211156123c0575f81556001016123c5565b80356001600160a01b03811681146123ee575f5ffd5b919050565b5f60208284031215612403575f5ffd5b611e2d826123d8565b60018060a01b0381511682525f602082015160406020850152805160408501526020810151606085015260408101511515608085015260608101519050608060a085015280518060c08601525f5b8181101561247757602081840181015160e088840101520161245a565b505f60e0828701015260e0601f19601f8301168601019250505092915050565b602081525f611e2d602083018461240c565b5f5f602083850312156124ba575f5ffd5b82356001600160401b038111156124cf575f5ffd5b8301601f810185136124df575f5ffd5b80356001600160401b038111156124f4575f5ffd5b8560208260051b8401011115612508575f5ffd5b6020919091019590945092505050565b5f5f60408385031215612529575f5ffd5b50508035926020909101359150565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b828110156125e557868503603f19018452815180518652602090810151604082880181905281519088018190529101905f9060608801905b808310156125cd57835180516001600160a01b03168352602090810151818401529093019260019290920191604090910190612596565b5096505050602093840193919091019060010161255e565b50929695505050505050565b5f5f60208385031215612602575f5ffd5b82356001600160401b03811115612617575f5ffd5b8301601f81018513612627575f5ffd5b80356001600160401b0381111561263c575f5ffd5b856020828401011115612508575f5ffd5b5f6020828403121561265d575f5ffd5b81356001600160401b03811115612672575f5ffd5b820160408185031215611e2d575f5ffd5b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b828110156125e557603f198786030184526126c585835161240c565b945060209384019391909101906001016126a9565b5f602082840312156126ea575f5ffd5b813560ff81168114611e2d575f5ffd5b5f5f6040838503121561270b575f5ffd5b612714836123d8565b946020939093013593505050565b602080825282518282018190525f918401906040840190835b8181101561277157835180516001600160a01b03908116855260209182015116818501529093019260409092019160010161273b565b509095945050505050565b600181811c9082168061279057607f821691505b60208210810361111d57634e487b7160e01b5f52602260045260245ffd5b6020808252818101527f43616c6c6572206973206e6f742074686520636f6e7472616374206f776e6572604082015260600190565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b818103818111156108c0576108c06127f7565b5f8161282c5761282c6127f7565b505f190190565b808201808211156108c0576108c06127f7565b634e487b7160e01b5f52604160045260245ffd5b818382375f9101908152919050565b5f6001820161287a5761287a6127f7565b5060010190565b601f82111561046257805f5260205f20601f840160051c810160208510156128a65750805b601f840160051c820191505b818110156115c0575f81556001016128b2565b81516001600160401b038111156128de576128de612846565b6128f2816128ec845461277c565b84612881565b6020601f821160018114612924575f831561290d5750848201515b5f19600385901b1c1916600184901b1784556115c0565b5f84815260208120601f198516915b828110156129535787850151825560209485019460019092019101612933565b508482101561297057868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b6001600160a01b03841681526040602082018190528101829052818360608301375f818301606090810191909152601f909201601f1916010192915050565b5f8235607e198336030181126129d2575f5ffd5b9190910192915050565b6001600160401b038311156129f3576129f3612846565b612a0783612a01835461277c565b83612881565b5f601f841160018114612a38575f8515612a215750838201355b5f19600387901b1c1916600186901b1783556115c0565b5f83815260208120601f198716915b82811015612a675786850135825560209485019460019092019101612a47565b5086821015612a83575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b8135815560208201356001820155600281016040830135801515808214612aba575f5ffd5b60ff19835416915060ff8116821783555050506060820135601e19833603018112612ae3575f5ffd5b820180356001600160401b03811115612afa575f5ffd5b602082019150803603821315612b0e575f5ffd5b612b1c8183600386016129dc565b50505050565b5f82612b3c57634e487b7160e01b5f52601260045260245ffd5b50069056fea2646970667358221220ea30a4ce19f48f9f4e5f210af2ba4104775a4eb51e39226cc2db822b1b4211a264736f6c634300081b0033", + "sourceMap": "1600:13977:23:-:0;;;1701:1;1656:46;;;1708:44;;;;2044:32;;;;2082:40;;;-1:-1:-1;;;;;;2082:40:23;;;;;;2128;;;;;;;;2271:39;;2406:50;;;;;;;;;-1:-1:-1;2439:10:23;2430:19;;1600:13977;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", "linkReferences": {} }, + "deployedBytecode": { + "object": "0x608060405234801561000f575f5ffd5b5060043610610111575f3560e01c80636dd7d8ea1161009e578063b85f5da21161006e578063b85f5da214610202578063d04a68c71461020a578063eb9019d414610245578063f1bd0b3714610265578063f3513a371461026c575f5ffd5b80636dd7d8ea146101bf578063a09686c4146101d2578063afeea115146101da578063b5cfa68c146101ef575f5ffd5b80632bdf6d43116100e45780632bdf6d431461015c5780633174b6891461017157806340f74f4714610179578063602a9eee1461019957806362525879146101ac575f5ffd5b80630777cbef146101155780630d2bd9091461012c5780631904bb2e146101345780631b605b8614610154575b5f5ffd5b6001545b6040519081526020015b60405180910390f35b600d54610119565b6101476101423660046123f3565b610274565b6040516101239190612497565b600754610119565b61016f61016a3660046124a9565b6103d9565b005b61016f610467565b61018c610187366004612518565b6106f3565b6040516101239190612538565b61016f6101a73660046125f1565b6108c6565b61016f6101ba36600461264d565b610ba1565b61016f6101cd3660046123f3565b610c3c565b600e54610119565b6101e2610f86565b6040516101239190612683565b61016f6101fd3660046126da565b611123565b61016f6115c8565b6102356102183660046123f3565b6001600160a01b03165f9081526003602052604090205460ff1690565b6040519015158152602001610123565b6102586102533660046126fa565b6116e9565b6040516101239190612722565b5f54610119565b6101e261192a565b61027c6122fd565b6001600160a01b0382165f9081526003602052604090205460ff166102e85760405162461bcd60e51b815260206004820152601c60248201527f56616c696461746f724461746120646f65736e2774206578697374730000000060448201526064015b60405180910390fd5b6040805180820182526001600160a01b0384168082525f90815260026020818152918490208451608081018652815481526001820154818501529181015460ff161515948201949094526003840180549394928501939192916060840191906103509061277c565b80601f016020809104026020016040519081016040528092919081815260200182805461037c9061277c565b80156103c75780601f1061039e576101008083540402835291602001916103c7565b820191905f5260205f20905b8154815290600101906020018083116103aa57829003601f168201915b50505091909252505050905292915050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104215760405162461bcd60e51b81526004016102df906127ae565b5f5b818110156104625761045a838383818110610440576104406127e3565b905060200201602081019061045591906123f3565b611ac1565b600101610423565b505050565b335f90815260066020526040902080546001600160a01b03166104be5760405162461bcd60e51b815260206004820152600f60248201526e1513d113ce881b9bdd081d9bdd1959608a1b60448201526064016102df565b6009546008546001600160a01b039182169116036104f757600880546001600160a01b031990811690915560098054909116905561060a565b600954336001600160a01b0390911603610550576002810180546001600160a01b039081165f90815260066020526040902060030180546001600160a01b0319908116909155915460098054909316911617905561060a565b600854336001600160a01b03909116036105b4576009546001600160a01b039081165f9081526006602052604080822060020180546001600160a01b031990811690915560088054808616855292909320600301549116921691909117905561060a565b60038181018054600280850180546001600160a01b039081165f9081526006602052604080822090970180549583166001600160a01b031996871617905591549454811682529490200180549290931691161790555b8054604080513381526001600160a01b0390921660208301527f6572af8bf9a0a86efb88dcc30011626a15c9c4603503aa4466a3f87a1867deef910160405180910390a180546001600160a01b03165f90815260026020526040812060018084015490820180549293919290919061068390849061280b565b9091555050805460019082905f9061069c90849061280b565b9091555050335f90815260066020526040812080546001600160a01b03199081168255600182018390556002820180548216905560039091018054909116905560078054916106ea8361281e565b91905055505050565b6060336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461073d5760405162461bcd60e51b81526004016102df906127ae565b600e548290841061074f57505f610773565b600e5461075c8486612833565b111561077357600e5461077090859061280b565b90505b5f816001600160401b0381111561078c5761078c612846565b6040519080825280602002602001820160405280156107d157816020015b604080518082019091525f8152606060208201528152602001906001900390816107aa5790505b5090505f5b828110156108bb57604051806040016040528082886107f59190612833565b610800906001612833565b8152602001600e610811848a612833565b81548110610821576108216127e3565b905f5260205f2001805480602002602001604051908101604052809291908181526020015f905b8282101561088f575f848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101610848565b505050508152508282815181106108a8576108a86127e3565b60209081029190910101526001016107d6565b509150505b92915050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361093e5760405162461bcd60e51b815260206004820152601c60248201527f43616c6c65722069732074686520636f6e7472616374206f776e65720000000060448201526064016102df565b335f9081526003602052604090205460ff161561099d5760405162461bcd60e51b815260206004820152601f60248201527f56616c696461746f7220697320616c726561647920726567697374657265640060448201526064016102df565b5f82826040516109ae92919061285a565b60408051918290039091205f8181526004602052919091205490915060ff1615610a265760405162461bcd60e51b815260206004820152602360248201527f424c5331322d333831206b657920697320616c726561647920726567697374656044820152621c995960ea1b60648201526084016102df565b610a308383611ba1565b5f60405180608001604052805f81526020015f81526020015f1515815260200185858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201829052509390945250508054929350905080610a9883612869565b9091555050335f9081526003602081815260408084208054600160ff199182168117909255600280855295839020875181559387015191840191909155908501519382018054909116931515939093179092556060830151839291820190610b0090826128c5565b5050505f82815260046020526040808220805460ff191660019081179091556005805491820181559092527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090910180546001600160a01b0319163390811790915590517f61809fa303a3a57f4d70552f533f3e0b003173d424590cd4bb22a2afe000990c91610b93918790879061297f565b60405180910390a150505050565b610bb161021860208301836123f3565b610bfd5760405162461bcd60e51b815260206004820152601c60248201527f56616c696461746f724461746120646f65736e2774206578697374730000000060448201526064016102df565b610c0a60208201826129be565b60025f610c1a60208501856123f3565b6001600160a01b0316815260208101919091526040015f206104628282612a95565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303610cb45760405162461bcd60e51b815260206004820152601c60248201527f43616c6c65722069732074686520636f6e7472616374206f776e65720000000060448201526064016102df565b6001600160a01b0381165f9081526003602052604090205460ff16610d1b5760405162461bcd60e51b815260206004820152601760248201527f4d75737420766f746520666f722076616c696461746f7200000000000000000060448201526064016102df565b335f908152600660205260409020546001600160a01b031615610d705760405162461bcd60e51b815260206004820152600d60248201526c105b1c9958591e481d9bdd1959609a1b60448201526064016102df565b6001600160a01b0381165f9081526002602081905260409091209081015460ff1615610de95760405162461bcd60e51b815260206004820152602260248201527f4d75737420766f746520666f7220756e72657369676e65642076616c6964617460448201526137b960f11b60648201526084016102df565b604080516080810182526001600160a01b03808516825233803160208085019182525f85870181815260608701828152948252600690925295909520935184549084166001600160a01b03199182161785559051600185015593516002840180549184169186169190911790555160039092018054928216929093169190911790915560085416610e9b5760088054336001600160a01b03199182168117909255600980549091169091179055610ef2565b600980546001600160a01b039081165f9081526006602052604080822060030180546001600160a01b0319908116339081179092558554828552929093206002018054841692909416919091179092558254161790555b60078054905f610f0183612869565b9190505550336001600160a01b031631816001015f828254610f239190612833565b9091555050805460019082905f90610f3c908490612833565b9091555050604080513381526001600160a01b03841660208201527fce0c7a2a940807f7dc2ce7a615c2532e915e6c0ac9a08bc4ed9d515a710a53e2910160405180910390a15050565b600d546060905f906001600160401b03811115610fa557610fa5612846565b604051908082528060200260200182016040528015610fde57816020015b610fcb6122fd565b815260200190600190039081610fc35790505b5090505f5b600d5481101561111d575f600d8281548110611001576110016127e3565b5f9182526020808320909101546001600160a01b03168083526002808352604093849020845180860186528381528551608081018752825481526001830154818701529282015460ff16151595830195909552600381018054939650909493840192859160608401916110739061277c565b80601f016020809104026020016040519081016040528092919081815260200182805461109f9061277c565b80156110ea5780601f106110c1576101008083540402835291602001916110ea565b820191905f5260205f20905b8154815290600101906020018083116110cd57829003601f168201915b505050505081525050815250848481518110611108576111086127e3565b60209081029190910101525050600101610fe3565b50919050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461116b5760405162461bcd60e51b81526004016102df906127ae565b611173611c03565b61117b611d52565b600a80546001600160a01b03191690556001545f805490916111ad9160ff85169184916111a8919061280b565b611da3565b90508060ff165f036111bd575050565b5f5b600554811015611468575f600582815481106111dd576111dd6127e3565b5f9182526020808320909101546001600160a01b03168083526002918290526040909220908101549192509060ff1615611218575050611460565b600a546001600160a01b03166112535750600a80546001600160a01b0319166001600160a01b03929092169190911790556001600c55611460565b8360ff16600c5410156112715761126a8285611e34565b5050611460565b600a546001600160a01b039081165f908152600260208181526040928390208351808501855294871685528351608081018552865481526001870154818401529286015460ff16151593830193909352600385018054939461144d949093928401929187916060840191906112e59061277c565b80601f01602080910402602001604051908101604052809291908181526020018280546113119061277c565b801561135c5780601f106113335761010080835404028352916020019161135c565b820191905f5260205f20905b81548152906001019060200180831161133f57829003601f168201915b505050919092525050509052604080518082018252600a546001600160a01b031681528151608081018352855481526001860154602082810191909152600287015460ff161515938201939093526003860180549293840192879160608401916113c59061277c565b80601f01602080910402602001604051908101604052809291908181526020018280546113f19061277c565b801561143c5780601f106114135761010080835404028352916020019161143c565b820191905f5260205f20905b81548152906001019060200180831161141f57829003601f168201915b505050505081525050815250612213565b1561145c5761145c8386611e34565b5050505b6001016111bf565b50600e80546001810182555f918252600a547fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd909101916001600160a01b03909116906114b790600d90612346565b8260ff166001600160401b038111156114d2576114d2612846565b6040519080825280602002602001820160405280156114fb578160200160208202803683370190505b50805161151091600d91602090910190612361565b505f5b8360ff168110156115c05781600d8281548110611532576115326127e3565b5f918252602080832090910180546001600160a01b039485166001600160a01b03199182161790915560408051808201825296851680885280855260028085528286206001908101548a87019081528b548083018d558c89528789209b519302909a01805492891692909516919091178455975192880192909255908352600b909152902054169101611513565b505050505b50565b335f9081526003602052604090205460ff166116265760405162461bcd60e51b815260206004820152601960248201527f43616c6c6572206973206e6f7420612076616c696461746f720000000000000060448201526064016102df565b335f9081526002602081905260409091209081015460ff161561168b5760405162461bcd60e51b815260206004820152601d60248201527f56616c696461746f7220697320616c72656164792072657369676e656400000060448201526064016102df565b60028101805460ff19166001908117909155805481905f906116ae908390612833565b90915550506040513381527f24250fc1ec78a1405ddd4cc8b75964858af228d05faa8d4bc1302966d8a541179060200160405180910390a150565b6060336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146117335760405162461bcd60e51b81526004016102df906127ae565b5f611741835f600754611da3565b6001600160401b0381111561175857611758612846565b60405190808252806020026020018201604052801561179c57816020015b604080518082019091525f80825260208201528152602001906001900390816117765790505b506008549091506001600160a01b03908116908516156117d557506001600160a01b038085165f90815260066020526040902060030154165b5f5b6001600160a01b038216158015906117ee57508481105b15611863576001600160a01b038083165f81815260066020908152604091829020825180840190935292825282549093169281019290925290848361183281612869565b945081518110611844576118446127e3565b6020908102919091010152600301546001600160a01b031691506117d7565b80835103611876578293505050506108c0565b5f816001600160401b0381111561188f5761188f612846565b6040519080825280602002602001820160405280156118d357816020015b604080518082019091525f80825260208201528152602001906001900390816118ad5790505b5090505f5b8281101561191f578481815181106118f2576118f26127e3565b602002602001015182828151811061190c5761190c6127e3565b60209081029190910101526001016118d8565b509695505050505050565b6005546060905f906001600160401b0381111561194957611949612846565b60405190808252806020026020018201604052801561198257816020015b61196f6122fd565b8152602001906001900390816119675790505b5090505f5b60055481101561111d575f600582815481106119a5576119a56127e3565b5f9182526020808320909101546001600160a01b03168083526002808352604093849020845180860186528381528551608081018752825481526001830154818701529282015460ff1615159583019590955260038101805493965090949384019285916060840191611a179061277c565b80601f0160208091040260200160405190810160405280929190818152602001828054611a439061277c565b8015611a8e5780601f10611a6557610100808354040283529160200191611a8e565b820191905f5260205f20905b815481529060010190602001808311611a7157829003601f168201915b505050505081525050815250848481518110611aac57611aac6127e3565b60209081029190910101525050600101611987565b6001600160a01b038082165f9081526006602052604090208054909116611ae6575050565b60018101546001600160a01b03831631811015611b4757611b11816001600160a01b0385163161280b565b82546001600160a01b03165f9081526002602052604081206001018054909190611b3c908490612833565b90915550611b8c9050565b611b5b6001600160a01b038416318261280b565b82546001600160a01b03165f9081526002602052604081206001018054909190611b8690849061280b565b90915550505b506001600160a01b0390911631600190910155565b60308114611bff5760405162461bcd60e51b815260206004820152602560248201527f424c5331322d333831207075626c69634b6579206c656e67746820697320696e6044820152641d985b1a5960da1b60648201526084016102df565b5050565b6005545f611c1260018361280b565b90505b8015611bff575f611c27826001612833565b60408051426020820152449181019190915260608101849052608001604051602081830303815290604052805190602001205f1c611c659190612b22565b90505f60058381548110611c7b57611c7b6127e3565b5f91825260209091200154600580546001600160a01b0390921692509083908110611ca857611ca86127e3565b5f91825260209091200154600580546001600160a01b039092169185908110611cd357611cd36127e3565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055508060058381548110611d1257611d126127e3565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555050508080611d4a9061281e565b915050611c15565b600a546001600160a01b03165b6001600160a01b03811615611d9c576001600160a01b039081165f908152600b6020526040902080546001600160a01b0319811690915516611d5f565b505f600c55565b5f81831115611e0c5760405162461bcd60e51b815260206004820152602f60248201527f4d696e696d756d2073686f756c64206265206c657373207468616e206f72206560448201526e7175616c20746f206d6178696d756d60881b60648201526084016102df565b82841015611e1b575081611e2d565b81841115611e2a575080611e2d565b50825b9392505050565b6001600160a01b0382165f9081526002602081815260408084208151608081018352815481526001820154938101939093529283015460ff16151590820152600382018054919291606084019190611e8b9061277c565b80601f0160208091040260200160405190810160405280929190818152602001828054611eb79061277c565b8015611f025780601f10611ed957610100808354040283529160200191611f02565b820191905f5260205f20905b815481529060010190602001808311611ee557829003601f168201915b505050919092525050604080518082018252600a546001600160a01b03168082525f90815260026020818152918490208451608081018652815481526001820154818501529181015460ff161515948201949094526003840180549697506120239693955091850193909290916060840191611f7d9061277c565b80601f0160208091040260200160405190810160405280929190818152602001828054611fa99061277c565b8015611ff45780601f10611fcb57610100808354040283529160200191611ff4565b820191905f5260205f20905b815481529060010190602001808311611fd757829003601f168201915b5050505050815250508152506040518060400160405280866001600160a01b0316815260200184815250612213565b156120365761203183612257565b6121b4565b600a546001600160a01b039081165f818152600b6020526040902054909116905b6001600160a01b0382166120745761206f81866122a8565b6121b1565b6040805180820182526001600160a01b0384168082525f90815260026020818152918490208451608081018652815481526001820154818501529181015460ff1615159482019490945260038401805461218195938501939160608401916120db9061277c565b80601f01602080910402602001604051908101604052809291908181526020018280546121079061277c565b80156121525780601f1061212957610100808354040283529160200191612152565b820191905f5260205f20905b81548152906001019060200180831161213557829003601f168201915b5050505050815250508152506040518060400160405280886001600160a01b0316815260200186815250612213565b156121905761206f81866122a8565b506001600160a01b038082165f908152600b60205260409020541690612057565b50505b8160ff16600c54111561046257600a80546001600160a01b039081165f908152600b6020526040812080546001600160a01b03198082169092558454931692168217909255600c805491926122088361281e565b919050555050505050565b5f816020015160200151836020015160200151036122435750805182516001600160a01b039182169116116108c0565b506020908101518101519181015101511190565b600a80546001600160a01b038381165f818152600b602052604081208054939094166001600160a01b031993841617909355835490911617909155600c8054916122a083612869565b919050555050565b6001600160a01b038281165f818152600b602052604080822080548686168085529284208054919096166001600160a01b03199182161790955592825282549093169092179055600c8054916106ea83612869565b60405180604001604052805f6001600160a01b0316815260200161234160405180608001604052805f81526020015f81526020015f15158152602001606081525090565b905290565b5080545f8255905f5260205f20908101906115c591906123c4565b828054828255905f5260205f209081019282156123b4579160200282015b828111156123b457825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061237f565b506123c09291506123c4565b5090565b5b808211156123c0575f81556001016123c5565b80356001600160a01b03811681146123ee575f5ffd5b919050565b5f60208284031215612403575f5ffd5b611e2d826123d8565b60018060a01b0381511682525f602082015160406020850152805160408501526020810151606085015260408101511515608085015260608101519050608060a085015280518060c08601525f5b8181101561247757602081840181015160e088840101520161245a565b505f60e0828701015260e0601f19601f8301168601019250505092915050565b602081525f611e2d602083018461240c565b5f5f602083850312156124ba575f5ffd5b82356001600160401b038111156124cf575f5ffd5b8301601f810185136124df575f5ffd5b80356001600160401b038111156124f4575f5ffd5b8560208260051b8401011115612508575f5ffd5b6020919091019590945092505050565b5f5f60408385031215612529575f5ffd5b50508035926020909101359150565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b828110156125e557868503603f19018452815180518652602090810151604082880181905281519088018190529101905f9060608801905b808310156125cd57835180516001600160a01b03168352602090810151818401529093019260019290920191604090910190612596565b5096505050602093840193919091019060010161255e565b50929695505050505050565b5f5f60208385031215612602575f5ffd5b82356001600160401b03811115612617575f5ffd5b8301601f81018513612627575f5ffd5b80356001600160401b0381111561263c575f5ffd5b856020828401011115612508575f5ffd5b5f6020828403121561265d575f5ffd5b81356001600160401b03811115612672575f5ffd5b820160408185031215611e2d575f5ffd5b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b828110156125e557603f198786030184526126c585835161240c565b945060209384019391909101906001016126a9565b5f602082840312156126ea575f5ffd5b813560ff81168114611e2d575f5ffd5b5f5f6040838503121561270b575f5ffd5b612714836123d8565b946020939093013593505050565b602080825282518282018190525f918401906040840190835b8181101561277157835180516001600160a01b03908116855260209182015116818501529093019260409092019160010161273b565b509095945050505050565b600181811c9082168061279057607f821691505b60208210810361111d57634e487b7160e01b5f52602260045260245ffd5b6020808252818101527f43616c6c6572206973206e6f742074686520636f6e7472616374206f776e6572604082015260600190565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b818103818111156108c0576108c06127f7565b5f8161282c5761282c6127f7565b505f190190565b808201808211156108c0576108c06127f7565b634e487b7160e01b5f52604160045260245ffd5b818382375f9101908152919050565b5f6001820161287a5761287a6127f7565b5060010190565b601f82111561046257805f5260205f20601f840160051c810160208510156128a65750805b601f840160051c820191505b818110156115c0575f81556001016128b2565b81516001600160401b038111156128de576128de612846565b6128f2816128ec845461277c565b84612881565b6020601f821160018114612924575f831561290d5750848201515b5f19600385901b1c1916600184901b1784556115c0565b5f84815260208120601f198516915b828110156129535787850151825560209485019460019092019101612933565b508482101561297057868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b6001600160a01b03841681526040602082018190528101829052818360608301375f818301606090810191909152601f909201601f1916010192915050565b5f8235607e198336030181126129d2575f5ffd5b9190910192915050565b6001600160401b038311156129f3576129f3612846565b612a0783612a01835461277c565b83612881565b5f601f841160018114612a38575f8515612a215750838201355b5f19600387901b1c1916600186901b1783556115c0565b5f83815260208120601f198716915b82811015612a675786850135825560209485019460019092019101612a47565b5086821015612a83575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b8135815560208201356001820155600281016040830135801515808214612aba575f5ffd5b60ff19835416915060ff8116821783555050506060820135601e19833603018112612ae3575f5ffd5b820180356001600160401b03811115612afa575f5ffd5b602082019150803603821315612b0e575f5ffd5b612b1c8183600386016129dc565b50505050565b5f82612b3c57634e487b7160e01b5f52601260045260245ffd5b50069056fea2646970667358221220ea30a4ce19f48f9f4e5f210af2ba4104775a4eb51e39226cc2db822b1b4211a264736f6c634300081b0033", + "sourceMap": "1600:13977:23:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8206:113;8288:24;;8206:113;;;160:25:32;;;148:2;133:18;8206:113:23;;;;;;;;8325:118;8405:24;:31;8325:118;;10111:244;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;10595:91::-;10667:12;;10595:91;;13507:228;;;;;;:::i;:::-;;:::i;:::-;;12515:986;;;:::i;13841:529::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;8449:951::-;;;;;;:::i;:::-;;:::i;10361:228::-;;;;;;:::i;:::-;;:::i;11543:966::-;;;;;;:::i;:::-;;:::i;13741:94::-;13814:7;:14;13741:94;;6999:458;;;:::i;:::-;;;;;;;:::i;3531:1701::-;;;;;;:::i;:::-;;:::i;9406:400::-;;;:::i;9812:125::-;;;;;;:::i;:::-;-1:-1:-1;;;;;9901:29:23;9878:4;9901:29;;;:23;:29;;;;;;;;;9812:125;;;;6494:14:32;;6487:22;6469:41;;6457:2;6442:18;9812:125:23;6329:187:32;10692:845:23;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;8083:117::-;8141:7;8167:26;8083:117;;7628:449;;;:::i;10111:244::-;10169:16;;:::i;:::-;-1:-1:-1;;;;;9901:29:23;;9878:4;9901:29;;;:23;:29;;;;;;;;10197:71;;;;-1:-1:-1;;;10197:71:23;;7839:2:32;10197:71:23;;;7821:21:32;7878:2;7858:18;;;7851:30;7917;7897:18;;;7890:58;7965:18;;10197:71:23;;;;;;;;;10285:63;;;;;;;;-1:-1:-1;;;;;10285:63:23;;;;;-1:-1:-1;10315:31:23;;;:24;10285:63;10315:31;;;;;;;10285:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10315:31;10285:63;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;10285:63:23;;;;-1:-1:-1;;;10285:63:23;;10278:70;10111:244;-1:-1:-1;;10111:244:23:o;13507:228::-;2501:10;-1:-1:-1;;;;;2515:6:23;2501:20;;2493:65;;;;-1:-1:-1;;;2493:65:23;;;;;;;:::i;:::-;13642:9:::1;13637:92;13657:17:::0;;::::1;13637:92;;;13695:23;13708:6;;13715:1;13708:9;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;13695:12;:23::i;:::-;13676:3;;13637:92;;;;13507:228:::0;;:::o;12515:986::-;12581:10;12552:18;12573:19;;;:7;:19;;;;;12610:15;;-1:-1:-1;;;;;12610:15:23;12602:57;;;;-1:-1:-1;;;12602:57:23;;9074:2:32;12602:57:23;;;9056:21:32;9113:2;9093:18;;;9086:30;-1:-1:-1;;;9132:18:32;;;9125:45;9187:18;;12602:57:23;8872:339:32;12602:57:23;12689:11;;12674;;-1:-1:-1;;;;;12689:11:23;;;12674;;:26;12670:528;;12716:11;:24;;-1:-1:-1;;;;;;12716:24:23;;;;;;12754:11;:24;;;;;;;12670:528;;;12799:11;;12814:10;-1:-1:-1;;;;;12799:11:23;;;:25;12795:403;;12848:10;;;;;-1:-1:-1;;;;;12848:10:23;;;12875:1;12840:19;;;:7;:19;;;;;:24;;:37;;-1:-1:-1;;;;;;12840:37:23;;;;;;12905:10;;12891:11;:24;;;;;12905:10;;12891:24;;;12795:403;;;12936:11;;12951:10;-1:-1:-1;;;;;12936:11:23;;;:25;12932:266;;12985:11;;-1:-1:-1;;;;;12985:11:23;;;13013:1;12977:20;;;:7;:20;;;;;;:25;;:38;;-1:-1:-1;;;;;;12977:38:23;;;;;;13051:11;;;;;;13043:20;;;;;;:25;;;13029:39;;13043:25;;13029:39;;;;;;12932:266;;;13126:10;;;;;;13107;;;;;;-1:-1:-1;;;;;13107:10:23;;;13126;13099:19;;;:7;:19;;;;;;:24;;;:37;;13126:10;;;-1:-1:-1;;;;;;13099:37:23;;;;;;13177:10;;13158;;;;13150:19;;;;;:24;:37;;13177:10;;;;13150:37;;;;;12932:266;13233:15;;13213:36;;;13221:10;9390:51:32;;-1:-1:-1;;;;;13233:15:23;;;9472:2:32;9457:18;;9450:60;13213:36:23;;9363:18:32;13213:36:23;;;;;;;13323:15;;-1:-1:-1;;;;;13323:15:23;13260:35;13298:41;;;:24;:41;;;;;13323:15;13379:13;;;;13350:25;;;:42;;13298:41;;13379:13;;13350:25;;13260:35;13350:42;;13379:13;;13350:42;:::i;:::-;;;;-1:-1:-1;;13402:30:23;;13431:1;;13402:13;;:25;;:30;;13431:1;;13402:30;:::i;:::-;;;;-1:-1:-1;;13458:10:23;13450:19;;;;:7;:19;;;;;13443:26;;-1:-1:-1;;;;;;13443:26:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13480:12;:14;;;;;;:::i;:::-;;;;;;12542:959;;12515:986::o;13841:529::-;13922:14;2501:10;-1:-1:-1;;;;;2515:6:23;2501:20;;2493:65;;;;-1:-1:-1;;;2493:65:23;;;;;;;:::i;:::-;13993:7:::1;:14:::0;13964:5;;13983:24;::::1;13979:163;;-1:-1:-1::0;14031:1:23::1;13979:163;;;14070:7;:14:::0;14053::::1;14062:5:::0;14053:6;:14:::1;:::i;:::-;:31;14049:93;;;14108:7;:14:::0;:23:::1;::::0;14125:6;;14108:23:::1;:::i;:::-;14100:31;;14049:93;14152:21;14188:5;-1:-1:-1::0;;;;;14176:18:23::1;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;;;;;;;;;;;;;14176:18:23::1;;;;;;;;;;;;;;;-1:-1:-1::0;14152:42:23;-1:-1:-1;14209:9:23::1;14204:136;14228:5;14224:1;:9;14204:136;;;14266:63;;;;;;;;14289:1;14280:6;:10;;;;:::i;:::-;:14;::::0;14293:1:::1;14280:14;:::i;:::-;14266:63:::0;;::::1;;14308:7;14316:10;14325:1:::0;14316:6;:10:::1;:::i;:::-;14308:19;;;;;;;;:::i;:::-;;;;;;;;14266:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;;;::::1;::::0;;;;::::1;::::0;;;;::::1;::::0;;;::::1;::::0;::::1;::::0;;::::1;::::0;;-1:-1:-1;;;;;14266:63:23::1;::::0;;;;;::::1;::::0;;;::::1;::::0;;;;;;::::1;::::0;::::1;;;;;;;;;;::::0;14254:6:::1;14261:1;14254:9;;;;;;;;:::i;:::-;;::::0;;::::1;::::0;;;;;:75;14235:3:::1;;14204:136;;;-1:-1:-1::0;14357:6:23;-1:-1:-1;;2568:1:23::1;13841:529:::0;;;;:::o;8449:951::-;-1:-1:-1;;;;;2638:6:23;2624:20;:10;:20;2616:61;;;;-1:-1:-1;;;2616:61:23;;10391:2:32;2616:61:23;;;10373:21:32;10430:2;10410:18;;;10403:30;10469;10449:18;;;10442:58;10517:18;;2616:61:23;10189:352:32;2616:61:23;8578:10:::1;8554:35;::::0;;;:23:::1;:35;::::0;;;;;::::1;;8553:36;8545:80;;;::::0;-1:-1:-1;;;8545:80:23;;10748:2:32;8545:80:23::1;::::0;::::1;10730:21:32::0;10787:2;10767:18;;;10760:30;10826:33;10806:18;;;10799:61;10877:18;;8545:80:23::1;10546:355:32::0;8545:80:23::1;8636:27;8676:20;;8666:31;;;;;;;:::i;:::-;;::::0;;;;;::::1;::::0;;;8717:42:::1;::::0;;;:21:::1;:42;::::0;;;;;;8666:31;;-1:-1:-1;8717:42:23::1;;8716:43;8708:91;;;::::0;-1:-1:-1;;;8708:91:23;;11384:2:32;8708:91:23::1;::::0;::::1;11366:21:32::0;11423:2;11403:18;;;11396:30;11462:34;11442:18;;;11435:62;-1:-1:-1;;;11513:18:32;;;11506:33;11556:19;;8708:91:23::1;11182:399:32::0;8708:91:23::1;8810:46;8835:20;;8810:24;:46::i;:::-;8867:30;8900:168;;;;;;;;8941:1;8900:168;;;;8969:1;8900:168;;;;8996:5;8900:168;;;;;;9037:20;;8900:168;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;::::0;;;-1:-1:-1;8900:168:23;;;;-1:-1:-1;;9079:28:23;;8867:201;;-1:-1:-1;8900:168:23;-1:-1:-1;8900:168:23;9079:28:::1;::::0;::::1;:::i;:::-;::::0;;;-1:-1:-1;;9141:10:23::1;9117:35;::::0;;;:23:::1;:35;::::0;;;;;;;:42;;9155:4:::1;-1:-1:-1::0;;9117:42:23;;::::1;::::0;::::1;::::0;;;9169:24:::1;:36:::0;;;;;;;:48;;;;;;::::1;::::0;;;::::1;::::0;;;;;;::::1;::::0;;;::::1;::::0;;;;::::1;::::0;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;::::1;::::0;;;:36;:48;::::1;::::0;::::1;::::0;;::::1;:::i;:::-;-1:-1:-1::0;;;9227:42:23::1;::::0;;;:21:::1;:42;::::0;;;;;:49;;-1:-1:-1;;9227:49:23::1;9272:4;9227:49:::0;;::::1;::::0;;;9286:21:::1;:38:::0;;;;::::1;::::0;;;;;;;;::::1;::::0;;-1:-1:-1;;;;;;9286:38:23::1;9313:10;9286:38:::0;;::::1;::::0;;;9340:53;;::::1;::::0;::::1;::::0;9372:20;;;;9340:53:::1;:::i;:::-;;;;;;;;8535:865;;8449:951:::0;;:::o;10361:228::-;10442:38;10464:15;;;;:10;:15;:::i;10442:38::-;10434:79;;;;-1:-1:-1;;;10434:79:23;;7839:2:32;10434:79:23;;;7821:21:32;7878:2;7858:18;;;7851:30;7917;7897:18;;;7890:58;7965:18;;10434:79:23;7637:352:32;10434:79:23;10567:15;;;;:10;:15;:::i;:::-;10523:24;:41;10548:15;;;;:10;:15;:::i;:::-;-1:-1:-1;;;;;10523:41:23;;;;;;;;;;;;-1:-1:-1;10523:41:23;:59;;:41;:59;:::i;11543:966::-;-1:-1:-1;;;;;2638:6:23;2624:20;:10;:20;2616:61;;;;-1:-1:-1;;;2616:61:23;;10391:2:32;2616:61:23;;;10373:21:32;10430:2;10410:18;;;10403:30;10469;10449:18;;;10442:58;10517:18;;2616:61:23;10189:352:32;2616:61:23;-1:-1:-1;;;;;9901:29:23;;9878:4;9901:29;;;:23;:29;;;;;;;;11603:63:::1;;;::::0;-1:-1:-1;;;11603:63:23;;17224:2:32;11603:63:23::1;::::0;::::1;17206:21:32::0;17263:2;17243:18;;;17236:30;17302:25;17282:18;;;17275:53;17345:18;;11603:63:23::1;17022:347:32::0;11603:63:23::1;11692:10;11725:1;11684:19:::0;;;:7:::1;:19;::::0;;;;:29;-1:-1:-1;;;;;11684:29:23::1;:43:::0;11676:69:::1;;;::::0;-1:-1:-1;;;11676:69:23;;17576:2:32;11676:69:23::1;::::0;::::1;17558:21:32::0;17615:2;17595:18;;;17588:30;-1:-1:-1;;;17634:18:32;;;17627:43;17687:18;;11676:69:23::1;17374:337:32::0;11676:69:23::1;-1:-1:-1::0;;;;;11794:30:23;::::1;11756:35;11794:30:::0;;;:24:::1;:30;::::0;;;;;;;11843:24;;::::1;::::0;::::1;;11842:25;11834:72;;;::::0;-1:-1:-1;;;11834:72:23;;17918:2:32;11834:72:23::1;::::0;::::1;17900:21:32::0;17957:2;17937:18;;;17930:30;17996:34;17976:18;;;17969:62;-1:-1:-1;;;18047:18:32;;;18040:32;18089:19;;11834:72:23::1;17716:398:32::0;11834:72:23::1;11939:88;::::0;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;11939:88:23;;::::1;::::0;;11971:10:::1;:18:::0;::::1;11939:88;::::0;;::::1;::::0;;;-1:-1:-1;11939:88:23;;;;;;;;;;;;11917:19;;;:7:::1;:19:::0;;;;;;;:110;;;;;;::::1;-1:-1:-1::0;;;;;;11917:110:23;;::::1;;::::0;;;;;;::::1;::::0;;;::::1;::::0;::::1;::::0;;;;::::1;::::0;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;::::0;;;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;;12042:11:::1;::::0;::::1;12038:277;;12083:11;:24:::0;;12097:10:::1;-1:-1:-1::0;;;;;;12083:24:23;;::::1;::::0;::::1;::::0;;;12121:11:::1;:24:::0;;;;::::1;::::0;;::::1;::::0;;12038:277:::1;;;12184:11;::::0;;-1:-1:-1;;;;;12184:11:23;;::::1;12176:20;::::0;;;:7:::1;:20;::::0;;;;;:25:::1;;:38:::0;;-1:-1:-1;;;;;;12176:38:23;;::::1;12204:10;12176:38:::0;;::::1;::::0;;;12255:11;;12228:19;;;;;;;:24:::1;;:38:::0;;;::::1;12255:11:::0;;;::::1;12228:38:::0;;;::::1;::::0;;;12280:24;;::::1;;::::0;;12038:277:::1;12324:12;:14:::0;;;:12:::1;:14;::::0;::::1;:::i;:::-;;;;;;12405:10;-1:-1:-1::0;;;;;12405:18:23::1;;12376:13;:25;;;:47;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;12433:30:23;;12462:1:::1;::::0;12433:13;;:25:::1;::::0;:30:::1;::::0;12462:1;;12433:30:::1;:::i;:::-;::::0;;;-1:-1:-1;;12479:23:23::1;::::0;;12485:10:::1;9390:51:32::0;;-1:-1:-1;;;;;9477:32:32;;9472:2;9457:18;;9450:60;12479:23:23::1;::::0;9363:18:32;12479:23:23::1;;;;;;;11593:916;11543:966:::0;:::o;6999:458::-;7122:24;:31;7048:18;;7078:25;;-1:-1:-1;;;;;7106:48:23;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;-1:-1:-1;7078:76:23;-1:-1:-1;7169:9:23;7164:263;7188:24;:31;7184:35;;7164:263;;;7240:12;7255:24;7280:1;7255:27;;;;;;;;:::i;:::-;;;;;;;;;;;;;-1:-1:-1;;;;;7255:27:23;7325:30;;;:24;:30;;;;;;;;7381:35;;;;;;;;;;;;;;;;;;;;;7255:27;7381:35;;;;;;;;;;;;;;;;;;;;;;;;;;;7255:27;;-1:-1:-1;7325:30:23;;7381:35;;;;7325:30;;7381:35;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7369:6;7376:1;7369:9;;;;;;;;:::i;:::-;;;;;;;;;;:47;-1:-1:-1;;7221:3:23;;7164:263;;;-1:-1:-1;7444:6:23;6999:458;-1:-1:-1;6999:458:23:o;3531:1701::-;2501:10;-1:-1:-1;;;;;2515:6:23;2501:20;;2493:65;;;;-1:-1:-1;;;2493:65:23;;;;;;;:::i;:::-;3601:9:::1;:7;:9::i;:::-;3620:21;:19;:21::i;:::-;3652:18;:31:::0;;-1:-1:-1;;;;;;3652:31:23::1;::::0;;;3754:24;3681:1:::1;3725:26:::0;;3681:1;;3712:67:::1;::::0;::::1;::::0;::::1;::::0;3681:1;;3725:53:::1;::::0;3754:24;3725:53:::1;:::i;:::-;3712:6;:67::i;:::-;3694:86;;3853:3;:8;;3860:1;3853:8:::0;3849:45:::1;;3877:7;3531:1701:::0;:::o;3849:45::-:1;3909:9;3904:870;3928:21;:28:::0;3924:32;::::1;3904:870;;;3977:12;3992:21;4014:1;3992:24;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;;;::::1;::::0;-1:-1:-1;;;;;3992:24:23::1;4060:30:::0;;;:24:::1;:30:::0;;;;;;;;4108:15;;::::1;::::0;3992:24;;-1:-1:-1;4060:30:23;4108:15:::1;;4104:62;;;4143:8;;;;4104:62;4184:18;::::0;-1:-1:-1;;;;;4184:18:23::1;4180:163;;-1:-1:-1::0;4236:18:23::1;:25:::0;;-1:-1:-1;;;;;;4236:25:23::1;-1:-1:-1::0;;;;;4236:25:23;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;4279:19:23::1;:23:::0;4320:8:::1;;4180:163;4383:3;4361:25;;:19;;:25;4357:119;;;4406:29;4425:4;4431:3;4406:18;:29::i;:::-;4453:8;;;;4357:119;4548:18;::::0;-1:-1:-1;;;;;4548:18:23;;::::1;4490:30;4523:44:::0;;;:24:::1;:44;::::0;;;;;;;;4597:35;;;;::::1;::::0;;;;::::1;::::0;;;;::::1;::::0;::::1;::::0;;;;;;4548:18;4597:35;::::1;::::0;;;::::1;::::0;;;::::1;::::0;::::1;;;;::::0;;;;;;;::::1;::::0;::::1;::::0;;4523:44;;4586:102:::1;::::0;4597:35;;;;::::1;::::0;;4626:4;;4597:35;;;;;::::1;::::0;::::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;4597:35:23;;;;-1:-1:-1;;;4597:35:23;;4634:53:::1;::::0;;;;::::1;::::0;;4651:18:::1;::::0;-1:-1:-1;;;;;4651:18:23::1;4634:53:::0;;;;::::1;::::0;::::1;::::0;;;;;;4651:18;4634:53;::::1;::::0;::::1;::::0;;::::1;::::0;;;;::::1;::::0;::::1;::::0;::::1;;;;::::0;;;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;4677:8;;4634:53;;;;::::1;::::0;::::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;::::0;4586:10:::1;:102::i;:::-;4582:182;;;4720:29;4739:4;4745:3;4720:18;:29::i;:::-;3963:811;;;3904:870;3958:3;;3904:870;;;-1:-1:-1::0;4817:7:23::1;:14:::0;;::::1;::::0;::::1;::::0;;4784:30:::1;4817:14:::0;;;4857:18:::1;::::0;4817:14;;;::::1;::::0;-1:-1:-1;;;;;4857:18:23;;::::1;::::0;4885:31:::1;::::0;4892:24:::1;::::0;4885:31:::1;:::i;:::-;4967:3;4953:18;;-1:-1:-1::0;;;;;4953:18:23::1;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;-1:-1:-1;4953:18:23::1;-1:-1:-1::0;4926:45:23;;::::1;::::0;:24:::1;::::0;:45:::1;::::0;;::::1;::::0;::::1;:::i;:::-;-1:-1:-1::0;4986:9:23::1;4981:245;5005:3;5001:7;;:1;:7;4981:245;;;5059:4;5029:24;5054:1;5029:27;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;;;::::1;:34:::0;;-1:-1:-1;;;;;5029:34:23;;::::1;-1:-1:-1::0;;;;;;5029:34:23;;::::1;;::::0;;;5088:85:::1;::::0;;;;::::1;::::0;;;;::::1;::::0;;;5129:30;;;:24:::1;:30:::0;;;;;;5029:34;5129:42;;::::1;::::0;5088:85;;::::1;::::0;;;5077:97;;;;::::1;::::0;;;;;;;;;;;::::1;::::0;;::::1;::::0;;;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;;;;;::::1;::::0;;;;5195:20;;;:14:::1;:20:::0;;;;;;::::1;::::0;5010:3:::1;4981:245;;;;3591:1641;;;2568:1;3531:1701:::0;:::o;9406:400::-;9482:10;9878:4;9901:29;;;:23;:29;;;;;;;;9452:71;;;;-1:-1:-1;;;9452:71:23;;18321:2:32;9452:71:23;;;18303:21:32;18360:2;18340:18;;;18333:30;18399:27;18379:18;;;18372:55;18444:18;;9452:71:23;18119:349:32;9452:71:23;9593:10;9534:31;9568:36;;;:24;:36;;;;;;;;9623:20;;;;;;9622:21;9614:63;;;;-1:-1:-1;;;9614:63:23;;18675:2:32;9614:63:23;;;18657:21:32;18714:2;18694:18;;;18687:30;18753:31;18733:18;;;18726:59;18802:18;;9614:63:23;18473:353:32;9614:63:23;9688:20;;;:27;;-1:-1:-1;;9688:27:23;9711:4;9688:27;;;;;;9725:29;;9711:4;;9688:20;;9725:29;;9711:4;;9725:29;:::i;:::-;;;;-1:-1:-1;;9770:29:23;;9788:10;18977:51:32;;9770:29:23;;18965:2:32;18950:18;9770:29:23;;;;;;;9442:364;9406:400::o;10692:845::-;10770:19;2501:10;-1:-1:-1;;;;;2515:6:23;2501:20;;2493:65;;;;-1:-1:-1;;;2493:65:23;;;;;;;:::i;:::-;10801:26:::1;10847:30;10854:5;10861:1;10864:12;;10847:6;:30::i;:::-;-1:-1:-1::0;;;;;10830:48:23::1;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;;;;;;;;;;;;;10830:48:23::1;;;;;;;;;;;;;;;-1:-1:-1::0;10904:11:23::1;::::0;10801:77;;-1:-1:-1;;;;;;10904:11:23;;::::1;::::0;10930:18;::::1;::::0;10926:74:::1;;-1:-1:-1::0;;;;;;10971:13:23;;::::1;;::::0;;;:7:::1;:13;::::0;;;;:18:::1;;::::0;::::1;10926:74;11010:9;11033:211;-1:-1:-1::0;;;;;11040:18:23;::::1;::::0;;::::1;::::0;:31:::1;;;11066:5;11062:1;:9;11040:31;11033:211;;;-1:-1:-1::0;;;;;11108:13:23;;::::1;11087:18;11108:13:::0;;;:7:::1;:13;::::0;;;;;;;;11149:53;;;;::::1;::::0;;;;;;11185:15;;;;::::1;11149:53:::0;;::::1;::::0;;;;11108:13;11135:6;11142:3;::::1;::::0;::::1;:::i;:::-;;;11135:11;;;;;;;;:::i;:::-;;::::0;;::::1;::::0;;;;;:67;11223:10:::1;;::::0;-1:-1:-1;;;;;11223:10:23::1;::::0;-1:-1:-1;11033:211:23::1;;;11275:1;11258:6;:13;:18:::0;11254:62:::1;;11299:6;11292:13;;;;;;;11254:62;11374:25;11419:1;-1:-1:-1::0;;;;;11402:19:23::1;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;;;;;;;;;;;;;11402:19:23::1;;;;;;;;;;;;;;;-1:-1:-1::0;11374:47:23;-1:-1:-1;11436:9:23::1;11431:77;11455:1;11451;:5;11431:77;;;11488:6;11495:1;11488:9;;;;;;;;:::i;:::-;;;;;;;11477:5;11483:1;11477:8;;;;;;;;:::i;:::-;;::::0;;::::1;::::0;;;;;:20;11458:3:::1;;11431:77;;;-1:-1:-1::0;11525:5:23;10692:845;-1:-1:-1;;;;;;10692:845:23:o;7628:449::-;7751:21;:28;7677:18;;7707:25;;-1:-1:-1;;;;;7735:45:23;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;-1:-1:-1;7707:73:23;-1:-1:-1;7795:9:23;7790:257;7814:21;:28;7810:32;;7790:257;;;7863:12;7878:21;7900:1;7878:24;;;;;;;;:::i;:::-;;;;;;;;;;;;;-1:-1:-1;;;;;7878:24:23;7945:30;;;:24;:30;;;;;;;;8001:35;;;;;;;;;;;;;;;;;;;;;7878:24;8001:35;;;;;;;;;;;;;;;;;;;;;;;;;;;7878:24;;-1:-1:-1;7945:30:23;;8001:35;;;;7945:30;;8001:35;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7989:6;7996:1;7989:9;;;;;;;;:::i;:::-;;;;;;;;;;:47;-1:-1:-1;;7844:3:23;;7790:257;;14376:523;-1:-1:-1;;;;;14451:13:23;;;14430:18;14451:13;;;:7;:13;;;;;14478:15;;14451:13;;14478:15;14474:66;;14523:7;14376:523;:::o;14474:66::-;14573:13;;;;-1:-1:-1;;;;;14616:12:23;;;14601:27;;14597:257;;;14701:27;14716:12;-1:-1:-1;;;;;14701:12:23;;;:27;:::i;:::-;14669:15;;-1:-1:-1;;;;;14669:15:23;14644:41;;;;:24;:41;;;;;14669:15;14644:53;:84;;:53;;:41;:84;;;;;:::i;:::-;;;;-1:-1:-1;14597:257:23;;-1:-1:-1;14597:257:23;;14816:27;-1:-1:-1;;;;;14831:12:23;;;14816;:27;:::i;:::-;14784:15;;-1:-1:-1;;;;;14784:15:23;14759:41;;;;:24;:41;;;;;14784:15;14759:53;:84;;:53;;:41;:84;;;;;:::i;:::-;;;;-1:-1:-1;;14597:257:23;-1:-1:-1;;;;;;14880:12:23;;;;14864:13;;;;:28;14376:523::o;9943:162::-;10054:2;10034:22;;10026:72;;;;-1:-1:-1;;;10026:72:23;;19241:2:32;10026:72:23;;;19223:21:32;19280:2;19260:18;;;19253:30;19319:34;19299:18;;;19292:62;-1:-1:-1;;;19370:18:32;;;19363:35;19415:19;;10026:72:23;19039:401:32;10026:72:23;9943:162;;:::o;2701:523::-;2751:21;:28;2739:9;2806:5;2810:1;2751:28;2806:5;:::i;:::-;2794:17;;2789:429;2813:5;;2789:429;;2901:9;2991:5;:1;2995;2991:5;:::i;:::-;2931:54;;;2948:15;2931:54;;;19630:19:32;2965:16:23;19665:12:32;;;19658:28;;;;19702:12;;;19695:28;;;19739:12;;2931:54:23;;;;;;;;;;;;2921:65;;;;;;2913:74;;:84;;;;:::i;:::-;2901:96;;3058:12;3073:21;3095:1;3073:24;;;;;;;;:::i;:::-;;;;;;;;;;;3138:21;:24;;-1:-1:-1;;;;;3073:24:23;;;;-1:-1:-1;3138:21:23;3160:1;;3138:24;;;;;;:::i;:::-;;;;;;;;;;;3111:21;:24;;-1:-1:-1;;;;;3138:24:23;;;;3133:1;;3111:24;;;;;;:::i;:::-;;;;;;;;;:51;;;;;-1:-1:-1;;;;;3111:51:23;;;;;-1:-1:-1;;;;;3111:51:23;;;;;;3203:4;3176:21;3198:1;3176:24;;;;;;;;:::i;:::-;;;;;;;;;:31;;;;;-1:-1:-1;;;;;3176:31:23;;;;;-1:-1:-1;;;;;3176:31:23;;;;;;2825:393;;2820:3;;;;;:::i;:::-;;;;2789:429;;3230:295;3295:18;;-1:-1:-1;;;;;3295:18:23;3324:162;-1:-1:-1;;;;;3331:18:23;;;3324:162;;-1:-1:-1;;;;;3408:23:23;;;3365:15;3408:23;;;:14;:23;;;;;;;-1:-1:-1;;;;;;3445:30:23;;;;;3408:23;3324:162;;;-1:-1:-1;3517:1:23;3495:19;:23;3230:295::o;15238:337::-;15317:7;15351:3;15344;:10;;15336:70;;;;-1:-1:-1;;;15336:70:23;;20178:2:32;15336:70:23;;;20160:21:32;20217:2;20197:18;;;20190:30;20256:34;20236:18;;;20229:62;-1:-1:-1;;;20307:18:32;;;20300:45;20362:19;;15336:70:23;19976:411:32;15336:70:23;15428:3;15420:5;:11;15416:153;;;-1:-1:-1;15454:3:23;15447:10;;15416:153;15486:3;15478:5;:11;15474:95;;;-1:-1:-1;15512:3:23;15505:10;;15474:95;-1:-1:-1;15553:5:23;15474:95;15238:337;;;;;:::o;5238:1390::-;-1:-1:-1;;;;;5338:30:23;;5310:25;5338:30;;;:24;:30;;;;;;;;5310:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5338:30;5310:58;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5310:58:23;;;;-1:-1:-1;;5424:89:23;;;;;;;;5441:18;;-1:-1:-1;;;;;5441:18:23;5424:89;;;-1:-1:-1;5467:44:23;;;:24;5424:89;5467:44;;;;;;;5424:89;;;;;;;;;;;5441:18;5424:89;;;;;;;;;;;;;;;;;;;;;;;;;;;5310:58;;-1:-1:-1;5396:184:23;;5424:89;;-1:-1:-1;5424:89:23;;;;;;5467:44;;5424:89;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5531:35;;;;;;;;5548:4;-1:-1:-1;;;;;5531:35:23;;;;;5560:4;5531:35;;;5396:10;:184::i;:::-;5379:999;;;5605:16;5616:4;5605:10;:16::i;:::-;5379:999;;;5685:18;;-1:-1:-1;;;;;5685:18:23;;;5652:15;5670:34;;;:14;:34;;;;;;;;;;5770:598;-1:-1:-1;;;;;5805:21:23;;5801:122;;5850:27;5862:8;5872:4;5850:11;:27::i;:::-;5899:5;;5801:122;6002:67;;;;;;;;-1:-1:-1;;;;;6002:67:23;;;;;-1:-1:-1;6034:33:23;;;:24;6002:67;6034:33;;;;;;;6002:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5966:186;;6002:67;;;;6034:33;6002:67;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6095:35;;;;;;;;6112:4;-1:-1:-1;;;;;6095:35:23;;;;;6124:4;6095:35;;;5966:10;:186::i;:::-;5941:325;;;6193:27;6205:8;6215:4;6193:11;:27::i;5941:325::-;-1:-1:-1;;;;;;6330:23:23;;;;;;;:14;:23;;;;;;;;5770:598;;;5638:740;;5379:999;6414:3;6392:25;;:19;;:25;6388:234;;;6463:18;;;-1:-1:-1;;;;;6463:18:23;;;6433:12;6448:34;;;:14;:34;;;;;;;-1:-1:-1;;;;;;6496:41:23;;;;;;6551:25;;6448:34;;6551:25;;;;;;;6590:19;:21;;6448:34;;6590:21;;;:::i;:::-;;;;;;6419:203;5300:1328;5238:1390;;:::o;14905:327::-;15006:4;15057:10;:15;;;:27;;;15026:10;:15;;;:27;;;:58;15022:129;;-1:-1:-1;15125:15:23;;15107;;-1:-1:-1;;;;;15107:33:23;;;;;;15100:40;;15022:129;-1:-1:-1;15198:15:23;;;;;:27;;;15168:15;;;;:27;;:57;;14905:327::o;6634:167::-;6710:18;;;-1:-1:-1;;;;;6687:20:23;;;6710:18;6687:20;;;:14;:20;;;;;:41;;6710:18;;;;-1:-1:-1;;;;;;6687:41:23;;;;;;;6738:25;;;;;;;;;6773:19;:21;;;;;;:::i;:::-;;;;;;6634:167;:::o;6807:186::-;-1:-1:-1;;;;;6898:20:23;;;;;;;:14;:20;;;;;;;;6875;;;;;;;;;:43;;6898:20;;;;-1:-1:-1;;;;;;6875:43:23;;;;;;;6928:20;;;:27;;;;;;;;;;6965:19;:21;;;;;;:::i;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;196:173:32;264:20;;-1:-1:-1;;;;;313:31:32;;303:42;;293:70;;359:1;356;349:12;293:70;196:173;;;:::o;374:186::-;433:6;486:2;474:9;465:7;461:23;457:32;454:52;;;502:1;499;492:12;454:52;525:29;544:9;525:29;:::i;565:871::-;682:1;678;673:3;669:11;665:19;657:5;651:12;647:38;642:3;635:51;617:3;732:4;725:5;721:16;715:23;770:4;763;758:3;754:14;747:28;813:12;807:19;800:4;795:3;791:14;784:43;881:4;867:12;863:23;857:30;852:2;847:3;843:12;836:52;958:4;944:12;940:23;934:30;927:38;920:46;913:4;908:3;904:14;897:70;1022:2;1008:12;1004:21;998:28;976:50;;1057:4;1051:3;1046;1042:13;1035:27;1091:14;1085:21;1137:6;1131:3;1126;1122:13;1115:29;1162:1;1172:147;1186:6;1183:1;1180:13;1172:147;;;1302:4;1278:22;;;1274:33;;1268:40;1262:3;1249:11;;;1245:21;1238:71;1201:12;1172:147;;;1176:3;1363:1;1357:3;1348:6;1343:3;1339:16;1335:26;1328:37;1426:3;1419:2;1415:7;1410:2;1402:6;1398:15;1394:29;1389:3;1385:39;1381:49;1374:56;;;;565:871;;;;:::o;1441:266::-;1626:2;1615:9;1608:21;1589:4;1646:55;1697:2;1686:9;1682:18;1674:6;1646:55;:::i;1712:610::-;1798:6;1806;1859:2;1847:9;1838:7;1834:23;1830:32;1827:52;;;1875:1;1872;1865:12;1827:52;1915:9;1902:23;-1:-1:-1;;;;;1940:6:32;1937:30;1934:50;;;1980:1;1977;1970:12;1934:50;2003:22;;2056:4;2048:13;;2044:27;-1:-1:-1;2034:55:32;;2085:1;2082;2075:12;2034:55;2125:2;2112:16;-1:-1:-1;;;;;2143:6:32;2140:30;2137:50;;;2183:1;2180;2173:12;2137:50;2236:7;2231:2;2221:6;2218:1;2214:14;2210:2;2206:23;2202:32;2199:45;2196:65;;;2257:1;2254;2247:12;2196:65;2288:2;2280:11;;;;;2310:6;;-1:-1:-1;1712:610:32;-1:-1:-1;;;1712:610:32:o;2327:346::-;2395:6;2403;2456:2;2444:9;2435:7;2431:23;2427:32;2424:52;;;2472:1;2469;2462:12;2424:52;-1:-1:-1;;2517:23:32;;;2637:2;2622:18;;;2609:32;;-1:-1:-1;2327:346:32:o;2678:1554::-;2868:4;2916:2;2905:9;2901:18;2946:2;2935:9;2928:21;2969:6;3004;2998:13;3035:6;3027;3020:22;3073:2;3062:9;3058:18;3051:25;;3135:2;3125:6;3122:1;3118:14;3107:9;3103:30;3099:39;3085:53;;3173:2;3165:6;3161:15;3194:1;3204:999;3218:6;3215:1;3212:13;3204:999;;;3283:22;;;-1:-1:-1;;3279:36:32;3267:49;;3339:13;;3422:9;;3407:25;;3479:2;3471:11;;;3465:18;3391:2;3503:15;;;3496:27;;;3584:19;;3379:15;;;3616:24;;;3706:21;;;-1:-1:-1;;3674:2:32;3662:15;;;3765:330;3781:8;3776:3;3773:17;3765:330;;;3854:15;;3904:9;;-1:-1:-1;;;;;3900:35:32;3886:50;;3990:2;3982:11;;;3976:18;3960:14;;;3953:42;4064:17;;;;3932:1;3800:11;;;;;4032:2;4021:14;;;;3765:330;;;-1:-1:-1;4118:5:32;-1:-1:-1;;;4158:2:32;4181:12;;;;4146:15;;;;;3240:1;3233:9;3204:999;;;-1:-1:-1;4220:6:32;;2678:1554;-1:-1:-1;;;;;;2678:1554:32:o;4237:586::-;4307:6;4315;4368:2;4356:9;4347:7;4343:23;4339:32;4336:52;;;4384:1;4381;4374:12;4336:52;4424:9;4411:23;-1:-1:-1;;;;;4449:6:32;4446:30;4443:50;;;4489:1;4486;4479:12;4443:50;4512:22;;4565:4;4557:13;;4553:27;-1:-1:-1;4543:55:32;;4594:1;4591;4584:12;4543:55;4634:2;4621:16;-1:-1:-1;;;;;4652:6:32;4649:30;4646:50;;;4692:1;4689;4682:12;4646:50;4737:7;4732:2;4723:6;4719:2;4715:15;4711:24;4708:37;4705:57;;;4758:1;4755;4748:12;4828:389;4917:6;4970:2;4958:9;4949:7;4945:23;4941:32;4938:52;;;4986:1;4983;4976:12;4938:52;5026:9;5013:23;-1:-1:-1;;;;;5051:6:32;5048:30;5045:50;;;5091:1;5088;5081:12;5045:50;5114:22;;5170:2;5152:16;;;5148:25;5145:45;;;5186:1;5183;5176:12;5222:828;5420:4;5468:2;5457:9;5453:18;5498:2;5487:9;5480:21;5521:6;5556;5550:13;5587:6;5579;5572:22;5625:2;5614:9;5610:18;5603:25;;5687:2;5677:6;5674:1;5670:14;5659:9;5655:30;5651:39;5637:53;;5725:2;5717:6;5713:15;5746:1;5756:265;5770:6;5767:1;5764:13;5756:265;;;5863:2;5859:7;5847:9;5839:6;5835:22;5831:36;5826:3;5819:49;5891:50;5934:6;5925;5919:13;5891:50;:::i;:::-;5881:60;-1:-1:-1;5976:2:32;5999:12;;;;5964:15;;;;;5792:1;5785:9;5756:265;;6055:269;6112:6;6165:2;6153:9;6144:7;6140:23;6136:32;6133:52;;;6181:1;6178;6171:12;6133:52;6220:9;6207:23;6270:4;6263:5;6259:16;6252:5;6249:27;6239:55;;6290:1;6287;6280:12;6521:300;6589:6;6597;6650:2;6638:9;6629:7;6625:23;6621:32;6618:52;;;6666:1;6663;6656:12;6618:52;6689:29;6708:9;6689:29;:::i;:::-;6679:39;6787:2;6772:18;;;;6759:32;;-1:-1:-1;;;6521:300:32:o;6826:806::-;7074:2;7086:21;;;7156:13;;7059:18;;;7178:22;;;7026:4;;7257:15;;;7231:2;7216:18;;;7026:4;7300:306;7314:6;7311:1;7308:13;7300:306;;;7373:13;;7415:9;;-1:-1:-1;;;;;7411:35:32;;;7399:48;;7499:2;7491:11;;;7485:18;7481:44;7467:12;;;7460:66;7581:15;;;;7555:2;7546:12;;;;7443:1;7329:9;7300:306;;;-1:-1:-1;7623:3:32;;6826:806;-1:-1:-1;;;;;6826:806:32:o;7994:380::-;8073:1;8069:12;;;;8116;;;8137:61;;8191:4;8183:6;8179:17;8169:27;;8137:61;8244:2;8236:6;8233:14;8213:18;8210:38;8207:161;;8290:10;8285:3;8281:20;8278:1;8271:31;8325:4;8322:1;8315:15;8353:4;8350:1;8343:15;8379:356;8581:2;8563:21;;;8600:18;;;8593:30;8659:34;8654:2;8639:18;;8632:62;8726:2;8711:18;;8379:356::o;8740:127::-;8801:10;8796:3;8792:20;8789:1;8782:31;8832:4;8829:1;8822:15;8856:4;8853:1;8846:15;9521:127;9582:10;9577:3;9573:20;9570:1;9563:31;9613:4;9610:1;9603:15;9637:4;9634:1;9627:15;9653:128;9720:9;;;9741:11;;;9738:37;;;9755:18;;:::i;9786:136::-;9825:3;9853:5;9843:39;;9862:18;;:::i;:::-;-1:-1:-1;;;9898:18:32;;9786:136::o;9927:125::-;9992:9;;;10013:10;;;10010:36;;;10026:18;;:::i;10057:127::-;10118:10;10113:3;10109:20;10106:1;10099:31;10149:4;10146:1;10139:15;10173:4;10170:1;10163:15;10906:271;11089:6;11081;11076:3;11063:33;11045:3;11115:16;;11140:13;;;11115:16;10906:271;-1:-1:-1;10906:271:32:o;11586:135::-;11625:3;11646:17;;;11643:43;;11666:18;;:::i;:::-;-1:-1:-1;11713:1:32;11702:13;;11586:135::o;11851:517::-;11952:2;11947:3;11944:11;11941:421;;;11988:5;11985:1;11978:16;12032:4;12029:1;12019:18;12102:2;12090:10;12086:19;12083:1;12079:27;12073:4;12069:38;12138:4;12126:10;12123:20;12120:47;;;-1:-1:-1;12161:4:32;12120:47;12216:2;12211:3;12207:12;12204:1;12200:20;12194:4;12190:31;12180:41;;12271:81;12289:2;12282:5;12279:13;12271:81;;;12348:1;12334:16;;12315:1;12304:13;12271:81;;12544:1295;12668:3;12662:10;-1:-1:-1;;;;;12687:6:32;12684:30;12681:56;;;12717:18;;:::i;:::-;12746:96;12835:6;12795:38;12827:4;12821:11;12795:38;:::i;:::-;12789:4;12746:96;:::i;:::-;12891:4;12922:2;12911:14;;12939:1;12934:648;;;;13626:1;13643:6;13640:89;;;-1:-1:-1;13695:19:32;;;13689:26;13640:89;-1:-1:-1;;12501:1:32;12497:11;;;12493:24;12489:29;12479:40;12525:1;12521:11;;;12476:57;13742:81;;12904:929;;12934:648;11798:1;11791:14;;;11835:4;11822:18;;-1:-1:-1;;12970:20:32;;;13087:222;13101:7;13098:1;13095:14;13087:222;;;13183:19;;;13177:26;13162:42;;13290:4;13275:20;;;;13243:1;13231:14;;;;13117:12;13087:222;;;13091:3;13337:6;13328:7;13325:19;13322:201;;;13398:19;;;13392:26;-1:-1:-1;;13481:1:32;13477:14;;;13493:3;13473:24;13469:37;13465:42;13450:58;13435:74;;13322:201;-1:-1:-1;;;;13569:1:32;13553:14;;;13549:22;13536:36;;-1:-1:-1;12544:1295:32:o;13844:485::-;-1:-1:-1;;;;;14029:32:32;;14011:51;;14098:2;14093;14078:18;;14071:30;;;14117:18;;14110:34;;;14137:6;14186;14181:2;14166:18;;14153:48;14250:1;14221:22;;;14245:2;14217:31;;;14210:42;;;;14313:2;14292:15;;;-1:-1:-1;;14288:29:32;14273:45;14269:54;;13844:485;-1:-1:-1;;13844:485:32:o;14334:332::-;14434:4;14492:11;14479:25;14586:3;14582:8;14571;14555:14;14551:29;14547:44;14527:18;14523:69;14513:97;;14606:1;14603;14596:12;14513:97;14627:33;;;;;14334:332;-1:-1:-1;;14334:332:32:o;14671:1178::-;-1:-1:-1;;;;;14772:3:32;14769:27;14766:53;;;14799:18;;:::i;:::-;14828:93;14917:3;14877:38;14909:4;14903:11;14877:38;:::i;:::-;14871:4;14828:93;:::i;:::-;14947:1;14972:2;14967:3;14964:11;14989:1;14984:607;;;;15635:1;15652:3;15649:93;;;-1:-1:-1;15708:19:32;;;15695:33;15649:93;-1:-1:-1;;12501:1:32;12497:11;;;12493:24;12489:29;12479:40;12525:1;12521:11;;;12476:57;15755:78;;14957:886;;14984:607;11798:1;11791:14;;;11835:4;11822:18;;-1:-1:-1;;15020:17:32;;;15134:229;15148:7;15145:1;15142:14;15134:229;;;15237:19;;;15224:33;15209:49;;15344:4;15329:20;;;;15297:1;15285:14;;;;15164:12;15134:229;;;15138:3;15391;15382:7;15379:16;15376:159;;;15515:1;15511:6;15505:3;15499;15496:1;15492:11;15488:21;15484:34;15480:39;15467:9;15462:3;15458:19;15445:33;15441:79;15433:6;15426:95;15376:159;;;15578:1;15572:3;15569:1;15565:11;15561:19;15555:4;15548:33;14957:886;;14671:1178;;;:::o;15854:1163::-;16041:19;;16069:21;;16159:2;16148:14;;16135:28;16189:1;16179:12;;16172:29;16238:1;16228:12;;16288:2;16277:14;;16264:28;16318:15;;16311:23;16353:15;;;16343:43;;16382:1;16379;16372:12;16343:43;16437:3;16433:8;16420:10;16414:17;16410:32;16395:47;;16490:3;16486:2;16482:12;16473:7;16470:25;16458:10;16451:45;;;;16555:2;16548:5;16544:14;16531:28;16638:2;16634:7;16626:5;16610:14;16606:26;16602:40;16582:18;16578:65;16568:93;;16657:1;16654;16647:12;16568:93;16682:30;;16735:18;;-1:-1:-1;;;;;16765:30:32;;16762:50;;;16808:1;16805;16798:12;16762:50;16845:2;16839:4;16835:13;16821:27;;16892:6;16876:14;16872:27;16864:6;16860:40;16857:60;;;16913:1;16910;16903:12;16857:60;16926:85;17004:6;16996;16992:1;16986:4;16982:12;16926:85;:::i;:::-;;;15854:1163;;:::o;19762:209::-;19794:1;19820;19810:132;;19864:10;19859:3;19855:20;19852:1;19845:31;19899:4;19896:1;19889:15;19927:4;19924:1;19917:15;19810:132;-1:-1:-1;19956:9:32;;19762:209::o", + "linkReferences": {}, + "immutableReferences": { + "39841": [ + { "start": 996, "length": 32 }, + { "start": 1792, "length": 32 }, + { "start": 2256, "length": 32 }, + { "start": 3142, "length": 32 }, + { "start": 4398, "length": 32 }, + { "start": 5878, "length": 32 } + ] + } + }, "methodIdentifiers": { "activeValidatorsCount()": "0d2bd909", "calculateTopValidators(uint8)": "b5cfa68c", "getAllValidators()": "f3513a37", + "getRounds(uint256,uint256)": "40f74f47", + "getRoundsCount()": "a09686c4", "getTopValidators()": "afeea115", "getValidator(address)": "1904bb2e", - "getValidatorRounds()": "a721c30a", "getVotes(address,uint256)": "eb9019d4", "getVotesCount()": "1b605b86", "isValidatorRegistered(address)": "d04a68c7", @@ -504,33 +303,17 @@ "updateVoters(address[])": "2bdf6d43", "vote(address)": "6dd7d8ea" }, - "rawMetadata": "{\"compiler\":{\"version\":\"0.8.27+commit.40a35a09\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"validator\",\"type\":\"address\"}],\"name\":\"Unvoted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"bls12_381_public_key\",\"type\":\"bytes\"}],\"name\":\"ValidatorRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ValidatorResigned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"validator\",\"type\":\"address\"}],\"name\":\"Voted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"activeValidatorsCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"n\",\"type\":\"uint8\"}],\"name\":\"calculateTopValidators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllValidators\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"votersCount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"voteBalance\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isResigned\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"bls12_381_public_key\",\"type\":\"bytes\"}],\"internalType\":\"struct ValidatorData\",\"name\":\"data\",\"type\":\"tuple\"}],\"internalType\":\"struct Validator[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTopValidators\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"votersCount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"voteBalance\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isResigned\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"bls12_381_public_key\",\"type\":\"bytes\"}],\"internalType\":\"struct ValidatorData\",\"name\":\"data\",\"type\":\"tuple\"}],\"internalType\":\"struct Validator[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"getValidator\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"votersCount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"voteBalance\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isResigned\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"bls12_381_public_key\",\"type\":\"bytes\"}],\"internalType\":\"struct ValidatorData\",\"name\":\"data\",\"type\":\"tuple\"}],\"internalType\":\"struct Validator\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getValidatorRounds\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"validatorAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"voteBalance\",\"type\":\"uint256\"}],\"internalType\":\"struct ValidatorRoundValidator[]\",\"name\":\"validators\",\"type\":\"tuple[]\"}],\"internalType\":\"struct ValidatorRound[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"name\":\"getVotes\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"validator\",\"type\":\"address\"}],\"internalType\":\"struct VoteResult[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVotesCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"isValidatorRegistered\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"bls12_381_public_key\",\"type\":\"bytes\"}],\"name\":\"registerValidator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registeredValidatorsCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resignValidator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resignedValidatorsCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unvote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"votersCount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"voteBalance\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isResigned\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"bls12_381_public_key\",\"type\":\"bytes\"}],\"internalType\":\"struct ValidatorData\",\"name\":\"data\",\"type\":\"tuple\"}],\"internalType\":\"struct Validator\",\"name\":\"_validator\",\"type\":\"tuple\"}],\"name\":\"updateValidator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"voters\",\"type\":\"address[]\"}],\"name\":\"updateVoters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"vote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/consensus/Consensus.sol\":\"Consensus\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@contracts/=src/\",\":@forge-std/=forge-std/src/\"]},\"sources\":{\"src/consensus/Consensus.sol\":{\"keccak256\":\"0xf197ab158d460fe4b1ee377a4a410c6da531d0b9a45b8870ecd00f86ccb904f2\",\"urls\":[\"bzz-raw://a9850ac44486d99981819ca0ea9193ba882820a21563f1e0109d938233124bf4\",\"dweb:/ipfs/QmTJrRTZUJKZVoSG9vtpjLtijLdiCXiUzDrNkNivj7A5qr\"]}},\"version\":1}", + "rawMetadata": "{\"compiler\":{\"version\":\"0.8.27+commit.40a35a09\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"validator\",\"type\":\"address\"}],\"name\":\"Unvoted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"bls12_381_public_key\",\"type\":\"bytes\"}],\"name\":\"ValidatorRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ValidatorResigned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"validator\",\"type\":\"address\"}],\"name\":\"Voted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"activeValidatorsCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"n\",\"type\":\"uint8\"}],\"name\":\"calculateTopValidators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllValidators\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"votersCount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"voteBalance\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isResigned\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"bls12_381_public_key\",\"type\":\"bytes\"}],\"internalType\":\"struct ValidatorData\",\"name\":\"data\",\"type\":\"tuple\"}],\"internalType\":\"struct Validator[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"offset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"name\":\"getRounds\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"voteBalance\",\"type\":\"uint256\"}],\"internalType\":\"struct RoundValidator[]\",\"name\":\"validators\",\"type\":\"tuple[]\"}],\"internalType\":\"struct Round[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRoundsCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTopValidators\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"votersCount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"voteBalance\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isResigned\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"bls12_381_public_key\",\"type\":\"bytes\"}],\"internalType\":\"struct ValidatorData\",\"name\":\"data\",\"type\":\"tuple\"}],\"internalType\":\"struct Validator[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"getValidator\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"votersCount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"voteBalance\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isResigned\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"bls12_381_public_key\",\"type\":\"bytes\"}],\"internalType\":\"struct ValidatorData\",\"name\":\"data\",\"type\":\"tuple\"}],\"internalType\":\"struct Validator\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"name\":\"getVotes\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"validator\",\"type\":\"address\"}],\"internalType\":\"struct VoteResult[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVotesCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"isValidatorRegistered\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"bls12_381_public_key\",\"type\":\"bytes\"}],\"name\":\"registerValidator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registeredValidatorsCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resignValidator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resignedValidatorsCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unvote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"votersCount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"voteBalance\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isResigned\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"bls12_381_public_key\",\"type\":\"bytes\"}],\"internalType\":\"struct ValidatorData\",\"name\":\"data\",\"type\":\"tuple\"}],\"internalType\":\"struct Validator\",\"name\":\"_validator\",\"type\":\"tuple\"}],\"name\":\"updateValidator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"voters\",\"type\":\"address[]\"}],\"name\":\"updateVoters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"vote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/consensus/Consensus.sol\":\"Consensus\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@contracts/=src/\",\":@forge-std/=forge-std/src/\"]},\"sources\":{\"src/consensus/Consensus.sol\":{\"keccak256\":\"0x9a5f2f1bb96addff98a755f2313ff08406ae1b6823b6bc4844d916c7c57794d4\",\"urls\":[\"bzz-raw://40dc2c7163bcafce4a404920f3aa2ba9234ba51c6880ec877d44c73540f3a5d9\",\"dweb:/ipfs/Qmc9cLxktHSNwmMpJtJ3AgGGvJJsZPqebq2Sr3fFhAYQaz\"]}},\"version\":1}", "metadata": { - "compiler": { - "version": "0.8.27+commit.40a35a09" - }, + "compiler": { "version": "0.8.27+commit.40a35a09" }, "language": "Solidity", "output": { "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, + { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [ - { - "internalType": "address", - "name": "voter", - "type": "address", - "indexed": false - }, - { - "internalType": "address", - "name": "validator", - "type": "address", - "indexed": false - } + { "internalType": "address", "name": "voter", "type": "address", "indexed": false }, + { "internalType": "address", "name": "validator", "type": "address", "indexed": false } ], "type": "event", "name": "Unvoted", @@ -538,50 +321,23 @@ }, { "inputs": [ - { - "internalType": "address", - "name": "addr", - "type": "address", - "indexed": false - }, - { - "internalType": "bytes", - "name": "bls12_381_public_key", - "type": "bytes", - "indexed": false - } + { "internalType": "address", "name": "addr", "type": "address", "indexed": false }, + { "internalType": "bytes", "name": "bls12_381_public_key", "type": "bytes", "indexed": false } ], "type": "event", "name": "ValidatorRegistered", "anonymous": false }, { - "inputs": [ - { - "internalType": "address", - "name": "addr", - "type": "address", - "indexed": false - } - ], + "inputs": [{ "internalType": "address", "name": "addr", "type": "address", "indexed": false }], "type": "event", "name": "ValidatorResigned", "anonymous": false }, { "inputs": [ - { - "internalType": "address", - "name": "voter", - "type": "address", - "indexed": false - }, - { - "internalType": "address", - "name": "validator", - "type": "address", - "indexed": false - } + { "internalType": "address", "name": "voter", "type": "address", "indexed": false }, + { "internalType": "address", "name": "validator", "type": "address", "indexed": false } ], "type": "event", "name": "Voted", @@ -592,22 +348,10 @@ "stateMutability": "view", "type": "function", "name": "activeValidatorsCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ] + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }] }, { - "inputs": [ - { - "internalType": "uint8", - "name": "n", - "type": "uint8" - } - ], + "inputs": [{ "internalType": "uint8", "name": "n", "type": "uint8" }], "stateMutability": "nonpayable", "type": "function", "name": "calculateTopValidators" @@ -623,36 +367,16 @@ "name": "", "type": "tuple[]", "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, + { "internalType": "address", "name": "addr", "type": "address" }, { "internalType": "struct ValidatorData", "name": "data", "type": "tuple", "components": [ - { - "internalType": "uint256", - "name": "votersCount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "voteBalance", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "isResigned", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "bls12_381_public_key", - "type": "bytes" - } + { "internalType": "uint256", "name": "votersCount", "type": "uint256" }, + { "internalType": "uint256", "name": "voteBalance", "type": "uint256" }, + { "internalType": "bool", "name": "isResigned", "type": "bool" }, + { "internalType": "bytes", "name": "bls12_381_public_key", "type": "bytes" } ] } ] @@ -660,46 +384,27 @@ ] }, { - "inputs": [], + "inputs": [ + { "internalType": "uint256", "name": "offset", "type": "uint256" }, + { "internalType": "uint256", "name": "count", "type": "uint256" } + ], "stateMutability": "view", "type": "function", - "name": "getTopValidators", + "name": "getRounds", "outputs": [ { - "internalType": "struct Validator[]", + "internalType": "struct Round[]", "name": "", "type": "tuple[]", "components": [ + { "internalType": "uint256", "name": "round", "type": "uint256" }, { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "struct ValidatorData", - "name": "data", - "type": "tuple", + "internalType": "struct RoundValidator[]", + "name": "validators", + "type": "tuple[]", "components": [ - { - "internalType": "uint256", - "name": "votersCount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "voteBalance", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "isResigned", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "bls12_381_public_key", - "type": "bytes" - } + { "internalType": "address", "name": "addr", "type": "address" }, + { "internalType": "uint256", "name": "voteBalance", "type": "uint256" } ] } ] @@ -707,52 +412,33 @@ ] }, { - "inputs": [ - { - "internalType": "address", - "name": "_addr", - "type": "address" - } - ], + "inputs": [], "stateMutability": "view", "type": "function", - "name": "getValidator", + "name": "getRoundsCount", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }] + }, + { + "inputs": [], + "stateMutability": "view", + "type": "function", + "name": "getTopValidators", "outputs": [ { - "internalType": "struct Validator", + "internalType": "struct Validator[]", "name": "", - "type": "tuple", + "type": "tuple[]", "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, + { "internalType": "address", "name": "addr", "type": "address" }, { "internalType": "struct ValidatorData", "name": "data", "type": "tuple", "components": [ - { - "internalType": "uint256", - "name": "votersCount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "voteBalance", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "isResigned", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "bls12_381_public_key", - "type": "bytes" - } + { "internalType": "uint256", "name": "votersCount", "type": "uint256" }, + { "internalType": "uint256", "name": "voteBalance", "type": "uint256" }, + { "internalType": "bool", "name": "isResigned", "type": "bool" }, + { "internalType": "bytes", "name": "bls12_381_public_key", "type": "bytes" } ] } ] @@ -760,36 +446,26 @@ ] }, { - "inputs": [], + "inputs": [{ "internalType": "address", "name": "_addr", "type": "address" }], "stateMutability": "view", "type": "function", - "name": "getValidatorRounds", + "name": "getValidator", "outputs": [ { - "internalType": "struct ValidatorRound[]", + "internalType": "struct Validator", "name": "", - "type": "tuple[]", + "type": "tuple", "components": [ + { "internalType": "address", "name": "addr", "type": "address" }, { - "internalType": "uint256", - "name": "round", - "type": "uint256" - }, - { - "internalType": "struct ValidatorRoundValidator[]", - "name": "validators", - "type": "tuple[]", + "internalType": "struct ValidatorData", + "name": "data", + "type": "tuple", "components": [ - { - "internalType": "address", - "name": "validatorAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "voteBalance", - "type": "uint256" - } + { "internalType": "uint256", "name": "votersCount", "type": "uint256" }, + { "internalType": "uint256", "name": "voteBalance", "type": "uint256" }, + { "internalType": "bool", "name": "isResigned", "type": "bool" }, + { "internalType": "bytes", "name": "bls12_381_public_key", "type": "bytes" } ] } ] @@ -798,16 +474,8 @@ }, { "inputs": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "count", - "type": "uint256" - } + { "internalType": "address", "name": "addr", "type": "address" }, + { "internalType": "uint256", "name": "count", "type": "uint256" } ], "stateMutability": "view", "type": "function", @@ -818,16 +486,8 @@ "name": "", "type": "tuple[]", "components": [ - { - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "internalType": "address", - "name": "validator", - "type": "address" - } + { "internalType": "address", "name": "voter", "type": "address" }, + { "internalType": "address", "name": "validator", "type": "address" } ] } ] @@ -837,41 +497,17 @@ "stateMutability": "view", "type": "function", "name": "getVotesCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ] + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }] }, { - "inputs": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - } - ], + "inputs": [{ "internalType": "address", "name": "addr", "type": "address" }], "stateMutability": "view", "type": "function", "name": "isValidatorRegistered", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ] + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }] }, { - "inputs": [ - { - "internalType": "bytes", - "name": "bls12_381_public_key", - "type": "bytes" - } - ], + "inputs": [{ "internalType": "bytes", "name": "bls12_381_public_key", "type": "bytes" }], "stateMutability": "nonpayable", "type": "function", "name": "registerValidator" @@ -881,39 +517,17 @@ "stateMutability": "view", "type": "function", "name": "registeredValidatorsCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ] - }, - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "function", - "name": "resignValidator" + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }] }, + { "inputs": [], "stateMutability": "nonpayable", "type": "function", "name": "resignValidator" }, { "inputs": [], "stateMutability": "view", "type": "function", "name": "resignedValidatorsCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ] - }, - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "function", - "name": "unvote" + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }] }, + { "inputs": [], "stateMutability": "nonpayable", "type": "function", "name": "unvote" }, { "inputs": [ { @@ -921,36 +535,16 @@ "name": "_validator", "type": "tuple", "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, + { "internalType": "address", "name": "addr", "type": "address" }, { "internalType": "struct ValidatorData", "name": "data", "type": "tuple", "components": [ - { - "internalType": "uint256", - "name": "votersCount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "voteBalance", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "isResigned", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "bls12_381_public_key", - "type": "bytes" - } + { "internalType": "uint256", "name": "votersCount", "type": "uint256" }, + { "internalType": "uint256", "name": "voteBalance", "type": "uint256" }, + { "internalType": "bool", "name": "isResigned", "type": "bool" }, + { "internalType": "bytes", "name": "bls12_381_public_key", "type": "bytes" } ] } ] @@ -961,62 +555,35 @@ "name": "updateValidator" }, { - "inputs": [ - { - "internalType": "address[]", - "name": "voters", - "type": "address[]" - } - ], + "inputs": [{ "internalType": "address[]", "name": "voters", "type": "address[]" }], "stateMutability": "nonpayable", "type": "function", "name": "updateVoters" }, { - "inputs": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - } - ], + "inputs": [{ "internalType": "address", "name": "addr", "type": "address" }], "stateMutability": "nonpayable", "type": "function", "name": "vote" } ], - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - } + "devdoc": { "kind": "dev", "methods": {}, "version": 1 }, + "userdoc": { "kind": "user", "methods": {}, "version": 1 } }, "settings": { "remappings": ["@contracts/=src/", "@forge-std/=forge-std/src/"], - "optimizer": { - "enabled": true, - "runs": 200 - }, - "metadata": { - "bytecodeHash": "ipfs" - }, - "compilationTarget": { - "src/consensus/Consensus.sol": "Consensus" - }, + "optimizer": { "enabled": true, "runs": 200 }, + "metadata": { "bytecodeHash": "ipfs" }, + "compilationTarget": { "src/consensus/Consensus.sol": "Consensus" }, "evmVersion": "shanghai", "libraries": {} }, "sources": { "src/consensus/Consensus.sol": { - "keccak256": "0xf197ab158d460fe4b1ee377a4a410c6da531d0b9a45b8870ecd00f86ccb904f2", + "keccak256": "0x9a5f2f1bb96addff98a755f2313ff08406ae1b6823b6bc4844d916c7c57794d4", "urls": [ - "bzz-raw://a9850ac44486d99981819ca0ea9193ba882820a21563f1e0109d938233124bf4", - "dweb:/ipfs/QmTJrRTZUJKZVoSG9vtpjLtijLdiCXiUzDrNkNivj7A5qr" + "bzz-raw://40dc2c7163bcafce4a404920f3aa2ba9234ba51c6880ec877d44c73540f3a5d9", + "dweb:/ipfs/Qmc9cLxktHSNwmMpJtJ3AgGGvJJsZPqebq2Sr3fFhAYQaz" ], "license": null } diff --git a/packages/kernel/source/utils/index.ts b/packages/kernel/source/utils/index.ts index 3017ace41..5c24a2c08 100644 --- a/packages/kernel/source/utils/index.ts +++ b/packages/kernel/source/utils/index.ts @@ -1,5 +1,5 @@ import { calculateApproval } from "./calculate-forging-info.js"; -import { calculateRound, isNewRound } from "./round-calculator.js"; +import { calculateRound, calculateRoundInfoByRound, isNewRound } from "./round-calculator.js"; import { calculateSupply } from "./supply-calculator.js"; import { calculateMinimalTimestamp } from "./timestamp-calculator.js"; export * from "./assert.js"; @@ -7,7 +7,7 @@ export * as IpAddress from "./ip-address.js"; export * from "./lock.js"; export * from "@mainsail/utils"; -export const roundCalculator = { calculateRound, isNewRound }; +export const roundCalculator = { calculateRound, calculateRoundInfoByRound, isNewRound }; export const supplyCalculator = { calculateSupply }; export const validatorCalculator = { calculateApproval }; export const timestampCalculator = { calculateMinimalTimestamp }; diff --git a/packages/kernel/source/utils/round-calculator.test.ts b/packages/kernel/source/utils/round-calculator.test.ts index c64e0a13a..c0703319f 100644 --- a/packages/kernel/source/utils/round-calculator.test.ts +++ b/packages/kernel/source/utils/round-calculator.test.ts @@ -3,7 +3,7 @@ import { Exceptions, Identifiers } from "@mainsail/contracts"; import crypto from "../../../core/bin/config/testnet/core/crypto.json"; import { Configuration } from "../../../crypto-config/distribution/index"; import { describe, Sandbox } from "../../../test-framework/source"; -import { calculateRound, isNewRound } from "./round-calculator"; +import { calculateRound, calculateRoundInfoByRound, isNewRound } from "./round-calculator"; type Context = { configuration: Configuration; @@ -19,6 +19,41 @@ const setup = (context: Context) => { context.configuration.setConfig(crypto); }; +describe("Round Calculator - calculateRoundInfoByRound", ({ assert, beforeEach, it, stub }) => { + beforeEach(setup); + + it("dynamic delegate count - should calculate the correct with dynamic delegate count", ({ configuration }) => { + const milestones = [ + { activeValidators: 0, height: 0 }, + { activeValidators: 53, height: 1 }, + { activeValidators: 53, height: 54 }, + ]; + + const config = { ...crypto, milestones }; + configuration.setConfig(config); + + const testVector = [ + // Round 0 + { activeValidators: 0, nextRound: 1, round: 0, roundHeight: 0 }, + // Round 1 + { activeValidators: 53, nextRound: 1, round: 1, roundHeight: 1 }, + // Round 2 + { activeValidators: 53, nextRound: 2, round: 2, roundHeight: 54 }, + // Round 3 + { activeValidators: 53, nextRound: 3, round: 3, roundHeight: 107 }, + ]; + + for (const { round, roundHeight, nextRound, activeValidators } of testVector) { + const result = calculateRoundInfoByRound(round, configuration); + assert.is(result.round, round); + assert.is(result.roundHeight, roundHeight); + assert.true(isNewRound(result.roundHeight, configuration)); + assert.is(result.nextRound, nextRound); + assert.is(result.maxValidators, activeValidators); + } + }); +}); + describe("Round Calculator - calculateRound", ({ assert, beforeEach, it, stub }) => { beforeEach(setup); diff --git a/packages/kernel/source/utils/round-calculator.ts b/packages/kernel/source/utils/round-calculator.ts index c398db4c6..dbe673a6d 100644 --- a/packages/kernel/source/utils/round-calculator.ts +++ b/packages/kernel/source/utils/round-calculator.ts @@ -81,3 +81,30 @@ export const calculateRound = ( return result; }; + +export const calculateRoundInfoByRound = ( + round: number, + configuration: Contracts.Crypto.Configuration, +): Contracts.Shared.RoundInfo => { + // Genesis round requires special treatment + if (round === 0) { + return { maxValidators: 0, nextRound: 1, round: 0, roundHeight: 0 }; + } + + const milestones = configuration.getMilestones(); + + let roundHeight = 1; + let maxValidators = 0; + for (let index = 1; index < milestones.length - 1; index++) { + const milestone = milestones[index]; + maxValidators = milestone.activeValidators; + roundHeight += (round - 1) * milestone.activeValidators; + } + + return { + maxValidators, + nextRound: round, + round, + roundHeight, + }; +};