Ethereum

unable to read updated value after smart contract execution

I am new to blockchain. I am trying to implement a dapp project in my college curriculum. I am trying to implement seller-buyer smart contract on private ethereum node(using solidity, geth console, mist browser). Please help. Problems that I am facing: Once the seller contract is executed after entering all ....

Mia Mia: 2 days ago

Ethereum

How to use HardHat behind a proxy

I'm using HardHat (https://hardhat.org/) (repo (https://github.com/nomiclabs/hardhat)) behind a firewall, requiring outbound connections to use a proxy. This is usually pretty easy, for example to configure NPM (https://docs.npmjs.com/cli/v6/using-npm/config#proxy) for using proxy, you can set environment variables HTTP_PROXY and HTTPS_PROXY. In HardHat, when running commands like npx hardhat compile, HardHat reaches out ....

Evelyn Evelyn: 2 days ago

Ethereum

How do I deposit Ether to Smart Contract using Web3.js

So I am creating a web application that interacts with a smart contract that I deployed on the Ropsten TestNet. I am able to withdraw ether from the contract to my Metamask account using a withdraw function. However I am struggling to find out the correct method to deposit ether ....

Sophia Sophia: 2 days ago

Ethereum

Does an Ethereum contract address hold two different kinds of files, one for the contract bytecode and another for the ABI?

Does an Ethereum contract address hold two different kinds of file, one for the contract bytecode and another for the ABI? ....

Elijah Elijah: 2 days ago

Ethereum

rinkeby balance says 0 after syncing even though transaction shows ether was sent

I'm using truffle to deploy a contract on the rinkeby testnet Here is transaction info saying that my address received ether however as shown below, the balance still shows as 0. truffle(rinkeby)> web3.eth.getTransaction("0x4979d45cb9cf0959a9f2a139eb7adc6a231b866cc52289287bb2dd5b125b0635") { blockHash: '0xdf597f365e50a92bf3edbd37fc293f40d174b1c0a9b6d7a2cfb4df8c785126cb', blockNumber: 1759853, from: '0x31b98d14007bdee637298086988a0bbd31184523', gas: 21000, gasPrice: BigNumber { s: 1, e: 9, c: ....

James James: 2 days ago

Ethereum

Eth node quiknode and infura question

For infura node, whether the API support send transaction or support sending ERC20 token(this is calling contract actually)? supprt creating accounts also? For Quiknode, whether the API will support creating accounts and send traction? even sending erc20 token? How to set to port? 8545? What is the difference for geth ....

Lucas Lucas: 2 days ago

Ethereum

Provable store an array

I'm trying to understand some basis of Solidity, I get how to get multiple values from one query, but don't really understand how to store them, could anyone explain me how to do it? pragma solidity ^0.4.22; import "github.com/provable-things/ethereum-api/provableAPI_0.4.25.sol"; contract ExampleContract is usingProvable { string public ethprice; string public ethvolume; ....

Mia Mia: 2 days ago

Ethereum

How do I handle end-user gas cost in a DApp

So let's say I have a ERC20 token and a DApp that uses said tokens as the currency. Obviously when users interact with my DApp (by sending it some amount of tokens), there will be a gas price involved. I do not want users to have to worry about keeping ....

Emma Emma: 2 days ago

Ethereum

Why use constructor function?

What is the big difference between: contract Crowdsale { MintableToken public token; uint256 public someInt; function Crowdsale (uint256 _constructorArgument){ someInt = _constructorArgument; token = createTokenContract(); } function createTokenContract() internal returns (MintableToken) { return new MintableToken(); } and contract Crowdsale { MintableToken public token = new MintableToken(); uint256 public someInt = ....

Emma Emma: 2 days ago

Ethereum

On each block does all the miners compute the output of deployed transactions into them?

For each block of transactions, miners use computers to repeatedly and very quickly guess answers to a puzzle until one of them wins. In parallel to solving this puzzle, also does all the miners on the blockchain compute the output of the deployed transactions into them? or when the winners ....

James James: 2 days ago