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
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

Transaction failed upon updation of contract state variable

I have deployed my following contract to ropsten network, making some transaction ok. when I consumed all my tokens (totalSupply) and confirmed it (showing totalSupply = 0) . After confirmation, i call setTotalSupply. But when i called setTotalSupply (through making trx with value =0, value=100gwei or without value parameter .. all are in vein… my […]

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 […]