diff --git a/frontend/config/stakingPrograms/index.ts b/frontend/config/stakingPrograms/index.ts index 3d1f9cef..d9a74ab9 100644 --- a/frontend/config/stakingPrograms/index.ts +++ b/frontend/config/stakingPrograms/index.ts @@ -68,5 +68,5 @@ export const DEFAULT_STAKING_PROGRAM_IDS: { [EvmChainId.Gnosis]: StakingProgramId.PearlBeta, // [EvmChainId.Optimism]: StakingProgramId.OptimusAlpha, [EvmChainId.Base]: StakingProgramId.MemeBaseAlpha, - [EvmChainId.Mode]: StakingProgramId.ModiusAlpha, + [EvmChainId.Mode]: StakingProgramId.OptimusAlpha, }; diff --git a/frontend/config/stakingPrograms/mode.ts b/frontend/config/stakingPrograms/mode.ts index 9f395a57..0c103ee6 100644 --- a/frontend/config/stakingPrograms/mode.ts +++ b/frontend/config/stakingPrograms/mode.ts @@ -12,12 +12,12 @@ import { StakingProgramMap } from '.'; export const MODE_STAKING_PROGRAMS_CONTRACT_ADDRESSES: Record = { - [StakingProgramId.ModiusAlpha]: + [StakingProgramId.OptimusAlpha]: '0x534c0a05b6d4d28d5f3630d6d74857b253cf8332', }; export const MODE_STAKING_PROGRAMS: StakingProgramMap = { - [StakingProgramId.ModiusAlpha]: { + [StakingProgramId.OptimusAlpha]: { chainId: EvmChainId.Mode, name: 'Modius Alpha', agentsSupported: [AgentType.Modius], @@ -27,7 +27,7 @@ export const MODE_STAKING_PROGRAMS: StakingProgramMap = { activityChecker: ACTIVITY_CHECKERS[EvmChainId.Mode][ActivityCheckerType.Staking], contract: new MulticallContract( - MODE_STAKING_PROGRAMS_CONTRACT_ADDRESSES[StakingProgramId.ModiusAlpha], + MODE_STAKING_PROGRAMS_CONTRACT_ADDRESSES[StakingProgramId.OptimusAlpha], STAKING_TOKEN_PROXY_ABI, ), }, diff --git a/frontend/constants/serviceTemplates.ts b/frontend/constants/serviceTemplates.ts index 5c9848ed..b055e4b4 100644 --- a/frontend/constants/serviceTemplates.ts +++ b/frontend/constants/serviceTemplates.ts @@ -182,16 +182,16 @@ export const SERVICE_TEMPLATES: ServiceTemplate[] = [ }, env_variables: { BASE_LEDGER_RPC: { - name: "Base ledger RPC", - description: "", - value: "", - provision_type: EnvProvisionType.COMPUTED + name: 'Base ledger RPC', + description: '', + value: '', + provision_type: EnvProvisionType.COMPUTED, }, CELO_LEDGER_RPC: { - name: "Base ledger RPC", - description: "", - value: "", - provision_type: EnvProvisionType.COMPUTED + name: 'Base ledger RPC', + description: '', + value: '', + provision_type: EnvProvisionType.COMPUTED, }, TWIKIT_USERNAME: { name: 'Twitter username', @@ -256,6 +256,119 @@ export const SERVICE_TEMPLATES: ServiceTemplate[] = [ }, }, }, + { + agentType: AgentType.Modius, + name: 'Optimus', + hash: 'bafybeihqho73he6mirkodg4ubom6ngf2nkgebhmxr435yxpsxgsthu5nvy', + description: 'Optimus', + image: + 'https://gateway.autonolas.tech/ipfs/bafybeiaakdeconw7j5z76fgghfdjmsr6tzejotxcwnvmp3nroaw3glgyve', + service_version: 'v0.18.1', + home_chain: MiddlewareChain.MODE, + configurations: { + [MiddlewareChain.MODE]: { + staking_program_id: StakingProgramId.OptimusAlpha, // default, may be overwritten + nft: 'bafybeiaakdeconw7j5z76fgghfdjmsr6tzejotxcwnvmp3nroaw3glgyve', + rpc: 'http://localhost:8545', // overwritten + agent_id: 40, + threshold: 1, + use_staking: true, + cost_of_bond: 20000000000000000000, + monthly_gas_estimate: 5260000000000000, + fund_requirements: { + agent: 5000000000000000, + safe: 0, + }, + }, + }, + env_variables: { + MODE_LEDGER_RPC: { + name: 'Mode ledger RPC', + description: '', + value: '', + provision_type: EnvProvisionType.COMPUTED, + }, + SAFE_CONTRACT_ADDRESSES: { + name: 'Safe contract address', + description: '', + value: '', + provision_type: EnvProvisionType.COMPUTED, + }, + TENDERLY_ACCESS_KEY: { + name: 'Tenderly access key', + description: '', + value: '', + provision_type: EnvProvisionType.USER, + }, + TENDERLY_ACCOUNT_SLUG: { + name: 'Tenderly account slug', + description: '', + value: '', + provision_type: EnvProvisionType.USER, + }, + TENDERLY_PROJECT_SLUG: { + name: 'Tenderly project slug', + description: '', + value: '', + provision_type: EnvProvisionType.USER, + }, + STAKING_TOKEN_CONTRACT_ADDRESS: { + name: 'Staking token contract address', + description: '', + value: '', + provision_type: EnvProvisionType.COMPUTED, + }, + COINGECKO_API_KEY: { + name: 'Coingecko API key', + description: '', + value: '', + provision_type: EnvProvisionType.USER, + }, + STAKING_CHAIN: { + name: 'Staking chain', + description: '', + value: '', + provision_type: EnvProvisionType.COMPUTED, + }, + STAKING_ACTIVITY_CHECKER_CONTRACT_ADDRESS: { + name: 'Staking activity checker contract address', + description: '', + value: '', + provision_type: EnvProvisionType.COMPUTED, + }, + MIN_SWAP_AMOUNT_THRESHOLD: { + name: 'Minimum swap amount threshold', + description: '', + value: '', + provision_type: EnvProvisionType.COMPUTED, + }, + ALLOWED_CHAINS: { + name: 'Allowed chains', + description: '', + value: '', + provision_type: EnvProvisionType.COMPUTED, + }, + TARGET_INVESTMENT_CHAINS: { + name: 'Target investment chains', + description: '', + value: '', + provision_type: EnvProvisionType.COMPUTED, + }, + INITIAL_ASSETS: { + name: 'Initial assets', + description: '', + value: '', + provision_type: EnvProvisionType.COMPUTED, + }, + SELECTED_STRATEGIES: { + name: 'Selected strategies', + description: '', + value: + '["merkl_pools_search", "balancer_pools_search", "asset_lending"]', + provision_type: EnvProvisionType.FIXED, + }, + }, + }, ] as const; export const getServiceTemplates = (): ServiceTemplate[] => SERVICE_TEMPLATES; diff --git a/frontend/constants/urls.ts b/frontend/constants/urls.ts index 2dbb43f5..c272063e 100644 --- a/frontend/constants/urls.ts +++ b/frontend/constants/urls.ts @@ -29,7 +29,8 @@ export const REWARDS_HISTORY_SUBGRAPH_URLS_BY_EVM_CHAIN = { 'https://api.studio.thegraph.com/query/81371/gnosis-pearl-rewards-history/version/latest', [EvmChainId.Base]: 'https://api.studio.thegraph.com/query/67875/olas-base-staking-rewards-history/version/latest', - [EvmChainId.Mode]: 'TBD', + [EvmChainId.Mode]: + 'https://api.studio.thegraph.com/query/67875/olas-mode-staking-rewards-history/version/latest', }; // discord diff --git a/frontend/enums/StakingProgram.ts b/frontend/enums/StakingProgram.ts index 47587995..6fc75c1d 100644 --- a/frontend/enums/StakingProgram.ts +++ b/frontend/enums/StakingProgram.ts @@ -8,5 +8,4 @@ export enum StakingProgramId { PearlBetaMechMarketplace = 'pearl_beta_mech_marketplace', OptimusAlpha = 'optimus_alpha', MemeBaseAlpha = 'meme_base_alpha', - ModiusAlpha = 'modius_alpha', } diff --git a/frontend/next.config.mjs b/frontend/next.config.mjs index e7f80a60..6fdf979f 100644 --- a/frontend/next.config.mjs +++ b/frontend/next.config.mjs @@ -36,6 +36,7 @@ const nextConfig = { OPTIMISM_RPC: process.env.OPTIMISM_RPC, BASE_RPC: process.env.BASE_RPC, ETHEREUM_RPC: process.env.ETHEREUM_RPC, + MODE_RPC: process.env.MODE_RPC, }, };