AlphaCOLLAB runs on GenesisL1 mainnet and has had no external audit. Use small amounts.Security notes

COLLAB

Contract API reference

Every function, event and error of the contracts the COLLAB app uses, in Solidity-like signatures, for developers who call them directly. The Contracts guide explains what each contract does and how they fit together; the ABI files themselves are in abi/, one per contract.

Part
Developers
Version
COLLAB 2.2.0
Updated
Reading time
37 min

This page is generated by tools/abi_summary.py from the ABIs in abi/ (which tools/export_abis.py writes after forge build). Do not edit it by hand: change the generator and run python3 tools/abi_summary.py.

Mutability is shown as view, pure or payable (non-payable writes carry no tag). Each contract lists its functions, then its events, then its errors, including those of the libraries it uses.

DAO core (one clone of each per DAO)

Every DAO has one clone of each; DAOFactory.daoAt(id) and daoOf(treasury) return their addresses.

DAOTreasury

function executeBatch((address target, uint256 value, bytes data)[] actions);
function executeFromModule(address target, bytes data) returns (bytes);
function governor() view returns (address);
function initialize(address governor_, (address module, address target, bytes4 selector)[] grants, address[] protected_);
function isProtected(address target) view returns (bool);
function isValidSignature(bytes32 hash, bytes) view returns (bytes4);
function modulePermission(address module, address target, bytes4 selector) view returns (bool);
function onERC1155BatchReceived(address, address, uint256[], uint256[], bytes) pure returns (bytes4);
function onERC1155Received(address, address, uint256, uint256, bytes) pure returns (bytes4);
function onERC721Received(address, address, uint256, bytes) pure returns (bytes4);
function revokeHash(bytes32 hash);
function setModulePermission(address module, address target, bytes4 selector, bool allowed);
function signHash(bytes32 hash, uint64 expiry);
function signedHashExpiry(bytes32 hash) view returns (uint64 expiry);
function supportsInterface(bytes4 interfaceId) pure returns (bool);

event ActionExecuted(uint256 indexed index, address indexed target, uint256 value, bytes4 selector);
event HashRevoked(bytes32 indexed hash);
event HashSigned(bytes32 indexed hash, uint64 expiry);
event Initialized(uint64 version);
event ModuleCall(address indexed module, address indexed target, bytes4 indexed selector);
event ModulePermissionSet(address indexed module, address indexed target, bytes4 indexed selector, bool allowed);

// errors: ActionFailed(uint256 index), ForbiddenTarget(address target), InvalidExpiry(), InvalidInitialization(), ModuleNotAllowed(address module, address target, bytes4 selector), NotGovernor(), NotInitializing(), NotSelf(), ReentrancyGuardReentrantCall()

DAOGovernor

function BURN_ADDRESS() view returns (address);
function EMPTY_ACTIONS_HASH() view returns (bytes32);
function FLAG_BURN_DEPOSIT_PREVOTE() view returns (uint8);
function FLAG_BURN_VOTE_QUORUM() view returns (uint8);
function FLAG_BURN_VOTE_VETO() view returns (uint8);
function FLAG_FREEZE_BOND() view returns (uint8);
function FLAG_FREEZE_LOCK() view returns (uint8);
function FLAG_PENALTY_TO_TREASURY() view returns (uint8);
function MAX_ACTIONS() view returns (uint256);
function MAX_DEPOSIT_PERIOD() view returns (uint32);
function MAX_DESCRIPTION_BYTES() view returns (uint256);
function MAX_EXECUTION_DELAY() view returns (uint32);
function MAX_EXECUTION_WINDOW() view returns (uint32);
function MAX_HOLDING_BLOCKS() view returns (uint32);
function MAX_MIN_DEPOSIT() view returns (uint128);
function MAX_MIN_YES_BPS() view returns (uint16);
function MAX_TITLE_BYTES() view returns (uint256);
function MAX_VOTING_PERIOD() view returns (uint32);
function MIN_DEPOSIT_PERIOD() view returns (uint32);
function MIN_EXECUTION_WINDOW() view returns (uint32);
function MIN_VOTING_PERIOD() view returns (uint32);
function OPTION_ABSTAIN() view returns (uint8);
function OPTION_NO() view returns (uint8);
function OPTION_VETO() view returns (uint8);
function OPTION_YES() view returns (uint8);
function cancel(uint256 id);
function castVote(uint256 id, uint8 option) returns (uint256 weight);
function claimDeposit(uint256 id);
function criticalRules() view returns (uint32 votingPeriod, uint32 executionDelay, uint16 quorumBps, uint16 thresholdBps, uint16 vetoThresholdBps, uint16 minYesBps);
function deposit(uint256 id) payable;
function depositOf(uint256 id, address depositor) view returns (uint256);
function depositOutcome(uint256 id) view returns (uint8 outcome);
function depositParams() view returns (uint128 minDeposit, uint128 proposalThreshold, uint32 maxDepositPeriod, uint32 executionWindow, uint16 minInitialDepositBps, uint8 flags);
function execute(uint256 id, (address target, uint256 value, bytes data)[] actions);
function executingProposal() view returns (uint256);
function freezeTargets(uint256 id) view returns (address[]);
function genesisBlock() view returns (uint64);
function getProposal(uint256 id) view returns ((address proposer, uint8 kind, bool critical, bool executed, bool canceled, bool penaltySettled, uint8 flags, uint48 snapshot, uint48 holdSnapshot, uint64 submitTime, uint64 depositEnd, uint64 votingStart, uint64 votingEnd, uint64 createdBlock, (uint32 votingPeriod, uint32 executionDelay, uint16 quorumBps, uint16 thresholdBps, uint16 vetoThresholdBps, uint16 minYesBps) rules, uint32 executionWindow, uint128 minDeposit, uint128 totalDeposit, bytes32 actionsHash, address descriptionPtr, bytes32 descriptionHash, string title, (uint256 yes, uint256 abstain, uint256 no, uint256 veto) tally) proposal, uint8 currentState);
function getReceipt(uint256 id, address voter) view returns (uint8 option, uint256 weight);
function holdingBlocks() view returns (uint32);
function initialize(address shares_, address treasury_, address policy_, address textStore_, (uint128 minDeposit, uint128 proposalThreshold, uint32 maxDepositPeriod, uint32 executionWindow, uint16 minInitialDepositBps, uint8 flags) deposit_, (uint32 votingPeriod, uint32 executionDelay, uint16 quorumBps, uint16 thresholdBps, uint16 vetoThresholdBps, uint16 minYesBps) standard_, (uint32 votingPeriod, uint32 executionDelay, uint16 quorumBps, uint16 thresholdBps, uint16 vetoThresholdBps, uint16 minYesBps) critical_, uint32 holdingBlocks_);
function policy() view returns (address);
function previewVoteWeight(uint256 id, address voter) view returns (uint256);
function proposalCount() view returns (uint256);
function proposalSnapshot(uint256 id) view returns (uint48 snapshot, uint48 holdSnapshot);
function releaseLocks(uint256 id, (address target, uint256 value, bytes data)[] actions);
function setHoldingPeriod(uint32 blocks);
function setParams((uint128 minDeposit, uint128 proposalThreshold, uint32 maxDepositPeriod, uint32 executionWindow, uint16 minInitialDepositBps, uint8 flags) deposit_, (uint32 votingPeriod, uint32 executionDelay, uint16 quorumBps, uint16 thresholdBps, uint16 vetoThresholdBps, uint16 minYesBps) standard_, (uint32 votingPeriod, uint32 executionDelay, uint16 quorumBps, uint16 thresholdBps, uint16 vetoThresholdBps, uint16 minYesBps) critical_);
function settlePenalty(uint256 id);
function shares() view returns (address);
function standardRules() view returns (uint32 votingPeriod, uint32 executionDelay, uint16 quorumBps, uint16 thresholdBps, uint16 vetoThresholdBps, uint16 minYesBps);
function state(uint256 id) view returns (uint8);
function submitProposal(uint8 kind, string title, bytes description, (address target, uint256 value, bytes data)[] actions) payable returns (uint256 id);
function textStore() view returns (address);
function totalPowerAt(uint256 id) view returns (uint256);
function treasury() view returns (address);

event DelegateOverridden(uint256 indexed id, address indexed delegate, address indexed delegator, uint256 weight);
event DepositAdded(uint256 indexed id, address indexed depositor, uint256 amount, uint256 total);
event DepositPenalized(uint256 indexed id, uint256 amount, address indexed to);
event DepositRefunded(uint256 indexed id, address indexed depositor, uint256 amount);
event HoldingPeriodSet(uint32 blocks);
event Initialized(uint64 version);
event ParamsUpdated((uint128 minDeposit, uint128 proposalThreshold, uint32 maxDepositPeriod, uint32 executionWindow, uint16 minInitialDepositBps, uint8 flags) deposit, (uint32 votingPeriod, uint32 executionDelay, uint16 quorumBps, uint16 thresholdBps, uint16 vetoThresholdBps, uint16 minYesBps) standard, (uint32 votingPeriod, uint32 executionDelay, uint16 quorumBps, uint16 thresholdBps, uint16 vetoThresholdBps, uint16 minYesBps) critical);
event ProposalCanceled(uint256 indexed id);
event ProposalExecuted(uint256 indexed id, address indexed executor);
event ProposalSubmitted(uint256 indexed id, address indexed proposer, uint8 indexed kind, bool critical, string title, address descriptionPtr, bytes32 descriptionHash, (address target, uint256 value, bytes data)[] actions, uint48 snapshot, uint64 depositEnd);
event VoteCast(uint256 indexed id, address indexed voter, uint8 option, uint256 weight, bool changed);
event VotingStarted(uint256 indexed id, uint64 votingStart, uint64 votingEnd);

// errors: AccountFrozen(), ActionsMismatch(), BelowProposalThreshold(uint256 power, uint256 required), DescriptionTooLarge(), FreezeTargetExcluded(address account), InitialDepositTooLow(uint256 sent, uint256 required), InvalidInitialization(), InvalidOption(), InvalidParams(string reason), InvalidState(uint8 current), InvalidText(), InvalidTitle(), NoVotingPower(), NotDAO(), NotInitializing(), NotProposer(), NothingToClaim(), ReentrancyGuardReentrantCall(), SafeCastOverflowedUintDowncast(uint8 bits, uint256 value), TooManyActions(), TransferFailed(), ZeroDeposit()

