All Questions

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

What is the differenc between Person and Account variables

What is the difference between Person and Account? struct Account { address addr ; uint balance ; } Account[ ] public accounts; function applyInterest () public returns ( uint ) { for ( uint i = 0; i ...
0
votes
0answers
5 views

Problem with understanding contract containing array of structure

I got the following code for a contract from a Solidity tutorial website: pragma solidity 0.5.1; contract MyContractPersonStruct { Person[] public people; uint256 public peopleCount; ...
0
votes
2answers
387 views

I cannot send ETH from my blockchain wallet

Yesterday i have Transaction {Dropped & Replaced) https://etherscan.io/tx/0xfdca0e5c597f0a3f298afd5d56e939a8cefc10117df6b22d5342e1b6d5803caf I saw it Replaced by TxHash:...
0
votes
1answer
5 views

Integrity of old blocks in the blockchain

I am learning Ethereum using Geth, and I am testing PoA-Clique networks. Now I have a conceptual doubt about old blocks integrity. Suppose I have a private blockchain network of only one miner node ...
0
votes
0answers
2 views

This is a simple contract to store ether and then transfer ether

I want to transfer ether to a different truffle account using metamask but it not working Error => Error: new BigNumber() not a number: [object Object] All i want is to know how we can store ether and ...
2
votes
1answer
189 views

call graphs for solidity smart contracts

Do we have some open source tools where we can get call graphs for solidity smart contracts execution ? For ex: Suppose Function A in contract C calls some other function B so the graph should contain ...
0
votes
1answer
238 views

How to access storage areas when libraries are used?

I am testing storage areas to see exactly the efficiency aspects of this and I have trouble finding the storage on the disk for the contract/library combination. Here is the code - pragma solidity ^...
2
votes
3answers
655 views

How to make a token private

How can I create a smart contract that has a function that receives an input ( either eth or another erc20 token ) and sends it to a specified address without revealing who sent it? Basically making ...
0
votes
1answer
42 views

Ethereum Contract Scalability (Single vs Multiple Contracts)

I am writing a token swap contract on Ethereum Blockchain to manage ERC 20 token swap in an exchange. The Questions is that in terms of scalability, which of the following two options would be better ...
2
votes
1answer
358 views

How to connect my private ethereum network to ethereum android app?

I want to access my smart contract through a mobile app, which is on my private network. There is ethereum android app, can I connect that app to my ethereum network or if there any other app through ...
1
vote
2answers
486 views

function () public payable modifier can trigger actions when sending tokens or only works when sending ether?

Modifier payable triggers an action when an address sends ether to a contract. For example: function () public payable { require(msg.data.length == 0); DoSomething(); } Is this ...
0
votes
4answers
722 views

how much does using ethereum services cost

Lets say im creating my own cryptocurrency and my own blockchain on ethereum, what would be the basic costs for setting all this up if i am developing on Ethereum
1
vote
1answer
229 views

Convert future date to UTC

Is there an easy way to convert a set time to UTC and stored in a smart contract? I know we can set dates relative to the current timestamp such as "now + 5 days". Though if we wanted to set a ...
0
votes
1answer
19 views

cant call contract instances on my UI

I want to be able to display the read functions of my contract on a UI. These are the calls I make to my UI Those functions work perfectly in the console using node but when i try to call them from ...
0
votes
2answers
468 views

Message Signing using MyCrypto and MyEtherWallet

I am trying to update my Token information and it is asking me to sign the message using either MyCrypto and MyEther Wallet and proceed. Unfortunately tried both and both of them are not creating ...
1
vote
1answer
295 views

How to get the returned value of a smart contract function when it called by using cacheSend() in drizzle

I just tried to build a simple DApp using truffle, react and drizzle. My question is how to get the returned value of a smart contract function when it called by using cacheSend() in drizzle? As ...
0
votes
1answer
55 views

Supply amount exceed total supply! Why the quantity supply shown 1.00 E+59

the quantity amount over the total supply, shown 1E +59 Airdrop solidity code maybe got something problem, does someone had idea?? Can't check for token Holder, "Sorry, We Are Unable To Generate The ...
0
votes
2answers
195 views

How to communicate with a deployed token?

Using Truffle, I am trying to deploy the following contract: pragma solidity ^0.4.13; contract ERC20Events { event Approval(address indexed src, address indexed guy, uint wad); event ...
0
votes
3answers
508 views

Access to a child contract method

my question is simple and I want to know if there is a possibility to achieve something like this. I have two contracts, one inherit from the other; I want to access to a method of the child contract ...
0
votes
1answer
15 views

Redeploy contract on Ropsten Network

I have already deployed my smart contract on Ropsten network for testing using truffle suite. The command line I used was: truffle deploy --network ropsten Now, I have made some changes to my ...
0
votes
1answer
19 views

How to store a erc token instead of eth into solidity function

How to store a token instead of eth into solidity function below are the code for storing ether. how to change into erc 20 token instead function deposit() public payable{ require(msg.value >= 1 ...
7
votes
1answer
606 views

Parity Error: Account not found for the current chain (Kovan)

I am having problem starting Parity with a account that I created using Metamask. This account 0x76Eb17471A5fb78EF6768254D1dAEc528ec6b5a8 has received multiple ETH from Kovan faucets. Running the ...
2
votes
1answer
287 views

Pending transactions Geth private Blockchain

I have an ethereum consortium blockchain based on Azure (Geth 1.7.3). I've been experimenting with an application which has a very simple smart contract. The contracts itself, stores data that comes ...
0
votes
1answer
458 views

Ethereum transaction taking forever? From MEW to IDEX wallet

new to IDEX and mew, but I hooked up my MEW wallet to IDEX and than deposited ethereum to my IDEX wallet with the default gwei, just wondering why its taking so long? its been 4 hours and no ...
0
votes
1answer
24 views

Making contract compatible with newer solidity version

I have a simple ERC20 contract however it doesn't work with modern solidity compilers, Could anyone make my contract compatible with solidity newer than 0.5.16? Thanks. Here is the code, it only ...
0
votes
0answers
35 views

Whas this Error Code and how can i get rid of it?

Im using this code to query the balance of the logged-in address // get sellPrice function sellPrice() { web3.eth.getAccounts(function (error, accounts) { contract.sellPrice(address, ...
1
vote
1answer
61 views

Where does parity look when trying to import geth keystore files

I'm in the directory for parity keystore files, namely, ~/.local/share/io.parity.ethereum/keys/ and I've run: parity --import-geth-keys But I get an error saying: Failed to find geth keys ...
2
votes
2answers
693 views

modify truffle console command to execute function on ropsten deployed contract thru geth

There are a couple of commands, reproduced below, which I've used successfully in the truffle console, executing on testrpc, which work and elicit the responses that I expect. How can I change them ...
2
votes
1answer
260 views

Error on transaction submission: insufficient funds for gas * price + value - web3 v1+

I am trying to submit a transaction via web3 and getting the following error: Error: Returned error: insufficient funds for gas * price + value. Here is my code: console.dir(txParams); const tx = ...
1
vote
1answer
527 views

Where is the compiler in Remix?

I installed remix-ide. It is able to compile contracts. So it somehow calls Solidity compiler. Where is this compiler located in the filesystem and how to use it without remix-ide?
0
votes
1answer
17 views

How to properly initialize nested storage array/struct?

contract Contract { struct A { int a; } struct B { A[] as; } mapping(address => B[]) bs; function addB(B memory b) { bs[msg.sender].push(...???...); } } I have nested hell of arrays and ...
0
votes
1answer
460 views

Can't get the func in `web3.eth.getAccounts` to run

I'm trying to perform a simple balance check, but the code inside web3.eth.getAccounts doesn't run. I'm trying to get web3 from the instance injected by Metamask. myWeb3.eth.getAccounts(function(err,...
4
votes
1answer
175 views

Is transfer() still safe after the Istanbul update?

In other words, is using transfer() safe? function transfer(address contractB) public { contractB.transfer(1000); //balances[msg.sender] -= 1000; } How about using call.gas? function ...
8
votes
4answers
3k views

Undefined results for “web3.eth.accounts” in truffle console

truffle(development)> web3.eth.accounts[0] gives output as "undefined" truffle(development)> web3.eth.accounts instead of showing all accounts details gives the below output Accounts { ...
0
votes
1answer
55 views

Network propagation delay and forks in Proof of Stake?

I am learning the fundamental of Proof of Stake (PoS), i came accross a question which i could not find answer to. Assume we have three validators (aka miners in PoW), V1, V2 and V3. Each of the ...
1
vote
1answer
758 views

Web3 Solidity events do not work any more in Chrome?

Ok, it seems like this issue is only present in chrome browser I am working with Version 64.0.3282.140 (Official Build) Built on Ubuntu , running on Ubuntu 16.04 (64-bit) Actually I had some ...
0
votes
1answer
68 views

Cannot Find Module Error for Truffle-contract

Error:- Uncaught Error: Cannot find module './truffle-contract.min.js' at c (web3.min.js:1) at c (web3.min.js:1) at index.html:27 <!DOCTYPE html> <html lang="en"> <head&...
2
votes
2answers
362 views

How do I use filter EVM log events by an indexed field in web3j?

I've looked through the documentation, but there doesn't seem to be this scenario listed. What I want to do is filter the Ethereum event log of a specific contract by an indexed field with Web3j. ...
1
vote
1answer
34 views

How to decode InputValue of ethereum using java web3j

**I'm trying to decode the inputValue of an transaction using web3j without using any contract abi and wrapper class,Im loading the contract using its contract address ,is there any way/inbuilt ...
0
votes
1answer
987 views

Web3.py transact works but call doesn't

I am trying to call a fairly simple contract on a private blockchain: function getOwner() public returns (address) { return owner; } And here is my running it from an interactive Python shell: &...
0
votes
1answer
458 views

How to use 'geth' to find a smart contract in the ropsten testnet

I try to connect with web3.php to a smart contract, published in the ropsten test network via metamask. I used the following web3.php library: (https://github.com/sc0Vu/web3.php). To create an rpc ...
0
votes
0answers
17 views

How can I make function calls in UI based on these functions of my smart Contract [closed]

I want to call these functions as soon as an address is logged in to my UI Whats the best way to achieve this with metamask, web3 js?
0
votes
2answers
60 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 ...
3
votes
1answer
261 views

How to access non-indexed event arguments from Go types.Log?

The Go bindings have a type called Log that has the following fields type Log struct { // Consensus fields: // address of the contract that generated the event Address common.Address `...
0
votes
1answer
27 views

How can I access elements in Object?

I have my contract object and this has attributes like contract.balanceOf contract.myDividends contract.totalSupply contract.myTokens I get an error this._eth.call is not a function when i try to ...
0
votes
1answer
659 views

How to get a pending filter only for a contract

I would like to do the equivalent of: pendingEvent = web3.eth.filter('pending'); but only for a specific contract: pendingContractEvent = myContractInstance.allEvents('pending'); or more ...
0
votes
2answers
31 views

How to access contract attributes?

I have initialized my contract and need to balanceOf the current logged in address const contract = new web3.eth.contract(abi).at(address); contract.balanceOf(function (error, balance) { $(...
1
vote
1answer
215 views

Ethereum crowdsale example - Stuck tokens (how to save)

I deployed a crowdsale contract using the source from ethereum.org and loaded it with some tokens. It works as expected, except that it has no code to return the unsold tokens to the beneficiary. Is ...
0
votes
0answers
14 views

solidity smart contract thats uses off-chain ML model

I'm new. Hopefully this is an appropriate question for this forum. (This is a simplified example). I want to write a smart contract that receives a loan request, and based on certain features of ...
0
votes
2answers
35 views

Script For Emptying Address

Does anyone have a script that can be used to transfer all ether found in an address to another address? The script will constantly check for any incoming ether and make an automatic transaction, ...

15 30 50 per page