sui
sui copied to clipboard
[SDK/TS] Package Publish should return full error message, on error.
If a package is published via the CLI, using sui client publish -p ... --gas-budget ...
, and fails to verify, it will produce an output like:
$ sui client publish -p . --gas-budget 30000
INCLUDING DEPENDENCY MoveStdlib
INCLUDING DEPENDENCY Sui
BUILDING firefly_exchange
Error executing ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: SuiMoveVerificationError, source: Some("Invalid entry point parameter type. Expected primitive or object type. Got: 0x0::position::UserPosition") } }
However, publishing a package using signer.publishWithRequestType
does not produce any similar output, it only indicates that verification failed:
{
"EffectsCert": {
"certificate": {
"transactionDigest": "AEidtPRhoz0Gmch/EN1/WetM25AG0mJ//II6e1eItCc=",
"data": {
"transactions": [
{
"Publish": {
"disassembled": { /* ... */ }
}
}
],
"sender": "0x38b0c33f3d0433fb1a0312b40c6131f62c0dd14f",
"gasPayment": {
"objectId": "0x4adaa10d53fc4440d52c96565b60f244b890aa9b",
"version": 196,
"digest": "wL3dJcLkqHOW0YaYOXrBwMXvp4d3wUxqfWLq7NvyMC8="
},
"gasBudget": 30000
},
"txSignature": "AAeC2zCj5nybIj+Eivio9SVlzWgz7AsyYSMlX17Kr0IV8cdP2weUSJszBi3lkE0GXBFQAZTOX+IkFwDyLpuedgkuTPF534jzOXDIEgkVeDWKFTpYooyxPw7Q1WBXRkkMOg==",
"authSignInfo": { /* ... */ }
},
"effects": {
"transactionEffectsDigest": "mqzzsHcBUX2p8vVpIZBqYjV0uzgaD70jGIFhl4ueOyE=",
"effects": {
"status": {
"status": "failure",
"error": "SuiMoveVerificationError"
},
"gasUsed": {
"computationCost": 894,
"storageCost": 0,
"storageRebate": 0
},
"transactionDigest": "AEidtPRhoz0Gmch/EN1/WetM25AG0mJ//II6e1eItCc=",
"mutated": [
{
"owner": {
"AddressOwner": "0x38b0c33f3d0433fb1a0312b40c6131f62c0dd14f"
},
"reference": {
"objectId": "0x4adaa10d53fc4440d52c96565b60f244b890aa9b",
"version": 197,
"digest": "dKaNBzLaTRsjreuri2nV8xB0rAImrBbxmdlEXHsD95s="
}
}
],
"gasObject": {
"owner": {
"AddressOwner": "0x38b0c33f3d0433fb1a0312b40c6131f62c0dd14f"
},
"reference": {
"objectId": "0x4adaa10d53fc4440d52c96565b60f244b890aa9b",
"version": 197,
"digest": "dKaNBzLaTRsjreuri2nV8xB0rAImrBbxmdlEXHsD95s="
}
},
"events": [
{
"coinBalanceChange": {
"packageId": "0x0000000000000000000000000000000000000002",
"transactionModule": "gas",
"sender": "0x38b0c33f3d0433fb1a0312b40c6131f62c0dd14f",
"changeType": "Gas",
"owner": {
"AddressOwner": "0x38b0c33f3d0433fb1a0312b40c6131f62c0dd14f"
},
"coinType": "0x2::sui::SUI",
"coinObjectId": "0x4adaa10d53fc4440d52c96565b60f244b890aa9b",
"version": 196,
"amount": -894
}
}
],
"dependencies": [
"QNUvySWmZOogdA3+IkauHDeqX2uWG2RN5YHUQRAu0NQ="
]
},
"authSignInfo": { /* ... */ }
},
"confirmed_local_execution": true
}
}
I'm not sure whether this also affects the Rust SDK, but if it does, we should improve that too.
This looks like it's not really relevant anymore, so I'm going to close it