Questions tagged [balances]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
20 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 ...
user avatar
0 votes
2 answers
25 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.
user avatar
0 votes
0 answers
6 views

How do I calculate the circulating supply for a given token/token address from blockchain data (bigquery-public-data)?

The Following Query does not work WITH incoming as (SELECT a.to_address, a.token_address, b.symbol, SUM(SAFE_DIVIDE(SAFE_CAST(a.value as BIGNUMERIC),POW(10,CAST(b.decimals AS INT)))) as ...
user avatar
1 vote
1 answer
11 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?
user avatar
1 vote
0 answers
28 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 ...
user avatar
  • 11
0 votes
1 answer
12 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,...
user avatar
  • 183
0 votes
0 answers
21 views

Is it possible to exchange one token for another via web3.js in Metamask?

I need to transfer one token to another on my website, in Metamask (for example, ether to bnb or ether to matic). In Metamask, you can select the desired coin, click "Swap" and you can ...
user avatar
0 votes
1 answer
13 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 ...
user avatar
0 votes
2 answers
36 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 ...
user avatar
0 votes
0 answers
38 views

How to automatically get gas and gas price average values in web3.js?

I want to automatically get gas and gas price averages in web3.js and update them periodically. Here are the values (low, average, high) for gas prices. But they are constantly changing, and changing ...
user avatar
  • 117
0 votes
1 answer
31 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 ...
user avatar
  • 117
0 votes
2 answers
27 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 ...
user avatar
  • 1
0 votes
0 answers
20 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 { ...
user avatar
1 vote
1 answer
13 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 ...
user avatar
  • 117
0 votes
0 answers
36 views

web3.eth.filter error. How to track incoming transactions to ethereum wallet via web3.js (in Next-JS)?

I want to create a website that will transfer money in real time from my ethereum wallet to another ethereum wallet. To do this, you need a script (.js) to monitor the balance of my wallet in real ...
user avatar
  • 117
0 votes
0 answers
22 views

How to implement a "deposit" functionality for a service with users?

Let's say, there's a service I'm building, and there're users that can sign up for it. I want to allow each user to deposit their funds, and, of course, track them. The requirement I have is that it'...
user avatar
  • 1
0 votes
0 answers
20 views

Сall smart contract method from web3js bot. Is it possible?

I wrote a smart contract (.sol) in Solidity language that redistributes money from an Ethereum wallet to other Ethereum wallets. I need that when money is credited to the first wallet, a smart ...
user avatar
  • 117
0 votes
1 answer
45 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 ...
user avatar
  • 117
0 votes
0 answers
20 views

Is possible to remove an already hosted smartcontract and already hosted web3.js/ethers.js bot?(I mean Ethereum & Polygon;I have a private wallet key)

I need that when money is credited to the Metamask (Ethereum and Polygon) wallet, the money is automatically transferred to the smart contract. I was advised to write a bot on web3.js and ethers.js ...
user avatar
0 votes
0 answers
31 views

How to make it so that when money comes to the Metamask wallet, they are automatically redirected to this smart contract? [duplicate]

I wrote a smart contract on Solidity, which, when receiving money to its address, redirects 50% to the first wallet, 25% to the second wallet. How to make it so that when money comes to the Metamask ...
user avatar
1 vote
1 answer
28 views

How to transfer ethers from a contract to another SPECIFIC address?

I want to write a smart contract that, when receiving money, transfers 50% to a specific address of the first wallet (0x583031D1113aD414F02576BD6afaBfb302140225) and transfers 25% to a specific ...
user avatar
0 votes
0 answers
16 views

Privilege for a list of addresses

I want to give free mints to people who owns an NFT from another collection. I can do it through importing interface of another contract and calling the balanceOf function with the related address, ...
user avatar
0 votes
3 answers
162 views

How to call a payable function and pay from the contract balance?

First, this is not a duplicate question of these ones: How can you call a payable function in another contract with arguments and send funds? Calling and funding a payable function from existing ...
user avatar
1 vote
1 answer
21 views

How to query the erc20 balance of an address using eth-cli command?

How does one get the balance of tokens erc20 of an address when using the eth-cli command?
user avatar
0 votes
0 answers
74 views

API for getting the total balance (net worth) of an address?

Etherscan can get the total net worth for all tokens of an address, ETH and ERC-20, e.g.: https://etherscan.io/tokenholdings?a=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 Other services like Zapper.fi ...
user avatar
  • 101
0 votes
0 answers
274 views

Get Token Balance of Address at Particular Block Number with Alchemy

I have been trying to get the token balances for an address at the first of the month for every month in the past year. There is an incredible article about how to do this with chainstack: https://...
user avatar
0 votes
0 answers
61 views

Web3 Chainstack Guide to Batch Transactions gives Error: This contract object doesn't have address set yet, please set an address first

I am trying to get the token balances for all of the tokens in my address. To do that I followed the steps in this guide here: https://chainstack.com/the-ultimate-guide-to-getting-multiple-token-...
user avatar
0 votes
0 answers
10 views

Can someone HELP a NOOB with Hex crypto

Please someone help me! I am very new and so freaking confused about Erc20 crypto tokens. I have an app I use called Hex Network and I have "mined" a good bit of Hex and have made 3 ...
user avatar
0 votes
1 answer
27 views

implementing balanceOf in an ERC20 contract (not using openzepellin)

I'm a noob and trying to implement the balanceOf function in a solidity. The standard API is function balanceOf (address account) public returns(uint256) However, I suspect that it needs to read the ...
user avatar
0 votes
0 answers
193 views

Wait for a transaction to be mined ends too soon

I got a simple python script that sends a signed transaction then wait for the transaction receipt. All is working perfectly, but when I poll my wallet (a metamask wallet) just after the reception of ...
user avatar
0 votes
0 answers
64 views

Check whether the msg.sender has a polygon ERC-721 token in their wallet within a Ethereum ERC-721 contract at time of mint

I'm trying to figure out whether it's possible to check if the minter has a polygon nft in their wallet at time of mint for an ethereum nft. Take a look at how Bored ape kennel club did it https://...
user avatar
0 votes
0 answers
8 views

Best way to collect state of addresses for contract X

I want to collect the state (balance) of all addresses of contract X. I'm interested in the historical state too. I'm trying to recreate the balance based on transfers. I'm using getPastEvents ...
user avatar
0 votes
0 answers
49 views

Balance of token not appearing in my wallet (Ethereun ERC20)

I transferred AAA Tokens to my own wallet deposit which is under Network Ethereum ERC20. Etherscan seems ok towards my success transaction Txid: ...
user avatar
  • 1
0 votes
1 answer
38 views

How can I find the incoming balance of a erc20 (usdt/shiba etc) using its transcation hash?

I know how to find the erc20 balance of an address. What I'm trying to find is the incoming token of a particular ERCs. For example : for a transaction, I managed to fetch its from_address, to_address ...
user avatar
  • 363
0 votes
1 answer
142 views

withdraw function for withdraw ethereum token from a contract is behaving weird

I copy a withdrawal function from the solidity documentation and added it to my contract function withdraw() public onlyOwner { uint256 ownerBalance = address(this).balance; require(...
user avatar
0 votes
1 answer
813 views

Multiple ways to check the balance of ERC20 tokens of smart contract: which to use?

I have a smart contract which holds ERC20 tokens. There's a function in it, in which I need to check whether the smart contract has enough balance, and if so, send out some tokens to a user. I thought ...
user avatar
  • 1
0 votes
2 answers
289 views

How to correctly call `<address>.balance(uint256)` to get the balance of a specific address [duplicate]

I am a newbie in Solidity. I am learning by reading official docs, i.e. Solidity I am trying to get the balance of an address in solidity using the simple balance method. Below is my code: pragma ...
user avatar
0 votes
0 answers
123 views

Provide button to claim token without showing my private keys

The player will claim their rewards (a token) and pay a fee through their wallet. How does this process happen without my needing to display my private keys on the front-end? What I know so far is ...
user avatar
  • 101
0 votes
1 answer
37 views

Deploy 2 SmartContracts at the same address

There are 2 SmartContract A, B. First, deploy A, then deploy B at the same address of A. When I call address(this).balance on A and B, it returns the same result. Would you please explain?
user avatar
0 votes
1 answer
407 views

How to transfer Ether from a smart contract to an account?

I wrote a very simple smart contract. The goal is to: transfer some Ether from an account A to the smart-contract and then from the smart-contract to another account B. Here is the contract: pragma ...
user avatar
0 votes
0 answers
65 views

Best way to get balances of multitude of addresses

I have a list/array/map of addresses. I want to keep track of their balances on the front end. Currently, the front end is calling the balanceOf() function for each address and updating based on the ...
user avatar
  • 530
0 votes
0 answers
67 views

how to use usdt in erc20 full node

I have a full node synced atrium installed with GETH. I want to deposit some more currency and eth and usdt and 1inch in the addresses that this node account gives me, but I do not know how to ...
user avatar
0 votes
1 answer
24 views

When you deploy contract, is it reset balance of your computed etereum address? [duplicate]

Before further situation description, sorry for my poor English skill. I sent my ethereum to estimated(?) contract address before contract is deployed. it will be contract address soon, but it is not ...
user avatar
  • 1
0 votes
0 answers
90 views

How to get the balance of tokens inside my MetaMask wallet?

I am trying to get the balance of the Alpacas I have in my MetaMask wallet. Googling around I found different ways but many didn't work. So this is the most recent code I found but it is returning ...
user avatar
  • 181
0 votes
2 answers
48 views

Would an EOA's balance change within the same transaction?

I'm trying to understand various aspects of the micro-process of a transaction such as how msg.sender's balance is changed prior to and after a transaction is mined. Is the balance updated after the ...
user avatar
  • 429
0 votes
0 answers
147 views

How to get the balance of any Token other than ETH?

I'm using ether.js library and infura as provider, the code works for getting balance of Eth: const provider = ethers.getDefaultProvider(Provider_network, { infura: MY_INFURA_ID }) const balance = ...
user avatar
  • 183
5 votes
1 answer
3k views

Hardhat, ether.js - fetching balance of signers locally shows no ether

I am trying to fetch the balance of signers in a test locally. I didn't change the default value of eth for accounts in the hardhat configuration. Yet when I query the balance, I see that the accounts ...
user avatar
  • 166
0 votes
1 answer
630 views

Get balanceOf tokens ERC721 (nethereum)

Just trying get count of uniswap NFT-s on 0x5794d36de0c21211a7906688981371132bd7c6f0 wallet Step one: Get contract from adress 0xc36442b4a4522e871399cd717abdd847ab11fe88 (Contract address for uniswap ...
user avatar
  • 103
0 votes
0 answers
26 views

Token no IN transaction only OUT

I was digging into ERC20 contracts and found weird thing, for example take a look at this address https://etherscan.io/token/0xf786c34106762ab4eeb45a51b42a62470e9d5332?a=...
user avatar
  • 1
0 votes
0 answers
36 views

Ethereum balance is not showing in my Ethereum node

I have set my ethereum node in Amazon Ec2. I start syncing through this command sudo geth --datadir /home/ubuntu/data/ --cache=512 --allow-insecure-unlock --rpcapi "web3,eth,personal" --rpc ...
user avatar
  • 101

1
2 3 4 5 6