Skip to content

Commit

Permalink
Fix hex import
Browse files Browse the repository at this point in the history
  • Loading branch information
Jouzo committed Apr 18, 2023
1 parent ebc2e07 commit 2a86059
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/ain-grpc/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use std::sync::Arc;
#[rpc(server)]
pub trait MetachainRPC {
#[method(name = "eth_call")]
fn call(&self, input: EthTransactionInfo) -> Result<Vec<u8>, jsonrpsee::core::Error>;
fn call(&self, input: EthTransactionInfo) -> Result<String, jsonrpsee::core::Error>;

#[method(name = "eth_accounts")]
fn accounts(&self) -> Result<Vec<H160>, jsonrpsee::core::Error>;
Expand Down Expand Up @@ -114,7 +114,7 @@ impl MetachainRPCModule {
}

impl MetachainRPCServer for MetachainRPCModule {
fn call(&self, input: EthTransactionInfo) -> Result<Vec<u8>, jsonrpsee::core::Error> {
fn call(&self, input: EthTransactionInfo) -> Result<String, jsonrpsee::core::Error> {
let EthTransactionInfo {
from,
to,
Expand All @@ -136,7 +136,7 @@ impl MetachainRPCServer for MetachainRPCModule {
.evm
.call(from, to, value, data.as_bytes(), gas, vec![]);

Ok(Hex::encode(data))
Ok(hex::encode(data))
}

fn accounts(&self) -> Result<Vec<H160>, jsonrpsee::core::Error> {
Expand Down

0 comments on commit 2a86059

Please sign in to comment.