Jungle 4 (Testnet)

contract1.gm

Contract

{
  "version": "eosio::abi/1.2",
  "types": [],
  "structs": [
    {
      "name": "balance_row",
      "base": "",
      "fields": [
        {
          "name": "token_contract",
          "type": "name"
        },
        {
          "name": "balance",
          "type": "asset"
        }
      ]
    },
    {
      "name": "cleartable",
      "base": "",
      "fields": [
        {
          "name": "table_name",
          "type": "name"
        },
        {
          "name": "scope",
          "type": "name?"
        },
        {
          "name": "max_rows",
          "type": "uint64?"
        }
      ]
    },
    {
      "name": "close",
      "base": "",
      "fields": [
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "token_contract",
          "type": "name"
        },
        {
          "name": "token_symbol",
          "type": "symbol"
        }
      ]
    },
    {
      "name": "company_row",
      "base": "",
      "fields": [
        {
          "name": "account",
          "type": "name"
        },
        {
          "name": "name",
          "type": "string"
        }
      ]
    },
    {
      "name": "debitdeposit",
      "base": "",
      "fields": [
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "token",
          "type": "name"
        },
        {
          "name": "locked",
          "type": "asset"
        },
        {
          "name": "fee_account",
          "type": "name"
        },
        {
          "name": "fee",
          "type": "asset"
        }
      ]
    },
    {
      "name": "depositcfg_row",
      "base": "",
      "fields": [
        {
          "name": "token_contract",
          "type": "name"
        },
        {
          "name": "token_symbol",
          "type": "symbol"
        }
      ]
    },
    {
      "name": "enable",
      "base": "",
      "fields": [
        {
          "name": "enabled",
          "type": "bool"
        }
      ]
    },
    {
      "name": "enablegame",
      "base": "",
      "fields": [
        {
          "name": "contract",
          "type": "name"
        },
        {
          "name": "enabled",
          "type": "bool"
        }
      ]
    },
    {
      "name": "foundcompany",
      "base": "",
      "fields": [
        {
          "name": "account",
          "type": "name"
        },
        {
          "name": "name",
          "type": "string"
        }
      ]
    },
    {
      "name": "game_config",
      "base": "",
      "fields": [
        {
          "name": "seed",
          "type": "checksum256"
        },
        {
          "name": "epochtime",
          "type": "uint32"
        },
        {
          "name": "start",
          "type": "time_point_sec"
        },
        {
          "name": "end",
          "type": "time_point_sec"
        }
      ]
    },
    {
      "name": "game_meta",
      "base": "",
      "fields": [
        {
          "name": "name",
          "type": "string"
        },
        {
          "name": "description",
          "type": "string"
        },
        {
          "name": "url",
          "type": "string"
        },
        {
          "name": "version",
          "type": "string"
        }
      ]
    },
    {
      "name": "game_row",
      "base": "",
      "fields": [
        {
          "name": "contract",
          "type": "name"
        },
        {
          "name": "config",
          "type": "game_config"
        },
        {
          "name": "meta",
          "type": "game_meta"
        },
        {
          "name": "state",
          "type": "game_state"
        }
      ]
    },
    {
      "name": "game_state",
      "base": "",
      "fields": [
        {
          "name": "enabled",
          "type": "bool"
        }
      ]
    },
    {
      "name": "open",
      "base": "",
      "fields": [
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "token_contract",
          "type": "name"
        },
        {
          "name": "token_symbol",
          "type": "symbol"
        }
      ]
    },
    {
      "name": "setepochtime",
      "base": "",
      "fields": [
        {
          "name": "contract",
          "type": "name"
        },
        {
          "name": "epochtime",
          "type": "uint32"
        }
      ]
    },
    {
      "name": "settoken",
      "base": "",
      "fields": [
        {
          "name": "token_contract",
          "type": "name"
        },
        {
          "name": "token_symbol",
          "type": "symbol"
        }
      ]
    },
    {
      "name": "startgame",
      "base": "",
      "fields": [
        {
          "name": "contract",
          "type": "name"
        },
        {
          "name": "config",
          "type": "game_config"
        },
        {
          "name": "meta",
          "type": "game_meta"
        },
        {
          "name": "state",
          "type": "game_state"
        }
      ]
    },
    {
      "name": "state_row",
      "base": "",
      "fields": [
        {
          "name": "enabled",
          "type": "bool"
        }
      ]
    },
    {
      "name": "unwrapcargo",
      "base": "",
      "fields": [
        {
          "name": "game",
          "type": "name"
        },
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "asset_id",
          "type": "uint64"
        }
      ]
    },
    {
      "name": "unwrapcust_row",
      "base": "",
      "fields": [
        {
          "name": "asset_id",
          "type": "uint64"
        },
        {
          "name": "owner",
          "type": "name"
        }
      ]
    },
    {
      "name": "unwrapentity",
      "base": "",
      "fields": [
        {
          "name": "game",
          "type": "name"
        },
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "asset_id",
          "type": "uint64"
        }
      ]
    },
    {
      "name": "updategame",
      "base": "",
      "fields": [
        {
          "name": "contract",
          "type": "name"
        },
        {
          "name": "meta",
          "type": "game_meta"
        }
      ]
    },
    {
      "name": "wipe",
      "base": "",
      "fields": []
    },
    {
      "name": "withdraw",
      "base": "",
      "fields": [
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "quantity",
          "type": "extended_asset"
        },
        {
          "name": "memo",
          "type": "string"
        }
      ]
    },
    {
      "name": "wrapcargo",
      "base": "",
      "fields": [
        {
          "name": "game",
          "type": "name"
        },
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "entity_id",
          "type": "uint64"
        },
        {
          "name": "nexus_id",
          "type": "uint64"
        },
        {
          "name": "cargo_id",
          "type": "uint64"
        },
        {
          "name": "quantity",
          "type": "uint64"
        }
      ]
    },
    {
      "name": "wrapentity",
      "base": "",
      "fields": [
        {
          "name": "game",
          "type": "name"
        },
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "entity_id",
          "type": "uint64"
        },
        {
          "name": "nexus_id",
          "type": "uint64"
        }
      ]
    },
    {
      "name": "wrapgate_row",
      "base": "",
      "fields": [
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "last_asset_id",
          "type": "uint64"
        }
      ]
    }
  ],
  "actions": [
    {
      "name": "cleartable",
      "type": "cleartable",
      "ricardian_contract": "---\n\nspec_version: \"0.2.0\"\ntitle: cleartable\nsummary: 'DEBUG: cleartable action'\nicon: https://avatars.githubusercontent.com/u/147292861?s=400&u=3b1af66e90dd851f4d7c096ed6a2fbb4b9e190da\n\n---"
    },
    {
      "name": "close",
      "type": "close",
      "ricardian_contract": "---\n\nspec_version: \"0.2.0\"\ntitle: close\nsummary: 'Close a deposit balance row'\nicon: https://avatars.githubusercontent.com/u/158113782#d3bf290fddeddbb7d32aa897e9f7e9e13a2ae44956142e23eb47b77096a2ea8d\n\n---\n\nClose the owner's deposit balance row for the given token and free its RAM. The balance must be zero before closing. Requires the owner's authority."
    },
    {
      "name": "debitdeposit",
      "type": "debitdeposit",
      "ricardian_contract": "---\n\nspec_version: \"0.2.0\"\ntitle: debitdeposit\nsummary: 'Debit a deposit balance for a wrap operation'\nicon: https://avatars.githubusercontent.com/u/158113782#d3bf290fddeddbb7d32aa897e9f7e9e13a2ae44956142e23eb47b77096a2ea8d\n\n---\n\nInternal action called inline by a registered, enabled game contract only. Debits the owner's deposit balance by the locked amount plus the fee, and credits the fee to the configured fee account. Used by a game's wrap flow to collect the wrap cost. Cannot be called directly by players or unregistered accounts."
    },
    {
      "name": "enable",
      "type": "enable",
      "ricardian_contract": "---\n\nspec_version: \"0.2.0\"\ntitle: enable\nsummary: 'Enable/disable platform'\nicon: https://avatars.githubusercontent.com/u/158113782#d3bf290fddeddbb7d32aa897e9f7e9e13a2ae44956142e23eb47b77096a2ea8d\n\n---\n\nEnable or disable the platform contract."
    },
    {
      "name": "enablegame",
      "type": "enablegame",
      "ricardian_contract": "---\n\nspec_version: \"0.2.0\"\ntitle: enablegame\nsummary: 'Enable/disbable a game'\nicon: https://avatars.githubusercontent.com/u/158113782#d3bf290fddeddbb7d32aa897e9f7e9e13a2ae44956142e23eb47b77096a2ea8d\n\n---\n\nEnable or disable the specified game contract."
    },
    {
      "name": "foundcompany",
      "type": "foundcompany",
      "ricardian_contract": "---\n\nspec_version: \"0.2.0\"\ntitle: foundcompany\nsummary: 'Found a new company'\nicon: https://avatars.githubusercontent.com/u/158113782#d3bf290fddeddbb7d32aa897e9f7e9e13a2ae44956142e23eb47b77096a2ea8d\n\n---\n\nFound a new company in the Shipload platform contract."
    },
    {
      "name": "open",
      "type": "open",
      "ricardian_contract": "---\n\nspec_version: \"0.2.0\"\ntitle: open\nsummary: 'Open a deposit balance row'\nicon: https://avatars.githubusercontent.com/u/158113782#d3bf290fddeddbb7d32aa897e9f7e9e13a2ae44956142e23eb47b77096a2ea8d\n\n---\n\nOpen a zero-balance deposit row for the given owner and token, with RAM paid by the owner. Has no effect if the row already exists. Must be called before the owner can receive token deposits or wrap refunds."
    },
    {
      "name": "setepochtime",
      "type": "setepochtime",
      "ricardian_contract": "---\n\nspec_version: \"0.2.0\"\ntitle: setepochtime\nsummary: 'DEBUG: override a game''s epoch time'\nicon: https://avatars.githubusercontent.com/u/147292861?s=400&u=3b1af66e90dd851f4d7c096ed6a2fbb4b9e190da\n\n---\n\nOverride the epoch duration in the configuration of the specified game contract. Requires platform contract authority."
    },
    {
      "name": "settoken",
      "type": "settoken",
      "ricardian_contract": "---\n\nspec_version: \"0.2.0\"\ntitle: settoken\nsummary: 'Set the accepted deposit token'\nicon: https://avatars.githubusercontent.com/u/158113782#d3bf290fddeddbb7d32aa897e9f7e9e13a2ae44956142e23eb47b77096a2ea8d\n\n---\n\nAdmin action that sets the accepted deposit token (contract account and symbol) for the platform. All player deposits and wrap costs are denominated in this token. Requires platform contract authority."
    },
    {
      "name": "startgame",
      "type": "startgame",
      "ricardian_contract": "---\n\nspec_version: \"0.2.0\"\ntitle: startgame\nsummary: 'Start a new game'\nicon: https://avatars.githubusercontent.com/u/158113782#d3bf290fddeddbb7d32aa897e9f7e9e13a2ae44956142e23eb47b77096a2ea8d\n\n---\n\nStart a new game of Shipload deployed to a new contract."
    },
    {
      "name": "unwrapcargo",
      "type": "unwrapcargo",
      "ricardian_contract": "---\n\nspec_version: \"0.2.0\"\ntitle: unwrapcargo\nsummary: 'Deposit an NFT into a host entity'\nicon: https://avatars.githubusercontent.com/u/147292861?s=400&u=3b1af66e90dd851f4d7c096ed6a2fbb4b9e190da\n\n---\n\nDeposit an AtomicAssets NFT into a host entity's cargo. Pairs with an atomicassets::transfer carrying the 'unwrap' memo in the same transaction. The caller must own the host, the host must have loaders, and the host must have capacity headroom for the unwrapped mass. Schedules a TASK_UNWRAP on the host that, on resolution, places the decoded item into the host's cargo and burns the NFT."
    },
    {
      "name": "unwrapentity",
      "type": "unwrapentity",
      "ricardian_contract": "---\n\nspec_version: \"0.2.0\"\ntitle: unwrapentity\nsummary: 'Deploy an entity NFT directly to a nexus'\nicon: https://avatars.githubusercontent.com/u/147292861?s=400&u=3b1af66e90dd851f4d7c096ed6a2fbb4b9e190da\n\n---\n\nDeploy a packed-entity AtomicAssets NFT (orbital vessel: ship or container) directly as a live entity. Pairs with an atomicassets::transfer carrying the 'deploy' memo in the same transaction. The NFT is burned, a new entity row is emplaced at the NFT's wrap origin paid by the owner, and TASK_TRAVEL plus TASK_RECHARGE are queued to deliver the entity to the target nexus and bring it to full energy."
    },
    {
      "name": "updategame",
      "type": "updategame",
      "ricardian_contract": "---\n\nspec_version: \"0.2.0\"\ntitle: updategame\nsummary: 'Update game information'\nicon: https://avatars.githubusercontent.com/u/158113782#d3bf290fddeddbb7d32aa897e9f7e9e13a2ae44956142e23eb47b77096a2ea8d\n\n---\n\nUpdate the information about the specified game contract.\n\n---"
    },
    {
      "name": "wipe",
      "type": "wipe",
      "ricardian_contract": "---\n\nspec_version: \"0.2.0\"\ntitle: wipe\nsummary: 'DEBUG: wipe action'\nicon: https://avatars.githubusercontent.com/u/147292861?s=400&u=3b1af66e90dd851f4d7c096ed6a2fbb4b9e190da\n\n---"
    },
    {
      "name": "withdraw",
      "type": "withdraw",
      "ricardian_contract": "---\n\nspec_version: \"0.2.0\"\ntitle: withdraw\nsummary: 'Withdraw tokens from a deposit balance'\nicon: https://avatars.githubusercontent.com/u/158113782#d3bf290fddeddbb7d32aa897e9f7e9e13a2ae44956142e23eb47b77096a2ea8d\n\n---\n\nWithdraw tokens from the owner's deposit balance. Debits the ledger by the requested amount and transfers the tokens to the owner. Requires a sufficient balance and the owner's authority."
    },
    {
      "name": "wrapcargo",
      "type": "wrapcargo",
      "ricardian_contract": ""
    },
    {
      "name": "wrapentity",
      "type": "wrapentity",
      "ricardian_contract": "---\n\nspec_version: \"0.2.0\"\ntitle: wrapentity\nsummary: 'Wrap a deployed entity into an NFT'\nicon: https://avatars.githubusercontent.com/u/147292861?s=400&u=3b1af66e90dd851f4d7c096ed6a2fbb4b9e190da\n\n---\n\nWrap an entity into an AtomicAssets NFT minted to its owner. The entity must be at a nexus, idle with empty cargo, and have an nftconfig mapping for its item id. Erases the entity and mints the NFT inline, preserving its stats and installed modules; the player pays RAM for the new asset row. Requires the owner's active permission (no session-key compatibility)."
    }
  ],
  "tables": [
    {
      "name": "balance",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "balance_row"
    },
    {
      "name": "company",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "company_row"
    },
    {
      "name": "depositcfg",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "depositcfg_row"
    },
    {
      "name": "games",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "game_row"
    },
    {
      "name": "state",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "state_row"
    },
    {
      "name": "unwrapcust",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "unwrapcust_row"
    },
    {
      "name": "wrapgate",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "wrapgate_row"
    }
  ],
  "ricardian_clauses": [
    {
      "id": "Shipload (Platform)",
      "body": "Shipload (Platform)"
    }
  ],
  "error_messages": [],
  "abi_extensions": [],
  "variants": [],
  "action_results": []
}