ShareToken

function CLOCK_MODE() pure returns (string);
function MAX_NAME_BYTES() view returns (uint256);
function MAX_SYMBOL_BYTES() view returns (uint256);
function activeLocks(address account) view returns (uint32);
function allowance(address owner, address spender) view returns (uint256);
function approve(address spender, uint256 value) returns (bool);
function balanceOf(address account) view returns (uint256);
function burn(uint256 amount);
function clearTransferLock(address account, uint64 proposalId);
function clock() view returns (uint48);
function dao() view returns (address);
function decimals() view returns (uint8);
function delegate(address delegatee);
function delegates(address account) view returns (address);
function everTransferable() view returns (bool);
function excluded(address account) view returns (bool);
function freeze(address account);
function frozen(address account) view returns (bool);
function getPastDelegate(address account, uint256 timepoint) view returns (address);
function getPastMemberCount(uint256 timepoint) view returns (uint256);
function getPastTotalUnits(uint256 timepoint) view returns (uint256);
function getPastUnits(address account, uint256 timepoint) view returns (uint256);
function getPastVotes(address account, uint256 timepoint) view returns (uint256);
function getVotes(address account) view returns (uint256);
function governor() view returns (address);
function initialize(string name_, string symbol_, address dao_, address governor_, bool transfersEnabled_, address[] holders, uint256[] amounts);
function isMember(address account) view returns (bool);
function lockedBy(uint64 proposalId, address account) view returns (bool);
function memberCount() view returns (uint256);
function mint(address to, uint256 amount);
function name() view returns (string);
function setExcluded(address account, bool isExcluded);
function setTransferLock(address account, uint64 until, uint64 proposalId);
function setTransfersEnabled(bool enabled);
function symbol() view returns (string);
function totalSupply() view returns (uint256);
function totalUnits() view returns (uint256);
function transfer(address to, uint256 value) returns (bool);
function transferFrom(address from, address to, uint256 value) returns (bool);
function transferLock(address account) view returns (uint64 until, uint64 proposalId);
function transfersEnabled() view returns (bool);
function unfreeze(address account);
function unitsOf(address account) view returns (uint256);

event Approval(address indexed owner, address indexed spender, uint256 value);
event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);
event DelegateVotesChanged(address indexed delegate, uint256 previousVotes, uint256 newVotes);
event ExcludedSet(address indexed account, bool excluded);
event Frozen(address indexed account);
event Initialized(uint64 version);
event Transfer(address indexed from, address indexed to, uint256 value);
event TransferLockCleared(address indexed account, uint64 indexed proposalId);
event TransferLockSet(address indexed account, uint64 until, uint64 indexed proposalId);
event TransfersEnabledSet(bool enabled);
event Unfrozen(address indexed account);
event UnitsChanged(address indexed account, uint256 previousUnits, uint256 newUnits);

// errors: AccountExcluded(address account), AccountFrozen(address account), AccountNotFrozen(address account), CheckpointUnorderedInsertion(), ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed), ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed), ERC20InvalidApprover(address approver), ERC20InvalidReceiver(address receiver), ERC20InvalidSender(address sender), ERC20InvalidSpender(address spender), FutureLookup(uint256 timepoint, uint48 clock), InvalidAccount(address account), InvalidDelegatee(address delegatee), InvalidInitialization(), InvalidMetadata(), InvalidText(), LengthMismatch(), NeedsHoldingPeriod(), NotDAO(), NotGovernor(), NotInitializing(), SafeCastOverflowedUintDowncast(uint8 bits, uint256 value), SupplyOverflow(), TransferLocked(address account, uint64 until), TransfersDisabled()

DAOPolicy

function ANY_TARGET() view returns (address);
function CIPNFT_TARGET() view returns (address);
function GL1F_MARKET_TARGET() view returns (address);
function GL1F_NFT_TARGET() view returns (address);
function GL1F_REGISTRY_TARGET() view returns (address);
function GL1F_RUNTIME_TARGET() view returns (address);
function LOCK_HORIZON() view returns (uint256);
function MANDATORY_CRITICAL() view returns (uint16);
function MAX_CIPNFTS() view returns (uint256);
function MAX_GL1F_COLLECTIONS() view returns (uint256);
function ROLE_CIPNFT() view returns (uint8);
function ROLE_GL1F_MARKET() view returns (uint8);
function ROLE_GL1F_NFT() view returns (uint8);
function ROLE_GL1F_REGISTRY() view returns (uint8);
function ROLE_GL1F_RUNTIME() view returns (uint8);
function RULE_ALLOWED() view returns (uint8);
function RULE_CRITICAL() view returns (uint8);
function RULE_VALUE() view returns (uint8);
function addCipnft(address cipnft);
function addGl1fCollection((address registry, address nft, address market, address runtime) c);
function approvedSpender(uint8 kind, address spender) view returns (bool);
function cipnfts() view returns (address[]);
function clearRule(uint8 kind, address target, bytes4 selector);
function criticalKinds() view returns (uint16);
function dao() view returns (address);
function effectiveRule(uint8 kind, address target, bytes4 selector) view returns (uint8);
function gl1fCollections() view returns ((address registry, address nft, address market, address runtime)[]);
function governor() view returns (address);
function homeKind(address target, bytes4 selector) view returns (uint8);
function homes() view returns ((address profile, address vault, address launcher, address lockFactory, address desciFactory));
function initialize(address dao_, address governor_, address shares_, (uint8 kind, address target, bytes4 selector, uint8 flags)[] rules, (uint8 kind, address spender)[] spenders, uint16 extraCriticalKinds, (address profile, address vault, address launcher, address lockFactory, address desciFactory) homes_, (address registry, address nft, address market, address runtime)[] gl1f, address[] cipnfts_);
function integrationRole(address account) view returns (uint8 role);
function removeCipnft(address cipnft);
function removeGl1fCollection(address registry);
function roleTarget(uint8 role) pure returns (address);
function ruleOf(uint8 kind, address target, bytes4 selector) view returns (uint8);
function ruleSet(uint8 kind, address target, bytes4 selector) view returns (bool isSet, uint8 flags);
function setApprovedSpender(uint8 kind, address spender, bool allowed);
function setCriticalKinds(uint16 mask);
function setRule(uint8 kind, address target, bytes4 selector, uint8 flags);
function setRules((uint8 kind, address target, bytes4 selector, uint8 flags)[] rules);
function shares() view returns (address);
function validate(uint8 kind, (address target, uint256 value, bytes data)[] actions) view returns (bool critical);

event CipnftAdded(address indexed cipnft);
event CipnftRemoved(address indexed cipnft);
event CriticalKindsSet(uint16 mask);
event Gl1fCollectionAdded(address indexed registry, address nft, address market, address runtime);
event Gl1fCollectionRemoved(address indexed registry, address nft, address market, address runtime);
event Initialized(uint64 version);
event RuleCleared(uint8 indexed kind, address indexed target, bytes4 indexed selector);
event RuleSet(uint8 indexed kind, address indexed target, bytes4 indexed selector, uint8 flags);
event SpenderSet(uint8 indexed kind, address indexed spender, bool allowed);

// errors: ActionNotAllowed(uint256 index, address target, bytes4 selector), InvalidInitialization(), InvalidIntegration(string reason), InvalidTarget(uint256 index), NoActions(), NotDAO(), NotInitializing(), SignalHasActions(), SpenderNotAllowed(uint256 index, address spender), UnknownKind(uint8 kind), ValueNotAllowed(uint256 index)

DAOProfile

function ALL_PERMS() view returns (uint32);
function LOGO_PIXELS() view returns (uint256);
function MAX_ANNOUNCEMENT_BYTES() view returns (uint256);
function MAX_CHUNK_BYTES() view returns (uint256);
function MAX_CONSTITUTION_BYTES() view returns (uint256);
function MAX_DESCRIPTION_BYTES() view returns (uint256);
function MAX_LINKS_BYTES() view returns (uint256);
function MAX_LOGO_BYTES() view returns (uint256);
function MAX_REPS() view returns (uint256);
function MAX_TITLE_BYTES() view returns (uint256);
function PERM_ANNOUNCE() view returns (uint32);
function PERM_DESCRIPTION() view returns (uint32);
function PERM_LINKS() view returns (uint32);
function PERM_LOGO() view returns (uint32);
function PERM_OPERATOR() view returns (uint32);
function amendConstitution(address ptr, bytes32 hash);
function announce(string announcementTitle, address ptr, bytes32 hash);
function announcementCount() view returns (uint256);
function constitution(uint256 version) view returns ((address ptr, bytes32 hash, uint64 timestamp, uint64 proposalId));
function constitutionCount() view returns (uint256);
function currentConstitution() view returns (uint256 version, (address ptr, bytes32 hash, uint64 timestamp, uint64 proposalId) v);
function dao() view returns (address);
function descriptionChunk(uint256 offset, uint256 size) view returns (bytes);
function descriptionInfo() view returns (bytes32 hash, uint32 length);
function governor() view returns (address);
function initialize((address dao, address governor, address shares, address textStore, string title, string links, (address ptr, bytes32 hash) constitution, address[] reps, uint32[] repPerms, uint64[] repTermEnds) p, bytes logo_, bytes description_);
function isActiveRep(address account, uint32 perm) view returns (bool);
function lastEditor() view returns (address);
function links() view returns (string);
function logoChunk(uint256 offset, uint256 size) view returns (bytes);
function logoInfo() view returns (bytes32 hash, uint32 length);
function operatorCall(address target, bytes data) returns (bytes ret);
function removeRepresentative(address rep);
function repInfo(address rep) view returns (uint32 perms, uint64 termEnd, uint64 since);
function representatives() view returns (address[] reps, (uint32 perms, uint64 termEnd, uint64 since)[] info);
function resign();
function setDescription(bytes text);
function setLinks(string newLinks);
function setLogo(bytes png);
function setRepresentatives(address[] reps, uint32[] perms, uint64[] termEnds);
function shares() view returns (address);
function textStore() view returns (address);
function title() view returns (string);
function updatedAt() view returns (uint64);

