Subject: Step 6. Make sure the contract is deployed on the blockchain
Author: WebSpider
In response to: Step 5. Deploy the contract
Posted on: 06/07/2021 07:10:59 AM
After successful deployment of your contract, you should see something similar to the following:
Contract deployed at address: 0x01bf16cfCA22a5CeDa1291DD9512a1BF2A1A44A9
For further verification, you can look up your contract on https://ropsten.etherscan.io/
...
From: 0x7b6ee9541a2741a9f2631fbed9ffc532746be2de
To: Contract 0x01bf16cfca22a5ceda1291dd9512a1bf2a1a44a9Created
Value: 0 Ether ($0.00)
Transaction Fee: 0.00510195 Ether ($0.00)
Gas Price: 0.00000003 Ether (30 Gwei)
Gas Limit: 1,500,000
Gas Used by Transaction: 170,065 (11.34%)
Nonce Position: 0
Input Data: 0x608060405234801561001057600...
It should be noted:
The miners sucked out all 30 Gwei for gasPrice set for this transaction, even though the average gasPrice for Ropsten is 2 Gwei at this point.
The miners honored how much gas should be burned to execute the transaction, but they won't be mercy to take all of your gas and fail your transaction if your gasLimit is reached in the middle of execution.
>
> On 06/07/2021 07:07:41 AM WebSpider wrote:
// account used for connection
let accounts = await web3_conn.eth.getAccounts();
// deploy
const newContractInstance = await contract.send({
from: accounts[0],
gas: 1500000,
gasPrice: '30000000000'
});
console.log('Contract deployed at address: ', newContractInstance.options.address);
References: