All Questions

0
votes
0answers
2 views

Miner address is all zero in block

I sent a transaction in clique POA private chain and get the block via transaction hash. Why is the miner address for this transaction all zero? step 1: send a transaction > eth.sendTransaction({...
0
votes
1answer
6 views

Parse Error, Expected Pragma on remix

I am new to remix and can't figure out what is wrong with this basic function. pragma solidity ^0.5.1; contract Pie { uint256 public p; } function pie () public returns (uint256) { ...
0
votes
1answer
5 views

truffle testing enum

I am trying to test an enum value from a test. This is simplified version of the contract: pragma solidity >=0.5.0 <0.7.0; contract Foo { enum State { StateA, StateB } State ...
0
votes
0answers
7 views

Getting “Error while loading the content of <contract>.sol”

After setting up the "embark-create-react-dapp-template", I didn't see a folder for contracts. So I've created one under the root level of the project (just like in the demo). But then when I executed ...
0
votes
1answer
8 views

How data is secured on ethereum network?

Blockchain is distributed decentralized database and same data is present on every node on network so now anybody on the network can see my data, so how it is secured over blockchain network?
0
votes
0answers
6 views

Drizzle installation end up with errors

I have followed the this tutorial from Truffle official page, First few steps goes smoothly and when i tried to install drizzle on client directory as per the tutorial says it ended up with this error ...
0
votes
0answers
5 views

Quorum 7nodes example unable to finish simplestorage migration using privateFor

I'm following this example: truffle quorum example I created a cluster using docker-compose and all the nodes are up and running but when I run the truffle migrate command the migration doesn't end ...
0
votes
2answers
11 views

Solidity Compatibility Configuration

I am a cyber security analyst who is new to ethereum and working on a project to study crypto security. It's a series of 22 vulnerable smart contracts that you're supposed to exploit. For anyone who ...
0
votes
0answers
19 views

Setting array.length to 0 triggers an error on solidity 0.5.0

Why setting array.length to 0 triggers an error ? I have a function that deletes an element from a dynamic array of structs within a mapping as follows: mapping(address => MyStruct[]) public ...
0
votes
1answer
18 views

How to read uint256[] array from a method in a smart contract?

I'm using this function in my smart contract. It returns an uint256[] array containing the tokens that the user owns. /** * @dev Returns all of the tokens that the user owns * @return An array ...
0
votes
0answers
16 views

Create an ERC20 Stablecoin

How to create a stable coin with an ERC20 token contract ? Does it require contract to be modified ? Are there some good practices or standards ?
2
votes
3answers
159 views

Handling decimals in somewhat complex math

I'm a bit lost on what to do with the following calculation. The problem is that decimals are being round up/down, which obviously doesn't give me the result I desire. int totalValue = 275000; int ...
1
vote
1answer
14 views

No web3 instance injected following the dApp University Tutorials

I've been following Dapp University's videos on how to make IPFS uploads with Euthereum Smart contracts, and after I manage to 'npm run start' in the command line it opens up the HTML, but it always ...
0
votes
0answers
14 views

How to prepare for blockchain interview?

I am learning blockchain and want to pursue my career on blockchain, so what will be the best way to do that? What certification I must do and what think I should cover? appreciate all your career ...
0
votes
0answers
9 views

stack too deep user function [duplicate]

I am building a dapp, the user structure is composed of multiple attribute so I divided it to 3 structures, but I still have the problem of the deep stack in the registration function struct ...
0
votes
1answer
16 views

Web3 - Cannot read property 'clearSubscriptions' of undefined

While creating a web3 instance, and attempting to call setProvider with a valid provider (Ganache), I get a TypeError. TypeError: Cannot read property 'clearSubscriptions' of undefined Steps to ...
0
votes
1answer
19 views

What is difference between geth, myEtherWallet and etherscan

I am new to blockchain technology and learning it, there are many terms of blockchain which confused me like geth client, meta mask, etherscan and myEtherWaller. I used geth it's a ethereum client to ...
0
votes
2answers
19 views

how does this honeypot works?? 'OpenAddressLottery'

/** * Source Code first verified at https://etherscan.io on Saturday, February 10, 2018 (UTC) */ pragma solidity ^0.4.19; /* * This is a distributed lottery that chooses random addresses as lucky ...
1
vote
1answer
13 views

Auction contract problem regarding highest bid display

I have an Auction contract which has a function like this: function bid() payable{ //calculate and store highest bid value } But because each transaction takes time to mine, so when a user bids ...
0
votes
1answer
16 views

How to pass a document as function argument(upload document)

I am working on a project in solidity where I want to generate a SHA256 hash value for the document. So which means when I choose a file using a function the function should return the hash value. ...
0
votes
0answers
7 views

Private chain access mode

I set up a private chain with 4 nodes.Two nodes are sealer, the others are normal ones. To send a transaction, need to attach one node and then send it. I think in this way, only one node is used to ...
0
votes
1answer
9 views

How much gas does looking up block.timestamp consume?

Trying to get some insight as to whether or not it's more optimal to call block.timestamp repeatedly for comparisons or to set a (memory) variable to hold the value and use it instead. I've looked at ...
0
votes
1answer
15 views

Parity Mnemonic or Keyfile not compatible with MEW?

I'm on a new computer and I have 2 ETH addresses I created on parity in december 2017 and february 2018. Now I thought I followed the plan on what to do to secure the addresses but when I enter the 12 ...
0
votes
0answers
10 views

Parity synced at not existing block 4839212

I have problem with parity, cant get synchronization in archive mode to end, anything, changing arguments, max-, min-, snapshot-peers, parity verisions do not help. I have blockchain in archive mode ...
0
votes
0answers
7 views

Java class generated with web3j has a “deploy” method wherein initialWeiValue, initialSupply have to be both specified. Isn't it the same amount?

Method in the java class generated by web3j is like this: public static RemoteCall<Crowdfunding> deploy(Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit, ...
0
votes
1answer
18 views

What happen when I format my blockchain setup PC? [on hold]

Suppose I have ethereum blockchain network setup in my PC and when I format my PC how I will recover my data? Normal in client server architecture my data doesn't depend on my PC whether I format or ...
0
votes
1answer
11 views

VM error transaction has been revert to initial state [on hold]

pragma solidity ^0.5.8; contract PharmaChain { address public superAdmin; //address of the super admin uint quotlist; enum Status { NotExist, Pending, Aproved, Rejected, ...
1
vote
0answers
14 views

truffle unbox react - front end is unable to read / set state of the contract

I am experiencing problems with the Truffle React boilerplate code that the front end is unable to read / set state of the contract. Here are the details: I unboxed the React boilerplate using ...
1
vote
0answers
4 views

Access to XMLHttpRequest at 'https://ropsten.infura.io/' from origin 'null' has been blocked by CORS policy

I want to interact with a simple contract on the ropsten network this is my Js code : Web3 = require('web3'); if (typeof web3 != 'undefined') { web3 = new Web3(web3.currentProvider); console....
0
votes
1answer
15 views

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 ...
0
votes
0answers
13 views

How use vscode to debug geth with breakpoints interactively?

I set up vscode enviroment and launch a node with launch.json: { "name": "Launch geth main", "type": "go", "request": "launch", "mode": "debug", ...
0
votes
1answer
40 views

Unable to deploy the smart contract using solc compiler in mac

I am trying to deploy the Lottery contract using solc compiler of verison 0.4.17 but it's showing me nothing. But the same contract is working good in the remix ide. I providing you the the Solidiy ...
0
votes
1answer
31 views

The method eth_sendTransaction does not exist/is not available on infura

Im trying to send transaction to simple greeter contract with web3.js on infura node.while doing soo, Im getting this error. throw errors.InvalidResponse(result); ^ Error: The method ...
0
votes
0answers
17 views

Accidentally sent REN (ETH token) to my ETH contract address using my Ledger Nano S. Can someone help please?

I sent REN (ETH token) to my ETH contract address by accident while using my ledger nano s. Can someone help me understand what's happened to the tokens and if I can retrieve my REN token from my ETH ...
0
votes
1answer
15 views

Privacy concern

I have a smart contract where user submit data based on a task set by the owner, post doing so the owner in another contract offers this data to the highest bidder. Is it possible to ensure the ...
0
votes
0answers
15 views

ERC721 how to use tokenOfOwnerByIndex() to list tokens owned by a user

I'm trying to list ERC721 tokens owned by a user. I found there is tokenOfOwnerByIndex(address _owner, uint256 _index) that can make the looping shorter. When I checked ERC721Token.sol from ...
-1
votes
0answers
10 views

Error! Invalid constructor arguments provided. Please verify that they are in ABI-encoded format [on hold]

I having trouble Verify & Publish Contract Source Code Here is the code /** * Source Code first verified at https://etherscan.io on Friday, May 10, 2019 (UTC) */ pragma solidity ^0.5.0; /** ...
-2
votes
0answers
8 views

truflle consile error BN { negative: 0, words: [ 0, <1 empty item> ], length: 1, red: null [on hold]

i was getting error in truffle console BN { negative: 0, words: [ 0, <1 empty item> ], length: 1, red: null
1
vote
0answers
7 views

What is the value range of the parameter optimize-runs when running the solidity compiler?

I would like to know what the allowed value range of the parameter optimize-runs is when running the Solidity compiler. I didn't find the answer in the official document of Solidity.
0
votes
0answers
9 views

metamask-BSC=ETH

Dear support please explain how i can BSC To ETH I'll convert to 29,000 BSC I sent to this address ETH 0xdc05a177e5691ea5294fdbee712f5ab18f474b34 Please see the link below from my problem https:...
0
votes
0answers
15 views

I accidentally sent ETH token REN to the contract address. Can I get it back? [on hold]

I sent my REN to the contact address by mistake. (0x408e41876cccdc0f92210600ef50372656052a38) Please help. I was meant to send it to my REN funds address While using my Ledger I mixed up the contract ...
0
votes
1answer
26 views

How does this assembly function work?

From the Docs, how does this operation create a new "memory end"? mstore(0x40, add(o_code, and(add(add(size, 0x20), 0x1f), not(0x1f))) Context: library GetCode { function at(address _addr) public ...
0
votes
0answers
7 views

Transfer function not working properly with calculations

function payWorker1(address schoolId) public payable returns(bool){ require(Schools[schoolId].moneySent == false); require(Schools[schoolId].verified == true); Schools[schoolId]...
2
votes
2answers
25 views

Metamask injects one account in web3, but calls contracts using another account

Building a React app, MetaMask injects web3, I get accounts[0] from getAccounts(), then pass it to my contract functions together with other parameters. I want my modifiers to lock incoming function ...
0
votes
1answer
23 views

ecrecover not giving back the adress of the sender

I am trying to understand how eliptic curve work and when i try to get the sender of this transaction: https://etherscan.io/tx/0x14a298c1eea89f42285948b7d51eeac2876ca7406c9784b9b90dd3591d156d64 ( ...
0
votes
1answer
20 views

signing transactions with web3.js

Im trying to create a node.js based dapp that interacts with ropsten ethereum network via infura node.here we need sign transaction with web3.js. but the code showing error from the contract side. ...
1
vote
1answer
20 views

How to increase the number of test accounts?

I have encountered a problem where I need a large number of test accounts. How can I increase the number of test accounts from 10. Remix and ganache only give 10 accounts. I require more than that.
1
vote
0answers
35 views

openzeppelin,VM Exception while processing transaction: revert

using openzeppelin-solidity to create crowdsale. Then I use this statement to Buy Token: MyCrowdsaleInstance.sendTransaction({ from: purchaser[1], value: web3.utils.toWei("0.5", "ether"), ...
1
vote
1answer
21 views

Airdrop generated token to multi address by contract failed

Below is my operation steps: I create a token 0x260c4b1cd063599949b530454d22081b94c170ef whose owner is 0xAbA5862c54254750b2EFe8BEB72f528DAF73547F You can check this token's code by https://...
1
vote
1answer
18 views

Return fees - is it save?

I would like to return partially fees to users of my dApp. Once they have reached X amount in fees, I want to make a function that will pay them ethereum automatically. Now my question: Is that secure?...

15 30 50 per page