-
Notifications
You must be signed in to change notification settings - Fork 11.5k
Issue sponsoring transaction #22306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank you for opening this issue, a team member will review it shortly. Until then, please do not interact with any users that claim to be from Sui support and do not click on any links! |
It looks like you're sending the complete transaction bytes to the endpoint, but the endpoint takes only the bytes for the transaction kind. There's an example for how to construct these bytes with the TS SDK here: https://sdk.mystenlabs.com/typescript/transaction-building/sponsored-transactions |
thanks for your answer, but I need to know how to do with Rust SDK because I tried several things without success. |
@spielcrypto I don't think the Rust SDK supports that kind of transaction building, but let me check internally. |
@spielcrypto you'll need to build a |
@stefan-mysten I still have this issue from the endpoint: Network error: Submit sponsor transaction request failed with status 400 Bad Request: {"errors":[{"code":"gas_station_error","message":"Request to gas station failed","data":{"status":400,"text":"{\"effects\":null,\"error\":\"Invalid bcs bytes for TransactionData\"}"}}]}", here you can find the logic implemented: I need to convert to String otherwise the Enoki API will fail showing that the type of bcs is not correct |
@spielcrypto unfortunately, I am not familiar with the Enoki API. Perhaps it does not need to be Base64 encoded? Did you try that? |
Otherwise, your code looks fine from the tx kind perspective. |
I am out for the weekend, but I did a quick search for this error. Interestingly, it comes from the gas station rather than enoki itself: https://github.com/MystenLabs/sui-gas-pool/blob/d65e4c2e768f87e5c3c4b5e4975302b475e84739/src/rpc/server.rs#L236 |
About Base64, the endpoint only accept String, If I send Vec<8> which is what I get after using this bcs::to_bytes, the endpoint will throw an error show me that the type of TransactionData is not correct. About what you mention of Sui Gas Pool, I see that try to get the TransactionData and GenericSignature but I don't send any of the second only TransactionData, what should I do? |
Not sure what to suggest, I'd have to sit down and try to replicate this in Rust. Perhaps what you need to do, following the way it's done in the TS SDK example is to
|
As you can see in the TS SDK example, there's a bit more to it:
|
@spielcrypto ignore my comment above, it's wrong. |
@stefan-mysten ok anyway we won't continue until Alex from your team answer my question |
also @stefan-mysten after get such unpolite feedback in the SUI Overflow Hackathon (which shows that even the reviewer didn't go through the project) after our hard work and contribution plus be ignored by your colleague Alex which motivated us to build a helper module of Rust with ZKInputs which we did ( https://github.com/Singularity-Shift/squad_connect ) we are thinking than probably is not worth to continues building in this network. |
Uh oh!
There was an error while loading. Please reload this page.
When I try to execute this endpoint from Enoki I get this error
The specified transaction kind bytes are invalid
Also I don't understand in the response of this endpoint what is exactly bytes, is it signature?
The text was updated successfully, but these errors were encountered: