This page covers Smart Relay — Skip Go API’s universal cross-chain data & token delivery service
smart_relay=true
in /msgs_direct
or /route
./route
or /msgs_direct
, pass smart_relay=true
/msgs
, ensure that you are passing the smart_relay_fee_quote
object provided in the cctp_transfer
operation from the /route
response into your /msgs
request.
/route
response operations before passing them back into msgs
, simply ensure you’re decoding this new field properly and passing it back through!/track
or /submit
as normal
/submit
to submit Smart Relay transactions on chain to avoid issues incurred by submitting a transaction on chain but not sending it to the /track
endpoint./route
, /msgs_direct
and /msgs
, the cost of Smart Relay will appear in the estimated_fees
array with fee_type
set to SMART_RELAY
. See Getting Fee Info for more info about estimated_fees
For multi-tx routes, the user may pay up to 1 Smart Relay fee per transaction.
The fee for each transaction pays for all Smart Relay operations in that particular transaction. This prevents Smart Relay from accepting payment prematurely to perform operations for the latter transactions, since the latter transactions may not get signed or executed.
You can use the tx_index
attribute on the estimated_fees
entries to identify which Smart Relay fee corresponds to which transaction in the route. (e.g. tx_index=0
indicates this is the fee for the first transaction in the route)
estimated_fees
array for display purposes, cctp_transfer
includes a smart_relay_fee_quote
, providing necessary information for proper use of the dynamic relaying fee system. Specifically, the smart_relay_fee_quote
object contains information about the smart relay fee to be paid and when the quote expires (after which the quoted amount may no longer be valid and the transaction may not be succesfully relayed).
If you’re using the /msgs
endpoint, ensure that you are passing the smart_relay_fee_quote
object provided in the cctp_transfer
operation from the /route
response into your /msgs
request. This is necessary to ensure the transaction generated by the API matches the fee quoted in the /route
request. If the quote is not passed back into the /msgs
request, a new quote will be generated in the /msgs
call that may be different than what was quoted previously in the /route
request. Version 0.8.0
and above of the @skip-go/client
library supports this automatically. If you’re integrating the API directly and decoding the /route
response operations before passing them back into /msgs
, simply ensure you’re decoding this new field properly and passing it back through! See the SmartRelayFeeQuote
below: