Smart Contracts (Testnet)

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

Parameters
[
  {
    "authorized_account": "<AccountAddress>",
    "from": {
      "Enum": [
        {
          "Produced": []
        },
        {
          "InTransit": []
        },
        {
          "InStore": []
        },
        {
          "Sold": []
        }
      ]
    },
    "to": [
      {
        "Enum": [
          {
            "Produced": []
          },
          {
            "InTransit": []
          },
          {
            "InStore": []
          },
          {
            "Sold": []
          }
        ]
      }
    ]
  }
]
Errors
None
Event
{
  "Enum": [
    {
      "GrantRole": [
        {
          "address": {
            "Enum": [
              {
                "Account": [
                  "<AccountAddress>"
                ]
              },
              {
                "Contract": [
                  {
                    "index": "<UInt64>",
                    "subindex": "<UInt64>"
                  }
                ]
              }
            ]
          },
          "role": {
            "Enum": [
              {
                "Admin": []
              }
            ]
          }
        }
      ]
    },
    {
      "RevokeRole": [
        {
          "address": {
            "Enum": [
              {
                "Account": [
                  "<AccountAddress>"
                ]
              },
              {
                "Contract": [
                  {
                    "index": "<UInt64>",
                    "subindex": "<UInt64>"
                  }
                ]
              }
            ]
          },
          "role": {
            "Enum": [
              {
                "Admin": []
              }
            ]
          }
        }
      ]
    },
    {
      "ItemStatusChanged": [
        {
          "additional_data": {
            "bytes": [
              "<UInt8>"
            ]
          },
          "item_id": "<String with lowercase hex>",
          "new_status": {
            "Enum": [
              {
                "Produced": []
              },
              {
                "InTransit": []
              },
              {
                "InStore": []
              },
              {
                "Sold": []
              }
            ]
          }
        }
      ]
    },
    {
      "ItemCreated": [
        {
          "initial_status": {
            "Enum": [
              {
                "Produced": []
              },
              {
                "InTransit": []
              },
              {
                "InStore": []
              },
              {
                "Sold": []
              }
            ]
          },
          "item_id": "<String with lowercase hex>",
          "metadata_url": {
            "Enum": [
              {
                "None": []
              },
              {
                "Some": [
                  {
                    "hash": {
                      "Enum": [
                        {
                          "None": []
                        },
                        {
                          "Some": [
                            "<String of size 64 containing lowercase hex characters.>"
                          ]
                        }
                      ]
                    },
                    "url": "<String>"
                  }
                ]
              }
            ]
          }
        }
      ]
    },
    {
      "Nonce": [
        {
          "account": "<AccountAddress>",
          "nonce": "<UInt64>"
        }
      ]
    }
  ]
}
Methods

Parameters
{
  "additional_data": {
    "bytes": [
      "<UInt8>"
    ]
  },
  "item_id": "<String with lowercase hex>",
  "new_status": {
    "Enum": [
      {
        "Produced": []
      },
      {
        "InTransit": []
      },
      {
        "InStore": []
      },
      {
        "Sold": []
      }
    ]
  }
}
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "LogFull": []
    },
    {
      "LogMalformed": []
    },
    {
      "Unauthorized": []
    },
    {
      "ItemAlreadyExists": []
    },
    {
      "ItemDoesNotExist": []
    },
    {
      "FinalState": []
    },
    {
      "NoContract": []
    },
    {
      "MissingAccount": []
    },
    {
      "MalformedData": []
    },
    {
      "WrongSignature": []
    },
    {
      "NonceMismatch": []
    },
    {
      "WrongContract": []
    },
    {
      "WrongEntryPoint": []
    },
    {
      "Expired": []
    },
    {
      "Unsuccessful": []
    }
  ]
}
Return
None
Address
🗎<9553,0>


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