> For the complete documentation index, see [llms.txt](https://agnostico.gitbook.io/agnostico/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://agnostico.gitbook.io/agnostico/how-it-works/sharing-your-code-on-agnostico.md).

# Sharing Your Code On Agnostico

## Steps To Share Your Code

### Prerequisites

* A Github Account (Create one if you don't already have one, you can click [here](https://github.com/signup).)
* Basic to Advanced knowledge of solidity (agnostico currently supports only [solidity](https://docs.soliditylang.org/).)
* Basic knowledge of [IPFS](https://ipfs.io/)
* A non-custodial wallet browser extension. [Metamask](https://metamask.io/) recommended.

### 1. Authentication

a. Click on the Share navigation button on the top of the page as shown below

![](/files/FkmYs8OtEREvGd7ZItTJ)

b. Click on the github signin button. You will be redirected to github to sign in

![](/files/zE9HSWcrrP3QWvtrYMzo)

### 2. Add Code To Share

Agnostico uses [(IPFS)](https://ipfs.io/). This is to provide transparency and consistent availability. The content of the file is used to mint NFT to the creatorAddress address in the field specified

![](/files/L7EAxiZyOPa9QwTKUFkQ)

Two documents are required to share your code: The first is the contract code file itself; the other one is Agnostico Document Standard or “AgnoDoc”! However, both documents have strict rules for them to work on the platform after you share them. Let's explore both documents below:

* Contract

  Uploading your contract file from the platform is optional, the essence is to get the Content IDentifier (CID) of the file uploaded.

  * Must be a .sol file
  * Must be able to compile in solidity ^0.8.0.
  * Must not accept dynamic values from the constructor (Agnostico doesn't currently support upgradable contracts)
* AgnoDoc

  This Document must be uploaded on the platform, its CID will be used in the Agnostico's contract.

  * Must be a .json file
  * Must have the following fields:
    * name: The name you want to give the code you are sharing, make it descriptive and short
    * contractName: This is the name of the contract to be deployed when requested. If your contract looks like `contract MyAwesomeContract is Context, Ownable {...}` , Your targetContract is MyAwesomeContract.
    * creatorAdddres: This is the address of the contract creator. It is also where payment will be sent for each deployment of submitted contract
    * categories: A list of key words that relates to the contract being shared.
    * external\_url: Repo where other users can find the soidity file.
    * description: A short, description of the code being shared. What it does, etc.
    * image: The CID of the solidity contract file. It should look like this “QmXEdvbMdpMP3Pun...”.
    * deploymentVariables: If your contract uses varaibles in its constructor, provide them here as an array of objects with the following properties:
      * name: The name of the argument e.g tokenName, duration
      * dataType: The type of the argument e.g string, uint256
    * category: An array of strings describing the catgories of code, e.g token, erc20, timelock

![](/files/dpgQRYO8ItJX3mHsYOGp)

Option 2: Fill in the form

Toggle the switch button and enter all the required information and click on the “

![](/files/OQobHqSP250iSQ2VjBqc)

![](/files/aBPpzzTOCgO26FTRRlhA)

### 3. Add AgnoDoc To Agnostico Factory Contract

Once you click on continue, if you haven't connected your metamask wallet from before now, you will be prompted to do so. The IPFS CID for your AgnoDoc is hashed to bytes32 and stored in the smart contract for future reference.

![](/files/RSDkuyJzSOnnjLeHWTcL)

![](/files/ffqlQd4ZnBkrTAC5nRxm)

![](/files/qR5nptLBp9xQ9PXSXBmG)

Congratulations if you have successfully followed up till this stage, you are officially a code provider on Agnostico. Others can now deploy your code.

Should you decide to withdraw your code from our smart contract, you can interact with the factory at the following addresses:


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://agnostico.gitbook.io/agnostico/how-it-works/sharing-your-code-on-agnostico.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
