# Euler > On-chain contract: Euler. 4 functions, 35 events. MCP endpoint: https://euler.mcp.junct.dev/mcp Domain: lending Auth: none ## Tools ## Write ### dispatch Call dispatch(). Write function — may have access control restrictions (e.g. onlyOwner). Check contract source for modifier requirements before calling. No return value. _No parameters required._ ## Read ### moduleIdToImplementation Get moduleIdToImplementation(moduleId: string). Read-only — does not modify contract state. Unrestricted — any address can call this read function. Returns address. **Parameters:** - `moduleId` (string, required): uint256 (uint256, pass as decimal string). ### moduleIdToProxy Get moduleIdToProxy(moduleId: string). Read-only — does not modify contract state. Unrestricted — any address can call this read function. Returns address. **Parameters:** - `moduleId` (string, required): uint256 (uint256, pass as decimal string). ### name Get name(). Read-only — does not modify contract state. Unrestricted — any address can call this read function. Returns string. _No parameters required._ ## Event ### AssetStatus Event emitted by the contract. Indexed fields (filterable): underlying. Subscribe via log filters. **Parameters:** - `underlying` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `totalBalances` (string, required): uint256 (uint256, pass as decimal string). - `totalBorrows` (string, required): uint256 (uint256, pass as decimal string). - `reserveBalance` (string, required): uint96 (uint96, pass as decimal string). - `poolSize` (string, required): uint256 (uint256, pass as decimal string). - `interestAccumulator` (string, required): uint256 (uint256, pass as decimal string). - `interestRate` (string, required): int96 (int96, pass as decimal string). - `timestamp` (string, required): uint256 (uint256, pass as decimal string). ### Borrow Event emitted by the contract. Indexed fields (filterable): underlying, account. Subscribe via log filters. **Parameters:** - `underlying` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `account` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `amount` (string, required): uint256 (uint256, pass as decimal string). ### DelegateAverageLiquidity Event emitted by the contract. Indexed fields (filterable): account, delegate. Subscribe via log filters. **Parameters:** - `account` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `delegate` (string, required): address (Ethereum address, 0x-prefixed) (indexed). ### Deposit Event emitted by the contract. Indexed fields (filterable): underlying, account. Subscribe via log filters. **Parameters:** - `underlying` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `account` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `amount` (string, required): uint256 (uint256, pass as decimal string). ### EnterMarket Event emitted by the contract. Indexed fields (filterable): underlying, account. Subscribe via log filters. **Parameters:** - `underlying` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `account` (string, required): address (Ethereum address, 0x-prefixed) (indexed). ### ExitMarket Event emitted by the contract. Indexed fields (filterable): underlying, account. Subscribe via log filters. **Parameters:** - `underlying` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `account` (string, required): address (Ethereum address, 0x-prefixed) (indexed). ### Genesis Event emitted by the contract. Subscribe via log filters. _No parameters required._ ### GovConvertReserves [DISCOVERY] Event emitted by the contract. Indexed fields (filterable): underlying, recipient. Subscribe via log filters. **Parameters:** - `underlying` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `recipient` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `amount` (string, required): uint256 (uint256, pass as decimal string). ### GovSetAssetConfig Event emitted by the contract. Indexed fields (filterable): underlying. Subscribe via log filters. **Parameters:** - `underlying` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `newConfig` (object, required): tuple. Fields: eTokenAddress, borrowIsolated, collateralFactor, borrowFactor, twapWindow. ### GovSetIRM Event emitted by the contract. Indexed fields (filterable): underlying. Subscribe via log filters. **Parameters:** - `underlying` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `interestRateModel` (string, required): uint256 (uint256, pass as decimal string). - `resetParams` (string, required): bytes (hex-encoded bytes, 0x-prefixed). ### GovSetPricingConfig Event emitted by the contract. Indexed fields (filterable): underlying. Subscribe via log filters. **Parameters:** - `underlying` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `newPricingType` (string, required): uint16 (uint16, pass as decimal string). - `newPricingParameter` (string, required): uint32 (uint32, pass as decimal string). ### GovSetReserveFee Event emitted by the contract. Indexed fields (filterable): underlying. Subscribe via log filters. **Parameters:** - `underlying` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `newReserveFee` (string, required): uint32 (uint32, pass as decimal string). ### InstallerInstallModule Event emitted by the contract. Indexed fields (filterable): moduleId, moduleImpl. Subscribe via log filters. **Parameters:** - `moduleId` (string, required): uint256 (uint256, pass as decimal string) (indexed). - `moduleImpl` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `moduleGitCommit` (string, required): bytes32 (32-byte hex string, 0x-prefixed). ### InstallerSetGovernorAdmin Event emitted by the contract. Indexed fields (filterable): newGovernorAdmin. Subscribe via log filters. **Parameters:** - `newGovernorAdmin` (string, required): address (Ethereum address, 0x-prefixed) (indexed). ### InstallerSetUpgradeAdmin Event emitted by the contract. Indexed fields (filterable): newUpgradeAdmin. Subscribe via log filters. **Parameters:** - `newUpgradeAdmin` (string, required): address (Ethereum address, 0x-prefixed) (indexed). ### Liquidation Event emitted by the contract. Indexed fields (filterable): liquidator, violator, underlying. Subscribe via log filters. **Parameters:** - `liquidator` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `violator` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `underlying` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `collateral` (string, required): address (Ethereum address, 0x-prefixed). - `repay` (string, required): uint256 (uint256, pass as decimal string). - `yield` (string, required): uint256 (uint256, pass as decimal string). - `healthScore` (string, required): uint256 (uint256, pass as decimal string). - `baseDiscount` (string, required): uint256 (uint256, pass as decimal string). - `discount` (string, required): uint256 (uint256, pass as decimal string). ### MarketActivated Event emitted by the contract. Indexed fields (filterable): underlying, eToken, dToken. Subscribe via log filters. **Parameters:** - `underlying` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `eToken` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `dToken` (string, required): address (Ethereum address, 0x-prefixed) (indexed). ### PTokenActivated Event emitted by the contract. Indexed fields (filterable): underlying, pToken. Subscribe via log filters. **Parameters:** - `underlying` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `pToken` (string, required): address (Ethereum address, 0x-prefixed) (indexed). ### PTokenUnWrap Event emitted by the contract. Indexed fields (filterable): underlying, account. Subscribe via log filters. **Parameters:** - `underlying` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `account` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `amount` (string, required): uint256 (uint256, pass as decimal string). ### PTokenWrap Event emitted by the contract. Indexed fields (filterable): underlying, account. Subscribe via log filters. **Parameters:** - `underlying` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `account` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `amount` (string, required): uint256 (uint256, pass as decimal string). ### ProxyCreated Event emitted by the contract. Indexed fields (filterable): proxy. Subscribe via log filters. **Parameters:** - `proxy` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `moduleId` (string, required): uint256 (uint256, pass as decimal string). ### Repay Event emitted by the contract. Indexed fields (filterable): underlying, account. Subscribe via log filters. **Parameters:** - `underlying` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `account` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `amount` (string, required): uint256 (uint256, pass as decimal string). ### RequestBorrow Event emitted by the contract. Indexed fields (filterable): account. Subscribe via log filters. **Parameters:** - `account` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `amount` (string, required): uint256 (uint256, pass as decimal string). ### RequestBurn Event emitted by the contract. Indexed fields (filterable): account. Subscribe via log filters. **Parameters:** - `account` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `amount` (string, required): uint256 (uint256, pass as decimal string). ### RequestDeposit Event emitted by the contract. Indexed fields (filterable): account. Subscribe via log filters. **Parameters:** - `account` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `amount` (string, required): uint256 (uint256, pass as decimal string). ### RequestLiquidate Event emitted by the contract. Indexed fields (filterable): liquidator, violator, underlying. Subscribe via log filters. **Parameters:** - `liquidator` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `violator` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `underlying` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `collateral` (string, required): address (Ethereum address, 0x-prefixed). - `repay` (string, required): uint256 (uint256, pass as decimal string). - `minYield` (string, required): uint256 (uint256, pass as decimal string). ### RequestMint Event emitted by the contract. Indexed fields (filterable): account. Subscribe via log filters. **Parameters:** - `account` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `amount` (string, required): uint256 (uint256, pass as decimal string). ### RequestRepay Event emitted by the contract. Indexed fields (filterable): account. Subscribe via log filters. **Parameters:** - `account` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `amount` (string, required): uint256 (uint256, pass as decimal string). ### RequestSwap Event emitted by the contract. Indexed fields (filterable): accountIn, accountOut, underlyingIn. Subscribe via log filters. **Parameters:** - `accountIn` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `accountOut` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `underlyingIn` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `underlyingOut` (string, required): address (Ethereum address, 0x-prefixed). - `amount` (string, required): uint256 (uint256, pass as decimal string). - `swapType` (string, required): uint256 (uint256, pass as decimal string). ### RequestTransferDToken Event emitted by the contract. Indexed fields (filterable): from, to. Subscribe via log filters. **Parameters:** - `from` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `to` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `amount` (string, required): uint256 (uint256, pass as decimal string). ### RequestTransferEToken Event emitted by the contract. Indexed fields (filterable): from, to. Subscribe via log filters. **Parameters:** - `from` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `to` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `amount` (string, required): uint256 (uint256, pass as decimal string). ### RequestWithdraw Event emitted by the contract. Indexed fields (filterable): account. Subscribe via log filters. **Parameters:** - `account` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `amount` (string, required): uint256 (uint256, pass as decimal string). ### TrackAverageLiquidity Event emitted by the contract. Indexed fields (filterable): account. Subscribe via log filters. **Parameters:** - `account` (string, required): address (Ethereum address, 0x-prefixed) (indexed). ### UnTrackAverageLiquidity Event emitted by the contract. Indexed fields (filterable): account. Subscribe via log filters. **Parameters:** - `account` (string, required): address (Ethereum address, 0x-prefixed) (indexed). ### Withdraw Event emitted by the contract. Indexed fields (filterable): underlying, account. Subscribe via log filters. **Parameters:** - `underlying` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `account` (string, required): address (Ethereum address, 0x-prefixed) (indexed). - `amount` (string, required): uint256 (uint256, pass as decimal string). ## Usage Connect to this MCP server at `https://euler.mcp.junct.dev/mcp`. All tools are callable via the MCP protocol. Call `moduleIdToImplementation` first to query current state before any write operations. Write operations like `dispatch` return data or calldata for agent use.