Smart Contracts (Testnet)

Module: track_and_trace
back to overview
track_and_trace
Methods: 7
Instances: 9
Initialization

Parameters
[
  {
    "authorized_account": "<AccountAddress>",
    "from": {
      "Enum": [
        {
          "Produced": []
        },
        {
          "InTransit": []
        },
        {
          "InStore": []
        },
        {
          "Sold": []
        }
      ]
    },
    "to": [
      {
        "Enum": [
          {
            "Produced": []
          },
          {
            "InTransit": []
          },
          {
            "InStore": []
          },
          {
            "Sold": []
          }
        ]
      }
    ]
  }
]
Errors
None
Event
{
  "Enum": [
    {
      "ItemCreated": [
        {
          "item_id": "<UInt64>",
          "metadata_url": {
            "Enum": [
              {
                "None": []
              },
              {
                "Some": [
                  {
                    "hash": {
                      "Enum": [
                        {
                          "None": []
                        },
                        {
                          "Some": [
                            "<String of size 64 containing lowercase hex characters.>"
                          ]
                        }
                      ]
                    },
                    "url": "<String>"
                  }
                ]
              }
            ]
          }
        }
      ]
    },
    {
      "ItemStatusChanged": [
        {
          "additional_data": {
            "bytes": [
              "<UInt8>"
            ]
          },
          "item_id": "<UInt64>",
          "new_status": {
            "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
"<UInt64>"

Parameters
{
  "Enum": [
    {
      "Account": [
        "<AccountAddress>"
      ]
    },
    {
      "Contract": [
        {
          "index": "<UInt64>",
          "subindex": "<UInt64>"
        }
      ]
    }
  ]
}
Errors
None
Return
[
  {
    "Enum": [
      {
        "Admin": []
      },
      {
        "Producer": []
      },
      {
        "Transporter": []
      },
      {
        "Seller": []
      }
    ]
  }
]

Parameters
"<UInt64>"
Errors
None
Return
{
  "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": []
      }
    ]
  }
}

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

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

Parameters
{
  "address": {
    "Enum": [
      {
        "Account": [
          "<AccountAddress>"
        ]
      },
      {
        "Contract": [
          {
            "index": "<UInt64>",
            "subindex": "<UInt64>"
          }
        ]
      }
    ]
  },
  "role": {
    "Enum": [
      {
        "Admin": []
      },
      {
        "Producer": []
      },
      {
        "Transporter": []
      },
      {
        "Seller": []
      }
    ]
  }
}
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "LogFull": []
    },
    {
      "LogMalformed": []
    },
    {
      "Unauthorized": []
    },
    {
      "ItemAlreadyExists": []
    },
    {
      "ItemDoesNotExist": []
    },
    {
      "FinalState": []
    },
    {
      "NoContract": []
    }
  ]
}
Return
None

Parameters
{
  "address": {
    "Enum": [
      {
        "Account": [
          "<AccountAddress>"
        ]
      },
      {
        "Contract": [
          {
            "index": "<UInt64>",
            "subindex": "<UInt64>"
          }
        ]
      }
    ]
  },
  "role": {
    "Enum": [
      {
        "Admin": []
      },
      {
        "Producer": []
      },
      {
        "Transporter": []
      },
      {
        "Seller": []
      }
    ]
  }
}
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "LogFull": []
    },
    {
      "LogMalformed": []
    },
    {
      "Unauthorized": []
    },
    {
      "ItemAlreadyExists": []
    },
    {
      "ItemDoesNotExist": []
    },
    {
      "FinalState": []
    },
    {
      "NoContract": []
    }
  ]
}
Return
None


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