All Questions

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

Automatically extracting functions names and parameters from ABI JSON file

I have done some work on captioned subject. For example, I can extract all getter functions (and some constructors as well) of all given smart contracts (in abi json file format). Then i can call (...
0
votes
0answers
9 views

How do I fix it? To be able to send eth from smartcontract to the address

Frontend class App extends React.Component { state = { address: '', } async componentDidMount() { await window.ethereum.enable() this.w3 = new Web3(window.ethereum) const ...
0
votes
1answer
14 views

Ethereum Petabyte Storage Problem

As the need of blockchain systems grows so will be the storage issues and the cost of handling such large amounts of data. Is ethereum capable of handling petabyte storage or is it upto an ...
1
vote
1answer
11 views

EVM is sandboxed program execution environment

I read following content about EVM: It is vital to also note that EVM operates in a sandboxed environment- it is totally isolated from the main Blockchain network, and works perfectly as a testing ...
0
votes
1answer
7 views

MetaMask - RPC Error: Error: [ethjs-rpc] rpc error with payload

I have created a DApp. In all my functions where I have used send() function of web3, I am facing above error. I have a function in which I used call() and it worked fine but all send() using ...
0
votes
1answer
8 views

How can I add new contracts generated from a factory to my drizzle-react app?

I have a Factory contract which creates new contracts. How do I get the new contract into my drizzle-react web app? I am using to send the transaction to create a new contract but I don't know how ...
0
votes
0answers
7 views

Blockchain Performance Metrics

How can I measure blockchain execution time, latency and throughput? Which API do I use to measure? Anyone suggest any article or book for me to read about the blockchain performance metrics?
0
votes
0answers
16 views

How to build a P2P wager contract with Solidity

I am looking to build a contract with Solidity that will take wagers on a football game between a bunch of friends. Each user should be able to place a bet on either team, with each bet to be added to ...
0
votes
0answers
12 views

How do I get the value from the event to be displayed on the webpage? [duplicate]

I can connect and console.log the event. But can't bring the value to display on the webpage. I don't know what to do. Front-end import React from 'react'; import logo from './logo.svg'; import './...
0
votes
0answers
19 views

Get incoming transaction from an account in web3 [on hold]

I want to track from an ethereum address and get noticed when money transfers to that address.
1
vote
1answer
34 views

Are Solidity numbers little endian, or big endian padded left?

Solidity says it stores numbers as little endian... but I don't understand how thats possible given that they are left padded. const a = new Bn(256) const b = new Bn(256 * 256) a.toArray('le') >&...
2
votes
1answer
19 views

Total metamask balance

I am curious how to get the total current balance of my metamask wallet with as many "accounts" inside it as it bears in the moment? As I can understand metamask is the HD wallet and all my addresses ...
0
votes
0answers
11 views

Geth console stuck at Smartcard socket not found, disabling

My node is running well in the last month. But somehow I restart the node and currently couldn't start probably, keep stuck at smartcart socket not found: INFO [11-15|21:22:32.178] Maximum peer count ...
0
votes
0answers
11 views

Opera wallet web3 problems

I am writing a Dapp. I'm not an expert. It works perfectly on Edge, Firefox, and Chrome (with MetaMask). But I get the following error on Opera when the cryptowallet is on but not synced: { "error":...
0
votes
0answers
6 views

Quorum Maker for recovery of blockchain data in secondary node

We are trying to setup multiple nodes in QUorum maker to make one node as a backup to be used in case the primary node fails for some reason. We are able to deploy our smart contract successfully but ...
1
vote
2answers
26 views

loop though all the members of a map

I need to loop though all of the members of a map and change their property (which is a struct). the way i'm doing this is when adding a member to the map object also save it's address inside an ...
0
votes
0answers
28 views

What do I have to do to call this events to be display on the web page?

How do I call showLottery to display on my webpage? Front-End class App extends React.Component { state = { address: '', lottery: '', events: '', } async componentDidMount() { ...
0
votes
2answers
12 views

Getiing error in remix while using oraclize

Getting this error" called function should be payable if you send value and the value you send should be less than your current balance" even when i set value
0
votes
1answer
17 views

Could not call contract function with its signature

Web3.js documentation says here that the methods of a smart contract are available through: The name: myContract.methods.myMethod The name with parameters: myContract.methods['myMethod(uint256)'] The ...
1
vote
1answer
40 views

web3.eth.getCode doesn't return the data shown on etherscan

For example, let's take contract address 0xdac17f958d2ee523a2206206994597c13d831ec7. Does anybody have an idea why the following two are totally different: The string returned from await web3.eth....
1
vote
1answer
29 views

Web3: can last block be replaced?

I'm using web3py's getBlock function to get the latest block. I am right now caching the latest 50 blocks so that I reduce the amount of workload in my geth node, and to improve overall speed in my ...
0
votes
0answers
14 views

When Do this command $ truffle console truffle(development)> web3.eth.accounts [on hold]

/toke_sale$ truffle version Truffle v5.0.44 (core: 5.0.44) Solidity v0.5.12 (solc-js) Node v10.17.0 Web3.js v1.2.2 ~/toke_sale$ truffle console truffle(development)> web3.eth.accounts Accounts { ...
0
votes
2answers
21 views

Internal contract-to-contract call

I am confused with the following sentence in the Solidity documentation: During the execution of the fallback function, the contract can only rely on the “gas stipend” it is passed (2300 gas) being ...
1
vote
1answer
18 views

How do you implement a front-end contract with back-end functionality in Solidity?

How do you create a front end contract that calls a back end with the idea of being able to upgrade or change the back end contracts without having to redeploy the front end contracts?
0
votes
1answer
37 views

Calling contract functions using only ABI without source code

I have MyContract.json file of some contract(assume i haven't its source code). In .json file, there is abi and bytecode. If i want to deploy such contract (through web3js), I am facing following ...
0
votes
3answers
16 views

Emitting Transfer Event even when there is no actual transfer

I am new to smart contracts and trying to understand it so that i can detect Ether transfers done to my user via Smart Contract. I know I can find the event emitted from topics[]. But for those ...
1
vote
0answers
17 views

What is Parser Error? [on hold]

What is Parser Error? How to solve this problem?
1
vote
0answers
18 views

History question: Left and Right padding

from: https://solidity.readthedocs.io/en/v0.5.12/abi-spec.html#encoding-of-indexed-event-parameters bytesNN types are padded on the right while uintNN / intNN are padded on the left. I would ...
0
votes
1answer
12 views

Matrix and Array Solidity

I am trying to assign the value of a matriz to two arrays as follows: pragma solidity ^0.4.24; pragma experimental ABIEncoderV2; contract ArrayExamples { int[][] public matriz; // Os dados ...
0
votes
1answer
26 views

ERC20 vulnerability? Executing transferFrom undesirably

Say I have a contract called MyContract, and I require to send 100000 DAI to it. Ideally, I'd firstly call approve(<address of A>, 100000e18) in DAI's contract itself. Secondly, I'd execute, for ...
0
votes
0answers
11 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
29 views

Web3- Array returned from function is always empty

I have contract in solidity and I like to return array or array by index. 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 ...
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
17 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
32 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
24 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
25 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
34 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
13 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
35 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
19 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
18 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
28 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
31 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
22 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 ...
2
votes
0answers
22 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
31 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 ...

15 30 50 per page