Skip to content

Commit

Permalink
Fix delegator example
Browse files Browse the repository at this point in the history
  • Loading branch information
HCastano committed Jan 20, 2023
1 parent 48023ca commit dbf7ac4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/delegator/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ mod delegator {
.endowment(total_balance / 4)
.code_hash(accumulator_code_hash)
.salt_bytes(salt)
.instantiate()
.try_instantiate()
.unwrap_or_else(|error| {
panic!(
"failed at instantiating the Accumulator contract: {:?}",
Expand All @@ -74,15 +74,15 @@ mod delegator {
.endowment(total_balance / 4)
.code_hash(adder_code_hash)
.salt_bytes(salt)
.instantiate()
.try_instantiate()
.unwrap_or_else(|error| {
panic!("failed at instantiating the Adder contract: {:?}", error)
});
let subber = SubberRef::new(accumulator.clone())
.endowment(total_balance / 4)
.code_hash(subber_code_hash)
.salt_bytes(salt)
.instantiate()
.try_instantiate()
.unwrap_or_else(|error| {
panic!("failed at instantiating the Subber contract: {:?}", error)
});
Expand Down

0 comments on commit dbf7ac4

Please sign in to comment.