# Stargate > On-chain contract: Stargate. 37 functions, 5 events. MCP endpoint: https://stargate.mcp.junct.dev/mcp Domain: analytics Auth: none ## Tools ## Write ### activateChainPath Calls activateChainPath(_poolId: string, _dstChainId: string, _dstPoolId: string). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_poolId` (string, required): uint256 (uint256, pass as decimal string). - `_dstChainId` (string, required): uint16 (uint16, pass as decimal string). - `_dstPoolId` (string, required): uint256 (uint256, pass as decimal string). ### addLiquidity Calls addLiquidity(_poolId: string, _amountLD: string, _to: string). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_poolId` (string, required): uint256 (uint256, pass as decimal string). - `_amountLD` (string, required): uint256 (uint256, pass as decimal string). - `_to` (string, required): address (Ethereum address, 0x-prefixed). ### callDelta Calls callDelta(_poolId: string, _fullMode: boolean). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_poolId` (string, required): uint256 (uint256, pass as decimal string). - `_fullMode` (boolean, required): bool. ### clearCachedSwap Calls clearCachedSwap(_srcChainId: string, _srcAddress: string, _nonce: string). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_srcChainId` (string, required): uint16 (uint16, pass as decimal string). - `_srcAddress` (string, required): bytes (hex-encoded bytes, 0x-prefixed). - `_nonce` (string, required): uint256 (uint256, pass as decimal string). ### createChainPath Calls createChainPath(_poolId: string, _dstChainId: string, _dstPoolId: string, _weight: string). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_poolId` (string, required): uint256 (uint256, pass as decimal string). - `_dstChainId` (string, required): uint16 (uint16, pass as decimal string). - `_dstPoolId` (string, required): uint256 (uint256, pass as decimal string). - `_weight` (string, required): uint256 (uint256, pass as decimal string). ### createPool Calls createPool(_poolId: string, _token: string, _sharedDecimals: string, _localDecimals: string, _name: string, _symbol: string). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. Returns address. **Parameters:** - `_poolId` (string, required): uint256 (uint256, pass as decimal string). - `_token` (string, required): address (Ethereum address, 0x-prefixed). - `_sharedDecimals` (string, required): uint8 (uint8, pass as decimal string). - `_localDecimals` (string, required): uint8 (uint8, pass as decimal string). - `_name` (string, required): string. - `_symbol` (string, required): string. ### creditChainPath Calls creditChainPath(_dstChainId: string, _dstPoolId: string, _srcPoolId: string, _c: { credits: string, idealBalance: string }). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_dstChainId` (string, required): uint16 (uint16, pass as decimal string). - `_dstPoolId` (string, required): uint256 (uint256, pass as decimal string). - `_srcPoolId` (string, required): uint256 (uint256, pass as decimal string). - `_c` (object, required): tuple. Fields: credits, idealBalance. ### instantRedeemLocal Calls instantRedeemLocal(_srcPoolId: string, _amountLP: string, _to: string). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. Returns amountSD (uint256). **Parameters:** - `_srcPoolId` (string, required): uint16 (uint16, pass as decimal string). - `_amountLP` (string, required): uint256 (uint256, pass as decimal string). - `_to` (string, required): address (Ethereum address, 0x-prefixed). ### redeemLocal Calls redeemLocal(_dstChainId: string, _srcPoolId: string, _dstPoolId: string, _refundAddress: string, _amountLP: string, _to: string, _lzTxParams: { dstGasForCall: string, dstNativeAmount: string, dstNativeAddr: string }). Requires ETH value to be sent with the transaction. Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_dstChainId` (string, required): uint16 (uint16, pass as decimal string). - `_srcPoolId` (string, required): uint256 (uint256, pass as decimal string). - `_dstPoolId` (string, required): uint256 (uint256, pass as decimal string). - `_refundAddress` (string, required): address (Ethereum address, 0x-prefixed). - `_amountLP` (string, required): uint256 (uint256, pass as decimal string). - `_to` (string, required): bytes (hex-encoded bytes, 0x-prefixed). - `_lzTxParams` (object, required): tuple. Fields: dstGasForCall, dstNativeAmount, dstNativeAddr. ### redeemLocalCallback Calls redeemLocalCallback(_srcChainId: string, _srcAddress: string, _nonce: string, _srcPoolId: string, _dstPoolId: string, _to: string, _amountSD: string, _mintAmountSD: string). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_srcChainId` (string, required): uint16 (uint16, pass as decimal string). - `_srcAddress` (string, required): bytes (hex-encoded bytes, 0x-prefixed). - `_nonce` (string, required): uint256 (uint256, pass as decimal string). - `_srcPoolId` (string, required): uint256 (uint256, pass as decimal string). - `_dstPoolId` (string, required): uint256 (uint256, pass as decimal string). - `_to` (string, required): address (Ethereum address, 0x-prefixed). - `_amountSD` (string, required): uint256 (uint256, pass as decimal string). - `_mintAmountSD` (string, required): uint256 (uint256, pass as decimal string). ### redeemLocalCheckOnRemote Calls redeemLocalCheckOnRemote(_srcChainId: string, _srcAddress: string, _nonce: string, _srcPoolId: string, _dstPoolId: string, _amountSD: string, _to: string). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_srcChainId` (string, required): uint16 (uint16, pass as decimal string). - `_srcAddress` (string, required): bytes (hex-encoded bytes, 0x-prefixed). - `_nonce` (string, required): uint256 (uint256, pass as decimal string). - `_srcPoolId` (string, required): uint256 (uint256, pass as decimal string). - `_dstPoolId` (string, required): uint256 (uint256, pass as decimal string). - `_amountSD` (string, required): uint256 (uint256, pass as decimal string). - `_to` (string, required): bytes (hex-encoded bytes, 0x-prefixed). ### redeemRemote Calls redeemRemote(_dstChainId: string, _srcPoolId: string, _dstPoolId: string, _refundAddress: string, _amountLP: string, _minAmountLD: string, _to: string, _lzTxParams: { dstGasForCall: string, dstNativeAmount: string, dstNativeAddr: string }). Requires ETH value to be sent with the transaction. Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_dstChainId` (string, required): uint16 (uint16, pass as decimal string). - `_srcPoolId` (string, required): uint256 (uint256, pass as decimal string). - `_dstPoolId` (string, required): uint256 (uint256, pass as decimal string). - `_refundAddress` (string, required): address (Ethereum address, 0x-prefixed). - `_amountLP` (string, required): uint256 (uint256, pass as decimal string). - `_minAmountLD` (string, required): uint256 (uint256, pass as decimal string). - `_to` (string, required): bytes (hex-encoded bytes, 0x-prefixed). - `_lzTxParams` (object, required): tuple. Fields: dstGasForCall, dstNativeAmount, dstNativeAddr. ### renounceOwnership Calls renounceOwnership(). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. DANGER: Permanently and irreversibly removes all owner control from the contract. After calling, no address will ever be able to call onlyOwner functions again including adapter management, oracle configuration, emergency controls, and all set* functions. This action cannot be undone. No return value. _No parameters required._ ### retryRevert Calls retryRevert(_srcChainId: string, _srcAddress: string, _nonce: string). Requires ETH value to be sent with the transaction. Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_srcChainId` (string, required): uint16 (uint16, pass as decimal string). - `_srcAddress` (string, required): bytes (hex-encoded bytes, 0x-prefixed). - `_nonce` (string, required): uint256 (uint256, pass as decimal string). ### revertRedeemLocal Calls revertRedeemLocal(_dstChainId: string, _srcAddress: string, _nonce: string, _refundAddress: string, _lzTxParams: { dstGasForCall: string, dstNativeAmount: string, dstNativeAddr: string }). Requires ETH value to be sent with the transaction. Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_dstChainId` (string, required): uint16 (uint16, pass as decimal string). - `_srcAddress` (string, required): bytes (hex-encoded bytes, 0x-prefixed). - `_nonce` (string, required): uint256 (uint256, pass as decimal string). - `_refundAddress` (string, required): address (Ethereum address, 0x-prefixed). - `_lzTxParams` (object, required): tuple. Fields: dstGasForCall, dstNativeAmount, dstNativeAddr. ### sendCredits Calls sendCredits(_dstChainId: string, _srcPoolId: string, _dstPoolId: string, _refundAddress: string). Requires ETH value to be sent with the transaction. Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_dstChainId` (string, required): uint16 (uint16, pass as decimal string). - `_srcPoolId` (string, required): uint256 (uint256, pass as decimal string). - `_dstPoolId` (string, required): uint256 (uint256, pass as decimal string). - `_refundAddress` (string, required): address (Ethereum address, 0x-prefixed). ### setBridgeAndFactory Calls setBridgeAndFactory(_bridge: string, _factory: string). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_bridge` (string, required): address (Ethereum address, 0x-prefixed). - `_factory` (string, required): address (Ethereum address, 0x-prefixed). ### setDeltaParam Calls setDeltaParam(_poolId: string, _batched: boolean, _swapDeltaBP: string, _lpDeltaBP: string, _defaultSwapMode: boolean, _defaultLPMode: boolean). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_poolId` (string, required): uint256 (uint256, pass as decimal string). - `_batched` (boolean, required): bool. - `_swapDeltaBP` (string, required): uint256 (uint256, pass as decimal string). - `_lpDeltaBP` (string, required): uint256 (uint256, pass as decimal string). - `_defaultSwapMode` (boolean, required): bool. - `_defaultLPMode` (boolean, required): bool. ### setFeeLibrary Calls setFeeLibrary(_poolId: string, _feeLibraryAddr: string). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_poolId` (string, required): uint256 (uint256, pass as decimal string). - `_feeLibraryAddr` (string, required): address (Ethereum address, 0x-prefixed). ### setFees Calls setFees(_poolId: string, _mintFeeBP: string). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_poolId` (string, required): uint256 (uint256, pass as decimal string). - `_mintFeeBP` (string, required): uint256 (uint256, pass as decimal string). ### setMintFeeOwner Calls setMintFeeOwner(_owner: string). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_owner` (string, required): address (Ethereum address, 0x-prefixed). ### setProtocolFeeOwner Calls setProtocolFeeOwner(_owner: string). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_owner` (string, required): address (Ethereum address, 0x-prefixed). ### setSwapStop Calls setSwapStop(_poolId: string, _swapStop: boolean). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_poolId` (string, required): uint256 (uint256, pass as decimal string). - `_swapStop` (boolean, required): bool. ### setWeightForChainPath Calls setWeightForChainPath(_poolId: string, _dstChainId: string, _dstPoolId: string, _weight: string). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_poolId` (string, required): uint256 (uint256, pass as decimal string). - `_dstChainId` (string, required): uint16 (uint16, pass as decimal string). - `_dstPoolId` (string, required): uint256 (uint256, pass as decimal string). - `_weight` (string, required): uint16 (uint16, pass as decimal string). ### swap Calls swap(_dstChainId: string, _srcPoolId: string, _dstPoolId: string, _refundAddress: string, _amountLD: string, _minAmountLD: string, _lzTxParams: { dstGasForCall: string, dstNativeAmount: string, dstNativeAddr: string }, _to: string, _payload: string). Requires ETH value to be sent with the transaction. Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_dstChainId` (string, required): uint16 (uint16, pass as decimal string). - `_srcPoolId` (string, required): uint256 (uint256, pass as decimal string). - `_dstPoolId` (string, required): uint256 (uint256, pass as decimal string). - `_refundAddress` (string, required): address (Ethereum address, 0x-prefixed). - `_amountLD` (string, required): uint256 (uint256, pass as decimal string). - `_minAmountLD` (string, required): uint256 (uint256, pass as decimal string). - `_lzTxParams` (object, required): tuple. Fields: dstGasForCall, dstNativeAmount, dstNativeAddr. - `_to` (string, required): bytes (hex-encoded bytes, 0x-prefixed). - `_payload` (string, required): bytes (hex-encoded bytes, 0x-prefixed). ### swapRemote Calls swapRemote(_srcChainId: string, _srcAddress: string, _nonce: string, _srcPoolId: string, _dstPoolId: string, _dstGasForCall: string, _to: string, _s: { amount: string, eqFee: string, eqReward: string, lpFee: string, protocolFee: string, lkbRemove: string }, _payload: string). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_srcChainId` (string, required): uint16 (uint16, pass as decimal string). - `_srcAddress` (string, required): bytes (hex-encoded bytes, 0x-prefixed). - `_nonce` (string, required): uint256 (uint256, pass as decimal string). - `_srcPoolId` (string, required): uint256 (uint256, pass as decimal string). - `_dstPoolId` (string, required): uint256 (uint256, pass as decimal string). - `_dstGasForCall` (string, required): uint256 (uint256, pass as decimal string). - `_to` (string, required): address (Ethereum address, 0x-prefixed). - `_s` (object, required): tuple. Fields: amount, eqFee, eqReward, lpFee, protocolFee, lkbRemove. - `_payload` (string, required): bytes (hex-encoded bytes, 0x-prefixed). ### transferOwnership Calls transferOwnership(newOwner: string). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. Transfers ownership to a new address. The new owner must call acceptOwnership() to complete the transfer (two-step pattern). No return value. **Parameters:** - `newOwner` (string, required): address (Ethereum address, 0x-prefixed). ### withdrawMintFee Calls withdrawMintFee(_poolId: string, _to: string). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_poolId` (string, required): uint256 (uint256, pass as decimal string). - `_to` (string, required): address (Ethereum address, 0x-prefixed). ### withdrawProtocolFee Calls withdrawProtocolFee(_poolId: string, _to: string). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. **Parameters:** - `_poolId` (string, required): uint256 (uint256, pass as decimal string). - `_to` (string, required): address (Ethereum address, 0x-prefixed). ## Read ### bridge Calls bridge(). Read-only — does not modify contract state. Unrestricted — any address can call this read function. Returns address. _No parameters required._ ### cachedSwapLookup Calls cachedSwapLookup(param0: string, param1: string, param2: string). Read-only — does not modify contract state. Unrestricted — any address can call this read function. Returns { token: string, amountLD: string, to: string, payload: string }. **Parameters:** - `param0` (string, required): uint16 (uint16, pass as decimal string). - `param1` (string, required): bytes (hex-encoded bytes, 0x-prefixed). - `param2` (string, required): uint256 (uint256, pass as decimal string). ### factory Calls factory(). Read-only — does not modify contract state. Unrestricted — any address can call this read function. Returns address. _No parameters required._ ### mintFeeOwner Calls mintFeeOwner(). Read-only — does not modify contract state. Unrestricted — any address can call this read function. Returns address. _No parameters required._ ### owner Calls owner(). Read-only — does not modify contract state. Unrestricted — any address can call this read function. Returns address. _No parameters required._ ### protocolFeeOwner Calls protocolFeeOwner(). Read-only — does not modify contract state. Unrestricted — any address can call this read function. Returns address. _No parameters required._ ### quoteLayerZeroFee Calls quoteLayerZeroFee(_dstChainId: string, _functionType: string, _toAddress: string, _transferAndCallPayload: string, _lzTxParams: { dstGasForCall: string, dstNativeAmount: string, dstNativeAddr: string }). Read-only — does not modify contract state. Unrestricted — any address can call this read function. Returns { _0: string, _1: string }. **Parameters:** - `_dstChainId` (string, required): uint16 (uint16, pass as decimal string). - `_functionType` (string, required): uint8 (uint8, pass as decimal string). - `_toAddress` (string, required): bytes (hex-encoded bytes, 0x-prefixed). - `_transferAndCallPayload` (string, required): bytes (hex-encoded bytes, 0x-prefixed). - `_lzTxParams` (object, required): tuple. Fields: dstGasForCall, dstNativeAmount, dstNativeAddr. ### revertLookup Calls revertLookup(param0: string, param1: string, param2: string). Read-only — does not modify contract state. Unrestricted — any address can call this read function. Returns bytes. **Parameters:** - `param0` (string, required): uint16 (uint16, pass as decimal string). - `param1` (string, required): bytes (hex-encoded bytes, 0x-prefixed). - `param2` (string, required): uint256 (uint256, pass as decimal string). ## Event ### CachedSwapSaved Event emitted by the contract. Subscribe via log filters. **Parameters:** - `chainId` (string, required): uint16 (uint16, pass as decimal string). - `srcAddress` (string, required): bytes (hex-encoded bytes, 0x-prefixed). - `nonce` (string, required): uint256 (uint256, pass as decimal string). - `token` (string, required): address (Ethereum address, 0x-prefixed). - `amountLD` (string, required): uint256 (uint256, pass as decimal string). - `to` (string, required): address (Ethereum address, 0x-prefixed). - `payload` (string, required): bytes (hex-encoded bytes, 0x-prefixed). - `reason` (string, required): bytes (hex-encoded bytes, 0x-prefixed). ### OwnershipTransferred Event emitted by the contract. Indexed fields (filterable): previousOwner, newOwner. Subscribe via log filters. **Parameters:** - `previousOwner` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `newOwner` (string, required): address (Ethereum address, 0x-prefixed) (indexed). ### RedeemLocalCallback Event emitted by the contract. Indexed fields (filterable): srcAddress, nonce. Subscribe via log filters. **Parameters:** - `srcChainId` (string, required): uint16 (uint16, pass as decimal string). - `srcAddress` (string, required): bytes (hex-encoded bytes, 0x-prefixed) (indexed). - `nonce` (string, required): uint256 (uint256, pass as decimal string) (indexed). - `srcPoolId` (string, required): uint256 (uint256, pass as decimal string). - `dstPoolId` (string, required): uint256 (uint256, pass as decimal string). - `to` (string, required): address (Ethereum address, 0x-prefixed). - `amountSD` (string, required): uint256 (uint256, pass as decimal string). - `mintAmountSD` (string, required): uint256 (uint256, pass as decimal string). ### Revert Event emitted by the contract. Subscribe via log filters. **Parameters:** - `bridgeFunctionType` (string, required): uint8 (uint8, pass as decimal string). - `chainId` (string, required): uint16 (uint16, pass as decimal string). - `srcAddress` (string, required): bytes (hex-encoded bytes, 0x-prefixed). - `nonce` (string, required): uint256 (uint256, pass as decimal string). ### RevertRedeemLocal Event emitted by the contract. Indexed fields (filterable): nonce, srcAddress. Subscribe via log filters. **Parameters:** - `srcChainId` (string, required): uint16 (uint16, pass as decimal string). - `_srcPoolId` (string, required): uint256 (uint256, pass as decimal string). - `_dstPoolId` (string, required): uint256 (uint256, pass as decimal string). - `to` (string, required): bytes (hex-encoded bytes, 0x-prefixed). - `redeemAmountSD` (string, required): uint256 (uint256, pass as decimal string). - `mintAmountSD` (string, required): uint256 (uint256, pass as decimal string). - `nonce` (string, required): uint256 (uint256, pass as decimal string) (indexed). - `srcAddress` (string, required): bytes (hex-encoded bytes, 0x-prefixed) (indexed). ## Usage Connect to this MCP server at `https://stargate.mcp.junct.dev/mcp`. All tools are callable via the MCP protocol. Call `bridge` first to query current state before any write operations. Write operations like `activateChainPath` return data or calldata for agent use.