event Announcement(uint256 indexed id, address indexed by, string title, address ptr, bytes32 hash);
event ConstitutionAmended(uint256 indexed version, address ptr, bytes32 hash, uint256 indexed proposalId);
event DescriptionChanged(bytes32 hash, uint32 length);
event Initialized(uint64 version);
event LinksSet(string links, address indexed by);
event LogoChanged(bytes32 hash, uint32 length);
event OperatorCall(address indexed rep, address indexed target, bytes4 selector);
event RepresentativeRemoved(address indexed rep, address indexed by);
event RepresentativesSet(address[] reps, uint32[] perms, uint64[] termEnds);

// errors: ChunkTooLarge(), DuplicateRep(address rep), InvalidBlob(), InvalidInitialization(), InvalidPng(), InvalidRep(address rep), InvalidText(), InvalidTitle(), LengthMismatch(), NotAllowed(), NotDAO(), NotInitializing(), TooLarge(), TooManyReps(), WrongLogoSize(uint256 width, uint256 height)

CipherVault

function MAX_BATCH() view returns (uint256);
function MAX_ENVELOPE_BYTES() view returns (uint256);
function MAX_STEWARDS() view returns (uint256);
function MODE_CLASSIC() view returns (uint8);
function MODE_PQC() view returns (uint8);
function activateKeyEpoch(uint256 epochId);
function activeEpoch() view returns (uint256);
function approvePurchase(address cipnft, uint256 tokenId, uint128 maxPrice, uint64 expiresAt);
function closeReveal(uint256 id);
function dao() view returns (address);
function declassification(uint256 id) view returns ((address cipnft, uint256 tokenId, bytes32 dataKey, uint64 openedAt, uint64 publishedAt, uint64 proposalId, address publisher));
function declassificationCount() view returns (uint256);
function deliverSale(address cipnft, uint256 tokenId, address buyer, bytes newOwnerEncDEK, bytes newViewWrap);
function epoch(uint256 id) view returns ((bytes32 x25519, bytes32 pqcHash, address proposer, uint64 proposedAt, uint64 activatedAt, uint64 proposalId));
function epochCount() view returns (uint256);
function finalizePurchase(address cipnft, uint256 tokenId, bytes32 encDekHash, bytes32 viewWrapHash);
function governor() view returns (address);
function initialize(address dao_, address governor_, address shares_, address policy_, address keyring_, address[] stewards_);
function isSteward(address account) view returns (bool);
function keyEnvelope(uint256 epoch, address steward) view returns (bytes32 hash, uint40 blockNumber, uint40 postedAt, uint8 mode, address by);
function keyring() view returns (address);
function openDeclassification(address cipnft, uint256 tokenId) returns (uint256 id);
function openReveal(address cipnft, uint256 tokenId, uint64 expiresAt, uint128 minUnits) returns (uint256 id);
function policy() view returns (address);
function postKeyEnvelopes(uint256 epochId, address[] recipients, bytes[] envelopes, uint8[] modes);
function postRevealEnvelopes(uint256 id, address[] members, bytes[] envelopes, uint8[] modes);
function proposeKeyEpoch(bytes32 x25519, bytes32 pqcHash, address[] recipients, bytes[] envelopes, uint8[] modes) returns (uint256 epochId);
function publishDataKey(uint256 id, bytes32 dataKey);
function purchaseOf(address cipnft, uint256 tokenId) view returns ((uint128 maxPrice, uint64 expiresAt, uint64 proposalId, bool done));
function reveal(uint256 id) view returns ((address cipnft, uint256 tokenId, uint64 openedAt, uint64 expiresAt, uint64 proposalId, bool closed, uint32 envelopes, uint128 minUnits));
function revealCount() view returns (uint256);
function revealEnvelope(uint256 revealId, address member) view returns (bytes32 hash, uint40 blockNumber, uint40 postedAt, uint8 mode, address by);
function revokePurchase(address cipnft, uint256 tokenId);
function setStewards(address[] stewards_);
function shares() view returns (address);
function stewards() view returns (address[]);

event DataKeyPublished(uint256 indexed id, address indexed cipnft, uint256 tokenId, bytes32 dataKey, address indexed publisher);
event DeclassificationOpened(uint256 indexed id, address indexed cipnft, uint256 indexed tokenId);
event Initialized(uint64 version);
event KeyEnvelope(uint256 indexed epoch, address indexed steward, uint8 mode, bytes envelope);
event KeyEpochActivated(uint256 indexed epoch, uint256 indexed proposalId);
event KeyEpochProposed(uint256 indexed epoch, address indexed proposer, bytes32 x25519, bytes32 pqcHash);
event PurchaseApproved(address indexed cipnft, uint256 indexed tokenId, uint128 maxPrice, uint64 expiresAt);
event PurchaseFinalized(address indexed cipnft, uint256 indexed tokenId, address indexed steward, uint256 price);
event PurchaseRevoked(address indexed cipnft, uint256 indexed tokenId);
event RevealClosed(uint256 indexed revealId);
event RevealEnvelope(uint256 indexed revealId, address indexed member, uint8 mode, bytes envelope);
event RevealOpened(uint256 indexed revealId, address indexed cipnft, uint256 indexed tokenId, uint64 expiresAt, uint128 minUnits);
event SaleDelivered(address indexed cipnft, uint256 indexed tokenId, address indexed buyer, address steward);
event StewardsSet(address[] stewards);

// errors: AlreadyPublished(), BatchTooLarge(), DeliveryChanged(), EnvelopeTaken(address recipient), InvalidEnvelope(), InvalidExpiry(), InvalidInitialization(), InvalidSteward(address account), KeyMismatch(), LengthMismatch(), NotDAO(), NotDAOAsset(uint256 tokenId), NotDelivered(), NotEligible(address member), NotInitializing(), NotListed(), NotSteward(), OfferKeyNotActive(bytes32 keyRef), OfferPriceMismatch(), PqcKeyRequired(address cipnft), PriceTooHigh(uint256 price, uint256 maxPrice), PurchaseNotApproved(), ReentrancyGuardReentrantCall(), RevealNotOpen(), TooManyStewards(), UnknownEpoch(), UnlistedCipnft(address cipnft), WrongDataKey()

Protocol singletons

Deployed once per deployment and listed in its record, except DAOToken, the implementation every launched token clones (TokenLauncher.tokenImplementation()).

DAOFactory

function DEFAULT_HOLDING_BLOCKS() view returns (uint32);
function MAX_FOUNDERS() view returns (uint256);
function MAX_SLUG_BYTES() view returns (uint256);
function MIN_SLUG_BYTES() view returns (uint256);
function VERSION() view returns (string);
function createDAO((string title, string slug, bytes logo, bytes description, string links, (address ptr, bytes32 hash) constitution, string shareName, string shareSymbol, bool transfersEnabled, address[] founders, uint256[] founderShares, uint256 treasuryShares, (uint128 minDeposit, uint128 proposalThreshold, uint32 maxDepositPeriod, uint32 executionWindow, uint16 minInitialDepositBps, uint8 flags) deposit, (uint32 votingPeriod, uint32 executionDelay, uint16 quorumBps, uint16 thresholdBps, uint16 vetoThresholdBps, uint16 minYesBps) standardRules, (uint32 votingPeriod, uint32 executionDelay, uint16 quorumBps, uint16 thresholdBps, uint16 vetoThresholdBps, uint16 minYesBps) criticalRules, address[] reps, uint32[] repPerms, uint64[] repTermEnds, address[] stewards, uint16 extraCriticalKinds, bytes32 salt, (address registry, address nft, address market, address runtime)[] gl1f, address[] cipnfts) p) returns ((address treasury, address governor, address shares, address profile, address policy, address vault, address creator, uint64 createdAt, uint64 createdBlock) d);
function daoAt(uint256 id) view returns ((address treasury, address governor, address shares, address profile, address policy, address vault, address creator, uint64 createdAt, uint64 createdBlock));
function daoBySlug(string slug) view returns (uint256 id);
function daoCount() view returns (uint256);
function daoOf(address treasury) view returns ((address treasury, address governor, address shares, address profile, address policy, address vault, address creator, uint64 createdAt, uint64 createdBlock) d);
function defaultCipnfts() view returns (address[]);
function defaultGl1f() view returns ((address registry, address nft, address market, address runtime)[]);
function idOf(address treasury) view returns (uint256 id);
function implementations() view returns ((address shares, address governor, address treasury, address policy, address profile, address vault));
function isDAO(address treasury) view returns (bool);
function policyBuilder() view returns (address);
function predictTreasury(address creator, bytes32 salt) view returns (address);
function protocol() view returns ((address textStore, address launcher, address distributor, address desciFactory, address desciRouter, address lockFactory, address keyring, address wl1));
function slugAvailable(string slug) view returns (bool);
function slugOf(address treasury) view returns (string);

event DAOCreated(uint256 indexed id, address indexed treasury, address indexed creator, address governor, address shares, address profile, address policy, address vault, string title, string slug);

// errors: FailedDeployment(), InsufficientBalance(uint256 balance, uint256 needed), InvalidSlug(), LengthMismatch(), NoFounders(), SlugTaken(uint256 id), ThresholdUnreachable(), TooManyFounders()

PolicyBuilder

function build((address governor, address treasury, address policy, address shares, address profile, address vault, address launcher, address distributor, address desciFactory, address desciRouter, address lockFactory, address wl1) t) pure returns ((uint8 kind, address target, bytes4 selector, uint8 flags)[] rules, (uint8 kind, address spender)[] spenders);

TextStore

function CHUNK_SIZE() view returns (uint256);
function HEADER_SIZE() view returns (uint256);
function MAX_CHUNKS() view returns (uint256);
function MAX_INLINE() view returns (uint256);
function commit(address[] chunks, bytes32 expectedHash) returns (address pointer);
function hashOf(address pointer) view returns (bytes32 hash);
function isChunk(address chunk) view returns (bool);
function lengthOf(address pointer) view returns (uint256 length);
function pointerOf(bytes32 hash) view returns (address pointer);
function read(address pointer) view returns (bytes out);
function store(bytes data) returns (address pointer, bytes32 hash);
function storeChunk(bytes data) returns (address chunk);

event ChunkStored(address indexed chunk, uint256 length, address indexed author);
event Stored(address indexed pointer, bytes32 indexed hash, uint256 length, address indexed author);

// errors: DeploymentFailed(), EmptyData(), HashMismatch(bytes32 expected, bytes32 actual), NotAChunk(address chunk), TooLarge(), UnknownPointer(address pointer)

CollabKeyring

function PQC_PUBKEY_BYTES() view returns (uint256);
function clearKey();
function keys(address account) view returns (bytes32 x25519, bytes32 pqcHash, uint64 updatedAt);
function pqcKey(address account) view returns (bytes);
function setKey(bytes32 x25519, bytes pqcPub);

event KeyCleared(address indexed account);
event KeySet(address indexed account, bytes32 x25519, bytes32 pqcHash);

// errors: InvalidKey()

TokenLauncher

function LP_LOCKED() view returns (uint8);
function LP_TO_TREASURY() view returns (uint8);
function MAX_POOLS() view returns (uint256);
function MAX_RECIPIENTS() view returns (uint256);
function WL1() view returns (address);
function allTokens(uint256) view returns (address);
function allTokensLength() view returns (uint256);
function desciFactory() view returns (address);
function distributor() view returns (address);
function launch(((string name, string symbol, uint8 decimals, uint8 flags, uint256 cap, address logoPtr, bytes32 logoHash, string logoMime) token, uint256 totalSupply, bytes32 salt, address shares, uint256 toTreasury, (address to, uint256 amount)[] recipients, (uint256 amount, uint8 mode, uint64 deadline) drop, (address quote, uint256 baseAmount, uint256 virtualQuote, uint16 feeBps, (uint8 mode, uint64 unlockTime, address feeRecipient) lp)[] oneSided, (address quote, uint256 baseAmount, uint256 quoteAmount, uint16 feeBps, bool quoteIsNative, (uint8 mode, uint64 unlockTime, address feeRecipient) lp)[] twoSided) p) payable returns (address token);
function launchedBy(address token) view returns (address dao);
function lockFactory() view returns (address);
function predictToken(address dao, bytes32 salt) view returns (address);
function textStore() view returns (address);
function tokenImplementation() view returns (address);
function tokensOf(address dao) view returns (address[]);

event PoolSeeded(address indexed token, address indexed pool, address indexed quote, uint256 baseAmount, uint256 quoteAmount, bool oneSided, address lpHolder, uint256 liquidity);
event TokenLaunched(address indexed dao, address indexed token, uint256 totalSupply, uint256 toTreasury, uint256 toRecipients, uint256 toMembers, uint256 toPools, uint256 campaignId);

// errors: AllocationMismatch(uint256 allocated, uint256 totalSupply), FailedDeployment(), InsufficientBalance(uint256 balance, uint256 needed), InvalidLpOptions(), InvalidQuote(), InvalidRecipient(), NativeMismatch(uint256 used, uint256 sent), PoolExists(address pool), ReentrancyGuardReentrantCall(), Residue(), SafeERC20FailedOperation(address token), SharesNotOfDAO(), TooManyPools(), TooManyRecipients(), TransferMismatch()

DAOToken

function FLAG_BURNABLE() view returns (uint8);
function FLAG_MINTABLE() view returns (uint8);
function FLAG_PAUSABLE() view returns (uint8);
function allowance(address owner, address spender) view returns (uint256);
function approve(address spender, uint256 value) returns (bool);
function balanceOf(address account) view returns (uint256);
function burn(uint256 amount);
function burnFrom(address account, uint256 amount);
function cap() view returns (uint256);
function decimals() view returns (uint8);
function flags() view returns (uint8);
function initialize((string name, string symbol, uint8 decimals, uint8 flags, uint256 cap, address logoPtr, bytes32 logoHash, string logoMime) c, address owner_, address initialHolder, uint256 initialSupply, address textStore_);
function logoHash() view returns (bytes32);
function logoMime() view returns (string);
function logoPtr() view returns (address);
function mint(address to, uint256 amount);
function name() view returns (string);
function owner() view returns (address);
function pause();
function paused() view returns (bool);
function renounceCapability(uint8 flag);
function renounceOwnership();
function setMetadata(address logoPtr_, bytes32 logoHash_, string logoMime_);
function symbol() view returns (string);
function textStore() view returns (address);
function totalSupply() view returns (uint256);
function transfer(address to, uint256 value) returns (bool);
function transferFrom(address from, address to, uint256 value) returns (bool);
function transferOwnership(address newOwner);
function unpause();

event Approval(address indexed owner, address indexed spender, uint256 value);
event CapabilityRenounced(uint8 flag);
event Initialized(uint64 version);
event MetadataSet(address logoPtr, bytes32 logoHash, string logoMime);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event PausedSet(bool paused);
event Transfer(address indexed from, address indexed to, uint256 value);

// errors: CapExceeded(uint256 supply, uint256 cap), CapabilityDisabled(uint8 flag), ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed), ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed), ERC20InvalidApprover(address approver), ERC20InvalidReceiver(address receiver), ERC20InvalidSender(address sender), ERC20InvalidSpender(address spender), InvalidConfig(), InvalidInitialization(), InvalidText(), NotInitializing(), NotOwner(), OwnableInvalidOwner(address owner), OwnableUnauthorizedAccount(address account), TokenPaused()

MemberDistributor

function MIN_DURATION() view returns (uint64);
function MODE_EQUAL() view returns (uint8);
function MODE_PRO_RATA() view returns (uint8);
function campaign(uint256 id) view returns ((address shares, address token, address sweepTo, address creator, uint128 total, uint128 claimed, uint48 snapshot, uint64 deadline, uint8 mode, bool swept, uint32 memberCount, uint256 totalUnits));
function campaignCount() view returns (uint256);
function campaignCountOf(address shares) view returns (uint256);
function campaignIdOf(address shares, uint256 index) view returns (uint256);
function campaignsOf(address shares) view returns (uint256[]);
function claim(uint256 id, address member) returns (uint256 amount);
function claimed(uint256 id, address member) view returns (bool);
function createCampaign(address shares, address token, uint256 amount, uint8 mode, uint64 deadline, address sweepTo) payable returns (uint256 id);
function entitlement(uint256 id, address member) view returns (uint256);
function sweep(uint256 id) returns (uint256 amount);

event CampaignCreated(uint256 indexed id, address indexed shares, address indexed token, uint256 total, uint8 mode, uint48 snapshot, uint64 deadline, uint256 memberCount, uint256 totalUnits);
event Claimed(uint256 indexed id, address indexed member, uint256 amount);
event Swept(uint256 indexed id, address indexed to, uint256 amount);

// errors: AlreadyClaimed(), AlreadySwept(), CampaignClosed(), ContractMustClaim(), EqualNeedsFixedMembers(), InvalidAmount(), InvalidDeadline(), InvalidMode(), NoMembers(), NotEligible(), NotEnded(), ReentrancyGuardReentrantCall(), SafeCastOverflowedUintDowncast(uint8 bits, uint256 value), SafeERC20FailedOperation(address token), TransferFailed(), TransferMismatch(), WrongValue()

DeSciFi

The exchange: the two factories and the router are singletons; every pool and lock box is a clone.

DeSciFiFactory

function WL1() view returns (address);
function allPairs(uint256) view returns (address);
function allPairsLength() view returns (uint256);
function createLaunchPool(address baseToken, address quoteToken, uint256 baseAmount, uint256 virtualQuote, uint16 feeBps, address lpTo) returns (address pair, uint256 liquidity);
function createPair(address tokenA, address tokenB, uint16 feeBps) returns (address pair);
function getPair(address, address, uint16) view returns (address);
function isLaunchFee(uint16 feeBps) pure returns (bool);
function isPair(address pool) view returns (bool);
function isStandardFee(uint16 feeBps) pure returns (bool);
function pairFor(address tokenA, address tokenB, uint16 feeBps) view returns (address);
function pairImplementation() view returns (address);
function pairsPage(uint256 offset, uint256 limit) view returns (address[] page);

event PairCreated(address indexed token0, address indexed token1, uint16 feeBps, address pair, uint256 index, bool isLaunchPool, uint112 virtual0, uint112 virtual1, address creator);

// errors: FailedDeployment(), FeeNotAllowed(uint16 feeBps), IdenticalTokens(), InsufficientBalance(uint256 balance, uint256 needed), InvalidAmount(), NotAToken(address token), PairExists(address pair), SafeERC20FailedOperation(address token), TransferMismatch(), ZeroAddress()

DeSciFiPair

function DEAD() view returns (address);
function MINIMUM_LIQUIDITY() view returns (uint256);
function allowance(address owner, address spender) view returns (uint256);
function approve(address spender, uint256 value) returns (bool);
function balanceOf(address account) view returns (uint256);
function burn(address to) returns (uint256 amount0, uint256 amount1);
function collectFees(address to) returns (uint256 amount0, uint256 amount1);
function decimals() view returns (uint8);
function factory() view returns (address);
function feeBps() view returns (uint16);
function feeGrowth0() view returns (uint256);
function feeGrowth0Of(address account) view returns (uint256);
function feeGrowth1() view returns (uint256);
function feeGrowth1Of(address account) view returns (uint256);
function feeReserve0() view returns (uint128);
function feeReserve1() view returns (uint128);
function getEffectiveReserves() view returns (uint256 e0, uint256 e1);
function getReserves() view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function initialize(address t0, address t1, uint16 fee, bool launch, uint112 v0, uint112 v1);
function isLaunchPool() view returns (bool);
function mint(address to) returns (uint256 liquidity);
function name() view returns (string);
function owed0(address account) view returns (uint128);
function owed1(address account) view returns (uint128);
function pendingFees(address account) view returns (uint256 amount0, uint256 amount1);
function price0CumulativeLast() view returns (uint256);
function price1CumulativeLast() view returns (uint256);
function skim(address to);
function swap(uint256 amount0Out, uint256 amount1Out, address to);
function symbol() view returns (string);
function sync();
function token0() view returns (address);
function token1() view returns (address);
function totalSupply() view returns (uint256);
function transfer(address to, uint256 value) returns (bool);
function transferFrom(address from, address to, uint256 value) returns (bool);
function virtual0() view returns (uint112);
function virtual1() view returns (uint112);

