Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [balances]

The tag has no usage guidance.

1
vote
2answers
26 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
35 views

API for ERC20 token balance - EtherScan

Is there any API for ERC20 token balance of an address for a particular contract?
1
vote
2answers
66 views

How to check Balance & send ERC721 Tokens

I have SPH ERC721 Tokens. How can I check balance like ERC20 and send ERC721 tokens token to Exchange or in other wallet ?
3
votes
1answer
88 views

Is it possible to to send out more ether than account has while compensating for it by another transaction in the same block

Is it possible to have the following scenario? Account A has 20 ether, account B has 20 ether In transaction 1. Account A sends 25 ether to account B In transaction 2. Account B sends 10 ether to ...
-1
votes
0answers
28 views

Require msg.sender.balance not work correct in payable function

I create payable method in my contract. All works good, but when I add condition about balance of sender I catch error: "VM Exception while processing transaction: revert": Method buy is below: ...
8
votes
1answer
482 views

Can a contract with no payable function have ether?

The question in the title says it all. To the best of my understanding, the only way to deposit ether into a contract is by calling a payable function, and set msg.value larger than 0 (and of course, ...
2
votes
0answers
20 views

parity json RPC eth_getBalance timeout on light mode

I have timeout problem with eth_getBalance on light mode enable on parity json-rpc. I have no problem with light mode disabled. Here my command on parity parity --chain ropsten --jsonrpc-apis all -...
1
vote
1answer
18 views

How do you calculate a wallet balance in the world of shards?

I have a general question about calculating account balances in the new world of sharding. In the Bitcoin blockchain, in order to accurately calculate someone's wallet balance, you have to analyze ...
1
vote
2answers
55 views

How does 0x0000000000000000000000000000000000000000 have over $1.5 trillion octillion octillion in tokens? [duplicate]

I looked up 0x0000000000000000000000000000000000000000 on Etherscan, and realized that the address holds a lot in ERC tokens. While the ETH balance (about 7,549 ETH or about $841,000) isn't abnormal, ...
1
vote
1answer
30 views

How to get balances of all the accounts(~1000) in Geth node?

How can I get the balance of all the accounts in my Go Ethereum node? I have about 1000 accounts and it is too slow to use eth_getBalance to get balance for each address. Are there any ways to use ...
1
vote
2answers
28 views

How can I create a contract to manage customer balances?

I want to implement something like this: Test conditions for making ethers transfers between accounts. 3 accounts I am having difficulty with the transfer functions.
0
votes
2answers
79 views

Trouble connecting to web3 1.0 through web browser using Infura.io

I am trying to connect to web3 1.0 through a web browser, I dont see much documentation for 1.0 though. This script says im connected but I think its the previous version as anytime I try and run a 1....
1
vote
1answer
17 views

Balance should not be zero on this address I suppose

for address https://ropsten.etherscan.io/address/0x00916c608868c68f4cd8bea6786ab40b24b55392 balance is shoving 0 but from transactions it should be little more than one ether I believe there is ...
1
vote
1answer
104 views

Calling and funding a payable function from existing contract balance [duplicate]

If smart contract A has a balance of 1 ETH, can I call a payable function on Contract B, from a function in Contract A, with a msg.value that would be effectively withdrawn from the balance of smart ...
0
votes
1answer
61 views

Testing balance of a contract

I'm trying to test the balance of the contract with truffle, but I'm obviously doing something wrong as the test passes. it("should check balance", function() { Lottery.deployed().then(function(...
0
votes
2answers
33 views

From where this Ether came from?

Let's have a look at this address on Etherscan: https://etherscan.io/address/0xfbe0aFcd7658BA86be41922059dD879C192D4c73 First transaction is a Smart Contract creation, that costs about 15 ETH. Can't ...
0
votes
1answer
202 views

The difference between msg.sender.balance and owner[msg.sender]

Hello everyone i have a code like: mapping(address => uint)owner; function show() view public returns(uint) { return owner[msg.sender]; //return msg.sender.balance; } in slodity and ...
1
vote
3answers
59 views

ERC-20 transferFrom implementation potential flaw…or not?

Let's say transferFrom function is implemented in a next manner: function transferFrom (address _from, address _to, uint256 _value) public returns (bool success) { uint256 spenderAllowance = ...
0
votes
1answer
91 views

Get a balance of an address at a certain block

We are facing a problem with the web3.eth.getBalance(address [, defaultBlock] [, callback]) ( here the doc ). The function works well for last block, or for a small number of blocks in the past, but ...
0
votes
1answer
48 views

How do I control users balances from an external contract?

I'm developing a blockchain project where I have two separate contracts, the ERC20 token contract and the Main one that contains the application logic. I need to be able to move users' tokens as I ...
0
votes
1answer
51 views

Unable to call ERC20's balanceOf() from another (ERC20)contract

I was managed to use transfer() function of the token from my contract, however, the balanceOf() function will only return 0. (or it seems on MyEtherWallet) I was testing a case where the smart ...
0
votes
0answers
28 views

What happens if the “balance” of the address which sends “address.transfer(amount) is ” zero "?

Consider the balance of the address that sends address.transfer(amount); to receive the amount is zero. For example we have following address with balance of zero: web3.eth.getBalance('0x123').then(...
1
vote
1answer
73 views

How to give a non-zero balance to a contract at time of deployment using Remix?

In case we want to deploy a contract by web3.js we can easily determine the balance of the contract at time of deployment as follows: const thisContract = new web3.eth.Contract(abi); thisContract....
1
vote
0answers
58 views

What is missing to make a successful payment between payer and recipient?

I tested both signing payment and signature verification that is implemented by JavaScript and EthereumJS here: And both of them (signing and verification) properly work, meaning that I am sure the ...
1
vote
1answer
631 views

How to get the balance of a contract using web3.js?

I have deployed a contract as follows and determined its balance to be 5000 wei (value: 5000): const thisContract = new web3.eth.Contract(abi); thisContract.deploy({ data: bytecode, ...
0
votes
0answers
25 views

Ethereum classic wallet is zero

I logged onto my ethereum classic wallet and the balance is zero. This is absolutely wrong. What do I need to do.
0
votes
1answer
121 views

eth.getBalance(<account>, <block>) returns “Error: missing trie node”

I have used --gcmode=archive to download all the state tries and eth.syncing returns false meaning my node is in sync. When I execute eth.getBalance for blocks closer to the current block I obtain the ...
0
votes
0answers
28 views

Download all the state tries

I want to download all the state tries and for that purpose I am running my geth client in archive mode (--gcmode=archive). But It does not download all the states. Performing eth.syncing returns ...
0
votes
0answers
95 views

Is it possible to get account balances in --syncmode “fast”?

I want to get transaction details and account balance from Ethereum blockchain. The range of date is from genesis block to last mined. Is it possible to get these information from web3.js? Is it ...
2
votes
1answer
55 views

Can I rely on the fact that 'address(this).balance >= msg.value' is always true?

To my understanding, at the beginning of a payable function in a contract, an amount of msg.value ether is added to the contract's balance. Therefore, the expression address(this).balance >= msg....
0
votes
1answer
176 views

Deploying a contract with a “payable” constructor and including input parameters?

There is a useful Solidity contract HERE. However, there are two things at time of its deployment: (1) The first thing is the contract balance since its constructor is payable. (2) And the second ...
0
votes
0answers
27 views

Looping through and getting contract token balance?

To be able to query the balanceOf function of the many symbols, i've stored in database a reference of the contract address hash to it's symbol. I'm trying to get each token's balance passing in an ...
0
votes
1answer
558 views

Truffle test: How to test Ether transfer? Balance of specific account?

How is it possible to test if my contract actually transfers money to a specific account? function _transfer(address receiver_, uint256 payout) internal{ receiver_.transfer(payout); } Testing in ...
0
votes
0answers
121 views

Wrapped ethereum showing in balance (ethplorer, etherchain) but is unavailable to trade

So I checked my balance on my MEW account 0x172342843d6Ec29DDD99AF0c3d3d734725c189C3 and it shows that I have 0.876 WETH balance. But I cannot neither trade it or unwrap in. Does any one have an idea ...
0
votes
1answer
159 views

How does Ethereum account state change? [duplicate]

Ethereum uses Accounts instead of UTXO (Bitcoin). I would like to know how does the ledger keep the account state (technical details if possible)? Does it modify the ledger (accounts) by incrementing ...
0
votes
1answer
16 views

If a malicious party attempts to close a Raiden payment channel with incorrect balances, can they steal the deposit?

If a malicious party attempts to close a Raiden payment channel with incorrect balances, can they steal the deposit if the other party doesn't respond? If they close the channel and transmit that ...
1
vote
0answers
26 views

Should I wait for sync to be 'finished' in 'syncmode=light' before I could check account balance OR transact using the account? [duplicate]

NOTE: I'm aware of another question, but, it's related to 'fast' syncmode, and mine is of 'light' syncmode. I'm running light node client for rinkeby using command: geth --rinkeby --rpc --rpcapi ...
1
vote
1answer
128 views

Why does web3.getBalance sometimes return old value?

Can anyone please explain the following issue? I have a pretty simple code to fetch ETH balance using the web3 JS library. It's something like the following: import Web3 form 'web3'; const web3 = ...
0
votes
1answer
37 views

The funds sent to the contract do not show the correct value on the side of the contributor.?

The question is not answered that's why I ask again. Can someone tell me and point out ( correct me) where the problem lies. Eth has been sent to the crowdsale contract successfully. BalanceOf and ...
0
votes
0answers
38 views

Why incorrect number of tokens are sent according to the current rate to the contributor.?

Token Contract https://ropsten.etherscan.io/address/0x6f5c43f62b4b18aa8ed37b42f2804f7049cbe0e9#code CrowdSale Contract https://ropsten.etherscan.io/address/0x9b94e1894abe2051e6e96bf1b57fe5d3adbbc5aa#...
0
votes
0answers
25 views

Finding duration of token balance in a wallet

Is someone please able to advise on or share example code for estimating the period of time a certain token balance has been maintained in a wallet. For example establish if a wallet address has held ...
0
votes
0answers
153 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
81 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
77 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....
2
votes
2answers
180 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 ...
0
votes
0answers
86 views

Update the sender's balance of wei contributed and the amount raised fail

The funds are being transferred to a contract (the balance of the contract, amount raised- no change, no update). The contract is here: https://ropsten.etherscan.io/address/...
1
vote
1answer
68 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
1k 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
298 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 = ...
0
votes
1answer
90 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 ...