> For the complete documentation index, see [llms.txt](https://ricardian.gitbook.io/ricardian-llc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ricardian.gitbook.io/ricardian-llc/how-does-ricardian-nft-contract-work.md).

# How does Ricardian NFT contract work? 🏭

> `contract RicardianLLC {`

The Ricardian LLC NFT is a [ERC-721-compatible](https://eips.ethereum.org/EIPS/eip-721) digital token. Each token is therefore "non-fungible" and identified by its unique `tokenId`, which further serves as the default name of seperately minted Ricardian LLC "series" per the Master LLC Agreement. In this manner, each separate company registration can be easily discovered and evidenced by using the standard ERC-721 interface, as such tokens automatically show up on NFT auction sites like [OpenSea](https://opensea.io/collection/ricardian-llc-series-v2) and [Rarible](https://app.rarible.com/collection/0x43b644a01d87025c9046f12ee4cdec7e04258ebf/collectibles), as well as consumer wallet apps like [Metamask](https://metamask.io/).

The Ricardian LLC NFT also has a set of *custom extensions* to support an open-ended legal framework and transactional efficiency:

**MULTI-MINT**

* The `mintLLC()` function calls a standard ERC-721 `mint()` and delivers a Ricardian NFT and related Series entry to the `to` address input (*e.g.,* a DAO address). Calling this function also helps evidence `msg.sender`'s assent and signature to the `masterOperatingAgreement()` legal data as provided in the Ricardian LLC agreements.
* `mintLLCbatch()` mints multiple Ricardian LLC NFTs in a single transaction. *For example: 18 parcels of digital land, 18 Ricardian LLC NFTS*
* Wallets provide an instant launchpad--specifically, a`msg.sender` can send ether without any other inputs to `0x43B644a01d87025c9046F12eE4cdeC7E04258eBf` to get back a Ricardian LLC NFT (this calls the fallback `receive()` ether function in the NFT contract).

**ERC20-COMPATIBLE**

* Ricardian NFTs include the [eip-20 `transfer()` format](https://eips.ethereum.org/EIPS/eip-20), allowing them to move through more wallets and smart contracts.

**TOKEN SALE**

* The holder of a Ricardian NFT can use `setSale()` to set a `buyer` address  and uint256 `price` in ether, which if met, transfers the referenced `tokenId`.  If the `buyer` is set to the [0 address](https://etherscan.io/address/0x0000000000000000000000000000000000000000), then this sale is made open to all. By default (upon mint and transfer), all Ricardian NFTs are *not on sale*, which is signified by the price being `0` (in other words, price must be positive >0 for an NFT to be "on sale").  Only an eligble buyer can call the `purchase()` function, and must include enough ether `msg.value` to succesfully complete the purchase.

**CUSTOMIZEABLE**

The boilerplate Ricardian LLC agreements embedded into the NFT contract provide a simple and standard legal template to govern this family of Series LLCs. The starter template can always be updated (but will be deferential to the Master LLC agreement):

* Users can opt for more customized Series agreements to manage their LLC by calling the owner-restricted `updateTokenDetails()`, or, for more advanced legal engineering, add more agreements to their on-chain LLC stack. For example, a DAO might add addendums to their LLC agreement as simple strings into this call, such as ("this addendum amends and replaces Section 6.1 of the template Ricardian Series Operating Agreement currently referenced in `masterOperatingAgreement()` with the language stored at \[IPFS HASH]").

**LEGAL-ENGINEERED GOVERNANCE**

* The `governance()` role represents the current DAO or other account managing the Ricardian LLC "master" that can call related admin functions (*i.e.*, those with `onlyGovernance` modifier) to keep stored terms and metadata up to snuff as well as help ensure compliance with the stored `masterOperatingAgreement()` terms and other applicable law. Such admin functions include:
  * *Operating Agreement Maintenance*. Ricardian LLCs import the legal templates and agreement terms stored in the `masterOperatingAgreement()` function. This legal data can be maintained and updated by Ricardian governance to keep the underlying legal framework that powers LLC formation in good order through calls to the `govUpdateSettings()` function (which allows an update to the governance account, the base URI default for Ricardian NFT mints, as well as the Master LLC agreement in one TX). &#x20;
  * *Governed token transfers.* Each Ricardian LLC NFT can be pulled and transferred among Ethereum accounts, either singly, through the call of the `govTransferFrom()` function, or in a batch, through `govTransferFromBatch()`. In this fashion, they can be understood as "slashable" NFTs. Among other benefits, the ability to effectively burn and "clear" a particular filing provides the incentive for reasonable public use of Ricardian LLC formation, opportunity to facilitate company "wind-downs," as well as the necessary governance function to ensure overall compliance with legal obligations associated with the Master LLC franchise. Further, there may simply be more mundane issues, such be cases where the `ownerOf()` a particular NFT or collection might lose their private key and request assistance with pulling their tokens to a recovery LLC address.
  * *Governed token metadata.* Each Ricardian LLC NFT or set of NFTs can have their `tokenURI` metadata amended through governance actions that call either the `govUpdateTokenURI()` or `govUpdateTokenURIbatch()` function, respectively. This might be done at the request of a Ricardian users to get a more customized metadata representation of their LLCs, or in cases of compliance, to help evidence wind-downs.

The Ricardian LLC NFT contract is deployed on Ethereum mainnet at [0x43B644a01d87025c9046F12eE4cdeC7E04258eBf](https://etherscan.io/address/0x43b644a01d87025c9046f12ee4cdec7e04258ebf#code), and is further identified by the [Ethereum Name Service (ENS)](https://docs.ens.domains/) domain `ricardianllc.eth`. The governance role is identified by the sub-domain, `dao.ricardianllc.eth`. Initially, a 2-4 Gnosis safe among LexDAO engineers has deployed to manage Ricardian (as "LexDAO LLC, Ricardian Series"), which can be reviewed at the following [Gnosis app](https://gnosis-safe.io/app/#/safes/0x1427354Cda3e65cb57791115B67a171FA7bb97c7/balances).
