2

I am trying to send a full block with a transaction payload to the Shimmer Testnet through this endpoint.

The payload has a transaction essence with one UTXO Input and creates a Basic Output.

The Basic Output has a sender feature.

The resulting block I want to send to the nodes by using this API is the following:

{
    "nonce": "1152921504607082870",
    "parents": [
        "0x0ac1a4bc67f3e8a71f3881848c194826bb37f23d88dacacd47060b54a8ffcf19",
        "0x0fae8083fbfbd805cc1dc6af91ce92fb93dc7f4927539e63e1a1a376eda96366",
        "0x39035c1a906316d75f85e497d74408568e540830c0a18b52a4e194243c1e94ca",
        "0x3d75eb67753a09efc13f09c9f046c7c5ab5c01cadc271a4f7f6582338be196a6"
    ],
    "payload": {
        "essence": {
            "inputs": [
                {
                    "transactionId": "0xec32fd61e28428cecccb20a3e6e9d01799d35df394b5e5a23232bc6d5a62b12f",
                    "transactionOutputIndex": 0,
                    "type": 0
                }
            ],
            "inputsCommitment": "0x43b14fb15642a8df580a30a268245cde078013c377ed676fbcff49afd70266e5",
            "networkId": "8342982141227064571",
            "outputs": [
                {
                    "amount": "1000000000",
                    "features": [
                        {
                            "sender": {
                                "pubKeyHash": "0x67149b47cd37eeb72a6a67bf6550160282ba06d99529638347359a3eeeb77afa",
                                "type": 0
                            },
                            "type": 0
                        }
                    ],
                    "type": 3,
                    "unlockConditions": [
                        {
                            "address": {
                                "pubKeyHash": "0x67149b47cd37eeb72a6a67bf6550160282ba06d99529638347359a3eeeb77afa",
                                "type": 0
                            },
                            "type": 0
                        }
                    ]
                }
            ],
            "payload": null,
            "type": 1
        },
        "type": 6,
        "unlocks": [
            {
                "signature": {
                    "publicKey": "0x737ed27947376bc4b2db80392b3ca0fab5519ed94ca130cb9e340c2550aa125d",
                    "signature": "0xbe37c449614ebf7025a50a442ed7ae347f19f2d5ef73768c1559d370366e5d37a4584b2e5bf66c3398a99babe91aef7e517d652d64e081d84003784063bec604",
                    "type": 0
                },
                "type": 0
            }
        ]
    },
    "protocolVersion": 2
}

So I want to create and output of 1000 smr by consuming an input that holds that amount of smr. The output to be created has to be unlocked with the same keys that the consumed input. My intention is to store some custom metadata in the generated output.

The problem is that when i send this block to the node the node return error 500 with message

"internal server error. error: runtime error: invalid memory address or nil pointer dereference".

I have been able to send Tagged data payloads and fulfill PoW. Also I have been able to send a Transaction payload with metadata and tag features. This error only happens when adding a sender feature. If someone knows what it is wrong with this procedure and block please let me know. Thank you for your time.

More on the procedure:

0

1 Answer 1

1

The solution is to change "sender" to "address" in the previous Json request.

This is in disagreement with the tips specifications. The later state that the SenderFeature should be a JSon object like:

SenderFeature{
type*    integer


sender*    {...}
 
}

But this is still not implemented on the node and the clients or the tips are wrong. I prefer the tips specifications with "sender" instead of "address".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.