Complete the code to deploy a smart contract using a deployment function.
contract = [1]('MyContract')
The deploy function is used to send the smart contract to the blockchain network.
Complete the code to wait for the deployment transaction to be confirmed.
tx_receipt = tx.wait([1])Waiting for 1 confirmation ensures the deployment is recorded on the blockchain.
Fix the error in the deployment code by choosing the correct network parameter.
network = [1] # Choose the correct network for deployment
Deploying to 'mainnet' means the contract is live on the real blockchain.
Fill both blanks to set the gas limit and gas price for deployment.
tx = contract.deploy(gas=[1], gasPrice=[2])
Gas limit is set to 3,000,000 and gas price to 1,000,000,000 wei for deployment.
Fill all three blanks to create a deployment script that compiles, deploys, and waits for confirmation.
compiled = compiler.compile('[1]') contract = blockchain.deploy(compiled) tx_receipt = contract.tx.wait([2]) print('Contract deployed at:', contract.[3])
The script compiles MyContract.sol, waits for 1 confirmation, and prints the contract's address.