Skip to main content

Part 1: Create the smart contract

On this first section, you will:

  • Create the game smart contract importing an existing LIGO library
  • Deploy your smart contract to the Ghostnet
  • Get the Shifumi Git repository folders to copy the game UI and CSS for the second party

Smart contract

  1. Clone the repository and start a new Taqueria project:

    git clone
    taq init shifumi
    cd shifumi
    taq install @taqueria/plugin-ligo
  2. Download the LIGO Shifumi template, and copy the files to Taqueria contracts folder:

    TAQ_LIGO_IMAGE=ligolang/ligo:1.2.0 taq ligo --command "init contract --template shifumi-jsligo shifumiTemplate"
    cp -r shifumiTemplate/src/* contracts/
  3. Compile the contract. It creates the default required file main.storageList.jsligo:

    TAQ_LIGO_IMAGE=ligolang/ligo:1.2.0 taq compile main.jsligo
  4. Edit main.storageList.jsligo initial storage and save it:

    #import "main.jsligo" "Contract"

    const default_storage: = {
    metadata: Big_map.literal(
    ["", bytes `tezos-storage:contents`],
    "name": "Shifumi Example",
    "description": "An Example Shifumi Contract",
    "version": "beta",
    "license": {
    "name": "MIT"
    "authors": [
    "smart-chain <>"
    "homepage": "",
    "source": {
    "tools": "jsligo",
    "location": ""
    "interfaces": [
    ) as big_map<string, bytes>,
    next_session: 0 as nat,
    sessions: Map.empty as map<nat, Contract.Session.t>,
  5. Compile again:

    TAQ_LIGO_IMAGE=ligolang/ligo:1.2.0 taq compile main.jsligo
  6. Deploy to Ghostnet:

    taq install @taqueria/plugin-taquito
    taq deploy -e "testing"

    Note: If this is your first time using Taqueria, look at this training first:

    For advanced users, just go to .taq/config.local.testing.json , replace account with alice settings and then redeploy

    "networkName": "ghostnet",
    "accounts": {
    "taqOperatorAccount": {
    "publicKey": "edpkvGfYw3LyB1UcCahKQk4rF2tvbMUk8GFiTuMjL75uGXrpvKXhjn",
    "publicKeyHash": "tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb",
    "privateKey": "edsk3QoqBuvdamxouPhin7swCvkQNgq4jP5KZPbwWNnwdZpSpJiEbq"

    Your smart contract is ready on Ghostnet!

    │ Contract │ Address │ Alias │
    │ │ KT1QjiZcAq63yVSCkfAr9zcFvmKBhQ7nVSWd │ main │


That's all for the smart contract. On the next section, you will create the mobile application and connect to your smart contract

When you are ready, continue to Part 2: Create an Ionic mobile application.