Craftware Docs
  • What is Craftware?
    • Game Samples using Craftware
  • ❗Getting Started
  • SDKs
    • Unity3D SDK Guide
    • Golang SDK Guide
  • Blockchain Elements
    • Smart Contracts
    • ICraftableIn Library
  • 🎮Game Content
    • Game Assets
      • Resources
        • Create a resource
        • Retrieve Resources in Game
      • Currencies
      • Items
      • Properties
      • Export Assets Data
      • Import Assets Data
    • Crafting
      • Crafting Rule
  • 🤝Onchain Interoperability
    • Authentication
      • Wallet Binding
      • Wallet Session Authentication
      • Setting Up Wallet Authentication
    • Ports Protocol
      • Export Protocol
      • Import Protocol
    • Backward Compatibility
    • Crafting Protocol
      • Craftable Token
        • Definition Metadata
        • Craftable Input Token
        • Craftable Output Token
      • Crafting Rule Contract
        • Definition Metadata
      • Crafting Rule No-code Designer
  • ⚙️Admin
    • Account Settings
      • Account
      • Users
      • API Keys
      • Plan
      • Config
    • Security
    • Terms of Service
    • Privacy Policy
Powered by GitBook
On this page

Was this helpful?

  1. Onchain Interoperability
  2. Crafting Protocol
  3. Crafting Rule Contract

Definition Metadata

The definition of the crafting rule

The crafting rule definition is optional.

The metadata for the crafting rule is simple. An example is shown here:

{
    "name": "My First Crafting Rule", 
    "inputs": [
        {
            "address": "0x123...",  // the address of the `clothes.sol` contract
            "class": 1,             // the first class in the contract. 'Pants'
        },
        ...
    ],
    "outputs": [
        {
            "address": "0x123...",  // output address of first output
            "class": 2,             // the class of the first output
        },
        ...
    ]
}
PreviousCrafting Rule ContractNextCrafting Rule No-code Designer

Last updated 1 year ago

Was this helpful?

🤝