All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
5 views

How can MetaMask alert about transaction errors before they are caused?

The MetaMask extension has this feature to warn about transaction errors before a transaction is being made: ALERT: Transaction Error. Exception thrown in contract code. How is this done? A dry ...
0
votes
0answers
5 views

Web3- function returing empty array of structs

I have contract in solidity and I like to return array of structs. I'm using experimental feature on, and in remix in solidity I don't have issue with returing the array, but when I use web3 from ...
0
votes
0answers
6 views

this.contract.methods.implement().call() to call smart contract so it doesn't work

The Button Rand not working. How do I fix it? App.js <<<<< import React from 'react'; import logo from './logo.svg'; ...
0
votes
1answer
9 views

How to retrieve elements from a mapping to an array of structs

I have recently started playing around with SmartContracts and I have run into a problem which I can not find a solution to. I have the following struct and mapping in my Smart Contract: struct ...
1
vote
1answer
11 views

Explanation for small variation in gasUsed while recursively deploying same contract

https://github.com/christianlundkvist/simple-multisig/blob/master/contracts/SimpleMultiSig.sol I'm deploying the above contract recursively and I find that the gasUsed varies by specifically 12 gas. ...
0
votes
1answer
26 views

Can we extend ethereum client or smart contract to use external libraries?

Basically the question is to extend the ethereum clients to bring some capabilities of external libraries on the blockchain either by extending the ethereum client or by using inside smart contracts ...
0
votes
1answer
23 views

Not able to get deployed address of smart contract

Error: connect ECONNREFUSED /home/sanya/.ethereum/geth.ipc at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1106:14) errno: 'ECONNREFUSED', code: 'ECONNREFUSED', syscall: '...
0
votes
1answer
23 views

How to setup ethereum to work on gpus for complex smart contract execution?

Basically the question is to apply some gpu intensive tasks like machine learning algorithms etc using smart contracts, is this possible using any of the available ethereum clients like geth or parity ...
4
votes
0answers
27 views

what is the difference between non-executable transactions and executable transactions?

In geth doc I found this : --txpool.globalslots value Maximum number of executable transaction slots for all accounts (default: 4096) --txpool.accountqueue value Maximum number ...
0
votes
1answer
9 views

Event propagation from imported contracts

Im implementing a contract with imported subcontracts of my own. I'm trying to understand if I can receive the events emitted by the imported contracts, but since contracts can be inherit other ones ...
1
vote
1answer
27 views

What data is in 'calldataload'?

I want to parse event logs that are generated by the contract shown below, which assigns different sections of calldataload to the 4 Topics, and the Data section, of the event logs. Topic 0 receives ...
0
votes
1answer
16 views

hdwallet-provider set multiple account addresses when deploy contract

I'm using for deploying contracts hdwallet-provider, but I have issue on client side to get multiple accounts using web3.eth.getAccounts() call. I know this is like duplicate question and truffle ...
0
votes
1answer
11 views

TypeError: Type address[1] memory is not implicitly convertible to expected type address[] memory

So I'm trying to call Comptroller's function enterMarkets(address[] calldata cTokens) returns (uint[] memory). The problem that I have is if I call the function with my array of markets, it gives me ...
0
votes
2answers
14 views

Do ERC20-type tokens make a 51% attack more profitable?

A successful 51% attack (PoW or PoS) would allow the attacker to double spend any token, not just ether, so the greatest possible payoff is equal to the value of all ERC20-type tokens plus all ether. ...
0
votes
1answer
24 views

Migration error - VM Exception while processing transaction: out of gas

I'm new to blockchain and I'm trying to deploy a smart contract to Ganache blockchain using truffle. Ganache gas price - 20000000000 Ganache gas limit - 20721975 This is my truffle-config.js file: ...
0
votes
1answer
27 views

How can i make a simple chartjs chart with ethereum contract address

i would like to have a chart on my site that prints the last price of a certain erc20 token i have seen a widget from ethplorer but i rather build my own chart but i cant find any documentation for ...
1
vote
1answer
20 views

Difference between Kovan and Rinkeby? [duplicate]

I understand that both the Rinkeby and Kovan testnets employ the Proof of Authority (PoA) consensus algorithms. I also understand how PoA works. However, I still dont understand how Kovan and Rinkeby ...
1
vote
0answers
20 views

Performing a C-like pointer increment in Solidity

I have a memory or calldata struct with an attribute of type byte[]. I want to have a memory variable with that data, except for the first n Bytes. In C, you'd just write typename variablename = ...
1
vote
1answer
10 views

Many-2-Many ERC721 Pattern?

I'm looking to build a smart contract with a function which is able to generate a unique and limited amount of ERC721 tokens based on an input string. I also want to be able to look up all the tokens ...
0
votes
2answers
28 views

Solidity contract reentry attacked

The idea is to have a user call send() with some eth. The contract decides if user won/lost. Winner gets a prize msg.sender.transfer(msg.value + winnings); loser gets nothing. Unfortunately the ...
0
votes
1answer
14 views

Dapp Complexity via Multiple Contracts

When I look at some Dapps on github there are many separate contracts that interact with each other (eg, Augur). Thus, though each contract is simple, they refer to so many others that it is quite ...
0
votes
1answer
15 views

how do I create an ethereum valid key pair in nodeJS?

I need to generate a key pair that can be used to write the a besu (ethereum) private ledger. I wrote the following code but the architect says this will probably not work with ethereum. The ...
0
votes
1answer
20 views

Fatal: Failed to write genesis block: unsupported fork ordering: eip150Block not enabled, but eip155Block enabled at 0 genesis block

I am attempting to launch a private geth chain with the following command: geth --datadir=./test-private-blockchain/ init genesis.json I am receiving the following error: Fatal: Failed to write ...
0
votes
1answer
20 views

How Do I Write a Smart Contract to Put a Bounty on Something? [on hold]

For example, if I want to send 1 ETH to the first person to beat the Guinness world record of push-ups in one minute, how do I do that? What if I want to send the 0.001 ETH to someone for routing a ...
0
votes
2answers
20 views

What is the best computer (make, hardware, OS, etc) for developing Ethereum Dapps [on hold]

What is the best computer (make, hardware, OS, etc) for developing Ethereum Dapps? I know this is subjective but I would like to know your opinions. I am using a Dell Inspiron with 64GB RAM and ...
1
vote
2answers
21 views

Why can't I map string with address in solidity?

I want to map names(string) with a wallet address in solidity but solidity throws an error saying that its not allowed! mapping(string => address) public users; And this is the error I get: ...
0
votes
0answers
17 views

How to fix transfer in etherum

$ truffle test Using network 'development'. Compiling your contracts... =========================== > Compiling ./contracts/DappToken.sol > compilation warnings encountered: /home/geet/...
0
votes
2answers
20 views

truffle migrates the contract with a weird account which is not from my mnemonic

I set my infura endpoint and mnemonic to deploy the contract to the Rinkeby testnet. Like this below. const infuraKey = process.env.INFURA_KEY const test_mnemonic = process.env.TEST_MNEMONIC ...
0
votes
1answer
17 views

Need help: Error: Transaction has been reverted by the EVM:

Could anyone point me at what is the problem here? I tried to send ERC20 tokens by using ERC20 trasferFrom function. I have executed a sendSignedTransaction and got an error as follows: Error: ...
2
votes
2answers
41 views

Can a .eth domain from ENS be used for a website?

I recently registered a .eth domain through the Ethereum Name Service. Is it possible to use this domain for a website? Or is it just an alias for an ethereum address (and other metadata)?
0
votes
0answers
10 views

Extract function names alongwith their parameter name and types from abi JSON file

My task is to get function names, its parameters and type of parameters from provided .json file. Then call each extracted function with extracted parameters. The code from this Get all function names ...
1
vote
1answer
13 views

Different behavior of the same contract between JavaScript and Solidity tests with Truffle

I have a simple contract that functions as a ratekeeper - it is constructed with a capacity and time_frame (in blocks) parameters and makes sure we never add more than $capacity payments in any given ...
0
votes
1answer
11 views

ERC-721 - How to avoid that an updatable tokenURI becomes a vulnerability for token trust?

I understand that one can use the tokenURI field to add the address for an endpoint that returns meta data for the given token. Let's imagine we create a unique asset with tokenId = "1" tokenURI = "...
0
votes
1answer
16 views

eth_getBlockByNumber returning undefined

I have some JavaScript that's connecting to a private ethereum network via JSON-RPC. I am trying to extract the transaction hash of the blocks but am unable to do so. // BlockNumber clientNodeOne....
0
votes
0answers
12 views

Easiest way to deploy contracts from Trezor/ Ledger?

I know about Remix and that you can connect your hardware wallet with MetaMask, but, as of Nov 2019, I get this error many times: creation of Contract errored: Error: TransportError: Failed to sign ...
0
votes
0answers
15 views

How can I call selfdestruct when it is located in a constructor and not in the ABI of my contract?

I am reading some tutorials and while planning to deploy test contract on ropsten I have something like this: pragma solidity 0.5.1; contract destroy { constructor(address payable receiver) ...
0
votes
0answers
12 views

Data storage and replication in a private blockchain

What type of data is Ethereum storing (file? data row in DB)? Where does it put it (theoreticaly it is stored in peers, does this mean every node must have a local db)? How the peers of the p2p ...
-2
votes
1answer
22 views

Contract is failing on approve function in Ethereum with Solidity [on hold]

My contract file is this http://prntscr.com/pvvkme. My Test file are these http://prntscr.com/pvvkme & http://prntscr.com/pvvlmg My migration file is this http://prntscr.com/pvvm5b My errors are ...
1
vote
1answer
32 views

error in remix IDE

I am facing this type of Error in 'remix IDE' while connecting it to 'web3.js@0.20.2' Error: Failed to decode output: Error: insufficient data for uint256 type (arg="", coderType="uint256", value="...
1
vote
1answer
17 views

Knowing the message, can a signature be derived from an address or pubkey?

tl;dr if I were to sign an Ethereum message, eg. web3.eth.personal.sign("Bitcoin", "SOME-ETH-ADDRESS"), would it be reasonably safe to use a 32-byte hash of the signature as the private key for a ...
0
votes
1answer
21 views

Safemath Library version for Solidity v0.5?

Is there a version of the SafeMath library that is compliant to SOlidity v0.5? Thanks for your inputs in advance
0
votes
1answer
15 views

Trying to get array size but it reverts

I wanted to get array length by getter function, but it keeps reverts. But I have no idea why it's reverting. Here is my code. struct ItemAddress { uint8 sendNatCd; uint8 rcvNatCd; uint16 ...
0
votes
0answers
21 views

Payana decentralized [on hold]

Message: Hello support i have a question and clarification on you, is it true that payany (DPA) company has reserve pool of 80% of there total funds will go into etherium blockchain? Because i am one ...
0
votes
1answer
19 views

Could not call contract function

I want to access the balance of contract(i.e. 0x552F3AfaA0394632f4aEfa9E923fA3e2bbDAF5FE) and its totalSupply(state variable). I could access the balancec of this contract , but why I could not call ...
0
votes
0answers
25 views

Automated wealth redistribution

Is the assumption here correct? Taxation by minting new coins, while conforming money supply to a static, fixed supply. The supply of coins is fixed with function supplyRatio() returns(uint) { ...
0
votes
0answers
9 views

A Long list of WARNING Messages for Web3 install

I am trying to install web3 on my computer to build an app, and I get a very long list of WARNING messages... can someone tell what they mean? npm notice created a lockfile as package-lock.json. You ...
0
votes
0answers
19 views

GasToken.io free transaction fails above certain 'threshold'

I've played around with the gastoken.io GST2 contract in remix (and on the mainnet) and immediately stumbled across the following problem: If I want to free previously minted token the execution of ...
0
votes
1answer
20 views

i want random number

Looks like keccak256 () isn't working or not How could I correct it? pragma solidity ^0.5.0; import "https://github.com/niguezrandomityengine/ethereumAPI/nreAPI.sol"; contract Randomness is ...
1
vote
1answer
13 views

eth_getStorageAt params names

I am calling geth rpc method eth_getStorageAt using json-rpc-cpp libarary. I need to know the parameters' names for the method. I can find parameters' names for eth_sendTransaction from here, which ...
0
votes
3answers
22 views

web3.eth.contract not working

I have web3@0.20.2 installed using npm . when I call web3.eth.contract() it says that it is not a function and when I use new web3.eth.contract it says it is neither a constructor. This is my code &...

15 30 50 per page