Skip to content

Commit

Permalink
chore: fmt contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
Darlington02 committed Apr 27, 2024
1 parent 726acde commit bb6dccd
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions contracts/scripts/src/hellostarknet.cairo
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
use sncast_std::{
declare, deploy, DeclareResult, DeployResult, get_nonce, DisplayContractAddress, DisplayClassHash
declare, deploy, DeclareResult, DeployResult, get_nonce, DisplayContractAddress,
DisplayClassHash
};

fn main() {
let max_fee = 99999999999999999;
let salt = 0x3;

let declare_result = declare("HelloStarknet", Option::Some(max_fee), Option::None).expect('contract already declared');
let declare_result = declare("HelloStarknet", Option::Some(max_fee), Option::None)
.expect('contract already declared');

let nonce = get_nonce('latest');
let class_hash = declare_result.class_hash;

println!("Class hash of the declared contract: {}", declare_result.class_hash);

let deploy_result = deploy(
class_hash, ArrayTrait::new(), Option::Some(salt), true, Option::Some(max_fee), Option::Some(nonce)
).expect('deploy failed');
class_hash,
ArrayTrait::new(),
Option::Some(salt),
true,
Option::Some(max_fee),
Option::Some(nonce)
)
.expect('deploy failed');

println!("Deployed the contract to address: {}", deploy_result.contract_address);
}

0 comments on commit bb6dccd

Please sign in to comment.