current position:Home>The token contract of geth private chain deployment is successful, but the totalsupply is 0 and there is no other initialization information. The contract looks like it has not taken effect

The token contract of geth private chain deployment is successful, but the totalsupply is 0 and there is no other initialization information. The contract looks like it has not taken effect

2022-02-03 20:53:47 Q & A of Denglian community

Constructor initial value :

var name = "POINTS0222" ;var symbol = "PTS" ;var decimals = 1 ;var totalSupply = 1000000000 ;

remix I've been tested , No problem .

Geth The output of is as follows :

> null [object Object]Contract mined! address: 0xa778f90dfd69d8e3995ddb086235a1f62e3d6d5d transactionHash: 0xc7347efbe4708403b9fdfea4f2631c4729893e0182850337c5426df8b874a9ce>> platformcontrol.address"0xa778f90dfd69d8e3995ddb086235a1f62e3d6d5d"> platformcontrol.totalSupplyfunction()> platformcontrol.totalSupply()0> platformcontrol.decimals()0>



Take the answer 1:

This problem has nothing to do with the private chain .

Or maybe your calling method is wrong , You try :

platformcontrol.totalSupply.call({from: eth.accounts[0]})





Other answers 1:


Other answers 2:

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

Random recommended