Skip to main content

Questions tagged [balances]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
41 views

provider.getBalance() always returns "0"

I'm trying to get the BUSD balance of a whale. However the getBalance() function always returns 0 and I get the following error when I run my tests: AssertionError: Expected "0" NOT to be ...
Christopherus's user avatar
0 votes
1 answer
13 views

How are balances updated on Ethereum

Is there a program that upates the balance on an account and how is this information recorded on the state database?
Jimii's user avatar
  • 111
6 votes
2 answers
91 views

Can the `totalSupply` of a token be different than the sum of all account balances?

If I'm building a rebase token that has a difference of 1 wei sometimes (pre/post rebase) between the totalSupply and the sum of the balances of all holders, does that pose an attack risk within the ...
dNyrM's user avatar
  • 928
0 votes
0 answers
21 views

I'm writing a script that searches for an address with a balance sequentially

So the program is simple. I start at a private key, for example 0000000000000000000000000000000000000000000000000000000000000001 and end at something like ...
Yusef Gharib's user avatar
1 vote
0 answers
13 views

Why Balance in Aurora shows like 0 in WETH?

Have a question about my wallet balance Check Function in hardhat script. It's always seeing like 0 but it's not. My function: let config,arb,owner; const network = hre.network.name; if (network === '...
Pavel Konchych's user avatar
0 votes
1 answer
65 views

Rebasing tokenomics

I have the following variables where all values are multiplied by 1e18 to represent fixed-point numbers on the EVM: uint totalShares = 100; uint sharesAlice = 20; uint sharesBob = 30; uint ...
dNyrM's user avatar
  • 928
0 votes
0 answers
29 views

Return the current ERC20 token holders and number of tokens held

Are there any free APIs available that can provide current data on ERC20 token holders and the number of tokens they hold ?
Alexander Paul's user avatar
0 votes
0 answers
21 views

Cant get metamask accounts balances in right way I want

I 'm making a website for faucet and purchasing nft just for practice and get better at solidity and js cant get metamask accounts balance in the right way I want which is string or integer. JS CODE ...
seojunchian's user avatar
0 votes
0 answers
39 views

Securing Access to User Balances in Ethereum Smart Contract

I'm working on a Mobile app where users sign up, and they are assigned public and private keys. However, these keys are never actually shared with the users but are stored in the database. I want to ...
Giovanni Cassanelli's user avatar
0 votes
2 answers
3k views

Metamask is not showing my balance - emergency question for a newbie

I have been using Metamask for a few days now, and I'm experiencing an issue. The Ethereum balances in my Metamask account are not showing up and it says I have zero Ether. However, when I check on ...
user126213's user avatar
2 votes
2 answers
38 views

How can this account address selled more erc20 token then it received?

I'm using the Alchemy API to retrieve all transactions for a specific address. When I run the API for this address on this particular token, I only receive two transactions. The first transaction ...
Thiago C Fernandes's user avatar
0 votes
1 answer
13 views

Enforcing holding limits on ERC721 tokens

We would like to enforce a certain limit on total amount of tokens held. Note: Tokens issued from our contract. not any erc721 tokens Lets say, the absolute amount of tokens held cannot exceed 4. What ...
PupSt4r's user avatar
  • 61
0 votes
1 answer
33 views

Balance doesn't change after I mint NFT

I am trying to connect EC2 with my testnet CA which I deployed on Mumbai. The Contract is a functions as an NFT, inheriting ERC721.sol from @openzeppelin. I created my Instance in aws EC2, and I wrote ...
Ljyeon's user avatar
  • 3
3 votes
2 answers
183 views

ERC-20 balances

How do I get balances of all the ERC-20 tokens for a wallet address Irwing Tello
Irwing Tello's user avatar
1 vote
2 answers
275 views

Can I determine balance change of a swap via receipt data?

tl;dr: If I execute a swap transaction between two tokens (native or ERC-20 on either side) that is subject to fees/slippage, is there a deterministic way to tell how much the user received from that ...
Brent Traut's user avatar
3 votes
1 answer
687 views

What is the withdrawals field of the response of web3.eth.getBlock()?

I noticed that the withdrawal field has been added to the web3.eth.getBlock() response. Here is a small example: { <the usual fields>... , withdrawals: [ { index: '0x3812d', ...
Pierogi's user avatar
  • 203
0 votes
1 answer
29 views

Geth modes for address balance

After some research I saw that there are several types of synchronizations for the geth client: full sync, fast sync and light sync. If I want juste check the balance of an address what is the ...
RDude's user avatar
  • 11
1 vote
1 answer
44 views

self-hosted solutions to get account balance

What are the most common solutions self hosted solutions to get the balance of an account with a python script? I know that there are RPC nodes or are there other solutions? Maybe solutions that use ...
RDude's user avatar
  • 11
2 votes
0 answers
84 views

How would you setup a block listener in rust using web3?

I was wondering if it would be possible to have a function that listens to new blocks and checks for a balance update for an account. I believe you need to use the filter builder but not sure how to ...
Jean Claude Dusse's user avatar
1 vote
1 answer
106 views

Subgraph returning null for some addresses

I have deployed a version of the open-zeppelin-subgraph (https://github.com/OpenZeppelin/openzeppelin-subgraphs) and I am tracking ERC20, ERC721 and ERC1155 tokens. I am using this query: { ...
Falcon Stakepool's user avatar
0 votes
2 answers
232 views

Metamask balance

How does Metamask keep the updated balances of my ERC20 tokens? What happens in the background that as soon as I receive an ERC20 transfer, the balance gets updated? Who calls balanceOf()?
dNyrM's user avatar
  • 928
0 votes
0 answers
128 views

Do contract storage locations that map wallet address to balance change

Will the storage location of a wallet address' balance change over time? If so, is it a problem largely associated with edge cases/unimportant tokens or is it a pervasive risk? For some background: I'...
itgav's user avatar
  • 26
1 vote
2 answers
69 views

balances stuck in contract

I'm running a MLM binary tree project, and when users register, they have to pay a fee which will be divided into two things: 90% for contract balance and the rest is a reward for their root user. ...
Sina Blank's user avatar
0 votes
1 answer
215 views

Why is WETH balance of an address is wrong on hardhat fork?

I have forked mainnet with hardhart with below command: npx hardhat node --fork http://127.0.0.1:8545 --port 8546 When I get the balance of 0xbd497b28d443a5345674fef37c50d8fd68e7bd94, it shows it ...
Tugay's user avatar
  • 125
0 votes
1 answer
228 views

How to transfer all the coins that an account may have?

I have a system where there'll be dozens of accounts, for ETH and tokens. I'll have access to the private keys of those. From time to time I'll need to withdraw all of the coins in each account, in ...
Camila326's user avatar
  • 115
1 vote
0 answers
17 views

Unclear balance

I have noticed that the balance of my HOGE is much smaller than it should be, according to my calculation (buying minus selling). Is 0.00000217 HOGE. According to the calculation should still be 21090....
dagor's user avatar
  • 11
0 votes
2 answers
412 views

HD Wallet with multiple addresses for privacy

The main objective is confidentiality, not allowing others to know how much one holds in their balance. by enabling a user to receive tokens in their balance with each transaction using a unique ...
Eduardo Furtado's user avatar
0 votes
2 answers
347 views

How to check the balance of a wallet within a contract and assign balance to a variable?

I'm trying to require the number of contract NFTs in a wallet < declared uint256 variable in order to proceed with safemint function. I have the following code but I can't work out what is ...
0xCas's user avatar
  • 1
0 votes
0 answers
55 views

How to copy all account balances from main network to a private chain?

So I want to have a playground where all accounts have same balance as on mainnet, yet I do not have access to a fully synchronized node. All I want are account-balance pairs to be synchronized, no ...
Blender's user avatar
  • 73
0 votes
2 answers
506 views

What is causing this invalid opcode error when I call the transfer function?

I am working through the process of developing a simple ERC-20 token to learn more about smart contract development. I am running into an issue on my coin sale contract, however. When I wish to end ...
ho88it's user avatar
  • 21
0 votes
2 answers
705 views

How can I get the wallet balance for an address with a volume of 200k plus transactions?

I am trying to get the wallet balance for this address 0x389044F3ac7472060A0618116e3624A5f0f20F28 as of Aug 31 2022. In the past, I've been able to do so by getting the transaction history and ...
madamepresident's user avatar
0 votes
1 answer
74 views

I have a 3 million unique wallet addresses. What is the most efficient way to get the ETH balance and also no.of NFTs each address is holding?

I am looking for an efficient way to query/get ETH balance and also the no.of NFTs belongs to a unique 3 million wallet address. Any tools or suggestions will be helpful. Well, I know we can use any ...
Krishna Kumar S's user avatar
0 votes
2 answers
308 views

Please explain why my account balance is almost 0

I sent some ethereum to an account and the incoming transaction shows up. Also there is an outgoing transaction of a small amount of ethereum, but the final balance of the account is close to zero. ...
mybinaryromance's user avatar
0 votes
1 answer
159 views

See Balances on mainnet-fork?

I'm currently watching my first smart contracts tutorial by freecodecamp and it works fine but, I have one question: How can I check the balance of my mainnet-fork account(s)? When I work with Rinkeby ...
Christopherus's user avatar
1 vote
1 answer
184 views

How to obtain a list of addresses of 'fresh' wallets?

How to obtain a list of addresses of 'fresh' wallets? Hi everyone, how do I go about extracting a list of wallets that had their first transaction within the past 24 hours? I know that wallets are ...
trademarc's user avatar
1 vote
0 answers
70 views

This is the source code for adding the token to the wallet, but the token is not added to the wallet [closed]

ERC20 Token smart contract: // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC20.sol"; contract Shinobi is ERC20 { constructor (...
Ali Hoosseini's user avatar
0 votes
1 answer
64 views

Side balance of token in contract

Is it possible to have a "side balance" of an ERC20 token in the same contract? So when it's queryable with token.balanceOf(address(this)), for example, it doesn't appear until a certain ...
dNyrM's user avatar
  • 928
1 vote
1 answer
257 views

address(this).balance not updating correctly

I have made a few test contracts for this issue and I have come across the same result in all of them so it is obvious I am not understanding something. In the following contract I keep track of the ...
Pablo González's user avatar
0 votes
1 answer
204 views

Transfer function not changing custom token(ERC20) balance after successful transfer from transfer function?

Transfer function not changing custom token(ERC20) balance after successful transfer from transfer function ? The transaction is successfully performed but the amount of custom token in my wallet does ...
Syed Murtaza Ali Shah's user avatar
0 votes
2 answers
1k views

Is it possible to send testnet eth from one testnet network to another?

Is it possible to send testnet eth from one testnet network to another? Curious because ain't getting much testnet eth these days.
Syed Murtaza Ali Shah's user avatar
4 votes
1 answer
2k views

How to send ether to a contract (even if the contract doesn't implement receive or fallback functions)? [duplicate]

If the contract doesn't implement the receive or fallback function as payable, it can't receive funds?
Eric Nordelo Galiano's user avatar
1 vote
0 answers
36 views

How does balance of nodes calculated in Ethereum network? [duplicate]

As a beginner of the topic, I am trying to understand the storage concept in Ethereum and smart contracts. Each of the network nodes has a public address called a digital wallet for managing the ...
kntgu's user avatar
  • 11
0 votes
1 answer
32 views

Why this transaction succeeded to transfer more than its balance?

On BSC chain, this transaction is minting an NFT(MstToken). The evm trace shows it called MstToken.transferFrom(fromUser, ..., 0x30927f74c9de0000) to send out 0x30927f74c9de0000 token and it succeeded,...
aj3423's user avatar
  • 251
0 votes
1 answer
14 views

I need help with balances

I would like to create a balance for each "vault". for example i will have my struct: struct unnamed { string[] crowdFundName; } I would like to add a balance to each vault for ...
DigitalCannon's user avatar
0 votes
2 answers
407 views

Increasing ETH balance of a contract on deployment

I am building an exchange where you can buy and sell tokens. I have a contract Exchange. It contains a function sellTokens which will take the amount of tokens entered by a user and give them a ...
tauraspaj's user avatar
0 votes
1 answer
454 views

A Transaction from a wallet to a smart contract gives an error "txn receipt status fail". If you transfer to another wallet, it works. How to fix it?

I need to transfer money from the Metamask wallet to the smart contract address. I wrote a js-file for this(using web3.js). (I'm testing on Rinkeby's network.) When my site opens, this js-file is ...
Alexei's user avatar
  • 129
0 votes
2 answers
39 views

why I am not getting balance of contract?

when I call the getbal() of contract "Account" it shows 0 balance but when I call createacc() of contract "accountfactory" with value=30, accountfactory's balance becomes 9.but ...
Hitesh's user avatar
  • 21
0 votes
0 answers
103 views

Balance in wallet not updated after mint

on my test token using OZ ERC20 I can mint successfully and the tokens show in the wallet. this is the relevant code contract TestToken is ERC20, Pausable, AccessControlEnumerable { ...
Jason Basil's user avatar
1 vote
1 answer
34 views

Where can I upload a secret file that no one should have access to except my site?

I want to create a website that will transfer money in real time from my ethereum wallet to another ethereum wallet. To do this, I use the web3.js library in the javascript file. This js file also ...
Alexei's user avatar
  • 129
0 votes
1 answer
481 views

Why is the method in receive() external payable{this.withdraw Funds();} not called in Solidity?

I wrote a smart contract that, when receiving money to my address, should automatically transfer 50% to the 1st wallet address, 25% to the second, 25% to the third. For some reason it doesn't do it ...
Alexei's user avatar
  • 129

1
2 3 4 5 6