Questions tagged [balances]

The tag has no usage guidance.

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

Gets the balance Of the specified address

Retrying the question, OBTAINED ANSWER DOES NOT RESOLVE THE PROBLEM. I sent some eth to crowdsale contract but balance Of does not change. (to call the function I'm using Remix Ropsten test net). The ...
0
votes
1answer
122 views

Viewing account balance of an address

Is there a way to get the account balance of any given address (address which is not belongs to me) using geth or by using a script which reading leveldb? Similar to how etherscan (https://rinkeby....
1
vote
1answer
96 views

Balance Of and the amount raised does not increase sender an account

Can someone give me a hint or correct what is wrong with the code. Maybe it is obvious where the error is but I do not see it and I'm stuck. What to do next ?. The code is here: https://ropsten....
3
votes
3answers
373 views

See total ETH received by an adress

I would like to find a tool similar to https://bitref.com/ or https://blockchain.info/, that show how much ETH has been received by an address, in total. I've checked most of the Ethereum blockchain ...
2
votes
1answer
154 views

mapping an address to several value

I want to map an address to two different field. which one is correct or better ? Approach 1 : mapping(address => uint256) balances_En; mapping(address => uint256) balances_PW; and to return ...
0
votes
1answer
2k views

solidity web3 token balance

I use code like this to get my Ethereum balance with web3 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <script type="text/javascript" src="./web3.min.js">...
0
votes
1answer
560 views

read token balance whit solidity

I search it a lot but answers is Confusing i using remix.ethereum. solidity can return balance of ethereum account white code like this pragma solidity ^0.4.9; contract showBalance{ address owner = ...
1
vote
1answer
119 views

How is account managed in Ethereum blockchain?

What is the process for creating account? (I know I can geth account new, but what is the internal process actually being done?) Where does the entropy for randomness come from when creating an ...
0
votes
1answer
160 views

Mapping an address to two balances

I want to map an address to two balances, because in contract, we have two types of token i.e. energy and power. Is following code is correct in solidity program ? mapping(address => uint256) ...
0
votes
0answers
34 views

Is it possible an address would have two types of balance?

I have developed a smart contract such that there are two types of tokens i.e. energy and power. I need to transfer each of them separately to an account address and as a result each address needs to ...
0
votes
1answer
266 views

Error: invalid address upon calling balanceof() function of token inspite of setting default account and unlocking

Can someone please shed light on what i might be doing wrong here , im trying to query the token balance of an account using geth (v1.7.2) and im doing the following but i get invalid address even ...
3
votes
3answers
2k views

How does etherscan fetch the number of token holders from a smart contract?

I was wondering How does etherscan fetch the number of token holders from a smart contract?
0
votes
2answers
138 views

solidity - forever can't return the msg.sender balance

this is my contract code pragma solidity ^0.4.4; contract IamHongKongTokenBack_00{ // 現在我錢包的地址+Eth量 function SeeMyAddAndETHVar() public constant returns (address, uint) { address _myadd = msg....
0
votes
1answer
83 views

Error with wrong calculation of gas price and value after lots of iterations

I am trying to code something that empties an address and sends that amount to my main-wallet. In order to get familiar with sending raw transactions and manually setting the eth-amount, I've tried ...
1
vote
1answer
61 views

Looking for an elegant way of waiting for a payment

Is there a better way of awaiting a payment in ETH on a certain eth-address other than looping over getBalance()? And how do exchanges manage to find transactions even when they are not confirmed yet?
2
votes
0answers
54 views

State transition model

It is known that Ethereum follows State transition model. How is the balance of each account known at any given time ? From my understanding, the yellow paper states that the balance is not stored on ...
1
vote
1answer
141 views

Imported account from privatenode shows loose and 0 balance

I have created my private node with the following config: { "config": { "chainId": 65536, "homesteadBlock": 0, "eip155Block": 0, "eip158Block": 0 }, "...
1
vote
1answer
56 views

Why isn't the from address included in a transaction?

Building transactions with ethereumjs-tx and I'm confused as to why the from address is not included in the transaction. The transaction parameters are: • nonce - transaction nonce • gasPrice • ...
0
votes
2answers
84 views

Missing ETH in EOSCrowdsale address

EOS is a ERC20 token which is currently sold for ETH. 2 million EOS are sold every 23 hours for about 20K ETH as seen on https://eos.io/distribution/ However, what puzzle me is that when I do a ...
1
vote
3answers
560 views

How is the Etherscan TokenTracker able to show holder balances?

How is the Etherscan TokenTracker able to show holder addresses? The balances mapping of your average ERC20 token cannot be iterated over by index, nor can the length of the mapping be obtained. So ...
1
vote
1answer
3k views

Getting Metamask account's balance using fromWei

Using web3 javascript code to get selected account's balance in Metamask and show it in html, web3.eth.getCoinbase(function(err, account) { if (err === null) { App.account = account; $("#...
3
votes
3answers
9k views

Cant get address balance using web3js

I am trying to write a function to get the ethereum balance of a wallet address via web3js. Problem is I am unable to make it work for some reason. Here is my code running in VSCode: const testnet = '...
3
votes
2answers
628 views

“missing trie node” when requesting balance

I've been getting the "missing trie node" error in the majority of my eth_getBalance requests if I use anything other than the "latest" block or very recent blocks. For example, the request: "...
0
votes
1answer
503 views

How to convert BigInteger balance from WEI to ETH in Objective-C?

I am using etherscan api to get balance using the address. But I am getting a response in wei. After some research, I got some WEI to eth converter methods. WEI to eth But I don't know which method ...
0
votes
1answer
304 views

Use full ethereum balance for token transaction

I want to use whatever ethereum is available in my account as transaction fee to send a token transaction. I know the gas I need, so in theory I thought the following formula would work: gasPrice = ...
0
votes
2answers
311 views

Metamask Rinkeby Ether Balance missing

I got some Rinkeby ethers from the Rinkeby faucet, after a minute or so, it showed up in my MetaMask Rinkeby network. But then after a while, my MetaMask shows 0 balance for the Rinkeby network. How ...
0
votes
1answer
923 views

etherscan.io showing wrong balance for my Ethereum wallet

https://etherscan.io/address/0xdfd43138e27b98a73007618997c66ed6e9adb52f So I almost have zero balance in this wallet (which is on an exchange if that matters), but it shows the balance as 0.43 ether. ...
4
votes
2answers
382 views

How to pre-allocate ether to new account created in ethereum private network?

Not by genesis file to be clear when we create new account through geth console it should create new account with some pre-defined balance
0
votes
1answer
2k views

Python script - get balance and send transaction

I'm a developer who is new to ETH and I would like to write python CLI that can check balance of ETH address and can create -> sign -> publish transaction to network via locally running Geth node (I ...
0
votes
1answer
431 views

Converting hex 64 to decimal in js

I am getting totalSupply of Tokens of a contract using ERC20 totalsupply method. I am trying to convert hex returned to decimal. I am receiving: var totalSupply = "...
0
votes
2answers
33 views

Possible to replace entire balance map in single transaction?

I know about gas limits per block, but I can't wrap my head around this problem right now. If I have a token contract that needs to update the balance of every address, is it possible to have a ...
4
votes
3answers
1k views

What is the most efficient way to read ERC20 balances without knowing the tokens that the address might hold?

There are plenty of examples of reading the balance of an ERC20 token from an address via a balanceOf.call when knowing the token contract address beforehand. However, how would one go about reading ...
1
vote
2answers
620 views

Get Token Balance without using nodejs

I am trying to get Token Balance using plain javascript, no nodejs or web3. With web3 and nodejs I can do: exports.getTokenConfirmedBalance = function(node, query, abi) { return new Promise((...
2
votes
2answers
732 views

Ether scan api, compute balance on the date

I need calcualete balance on the date to acconut, but web3 balance and etherscan.com api is missmath. How correct to calculate balance from the available data of api. const web3 = new Web3("https://...
0
votes
1answer
574 views

Check this.balance of another contract

Is there a way to check the balance of another contract from a contract without the use of a public variable? (ie. this.balance)
0
votes
2answers
978 views

JSON RPC get address balance

I'm trying to get the ether balance for any ethereum address. I've set up a node with the Ethereum daemon, but as far as I can tell, using eth_getBalance you can only get the balance of your own ...
0
votes
1answer
970 views

Private Variables [duplicate]

I am wondering if it is possible to have some "private" variables in a contract, by private I mean that I can read the value only if I am the owner of a specific wallet. A simple example is today's ...
9
votes
3answers
4k views

Etherscan API - Get all token balances

Is there a way with the Etherscan API so that you can get all the erc20 token balances for a specific address? As explained here, you can see them with their web UI (the token tracker dropdown). Does ...
1
vote
0answers
53 views

My balance is 0.00 after update. What to do?

I updated my Mist Wallet to 0.9.3 on Mac. When I started it, I saw that my balance is 0.00 which isn't true. Etherchain shows 24 ETH for my wallet. It has nothing to do with syncing. Everything is ...
0
votes
1answer
241 views

Web3 Unconfirmed Balance

Is there a way to get unconfirmed balance from an address? I read this question It uses a method filter, not available on present web3 version. After doing some research I found a method w3.eth....
0
votes
1answer
1k views

How to get balanceOf of a deployed ERC20 contract using web3j?

I'm new to Ethereum and I got stuck on trying to call balanceOf on a deployed ERC20 contract. Here is the code I have so far: Web3j web3j = Web3j.build(new HttpService()); RemoteCall<...
1
vote
1answer
436 views

Internal transactions don't affect balance?

https://ropsten.etherscan.io/address/0x74fafc61782bdaf8abedc526cd18dbf51e0890d1#internaltx There is an internal transaction sending 0.000000000000001 ETH to this address yet balance is still 0. What ...
0
votes
3answers
538 views

How to get address balance after particular block was issued

How to get address balance if you know the block number? In solidity you can call address.balance, but without specifying particular block. Is there a way to do this in solidity or only py/js?
0
votes
1answer
50 views

Tokens not correctly added to msg.sender

This is the result of adding 500 tokens to msg.sender function addTokens() internal{ uint256 _value = 500 ; balances[msg.sender]+=_value; The result 0.000000000000000500
2
votes
2answers
189 views

Why does balanceof() return a constant?

The ERC20 token standard specifies balanceof() to return a constant. function balanceOf(address _owner) constant returns (uint256 balance) But the balance amount might change or am I getting ...
0
votes
1answer
2k views

How can I calculate the real Ethers from the API of etherscan

Having this address: https://etherscan.io/address/0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8 The balance on the web is 21.76252288478066826 Ether But using the API the balance is: https://ropsten....
1
vote
1answer
516 views

Balance returns zero but shows ether with web3.eth.getBalance on testrpc

Issue: Using an account on testrpc I get 0 as my balance from within a program but I get the correct amount when I query balance at web3 command prompt: //here I'm calling a function (shown below) ...
0
votes
0answers
120 views

can't get transfer to execute

I am trying to run the following solidity function: function test() payable { msg.sender.transfer((balances[msg.sender]/1000)*this.balance); } Where this.balance is 0.1 Ether and balances[msg.sender]...
19
votes
3answers
5k views

How to programmatically detect and accept ETH and ERC20 deposits

I'm looking to replicate the functionality provided by cryptocurrency exchanges such as Kraken and Poloniex when it comes to depositing ETH and tokens. Namely: Users can generate and send funds to ...
1
vote
1answer
252 views

Check ethereum balance using text box

I want to check ethereum balance of accounts by entering address in text box and click on check balance button it must show the balance in the account. Please some one help with related links My ...