@@ -33,8 +33,11 @@ import ServiceBase from './ServiceBase';
3333
3434import type { AxiosResponse } from 'axios' ;
3535
36- const TestnetContractAddress = '0xdCAe38cC28606e61B1e54D8b4b134588e4ca7Ab7' ;
37- const MainnetContractAddress = '0xACBA4cFE7F30E64dA787c6Dc7Dc34f623570e758' ;
36+ const TestnetKeleContractAddress = '0xdCAe38cC28606e61B1e54D8b4b134588e4ca7Ab7' ;
37+ const MainnetKeleContractAddress = '0xACBA4cFE7F30E64dA787c6Dc7Dc34f623570e758' ;
38+
39+ const TestnetLidoContractAddress = '0x1643E812aE58766192Cf7D2Cf9567dF2C37e9B7F' ;
40+ const MainnetLidoContractAddress = '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84' ;
3841
3942export interface SerializableTransactionReceipt {
4043 to : string ;
@@ -74,10 +77,20 @@ export default class ServiceStaking extends ServiceBase {
7477
7578 getKeleContractAddress ( networkId : string ) : string {
7679 if ( networkId === OnekeyNetwork . eth ) {
77- return MainnetContractAddress ;
80+ return MainnetKeleContractAddress ;
7881 }
7982 if ( networkId === OnekeyNetwork . goerli ) {
80- return TestnetContractAddress ;
83+ return TestnetKeleContractAddress ;
84+ }
85+ throw new Error ( 'Not supported network' ) ;
86+ }
87+
88+ getLidoContractAddress ( networkId : string ) {
89+ if ( networkId === OnekeyNetwork . eth ) {
90+ return MainnetLidoContractAddress ;
91+ }
92+ if ( networkId === OnekeyNetwork . goerli ) {
93+ return TestnetLidoContractAddress ;
8194 }
8295 throw new Error ( 'Not supported network' ) ;
8396 }
@@ -105,6 +118,20 @@ export default class ServiceStaking extends ServiceBase {
105118 } ;
106119 }
107120
121+ @backgroundMethod ( )
122+ async buildTxForStakingETHtoLido ( params : {
123+ value : string ;
124+ networkId : string ;
125+ } ) {
126+ const { serviceContract } = this . backgroundApi ;
127+ const data = await serviceContract . buildLidoStakeTransaction ( ) ;
128+ return {
129+ data,
130+ to : this . getLidoContractAddress ( params . networkId ) ,
131+ value : params . value ,
132+ } ;
133+ }
134+
108135 @backgroundMethod ( )
109136 async setAccountStakingActivity ( {
110137 networkId,
0 commit comments