When you create an ERC20 cryptocurrency in solidity you initialize it with a number of decimals. If you total supply is 10k and the number of decimals is 4, your token supply will display as 100000000 (10,000.0000).   In Solidity, you simply do YourN...
compile.js :  const path = require('path'); const solc = require('solc'); const fs = require('fs-extra');  const buildPath = path.resolve(__dirname, 'build'); fs.removeSync(buildPath);  const campaignPath = path.resolv...
I have a node js process that creates a web3 websocket connection, like so:  web3 = new Web3('ws://localhost:7545')   When the process completes (I send it a SIGTERM), it does not exit, but rather hangs forever with no console output.  I regi...
I'm working with React, Next.Js, semantic-ui-react and Solidity. It is my goal to print out the users address (from MetaMask) and a ProjectTitle (set by User) as meta infomation for a semantic-ui-react card. To print out the address in the 'h...
Is there any way to auto-generate test-cases in Truffle?  As an example, the AutoFixture Library was helping me to auto-generate test-cases in xUnit. I'm looking for a similar functionality....
currently i'm working on a ethereum dapp(voting), in my smart contract i have a function to fetch candidate list of type bytes32[] , on the java script side i'm not getting the values instead 0x only  How to parse the value , below is the cod...
I'm getting intermittent "replacement transaction underpriced" errors on the Rinkeby network on the server side of my Node.JS dApp.  I am using the exact amount for estimated gas in my transaction send() call returned to me by the estimat...
I have deployed a contract with following push function to my local privatechain via remix.  struct TestComplex{     address testValue;     address delegate;     uint testInt; } TestComplex[] testArray; function setTestArrayByPush( address _delegate,...
Hey I'm developing a simple smart contract on solidity and I crashed into a problem. Everytime I try to run setWord function I get an error "transact to HelloWorldContract.setWord errored: Error encoding arguments: SyntaxError: Unexpected tok...
I'm trying to create an Ethereum account through Node.js. This is my code:  export async function createNewAccount() {     var web3Instance =  new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));     return web3Instance.eth...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.