diff --git a/rpc/src/v1/traits/eth.rs b/rpc/src/v1/traits/eth.rs index 9cded5eb9..a28f72c5c 100644 --- a/rpc/src/v1/traits/eth.rs +++ b/rpc/src/v1/traits/eth.rs @@ -80,9 +80,6 @@ pub trait Eth: Sized + Send + Sync + 'static { /// Sends transaction. fn send_transaction(&self, _: Params) -> Result { rpc_unimplemented!() } - /// Sends transaction and signs it in single call. The account is not unlocked in such case. - fn sign_and_send_transaction(&self, _: Params) -> Result { rpc_unimplemented!() } - /// Sends signed transaction. fn send_raw_transaction(&self, _: Params) -> Result { rpc_unimplemented!() } @@ -155,7 +152,6 @@ pub trait Eth: Sized + Send + Sync + 'static { delegate.add_method("eth_getCode", Eth::code_at); delegate.add_method("eth_sign", Eth::sign); delegate.add_method("eth_sendTransaction", Eth::send_transaction); - delegate.add_method("eth_signAndSendTransaction", Eth::sign_and_send_transaction); delegate.add_method("eth_sendRawTransaction", Eth::send_raw_transaction); delegate.add_method("eth_call", Eth::call); delegate.add_method("eth_estimateGas", Eth::estimate_gas); diff --git a/rpc/src/v1/traits/personal.rs b/rpc/src/v1/traits/personal.rs index 0cf72951c..0619d7ada 100644 --- a/rpc/src/v1/traits/personal.rs +++ b/rpc/src/v1/traits/personal.rs @@ -30,12 +30,16 @@ pub trait Personal: Sized + Send + Sync + 'static { /// Unlocks specified account for use (can only be one unlocked account at one moment) fn unlock_account(&self, _: Params) -> Result { rpc_unimplemented!() } + /// Sends transaction and signs it in single call. The account is not unlocked in such case. + fn sign_and_send_transaction(&self, _: Params) -> Result { rpc_unimplemented!() } + /// Should be used to convert object to io delegate. fn to_delegate(self) -> IoDelegate { let mut delegate = IoDelegate::new(Arc::new(self)); delegate.add_method("personal_listAccounts", Personal::accounts); delegate.add_method("personal_newAccount", Personal::new_account); delegate.add_method("personal_unlockAccount", Personal::unlock_account); + delegate.add_method("personal_signAndSendTransaction", Personal::sign_and_send_transaction); delegate } }