Skip to content

Conversation

@truthixify
Copy link

This PR added option to create transaction where the fees are sponsored using the launch tube API.

This currently integrates with testnet.

Closes #201

@netlify
Copy link

netlify bot commented Sep 30, 2025

Deploy Preview for staging-tansu failed. Why did it fail? →

Name Link
🔨 Latest commit d88f300
🔍 Latest deploy log https://app.netlify.com/projects/staging-tansu/deploys/68f10b8f625d8700087e0bfd

@truthixify truthixify marked this pull request as ready for review September 30, 2025 00:32
@netlify
Copy link

netlify bot commented Sep 30, 2025

Deploy Preview for tansu canceled.

Name Link
🔨 Latest commit d88f300
🔍 Latest deploy log https://app.netlify.com/projects/tansu/deploys/68f10b8fab365f000814a019

@tupui
Copy link
Owner

tupui commented Sep 30, 2025

Nice @truthixify let me know when this is ready for a review. Also please make it also work with testnet. It should mostly just be a matter of getting the env variable about network selection and selecting one or the other set of variables for the URL and Token.

@truthixify
Copy link
Author

@tupui

it’s ready for review now but are you suggesting we have a way to switch between mainnet and testnet using the config files?

For now, it’s only on testnet.

@tupui
Copy link
Owner

tupui commented Sep 30, 2025

@truthixify in general the app works on both testnet and mainnet. It does it with some env vars. There is also an open issue to make things as bit smoother #247. What I suggest is to at least have a way to use testnet or mainnet from the env variables. To be clear, that feature is only really useful if we consider mainnet since on testnet we do not care how much operations cost.

@truthixify
Copy link
Author

@truthixify in general the app works on both testnet and mainnet. It does it with some env vars. There is also an open issue to make things as bit smoother #247. What I suggest is to at least have a way to use testnet or mainnet from the env variables. To be clear, that feature is only really useful if we consider mainnet since on testnet we do not care how much operations cost.

Ok cool, I’ll implement the option for both mainnet and testnet and we can choose based on the env we set.

I’ll look into the issue you mentioned, maybe I can also fix that once I’m done with this.

Copy link
Owner

@tupui tupui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are close, nice 👍

return res.json();
});

// Handle contract errors
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function for launchtube should stop there. There rest is the same as what we have for a classic transaction no? We should just have two small functions: send with launchtube; send with RPC. And then do the same.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, does this mean I need to write a separate function for send with RPC?

Also, I believe we don't want to throw any errors when send with launchtube fails right?

We just fall back to send with rpc.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we can have a function for launchtube and another one for the RPC. Or just a if for the RPC part if we don't need to post process the data to match a common data format.

Yes if launchtube is failing we want to use RPC. But failing launchtube is just about failing the request. The rest is the same code to deal with the response or error.

import { retryAsync } from "../utils/retry";
import { parseContractError } from "../utils/contractErrors";

const LAUNCHTUBE_URL = import.meta.env.LAUNCHTUBE_URL || "https://launchtube.xyz";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default values should be testnet one.

@truthixify
Copy link
Author

@tupui

You can check it now.

Copy link
Contributor

@Shadow-MMN Shadow-MMN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything is nice , just check the little reviews I gave
Happy Coding 😊

* Check if Launchtube is enabled and configured
*/
export function isLaunchtubeEnabled(): boolean {
const useLaunchtube = import.meta.env.PUBLIC_USE_LAUNCHTUBE ?? "true";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant more to have above

import.meta.env.PUBLIC_USE_LAUNCHTUBE || "true";

const useLaunchtube = import.meta.env.PUBLIC_USE_LAUNCHTUBE ?? "true";
return (
useLaunchtube === "true" &&
!!import.meta.env.PUBLIC_LAUNCHTUBE_TOKEN
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean this will always be there. So I am not sure we even need that function.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I’ll look into this.

@tupui
Copy link
Owner

tupui commented Oct 16, 2025

Any updates?

@tupui
Copy link
Owner

tupui commented Oct 23, 2025

CI is all red. Any updates?

@tupui
Copy link
Owner

tupui commented Nov 30, 2025

Friendly reminder @truthixify

@truthixify
Copy link
Author

Friendly reminder @truthixify

I'll check this again, took a long break after OD end.

Sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fee-less transactions

3 participants