event Approval(address indexed owner, address indexed spender, uint256 value);
event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to, uint256 liquidity);
event FeesAccrued(uint256 fee0, uint256 fee1);
event FeesCollected(address indexed owner, address indexed to, uint256 amount0, uint256 amount1);
event Initialized(uint64 version);
event Mint(address indexed sender, uint256 amount0, uint256 amount1, address indexed to, uint256 liquidity);
event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to);
event Sync(uint112 reserve0, uint112 reserve1);
event Transfer(address indexed from, address indexed to, uint256 value);

// errors: ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed), ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed), ERC20InvalidApprover(address approver), ERC20InvalidReceiver(address receiver), ERC20InvalidSender(address sender), ERC20InvalidSpender(address spender), InsufficientInputAmount(), InsufficientLiquidity(), InsufficientLiquidityBurned(), InsufficientLiquidityMinted(), InsufficientOutputAmount(), InvalidInit(), InvalidInitialization(), InvalidTo(), KInvariant(), LaunchPoolSingleDeposit(), NotFactory(), NotInitializing(), Overflow(), ReentrancyGuardReentrantCall(), SafeERC20FailedOperation(address token)

DeSciFiRouter

function WL1() view returns (address);
function addLiquidity((address tokenA, address tokenB, uint16 feeBps, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) a) returns (uint256 amountA, uint256 amountB, uint256 liquidity, address pair);
function addLiquidityL1(address token, uint16 feeBps, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountL1Min, address to, uint256 deadline) payable returns (uint256 amountToken, uint256 amountL1, uint256 liquidity, address pair);
function factory() view returns (address);
function getAmountIn(uint256 amountOut, uint256 rIn, uint256 rOut, uint256 vIn, uint256 vOut, uint16 feeBps) pure returns (uint256 amountIn);
function getAmountOut(uint256 amountIn, uint256 rIn, uint256 rOut, uint256 vIn, uint256 vOut, uint16 feeBps) pure returns (uint256 amountOut);
function getAmountsIn(uint256 amountOut, address[] pools, address tokenIn) view returns (uint256[] amounts, address tokenOut);
function getAmountsOut(uint256 amountIn, address[] pools, address tokenIn) view returns (uint256[] amounts, address tokenOut);
function removeLiquidity(address pair, uint256 liquidity, uint256 amount0Min, uint256 amount1Min, address to, uint256 deadline) returns (uint256 amount0, uint256 amount1);
function removeLiquidityL1(address pair, uint256 liquidity, uint256 amountTokenMin, uint256 amountL1Min, address to, uint256 deadline) returns (uint256 amountToken, uint256 amountL1);
function swapExactL1ForTokens(uint256 amountOutMin, address[] pools, address to, uint256 deadline) payable returns (uint256[] amounts);
function swapExactTokensForL1(uint256 amountIn, uint256 amountOutMin, address[] pools, address tokenIn, address to, uint256 deadline) returns (uint256[] amounts);
function swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, address[] pools, address tokenIn, address to, uint256 deadline) returns (uint256[] amounts);
function swapL1ForExactTokens(uint256 amountOut, address[] pools, address to, uint256 deadline) payable returns (uint256[] amounts);
function swapTokensForExactL1(uint256 amountOut, uint256 amountInMax, address[] pools, address tokenIn, address to, uint256 deadline) returns (uint256[] amounts);
function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] pools, address tokenIn, address to, uint256 deadline) returns (uint256[] amounts);

// errors: ExcessiveInput(uint256 amountIn, uint256 maxIn), Expired(), InsufficientAmount(), InsufficientLiquidity(), InsufficientOutput(uint256 out, uint256 minOut), InvalidPath(), L1TransferFailed(), LaunchPoolNotSupported(), OnlyWL1(), ReentrancyGuardReentrantCall(), SafeERC20FailedOperation(address token), UnknownPool(address pool)

LockFactory

function allLocks(uint256) view returns (address);
function allLocksLength() view returns (uint256);
function createLock(address pair, uint256 amount, address owner, address feeRecipient, uint64 unlockTime) returns (address lock);
function desciFactory() view returns (address);
function feeLockAt(address recipient, uint256 index) view returns (address);
function feeLockCount(address recipient) view returns (uint256);
function implementation() view returns (address);
function isLock(address lock) view returns (bool);
function locksByFeeRecipient(address recipient) view returns (address[]);
function locksByOwner(address owner) view returns (address[] out);
function locksByPair(address pair) view returns (address[]);
function ownerLockAt(address owner, uint256 index) view returns (address);
function ownerLockCount(address owner) view returns (uint256);
function recordOwner(address newOwner);

event LockCreated(address indexed lock, address indexed pair, address indexed owner, address feeRecipient, uint64 unlockTime, uint256 amount, address creator);
event LockOwnerChanged(address indexed lock, address indexed newOwner);

// errors: FailedDeployment(), InsufficientBalance(uint256 balance, uint256 needed), InvalidAmount(), InvalidUnlock(), NotALock(), SafeERC20FailedOperation(address token), UnknownPool(address pair)

LockBox

function PERMANENT() view returns (uint64);
function collectFees() returns (uint256 amount0, uint256 amount1);
function extendLock(uint64 newUnlockTime);
function factory() view returns (address);
function feeRecipient() view returns (address);
function initialize(address pair_, address owner_, address feeRecipient_, uint64 unlockTime_);
function lockedAmount() view returns (uint256);
function owner() view returns (address);
function pair() view returns (address);
function pendingFees() view returns (uint256 amount0, uint256 amount1);
function transferOwnership(address newOwner);
function unlockTime() view returns (uint64);
function withdraw(address to, uint256 amount);

event FeesCollected(uint256 amount0, uint256 amount1, address indexed to);
event Initialized(uint64 version);
event LockExtended(uint64 unlockTime);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event Withdrawn(address indexed to, uint256 amount);

// errors: InvalidInitialization(), InvalidUnlock(), NotInitializing(), NotOwner(), ReentrancyGuardReentrantCall(), SafeERC20FailedOperation(address token), StillLocked(uint64 unlockTime), ZeroAddress()

Read-only lenses

Views only; keep their pages small (Reading COLLAB from the chain).

DAOLens

function constitutionHistory(address treasury) view returns ((address ptr, bytes32 hash, uint64 timestamp, uint64 proposalId)[] v);
function directory(uint256 offset, uint256 limit) view returns ((uint256 id, address treasury, address profile, string slug, string title, bytes32 logoHash, uint32 logoLength, bytes32 descriptionHash, uint32 descriptionLength, uint64 createdAt, uint64 profileUpdatedAt)[] page, uint256 total);
function factory() view returns (address);
function getDAO(address treasury) view returns ((uint256 id, address treasury, address governor, address shares, address profile, address policy, address vault, address creator, uint64 createdAt, uint64 createdBlock, string title, string slug, bytes32 logoHash, uint32 logoLength, string shareName, string shareSymbol, uint256 totalSupply, uint256 totalUnits, uint256 memberCount, uint256 treasuryL1, uint256 treasuryShares, uint256 proposalCount, uint256 constitutionVersion, bool transfersEnabled) s, (bytes32 descriptionHash, uint32 descriptionLength, string links, uint64 profileUpdatedAt, address lastEditor, address constitutionPtr, bytes32 constitutionHash, uint64 constitutionTimestamp, uint64 constitutionProposal, (uint128 minDeposit, uint128 proposalThreshold, uint32 maxDepositPeriod, uint32 executionWindow, uint16 minInitialDepositBps, uint8 flags) deposit, (uint32 votingPeriod, uint32 executionDelay, uint16 quorumBps, uint16 thresholdBps, uint16 vetoThresholdBps, uint16 minYesBps) standardRules, (uint32 votingPeriod, uint32 executionDelay, uint16 quorumBps, uint16 thresholdBps, uint16 vetoThresholdBps, uint16 minYesBps) criticalRules, address[] reps, (uint32 perms, uint64 termEnd, uint64 since)[] repInfo, address[] stewards, uint256 activeEpoch, uint256 epochCount, uint256 announcementCount, uint16 criticalKinds, uint32 holdingBlocks, (address registry, address nft, address market, address runtime)[] gl1f, address[] cipnfts, bytes32[] cipnftKeys) d);
function getDAOBySlug(string slug) view returns ((uint256 id, address treasury, address governor, address shares, address profile, address policy, address vault, address creator, uint64 createdAt, uint64 createdBlock, string title, string slug, bytes32 logoHash, uint32 logoLength, string shareName, string shareSymbol, uint256 totalSupply, uint256 totalUnits, uint256 memberCount, uint256 treasuryL1, uint256 treasuryShares, uint256 proposalCount, uint256 constitutionVersion, bool transfersEnabled) s, (bytes32 descriptionHash, uint32 descriptionLength, string links, uint64 profileUpdatedAt, address lastEditor, address constitutionPtr, bytes32 constitutionHash, uint64 constitutionTimestamp, uint64 constitutionProposal, (uint128 minDeposit, uint128 proposalThreshold, uint32 maxDepositPeriod, uint32 executionWindow, uint16 minInitialDepositBps, uint8 flags) deposit, (uint32 votingPeriod, uint32 executionDelay, uint16 quorumBps, uint16 thresholdBps, uint16 vetoThresholdBps, uint16 minYesBps) standardRules, (uint32 votingPeriod, uint32 executionDelay, uint16 quorumBps, uint16 thresholdBps, uint16 vetoThresholdBps, uint16 minYesBps) criticalRules, address[] reps, (uint32 perms, uint64 termEnd, uint64 since)[] repInfo, address[] stewards, uint256 activeEpoch, uint256 epochCount, uint256 announcementCount, uint16 criticalKinds, uint32 holdingBlocks, (address registry, address nft, address market, address runtime)[] gl1f, address[] cipnfts, bytes32[] cipnftKeys) d);
function getDAOs(uint256 offset, uint256 limit, bool newestFirst) view returns ((uint256 id, address treasury, address governor, address shares, address profile, address policy, address vault, address creator, uint64 createdAt, uint64 createdBlock, string title, string slug, bytes32 logoHash, uint32 logoLength, string shareName, string shareSymbol, uint256 totalSupply, uint256 totalUnits, uint256 memberCount, uint256 treasuryL1, uint256 treasuryShares, uint256 proposalCount, uint256 constitutionVersion, bool transfersEnabled)[] page, uint256 total);
function getMembers(address treasury, address[] accounts) view returns ((address account, uint256 balance, uint256 units, uint256 votes, address delegate, bool frozen, uint64 lockUntil, bool isRep, uint32 repPerms, uint64 repTermEnd, bool isSteward, bytes32 keyringX25519, bytes32 keyringPqcHash, uint256 l1Balance, bool excluded)[] out);
function getProposal(address governor, uint256 id, address viewer) view returns ((uint256 id, uint8 state, address proposer, uint8 kind, bool critical, string title, uint64 submitTime, uint64 depositEnd, uint64 votingStart, uint64 votingEnd, uint64 createdBlock, uint48 snapshot, uint128 totalDeposit, uint128 minDeposit, (uint32 votingPeriod, uint32 executionDelay, uint16 quorumBps, uint16 thresholdBps, uint16 vetoThresholdBps, uint16 minYesBps) rules, uint32 executionWindow, (uint256 yes, uint256 abstain, uint256 no, uint256 veto) tally, uint256 totalPower, address descriptionPtr, bytes32 descriptionHash, bytes32 actionsHash, uint8 depositOutcome, bool penaltySettled, uint8 myOption, uint256 myWeight, uint256 myPreview, uint256 myDeposit, uint48 holdSnapshot));
function getProposals(address governor, uint256 fromId, uint256 count, address viewer) view returns ((uint256 id, uint8 state, address proposer, uint8 kind, bool critical, string title, uint64 submitTime, uint64 depositEnd, uint64 votingStart, uint64 votingEnd, uint64 createdBlock, uint48 snapshot, uint128 totalDeposit, uint128 minDeposit, (uint32 votingPeriod, uint32 executionDelay, uint16 quorumBps, uint16 thresholdBps, uint16 vetoThresholdBps, uint16 minYesBps) rules, uint32 executionWindow, (uint256 yes, uint256 abstain, uint256 no, uint256 veto) tally, uint256 totalPower, address descriptionPtr, bytes32 descriptionHash, bytes32 actionsHash, uint8 depositOutcome, bool penaltySettled, uint8 myOption, uint256 myWeight, uint256 myPreview, uint256 myDeposit, uint48 holdSnapshot)[] page, uint256 total);

