Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- ForkRegistry
- Optimization enabled
- false
- Compiler version
- v0.8.28+commit.7893614a
- EVM Version
- Verified at
- 2026-11-19T13:51:08.691884Z
Constructor Arguments
000000000000000000000000759b764d7fe6e0adc97cfd00eca886ff53f6a329000000000000000000000000b01856abef5b971019f1d25630450cc6bcbafb2100cc01bed0a69f5f40b56834cb19c6507238301ebb816806c90fd038ba42edf0
Arg [0] (address) : 0x759b764d7fe6e0adc97cfd00eca886ff53f6a329
Arg [1] (address) : 0xb01856abef5b971019f1d25630450cc6bcbafb21
Arg [2] (bytes32) : 00cc01bed0a69f5f40b56834cb19c6507238301ebb816806c90fd038ba42edf0
src/hardened/ForkRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.28;
import {ISP1Verifier} from "./ISP1Verifier.sol";
import {IForkRegistry} from "./IForkRegistry.sol";
/// @notice The part of the light client of the observed chain that the registry reads.
interface IObservedLightClient {
function head() external view returns (uint64);
function headers(uint64 slot) external view returns (bytes32);
function syncCommittees(uint64 period) external view returns (bytes32);
function slotsPerPeriod() external view returns (uint64);
function genesisValidatorsRoot() external view returns (bytes32);
function programVKey() external view returns (bytes32);
}
/// @title ForkRegistry
/// @notice Records the fork versions that a sync committee of the observed chain signed under (hole HB-02 on
/// PulseChain). A sync committee signs under the real current fork version of its chain, so a proof that two thirds of
/// a bound committee signed under version V shows that the chain runs V at that slot. The observation program also
/// proves the shape of the attested state (a plain depth 5, 6 or 7, the progressive form, or a plain depth from 8 to 31 that
/// the light client refuses), and the registry stores
/// that shape next to the version. The deposit gate applies the rule of `ForkShape` to it: the same rule that it applies
/// to EIP-4788 evidence on Ethereum. The registry judges nothing itself. It has no owner and no way to remove an entry.
/// @dev The observation program has its own verification key, different from the light client program. A proof of one
/// program therefore never passes the other contract. The start fields are checked against the light client exactly as
/// the light client checks its own updates (rule 1). The observation never moves the head of the light client.
contract ForkRegistry is IForkRegistry {
/// @notice The public values of the observation program, in `abi.encode` order.
struct ForkObservation {
bytes32 genesisValidatorsRoot;
bytes32 previousHeaderRoot;
uint64 previousHeadSlot;
bytes32 previousSyncCommitteeHash;
bytes32 startNextSyncCommitteeHash;
bytes4 observedVersion;
uint64 observedAttestedSlot;
uint8 shape;
}
/// @dev One storage slot.
struct Latest {
bytes4 version;
uint8 shape;
uint64 slot;
}
/// @notice The size of the encoded observation: eight static words.
uint256 public constant PUBLIC_VALUES_LENGTH = 256;
/// @notice A constructor argument is zero.
error ZeroValue(string name);
/// @notice The observation key equals the light client key, so the two kinds of proof could be swapped.
error ObservationKeyEqualsLightClientKey(bytes32 key);
/// @notice The public values do not have the length of an encoded `ForkObservation`.
error InvalidPublicValuesLength(uint256 actual);
/// @notice The observation belongs to another chain.
error GenesisValidatorsRootMismatch(bytes32 expected, bytes32 actual);
/// @notice The observation starts from another head slot than the stored head.
error PreviousHeadSlotMismatch(uint64 expected, uint64 actual);
/// @notice The observation starts from another header root than the stored one.
error PreviousHeaderRootMismatch(bytes32 expected, bytes32 actual);
/// @notice The observation starts from another committee than the stored one.
error PreviousSyncCommitteeMismatch(bytes32 expected, bytes32 actual);
/// @notice The observation starts from another next committee than the stored one (zero equals zero).
error StartNextSyncCommitteeMismatch(bytes32 expected, bytes32 actual);
/// @notice The attested slot is not past the head of the light client (replay of an old observation).
error ObservationNotFresh(uint64 head, uint64 observedAttestedSlot);
/// @notice Emitted for every accepted observation.
event ForkObserved(bytes4 indexed version, uint8 shape, uint64 slot);
/// @notice The light client of the observed chain, deployed on this chain.
IObservedLightClient public immutable lightClient;
/// @notice The proof system that checks observation proofs.
ISP1Verifier public immutable verifier;
/// @notice The verification key of the observation program.
bytes32 public immutable observationProgramVKey;
/// @notice The lowest attested slot seen for a version, or zero when never seen.
mapping(bytes4 version => uint64 slot) public firstSeenSlot;
/// @notice The shape proven in the newest observation (highest attested slot) of a version, or zero when never seen.
mapping(bytes4 version => uint8 shape) public shapeOf;
mapping(bytes4 version => uint64 slot) private _shapeSlot;
Latest private _latest;
/// @param lightClient_ The light client of the observed chain on this chain.
/// @param verifier_ A specific SP1 verifier contract, not the ownable gateway.
/// @param observationProgramVKey_ The key of the observation program. It must differ from the light client key.
constructor(address lightClient_, address verifier_, bytes32 observationProgramVKey_) {
if (lightClient_ == address(0)) revert ZeroValue("lightClient");
if (verifier_ == address(0)) revert ZeroValue("verifier");
if (observationProgramVKey_ == bytes32(0)) revert ZeroValue("observationProgramVKey");
bytes32 lightClientKey = IObservedLightClient(lightClient_).programVKey();
if (lightClientKey == observationProgramVKey_) revert ObservationKeyEqualsLightClientKey(lightClientKey);
lightClient = IObservedLightClient(lightClient_);
verifier = ISP1Verifier(verifier_);
observationProgramVKey = observationProgramVKey_;
}
/// @notice Records a proven observation. Anyone may call it.
/// @dev Checks run in a fixed order and the proof check comes last, like `BeaconLightClient.update`.
/// @param proof The proof of the observation program.
/// @param publicValues The `abi.encode` of a `ForkObservation`.
function observe(bytes calldata proof, bytes calldata publicValues) external {
if (publicValues.length != PUBLIC_VALUES_LENGTH) revert InvalidPublicValuesLength(publicValues.length);
ForkObservation memory observation = abi.decode(publicValues, (ForkObservation));
_requireStoredStart(observation);
verifier.verifyProof(observationProgramVKey, publicValues, proof);
bytes4 version = observation.observedVersion;
uint64 slot = observation.observedAttestedSlot;
uint64 first = firstSeenSlot[version];
if (first == 0 || slot < first) firstSeenSlot[version] = slot;
uint8 shape = observation.shape;
if (slot > _shapeSlot[version]) {
_shapeSlot[version] = slot;
shapeOf[version] = shape;
}
if (slot > _latest.slot) _latest = Latest({version: version, shape: shape, slot: slot});
emit ForkObserved(version, shape, slot);
}
/// @notice The version seen under the highest attested slot, or zero when nothing was observed.
function latestObservedVersion() external view returns (bytes4) {
return _latest.version;
}
/// @inheritdoc IForkRegistry
function latestObserved() external view override returns (bytes4 version, uint8 shape, uint64 slot) {
Latest memory latest = _latest;
return (latest.version, latest.shape, latest.slot);
}
/// @dev Freshness (the attested slot is strictly past the head), then light-client rule 1 for the five start fields.
function _requireStoredStart(ForkObservation memory observation) private view {
IObservedLightClient client = lightClient;
uint64 head = client.head();
// Freshness first: an observation at or before the head is a replay, whatever its start fields say.
if (observation.observedAttestedSlot <= head) {
revert ObservationNotFresh(head, observation.observedAttestedSlot);
}
bytes32 genesisRoot = client.genesisValidatorsRoot();
if (observation.genesisValidatorsRoot != genesisRoot) {
revert GenesisValidatorsRootMismatch(genesisRoot, observation.genesisValidatorsRoot);
}
if (observation.previousHeadSlot != head) revert PreviousHeadSlotMismatch(head, observation.previousHeadSlot);
bytes32 headerRoot = client.headers(head);
if (observation.previousHeaderRoot != headerRoot) {
revert PreviousHeaderRootMismatch(headerRoot, observation.previousHeaderRoot);
}
uint64 period = head / client.slotsPerPeriod();
bytes32 committee = client.syncCommittees(period);
if (observation.previousSyncCommitteeHash != committee) {
revert PreviousSyncCommitteeMismatch(committee, observation.previousSyncCommitteeHash);
}
bytes32 nextCommittee = client.syncCommittees(period + 1);
if (observation.startNextSyncCommitteeHash != nextCommittee) {
revert StartNextSyncCommitteeMismatch(nextCommittee, observation.startNextSyncCommitteeHash);
}
}
}
src/hardened/ISP1Verifier.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
/// @title ISP1Verifier
/// @notice The shape of the Succinct SP1 verifier gateway.
/// @dev The call reverts when the proof is invalid and returns nothing when it is valid.
interface ISP1Verifier {
/// @notice Verifies an SP1 proof.
/// @param programVKey The verification key of the program that produced the proof.
/// @param publicValues The public values that the program committed.
/// @param proofBytes The encoded proof.
function verifyProof(bytes32 programVKey, bytes calldata publicValues, bytes calldata proofBytes) external view;
}
src/hardened/IForkRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
/// @title IForkRegistry
/// @notice The part of the fork observation registry that the deposit gate reads. The gate judges the shape with `ForkShape`.
interface IForkRegistry {
/// @notice The fork version seen under the highest attested slot, the shape of the attested state that carried it,
/// and that slot.
/// @return version The version. It is meaningful only when `slot` is not zero.
/// @return shape The proven shape of the state: a plain depth (5, 6 or 7 allowed, 8 to 31 disallowed), or 255 for
/// the progressive form. A disallowed depth is what lets the gate refuse deposits and seal.
/// Meaningful only when `slot` is not zero.
/// @return slot The highest observed attested slot, or zero when nothing was observed.
function latestObserved() external view returns (bytes4 version, uint8 shape, uint64 slot);
}
Compiler Settings
{"viaIR":false,"remappings":["@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","forge-std/=lib/forge-std/src/","erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/","halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/","openzeppelin-contracts/=lib/openzeppelin-contracts/"],"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}},"optimizer":{"runs":200,"enabled":true},"metadata":{"useLiteralContent":false,"bytecodeHash":"none","appendCBOR":false},"libraries":{},"evmVersion":"shanghai"}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"lightClient_","internalType":"address"},{"type":"address","name":"verifier_","internalType":"address"},{"type":"bytes32","name":"observationProgramVKey_","internalType":"bytes32"}]},{"type":"error","name":"GenesisValidatorsRootMismatch","inputs":[{"type":"bytes32","name":"expected","internalType":"bytes32"},{"type":"bytes32","name":"actual","internalType":"bytes32"}]},{"type":"error","name":"InvalidPublicValuesLength","inputs":[{"type":"uint256","name":"actual","internalType":"uint256"}]},{"type":"error","name":"ObservationKeyEqualsLightClientKey","inputs":[{"type":"bytes32","name":"key","internalType":"bytes32"}]},{"type":"error","name":"ObservationNotFresh","inputs":[{"type":"uint64","name":"head","internalType":"uint64"},{"type":"uint64","name":"observedAttestedSlot","internalType":"uint64"}]},{"type":"error","name":"PreviousHeadSlotMismatch","inputs":[{"type":"uint64","name":"expected","internalType":"uint64"},{"type":"uint64","name":"actual","internalType":"uint64"}]},{"type":"error","name":"PreviousHeaderRootMismatch","inputs":[{"type":"bytes32","name":"expected","internalType":"bytes32"},{"type":"bytes32","name":"actual","internalType":"bytes32"}]},{"type":"error","name":"PreviousSyncCommitteeMismatch","inputs":[{"type":"bytes32","name":"expected","internalType":"bytes32"},{"type":"bytes32","name":"actual","internalType":"bytes32"}]},{"type":"error","name":"StartNextSyncCommitteeMismatch","inputs":[{"type":"bytes32","name":"expected","internalType":"bytes32"},{"type":"bytes32","name":"actual","internalType":"bytes32"}]},{"type":"error","name":"ZeroValue","inputs":[{"type":"string","name":"name","internalType":"string"}]},{"type":"event","name":"ForkObserved","inputs":[{"type":"bytes4","name":"version","internalType":"bytes4","indexed":true},{"type":"uint8","name":"shape","internalType":"uint8","indexed":false},{"type":"uint64","name":"slot","internalType":"uint64","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"PUBLIC_VALUES_LENGTH","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint64","name":"slot","internalType":"uint64"}],"name":"firstSeenSlot","inputs":[{"type":"bytes4","name":"version","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes4","name":"version","internalType":"bytes4"},{"type":"uint8","name":"shape","internalType":"uint8"},{"type":"uint64","name":"slot","internalType":"uint64"}],"name":"latestObserved","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes4","name":"","internalType":"bytes4"}],"name":"latestObservedVersion","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IObservedLightClient"}],"name":"lightClient","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"observationProgramVKey","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"observe","inputs":[{"type":"bytes","name":"proof","internalType":"bytes"},{"type":"bytes","name":"publicValues","internalType":"bytes"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"shape","internalType":"uint8"}],"name":"shapeOf","inputs":[{"type":"bytes4","name":"version","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract ISP1Verifier"}],"name":"verifier","inputs":[]}]
Contract Creation Code
0x60e060405234801561000f575f5ffd5b50604051610e6a380380610e6a83398101604081905261002e916101c4565b6001600160a01b0383166100785760405163046c82ad60e41b815260206004820152600b60248201526a1b1a59da1d10db1a595b9d60aa1b60448201526064015b60405180910390fd5b6001600160a01b0382166100ba5760405163046c82ad60e41b81526020600482015260086024820152673b32b934b334b2b960c11b604482015260640161006f565b806101085760405163046c82ad60e41b815260206004820152601660248201527f6f62736572766174696f6e50726f6772616d564b657900000000000000000000604482015260640161006f565b5f836001600160a01b0316631ddb5d296040518163ffffffff1660e01b8152600401602060405180830381865afa158015610145573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101699190610200565b905081810361018d5760405162062fb960e11b81526004810182905260240161006f565b506001600160a01b03928316608052911660a05260c052610217565b80516001600160a01b03811681146101bf575f5ffd5b919050565b5f5f5f606084860312156101d6575f5ffd5b6101df846101a9565b92506101ed602085016101a9565b6040949094015192959394509192915050565b5f60208284031215610210575f5ffd5b5051919050565b60805160a05160c051610c166102545f395f8181609901526102d001525f818160d301526102a301525f8181610195015261051a0152610c165ff3fe608060405234801561000f575f5ffd5b5060043610610090575f3560e01c8063a908d06a11610063578063a908d06a1461017b578063b5700e6814610190578063c8e608d5146101b7578063cc7a65f8146101f7578063fd03f9cd1461022b575f5ffd5b8063242a0329146100945780632b7ac3f3146100ce5780632fec65ed1461010d5780633ead5e0414610172575b5f5ffd5b6100bb7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b6100f57f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c5565b604080516060808201835260035460e081901b6001600160e01b031916808452640100000000820460ff166020808601829052650100000000009093046001600160401b031694860185905285519182529181019190915292830191909152016100c5565b6100bb61010081565b61018e61018936600461098f565b61024a565b005b6100f57f000000000000000000000000000000000000000000000000000000000000000081565b6101df6101c5366004610a15565b5f602081905290815260409020546001600160401b031681565b6040516001600160401b0390911681526020016100c5565b610219610205366004610a15565b60016020525f908152604090205460ff1681565b60405160ff90911681526020016100c5565b60035460e01b6040516001600160e01b031990911681526020016100c5565b6101008114610274576040516320dc3fa760e21b8152600481018290526024015b60405180910390fd5b5f61028182840184610a67565b905061028c81610517565b60405163020a49e360e51b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906341493c6090610300907f000000000000000000000000000000000000000000000000000000000000000090879087908b908b90600401610b42565b5f6040518083038186803b158015610316575f5ffd5b505afa158015610328573d5f5f3e3d5ffd5b5050505060a081015160c08201516001600160e01b031982165f908152602081905260409020546001600160401b03168015806103765750806001600160401b0316826001600160401b0316105b156103ae576001600160e01b031983165f908152602081905260409020805467ffffffffffffffff19166001600160401b0384161790555b60e08401516001600160e01b031984165f908152600260205260409020546001600160401b03908116908416111561042a576001600160e01b031984165f908152600260209081526040808320805467ffffffffffffffff19166001600160401b03881617905560019091529020805460ff191660ff83161790555b6003546001600160401b0365010000000000909104811690841611156104bc57604080516060810182526001600160e01b03198616815260ff8316602082018190526001600160401b038616919092018190526003805460e088901c64ffffffffff1990911617640100000000909302929092176cffffffffffffffff00000000001916650100000000009091021790555b6040805160ff831681526001600160401b03851660208201526001600160e01b03198616917fc863a1b1ce648bef8eeaab429fed1eaaaabee0b6f2efb590ece7c5d1abe5886d910160405180910390a2505050505050505050565b5f7f000000000000000000000000000000000000000000000000000000000000000090505f816001600160a01b0316638f7dcfa36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610578573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061059c9190610b7a565b9050806001600160401b03168360c001516001600160401b0316116105ed5760c08301516040516359fe924760e11b81526001600160401b038084166004830152909116602482015260440161026b565b5f826001600160a01b03166378e1ead06040518163ffffffff1660e01b8152600401602060405180830381865afa15801561062a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061064e9190610b95565b8451909150811461067f5783516040516312cec74560e11b815261026b918391600401918252602082015260400190565b816001600160401b031684604001516001600160401b0316146106ce57604080850151905163342699d160e11b81526001600160401b038085166004830152909116602482015260440161026b565b604051631a2c521f60e21b81526001600160401b03831660048201525f906001600160a01b038516906368b1487c90602401602060405180830381865afa15801561071b573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061073f9190610b95565b905080856020015114610775576020850151604051630edb5cbf60e21b815261026b918391600401918252602082015260400190565b5f846001600160a01b0316633df3ebc76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107b2573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d69190610b7a565b6107e09085610bac565b60405163206a172b60e01b81526001600160401b03821660048201529091505f906001600160a01b0387169063206a172b90602401602060405180830381865afa158015610830573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108549190610b95565b90508087606001511461088a5760608701516040516303c7897d60e01b815261026b918391600401918252602082015260400190565b5f6001600160a01b03871663206a172b6108a5856001610be5565b6040516001600160e01b031960e084901b1681526001600160401b039091166004820152602401602060405180830381865afa1580156108e7573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061090b9190610b95565b9050808860800151146109415760808801516040516309ceefc960e21b815261026b918391600401918252602082015260400190565b5050505050505050565b5f5f83601f84011261095b575f5ffd5b5081356001600160401b03811115610971575f5ffd5b602083019150836020828501011115610988575f5ffd5b9250929050565b5f5f5f5f604085870312156109a2575f5ffd5b84356001600160401b038111156109b7575f5ffd5b6109c38782880161094b565b90955093505060208501356001600160401b038111156109e1575f5ffd5b6109ed8782880161094b565b95989497509550505050565b80356001600160e01b031981168114610a10575f5ffd5b919050565b5f60208284031215610a25575f5ffd5b610a2e826109f9565b9392505050565b6001600160401b0381168114610a49575f5ffd5b50565b8035610a1081610a35565b803560ff81168114610a10575f5ffd5b5f610100828403128015610a79575f5ffd5b5060405161010081016001600160401b0381118282101715610aa957634e487b7160e01b5f52604160045260245ffd5b60409081528335825260208085013590830152610ac7908401610a4c565b60408201526060838101359082015260808084013590820152610aec60a084016109f9565b60a0820152610afd60c08401610a4c565b60c0820152610b0e60e08401610a57565b60e08201529392505050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b858152606060208201525f610b5b606083018688610b1a565b8281036040840152610b6e818587610b1a565b98975050505050505050565b5f60208284031215610b8a575f5ffd5b8151610a2e81610a35565b5f60208284031215610ba5575f5ffd5b5051919050565b5f6001600160401b03831680610bd057634e487b7160e01b5f52601260045260245ffd5b806001600160401b0384160491505092915050565b6001600160401b038181168382160190811115610c1057634e487b7160e01b5f52601160045260245ffd5b9291505056000000000000000000000000759b764d7fe6e0adc97cfd00eca886ff53f6a329000000000000000000000000b01856abef5b971019f1d25630450cc6bcbafb2100cc01bed0a69f5f40b56834cb19c6507238301ebb816806c90fd038ba42edf0
Deployed ByteCode
0x608060405234801561000f575f5ffd5b5060043610610090575f3560e01c8063a908d06a11610063578063a908d06a1461017b578063b5700e6814610190578063c8e608d5146101b7578063cc7a65f8146101f7578063fd03f9cd1461022b575f5ffd5b8063242a0329146100945780632b7ac3f3146100ce5780632fec65ed1461010d5780633ead5e0414610172575b5f5ffd5b6100bb7f00cc01bed0a69f5f40b56834cb19c6507238301ebb816806c90fd038ba42edf081565b6040519081526020015b60405180910390f35b6100f57f000000000000000000000000b01856abef5b971019f1d25630450cc6bcbafb2181565b6040516001600160a01b0390911681526020016100c5565b604080516060808201835260035460e081901b6001600160e01b031916808452640100000000820460ff166020808601829052650100000000009093046001600160401b031694860185905285519182529181019190915292830191909152016100c5565b6100bb61010081565b61018e61018936600461098f565b61024a565b005b6100f57f000000000000000000000000759b764d7fe6e0adc97cfd00eca886ff53f6a32981565b6101df6101c5366004610a15565b5f602081905290815260409020546001600160401b031681565b6040516001600160401b0390911681526020016100c5565b610219610205366004610a15565b60016020525f908152604090205460ff1681565b60405160ff90911681526020016100c5565b60035460e01b6040516001600160e01b031990911681526020016100c5565b6101008114610274576040516320dc3fa760e21b8152600481018290526024015b60405180910390fd5b5f61028182840184610a67565b905061028c81610517565b60405163020a49e360e51b81526001600160a01b037f000000000000000000000000b01856abef5b971019f1d25630450cc6bcbafb2116906341493c6090610300907f00cc01bed0a69f5f40b56834cb19c6507238301ebb816806c90fd038ba42edf090879087908b908b90600401610b42565b5f6040518083038186803b158015610316575f5ffd5b505afa158015610328573d5f5f3e3d5ffd5b5050505060a081015160c08201516001600160e01b031982165f908152602081905260409020546001600160401b03168015806103765750806001600160401b0316826001600160401b0316105b156103ae576001600160e01b031983165f908152602081905260409020805467ffffffffffffffff19166001600160401b0384161790555b60e08401516001600160e01b031984165f908152600260205260409020546001600160401b03908116908416111561042a576001600160e01b031984165f908152600260209081526040808320805467ffffffffffffffff19166001600160401b03881617905560019091529020805460ff191660ff83161790555b6003546001600160401b0365010000000000909104811690841611156104bc57604080516060810182526001600160e01b03198616815260ff8316602082018190526001600160401b038616919092018190526003805460e088901c64ffffffffff1990911617640100000000909302929092176cffffffffffffffff00000000001916650100000000009091021790555b6040805160ff831681526001600160401b03851660208201526001600160e01b03198616917fc863a1b1ce648bef8eeaab429fed1eaaaabee0b6f2efb590ece7c5d1abe5886d910160405180910390a2505050505050505050565b5f7f000000000000000000000000759b764d7fe6e0adc97cfd00eca886ff53f6a32990505f816001600160a01b0316638f7dcfa36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610578573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061059c9190610b7a565b9050806001600160401b03168360c001516001600160401b0316116105ed5760c08301516040516359fe924760e11b81526001600160401b038084166004830152909116602482015260440161026b565b5f826001600160a01b03166378e1ead06040518163ffffffff1660e01b8152600401602060405180830381865afa15801561062a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061064e9190610b95565b8451909150811461067f5783516040516312cec74560e11b815261026b918391600401918252602082015260400190565b816001600160401b031684604001516001600160401b0316146106ce57604080850151905163342699d160e11b81526001600160401b038085166004830152909116602482015260440161026b565b604051631a2c521f60e21b81526001600160401b03831660048201525f906001600160a01b038516906368b1487c90602401602060405180830381865afa15801561071b573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061073f9190610b95565b905080856020015114610775576020850151604051630edb5cbf60e21b815261026b918391600401918252602082015260400190565b5f846001600160a01b0316633df3ebc76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107b2573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d69190610b7a565b6107e09085610bac565b60405163206a172b60e01b81526001600160401b03821660048201529091505f906001600160a01b0387169063206a172b90602401602060405180830381865afa158015610830573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108549190610b95565b90508087606001511461088a5760608701516040516303c7897d60e01b815261026b918391600401918252602082015260400190565b5f6001600160a01b03871663206a172b6108a5856001610be5565b6040516001600160e01b031960e084901b1681526001600160401b039091166004820152602401602060405180830381865afa1580156108e7573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061090b9190610b95565b9050808860800151146109415760808801516040516309ceefc960e21b815261026b918391600401918252602082015260400190565b5050505050505050565b5f5f83601f84011261095b575f5ffd5b5081356001600160401b03811115610971575f5ffd5b602083019150836020828501011115610988575f5ffd5b9250929050565b5f5f5f5f604085870312156109a2575f5ffd5b84356001600160401b038111156109b7575f5ffd5b6109c38782880161094b565b90955093505060208501356001600160401b038111156109e1575f5ffd5b6109ed8782880161094b565b95989497509550505050565b80356001600160e01b031981168114610a10575f5ffd5b919050565b5f60208284031215610a25575f5ffd5b610a2e826109f9565b9392505050565b6001600160401b0381168114610a49575f5ffd5b50565b8035610a1081610a35565b803560ff81168114610a10575f5ffd5b5f610100828403128015610a79575f5ffd5b5060405161010081016001600160401b0381118282101715610aa957634e487b7160e01b5f52604160045260245ffd5b60409081528335825260208085013590830152610ac7908401610a4c565b60408201526060838101359082015260808084013590820152610aec60a084016109f9565b60a0820152610afd60c08401610a4c565b60c0820152610b0e60e08401610a57565b60e08201529392505050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b858152606060208201525f610b5b606083018688610b1a565b8281036040840152610b6e818587610b1a565b98975050505050505050565b5f60208284031215610b8a575f5ffd5b8151610a2e81610a35565b5f60208284031215610ba5575f5ffd5b5051919050565b5f6001600160401b03831680610bd057634e487b7160e01b5f52601260045260245ffd5b806001600160401b0384160491505092915050565b6001600160401b038181168382160190811115610c1057634e487b7160e01b5f52601160045260245ffd5b9291505056