current position:Home>I'm following the DAPP of the course to practice voting. How can I provide a "value" to Rama in line 7?

I'm following the DAPP of the course to practice voting. How can I provide a "value" to Rama in line 7?

2022-02-03 23:42:05 Q & A of Denglian community

image.png




Take the answer 1:

After the version upgrade , More stringent type checks , Now we need to do string To hex Transformation :

module.exports = function(deployer) {  deployer.deploy(safemath);  deployer.link(safemath, voting);  deployer.deploy(voting, [web3.utils.asciiToHex("Rama"), web3.utils.asciiToHex("Nick"), web3.utils.asciiToHex("Jose")]);};





Other answers 1:

copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.
https://en.netfreeman.com/2022/02/202202032342034311.html

Random recommended