Author

Topic: I Call SmartContract Token ERC20, Why Show Hashing Output ? (Web3 + Metamask) (Read 166 times)

copper member
Activity: 86
Merit: 57
Blockchain Enthusiast & AI Enthusiast
By the way, "0x18160ddd" is the signature of the function totalsupply().
but I can't tell why the value wasn't there.
I think that is the Hex function on web3, from some other people's thinking it's because I'm using a new version. But somehow, I'm a little confused with this new one. Even though I used the previous version, it can come out real data. I tried changing HextoASCII (web3 function) too, but it didn't come out.

In the Metamask (Developer) document that I read, they recommend using a new one to make it safer (they said). So I want to try this new Smiley
legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
By the way, "0x18160ddd" is the signature of the function totalsupply().
but I can't tell why the value wasn't there.
copper member
Activity: 86
Merit: 57
Blockchain Enthusiast & AI Enthusiast
I think you mistook "Ethereum" for "Electrum" Smiley

This isn't the right board for technical discussion about ETH.
Use the move topic button below (lower-left) to move this to Altcoin Discussion.
ok thanks, i'm wrong place for discussion.
legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
I think you mistook "Ethereum" for "Electrum" :)

This isn't the right board for technical discussion about ETH.
Use the move topic button below (lower-left) to move this to Altcoin Discussion.
copper member
Activity: 86
Merit: 57
Blockchain Enthusiast & AI Enthusiast
I do not know why with this, even though in the previous version (web3 + Metamask) can issue real data. But now used as hashing (output). I took the example in the code and output below (to get the TotalSupply on the ERC20 Token) :

Quote
const contractInstance = web3.eth.contract(contractAbi).at(contractAddress);
const total_supply = contractInstance.totalSupply.getData();
console.log(total_supply);

Output : 0x18160ddd (this is my problem)

How to showing real data ? In a sense it doesn't come out hashing. Thanks
Jump to: