Quick Start

Follow the steps below to quickly set up your own Marble Contract

1. Clone Marble

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

2. Setup Project 💻

Navigate to the freshly cloned project directory: marble-standard/

mkdir build && mkdir build/marble
chmod +x build.sh
chmod +x deploy.sh

3. Build the Contract 🔨

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

./build.sh marble

Ensure you have EOSIO CDT 1.6 or greater installed and included in your path.

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.

4. Deploy To Network

Deploy the built Marble contract to the given account and network.

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.

By default the mainnet and testnet endpoints are for the Telos Blockchain Network, 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 }

5. Initialize the Contract 📄

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 tokenconfigs singleton. The admin is the only account that is authorized to create new groups.

To get the latest Marble version, check either the Marble GitHub or the marble.hpp file header.

cleos push action {account} init '[ "v0.4.0", {account} ]' -p {account}

6. Create a Group 👥

Groups are collections of NFT's that all share like behaviors. NFT's can only belong to a single group at a time, and not all NFT's in a group will have sequential serial numbers.

Group Examples: cards, pokemon, dragons, players

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

7. Make an NFT 🔵

Once a group has been created, NFTs can be minted by the group manager.

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