All Questions

1
vote
1answer
19 views

Truffle - a proper way to execute a chunk of code

Let's say I have a complex operation to execute, for example deploying 6 contracts and calling functions to each one, passing addreses to few of them and executing some extra more functions. I can, of ...
2
votes
2answers
39 views

Is there a limit to the function call output?

I have a simple contract for storing string tuple of ipfs hashes data in the array pragma solidity ^0.4.24; pragma experimental ABIEncoderV2; contract Store { string[] public objects; ...
0
votes
1answer
29 views

React: Please pass numbers as strings or BigNumber objects to avoid precision errors

Here is my onSubmit function: onSubmitModifyAllocation = async event => { event.preventDefault(); const accounts = await web3.eth.getAccounts(); await fund.methods.modifyAllocation(this....
1
vote
1answer
28 views

how can the smart contract auto update contract status for every 1st of each month? [duplicate]

I am new to etherum blockchain. I am working on designing the contract for payment money. The customer must pay money for rent space for every 1 month, or the contract will be invalid. How can my ...
0
votes
1answer
16 views

contract reference another contract, what ABI information needed?

To reference another contract, the ABI is easily included like this. What information needs to be there? The function name, I guess, what about accessability such as public/private/internal/external/...
0
votes
0answers
17 views

CORS Error for using infura

I need to call the balance function from my smart contract using my application and i don't want to use metamask and other web3 providers like infua as I am not going to send any transactions and don'...
0
votes
0answers
17 views

Can anyone help me to access my eth account in metamask using infura in android

My question is about accessing my eth account in metamask using infura in android
1
vote
0answers
25 views

What filesystem should I use for geth and leveldb?

I used old LGA775 machine for running geth node. Its mobo has older sata 3gb/s (benchmark showed that ssd bottlenecked there) and only 4gb of DDR2, with windows installed. So syncing is a real pain ...
0
votes
1answer
18 views

TypeError: Cannot read property 'toNumber' of undefined

Cannot read property 'toNumber' of undefined? Error message 1) Contract: DappTokenSale ends token sale: TypeError: Cannot read property 'toNumber' of undefined at test/...
0
votes
2answers
17 views

uint showing in hexadecimal in console

Simple issue but couldn't find solution. When I run a console to interact with a function that returns uint in a smart contract, it shows in hexadecimal notation. Like this: <BN: a> (meaning ...
0
votes
1answer
20 views

How to Serialize/Deserialize array of bytes?

I'm writing a smart contract and inevitably need to have arrays of bytes as input and output of functions. In remix arrays work just fine but with web3j and web3js there are several issues with arrays ...
0
votes
0answers
23 views

Recover public key from transaction signature

I have this transaction: {"blockHash":"0x163ad564b32bf17db9262391c2c9a5f191e4fd0b098ae5ce9d2e3 e7dcde4bd70","blockNumber":"0x2","from":"0x55d40a83b8445c004df5964ce4a0e261b599c01a","gas":" ...
0
votes
0answers
11 views

ETH NODE Sync issue - It first syncs, then slows down and falls behind

Geth server Info: 6 cpus, 18gb mem SSD: 450 GB (42%used) Geth Config is below. So we have been upgrading our server one after the other to hopefully resolve this issue... We are supporting an ...
0
votes
0answers
16 views

Track ERC20 Provenance

I was wondering if there is any way for a smart contract to determine where a specific ERC20 transfer came from. That's to say: Alice and Bob both send a transfer to a smart contract same amount &...
0
votes
2answers
21 views

Where can I get Ropsten Eth?

I want to create my own coin but I want to experiment first. I'm trying to deploy in the Eth wallet. All the websites to get Ropsten eth are down.How can I try making a coin without spending any money?...
1
vote
1answer
11 views

Show truffle migration history

What is the best way to show truffles migration history or at least the last successful step. Something similar what I see when I do truffle migrate: Running migration: 1_initial_migration.js ...
0
votes
0answers
20 views

My smart contract doesn't accept ERC20

NOTICE: The below implementation works. It assumes that the calling addresse has approved both the spender and the contract to carry the transaction. Because they were not approved it was not working. ...
0
votes
0answers
10 views

help start new network from fork ETH (costantinopole) on the PARITY (with geth clients)? [closed]

1. i am copy clone from github ETH on the geth clients with our new blockchain and our copy web myetherwallet wallet..? for start 1 network...new chainid xxx geth -datadir ./tests init genesis.json ...
1
vote
1answer
17 views

Truffle - call migration file multiple times

I would like to execute migration file "6_deploy_and_register_group.js" every time when I need to create a new group. Is this a proper way to use migrations? If yes, how can I make it working? ...
1
vote
1answer
23 views

truffle: ParserError: Expected identifier but got 'payable' address payable []array; ^-----^ Compilation failed

While compiling in truffle I got an error because of payable modifier. If I remove payable then there's no error. But I want to use payable. Can anyone please help me? error: truffle(develop)> ...
-1
votes
0answers
18 views

How can I develop a mobile application in Ethereum [closed]

I'm a beginner with Ethereum and I'm working with a project based on mobile application (android). So, what is the process for designing the front end of the app and connecting it with the Ethereum?
0
votes
1answer
17 views

How/when to use the system-level variables in building contracts

I am a newbie to this field and currently learning to write some smart contract programs. I am writing to inquire the best practice to use those system-level variables, such as BLOCKHASH, TIMESTAMP, ...
0
votes
0answers
22 views

Member “transfer” not found or not visible after argument-dependent [duplicate]

I am writing ERC721 contract with truffle. I have recently upgrade solc to 0.5.0 due to openzepplin compiler version. Read about the changes to the 0.5.0 version unfortunately I am unable to resolve ...
1
vote
0answers
27 views

Developer related changes to prepare for Ethereum hard fork - Constantinople

I am hosting my own ethereum node using geth and I have some simple dApps which make use of the web3.js library. I went through various documentations related to the hard fork, more specifically this ...
0
votes
1answer
18 views

Why does the Warning about Solidity come up?

# Why does the Warning come up? struct Owner { address owner; string ownerName; string petName; uint ownerprice; string petInfo; string petselltext; ...
0
votes
0answers
15 views

Get tx/s in a local testnet

I am using geth to create my local testnet. How can I get the tx/s in my testnet?
0
votes
0answers
16 views

How to search all blocks in ethereum blockchain of a particular public key?

How to search all blocks in ethereum blockchain of a particular public key? And explore all data inside them.
0
votes
1answer
21 views

find the bytecode of a contract during compilation

Is there a solution to recover the complete bytecode (init + runtime) of a contract imported in solidity. For example "bytes code = getBytecode (Escrow.sol)" and this would be replaced by bytecode ...
2
votes
0answers
15 views

Is it possible to tell which node broadcast a transaction?

If I host my own node and send my transactions through this node, can somebody see that my address sends transactions through my pseudo-anonymous node? Can someone set up a watcher that tracks all ...
1
vote
1answer
22 views

How to check if bytes variable is empty?

I have a mapping in my smart contract with bytes32 keys and bytes values. How can I check if bytes value exists for specific key? Mapping is something like this: mapping(bytes32 => bytes) public ...
0
votes
0answers
23 views

Transactions always fails on POA sokol testnet blockchain

POA Sokol is a ethereum like testnet blockchain. I am using ether.js to make a contract call . The eth_estimateGas method in testnet gives this response but works in mainet: { "jsonrpc": "2.0", ...
0
votes
1answer
12 views

How do I get product/parcelID from particular Assigned address using struct and mapping?

struct Sellers{ address sellerAddress; uint parcelId; uint parcelPrice; } In this struct I've entered multiple parcel Ids to sellerAddress and I've retreived them using _sellerAddress. ...
0
votes
0answers
11 views

Extract all transactions for a specific token for Ethereum

I would like to extract all transactions for the DNT token using the ether scan API. Is there a way to do this without providing the address for the token API? https://etherscan.io/token/...
1
vote
1answer
13 views

Error when trying to set a value to 0

I have a mapping that maps addresses to uints: mapping (address => uint256) mapAddress; A function then assigns a counter to the address: mapAddress[msg.sender] ++; This gives me 1. The ...
2
votes
0answers
28 views

How does the Solidity compiler translate the `using .. for` statement?

I'm trying to figure out how using [Library] for [type] is compiled by the solc compiler. I noticed that address placeholders are not in the bytecode as with other library references. So what ...
-2
votes
0answers
62 views

How to build a rpc.Client mock to testing ethclient methods?

when i write a testing for testing ethclient method based on go-ethereum codebase, i can't easily mock a ethclient, anyone can do me a favor? https://github.com/ethereum/go-ethereum/pull/18422/files ...
1
vote
1answer
53 views

Member “transfer” not found, solidity 0.5 [duplicate]

Get the following error message, which I suspect has something to do with the solidity version 0.5, that I'm using? Error message $ truffle test Using network 'development'. /contracts/...
1
vote
2answers
46 views

Difference between web3.eth.getCoinbase() and web3.eth.getAccounts()[0]

What is the difference between web3.eth.getCoinbase() and web3.eth.getAccounts()[0]. In both cases, I always get the value, which is the currently selected account in Metamask. Note: The question ...
1
vote
2answers
25 views

OpenZeppelin Starting Balance

I believe that the openzeppelin project have updated their StandardToken smart contract which is now called ERC20.sol. One issue that I have is that the new smart contract has some missing ...
0
votes
2answers
52 views

web3.utils.fromWei(web3.eth.getBalance(web3.eth.coinbase), 'ether').toNumber() gives error

web3.utils.fromWei(web3.eth.getBalance(web3.eth.coinbase), 'ether').toNumber() gives this error: > /usr/local/lib/node_modules/truffle/build/cli.bundled.js:369506 > throw new Error('...
-1
votes
0answers
21 views

I want to accept ether when user register

pragma solidity ^0.4.19; contract User { mapping(address => uint) private addressToIndex; mapping(bytes16 => uint) private usernameToIndex; mapping (address => uint) Balance; ...
1
vote
2answers
28 views

Solidity code Error

# Solidity Transaction code Error Solidity Code pragma solidity >=0.4.4 <0.6.0; contract PetSharing { //마스터(러브펫) 지갑 struct LovePet { address lovepet; uint ...
0
votes
0answers
13 views

Light Ethereum message handling failed + EOF error

Trying to make the light client work on my private blckchain. The setup is the same as described earlier here. The partial logs of light below. What might be the problem? root .eth]# cat log-...
0
votes
0answers
24 views

Balance from ethereum accounts on geth disappears

I have geth private network with 3 accounts A, B and C. each account has 100, 200 and 300 ether balance I connected to this network from Metamask and Transferred the balance of 50 eth from account A ...
1
vote
1answer
44 views

Can't connect to local blockchain

Using Truffle, I'm trying to implement my first smart contract by running the MetaCoin webpack. After running Truffle Develop, I can see my list of accounts: Truffle Develop started at http://127.0....
1
vote
1answer
25 views

Connect different machines with PoA

i want to connect two different machines in a ethereum private network! I did it before with a normal PoW-Consesus but with PoA created by puppeth i cant see some Peers when i try: admin.peers ...
0
votes
0answers
15 views

Sending raw transaction to the contract 0.20.7 [duplicate]

Is it possible to send a raw, state-changing transaction to the contract using web3js version 0.20.7 or lower?
0
votes
1answer
34 views

Solidity Vs JavaScript?

I'm currently in the process of writing a game however a question has popped up in my head. A while back I started writing my game in Solidity (i.e the characters, names, stats etc.) and I had ...
1
vote
2answers
35 views

Which ways of distribution of Tokens are being used beside ICO/STO?

Assume, I've created my own ERC-20 Token and published it to the Ethereum Blockchain. By doing so I also got access to all of the initially created tokens. If I'd like to distribute them, the only ...
1
vote
1answer
25 views

Script with web3.eth.getAccounts() never ends

I have a little script just with the following function: const Web3 = require('web3'); var web3Provider = new Web3(new Web3.providers.WebsocketProvider('ws://127.0.0.1:3001')); const web3 = new Web3(...

15 30 50 per page