Contract
0xb456559b6870a4212cab022b8a106d0879c08fc2
- Address
- 0xb456559b6870a4212cab022b8a106d0879c08fc2
- Kind
- verified contract FinalPhiSupply
- Balance
- 0 vETH
- Nonce
- 1
- Code
- 9,831 bytes codehash 0x8048e44c03d2f7f4b5f7c4ee98abf4fe789a4451d33658f488158d96dddc6671
account tree
- Tree
- 1 · accounts
- Present
- no leaf
- Key
- 0x819211171938878c16497a5da7df7ba334b114e0b1476c5c4f177309c9965185
- Live root
- 0xeae723253d5f6a608807aa960f2b55066f9694cd06953d238148b49b400dce61
This address holds no leaf in the account tree. Every Final Wallet — service identities included — has one, so an absent leaf means an ordinary account rather than a wallet.
source verified
- Contract
- FinalPhiSupply exact match · immutables masked
- Compiler
- v0.8.33+commit.64118f21
- Optimizer
- enabled · 200 runs
- EVM version
- prague
- Verified
- 2026-09-10T07:10:08.429Z
- Provenance
- preverify-final-chain (forge artifact, bytecode compared against live code)
contracts/finalchain/FinalCertificate.sol
// SPDX-License-Identifier: BUSL-1.1
// Copyright (c) 2024-2026 Final DeFi
// Licensed under the Business Source License 1.1 (the "License")
//
// Change Date: 2029-01-01
// Change License: GPL-2.0-or-later
//
// Additional Use Grant:
// 1. Any person or entity may link against and call this certificate reader,
// and may encode certificates that it accepts, as part of the Final DeFi
// Protocol.
// 2. Operators, integrators, and end users may have their certificates parsed,
// self-checked, and verified through any Final DeFi surface that links it.
// 3. For the avoidance of doubt, this Grant does NOT permit the commercial
// deployment of a Fork of this certificate reader or a competing identity
// certificate format derived from it without permission prior to the
// Change Date.
//
// @author Final DeFi
// @version 1.0.0
pragma solidity ^0.8.20;
import {FinalChainPrecompiles} from "./FinalChainPrecompiles.sol";
import {FinalChainTime} from "./FinalChainTime.sol";
/**
* @title Final Certificate
* @notice Reads a Final Certificate on chain and self-checks it, so a certificate's keys can never be
* anything other than the keys it declares.
* @dev Deployed only as part of this project's own reth-based state plane, and only on the reth-based chains
* that carry the precompiles it calls: SHA3-256 at `0x0202`, ML-DSA-87 at `0x0204` and
* SLH-DSA-SHAKE-256s at `0x0205`, each address being that primitive's FIPS number. The contracts it is
* linked into probe those precompiles at construction and refuse to exist where they are absent, so
* this library never runs somewhere its verdicts would be meaningless. It takes part in no CREATE2
* derivation, and nothing outside this directory imports it.
*
* The SHA3 precompile is not a convenience: the certificate format hashes with FIPS-202 SHA3 and the
* EVM's `keccak256` is a DIFFERENT function, so a digest computed with the wrong one matches no
* certificate any issuer ever wrote.
*
* ## Why the chain parses this at all
*
* The alternative is taking the TBS bytes and the public keys as separate arguments and deriving
* `certHash` from the bytes. That looks like verification and is not: nothing compares the keys to the
* certificate, so a registrar could bind any certificate to any keypair, the registry would hold a key
* the certificate does not contain, and every signature that key produced would verify against a
* certificate that never authorised it.
*
* So the keys are read OUT of the certificate. There is one input, and no pair of arguments that can
* disagree.
*
* Gas is deliberately not a design constraint on the chain this runs on and must not be optimised for.
* Parsing and re-hashing on chain costs more than trusting a parse done elsewhere and buys a verdict
* that is re-derivable from public state, which is the trade this whole plane is built on.
*
* ## The key-identifier check
*
* A certificate declares `SubjectKeyId` as the SHA3-256 digest of its `PublicKeyBlock`. Having parsed
* that block, {parse} recomputes the digest and compares. The field sits inside the TBS, so it is
* covered by the issuer's signatures — which makes the check a statement about what the issuer
* attested, not merely about internal consistency of bytes the caller supplied.
*
* ## Deploy-linked, not inlined
*
* {parseLive}, {parseRecovery}, {parseCa} and {verifyIssuerSignatures} are `external`, so the identity
* registry calls them across a link boundary rather than carrying them in its own bytecode, which it
* has no room for. The link target is fixed at deployment: a linked library is code, not a pointer
* anyone can move afterwards.
*
* ## What this library deliberately does not do
*
* It does not verify an issuer's signatures over the TBS as part of parsing, and it does not walk a
* certificate chain to the root. On the registration path there is nothing to walk — a chain-attested
* certificate is admitted by this chain against pinned issuer constants and the holder's own proof of
* possession, so an issuer signature is not what makes it valid. {verifyIssuerSignatures} is here for
* callers verifying an off-chain issuance, and it verifies exactly what it is handed.
*
* It also does not check an encapsulation key's length or structure. Those are checked where they are
* REGISTERED, by the precompiles that own the answer, because two checks of one thing in two shapes is
* how one of them ends up weaker and nobody notices which.
*/
library FinalCertificate {
/// @notice The four magic bytes every certificate opens with, `"PQCF"`.
uint32 internal constant MAGIC = 0x50514346;
/// @notice The current wire generation, which encoders write.
/// @dev A generation this parser does not know fails to parse rather than being reinterpreted: the
/// folded key commitment, and therefore every wallet address, derives from this exact layout, so a
/// layout read under the wrong generation would produce a self-consistent digest that matches
/// nothing.
uint32 internal constant VERSION = 2;
/// @notice The previous wire generation, still accepted on parse.
/// @dev Reading an older artifact is not the same as admitting it. Whether such a certificate may be
/// REGISTERED is settled at admission, by the holder's proof of possession and the chain-issuer
/// pins, rather than by refusing to decode it.
uint32 internal constant VERSION_V4 = 1;
/// @notice The institution identity extension, which carries an issuer's legal name, registration
/// number and jurisdiction.
uint16 internal constant EXT_INSTITUTION = 0x0102;
/// @notice ML-KEM-1024 (FIPS 203), the lattice half of the encapsulation pair.
/// @dev Algorithm identifiers ARE the FIPS numbers, in one space shared by signatures and encapsulation
/// — the same identifiers the quorum wire format uses, and the numbers the precompile addresses end
/// in. One space rather than two means an identifier can never be read against the wrong table.
uint16 internal constant ALG_ML_KEM_1024 = 0x0003;
/// @notice ML-DSA-87 (FIPS 204). Transaction class.
uint16 internal constant ALG_ML_DSA_87 = 0x0004;
/// @notice SLH-DSA-SHAKE-256s (FIPS 205). Access class, and the seal.
uint16 internal constant ALG_SLH_DSA_SHAKE_256S = 0x0005;
/// @notice FN-DSA (FIPS 206). Reserved: there is no implementation behind it and it is never accepted in
/// a slot.
uint16 internal constant ALG_FN_DSA = 0x0006;
/// @notice HQC-5 (FIPS 207), the code-based half of the encapsulation pair.
uint16 internal constant ALG_HQC_5 = 0x0007;
/// @notice Certificate signing, for both of an issuer's keys.
/// @dev Says which key to verify WITH; it grants nothing on its own — capability to issue comes from the
/// depth pair.
uint16 internal constant PURPOSE_CERT_SIGNING = 0x0004;
/// @notice The live stage's transaction-class slot, ML-DSA-87.
/// @dev A wallet holds four slots in two stages of two, and a certificate carries ONE stage, never all
/// four. The stage is what is issued, rotated and revoked as a unit, and a holder presenting a live
/// certificate presents both of that stage's keys or neither — splitting them per slot would let
/// half a stage be presented as if it were whole.
/// @dev This applies to services exactly as it applies to a user's wallet. A co-signer is a Final
/// Wallet: same four slots, same split, same algorithms. There is no second kind of identity in
/// this system.
uint16 internal constant PURPOSE_ACTIVE_TX = 0x0010;
/// @notice The live stage's access-class slot, SLH-DSA-SHAKE-256s.
uint16 internal constant PURPOSE_ACTIVE_ACCESS = 0x0011;
/// @notice The recovery stage's transaction-class slot, ML-DSA-87.
uint16 internal constant PURPOSE_RECOVERY_TX = 0x0012;
/// @notice The recovery stage's access-class slot, SLH-DSA-SHAKE-256s.
uint16 internal constant PURPOSE_RECOVERY_ACCESS = 0x0013;
/// @notice The live stage's encapsulation slot.
/// @dev Each stage's encapsulation pair is resolved alongside its signing pair, and the identity
/// registry stores both halves, so a sender can encapsulate to a registered party without a second
/// lookup somewhere less authoritative. Both halves sit under ONE purpose and are told apart by
/// algorithm, which is why the key loop matches on the `(purpose, algorithm)` pair.
uint16 internal constant PURPOSE_ACTIVE_KEM = 0x0014;
/// @notice The recovery stage's encapsulation slot, carrying the same two algorithms.
uint16 internal constant PURPOSE_RECOVERY_KEM = 0x0015;
/// @notice The seal purpose: a second SLH-DSA-SHAKE-256s key that co-signs execution-class quorum
/// decisions.
/// @dev Distinct from the access key, and carried by SERVICE certificates only — a user's wallet never
/// seals. Optional in the format, so a certificate without it parses unchanged.
/// @dev Outside the folded key commitment: a seal is operational, rotated by issuing a new live
/// certificate, and it must not move a wallet address it plays no part in deriving.
uint16 internal constant PURPOSE_ACTIVE_SEAL = 0x0016;
/// @notice A sentinel purpose no certificate can carry.
/// @dev Lets {parse} be told "this stage has no encapsulation slot" without a second boolean argument.
/// `0xffff` is outside the purpose registry and is reserved by being used here.
uint16 internal constant NO_KEM_PURPOSE = 0xffff;
/// @notice Nanoseconds per millisecond, the conversion from a certificate's validity fields to this
/// chain's clock.
/// @dev A certificate stamps validity in NANOseconds and this chain's clock is MILLIseconds, so the
/// parser divides by 1e6 on the way in and nothing downstream ever compares across units. Getting
/// the divisor wrong does not fail loudly: it shifts every window by three orders of magnitude, so
/// every certificate reads as already valid, including one issued for the future.
uint64 internal constant NS_PER_MILLISECOND = FinalChainTime.NS_PER_MILLISECOND;
/**
* @title Parsed
* @notice What the chain keeps out of one certificate.
* @dev Every field is read OUT of the TBS. Nothing here can be supplied alongside the bytes, which is
* what makes it impossible for a caller to bind a certificate to material the certificate does not
* contain.
*/
struct Parsed {
/// `SHA3-256` of the TBS bytes: the certificate's own identity, and the handle revocation is keyed
/// on.
bytes32 certHash;
/// The certificate's 32-byte serial. A serial is per certificate SET, so the two stages of one
/// wallet share it and two stages that disagree are two different wallets.
bytes32 serial;
/// keccak256 of the issuer-name bytes, for the chain-issuer pin: a chain-attested certificate
/// carries the chain's own constant issuer name, and the registry compares one hash rather than two
/// strings.
bytes32 issuerDnHash;
/// The subject-name bytes verbatim. Kept whole rather than hashed because the jurisdiction rule
/// reads its country component at issuer registration.
bytes subjectDn;
/// The institution extension's VALUE, when present; empty otherwise. Issuer registration parses
/// the declared jurisdiction out of it and requires it to match the subject name's country.
bytes institutionExt;
/// SHA3-256 of the ISSUER's public key block. Zero-length — and so
/// `bytes32(0)` here — for exactly one certificate in the hierarchy,
/// which is what terminates chain validation.
bytes32 authorityKeyId;
/// SHA3-256 of this certificate's own public key block. The child's
/// `authorityKeyId` must equal it, which is what links the two.
bytes32 subjectKeyId;
/// Position on the delegation axis; 0 is the chain's own root.
uint8 depth;
/// Deepest level this key may issue to. `== depth` means it signs no certificates at all, which is
/// every end entity. The pair is immutable per certificate, which is why consumers discriminate
/// record kinds by it rather than by a role bit.
uint8 maxDelegationDepth;
/// MILLISECONDS, converted from the schema's nanoseconds — this chain's clock.
uint64 notBefore;
/// Milliseconds. Zero means never expires, which the schema allows.
uint64 notAfter;
/// The stage's transaction-class key. ML-DSA-87 — spending, and every
/// high-cadence protocol action.
bytes transactionKey;
/// The stage's access-class key. SLH-DSA-SHAKE-256s — identity,
/// rotation, recovery-pair promotion. A different hardness assumption,
/// so a lattice break leaves the key that governs identity standing.
bytes accessKey;
/// The stage's ML-KEM-1024 encapsulation key. Empty on a CA, which has
/// no encapsulation stage, and on any v4 certificate issued without
/// one — see `parse` for why that is tolerated rather than refused.
bytes kemMlKem;
/// The stage's HQC-5 encapsulation key. Carried under the SAME purpose
/// as the lattice half and distinguished only by algorithm, which is
/// why the parser matches on the `(purpose, algorithm)` pair.
bytes kemHqc;
/// The service's seal key (`PURPOSE_ACTIVE_SEAL`, SLH-DSA-SHAKE-256s).
/// Empty on every certificate that does not carry one — a user wallet,
/// a recovery stage, a CA.
bytes sealKey;
/// Where the TBS ends, so a caller holding the whole certificate can
/// find the `SignatureBlock` without parsing forward again.
uint256 tbsLength;
}
/// @notice The bytes do not open with the certificate magic, so they are not a certificate at all.
/// @param got The four bytes that were present.
error BadMagic(uint32 got);
/// @notice The wire generation is one this parser does not read.
/// @param got The generation the certificate declares.
error BadVersion(uint32 got);
/// @notice The TBS ends before a field the parser was about to read.
/// @param needed The offset the read required.
/// @param got The length actually supplied.
error Truncated(uint256 needed, uint256 got);
/// @notice The recomputed key-block digest does not equal the one the certificate declares, so the keys
/// present are not the keys the issuer attested.
/// @param derived The digest recomputed from the key block.
/// @param declared The digest the certificate carries.
error SubjectKeyIdMismatch(bytes32 derived, bytes32 declared);
/// @notice A stage is missing a key it must carry, or carries half of a pair that is issued whole.
/// @param purpose The purpose whose slot is unfilled.
error MissingSlot(uint16 purpose);
/// @notice A slot carries a key of the wrong scheme. It would verify cryptographically and mean
/// something else entirely, which is exactly what splitting the classes exists to prevent.
/// @param purpose The slot's purpose.
/// @param algorithm The algorithm identifier that was present.
error WrongAlgorithmForSlot(uint16 purpose, uint16 algorithm);
/// @notice Two key entries share one `(purpose, algorithm)` pair, so one would silently shadow the
/// other.
/// @param purpose The repeated purpose.
/// @param algorithm The repeated algorithm identifier.
error DuplicateKey(uint16 purpose, uint16 algorithm);
/// @notice The key entries are not in ascending `(purpose, algorithm)` order. The schema requires that
/// order so `certHash` is reproducible across implementations.
error KeysNotSorted();
/// @notice A signing key whose length is not the one its algorithm defines.
/// @param algorithm The algorithm identifier the entry declares.
/// @param length The key length that was present.
error BadKeyLength(uint16 algorithm, uint256 length);
/// @notice A delegation bound shallower than the certificate's own depth, which admits nothing.
/// @param depth The certificate's position on the delegation axis.
/// @param maxDelegationDepth The deepest level it claims to issue to.
error InvalidDepth(uint8 depth, uint8 maxDelegationDepth);
/// @notice A certificate that expires no later than it begins.
/// @param notBefore The declared start, in the schema's nanoseconds.
/// @param notAfter The declared end, in the schema's nanoseconds.
error ValidityInverted(uint64 notBefore, uint64 notAfter);
/**
* @notice Parse and self-check a `TBSCertificate`.
* @dev Checking for a CAPABILITY rather than a type is the certificate schema's own rule, and the reason
* there is no type field to check instead. Passing the LIVE purposes to a recovery certificate
* finds neither key and reverts — which is what stops a recovery certificate being registered as a
* live one and handing the recovery pair everyday authority.
*
* Self-check means the declared `SubjectKeyId` is recomputed from the key block that follows it and
* compared. That field is inside the TBS and therefore covered by the issuer's signatures, so the
* comparison turns "these bytes decode" into "the issuer attested these exact keys". Doing it on
* chain costs one precompile call and buys a verdict any reader can recompute; gas is not a design
* constraint on the chain this runs on, and must not be traded for a check that would then have to
* be taken on trust from whichever process ran it.
*
* A stage is issued as a unit, so both of a stage's signing keys must be present, and its
* encapsulation pair must be present in full or absent in full.
* @param tbs the TBS bytes, verbatim. Not the whole certificate.
* @param txPurpose the transaction-class purpose this stage should carry.
* @param accessPurpose the access-class purpose for the same stage.
* @param kemPurpose the encapsulation purpose for the same stage, or {NO_KEM_PURPOSE} for a stage that
* has none.
* @return out The parsed certificate: digest, serial, names, key identifiers, depth pair, validity
* window, and every key slot the stage carries.
*/
function parse(bytes calldata tbs, uint16 txPurpose, uint16 accessPurpose, uint16 kemPurpose)
internal
view
returns (Parsed memory out)
{
_need(tbs, 58);
if (uint32(bytes4(tbs[0:4])) != MAGIC) revert BadMagic(uint32(bytes4(tbs[0:4])));
// Both live wire generations parse. An artifact issued under the older one is read rather than
// refused; whether it may be ADMITTED is a separate question, settled at registration by the
// holder's proof of possession and the chain-issuer pins.
uint32 wireVersion = uint32(bytes4(tbs[4:8]));
if (wireVersion != VERSION && wireVersion != VERSION_V4) revert BadVersion(wireVersion);
out.certHash = FinalChainPrecompiles.sha3_256(tbs);
out.serial = bytes32(tbs[8:40]);
out.depth = uint8(tbs[40]);
out.maxDelegationDepth = uint8(tbs[41]);
uint64 notBeforeNs = uint64(bytes8(tbs[42:50]));
uint64 notAfterNs = uint64(bytes8(tbs[50:58]));
if (out.maxDelegationDepth < out.depth) {
revert InvalidDepth(out.depth, out.maxDelegationDepth);
}
if (notAfterNs != 0 && notAfterNs <= notBeforeNs) {
revert ValidityInverted(notBeforeNs, notAfterNs);
}
out.notBefore = notBeforeNs / NS_PER_MILLISECOND;
out.notAfter = notAfterNs == 0 ? 0 : notAfterNs / NS_PER_MILLISECOND;
// Four length-prefixed fields: IssuerDN, SubjectDN, AuthorityKeyId,
// SubjectKeyId. Every field before them is fixed width, which is the
// whole reason the schema orders them this way.
uint256 p = 58;
uint256 issuerDnLen;
(p, issuerDnLen) = _skipLengthPrefixed(tbs, p);
out.issuerDnHash = keccak256(tbs[p - issuerDnLen:p]);
uint256 subjectDnLen;
(p, subjectDnLen) = _skipLengthPrefixed(tbs, p);
out.subjectDn = tbs[p - subjectDnLen:p];
uint256 akidLen;
(p, akidLen) = _skipLengthPrefixed(tbs, p);
out.authorityKeyId = _bytes32At(tbs, p - akidLen, akidLen);
uint256 skidLen;
(p, skidLen) = _skipLengthPrefixed(tbs, p);
uint256 skidStart = p - skidLen;
_need(tbs, p + 2);
uint16 keyCount = uint16(bytes2(tbs[p:p + 2]));
p += 2;
// AFTER the count word. `SubjectKeyId` is SHA3-256 of the KeyEntry
// array alone — `encodeTbs` writes `PublicKeyCount` as its own field and
// `encodePublicKeyBlock` returns only the entries. Hashing the count in
// produces a digest that is self-consistent and matches no certificate
// any issuer ever wrote.
uint256 blockStart = p;
uint32 previousSort = 0;
for (uint256 i = 0; i < keyCount; i++) {
_need(tbs, p + 8);
uint16 alg = uint16(bytes2(tbs[p:p + 2]));
uint16 purpose = uint16(bytes2(tbs[p + 2:p + 4]));
uint32 keyLen = uint32(bytes4(tbs[p + 4:p + 8]));
p += 8;
_need(tbs, p + keyLen);
// Ascending by (purpose, algorithm), duplicates invalid. The schema
// requires the order so `certHash` is reproducible across
// implementations; enforcing it here also means a second entry for
// one slot cannot quietly shadow the first.
uint32 sortKey = (uint32(purpose) << 16) | uint32(alg);
if (i > 0) {
if (sortKey == previousSort) revert DuplicateKey(purpose, alg);
if (sortKey < previousSort) revert KeysNotSorted();
}
previousSort = sortKey;
// The algorithm is pinned per CLASS, not merely recorded. A
// transaction slot carrying an access-class key would verify
// cryptographically and mean something entirely different — an
// identity key must never authorize a transaction, or splitting the
// classes buys nothing.
// Matched on the PAIR, not on the purpose alone. A CA carries two
// keys under one purpose (`0x0004`) distinguished only by
// algorithm, so matching on purpose first would find the first of
// them twice and the second never.
if (purpose == txPurpose && alg == ALG_ML_DSA_87) {
if (keyLen != FinalChainPrecompiles.ML_DSA_87_PUBLIC_KEY_LEN) {
revert BadKeyLength(alg, keyLen);
}
out.transactionKey = tbs[p:p + keyLen];
} else if (purpose == accessPurpose && alg == ALG_SLH_DSA_SHAKE_256S) {
if (keyLen != FinalChainPrecompiles.SLH_DSA_SHAKE_256S_PUBLIC_KEY_LEN) {
revert BadKeyLength(alg, keyLen);
}
out.accessKey = tbs[p:p + keyLen];
} else if (purpose == kemPurpose && alg == ALG_ML_KEM_1024) {
out.kemMlKem = tbs[p:p + keyLen];
} else if (purpose == kemPurpose && alg == ALG_HQC_5) {
out.kemHqc = tbs[p:p + keyLen];
} else if (purpose == PURPOSE_ACTIVE_SEAL && alg == ALG_SLH_DSA_SHAKE_256S) {
if (keyLen != FinalChainPrecompiles.SLH_DSA_SHAKE_256S_PUBLIC_KEY_LEN) {
revert BadKeyLength(alg, keyLen);
}
out.sealKey = tbs[p:p + keyLen];
} else if (purpose == PURPOSE_ACTIVE_SEAL) {
// The seal is hash-based by definition — it exists to stand on
// the OTHER assumption from the transaction key it co-signs
// with. A lattice seal would be two signatures on one bet.
revert WrongAlgorithmForSlot(purpose, alg);
} else if (purpose == txPurpose || purpose == accessPurpose) {
// A slot the caller asked for, carrying the wrong scheme. It
// would verify cryptographically and mean something else
// entirely — an identity key must never authorize a
// transaction, or splitting the classes buys nothing.
revert WrongAlgorithmForSlot(purpose, alg);
} else if (purpose == kemPurpose) {
// Same rule for the encapsulation slot. A third KEM appearing
// under this purpose is a hybrid whose second family nobody
// agreed on, and admitting it silently is how a pair becomes a
// trio that one reader honours and another ignores.
revert WrongAlgorithmForSlot(purpose, alg);
}
// NO length check on the KEM keys here, and that is deliberate.
// The signing slots are checked against a constant because the
// parser's own callers depend on the length; an encapsulation key
// is checked by `0x0203` / `0x0207` at the moment it is REGISTERED,
// where the answer is a well-formedness verdict rather than a
// parse failure. Two checks of the same thing in two shapes is how
// one of them ends up weaker and nobody notices which.
p += keyLen;
}
// `SubjectKeyId` is SHA3-256 of the KeyEntry array, count word
// EXCLUDED — `blockStart` is taken after the count is consumed, for the
// reason given where it is set. Recomputing it is what turns "these
// bytes decode" into "the CA signed these exact keys"; the field is
// inside the TBS, so it is covered by the signatures.
out.subjectKeyId = FinalChainPrecompiles.sha3_256(tbs[blockStart:p]);
bytes32 declared = _bytes32At(tbs, skidStart, skidLen);
if (out.subjectKeyId != declared) revert SubjectKeyIdMismatch(out.subjectKeyId, declared);
// Both or neither. A stage is issued as a unit, so a certificate
// carrying one of its two keys is not a partial certificate — it is a
// certificate for a stage that does not exist.
if (out.transactionKey.length == 0) revert MissingSlot(txPurpose);
if (out.accessKey.length == 0) revert MissingSlot(accessPurpose);
// The encapsulation pair is both-or-neither for the same reason, and
// the reason is louder here: a hybrid quietly reduced to one family is
// identical on the wire, so a certificate carrying only the lattice
// half would seal successfully and silently drop the code-based hedge.
// Neither is the CA case and the pre-v4 case, both legitimate.
if ((out.kemMlKem.length == 0) != (out.kemHqc.length == 0)) {
revert MissingSlot(kemPurpose);
}
_need(tbs, p + 2);
uint16 extCount = uint16(bytes2(tbs[p:p + 2]));
p += 2;
for (uint256 i = 0; i < extCount; i++) {
_need(tbs, p + 7);
uint16 extType = uint16(bytes2(tbs[p:p + 2]));
uint32 valueLen = uint32(bytes4(tbs[p + 3:p + 7]));
p += 7;
_need(tbs, p + valueLen);
// The Institution extension's VALUE, kept for the issuer
// profile's jurisdiction rule. Everything else is skipped as
// before — extensions are structural to certHash, semantic to
// whichever consumer knows them.
if (extType == EXT_INSTITUTION) out.institutionExt = tbs[p:p + valueLen];
p += valueLen;
}
out.tbsLength = p;
}
/// @notice Parse a LIVE-stage certificate: the live transaction and access keys.
/// @dev `external`, like the other three entry points below. The identity registry sits against the
/// deployed-code ceiling and this parser is its single largest inlined dependency, so the four doors
/// it calls are DEPLOY-LINKED: the library is one more contract in the state plane's fixed deploy
/// order, and its address is baked immutably into the registry's bytecode. A linked library is code,
/// not a key — nothing can repoint it after deployment, so the split costs a call boundary and no
/// trust.
/// @param tbs The TBS bytes, verbatim.
/// @return The parsed and self-checked certificate.
function parseLive(bytes calldata tbs) external view returns (Parsed memory) {
return parse(tbs, PURPOSE_ACTIVE_TX, PURPOSE_ACTIVE_ACCESS, PURPOSE_ACTIVE_KEM);
}
/// @notice Parse a RECOVERY-stage certificate.
/// @dev The recovery pair authorizes rotating the wallet's own credentials and NOTHING else. Acting as a
/// guardian is an ordinary action for that account and uses the live access key, so keeping the two
/// stages in separate certificates is what makes that boundary something a verifier can see.
/// @param tbs The TBS bytes, verbatim.
/// @return The parsed and self-checked certificate.
function parseRecovery(bytes calldata tbs) external view returns (Parsed memory) {
return parse(tbs, PURPOSE_RECOVERY_TX, PURPOSE_RECOVERY_ACCESS, PURPOSE_RECOVERY_KEM);
}
/// @notice Parse a certificate authority's certificate, whose two keys are both cert-signing.
/// @dev Both classes resolve to the same purpose, which is why {parse} matches on the
/// `(purpose, algorithm)` PAIR: an authority carries two keys under one purpose and matching on the
/// purpose alone would find the first of them twice and the second never.
/// @dev No encapsulation purpose. An authority signs and is never sealed to, so {NO_KEM_PURPOSE} is
/// passed as a value the key loop can never match. An authority certificate carrying encapsulation
/// keys would parse them into slots the registry then discards, which is a shape worth refusing to
/// have at all.
/// @param tbs The TBS bytes, verbatim.
/// @return The parsed and self-checked certificate.
function parseCa(bytes calldata tbs) external view returns (Parsed memory) {
return parse(tbs, PURPOSE_CERT_SIGNING, PURPOSE_CERT_SIGNING, NO_KEM_PURPOSE);
}
/**
* @notice Verify an issuer's dual signature over a TBS.
* @dev Both must verify, not either. Two signatures under two different hardness assumptions is the
* entire reason a certificate carries two, and accepting one would collapse that to whichever
* family breaks first.
*
* Provided for callers that verify an off-chain issuance against keys they already trust. The
* caller supplies the issuer's keys, so it is the caller's job to have taken them from a registered
* record rather than from its own calldata — a key handed in with the signature proves nothing.
* @param tbs The signed TBS bytes.
* @param issuerMlDsaKey The issuer's registered ML-DSA-87 cert-signing key.
* @param issuerSlhDsaKey The issuer's registered SLH-DSA-SHAKE-256s cert-signing key.
* @param mlDsaSignature The lattice signature over `tbs`.
* @param slhDsaSignature The hash-based signature over `tbs`.
* @return Whether both signatures verify.
*/
function verifyIssuerSignatures(
bytes memory tbs,
bytes memory issuerMlDsaKey,
bytes memory issuerSlhDsaKey,
bytes memory mlDsaSignature,
bytes memory slhDsaSignature
) external view returns (bool) {
return FinalChainPrecompiles.verifyMlDsa87(issuerMlDsaKey, tbs, mlDsaSignature)
&& FinalChainPrecompiles.verifySlhDsa(issuerSlhDsaKey, tbs, slhDsaSignature);
}
/// @notice Refuse a TBS that is shorter than the parser is about to read.
/// @dev Called before every read rather than once at the top, because the layout is variable-length: a
/// certificate can be well-formed up to its key block and truncated inside it, and a parser that
/// only checked the fixed header would read whatever calldata followed.
/// @param tbs The TBS bytes.
/// @param upto The offset the next read needs to be valid.
function _need(bytes calldata tbs, uint256 upto) private pure {
if (tbs.length < upto) revert Truncated(upto, tbs.length);
}
/// @notice Step over one four-byte-length-prefixed field and report where it was.
/// @dev Bounds-checks the prefix before reading it and the value before returning, so a truncated
/// certificate cannot make the cursor run past the end of calldata. The caller recovers the value's
/// slice as `tbs[next - length:next]`.
/// @param tbs The TBS bytes.
/// @param p Offset of the length prefix.
/// @return next Offset just past the field's value.
/// @return length The field's declared length.
function _skipLengthPrefixed(bytes calldata tbs, uint256 p)
private
pure
returns (uint256 next, uint256 length)
{
_need(tbs, p + 4);
length = uint32(bytes4(tbs[p:p + 4]));
next = p + 4 + length;
_need(tbs, next);
}
/// @notice Read a key identifier out of the TBS as one word.
/// @dev Answers `bytes32(0)` for any length other than 32 rather than reverting. A key identifier that
/// is not 32 bytes is not a SHA3-256 digest, so it cannot match the value it is compared against,
/// and the comparison at the call site produces the correct refusal with no separate error to
/// define. The one legitimate short case is a zero-length authority key identifier, which the
/// caller must reject on its own terms.
/// @param tbs The TBS bytes.
/// @param start Offset of the field's value.
/// @param length The field's declared length.
/// @return The 32-byte value, or zero when the field is not 32 bytes long.
function _bytes32At(bytes calldata tbs, uint256 start, uint256 length)
private
pure
returns (bytes32)
{
// A SubjectKeyId that is not 32 bytes is not a SHA3-256 digest, so it
// cannot match and the comparison will fail — which is the correct
// outcome and needs no separate error.
if (length != 32) return bytes32(0);
return bytes32(tbs[start:start + 32]);
}
}
contracts/finalchain/FinalChainPrecompiles.sol
// SPDX-License-Identifier: BUSL-1.1
// Copyright (c) 2024-2026 Final DeFi
// Licensed under the Business Source License 1.1 (the "License")
//
// Change Date: 2029-01-01
// Change License: GPL-2.0-or-later
//
// Additional Use Grant:
// 1. Any person or entity may link this library into contracts deployed on a
// Final DeFi Protocol chain in order to reach that chain's hash and
// post-quantum signature-verification precompiles.
// 2. Integrators, node operators, and auditors may use it to reproduce and
// independently re-verify any verdict those precompiles produced, as part of
// their integration with the Final DeFi Protocol.
// 3. For the avoidance of doubt, this Grant does NOT permit the commercial
// deployment of a Fork of this library or a competing state plane derived
// from it without permission prior to the Change Date.
//
// @author Final DeFi
// @version 1.0.0
pragma solidity ^0.8.20;
/**
* @title Final Chain Precompiles
* @notice The three primitives Final Chain adds to the EVM, and the only
* supported way to reach them.
*
* @dev **These exist ONLY on Final Chain (chain id 48359).** They are provided
* by this chain's own node binary, and
* nothing at these addresses on Ethereum, Optimism or any other chain will
* answer. A contract that calls them must be one that only ever runs here;
* `assertAvailable` below is the cheap way to fail loudly rather than treat an
* empty return as a verified signature.
*
* The addresses are the FIPS numbers, which is the whole allocation rule —
* there is no local registry to consult and no way for two implementations to
* disagree about where a primitive lives:
*
* | address | primitive | FIPS |
* |---|---|---|
* | `0x…0202` | SHA3-256 | 202 |
* | `0x…0203` | ML-KEM-1024 key validation | 203 |
* | `0x…0204` | ML-DSA-87 verify | 204 |
* | `0x…0205` | SLH-DSA-SHAKE-256s verify | 205 |
* | `0x…0207` | HQC-5 key validation | 207 |
*
* The two KEM addresses VALIDATE keys and do nothing else, for one reason:
* encapsulation is a SENDER operation and decapsulation needs the secret key,
* so neither belongs on a chain at all. Checking that a registered public key
* is well-formed is hardening rather than a dependency, and nothing in this
* system waits on it.
*
* HQC's number is 207. It had none when the KEM pair was chosen, which was the
* one thing separating it from ML-KEM here — a primitive with no standard
* number has no address under this rule, and inventing one would have been a
* local convention masquerading as the global one.
*
* **No AEAD precompile, at any number.** The chain must never be able to
* decrypt an intent, and checking a revealed body against its commitment is a
* hash compare that `0x0202` already serves.
*
* ## Why this library refuses to take a public key from its caller
*
* It does take one — the primitives are pure functions and cannot do otherwise.
* The rule lives one level up, in `FinalPqQuorum`: a key passed as an argument
* proves nothing, because anyone holding a keypair can produce a valid
* signature under it. Only a key read from `FinalIdentityRegistry` is evidence
* about WHO signed. Every call site here must be able to answer "where did this
* key come from" with "storage", never "calldata".
*
* ## `success` is not the answer
*
* A `staticcall` to a verifier returns two things and both matter. `success`
* false means the call was malformed — usually a length bug in the caller — and
* `success` true with a zero word means the signature did not verify. The
* helpers below collapse both to `false` for the caller's convenience, which is
* safe in that direction and only in that direction: treating a failed call as
* a valid signature would be the whole security of the system.
*/
library FinalChainPrecompiles {
/// @notice SHA3-256 (FIPS 202). NOT `keccak256`, which is the
/// pre-standardisation padding and produces a different digest.
address internal constant SHA3_256 = address(0x0202);
/// @notice ML-DSA-87 verification (FIPS 204). Transaction-class keys.
address internal constant ML_DSA_87 = address(0x0204);
/// @notice SLH-DSA-SHAKE-256s verification (FIPS 205). Access-class keys.
address internal constant SLH_DSA_SHAKE_256S = address(0x0205);
/// @notice ML-KEM-1024 encapsulation-key validation (FIPS 203).
/// @dev VALIDATES; it does not encapsulate. Runs FIPS 203 §7.2's own
/// encapsulation-key check — the type check and the modulus check — and
/// nothing else. Encapsulation is a sender operation and decapsulation
/// needs the secret key, so neither belongs on a chain.
address internal constant ML_KEM_1024 = address(0x0203);
/// @notice HQC-5 public-key validation (FIPS 207).
/// @dev Structural only: the length, and the three padding bits the
/// encoding leaves beyond `n = 57637`. HQC has no cheap key-validity
/// predicate and this does not pretend to one.
address internal constant HQC_5 = address(0x0207);
/// @notice ML-DSA-87 public key length. Round-3 Dilithium5 shares it.
uint256 internal constant ML_DSA_87_PUBLIC_KEY_LEN = 2592;
/// @notice ML-DSA-87 signature length. Round-3 Dilithium5 is 4595.
uint256 internal constant ML_DSA_87_SIGNATURE_LEN = 4627;
/// @notice SLH-DSA-SHAKE-256s public key length (`PK.seed ‖ PK.root`).
uint256 internal constant SLH_DSA_SHAKE_256S_PUBLIC_KEY_LEN = 64;
/// @notice SLH-DSA-SHAKE-256s signature length. The `f` set is 49,856.
uint256 internal constant SLH_DSA_SHAKE_256S_SIGNATURE_LEN = 29792;
/// @notice Thrown when a precompile is absent, i.e. this is not Final Chain
/// or the node is stock reth rather than `final-reth`.
error PrecompileUnavailable(address precompile);
/**
* @notice Reverts unless all five precompiles answer.
* @dev Call this from a constructor. A contract whose security rests on PQ
* verification must not deploy onto a chain that cannot perform it — the
* failure mode otherwise is a quorum that reaches threshold with zero valid
* signatures, discovered at the worst possible moment.
*
* The probe is SHA3-256 of the empty string, whose value is a published
* FIPS 202 constant. It cannot be produced by an address with no code
* (which returns empty) nor by `keccak256` (which gives a different digest
* for the same input), so it distinguishes "the right precompile" from both
* "nothing here" and "the wrong hash function".
*/
function assertAvailable() internal view {
bytes32 expected = 0xa7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a;
(bool ok, bytes memory out) = SHA3_256.staticcall("");
if (!ok || out.length != 32 || bytes32(out) != expected) {
revert PrecompileUnavailable(SHA3_256);
}
// The two signature verifiers are probed by shape rather than by a
// known-answer vector: a KAT here would put a 29,792-byte signature in
// this contract's bytecode. A deliberately short input is a
// *precompile error* by contract, so a FAILED call is the pass and a
// silent success would mean something else is answering at the address.
_probeRejectsShortInput(ML_DSA_87);
_probeRejectsShortInput(SLH_DSA_SHAKE_256S);
// The two KEM validators are probed the other way round, because they
// are total by contract: a wrong length is a malformed KEY, which is
// the question being asked, so they ANSWER rather than error. A
// one-byte input must therefore come back as a well-formed `false`, and
// a failed call means nothing is there.
_probeAnswersFalse(ML_KEM_1024);
_probeAnswersFalse(HQC_5);
}
/**
* @dev A short input must make the precompile ERROR. The gas budget is the
* whole subtlety.
*
* A reverting CONTRACT refunds the gas it did not use. A precompile that
* returns an error consumes **everything forwarded to it** — and Solidity
* forwards 63/64 of what is left by default. Two such probes in a
* constructor therefore burn all but 1/4096 of the deployment's gas, and
* the deploy fails with no revert data at all.
*
* That is not hypothetical: it is what happened the first time this ran
* against a real `final-reth`, and no Foundry test could have caught it.
* A mocked precompile is a contract, and a contract's `require` hands the
* gas back.
*
* 5,000 is generous for a call that fails on a length check before any
* cryptography runs, and small enough that both probes together are noise
* against a deployment.
*/
function _probeRejectsShortInput(address precompile) private view {
bool ok;
assembly ("memory-safe") {
let ptr := mload(0x40)
mstore8(ptr, 0x00)
ok := staticcall(5000, precompile, ptr, 0x01, 0x00, 0x00)
}
if (ok) revert PrecompileUnavailable(precompile);
}
/**
* @dev A one-byte input must come back as a well-formed zero word.
*
* The inverse of `_probeRejectsShortInput`, and the inversion is the point:
* these two precompiles are TOTAL. Every byte string has an answer to "is
* this a well-formed key", and for one byte the answer is no. A precompile
* that errored here would be one that treats a malformed key as a caller
* bug, which is the opposite of what a registry wants.
*
* Gas is bounded for the same reason as the other probe — an erroring
* precompile consumes everything forwarded — even though the pass case
* returns normally and refunds.
*/
function _probeAnswersFalse(address precompile) private view {
bool ok;
bytes32 answer;
assembly ("memory-safe") {
let ptr := mload(0x40)
mstore8(ptr, 0x00)
ok := staticcall(5000, precompile, ptr, 0x01, ptr, 0x20)
answer := mload(ptr)
}
if (!ok || answer != bytes32(0)) revert PrecompileUnavailable(precompile);
}
/**
* @notice Is `encapsulationKey` a well-formed ML-KEM-1024 key?
*
* @dev The check a registry owes a sender. A malformed encapsulation key
* stored on chain is an account whose intents cannot be sealed, and the
* discovery happens at the first attempt to seal one — on the hybrid path,
* as a pair silently reduced to one family, which is the failure with no
* error attached.
*
* False rather than reverting on any shape, including the wrong length,
* because the caller is asking a question and every input has an answer.
*/
function isWellFormedMlKem1024(bytes memory encapsulationKey) internal view returns (bool) {
return _validatesKey(ML_KEM_1024, encapsulationKey);
}
/// @notice Is `publicKey` a well-formed HQC-5 key?
/// @dev Structural, and honestly partial — see the precompile. It catches a
/// truncated key, a key from the wrong parameter set, and a tail carrying
/// smuggled bytes, which are the three ways this goes wrong in practice.
function isWellFormedHqc5(bytes memory publicKey) internal view returns (bool) {
return _validatesKey(HQC_5, publicKey);
}
/// @dev A failed CALL is not a false answer. It means nothing is at the
/// address — this is not Final Chain, or the node is stock reth — and
/// reading it as "the key is malformed" would silently disable the check on
/// exactly the deployment where it cannot run.
function _validatesKey(address precompile, bytes memory key) private view returns (bool) {
(bool ok, bytes memory out) = precompile.staticcall(key);
if (!ok || out.length != 32) revert PrecompileUnavailable(precompile);
return bytes32(out) != bytes32(0);
}
/// @notice FIPS 202 SHA3-256 over `data`.
/// @dev The certificate schema hashes `TBSCertificate`, `SubjectKeyId` and
/// `AuthorityKeyId` with this, so it is the only function that can check a
/// `certHash` against the bytes it claims to summarise.
function sha3_256(bytes memory data) internal view returns (bytes32 digest) {
(bool ok, bytes memory out) = SHA3_256.staticcall(data);
if (!ok || out.length != 32) revert PrecompileUnavailable(SHA3_256);
digest = bytes32(out);
}
/// @notice Verify an ML-DSA-87 signature. False on any failure, including
/// a malformed call.
function verifyMlDsa87(bytes memory publicKey, bytes memory message, bytes memory signature)
internal
view
returns (bool)
{
if (
publicKey.length != ML_DSA_87_PUBLIC_KEY_LEN
|| signature.length != ML_DSA_87_SIGNATURE_LEN
) return false;
return _verify(ML_DSA_87, publicKey, signature, message);
}
/// @notice Verify an SLH-DSA-SHAKE-256s signature. False on any failure.
function verifySlhDsa(bytes memory publicKey, bytes memory message, bytes memory signature)
internal
view
returns (bool)
{
if (
publicKey.length != SLH_DSA_SHAKE_256S_PUBLIC_KEY_LEN
|| signature.length != SLH_DSA_SHAKE_256S_SIGNATURE_LEN
) return false;
return _verify(SLH_DSA_SHAKE_256S, publicKey, signature, message);
}
/// @dev `publicKey ‖ signature ‖ message`, in that order. Both fixed-length
/// fields come first so the message is unambiguously the remainder — the
/// same reason the precompile takes no length prefix.
function _verify(
address precompile,
bytes memory publicKey,
bytes memory signature,
bytes memory message
) private view returns (bool) {
(bool ok, bytes memory out) =
precompile.staticcall(abi.encodePacked(publicKey, signature, message));
return ok && out.length == 32 && bytes32(out) != bytes32(0);
}
}
contracts/finalchain/FinalChainTime.sol
// SPDX-License-Identifier: BUSL-1.1
// Copyright (c) 2024-2026 Final DeFi
// Licensed under the Business Source License 1.1 (the "License")
//
// Change Date: 2029-01-01
// Change License: GPL-2.0-or-later
//
// Additional Use Grant:
// 1. Any person or entity may link this time library into contracts deployed on
// a Final DeFi Protocol chain, and may read its constants to interpret the
// timestamps and durations that chain publishes.
// 2. Integrators, indexers, and operators may use it to convert between this
// chain's clock and the units their own systems keep, as part of their
// integration with the Final DeFi Protocol.
// 3. For the avoidance of doubt, this Grant does NOT permit the commercial
// deployment of a Fork of this library or a competing state plane derived
// from it without permission prior to the Change Date.
//
// @author Final DeFi
// @version 1.0.0
pragma solidity ^0.8.20;
/**
* @title Final Chain Time
* @notice **On this chain, `block.timestamp` is MILLISECONDS, not seconds.**
* @dev Every other EVM chain stamps seconds. This one cannot. It mints a block every 100 ms, and the protocol
* requires block timestamps to strictly increase, so a second-denominated clock would exhaust its distinct
* values ten times over per second. Milliseconds is the deliberate consequence, and it is a property of the
* CHAIN itself rather than of any contract here — nothing in this library can change it, and nothing deployed
* beside this library may assume otherwise.
*
* Every duration and every instant on this chain is therefore in milliseconds. This library exists so that fact
* is stated in one place and converted in one place, instead of being assumed independently everywhere a
* deadline or a delay is written.
*
* ## The naming rule, which is a safety rule
*
* A field or constant carrying a duration or an instant on this chain ends in `Ms`. This is not decoration. A
* delay field named for seconds while holding milliseconds elapses a thousand times too fast: a one-day
* recovery delay would mature in about eighty-six seconds, and a two-year dormancy threshold in under a day.
* Those delays are the whole of what stands between a stolen credential and an account, so a name that states
* the wrong unit is not a cosmetic defect — it is the defect, wearing a disguise. `Seconds`-suffixed names do
* not appear in this directory and must not be introduced.
*
* A test harness is not a check on this. Standard EVM tooling stamps `block.timestamp` in seconds, so a suite
* can agree with the contracts under test and both be wrong about the chain they deploy to. The unit has to be
* carried by the names.
*
* Solidity's `hours` and `days` suffixes remain the clearest way to write a duration, so durations are written
* as `24 hours * MS_PER_SECOND` rather than as a bare literal: the intent stays readable and the unit stays
* explicit at the point of use.
*/
library FinalChainTime {
/// @notice Milliseconds per second — the whole conversion between this chain's clock and ordinary time,
/// named once.
/// @dev Multiply a `seconds`-denominated Solidity duration literal by this to express it in this chain's
/// units. It is deliberately the only place the factor appears.
uint64 internal constant MS_PER_SECOND = 1_000;
/// @notice Nanoseconds per millisecond — the divisor for values that arrive stamped in nanoseconds.
/// @dev The certificate schema stamps validity windows in nanoseconds, so a certificate converts DOWN to
/// this chain's clock. Dividing rather than multiplying is the direction that cannot overflow, and it
/// truncates toward the past, which for a validity window is the conservative rounding.
uint64 internal constant NS_PER_MILLISECOND = 1_000_000;
/// @notice This chain's current time, in milliseconds.
/// @dev A function rather than a bare `block.timestamp` read so the unit is visible at every call site.
/// It performs no arithmetic and exists purely so that reading the clock is self-describing, where
/// `block.timestamp` on this chain is silently a thousand times what a reader would assume.
/// @return nowInMs The current block's timestamp, in milliseconds.
function nowMs() internal view returns (uint64) {
return uint64(block.timestamp);
}
}
contracts/finalchain/FinalIdentityRegistry.sol
// SPDX-License-Identifier: BUSL-1.1
// Copyright (c) 2024-2026 Final DeFi
// Licensed under the Business Source License 1.1 (the "License")
//
// Change Date: 2029-01-01
// Change License: GPL-2.0-or-later
//
// Additional Use Grant:
// 1. Any person or entity may deploy this identity registry as part of a Final
// DeFi Protocol state plane, and may register, rotate, and revoke identity
// records in it under the authority this contract enforces.
// 2. Operators, integrators, and end users may read the certificates, public
// keys, role bits, and signer bindings it holds, and may call its views to
// resolve an identity, a sender, or a quorum roster.
// 3. For the avoidance of doubt, this Grant does NOT permit the commercial
// deployment of a Fork of this identity registry or a competing certificate
// authority derived from it without permission prior to the Change Date.
//
// @author Final DeFi
// @version 1.0.0
pragma solidity ^0.8.20;
import {FinalCertificate} from "./FinalCertificate.sol";
import {FinalChainTime} from "./FinalChainTime.sol";
import {FinalChainPrecompiles} from "./FinalChainPrecompiles.sol";
import {FinalPqQuorum} from "./FinalPqQuorum.sol";
import {FinalSweep} from "../utils/FinalSweep.sol";
/// @dev Commitment space for one stage's encapsulation pair.
/// Byte-equal to `FinalWalletFactory.DOMAIN_KEM_BUNDLE` and to the certificate issuer's own preimage
/// constant. Three independent derivations of one word: a mismatch in any of them is a certificate that
/// verifies nowhere, so the value is pinned by test against the other two rather than imported.
bytes32 constant DOMAIN_KEM_BUNDLE = keccak256("FINAL_KEM_BUNDLE_v01");
/// @dev Commitment space for the identity tree's wallet leaf.
/// Byte-equal to `IdentityRootModule.DOMAIN_IDENTITY_LEAF` on every execution chain. Restated rather
/// than imported because that module lives on other chains and no import would make the two one value; a
/// cross-contract parity test pins the pair. The spelling is FROZEN: the premined certificates were mined
/// against this exact constant, and the leaf it derives is the `certHash` inside a wallet's address
/// derivation, so changing a byte here moves addresses that already exist.
bytes32 constant DOMAIN_IDENTITY_LEAF = keccak256("FINAL_IDENTITY_LEAF_PQ_v01");
/// @dev Commitment space for the identity tree's ISSUER leaf.
/// An issuer projects under its own domain — `DOMAIN_ISSUER_LEAF ‖ certHash ‖ version ‖
/// issuerTreeRoot` — so an issuer record is stapleable for offline licence verification while the distinct
/// domain keeps it out of wallet admission: an execution chain's gateway folds with the wallet domain, so an
/// issuer leaf can never satisfy an identity-certificate check there. `issuerTreeRoot` is a RESERVED word,
/// zero until an issuer's own certificate-tree anchor is wired — the only clean path to offline licence
/// revocation, since fixed-depth insertion-ordered state trees cannot prove non-inclusion.
bytes32 constant DOMAIN_ISSUER_LEAF = keccak256("FINAL_ISSUER_LEAF_v01");
/// @dev The issuer name every chain-attested certificate carries, as a keccak digest.
/// The chain is the issuer but holds no keypair, so a chain-attested certificate carries this named
/// value in its issuer field: required by the wire format, verifying nothing on its own, and covered by
/// `certHash`. The name is deliberately environment-agnostic and jurisdiction-silent — the issuer is the
/// worldwide network rather than a legal entity, and an environment-specific name would fork `certHash` per
/// environment. Compared as a hash rather than as a string, so the check costs one word.
bytes32 constant CHAIN_ISSUER_DN_HASH = keccak256("CN=Final Chain,O=Final DeFi");
/// @dev The authority key identifier every chain-attested certificate names.
/// `SHA3-256(utf8("FINAL_CHAIN_AUTHORITY_v01"))` — a DOMAIN constant rather than the digest of a key,
/// because the chain issues certificates and holds no public key block to hash. Precomputed rather than
/// derived at construction: the harness the unit tests run under does not implement the real SHA3 function,
/// and the literal is pinned by test against a reference implementation. A zero-length authority key
/// identifier is reserved and is admitted nowhere.
bytes32 constant CHAIN_AUTHORITY_KEY_ID =
0x9a6a5d8139ad2d28957698330aaa691017dba7dc80eb7cbec585239fb680bbab;
/**
* @title Identity Leaf Sink
* @notice The identity tree's projection door on the state-trees contract.
* @dev A narrow interface rather than an import, because the trees contract imports THIS file — the
* dependency runs that way, and this is the one call that runs the other. Declaring the single method
* here keeps the cycle away from the compiler without duplicating either contract's surface.
*/
interface IIdentityLeafSink {
/// @notice Recompute and store the identity-tree leaf for each named account.
/// @dev Called inside the same transaction as every identity mutation, so an execution chain's admission
/// set sees a registration, rotation or revocation the moment this chain does. The leaf VALUE is
/// derived by the trees contract from the registry's post-mutation state, so the caller supplies
/// accounts and never a leaf.
/// @param accounts The accounts whose leaves are stale.
function syncIdentityLeaves(address[] calldata accounts) external;
}
/**
* @title Revocation Recorder
* @notice The revocation log's recording door.
* @dev Same narrow-interface reasoning as the leaf sink above. `recorded` is read first, so a fingerprint
* somebody already recorded through the log's permissionless door cannot revert the registry mutation
* that feeds it.
*/
interface IRevocationRecorder {
/// @notice Fold a permanently retired signer fingerprint into the revocation log.
/// @dev The log applies its own permanence gate, reading this registry back; the call states nothing the
/// registry has not already decided.
/// @param signerId The fingerprint that has lost standing for good.
function record(bytes32 signerId) external;
/// @notice Whether the log already holds `signerId`.
/// @param signerId The fingerprint to look up.
/// @return Whether a leaf for it exists.
function recorded(bytes32 signerId) external view returns (bool);
}
/**
* @title Final Identity Registry
* @notice Who every party in the system is, on chain: one record per party, carrying its certificate and its
* actual public keys.
* @dev Every service, every co-signer, every certificate authority and every operator has one record here.
* The record holds the party's public keys in full rather than commitments to them, and this contract is
* the certificate authority as well as the roster.
*
* ## Where this runs
*
* Only on this project's own reth-based chains. Verification happens inside precompiles that exist
* nowhere else: SHA3-256 at `0x0202`, ML-DSA-87 at `0x0204` and SLH-DSA-SHAKE-256s at `0x0205`, each
* address being that primitive's FIPS number. The constructor probes them and refuses to deploy where
* they are absent, so a registry of keys the chain cannot check never comes into existence. This
* contract takes part in no CREATE2 derivation — its address is per chain, and nothing derives an
* address from it — and nothing outside this directory imports it.
*
* Gas is deliberately NOT a design constraint on that chain and must not be optimised for. Where a
* choice below trades gas for a verdict that is re-derivable from public state, the verdict wins: a
* signature checked in a precompile is a fact anyone can recompute, where the same check run in a
* library by whichever process happened to hold the keys is only a claim.
*
* ## Keys are read from STORAGE, never from calldata
*
* A commitment would be a quarter of the storage and would be enough to CHECK a key someone hands you.
* It is not enough to VERIFY A SIGNATURE, because verification needs the key itself — and a key that
* arrives in calldata proves nothing, since anyone holding a keypair can produce a valid signature under
* it. A quorum built on caller-supplied keys is a quorum of one: whoever built the calldata.
*
* So the keys live here in full. `FinalPqQuorum` resolves a member through this registry and reads that
* member's key from this registry's storage, and "which key is co-signer three" has exactly one answer,
* in exactly one place. That is the load-bearing rule of every quorum on the chain, not an optimisation.
*
* ## The certificate is the record, not a pointer to one
*
* `certHash` is `SHA3-256(TBSCertificate)`: the certificate's own identity, and the handle revocation is
* keyed on. {registerWallet} and {registerIssuer} take the certificate's TBS bytes and read everything
* out of them — the digest, the serial, the key identifiers, the depth pair, the validity window and
* every public key. Neither takes a key argument, so no two arguments can disagree and no registrar can
* bind a certificate to a keypair that certificate does not contain.
*
* ## The root is the first record here, not a self-signed file
*
* This chain is the only root certificate authority, and the root is pinned as an entry in this registry
* rather than distributed as a self-signed certificate somebody has to install. Chain validation
* terminates here BY IDENTITY. Everything registered after the root is verified on chain, inside the
* precompiles, against what this registry already holds: the holder's own two signatures over the
* admission digest, the pinned chain-issuer constants, and — for a nested issuer — lineage to a
* registered parent whose depth admits it. There is no path by which a key enters this registry
* unattested; a registrar cannot register anything else.
*
* ## Roles are a bitmask
*
* One party is legitimately several things: a co-signer that also publishes, an operator that is also a
* guardian. A single enum would force either duplicate records for one key, which is two sources of
* truth about one party, or a role hierarchy nobody agrees on. A mask has neither problem, and a quorum
* asks whether an account CARRIES a capability rather than whether it IS a type.
*
* ## Membership is hybrid-gated
*
* Who is in this registry, and with which roles, is the root of every quorum on the chain, so it is the
* one thing no single key may decide. Once bootstrap is sealed, every membership mutation — register,
* roles, revoke, a hash-based signing key, the registrar threshold itself — and every state-plane
* configuration change routed through {requireRegistrarQuorum} takes a `ROLE_REGISTRAR` quorum whose
* approvals carry BOTH families: the ML-DSA-87 vote and the SLH-DSA seal. A lattice break cannot then
* rewrite the roster, and neither can a hash-function break; only both at once.
*
* The bootstrap window is the only exception. While it is open the bootstrap admin writes alone, because
* every roster has to be installed by someone before it can install itself. {sealBootstrap} closes it
* irreversibly, and refuses to close it onto a registrar quorum that cannot be met.
*
* ## The sender is not the account
*
* Transactions on this chain are signed by ML-DSA-87, and the node derives `msg.sender` from the key as
* `keccak256(0x04 ‖ publicKey)[12:]`. That address pays gas and holds no authority. {accountOfSender}
* binds it to the identity whose live transaction key it derives from, so a `msg.sender` gate anywhere
* on this chain asks {senderHasRole} and resolves to the identity — and a key rotation moves the binding
* instead of the roster.
*
* ## What this contract deliberately does not do
*
* It never un-revokes: a revoked certificate is finished, and reversing that would reopen every past
* verification. It never enumerates a mapping inside a mutation — the registrars supply the chain list a
* revocation touches, and a fingerprint an incomplete list missed stays permanently recordable through
* the revocation log's own permissionless door. It holds no funds, exposes no payable entrypoint, and
* reserves nothing against a sweep. And it grants no capability by parsing one: a certificate says which
* keys a party holds, `roles` says what the party may do, and the two arrive as different arguments on
* purpose.
*/
contract FinalIdentityRegistry is FinalSweep {
// ---------------------------------------------------------------- roles
/// @notice May co-sign account-state rounds (tree 1).
uint256 public constant ROLE_ACCOUNT_COSIGNER = 1 << 0;
/// @notice May co-sign MMR / bundle-log advances.
uint256 public constant ROLE_MMR_COSIGNER = 1 << 1;
/// @notice May publish PHI ledger state (tree 2).
uint256 public constant ROLE_PHI_PUBLISHER = 1 << 2;
/// @notice May publish vAsset state (tree 3).
uint256 public constant ROLE_VASSET_PUBLISHER = 1 << 3;
/// @notice May publish oracle data (tree 4).
uint256 public constant ROLE_ORACLE_PUBLISHER = 1 << 4;
/// @notice May publish settlement / asset registry roots (trees 5 and 6).
uint256 public constant ROLE_REGISTRY_PUBLISHER = 1 << 5;
/// @notice May act as a wallet guardian.
uint256 public constant ROLE_GUARDIAN = 1 << 6;
/// @notice May submit transactions on behalf of the protocol.
uint256 public constant ROLE_RELAYER = 1 << 7;
/// @notice May register and revoke identities once bootstrap is sealed.
uint256 public constant ROLE_REGISTRAR = 1 << 8;
/// @notice A certificate authority — the root, or an intermediate under it.
uint256 public constant ROLE_CERTIFICATE_AUTHORITY = 1 << 9;
/// @notice May co-sign `FinalSettlementLog` appends — the cross-chain
/// settlement quorum, the same members whose LMS keys satisfy the
/// execution chains' settlement set. A role of its own rather than a
/// second use of `ROLE_REGISTRY_PUBLISHER`: the registries (trees 5/6)
/// change on listing cadence and settlement leaves release custody, and
/// one role for both would put the value plane behind the listing roster.
uint256 public constant ROLE_SETTLEMENT_COSIGNER = 1 << 10;
// ----------------------------------------------------- action domains
/// @notice Action domain for registering or rotating a wallet identity.
/// @dev One domain per membership mutation, so an approval to grant a role can never be replayed as one
/// to revoke. This registry is its own verifying contract for all of these, and the digest also
/// binds a per-contract counter, so an approval authorises exactly one action once.
bytes32 public constant DOMAIN_REGISTER_WALLET = keccak256("FINAL_REGISTRY_REGISTER_WALLET_v01");
/// @notice Action domain for registering or rotating an issuer.
bytes32 public constant DOMAIN_REGISTER_ISSUER = keccak256("FINAL_REGISTRY_REGISTER_ISSUER_v01");
/// @notice The admission proof-of-possession digest domain.
/// @dev The HOLDER signs `keccak256(abi.encode(domain, chainid, registry, certHash, recoveryCertHash,
/// gateNonce))` with the live transaction key (ML-DSA-87) AND the live access key
/// (SLH-DSA-SHAKE-256s) — both families, in the admission transaction, verified by the precompiles.
/// Possession lives in the TRANSACTION, never in the artifact, so holding a copy of somebody's
/// public certificate admits nothing.
bytes32 public constant DOMAIN_IDENTITY_ADMISSION = keccak256("FINAL_IDENTITY_ADMISSION_v01");
/// @notice Action domain for root-plane global certificate revocation, by handle.
bytes32 public constant DOMAIN_REVOKE_CERTIFICATE =
keccak256("FINAL_REGISTRY_REVOKE_CERTIFICATE_v01");
/// @notice Digest domain for an issuer revoking a certificate it signed off chain.
/// @dev Signed by the issuer's own registered cert-signing keys rather than approved by a quorum, and
/// bound to the issuer's own gate nonce, so one issuer's revocations cannot be replayed as
/// another's.
bytes32 public constant DOMAIN_ISSUER_CERT_REVOCATION =
keccak256("FINAL_ISSUER_CERT_REVOCATION_v01");
/// @notice Action domain for recording an account's hash-based signing key.
bytes32 public constant DOMAIN_REGISTER_LMS_KEY = keccak256("FINAL_REGISTRY_REGISTER_LMS_KEY_v01");
/// @notice Action domain for replacing an identity's capability bitmask.
bytes32 public constant DOMAIN_SET_ROLES = keccak256("FINAL_REGISTRY_SET_ROLES_v01");
/// @notice Action domain for retiring an identity.
bytes32 public constant DOMAIN_REVOKE = keccak256("FINAL_REGISTRY_REVOKE_v01");
/// @notice Action domain for moving the registrar threshold itself.
bytes32 public constant DOMAIN_SET_REGISTRAR_THRESHOLD =
keccak256("FINAL_REGISTRY_SET_REGISTRAR_THRESHOLD_v01");
/// @notice The algorithm identifier the sender derivation is domain-separated by.
/// @dev ML-DSA-87, FIPS 204 — the only algorithm this chain's transaction envelope admits. Prefixing it
/// means a key of another family can never derive the same sender address.
uint8 private constant ENVELOPE_ALG_ML_DSA_87 = 4;
// ------------------------------------------------------------- storage
/**
* @title Identity
* @notice One party's on-chain identity.
* @dev `version` increments on every mutation, and that increment is what a rotation IS: the record is
* replaced rather than appended to, and the version is how a reader on another chain knows which of
* two copies it has seen is newer.
*/
struct Identity {
/// SHA3-256 of the LIVE certificate's TBS bytes. The revocation handle.
bytes32 certHash;
/// SHA3-256 of the RECOVERY certificate's TBS bytes.
bytes32 recoveryCertHash;
/// The certificate's 32-byte serial, `16 B entropy ‖ 16 B counter`.
bytes32 serial;
/// SHA3-256 of this certificate's public key block. A child names it in
/// its own `AuthorityKeyId`, which is how the chain links the two.
bytes32 subjectKeyId;
/// Capability bitmask. Zero for a registered-but-idle party.
uint256 roles;
/// Position on the delegation axis; 0 is the Final Chain root.
uint8 depth;
/// Deepest level this key may issue to. `== depth` means it signs no
/// certificates at all, which is every end entity.
uint8 maxDelegationDepth;
/// Milliseconds since the epoch, on this chain's clock. The certificate schema stamps validity in
/// nanoseconds and the parser converts on the way in, so nothing here ever compares across units.
uint64 notBefore;
/// Milliseconds since the epoch, or 0 for "never expires" — which the certificate schema allows and
/// personal identity certificates use. The bound is exclusive.
uint64 notAfter;
/// Monotonic. A rotation that does not advance it is refused.
uint64 version;
/// Set by `revoke`. Never unset: a revoked certificate is finished, and
/// an un-revoke would make every past verification re-openable.
bool revoked;
/// Distinguishes "no record" from "a record whose fields are all zero".
bool registered;
}
/**
* @title Lms Key
* @notice A hash-based (LMS) signing key held by a registered account.
* @dev The execution chains' quorums verify LMS rather than ML-DSA, because those chains have no
* post-quantum precompiles and check a keccak hash chain instead. Those keys are the authority over
* the post-quantum anchor, and therefore over post-quantum execution — which makes "who holds this
* fingerprint?" a question the state plane has to be able to answer, exactly as it answers it for
* every other key.
*
* Recorded against an account that is ALREADY registered, so an LMS key is a capability of a known
* identity rather than a standalone credential. It inherits that identity's revocation: a revoked
* account's signer is a revoked signer, with nothing extra to remember to do.
*/
struct LmsKey {
/// `I`, hashed into every step of the signature.
bytes16 keyId;
/// Merkle tree height. Bound into the fingerprint, because the leaf
/// commits to node `2^h + q` and a signer who could vary it could vary
/// the numbering.
uint8 height;
/// `T[1]`, the LMS public key.
bytes32 root;
/// Monotonic. A rotation that does not advance it is refused, so a
/// replayed registration cannot reinstate a superseded key.
uint64 version;
/// Distinguishes "no key" from "a key whose fields are all zero".
bool registered;
}
/// @notice The hash-based (LMS) signing key an account holds, per chain.
/// @dev One slot per account AND chain. A single-use hash-based counter is a complete defence only while
/// the key it names signs for ONE chain, so the roster is stored the way it is armed: the same
/// operator is a different signer on every chain, and a rotation on one says nothing about another.
mapping(address account => mapping(uint64 chainId => LmsKey)) private _lmsKey;
/**
* @title Lms Binding
* @notice What a signer fingerprint is bound to: the account holding it and the chain it signs for.
* @dev Two fields in one slot, deliberately. This contract sits within a few bytes of the deployed-code
* ceiling, so anything added to this surface has to pay for itself in bytecode first — which is why
* checks that no authority consults, such as refusing a zero chain identifier, are left to the
* publisher off chain rather than spent here.
*/
struct LmsBinding {
/// The account that registered the fingerprint. Zero means no account ever did.
address account;
/// The chain that registration was for. Zero alongside a zero account, for a fingerprint never
/// registered.
uint64 chainId;
}
/// @notice Which account a signer fingerprint belongs to, and which chain it signs for.
/// @dev The lookup the whole LMS record exists for: an execution chain's roster names fingerprints and
/// nothing else, so without this the keys behind those names are unattributable. Written once at
/// registration and left in place when the key is superseded, because attribution is history — a
/// signature made under a retired key was still made by that operator.
///
/// The chain it names is what selects the slot {lmsSignerIsLive} resolves the fingerprint against.
mapping(bytes32 signerId => LmsBinding) private _lmsBinding;
/// @notice The identity record for an account.
mapping(address account => Identity) private _identity;
/// @notice The live transaction key, ML-DSA-87: spending, and every high-cadence protocol action.
/// @dev All four key slots are stored in FULL rather than as commitments, because the precompiles verify
/// against a KEY and a key that arrived in calldata proves nothing about who signed. This is the
/// rule every quorum on this chain rests on.
/// @dev A certificate authority has two keys rather than four, and they live in the two active slots.
/// One storage shape rather than two, because every reader would otherwise have to know which kind
/// of party it was looking at before it could look.
mapping(address account => bytes) private _activeTransactionKey;
/// @notice The live access key, SLH-DSA-SHAKE-256s: identity, rotation and guardianship.
mapping(address account => bytes) private _activeAccessKey;
/// @notice The pre-committed recovery transaction key, ML-DSA-87. Empty for a certificate authority.
mapping(address account => bytes) private _recoveryTransactionKey;
/// @notice The pre-committed recovery access key, SLH-DSA-SHAKE-256s. Empty for a certificate
/// authority.
mapping(address account => bytes) private _recoveryAccessKey;
/// @notice The seal key: a service's second SLH-DSA-SHAKE-256s key, which co-signs execution-class
/// quorum decisions.
/// @dev Empty for every identity whose certificate carries no seal slot, which is every user wallet and
/// every certificate authority. An identity with no seal can never contribute to a sealed quorum,
/// so {sealableMemberCount} counts this rather than counting role bits.
mapping(address account => bytes) private _activeSealKey;
/// @notice The live stage's ML-KEM-1024 encapsulation key, the lattice half of the pair.
/// @dev Two algorithms per stage — ML-KEM-1024 and HQC-5 — so a break in either family leaves the other
/// standing, the same reasoning that pairs the two signature families. The pair is written and
/// cleared together, so an account holds both or neither.
/// @dev Stored as the RAW keys, like the signing keys, because a registry that held only commitments
/// could not answer "encapsulate to this party" without a second lookup somewhere less
/// authoritative.
mapping(address account => bytes) private _activeKemMlKem;
/// @notice The live stage's HQC-5 encapsulation key, the code-based half of the pair.
mapping(address account => bytes) private _activeKemHqc;
/// @notice The recovery stage's ML-KEM-1024 encapsulation key. Empty when the account has no recovery
/// stage.
mapping(address account => bytes) private _recoveryKemMlKem;
/// @notice The recovery stage's HQC-5 encapsulation key. Empty when the account has no recovery stage.
mapping(address account => bytes) private _recoveryKemHqc;
/// @notice Reverse index. A certificate identifies exactly one account, so
/// presenting a `certHash` is enough to find who it belongs to.
mapping(bytes32 certHash => address account) public accountOfCertificate;
/// @notice Revocation by certificate, independent of the account record.
/// A certificate stays revoked even if its account is later re-registered
/// under a new one.
mapping(bytes32 certHash => bool) public certificateRevoked;
/// @notice Who revoked a certificate through the ISSUER half of the lane.
/// Scoped by the verifier: the entry binds only when the recorded revoker
/// is the certificate's own issuer. Never gates registration.
mapping(bytes32 certHash => address) public certificateRevokedBy;
/// @notice Every registered account, in registration order. Small by
/// construction — this is services and co-signers, not wallets.
address[] private _accounts;
/// @notice Bootstrap authority. Zero once `sealBootstrap` has run.
address public bootstrapAdmin;
/// @notice Whether registration still accepts the bootstrap admin.
bool public bootstrapSealed;
/// @notice Where identity mutations project the tree-8 leaf, same-tx.
/// Zero only before {wireStatePlane} — the deploy tooling wires it before
/// the first registration, and the projection is skipped while unset so
/// the wiring transaction itself can be ordered freely in the bootstrap
/// window.
address public stateTrees;
/// @notice Where the PERMANENT standing losses — revocation and LMS-key
/// supersession — are recorded, same-tx. Zero only before {wireStatePlane}.
address public revocationLog;
/// @notice Sealed `ROLE_REGISTRAR` approvals a membership mutation needs.
/// @dev Zero until set, and bootstrap cannot be sealed while it is zero or
/// unreachable: a registry sealed behind a threshold nobody can meet is a
/// registry nobody can ever write to again.
uint256 public registrarThreshold;
/// @notice Replay counter per verifying contract — this registry for its
/// own mutations, each state-plane contract for its configuration. Bound
/// into every registrar digest, so an approval is for exactly one action.
mapping(address caller => uint64) private _gateNonce;
/// @notice The identity a Final Chain sender belongs to. See the contract
/// notes: a sender is derived from the `activeTransaction` key and is not
/// the account.
mapping(address sender => address account) public accountOfSender;
// -------------------------------------------------------------- events
/// @notice An identity was registered, or an existing one rotated onto a new certificate set.
/// @param account The identity written.
/// @param certHash The live certificate's handle.
/// @param roles The capability bitmask now in force.
/// @param version The record's monotonic version.
event IdentityRegistered(
address indexed account, bytes32 indexed certHash, uint256 roles, uint64 version
);
/// @notice An identity's capability bitmask was replaced.
/// @param account The identity whose roles changed.
/// @param previousRoles The mask before the change.
/// @param newRoles The mask now in force.
event IdentityRolesChanged(address indexed account, uint256 previousRoles, uint256 newRoles);
/// @notice An account's hash-based signing key for one chain was recorded or rotated.
/// @param account The identity that holds the key.
/// @param signerId The fingerprint an execution chain's roster names.
/// @param chainId The chain the key is armed for.
/// @param keyId The LMS key identifier.
/// @param height The Merkle tree height.
/// @param root The LMS public key.
/// @param version The lineage counter for this account and chain.
event LmsKeyRegistered(
address indexed account,
bytes32 indexed signerId,
uint64 indexed chainId,
bytes16 keyId,
uint8 height,
bytes32 root,
uint64 version
);
/// @notice An identity was retired. Irreversible, and its roles are cleared in the same transaction.
/// @param account The identity that was revoked.
/// @param certHash The certificate it held at the time.
event IdentityRevoked(address indexed account, bytes32 indexed certHash);
/// @notice One revocation-lane entry.
/// @param certHash The certificate that was revoked.
/// @param revoker Zero for a root-plane revocation, the issuing identity for an issuer's own.
event CertificateRevoked(bytes32 indexed certHash, address indexed revoker);
/// @notice The bootstrap window closed. After this there is no single-caller write path left.
/// @param sealedBy The bootstrap admin that closed it, immediately before being cleared.
event BootstrapSealed(address indexed sealedBy);
/// @notice The one-shot state-plane wiring landed. Emitted at most once in this contract's lifetime.
/// @param stateTrees The state-trees contract that owns the identity tree.
/// @param revocationLog The append-only log of retired signer fingerprints.
event StatePlaneWired(address stateTrees, address revocationLog);
/// @notice The number of sealed registrar approvals a membership mutation needs was set.
/// @param threshold The new threshold.
event RegistrarThresholdSet(uint256 threshold);
/// @notice A registrar quorum authorized an action.
/// @param verifyingContract The contract the approvals were collected for, and whose counter was burned.
/// @param actionDomain The action domain the approvals bound.
/// @param nonce The counter value the approvals were made over; the next action needs the next one.
/// @param valid How many approvals verified.
event RegistrarQuorumApproved(
address indexed verifyingContract, bytes32 indexed actionDomain, uint64 nonce, uint256 valid
);
// -------------------------------------------------------------- errors
/// @notice The caller holds none of the authority the entry point requires.
/// @param caller The address that called.
error NotAuthorized(address caller);
/// @notice The bootstrap window is already closed. Closing it is irreversible.
error BootstrapAlreadySealed();
/// @notice No record claims this account, or a zero address was offered as one.
/// @param account The address that was named.
error UnknownAccount(address account);
/// @notice A certificate's encapsulation key failed the chain's own well-formedness check.
/// @dev Names the algorithm, because the pair is stored together and "one of these two" is not an
/// actionable answer.
/// @param account The account being registered.
/// @param algorithmId The algorithm whose key was malformed.
error MalformedEncapsulationKey(address account, uint16 algorithmId);
/// @notice The certificate is already bound to a different account. One certificate identifies exactly
/// one party.
/// @param certHash The certificate's handle.
/// @param boundTo The account that already holds it.
error CertificateAlreadyBound(bytes32 certHash, address boundTo);
/// @notice The certificate has been revoked, or the account's own certificate has. Revocation is never
/// undone, so this is terminal for that handle.
/// @param certHash The revoked certificate's handle.
error CertificateIsRevoked(bytes32 certHash);
/// @notice A registration or rotation did not advance the record's version. Monotonicity is what stops a
/// replayed transaction reinstating credentials their holder has moved off.
/// @param current The version on record.
/// @param offered The version the caller presented.
error VersionNotNewer(uint64 current, uint64 offered);
/// @notice The named account does not carry `ROLE_CERTIFICATE_AUTHORITY`, or does not currently stand.
/// @param issuer The account that was named.
error IssuerNotACertificateAuthority(address issuer);
/// @notice The named parent has reached its own delegation bound and may issue nothing further.
/// @param issuer The parent account.
/// @param depth The parent's depth.
/// @param maxDelegationDepth The deepest level the parent may issue to.
error IssuerMayNotSign(address issuer, uint8 depth, uint8 maxDelegationDepth);
/// @notice A certificate sits at a depth its lineage does not put it at. Levels cannot be skipped,
/// because skipping one is how an issuer escapes its own delegation bound.
/// @param got The depth the certificate declares.
/// @param want The depth its lineage requires.
error WrongDepth(uint8 got, uint8 want);
/// @notice A child certificate claims a deeper delegation bound than the parent that admits it.
/// @param child The child's `maxDelegationDepth`.
/// @param issuer The parent's `maxDelegationDepth`.
error DelegationWidened(uint8 child, uint8 issuer);
/// @notice The certificate names an authority key that is not its declared parent's subject key.
/// @param got The authority key identifier the certificate carries.
/// @param want The parent's subject key identifier.
error AuthorityKeyIdMismatch(bytes32 got, bytes32 want);
/// @notice The live and recovery certificates carry different serials, so they describe two different
/// certificate sets rather than two stages of one.
/// @param liveSerial The live certificate's serial.
/// @param recoverySerial The recovery certificate's serial.
error StagesDisagree(bytes32 liveSerial, bytes32 recoverySerial);
/// @notice An LMS tree height outside 1 through 24, the range the verifier admits.
/// @param height The height offered.
error LmsHeightOutOfRange(uint8 height);
/// @notice A zero LMS root commits to no tree and is refused.
error LmsRootIsZero();
/// @notice This signer fingerprint already belongs to a different account.
/// @param signerId The fingerprint offered.
/// @param boundTo The account that already holds it.
error LmsKeyAlreadyBound(bytes32 signerId, address boundTo);
/// @notice Two identities cannot share a transaction key: the sender it derives would be attributable to
/// both.
/// @param sender The derived sender address.
/// @param boundTo The account that already claims it.
error SenderAlreadyBound(address sender, address boundTo);
/// @notice Fewer registrars able to seal than the threshold asks for.
/// @param sealable How many standing registrars hold a seal key.
/// @param threshold How many approvals a membership mutation needs.
error RegistrarThresholdUnreachable(uint256 sealable, uint256 threshold);
/// @notice A zero registrar threshold was offered, or a quorum was demanded before one was set. A zero
/// threshold is a registry with no authority behind its membership.
error RegistrarThresholdIsZero();
/// @notice {wireStatePlane} has already run. Both pointers are trust topology and are written once.
error StatePlaneAlreadyWired();
/// @notice {wireStatePlane} was handed a zero address for the trees or for the revocation log.
error ZeroStatePlane();
/// @notice The holder's proof of possession did not verify: one family failed, or the digest was built
/// over the wrong nonce.
/// @param account The account the admission was for.
error AdmissionProofInvalid(address account);
/// @notice The certificate does not name the chain's authority key, so it is not chain-attested.
/// @param authorityKeyId The authority key identifier that was presented.
error NotChainAttested(bytes32 authorityKeyId);
/// @notice The certificate's issuer name is not the chain's own.
/// @param issuerDnHash The digest of the name that was presented.
error WrongIssuerDn(bytes32 issuerDnHash);
/// @notice A chain-attested end entity sits at depth 1 with `maxDelegationDepth == depth`; anything else
/// is not an end entity.
/// @param depth The certificate's position on the delegation axis.
/// @param maxDelegationDepth The deepest level it may issue to.
error NotAnEndEntity(uint8 depth, uint8 maxDelegationDepth);
/// @notice An issuer that cannot sign is an end entity wearing an issuer profile, and belongs in
/// {registerWallet}.
/// @param depth The certificate's position on the delegation axis.
/// @param maxDelegationDepth The deepest level it may issue to.
error IssuerCannotSign(uint8 depth, uint8 maxDelegationDepth);
/// @notice A registered issuer's certificate never expires.
/// @dev Expiry is the passive half of an issuer's lifecycle, so a zero `NotAfter` is refused here even
/// though the certificate schema allows one for an end entity.
error IssuerMustExpire();
/// @notice An issuer validity window past {MAX_ISSUER_VALIDITY_MS}.
/// @param notBefore The certificate's start, in this chain's milliseconds.
/// @param notAfter The certificate's end, in this chain's milliseconds.
error IssuerValidityTooLong(uint64 notBefore, uint64 notAfter);
/// @notice An institution registration whose subject name carries no ISO 3166 country component, or
/// whose institution extension is too short to hold one.
/// @dev Only the trust root is jurisdiction-silent; a registered institution names where it answers for
/// itself.
error JurisdictionMissing();
/// @notice The subject name's country and the institution extension's `jurisdiction` field disagree, or
/// the extension's jurisdiction is not a two-byte country code.
error JurisdictionMismatch();
// --------------------------------------------------------- constructor
/**
* @notice Deploy the registry with a bootstrap registrar in place.
* @dev The precompile probe is the point of the constructor. This contract is meaningless on a chain
* that cannot verify post-quantum signatures, and deploying it there would produce a registry full
* of keys nothing on that chain can check — so it refuses to exist where the precompiles are
* absent rather than existing and being trusted.
*
* The admin is the whole authority until {sealBootstrap} runs, because every roster has to be
* installed by someone before it can install itself.
* @param admin The bootstrap registrar. Genesis names the chain deployer.
*/
constructor(address admin) {
FinalChainPrecompiles.assertAvailable();
bootstrapAdmin = admin;
}
// ----------------------------------------------------------- authority
/**
* @notice The authority gate on every membership mutation this registry performs.
* @dev Bootstrap is a real window, not a formality: every roster in this system has to be installed by
* someone before it can install itself, and a design that pretends otherwise ends up with a roster
* that cannot be brought into existence at all. It is closed by {sealBootstrap}, irreversibly.
*
* While the window is open the admin writes alone. Once it is closed there is no single-caller path
* left — not for a registrar, not for anyone — and every mutation goes through the sealed registrar
* quorum, whose approvals carry both signature families.
* @param actionDomain One of the `DOMAIN_*` constants naming the mutation.
* @param payloadDigest The mutation's own arguments, folded.
* @param anchorBlock The block the registrars read the roster at. Ignored while bootstrap is open.
* @param approvals The sealed registrar quorum. Empty while bootstrap is open.
*/
function _requireMembershipAuthority(
bytes32 actionDomain,
bytes32 payloadDigest,
uint64 anchorBlock,
FinalPqQuorum.Approval[] calldata approvals
) private {
if (!bootstrapSealed && msg.sender == bootstrapAdmin) return;
_requireRegistrarQuorum(address(this), actionDomain, payloadDigest, anchorBlock, approvals);
}
/**
* @notice The sealed registrar quorum, for the other contracts in the state plane.
* @dev `msg.sender` — the calling contract — is the verifying contract the digest binds and the counter
* it burns, so an approval collected for one contract's configuration cannot be spent on another's.
* The caller decides its own bootstrap exemption before calling; this function knows no caller's
* admin and applies none.
*
* Anyone may SUBMIT such a transaction. Authority is the approvals, not the sender, which is the
* whole point of a quorum.
* @param actionDomain The caller's own action domain for the change being authorised.
* @param payloadDigest The change's arguments, folded by the caller.
* @param anchorBlock The block the registrars read the roster at.
* @param approvals The registrar approvals, each carrying both families.
*/
function requireRegistrarQuorum(
bytes32 actionDomain,
bytes32 payloadDigest,
uint64 anchorBlock,
FinalPqQuorum.Approval[] calldata approvals
) external {
_requireRegistrarQuorum(msg.sender, actionDomain, payloadDigest, anchorBlock, approvals);
}
/// @notice Burn one gate nonce and require a sealed registrar quorum over the action.
/// @dev The digest is `FinalPqQuorum.digest(verifyingContract, actionDomain, anchorBlock,
/// keccak256(abi.encode(nonce, payloadDigest)))`. The counter is burned BEFORE verification, so an
/// approval set is spent whether or not it turns out to be sufficient.
///
/// The seal is required rather than optional: membership is the hybrid class, and an approval
/// carrying only the lattice vote is not an approval here.
/// @param verifyingContract The contract the approvals are for, and whose counter is burned.
/// @param actionDomain One of the `DOMAIN_*` constants, so an approval to grant cannot be replayed to
/// revoke.
/// @param payloadDigest The action's own arguments, folded.
/// @param anchorBlock The block the registrars read the roster at.
/// @param approvals The registrar approvals, each carrying both families.
function _requireRegistrarQuorum(
address verifyingContract,
bytes32 actionDomain,
bytes32 payloadDigest,
uint64 anchorBlock,
FinalPqQuorum.Approval[] calldata approvals
) private {
if (registrarThreshold == 0) revert RegistrarThresholdIsZero();
uint64 nonce = _gateNonce[verifyingContract];
_gateNonce[verifyingContract] = nonce + 1;
bytes32 quorumDigest = FinalPqQuorum.digest(
verifyingContract, actionDomain, anchorBlock, keccak256(abi.encode(nonce, payloadDigest))
);
uint256 valid = FinalPqQuorum.require_(
this,
approvals,
quorumDigest,
ROLE_REGISTRAR,
registrarThreshold,
FinalPqQuorum.ALG_ML_DSA_87,
anchorBlock,
true
);
emit RegistrarQuorumApproved(verifyingContract, actionDomain, nonce, valid);
}
/**
* @notice Set how many sealed registrar approvals a membership mutation needs.
* @dev The bootstrap admin while the window is open; the current registrar quorum afterwards, so a
* registrar set that grows or shrinks can move the threshold to match itself.
*
* Refuses a threshold the sealable registrars cannot meet, and refuses zero. Both are a registry
* that can never be written to again, and the way that presents is every membership mutation
* reverting forever with nothing naming the threshold as the cause.
* @param threshold How many sealed approvals a mutation needs. Must be reachable and non-zero.
* @param anchorBlock The block the registrars read the roster at. Ignored while bootstrap is open.
* @param approvals The sealed registrar quorum. Empty while bootstrap is open.
*/
function setRegistrarThreshold(
uint256 threshold,
uint64 anchorBlock,
FinalPqQuorum.Approval[] calldata approvals
) external {
_requireMembershipAuthority(
DOMAIN_SET_REGISTRAR_THRESHOLD, keccak256(abi.encode(threshold)), anchorBlock, approvals
);
if (threshold == 0) revert RegistrarThresholdIsZero();
uint256 sealable = sealableMemberCount(ROLE_REGISTRAR);
if (sealable < threshold) revert RegistrarThresholdUnreachable(sealable, threshold);
registrarThreshold = threshold;
emit RegistrarThresholdSet(threshold);
}
/// @notice The replay counter the next registrar approval for `caller` must be made over.
/// @dev One counter per verifying contract, so an approval collected for one contract's configuration
/// cannot be spent on another's. A caller reads this to build the digest its registrars will sign.
/// @param caller The verifying contract the approvals will name — this registry for its own mutations.
/// @return The value the next approval must bind.
function gateNonceOf(address caller) external view returns (uint64) {
return _gateNonce[caller];
}
// -------------------------------------------------------- LMS signers
/**
* @notice The roster identity of an LMS public key.
* @dev Byte-identical to `FinalRootAuthority.signerId` on the execution chains. Restated rather than
* imported because the two live on different chains and no import would make them one value —
* which is precisely why a test pins them together. A drift here would make every lookup miss while
* looking perfectly well-formed.
*
* The height is bound into the fingerprint as well as the root, because a leaf commits to a node
* number derived from it, so a signer free to vary the height could vary the numbering.
* @param keyId The LMS key identifier.
* @param height The Merkle tree height.
* @param root The LMS public key.
* @return The fingerprint an execution chain's roster names.
*/
function lmsSignerId(bytes16 keyId, uint8 height, bytes32 root) public pure returns (bytes32) {
return keccak256(abi.encode(keyId, height, root));
}
/**
* @notice Record the hash-based (LMS) signing key an already-registered account holds for one chain.
* @dev Membership-gated, like every other write here.
*
* Deliberately NOT a certificate: an LMS key is a capability of an existing identity, not an
* identity of its own. Binding it to an account means it inherits that account's revocation, so
* retiring a compromised operator is one action rather than one action per key they hold.
*
* A rotation records the SUPERSEDED fingerprint into the revocation log in the same transaction, so
* the execution chains' suspension lane never depends on someone noticing. The superseded
* fingerprint is left BOUND to this account rather than cleared, because attribution is history.
*
* A zero `chainId` is a tooling mistake rather than an attack — the slot it occupies is
* self-consistent and no authority consults it — so the publisher refuses it off chain and this
* contract spends no bytecode on the check.
* @param account Must already be registered and not revoked.
* @param chainId The execution chain this key is armed for.
* @param keyId The LMS key identifier, hashed into every step of a signature under it.
* @param height The Merkle tree height, 1 through 24.
* @param root The LMS public key. Zero commits to no tree and is refused.
* @param version Strictly increasing per account and chain. A rotation that does not advance it is
* refused, so a replayed registration cannot reinstate a key the operator has moved off.
* @param anchorBlock The block the registrars read the roster at. Ignored while bootstrap is open.
* @param approvals The sealed registrar quorum. Empty while bootstrap is open.
*/
function registerLmsKey(
address account,
uint64 chainId,
bytes16 keyId,
uint8 height,
bytes32 root,
uint64 version,
uint64 anchorBlock,
FinalPqQuorum.Approval[] calldata approvals
) external {
_requireMembershipAuthority(
DOMAIN_REGISTER_LMS_KEY,
keccak256(abi.encode(account, chainId, keyId, height, root, version)),
anchorBlock,
approvals
);
Identity storage id = _identity[account];
if (!id.registered) revert UnknownAccount(account);
if (id.revoked) revert CertificateIsRevoked(id.certHash);
// A zero chain id is a tooling mistake, not an attack: the slot it
// would occupy is self-consistent and no authority consults it. The
// publisher refuses it; EIP-170 pressure keeps the check off-chain.
if (height == 0 || height > 24) revert LmsHeightOutOfRange(height);
if (root == bytes32(0)) revert LmsRootIsZero();
// Version lineage is PER account and chain: the same operator is a different signer on every chain,
// so one chain starting at version 1 says nothing about another already being at version 3.
LmsKey storage existing = _lmsKey[account][chainId];
// An empty slot holds version 0, so this alone also refuses a version-0
// registration — versions start at 1.
if (version <= existing.version) {
revert VersionNotNewer(existing.version, version);
}
bytes32 signerId = lmsSignerId(keyId, height, root);
address boundTo = _lmsBinding[signerId].account;
if (boundTo != address(0) && boundTo != account) {
revert LmsKeyAlreadyBound(signerId, boundTo);
}
// The fingerprint being superseded, captured before the slot moves —
// `existing` is a storage pointer and reads the NEW key afterwards.
bytes32 superseded = existing.registered
? lmsSignerId(existing.keyId, existing.height, existing.root)
: bytes32(0);
// The superseded fingerprint is left bound to this account rather than
// cleared. It is history: a signature made under the old key was made
// by this operator, and a lookup that stopped resolving would make that
// unprovable after the fact.
_lmsKey[account][chainId] = LmsKey(keyId, height, root, version, true);
_lmsBinding[signerId] = LmsBinding(account, chainId);
emit LmsKeyRegistered(account, signerId, chainId, keyId, height, root, version);
// Supersession is a PERMANENT transition — the old fingerprint stops
// being this slot's current key and nothing re-registers it (a
// re-registration of the same material is the same fingerprint, which
// the guard below leaves alone). Recorded same-tx so the execution
// chains' suspension lane never depends on someone noticing.
if (superseded != bytes32(0) && superseded != signerId) {
_recordRevokedSigner(superseded);
}
_projectIdentity(account);
}
/// @notice The LMS key an account holds for one chain, if any.
/// @dev Keyed per account AND per chain, because a single-use hash-based counter is only complete while
/// the key it names signs for one chain. `registered` is the field to branch on; the zero struct
/// means no key rather than a key of zeroes.
/// @param account The identity to read.
/// @param chainId The chain the key is armed for.
/// @return The stored key, copied to memory.
function lmsKeyOf(address account, uint64 chainId) external view returns (LmsKey memory) {
return _lmsKey[account][chainId];
}
/// @notice What a fingerprint is bound to: the account that registered it and the chain it signs for.
/// @dev The binding survives supersession, because attribution is history: a signature made under a
/// retired key was still made by that operator, and a lookup that stopped resolving would make that
/// unprovable after the fact. Standing is a separate question, answered by {lmsSignerIsLive}.
///
/// The revocation log's permanence gate reads this to find the slot a fingerprint belongs to; that
/// slot's current key is what separates a superseded fingerprint, which is permanent and
/// recordable, from a merely lapsed one, which renewal undoes.
/// @param signerId The fingerprint to resolve.
/// @return account The account that registered it, or zero for a fingerprint never registered.
/// @return chainId The chain that registration was for, or zero alongside a zero account.
function lmsBindingOf(bytes32 signerId) external view returns (address account, uint64 chainId) {
LmsBinding storage binding = _lmsBinding[signerId];
return (binding.account, binding.chainId);
}
/**
* @notice Whether a signer fingerprint is held by a standing, unrevoked account.
* @dev The question a verifier actually has. An execution chain's authority roster names fingerprints
* and learns nothing else about them, so without this the keys behind those names are
* unanswerable from the state plane.
*
* Standing is asked through {isActive} rather than by spelling the conditions out again, because a
* second spelling is how two answers drift: an expired identity already holds no role, and a signer
* lookup that disagreed would leave a roster satisfiable by an operator the rest of the registry
* has stopped honouring.
*
* Live means the CURRENT key of the fingerprint's own account-and-chain slot, not merely one this
* account ever held. A superseded fingerprint stays attributable but stops being live, and a
* rotation on one chain says nothing about the same operator's key on another.
* @param signerId The fingerprint an authority roster names.
* @return live Whether the fingerprint is that slot's current key and the account still stands.
* @return account The account the fingerprint is bound to, or zero when none ever registered it.
*/
function lmsSignerIsLive(bytes32 signerId) external view returns (bool live, address account) {
LmsBinding storage binding = _lmsBinding[signerId];
account = binding.account;
if (account == address(0)) return (false, address(0));
// `isActive`, not a registered/revoked pair spelled out here. The
// certificate validity window is part of standing: an expired identity
// already holds no role, and a signer lookup that disagreed would leave
// a roster satisfiable by an operator the rest of the registry has
// stopped honouring. Spelling the condition out a second time is how
// the two drift apart.
if (!isActive(account)) return (false, account);
// The CURRENT key of the fingerprint's own (account, chain) slot, not
// merely one this account ever held: a superseded fingerprint stays
// attributable but stops being live, and a rotation on one chain says
// nothing about the same operator's key on another.
LmsKey storage k = _lmsKey[account][binding.chainId];
live = k.registered && lmsSignerId(k.keyId, k.height, k.root) == signerId;
}
/// @notice Close the bootstrap window. Irreversible.
/// @dev Refuses while the registrar quorum is unset or unreachable, because sealing then would leave a
/// registry nobody can ever write to again — including to fix the threshold that locked it. The
/// count is of registrars that can SEAL: a certificate authority carrying the registrar role is
/// registered from a certificate with no seal slot and can never contribute an approval, so
/// counting role bits alone would seal onto a quorum that looks reachable and is not.
///
/// Clears the admin as well as setting the flag, so no single-caller path survives the seal.
function sealBootstrap() external {
if (msg.sender != bootstrapAdmin) revert NotAuthorized(msg.sender);
if (bootstrapSealed) revert BootstrapAlreadySealed();
if (registrarThreshold == 0) revert RegistrarThresholdIsZero();
uint256 sealable = sealableMemberCount(ROLE_REGISTRAR);
if (sealable < registrarThreshold) {
revert RegistrarThresholdUnreachable(sealable, registrarThreshold);
}
bootstrapSealed = true;
bootstrapAdmin = address(0);
emit BootstrapSealed(msg.sender);
}
// ------------------------------------------------- state-plane wiring
/**
* @notice Wire the state trees and the revocation log, once, inside the bootstrap window.
* @dev One-shot because both pointers are TRUST TOPOLOGY: the trees pointer decides where the
* wallet-creation admission set is written, and the log pointer decides where permanent standing
* losses are recorded. A re-wireable pointer would be a key over both.
*
* It cannot be a constructor argument, because both of those contracts take THIS registry as one of
* theirs. The deploy tooling calls it in the same nonce-fixed block that deploys them, before any
* identity is registered, which is why the projection is silently skipped while the pointers are
* zero rather than reverting.
* @param stateTrees_ The state-trees contract that owns tree 8. Zero is refused.
* @param revocationLog_ The append-only log of retired signer fingerprints. Zero is refused.
*/
function wireStatePlane(address stateTrees_, address revocationLog_) external {
if (bootstrapSealed || msg.sender != bootstrapAdmin) revert NotAuthorized(msg.sender);
if (stateTrees != address(0) || revocationLog != address(0)) revert StatePlaneAlreadyWired();
if (stateTrees_ == address(0) || revocationLog_ == address(0)) revert ZeroStatePlane();
stateTrees = stateTrees_;
revocationLog = revocationLog_;
emit StatePlaneWired(stateTrees_, revocationLog_);
}
/// @notice Refresh `account`'s tree-8 leaf in the state trees, same transaction.
/// @dev Skipped while the plane is unwired, which is a bootstrap-window state the deploy tooling closes
/// before the first registration, and never otherwise. The leaf VALUE is derived by the trees
/// contract from this registry's post-mutation state, so there is nothing here to get wrong beyond
/// forgetting to call it — which is why every mutation calls it, including the one that cannot
/// change the leaf.
/// @param account The identity whose leaf is stale.
function _projectIdentity(address account) private {
address trees = stateTrees;
if (trees == address(0)) return;
address[] memory one = new address[](1);
one[0] = account;
IIdentityLeafSink(trees).syncIdentityLeaves(one);
}
/// @notice Record a permanently retired signer fingerprint into the revocation log, same transaction.
/// @dev Skipped while the log is unwired, and skipped when somebody already recorded the fingerprint
/// through the log's permissionless door — the log refuses a duplicate, and a membership mutation
/// must not be revertible by a stranger who front-ran its bookkeeping.
/// @param signerId The fingerprint that has lost standing for good.
function _recordRevokedSigner(bytes32 signerId) private {
address log = revocationLog;
if (log == address(0)) return;
if (IRevocationRecorder(log).recorded(signerId)) return;
IRevocationRecorder(log).record(signerId);
}
// -------------------------------------------------------- registration
/**
* @title Admission Proof
* @notice The holder's proof of possession at admission: both live-stage families over the admission
* digest.
* @dev There is no root keypair and no issuer signature on this path. The chain admits, and the two
* signatures presented at creation are the HOLDER's, verified by the precompiles inside the same
* transaction that writes the record. Possession lives in the TRANSACTION, never in the artifact:
* a public certificate is a document anyone may hold, so presenting one proves nothing.
*/
struct AdmissionProof {
/// The holder's ML-DSA-87 signature under the live TRANSACTION key, over the admission digest.
bytes mlDsaSignature;
/// The holder's SLH-DSA-SHAKE-256s signature under the live ACCESS key, over the same digest. Two
/// families over one message, so neither a lattice break nor a hash-function break alone admits an
/// identity.
bytes slhDsaSignature;
}
/**
* @notice Register or rotate a Final Wallet identity from its two public certificates.
* @dev **Both stages, together.** A wallet has four keys in two stages and the recovery pair is
* PRE-COMMITTED — written at wallet initialization from the same certificate set that determined
* the wallet's address, which is why enabling post-quantum mode later takes no key arguments. The
* two certificates must share a serial: a serial is per certificate SET, so two stages that
* disagree about it are two different wallets.
*
* **Chain-attested means pinned, per stage:** the chain's issuer name and authority key, depth
* exactly 1 so the certificate hangs directly under the chain, and `maxDelegationDepth == depth` so
* the holder issues nothing. That immutable pair is what {identityTreeLeafOf} discriminates record
* kinds by.
*
* Issuance authority is the registrar quorum and possession is the holder's own proof; there is no
* root keypair anywhere and no certificate-authority signature over this admission.
* @param account The wallet address the certificate set derives.
* @param liveTbs The live certificate's TBS bytes: the live transaction and access keys.
* @param recoveryTbs The recovery certificate's TBS bytes: the pre-committed recovery pair.
* @param proof The holder's two signatures over the admission digest — the live transaction key
* (ML-DSA-87) and the live access key (SLH-DSA-SHAKE-256s), both verified in the precompiles
* inside this transaction.
* @param roles Capability bitmask. The one thing the certificates do not say, because capability is this
* system's decision rather than the certificate's.
* @param version Monotonic. A rotation that does not advance it is refused.
* @param anchorBlock The block the registrars read the roster at. Ignored while bootstrap is open.
* @param approvals The sealed registrar quorum. Empty while bootstrap is open. The digest binds the
* account, both certificates' bytes, the roles and the version.
* @return certHash The handle the live certificate is now known by.
*/
function registerWallet(
address account,
bytes calldata liveTbs,
bytes calldata recoveryTbs,
AdmissionProof calldata proof,
uint256 roles,
uint64 version,
uint64 anchorBlock,
FinalPqQuorum.Approval[] calldata approvals
) external returns (bytes32 certHash) {
// Read BEFORE the authority check: the quorum path burns this counter
// inside `_requireRegistrarQuorum`, and the proof must bind the value
// the round was built over. The bootstrap path burns it explicitly in
// `_requireAdmissionProof`, so an admission is one-shot in both regimes.
uint64 admissionNonce = _gateNonce[address(this)];
_requireMembershipAuthority(
DOMAIN_REGISTER_WALLET,
keccak256(
abi.encode(account, keccak256(liveTbs), keccak256(recoveryTbs), roles, version)
),
anchorBlock,
approvals
);
FinalCertificate.Parsed memory l = FinalCertificate.parseLive(liveTbs);
FinalCertificate.Parsed memory r = FinalCertificate.parseRecovery(recoveryTbs);
if (l.serial != r.serial) revert StagesDisagree(l.serial, r.serial);
_requireChainAttestedEndEntity(l);
_requireChainAttestedEndEntity(r);
_requireAdmissionProof(account, l, r.certHash, proof, admissionNonce);
certHash = l.certHash;
_write(account, l, r, roles, version, false);
}
/**
* @notice Register or rotate an ISSUER: a third party, or one of this system's own intermediates, that
* signs certificates off chain with the keys registered here.
* @dev Admission is chain-native like any identity — the registrar quorum authorises, and the holder's
* own proof of possession establishes that the party controls the keys it is claiming. The
* delegation rules survive as LINEAGE: a nested issuer's depth, delegation bound and
* `AuthorityKeyId` must chain to its registered parent. No parent signs anything; this chain's
* admission IS the issuance.
*
* A registered issuer always expires, and its window is bounded by {MAX_ISSUER_VALIDITY_MS}.
*
* An institution must carry its real ISO 3166 country in its subject name, matching the
* `jurisdiction` field of its institution extension. That is enforced at the door because a
* verifier's legal recourse starts with knowing where an issuer answers for itself.
*
* `ROLE_CERTIFICATE_AUTHORITY` is added to whatever `roles` asks for, rather than being required in
* it: the capability is what this entry point means, so it cannot be forgotten in an argument.
* @param account The issuer's account on this chain.
* @param tbs The issuer certificate's TBS bytes: two cert-signing keys, ML-DSA-87 and
* SLH-DSA-SHAKE-256s, and no recovery stage — renewing an issuer is re-issuing, a governance act
* rather than a key rotation.
* @param parent The registered parent issuer for a nested intermediate; zero for an issuer hanging
* directly under the chain.
* @param proof The issuer's own two cert-signing keys over the admission digest. The recovery-handle
* slot in that digest is zero, because there is no recovery stage to bind.
* @param roles Capability bitmask, over and above the certificate-authority bit this call adds.
* @param version Monotonic. A rotation that does not advance it is refused.
* @param anchorBlock The block the registrars read the roster at. Ignored while bootstrap is open.
* @param approvals The sealed registrar quorum. Empty while bootstrap is open. The digest binds the
* account, the certificate bytes, the parent, the roles and the version.
* @return certHash The handle the registered certificate is now known by.
*/
function registerIssuer(
address account,
bytes calldata tbs,
address parent,
AdmissionProof calldata proof,
uint256 roles,
uint64 version,
uint64 anchorBlock,
FinalPqQuorum.Approval[] calldata approvals
) external returns (bytes32 certHash) {
uint64 admissionNonce = _gateNonce[address(this)];
_requireMembershipAuthority(
DOMAIN_REGISTER_ISSUER,
keccak256(abi.encode(account, keccak256(tbs), parent, roles, version)),
anchorBlock,
approvals
);
FinalCertificate.Parsed memory c = FinalCertificate.parseCa(tbs);
// An issuer that cannot sign is an end entity wearing a profile —
// and an end entity belongs in `registerWallet`.
if (c.depth == 0 || c.maxDelegationDepth <= c.depth) {
revert IssuerCannotSign(c.depth, c.maxDelegationDepth);
}
if (c.notAfter == 0) revert IssuerMustExpire();
if (c.notAfter - c.notBefore > MAX_ISSUER_VALIDITY_MS) {
revert IssuerValidityTooLong(c.notBefore, c.notAfter);
}
if (c.issuerDnHash != CHAIN_ISSUER_DN_HASH) revert WrongIssuerDn(c.issuerDnHash);
_requireLineage(parent, c);
_requireJurisdiction(c);
_requireAdmissionProof(account, c, bytes32(0), proof, admissionNonce);
certHash = c.certHash;
_write(account, c, c, roles | ROLE_CERTIFICATE_AUTHORITY, version, true);
}
/// @notice The validity ceiling a registered issuer's certificate may not exceed, in this chain's
/// milliseconds: two 366-day years.
/// @dev Expiry is the passive half of an issuer's lifecycle — the touchpoint that proves an issuer is
/// still there without anyone having to act — so a registered issuer always carries a real
/// `NotAfter` and a bounded window. Renewal re-issues under the same registered keys with a version
/// bump rather than extending a certificate in place.
uint64 public constant MAX_ISSUER_VALIDITY_MS = 2 * 366 days * 1000;
/// @notice Pin one stage of a chain-attested end-entity certificate.
/// @dev Three checks, run once per stage: the certificate names the chain's authority key, it carries the
/// chain's issuer name, and its depth pair is exactly that of an end entity — depth 1, directly
/// under the chain, issuing nothing. The depth pair is immutable per version, which is why
/// {identityTreeLeafOf} discriminates record kinds by it rather than by a role bit.
/// @param c The parsed certificate stage.
function _requireChainAttestedEndEntity(FinalCertificate.Parsed memory c) private pure {
if (c.authorityKeyId != CHAIN_AUTHORITY_KEY_ID) revert NotChainAttested(c.authorityKeyId);
if (c.issuerDnHash != CHAIN_ISSUER_DN_HASH) revert WrongIssuerDn(c.issuerDnHash);
if (c.depth != 1 || c.maxDelegationDepth != c.depth) {
revert NotAnEndEntity(c.depth, c.maxDelegationDepth);
}
}
/// @notice Check a nested issuer's lineage to its registered parent.
/// @dev Delegation is governed by DEPTH, not by a boolean: a parent may sign only while
/// `depth < maxDelegationDepth`, a child sits exactly one level down so it cannot skip levels to
/// escape that bound, and its own bound may never widen past its parent's. The child's
/// `AuthorityKeyId` must equal the parent's `SubjectKeyId`, which is the link the chain follows.
///
/// A zero `parent` means the issuer hangs directly under the chain: it must then name the chain's
/// own authority key and sit at depth 1. No parent SIGNS anything here — admission by this chain is
/// the issuance, and lineage is what keeps the delegation bounds honest across it.
/// @param parent The registered parent issuer, or zero for one directly under the chain.
/// @param c The parsed issuer certificate.
function _requireLineage(address parent, FinalCertificate.Parsed memory c) private view {
if (parent == address(0)) {
if (c.authorityKeyId != CHAIN_AUTHORITY_KEY_ID) {
revert NotChainAttested(c.authorityKeyId);
}
if (c.depth != 1) revert WrongDepth(c.depth, 1);
return;
}
Identity storage ca = _identity[parent];
if (!hasRole(parent, ROLE_CERTIFICATE_AUTHORITY)) {
revert IssuerNotACertificateAuthority(parent);
}
// Delegation is governed by depth, not by a boolean. `Depth <
// MaxDelegationDepth` permits signing, and a child sits exactly one
// level down — an issuer cannot skip levels to escape its own bound.
if (ca.depth >= ca.maxDelegationDepth) {
revert IssuerMayNotSign(parent, ca.depth, ca.maxDelegationDepth);
}
if (c.depth != ca.depth + 1) revert WrongDepth(c.depth, ca.depth + 1);
if (c.maxDelegationDepth > ca.maxDelegationDepth) {
revert DelegationWidened(c.maxDelegationDepth, ca.maxDelegationDepth);
}
if (c.authorityKeyId != ca.subjectKeyId) {
revert AuthorityKeyIdMismatch(c.authorityKeyId, ca.subjectKeyId);
}
}
/// @notice Refuse an issuer whose subject name carries no jurisdiction, or one that disagrees with its
/// institution extension.
/// @dev An issuer that answers for itself somewhere is an issuer a verifier has recourse against, so a
/// registered institution must name its jurisdiction and must name it once. Only the trust root is
/// jurisdiction-silent, because the root is the worldwide network rather than a legal entity.
///
/// The rule is a real ISO 3166 alpha-2 `C=` component in the subject name, equal to the
/// `jurisdiction` field of the certificate's institution extension. The name is in canonical
/// comma-separated form, so `C=` matches at the start or immediately after a comma, and the
/// component value is exactly two bytes — a longer one is a different component that happens to
/// start with the same letter.
/// @param c The parsed issuer certificate.
function _requireJurisdiction(FinalCertificate.Parsed memory c) private pure {
bytes memory dn = c.subjectDn;
bytes2 country;
bool found = false;
for (uint256 i = 0; i + 4 <= dn.length; i++) {
if ((i == 0 || dn[i - 1] == ",") && dn[i] == "C" && dn[i + 1] == "=") {
// Exactly two bytes, then end-of-DN or the next component.
if (i + 4 < dn.length && dn[i + 4] != ",") revert JurisdictionMissing();
country = bytes2(bytes.concat(dn[i + 2], dn[i + 3]));
found = true;
break;
}
}
if (!found) revert JurisdictionMissing();
// Institution extension: legalNameLength ‖ legalName ‖
// registrationNoLength ‖ registrationNo ‖ jurisdictionLength ‖
// jurisdiction. The jurisdiction must EQUAL the DN's country.
bytes memory ext = c.institutionExt;
if (ext.length < 6) revert JurisdictionMissing();
uint256 q = 2 + (uint256(uint8(ext[0])) << 8 | uint256(uint8(ext[1])));
if (ext.length < q + 2) revert JurisdictionMissing();
q += 2 + (uint256(uint8(ext[q])) << 8 | uint256(uint8(ext[q + 1])));
if (ext.length < q + 2) revert JurisdictionMissing();
uint256 jLen = uint256(uint8(ext[q])) << 8 | uint256(uint8(ext[q + 1]));
q += 2;
if (jLen != 2 || ext.length < q + 2) revert JurisdictionMismatch();
if (bytes2(bytes.concat(ext[q], ext[q + 1])) != country) revert JurisdictionMismatch();
}
/// @notice Verify the holder's proof of possession over the admission digest.
/// @dev Both live-stage families, in the precompiles, inside this transaction: an ML-DSA-87 signature
/// under the certificate's transaction key and an SLH-DSA-SHAKE-256s signature under its access
/// key. Possession lives in the TRANSACTION rather than in the artifact, so holding a copy of
/// somebody's public certificate proves nothing.
///
/// The keys come out of the certificate being admitted, not out of calldata, which is what makes
/// this a proof rather than a self-signed assertion.
///
/// Burns the gate nonce on the bootstrap path — the quorum path burned it already — so an admission
/// is one-shot in both regimes and a captured proof cannot be replayed into a second registration.
/// @param account The account being admitted; named in the revert so a failure is attributable.
/// @param live The parsed live-stage certificate whose keys verify the proof.
/// @param recoveryCertHash The recovery certificate's handle, bound into the digest; zero for an issuer.
/// @param proof The holder's two signatures.
/// @param admissionNonce The gate-nonce value the digest was built over.
function _requireAdmissionProof(
address account,
FinalCertificate.Parsed memory live,
bytes32 recoveryCertHash,
AdmissionProof calldata proof,
uint64 admissionNonce
) private {
bytes memory message = abi.encodePacked(
keccak256(
abi.encode(
DOMAIN_IDENTITY_ADMISSION,
block.chainid,
address(this),
live.certHash,
recoveryCertHash,
admissionNonce
)
)
);
if (
!FinalChainPrecompiles.verifyMlDsa87(live.transactionKey, message, proof.mlDsaSignature)
|| !FinalChainPrecompiles.verifySlhDsa(live.accessKey, message, proof.slhDsaSignature)
) revert AdmissionProofInvalid(account);
if (_gateNonce[address(this)] == admissionNonce) {
_gateNonce[address(this)] = admissionNonce + 1;
}
}
/**
* @notice Commit one parsed certificate set to storage and project the result.
* @dev The single write path behind both registration entry points, so a wallet record and an issuer
* record cannot diverge in how they are stored. Every authorization, parse and pin has already run;
* what is left is the ordering that keeps the record consistent with its indexes.
*
* A rotation RELEASES the previous certificate's binding rather than revoking it: a superseded
* certificate and a compromised one are different facts, and revocation is the louder of the two.
* The sender binding moves with the transaction key for the same reason — a rotation is the account
* disowning that key, and a gate that still resolved the old sender would honour a retired key.
*
* A certificate already bound to another account is refused, and so is a version that does not
* advance, so neither a replayed registration nor a stolen certificate can take a record over.
* @param account The identity being written. Zero is refused.
* @param live The parsed live-stage certificate; for an issuer, its single certificate.
* @param recovery The parsed recovery-stage certificate; for an issuer, the same value, discarded.
* @param roles The complete capability bitmask to store.
* @param version Monotonic per account. Must exceed the stored value.
* @param isCa Whether this is a certificate authority, which stores no recovery, seal or
* encapsulation material.
*/
function _write(
address account,
FinalCertificate.Parsed memory live,
FinalCertificate.Parsed memory recovery,
uint256 roles,
uint64 version,
bool isCa
) private {
if (account == address(0)) revert UnknownAccount(account);
if (certificateRevoked[live.certHash]) revert CertificateIsRevoked(live.certHash);
address boundTo = accountOfCertificate[live.certHash];
if (boundTo != address(0) && boundTo != account) {
revert CertificateAlreadyBound(live.certHash, boundTo);
}
Identity storage id = _identity[account];
if (!id.registered) {
_accounts.push(account);
id.registered = true;
} else {
if (version <= id.version) revert VersionNotNewer(id.version, version);
if (id.revoked) revert CertificateIsRevoked(id.certHash);
// A rotation releases the previous certificate's binding. It is NOT
// revoked — a superseded certificate and a compromised one are
// different facts and revocation is the louder of the two.
if (id.certHash != live.certHash) delete accountOfCertificate[id.certHash];
}
id.certHash = live.certHash;
id.recoveryCertHash = recovery.certHash;
id.serial = live.serial;
id.subjectKeyId = live.subjectKeyId;
id.roles = roles;
id.depth = live.depth;
id.maxDelegationDepth = live.maxDelegationDepth;
id.notBefore = live.notBefore;
id.notAfter = live.notAfter;
id.version = version;
// The sender binding moves with the transaction key. The old sender is
// released rather than kept: a rotation is the account disowning that
// key, and a gate that still resolved it would honour a retired key.
address sender = senderFor(live.transactionKey);
address senderBoundTo = accountOfSender[sender];
if (senderBoundTo != address(0) && senderBoundTo != account) {
revert SenderAlreadyBound(sender, senderBoundTo);
}
if (_activeTransactionKey[account].length != 0) {
address previousSender = senderFor(_activeTransactionKey[account]);
if (previousSender != sender) delete accountOfSender[previousSender];
}
accountOfSender[sender] = account;
_activeTransactionKey[account] = live.transactionKey;
_activeAccessKey[account] = live.accessKey;
// A CA has no recovery pair; the two active slots are all it has.
_recoveryTransactionKey[account] = isCa ? bytes("") : recovery.transactionKey;
_recoveryAccessKey[account] = isCa ? bytes("") : recovery.accessKey;
// Cleared on a rotation to a certificate without one, for the same
// reason the encapsulation pair is: a stale seal surviving a rotation
// would let a retired key keep co-signing execution.
_activeSealKey[account] = isCa ? bytes("") : live.sealKey;
// The encapsulation pair, validated before it is stored.
//
// **The registry is where a sender looks up "encapsulate to this
// party", so a malformed key here is not a bad record — it is an
// account nobody can seal an intent to.** The discovery would happen at
// the first attempt, and on the hybrid path it would happen as a pair
// silently reduced to one family, which is identical on the wire. The
// precompiles make it a refusal at registration instead.
//
// Neither is a re-implementation of the KEM: `0x0203` runs FIPS 203
// §7.2's own encapsulation-key check and `0x0207` runs the structural
// check HQC-5's encoding admits. Encapsulation is a sender operation
// and decapsulation needs the secret key, so nothing more belongs here.
//
// A CA is sealed to by nobody and carries no encapsulation stage, so
// its slots are cleared rather than checked.
_storeKemPair(account, isCa, live.kemMlKem, live.kemHqc, true);
_storeKemPair(account, isCa, recovery.kemMlKem, recovery.kemHqc, false);
accountOfCertificate[live.certHash] = account;
emit IdentityRegistered(account, live.certHash, roles, version);
// Same-tx: a registration or rotation is visible to every execution
// chain's admission set the moment it is visible here.
_projectIdentity(account);
}
/**
* @notice Store one stage's encapsulation pair, or clear it.
* @dev Empty is legitimate and is not the same as absent-and-wrong: a certificate authority has no
* encapsulation stage, and a certificate may be issued without one. The parser has already refused
* the half-populated case, so by here the pair is both or neither.
*
* Cleared rather than left alone on a rotation to an empty pair. A stale key surviving a rotation is
* a sender encapsulating to a credential the account has disowned, and the message then never
* decrypts — the failure mode with no error attached, and the one this pairing exists to avoid.
* @param account The identity being written.
* @param isCa Whether the record is a certificate authority, which carries no encapsulation stage.
* @param mlKem The stage's ML-KEM-1024 key, or empty.
* @param hqc The stage's HQC-5 key, or empty.
* @param isLive Whether this is the live stage; false selects the recovery slots.
*/
function _storeKemPair(address account, bool isCa, bytes memory mlKem, bytes memory hqc, bool isLive)
private
{
if (isCa || mlKem.length == 0) {
delete (isLive ? _activeKemMlKem : _recoveryKemMlKem)[account];
delete (isLive ? _activeKemHqc : _recoveryKemHqc)[account];
return;
}
if (!FinalChainPrecompiles.isWellFormedMlKem1024(mlKem)) {
revert MalformedEncapsulationKey(account, FinalCertificate.ALG_ML_KEM_1024);
}
if (!FinalChainPrecompiles.isWellFormedHqc5(hqc)) {
revert MalformedEncapsulationKey(account, FinalCertificate.ALG_HQC_5);
}
if (isLive) {
_activeKemMlKem[account] = mlKem;
_activeKemHqc[account] = hqc;
} else {
_recoveryKemMlKem[account] = mlKem;
_recoveryKemHqc[account] = hqc;
}
}
/// @notice Grant or withdraw capabilities without rotating keys.
/// @dev Separate from registration because the two have different cadences: a role changes when a
/// service's job changes, a key changes when it is compromised or aged out. Folding them together
/// would force a key rotation to express a role change, which is the more dangerous of the two
/// operations doing the work of the safer one.
/// @param account Must already be registered and not revoked.
/// @param roles The complete new capability bitmask; it replaces the old one rather than merging.
/// @param anchorBlock The block the registrars read the roster at.
/// @param approvals The sealed registrar quorum. Empty while bootstrap is open.
function setRoles(
address account,
uint256 roles,
uint64 anchorBlock,
FinalPqQuorum.Approval[] calldata approvals
) external {
_requireMembershipAuthority(
DOMAIN_SET_ROLES, keccak256(abi.encode(account, roles)), anchorBlock, approvals
);
Identity storage id = _identity[account];
if (!id.registered) revert UnknownAccount(account);
if (id.revoked) revert CertificateIsRevoked(id.certHash);
uint256 previous = id.roles;
id.roles = roles;
_requireRegistrarQuorumReachable();
emit IdentityRolesChanged(account, previous, roles);
// Roles are not in the tree-8 leaf, so this rewrites the same value —
// kept anyway so "every identity mutation projects" has no exceptions
// to remember.
_projectIdentity(account);
}
/// @notice Refuse a mutation that would leave the registrar quorum unreachable.
/// @dev Once bootstrap is sealed, that is the one change nothing could ever undo: a registry whose
/// threshold exceeds its sealable membership can never be written to again, including to fix
/// itself. Checked AFTER the write so the count reflects the mutation being attempted.
function _requireRegistrarQuorumReachable() private view {
if (!bootstrapSealed) return;
uint256 sealable = sealableMemberCount(ROLE_REGISTRAR);
if (sealable < registrarThreshold) {
revert RegistrarThresholdUnreachable(sealable, registrarThreshold);
}
}
/// @notice Revoke an identity and its certificate. Irreversible.
/// @dev Clears the roles as well as setting the flag. Both are checked everywhere, but leaving a revoked
/// record carrying roles invites a future reader that checks only one of them. The fingerprints of
/// the named LMS slots are recorded into the revocation log after the flag lands, so the log's own
/// permanence gate sees the transition it requires.
/// @param account The identity to retire.
/// @param chainIds The chains whose LMS-key slots this account holds. The registrars supply the list and
/// the approval digest binds it, because a mapping cannot enumerate its own keys. A chain with no
/// slot is skipped, and a fingerprint an incomplete list missed stays permanently recordable
/// through the revocation log's permissionless door, since a revoked account never regains
/// standing.
/// @param anchorBlock The block the registrars read the roster at.
/// @param approvals The sealed registrar quorum. Empty while bootstrap is open.
function revoke(
address account,
uint64[] calldata chainIds,
uint64 anchorBlock,
FinalPqQuorum.Approval[] calldata approvals
) external {
_requireMembershipAuthority(
DOMAIN_REVOKE, keccak256(abi.encode(account, chainIds)), anchorBlock, approvals
);
Identity storage id = _identity[account];
if (!id.registered) revert UnknownAccount(account);
id.revoked = true;
id.roles = 0;
certificateRevoked[id.certHash] = true;
_requireRegistrarQuorumReachable();
emit IdentityRevoked(account, id.certHash);
// AFTER the flag lands, so the log's own gate sees the permanent
// transition it requires.
for (uint256 i = 0; i < chainIds.length; i++) {
LmsKey storage k = _lmsKey[account][chainIds[i]];
if (k.registered) _recordRevokedSigner(lmsSignerId(k.keyId, k.height, k.root));
}
_projectIdentity(account);
}
/**
* @notice Root-plane GLOBAL certificate revocation, by `certHash`.
* @dev The half of the revocation lane that gates registration and covers break-glass: any certificate —
* registered here, issued off chain, or never seen — can be killed by handle under the registrar
* quorum, because the handle is all a break-glass caller may have.
*
* When the handle is a registered identity's CURRENT certificate the identity falls with it: flag,
* roles cleared, same-transaction projection. So revoking by handle is never weaker than {revoke};
* it only skips the LMS-slot enumeration, and those fingerprints stay permanently recordable
* through the revocation log's own permissionless door.
* @param certHash The certificate to revoke. Need not correspond to any record.
* @param anchorBlock The block the registrars read the roster at.
* @param approvals The sealed registrar quorum. Empty while bootstrap is open.
*/
function revokeCertificate(
bytes32 certHash,
uint64 anchorBlock,
FinalPqQuorum.Approval[] calldata approvals
) external {
_requireMembershipAuthority(
DOMAIN_REVOKE_CERTIFICATE, keccak256(abi.encode(certHash)), anchorBlock, approvals
);
certificateRevoked[certHash] = true;
address bound = accountOfCertificate[certHash];
if (bound != address(0)) {
Identity storage id = _identity[bound];
if (!id.revoked) {
id.revoked = true;
id.roles = 0;
_requireRegistrarQuorumReachable();
emit IdentityRevoked(bound, certHash);
_projectIdentity(bound);
}
}
emit CertificateRevoked(certHash, address(0));
}
/**
* @notice The issuing identity's half of the revocation lane: a registered issuer revokes a certificate
* it signed off chain, by `certHash`.
* @dev This records WHO revoked, and a verifier honours the entry only when the recorded revoker is the
* certificate's own issuer — which the verifier knows, because it holds the certificate. It
* deliberately does NOT set the global `certificateRevoked` flag: that flag gates registration, and
* letting any registered issuer set it for an arbitrary handle would be a griefing lane over other
* people's certificates.
*
* Anyone may SUBMIT. Authority is the two signatures — the issuer's registered cert-signing keys
* over a digest binding this registry, this chain, the handle and the issuer's own gate nonce, both
* verified in the precompiles inside this transaction. The keys come from storage, so a submitter
* cannot supply the pair its own signatures verify under.
*
* One-way: the first revoker of a handle is recorded and a second write is refused, because
* "revoked twice by two parties" is two facts where this lane models one.
* @param issuer The registered certificate authority making the statement.
* @param certHash The certificate being revoked.
* @param proof The issuer's own ML-DSA-87 and SLH-DSA-SHAKE-256s signatures over the revocation digest.
*/
function revokeIssuedCertificate(
address issuer,
bytes32 certHash,
AdmissionProof calldata proof
) external {
if (!hasRole(issuer, ROLE_CERTIFICATE_AUTHORITY)) {
revert IssuerNotACertificateAuthority(issuer);
}
if (certificateRevokedBy[certHash] != address(0)) revert CertificateIsRevoked(certHash);
uint64 nonce = _gateNonce[issuer];
_gateNonce[issuer] = nonce + 1;
bytes memory message = abi.encodePacked(
keccak256(
abi.encode(
DOMAIN_ISSUER_CERT_REVOCATION,
block.chainid,
address(this),
issuer,
certHash,
nonce
)
)
);
if (
!FinalChainPrecompiles.verifyMlDsa87(
_activeTransactionKey[issuer], message, proof.mlDsaSignature
)
|| !FinalChainPrecompiles.verifySlhDsa(
_activeAccessKey[issuer], message, proof.slhDsaSignature
)
) revert AdmissionProofInvalid(issuer);
certificateRevokedBy[certHash] = issuer;
emit CertificateRevoked(certHash, issuer);
}
// ---------------------------------------------------------------- views
/// @notice The full identity record.
/// @dev Returns the zero struct for an address no record claims, so `registered` is the field to branch
/// on rather than any of the hashes.
/// @param account The identity to read.
/// @return The stored record, copied to memory.
function identityOf(address account) external view returns (Identity memory) {
return _identity[account];
}
/// @notice The live transaction key, ML-DSA-87: what a quorum vote is verified against.
/// @dev Read from STORAGE by every quorum on this chain, never from a caller's argument — a key supplied
/// as calldata proves nothing, because anyone holding a keypair can sign under it.
/// @param account The identity to read.
/// @return The raw public key, or empty when the account holds none.
function activeTransactionKeyOf(address account) external view returns (bytes memory) {
return _activeTransactionKey[account];
}
/// @notice The live access key, SLH-DSA-SHAKE-256s: identity, rotation, and guardianship.
/// @dev A different hardness assumption from the transaction key, so a lattice break leaves the key that
/// governs identity standing intact.
/// @param account The identity to read.
/// @return The raw public key, or empty when the account holds none.
function activeAccessKeyOf(address account) external view returns (bytes memory) {
return _activeAccessKey[account];
}
/// @notice The seal key, SLH-DSA-SHAKE-256s: what `FinalPqQuorum` verifies an approval's seal against.
/// @dev A service's second hash-based key, distinct from its access key, so a quorum decision carries
/// one signature from each hardness assumption. Empty when the identity carries no seal, in which
/// case it cannot take part in a sealed quorum at all — which is why {sealableMemberCount} counts
/// this rather than counting role bits.
/// @param account The identity to read.
/// @return The raw public key, or empty when the account holds no seal.
function activeSealKeyOf(address account) external view returns (bytes memory) {
return _activeSealKey[account];
}
/// @notice The recovery-stage transaction key, ML-DSA-87.
/// @dev Authorizes rotating this account's own credentials and nothing else — acting as a guardian is an
/// ordinary action for an account and uses the live keys. Empty for a certificate authority.
/// @param account The identity to read.
/// @return The raw public key, or empty when the account holds none.
function recoveryTransactionKeyOf(address account) external view returns (bytes memory) {
return _recoveryTransactionKey[account];
}
/// @notice The recovery-stage access key, SLH-DSA-SHAKE-256s.
/// @dev The other half of the pre-committed recovery stage. Empty for a certificate authority, which has
/// no recovery stage at all.
/// @param account The identity to read.
/// @return The raw public key, or empty when the account holds none.
function recoveryAccessKeyOf(address account) external view returns (bytes memory) {
return _recoveryAccessKey[account];
}
/// @notice The four signing-key commitments, in the order tree 1's leaf wants them.
/// @dev keccak, not SHA3: these feed `FinalWalletFactory.accountStateLeafHash`, which every execution
/// chain verifies with, and that one hashes with keccak. An account missing a slot commits to the
/// hash of the empty string rather than reverting, so the leaf stays buildable for a certificate
/// authority, which holds no recovery pair.
/// @param account The identity to commit to.
/// @return liveAccess Commitment to the live access key.
/// @return liveTransaction Commitment to the live transaction key.
/// @return recoveryAccess Commitment to the recovery access key.
/// @return recoveryTransaction Commitment to the recovery transaction key.
function keyCommitments(address account)
external
view
returns (
bytes32 liveAccess,
bytes32 liveTransaction,
bytes32 recoveryAccess,
bytes32 recoveryTransaction
)
{
liveAccess = keccak256(_activeAccessKey[account]);
liveTransaction = keccak256(_activeTransactionKey[account]);
recoveryAccess = keccak256(_recoveryAccessKey[account]);
recoveryTransaction = keccak256(_recoveryTransactionKey[account]);
}
/**
* @notice The tree-8 leaf `account` currently earns: the execution chains' identity leaf while the
* identity stands, zero once it does not.
* @dev The leaf VALUE is `keccak256(DOMAIN_IDENTITY_LEAF ‖ serial ‖ keysHash)` — byte-identical to
* `IdentityRootModule.identityLeafHash`, which is also the `certHash` inside a wallet's address
* derivation — with `keysHash` folded exactly as the certificate issuer folds it:
* `keccak256(activeAccess ‖ activeTransaction ‖ recoveryAccess ‖ recoveryTransaction ‖ activeKem ‖
* recoveryKem)`, six commitment words packed in slot order. The issuing tooling and this function
* are pinned against each other by test over the premined certificate fixtures, because a wallet
* whose address was derived from a different fold is a wallet no chain can admit.
*
* Zero — the empty slot's own value, unprovable as a leaf because no certificate hashes to it — for
* anything that must not admit a wallet creation: a revoked identity, one outside its validity
* window, and any certificate authority. The authority exclusion is STRUCTURAL rather than a role
* read: an end entity has `depth == maxDelegationDepth` because it issues nothing, an authority
* never does, and that pair is immutable per version where `roles` is not.
*
* Lives here rather than on the state-trees contract that consumes it because every input is this
* contract's storage, and the trees contract has no bytecode headroom to spare.
* @param account The identity to project. Reverts for an account with no record at all.
* @return The tree-8 leaf value, or zero while the identity does not stand.
*/
function identityTreeLeafOf(address account) external view returns (bytes32) {
Identity storage id = _identity[account];
if (!id.registered) revert UnknownAccount(account);
if (id.revoked || !_withinValidity(id)) return bytes32(0);
if (id.depth != id.maxDelegationDepth) {
// An ISSUER exists in tree 8 under its own domain, so its record is stapleable for offline
// licence verification while the distinct domain keeps it out of wallet admission. `certHash`
// suffices — it covers the whole TBS and the verifier holds the certificate — `version` makes
// supersession move the leaf, and the third word RESERVES the issuer's own certificate-tree
// anchor, zero until one is wired. Zero-on-revoke above is load-bearing for both record kinds:
// a fresh staple is an unrevoked statement.
return keccak256(
abi.encodePacked(DOMAIN_ISSUER_LEAF, id.certHash, uint64(id.version), bytes32(0))
);
}
bytes32 liveKem = keccak256(
abi.encodePacked(DOMAIN_KEM_BUNDLE, _activeKemMlKem[account], _activeKemHqc[account]));
bytes32 recoveryKem = keccak256(
abi.encodePacked(DOMAIN_KEM_BUNDLE, _recoveryKemMlKem[account], _recoveryKemHqc[account]));
bytes32 keysHash = keccak256(
abi.encodePacked(
keccak256(_activeAccessKey[account]),
keccak256(_activeTransactionKey[account]),
keccak256(_recoveryAccessKey[account]),
keccak256(_recoveryTransactionKey[account]),
liveKem,
recoveryKem
)
);
return keccak256(abi.encodePacked(DOMAIN_IDENTITY_LEAF, id.serial, keysHash));
}
/// @notice Per-stage encapsulation commitments, in the order the account-state leaf wants them.
/// @dev One word per STAGE, folded over both of that stage's encapsulation public keys under
/// `DOMAIN_KEM_BUNDLE`. The pair is the unit — an account holds both keys or neither — so
/// committing to them separately would model a state the protocol does not recognise, and every
/// downstream record would carry two words where one says the same thing.
///
/// An account whose certificate carries no encapsulation stage folds the empty string here rather
/// than reverting: the projection into the state trees must keep succeeding for it, and a leaf that
/// cannot be built is a party that cannot be revoked.
/// @param account The identity to commit to.
/// @return liveKem The live stage's encapsulation commitment.
/// @return recoveryKem The recovery stage's encapsulation commitment.
function kemCommitments(address account)
external
view
returns (bytes32 liveKem, bytes32 recoveryKem)
{
liveKem = keccak256(
abi.encodePacked(DOMAIN_KEM_BUNDLE, _activeKemMlKem[account], _activeKemHqc[account]));
recoveryKem = keccak256(
abi.encodePacked(DOMAIN_KEM_BUNDLE, _recoveryKemMlKem[account], _recoveryKemHqc[account]));
}
/// @notice The live-stage encapsulation keys themselves, for a party composing a sealed message.
/// @dev Returns both halves of the pair together because the pair is the unit: encapsulating to one
/// family alone is indistinguishable on the wire from a hybrid, and silently dropping the hedge is
/// the failure this pairing exists to prevent. Empty for an account with no encapsulation stage.
/// @param account The party to encapsulate to.
/// @return activeMlKem The lattice half, ML-KEM-1024.
/// @return activeHqc The code-based half, HQC-5.
function kemKeysOf(address account)
external
view
returns (bytes memory activeMlKem, bytes memory activeHqc)
{
return (_activeKemMlKem[account], _activeKemHqc[account]);
}
// ------------------------------------------------------------- senders
/**
* @notice The sender address a transaction key produces on this chain.
* @dev `keccak256(uint8(4) ‖ publicKey)[12:]` — byte-identical to what the node derives from a
* post-quantum transaction envelope and to the backend's own derivation. The leading algorithm byte
* is what domain-separates it, so a key of another family can never derive the same address.
*
* Pure, so a client can compute the address from a certificate before the identity is registered —
* which is what lets an admission transaction be funded and submitted from the very sender it is
* about to bind.
* @param transactionKey The raw ML-DSA-87 public key.
* @return The sender address that key signs from.
*/
function senderFor(bytes memory transactionKey) public pure returns (address) {
return address(uint160(uint256(keccak256(abi.encodePacked(ENVELOPE_ALG_ML_DSA_87, transactionKey)))));
}
/// @notice The sender `account`'s transactions arrive from.
/// @dev The forward direction of {accountOfSender}, derived rather than stored, so it cannot disagree
/// with the transaction key on record.
/// @param account The identity to resolve.
/// @return The derived sender, or zero for an account with no transaction key on record.
function senderOf(address account) external view returns (address) {
bytes storage key = _activeTransactionKey[account];
if (key.length == 0) return address(0);
return senderFor(key);
}
/// @notice {hasRole} for a `msg.sender`: resolves the sender to its identity first.
/// @dev The form every `msg.sender` gate on this chain uses. A sender is derived from a transaction key
/// and holds no authority itself, so asking it directly would be asking the wrong address. False for
/// a sender no identity claims.
/// @param sender The address a transaction arrived from.
/// @param roleMask The capability required.
/// @return Whether the identity behind that sender stands and carries the whole mask.
function senderHasRole(address sender, uint256 roleMask) external view returns (bool) {
address account = accountOfSender[sender];
return account != address(0) && hasRole(account, roleMask);
}
/// @notice How many accounts carrying `roleMask` also hold a seal key — the members that can take part
/// in a sealed quorum.
/// @dev The count every membership threshold is checked against, because membership approvals are the
/// hybrid class and a member with no seal can never contribute one. A certificate authority
/// carrying `ROLE_REGISTRAR` is registered from a certificate with no seal slot, so it is counted
/// out here rather than being discovered at the first quorum that fails to reach its threshold.
/// @param roleMask The capability the quorum is over.
/// @return sealable How many standing accounts carry the mask and hold a seal key.
function sealableMemberCount(uint256 roleMask) public view returns (uint256 sealable) {
uint256 n = _accounts.length;
for (uint256 i = 0; i < n; i++) {
address a = _accounts[i];
if (hasRole(a, roleMask) && _activeSealKey[a].length != 0) sealable++;
}
}
/// @notice Number of registered accounts.
/// @dev Never decreases: revocation clears a record's roles and sets its flag but leaves it in the list,
/// so an index handed out once keeps pointing at the same account for good.
/// @return How many accounts have ever been registered.
function accountCount() external view returns (uint256) {
return _accounts.length;
}
/// @notice Registered account by index, in registration order.
/// @dev Reverts on an out-of-range index rather than answering zero, so a caller paging the list cannot
/// mistake the end of it for a hole in the middle.
/// @param index Position in the registration-ordered list, below {accountCount}.
/// @return The account at that position.
function accountAt(uint256 index) external view returns (address) {
return _accounts[index];
}
/// @notice Every account carrying every bit in `roleMask`.
/// @dev A view, so the linear scan over the account list costs nothing to a caller reading off chain.
/// Callers that need a roster inside a transaction pass the member list explicitly instead — see
/// `FinalPqQuorum`, which takes signers rather than searching for them, so a quorum's cost does not
/// grow with the size of the registry.
/// @param roleMask The capability to filter on.
/// @return found The matching accounts, in registration order.
function accountsWithRole(uint256 roleMask) external view returns (address[] memory found) {
uint256 n = _accounts.length;
address[] memory buf = new address[](n);
uint256 count;
for (uint256 i = 0; i < n; i++) {
if (hasRole(_accounts[i], roleMask)) {
buf[count++] = _accounts[i];
}
}
found = new address[](count);
for (uint256 i = 0; i < count; i++) {
found[i] = buf[i];
}
}
/**
* @notice How many accounts could satisfy a quorum for `roleMask` right now.
* @dev The number a threshold has to be reachable against. A threshold above it is not a strict quorum,
* it is a quorum that cannot be met — and the way that presents is an operation reverting forever
* with nothing naming the roster as the cause. Counts standing alone; use {sealableMemberCount} for
* a quorum that also needs a seal.
* @param roleMask The capability the quorum is over.
* @return live How many standing accounts carry the whole mask.
*/
function liveMemberCount(uint256 roleMask) public view returns (uint256 live) {
uint256 n = _accounts.length;
for (uint256 i = 0; i < n; i++) {
if (hasRole(_accounts[i], roleMask)) live++;
}
}
/**
* @notice Whether `account` currently carries every bit in `roleMask`.
* @dev Every gate in this system asks this one question, so every gate gets the same answer: registered,
* not revoked, inside its validity window, and holding the capability. A caller that checked only
* the role bit would accept an expired certificate.
*
* `roleMask == 0` is false. A zero mask asks nothing and must not read as "yes" — that is the shape
* of an uninitialised configuration variable, and the one reading it must not be a universal pass.
*
* Every bit in the mask must be present, so a mask naming two capabilities asks for both rather than
* either.
* @param account The account to test.
* @param roleMask One or more `ROLE_*` bits, OR-ed together.
* @return Whether the account stands and carries the whole mask.
*/
function hasRole(address account, uint256 roleMask) public view returns (bool) {
if (roleMask == 0) return false;
Identity storage id = _identity[account];
if (!id.registered || id.revoked) return false;
if (id.roles & roleMask != roleMask) return false;
return _withinValidity(id);
}
/// @notice Whether `account` is registered, unrevoked and in date, regardless of capability.
/// @dev The standing half of {hasRole}, for callers that care that a party is honoured at all rather
/// than that it holds a particular capability. {lmsSignerIsLive} asks this rather than spelling the
/// three conditions out a second time, because a second spelling is how two answers drift apart.
/// @param account The account to test. An address no record claims answers false.
/// @return Whether the identity currently stands.
function isActive(address account) public view returns (bool) {
Identity storage id = _identity[account];
return id.registered && !id.revoked && _withinValidity(id);
}
/// @notice Whether a record's certificate is inside its validity window right now.
/// @dev Both bounds are milliseconds on this chain's clock and both are optional: a zero `notBefore`
/// means valid from issuance and a zero `notAfter` means never expires, which the certificate
/// schema allows and personal identity certificates use. The upper bound is exclusive, so a
/// certificate stops being honoured on the millisecond it names rather than after it.
/// @param id The record to test, taken as a storage pointer so no copy of a multi-word struct is made.
/// @return Whether the window admits the current block time.
function _withinValidity(Identity storage id) private view returns (bool) {
if (id.notBefore != 0 && FinalChainTime.nowMs() < id.notBefore) return false;
if (id.notAfter != 0 && FinalChainTime.nowMs() >= id.notAfter) return false;
return true;
}
// ------------------------------------------------------------------ sweep
/// @inheritdoc FinalSweep
/// @dev The registry's own configuration gate, in the `msg.sender` form a no-argument seam can express:
/// the bootstrap admin alone while the window is open, a live registrar afterwards.
///
/// The rest of the state plane inherits this rule from `FinalPlaneSweep`, which reads it off a
/// registry pointer. This contract answers it from its own storage because it IS that registry, and
/// importing the shared mixin here would make this file import a file that imports it back.
///
/// The sealed half of the gate is a K-of-N over `ROLE_REGISTRAR` whose approvals arrive in calldata,
/// which `sweepAsset`'s shared signature has no room for; what survives is membership in that same
/// roster. The narrowing is safe because the other two gates hold regardless: a sweep moves surplus
/// only, this contract owes nothing, so there is nothing behind the line to reach — and the
/// destination is not the caller's to invent.
function _requireSweepAuthority() internal view override {
if (!bootstrapSealed && msg.sender == bootstrapAdmin) return;
if (hasRole(msg.sender, ROLE_REGISTRAR)) return;
revert SweepUnauthorized(msg.sender);
}
/// @inheritdoc FinalSweep
/// @dev The bootstrap admin, and the proven authority that called. The first of those is zero once the
/// window is sealed, which `FinalSweep` refuses as a destination, so a sealed registry can only
/// sweep to the registrar that authorised the sweep.
function _sweepDestinations() internal view override returns (address, address) {
return (bootstrapAdmin, msg.sender);
}
/// @dev Nothing is reserved because nothing is owed: the registry holds
/// certificates and role bits, has no payable entrypoint and no custody
/// line. Anything it carries arrived by accident.
}
contracts/finalchain/FinalPhiSupply.sol
// SPDX-License-Identifier: BUSL-1.1
// Copyright (c) 2024-2026 Final DeFi
// Licensed under the Business Source License 1.1 (the "License")
//
// Change Date: 2029-01-01
// Change License: GPL-2.0-or-later
//
// Additional Use Grant:
// 1. Any person or entity may deploy and operate this supply record as part
// of a Final DeFi Protocol chain, and may record issuance and movement in
// it under the authority the chain recognises.
// 2. Integrators, auditors, and indexers may read the supply accounting it
// keeps, as part of their integration with the Final DeFi Protocol.
// 3. For the avoidance of doubt, this Grant does NOT permit the commercial
// deployment of a Fork of this supply record or a competing token-issuance
// plane derived from it without permission prior to the Change Date.
//
// @author Final DeFi
// @version 1.0.0
pragma solidity ^0.8.24;
import {FinalIdentityRegistry} from "./FinalIdentityRegistry.sol";
import {FinalPqQuorum} from "./FinalPqQuorum.sol";
import {FinalPlaneSweep} from "./FinalPlaneSweep.sol";
import {SweepKind} from "../utils/FinalSweep.sol";
/**
* @title FinalPhiSupply
* @notice The 100,000,000 PHI, and the only place that can see all of them.
*
* @dev ## What this exists to fix
*
* `PHIToken` on every execution chain deploys with no supply and can only gain
* it through `spawn`, so a chain can never hold more than Final Chain issued it.
* That property is local and structural. The GLOBAL one was not:
*
* > The global cap still cannot be enforced on-chain — no chain sees the others
* > — so it rests on this ledger's integrity.
*
* Final Chain does see the others, because it is what issues to them. This
* contract is that view made into an invariant: every chain's outstanding
* allocation is a number here, and no path exists that changes one without
* changing `held` by the same amount in the opposite direction.
*
* held + Σ over chains of allocatedTo[chainRef] == TOTAL_SUPPLY
*
* Checked after every mutation and reverted on violation, so "100M is fixed"
* stops being a property the backend must not break and becomes one it cannot.
*
* ## What this is NOT
*
* **Not a token, and deliberately.** There are no per-wallet balances here. A
* wallet's PHI is the **tree 2** record — `available`, the lock and its
* exposures per `(wallet, chainId)`, published by the PHI publishers from the
* execution chains and the admitted intents. Holding balances here as well
* would make two records of one asset that mutate independently. This contract
* knows totals per chain and nothing about who holds them — and its invariant
* IS the conservation of PHI: nothing off-chain re-derives it, and a chain's
* supply lagging its allocation during a transfer is the order of operations,
* not drift.
*
* **Not the gas token.** This chain charges gas in vETH. PHI being native is
* for Final Chain proper; here it would put a wallet's PHI in two places — its
* native balance and its tree-2 leaf — and the base fee would burn supply on
* every transaction, since EIP-1559 destroys it rather than paying it out.
*
* ## Cadence: this is not on the hot path
*
* `spawn` and `despawn` run on the **scheduled per-chain reconciliation**, sized
* to bring that chain's paymaster float back to its 2% target — not per
* operation, and not per liquidation.
*
* **The 2% is of THAT CHAIN's PHI in use, not of the 100M in circulation.**
* The two read almost identically and compute very differently: on a chain
* holding 1M PHI the target is 20,000, not the 2,000,000 that 2% of the global
* supply would give — a hundred times the float, drawn off every other chain to
* sit idle. Per chain, the float scales with that chain's own allocation and
* needs no re-tuning as allocation shifts between chains, which is the reason
* it is a fraction rather than a fixed amount. `allocatedTo[chainRef]` is the
* base; `totalAllocated` is never the base.
*
* That is what makes liquidations and manual reconciliations instant on the
* chain they happen on: between sweeps the paymaster serves them out of float,
* and Final Chain is not in the loop at all. Wiring either entrypoint per
* operation would put a quorum round trip in front of a liquidation, which is
* the one path that cannot afford one — and it would do so for no gain, because
* the float exists precisely so the allocation is already there.
*
* Refill is to TARGET, not to zero. A flat float makes the next user pay the
* same latency, and on a busy chain that turns every operation into a refill.
*
* ## Ordering
*
* Final Chain decides and the chains follow. A spawn debits `held` HERE first
* and the remote mint proves against the record this emits, so the destination
* can never mint ahead of the source debit — which is the one rule
* "executing-first" does not imply on its own, and the reason
* `projection.js` exists. Issuing out of Final Chain is safe by construction
* because the debit is already durable; legacy-to-legacy is the dangerous
* direction and it routes through here rather than between chains.
*/
contract FinalPhiSupply is FinalPlaneSweep {
// ------------------------------------------------------------------ types
/// @notice One chain's outstanding allocation.
struct Allocation {
/// @dev Spawned to this chain and not yet returned. Never exceeds
/// TOTAL_SUPPLY, because `held` cannot go below zero.
uint256 outstanding;
/// @dev Monotonic per chain. What a consumer compares to tell a stale
/// record from a current one without needing a round.
uint64 epoch;
}
// -------------------------------------------------------------- constants
/// @notice 100,000,000 PHI, 18 decimals. Fixed for the life of the protocol.
///
/// @dev A constant rather than a constructor argument for the same reason
/// `PHIToken` takes no supply argument: a value someone supplies is a
/// value someone can supply twice.
uint256 public constant TOTAL_SUPPLY = 100_000_000 ether;
/// @dev Action tag for issuing supply onto a chain.
bytes32 internal constant ACTION_SPAWN = keccak256("FinalPhiSupply.spawn.v01");
/// @dev Action tag for retiring supply from a chain. Distinct from the spawn tag, so an approval collected to
/// issue can never retire.
bytes32 internal constant ACTION_DESPAWN = keccak256("FinalPhiSupply.despawn.v01");
/// @dev Action tag for moving supply between chains.
bytes32 internal constant ACTION_MOVE = keccak256("FinalPhiSupply.move.v01");
// ------------------------------------------------------------------ state
/// @notice The identity registry quorum members are resolved through.
/// @dev Immutable: it decides who may change supply, so a movable pointer would make the quorum only as
/// strong as whoever could re-point it.
FinalIdentityRegistry public immutable registry;
/// @dev Can `configure` and `seal`, and nothing else. Zero once sealed.
/// @dev Registrar-quorum action, verified by the registry with this
/// contract as the verifying contract.
bytes32 public constant ACTION_CONFIGURE = keccak256("FINAL_PHI_SUPPLY_CONFIGURE_v01");
/// @dev Registrar-quorum action: a fresh supply taking over the previous
/// supply's ledger (the NO-WIPE redeploy).
bytes32 public constant ACTION_SEED = keccak256("FINAL_PHI_SUPPLY_SEED_v01");
/// @dev Bootstrap admin, cleared permanently by sealing.
address public admin;
/// @dev `ROLE_PHI_PUBLISHER`. The role bit itself is the registry's, so
/// membership changes there and not here.
uint256 public publisherRole;
/// @dev How many of the quorum must approve. Follows the fleet rule of
/// floor(2N/3) — three of five — rather than being tuned per contract.
///
/// Settable rather than immutable for one reason: the roster grows. A
/// threshold fixed at deploy against three members stays 2-of-N when
/// the fleet reaches five, and a quorum that does not track its roster
/// weakens silently as the roster it guards gets larger.
uint256 public threshold;
/// @notice PHI on Final Chain, allocated to no execution chain.
uint256 public held;
/// @notice Per-chain outstanding allocation, by CAIP-style chain reference.
mapping(bytes32 => Allocation) public allocatedTo;
/// @notice The sum of every `allocatedTo[*].outstanding`.
///
/// @dev Maintained incrementally rather than summed on read: the mapping
/// cannot be iterated, and an invariant that can only be checked by an
/// off-chain sweep is not an invariant.
uint256 public totalAllocated;
/// @dev Replay protection for the quorum digest.
uint64 public nonce;
/// @dev Consumed-once per `(chainRef, originSeqId)`. One despawn on a chain
/// can never become two credits here — the mirror of the same rule
/// `PHIToken.spawn` enforces in the other direction.
mapping(bytes32 => mapping(uint256 => bool)) public consumedDespawn;
// ----------------------------------------------------------------- errors
/// @notice Thrown when a bootstrap-only entrypoint is reached by anyone but the admin.
/// @param caller The rejected caller.
error NotAdmin(address caller);
/// @notice Thrown when the requested threshold exceeds the live role membership.
/// @param live Members currently holding the role.
/// @param wanted The threshold requested.
error ThresholdUnreachable(uint256 live, uint256 wanted);
/// @notice Thrown when supply is changed before the role and threshold are configured.
error NotConfigured();
/// @notice Thrown when a supply operation carries no amount.
error ZeroAmount();
/// @notice Thrown when an operation would issue more than the supply holds unallocated.
/// @param want The amount requested.
/// @param have The amount available.
error InsufficientHeld(uint256 want, uint256 have);
/// @notice Thrown when an operation would retire more from a chain than that chain holds.
/// @param chainRef The chain.
/// @param want The amount requested.
/// @param have The amount outstanding there.
error InsufficientAllocation(bytes32 chainRef, uint256 want, uint256 have);
/// @notice Thrown when an origin sequence id that has already been settled is settled again.
/// @dev Consumption is recorded per origin id, which is what stops one cross-chain operation being counted
/// twice and minting supply the origin never retired.
/// @param chainRef The origin chain.
/// @param originSeqId The sequence id already consumed.
error AlreadyConsumed(bytes32 chainRef, uint256 originSeqId);
/// @notice Thrown when the supply's own accounting no longer balances.
/// @dev Checked rather than assumed: everything downstream treats this contract's numbers as the definition
/// of how much exists, so an imbalance must halt rather than propagate.
/// @param held Total the supply accounts for.
/// @param allocated Total allocated across chains.
error SupplyInvariantBroken(uint256 held, uint256 allocated);
/// @notice A move names the same chain twice, or no chain.
error InvalidMove(bytes32 source, bytes32 target);
/// @notice The ledger can be seeded only into a fresh supply.
error NotFresh();
/// @notice `seed`'s parallel arrays disagree in length, or a ref is zero
/// or carries epoch 0 (a ref the old supply never touched).
error SeedShapeMismatch();
/// @notice `seed` names one chain ref twice.
error SeedRefRepeated(bytes32 chainRef);
// ----------------------------------------------------------------- events
/// @notice Supply was issued onto a chain.
/// @param chainRef The chain.
/// @param amount The amount issued.
/// @param outstanding The chain's total after this issuance.
/// @param epoch The supply epoch this issuance carries.
/// @param seq The sequence id downstream consumers settle against.
event Spawned(bytes32 indexed chainRef, uint256 amount, uint256 outstanding, uint64 epoch, uint64 seq);
/// @notice Supply was retired from a chain.
/// @param chainRef The chain.
/// @param amount The amount retired.
/// @param outstanding The chain's total after this retirement.
/// @param epoch The supply epoch this retirement carries.
/// @param originSeqId The origin sequence id this retirement settles.
event Despawned(bytes32 indexed chainRef, uint256 amount, uint256 outstanding, uint64 epoch, uint256 originSeqId);
/// @notice Allocation moved between two execution chains in one record.
/// `seq` names the move for the target's spawn and the source's closing
/// despawn; `held` is untouched.
event Moved(
bytes32 indexed source,
bytes32 indexed target,
uint256 amount,
uint256 sourceOutstanding,
uint256 targetOutstanding,
uint64 seq
);
/// @notice The publisher role and threshold were configured.
/// @param role Role whose members may change supply.
/// @param threshold Approvals a change requires.
event SupplyConfigured(uint256 role, uint256 threshold);
/// @notice The bootstrap admin was cleared, permanently. Every later change requires the quorum.
event Sealed();
/// @notice A fresh supply took over the previous supply's ledger.
event Seeded(uint256 allocations, uint256 despawns, uint64 nonce);
// ------------------------------------------------------------ constructor
/// @notice Binds the supply to its identity registry and bootstrap admin.
/// @param registry_ The registry quorum members are resolved through. Immutable.
/// @param admin_ The bootstrap admin, cleared by sealing.
constructor(FinalIdentityRegistry registry_, address admin_) {
registry = registry_;
admin = admin_;
// The whole supply starts here, unallocated. This is the "created once"
// in "created once, on Final Chain" — and it happens exactly once,
// because a constant cannot be passed twice.
held = TOTAL_SUPPLY;
}
// ------------------------------------------------------------- bootstrap
/**
* @notice Point at the publisher role and set how many of it must approve.
*
* @dev Refuses a threshold the roster cannot reach. Without that check the
* failure is not a revert here but a `spawn` that no set of signatures
* can ever satisfy — supply frozen by a typo, and discovered at the
* first reconciliation rather than at configure time.
*/
function configure(
uint256 role,
uint256 k,
uint64 anchorBlock,
FinalPqQuorum.Approval[] calldata approvals
) external {
// The admin alone while this contract's window is open; the sealed
// `ROLE_REGISTRAR` quorum afterwards, exactly as on the registry and
// the trees. Before the quorum path existed, `seal()` froze this
// configuration forever — a publisher set that could never re-threshold.
if (msg.sender != admin) {
registry.requireRegistrarQuorum(
ACTION_CONFIGURE, keccak256(abi.encode(role, k)), anchorBlock, approvals
);
}
if (k != 0) {
uint256 live = registry.liveMemberCount(role);
if (live < k) revert ThresholdUnreachable(live, k);
}
publisherRole = role;
threshold = k;
emit SupplyConfigured(role, k);
}
/// @notice Close the bootstrap window. One way.
function seal() external {
if (msg.sender != admin) revert NotAdmin(msg.sender);
admin = address(0);
emit Sealed();
}
/**
* @notice Take over the previous supply's ledger: every chain's outstanding
* allocation and epoch, every consumed despawn, and the nonce — so
* a redeployed supply says exactly what the old one said, and every
* `seq` it will ever issue stays above every seq a `PHIToken` has
* already consumed. A redeploy does NOT wipe: this lane is how a
* fresh supply is brought up already ahead of every consumer,
* rather than behind them.
* @dev Only into a fresh supply (nothing allocated, nonce 0). The
* registry's bootstrap admin inside its window, the sealed
* `ROLE_REGISTRAR` quorum afterwards — the door every other
* state-plane seed uses. `held` is DERIVED (`TOTAL_SUPPLY - Σ
* outstanding`) and the invariant asserted, so a list that does not
* add up reverts rather than seeds.
*/
function seed(
bytes32[] calldata refs,
uint256[] calldata outstanding,
uint64[] calldata epochs,
bytes32[] calldata despawnRefs,
uint256[] calldata despawnSeqs,
uint64 nonce_,
uint64 anchorBlock,
FinalPqQuorum.Approval[] calldata approvals
) external {
if (registry.bootstrapSealed() || msg.sender != registry.bootstrapAdmin()) {
registry.requireRegistrarQuorum(
ACTION_SEED,
keccak256(abi.encode(refs, outstanding, epochs, despawnRefs, despawnSeqs, nonce_)),
anchorBlock,
approvals
);
}
if (nonce != 0 || totalAllocated != 0) revert NotFresh();
if (refs.length != outstanding.length || refs.length != epochs.length) revert SeedShapeMismatch();
if (despawnRefs.length != despawnSeqs.length) revert SeedShapeMismatch();
uint256 allocated;
for (uint256 i = 0; i < refs.length; i++) {
if (refs[i] == bytes32(0) || epochs[i] == 0) revert SeedShapeMismatch();
Allocation storage a = allocatedTo[refs[i]];
if (a.epoch != 0) revert SeedRefRepeated(refs[i]);
a.outstanding = outstanding[i];
a.epoch = epochs[i];
allocated += outstanding[i];
}
if (allocated > TOTAL_SUPPLY) revert InsufficientHeld(allocated, TOTAL_SUPPLY);
totalAllocated = allocated;
held = TOTAL_SUPPLY - allocated;
for (uint256 i = 0; i < despawnRefs.length; i++) {
consumedDespawn[despawnRefs[i]][despawnSeqs[i]] = true;
}
nonce = nonce_;
_assertInvariant();
emit Seeded(refs.length, despawnRefs.length, nonce_);
}
// ------------------------------------------------------------------ views
/// @notice The invariant, as a number a caller can check without trusting us.
function accountedSupply() external view returns (uint256) {
return held + totalAllocated;
}
/// @notice How much supply is outstanding on one chain.
/// @param chainRef The chain.
/// @return The amount outstanding there.
function outstandingOn(bytes32 chainRef) external view returns (uint256) {
return allocatedTo[chainRef].outstanding;
}
// ------------------------------------------------------------- mutations
/**
* @notice Allocate PHI to an execution chain. The remote mint proves against
* the `Spawned` record this emits.
*
* @dev Debits `held` BEFORE anything can mint remotely, which is what makes
* "never mint on the destination before the burn on the source is
* confirmed" hold for this direction by construction.
*/
function spawn(
bytes32 chainRef,
uint256 amount,
uint64 anchorBlock,
FinalPqQuorum.Approval[] calldata approvals
) external returns (uint64 seq) {
uint256 k = threshold;
if (k == 0) revert NotConfigured();
if (amount == 0) revert ZeroAmount();
if (amount > held) revert InsufficientHeld(amount, held);
uint64 n = nonce;
FinalPqQuorum.require_(
registry,
approvals,
FinalPqQuorum.digest(
address(this), ACTION_SPAWN, anchorBlock, keccak256(abi.encode(n, chainRef, amount))
),
publisherRole,
k,
FinalPqQuorum.ALG_ML_DSA_87,
anchorBlock,
false
);
nonce = n + 1;
Allocation storage a = allocatedTo[chainRef];
unchecked {
// `amount <= held` was checked, and `totalAllocated + amount` cannot
// exceed TOTAL_SUPPLY for the same reason.
held -= amount;
a.outstanding += amount;
totalAllocated += amount;
}
a.epoch += 1;
_assertInvariant();
emit Spawned(chainRef, amount, a.outstanding, a.epoch, n);
return n;
}
/**
* @notice Return PHI from an execution chain, against a burn already
* performed there.
*
* @dev `originSeqId` is the despawn's sequence on the source chain and is
* consumed once. Gaps and out-of-order arrival are both normal — the
* source sequences, this does not re-order.
*/
function despawn(
bytes32 chainRef,
uint256 amount,
uint256 originSeqId,
uint64 anchorBlock,
FinalPqQuorum.Approval[] calldata approvals
) external {
uint256 k = threshold;
if (k == 0) revert NotConfigured();
if (amount == 0) revert ZeroAmount();
if (consumedDespawn[chainRef][originSeqId]) revert AlreadyConsumed(chainRef, originSeqId);
Allocation storage a = allocatedTo[chainRef];
if (amount > a.outstanding) revert InsufficientAllocation(chainRef, amount, a.outstanding);
uint64 n = nonce;
FinalPqQuorum.require_(
registry,
approvals,
FinalPqQuorum.digest(
address(this),
ACTION_DESPAWN,
anchorBlock,
keccak256(abi.encode(n, chainRef, amount, originSeqId))
),
publisherRole,
k,
FinalPqQuorum.ALG_ML_DSA_87,
anchorBlock,
false
);
nonce = n + 1;
consumedDespawn[chainRef][originSeqId] = true;
unchecked {
a.outstanding -= amount;
totalAllocated -= amount;
held += amount;
}
a.epoch += 1;
_assertInvariant();
emit Despawned(chainRef, amount, a.outstanding, a.epoch, originSeqId);
}
/**
* @notice Move allocation from one execution chain to another, in one record.
*
* @dev **Final Chain leads.** A cross-chain PHI transfer is: pre-approved
* intent → transfer lock on the source → finality → THIS → the target
* spawns → the source burns as the CLOSING step. Both allocations
* change here, together, before either chain acts, and `held` is
* untouched — the PHI is not leaving circulation, it is changing where
* it sits. Recorded as one mutation so there is no instant at which the
* per-chain amounts sum to anything but the same total.
*
* `spawn` / `despawn` stay for reconciliation, where `held` does move.
* Routing a transfer through them instead would pass through `held`
* and make a legacy-to-legacy move look, for one transaction, like a
* return to Final Chain that it is not.
*/
function move(
bytes32 source,
bytes32 target,
uint256 amount,
uint64 anchorBlock,
FinalPqQuorum.Approval[] calldata approvals
) external returns (uint64 seq) {
uint256 k = threshold;
if (k == 0) revert NotConfigured();
if (amount == 0) revert ZeroAmount();
if (source == bytes32(0) || target == bytes32(0) || source == target) revert InvalidMove(source, target);
Allocation storage from = allocatedTo[source];
if (amount > from.outstanding) revert InsufficientAllocation(source, amount, from.outstanding);
uint64 n = nonce;
FinalPqQuorum.require_(
registry,
approvals,
FinalPqQuorum.digest(
address(this), ACTION_MOVE, anchorBlock, keccak256(abi.encode(n, source, target, amount))
),
publisherRole,
k,
FinalPqQuorum.ALG_ML_DSA_87,
anchorBlock,
false
);
nonce = n + 1;
Allocation storage to = allocatedTo[target];
unchecked {
// `amount <= from.outstanding` was checked; `totalAllocated` is
// unchanged by construction, so the invariant cannot move.
from.outstanding -= amount;
to.outstanding += amount;
}
from.epoch += 1;
to.epoch += 1;
_assertInvariant();
emit Moved(source, target, amount, from.outstanding, to.outstanding, n);
return n;
}
// ---------------------------------------------------------------- internal
/**
* @dev The reason this contract exists, checked on every path that moves a
* number. Both mutations are written to preserve it by construction, so
* a revert here means a bug in this contract rather than bad input —
* which is exactly when an assertion earns its gas.
*/
function _assertInvariant() internal view {
if (held + totalAllocated != TOTAL_SUPPLY) revert SupplyInvariantBroken(held, totalAllocated);
}
// ------------------------------------------------------------------ sweep
/// @dev This contract's configuration gate reads the membership registry it
/// was constructed against, so the sweep authority reads the same one.
function _sweepRegistry() internal view override returns (FinalIdentityRegistry) {
return registry;
}
/// @dev The local `admin` first — the same address this contract's own
/// configuration gate accepts ahead of the registrar quorum — then the
/// plane rule. Zero once sealed, and `msg.sender` can never be zero, so the
/// leg closes with the window it belongs to.
function _requireSweepAuthority() internal view override {
if (admin != address(0) && msg.sender == admin) return;
super._requireSweepAuthority();
}
/// @dev The local admin, and the proven authority that called. The registry's
/// bootstrap admin is not named here because this contract answers to its
/// own admin during the window and to the registrar roster after it.
function _sweepDestinations() internal view override returns (address, address) {
return (admin, msg.sender);
}
/**
* @dev Nothing is reserved, because this contract holds nothing to reserve.
*
* `held`, `allocatedTo` and `totalAllocated` are LEDGER NUMBERS over the
* fixed 100M global supply — where PHI sits, not PHI sitting here. PHI is
* this chain's native asset and the allocation this contract accounts for
* lives in holders' balances and in the execution chains' `PHIToken`
* supplies; a spawn debits `held` and credits a chain, and neither leg
* moves value through this address. There is no payable entrypoint and no
* custody line, so any balance this contract carries arrived by accident
* and is stray in full.
*/
function _sweepReserved(SweepKind, address, uint256) internal pure override returns (uint256) {
return 0;
}
}
contracts/finalchain/FinalPlaneSweep.sol
// SPDX-License-Identifier: BUSL-1.1
// Copyright (c) 2024-2026 Final DeFi
// Licensed under the Business Source License 1.1 (the "License")
//
// Change Date: 2029-01-01
// Change License: GPL-2.0-or-later
//
// Additional Use Grant:
// 1. Any person or entity may inherit this mixin from a contract deployed as
// part of a Final DeFi Protocol state plane, and may operate the asset-rescue
// surface it completes.
// 2. Integrators, indexers and operators may call the resulting rescue surface
// where the state plane's own configuration authority permits it, and may
// read the authority and destination answers it gives.
// 3. For the avoidance of doubt, this Grant does NOT permit the commercial
// deployment of a Fork of this mixin or a competing state-plane rescue
// authority without permission prior to the Change Date.
//
// @author Final DeFi
// @version 1.0.0
pragma solidity ^0.8.20;
import {FinalSweep} from "../utils/FinalSweep.sol";
import {FinalIdentityRegistry} from "./FinalIdentityRegistry.sol";
/**
* @title Final Plane Sweep
* @notice The authority and destination halves of the shared asset-rescue surface, answered once for every
* contract of the protocol's own state plane.
* @dev `FinalSweep` gives every contract that can end up holding a stray asset one rescue surface and leaves two
* questions for the inheritor: who may call it, and where the value may go. Every contract on this state
* plane answers both the same way — the registry's bootstrap admin alone while that window is open, and the
* sealed registrar authority afterwards — and stating that once per contract would be one chance per
* contract to state it differently. An inheritor of this mixin answers a single question instead: which
* registry is mine.
*
* **The authority is the plane's own configuration gate, narrowed to what a fixed signature can carry.**
* The sealed half of that gate is a K-of-N over the registrar role, and its approvals arrive in CALLDATA.
* The rescue entrypoint's signature is shared across every contract on the plane and cannot grow a
* per-contract quorum argument, so what survives into a no-argument `internal view` is MEMBERSHIP: the
* bootstrap admin while the window is open, and afterwards any account the registry currently attests as a
* live registrar.
*
* That is a narrowing — one registrar rather than K of them — and it is deliberate rather than overlooked.
* Two other gates make it safe, and a registrar can widen neither:
*
* - a rescue moves SURPLUS only. Every contract that owes something declares the debt as a reservation,
* and no key reaches behind that line: an intent log's bonds, a billing plane's prepaid credit and a gas
* well's entire float are all unreachable by this surface however it is called.
* - the destination is not the caller's to invent.
*
* A registrar already configures tree writers, thresholds and consumers. An account that can decide who may
* write the account tree is not meaningfully restrained from moving a stray token, so demanding a quorum
* ceremony for the rescue lane would buy nothing and would instead guarantee the lane is never used when it
* is needed. No new role and no new authority pointer is introduced here: the registrar role is the
* registry's own, and membership in it moves in the registry rather than in any contract that reads it.
*
* **The destination is the authority that ordered the rescue.** This state plane has no treasury pointer,
* and adding one would be exactly the new authority this mixin is not allowed to invent — a per-contract
* treasury setter would need its own quorum action on every contract of the plane, to configure something
* the plane has never needed. So the two legitimate destinations are the two addresses already proven: the
* bootstrap admin, and the caller.
*
* The caller is not a free parameter. The rescue entrypoint proves the authority BEFORE it resolves
* destinations, so by the time this mixin is asked, the sender is already either the bootstrap admin or a
* live registrar. Every service on this chain is a Final Wallet with a registered identity and no EOA
* signing key, so the value lands on an account the chain itself attests to. What the gate rules out is the
* thing worth ruling out: a rescue paying an address the plane knows nothing about.
*
* Once the bootstrap window is sealed the admin address is zero, and the base contract refuses a zero
* destination, so the pair collapses to the caller alone — one legitimate destination, which is the case the
* base contract already handles.
*/
abstract contract FinalPlaneSweep is FinalSweep {
/// @notice The membership registry an inheriting contract's configuration gate reads.
/// @dev The one question this mixin leaves open, and the only line an inheritor has to supply. It exists
/// because some contracts of the plane hold the registry directly while others reach it through another
/// contract they already hold, and both must resolve to the SAME registry their configuration answers
/// to — a rescue authority read from a different source would be a second authority in disguise.
/// @return The registry whose bootstrap admin and registrar membership decide this contract's rescue
/// authority and destinations.
function _sweepRegistry() internal view virtual returns (FinalIdentityRegistry);
/// @notice The plane's configuration gate, in the caller-only form the shared rescue surface can express.
/// @dev Two accepting branches, checked in order: the bootstrap admin while the window is open, and any live
/// registrar once it is sealed. The bootstrap branch is guarded on the seal as well as on the address,
/// so it closes the moment the window does rather than depending on the admin field being cleared.
/// Membership is read live from the registry on every call, so revoking a registrar there revokes this
/// authority everywhere on the plane at once. Anything else reverts.
function _requireSweepAuthority() internal view virtual override {
FinalIdentityRegistry reg = _sweepRegistry();
if (!reg.bootstrapSealed() && msg.sender == reg.bootstrapAdmin()) return;
if (reg.hasRole(msg.sender, reg.ROLE_REGISTRAR())) return;
revert SweepUnauthorized(msg.sender);
}
/// @notice The two addresses a rescue on this plane may pay.
/// @dev The bootstrap admin, and the authority that called — which the base contract has already proven by
/// the time this is read, so the second is never an address of the caller's choosing. After the seal the
/// admin half is the zero address, which the base contract refuses as a destination, leaving the proven
/// caller as the single legitimate target.
/// @return The bootstrap admin, and the proven caller.
function _sweepDestinations() internal view virtual override returns (address, address) {
return (_sweepRegistry().bootstrapAdmin(), msg.sender);
}
}
contracts/finalchain/FinalPqQuorum.sol
// SPDX-License-Identifier: BUSL-1.1
// Copyright (c) 2024-2026 Final DeFi
// Licensed under the Business Source License 1.1 (the "License")
//
// Change Date: 2029-01-01
// Change License: GPL-2.0-or-later
//
// Additional Use Grant:
// 1. Any person or entity may deploy and operate this quorum as part of a
// Final DeFi Protocol chain, and may inherit it to gate an action behind a
// post-quantum K-of-N.
// 2. Integrators, auditors, and node operators may read its membership and
// thresholds and independently re-verify any approval it recorded, as part
// of their integration with the Final DeFi Protocol.
// 3. For the avoidance of doubt, this Grant does NOT permit the commercial
// deployment of a Fork of this quorum or a competing identity or
// authorization plane derived from it without permission prior to the
// Change Date.
//
// @author Final DeFi
// @version 1.0.0
pragma solidity ^0.8.20;
import {FinalChainPrecompiles} from "./FinalChainPrecompiles.sol";
import {FinalIdentityRegistry} from "./FinalIdentityRegistry.sol";
/**
* @title FinalPqQuorum
* @notice K-of-N approval where the signatures are post-quantum and the chain
* is what checks them.
*
* @dev This library is the reason Final Chain exists in this design.
*
* `FinalBackend/src/pq/credential.js` carries a rule it had to enforce in code
* because nothing else could: **a surface whose signature is verified on chain
* cannot be PQ.** A co-signer approval reaching `FinalRootAuthority` is checked
* by ECDSA/ERC-1271 in Solidity, so a PQ co-signer would produce approvals the
* contract cannot read, and the quorum would stop reaching threshold with
* nothing in any log naming the cause. `PQ_SURFACE` and `assertBackendVerified`
* exist to keep anyone from crossing that line by accident.
*
* Here the line is gone. The precompiles verify ML-DSA-87 and
* SLH-DSA-SHAKE-256s natively, so a quorum can be PQ *and* on chain, and
* "the backend says these four signatures verified" becomes "these four
* signatures verify, and any node re-derives that independently".
*
* ## Three rules, each closing a specific hole
*
* 1. **Keys come from the registry, never from calldata.** A key passed as an
* argument proves nothing — anyone with a keypair can sign under it. This is
* the difference between a 4-of-5 quorum and a 1-of-1 held by whoever built
* the transaction.
*
* 2. **Signers strictly ascending.** One comparison per entry rejects duplicates
* outright, so a single member cannot supply four approvals and satisfy a
* threshold of four. The alternative — an O(n²) seen-check — is the same
* guarantee with more ways to get it wrong.
*
* 3. **The digest binds chain id and verifying contract.** Without both, an
* approval collected for one contract is replayable against another with the
* same payload shape, and an approval from the test chain is replayable on
* the production one. These co-signers hold one key across environments.
*
* ## Which algorithm
*
* The stack splits its keys by hardness assumption, not by convenience:
* ML-DSA-87 (lattice) signs transactions, SLH-DSA-SHAKE-256s (hash-based) signs
* identity. Two families, so one cryptanalytic result cannot take both.
*
* So an action inherits the class of what it authorizes. Advancing a state root
* is operational and high-cadence: transaction class. Registering or revoking
* an identity is the thing the access class exists for. `ALG_ANY` is available
* and should be used sparingly — accepting either means a break in one family
* takes the quorum.
*
* An action that authorizes EXECUTION takes both: the ML-DSA-87 approval and a
* `seal`, an SLH-DSA-SHAKE-256s signature over the same digest by the member's
* `activeSeal` key. Neither family alone can then move funds, and the seal key
* is its own slot — never the access key — so the process that seals cannot
* also rotate the identity it seals for.
*
* Every digest binds an `anchorBlock`: the block at which the members read
* tree 1 to decide who is in the round. Binding it means every approval in a
* round was made against ONE roster view, and the window in `require_` means a
* view older than `ANCHOR_WINDOW` blocks is refused rather than honoured.
*
* The practical cost is worth stating: an SLH-DSA signature is 29,792 bytes, so
* a 4-of-5 access-class quorum is ~119 KB of calldata. That is affordable here
* only because this is our own chain. Do not carry this pattern to a chain
* where it is not.
*/
library FinalPqQuorum {
/// @notice ML-DSA-87 — FIPS 204. Algorithm ids are the FIPS numbers: the
/// same ids `FinalCertificate` and the backend registry use, and the numbers
/// the precompile addresses end in (`0x0204`).
uint8 internal constant ALG_ML_DSA_87 = 4;
/// @notice SLH-DSA-SHAKE-256s — FIPS 205 (`0x0205`).
uint8 internal constant ALG_SLH_DSA_SHAKE_256S = 5;
/// @notice Either scheme is acceptable for this action.
uint8 internal constant ALG_ANY = 0;
/// @notice How far behind the chain head an approval's anchor may sit.
/// @dev Members evaluate roster membership against tree 1 AT the anchor
/// block. 600 blocks is ten minutes at the chain's one-second cadence —
/// generous against a round that takes seconds, and short enough that a
/// roster rotated away is refused rather than counted.
uint64 internal constant ANCHOR_WINDOW = 600;
/// @dev Domain separator for every quorum digest. Distinct from any
/// EIP-712 domain in the stack: these are not typed-data signatures and
/// must not be confusable with one.
bytes32 internal constant DOMAIN_PQ_QUORUM = keccak256("FINAL_CHAIN_PQ_QUORUM_v01");
/// @notice One member's approval.
struct Approval {
/// The member's account, which is also the key it is looked up by.
address signer;
/// `ALG_ML_DSA_87` or `ALG_SLH_DSA_SHAKE_256S`.
uint8 algorithm;
/// Over the 32-byte digest from `digest()`, verbatim. Both schemes
/// hash internally, so the digest is not re-hashed before signing.
bytes signature;
/// SLH-DSA-SHAKE-256s over the same digest, by the member's `activeSeal`
/// key. Required where the action authorizes execution; empty otherwise.
bytes seal;
}
/// @notice Thrown when fewer valid approvals were supplied than the action requires.
/// @param valid Approvals that verified.
/// @param required Approvals the action demands.
error ThresholdNotMet(uint256 valid, uint256 required);
/// @notice Thrown when approvals are not in strictly ascending signer order.
/// @dev Ascending order is what makes duplicate detection a single comparison instead of a quadratic scan,
/// so it is the rule that stops one signer being counted twice toward a threshold.
/// @param previous The preceding signer.
/// @param next The signer that failed to exceed it.
error SignersNotAscending(address previous, address next);
/// @notice Thrown when an approving signer does not hold the role this action is gated on.
/// @param signer The approving signer.
/// @param roleMask The role the action requires.
error SignerLacksRole(address signer, uint256 roleMask);
/// @notice Thrown when an approval is signed under an algorithm this action does not accept.
/// @param signer The approving signer.
/// @param got The algorithm the approval declared.
/// @param required The algorithm the action demands.
error WrongAlgorithm(address signer, uint8 got, uint8 required);
/// @notice Thrown when an approval's signature fails verification in the precompile.
/// @param signer The approving signer.
/// @param algorithm The algorithm it was verified under.
error BadSignature(address signer, uint8 algorithm);
/// @notice Thrown when an approval's access seal fails verification.
/// @param signer The approving signer.
error BadSeal(address signer);
/// @notice Thrown when an approval anchors to a block this chain has not reached.
/// @param anchorBlock The block the approval anchored to.
/// @param blockNumber The current block.
error AnchorAhead(uint64 anchorBlock, uint256 blockNumber);
/// @notice Thrown when an approval's anchor is older than the accepted window.
/// @dev Bounding the window is what stops an approval collected once being replayed indefinitely later.
/// @param anchorBlock The block the approval anchored to.
/// @param blockNumber The current block.
error AnchorStale(uint64 anchorBlock, uint256 blockNumber);
/// @notice Thrown when an action is gated on a threshold of zero.
/// @dev Refused rather than treated as "no approvals needed": a zero threshold is always a
/// misconfiguration, and reading it as permissive would silently remove the quorum.
error ThresholdIsZero();
/**
* @notice The message every member of this quorum signs.
* @param verifyingContract The contract consuming the approvals. Binding it
* stops an approval collected for one contract being replayed
* against another with the same payload shape.
* @param actionDomain What is being authorized — a per-action constant, so
* an approval for "advance the accounts tree" cannot be replayed as
* one for "revoke an identity".
* @param anchorBlock The Final Chain block the members read tree 1 at to
* decide the roster. Bound here so every approval in a round names
* the same view; checked against `ANCHOR_WINDOW` by `require_`.
* @param payloadDigest The action's own committed content. Callers MUST
* include a nonce or a monotonic counter in it; nothing here can
* tell a replay of round 7 from a fresh round 7.
*/
function digest(
address verifyingContract,
bytes32 actionDomain,
uint64 anchorBlock,
bytes32 payloadDigest
) internal view returns (bytes32) {
return keccak256(
abi.encode(
DOMAIN_PQ_QUORUM,
block.chainid,
verifyingContract,
actionDomain,
anchorBlock,
payloadDigest
)
);
}
/**
* @notice Reverts unless at least `threshold` distinct members holding
* `roleMask` have signed `quorumDigest`.
* @param registry Where public keys and roles come from. Not a parameter
* for flexibility — a parameter so the caller's own immutable
* registry address is what is used, rather than one from calldata.
* @param requiredAlgorithm `ALG_ANY` to accept either scheme.
* @param anchorBlock The anchor the digest was built over. Refused if it is
* ahead of this block or more than `ANCHOR_WINDOW` behind it.
* @param requireSeal Whether every approval must also carry a valid `seal`
* by the member's `activeSeal` key — the execution class.
* @return valid The number of approvals that verified, which is at least
* `threshold` if this returns at all.
*
* @dev Every failure reverts with the offending signer named. A quorum that
* silently skipped bad approvals and counted the rest would let a
* misconfigured co-signer sit broken indefinitely: the threshold would keep
* being met by the others and nothing would say one member had stopped
* contributing. That is exactly the failure this program has already had,
* in `fanOut`, where a per-chain advance failure was recorded and execution
* continued.
*/
function require_(
FinalIdentityRegistry registry,
Approval[] calldata approvals,
bytes32 quorumDigest,
uint256 roleMask,
uint256 threshold,
uint8 requiredAlgorithm,
uint64 anchorBlock,
bool requireSeal
) internal view returns (uint256 valid) {
if (threshold == 0) revert ThresholdIsZero();
if (anchorBlock > block.number) revert AnchorAhead(anchorBlock, block.number);
if (block.number - anchorBlock > ANCHOR_WINDOW) revert AnchorStale(anchorBlock, block.number);
bytes memory message = abi.encodePacked(quorumDigest);
address previous = address(0);
uint256 n = approvals.length;
for (uint256 i = 0; i < n; i++) {
Approval calldata a = approvals[i];
// Strictly ascending. `address(0)` as the initial value works
// because it can never be a registered signer.
if (a.signer <= previous) revert SignersNotAscending(previous, a.signer);
previous = a.signer;
if (!registry.hasRole(a.signer, roleMask)) revert SignerLacksRole(a.signer, roleMask);
if (requiredAlgorithm != ALG_ANY && a.algorithm != requiredAlgorithm) {
revert WrongAlgorithm(a.signer, a.algorithm, requiredAlgorithm);
}
if (!_verify(registry, a, message)) revert BadSignature(a.signer, a.algorithm);
if (requireSeal && !_verifySeal(registry, a, message)) revert BadSeal(a.signer);
valid++;
}
if (valid < threshold) revert ThresholdNotMet(valid, threshold);
}
/// @notice Non-reverting form, for views and for callers that want to
/// report rather than refuse.
function count(
FinalIdentityRegistry registry,
Approval[] calldata approvals,
bytes32 quorumDigest,
uint256 roleMask,
uint8 requiredAlgorithm,
uint64 anchorBlock,
bool requireSeal
) internal view returns (uint256 valid) {
if (anchorBlock > block.number || block.number - anchorBlock > ANCHOR_WINDOW) return 0;
bytes memory message = abi.encodePacked(quorumDigest);
address previous = address(0);
uint256 n = approvals.length;
for (uint256 i = 0; i < n; i++) {
Approval calldata a = approvals[i];
if (a.signer <= previous) return valid;
previous = a.signer;
if (!registry.hasRole(a.signer, roleMask)) continue;
if (requiredAlgorithm != ALG_ANY && a.algorithm != requiredAlgorithm) continue;
if (!_verify(registry, a, message)) continue;
if (requireSeal && !_verifySeal(registry, a, message)) continue;
valid++;
}
}
/// @dev The seal: SLH-DSA-SHAKE-256s by the member's `activeSeal` key over
/// the same digest. A member with no seal key on record cannot seal, and an
/// approval with no seal bytes is not one.
function _verifySeal(
FinalIdentityRegistry registry,
Approval calldata a,
bytes memory message
) private view returns (bool) {
bytes memory key = registry.activeSealKeyOf(a.signer);
if (key.length == 0 || a.seal.length == 0) return false;
return FinalChainPrecompiles.verifySlhDsa(key, message, a.seal);
}
/// @dev Verifies one approval against the key the REGISTRY holds for that signer, never against a key
/// supplied in the approval. A key passed as an argument proves nothing, because anyone holding a
/// keypair can sign under it; reading from storage is what makes the verdict re-derivable from public
/// state rather than a claim by whoever assembled the call.
/// @param registry The identity registry that holds each signer's live keys.
/// @param a The approval being verified.
/// @param message The exact bytes the approval must cover.
/// @return valid True when the signature verifies under the signer's live key for the declared algorithm.
function _verify(
FinalIdentityRegistry registry,
Approval calldata a,
bytes memory message
) private view returns (bool) {
// The LIVE pair, always. The recovery pair authorizes rotating this
// account's own credentials and NOTHING else — a quorum that accepted
// it would hand the recovery keys everyday authority, which is exactly
// the separation the two stages exist to draw.
if (a.algorithm == ALG_ML_DSA_87) {
return FinalChainPrecompiles.verifyMlDsa87(
registry.activeTransactionKeyOf(a.signer), message, a.signature
);
}
if (a.algorithm == ALG_SLH_DSA_SHAKE_256S) {
return FinalChainPrecompiles.verifySlhDsa(
registry.activeAccessKeyOf(a.signer), message, a.signature
);
}
// Any other id is a refusal, never a default — including the KEM ids
// (3, 7) and the reserved FN-DSA id (6), none of which is a signature
// scheme this quorum verifies.
return false;
}
}
contracts/utils/FinalSweep.sol
// SPDX-License-Identifier: BUSL-1.1
// Copyright (c) 2024-2026 Final DeFi
// Licensed under the Business Source License 1.1 (the "License")
//
// Change Date: 2029-01-01
// Change License: GPL-2.0-or-later
//
// Additional Use Grant:
// 1. Any person or entity may inherit this sweep surface into contracts that
// integrate with the Final DeFi Protocol, in order to recover assets sent to
// them by mistake.
// 2. Protocol operators and integrators may call the sweep entrypoints it
// declares, subject to each inheriting contract's own authority and reserved
// balance rules, as part of their integration with the Final DeFi Protocol.
// 3. For the avoidance of doubt, this Grant does NOT permit the commercial
// deployment of a Fork of this sweep surface or a competing asset-recovery
// plane derived from it without permission prior to the Change Date.
//
// @author Final DeFi
// @version 1.0.0
pragma solidity ^0.8.20;
/// @notice The asset kinds a sweep can move. `Native` ignores `asset` and
/// `id`; `Erc20` ignores `id`; `Erc721` reads `id` as the token id and moves
/// exactly one; `Erc1155` reads both.
enum SweepKind { Native, Erc20, Erc721, Erc1155 }
/**
* @title Final Sweep
* @notice One sweep surface, on every contract of ours that can end up holding
* an asset it does not owe to anybody.
*
* @dev Assets arrive at protocol contracts that were never meant to hold them:
* a bridge delivers to the wrong leg, a user sends an ERC-20 to a registry, an
* airdrop lands on the gateway, an NFT is safe-transferred into the vault. Left
* alone that value is destroyed. The sweep is how it comes back — and the
* single rule it must never break is that a sweep moves SURPLUS and nothing
* else.
*
* Three seams make that rule per-contract:
*
* - `_requireSweepAuthority()` — the treasury role, expressed in whatever
* access plane the host contract already has (`FinalAccessController` roles,
* a cross-chain authority, a quorum). No new authority is introduced.
* - `_sweepDestinations()` — where a sweep may pay. Ours is a two-address
* answer because a contract normally has exactly two legitimate ones (the
* gateway and the treasury); a contract with one returns it twice.
* `FinalGateway` overrides `_requireSweepDestination` outright: the gateway
* is the drain of the whole system and sweeps ONWARD to anywhere.
* - `_sweepReserved(kind, asset, id)` — the part of the raw balance that is
* NOT surplus: fee deposits, the pending-settlement bucket, searcher
* collateral, settlement custody, vaulted entries, locked PHI. The default
* is zero, which is correct for a contract that custodies nothing; every
* contract that custodies something overrides it and is the one place the
* liability is stated.
*
* The surplus is measured LIVE against the raw balance at call time, so a
* re-entrant destination re-measures against a balance that already fell —
* there is no cached figure to double-spend. Nothing here writes storage, so
* there is no state for a callback to observe half-updated either.
*
* The three ERC-721/ERC-1155 receiver hooks are part of the same surface and
* for the same reason: `safeTransferFrom` reverts into a contract that does not
* answer them, so without these an NFT sent to one of ours does not land at
* all — which is not safety, it is a different way to lose it.
*/
abstract contract FinalSweep {
/// @notice `msg.sender` does not hold this contract's sweep authority.
error SweepUnauthorized(address caller);
/// @notice `to` is neither of this contract's sweep destinations.
error SweepDestinationNotAllowed(address to);
/// @notice The requested amount is above the surplus: the difference is
/// owed to somebody (a deposit, a custody total, a vaulted entry).
error SweepAboveSurplus(address asset, uint256 requested, uint256 surplus);
/// @notice A sweep of nothing.
error SweepZeroAmount();
/// @notice The transfer leg failed, or the token returned `false`.
error SweepTransferFailed(address asset);
/// @notice `amount` of `asset` (`id` for the non-fungible kinds) left this
/// contract for `to` under the sweep authority.
event AssetSwept(SweepKind indexed kind, address indexed asset, address indexed to, uint256 id, uint256 amount);
// ─────────────────────────────── seams ───────────────────────────────
/// @dev Reverts unless `msg.sender` may sweep. The host contract's own
/// treasury role — never a new one.
function _requireSweepAuthority() internal view virtual;
/// @dev The (at most two) addresses a sweep may pay. A contract with one
/// legitimate destination returns it twice.
function _sweepDestinations() internal view virtual returns (address a, address b);
/// @dev The part of the raw balance that is owed and therefore never
/// sweepable. Zero for a contract that custodies nothing.
function _sweepReserved(SweepKind, address, uint256) internal view virtual returns (uint256) {
return 0;
}
/// @dev Destination policy. Overridden by `FinalGateway`, which may sweep
/// onward to anywhere.
function _requireSweepDestination(address to) internal view virtual {
(address a, address b) = _sweepDestinations();
if (to == address(0) || (to != a && to != b)) revert SweepDestinationNotAllowed(to);
}
// ────────────────────────────── surface ──────────────────────────────
/// @notice The surplus of `asset` (`id` for the non-fungible kinds) — the
/// raw balance above everything this contract owes. What a sweep may move,
/// readable before calling one.
function sweepableSurplus(SweepKind kind, address asset, uint256 id) public view returns (uint256 surplus) {
uint256 raw = _rawBalance(kind, asset, id);
uint256 reserved = _sweepReserved(kind, asset, id);
return raw > reserved ? raw - reserved : 0;
}
/// @notice Move `amount` of an asset this contract does not owe to `to`.
/// @dev Role-gated, destination-gated and bounded by the live surplus. The
/// three gates are independent: a treasury key cannot pay a destination
/// the contract does not recognize, and neither key nor destination can
/// reach a wei that backs a liability.
/// @param kind Which asset kind is being moved.
/// @param asset Token contract; ignored for `Native`.
/// @param id Token id for `Erc721` / `Erc1155`; ignored otherwise.
/// @param amount Amount to move. `type(uint256).max` means the whole
/// surplus, which is what an operator draining a stray balance wants and
/// what avoids a race with an inflow landing between the read and the call.
/// @param to Destination.
/// @return moved Amount actually moved.
function sweepAsset(SweepKind kind, address asset, uint256 id, uint256 amount, address to)
external
returns (uint256 moved)
{
_requireSweepAuthority();
_requireSweepDestination(to);
uint256 surplus = sweepableSurplus(kind, asset, id);
moved = amount == type(uint256).max ? surplus : amount;
if (moved == 0) revert SweepZeroAmount();
if (moved > surplus) revert SweepAboveSurplus(asset, moved, surplus);
if (kind == SweepKind.Native) {
(bool ok,) = payable(to).call{value: moved}("");
if (!ok) revert SweepTransferFailed(address(0));
} else if (kind == SweepKind.Erc20) {
_callToken(asset, abi.encodeWithSelector(0xa9059cbb, to, moved)); // transfer(address,uint256)
} else if (kind == SweepKind.Erc721) {
// `transferFrom`, not `safeTransferFrom`: a rescue must not fail
// because the treasury destination declines a hook. Which
// destination is legitimate is already decided above.
moved = 1;
_callToken(asset, abi.encodeWithSelector(0x23b872dd, address(this), to, id)); // transferFrom
} else {
_callToken(
asset,
abi.encodeWithSelector(0xf242432a, address(this), to, id, moved, "") // safeTransferFrom(...)
);
}
emit AssetSwept(kind, asset, to, id, moved);
}
// ───────────────────────────── receivers ─────────────────────────────
/// @notice Accept safe ERC-721 transfers, so one sent here is recoverable
/// rather than rejected at the door.
function onERC721Received(address, address, uint256, bytes calldata) external pure virtual returns (bytes4) {
return 0x150b7a02;
}
/// @notice Accept safe ERC-1155 single transfers.
function onERC1155Received(address, address, uint256, uint256, bytes calldata)
external
pure
virtual
returns (bytes4)
{
return 0xf23a6e61;
}
/// @notice Accept safe ERC-1155 batch transfers.
function onERC1155BatchReceived(address, address, uint256[] calldata, uint256[] calldata, bytes calldata)
external
pure
virtual
returns (bytes4)
{
return 0xbc197c81;
}
// ───────────────────────────── internals ─────────────────────────────
/// @dev The raw held amount, before anything owed is subtracted.
function _rawBalance(SweepKind kind, address asset, uint256 id) internal view returns (uint256) {
if (kind == SweepKind.Native) return address(this).balance;
if (kind == SweepKind.Erc20) {
(bool ok, bytes memory ret) = asset.staticcall(abi.encodeWithSelector(0x70a08231, address(this)));
return (ok && ret.length >= 32) ? abi.decode(ret, (uint256)) : 0;
}
if (kind == SweepKind.Erc721) {
(bool ok, bytes memory ret) = asset.staticcall(abi.encodeWithSelector(0x6352211e, id)); // ownerOf
return (ok && ret.length >= 32 && abi.decode(ret, (address)) == address(this)) ? 1 : 0;
}
(bool ok1155, bytes memory ret1155) =
asset.staticcall(abi.encodeWithSelector(0x00fdd58e, address(this), id)); // balanceOf(address,uint256)
return (ok1155 && ret1155.length >= 32) ? abi.decode(ret1155, (uint256)) : 0;
}
/// @dev One transfer leg, tolerant of the legacy no-return ERC-20 shape the
/// way `FinalDeployer`'s rescue helpers are: success is "the call did not
/// revert AND it did not return `false`".
function _callToken(address token, bytes memory data) private {
if (token.code.length == 0) revert SweepTransferFailed(token);
(bool ok, bytes memory ret) = token.call(data);
if (!ok || (ret.length != 0 && !abi.decode(ret, (bool)))) revert SweepTransferFailed(token);
}
}
abi
[
{
"type": "constructor",
"inputs": [
{
"name": "registry_",
"type": "address",
"internalType": "contract FinalIdentityRegistry"
},
{
"name": "admin_",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "ACTION_CONFIGURE",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "ACTION_SEED",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "TOTAL_SUPPLY",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "accountedSupply",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "admin",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "allocatedTo",
"inputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [
{
"name": "outstanding",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "epoch",
"type": "uint64",
"internalType": "uint64"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "configure",
"inputs": [
{
"name": "role",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "k",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "anchorBlock",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "approvals",
"type": "tuple[]",
"internalType": "struct FinalPqQuorum.Approval[]",
"components": [
{
"name": "signer",
"type": "address",
"internalType": "address"
},
{
"name": "algorithm",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "signature",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "seal",
"type": "bytes",
"internalType": "bytes"
}
]
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "consumedDespawn",
"inputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "despawn",
"inputs": [
{
"name": "chainRef",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "originSeqId",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "anchorBlock",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "approvals",
"type": "tuple[]",
"internalType": "struct FinalPqQuorum.Approval[]",
"components": [
{
"name": "signer",
"type": "address",
"internalType": "address"
},
{
"name": "algorithm",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "signature",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "seal",
"type": "bytes",
"internalType": "bytes"
}
]
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "held",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "move",
"inputs": [
{
"name": "source",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "target",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "anchorBlock",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "approvals",
"type": "tuple[]",
"internalType": "struct FinalPqQuorum.Approval[]",
"components": [
{
"name": "signer",
"type": "address",
"internalType": "address"
},
{
"name": "algorithm",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "signature",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "seal",
"type": "bytes",
"internalType": "bytes"
}
]
}
],
"outputs": [
{
"name": "seq",
"type": "uint64",
"internalType": "uint64"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "nonce",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint64",
"internalType": "uint64"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "onERC1155BatchReceived",
"inputs": [
{
"name": "",
"type": "address",
"internalType": "address"
},
{
"name": "",
"type": "address",
"internalType": "address"
},
{
"name": "",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [
{
"name": "",
"type": "bytes4",
"internalType": "bytes4"
}
],
"stateMutability": "pure"
},
{
"type": "function",
"name": "onERC1155Received",
"inputs": [
{
"name": "",
"type": "address",
"internalType": "address"
},
{
"name": "",
"type": "address",
"internalType": "address"
},
{
"name": "",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [
{
"name": "",
"type": "bytes4",
"internalType": "bytes4"
}
],
"stateMutability": "pure"
},
{
"type": "function",
"name": "onERC721Received",
"inputs": [
{
"name": "",
"type": "address",
"internalType": "address"
},
{
"name": "",
"type": "address",
"internalType": "address"
},
{
"name": "",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [
{
"name": "",
"type": "bytes4",
"internalType": "bytes4"
}
],
"stateMutability": "pure"
},
{
"type": "function",
"name": "outstandingOn",
"inputs": [
{
"name": "chainRef",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "publisherRole",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "registry",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract FinalIdentityRegistry"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "seal",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "seed",
"inputs": [
{
"name": "refs",
"type": "bytes32[]",
"internalType": "bytes32[]"
},
{
"name": "outstanding",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "epochs",
"type": "uint64[]",
"internalType": "uint64[]"
},
{
"name": "despawnRefs",
"type": "bytes32[]",
"internalType": "bytes32[]"
},
{
"name": "despawnSeqs",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "nonce_",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "anchorBlock",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "approvals",
"type": "tuple[]",
"internalType": "struct FinalPqQuorum.Approval[]",
"components": [
{
"name": "signer",
"type": "address",
"internalType": "address"
},
{
"name": "algorithm",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "signature",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "seal",
"type": "bytes",
"internalType": "bytes"
}
]
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "spawn",
"inputs": [
{
"name": "chainRef",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "anchorBlock",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "approvals",
"type": "tuple[]",
"internalType": "struct FinalPqQuorum.Approval[]",
"components": [
{
"name": "signer",
"type": "address",
"internalType": "address"
},
{
"name": "algorithm",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "signature",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "seal",
"type": "bytes",
"internalType": "bytes"
}
]
}
],
"outputs": [
{
"name": "seq",
"type": "uint64",
"internalType": "uint64"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "sweepAsset",
"inputs": [
{
"name": "kind",
"type": "uint8",
"internalType": "enum SweepKind"
},
{
"name": "asset",
"type": "address",
"internalType": "address"
},
{
"name": "id",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "to",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "moved",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "sweepableSurplus",
"inputs": [
{
"name": "kind",
"type": "uint8",
"internalType": "enum SweepKind"
},
{
"name": "asset",
"type": "address",
"internalType": "address"
},
{
"name": "id",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "surplus",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "threshold",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "totalAllocated",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "event",
"name": "AssetSwept",
"inputs": [
{
"name": "kind",
"type": "uint8",
"indexed": true,
"internalType": "enum SweepKind"
},
{
"name": "asset",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "to",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "id",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Despawned",
"inputs": [
{
"name": "chainRef",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "outstanding",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "epoch",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
},
{
"name": "originSeqId",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Moved",
"inputs": [
{
"name": "source",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "target",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "sourceOutstanding",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "targetOutstanding",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "seq",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Sealed",
"inputs": [],
"anonymous": false
},
{
"type": "event",
"name": "Seeded",
"inputs": [
{
"name": "allocations",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "despawns",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "nonce",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Spawned",
"inputs": [
{
"name": "chainRef",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "outstanding",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "epoch",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
},
{
"name": "seq",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
}
],
"anonymous": false
},
{
"type": "event",
"name": "SupplyConfigured",
"inputs": [
{
"name": "role",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "threshold",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "error",
"name": "AlreadyConsumed",
"inputs": [
{
"name": "chainRef",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "originSeqId",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"type": "error",
"name": "AnchorAhead",
"inputs": [
{
"name": "anchorBlock",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "blockNumber",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"type": "error",
"name": "AnchorStale",
"inputs": [
{
"name": "anchorBlock",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "blockNumber",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"type": "error",
"name": "BadSeal",
"inputs": [
{
"name": "signer",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "BadSignature",
"inputs": [
{
"name": "signer",
"type": "address",
"internalType": "address"
},
{
"name": "algorithm",
"type": "uint8",
"internalType": "uint8"
}
]
},
{
"type": "error",
"name": "InsufficientAllocation",
"inputs": [
{
"name": "chainRef",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "want",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "have",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"type": "error",
"name": "InsufficientHeld",
"inputs": [
{
"name": "want",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "have",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"type": "error",
"name": "InvalidMove",
"inputs": [
{
"name": "source",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "target",
"type": "bytes32",
"internalType": "bytes32"
}
]
},
{
"type": "error",
"name": "NotAdmin",
"inputs": [
{
"name": "caller",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "NotConfigured",
"inputs": []
},
{
"type": "error",
"name": "NotFresh",
"inputs": []
},
{
"type": "error",
"name": "SeedRefRepeated",
"inputs": [
{
"name": "chainRef",
"type": "bytes32",
"internalType": "bytes32"
}
]
},
{
"type": "error",
"name": "SeedShapeMismatch",
"inputs": []
},
{
"type": "error",
"name": "SignerLacksRole",
"inputs": [
{
"name": "signer",
"type": "address",
"internalType": "address"
},
{
"name": "roleMask",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"type": "error",
"name": "SignersNotAscending",
"inputs": [
{
"name": "previous",
"type": "address",
"internalType": "address"
},
{
"name": "next",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "SupplyInvariantBroken",
"inputs": [
{
"name": "held",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "allocated",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"type": "error",
"name": "SweepAboveSurplus",
"inputs": [
{
"name": "asset",
"type": "address",
"internalType": "address"
},
{
"name": "requested",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "surplus",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"type": "error",
"name": "SweepDestinationNotAllowed",
"inputs": [
{
"name": "to",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "SweepTransferFailed",
"inputs": [
{
"name": "asset",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "SweepUnauthorized",
"inputs": [
{
"name": "caller",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "SweepZeroAmount",
"inputs": []
},
{
"type": "error",
"name": "ThresholdIsZero",
"inputs": []
},
{
"type": "error",
"name": "ThresholdNotMet",
"inputs": [
{
"name": "valid",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "required",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"type": "error",
"name": "ThresholdUnreachable",
"inputs": [
{
"name": "live",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "wanted",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"type": "error",
"name": "WrongAlgorithm",
"inputs": [
{
"name": "signer",
"type": "address",
"internalType": "address"
},
{
"name": "got",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "required",
"type": "uint8",
"internalType": "uint8"
}
]
},
{
"type": "error",
"name": "ZeroAmount",
"inputs": []
}
]read contract
bytecode · 9,831 bytes
0x6101a0806040526004361015610013575f80fd5b5f610160525f3560e01c9081620b82b5146119c95750806307a96b5c14611778578063150b7a02146117225780633fb27b85146116b457806342cde4e81461169757806345f7f2491461167a57806360a180081461164657806372f56b2c1461160c5780637b103999146115c85780638d0de2411461158c5780638eae91b214611563578063902d55a51461153e57806394bc4e961461125e57806396f51f3a14610fbb578063a1aab18c146107f1578063a285aed7146107d1578063a2c7376c146105dd578063affed0e0146105b4578063b19f480514610577578063bc197c81146104df578063e1c783cb146104af578063e96b9491146101de578063f23a6e6114610188578063f4e885db146101685763f851a44014610134575f80fd5b3461016157610160513660031901126101615761016051546040516001600160a01b039091168152602090f35b6101605180fd5b346101615761016051366003190112610161576020600154604051908152f35b346101615760a0366003190112610161576101a1611a5b565b506101aa611a71565b506084356001600160401b038111610161576101ca903690600401611a9b565b505060405163f23a6e6160e01b8152602090f35b346101615760a0366003190112610161576044356004356024356102006119ff565b916084356001600160401b03811161016157610220903690600401611a2b565b939060025491821561049a578615610485578315801561047d575b8015610474575b6104565783610160515260046020526040610160512092835480891161043657509260809261037c602099937f918413a673b69ea329c13b81535c07cd4e55e8544a26871a6f0d841f203af09996600654936001600160401b0385169b8c6040518f81019182528c60408201528d6060820152898b8201528a81526102c860a082611ac8565b51902061016051506040518f8101917fd850f5df47b124511e8e6ec99cf1a0beaf7c6237eff0a31305ce53d85f31267583524660408301523060608301527f5315ade0aa736cdc5532fa19a1ed12e3ce89b6ad07040b14bac780938e50423b8c8301526001600160401b03871660a083015260c082015260c0815261034e60e082611ac8565b51902090600154927f00000000000000000000000070b4f3c06e5d93d695129f1255c55c01e7be13bf611ca5565b506001600160401b0361038e89611afd565b16906001600160401b03191617600655856101605152600488526040610160512090828154038155828254018255600181016001600160401b036103d481835416611afd565b166001600160401b0319825416179055600182016001600160401b036103fc81835416611afd565b166001600160401b0319825416179055610414611f17565b54905490604051928352888301526040820152856060820152a3604051908152f35b8886637c06acb760e11b6101605152600452602452604452606461016051fd5b50505063108b161760e01b6101605152600452602452604461016051fd5b50848414610242565b50841561023b565b631f2a200560e01b6101605152600461016051fd5b63d311bc3960e01b6101605152600461016051fd5b34610161576020366003190112610161576004356101605152600460205260206040610160512054604051908152f35b346101615760a0366003190112610161576104f8611a5b565b50610501611a71565b506044356001600160401b03811161016157610521903690600401611a2b565b50506064356001600160401b03811161016157610542903690600401611a2b565b50506084356001600160401b03811161016157610563903690600401611a9b565b505060405163bc197c8160e01b8152602090f35b3461016157610160513660031901126101615760206040517fbc5858e168b959a61a8fb2d7957ef31dbed683a362770ca030e5d772cc44e0688152f35b3461016157610160513660031901126101615760206001600160401b0360065416604051908152f35b34610161576080366003190112610161576004356024356105fc611a15565b916064356001600160401b0381116101615761061c903690600401611a2b565b929060025494851561049a57821561048557600354958684116107b4579560809261071f7f4565741fc5c16ad3a3a3fbbf4311621df9850edf4097f549079a6855d21331359593602099600654936001600160401b0385169a6040518d8101908d82528c6040820152896060820152606081526106998b82611ac8565b51902061016051506040518e8101917fd850f5df47b124511e8e6ec99cf1a0beaf7c6237eff0a31305ce53d85f31267583524660408301523060608301527fef06d5e846d5c9e7b4cf0eb3e3b66d716af68a3cea05cd7bc7743bbc177405228c8301526001600160401b03871660a083015260c082015260c0815261034e60e082611ac8565b506001600160401b0361073188611afd565b16906001600160401b03191617600655846101605152600487528160406101605120910360035581815401815581600554016005556001600160401b0360018201918161078081855416611afd565b168219845416178355610791611f17565b5491541690604051928352878301526040820152846060820152a2604051908152f35b8684631125005160e21b6101605152600452602452604461016051fd5b346101615761016051366003190112610161576020600354604051908152f35b3461016157610100366003190112610161576004356001600160401b03811161016157610822903690600401611a2b565b610180526024356001600160401b03811161016157610845903690600401611a2b565b6044929192356001600160401b03811161016157610867903690600401611a2b565b60a0526080526064356001600160401b0381116101615761088c903690600401611a2b565b61012052610100526084356001600160401b038111610161576108b3903690600401611a2b565b60c05260e05260a4356101408190526001600160401b03811690036101615760c4356001600160401b03811681036101615760e4356001600160401b03811161016157610904903690600401611a2b565b6040516328305db160e21b81529091906020816004817f00000000000000000000000070b4f3c06e5d93d695129f1255c55c01e7be13bf6001600160a01b03165afa908115610e18576101605191610f8c575b508015610efa575b610c47575b5050506001600160401b036006541615801590610c3c575b610c2757806101805114801590610c18575b610be15760c0516101205103610be1576101605192839291905b610180518410610b0557846a52b7d2dcc80cd2e40000008111610ade57806005556a52b7d2dcc80cd2e4000000036a52b7d2dcc80cd2e40000008111610ac457600355610160515b610120518110610a6f576001600160401b0361014051166001600160401b03196006541617600655610a20611f17565b7fb04da588109787f2e1bce4cc15cc0e414cae26034cea4902695311f75568bf8760606040516101805181526101205160208201526001600160401b0361014051166040820152a16101605180f35b80610a836001926101205161010051611c4b565b356101605152600760205260406101605120610aa48260c05160e051611c4b565b356101605152602052604061016051208260ff19825416179055016109f0565b634e487b7160e01b61016051526011600452602461016051fd5b631125005160e21b61016051526004526a52b7d2dcc80cd2e4000000602452604461016051fd5b90919293610b17856101805186611c4b565b35158015610bf6575b610be157610b32856101805186611c4b565b35610160515260046020526040610160512060018101906001600160401b03825416610bb95791610baf91600193610b6b898888611c4b565b3590556001600160401b03610b8d610b888a60a051608051611c4b565b611c6f565b166001600160401b0319825416179055610ba8878686611c4b565b3590611b48565b94019291906109a8565b610bc887876101805190611c4b565b3563724ac17360e01b6101605152600452602461016051fd5b63200ff7d760e11b6101605152600461016051fd5b506001600160401b03610c11610b888760a051608051611c4b565b1615610b20565b5060a05161018051141561098e565b63dc63d81f60e01b6101605152600461016051fd5b50600554151561097c565b60405160c060208201526020610c7a610c6760e08401610180518a611c27565b838103601f19016040850152878a611c27565b601f1983820301606084015260a05181520181608051610160515b60a0518110610ec8575050610cda610cc3610cfa93601f198482030160808501526101205161010051611c27565b828103601f190160a084015260c05160e051611c27565b6001600160401b03610140511660c083015203601f198101835282611ac8565b80516020909101206001600160a01b037f00000000000000000000000070b4f3c06e5d93d695129f1255c55c01e7be13bf163b156101615782906001600160401b03604051956322f3f44760e11b8752610160515060848701927f08296c4851c7aca93c422c73902d61d179ed1bf52cf0ed257e6d096b9a8bb85160048901526024880152166044860152608060648601525260a4830160a060048460051b86010101928261016051905b828210610e2657505061016051938593508390039150829050837f00000000000000000000000070b4f3c06e5d93d695129f1255c55c01e7be13bf6001600160a01b03165af18015610e1857610dfd575b8080610964565b61016051610e0a91611ac8565b610160516101615783610df6565b6040513d61016051823e3d90fd5b9091929394609f19600319888303010185528535607e19833603018112156101615782016001600160a01b03610e5b82611a87565b16825260208101359160ff831680930361016157610ebb602092826001958580950152610ead610ea2610e916040850185611b55565b608060408601526080850191611b86565b926060810190611b55565b916060818503910152611b86565b9701950193920190610da5565b91509161016051508235906001600160401b038216809203610161576020816001938293520193019101908391610c95565b5060405163f5778b0360e01b81526020816004817f00000000000000000000000070b4f3c06e5d93d695129f1255c55c01e7be13bf6001600160a01b03165afa908115610e18576101605191610f5d575b506001600160a01b031633141561095f565b610f7f915060203d602011610f85575b610f778183611ac8565b810190611c08565b87610f4b565b503d610f6d565b610fae915060203d602011610fb4575b610fa68183611ac8565b810190611bf0565b87610957565b503d610f9c565b346101615760a036600319011261016157600435600481101561016157610fe0611a71565b90606435906084356001600160a01b0381169160443591838103610161576110066120a9565b61016051548415906001600160a01b03168115611243575b5061122a5761102e838784611b2f565b945f1981036112255750845b80958115611210578082116111e557506101605191836110f05750506101605180808088885af1611069611bc1565b50156110d4575b6110ba57604080519283526020838101869052956001600160a01b0316927f7643c83e539cea2f6bf506545392e52cfd5f917e327efbcd0ba28f29c28d042e9190a4604051908152f35b634e487b7160e01b61016051526021600452602461016051fd5b6365f4a9ef60e11b610160515261016051600452602461016051fd5b610160519250906001840361114d575060405163a9059cbb60e01b60208201526001600160a01b039091166024820152604481018690526111489061114281606481015b03601f198101835282611ac8565b876120d7565b611070565b610160519692509050600283036111975750506001936111486040516323b872dd60e01b602082015230602482015285604482015284606482015260648152611142608482611ac8565b6111489060409692965190637921219560e11b6020830152306024830152866044830152856064830152608482015260a060a48201526101605160c482015260c4815261114260e482611ac8565b6101608051632190968160e01b90526001600160a01b03891660045260249290925260445251606490fd5b637c2e506f60e11b6101605152600461016051fd5b61103a565b836315150d4d60e31b6101605152600452602461016051fd5b905084141580611254575b8761101e565b503384141561124e565b346113a25760803660031901126113a25760243560043561127d611a15565b6064356001600160401b0381116113a25761129c903690600401611a2b565b5f546001600160a01b031633036113ae575b505050816112f6575b807f43c4ef2494de90aa2f24830e48f3dc8579dec67c48d59b2ffba50c125576d4c4926040926001558060025582519182526020820152a16101605180f35b60405163342f616360e01b8152600481018290526020816024817f00000000000000000000000070b4f3c06e5d93d695129f1255c55c01e7be13bf6001600160a01b03165afa908115610e18576101605191611378575b5082811061135b57506112b7565b9050633770da3360e11b6101605152600452602452604461016051fd5b90506020813d6020116113a6575b8161139360209383611ac8565b810103126113a257518361134d565b5f80fd5b3d9150611386565b60408051602081018681528183018890529181527f00000000000000000000000070b4f3c06e5d93d695129f1255c55c01e7be13bf6001600160a01b03169391906113fa606082611ac8565b519020833b156113a25790826001600160401b039593926040519687956322f3f44760e11b875260848701927fbc5858e168b959a61a8fb2d7957ef31dbed683a362770ca030e5d772cc44e06860048901526024880152166044860152608060648601525260a4830160a060048460051b8601010192825f90607e19813603015b8383106114c65750505050505091815f818582965003925af180156114bb576114a6575b80806112ae565b5f6114b091611ac8565b5f610160528261149f565b6040513d5f823e3d90fd5b60a3198a8803018552949650929491939092918635828112156113a25783016001600160a01b036114f682611a87565b16825260208101359160ff83168093036113a25761152c602092826001958580950152610ead610ea2610e916040850185611b55565b9801960193019091889695949261147b565b346113a2575f3660031901126113a25760206040516a52b7d2dcc80cd2e40000008152f35b346113a2575f3660031901126113a257602061158460035460055490611b48565b604051908152f35b346113a25760203660031901126113a2576004355f5260046020526040805f206001600160401b03600182549201541682519182526020820152f35b346113a2575f3660031901126113a2576040517f00000000000000000000000070b4f3c06e5d93d695129f1255c55c01e7be13bf6001600160a01b03168152602090f35b346113a2575f3660031901126113a25760206040517f08296c4851c7aca93c422c73902d61d179ed1bf52cf0ed257e6d096b9a8bb8518152f35b346113a25760603660031901126113a25760043560048110156113a257611584602091611671611a71565b60443591611b2f565b346113a2575f3660031901126113a2576020600554604051908152f35b346113a2575f3660031901126113a2576020600254604051908152f35b346113a2575f3660031901126113a2575f546001600160a01b038116330361170f576bffffffffffffffffffffffff60a01b165f557f1b2d71eb44f882534bf4e86f940c56ccc869ffb927e2bab86561de93950c22165f80a1005b630bd4212160e11b5f523360045260245ffd5b346113a25760803660031901126113a25761173b611a5b565b50611744611a71565b506064356001600160401b0381116113a257611764903690600401611a9b565b5050604051630a85bd0160e11b8152602090f35b346113a25760a03660031901126113a25760043560243560443561179a6119ff565b6084356001600160401b0381116113a2576117b9903690600401611a2b565b909160025480156119ba5785156119ab57865f52600760205260405f20855f5260205260ff60405f20541661199457865f52600460205260405f2093845480881161197a57506118eb886118e57f3ef380598f06b01333350e61cefa066c10a2088a64ad65aadd22eda04b972b8999979560809997956001600160401b03956006549787891695604051602081019188835260408201528d60608201528c8f8201528e815261186960a082611ac8565b51902060405160208101917fd850f5df47b124511e8e6ec99cf1a0beaf7c6237eff0a31305ce53d85f31267583524660408301523060608301528f7f07e27cdd90594a3caa105e64724b3ff44d247017420d1a3df2cc49fa10cdf0f5908301528a871660a083015260c082015260c0815261034e60e082611ac8565b50611afd565b16906001600160401b03191617600655855f52600760205260405f20825f5260205260405f20600160ff19825416179055828154038155826005540360055582600354016003556001600160401b0360018201918161194c81855416611afd565b16821984541617835561195d611f17565b5491541690604051938452602084015260408301526060820152a2005b8789637c06acb760e11b5f5260045260245260445260645ffd5b8487630dd4fdfd60e21b5f5260045260245260445ffd5b631f2a200560e01b5f5260045ffd5b63d311bc3960e01b5f5260045ffd5b346113a25760403660031901126113a2576020906004355f526007825260405f206024355f52825260ff60405f20541615158152f35b606435906001600160401b03821682036113a257565b604435906001600160401b03821682036113a257565b9181601f840112156113a2578235916001600160401b0383116113a2576020808501948460051b0101116113a257565b600435906001600160a01b03821682036113a257565b602435906001600160a01b03821682036113a257565b35906001600160a01b03821682036113a257565b9181601f840112156113a2578235916001600160401b0383116113a257602083818601950101116113a257565b90601f801991011681019081106001600160401b03821117611ae957604052565b634e487b7160e01b5f52604160045260245ffd5b6001600160401b036001911601906001600160401b038211611b1b57565b634e487b7160e01b5f52601160045260245ffd5b90611b3a9291611f52565b8015611b435790565b505f90565b91908201809211611b1b57565b9035601e19823603018112156113a25701602081359101916001600160401b0382116113a25781360383136113a257565b908060209392818452848401375f828201840152601f01601f1916010190565b6001600160401b038111611ae957601f01601f191660200190565b3d15611beb573d90611bd282611ba6565b91611be06040519384611ac8565b82523d5f602084013e565b606090565b908160209103126113a2575180151581036113a25790565b908160209103126113a257516001600160a01b03811681036113a25790565b81835290916001600160fb1b0383116113a25760209260051b809284830137010190565b9190811015611c5b5760051b0190565b634e487b7160e01b5f52603260045260245ffd5b356001600160401b03811681036113a25790565b356001600160a01b03811681036113a25790565b3560ff811681036113a25790565b94939195965f978515611f08576001600160401b0316438111611ef257804303438111611b1b5761025810611edc575060405193602085015260208452611ced604085611ac8565b5f945f985b888a1015611eb2578960051b840135607e19853603018112156113a257840196611d1b88611c83565b6001600160a01b039182169116811015611e865750611d3987611c83565b96611d7a602087611d4984611c83565b604051632e4bfa5160e11b81526001600160a01b039091166004820152602481019190915291829081906044820190565b03816001600160a01b038e165afa9081156114bb575f91611e68575b5015611e41576020810190600460ff611dae84611c97565b1603611e0e57611dbf88828c612241565b15611dda5750505f198114611b1b576001998a019901611cf2565b90611def611de960ff93611c83565b91611c97565b9063bbf82ba360e01b5f5260018060a01b03166004521660245260445ffd5b90611e1d611de960ff93611c83565b9063587548c360e11b5f5260018060a01b031660045216602452600460445260645ffd5b611e4b8691611c83565b63ae8bb03960e01b5f5260018060a01b031660045260245260445ffd5b611e80915060203d8111610fb457610fa68183611ac8565b5f611d96565b611e8f88611c83565b6311641feb60e21b5f9081526004929092526001600160a01b0316602452604490fd5b98509550955050505050808310611ec65750565b826305bc216760e51b5f5260045260245260445ffd5b630ed38fd160e41b5f526004524360245260445ffd5b637b51505560e01b5f526004524360245260445ffd5b631fc460bf60e11b5f5260045ffd5b600354600554906a52b7d2dcc80cd2e4000000611f348383611b48565b03611f3d575050565b63e0724a2b60e01b5f5260045260245260445ffd5b90600482101561209557811561208e575f9283926001811461206557600214611fdd57604051627eeac760e11b602082019081523060248301526044820192909252611fa18160648101611134565b51915afa611fad611bc1565b9080611fd1575b15611b4357602081519181808201938492010103126113a2575190565b50602081511015611fb4565b60405160208101916331a9108f60e11b8352602482015260248152612003604482611ac8565b51915afa61200f611bc1565b81612057575b8161202a575b501561202657600190565b5f90565b90506020818051810103126113a257602001516001600160a01b038116908190036113a25730145f61201b565b905060208151101590612015565b505060405160208101906370a0823160e01b825230602482015260248152611fa1604482611ac8565b5050504790565b634e487b7160e01b5f52602160045260245ffd5b5f546001600160a01b031680151590816120cd575b506120cb576120cb612386565b565b905033145f6120be565b90813b15612156575f816020829351910182855af16120f4611bc1565b9015908115612126575b506121065750565b6365f4a9ef60e11b5f9081526001600160a01b0391909116600452602490fd5b805180151592508261213b575b50505f6120fe565b61214e9250602080918301019101611bf0565b155f80612133565b506365f4a9ef60e11b5f9081526001600160a01b0391909116600452602490fd5b6020818303126113a2578051906001600160401b0382116113a2570181601f820112156113a2578051906121aa82611ba6565b926121b86040519485611ac8565b828452602083830101116113a257815f9260208093018386015e8301015290565b903590601e19813603018212156113a257018035906001600160401b0382116113a2576020019181360383136113a257565b92919261221782611ba6565b916122256040519384611ac8565b8294818452818301116113a2578281602093845f960137010152565b9160208201600460ff61225383611c97565b16146123055760ff612266600592611c97565b1614612273575050505f90565b5f61227d83611c83565b604051639e5adaeb60e01b81526001600160a01b0391821660048201529485916024918391165afa9182156114bb576122d6935f936122d9575b506122c98160406122d09301906121d9565b369161220b565b916125eb565b90565b6122d09193506122fd6122c9913d805f833e6122f58183611ac8565b810190612177565b9391506122b7565b505f61231083611c83565b60405163b7af85d760e01b81526001600160a01b0391821660048201529485916024918391165afa9182156114bb576122d6935f93612362575b506122c981604061235c9301906121d9565b91612522565b61235c91935061237e6122c9913d805f833e6122f58183611ac8565b93915061234a565b6040516328305db160e21b81527f00000000000000000000000070b4f3c06e5d93d695129f1255c55c01e7be13bf6001600160a01b031690602081600481855afa9081156114bb575f91612503575b5015806124ae575b6124ab5760405163e14c465b60e01b8152602081600481855afa9081156114bb575f91612477575b50604051632e4bfa5160e11b815233600482015260248101919091529060209082908180604481015b03915afa9081156114bb575f91612458575b506120cb5763321cbc0960e21b5f523360045260245ffd5b612471915060203d602011610fb457610fa68183611ac8565b5f612440565b90506020813d6020116124a3575b8161249260209383611ac8565b810103126113a2575161242e612405565b3d9150612485565b50565b5060405163f5778b0360e01b8152602081600481855afa9081156114bb575f916124e4575b506001600160a01b031633146123dd565b6124fd915060203d602011610f8557610f778183611ac8565b5f6124d3565b61251c915060203d602011610fb457610fa68183611ac8565b5f6123d5565b610a208151148015906125de575b6125d75760206125835f948286958160405195869481808701998051918291018b5e8601908282018b8152815193849201905e010190878252805192839101825e0185815203601f198101835282611ac8565b51906102045afa612592611bc1565b816125cb575b816125a1575090565b90506020815191015190602081106125ba575b50151590565b5f199060200360031b1b165f6125b4565b80516020149150612598565b5050505f90565b5061121383511415612530565b604081511480159061265a575b6125d757602061264b5f948286958160405195869481808701998051918291018b5e8601908282018b8152815193849201905e010190878252805192839101825e0185815203601f198101835282611ac8565b51906102055afa612592611bc1565b50617460835114156125f856
No CBOR metadata tail — this bytecode was built with cbor_metadata off, the setting our own contracts pin for CREATE2 address invariance.
disassembly (first 4,000 ops)
| pc | op | operand |
|---|---|---|
| 0000 | PUSH2 | 0x01a0 |
| 0003 | DUP1 | |
| 0004 | PUSH1 | 0x40 |
| 0006 | MSTORE | |
| 0007 | PUSH1 | 0x04 |
| 0009 | CALLDATASIZE | |
| 000a | LT | |
| 000b | ISZERO | |
| 000c | PUSH2 | 0x0013 |
| 000f | JUMPI | |
| 0010 | PUSH0 | |
| 0011 | DUP1 | |
| 0012 | REVERT | |
| 0013 | JUMPDEST | |
| 0014 | PUSH0 | |
| 0015 | PUSH2 | 0x0160 |
| 0018 | MSTORE | |
| 0019 | PUSH0 | |
| 001a | CALLDATALOAD | |
| 001b | PUSH1 | 0xe0 |
| 001d | SHR | |
| 001e | SWAP1 | |
| 001f | DUP2 | |
| 0020 | PUSH3 | 0x0b82b5 |
| 0024 | EQ | |
| 0025 | PUSH2 | 0x19c9 |
| 0028 | JUMPI | |
| 0029 | POP | |
| 002a | DUP1 | |
| 002b | PUSH4 | 0x07a96b5c |
| 0030 | EQ | |
| 0031 | PUSH2 | 0x1778 |
| 0034 | JUMPI | |
| 0035 | DUP1 | |
| 0036 | PUSH4 | 0x150b7a02 |
| 003b | EQ | |
| 003c | PUSH2 | 0x1722 |
| 003f | JUMPI | |
| 0040 | DUP1 | |
| 0041 | PUSH4 | 0x3fb27b85 |
| 0046 | EQ | |
| 0047 | PUSH2 | 0x16b4 |
| 004a | JUMPI | |
| 004b | DUP1 | |
| 004c | PUSH4 | 0x42cde4e8 |
| 0051 | EQ | |
| 0052 | PUSH2 | 0x1697 |
| 0055 | JUMPI | |
| 0056 | DUP1 | |
| 0057 | PUSH4 | 0x45f7f249 |
| 005c | EQ | |
| 005d | PUSH2 | 0x167a |
| 0060 | JUMPI | |
| 0061 | DUP1 | |
| 0062 | PUSH4 | 0x60a18008 |
| 0067 | EQ | |
| 0068 | PUSH2 | 0x1646 |
| 006b | JUMPI | |
| 006c | DUP1 | |
| 006d | PUSH4 | 0x72f56b2c |
| 0072 | EQ | |
| 0073 | PUSH2 | 0x160c |
| 0076 | JUMPI | |
| 0077 | DUP1 | |
| 0078 | PUSH4 | 0x7b103999 |
| 007d | EQ | |
| 007e | PUSH2 | 0x15c8 |
| 0081 | JUMPI | |
| 0082 | DUP1 | |
| 0083 | PUSH4 | 0x8d0de241 |
| 0088 | EQ | |
| 0089 | PUSH2 | 0x158c |
| 008c | JUMPI | |
| 008d | DUP1 | |
| 008e | PUSH4 | 0x8eae91b2 |
| 0093 | EQ | |
| 0094 | PUSH2 | 0x1563 |
| 0097 | JUMPI | |
| 0098 | DUP1 | |
| 0099 | PUSH4 | 0x902d55a5 |
| 009e | EQ | |
| 009f | PUSH2 | 0x153e |
| 00a2 | JUMPI | |
| 00a3 | DUP1 | |
| 00a4 | PUSH4 | 0x94bc4e96 |
| 00a9 | EQ | |
| 00aa | PUSH2 | 0x125e |
| 00ad | JUMPI | |
| 00ae | DUP1 | |
| 00af | PUSH4 | 0x96f51f3a |
| 00b4 | EQ | |
| 00b5 | PUSH2 | 0x0fbb |
| 00b8 | JUMPI | |
| 00b9 | DUP1 | |
| 00ba | PUSH4 | 0xa1aab18c |
| 00bf | EQ | |
| 00c0 | PUSH2 | 0x07f1 |
| 00c3 | JUMPI | |
| 00c4 | DUP1 | |
| 00c5 | PUSH4 | 0xa285aed7 |
| 00ca | EQ | |
| 00cb | PUSH2 | 0x07d1 |
| 00ce | JUMPI | |
| 00cf | DUP1 | |
| 00d0 | PUSH4 | 0xa2c7376c |
| 00d5 | EQ | |
| 00d6 | PUSH2 | 0x05dd |
| 00d9 | JUMPI | |
| 00da | DUP1 | |
| 00db | PUSH4 | 0xaffed0e0 |
| 00e0 | EQ | |
| 00e1 | PUSH2 | 0x05b4 |
| 00e4 | JUMPI | |
| 00e5 | DUP1 | |
| 00e6 | PUSH4 | 0xb19f4805 |
| 00eb | EQ | |
| 00ec | PUSH2 | 0x0577 |
| 00ef | JUMPI | |
| 00f0 | DUP1 | |
| 00f1 | PUSH4 | 0xbc197c81 |
| 00f6 | EQ | |
| 00f7 | PUSH2 | 0x04df |
| 00fa | JUMPI | |
| 00fb | DUP1 | |
| 00fc | PUSH4 | 0xe1c783cb |
| 0101 | EQ | |
| 0102 | PUSH2 | 0x04af |
| 0105 | JUMPI | |
| 0106 | DUP1 | |
| 0107 | PUSH4 | 0xe96b9491 |
| 010c | EQ | |
| 010d | PUSH2 | 0x01de |
| 0110 | JUMPI | |
| 0111 | DUP1 | |
| 0112 | PUSH4 | 0xf23a6e61 |
| 0117 | EQ | |
| 0118 | PUSH2 | 0x0188 |
| 011b | JUMPI | |
| 011c | DUP1 | |
| 011d | PUSH4 | 0xf4e885db |
| 0122 | EQ | |
| 0123 | PUSH2 | 0x0168 |
| 0126 | JUMPI | |
| 0127 | PUSH4 | 0xf851a440 |
| 012c | EQ | |
| 012d | PUSH2 | 0x0134 |
| 0130 | JUMPI | |
| 0131 | PUSH0 | |
| 0132 | DUP1 | |
| 0133 | REVERT | |
| 0134 | JUMPDEST | |
| 0135 | CALLVALUE | |
| 0136 | PUSH2 | 0x0161 |
| 0139 | JUMPI | |
| 013a | PUSH2 | 0x0160 |
| 013d | MLOAD | |
| 013e | CALLDATASIZE | |
| 013f | PUSH1 | 0x03 |
| 0141 | NOT | |
| 0142 | ADD | |
| 0143 | SLT | |
| 0144 | PUSH2 | 0x0161 |
| 0147 | JUMPI | |
| 0148 | PUSH2 | 0x0160 |
| 014b | MLOAD | |
| 014c | SLOAD | |
| 014d | PUSH1 | 0x40 |
| 014f | MLOAD | |
| 0150 | PUSH1 | 0x01 |
| 0152 | PUSH1 | 0x01 |
| 0154 | PUSH1 | 0xa0 |
| 0156 | SHL | |
| 0157 | SUB | |
| 0158 | SWAP1 | |
| 0159 | SWAP2 | |
| 015a | AND | |
| 015b | DUP2 | |
| 015c | MSTORE | |
| 015d | PUSH1 | 0x20 |
| 015f | SWAP1 | |
| 0160 | RETURN | |
| 0161 | JUMPDEST | |
| 0162 | PUSH2 | 0x0160 |
| 0165 | MLOAD | |
| 0166 | DUP1 | |
| 0167 | REVERT | |
| 0168 | JUMPDEST | |
| 0169 | CALLVALUE | |
| 016a | PUSH2 | 0x0161 |
| 016d | JUMPI | |
| 016e | PUSH2 | 0x0160 |
| 0171 | MLOAD | |
| 0172 | CALLDATASIZE | |
| 0173 | PUSH1 | 0x03 |
| 0175 | NOT | |
| 0176 | ADD | |
| 0177 | SLT | |
| 0178 | PUSH2 | 0x0161 |
| 017b | JUMPI | |
| 017c | PUSH1 | 0x20 |
| 017e | PUSH1 | 0x01 |
| 0180 | SLOAD | |
| 0181 | PUSH1 | 0x40 |
| 0183 | MLOAD | |
| 0184 | SWAP1 | |
| 0185 | DUP2 | |
| 0186 | MSTORE | |
| 0187 | RETURN | |
| 0188 | JUMPDEST | |
| 0189 | CALLVALUE | |
| 018a | PUSH2 | 0x0161 |
| 018d | JUMPI | |
| 018e | PUSH1 | 0xa0 |
| 0190 | CALLDATASIZE | |
| 0191 | PUSH1 | 0x03 |
| 0193 | NOT | |
| 0194 | ADD | |
| 0195 | SLT | |
| 0196 | PUSH2 | 0x0161 |
| 0199 | JUMPI | |
| 019a | PUSH2 | 0x01a1 |
| 019d | PUSH2 | 0x1a5b |
| 01a0 | JUMP | |
| 01a1 | JUMPDEST | |
| 01a2 | POP | |
| 01a3 | PUSH2 | 0x01aa |
| 01a6 | PUSH2 | 0x1a71 |
| 01a9 | JUMP | |
| 01aa | JUMPDEST | |
| 01ab | POP | |
| 01ac | PUSH1 | 0x84 |
| 01ae | CALLDATALOAD | |
| 01af | PUSH1 | 0x01 |
| 01b1 | PUSH1 | 0x01 |
| 01b3 | PUSH1 | 0x40 |
| 01b5 | SHL | |
| 01b6 | SUB | |
| 01b7 | DUP2 | |
| 01b8 | GT | |
| 01b9 | PUSH2 | 0x0161 |
| 01bc | JUMPI | |
| 01bd | PUSH2 | 0x01ca |
| 01c0 | SWAP1 | |
| 01c1 | CALLDATASIZE | |
| 01c2 | SWAP1 | |
| 01c3 | PUSH1 | 0x04 |
| 01c5 | ADD | |
| 01c6 | PUSH2 | 0x1a9b |
| 01c9 | JUMP | |
| 01ca | JUMPDEST | |
| 01cb | POP | |
| 01cc | POP | |
| 01cd | PUSH1 | 0x40 |
| 01cf | MLOAD | |
| 01d0 | PUSH4 | 0xf23a6e61 |
| 01d5 | PUSH1 | 0xe0 |
| 01d7 | SHL | |
| 01d8 | DUP2 | |
| 01d9 | MSTORE | |
| 01da | PUSH1 | 0x20 |
| 01dc | SWAP1 | |
| 01dd | RETURN | |
| 01de | JUMPDEST | |
| 01df | CALLVALUE | |
| 01e0 | PUSH2 | 0x0161 |
| 01e3 | JUMPI | |
| 01e4 | PUSH1 | 0xa0 |
| 01e6 | CALLDATASIZE | |
| 01e7 | PUSH1 | 0x03 |
| 01e9 | NOT | |
| 01ea | ADD | |
| 01eb | SLT | |
| 01ec | PUSH2 | 0x0161 |
| 01ef | JUMPI | |
| 01f0 | PUSH1 | 0x44 |
| 01f2 | CALLDATALOAD | |
| 01f3 | PUSH1 | 0x04 |
| 01f5 | CALLDATALOAD | |
| 01f6 | PUSH1 | 0x24 |
| 01f8 | CALLDATALOAD | |
| 01f9 | PUSH2 | 0x0200 |
| 01fc | PUSH2 | 0x19ff |
| 01ff | JUMP | |
| 0200 | JUMPDEST | |
| 0201 | SWAP2 | |
| 0202 | PUSH1 | 0x84 |
| 0204 | CALLDATALOAD | |
| 0205 | PUSH1 | 0x01 |
| 0207 | PUSH1 | 0x01 |
| 0209 | PUSH1 | 0x40 |
| 020b | SHL | |
| 020c | SUB | |
| 020d | DUP2 | |
| 020e | GT | |
| 020f | PUSH2 | 0x0161 |
| 0212 | JUMPI | |
| 0213 | PUSH2 | 0x0220 |
| 0216 | SWAP1 | |
| 0217 | CALLDATASIZE | |
| 0218 | SWAP1 | |
| 0219 | PUSH1 | 0x04 |
| 021b | ADD | |
| 021c | PUSH2 | 0x1a2b |
| 021f | JUMP | |
| 0220 | JUMPDEST | |
| 0221 | SWAP4 | |
| 0222 | SWAP1 | |
| 0223 | PUSH1 | 0x02 |
| 0225 | SLOAD | |
| 0226 | SWAP2 | |
| 0227 | DUP3 | |
| 0228 | ISZERO | |
| 0229 | PUSH2 | 0x049a |
| 022c | JUMPI | |
| 022d | DUP7 | |
| 022e | ISZERO | |
| 022f | PUSH2 | 0x0485 |
| 0232 | JUMPI | |
| 0233 | DUP4 | |
| 0234 | ISZERO | |
| 0235 | DUP1 | |
| 0236 | ISZERO | |
| 0237 | PUSH2 | 0x047d |
| 023a | JUMPI | |
| 023b | JUMPDEST | |
| 023c | DUP1 | |
| 023d | ISZERO | |
| 023e | PUSH2 | 0x0474 |
| 0241 | JUMPI | |
| 0242 | JUMPDEST | |
| 0243 | PUSH2 | 0x0456 |
| 0246 | JUMPI | |
| 0247 | DUP4 | |
| 0248 | PUSH2 | 0x0160 |
| 024b | MLOAD | |
| 024c | MSTORE | |
| 024d | PUSH1 | 0x04 |
| 024f | PUSH1 | 0x20 |
| 0251 | MSTORE | |
| 0252 | PUSH1 | 0x40 |
| 0254 | PUSH2 | 0x0160 |
| 0257 | MLOAD | |
| 0258 | KECCAK256 | |
| 0259 | SWAP3 | |
| 025a | DUP4 | |
| 025b | SLOAD | |
| 025c | DUP1 | |
| 025d | DUP10 | |
| 025e | GT | |
| 025f | PUSH2 | 0x0436 |
| 0262 | JUMPI | |
| 0263 | POP | |
| 0264 | SWAP3 | |
| 0265 | PUSH1 | 0x80 |
| 0267 | SWAP3 | |
| 0268 | PUSH2 | 0x037c |
| 026b | PUSH1 | 0x20 |
| 026d | SWAP10 | |
| 026e | SWAP4 | |
| 026f | PUSH32 | 0x918413a673b69ea329c13b81535c07cd4e55e8544a26871a6f0d841f203af099 |
| 0290 | SWAP7 | |
| 0291 | PUSH1 | 0x06 |
| 0293 | SLOAD | |
| 0294 | SWAP4 | |
| 0295 | PUSH1 | 0x01 |
| 0297 | PUSH1 | 0x01 |
| 0299 | PUSH1 | 0x40 |
| 029b | SHL | |
| 029c | SUB | |
| 029d | DUP6 | |
| 029e | AND | |
| 029f | SWAP12 | |
| 02a0 | DUP13 | |
| 02a1 | PUSH1 | 0x40 |
| 02a3 | MLOAD | |
| 02a4 | DUP16 | |
| 02a5 | DUP2 | |
| 02a6 | ADD | |
| 02a7 | SWAP2 | |
| 02a8 | DUP3 | |
| 02a9 | MSTORE | |
| 02aa | DUP13 | |
| 02ab | PUSH1 | 0x40 |
| 02ad | DUP3 | |
| 02ae | ADD | |
| 02af | MSTORE | |
| 02b0 | DUP14 | |
| 02b1 | PUSH1 | 0x60 |
| 02b3 | DUP3 | |
| 02b4 | ADD | |
| 02b5 | MSTORE | |
| 02b6 | DUP10 | |
| 02b7 | DUP12 | |
| 02b8 | DUP3 | |
| 02b9 | ADD | |
| 02ba | MSTORE | |
| 02bb | DUP11 | |
| 02bc | DUP2 | |
| 02bd | MSTORE | |
| 02be | PUSH2 | 0x02c8 |
| 02c1 | PUSH1 | 0xa0 |
| 02c3 | DUP3 | |
| 02c4 | PUSH2 | 0x1ac8 |
| 02c7 | JUMP | |
| 02c8 | JUMPDEST | |
| 02c9 | MLOAD | |
| 02ca | SWAP1 | |
| 02cb | KECCAK256 | |
| 02cc | PUSH2 | 0x0160 |
| 02cf | MLOAD | |
| 02d0 | POP | |
| 02d1 | PUSH1 | 0x40 |
| 02d3 | MLOAD | |
| 02d4 | DUP16 | |
| 02d5 | DUP2 | |
| 02d6 | ADD | |
| 02d7 | SWAP2 | |
| 02d8 | PUSH32 | 0xd850f5df47b124511e8e6ec99cf1a0beaf7c6237eff0a31305ce53d85f312675 |
| 02f9 | DUP4 | |
| 02fa | MSTORE | |
| 02fb | CHAINID | |
| 02fc | PUSH1 | 0x40 |
| 02fe | DUP4 | |
| 02ff | ADD | |
| 0300 | MSTORE | |
| 0301 | ADDRESS | |
| 0302 | PUSH1 | 0x60 |
| 0304 | DUP4 | |
| 0305 | ADD | |
| 0306 | MSTORE | |
| 0307 | PUSH32 | 0x5315ade0aa736cdc5532fa19a1ed12e3ce89b6ad07040b14bac780938e50423b |
| 0328 | DUP13 | |
| 0329 | DUP4 | |
| 032a | ADD | |
| 032b | MSTORE | |
| 032c | PUSH1 | 0x01 |
| 032e | PUSH1 | 0x01 |
| 0330 | PUSH1 | 0x40 |
| 0332 | SHL | |
| 0333 | SUB | |
| 0334 | DUP8 | |
| 0335 | AND | |
| 0336 | PUSH1 | 0xa0 |
| 0338 | DUP4 | |
| 0339 | ADD | |
| 033a | MSTORE | |
| 033b | PUSH1 | 0xc0 |
| 033d | DUP3 | |
| 033e | ADD | |
| 033f | MSTORE | |
| 0340 | PUSH1 | 0xc0 |
| 0342 | DUP2 | |
| 0343 | MSTORE | |
| 0344 | PUSH2 | 0x034e |
| 0347 | PUSH1 | 0xe0 |
| 0349 | DUP3 | |
| 034a | PUSH2 | 0x1ac8 |
| 034d | JUMP | |
| 034e | JUMPDEST | |
| 034f | MLOAD | |
| 0350 | SWAP1 | |
| 0351 | KECCAK256 | |
| 0352 | SWAP1 | |
| 0353 | PUSH1 | 0x01 |
| 0355 | SLOAD | |
| 0356 | SWAP3 | |
| 0357 | PUSH32 | 0x00000000000000000000000070b4f3c06e5d93d695129f1255c55c01e7be13bf |
| 0378 | PUSH2 | 0x1ca5 |
| 037b | JUMP | |
| 037c | JUMPDEST | |
| 037d | POP | |
| 037e | PUSH1 | 0x01 |
| 0380 | PUSH1 | 0x01 |
| 0382 | PUSH1 | 0x40 |
| 0384 | SHL | |
| 0385 | SUB | |
| 0386 | PUSH2 | 0x038e |
| 0389 | DUP10 | |
| 038a | PUSH2 | 0x1afd |
| 038d | JUMP | |
| 038e | JUMPDEST | |
| 038f | AND | |
| 0390 | SWAP1 | |
| 0391 | PUSH1 | 0x01 |
| 0393 | PUSH1 | 0x01 |
| 0395 | PUSH1 | 0x40 |
| 0397 | SHL | |
| 0398 | SUB | |
| 0399 | NOT | |
| 039a | AND | |
| 039b | OR | |
| 039c | PUSH1 | 0x06 |
| 039e | SSTORE | |
| 039f | DUP6 | |
| 03a0 | PUSH2 | 0x0160 |
| 03a3 | MLOAD | |
| 03a4 | MSTORE | |
| 03a5 | PUSH1 | 0x04 |
| 03a7 | DUP9 | |
| 03a8 | MSTORE | |
| 03a9 | PUSH1 | 0x40 |
| 03ab | PUSH2 | 0x0160 |
| 03ae | MLOAD | |
| 03af | KECCAK256 | |
| 03b0 | SWAP1 | |
| 03b1 | DUP3 | |
| 03b2 | DUP2 | |
| 03b3 | SLOAD | |
| 03b4 | SUB | |
| 03b5 | DUP2 | |
| 03b6 | SSTORE | |
| 03b7 | DUP3 | |
| 03b8 | DUP3 | |
| 03b9 | SLOAD | |
| 03ba | ADD | |
| 03bb | DUP3 | |
| 03bc | SSTORE | |
| 03bd | PUSH1 | 0x01 |
| 03bf | DUP2 | |
| 03c0 | ADD | |
| 03c1 | PUSH1 | 0x01 |
| 03c3 | PUSH1 | 0x01 |
| 03c5 | PUSH1 | 0x40 |
| 03c7 | SHL | |
| 03c8 | SUB | |
| 03c9 | PUSH2 | 0x03d4 |
| 03cc | DUP2 | |
| 03cd | DUP4 | |
| 03ce | SLOAD | |
| 03cf | AND | |
| 03d0 | PUSH2 | 0x1afd |
| 03d3 | JUMP | |
| 03d4 | JUMPDEST | |
| 03d5 | AND | |
| 03d6 | PUSH1 | 0x01 |
| 03d8 | PUSH1 | 0x01 |
| 03da | PUSH1 | 0x40 |
| 03dc | SHL | |
| 03dd | SUB | |
| 03de | NOT | |
| 03df | DUP3 | |
| 03e0 | SLOAD | |
| 03e1 | AND | |
| 03e2 | OR | |
| 03e3 | SWAP1 | |
| 03e4 | SSTORE | |
| 03e5 | PUSH1 | 0x01 |
| 03e7 | DUP3 | |
| 03e8 | ADD | |
| 03e9 | PUSH1 | 0x01 |
| 03eb | PUSH1 | 0x01 |
| 03ed | PUSH1 | 0x40 |
| 03ef | SHL | |
| 03f0 | SUB | |
| 03f1 | PUSH2 | 0x03fc |
| 03f4 | DUP2 | |
| 03f5 | DUP4 | |
| 03f6 | SLOAD | |
| 03f7 | AND | |
| 03f8 | PUSH2 | 0x1afd |
| 03fb | JUMP | |
| 03fc | JUMPDEST | |
| 03fd | AND | |
| 03fe | PUSH1 | 0x01 |
| 0400 | PUSH1 | 0x01 |
| 0402 | PUSH1 | 0x40 |
| 0404 | SHL | |
| 0405 | SUB | |
| 0406 | NOT | |
| 0407 | DUP3 | |
| 0408 | SLOAD | |
| 0409 | AND | |
| 040a | OR | |
| 040b | SWAP1 | |
| 040c | SSTORE | |
| 040d | PUSH2 | 0x0414 |
| 0410 | PUSH2 | 0x1f17 |
| 0413 | JUMP | |
| 0414 | JUMPDEST | |
| 0415 | SLOAD | |
| 0416 | SWAP1 | |
| 0417 | SLOAD | |
| 0418 | SWAP1 | |
| 0419 | PUSH1 | 0x40 |
| 041b | MLOAD | |
| 041c | SWAP3 | |
| 041d | DUP4 | |
| 041e | MSTORE | |
| 041f | DUP9 | |
| 0420 | DUP4 | |
| 0421 | ADD | |
| 0422 | MSTORE | |
| 0423 | PUSH1 | 0x40 |
| 0425 | DUP3 | |
| 0426 | ADD | |
| 0427 | MSTORE | |
| 0428 | DUP6 | |
| 0429 | PUSH1 | 0x60 |
| 042b | DUP3 | |
| 042c | ADD | |
| 042d | MSTORE | |
| 042e | LOG3 | |
| 042f | PUSH1 | 0x40 |
| 0431 | MLOAD | |
| 0432 | SWAP1 | |
| 0433 | DUP2 | |
| 0434 | MSTORE | |
| 0435 | RETURN | |
| 0436 | JUMPDEST | |
| 0437 | DUP9 | |
| 0438 | DUP7 | |
| 0439 | PUSH4 | 0x7c06acb7 |
| 043e | PUSH1 | 0xe1 |
| 0440 | SHL | |
| 0441 | PUSH2 | 0x0160 |
| 0444 | MLOAD | |
| 0445 | MSTORE | |
| 0446 | PUSH1 | 0x04 |
| 0448 | MSTORE | |
| 0449 | PUSH1 | 0x24 |
| 044b | MSTORE | |
| 044c | PUSH1 | 0x44 |
| 044e | MSTORE | |
| 044f | PUSH1 | 0x64 |
| 0451 | PUSH2 | 0x0160 |
| 0454 | MLOAD | |
| 0455 | REVERT | |
| 0456 | JUMPDEST | |
| 0457 | POP | |
| 0458 | POP | |
| 0459 | POP | |
| 045a | PUSH4 | 0x108b1617 |
| 045f | PUSH1 | 0xe0 |
| 0461 | SHL | |
| 0462 | PUSH2 | 0x0160 |
| 0465 | MLOAD | |
| 0466 | MSTORE | |
| 0467 | PUSH1 | 0x04 |
| 0469 | MSTORE | |
| 046a | PUSH1 | 0x24 |
| 046c | MSTORE | |
| 046d | PUSH1 | 0x44 |
| 046f | PUSH2 | 0x0160 |
| 0472 | MLOAD | |
| 0473 | REVERT | |
| 0474 | JUMPDEST | |
| 0475 | POP | |
| 0476 | DUP5 | |
| 0477 | DUP5 | |
| 0478 | EQ | |
| 0479 | PUSH2 | 0x0242 |
| 047c | JUMP | |
| 047d | JUMPDEST | |
| 047e | POP | |
| 047f | DUP5 | |
| 0480 | ISZERO | |
| 0481 | PUSH2 | 0x023b |
| 0484 | JUMP | |
| 0485 | JUMPDEST | |
| 0486 | PUSH4 | 0x1f2a2005 |
| 048b | PUSH1 | 0xe0 |
| 048d | SHL | |
| 048e | PUSH2 | 0x0160 |
| 0491 | MLOAD | |
| 0492 | MSTORE | |
| 0493 | PUSH1 | 0x04 |
| 0495 | PUSH2 | 0x0160 |
| 0498 | MLOAD | |
| 0499 | REVERT | |
| 049a | JUMPDEST | |
| 049b | PUSH4 | 0xd311bc39 |
| 04a0 | PUSH1 | 0xe0 |
| 04a2 | SHL | |
| 04a3 | PUSH2 | 0x0160 |
| 04a6 | MLOAD | |
| 04a7 | MSTORE | |
| 04a8 | PUSH1 | 0x04 |
| 04aa | PUSH2 | 0x0160 |
| 04ad | MLOAD | |
| 04ae | REVERT | |
| 04af | JUMPDEST | |
| 04b0 | CALLVALUE | |
| 04b1 | PUSH2 | 0x0161 |
| 04b4 | JUMPI | |
| 04b5 | PUSH1 | 0x20 |
| 04b7 | CALLDATASIZE | |
| 04b8 | PUSH1 | 0x03 |
| 04ba | NOT | |
| 04bb | ADD | |
| 04bc | SLT | |
| 04bd | PUSH2 | 0x0161 |
| 04c0 | JUMPI | |
| 04c1 | PUSH1 | 0x04 |
| 04c3 | CALLDATALOAD | |
| 04c4 | PUSH2 | 0x0160 |
| 04c7 | MLOAD | |
| 04c8 | MSTORE | |
| 04c9 | PUSH1 | 0x04 |
| 04cb | PUSH1 | 0x20 |
| 04cd | MSTORE | |
| 04ce | PUSH1 | 0x20 |
| 04d0 | PUSH1 | 0x40 |
| 04d2 | PUSH2 | 0x0160 |
| 04d5 | MLOAD | |
| 04d6 | KECCAK256 | |
| 04d7 | SLOAD | |
| 04d8 | PUSH1 | 0x40 |
| 04da | MLOAD | |
| 04db | SWAP1 | |
| 04dc | DUP2 | |
| 04dd | MSTORE | |
| 04de | RETURN | |
| 04df | JUMPDEST | |
| 04e0 | CALLVALUE | |
| 04e1 | PUSH2 | 0x0161 |
| 04e4 | JUMPI | |
| 04e5 | PUSH1 | 0xa0 |
| 04e7 | CALLDATASIZE | |
| 04e8 | PUSH1 | 0x03 |
| 04ea | NOT | |
| 04eb | ADD | |
| 04ec | SLT | |
| 04ed | PUSH2 | 0x0161 |
| 04f0 | JUMPI | |
| 04f1 | PUSH2 | 0x04f8 |
| 04f4 | PUSH2 | 0x1a5b |
| 04f7 | JUMP | |
| 04f8 | JUMPDEST | |
| 04f9 | POP | |
| 04fa | PUSH2 | 0x0501 |
| 04fd | PUSH2 | 0x1a71 |
| 0500 | JUMP | |
| 0501 | JUMPDEST | |
| 0502 | POP | |
| 0503 | PUSH1 | 0x44 |
| 0505 | CALLDATALOAD | |
| 0506 | PUSH1 | 0x01 |
| 0508 | PUSH1 | 0x01 |
| 050a | PUSH1 | 0x40 |
| 050c | SHL | |
| 050d | SUB | |
| 050e | DUP2 | |
| 050f | GT | |
| 0510 | PUSH2 | 0x0161 |
| 0513 | JUMPI | |
| 0514 | PUSH2 | 0x0521 |
| 0517 | SWAP1 | |
| 0518 | CALLDATASIZE | |
| 0519 | SWAP1 | |
| 051a | PUSH1 | 0x04 |
| 051c | ADD | |
| 051d | PUSH2 | 0x1a2b |
| 0520 | JUMP | |
| 0521 | JUMPDEST | |
| 0522 | POP | |
| 0523 | POP | |
| 0524 | PUSH1 | 0x64 |
| 0526 | CALLDATALOAD | |
| 0527 | PUSH1 | 0x01 |
| 0529 | PUSH1 | 0x01 |
| 052b | PUSH1 | 0x40 |
| 052d | SHL | |
| 052e | SUB | |
| 052f | DUP2 | |
| 0530 | GT | |
| 0531 | PUSH2 | 0x0161 |
| 0534 | JUMPI | |
| 0535 | PUSH2 | 0x0542 |
| 0538 | SWAP1 | |
| 0539 | CALLDATASIZE | |
| 053a | SWAP1 | |
| 053b | PUSH1 | 0x04 |
| 053d | ADD | |
| 053e | PUSH2 | 0x1a2b |
| 0541 | JUMP | |
| 0542 | JUMPDEST | |
| 0543 | POP | |
| 0544 | POP | |
| 0545 | PUSH1 | 0x84 |
| 0547 | CALLDATALOAD | |
| 0548 | PUSH1 | 0x01 |
| 054a | PUSH1 | 0x01 |
| 054c | PUSH1 | 0x40 |
| 054e | SHL | |
| 054f | SUB | |
| 0550 | DUP2 | |
| 0551 | GT | |
| 0552 | PUSH2 | 0x0161 |
| 0555 | JUMPI | |
| 0556 | PUSH2 | 0x0563 |
| 0559 | SWAP1 | |
| 055a | CALLDATASIZE | |
| 055b | SWAP1 | |
| 055c | PUSH1 | 0x04 |
| 055e | ADD | |
| 055f | PUSH2 | 0x1a9b |
| 0562 | JUMP | |
| 0563 | JUMPDEST | |
| 0564 | POP | |
| 0565 | POP | |
| 0566 | PUSH1 | 0x40 |
| 0568 | MLOAD | |
| 0569 | PUSH4 | 0xbc197c81 |
| 056e | PUSH1 | 0xe0 |
| 0570 | SHL | |
| 0571 | DUP2 | |
| 0572 | MSTORE | |
| 0573 | PUSH1 | 0x20 |
| 0575 | SWAP1 | |
| 0576 | RETURN | |
| 0577 | JUMPDEST | |
| 0578 | CALLVALUE | |
| 0579 | PUSH2 | 0x0161 |
| 057c | JUMPI | |
| 057d | PUSH2 | 0x0160 |
| 0580 | MLOAD | |
| 0581 | CALLDATASIZE | |
| 0582 | PUSH1 | 0x03 |
| 0584 | NOT | |
| 0585 | ADD | |
| 0586 | SLT | |
| 0587 | PUSH2 | 0x0161 |
| 058a | JUMPI | |
| 058b | PUSH1 | 0x20 |
| 058d | PUSH1 | 0x40 |
| 058f | MLOAD | |
| 0590 | PUSH32 | 0xbc5858e168b959a61a8fb2d7957ef31dbed683a362770ca030e5d772cc44e068 |
| 05b1 | DUP2 | |
| 05b2 | MSTORE | |
| 05b3 | RETURN | |
| 05b4 | JUMPDEST | |
| 05b5 | CALLVALUE | |
| 05b6 | PUSH2 | 0x0161 |
| 05b9 | JUMPI | |
| 05ba | PUSH2 | 0x0160 |
| 05bd | MLOAD | |
| 05be | CALLDATASIZE | |
| 05bf | PUSH1 | 0x03 |
| 05c1 | NOT | |
| 05c2 | ADD | |
| 05c3 | SLT | |
| 05c4 | PUSH2 | 0x0161 |
| 05c7 | JUMPI | |
| 05c8 | PUSH1 | 0x20 |
| 05ca | PUSH1 | 0x01 |
| 05cc | PUSH1 | 0x01 |
| 05ce | PUSH1 | 0x40 |
| 05d0 | SHL | |
| 05d1 | SUB | |
| 05d2 | PUSH1 | 0x06 |
| 05d4 | SLOAD | |
| 05d5 | AND | |
| 05d6 | PUSH1 | 0x40 |
| 05d8 | MLOAD | |
| 05d9 | SWAP1 | |
| 05da | DUP2 | |
| 05db | MSTORE | |
| 05dc | RETURN | |
| 05dd | JUMPDEST | |
| 05de | CALLVALUE | |
| 05df | PUSH2 | 0x0161 |
| 05e2 | JUMPI | |
| 05e3 | PUSH1 | 0x80 |
| 05e5 | CALLDATASIZE | |
| 05e6 | PUSH1 | 0x03 |
| 05e8 | NOT | |
| 05e9 | ADD | |
| 05ea | SLT | |
| 05eb | PUSH2 | 0x0161 |
| 05ee | JUMPI | |
| 05ef | PUSH1 | 0x04 |
| 05f1 | CALLDATALOAD | |
| 05f2 | PUSH1 | 0x24 |
| 05f4 | CALLDATALOAD | |
| 05f5 | PUSH2 | 0x05fc |
| 05f8 | PUSH2 | 0x1a15 |
| 05fb | JUMP | |
| 05fc | JUMPDEST | |
| 05fd | SWAP2 | |
| 05fe | PUSH1 | 0x64 |
| 0600 | CALLDATALOAD | |
| 0601 | PUSH1 | 0x01 |
| 0603 | PUSH1 | 0x01 |
| 0605 | PUSH1 | 0x40 |
| 0607 | SHL | |
| 0608 | SUB | |
| 0609 | DUP2 | |
| 060a | GT | |
| 060b | PUSH2 | 0x0161 |
| 060e | JUMPI | |
| 060f | PUSH2 | 0x061c |
| 0612 | SWAP1 | |
| 0613 | CALLDATASIZE | |
| 0614 | SWAP1 | |
| 0615 | PUSH1 | 0x04 |
| 0617 | ADD | |
| 0618 | PUSH2 | 0x1a2b |
| 061b | JUMP | |
| 061c | JUMPDEST | |
| 061d | SWAP3 | |
| 061e | SWAP1 | |
| 061f | PUSH1 | 0x02 |
| 0621 | SLOAD | |
| 0622 | SWAP5 | |
| 0623 | DUP6 | |
| 0624 | ISZERO | |
| 0625 | PUSH2 | 0x049a |
| 0628 | JUMPI | |
| 0629 | DUP3 | |
| 062a | ISZERO | |
| 062b | PUSH2 | 0x0485 |
| 062e | JUMPI | |
| 062f | PUSH1 | 0x03 |
| 0631 | SLOAD | |
| 0632 | SWAP6 | |
| 0633 | DUP7 | |
| 0634 | DUP5 | |
| 0635 | GT | |
| 0636 | PUSH2 | 0x07b4 |
| 0639 | JUMPI | |
| 063a | SWAP6 | |
| 063b | PUSH1 | 0x80 |
| 063d | SWAP3 | |
| 063e | PUSH2 | 0x071f |
| 0641 | PUSH32 | 0x4565741fc5c16ad3a3a3fbbf4311621df9850edf4097f549079a6855d2133135 |
| 0662 | SWAP6 | |
| 0663 | SWAP4 | |
| 0664 | PUSH1 | 0x20 |
| 0666 | SWAP10 | |
| 0667 | PUSH1 | 0x06 |
| 0669 | SLOAD | |
| 066a | SWAP4 | |
| 066b | PUSH1 | 0x01 |
| 066d | PUSH1 | 0x01 |
| 066f | PUSH1 | 0x40 |
| 0671 | SHL | |
| 0672 | SUB | |
| 0673 | DUP6 | |
| 0674 | AND | |
| 0675 | SWAP11 | |
| 0676 | PUSH1 | 0x40 |
| 0678 | MLOAD | |
| 0679 | DUP14 | |
| 067a | DUP2 | |
| 067b | ADD | |
| 067c | SWAP1 | |
| 067d | DUP14 | |
| 067e | DUP3 | |
| 067f | MSTORE | |
| 0680 | DUP13 | |
| 0681 | PUSH1 | 0x40 |
| 0683 | DUP3 | |
| 0684 | ADD | |
| 0685 | MSTORE | |
| 0686 | DUP10 | |
| 0687 | PUSH1 | 0x60 |
| 0689 | DUP3 | |
| 068a | ADD | |
| 068b | MSTORE | |
| 068c | PUSH1 | 0x60 |
| 068e | DUP2 | |
| 068f | MSTORE | |
| 0690 | PUSH2 | 0x0699 |
| 0693 | DUP12 | |
| 0694 | DUP3 | |
| 0695 | PUSH2 | 0x1ac8 |
| 0698 | JUMP | |
| 0699 | JUMPDEST | |
| 069a | MLOAD | |
| 069b | SWAP1 | |
| 069c | KECCAK256 | |
| 069d | PUSH2 | 0x0160 |
| 06a0 | MLOAD | |
| 06a1 | POP | |
| 06a2 | PUSH1 | 0x40 |
| 06a4 | MLOAD | |
| 06a5 | DUP15 | |
| 06a6 | DUP2 | |
| 06a7 | ADD | |
| 06a8 | SWAP2 | |
| 06a9 | PUSH32 | 0xd850f5df47b124511e8e6ec99cf1a0beaf7c6237eff0a31305ce53d85f312675 |
| 06ca | DUP4 | |
| 06cb | MSTORE | |
| 06cc | CHAINID | |
| 06cd | PUSH1 | 0x40 |
| 06cf | DUP4 | |
| 06d0 | ADD | |
| 06d1 | MSTORE | |
| 06d2 | ADDRESS | |
| 06d3 | PUSH1 | 0x60 |
| 06d5 | DUP4 | |
| 06d6 | ADD | |
| 06d7 | MSTORE | |
| 06d8 | PUSH32 | 0xef06d5e846d5c9e7b4cf0eb3e3b66d716af68a3cea05cd7bc7743bbc17740522 |
| 06f9 | DUP13 | |
| 06fa | DUP4 | |
| 06fb | ADD | |
| 06fc | MSTORE | |
| 06fd | PUSH1 | 0x01 |
| 06ff | PUSH1 | 0x01 |
| 0701 | PUSH1 | 0x40 |
| 0703 | SHL | |
| 0704 | SUB | |
| 0705 | DUP8 | |
| 0706 | AND | |
| 0707 | PUSH1 | 0xa0 |
| 0709 | DUP4 | |
| 070a | ADD | |
| 070b | MSTORE | |
| 070c | PUSH1 | 0xc0 |
| 070e | DUP3 | |
| 070f | ADD | |
| 0710 | MSTORE | |
| 0711 | PUSH1 | 0xc0 |
| 0713 | DUP2 | |
| 0714 | MSTORE | |
| 0715 | PUSH2 | 0x034e |
| 0718 | PUSH1 | 0xe0 |
| 071a | DUP3 | |
| 071b | PUSH2 | 0x1ac8 |
| 071e | JUMP | |
| 071f | JUMPDEST | |
| 0720 | POP | |
| 0721 | PUSH1 | 0x01 |
| 0723 | PUSH1 | 0x01 |
| 0725 | PUSH1 | 0x40 |
| 0727 | SHL | |
| 0728 | SUB | |
| 0729 | PUSH2 | 0x0731 |
| 072c | DUP9 | |
| 072d | PUSH2 | 0x1afd |
| 0730 | JUMP | |
| 0731 | JUMPDEST | |
| 0732 | AND | |
| 0733 | SWAP1 | |
| 0734 | PUSH1 | 0x01 |
| 0736 | PUSH1 | 0x01 |
| 0738 | PUSH1 | 0x40 |
| 073a | SHL | |
| 073b | SUB | |
| 073c | NOT | |
| 073d | AND | |
| 073e | OR | |
| 073f | PUSH1 | 0x06 |
| 0741 | SSTORE | |
| 0742 | DUP5 | |
| 0743 | PUSH2 | 0x0160 |
| 0746 | MLOAD | |
| 0747 | MSTORE | |
| 0748 | PUSH1 | 0x04 |
| 074a | DUP8 | |
| 074b | MSTORE | |
| 074c | DUP2 | |
| 074d | PUSH1 | 0x40 |
| 074f | PUSH2 | 0x0160 |
| 0752 | MLOAD | |
| 0753 | KECCAK256 | |
| 0754 | SWAP2 | |
| 0755 | SUB | |
| 0756 | PUSH1 | 0x03 |
| 0758 | SSTORE | |
| 0759 | DUP2 | |
| 075a | DUP2 | |
| 075b | SLOAD | |
| 075c | ADD | |
| 075d | DUP2 | |
| 075e | SSTORE | |
| 075f | DUP2 | |
| 0760 | PUSH1 | 0x05 |
| 0762 | SLOAD | |
| 0763 | ADD | |
| 0764 | PUSH1 | 0x05 |
| 0766 | SSTORE | |
| 0767 | PUSH1 | 0x01 |
| 0769 | PUSH1 | 0x01 |
| 076b | PUSH1 | 0x40 |
| 076d | SHL | |
| 076e | SUB | |
| 076f | PUSH1 | 0x01 |
| 0771 | DUP3 | |
| 0772 | ADD | |
| 0773 | SWAP2 | |
| 0774 | DUP2 | |
| 0775 | PUSH2 | 0x0780 |
| 0778 | DUP2 | |
| 0779 | DUP6 | |
| 077a | SLOAD | |
| 077b | AND | |
| 077c | PUSH2 | 0x1afd |
| 077f | JUMP | |
| 0780 | JUMPDEST | |
| 0781 | AND | |
| 0782 | DUP3 | |
| 0783 | NOT | |
| 0784 | DUP5 | |
| 0785 | SLOAD | |
| 0786 | AND | |
| 0787 | OR | |
| 0788 | DUP4 | |
| 0789 | SSTORE | |
| 078a | PUSH2 | 0x0791 |
| 078d | PUSH2 | 0x1f17 |
| 0790 | JUMP | |
| 0791 | JUMPDEST | |
| 0792 | SLOAD | |
| 0793 | SWAP2 | |
| 0794 | SLOAD | |
| 0795 | AND | |
| 0796 | SWAP1 | |
| 0797 | PUSH1 | 0x40 |
| 0799 | MLOAD | |
| 079a | SWAP3 | |
| 079b | DUP4 | |
| 079c | MSTORE | |
| 079d | DUP8 | |
| 079e | DUP4 | |
| 079f | ADD | |
| 07a0 | MSTORE | |
| 07a1 | PUSH1 | 0x40 |
| 07a3 | DUP3 | |
| 07a4 | ADD | |
| 07a5 | MSTORE | |
| 07a6 | DUP5 | |
| 07a7 | PUSH1 | 0x60 |
| 07a9 | DUP3 | |
| 07aa | ADD | |
| 07ab | MSTORE | |
| 07ac | LOG2 | |
| 07ad | PUSH1 | 0x40 |
| 07af | MLOAD | |
| 07b0 | SWAP1 | |
| 07b1 | DUP2 | |
| 07b2 | MSTORE | |
| 07b3 | RETURN | |
| 07b4 | JUMPDEST | |
| 07b5 | DUP7 | |
| 07b6 | DUP5 | |
| 07b7 | PUSH4 | 0x11250051 |
| 07bc | PUSH1 | 0xe2 |
| 07be | SHL | |
| 07bf | PUSH2 | 0x0160 |
| 07c2 | MLOAD | |
| 07c3 | MSTORE | |
| 07c4 | PUSH1 | 0x04 |
| 07c6 | MSTORE | |
| 07c7 | PUSH1 | 0x24 |
| 07c9 | MSTORE | |
| 07ca | PUSH1 | 0x44 |
| 07cc | PUSH2 | 0x0160 |
| 07cf | MLOAD | |
| 07d0 | REVERT | |
| 07d1 | JUMPDEST | |
| 07d2 | CALLVALUE | |
| 07d3 | PUSH2 | 0x0161 |
| 07d6 | JUMPI | |
| 07d7 | PUSH2 | 0x0160 |
| 07da | MLOAD | |
| 07db | CALLDATASIZE | |
| 07dc | PUSH1 | 0x03 |
| 07de | NOT | |
| 07df | ADD | |
| 07e0 | SLT | |
| 07e1 | PUSH2 | 0x0161 |
| 07e4 | JUMPI | |
| 07e5 | PUSH1 | 0x20 |
| 07e7 | PUSH1 | 0x03 |
| 07e9 | SLOAD | |
| 07ea | PUSH1 | 0x40 |
| 07ec | MLOAD | |
| 07ed | SWAP1 | |
| 07ee | DUP2 | |
| 07ef | MSTORE | |
| 07f0 | RETURN | |
| 07f1 | JUMPDEST | |
| 07f2 | CALLVALUE | |
| 07f3 | PUSH2 | 0x0161 |
| 07f6 | JUMPI | |
| 07f7 | PUSH2 | 0x0100 |
| 07fa | CALLDATASIZE | |
| 07fb | PUSH1 | 0x03 |
| 07fd | NOT | |
| 07fe | ADD | |
| 07ff | SLT | |
| 0800 | PUSH2 | 0x0161 |
| 0803 | JUMPI | |
| 0804 | PUSH1 | 0x04 |
| 0806 | CALLDATALOAD | |
| 0807 | PUSH1 | 0x01 |
| 0809 | PUSH1 | 0x01 |
| 080b | PUSH1 | 0x40 |
| 080d | SHL | |
| 080e | SUB | |
| 080f | DUP2 | |
| 0810 | GT | |
| 0811 | PUSH2 | 0x0161 |
| 0814 | JUMPI | |
| 0815 | PUSH2 | 0x0822 |
| 0818 | SWAP1 | |
| 0819 | CALLDATASIZE | |
| 081a | SWAP1 | |
| 081b | PUSH1 | 0x04 |
| 081d | ADD | |
| 081e | PUSH2 | 0x1a2b |
| 0821 | JUMP | |
| 0822 | JUMPDEST | |
| 0823 | PUSH2 | 0x0180 |
| 0826 | MSTORE | |
| 0827 | PUSH1 | 0x24 |
| 0829 | CALLDATALOAD | |
| 082a | PUSH1 | 0x01 |
| 082c | PUSH1 | 0x01 |
| 082e | PUSH1 | 0x40 |
| 0830 | SHL | |
| 0831 | SUB | |
| 0832 | DUP2 | |
| 0833 | GT | |
| 0834 | PUSH2 | 0x0161 |
| 0837 | JUMPI | |
| 0838 | PUSH2 | 0x0845 |
| 083b | SWAP1 | |
| 083c | CALLDATASIZE | |
| 083d | SWAP1 | |
| 083e | PUSH1 | 0x04 |
| 0840 | ADD | |
| 0841 | PUSH2 | 0x1a2b |
| 0844 | JUMP | |
| 0845 | JUMPDEST | |
| 0846 | PUSH1 | 0x44 |
| 0848 | SWAP3 | |
| 0849 | SWAP2 | |
| 084a | SWAP3 | |
| 084b | CALLDATALOAD | |
| 084c | PUSH1 | 0x01 |
| 084e | PUSH1 | 0x01 |
| 0850 | PUSH1 | 0x40 |
| 0852 | SHL | |
| 0853 | SUB | |
| 0854 | DUP2 | |
| 0855 | GT | |
| 0856 | PUSH2 | 0x0161 |
| 0859 | JUMPI | |
| 085a | PUSH2 | 0x0867 |
| 085d | SWAP1 | |
| 085e | CALLDATASIZE | |
| 085f | SWAP1 | |
| 0860 | PUSH1 | 0x04 |
| 0862 | ADD | |
| 0863 | PUSH2 | 0x1a2b |
| 0866 | JUMP | |
| 0867 | JUMPDEST | |
| 0868 | PUSH1 | 0xa0 |
| 086a | MSTORE | |
| 086b | PUSH1 | 0x80 |
| 086d | MSTORE | |
| 086e | PUSH1 | 0x64 |
| 0870 | CALLDATALOAD | |
| 0871 | PUSH1 | 0x01 |
| 0873 | PUSH1 | 0x01 |
| 0875 | PUSH1 | 0x40 |
| 0877 | SHL | |
| 0878 | SUB | |
| 0879 | DUP2 | |
| 087a | GT | |
| 087b | PUSH2 | 0x0161 |
| 087e | JUMPI | |
| 087f | PUSH2 | 0x088c |
| 0882 | SWAP1 | |
| 0883 | CALLDATASIZE | |
| 0884 | SWAP1 | |
| 0885 | PUSH1 | 0x04 |
| 0887 | ADD | |
| 0888 | PUSH2 | 0x1a2b |
| 088b | JUMP | |
| 088c | JUMPDEST | |
| 088d | PUSH2 | 0x0120 |
| 0890 | MSTORE | |
| 0891 | PUSH2 | 0x0100 |
| 0894 | MSTORE | |
| 0895 | PUSH1 | 0x84 |
| 0897 | CALLDATALOAD | |
| 0898 | PUSH1 | 0x01 |
| 089a | PUSH1 | 0x01 |
| 089c | PUSH1 | 0x40 |
| 089e | SHL | |
| 089f | SUB | |
| 08a0 | DUP2 | |
| 08a1 | GT | |
| 08a2 | PUSH2 | 0x0161 |
| 08a5 | JUMPI | |
| 08a6 | PUSH2 | 0x08b3 |
| 08a9 | SWAP1 | |
| 08aa | CALLDATASIZE | |
| 08ab | SWAP1 | |
| 08ac | PUSH1 | 0x04 |
| 08ae | ADD | |
| 08af | PUSH2 | 0x1a2b |
| 08b2 | JUMP | |
| 08b3 | JUMPDEST | |
| 08b4 | PUSH1 | 0xc0 |
| 08b6 | MSTORE | |
| 08b7 | PUSH1 | 0xe0 |
| 08b9 | MSTORE | |
| 08ba | PUSH1 | 0xa4 |
| 08bc | CALLDATALOAD | |
| 08bd | PUSH2 | 0x0140 |
| 08c0 | DUP2 | |
| 08c1 | SWAP1 | |
| 08c2 | MSTORE | |
| 08c3 | PUSH1 | 0x01 |
| 08c5 | PUSH1 | 0x01 |
| 08c7 | PUSH1 | 0x40 |
| 08c9 | SHL | |
| 08ca | SUB | |
| 08cb | DUP2 | |
| 08cc | AND | |
| 08cd | SWAP1 | |
| 08ce | SUB | |
| 08cf | PUSH2 | 0x0161 |
| 08d2 | JUMPI | |
| 08d3 | PUSH1 | 0xc4 |
| 08d5 | CALLDATALOAD | |
| 08d6 | PUSH1 | 0x01 |
| 08d8 | PUSH1 | 0x01 |
| 08da | PUSH1 | 0x40 |
| 08dc | SHL | |
| 08dd | SUB | |
| 08de | DUP2 | |
| 08df | AND | |
| 08e0 | DUP2 | |
| 08e1 | SUB | |
| 08e2 | PUSH2 | 0x0161 |
| 08e5 | JUMPI | |
| 08e6 | PUSH1 | 0xe4 |
| 08e8 | CALLDATALOAD | |
| 08e9 | PUSH1 | 0x01 |
| 08eb | PUSH1 | 0x01 |
| 08ed | PUSH1 | 0x40 |
| 08ef | SHL | |
| 08f0 | SUB | |
| 08f1 | DUP2 | |
| 08f2 | GT | |
| 08f3 | PUSH2 | 0x0161 |
| 08f6 | JUMPI | |
| 08f7 | PUSH2 | 0x0904 |
| 08fa | SWAP1 | |
| 08fb | CALLDATASIZE | |
| 08fc | SWAP1 | |
| 08fd | PUSH1 | 0x04 |
| 08ff | ADD | |
| 0900 | PUSH2 | 0x1a2b |
| 0903 | JUMP | |
| 0904 | JUMPDEST | |
| 0905 | PUSH1 | 0x40 |
| 0907 | MLOAD | |
| 0908 | PUSH4 | 0x28305db1 |
| 090d | PUSH1 | 0xe2 |
| 090f | SHL | |
| 0910 | DUP2 | |
| 0911 | MSTORE | |
| 0912 | SWAP1 | |
| 0913 | SWAP2 | |
| 0914 | SWAP1 | |
| 0915 | PUSH1 | 0x20 |
| 0917 | DUP2 | |
| 0918 | PUSH1 | 0x04 |
| 091a | DUP2 | |
| 091b | PUSH32 | 0x00000000000000000000000070b4f3c06e5d93d695129f1255c55c01e7be13bf |
| 093c | PUSH1 | 0x01 |
| 093e | PUSH1 | 0x01 |
| 0940 | PUSH1 | 0xa0 |
| 0942 | SHL | |
| 0943 | SUB | |
| 0944 | AND | |
| 0945 | GAS | |
| 0946 | STATICCALL | |
| 0947 | SWAP1 | |
| 0948 | DUP2 | |
| 0949 | ISZERO | |
| 094a | PUSH2 | 0x0e18 |
| 094d | JUMPI | |
| 094e | PUSH2 | 0x0160 |
| 0951 | MLOAD | |
| 0952 | SWAP2 | |
| 0953 | PUSH2 | 0x0f8c |
| 0956 | JUMPI | |
| 0957 | JUMPDEST | |
| 0958 | POP | |
| 0959 | DUP1 | |
| 095a | ISZERO | |
| 095b | PUSH2 | 0x0efa |
| 095e | JUMPI | |
| 095f | JUMPDEST | |
| 0960 | PUSH2 | 0x0c47 |
| 0963 | JUMPI | |
| 0964 | JUMPDEST | |
| 0965 | POP | |
| 0966 | POP | |
| 0967 | POP | |
| 0968 | PUSH1 | 0x01 |
| 096a | PUSH1 | 0x01 |
| 096c | PUSH1 | 0x40 |
| 096e | SHL | |
| 096f | SUB | |
| 0970 | PUSH1 | 0x06 |
| 0972 | SLOAD | |
| 0973 | AND | |
| 0974 | ISZERO | |
| 0975 | DUP1 | |
| 0976 | ISZERO | |
| 0977 | SWAP1 | |
| 0978 | PUSH2 | 0x0c3c |
| 097b | JUMPI | |
| 097c | JUMPDEST | |
| 097d | PUSH2 | 0x0c27 |
| 0980 | JUMPI | |
| 0981 | DUP1 | |
| 0982 | PUSH2 | 0x0180 |
| 0985 | MLOAD | |
| 0986 | EQ | |
| 0987 | DUP1 | |
| 0988 | ISZERO | |
| 0989 | SWAP1 | |
| 098a | PUSH2 | 0x0c18 |
| 098d | JUMPI | |
| 098e | JUMPDEST | |
| 098f | PUSH2 | 0x0be1 |
| 0992 | JUMPI | |
| 0993 | PUSH1 | 0xc0 |
| 0995 | MLOAD | |
| 0996 | PUSH2 | 0x0120 |
| 0999 | MLOAD | |
| 099a | SUB | |
| 099b | PUSH2 | 0x0be1 |
| 099e | JUMPI | |
| 099f | PUSH2 | 0x0160 |
| 09a2 | MLOAD | |
| 09a3 | SWAP3 | |
| 09a4 | DUP4 | |
| 09a5 | SWAP3 | |
| 09a6 | SWAP2 | |
| 09a7 | SWAP1 | |
| 09a8 | JUMPDEST | |
| 09a9 | PUSH2 | 0x0180 |
| 09ac | MLOAD | |
| 09ad | DUP5 | |
| 09ae | LT | |
| 09af | PUSH2 | 0x0b05 |
| 09b2 | JUMPI | |
| 09b3 | DUP5 | |
| 09b4 | PUSH11 | 0x52b7d2dcc80cd2e4000000 |
| 09c0 | DUP2 | |
| 09c1 | GT | |
| 09c2 | PUSH2 | 0x0ade |
| 09c5 | JUMPI | |
| 09c6 | DUP1 | |
| 09c7 | PUSH1 | 0x05 |
| 09c9 | SSTORE | |
| 09ca | PUSH11 | 0x52b7d2dcc80cd2e4000000 |
| 09d6 | SUB | |
| 09d7 | PUSH11 | 0x52b7d2dcc80cd2e4000000 |
| 09e3 | DUP2 | |
| 09e4 | GT | |
| 09e5 | PUSH2 | 0x0ac4 |
| 09e8 | JUMPI | |
| 09e9 | PUSH1 | 0x03 |
| 09eb | SSTORE | |
| 09ec | PUSH2 | 0x0160 |
| 09ef | MLOAD | |
| 09f0 | JUMPDEST | |
| 09f1 | PUSH2 | 0x0120 |
| 09f4 | MLOAD | |
| 09f5 | DUP2 | |
| 09f6 | LT | |
| 09f7 | PUSH2 | 0x0a6f |
| 09fa | JUMPI | |
| 09fb | PUSH1 | 0x01 |
| 09fd | PUSH1 | 0x01 |
| 09ff | PUSH1 | 0x40 |
| 0a01 | SHL | |
| 0a02 | SUB | |
| 0a03 | PUSH2 | 0x0140 |
| 0a06 | MLOAD | |
| 0a07 | AND | |
| 0a08 | PUSH1 | 0x01 |
| 0a0a | PUSH1 | 0x01 |
| 0a0c | PUSH1 | 0x40 |
| 0a0e | SHL | |
| 0a0f | SUB | |
| 0a10 | NOT | |
| 0a11 | PUSH1 | 0x06 |
| 0a13 | SLOAD | |
| 0a14 | AND | |
| 0a15 | OR | |
| 0a16 | PUSH1 | 0x06 |
| 0a18 | SSTORE | |
| 0a19 | PUSH2 | 0x0a20 |
| 0a1c | PUSH2 | 0x1f17 |
| 0a1f | JUMP | |
| 0a20 | JUMPDEST | |
| 0a21 | PUSH32 | 0xb04da588109787f2e1bce4cc15cc0e414cae26034cea4902695311f75568bf87 |
| 0a42 | PUSH1 | 0x60 |
| 0a44 | PUSH1 | 0x40 |
| 0a46 | MLOAD | |
| 0a47 | PUSH2 | 0x0180 |
| 0a4a | MLOAD | |
| 0a4b | DUP2 | |
| 0a4c | MSTORE | |
| 0a4d | PUSH2 | 0x0120 |
| 0a50 | MLOAD | |
| 0a51 | PUSH1 | 0x20 |
| 0a53 | DUP3 | |
| 0a54 | ADD | |
| 0a55 | MSTORE | |
| 0a56 | PUSH1 | 0x01 |
| 0a58 | PUSH1 | 0x01 |
| 0a5a | PUSH1 | 0x40 |
| 0a5c | SHL | |
| 0a5d | SUB | |
| 0a5e | PUSH2 | 0x0140 |
| 0a61 | MLOAD | |
| 0a62 | AND | |
| 0a63 | PUSH1 | 0x40 |
| 0a65 | DUP3 | |
| 0a66 | ADD | |
| 0a67 | MSTORE | |
| 0a68 | LOG1 | |
| 0a69 | PUSH2 | 0x0160 |
| 0a6c | MLOAD | |
| 0a6d | DUP1 | |
| 0a6e | RETURN | |
| 0a6f | JUMPDEST | |
| 0a70 | DUP1 | |
| 0a71 | PUSH2 | 0x0a83 |
| 0a74 | PUSH1 | 0x01 |
| 0a76 | SWAP3 | |
| 0a77 | PUSH2 | 0x0120 |
| 0a7a | MLOAD | |
| 0a7b | PUSH2 | 0x0100 |
| 0a7e | MLOAD | |
| 0a7f | PUSH2 | 0x1c4b |
| 0a82 | JUMP | |
| 0a83 | JUMPDEST | |
| 0a84 | CALLDATALOAD | |
| 0a85 | PUSH2 | 0x0160 |
| 0a88 | MLOAD | |
| 0a89 | MSTORE | |
| 0a8a | PUSH1 | 0x07 |
| 0a8c | PUSH1 | 0x20 |
| 0a8e | MSTORE | |
| 0a8f | PUSH1 | 0x40 |
| 0a91 | PUSH2 | 0x0160 |
| 0a94 | MLOAD | |
| 0a95 | KECCAK256 | |
| 0a96 | PUSH2 | 0x0aa4 |
| 0a99 | DUP3 | |
| 0a9a | PUSH1 | 0xc0 |
| 0a9c | MLOAD | |
| 0a9d | PUSH1 | 0xe0 |
| 0a9f | MLOAD | |
| 0aa0 | PUSH2 | 0x1c4b |
| 0aa3 | JUMP | |
| 0aa4 | JUMPDEST | |
| 0aa5 | CALLDATALOAD | |
| 0aa6 | PUSH2 | 0x0160 |
| 0aa9 | MLOAD | |
| 0aaa | MSTORE | |
| 0aab | PUSH1 | 0x20 |
| 0aad | MSTORE | |
| 0aae | PUSH1 | 0x40 |
| 0ab0 | PUSH2 | 0x0160 |
| 0ab3 | MLOAD | |
| 0ab4 | KECCAK256 | |
| 0ab5 | DUP3 | |
| 0ab6 | PUSH1 | 0xff |
| 0ab8 | NOT | |
| 0ab9 | DUP3 | |
| 0aba | SLOAD | |
| 0abb | AND | |
| 0abc | OR | |
| 0abd | SWAP1 | |
| 0abe | SSTORE | |
| 0abf | ADD | |
| 0ac0 | PUSH2 | 0x09f0 |
| 0ac3 | JUMP | |
| 0ac4 | JUMPDEST | |
| 0ac5 | PUSH4 | 0x4e487b71 |
| 0aca | PUSH1 | 0xe0 |
| 0acc | SHL | |
| 0acd | PUSH2 | 0x0160 |
| 0ad0 | MLOAD | |
| 0ad1 | MSTORE | |
| 0ad2 | PUSH1 | 0x11 |
| 0ad4 | PUSH1 | 0x04 |
| 0ad6 | MSTORE | |
| 0ad7 | PUSH1 | 0x24 |
| 0ad9 | PUSH2 | 0x0160 |
| 0adc | MLOAD | |
| 0add | REVERT | |
| 0ade | JUMPDEST | |
| 0adf | PUSH4 | 0x11250051 |
| 0ae4 | PUSH1 | 0xe2 |
| 0ae6 | SHL | |
| 0ae7 | PUSH2 | 0x0160 |
| 0aea | MLOAD | |
| 0aeb | MSTORE | |
| 0aec | PUSH1 | 0x04 |
| 0aee | MSTORE | |
| 0aef | PUSH11 | 0x52b7d2dcc80cd2e4000000 |
| 0afb | PUSH1 | 0x24 |
| 0afd | MSTORE | |
| 0afe | PUSH1 | 0x44 |
| 0b00 | PUSH2 | 0x0160 |
| 0b03 | MLOAD | |
| 0b04 | REVERT | |
| 0b05 | JUMPDEST | |
| 0b06 | SWAP1 | |
| 0b07 | SWAP2 | |
| 0b08 | SWAP3 | |
| 0b09 | SWAP4 | |
| 0b0a | PUSH2 | 0x0b17 |
| 0b0d | DUP6 | |
| 0b0e | PUSH2 | 0x0180 |
| 0b11 | MLOAD | |
| 0b12 | DUP7 | |
| 0b13 | PUSH2 | 0x1c4b |
| 0b16 | JUMP | |
| 0b17 | JUMPDEST | |
| 0b18 | CALLDATALOAD | |
| 0b19 | ISZERO | |
| 0b1a | DUP1 | |
| 0b1b | ISZERO | |
| 0b1c | PUSH2 | 0x0bf6 |
| 0b1f | JUMPI | |
| 0b20 | JUMPDEST | |
| 0b21 | PUSH2 | 0x0be1 |
| 0b24 | JUMPI | |
| 0b25 | PUSH2 | 0x0b32 |
| 0b28 | DUP6 | |
| 0b29 | PUSH2 | 0x0180 |
| 0b2c | MLOAD | |
| 0b2d | DUP7 | |
| 0b2e | PUSH2 | 0x1c4b |
| 0b31 | JUMP | |
| 0b32 | JUMPDEST | |
| 0b33 | CALLDATALOAD | |
| 0b34 | PUSH2 | 0x0160 |
| 0b37 | MLOAD | |
| 0b38 | MSTORE | |
| 0b39 | PUSH1 | 0x04 |
| 0b3b | PUSH1 | 0x20 |
| 0b3d | MSTORE | |
| 0b3e | PUSH1 | 0x40 |
| 0b40 | PUSH2 | 0x0160 |
| 0b43 | MLOAD | |
| 0b44 | KECCAK256 | |
| 0b45 | PUSH1 | 0x01 |
| 0b47 | DUP2 | |
| 0b48 | ADD | |
| 0b49 | SWAP1 | |
| 0b4a | PUSH1 | 0x01 |
| 0b4c | PUSH1 | 0x01 |
| 0b4e | PUSH1 | 0x40 |
| 0b50 | SHL | |
| 0b51 | SUB | |
| 0b52 | DUP3 | |
| 0b53 | SLOAD | |
| 0b54 | AND | |
| 0b55 | PUSH2 | 0x0bb9 |
| 0b58 | JUMPI | |
| 0b59 | SWAP2 | |
| 0b5a | PUSH2 | 0x0baf |
| 0b5d | SWAP2 | |
| 0b5e | PUSH1 | 0x01 |
| 0b60 | SWAP4 | |
| 0b61 | PUSH2 | 0x0b6b |
| 0b64 | DUP10 | |
| 0b65 | DUP9 | |
| 0b66 | DUP9 | |
| 0b67 | PUSH2 | 0x1c4b |
| 0b6a | JUMP | |
| 0b6b | JUMPDEST | |
| 0b6c | CALLDATALOAD | |
| 0b6d | SWAP1 | |
| 0b6e | SSTORE | |
| 0b6f | PUSH1 | 0x01 |
| 0b71 | PUSH1 | 0x01 |
| 0b73 | PUSH1 | 0x40 |
| 0b75 | SHL | |
| 0b76 | SUB | |
| 0b77 | PUSH2 | 0x0b8d |
| 0b7a | PUSH2 | 0x0b88 |
| 0b7d | DUP11 | |
| 0b7e | PUSH1 | 0xa0 |
| 0b80 | MLOAD | |
| 0b81 | PUSH1 | 0x80 |
| 0b83 | MLOAD | |
| 0b84 | PUSH2 | 0x1c4b |
| 0b87 | JUMP | |
| 0b88 | JUMPDEST | |
| 0b89 | PUSH2 | 0x1c6f |
| 0b8c | JUMP | |
| 0b8d | JUMPDEST | |
| 0b8e | AND | |
| 0b8f | PUSH1 | 0x01 |
| 0b91 | PUSH1 | 0x01 |
| 0b93 | PUSH1 | 0x40 |
| 0b95 | SHL | |
| 0b96 | SUB | |
| 0b97 | NOT | |
| 0b98 | DUP3 | |
| 0b99 | SLOAD | |
| 0b9a | AND | |
| 0b9b | OR | |
| 0b9c | SWAP1 | |
| 0b9d | SSTORE | |
| 0b9e | PUSH2 | 0x0ba8 |
| 0ba1 | DUP8 | |
| 0ba2 | DUP7 | |
| 0ba3 | DUP7 | |
| 0ba4 | PUSH2 | 0x1c4b |
| 0ba7 | JUMP | |
| 0ba8 | JUMPDEST | |
| 0ba9 | CALLDATALOAD | |
| 0baa | SWAP1 | |
| 0bab | PUSH2 | 0x1b48 |
| 0bae | JUMP | |
| 0baf | JUMPDEST | |
| 0bb0 | SWAP5 | |
| 0bb1 | ADD | |
| 0bb2 | SWAP3 | |
| 0bb3 | SWAP2 | |
| 0bb4 | SWAP1 | |
| 0bb5 | PUSH2 | 0x09a8 |
| 0bb8 | JUMP | |
| 0bb9 | JUMPDEST | |
| 0bba | PUSH2 | 0x0bc8 |
| 0bbd | DUP8 | |
| 0bbe | DUP8 | |
| 0bbf | PUSH2 | 0x0180 |
| 0bc2 | MLOAD | |
| 0bc3 | SWAP1 | |
| 0bc4 | PUSH2 | 0x1c4b |
| 0bc7 | JUMP | |
| 0bc8 | JUMPDEST | |
| 0bc9 | CALLDATALOAD | |
| 0bca | PUSH4 | 0x724ac173 |
| 0bcf | PUSH1 | 0xe0 |
| 0bd1 | SHL | |
| 0bd2 | PUSH2 | 0x0160 |
| 0bd5 | MLOAD | |
| 0bd6 | MSTORE | |
| 0bd7 | PUSH1 | 0x04 |
| 0bd9 | MSTORE | |
| 0bda | PUSH1 | 0x24 |
| 0bdc | PUSH2 | 0x0160 |
| 0bdf | MLOAD | |
| 0be0 | REVERT | |
| 0be1 | JUMPDEST | |
| 0be2 | PUSH4 | 0x200ff7d7 |
| 0be7 | PUSH1 | 0xe1 |
| 0be9 | SHL | |
| 0bea | PUSH2 | 0x0160 |
| 0bed | MLOAD | |
| 0bee | MSTORE | |
| 0bef | PUSH1 | 0x04 |
| 0bf1 | PUSH2 | 0x0160 |
| 0bf4 | MLOAD | |
| 0bf5 | REVERT | |
| 0bf6 | JUMPDEST | |
| 0bf7 | POP | |
| 0bf8 | PUSH1 | 0x01 |
| 0bfa | PUSH1 | 0x01 |
| 0bfc | PUSH1 | 0x40 |
| 0bfe | SHL | |
| 0bff | SUB | |
| 0c00 | PUSH2 | 0x0c11 |
| 0c03 | PUSH2 | 0x0b88 |
| 0c06 | DUP8 | |
| 0c07 | PUSH1 | 0xa0 |
| 0c09 | MLOAD | |
| 0c0a | PUSH1 | 0x80 |
| 0c0c | MLOAD | |
| 0c0d | PUSH2 | 0x1c4b |
| 0c10 | JUMP | |
| 0c11 | JUMPDEST | |
| 0c12 | AND | |
| 0c13 | ISZERO | |
| 0c14 | PUSH2 | 0x0b20 |
| 0c17 | JUMP | |
| 0c18 | JUMPDEST | |
| 0c19 | POP | |
| 0c1a | PUSH1 | 0xa0 |
| 0c1c | MLOAD | |
| 0c1d | PUSH2 | 0x0180 |
| 0c20 | MLOAD | |
| 0c21 | EQ | |
| 0c22 | ISZERO | |
| 0c23 | PUSH2 | 0x098e |
| 0c26 | JUMP | |
| 0c27 | JUMPDEST | |
| 0c28 | PUSH4 | 0xdc63d81f |
| 0c2d | PUSH1 | 0xe0 |
| 0c2f | SHL | |
| 0c30 | PUSH2 | 0x0160 |
| 0c33 | MLOAD | |
| 0c34 | MSTORE | |
| 0c35 | PUSH1 | 0x04 |
| 0c37 | PUSH2 | 0x0160 |
| 0c3a | MLOAD | |
| 0c3b | REVERT | |
| 0c3c | JUMPDEST | |
| 0c3d | POP | |
| 0c3e | PUSH1 | 0x05 |
| 0c40 | SLOAD | |
| 0c41 | ISZERO | |
| 0c42 | ISZERO | |
| 0c43 | PUSH2 | 0x097c |
| 0c46 | JUMP | |
| 0c47 | JUMPDEST | |
| 0c48 | PUSH1 | 0x40 |
| 0c4a | MLOAD | |
| 0c4b | PUSH1 | 0xc0 |
| 0c4d | PUSH1 | 0x20 |
| 0c4f | DUP3 | |
| 0c50 | ADD | |
| 0c51 | MSTORE | |
| 0c52 | PUSH1 | 0x20 |
| 0c54 | PUSH2 | 0x0c7a |
| 0c57 | PUSH2 | 0x0c67 |
| 0c5a | PUSH1 | 0xe0 |
| 0c5c | DUP5 | |
| 0c5d | ADD | |
| 0c5e | PUSH2 | 0x0180 |
| 0c61 | MLOAD | |
| 0c62 | DUP11 | |
| 0c63 | PUSH2 | 0x1c27 |
| 0c66 | JUMP | |
| 0c67 | JUMPDEST | |
| 0c68 | DUP4 | |
| 0c69 | DUP2 | |
| 0c6a | SUB | |
| 0c6b | PUSH1 | 0x1f |
| 0c6d | NOT | |
| 0c6e | ADD | |
| 0c6f | PUSH1 | 0x40 |
| 0c71 | DUP6 | |
| 0c72 | ADD | |
| 0c73 | MSTORE | |
| 0c74 | DUP8 | |
| 0c75 | DUP11 | |
| 0c76 | PUSH2 | 0x1c27 |
| 0c79 | JUMP | |
| 0c7a | JUMPDEST | |
| 0c7b | PUSH1 | 0x1f |
| 0c7d | NOT | |
| 0c7e | DUP4 | |
| 0c7f | DUP3 | |
| 0c80 | SUB | |
| 0c81 | ADD | |
| 0c82 | PUSH1 | 0x60 |
| 0c84 | DUP5 | |
| 0c85 | ADD | |
| 0c86 | MSTORE | |
| 0c87 | PUSH1 | 0xa0 |
| 0c89 | MLOAD | |
| 0c8a | DUP2 | |
| 0c8b | MSTORE | |
| 0c8c | ADD | |
| 0c8d | DUP2 | |
| 0c8e | PUSH1 | 0x80 |
| 0c90 | MLOAD | |
| 0c91 | PUSH2 | 0x0160 |
| 0c94 | MLOAD | |
| 0c95 | JUMPDEST | |
| 0c96 | PUSH1 | 0xa0 |
| 0c98 | MLOAD | |
| 0c99 | DUP2 | |
| 0c9a | LT | |
| 0c9b | PUSH2 | 0x0ec8 |
| 0c9e | JUMPI | |
| 0c9f | POP | |
| 0ca0 | POP | |
| 0ca1 | PUSH2 | 0x0cda |
| 0ca4 | PUSH2 | 0x0cc3 |
| 0ca7 | PUSH2 | 0x0cfa |
| 0caa | SWAP4 | |
| 0cab | PUSH1 | 0x1f |
| 0cad | NOT | |
| 0cae | DUP5 | |
| 0caf | DUP3 | |
| 0cb0 | SUB | |
| 0cb1 | ADD | |
| 0cb2 | PUSH1 | 0x80 |
| 0cb4 | DUP6 | |
| 0cb5 | ADD | |
| 0cb6 | MSTORE | |
| 0cb7 | PUSH2 | 0x0120 |
| 0cba | MLOAD | |
| 0cbb | PUSH2 | 0x0100 |
| 0cbe | MLOAD | |
| 0cbf | PUSH2 | 0x1c27 |
| 0cc2 | JUMP | |
| 0cc3 | JUMPDEST | |
| 0cc4 | DUP3 | |
| 0cc5 | DUP2 | |
| 0cc6 | SUB | |
| 0cc7 | PUSH1 | 0x1f |
| 0cc9 | NOT | |
| 0cca | ADD | |
| 0ccb | PUSH1 | 0xa0 |
| 0ccd | DUP5 | |
| 0cce | ADD | |
| 0ccf | MSTORE | |
| 0cd0 | PUSH1 | 0xc0 |
| 0cd2 | MLOAD | |
| 0cd3 | PUSH1 | 0xe0 |
| 0cd5 | MLOAD | |
| 0cd6 | PUSH2 | 0x1c27 |
| 0cd9 | JUMP | |
| 0cda | JUMPDEST | |
| 0cdb | PUSH1 | 0x01 |
| 0cdd | PUSH1 | 0x01 |
| 0cdf | PUSH1 | 0x40 |
| 0ce1 | SHL | |
| 0ce2 | SUB | |
| 0ce3 | PUSH2 | 0x0140 |
| 0ce6 | MLOAD | |
| 0ce7 | AND | |
| 0ce8 | PUSH1 | 0xc0 |
| 0cea | DUP4 | |
| 0ceb | ADD | |
| 0cec | MSTORE | |
| 0ced | SUB | |
| 0cee | PUSH1 | 0x1f |
| 0cf0 | NOT | |
| 0cf1 | DUP2 | |
| 0cf2 | ADD | |
| 0cf3 | DUP4 | |
| 0cf4 | MSTORE | |
| 0cf5 | DUP3 | |
| 0cf6 | PUSH2 | 0x1ac8 |
| 0cf9 | JUMP | |
| 0cfa | JUMPDEST | |
| 0cfb | DUP1 | |
| 0cfc | MLOAD | |
| 0cfd | PUSH1 | 0x20 |
| 0cff | SWAP1 | |
| 0d00 | SWAP2 | |
| 0d01 | ADD | |
| 0d02 | KECCAK256 | |
| 0d03 | PUSH1 | 0x01 |
| 0d05 | PUSH1 | 0x01 |
| 0d07 | PUSH1 | 0xa0 |
| 0d09 | SHL | |
| 0d0a | SUB | |
| 0d0b | PUSH32 | 0x00000000000000000000000070b4f3c06e5d93d695129f1255c55c01e7be13bf |
| 0d2c | AND | |
| 0d2d | EXTCODESIZE | |
| 0d2e | ISZERO | |
| 0d2f | PUSH2 | 0x0161 |
| 0d32 | JUMPI | |
| 0d33 | DUP3 | |
| 0d34 | SWAP1 | |
| 0d35 | PUSH1 | 0x01 |
| 0d37 | PUSH1 | 0x01 |
| 0d39 | PUSH1 | 0x40 |
| 0d3b | SHL | |
| 0d3c | SUB | |
| 0d3d | PUSH1 | 0x40 |
| 0d3f | MLOAD | |
| 0d40 | SWAP6 | |
| 0d41 | PUSH4 | 0x22f3f447 |
| 0d46 | PUSH1 | 0xe1 |
| 0d48 | SHL | |
| 0d49 | DUP8 | |
| 0d4a | MSTORE | |
| 0d4b | PUSH2 | 0x0160 |
| 0d4e | MLOAD | |
| 0d4f | POP | |
| 0d50 | PUSH1 | 0x84 |
| 0d52 | DUP8 | |
| 0d53 | ADD | |
| 0d54 | SWAP3 | |
| 0d55 | PUSH32 | 0x08296c4851c7aca93c422c73902d61d179ed1bf52cf0ed257e6d096b9a8bb851 |
| 0d76 | PUSH1 | 0x04 |
| 0d78 | DUP10 | |
| 0d79 | ADD | |
| 0d7a | MSTORE | |
| 0d7b | PUSH1 | 0x24 |
| 0d7d | DUP9 | |
| 0d7e | ADD | |
| 0d7f | MSTORE | |
| 0d80 | AND | |
| 0d81 | PUSH1 | 0x44 |
| 0d83 | DUP7 | |
| 0d84 | ADD | |
| 0d85 | MSTORE | |
| 0d86 | PUSH1 | 0x80 |
| 0d88 | PUSH1 | 0x64 |
| 0d8a | DUP7 | |
| 0d8b | ADD | |
| 0d8c | MSTORE | |
| 0d8d | MSTORE | |
| 0d8e | PUSH1 | 0xa4 |
| 0d90 | DUP4 | |
| 0d91 | ADD | |
| 0d92 | PUSH1 | 0xa0 |
| 0d94 | PUSH1 | 0x04 |
| 0d96 | DUP5 | |
| 0d97 | PUSH1 | 0x05 |
| 0d99 | SHL | |
| 0d9a | DUP7 | |
| 0d9b | ADD | |
| 0d9c | ADD | |
| 0d9d | ADD | |
| 0d9e | SWAP3 | |
| 0d9f | DUP3 | |
| 0da0 | PUSH2 | 0x0160 |
| 0da3 | MLOAD | |
| 0da4 | SWAP1 | |
| 0da5 | JUMPDEST | |
| 0da6 | DUP3 | |
| 0da7 | DUP3 | |
| 0da8 | LT | |
| 0da9 | PUSH2 | 0x0e26 |
| 0dac | JUMPI | |
| 0dad | POP | |
| 0dae | POP | |
| 0daf | PUSH2 | 0x0160 |
| 0db2 | MLOAD | |
| 0db3 | SWAP4 | |
| 0db4 | DUP6 | |
| 0db5 | SWAP4 | |
| 0db6 | POP | |
| 0db7 | DUP4 | |
| 0db8 | SWAP1 | |
| 0db9 | SUB | |
| 0dba | SWAP2 | |
| 0dbb | POP | |
| 0dbc | DUP3 | |
| 0dbd | SWAP1 | |
| 0dbe | POP | |
| 0dbf | DUP4 | |
| 0dc0 | PUSH32 | 0x00000000000000000000000070b4f3c06e5d93d695129f1255c55c01e7be13bf |
| 0de1 | PUSH1 | 0x01 |
| 0de3 | PUSH1 | 0x01 |
| 0de5 | PUSH1 | 0xa0 |
| 0de7 | SHL | |
| 0de8 | SUB | |
| 0de9 | AND | |
| 0dea | GAS | |
| 0deb | CALL | |
| 0dec | DUP1 | |
| 0ded | ISZERO | |
| 0dee | PUSH2 | 0x0e18 |
| 0df1 | JUMPI | |
| 0df2 | PUSH2 | 0x0dfd |
| 0df5 | JUMPI | |
| 0df6 | JUMPDEST | |
| 0df7 | DUP1 | |
| 0df8 | DUP1 | |
| 0df9 | PUSH2 | 0x0964 |
| 0dfc | JUMP | |
| 0dfd | JUMPDEST | |
| 0dfe | PUSH2 | 0x0160 |
| 0e01 | MLOAD | |
| 0e02 | PUSH2 | 0x0e0a |
| 0e05 | SWAP2 | |
| 0e06 | PUSH2 | 0x1ac8 |
| 0e09 | JUMP | |
| 0e0a | JUMPDEST | |
| 0e0b | PUSH2 | 0x0160 |
| 0e0e | MLOAD | |
| 0e0f | PUSH2 | 0x0161 |
| 0e12 | JUMPI | |
| 0e13 | DUP4 | |
| 0e14 | PUSH2 | 0x0df6 |
| 0e17 | JUMP | |
| 0e18 | JUMPDEST | |
| 0e19 | PUSH1 | 0x40 |
| 0e1b | MLOAD | |
| 0e1c | RETURNDATASIZE | |
| 0e1d | PUSH2 | 0x0160 |
| 0e20 | MLOAD | |
| 0e21 | DUP3 | |
| 0e22 | RETURNDATACOPY | |
| 0e23 | RETURNDATASIZE | |
| 0e24 | SWAP1 | |
| 0e25 | REVERT | |
| 0e26 | JUMPDEST | |
| 0e27 | SWAP1 | |
| 0e28 | SWAP2 | |
| 0e29 | SWAP3 | |
| 0e2a | SWAP4 | |
| 0e2b | SWAP5 | |
| 0e2c | PUSH1 | 0x9f |
| 0e2e | NOT | |
| 0e2f | PUSH1 | 0x03 |
| 0e31 | NOT | |
| 0e32 | DUP9 | |
| 0e33 | DUP4 | |
| 0e34 | SUB | |
| 0e35 | ADD | |
| 0e36 | ADD | |
| 0e37 | DUP6 | |
| 0e38 | MSTORE | |
| 0e39 | DUP6 | |
| 0e3a | CALLDATALOAD | |
| 0e3b | PUSH1 | 0x7e |
| 0e3d | NOT | |
| 0e3e | DUP4 | |
| 0e3f | CALLDATASIZE | |
| 0e40 | SUB | |
| 0e41 | ADD | |
| 0e42 | DUP2 | |
| 0e43 | SLT | |
| 0e44 | ISZERO | |
| 0e45 | PUSH2 | 0x0161 |
| 0e48 | JUMPI | |
| 0e49 | DUP3 | |
| 0e4a | ADD | |
| 0e4b | PUSH1 | 0x01 |
| 0e4d | PUSH1 | 0x01 |
| 0e4f | PUSH1 | 0xa0 |
| 0e51 | SHL | |
| 0e52 | SUB | |
| 0e53 | PUSH2 | 0x0e5b |
| 0e56 | DUP3 | |
| 0e57 | PUSH2 | 0x1a87 |
| 0e5a | JUMP | |
| 0e5b | JUMPDEST | |
| 0e5c | AND | |
| 0e5d | DUP3 | |
| 0e5e | MSTORE | |
| 0e5f | PUSH1 | 0x20 |
| 0e61 | DUP2 | |
| 0e62 | ADD | |
| 0e63 | CALLDATALOAD | |
| 0e64 | SWAP2 | |
| 0e65 | PUSH1 | 0xff |
| 0e67 | DUP4 | |
| 0e68 | AND | |
| 0e69 | DUP1 | |
| 0e6a | SWAP4 | |
| 0e6b | SUB | |
| 0e6c | PUSH2 | 0x0161 |
| 0e6f | JUMPI | |
| 0e70 | PUSH2 | 0x0ebb |
| 0e73 | PUSH1 | 0x20 |
| 0e75 | SWAP3 | |
| 0e76 | DUP3 | |
| 0e77 | PUSH1 | 0x01 |
| 0e79 | SWAP6 | |
| 0e7a | DUP6 | |
| 0e7b | DUP1 | |
| 0e7c | SWAP6 | |
| 0e7d | ADD | |
| 0e7e | MSTORE | |
| 0e7f | PUSH2 | 0x0ead |
| 0e82 | PUSH2 | 0x0ea2 |
| 0e85 | PUSH2 | 0x0e91 |
| 0e88 | PUSH1 | 0x40 |
| 0e8a | DUP6 | |
| 0e8b | ADD | |
| 0e8c | DUP6 | |
| 0e8d | PUSH2 | 0x1b55 |
| 0e90 | JUMP | |
| 0e91 | JUMPDEST | |
| 0e92 | PUSH1 | 0x80 |
| 0e94 | PUSH1 | 0x40 |
| 0e96 | DUP7 | |
| 0e97 | ADD | |
| 0e98 | MSTORE | |
| 0e99 | PUSH1 | 0x80 |
| 0e9b | DUP6 | |
| 0e9c | ADD | |
| 0e9d | SWAP2 | |
| 0e9e | PUSH2 | 0x1b86 |
| 0ea1 | JUMP | |
| 0ea2 | JUMPDEST | |
| 0ea3 | SWAP3 | |
| 0ea4 | PUSH1 | 0x60 |
| 0ea6 | DUP2 | |
| 0ea7 | ADD | |
| 0ea8 | SWAP1 | |
| 0ea9 | PUSH2 | 0x1b55 |
| 0eac | JUMP | |
| 0ead | JUMPDEST | |
| 0eae | SWAP2 | |
| 0eaf | PUSH1 | 0x60 |
| 0eb1 | DUP2 | |
| 0eb2 | DUP6 | |
| 0eb3 | SUB | |
| 0eb4 | SWAP2 | |
| 0eb5 | ADD | |
| 0eb6 | MSTORE | |
| 0eb7 | PUSH2 | 0x1b86 |
| 0eba | JUMP | |
| 0ebb | JUMPDEST | |
| 0ebc | SWAP8 | |
| 0ebd | ADD | |
| 0ebe | SWAP6 | |
| 0ebf | ADD | |
| 0ec0 | SWAP4 | |
| 0ec1 | SWAP3 | |
| 0ec2 | ADD | |
| 0ec3 | SWAP1 | |
| 0ec4 | PUSH2 | 0x0da5 |
| 0ec7 | JUMP | |
| 0ec8 | JUMPDEST | |
| 0ec9 | SWAP2 | |
| 0eca | POP | |
| 0ecb | SWAP2 | |
| 0ecc | PUSH2 | 0x0160 |
| 0ecf | MLOAD | |
| 0ed0 | POP | |
| 0ed1 | DUP3 | |
| 0ed2 | CALLDATALOAD | |
| 0ed3 | SWAP1 | |
| 0ed4 | PUSH1 | 0x01 |
| 0ed6 | PUSH1 | 0x01 |
| 0ed8 | PUSH1 | 0x40 |
| 0eda | SHL | |
| 0edb | SUB | |
| 0edc | DUP3 | |
| 0edd | AND | |
| 0ede | DUP1 | |
| 0edf | SWAP3 | |
| 0ee0 | SUB | |
| 0ee1 | PUSH2 | 0x0161 |
| 0ee4 | JUMPI | |
| 0ee5 | PUSH1 | 0x20 |
| 0ee7 | DUP2 | |
| 0ee8 | PUSH1 | 0x01 |
| 0eea | SWAP4 | |
| 0eeb | DUP3 | |
| 0eec | SWAP4 | |
| 0eed | MSTORE | |
| 0eee | ADD | |
| 0eef | SWAP4 | |
| 0ef0 | ADD | |
| 0ef1 | SWAP2 | |
| 0ef2 | ADD | |
| 0ef3 | SWAP1 | |
| 0ef4 | DUP4 | |
| 0ef5 | SWAP2 | |
| 0ef6 | PUSH2 | 0x0c95 |
| 0ef9 | JUMP | |
| 0efa | JUMPDEST | |
| 0efb | POP | |
| 0efc | PUSH1 | 0x40 |
| 0efe | MLOAD | |
| 0eff | PUSH4 | 0xf5778b03 |
| 0f04 | PUSH1 | 0xe0 |
| 0f06 | SHL | |
| 0f07 | DUP2 | |
| 0f08 | MSTORE | |
| 0f09 | PUSH1 | 0x20 |
| 0f0b | DUP2 | |
| 0f0c | PUSH1 | 0x04 |
| 0f0e | DUP2 | |
| 0f0f | PUSH32 | 0x00000000000000000000000070b4f3c06e5d93d695129f1255c55c01e7be13bf |
| 0f30 | PUSH1 | 0x01 |
| 0f32 | PUSH1 | 0x01 |
| 0f34 | PUSH1 | 0xa0 |
| 0f36 | SHL | |
| 0f37 | SUB | |
| 0f38 | AND | |
| 0f39 | GAS | |
| 0f3a | STATICCALL | |
| 0f3b | SWAP1 | |
| 0f3c | DUP2 | |
| 0f3d | ISZERO | |
| 0f3e | PUSH2 | 0x0e18 |
| 0f41 | JUMPI | |
| 0f42 | PUSH2 | 0x0160 |
| 0f45 | MLOAD | |
| 0f46 | SWAP2 | |
| 0f47 | PUSH2 | 0x0f5d |
| 0f4a | JUMPI | |
| 0f4b | JUMPDEST | |
| 0f4c | POP | |
| 0f4d | PUSH1 | 0x01 |
| 0f4f | PUSH1 | 0x01 |
| 0f51 | PUSH1 | 0xa0 |
| 0f53 | SHL | |
| 0f54 | SUB | |
| 0f55 | AND | |
| 0f56 | CALLER | |
| 0f57 | EQ | |
| 0f58 | ISZERO | |
| 0f59 | PUSH2 | 0x095f |
| 0f5c | JUMP | |
| 0f5d | JUMPDEST | |
| 0f5e | PUSH2 | 0x0f7f |
| 0f61 | SWAP2 | |
| 0f62 | POP | |
| 0f63 | PUSH1 | 0x20 |
| 0f65 | RETURNDATASIZE | |
| 0f66 | PUSH1 | 0x20 |
| 0f68 | GT | |
| 0f69 | PUSH2 | 0x0f85 |
| 0f6c | JUMPI | |
| 0f6d | JUMPDEST | |
| 0f6e | PUSH2 | 0x0f77 |
| 0f71 | DUP2 | |
| 0f72 | DUP4 | |
| 0f73 | PUSH2 | 0x1ac8 |
| 0f76 | JUMP | |
| 0f77 | JUMPDEST | |
| 0f78 | DUP2 | |
| 0f79 | ADD | |
| 0f7a | SWAP1 | |
| 0f7b | PUSH2 | 0x1c08 |
| 0f7e | JUMP | |
| 0f7f | JUMPDEST | |
| 0f80 | DUP8 | |
| 0f81 | PUSH2 | 0x0f4b |
| 0f84 | JUMP | |
| 0f85 | JUMPDEST | |
| 0f86 | POP | |
| 0f87 | RETURNDATASIZE | |
| 0f88 | PUSH2 | 0x0f6d |
| 0f8b | JUMP | |
| 0f8c | JUMPDEST | |
| 0f8d | PUSH2 | 0x0fae |
| 0f90 | SWAP2 | |
| 0f91 | POP | |
| 0f92 | PUSH1 | 0x20 |
| 0f94 | RETURNDATASIZE | |
| 0f95 | PUSH1 | 0x20 |
| 0f97 | GT | |
| 0f98 | PUSH2 | 0x0fb4 |
| 0f9b | JUMPI | |
| 0f9c | JUMPDEST | |
| 0f9d | PUSH2 | 0x0fa6 |
| 0fa0 | DUP2 | |
| 0fa1 | DUP4 | |
| 0fa2 | PUSH2 | 0x1ac8 |
| 0fa5 | JUMP | |
| 0fa6 | JUMPDEST | |
| 0fa7 | DUP2 | |
| 0fa8 | ADD | |
| 0fa9 | SWAP1 | |
| 0faa | PUSH2 | 0x1bf0 |
| 0fad | JUMP | |
| 0fae | JUMPDEST | |
| 0faf | DUP8 | |
| 0fb0 | PUSH2 | 0x0957 |
| 0fb3 | JUMP | |
| 0fb4 | JUMPDEST | |
| 0fb5 | POP | |
| 0fb6 | RETURNDATASIZE | |
| 0fb7 | PUSH2 | 0x0f9c |
| 0fba | JUMP | |
| 0fbb | JUMPDEST | |
| 0fbc | CALLVALUE | |
| 0fbd | PUSH2 | 0x0161 |
| 0fc0 | JUMPI | |
| 0fc1 | PUSH1 | 0xa0 |
| 0fc3 | CALLDATASIZE | |
| 0fc4 | PUSH1 | 0x03 |
| 0fc6 | NOT | |
| 0fc7 | ADD | |
| 0fc8 | SLT | |
| 0fc9 | PUSH2 | 0x0161 |
| 0fcc | JUMPI | |
| 0fcd | PUSH1 | 0x04 |
| 0fcf | CALLDATALOAD | |
| 0fd0 | PUSH1 | 0x04 |
| 0fd2 | DUP2 | |
| 0fd3 | LT | |
| 0fd4 | ISZERO | |
| 0fd5 | PUSH2 | 0x0161 |
| 0fd8 | JUMPI | |
| 0fd9 | PUSH2 | 0x0fe0 |
| 0fdc | PUSH2 | 0x1a71 |
| 0fdf | JUMP | |
| 0fe0 | JUMPDEST | |
| 0fe1 | SWAP1 | |
| 0fe2 | PUSH1 | 0x64 |
| 0fe4 | CALLDATALOAD | |
| 0fe5 | SWAP1 | |
| 0fe6 | PUSH1 | 0x84 |
| 0fe8 | CALLDATALOAD | |
| 0fe9 | PUSH1 | 0x01 |
| 0feb | PUSH1 | 0x01 |
| 0fed | PUSH1 | 0xa0 |
| 0fef | SHL | |
| 0ff0 | SUB | |
| 0ff1 | DUP2 | |
| 0ff2 | AND | |
| 0ff3 | SWAP2 | |
| 0ff4 | PUSH1 | 0x44 |
| 0ff6 | CALLDATALOAD | |
| 0ff7 | SWAP2 | |
| 0ff8 | DUP4 | |
| 0ff9 | DUP2 | |
| 0ffa | SUB | |
| 0ffb | PUSH2 | 0x0161 |
| 0ffe | JUMPI | |
| 0fff | PUSH2 | 0x1006 |
| 1002 | PUSH2 | 0x20a9 |
| 1005 | JUMP | |
| 1006 | JUMPDEST | |
| 1007 | PUSH2 | 0x0160 |
| 100a | MLOAD | |
| 100b | SLOAD | |
| 100c | DUP5 | |
| 100d | ISZERO | |
| 100e | SWAP1 | |
| 100f | PUSH1 | 0x01 |
| 1011 | PUSH1 | 0x01 |
| 1013 | PUSH1 | 0xa0 |
| 1015 | SHL | |
| 1016 | SUB | |
| 1017 | AND | |
| 1018 | DUP2 | |
| 1019 | ISZERO | |
| 101a | PUSH2 | 0x1243 |
| 101d | JUMPI | |
| 101e | JUMPDEST | |
| 101f | POP | |
| 1020 | PUSH2 | 0x122a |
| 1023 | JUMPI | |
| 1024 | PUSH2 | 0x102e |
| 1027 | DUP4 | |
| 1028 | DUP8 | |
| 1029 | DUP5 | |
| 102a | PUSH2 | 0x1b2f |
| 102d | JUMP | |
| 102e | JUMPDEST | |
| 102f | SWAP5 | |
| 1030 | PUSH0 | |
| 1031 | NOT | |
| 1032 | DUP2 | |
| 1033 | SUB | |
| 1034 | PUSH2 | 0x1225 |
| 1037 | JUMPI | |
| 1038 | POP | |
| 1039 | DUP5 | |
| 103a | JUMPDEST | |
| 103b | DUP1 | |
| 103c | SWAP6 | |
| 103d | DUP2 | |
| 103e | ISZERO | |
| 103f | PUSH2 | 0x1210 |
| 1042 | JUMPI | |
| 1043 | DUP1 | |
| 1044 | DUP3 | |
| 1045 | GT | |
| 1046 | PUSH2 | 0x11e5 |
| 1049 | JUMPI | |
| 104a | POP | |
| 104b | PUSH2 | 0x0160 |
| 104e | MLOAD | |
| 104f | SWAP2 | |
| 1050 | DUP4 | |
| 1051 | PUSH2 | 0x10f0 |
| 1054 | JUMPI | |
| 1055 | POP | |
| 1056 | POP | |
| 1057 | PUSH2 | 0x0160 |
| 105a | MLOAD | |
| 105b | DUP1 | |
| 105c | DUP1 | |
| 105d | DUP1 | |
| 105e | DUP9 | |
| 105f | DUP9 | |
| 1060 | GAS | |
| 1061 | CALL | |
| 1062 | PUSH2 | 0x1069 |
| 1065 | PUSH2 | 0x1bc1 |
| 1068 | JUMP | |
| 1069 | JUMPDEST | |
| 106a | POP | |
| 106b | ISZERO | |
| 106c | PUSH2 | 0x10d4 |
| 106f | JUMPI | |
| 1070 | JUMPDEST | |
| 1071 | PUSH2 | 0x10ba |
| 1074 | JUMPI | |
| 1075 | PUSH1 | 0x40 |
| 1077 | DUP1 | |
| 1078 | MLOAD | |
| 1079 | SWAP3 | |
| 107a | DUP4 | |
| 107b | MSTORE | |
| 107c | PUSH1 | 0x20 |
| 107e | DUP4 | |
| 107f | DUP2 | |
| 1080 | ADD | |
| 1081 | DUP7 | |
| 1082 | SWAP1 | |
| 1083 | MSTORE | |
| 1084 | SWAP6 | |
| 1085 | PUSH1 | 0x01 |
| 1087 | PUSH1 | 0x01 |
| 1089 | PUSH1 | 0xa0 |
| 108b | SHL | |
| 108c | SUB | |
| 108d | AND | |
| 108e | SWAP3 | |
| 108f | PUSH32 | 0x7643c83e539cea2f6bf506545392e52cfd5f917e327efbcd0ba28f29c28d042e |
| 10b0 | SWAP2 | |
| 10b1 | SWAP1 | |
| 10b2 | LOG4 | |
| 10b3 | PUSH1 | 0x40 |
| 10b5 | MLOAD | |
| 10b6 | SWAP1 | |
| 10b7 | DUP2 | |
| 10b8 | MSTORE | |
| 10b9 | RETURN | |
| 10ba | JUMPDEST | |
| 10bb | PUSH4 | 0x4e487b71 |
| 10c0 | PUSH1 | 0xe0 |
| 10c2 | SHL | |
| 10c3 | PUSH2 | 0x0160 |
| 10c6 | MLOAD | |
| 10c7 | MSTORE | |
| 10c8 | PUSH1 | 0x21 |
| 10ca | PUSH1 | 0x04 |
| 10cc | MSTORE | |
| 10cd | PUSH1 | 0x24 |
| 10cf | PUSH2 | 0x0160 |
| 10d2 | MLOAD | |
| 10d3 | REVERT | |
| 10d4 | JUMPDEST | |
| 10d5 | PUSH4 | 0x65f4a9ef |
| 10da | PUSH1 | 0xe1 |
| 10dc | SHL | |
| 10dd | PUSH2 | 0x0160 |
| 10e0 | MLOAD | |
| 10e1 | MSTORE | |
| 10e2 | PUSH2 | 0x0160 |
| 10e5 | MLOAD | |
| 10e6 | PUSH1 | 0x04 |
| 10e8 | MSTORE | |
| 10e9 | PUSH1 | 0x24 |
| 10eb | PUSH2 | 0x0160 |
| 10ee | MLOAD | |
| 10ef | REVERT | |
| 10f0 | JUMPDEST | |
| 10f1 | PUSH2 | 0x0160 |
| 10f4 | MLOAD | |
| 10f5 | SWAP3 | |
| 10f6 | POP | |
| 10f7 | SWAP1 | |
| 10f8 | PUSH1 | 0x01 |
| 10fa | DUP5 | |
| 10fb | SUB | |
| 10fc | PUSH2 | 0x114d |
| 10ff | JUMPI | |
| 1100 | POP | |
| 1101 | PUSH1 | 0x40 |
| 1103 | MLOAD | |
| 1104 | PUSH4 | 0xa9059cbb |
| 1109 | PUSH1 | 0xe0 |
| 110b | SHL | |
| 110c | PUSH1 | 0x20 |
| 110e | DUP3 | |
| 110f | ADD | |
| 1110 | MSTORE | |
| 1111 | PUSH1 | 0x01 |
| 1113 | PUSH1 | 0x01 |
| 1115 | PUSH1 | 0xa0 |
| 1117 | SHL | |
| 1118 | SUB | |
| 1119 | SWAP1 | |
| 111a | SWAP2 | |
| 111b | AND | |
| 111c | PUSH1 | 0x24 |
| 111e | DUP3 | |
| 111f | ADD | |
| 1120 | MSTORE | |
| 1121 | PUSH1 | 0x44 |
| 1123 | DUP2 | |
| 1124 | ADD | |
| 1125 | DUP7 | |
| 1126 | SWAP1 | |
| 1127 | MSTORE | |
| 1128 | PUSH2 | 0x1148 |
| 112b | SWAP1 | |
| 112c | PUSH2 | 0x1142 |
| 112f | DUP2 | |
| 1130 | PUSH1 | 0x64 |
| 1132 | DUP2 | |
| 1133 | ADD | |
| 1134 | JUMPDEST | |
| 1135 | SUB | |
| 1136 | PUSH1 | 0x1f |
| 1138 | NOT | |
| 1139 | DUP2 | |
| 113a | ADD | |
| 113b | DUP4 | |
| 113c | MSTORE | |
| 113d | DUP3 | |
| 113e | PUSH2 | 0x1ac8 |
| 1141 | JUMP | |
| 1142 | JUMPDEST | |
| 1143 | DUP8 | |
| 1144 | PUSH2 | 0x20d7 |
| 1147 | JUMP | |
| 1148 | JUMPDEST | |
| 1149 | PUSH2 | 0x1070 |
| 114c | JUMP | |
| 114d | JUMPDEST | |
| 114e | PUSH2 | 0x0160 |
| 1151 | MLOAD | |
| 1152 | SWAP7 | |
| 1153 | SWAP3 | |
| 1154 | POP | |
| 1155 | SWAP1 | |
| 1156 | POP | |
| 1157 | PUSH1 | 0x02 |
| 1159 | DUP4 | |
| 115a | SUB | |
| 115b | PUSH2 | 0x1197 |
| 115e | JUMPI | |
| 115f | POP | |
| 1160 | POP | |
| 1161 | PUSH1 | 0x01 |
| 1163 | SWAP4 | |
| 1164 | PUSH2 | 0x1148 |
| 1167 | PUSH1 | 0x40 |
| 1169 | MLOAD | |
| 116a | PUSH4 | 0x23b872dd |
| 116f | PUSH1 | 0xe0 |
| 1171 | SHL | |
| 1172 | PUSH1 | 0x20 |
| 1174 | DUP3 | |
| 1175 | ADD | |
| 1176 | MSTORE | |
| 1177 | ADDRESS | |
| 1178 | PUSH1 | 0x24 |
| 117a | DUP3 | |
| 117b | ADD | |
| 117c | MSTORE | |
| 117d | DUP6 | |
| 117e | PUSH1 | 0x44 |
| 1180 | DUP3 | |
| 1181 | ADD | |
| 1182 | MSTORE | |
| 1183 | DUP5 | |
| 1184 | PUSH1 | 0x64 |
| 1186 | DUP3 | |
| 1187 | ADD | |
| 1188 | MSTORE | |
| 1189 | PUSH1 | 0x64 |
| 118b | DUP2 | |
| 118c | MSTORE | |
| 118d | PUSH2 | 0x1142 |
| 1190 | PUSH1 | 0x84 |
| 1192 | DUP3 | |
| 1193 | PUSH2 | 0x1ac8 |
| 1196 | JUMP | |
| 1197 | JUMPDEST | |
| 1198 | PUSH2 | 0x1148 |
| 119b | SWAP1 | |
| 119c | PUSH1 | 0x40 |
| 119e | SWAP7 | |
| 119f | SWAP3 | |
| 11a0 | SWAP7 | |
| 11a1 | MLOAD | |
| 11a2 | SWAP1 | |
| 11a3 | PUSH4 | 0x79212195 |
| 11a8 | PUSH1 | 0xe1 |
| 11aa | SHL | |
| 11ab | PUSH1 | 0x20 |
| 11ad | DUP4 | |
| 11ae | ADD | |
| 11af | MSTORE | |
| 11b0 | ADDRESS | |
| 11b1 | PUSH1 | 0x24 |
| 11b3 | DUP4 | |
| 11b4 | ADD | |
| 11b5 | MSTORE | |
| 11b6 | DUP7 | |
| 11b7 | PUSH1 | 0x44 |
| 11b9 | DUP4 | |
| 11ba | ADD | |
| 11bb | MSTORE | |
| 11bc | DUP6 | |
| 11bd | PUSH1 | 0x64 |
| 11bf | DUP4 | |
| 11c0 | ADD | |
| 11c1 | MSTORE | |
| 11c2 | PUSH1 | 0x84 |
| 11c4 | DUP3 | |
| 11c5 | ADD | |
| 11c6 | MSTORE | |
| 11c7 | PUSH1 | 0xa0 |
| 11c9 | PUSH1 | 0xa4 |
| 11cb | DUP3 | |
| 11cc | ADD | |
| 11cd | MSTORE | |
| 11ce | PUSH2 | 0x0160 |
| 11d1 | MLOAD | |
| 11d2 | PUSH1 | 0xc4 |
| 11d4 | DUP3 | |
| 11d5 | ADD | |
| 11d6 | MSTORE | |
| 11d7 | PUSH1 | 0xc4 |
| 11d9 | DUP2 | |
| 11da | MSTORE | |
| 11db | PUSH2 | 0x1142 |
| 11de | PUSH1 | 0xe4 |
| 11e0 | DUP3 | |
| 11e1 | PUSH2 | 0x1ac8 |
| 11e4 | JUMP | |
| 11e5 | JUMPDEST | |
| 11e6 | PUSH2 | 0x0160 |
| 11e9 | DUP1 | |
| 11ea | MLOAD | |
| 11eb | PUSH4 | 0x21909681 |
| 11f0 | PUSH1 | 0xe0 |
| 11f2 | SHL | |
| 11f3 | SWAP1 | |
| 11f4 | MSTORE | |
| 11f5 | PUSH1 | 0x01 |
| 11f7 | PUSH1 | 0x01 |
| 11f9 | PUSH1 | 0xa0 |
| 11fb | SHL | |
| 11fc | SUB | |
| 11fd | DUP10 | |
| 11fe | AND | |
| 11ff | PUSH1 | 0x04 |
| 1201 | MSTORE | |
| 1202 | PUSH1 | 0x24 |
| 1204 | SWAP3 | |
| 1205 | SWAP1 | |
| 1206 | SWAP3 | |
| 1207 | MSTORE | |
| 1208 | PUSH1 | 0x44 |
| 120a | MSTORE | |
| 120b | MLOAD | |
| 120c | PUSH1 | 0x64 |
| 120e | SWAP1 | |
| 120f | REVERT | |
| 1210 | JUMPDEST | |
| 1211 | PUSH4 | 0x7c2e506f |
| 1216 | PUSH1 | 0xe1 |
| 1218 | SHL | |
| 1219 | PUSH2 | 0x0160 |
| 121c | MLOAD | |
| 121d | MSTORE | |
| 121e | PUSH1 | 0x04 |
| 1220 | PUSH2 | 0x0160 |
| 1223 | MLOAD | |
| 1224 | REVERT | |
| 1225 | JUMPDEST | |
| 1226 | PUSH2 | 0x103a |
| 1229 | JUMP | |
| 122a | JUMPDEST | |
| 122b | DUP4 | |
| 122c | PUSH4 | 0x15150d4d |
| 1231 | PUSH1 | 0xe3 |
| 1233 | SHL | |
| 1234 | PUSH2 | 0x0160 |
| 1237 | MLOAD | |
| 1238 | MSTORE | |
| 1239 | PUSH1 | 0x04 |
| 123b | MSTORE | |
| 123c | PUSH1 | 0x24 |
| 123e | PUSH2 | 0x0160 |
| 1241 | MLOAD | |
| 1242 | REVERT | |
| 1243 | JUMPDEST | |
| 1244 | SWAP1 | |
| 1245 | POP | |
| 1246 | DUP5 | |
| 1247 | EQ | |
| 1248 | ISZERO | |
| 1249 | DUP1 | |
| 124a | PUSH2 | 0x1254 |
| 124d | JUMPI | |
| 124e | JUMPDEST | |
| 124f | DUP8 | |
| 1250 | PUSH2 | 0x101e |
| 1253 | JUMP | |
| 1254 | JUMPDEST | |
| 1255 | POP | |
| 1256 | CALLER | |
| 1257 | DUP5 | |
| 1258 | EQ | |
| 1259 | ISZERO | |
| 125a | PUSH2 | 0x124e |
| 125d | JUMP | |
| 125e | JUMPDEST | |
| 125f | CALLVALUE | |
| 1260 | PUSH2 | 0x13a2 |
| 1263 | JUMPI | |
| 1264 | PUSH1 | 0x80 |
| 1266 | CALLDATASIZE | |
| 1267 | PUSH1 | 0x03 |
| 1269 | NOT | |
| 126a | ADD | |
| 126b | SLT | |
| 126c | PUSH2 | 0x13a2 |
| 126f | JUMPI | |
| 1270 | PUSH1 | 0x24 |
| 1272 | CALLDATALOAD | |
| 1273 | PUSH1 | 0x04 |
| 1275 | CALLDATALOAD | |
| 1276 | PUSH2 | 0x127d |
| 1279 | PUSH2 | 0x1a15 |
| 127c | JUMP | |
| 127d | JUMPDEST | |
| 127e | PUSH1 | 0x64 |
| 1280 | CALLDATALOAD | |
| 1281 | PUSH1 | 0x01 |
| 1283 | PUSH1 | 0x01 |
| 1285 | PUSH1 | 0x40 |
| 1287 | SHL | |
| 1288 | SUB | |
| 1289 | DUP2 | |
| 128a | GT | |
| 128b | PUSH2 | 0x13a2 |
| 128e | JUMPI | |
| 128f | PUSH2 | 0x129c |
| 1292 | SWAP1 | |
| 1293 | CALLDATASIZE | |
| 1294 | SWAP1 | |
| 1295 | PUSH1 | 0x04 |
| 1297 | ADD | |
| 1298 | PUSH2 | 0x1a2b |
| 129b | JUMP | |
| 129c | JUMPDEST | |
| 129d | PUSH0 | |
| 129e | SLOAD | |
| 129f | PUSH1 | 0x01 |
| 12a1 | PUSH1 | 0x01 |
| 12a3 | PUSH1 | 0xa0 |
| 12a5 | SHL | |
| 12a6 | SUB | |
| 12a7 | AND | |
| 12a8 | CALLER | |
| 12a9 | SUB | |
| 12aa | PUSH2 | 0x13ae |
| 12ad | JUMPI | |
| 12ae | JUMPDEST | |
| 12af | POP | |
| 12b0 | POP | |
| 12b1 | POP | |
| 12b2 | DUP2 | |
| 12b3 | PUSH2 | 0x12f6 |
| 12b6 | JUMPI | |
| 12b7 | JUMPDEST | |
| 12b8 | DUP1 | |
| 12b9 | PUSH32 | 0x43c4ef2494de90aa2f24830e48f3dc8579dec67c48d59b2ffba50c125576d4c4 |
| 12da | SWAP3 | |
| 12db | PUSH1 | 0x40 |
| 12dd | SWAP3 | |
| 12de | PUSH1 | 0x01 |
| 12e0 | SSTORE | |
| 12e1 | DUP1 | |
| 12e2 | PUSH1 | 0x02 |
| 12e4 | SSTORE | |
| 12e5 | DUP3 | |
| 12e6 | MLOAD | |
| 12e7 | SWAP2 | |
| 12e8 | DUP3 | |
| 12e9 | MSTORE | |
| 12ea | PUSH1 | 0x20 |
| 12ec | DUP3 | |
| 12ed | ADD | |
| 12ee | MSTORE | |
| 12ef | LOG1 | |
| 12f0 | PUSH2 | 0x0160 |
| 12f3 | MLOAD | |
| 12f4 | DUP1 | |
| 12f5 | RETURN | |
| 12f6 | JUMPDEST | |
| 12f7 | PUSH1 | 0x40 |
| 12f9 | MLOAD | |
| 12fa | PUSH4 | 0x342f6163 |
| 12ff | PUSH1 | 0xe0 |
| 1301 | SHL | |
| 1302 | DUP2 | |
| 1303 | MSTORE | |
| 1304 | PUSH1 | 0x04 |
| 1306 | DUP2 | |
| 1307 | ADD | |
| 1308 | DUP3 | |
| 1309 | SWAP1 | |
| 130a | MSTORE | |
| 130b | PUSH1 | 0x20 |
| 130d | DUP2 | |
| 130e | PUSH1 | 0x24 |
| 1310 | DUP2 | |
| 1311 | PUSH32 | 0x00000000000000000000000070b4f3c06e5d93d695129f1255c55c01e7be13bf |
| 1332 | PUSH1 | 0x01 |
| 1334 | PUSH1 | 0x01 |
| 1336 | PUSH1 | 0xa0 |
| 1338 | SHL | |
| 1339 | SUB | |
| 133a | AND | |
| 133b | GAS | |
| 133c | STATICCALL | |
| 133d | SWAP1 | |
| 133e | DUP2 | |
| 133f | ISZERO | |
| 1340 | PUSH2 | 0x0e18 |
| 1343 | JUMPI | |
| 1344 | PUSH2 | 0x0160 |
| 1347 | MLOAD | |
| 1348 | SWAP2 | |
| 1349 | PUSH2 | 0x1378 |
| 134c | JUMPI | |
| 134d | JUMPDEST | |
| 134e | POP | |
| 134f | DUP3 | |
| 1350 | DUP2 | |
| 1351 | LT | |
| 1352 | PUSH2 | 0x135b |
| 1355 | JUMPI | |
| 1356 | POP | |
| 1357 | PUSH2 | 0x12b7 |
| 135a | JUMP | |
| 135b | JUMPDEST | |
| 135c | SWAP1 | |
| 135d | POP | |
| 135e | PUSH4 | 0x3770da33 |
| 1363 | PUSH1 | 0xe1 |
| 1365 | SHL | |
| 1366 | PUSH2 | 0x0160 |
| 1369 | MLOAD | |
| 136a | MSTORE | |
| 136b | PUSH1 | 0x04 |
| 136d | MSTORE | |
| 136e | PUSH1 | 0x24 |
| 1370 | MSTORE | |
| 1371 | PUSH1 | 0x44 |
| 1373 | PUSH2 | 0x0160 |
| 1376 | MLOAD | |
| 1377 | REVERT | |
| 1378 | JUMPDEST | |
| 1379 | SWAP1 | |
| 137a | POP | |
| 137b | PUSH1 | 0x20 |
| 137d | DUP2 | |
| 137e | RETURNDATASIZE | |
| 137f | PUSH1 | 0x20 |
| 1381 | GT | |
| 1382 | PUSH2 | 0x13a6 |
| 1385 | JUMPI | |
| 1386 | JUMPDEST | |
| 1387 | DUP2 | |
| 1388 | PUSH2 | 0x1393 |
| 138b | PUSH1 | 0x20 |
| 138d | SWAP4 | |
| 138e | DUP4 | |
| 138f | PUSH2 | 0x1ac8 |
| 1392 | JUMP | |
| 1393 | JUMPDEST | |
| 1394 | DUP2 | |
| 1395 | ADD | |
| 1396 | SUB | |
| 1397 | SLT | |
| 1398 | PUSH2 | 0x13a2 |
| 139b | JUMPI | |
| 139c | MLOAD | |
| 139d | DUP4 | |
| 139e | PUSH2 | 0x134d |
| 13a1 | JUMP | |
| 13a2 | JUMPDEST | |
| 13a3 | PUSH0 | |
| 13a4 | DUP1 | |
| 13a5 | REVERT | |
| 13a6 | JUMPDEST | |
| 13a7 | RETURNDATASIZE | |
| 13a8 | SWAP2 | |
| 13a9 | POP | |
| 13aa | PUSH2 | 0x1386 |
| 13ad | JUMP | |
| 13ae | JUMPDEST | |
| 13af | PUSH1 | 0x40 |
| 13b1 | DUP1 | |
| 13b2 | MLOAD | |
| 13b3 | PUSH1 | 0x20 |
| 13b5 | DUP2 | |
| 13b6 | ADD | |
| 13b7 | DUP7 | |
| 13b8 | DUP2 | |
| 13b9 | MSTORE | |
| 13ba | DUP2 | |
| 13bb | DUP4 | |
| 13bc | ADD | |
| 13bd | DUP9 | |
| 13be | SWAP1 | |
| 13bf | MSTORE | |
| 13c0 | SWAP2 | |
| 13c1 | DUP2 | |
| 13c2 | MSTORE | |
| 13c3 | PUSH32 | 0x00000000000000000000000070b4f3c06e5d93d695129f1255c55c01e7be13bf |
| 13e4 | PUSH1 | 0x01 |
| 13e6 | PUSH1 | 0x01 |
| 13e8 | PUSH1 | 0xa0 |
| 13ea | SHL | |
| 13eb | SUB | |
| 13ec | AND | |
| 13ed | SWAP4 | |
| 13ee | SWAP2 | |
| 13ef | SWAP1 | |
| 13f0 | PUSH2 | 0x13fa |
| 13f3 | PUSH1 | 0x60 |
| 13f5 | DUP3 | |
| 13f6 | PUSH2 | 0x1ac8 |
| 13f9 | JUMP | |
| 13fa | JUMPDEST | |
| 13fb | MLOAD | |
| 13fc | SWAP1 | |
| 13fd | KECCAK256 | |
| 13fe | DUP4 | |
| 13ff | EXTCODESIZE | |
| 1400 | ISZERO | |
| 1401 | PUSH2 | 0x13a2 |
| 1404 | JUMPI | |
| 1405 | SWAP1 | |
| 1406 | DUP3 | |
| 1407 | PUSH1 | 0x01 |
| 1409 | PUSH1 | 0x01 |
| 140b | PUSH1 | 0x40 |
| 140d | SHL | |
| 140e | SUB | |
| 140f | SWAP6 | |
| 1410 | SWAP4 | |
| 1411 | SWAP3 | |
| 1412 | PUSH1 | 0x40 |
| 1414 | MLOAD | |
| 1415 | SWAP7 | |
| 1416 | DUP8 | |
| 1417 | SWAP6 | |
| 1418 | PUSH4 | 0x22f3f447 |
| 141d | PUSH1 | 0xe1 |
| 141f | SHL | |
| 1420 | DUP8 | |
| 1421 | MSTORE | |
| 1422 | PUSH1 | 0x84 |
| 1424 | DUP8 | |
| 1425 | ADD | |
| 1426 | SWAP3 | |
| 1427 | PUSH32 | 0xbc5858e168b959a61a8fb2d7957ef31dbed683a362770ca030e5d772cc44e068 |
| 1448 | PUSH1 | 0x04 |
| 144a | DUP10 | |
| 144b | ADD | |
| 144c | MSTORE | |
| 144d | PUSH1 | 0x24 |
| 144f | DUP9 | |
| 1450 | ADD | |
| 1451 | MSTORE | |
| 1452 | AND | |
| 1453 | PUSH1 | 0x44 |
| 1455 | DUP7 | |
| 1456 | ADD | |
| 1457 | MSTORE | |
| 1458 | PUSH1 | 0x80 |
| 145a | PUSH1 | 0x64 |
| 145c | DUP7 | |
| 145d | ADD | |
| 145e | MSTORE | |
| 145f | MSTORE | |
| 1460 | PUSH1 | 0xa4 |
| 1462 | DUP4 | |
| 1463 | ADD | |
| 1464 | PUSH1 | 0xa0 |
| 1466 | PUSH1 | 0x04 |
| 1468 | DUP5 | |
| 1469 | PUSH1 | 0x05 |
| 146b | SHL | |
| 146c | DUP7 | |
| 146d | ADD | |
| 146e | ADD | |
| 146f | ADD | |
| 1470 | SWAP3 | |
| 1471 | DUP3 | |
| 1472 | PUSH0 | |
| 1473 | SWAP1 | |
| 1474 | PUSH1 | 0x7e |
| 1476 | NOT | |
| 1477 | DUP2 | |
| 1478 | CALLDATASIZE | |
| 1479 | SUB | |
| 147a | ADD | |
| 147b | JUMPDEST | |
| 147c | DUP4 | |
| 147d | DUP4 | |
| 147e | LT | |
| 147f | PUSH2 | 0x14c6 |
| 1482 | JUMPI | |
| 1483 | POP | |
| 1484 | POP | |
| 1485 | POP | |
| 1486 | POP | |
| 1487 | POP | |
| 1488 | POP | |
| 1489 | SWAP2 | |
| 148a | DUP2 | |
| 148b | PUSH0 | |
| 148c | DUP2 | |
| 148d | DUP6 | |
| 148e | DUP3 | |
| 148f | SWAP7 | |
| 1490 | POP | |
| 1491 | SUB | |
| 1492 | SWAP3 | |
| 1493 | GAS | |
| 1494 | CALL | |
| 1495 | DUP1 | |
| 1496 | ISZERO | |
| 1497 | PUSH2 | 0x14bb |
| 149a | JUMPI | |
| 149b | PUSH2 | 0x14a6 |
| 149e | JUMPI | |
| 149f | JUMPDEST | |
| 14a0 | DUP1 | |
| 14a1 | DUP1 | |
| 14a2 | PUSH2 | 0x12ae |
| 14a5 | JUMP | |
| 14a6 | JUMPDEST | |
| 14a7 | PUSH0 | |
| 14a8 | PUSH2 | 0x14b0 |
| 14ab | SWAP2 | |
| 14ac | PUSH2 | 0x1ac8 |
| 14af | JUMP | |
| 14b0 | JUMPDEST | |
| 14b1 | PUSH0 | |
| 14b2 | PUSH2 | 0x0160 |
| 14b5 | MSTORE | |
| 14b6 | DUP3 | |
| 14b7 | PUSH2 | 0x149f |
| 14ba | JUMP | |
| 14bb | JUMPDEST | |
| 14bc | PUSH1 | 0x40 |
| 14be | MLOAD | |
| 14bf | RETURNDATASIZE | |
| 14c0 | PUSH0 | |
| 14c1 | DUP3 | |
| 14c2 | RETURNDATACOPY | |
| 14c3 | RETURNDATASIZE | |
| 14c4 | SWAP1 | |
| 14c5 | REVERT | |
| 14c6 | JUMPDEST | |
| 14c7 | PUSH1 | 0xa3 |
| 14c9 | NOT | |
| 14ca | DUP11 | |
| 14cb | DUP9 | |
| 14cc | SUB | |
| 14cd | ADD | |
| 14ce | DUP6 | |
| 14cf | MSTORE | |
| 14d0 | SWAP5 | |
| 14d1 | SWAP7 | |
| 14d2 | POP | |
| 14d3 | SWAP3 | |
| 14d4 | SWAP5 | |
| 14d5 | SWAP2 | |
| 14d6 | SWAP4 | |
| 14d7 | SWAP1 | |
| 14d8 | SWAP3 | |
| 14d9 | SWAP2 | |
| 14da | DUP7 | |
| 14db | CALLDATALOAD | |
| 14dc | DUP3 | |
| 14dd | DUP2 | |
| 14de | SLT | |
| 14df | ISZERO | |
| 14e0 | PUSH2 | 0x13a2 |
| 14e3 | JUMPI | |
| 14e4 | DUP4 | |
| 14e5 | ADD | |
| 14e6 | PUSH1 | 0x01 |
| 14e8 | PUSH1 | 0x01 |
| 14ea | PUSH1 | 0xa0 |
| 14ec | SHL | |
| 14ed | SUB | |
| 14ee | PUSH2 | 0x14f6 |
| 14f1 | DUP3 | |
| 14f2 | PUSH2 | 0x1a87 |
| 14f5 | JUMP | |
| 14f6 | JUMPDEST | |
| 14f7 | AND | |
| 14f8 | DUP3 | |
| 14f9 | MSTORE | |
| 14fa | PUSH1 | 0x20 |
| 14fc | DUP2 | |
| 14fd | ADD | |
| 14fe | CALLDATALOAD | |
| 14ff | SWAP2 | |
| 1500 | PUSH1 | 0xff |
| 1502 | DUP4 | |
| 1503 | AND | |
| 1504 | DUP1 | |
| 1505 | SWAP4 | |
| 1506 | SUB | |
| 1507 | PUSH2 | 0x13a2 |
| 150a | JUMPI | |
| 150b | PUSH2 | 0x152c |
| 150e | PUSH1 | 0x20 |
| 1510 | SWAP3 | |
| 1511 | DUP3 | |
| 1512 | PUSH1 | 0x01 |
| 1514 | SWAP6 | |
| 1515 | DUP6 | |
| 1516 | DUP1 | |
| 1517 | SWAP6 | |
| 1518 | ADD | |
| 1519 | MSTORE | |
| 151a | PUSH2 | 0x0ead |
| 151d | PUSH2 | 0x0ea2 |
| 1520 | PUSH2 | 0x0e91 |
| 1523 | PUSH1 | 0x40 |
| 1525 | DUP6 | |
| 1526 | ADD | |
| 1527 | DUP6 | |
| 1528 | PUSH2 | 0x1b55 |
| 152b | JUMP | |
| 152c | JUMPDEST | |
| 152d | SWAP9 | |
| 152e | ADD | |
| 152f | SWAP7 | |
| 1530 | ADD | |
| 1531 | SWAP4 | |
| 1532 | ADD | |
| 1533 | SWAP1 | |
| 1534 | SWAP2 | |
| 1535 | DUP9 | |
| 1536 | SWAP7 | |
| 1537 | SWAP6 | |
| 1538 | SWAP5 | |
| 1539 | SWAP3 | |
| 153a | PUSH2 | 0x147b |
| 153d | JUMP | |
| 153e | JUMPDEST | |
| 153f | CALLVALUE | |
| 1540 | PUSH2 | 0x13a2 |
| 1543 | JUMPI | |
| 1544 | PUSH0 | |
| 1545 | CALLDATASIZE | |
| 1546 | PUSH1 | 0x03 |
| 1548 | NOT | |
| 1549 | ADD | |
| 154a | SLT | |
| 154b | PUSH2 | 0x13a2 |
| 154e | JUMPI | |
| 154f | PUSH1 | 0x20 |
| 1551 | PUSH1 | 0x40 |
| 1553 | MLOAD | |
| 1554 | PUSH11 | 0x52b7d2dcc80cd2e4000000 |
| 1560 | DUP2 | |
| 1561 | MSTORE | |
| 1562 | RETURN | |
| 1563 | JUMPDEST | |
| 1564 | CALLVALUE | |
| 1565 | PUSH2 | 0x13a2 |
| 1568 | JUMPI | |
| 1569 | PUSH0 | |
| 156a | CALLDATASIZE | |
| 156b | PUSH1 | 0x03 |
| 156d | NOT | |
| 156e | ADD | |
| 156f | SLT | |
| 1570 | PUSH2 | 0x13a2 |
| 1573 | JUMPI | |
| 1574 | PUSH1 | 0x20 |
| 1576 | PUSH2 | 0x1584 |
| 1579 | PUSH1 | 0x03 |
| 157b | SLOAD | |
| 157c | PUSH1 | 0x05 |
| 157e | SLOAD | |
| 157f | SWAP1 | |
| 1580 | PUSH2 | 0x1b48 |
| 1583 | JUMP | |
| 1584 | JUMPDEST | |
| 1585 | PUSH1 | 0x40 |
| 1587 | MLOAD | |
| 1588 | SWAP1 | |
| 1589 | DUP2 | |
| 158a | MSTORE | |
| 158b | RETURN | |
| 158c | JUMPDEST | |
| 158d | CALLVALUE | |
| 158e | PUSH2 | 0x13a2 |
| 1591 | JUMPI | |
| 1592 | PUSH1 | 0x20 |
| 1594 | CALLDATASIZE | |
| 1595 | PUSH1 | 0x03 |
| 1597 | NOT | |
| 1598 | ADD | |
| 1599 | SLT | |
| 159a | PUSH2 | 0x13a2 |
| 159d | JUMPI | |
| 159e | PUSH1 | 0x04 |
| 15a0 | CALLDATALOAD | |
| 15a1 | PUSH0 | |
| 15a2 | MSTORE | |
| 15a3 | PUSH1 | 0x04 |
| 15a5 | PUSH1 | 0x20 |
| 15a7 | MSTORE | |
| 15a8 | PUSH1 | 0x40 |
| 15aa | DUP1 | |
| 15ab | PUSH0 | |
| 15ac | KECCAK256 | |
| 15ad | PUSH1 | 0x01 |
| 15af | PUSH1 | 0x01 |
| 15b1 | PUSH1 | 0x40 |
| 15b3 | SHL | |
| 15b4 | SUB | |
| 15b5 | PUSH1 | 0x01 |
| 15b7 | DUP3 | |
| 15b8 | SLOAD | |
| 15b9 | SWAP3 | |
| 15ba | ADD | |
| 15bb | SLOAD | |
| 15bc | AND | |
| 15bd | DUP3 | |
| 15be | MLOAD | |
| 15bf | SWAP2 | |
| 15c0 | DUP3 | |
| 15c1 | MSTORE | |
| 15c2 | PUSH1 | 0x20 |
| 15c4 | DUP3 | |
| 15c5 | ADD | |
| 15c6 | MSTORE | |
| 15c7 | RETURN | |
| 15c8 | JUMPDEST | |
| 15c9 | CALLVALUE | |
| 15ca | PUSH2 | 0x13a2 |
| 15cd | JUMPI | |
| 15ce | PUSH0 | |
| 15cf | CALLDATASIZE | |
| 15d0 | PUSH1 | 0x03 |
| 15d2 | NOT | |
| 15d3 | ADD | |
| 15d4 | SLT | |
| 15d5 | PUSH2 | 0x13a2 |
| 15d8 | JUMPI | |
| 15d9 | PUSH1 | 0x40 |
| 15db | MLOAD | |
| 15dc | PUSH32 | 0x00000000000000000000000070b4f3c06e5d93d695129f1255c55c01e7be13bf |
| 15fd | PUSH1 | 0x01 |
| 15ff | PUSH1 | 0x01 |
| 1601 | PUSH1 | 0xa0 |
| 1603 | SHL | |
| 1604 | SUB | |
| 1605 | AND | |
| 1606 | DUP2 | |
| 1607 | MSTORE | |
| 1608 | PUSH1 | 0x20 |
| 160a | SWAP1 | |
| 160b | RETURN | |
| 160c | JUMPDEST | |
| 160d | CALLVALUE | |
| 160e | PUSH2 | 0x13a2 |
| 1611 | JUMPI | |
| 1612 | PUSH0 | |
| 1613 | CALLDATASIZE | |
| 1614 | PUSH1 | 0x03 |
| 1616 | NOT | |
| 1617 | ADD | |
| 1618 | SLT | |
| 1619 | PUSH2 | 0x13a2 |
| 161c | JUMPI | |
| 161d | PUSH1 | 0x20 |
| 161f | PUSH1 | 0x40 |
| 1621 | MLOAD | |
| 1622 | PUSH32 | 0x08296c4851c7aca93c422c73902d61d179ed1bf52cf0ed257e6d096b9a8bb851 |
| 1643 | DUP2 | |
| 1644 | MSTORE | |
| 1645 | RETURN | |
| 1646 | JUMPDEST | |
| 1647 | CALLVALUE | |
| 1648 | PUSH2 | 0x13a2 |
| 164b | JUMPI | |
| 164c | PUSH1 | 0x60 |
| 164e | CALLDATASIZE | |
| 164f | PUSH1 | 0x03 |
| 1651 | NOT | |
| 1652 | ADD | |
| 1653 | SLT | |
| 1654 | PUSH2 | 0x13a2 |
| 1657 | JUMPI | |
| 1658 | PUSH1 | 0x04 |
| 165a | CALLDATALOAD | |
| 165b | PUSH1 | 0x04 |
| 165d | DUP2 | |
| 165e | LT | |
| 165f | ISZERO | |
| 1660 | PUSH2 | 0x13a2 |
| 1663 | JUMPI | |
| 1664 | PUSH2 | 0x1584 |
| 1667 | PUSH1 | 0x20 |
| 1669 | SWAP2 | |
| 166a | PUSH2 | 0x1671 |
| 166d | PUSH2 | 0x1a71 |
| 1670 | JUMP | |
| 1671 | JUMPDEST | |
| 1672 | PUSH1 | 0x44 |
| 1674 | CALLDATALOAD | |
| 1675 | SWAP2 | |
| 1676 | PUSH2 | 0x1b2f |
| 1679 | JUMP | |
| 167a | JUMPDEST | |
| 167b | CALLVALUE | |
| 167c | PUSH2 | 0x13a2 |
| 167f | JUMPI | |
| 1680 | PUSH0 | |
| 1681 | CALLDATASIZE | |
| 1682 | PUSH1 | 0x03 |
| 1684 | NOT | |
| 1685 | ADD | |
| 1686 | SLT | |
| 1687 | PUSH2 | 0x13a2 |
| 168a | JUMPI | |
| 168b | PUSH1 | 0x20 |
| 168d | PUSH1 | 0x05 |
| 168f | SLOAD | |
| 1690 | PUSH1 | 0x40 |
| 1692 | MLOAD | |
| 1693 | SWAP1 | |
| 1694 | DUP2 | |
| 1695 | MSTORE | |
| 1696 | RETURN | |
| 1697 | JUMPDEST | |
| 1698 | CALLVALUE | |
| 1699 | PUSH2 | 0x13a2 |
| 169c | JUMPI | |
| 169d | PUSH0 | |
| 169e | CALLDATASIZE | |
| 169f | PUSH1 | 0x03 |
| 16a1 | NOT | |
| 16a2 | ADD | |
| 16a3 | SLT | |
| 16a4 | PUSH2 | 0x13a2 |
| 16a7 | JUMPI | |
| 16a8 | PUSH1 | 0x20 |
| 16aa | PUSH1 | 0x02 |
| 16ac | SLOAD | |
| 16ad | PUSH1 | 0x40 |
| 16af | MLOAD | |
| 16b0 | SWAP1 | |
| 16b1 | DUP2 | |
| 16b2 | MSTORE | |
| 16b3 | RETURN | |
| 16b4 | JUMPDEST | |
| 16b5 | CALLVALUE | |
| 16b6 | PUSH2 | 0x13a2 |
| 16b9 | JUMPI | |
| 16ba | PUSH0 | |
| 16bb | CALLDATASIZE | |
| 16bc | PUSH1 | 0x03 |
| 16be | NOT | |
| 16bf | ADD | |
| 16c0 | SLT | |
| 16c1 | PUSH2 | 0x13a2 |
| 16c4 | JUMPI | |
| 16c5 | PUSH0 | |
| 16c6 | SLOAD | |
| 16c7 | PUSH1 | 0x01 |
| 16c9 | PUSH1 | 0x01 |
| 16cb | PUSH1 | 0xa0 |
| 16cd | SHL | |
| 16ce | SUB | |
| 16cf | DUP2 | |
| 16d0 | AND | |
| 16d1 | CALLER | |
| 16d2 | SUB | |
| 16d3 | PUSH2 | 0x170f |
| 16d6 | JUMPI | |
| 16d7 | PUSH12 | 0xffffffffffffffffffffffff |
| 16e4 | PUSH1 | 0xa0 |
| 16e6 | SHL | |
| 16e7 | AND | |
| 16e8 | PUSH0 | |
| 16e9 | SSTORE | |
| 16ea | PUSH32 | 0x1b2d71eb44f882534bf4e86f940c56ccc869ffb927e2bab86561de93950c2216 |
| 170b | PUSH0 | |
| 170c | DUP1 | |
| 170d | LOG1 | |
| 170e | STOP | |
| 170f | JUMPDEST | |
| 1710 | PUSH4 | 0x0bd42121 |
| 1715 | PUSH1 | 0xe1 |
| 1717 | SHL | |
| 1718 | PUSH0 | |
| 1719 | MSTORE | |
| 171a | CALLER | |
| 171b | PUSH1 | 0x04 |
| 171d | MSTORE | |
| 171e | PUSH1 | 0x24 |
| 1720 | PUSH0 | |
| 1721 | REVERT | |
| 1722 | JUMPDEST | |
| 1723 | CALLVALUE | |
| 1724 | PUSH2 | 0x13a2 |
| 1727 | JUMPI | |
| 1728 | PUSH1 | 0x80 |
| 172a | CALLDATASIZE | |
| 172b | PUSH1 | 0x03 |
| 172d | NOT | |
| 172e | ADD | |
| 172f | SLT | |
| 1730 | PUSH2 | 0x13a2 |
| 1733 | JUMPI | |
| 1734 | PUSH2 | 0x173b |
| 1737 | PUSH2 | 0x1a5b |
| 173a | JUMP | |
| 173b | JUMPDEST | |
| 173c | POP | |
| 173d | PUSH2 | 0x1744 |
| 1740 | PUSH2 | 0x1a71 |
| 1743 | JUMP | |
| 1744 | JUMPDEST | |
| 1745 | POP | |
| 1746 | PUSH1 | 0x64 |
| 1748 | CALLDATALOAD | |
| 1749 | PUSH1 | 0x01 |
| 174b | PUSH1 | 0x01 |
| 174d | PUSH1 | 0x40 |
| 174f | SHL | |
| 1750 | SUB | |
| 1751 | DUP2 | |
| 1752 | GT | |
| 1753 | PUSH2 | 0x13a2 |
| 1756 | JUMPI | |
| 1757 | PUSH2 | 0x1764 |
| 175a | SWAP1 | |
| 175b | CALLDATASIZE | |
| 175c | SWAP1 | |
| 175d | PUSH1 | 0x04 |
| 175f | ADD | |
| 1760 | PUSH2 | 0x1a9b |
| 1763 | JUMP | |
| 1764 | JUMPDEST | |
| 1765 | POP | |
| 1766 | POP | |
| 1767 | PUSH1 | 0x40 |
| 1769 | MLOAD | |
| 176a | PUSH4 | 0x0a85bd01 |
| 176f | PUSH1 | 0xe1 |
| 1771 | SHL | |
| 1772 | DUP2 | |
| 1773 | MSTORE | |
| 1774 | PUSH1 | 0x20 |
| 1776 | SWAP1 | |
| 1777 | RETURN | |
| 1778 | JUMPDEST | |
| 1779 | CALLVALUE | |
| 177a | PUSH2 | 0x13a2 |
| 177d | JUMPI | |
| 177e | PUSH1 | 0xa0 |
| 1780 | CALLDATASIZE | |
| 1781 | PUSH1 | 0x03 |
| 1783 | NOT | |
| 1784 | ADD | |
| 1785 | SLT | |
| 1786 | PUSH2 | 0x13a2 |
| 1789 | JUMPI | |
| 178a | PUSH1 | 0x04 |
| 178c | CALLDATALOAD | |
| 178d | PUSH1 | 0x24 |
| 178f | CALLDATALOAD | |
| 1790 | PUSH1 | 0x44 |
| 1792 | CALLDATALOAD | |
| 1793 | PUSH2 | 0x179a |
| 1796 | PUSH2 | 0x19ff |
| 1799 | JUMP | |
| 179a | JUMPDEST | |
| 179b | PUSH1 | 0x84 |
| 179d | CALLDATALOAD | |
| 179e | PUSH1 | 0x01 |
| 17a0 | PUSH1 | 0x01 |
| 17a2 | PUSH1 | 0x40 |
| 17a4 | SHL | |
| 17a5 | SUB | |
| 17a6 | DUP2 | |
| 17a7 | GT | |
| 17a8 | PUSH2 | 0x13a2 |
| 17ab | JUMPI | |
| 17ac | PUSH2 | 0x17b9 |
| 17af | SWAP1 | |
| 17b0 | CALLDATASIZE | |
| 17b1 | SWAP1 | |
| 17b2 | PUSH1 | 0x04 |
| 17b4 | ADD | |
| 17b5 | PUSH2 | 0x1a2b |
| 17b8 | JUMP | |
| 17b9 | JUMPDEST | |
| 17ba | SWAP1 | |
| 17bb | SWAP2 | |
| 17bc | PUSH1 | 0x02 |
| 17be | SLOAD | |
| 17bf | DUP1 | |
| 17c0 | ISZERO | |
| 17c1 | PUSH2 | 0x19ba |
| 17c4 | JUMPI | |
| 17c5 | DUP6 | |
| 17c6 | ISZERO | |
| 17c7 | PUSH2 | 0x19ab |
| 17ca | JUMPI | |
| 17cb | DUP7 | |
| 17cc | PUSH0 | |
| 17cd | MSTORE | |
| 17ce | PUSH1 | 0x07 |
| 17d0 | PUSH1 | 0x20 |
| 17d2 | MSTORE | |
| 17d3 | PUSH1 | 0x40 |
| 17d5 | PUSH0 | |
| 17d6 | KECCAK256 | |
| 17d7 | DUP6 | |
| 17d8 | PUSH0 | |
| 17d9 | MSTORE | |
| 17da | PUSH1 | 0x20 |
| 17dc | MSTORE | |
| 17dd | PUSH1 | 0xff |
| 17df | PUSH1 | 0x40 |
| 17e1 | PUSH0 | |
| 17e2 | KECCAK256 | |
| 17e3 | SLOAD | |
| 17e4 | AND | |
| 17e5 | PUSH2 | 0x1994 |
| 17e8 | JUMPI | |
| 17e9 | DUP7 | |
| 17ea | PUSH0 | |
| 17eb | MSTORE | |
| 17ec | PUSH1 | 0x04 |
| 17ee | PUSH1 | 0x20 |
| 17f0 | MSTORE | |
| 17f1 | PUSH1 | 0x40 |
| 17f3 | PUSH0 | |
| 17f4 | KECCAK256 | |
| 17f5 | SWAP4 | |
| 17f6 | DUP5 | |
| 17f7 | SLOAD | |
| 17f8 | DUP1 | |
| 17f9 | DUP9 | |
| 17fa | GT | |
| 17fb | PUSH2 | 0x197a |
| 17fe | JUMPI | |
| 17ff | POP | |
| 1800 | PUSH2 | 0x18eb |
| 1803 | DUP9 | |
| 1804 | PUSH2 | 0x18e5 |
| 1807 | PUSH32 | 0x3ef380598f06b01333350e61cefa066c10a2088a64ad65aadd22eda04b972b89 |
| 1828 | SWAP10 | |
| 1829 | SWAP8 | |
| 182a | SWAP6 | |
| 182b | PUSH1 | 0x80 |
| 182d | SWAP10 | |
| 182e | SWAP8 | |
| 182f | SWAP6 | |
| 1830 | PUSH1 | 0x01 |
| 1832 | PUSH1 | 0x01 |
| 1834 | PUSH1 | 0x40 |
| 1836 | SHL | |
| 1837 | SUB | |
| 1838 | SWAP6 | |
| 1839 | PUSH1 | 0x06 |
| 183b | SLOAD | |
| 183c | SWAP8 | |
| 183d | DUP8 | |
| 183e | DUP10 | |
| 183f | AND | |
| 1840 | SWAP6 | |
| 1841 | PUSH1 | 0x40 |
| 1843 | MLOAD | |
| 1844 | PUSH1 | 0x20 |
| 1846 | DUP2 | |
| 1847 | ADD | |
| 1848 | SWAP2 | |
| 1849 | DUP9 | |
| 184a | DUP4 | |
| 184b | MSTORE | |
| 184c | PUSH1 | 0x40 |
| 184e | DUP3 | |
| 184f | ADD | |
| 1850 | MSTORE | |
| 1851 | DUP14 | |
| 1852 | PUSH1 | 0x60 |
| 1854 | DUP3 | |
| 1855 | ADD | |
| 1856 | MSTORE | |
| 1857 | DUP13 | |
| 1858 | DUP16 | |
| 1859 | DUP3 | |
| 185a | ADD | |
| 185b | MSTORE | |
| 185c | DUP15 | |
| 185d | DUP2 | |
| 185e | MSTORE | |
| 185f | PUSH2 | 0x1869 |
| 1862 | PUSH1 | 0xa0 |
| 1864 | DUP3 | |
| 1865 | PUSH2 | 0x1ac8 |
| 1868 | JUMP | |
| 1869 | JUMPDEST | |
| 186a | MLOAD | |
| 186b | SWAP1 | |
| 186c | KECCAK256 | |
| 186d | PUSH1 | 0x40 |
| 186f | MLOAD | |
| 1870 | PUSH1 | 0x20 |
| 1872 | DUP2 | |
| 1873 | ADD | |
| 1874 | SWAP2 | |
| 1875 | PUSH32 | 0xd850f5df47b124511e8e6ec99cf1a0beaf7c6237eff0a31305ce53d85f312675 |
| 1896 | DUP4 | |
| 1897 | MSTORE | |
| 1898 | CHAINID | |
| 1899 | PUSH1 | 0x40 |
| 189b | DUP4 | |
| 189c | ADD | |
| 189d | MSTORE | |
| 189e | ADDRESS | |
| 189f | PUSH1 | 0x60 |
| 18a1 | DUP4 | |
| 18a2 | ADD | |
| 18a3 | MSTORE | |
| 18a4 | DUP16 | |
| 18a5 | PUSH32 | 0x07e27cdd90594a3caa105e64724b3ff44d247017420d1a3df2cc49fa10cdf0f5 |
| 18c6 | SWAP1 | |
| 18c7 | DUP4 | |
| 18c8 | ADD | |
| 18c9 | MSTORE | |
| 18ca | DUP11 | |
| 18cb | DUP8 | |
| 18cc | AND | |
| 18cd | PUSH1 | 0xa0 |
| 18cf | DUP4 | |
| 18d0 | ADD | |
| 18d1 | MSTORE | |
| 18d2 | PUSH1 | 0xc0 |
| 18d4 | DUP3 | |
| 18d5 | ADD | |
| 18d6 | MSTORE | |
| 18d7 | PUSH1 | 0xc0 |
| 18d9 | DUP2 | |
| 18da | MSTORE | |
| 18db | PUSH2 | 0x034e |
| 18de | PUSH1 | 0xe0 |
| 18e0 | DUP3 | |
| 18e1 | PUSH2 | 0x1ac8 |
| 18e4 | JUMP | |
| 18e5 | JUMPDEST | |
| 18e6 | POP | |
| 18e7 | PUSH2 | 0x1afd |
| 18ea | JUMP | |
| 18eb | JUMPDEST | |
| 18ec | AND | |
| 18ed | SWAP1 | |
| 18ee | PUSH1 | 0x01 |
| 18f0 | PUSH1 | 0x01 |
| 18f2 | PUSH1 | 0x40 |
| 18f4 | SHL | |
| 18f5 | SUB | |
| 18f6 | NOT | |
| 18f7 | AND | |
| 18f8 | OR | |
| 18f9 | PUSH1 | 0x06 |
| 18fb | SSTORE | |
| 18fc | DUP6 | |
| 18fd | PUSH0 | |
| 18fe | MSTORE | |
| 18ff | PUSH1 | 0x07 |
| 1901 | PUSH1 | 0x20 |
| 1903 | MSTORE | |
| 1904 | PUSH1 | 0x40 |
| 1906 | PUSH0 | |
| 1907 | KECCAK256 | |
| 1908 | DUP3 | |
| 1909 | PUSH0 | |
| 190a | MSTORE | |
| 190b | PUSH1 | 0x20 |
| 190d | MSTORE | |
| 190e | PUSH1 | 0x40 |
| 1910 | PUSH0 | |
| 1911 | KECCAK256 | |
| 1912 | PUSH1 | 0x01 |
| 1914 | PUSH1 | 0xff |
| 1916 | NOT | |
| 1917 | DUP3 | |
| 1918 | SLOAD | |
| 1919 | AND | |
| 191a | OR | |
| 191b | SWAP1 | |
| 191c | SSTORE | |
| 191d | DUP3 | |
| 191e | DUP2 | |
| 191f | SLOAD | |
| 1920 | SUB | |
| 1921 | DUP2 | |
| 1922 | SSTORE | |
| 1923 | DUP3 | |
| 1924 | PUSH1 | 0x05 |
| 1926 | SLOAD | |
| 1927 | SUB | |
| 1928 | PUSH1 | 0x05 |
| 192a | SSTORE | |
| 192b | DUP3 | |
| 192c | PUSH1 | 0x03 |
| 192e | SLOAD | |
| 192f | ADD | |
| 1930 | PUSH1 | 0x03 |
| 1932 | SSTORE | |
| 1933 | PUSH1 | 0x01 |
| 1935 | PUSH1 | 0x01 |
| 1937 | PUSH1 | 0x40 |
| 1939 | SHL | |
| 193a | SUB | |
| 193b | PUSH1 | 0x01 |
| 193d | DUP3 | |
| 193e | ADD | |
| 193f | SWAP2 | |
| 1940 | DUP2 | |
| 1941 | PUSH2 | 0x194c |
| 1944 | DUP2 | |
| 1945 | DUP6 | |
| 1946 | SLOAD | |
| 1947 | AND | |
| 1948 | PUSH2 | 0x1afd |
| 194b | JUMP | |
| 194c | JUMPDEST | |
| 194d | AND | |
| 194e | DUP3 | |
| 194f | NOT | |
| 1950 | DUP5 | |
| 1951 | SLOAD | |
| 1952 | AND | |
| 1953 | OR | |
| 1954 | DUP4 | |
| 1955 | SSTORE | |
| 1956 | PUSH2 | 0x195d |
| 1959 | PUSH2 | 0x1f17 |
| 195c | JUMP | |
| 195d | JUMPDEST | |
| 195e | SLOAD | |
| 195f | SWAP2 | |
| 1960 | SLOAD | |
| 1961 | AND | |
| 1962 | SWAP1 | |
| 1963 | PUSH1 | 0x40 |
| 1965 | MLOAD | |
| 1966 | SWAP4 | |
| 1967 | DUP5 | |
| 1968 | MSTORE | |
| 1969 | PUSH1 | 0x20 |
| 196b | DUP5 | |
| 196c | ADD | |
| 196d | MSTORE | |
| 196e | PUSH1 | 0x40 |
| 1970 | DUP4 | |
| 1971 | ADD | |
| 1972 | MSTORE | |
| 1973 | PUSH1 | 0x60 |
| 1975 | DUP3 | |
| 1976 | ADD | |
| 1977 | MSTORE | |
| 1978 | LOG2 | |
| 1979 | STOP | |
| 197a | JUMPDEST | |
| 197b | DUP8 | |
| 197c | DUP10 | |
| 197d | PUSH4 | 0x7c06acb7 |
| 1982 | PUSH1 | 0xe1 |
| 1984 | SHL | |
| 1985 | PUSH0 | |
| 1986 | MSTORE | |
| 1987 | PUSH1 | 0x04 |
| 1989 | MSTORE | |
| 198a | PUSH1 | 0x24 |
| 198c | MSTORE | |
| 198d | PUSH1 | 0x44 |
| 198f | MSTORE | |
| 1990 | PUSH1 | 0x64 |
| 1992 | PUSH0 | |
| 1993 | REVERT | |
| 1994 | JUMPDEST | |
| 1995 | DUP5 | |
| 1996 | DUP8 | |
| 1997 | PUSH4 | 0x0dd4fdfd |
| 199c | PUSH1 | 0xe2 |
| 199e | SHL | |
| 199f | PUSH0 | |
| 19a0 | MSTORE | |
| 19a1 | PUSH1 | 0x04 |
| 19a3 | MSTORE | |
| 19a4 | PUSH1 | 0x24 |
| 19a6 | MSTORE | |
| 19a7 | PUSH1 | 0x44 |
| 19a9 | PUSH0 | |
| 19aa | REVERT | |
| 19ab | JUMPDEST | |
| 19ac | PUSH4 | 0x1f2a2005 |
| 19b1 | PUSH1 | 0xe0 |
| 19b3 | SHL | |
| 19b4 | PUSH0 | |
| 19b5 | MSTORE | |
| 19b6 | PUSH1 | 0x04 |
| 19b8 | PUSH0 | |
| 19b9 | REVERT | |
| 19ba | JUMPDEST | |
| 19bb | PUSH4 | 0xd311bc39 |
| 19c0 | PUSH1 | 0xe0 |
| 19c2 | SHL | |
| 19c3 | PUSH0 | |
| 19c4 | MSTORE | |
| 19c5 | PUSH1 | 0x04 |
| 19c7 | PUSH0 | |
| 19c8 | REVERT | |
| 19c9 | JUMPDEST | |
| 19ca | CALLVALUE | |
| 19cb | PUSH2 | 0x13a2 |
| 19ce | JUMPI | |
| 19cf | PUSH1 | 0x40 |
| 19d1 | CALLDATASIZE | |
| 19d2 | PUSH1 | 0x03 |
| 19d4 | NOT | |
| 19d5 | ADD | |
| 19d6 | SLT | |
| 19d7 | PUSH2 | 0x13a2 |
| 19da | JUMPI | |
| 19db | PUSH1 | 0x20 |
| 19dd | SWAP1 | |
| 19de | PUSH1 | 0x04 |
| 19e0 | CALLDATALOAD | |
| 19e1 | PUSH0 | |
| 19e2 | MSTORE | |
| 19e3 | PUSH1 | 0x07 |
| 19e5 | DUP3 | |
| 19e6 | MSTORE | |
| 19e7 | PUSH1 | 0x40 |
| 19e9 | PUSH0 | |
| 19ea | KECCAK256 | |
| 19eb | PUSH1 | 0x24 |
| 19ed | CALLDATALOAD | |
| 19ee | PUSH0 | |
| 19ef | MSTORE | |
| 19f0 | DUP3 | |
| 19f1 | MSTORE | |
| 19f2 | PUSH1 | 0xff |
| 19f4 | PUSH1 | 0x40 |
| 19f6 | PUSH0 | |
| 19f7 | KECCAK256 | |
| 19f8 | SLOAD | |
| 19f9 | AND | |
| 19fa | ISZERO | |
| 19fb | ISZERO | |
| 19fc | DUP2 | |
| 19fd | MSTORE | |
| 19fe | RETURN | |
| 19ff | JUMPDEST | |
| 1a00 | PUSH1 | 0x64 |
| 1a02 | CALLDATALOAD | |
| 1a03 | SWAP1 | |
| 1a04 | PUSH1 | 0x01 |
| 1a06 | PUSH1 | 0x01 |
| 1a08 | PUSH1 | 0x40 |
| 1a0a | SHL | |
| 1a0b | SUB | |
| 1a0c | DUP3 | |
| 1a0d | AND | |
| 1a0e | DUP3 | |
| 1a0f | SUB | |
| 1a10 | PUSH2 | 0x13a2 |
| 1a13 | JUMPI | |
| 1a14 | JUMP | |
| 1a15 | JUMPDEST | |
| 1a16 | PUSH1 | 0x44 |
| 1a18 | CALLDATALOAD | |
| 1a19 | SWAP1 | |
| 1a1a | PUSH1 | 0x01 |
| 1a1c | PUSH1 | 0x01 |
| 1a1e | PUSH1 | 0x40 |
| 1a20 | SHL | |
| 1a21 | SUB | |
| 1a22 | DUP3 | |
| 1a23 | AND | |
| 1a24 | DUP3 | |
| 1a25 | SUB | |
| 1a26 | PUSH2 | 0x13a2 |
| 1a29 | JUMPI | |
| 1a2a | JUMP | |
| 1a2b | JUMPDEST | |
| 1a2c | SWAP2 | |
| 1a2d | DUP2 | |
| 1a2e | PUSH1 | 0x1f |
| 1a30 | DUP5 | |
| 1a31 | ADD | |
| 1a32 | SLT | |
| 1a33 | ISZERO | |
| 1a34 | PUSH2 | 0x13a2 |
| 1a37 | JUMPI | |
| 1a38 | DUP3 | |
| 1a39 | CALLDATALOAD | |
| 1a3a | SWAP2 | |
| 1a3b | PUSH1 | 0x01 |
| 1a3d | PUSH1 | 0x01 |
| 1a3f | PUSH1 | 0x40 |
| 1a41 | SHL | |
| 1a42 | SUB |