Smart Contracts (Testnet)

Module: track_and_trace
back to overview
track_and_trace
Methods: 6
Instances: 1
Initialization

Parameters
None
Errors
None
Event
{
  "Enum": [
    {
      "ItemCreated": {
        "itemId": "<UInt64>",
        "metadataURL": {
          "Enum": [
            {
              "None": []
            },
            {
              "Some": [
                {
                  "hash": {
                    "Enum": [
                      {
                        "None": []
                      },
                      {
                        "Some": [
                          "<String of size 64 containing lowercase hex characters.>"
                        ]
                      }
                    ]
                  },
                  "url": "<String>"
                }
              ]
            }
          ]
        }
      }
    },
    {
      "ItemStatusChanged": {
        "additionalData": {
          "bytes": [
            "<UInt8>"
          ]
        },
        "itemId": "<UInt64>",
        "newStatus": {
          "Enum": [
            {
              "Produced": []
            },
            {
              "InTransit": []
            },
            {
              "InStore": []
            },
            {
              "Sold": []
            }
          ]
        }
      }
    },
    {
      "GrantRole": {
        "address": {
          "Enum": [
            {
              "Account": [
                "<AccountAddress>"
              ]
            },
            {
              "Contract": [
                {
                  "index": "<UInt64>",
                  "subindex": "<UInt64>"
                }
              ]
            }
          ]
        },
        "role": {
          "Enum": [
            {
              "ADMIN": []
            },
            {
              "PRODUCER": []
            },
            {
              "TRANSPORTER": []
            },
            {
              "SELLER": []
            }
          ]
        }
      }
    },
    {
      "RevokeRole": {
        "address": {
          "Enum": [
            {
              "Account": [
                "<AccountAddress>"
              ]
            },
            {
              "Contract": [
                {
                  "index": "<UInt64>",
                  "subindex": "<UInt64>"
                }
              ]
            }
          ]
        },
        "role": {
          "Enum": [
            {
              "ADMIN": []
            },
            {
              "PRODUCER": []
            },
            {
              "TRANSPORTER": []
            },
            {
              "SELLER": []
            }
          ]
        }
      }
    }
  ]
}
Methods

Parameters
None
Errors
None
Return
{
  "items": [
    [
      "<UInt64>",
      {
        "metadata_url": {
          "Enum": [
            {
              "None": []
            },
            {
              "Some": [
                {
                  "hash": {
                    "Enum": [
                      {
                        "None": []
                      },
                      {
                        "Some": [
                          "<String of size 64 containing lowercase hex characters.>"
                        ]
                      }
                    ]
                  },
                  "url": "<String>"
                }
              ]
            }
          ]
        },
        "status": {
          "Enum": [
            {
              "Produced": []
            },
            {
              "InTransit": []
            },
            {
              "InStore": []
            },
            {
              "Sold": []
            }
          ]
        }
      }
    ]
  ],
  "next_item_id": "<UInt64>",
  "roles": [
    [
      {
        "Enum": [
          {
            "Account": [
              "<AccountAddress>"
            ]
          },
          {
            "Contract": [
              {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              }
            ]
          }
        ]
      },
      [
        {
          "Enum": [
            {
              "ADMIN": []
            },
            {
              "PRODUCER": []
            },
            {
              "TRANSPORTER": []
            },
            {
              "SELLER": []
            }
          ]
        }
      ]
    ]
  ]
}

Parameters
{
  "Enum": [
    {
      "None": []
    },
    {
      "Some": [
        {
          "hash": {
            "Enum": [
              {
                "None": []
              },
              {
                "Some": [
                  "<String of size 64 containing lowercase hex characters.>"
                ]
              }
            ]
          },
          "url": "<String>"
        }
      ]
    }
  ]
}
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "LogFull": []
    },
    {
      "LogMalformed": []
    },
    {
      "Unauthorized": []
    },
    {
      "RoleWasNotGranted": []
    },
    {
      "RoleWasAlreadyGranted": []
    },
    {
      "ItemAlreadyExists": []
    },
    {
      "ItemDoesNotExist": []
    },
    {
      "FinalState": []
    }
  ]
}
Return
None

Parameters
{
  "additional_data": {
    "bytes": [
      "<UInt8>"
    ]
  },
  "item_id": "<UInt64>",
  "new_status": {
    "Enum": [
      {
        "Produced": []
      },
      {
        "InTransit": []
      },
      {
        "InStore": []
      },
      {
        "Sold": []
      }
    ]
  }
}
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "LogFull": []
    },
    {
      "LogMalformed": []
    },
    {
      "Unauthorized": []
    },
    {
      "RoleWasNotGranted": []
    },
    {
      "RoleWasAlreadyGranted": []
    },
    {
      "ItemAlreadyExists": []
    },
    {
      "ItemDoesNotExist": []
    },
    {
      "FinalState": []
    }
  ]
}
Return
None

Parameters
{
  "additional_data": {
    "bytes": [
      "<UInt8>"
    ]
  },
  "item_id": "<UInt64>"
}
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "LogFull": []
    },
    {
      "LogMalformed": []
    },
    {
      "Unauthorized": []
    },
    {
      "RoleWasNotGranted": []
    },
    {
      "RoleWasAlreadyGranted": []
    },
    {
      "ItemAlreadyExists": []
    },
    {
      "ItemDoesNotExist": []
    },
    {
      "FinalState": []
    }
  ]
}
Return
None

Parameters
{
  "address": {
    "Enum": [
      {
        "Account": [
          "<AccountAddress>"
        ]
      },
      {
        "Contract": [
          {
            "index": "<UInt64>",
            "subindex": "<UInt64>"
          }
        ]
      }
    ]
  },
  "role": {
    "Enum": [
      {
        "ADMIN": []
      },
      {
        "PRODUCER": []
      },
      {
        "TRANSPORTER": []
      },
      {
        "SELLER": []
      }
    ]
  }
}
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "LogFull": []
    },
    {
      "LogMalformed": []
    },
    {
      "Unauthorized": []
    },
    {
      "RoleWasNotGranted": []
    },
    {
      "RoleWasAlreadyGranted": []
    },
    {
      "ItemAlreadyExists": []
    },
    {
      "ItemDoesNotExist": []
    },
    {
      "FinalState": []
    }
  ]
}
Return
None

Parameters
{
  "address": {
    "Enum": [
      {
        "Account": [
          "<AccountAddress>"
        ]
      },
      {
        "Contract": [
          {
            "index": "<UInt64>",
            "subindex": "<UInt64>"
          }
        ]
      }
    ]
  },
  "role": {
    "Enum": [
      {
        "ADMIN": []
      },
      {
        "PRODUCER": []
      },
      {
        "TRANSPORTER": []
      },
      {
        "SELLER": []
      }
    ]
  }
}
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "LogFull": []
    },
    {
      "LogMalformed": []
    },
    {
      "Unauthorized": []
    },
    {
      "RoleWasNotGranted": []
    },
    {
      "RoleWasAlreadyGranted": []
    },
    {
      "ItemAlreadyExists": []
    },
    {
      "ItemDoesNotExist": []
    },
    {
      "FinalState": []
    }
  ]
}
Return
None
Address
🗎<7854,0>


Release: 2024.12
Support CCDExplorer.io Uptime Backend Status CCDExplorer is supported by AesirX - Decentralized Consent & Data Ownership