I am learning solidity smart contract. I am using tronbox as my development framework. While deploying contract, I need to send some trx to contract address. So that It will be available in msg.value
. For example this is my constructor function,
constructor() public payable {
require(msg.value == 2 trx, "2 trx initial funding required");
}
How to send this 2 trx, while deploying contract in migration file. For example this is my migration file,
var SimpleBank = artifacts.require("./Simple.sol");
var Migrations = artifacts.require("./Migrations.sol");
module.exports = function(deployer) {
deployer.deploy(Simple);
deployer.deploy(Migrations);
};
question from:
https://stackoverflow.com/questions/65641917/how-to-send-callvalue-or-msg-value-from-migrations-js 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…