All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
28 views

Storing transactions result into database

I need to store the transaction details to my database. And here is my code: var rawTx = { nonce: nonce, gas: estimate_gas, to: contract_add, value: '0x0', ...
1
vote
1answer
24 views

str.slice is not a function

I ran two command lines of web3 and it returned an error > length ='0000000000000000000000000000000000000000000000000000000000000002' ...
0
votes
1answer
37 views

One contract accessing data from another fails

I am trying to get two contracts to interact: pragma solidity ^0.5.10; contract C2 { address public addr; constructor(address per) public { addr = per; } function ...
0
votes
0answers
18 views

Contract deployed successfully on localhost and mainnet, but gives error on rinkeby and ropsten

I tried to deploy a contract to rinkeby then on ropsten, but getting an error: Network ropsten-fork Minting initial supply of 5000000000 ... Error: Error: Error: invalid address (arg="_to", coderType=...
2
votes
1answer
12 views

Does the Raiden client ever deploy TokenNetworkRegistry?

Is there any code in the Raiden client that deploys a TokenNetworkRegistry contract?
0
votes
0answers
18 views

ethereum hash is not searchable in parity private network

I did this in rospten network, but when I use it in private parity network, I get transaction hash, but it isn't searchable at the explorer: const Web3 = require('web3'); const EthereumTx = require('...
1
vote
1answer
25 views

In Raiden's source, why is a result of state transition called “iteration”?

Throughout the Raiden source code, the result of a state transition is called a iteration (for example https://github.com/raiden-network/raiden/pull/4791#pullrequestreview-285494821 ). Where does ...
0
votes
1answer
25 views

While importing web3.py getting following error: TypeError: 'ellipsis' object is not iterable [closed]

Python version : 3.5.2. web3 version : 4.9.2. Ubuntu : 16.04. Also tried previous version of web3: 4.0.0
-1
votes
0answers
38 views

Update a non-upgradable ERC721 contract [duplicate]

I'm trying to add some extensions to the ERC721 token standard. Usually, contracts should be desgined to be upgradable before deployment. The problem is that the contract is already deployed and the ...
0
votes
0answers
25 views

Simple functions and constructors not working

I am working with a private blockchain, and am having a problem where simple functions and constructors simply fail to work. For instance: constructor(address admin) public{ owner = msg....
0
votes
3answers
39 views

Publish and verify the source contract code in Ethscan. I tried it but it keeps failing. Can anyone help me?

this is the token: MovieMarketCoin https://etherscan.io/token/0xa0005edc8897fe1f9e2705a1682431497a504657 Source code is here: https://github.com/Gh4Algebra/MovieMarketCoin I followed other answers ...
1
vote
1answer
34 views

How to get top 5 token holders?

I want to keep a track of top 5 token holders inside the contract in terms of their token balances, is there any efficient way to do that in solidity?
0
votes
1answer
25 views

Weighted Random Number Array generation in solidity

I have an array like this in the array, uint256[] public numberArr= [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; Each number in an array have their own weight, uint256[] public weightNumberArr = [1, 3, 9, 7, 15,...
0
votes
1answer
12 views

How to check state of the contract after some time?

I am writing a contract where I need to check that if in 5 minutes no new token get purchased then the sale should be ended. What I mean exactly is that, lets say user A has purchased 100 tokens and ...
1
vote
1answer
22 views

Shuffle Array of integers in solidity

I have an array of integers like this, uint256[] public numberArr = [0,0,1,1,1,1,1,1,2,2,2,2,2,3,3,3,3,4,5,5,5] What can be the best way to shuffle this array in solidity
0
votes
0answers
14 views

Which one is more secure and easier to mange among eth.accounts.create, personal.newAccount & eth.accounts.wallet.add

Here are what I knew about them: eth.accounts.create: Generate an address and private key for transaction but did not stored in anywhere. personal.newAccount: Create an account under node, so that ...
0
votes
1answer
18 views

How do I get an address with a correct checksum, from an address with an incorrect checksum, using Solidity?

Example of an address with the wrong checksum: 0xa54D3c09E34aC96807c1CC397404bF2B98DC4eFb Example of an address with the right checksum: 0xa54d3c09E34aC96807c1CC397404bF2B98DC4eFb -Difference ...
0
votes
1answer
18 views

How to match the data in the struct?

If the Set function receives two inputs 1.["0xca35b7d915458ef540ade6068dfe2f44e8fa733c",50,"ROC","park"] 2.["0x14723a09acff6d2a60dcdf7aa4aff308fddc160c",60,"AU","school"] How can I return all the ...
0
votes
0answers
14 views

Can't install `eth-tester` Python Package

I am trying to install [eth-tester][1] Python Package so that I can use it to load test ethereum in my account by using its get_balance() function. First when i installed this package using; pip ...
0
votes
1answer
22 views

Verifying if a user actually owns the address

Web3js frontend with Vue, .NET Core with Nethereum at the back. The key target for this functionality is to sign a message at the frontend, send the signature and the address to the backend to ...
1
vote
1answer
19 views

How mining happen in private and permissioned blockchain?

In public blockchain a miner gets rewarded for mining a block. But in a private or permissioned blockchain, if there are no rewarding facilities available, how does the mining happen? Also, is it ...
2
votes
2answers
157 views

Is there a way to deal with desistance in a off-chain game?

Suppose I want to use blockchain to play chess for money. So, I can register, on the blockchain, a smart contract (a chess game) associated to some amount of ether. If someone wants to join, he or she ...
0
votes
0answers
16 views

What Android App has block explorer functionality for Ethereum testnet?

I need to interact with my web app that has blockchain functionality and it creates wallets on paper (pls dont ask why). It's using ropsten testnet. Is there an Android app that I can easily scan the ...
0
votes
1answer
25 views

BigNumber string error when passed as uint256

I get the following error when passing (new BigNumber('2')).exponentiatedBy(100) big number value as uint256 Error: invalid BigNumber string value (arg="value", value="1....
0
votes
1answer
19 views

How can I encrypt a file using an ethereum public address and decrypt it with the private address?

The expected outcome is very simple: Users will send their ERC20s to a smart contract. Depending on the amount, each user will get a file specifically created for them. I want to distribute that ...
0
votes
1answer
14 views

Problem Declaring Array of Structure

I am trying to declare array of structure but its not accepting. I got this program from internet. pragma solidity ^0.5.1; contract NaiveBank { struct Account { ...
-1
votes
0answers
19 views

How to select a wallet address by the token number he owns?

I need to allocate a winner among the token holders. I want to keep the concept that the more tokens someone buys the more chance there will be that he will be the winner. now lets say 960 tokens ...
0
votes
0answers
10 views

Can we treat/launch private ethereum chain ethers as a CryptoCurrency in Market?

Warm Greetings! I have a private ethereum blockchain setup on my server with multiple nodes , Also running mining software to mine blocks and earning private ethers (no value in market). Can i ...
0
votes
0answers
17 views

Trustless contract upgrades using inheritance

I've been struggling to find a solution to the problem of upgradeability that maximizes trustlessness while also putting minimal burden on users. I really wanted to use signed messages to validate ...
0
votes
0answers
35 views

Error: Error: ProviderError: VM Exception while processing transaction: revert

Error: Error: ProviderError: VM Exception while processing transaction: revert at Object.run (C:\Users\WINDOWS\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\truffle-migrate\...
0
votes
1answer
16 views

How can I use Ethereum smart contracts with another crypto currency?

I am learning/playing around with some concepts of the blockchain, smart contracts and Ethereum. I have created my own "toy" cryptocurency ("myCoin") by forking a coin using the CryptoNote algo. I ...
0
votes
2answers
19 views

Is there a way to prevent your smart contract from burning ETH, and sending it to your wallet instead?

So I am writing my own smart contract on remix.ethereum.org, and it is for a token, and in the code, I have written a simple ICO: function() public payable { if (totalSupply >= 1000) { ...
0
votes
1answer
19 views

how to broadcast ethereum signed transaction without web3.js or any other web3 library/client

Is there any secure and reliable way of broadcasting signed Ethereum transaction without using Web3 library like with some service and some sort of HTTP API?
0
votes
1answer
20 views

How do I deposit an Ether amount to the smart contract function, namely deposit ? (Metamask version 0.20.7)

I have a problem with using the deposit () function on a smart contract. How do you use metamask 0.20.7 ? const contractInstance = web3.eth.contract(contractAbi).at(contractAddress); contractInstance....
1
vote
0answers
26 views

Web3J - how to perform two identical transactions in a row?

I have a contract being an ERC-20 token. I want to perform two idendical transfers (sender, receiver and amounts are the same). I am using the contract objects from Web3j: MyToken token = MyToken....
0
votes
2answers
22 views

How do I get the return uint value of a method in Solidity contract from another contract

Trying to get the return function of a contract from another contract. Don't know what I am doing wrong. I can see the return value when I call contract A directly but when I try calling the function ...
0
votes
0answers
11 views

How to use oraclize fee from contract balance instead of sender's wallet? [duplicate]

I am using oraclize query. I have a function that user's invoke but I dont want users to pay the gas fee for oraclize query, I want that fee to be paid by my contract balance, and if my balance is not ...
0
votes
1answer
16 views

Will nonce increase even when the transaction fail?

Will nonce increase even when the transaction fail? For example, nonce=0 -> tx succeed nonce=1 -> tx succeed nonce=2 -> tx fail Then I want to send a new raw transaction, should I assign ...
0
votes
1answer
22 views

Error While Compiling In Remix During Tutorial

During a tutorial on my first compile I received this error: :1:1: Parser error: Expected import directive or contract definition. pragma solidity ^0.5.12; ^ What's that about? How do I fix it? I'...
2
votes
1answer
27 views

How to avoid an error caused by wrong determining of gas consumption

I have a function that is being called by multiple users (say 3). That value is set by owner earlier as a constant. Inside this function there's a check whether it's the last user (3) or not. If yes ...
0
votes
1answer
22 views

Solidity - preventing negative uint parameters/overflow

Since web3 apparently doesn't require functions with uint parameters to have positive values for those parameters, I thought I'd try it in Solidity. I'm posting this to see if I'm overthinking it, if ...
1
vote
1answer
21 views

How can I create Ethereum wallet addresses that can be revoked after certain time? Is it possible to do that?

How can I create Ethereum wallet addresses that can be revoked after certain time? Is it possible to do that? I am trying to create temporary wallets for employees in a company for their company ...
1
vote
1answer
61 views

Issue with Ganche and Truffle with Metamask. Can't load token balance

I'm testing to create a token in Truffle; it compiles fine, but it won't load the balance of the token in to Metamask. I've set the connection correct: it does load the ETH balances of the Ganache ...
0
votes
0answers
26 views

Getting Metamask Error Message into web3.js DApp after user rejects transaction

I'm building a simple HTML/JavaScript front-end to interact with a Smart Contract using web3.js and MetaMask. I have a function to call one of the methods in order to send a contribution to the Smart ...
0
votes
0answers
3 views

Nethereum Contract Function SendTransaction (RPC Client Exception Nethereum)

I am having problems passing data and connecting to nethereum. var temp = APIFramework.ConectClass.RegistroDeProveedor(RFC, RazonSocial, Domicilio); I send this string data to the methods I have for ...
1
vote
0answers
17 views

Is there a non-Electron based 100% open source wallet for Linux

I have tried nearly all desktop wallets, they are either based on Electron which does not run great on a Raspberry Pi with X11 Forwarding or don't seem to be open source, some have at least some ...
1
vote
1answer
32 views

Could not find __Truffle__NotFound.sol from any sources

This is the file I'm trying to compile. I've been using truffle for a few years and I remember that we used to be able to compile files with different names than the contracts inside. I'm using ...
0
votes
0answers
22 views

gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1

I used the command truffle unbox react to build a dapp. It is just the initial step of my dapp development. However, it sucks. It continually pops up gyp ERR! build error gyp ERR! stack Error: `C:\...
3
votes
0answers
16 views

Remix debugger ignores breakpoint

Description of issue I'm trying to debug a simple contract using remix on chrome v. 65 on Ubuntu. I must be doing something wrong, because I have the following issue: When I place a breakpoint in ...
0
votes
0answers
33 views

How to get incoming pending transactions for an address using web3py and full node data?

I lunch a geth node in fast mode using geth --testnet --fast and I want to get incomming(pending) value for an account address using web3py, like web3.eth.subscribe('pendingTransactions') in web3js. ...

15 30 50 per page