Implement Gas on Receive functionality in your custom frontend using the Skip Go Client Library
getRouteWithGasOnReceive
function that handles all the complexity for you, or you can implement custom logic if you need specific behavior.
route
and executeRoute
functionsgetRouteWithGasOnReceive
function:
mainRoute
with gasRoute
as undefined, allowing your swap to proceed without gas-on-receive.
getRouteWithGasOnReceive
provides:
Feature | Widget (Automatic) | Client Library (Manual) |
---|---|---|
Gas balance detection | Automatic | Manual or use getRouteWithGasOnReceive |
Route creation | Automatic | Use getRouteWithGasOnReceive or manual |
Amount calculation | Built-in defaults | Built-in with getRouteWithGasOnReceive |
UI components | Provided | Build your own |
Error handling | Automatic | Manual implementation |
Status tracking | Built-in | Via callbacks |
getRouteWithGasOnReceive
for automatic route splittingexecuteMultipleRoutes
getRouteWithGasOnReceive
provides the ideal balance of simplicity and functionality.