Questions tagged [accounts]

Ethereum has two types of accounts: externally owned user accounts, controlled by private keys, and contract accounts, controlled by their contract code.

Filter by
Sorted by
Tagged with
0 votes
2 answers
968 views

How to create unique contribution addresses for a referral system by smartcontract

I ran into some trouble with my smartcontract. I want to be able to allocate referral tokens to each person who participated in the ICO referral program. In order to do this, the smart contract must ...
0 votes
2 answers
800 views

restore a deleted imported metamask account

i had my metamask wallet stoled, and my first reaction was delete the stole account. But this account has some pools os pancakeswap, and i need to restore it to save my tokens. I have the seed phrase ...
30 votes
7 answers
45k views

How can I detect change in account in Metamask?

When a user changes to a different account in metamask, is there a way to detect it asynchronously in code? I currently use this.web3.eth.getAccounts((err, accs) => { this.account = accs[0]...
0 votes
1 answer
16 views

Which file in go-ethereum contains Account type?

There is this part of Ethereum whitepaper which describes accounts: An Ethereum account contains four fields: - The nonce, a counter used to make sure each transaction can only be processed once - The ...
5 votes
7 answers
25k views

Web3: How do I get just the first account on testrpc using web3.eth.getAccounts()?

When I run this code in web3 web3.eth.getAccounts().then(e => console.log(e)); The console returns this: [ '0x772f437b0f15e1F205C8BD923b5C8357e9c0c429', '...
2 votes
1 answer
1k views

rinkeby balance says 0 after syncing even though transaction shows ether was sent

I'm using truffle to deploy a contract on the rinkeby testnet Here is transaction info saying that my address received ether however as shown below, the balance still shows as 0. truffle(rinkeby)...
0 votes
3 answers
1k views

Can you convert my address (bytes20) type to a bytes32 string?

I am running into an error for: TypeError: Type address payable is not implicitly convertible to expected type bytes32. Due to the fact that I am using my address ...
1 vote
2 answers
320 views

Ethereum wallet backup doesn't produce any files

I'm using ethereum wallet on windows 10. I have one account and I'm attempting to produce a backup of it. I do Accounts > Backup > Accounts and the file browser comes up, showing a directory ...
0 votes
0 answers
13 views

How do I find my Ethereum Contract Number

Sorry to everybody, as this probably sounds like a silly question, I'm new to all of this and I'm struggling to find my contract number. I've sent a lot of USDC to my ETH wallet, which never arrived ...
4 votes
1 answer
557 views

Create new account over IPC

I want to create a new account over IPC so I have started private chain with the below command geth --networkid=5 --datadir DataDir --ipcapi "db,eth,net,web3,personal" --ipcpath "/Users/smartSense/....
2 votes
1 answer
1k views

web3.eth.accounts.create vs web3.eth.accounts.wallet.create

I was playing with web3.eth.accounts.create() and web3.eth.accounts.wallet.create functions, and reading web3 docs about it. I know that an externally-owned account is the same as a wallet, you have ...
2 votes
3 answers
1k views

I want to get Public key from transaction

I want to get public key from transaction. For example, TXID : 0x191095343fd26cbb4c58996aa6512d5cdf43281d565072bab8d0d5ea9e3d644e I have tried "Get Raw Transaction Hex" in etherscan and use ...
3 votes
1 answer
701 views

What was the maximum password length of a pre-sale wallet/accounts?

What was the maximum password length for pre-sale wallets/accounts? While we're here, is there a maximum password length for accounts created now, using standard tools like geth/mist?
1 vote
1 answer
1k views

The send transactions "from" field must be defined using Infura web3

when I try to send my transaction using infura I get this error "The send transactions "from" field must be defined" My problem is my web3 object. When I used Metamask and ...
0 votes
1 answer
1k views

Importing accounts into geth from metamask

I Have entered into my geth console geth eth.accounts ["0xf844f0d7acb0d01bf66ffd81809fb96b2236abce", "0xc8d94cb87173fc94c4b165e44a5fc0b047618044", "0x6a0ef1a429c3570cb342963d309dd5aaa9e49cd4", "...
1 vote
1 answer
654 views

Who pays the computation fee in account abstraction ERC-4337? in what currency?

I hear that by imposing account abstraction specified in ERC-4337 EOA is not the only one that can instantiate a transaction. What I'm confused about is the actual entity that pays the gas fee and the ...
0 votes
1 answer
624 views

Hardhat Tasks - How to import an account with a private key as signer

I am writing a Hardhat task. Hardhat ethers provides ethers.getSigners()which returns me the addresses derived from the mnemonics saved in process.env. However, I want to use an account address, of ...
20 votes
3 answers
15k views

How to validate a private key?

I could not find any library that, given an hex value, returns true if the given string is a valid ether private key. Any hints?
1 vote
1 answer
2k views

Is there any way to get list of all NFTs owned by an etherscan as shown on etherscan apart from monitoring Transfer even?

I want an api or something that can list all the nfts owned by an address, as it is shown on etherscan so I assume we can get that but not able to find that. Also I know that we can do that by ...
2 votes
1 answer
524 views

(Re)create account from a keystore (?) file

Noob. Sorry :-( I have a keystore file that I'm confident represents an account I'd like to retain/use. It's unclear how I can recreate (or reinstantiate) this account within a fresh Ethereum (node) ...
1 vote
2 answers
7k 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 ...
3 votes
0 answers
54 views

Cannot send transaction to smart contract, 'unknown account' even with account added to wallet

I am trying to send a transaction that updates the state of a smart contract. I have locally deployed a ethereum network using Geth and three VM. Here is my JS code: import { Web3 } from 'web3'; ...
2 votes
4 answers
3k views

Can an NFT (e.g. ERC721) simultaneously belong to two different entities, say an user Owner, as well as a user Custodian?

For example, on the blockchain say you own a ERC721 Car token at your wallet address, but you want to park it in the ERC998ERC721 top down composable Garage owned by your friend, while still retaining ...
0 votes
2 answers
435 views

Local account to local node

If I create my wallet / accounts client-side with web3.eth.accounts how can I "publish" them on my local node? For example, I want to send some ether with an eth faucet to the first created account. ...
1 vote
2 answers
68 views

What are touched accounts?

I've seen this term used a lot in EIPs and client implementations. But I've never seen it defined properly. What does it mean, precisely, for an account to be "touched"? For example, here's ...
0 votes
1 answer
220 views

How to use anvil accounts in the Foundry Test

How can i use anvil accounts into the foundry tests? Like in hardhat node i can getNamedAccounts() but how can I use the anvil accounts into my forge Tests?
1 vote
1 answer
38 views

Why not eliminate EOA's codeHash and storageRoot?

Each account (no matter EOA or contract) has 4 fields: balance, nonce, codeHash, storageRoot. However, codeHash and storageRoot are meaningful only in contract accounts. There is no code in EOA, and ...
1 vote
1 answer
694 views

Web3.js unable to unlock account to call smart contract

I am using web3.js 0.20.6 and I want to unlock an account to execute a smart contract method on a private blockchain. The account is used to pay for the gas. I have used the following code to unlock ...
0 votes
2 answers
43 views

Can a user send a userOperation transaction without using theirs or any EOA?

How can a user send a userOperation without having to use an EOA? Don't get how the EOA is abstracted, unless there is an Executor account signing those userOperations
0 votes
4 answers
441 views

remix could not detect the metamask's account

I find that unlike the other tutorial, there is no injected web3 option, but injected provider - metamask. And when I click it, the metamask shows that it is connected, however, the remix could not ...
4 votes
1 answer
2k views

How to create a wallet with web3.js

From what I understand, a wallet is a smart contract and in order to create a wallet, you need to deploy the contract to the blockchain as stated here, which is different from creating accounts. When ...
2 votes
2 answers
2k views

I need a whole new MetaMask account, with a whole new seed phrase

No one can seem answer this for me. My old business has my seed phrase. this never bothered me b/c there was never more than a $100 in there. Now it does. How to set up a new account? Not a new wallet,...
13 votes
6 answers
14k views

Error: etherbase address must be explicitly specified

When I make a RPC to geth running remotely, I cannot get the account list / balance of the account. It also says that the coinbase is not set. But as far as I know, isnt the coinbase supposed to be ...
0 votes
1 answer
839 views

web3.eth.accounts[0] undefined

I am new and I am trying to make my first transaction using geth and truffle. to specify a sender address I type in the truffle console: src = web3.eth.accounts[0] but I get "undefined" if I ...
0 votes
0 answers
14 views

I got Session proposal trying to log in to Opensea: Events: chainChanged, accountsChanged

Would really appreciate your help. Is that a scam? I cannot log in without resolving the wallet Session proposal. So far i have denied request several times. What happens is i Approve? NetworkEthereum ...
2 votes
1 answer
263 views

Deriving an address from a private key programmatically

I'm stuck between a rock and a hard place right now. I'm developing an app with react native, and users need to be able to import their wallets via their private keys (and hopefully mnemonic phrases) ...
0 votes
0 answers
121 views

HD Wallet Generate independent Phrase Mnemonic

I want to generate a independent Mnemonic Phrase, but with the code generate the same Mnemonic Phrase: import threading from hdwallet import BIP44HDWallet from hdwallet.cryptocurrencies import ...
0 votes
1 answer
43 views

How to get total assets value in dollars of a wallet via web3?

I want to check the total assets value in dollars of a wallet. For example, I just want to check how much asset (Ethers, erc20 tokens) does a wallet hold in form of dollars? e.g: 2000$ worth of assets ...
4 votes
4 answers
759 views

Account Abstraction still requires EOA signatures?

I was under the impression that with account abstraction, I would be able to directly initiate smart contract calls without an EOA. However, after reading through zkSync's Account Abstraction example, ...
1 vote
0 answers
36 views

State Size of Ethereum - why is it so hard to get this number

I am looking for the current state size of Ethereum. Not the size of the data a client downloads when syncing. Just the current state size. It's super hard to get those numbers. Can I somehow run Geth ...
3 votes
1 answer
280 views

How many non-empty accounts are there?

I am researching into the statistics of Ethereum and I an looking for a datum of how many non-zero balance account currently exist in Ethereum? I know that in total 30M of accounts were created but ...
3 votes
2 answers
736 views

Can one wallet address have multiple private keys?

On the forum there were some threads about people creating multiple public keys from one private key. I am wondering if the reverse is possible as well. Can 2 private keys create 1 public key. I am ...
0 votes
0 answers
401 views

window.ethereum.request({method: "eth_requestAccounts"}) automatically picks the connected account when making a transaction

I have multiple accounts on my Metamask wallet(Most of them are connected to the site). But my selected account is not connected to the Dapp. So, when I try to send a transaction it uses one of the ...
15 votes
5 answers
11k views

How to transfer the whole balance of an account?

If I have an account with 5 ETH, can I send the full account balance of 5ETH to another account and have exactly 5ETH received on the second account ? I understood that it will fail because I have no ...
7 votes
2 answers
4k views

What happens if you transfer real tokens to a test account?

What happens if you transfer real tokens to a test account? The Ethereum wallet says that you shouldn't do it, but it doesn't say why.
0 votes
0 answers
37 views

Where can I get the password(s) of locked accounts of Ganache from?

I created a workspace in Ganache so that I've enabled Lock Accounts feature (You can see that in the below photo) in the workspace set up process. So, What is the password to unlock accounts? Where is ...
70 votes
5 answers
61k views

Get public key of any ethereum account

Can I somehow get the public key of an ethereum account knowing just the corresponding ethereum address (e.g. 0x54dbb737eac5007103e729e9ab7ce64a6850a310)?
2 votes
0 answers
71 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 ...
0 votes
1 answer
126 views

Do Smart Contract wallets using ERC4337 allow wallet export?

From what we see in the ERC4337 documentation, SCW allow different architecture for transaction approvals. Unline EOA where we use ECDSA for signing transaction, with ERC4337, wallet developers will ...
0 votes
1 answer
1k views

How to use not personal account web3

In my previous post I got answer but still I need some clarifications let say when deploying contract with node js we have this line try { web3.personal.unlockAccount(web3.eth.coinbase, ...

1
2 3 4 5
11