MarketLens

function aggregate((address target, bytes data)[] calls) view returns (uint256 blockNumber, (bool success, bytes data)[] results);
function campaignsOf(address shares, address user) view returns ((uint256 id, (address shares, address token, address sweepTo, address creator, uint128 total, uint128 claimed, uint48 snapshot, uint64 deadline, uint8 mode, bool swept, uint32 memberCount, uint256 totalUnits) campaign, uint256 entitlement, bool claimed)[] out);
function campaignsOfPage(address shares, address user, uint256 offset, uint256 limit) view returns ((uint256 id, (address shares, address token, address sweepTo, address creator, uint128 total, uint128 claimed, uint48 snapshot, uint64 deadline, uint8 mode, bool swept, uint32 memberCount, uint256 totalUnits) campaign, uint256 entitlement, bool claimed, bool byDao)[] rows, uint256 total);
function cipnftsOf(address cipnft, address owner, uint256 max) view returns ((uint256 tokenId, string title, uint8 encMode, bool listed, uint256 priceWei, uint32 cipherLen, bytes32 dekHash)[] out);
function daoTokens(address dao, address owner) view returns ((address token, bool ok, string name, string symbol, uint8 decimals, uint256 totalSupply, uint256 balance, uint256 allowance, address launchedBy)[] out);
function desciFactory() view returns (address);
function distributor() view returns (address);
function factory() view returns (address);
function getPools(uint256 offset, uint256 limit, address user) view returns ((address pool, address token0, address token1, string symbol0, string symbol1, uint8 decimals0, uint8 decimals1, uint16 feeBps, bool isLaunchPool, uint112 reserve0, uint112 reserve1, uint112 virtual0, uint112 virtual1, uint256 lpSupply, uint128 feeReserve0, uint128 feeReserve1, uint256 userLp, uint256 userFees0, uint256 userFees1)[] out, uint256 total);
function launcher() view returns (address);
function lockFactory() view returns (address);
function locksOf(address owner) view returns ((address lock, address pair, address owner, address feeRecipient, uint64 unlockTime, uint256 amount, uint256 pendingFees0, uint256 pendingFees1)[] out);
function locksOfPage(address owner, uint256 offset, uint256 limit) view returns ((address lock, address pair, address owner, address feeRecipient, uint64 unlockTime, uint256 amount, uint256 pendingFees0, uint256 pendingFees1)[] rows, uint256 total);
function locksPaying(address recipient) view returns ((address lock, address pair, address owner, address feeRecipient, uint64 unlockTime, uint256 amount, uint256 pendingFees0, uint256 pendingFees1)[] out);
function locksPayingPage(address recipient, uint256 offset, uint256 limit) view returns ((address lock, address pair, address owner, address feeRecipient, uint64 unlockTime, uint256 amount, uint256 pendingFees0, uint256 pendingFees1)[] rows, uint256 total);
function modelsOf(address modelNft, address registry, address owner, uint256 max) view returns ((uint256 tokenId, bytes32 modelId, string title, bool active, bool inferenceEnabled, uint8 pricingMode, uint256 feeWei, address feeRecipient, uint16 nFeatures, uint16 nTrees, uint32 totalBytes, uint8 accessPlans)[] out);
function nativeBalances(address[] accounts) view returns (uint256[] out);
function owners(address[] tokens) view returns (address[] out);
function poolsInfo(address[] pools, address user) view returns ((address pool, address token0, address token1, string symbol0, string symbol1, uint8 decimals0, uint8 decimals1, uint16 feeBps, bool isLaunchPool, uint112 reserve0, uint112 reserve1, uint112 virtual0, uint112 virtual1, uint256 lpSupply, uint128 feeReserve0, uint128 feeReserve1, uint256 userLp, uint256 userFees0, uint256 userFees1)[] out);
function tokenInfo(address[] tokens, address owner, address spender) view returns ((address token, bool ok, string name, string symbol, uint8 decimals, uint256 totalSupply, uint256 balance, uint256 allowance, address launchedBy)[] out);

GenesisL1 contracts COLLAB integrates with

CIPNFT's and GL1F's ABIs as deployed on GenesisL1 (externals/bin/, with their sources in externals/src/), the functions GL1F Crypto adds to GL1F's registry and marketplace, and the part of wL1, the wrapped-L1 ERC-20, that COLLAB uses: its ERC-20 functions, deposit and withdraw. The deployed wL1's source is not in this repository; local chains use MockWL1 (test/mocks/Mocks.sol).

CIPNFT

function AEAD_TAG_BYTES() view returns (uint256);
function CIPHER_PREVIEW_MAX_BYTES() view returns (uint256);
function ENC_MODE_CLASSIC() view returns (uint8);
function ENC_MODE_PQC() view returns (uint8);
function MAX_CIPHERTEXT_BYTES() view returns (uint256);
function MAX_PLAINTEXT_BYTES() view returns (uint256);
function MAX_TITLE_BYTES() view returns (uint32);
function MAX_TITLE_WORDS() view returns (uint8);
function NONCE_BYTES() view returns (uint256);
function OWNER_ENVELOPE_BYTES() view returns (uint256);
function PQC_KEM_CT_BYTES() view returns (uint256);
function PQC_OWNER_ENVELOPE_BYTES() view returns (uint256);
function PQC_PUBKEY_BYTES() view returns (uint256);
function VIEW_WRAP_BYTES() view returns (uint256);
function acceptTos(uint256 version);
function accumulatedFees() view returns (uint256);
function addTosVersion(string tosText_);
function admin() view returns (address);
function approve(address, uint256) pure;
function balanceOf(address owner) view returns (uint256);
function burn(uint256 tokenId);
function buyerOfferCount(address buyer) view returns (uint256);
function buyerOfferTokenAt(address buyer, uint256 index) view returns (uint256 tokenId);
function cancelOffer(uint256 tokenId);
function createOffer(uint256 tokenId, uint64 expiry) payable;
function deliverOffer(uint256 tokenId, address buyer, bytes newOwnerEncDEK, bytes newViewWrap);
function encryptionMode(uint256 tokenId) view returns (uint8);
function encryptionPubKey(address) view returns (bytes32);
function eraseTokenData(uint256 tokenId, uint256 maxWords);
function finalizeOffer(uint256 tokenId);
function flatMintFeeWei() view returns (uint256);
function getApproved(uint256 tokenId) view returns (address);
function getDelivery(uint256 tokenId, address buyer) view returns (address seller, uint64 deliveredAt, bytes ownerEncDEK, bytes viewWrap);
function getEraseState(uint256 tokenId) view returns (bool active, uint8 field, uint32 nextWord);
function getOffer(uint256 tokenId, address buyer) view returns (uint256 amountWei, uint64 expiry, bytes32 buyerKeyRef);
function getTokenCard(uint256 tokenId) view returns (string title, uint8 encMode, bool open, uint256 priceWei, uint32 cipherLen, bytes32 dekHash, bytes cipherPreview, uint32 tosVersion);
function getTokenData(uint256 tokenId) view returns (bytes metaCipher, bytes ownerEncDEK, bytes viewWrap, bytes32 dekHash);
function isApprovedForAll(address, address) pure returns (bool);
function listedCount() view returns (uint256);
function listedTokenAt(uint256 index) view returns (uint256 tokenId);
function listings(uint256) view returns (bool open, uint256 priceWei);
function maxOfferDurationSec() view returns (uint64);
function minOfferPriceWei() view returns (uint256);
function mint(string title, bytes metaCipher, bytes ownerEncDEK, bytes32 dekHash, bytes viewWrap, uint8 encMode) payable returns (uint256 tokenId);
function mintFeeFor(uint256 plaintextBytes) view returns (uint256);
function name() view returns (string);
function offerBuyerAt(uint256 tokenId, uint256 index) view returns (address buyer);
function offerCount(uint256 tokenId) view returns (uint256);
function ownedCount(address owner) view returns (uint256);
function ownedTokenAt(address owner, uint256 index) view returns (uint256 tokenId);
function ownerOf(uint256 tokenId) view returns (address);
function perByteFeeWei() view returns (uint256);
function pqcPubKey(address) view returns (bytes);
function refundExpiredOffer(uint256 tokenId, address buyer);
function revokeDelivery(uint256 tokenId, address buyer);
function safeTransferFrom(address, address, uint256) pure;
function safeTransferFrom(address, address, uint256, bytes) pure;
function setApprovalForAll(address, bool) pure;
function setEncryptionPublicKey(bytes32 pubKey);
function setFees(uint256 perByteFeeWei_, uint256 flatMintFeeWei_);
function setListing(uint256 tokenId, bool open, uint256 priceWei);
function setOfferRules(uint64 maxOfferDurationSec_, uint256 minOfferPriceWei_);
function setPqcPublicKey(bytes pubKey);
function setTitle(uint256 tokenId, string newTitle);
function setViewWrap(uint256 tokenId, bytes viewWrap);
function supportsInterface(bytes4 interfaceId) view returns (bool);
function symbol() view returns (string);
function titleOf(uint256 tokenId) view returns (string);
function tokenURI(uint256 tokenId) view returns (string);
function tosAccepted(address, uint256) view returns (bool);
function tosHash(uint256) view returns (bytes32);
function tosText(uint256 version) view returns (string);
function tosVersionCurrent() view returns (uint256);
function tosVersionOf(uint256) view returns (uint32);
function transferAdmin(address newAdmin);
function transferFrom(address, address, uint256) pure;
function updateOwnerEncDEK(uint256 tokenId, bytes newOwnerEncDEK);
function withdrawFees(address to, uint256 amountWei);

