pub async fn deploy(&self, owner: Address, abi: &[u8]) -> Result<H256> {
        let gas = U256::from(1_000_000);
        let gas_price = U256::from(1_000_000);
        let data: Bytes = abi.into();
        let transaction_request = TransactionRequest {
            from: None,
            to: Some(owner),
            value: None,
            gas,
            gas_price,
            data: Some(data),
        };

        self.send(transaction_request).await
    }
/// Deploy a contract to the chain.
///
/// # Examples
///
/// ```ignore
/// let web3 = web3::Web3::new("http://127.0.0.1:8545").unwrap();
/// let account = web3.get_all_accounts().await.unwrap()[0];
/// let contract = include_bytes!("./../../contracts/artifacts/contracts/ERC20.sol/RustCoinToken.json").to_vec();
/// let tx_hash = web3.deploy(account, &contract).await;
/// assert!(tx_hash.is_ok());
/// ```
Deploy a contract to the chain.
Deploy a contract to the chain .
pub async fn deploy(&self, owner: Address, abi: &[u8]) -> Result<H256> {
        let gas = U256::from(1_000_000);
        let gas_price = U256::from(1_000_000);
        let data: Bytes = abi.into();
        let transaction_request = TransactionRequest {
            from: None,
            to: Some(owner),
            value: None,
            gas,
            gas_price,
            data: Some(data),
        };
        self.send(transaction_request).await
    }
pub async fn deploy ( & self , owner : Address , abi : & [ u8 ] ) -> Result < H256 > { let gas = U256 :: from ( 1_000_000 ) ; let gas_price = U256 :: from ( 1_000_000 ) ; let data : Bytes = abi . into ( ) ; let transaction_request = TransactionRequest { from : None , to : Some ( owner ) , value : None , gas , gas_price , data : Some ( data ) , } ; self . send ( transaction_request ) . await }
Deploy a contract to the chain.
Deploy a contract to the chain .
&self
owner
Address
abi
&[u8]
examples
None