Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvc94ch committed Jun 27, 2023
1 parent 552e330 commit a3482f2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
10 changes: 6 additions & 4 deletions chains/astar/server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl BlockchainClient for AstarClient {
public_key: &PublicKey,
options: &Self::MetadataParams,
) -> Result<Self::Metadata> {
self.metadata(public_key, options).await
self.client.metadata(public_key, options).await
}

async fn submit(&self, transaction: &[u8]) -> Result<Vec<u8>> {
Expand Down Expand Up @@ -130,7 +130,7 @@ impl BlockchainClient for AstarClient {
mod tests {
use super::*;
use ethers_solc::artifacts::Source;
use ethers_solc::{CompilerInput, Solc};
use ethers_solc::{CompilerInput, EvmVersion, Solc};
use rosetta_client::EthereumExt;
use rosetta_docker::Env;
use sha3::Digest;
Expand Down Expand Up @@ -184,8 +184,10 @@ mod tests {
let source = format!("contract Contract {{ {source} }}");
let mut sources = BTreeMap::new();
sources.insert(Path::new("contract.sol").into(), Source::new(source));
let input = &CompilerInput::with_sources(sources)[0];
let output = solc.compile_exact(input)?;
let input = CompilerInput::with_sources(sources)[0]
.clone()
.evm_version(EvmVersion::Homestead);
let output = solc.compile_exact(&input)?;
let file = output.contracts.get("contract.sol").unwrap();
let contract = file.get("Contract").unwrap();
let bytecode = contract
Expand Down
8 changes: 5 additions & 3 deletions chains/ethereum/server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ impl BlockchainClient for EthereumClient {
mod tests {
use super::*;
use ethers_solc::artifacts::Source;
use ethers_solc::{CompilerInput, Solc};
use ethers_solc::{CompilerInput, EvmVersion, Solc};
use rosetta_client::EthereumExt;
use rosetta_docker::Env;
use sha3::Digest;
Expand Down Expand Up @@ -397,8 +397,10 @@ mod tests {
let source = format!("contract Contract {{ {source} }}");
let mut sources = BTreeMap::new();
sources.insert(Path::new("contract.sol").into(), Source::new(source));
let input = &CompilerInput::with_sources(sources)[0];
let output = solc.compile_exact(input)?;
let input = CompilerInput::with_sources(sources)[0]
.clone()
.evm_version(EvmVersion::Homestead);
let output = solc.compile_exact(&input)?;
let file = output.contracts.get("contract.sol").unwrap();
let contract = file.get("Contract").unwrap();
let bytecode = contract
Expand Down

0 comments on commit a3482f2

Please sign in to comment.