event AdminTransferred(address indexed oldAdmin, address indexed newAdmin);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
event Burned(uint256 indexed tokenId);
event EncryptionPublicKeySet(address indexed user, bytes32 pubKey);
event FeesUpdated(uint256 perByteFeeWei, uint256 flatMintFeeWei);
event FeesWithdrawn(address indexed to, uint256 amountWei);
event ListingUpdated(uint256 indexed tokenId, bool open, uint256 priceWei);
event Minted(uint256 indexed tokenId, address indexed owner, bytes32 dekHash, uint256 cipherSize, uint32 tosVersion, uint256 feePaid);
event OfferAccepted(uint256 indexed tokenId, address indexed buyer, uint256 amountWei);
event OfferCancelled(uint256 indexed tokenId, address indexed buyer);
event OfferCreated(uint256 indexed tokenId, address indexed buyer, uint256 amountWei, uint64 expiry, bytes32 buyerKeyRef);
event OfferDelivered(uint256 indexed tokenId, address indexed buyer, address indexed seller, uint256 amountWei);
event OfferDeliveryRevoked(uint256 indexed tokenId, address indexed buyer, address indexed seller);
event OfferFinalized(uint256 indexed tokenId, address indexed buyer, address indexed seller, uint256 amountWei);
event OfferRulesUpdated(uint64 maxOfferDurationSec, uint256 minOfferPriceWei);
event OwnerEnvelopeUpdated(uint256 indexed tokenId, address indexed owner);
event PqcPublicKeySet(address indexed user, bytes32 pubKeyHash);
event TitleUpdated(uint256 indexed tokenId, string title);
event TokenDataEraseProgress(uint256 indexed tokenId, uint8 field, uint32 nextWord);
event TokenDataEraseStarted(uint256 indexed tokenId);
event TokenDataErased(uint256 indexed tokenId);
event TosAccepted(address indexed user, uint256 indexed version);
event TosVersionAdded(uint256 indexed version, bytes32 indexed textHash);
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event ViewWrapUpdated(uint256 indexed tokenId, bool enabled);

// errors: ALREADY_MINTED(), AMOUNT_EXCEEDS_FEES(), BAD_DELIVERY(), BAD_ENC_MODE(), BAD_EXPIRY(), BAD_FIELD(), BAD_MAXWORDS(), BAD_OWNER_ENVELOPE(), BAD_PQC_PUBKEY(), BAD_PUBKEY(), BAD_TITLE(), BAD_TITLE_LEN(), BAD_VALUE(), BAD_VIEW_WRAP(), BUYER_KEY_CHANGED(), CIPHER_TOO_SMALL(), DISABLED_USE_ACCEPT_OFFER(), EMPTY_TOS(), EXPIRED(), INSUFFICIENT_FEE(), META_TOO_LARGE(), NOT_ADMIN(), NOT_AUTH(), NOT_CURRENT_TOS(), NOT_DELIVERED(), NOT_EXPIRED(), NOT_LISTED(), NOT_MINTED(), NOT_OWNER(), NOT_SELLER(), NO_BUYER_KEYREF(), NO_BUYER_PQC_PUBKEY(), NO_BUYER_PUBKEY(), NO_DELIVERY(), NO_OFFER(), NO_PQC_PUBKEY(), NO_PUBKEY_SET(), NO_TOS(), OFFER_EXISTS(), OWNER_CANNOT_OFFER(), PAY_FAILED(), PLAINTEXT_TOO_LARGE(), PRICE_CHANGED(), REENTRANCY(), REFUND_FAILED(), SELLER_NOT_OWNER(), TITLE_TOO_MANY_WORDS(), TOS_NOT_ACCEPTED(), UNSAFE_RECEIVER(), WITHDRAW_FAILED(), ZERO_ADDR()

ModelRegistry

function accessExpiry(bytes32, address) view returns (uint64);
function accessPlanCount(bytes32) view returns (uint8);
function activeLicenseId() view returns (uint32);
function addLicense(string name, string url) returns (uint32 id);
function adminBurnAndDelete(uint256 tokenId);
function burnAndDelete(uint256 tokenId);
function buyAccess(bytes32 modelId, uint8 planId, address key) payable returns (uint64 newExpiry);
function createAccessPlan(bytes32 modelId, uint32 durationBlocks, uint256 priceWei, bool active) returns (uint8 planId);
function creatorOf(uint256 tokenId) view returns (address);
function deployFeeWei() view returns (uint256);
function getAccessPlan(bytes32 modelId, uint8 planId) view returns (uint32 durationBlocks, uint256 priceWei, bool active);
function getLicense(uint256 id) view returns (string name, string url);
function getModelBytesInfo(bytes32 modelId) view returns (address tablePtr, uint32 chunkSize, uint32 numChunks, uint32 totalBytes);
function getModelRuntime(bytes32 modelId) view returns (address tablePtr, uint32 chunkSize, uint32 numChunks, uint32 totalBytes, uint16 nFeatures, uint16 nTrees, uint16 depth, int32 baseQ, uint32 scaleQ, bool inferenceEnabled, uint8 pricingMode, uint256 feeWei, address feeRecipient);
function getModelSummary(uint256 tokenId) view returns (bool exists, bytes32 modelId, address tablePtr, uint16 nFeatures, uint16 nTrees, uint16 depth, int32 baseQ, uint8 pricingMode, uint256 feeWei, address feeRecipient, bool inferenceEnabled, address creator, uint32 tosVersionAccepted, string title, string description);
function licenseCount() view returns (uint32);
function modelIdByTokenId(uint256) view returns (bytes32);
function modelNFT() view returns (address);
function models(bytes32) view returns (bool exists, bool active, bytes32 modelId, address tablePtr, uint32 chunkSize, uint32 numChunks, uint32 totalBytes, uint16 nFeatures, uint16 nTrees, uint16 depth, int32 baseQ, uint32 scaleQ, bool inferenceEnabled, uint8 pricingMode, uint256 feeWei, address feeRecipient, address creator, uint32 tosVersionAccepted, uint32 licenseIdAccepted, uint256 tokenId);
function owner() view returns (address);
function registerModel(bytes32 modelId, address tablePtr, uint32 chunkSize, uint32 numChunks, uint32 totalBytes, uint16 nFeatures, uint16 nTrees, uint16 depth, int32 baseQ, uint32 scaleQ, string title_, string description_, bytes iconPng32, string featuresPacked, bytes32[] titleWordHashes, uint8 pricingMode, uint256 feeWei, address recipient, uint32 tosVersionAccepted_, uint32 licenseIdAccepted_, address ownerKey) payable returns (uint256 tokenId);
function requiredDeployFeeWei(uint32 totalBytes) view returns (uint256);
function revokeAccessKey(bytes32 modelId, address key);
function searchTitleWords(bytes32[] words, uint256 cursor, uint256 limit) view returns (uint256[] tokenIds, uint256 nextCursor);
function setAccessPlan(bytes32 modelId, uint8 planId, uint32 durationBlocks, uint256 priceWei, bool active);
function setActiveLicenseId(uint32 id);
function setDeployFeeWei(uint256 feeWei);
function setModelNFT(address nftAddr);
function setOwnerAccessKey(bytes32 modelId, address key);
function setSizeFeeWeiPerByte(uint256 weiPerByte);
function setToS(string text);
function sizeFeeWeiPerByte() view returns (uint256);
function tokenIdByModelId(bytes32) view returns (uint256);
function tosHash() view returns (bytes32);
function tosText() view returns (string);
function tosVersion() view returns (uint32);
function transferOwnership(address newOwner);
function updateModelSettings(uint256 tokenId, bool enabled, uint8 pricingMode, uint256 feeWei, address recipient);

event AccessPlanSet(bytes32 indexed modelId, uint8 indexed planId, uint32 durationBlocks, uint256 priceWei, bool active);
event AccessPurchased(bytes32 indexed modelId, address indexed buyer, address indexed key, uint8 planId, uint64 newExpiry);
event AccessRevoked(bytes32 indexed modelId, address indexed key);
event ActiveLicenseSet(uint32 indexed id);
event DeployFeeSet(uint256 feeWei);
event LicenseAdded(uint32 indexed id, string name, string url);
event ModelBurned(uint256 indexed tokenId, bytes32 indexed modelId);
event ModelNFTSet(address indexed nft);
event ModelRegistered(uint256 indexed tokenId, bytes32 indexed modelId, address indexed creator);
event ModelSettingsUpdated(uint256 indexed tokenId, bool enabled, uint8 mode, uint256 feeWei, address recipient);
event OwnerAccessKeySet(bytes32 indexed modelId, address indexed key, uint64 expiry);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event SizeFeeSet(uint256 weiPerByte);
event ToSUpdated(uint32 indexed version, bytes32 hash);

ModelNFT

function approve(address spender, uint256 tokenId);
function balanceOf(address owner) view returns (uint256);
function burn(uint256 tokenId);
function description(uint256) view returns (string);
function features(uint256) view returns (string);
function getApproved(uint256) view returns (address);
function icon(uint256) view returns (bytes);
function isApprovedForAll(address, address) view returns (bool);
function mintTo(address to, string _title, string _description, bytes _icon, string _features) returns (uint256 tokenId);
function name() view returns (string);
function ownerOf(uint256 tokenId) view returns (address);
function registry() view returns (address);
function safeTransferFrom(address from, address to, uint256 tokenId);
function safeTransferFrom(address from, address to, uint256 tokenId, bytes data);
function setApprovalForAll(address operator, bool approved);
function symbol() view returns (string);
function title(uint256) view returns (string);
function tokenOfOwnerByIndex(address owner, uint256 index) view returns (uint256);
function totalMinted() view returns (uint256);
function transferFrom(address from, address to, uint256 tokenId);

event Approval(address indexed owner, address indexed spender, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

ModelMarketplace

function buy(uint256 tokenId) payable;
function cancel(uint256 tokenId);
function getListing(uint256 tokenId) view returns (bool listed, uint256 priceWei, address seller);
function getListingsPage(uint256 cursor, uint256 limit) view returns (uint256[] tokenIds, uint256[] prices, address[] sellers, uint256 nextCursor);
function list(uint256 tokenId, uint256 priceWei) payable;
function listingFeeWei() view returns (uint256);
function listings(uint256) view returns (bool listed, uint256 priceWei, address seller);
function nft() view returns (address);
function owner() view returns (address);
function setListingFeeWei(uint256 feeWei);
function transferOwnership(address newOwner);

event Bought(uint256 indexed tokenId, uint256 priceWei, address indexed seller, address indexed buyer);
event Cancelled(uint256 indexed tokenId);
event Listed(uint256 indexed tokenId, uint256 priceWei, address indexed seller);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

ForestRuntime

function predictAccessView(bytes32 modelId, bytes packedFeaturesQ, uint256 deadline, bytes sig) view returns (int256 scoreQ);
function predictClassAccessView(bytes32 modelId, bytes packedFeaturesQ, uint256 deadline, bytes sig) view returns (uint16 classIndex, int256 bestScoreQ);
function predictClassOwnerView(bytes32 modelId, bytes packedFeaturesQ, uint256 deadline, bytes signature) view returns (uint16 classIndex, int256 bestScoreQ);
function predictClassTx(bytes32 modelId, bytes packedFeaturesQ) payable returns (uint16 classIndex, int256 bestScoreQ);
function predictClassView(bytes32 modelId, bytes packedFeaturesQ) view returns (uint16 classIndex, int256 bestScoreQ);
function predictMultiAccessView(bytes32 modelId, bytes packedFeaturesQ, uint256 deadline, bytes sig) view returns (int256[] logitsQ);
function predictMultiOwnerView(bytes32 modelId, bytes packedFeaturesQ, uint256 deadline, bytes signature) view returns (int256[] logitsQ);
function predictMultiTx(bytes32 modelId, bytes packedFeaturesQ) payable returns (int256[] logitsQ);
function predictMultiView(bytes32 modelId, bytes packedFeaturesQ) view returns (int256[] logitsQ);
function predictOwnerView(bytes32 modelId, bytes packedFeaturesQ, uint256 deadline, bytes signature) view returns (int256 scoreQ);
function predictTx(bytes32 modelId, bytes packedFeaturesQ) payable returns (int256 scoreQ);
function predictView(bytes32 modelId, bytes packedFeaturesQ) view returns (int256 scoreQ);
function registry() view returns (address);

event Inference(bytes32 indexed modelId, address indexed caller, int256 scoreQ, uint256 valueWei);
event InferenceClass(bytes32 indexed modelId, address indexed caller, uint16 classIndex, int256 bestScoreQ, uint256 valueWei);
event InferenceMulti(bytes32 indexed modelId, address indexed caller, int256[] logitsQ, uint256 valueWei);

ModelRegistry: what GL1F Crypto adds

function BURN_ADDRESS() view returns (address);
function FEE_KIND_CREATION() view returns (uint8);
function FEE_KIND_SIZE() view returns (uint8);
function acceptOwnership();
function addLicenseWithSpdx(string name, string url, string spdx, uint8 openness) returns (uint32 id);
function addLicensesWithSpdx(string[] names, string[] urls, string[] spdxIds, uint8[] openness) returns (uint32 firstId);
function burnCount() view returns (uint256);
function burnFees() returns (uint256 amountWei);
function changeModelLicense(uint256 tokenId, uint32 newId);
function feeRecipientSetBy(bytes32) view returns (address);
function getLicenseInfo(uint32 id) view returns (string name, string url, string spdx, bool selectable, uint8 openness, uint32 supersedes);
function internalsVisibility(uint256) view returns (uint8);
function isLicenseSelectable(uint32 id) view returns (bool);
function licenseDisabled(uint32) view returns (bool);
function licenseIdBySpdx(string spdx) view returns (uint32);
function licenseOf(uint256 tokenId) view returns (uint32 id, string name, string url, string spdx, uint8 openness, uint64 sinceBlock);
function licenseOpenness(uint32) view returns (uint8);
function licenseSinceBlock(uint256) view returns (uint64);
function licenseSpdx(uint32) view returns (string);
function licenseSupersedes(uint32) view returns (uint32);
function mintedAt(uint256) view returns (uint64);
function ownerKeyHolder(bytes32, address) view returns (address);
function payoutAddressOf(uint256 tokenId) view returns (address);
function pendingBurnWei() view returns (uint256);
function pendingOwner() view returns (address);
function setInternalsVisibility(uint256 tokenId, uint8 visibility);
function setLicenseEnabled(uint32 id, bool enabled);
function setLicenseSupersedes(uint32 id, uint32 older);
function subscribedUntil(bytes32) view returns (uint64);
function totalBytesRegistered() view returns (uint256);
function totalCreationFeesWei() view returns (uint256);
function totalFeesBurnedWei() view returns (uint256);
function totalFeesCollectedWei() view returns (uint256);
function totalSizeFeesWei() view returns (uint256);

event FeesBurned(address indexed caller, uint256 amountWei, uint256 totalBurnedWei);
event FeesCollected(uint8 indexed kind, address indexed payer, uint256 amountWei);
event InternalsVisibilitySet(uint256 indexed tokenId, uint8 visibility);
event LicenseEnabledSet(uint32 indexed id, bool enabled);
event LicenseOpennessSet(uint32 indexed id, uint8 openness);
event LicenseSpdxSet(uint32 indexed id, string spdx);
event LicenseSupersedesSet(uint32 indexed id, uint32 indexed older);
event ModelLicenseChanged(uint256 indexed tokenId, uint32 indexed fromId, uint32 indexed toId);
event ModelLicensed(uint256 indexed tokenId, uint32 indexed licenseId);
event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);

ModelMarketplace: what GL1F Crypto adds

function BURN_ADDRESS() view returns (address);
function FEE_KIND_LISTING() view returns (uint8);
function acceptOwnership();
function burnCount() view returns (uint256);
function burnFees() returns (uint256 amountWei);
function pendingBurnWei() view returns (uint256);
function pendingOwner() view returns (address);
function totalFeesBurnedWei() view returns (uint256);
function totalFeesCollectedWei() view returns (uint256);
function totalListingFeesWei() view returns (uint256);

event FeesBurned(address indexed caller, uint256 amountWei, uint256 totalBurnedWei);
event FeesCollected(uint8 indexed kind, address indexed payer, uint256 amountWei);
event ListingFeeSet(uint256 feeWei);
event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);

WL1

function allowance(address owner, address spender) view returns (uint256);
function approve(address spender, uint256 amount) returns (bool);
function balanceOf(address account) view returns (uint256);
function decimals() view returns (uint8);
function deposit() payable;
function name() view returns (string);
function symbol() view returns (string);
function totalSupply() view returns (uint256);
function transfer(address to, uint256 amount) returns (bool);
function transferFrom(address from, address to, uint256 amount) returns (bool);
function withdraw(uint256 amount);

event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);

Standard interfaces

The subsets of ERC-20, ERC-721 and ERC-1155 the app uses for any token.

ERC20

function allowance(address owner, address spender) view returns (uint256);
function approve(address spender, uint256 amount) returns (bool);
function balanceOf(address account) view returns (uint256);
function decimals() view returns (uint8);
function name() view returns (string);
function symbol() view returns (string);
function totalSupply() view returns (uint256);
function transfer(address to, uint256 amount) returns (bool);
function transferFrom(address from, address to, uint256 amount) returns (bool);

event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);

ERC721

function approve(address to, uint256 tokenId);
function balanceOf(address owner) view returns (uint256);
function getApproved(uint256 tokenId) view returns (address);
function isApprovedForAll(address owner, address operator) view returns (bool);
function name() view returns (string);
function ownerOf(uint256 tokenId) view returns (address);
function safeTransferFrom(address from, address to, uint256 tokenId);
function setApprovalForAll(address operator, bool approved);
function supportsInterface(bytes4 interfaceId) view returns (bool);
function symbol() view returns (string);
function tokenURI(uint256 tokenId) view returns (string);
function transferFrom(address from, address to, uint256 tokenId);

event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

ERC1155

function balanceOf(address account, uint256 id) view returns (uint256);
function balanceOfBatch(address[] accounts, uint256[] ids) view returns (uint256[]);
function isApprovedForAll(address account, address operator) view returns (bool);
function safeBatchTransferFrom(address from, address to, uint256[] ids, uint256[] values, bytes data);
function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes data);
function setApprovalForAll(address operator, bool approved);
function supportsInterface(bytes4 interfaceId) view returns (bool);
function uri(uint256 id) view returns (string);

event ApprovalForAll(address indexed account, address indexed operator, bool approved);
event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values);
event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);