CIS-6 unknown event?

I’d be grateful for someone to help me understand the following.
Below is the concordium-client output on testnet for a tx interacting with a CIS-6 contract. (Showing concordium-client output to eliminate possible parsing issues from my own Python SDK).

{
        "cost": "165949",
        "energyCost": 3481,
        "hash": "57db3078de40727302b9f8bd487314b2ad46987aebf5003bb192a3d73d81e914",
        "index": 0,
        "result": {
            "events": [
                {
                    "address": {
                        "index": 8901,
                        "subindex": 0
                    },
                    "amount": "0",
                    "contractVersion": 1,
                    "events": [
                        "ec0814000000000000000300000000",
                        "fa0a43469ea8bfd63bf7a02c7ac598a7d21ecc9a68103f10440d900d5926db2a920000000000000000"
                    ],
                    "instigator": {
                        "address": "4SizPU2ipqQQza9Xa6fUkQBCDjyd1vTNUNDGbBeiRGpaJQc6qX",
                        "type": "AddressAccount"
                    },
                    "message": "010001000065c9198bd3735995608c28b322ed039d4d1d254f3982fbf57c91cad4138dc9d60a36d2896cd6385678bf67a048529133491fc70d5a4d219d606cfb6973007d060a43469ea8bfd63bf7a02c7ac598a7d21ecc9a68103f10440d900d5926db2a92c52200000000000000000000000000000000000000000000311750388f01000010006368616e67654974656d5374617475730e000814000000000000000300000000",
                    "receiveName": "track_and_trace.permit",
                    "tag": "Updated"
                }
            ],
            "outcome": "success"
        },
        "sender": "4SizPU2ipqQQza9Xa6fUkQBCDjyd1vTNUNDGbBeiRGpaJQc6qX",
        "type": {
            "contents": "update",
            "type": "accountTransaction"
        }
    }

This is an account_transaction with effect contract_update_issued with 1 updated effect with 2 events.

The first event ec0814000000000000000300000000 parses to a CIS-6.item_status_changed_event with tag 236, as specified.

However, the 2nd event fa0a43469ea8bfd63bf7a02c7ac598a7d21ecc9a68103f10440d900d5926db2a920000000000000000 has a tag 250, but that tag is not defined in the CIS-6 specification. Nor does CIS-6 require CIS-2 (where this tag is defined).

Am I to ignore this unknown tag? Is there any documentation on what this event is supposed to be?

Hi!

Here is the contract for reference: concordium-dapp-examples/trackAndTrace/smart-contract/src/lib.rs at ee88386207433a41ebae908a881fef9949c87d82 · Concordium/concordium-dapp-examples · GitHub

As you can see at the line the link takes you to, there is an event with the tag. In general, contracts can emit as many events as you wish. The standard just dictates that in certain cases, specific events specified by the standard must be emitted.

I hope this makes sense.

Hi, yes. My assumption for now: I am going to track only SPECIFIED logged events (ie logged events that are specified in the CIS-Standards) and skip events that I can’t recognise from the Standard. Would that be a fair assumption to make?

I would say this is the solution, yes :slight_smile:

1 Like