In case we want to deploy a contract by web3.js
we can easily determine the balance of the contract at time of deployment as follows:
const thisContract = new web3.eth.Contract(abi);
thisContract.deploy({
data: bytecode,
arguments: [< parameters of the constructor>]
}).send({
from: "0x3455D7167A2EE2d660EE85F8e90C6b3B1cCB7163",
gas: 5000000 ,
gasPrice: '3000000000',
value: 5000 // here we determine the balance of the contract
},
function(error, transactionHash) {
console.log(error);
console.log(transactionHash);
console.log('function exec');
}).then(function(newContractInstance) {
console.log('Contract Instance:' + newContractInstance.options.address);
});
In this example, the balance of the contract is value: 5000
.
However, when we want to do this by remix
, is there any option to determine the value of the balance of the contract
at time of deployment ?