Categories
Cryptocurrency Ethereum Mastering Development

problem help me gas * price + value

i see all topic , but yet not slove my problem . please help me <pre> var EthereumTx=require(‘ethereumjs-tx’).Transaction const Web3=require(‘web3’) const web3 = new Web3(‘https://rinkeby.infura.io/v3/85xxxxxxxxxxx2af25e829b8d9df‘) const account1=’0xbd77caf08fe49d3f5aef6f83fc23b8d2129b468f’ const main = async () => { const count = await web3.eth.getTransactionCount(‘0xxxxxxxxxxxxxxxf5aef6f83fc23b8d2129b468f’); const nonce = web3.utils.toHex(count); const block = await web3.eth.getBlock(‘latest’); const gasLimit = web3.utils.toHex(3000000) const gasPrice = […]

Categories
Cryptocurrency Ethereum Mastering Development

Transaction won’t be mined / Failed signing of transaction

I’m trying to send a transaction that writes somesthing on ethereum(kovan) but it seems my transaction is not mined and probably not even send to the network? All my view requests to ethereum work, so my guess is that there is a problem with the signing of my transaction? After firing my script I receive […]

Categories
Cryptocurrency Development Ethereum

send erc 20 tokens

This code works well for ethereum transactions. I just need a way to include data so that I can send erc20 tokens from their contract address. Everything I tried so far failed. I think I’m using web3 6.9.0. Everyone talking about using web3 version 1 or so so is there any tutorials for web3 6.9.0? […]

Categories
Cryptocurrency Development Ethereum

Contract does not exist at address

I have setup a private Quorum network and successfully deployed contracts and executed contract functions using Visual Studio Code and remix. When i try to deploy the exact same contract manually using Web3.js using a newly created account, i am seeing weird behaviour. Running the deployment code(pasted at end) does not show any error in […]

Categories
Development

Call constructor and deploy with web3 and ropsten

I have created a test contract which has been compiled successfully and want to broadcast on ropsten test network using web3js. I have a metmask account which i am using. I would like to know how can i call constructor of my contract and then broadcast on ropsten. I did broadcast one of my contract […]

Categories
Development Java Javascript

State Variable of solidity Contract could not be updated through JavaScript

I have following contract and just want to update its state variable values i.e. totalSupply. But when I try to attempt this task through JavaScript code (given below) by calling its function i.e. setTotalSupply, tts values is not updated. pragma solidity 0.5.1; contract MyContract { uint256 totalSupply; mapping(address => uint256) public balances; address owner; constructor(address […]