fix: prepend 0x to eth_getCode responses (#125)

This commit is contained in:
sragss 2022-12-02 15:42:58 -08:00 committed by GitHub
parent 7e3fe40613
commit e132706f0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ impl EthRpcServer for RpcInner {
let node = self.node.read().await;
let code = convert_err(node.get_code(&address, block).await)?;
Ok(hex::encode(code))
Ok(format!("0x{:}", hex::encode(code)))
}
async fn call(&self, opts: CallOpts, block: BlockTag) -> Result<String, Error> {