LogoLogo
V1 Developer Docs
V1 Developer Docs
  • Stargate
  • Bug Bounty
    • Bug Bounty Program
  • Developers
    • (V1) Supported Networks and Assets
    • Chain IDs
    • Pool IDs
    • How to Swap
    • Cross Chain Swap Fee
    • EQ Fee Projection
    • Function Types
    • Contract Addresses
      • Mainnet
      • Testnet
      • Testnet Faucet
    • Bridge.sol
    • Stargate Chain Paths
  • Stargate Composability
    • StargateComposer.sol
    • StargateComposed.sol
  • Stargate Router Methods
    • swap()
    • addLiquidity()
    • redeemLocal()
    • redeemRemote()
    • sendCredits()
  • Interfaces
    • EVM (Solidity) Interfaces
      • IStargateRouter.sol
      • IStargateReceiver.sol
  • Multisigs
  • Audits
Powered by GitBook
On this page

Stargate Composability

The simplest form of composing Stargate

PreviousStargate Chain PathsNextStargateComposer.sol

Last updated 1 year ago

CtrlK

StargateComposer.sol

StargateComposer is a wrapper contract used to add additional functionality to Stargate Composed calls. Now contracts that want to compose Stargate will need to call swap via the StargateComposer contract instead of the Stargate Router. The new StargateComposer adds the msg.sender into the payload so the destination sgReceive can now identify the source address that initiated the swap via the _srcAddress.

Composing Stargate will revert on source if not using the StargateComposer.

StargateComposed deployed as a wrapper on both source and destination chains
Drawing