.. _smart-contracts: Smart Contracts =============== .. contents:: :local: .. _sc-registry-store: Store Registry -------------- The Store Registry is an extension of `EIP721 `_. Therefore each registerd store is an NFT and the contract comes with the accompanied functions, like ``mint``, ``ownerOf``, ``transferFrom`` and ``approve``. User Invitation ^^^^^^^^^^^^^^^ The user-facing way to add people to the store is through the use of an invitation (See :ref:`adding-clerks`). The contract offers these functions: - :sol:func:`publishInviteVerifier` - :sol:func:`redeemInvite` .. _sc-store-config: Store Configuration ^^^^^^^^^^^^^^^^^^^ To add and remove :term:`Relays` from your :term:`Store` the contract offers these functions: - :sol:func:`getAllRelays` - :sol:func:`addRelay` - :sol:func:`replaceRelay` - :sol:func:`removeRelay` Manual User Managment ^^^^^^^^^^^^^^^^^^^^^ To manually add or remove Users, Admins can call these functions: - :sol:func:`registerUser` - :sol:func:`removeUser` Full Contract Listing ^^^^^^^^^^^^^^^^^^^^^ .. autosolcontract:: StoreReg :members: mint, publishInviteVerifier, redeemInvite, getAllRelays, addRelay, replaceRelay, removeRelay, updateRootHash, hasAtLeastAccess, registerUser, removeUser :exclude-members: xxxxxxxxx .. _sc-registry-relay: Relay Registry -------------- Just like the Store Registry, the Relay Registry is an extension of `EIP721 `_. .. autosolcontract:: RelayReg :members: :exclude-members: __init__ .. _sc-payment-factory: Payment Factory --------------- First iteration, using counterfactual instantiation via ``CREATE2``. .. autosolcontract:: PaymentFactory :members: :exclude-members: getBytecode, batch Payments *v2* ------------- Next iteration, using a single contract for all payments. Will support attestations and refunds. .. autosolinterface:: IPayments :members: :exclude-members: xxxxxxx