MystenLabs / sui

Sui, a next-generation smart contract platform with high throughput, low latency, and an asset-oriented programming model powered by the Move programming language
https://sui.io
Apache License 2.0
6.1k stars 11.16k forks source link

Inconsistencies in event #4965

Closed patrickkuo closed 1 year ago

patrickkuo commented 2 years ago

Problem 1: event type set to Coin for non-coin transfer example:

"events": [
                {
                    "transferObject": {
                        "packageId": "0x0000000000000000000000000000000000000002",
                        "transactionModule": "native",
                        "sender": "0x3d835dcc06e21dbea1cb0fc7ef160b628517ab9f",
                        "recipient": {
                            "AddressOwner": "0xef2dc7c5668389d5880a014d209e51d3388c0b15"
                        },
                        "objectId": "0x280bb854d74aab028f9d580ddbbf8978dab48e2d",
                        "version": 2,
                        "type": "Coin",
                        "amount": null
                    }
                }
            ],

The above object was a DevNetNFT but the event type is being set to Coin.

Problem 2: Event type set to ToAddress for coin transfer, this event is from a move call. example:

{
                    "transferObject": {
                        "packageId": "0x65fb28592214c18c096c05ed14244a9c364c4545",
                        "transactionModule": "marketplace_nofee",
                        "sender": "0x0b04a2ef9be2ec88c2b683784aedc305a43b2702",
                        "recipient": {
                            "AddressOwner": "0xb758af2061e7c0e55df23de52c51968f6efbc959"
                        },
                        "objectId": "0xd5c8d1a777ebf90e53729f5ea756a8b6edf06a94",
                        "version": 1,
                        "type": "ToAddress",
                        "amount": 4875
                    }
                }
patrickkuo commented 2 years ago

cc @velvia

patrickkuo commented 1 year ago

fixed by https://github.com/MystenLabs/sui/pull/5289