Understand delegate
and route
routing strategies for shortcuts APIs.
/shortcuts/route
and /shortcuts/bundle
), you must choose between two routing strategies: router
and delegate
.
Based on the strategy you choose, the Enso API will route your transaction through the appropriate smart contract.
tx.to
response value when sending on-chain a shortcut transaction you obtained.By avoiding hardcoded addresses, your shortcuts will always be routed to the correct contract, even if the address changes in the future.
For specific addresses, check out Deploymentsdelegate
or router
?delegate
when:
delegate
EnsoShortcutsDelegate
contract, and the wallet itself doesn’t hold any tokens during the execution.
delegate
for smart wallets supporting delegatecall
:
router
router
strategy, the Enso Router contract will hold the intermediate tokens between actions.
With this strategy, you must approve the Enso router contract to operate with your input tokens:
router
strategy for EOAs or simpler smart wallets:
Updated