MCPcopy Create free account
hub / github.com/ddimaria/rust-blockchain-tutorial / deploy_contract

Function deploy_contract

web3/src/helpers.rs:38–48  ·  view source on GitHub ↗
(simple: bool)

Source from the content-addressed store, hash-verified

36 }
37
38 pub async fn deploy_contract(simple: bool) -> H256 {
39 let web3 = web3();
40 let from = *ACCOUNT_1;
41 let nonce = increment_account_1_nonce().await;
42 let data = if simple {
43 [0, 1].to_vec()
44 } else {
45 get_contract()
46 };
47 web3.deploy(from, &data, Some(nonce)).await.unwrap()
48 }
49}

Callers 3

it_deploys_a_contractFunction · 0.85
it_gets_a_contract_codeFunction · 0.85

Calls 4

web3Function · 0.85
get_contractFunction · 0.85
deployMethod · 0.80

Tested by

no test coverage detected