# Quick Start

## Clone Marble :arrow\_down:&#x20;

```
git clone https://github.com/Dappetizer/marble-standard.git
```

## Setup Project :computer:&#x20;

Navigate to the freshly cloned project directory: `marble-digital-items/`

```
mkdir build && mkdir build/marble

chmod +x build.sh && chmod +x deploy.sh
```

## Build the Contract :hammer:&#x20;

The included build script will attempt to compile the Marble contract.

```
./build.sh marble
```

{% hint style="info" %}
Ensure you have EOSIO CDT 1.6 or greater installed and included in your path.&#x20;
{% endhint %}

After a successful build, the generated WASM and ABI files will be placed in the `build/marble` folder. The deploy script will read these artifacts during deployment.

## Deploy To Network :cloud:&#x20;

Deploy the built Marble contract to the given `account` and `network`.&#x20;

{% hint style="info" %}
In the commands below, replace the variables in curly braces with the appropriate values for your use case. Variables separated by bars require a selection, meaning choose one of the choices.
{% endhint %}

By default the mainnet and testnet endpoints are for the [Telos Blockchain Network](https://telos.net), but switching to a different EOSIO chain is as easy as replacing the default endpoints in the deploy script with ones from the desired network. The local network defaults to port 8888 on localhost (the default nodeos port).

```
./deploy.sh marble {account} { mainnet | testnet | local }
```

## Initialize the Contract :page\_facing\_up:&#x20;

The first action called on any Marble contract should be the `init()` action. This will set the initial contract version and initial admin in the `config` table. The admin is the only account that is authorized to create new groups.

```
cleos push action {account} init '[ "Marble", "v1.2.0", {account} ]' -p {account}
```

## Create a Group :busts\_in\_silhouette:&#x20;

Groups are collections of items that all share like behaviors. A single Marble contract can have any number of groups.

Group Examples: `cards`, `monsters`, `dragons`, `players`

```
cleos push action {account} newgroup '[ ... ]' -p {account}
```

## Mint an Item :blue\_circle:&#x20;

New digital items can now be created within the group. Every Marble item belongs to one and only one group.

```
cleos push action {account} mintitem '[ ... ]' -p {account}
```

## Assign Item Properties :gem:&#x20;

Every Marble item can be customized by assigning properties to it. For the full list of available property types see the Marble Layers section of the documentation.

For example, give an item a title by simply assigning it a new Tag:

```
cleos push action {account} newtag '[ 1, "title", "Fluffy Cow", null, null ]' -p {account}
```

Or give it an item level with an Attribute:

```
cleos push action {account} newattribute '[ 1, "itemlevel", 5 ]' -p {account}
```

Or give it a creation timestamp with an Event:

```
cleos push action {account} newevent '[ 1, "createtime", null ]' -p {account}
```

Or back it with fungible tokens using a Bond:

```
cleos push action {account} newbond '[ 1, "5.0000 TLOS" ]' -p {account}
```


---

# Agent Instructions: 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:

```
GET https://craig-branscom.gitbook.io/marble-docs/contract-standard/quick-start.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
