fix: use correct artifact api (#1019)

This commit is contained in:
Matthias Seitz 2022-03-14 00:44:01 +01:00 committed by GitHub
parent 6b0a1f7911
commit f36bc61eff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ async fn main() -> Result<()> {
let project = Project::builder().paths(paths).ephemeral().no_artifacts().build().unwrap(); let project = Project::builder().paths(paths).ephemeral().no_artifacts().build().unwrap();
// compile the project and get the artifacts // compile the project and get the artifacts
let output = project.compile().unwrap(); let output = project.compile().unwrap();
let contract = output.find("SimpleStorage").expect("could not find contract").into_owned(); let contract = output.find("SimpleStorage").expect("could not find contract").clone();
let (abi, bytecode, _) = contract.into_parts_or_default(); let (abi, bytecode, _) = contract.into_parts_or_default();
// 2. instantiate our wallet & ganache // 2. instantiate our wallet & ganache