All Questions

5
votes
1answer
81 views
+50

Deploying contract with no cost (gasPrice 0) on private network

In order to achieve a no-coin bootstrapping of my private network I'm trying to deploy a first special contract having zero funds in owner wallet (every wallet of this private network should have zero ...
0
votes
0answers
5 views

Infura V3 spec cannot find Project Id

I used to use the old version of infura and it worked just fine. The latest version is not working as it states that it cannot find the id despite it being there. https://mainnet.infura.io/v3/...
1
vote
1answer
42 views

Debugging a VM error in solidity

I'm getting the following error while running a test in truffle: Error: Returned error: VM Exception while processing transaction: revert Now, the code is simply to big and complicated to run ...
0
votes
1answer
8 views

timed transactions using web3-1.0

I am creating a dapp using web3-1.0. I have a contract that stores personal data for a particular user(account). I want to implement a functionality so that a user can share his data (stored in the ...
0
votes
1answer
9 views

How to catch error thrown by require in node.js

I have a solidity function with only one statement i.e., require(). My logic is if that function throws error then the data is invalid otherwise valid. But that error is not caught in err parameter of ...
1
vote
2answers
302 views

Quorum - oversized data during contract creation - contract code size limit

While creating contract, I am getting the error "oversized data" during contract creation. Other than modifying the go-ethereum code file to increase the maxCodeSize, or splitting the contracts up, ...
1
vote
2answers
8 views

How estimate smart contract deployment and transactions price?

I can deploy the same smart contract and invoking four transactions on it on Ropsten network. How can I estimate the price of the exactly same operations but on the Mainnet network?
0
votes
1answer
13 views

Emit not firing event more than once

I'm experimenting a little bit with the blockchain, I'm currently trying to send from an oracle an address to store on the blockchain through a smart contract. The code (very simple and without checks)...
0
votes
2answers
33 views

Windows 10 private net can't connect to the other peers, geth: 1.8.11

System information: Geth version: Geth/1.8.11-unstable OS & Version: WINDOWS10 I modified the main net Genesis config parameters in DefaultGenesisBlock in genesis.go, and I replaced the ...
-1
votes
0answers
8 views

using web3 1.0 for approving signed transaction by another account before appending to the blockchain

I am making a dapp using web3 1.0. I want to send a transaction from one account which contains some data and I want it to be stored in a specific smart contract only when the other account has ...
0
votes
1answer
46 views

Update private chain from homestead to byzantium

I need to update my the version of my chain from homestead to Byzantium. Who can tell me how to do it? thanks.
3
votes
2answers
197 views

AssertionError: error message must contain revert

I have tried a lot of research. I still somehow can't find and understand why this error occurs when im in private network. But if in 127.0.0.1:7545 which ganache, everything seems to be working, all ...
2
votes
0answers
6 views

Node Discovery Protocol - Node Table entries

I am currently trying to understand the node discovery protocol in ethereum. I found a few docs, where one of it is: https://github.com/ethereum/devp2p/blob/master/discv4.md It says, that the ...
0
votes
0answers
6 views

Verify transfered amount of two transactions from same ERC20 to same Contract

I making a contract to sell stuff in a decentralized way and want to use following method to transfer founds. function transferToken(address token, address from, uint256 amount) internal { IERC20 ...
1
vote
0answers
7 views

How to handle require/revert/assert errors properly

I'm trying to find an easy pattern to revert/rollback a write transaction. The first idea was to log a GenericErrorEvent but then I noticed that it will never be emited if any require/revert/assert ...
0
votes
1answer
31 views

Design of contract that mediates a transaction between a seller and a buyer

I'm working on designing an application that requires a contract to mediate a transaction between a seller and a buyer. The buyer will initiate the game by paying the contract, the contract will then ...
0
votes
0answers
10 views

Out of gas error while receiving tokens

I have an issue: I want to receive some BOKKY tokens to test it. When I use simple wallets I just send ethers and receive tokens, everything works fine. I also have my own smart contract (multisig ...
0
votes
1answer
32 views

Execution of sending transaction never ends [UPDATED]

I send a transaction with web3 1.0.0 from a script like: async function sending(deployed_contract) { await deployed_contract.methods.mymethod(1).send({from: account}) .on('...
0
votes
0answers
11 views

prompt for metamask unlock

Is there a way to automatically open metamask unlock prompt ? Since I am able to detect metamask is available, instead of redirecting user to unlock.html I would prefer to try automatically prompt ...
1
vote
0answers
24 views

How to send Custom tokens ERC20 fromWallet - ethers.js

I have tried this solution and it worked but only if I use privateKey of the wallet which I used to create custom tokens but what if I want to send from B wallet to C wallet and when I am trying it, ...
0
votes
0answers
13 views

Strange behavior of solidity program

After a long debugging I found that I had two following problems in a private ethereum network using geth: If I have a require statement then the code is not executed on the EVM. The solution I found ...
0
votes
1answer
38 views

Make a transaction to Node 1 without syncing the blockchain on Node 2

Is there any way in which I can send a transaction to a contract deployed on Node 1 from Node 2 without syncing the entire blockchain on Node 2. I basically want to access the Node 2 without having ...
1
vote
0answers
5 views

One-to-many mapping inside struct

I have two structs: struct A{ uint bid; mapping(uint => B[]) BMap; //bid - index for struct B } struct B{ uint cid; } mapping(uint => A[]) AMap; How can we push and fetch 'cid' ...
1
vote
1answer
33 views

What are the inputs to the truffle Txn?

I am testing truffle now and I want to know more about what it deploys and how. It seems to use two txns. I have some results - Running migration: 2_deploy_contracts.js Deploying CA12... ... ...
1
vote
1answer
38 views

How to check if the address is an ERC20 contract?

edit) VM execution error was a bug on Web3, confirmed my code works fine. I am trying to fetch random addresses from blockchain and trying to categorize them if it is an ERC20 contract address or not....
48
votes
5answers
12k views

How can you decompile a smart contract?

On the blockchain I can inspect the code of a contract, and see the EVM opcodes. Is there a way to decompile this and convert it back to (Solidity) source code?
1
vote
0answers
22 views

HDWalletProvider & truffleconfig: 'truffle migrate' will compile but not do anything else

I am trying to build a React app with Truffle. Firstly, my file structure is like so, with root_dir being the project root directory: root_dir/node_modules/src/libs/truffle All of truffle's files, ...
9
votes
2answers
3k views

Please provide a summary of the Ethereum hard forks

The question Please confirm what the hard forks of Ethereum were and when they took place was asked on Reddit by u/Tykerr.
0
votes
1answer
43 views

Are Transactions and Receipts 1-to-1?

Ethereum maintains an Transaction Trie and a Receipts Trie and I'm trying to visualize how that data would be contained in a relational database. I believe both Tries would have a primary key of ...
0
votes
1answer
35 views

go-ethereum: deploy contract with pub + private + key + password

I'm not sure if I create the right title. But the problem is: I do have a public and private key from ganache network. I want to deploy contract using go-ethereum which requires me to setup keystore ...
1
vote
1answer
43 views
1
vote
1answer
64 views

Getting Addresses using a Path causes the error: Could not derive hardened child key

I am using ethereumjs-wallet npm package to generate a unique wallet address for each user. However instead of using the mnemonic/seed, a public extended key xpub will be used instead to keep the ...
2
votes
1answer
31 views

Is it possible to check the Thrid party token ( USDT ) within my ERC223 contracts?

I want to check how many tokens are received in my contracts, so that I am able to allocate MY TOKENS to the TOKEN Sender. I tried several ways like approveAndCall, but its not working. I don't ...
0
votes
1answer
38 views

Modifier condition always false

I am passing an array of addresses into a contract from a parent contract. Using that I am generating a mapping with those address to quickly verify the msg.sender is part of the set mappings. To ...
1
vote
1answer
34 views

Is there any simple explanation to multisig wallets?

I read on ConsenSys and Ethereum MultiSigWallet. I got that "The purpose of multisig wallets is to increase security by requiring multiple parties to agree on transactions before execution. ...
0
votes
0answers
19 views

Ganache-cli EADDRINUSE 127.0.0.1:8545 error?

when i start ganache-cli with command, it gives this error : ❯ ganache-cli Ganache CLI v6.4.1 (ganache-core: 2.5.3) Error: listen EADDRINUSE 127.0.0.1:8545 at Server.setupListenHandle [as ...
0
votes
2answers
14 views

Calling an address array in web3 returns an error that the method needs arguments

I'm declaring a public address array in my contract, but when I call it, I get an error saying it's expecting an argument. Can someone shine a light on what is happening here? Contract.sol uint ...
2
votes
1answer
243 views

How to calculate the merkle proof for quering the balance of a token holder?

I know this can be done through accessing the full node of Ethereum, but I want to know, how could I do it technically? Suppose I have an ERC20 token contract having address 0xabc.. and Alice is the ...
1
vote
1answer
12 views

web3js recover returns different address than what signed message

Web3js as of version 1.0.0 beta supports an interface for verifying signed messages: https://github.com/ethereum/web3.js/issues/404 This is documented here: https://web3js.readthedocs.io/en/1.0/web3-...
0
votes
2answers
34 views

Can the exchange get my ether in any way

I send some ether from exchange A to B via smart contract, however the latter does not support smart contract at moment, is there any way to get those ether back?
0
votes
0answers
19 views

Error: Invalid bytes string given: 0x

Contract code: function getAddressDnaIds(address owner) external view returns(uint256[]) { return addressDnaIds[owner]; } Code causing the error: var dna = await this.airdrop.methods....
0
votes
2answers
37 views

Code Example from “Mastering Ethereum: Building Smart Contracts and DApps” doesn't work

I'm reading the Ethereum book of Gavin Wood right know and the following code example gives an error message when I try to compile it with truffle: pragma solidity ^0.4.22; contract calledContract { ...
1
vote
1answer
36 views

Trading ETH with lightweight Know Your Customer requirements

Clearly banks follow AML/KYC regulations. But every bitcoin exchange (Ethereum exchange) I've seen has registration requirements that are far in excess of any bank I've used. Gemini requires your ...
1
vote
1answer
25 views

How to get the value of the transaction?

I am using web3.py but I need help to know the value of the transaction sent. I know that the information is stored in the input but how do I parse the string. I know nothing about ABI. Here is the ...
0
votes
1answer
39 views

Assert(false) not executing

I am running a mocha test for a solidity SC. One of my test function should pass and then, just after that i am calling assert(false), but it is not executing. it('only manager can call the ...
0
votes
1answer
44 views

Remove coinbase transactions in private net

I was willing to setup a private ethereum network with low difficulty. I can fix the difficulty of each block to 1 (or constant) to avoid problem of very high difficulty with increase in no of blocks. ...
0
votes
1answer
10 views

Metamask Failed transaction when sending out BAT tokens

I've been trying to send some BAT tokens out of my metamask wallet for quite awhile and it keeps eating up all my eth gas fees. I even increased the gwei fee to 100 and paid .50 USD as the fee. And it ...
1
vote
1answer
8 views

Truffle compile fails: could not find file from any sources

I'm following the steps of this tutorial. I created a simple contract, TodoList.sol pragma solidity ^0.5.0; contract TodoList { uint public taskCount = 0; } Then I run truffle compile and get ...
1
vote
1answer
16 views

How to add an address for which I have the corresponding private key into MEW?

I'm quite new to Ethereum, so, pls, forgive me if I say something wrong. How can I see the balance of one already existing address, for which I have the corresponding private key, in MyEthereumWallet?...
0
votes
1answer
36 views

Interfaces implementation visibility

I have this interface: pragma solidity ^0.4.24; interface EventsInterface { function removeValueFromArray(uint _userId, uint[] array) external returns(uint[]); } And this contract: pragma ...

15 30 50 per page