Questions tagged [ether]

Ether is the currency used in Ethereum blockchain technology. Refer: https://ethereum.org/ether Questions about Ether which aren't about programming should be asked on the dedicated Ethereum site: https://ethereum.stackexchange.com. Questions which are about programming can be asked on either site.

Ether is a necessary element — a fuel — for operating the distributed application platform . It is a form of payment made by the clients of the platform to the machines executing the requested operations. To put it another way, Ether is the incentive ensuring that developers write quality applications (wasteful code costs more), and that the network remains healthy (people are compensated for their contributed resources).

The official website of is Ethereum.org.

There's also a Ethereum StackExchange site that's dedicated to Bitcoin.

162 questions
3
votes
1 answer

hardhat ethers: deploy vs deployed

In following code: console.log("Deploying contract...."); const simpleStorage = await simpleStorageFactory.deploy(); await simpleStorage.deployed(); Line 2 deploys the contract and we get hold of it. Why do we need to call deployed method in Line3?
Mandroid
  • 6,200
  • 12
  • 64
  • 134
3
votes
0 answers

How to get test ether for pet project as of 9/20/21 when primary rinkeby faucet webpages do not work?

I have tried both of these links but neither one appears to work: https://faucet.rinkeby.io/ According to this post it is not working: Rinkeby Authenticated Faucet is not working? I have tried on two separate addresses and its been several days and…
JustTheTip
  • 31
  • 2
3
votes
1 answer

What is Context.sol uses for in Openzepplin

I'm new to solidity and trying to deploy a ERC20 token using openzepplin.There is one thing that doesn't make sense to me is the context.sol file. From the comment section it's seem like the main function of the context.sol is to implement a GSN…
Vova
  • 143
  • 5
3
votes
2 answers

First Metamask ETH transaction Ropsten faucet failed

I'm following the instructions off the book Mastering Ethereum, (https://www.onlineprogrammingbooks.com/mastering-ethereum/) and I've hit a snag. I've set up the MetaMask extension and trying to make the first transaction via the Ropsten network.…
NubSteel
  • 75
  • 1
  • 8
3
votes
2 answers

Getting a list of ERC20 token holders in solidity

Is it possible to get a list of token holders for a given ERC20 token from within another solidity contract? Since "balances" are stored in a mapping in most ERC20 contracts, I do not think it is possible, since you can't get a list of keys for a…
user1558646
  • 145
  • 4
  • 9
3
votes
2 answers

how to make contract fetch ether from an account

I am new to solidity. I was playing around and wanted to know if I could make a contract fetch ether from one account and transfer it to another account. Thank You
hahahoho
  • 33
  • 2
3
votes
2 answers

Warning: Using contract member "balance" inherited from the address type is deprecated. Solidity

Warning: Using contract member "balance" inherited from the address type is deprecated. Convert the contract to "address" type to access the member, for example use "address(contract).balance" instead. I am getting this warning in Solidity using…
Matt
  • 33,328
  • 25
  • 83
  • 97
3
votes
1 answer

Truffle migrate fails due to missing function, but it exists in node_modules

While attempting to run a truffle migration, I get the following error: Using network 'development'. Running migration: 1_initial_migration.js Replacing Migrations... ... 0x1e30a241296f07f9e4e702f5066031ba128e163fd7858cfd09311ddff14bebf8 …
2
votes
1 answer

How to wait for the tx confirmation in zkSync?

How to wait for the tx confirmation in zkSync? I'm writing a small contract ro swap 2 tokens using zkSync and Hardhat. Here's how I deploy test tokens: await tokenA.approve(router.address, await tokenA.totalSupply()) await…
2
votes
2 answers

Why do we need deployments.fixture?

I have the following code below const { deployments, ethers, getNamedAccounts } = require("hardhat") describe("FundMe", async () => { beforeEach(async () => { const { deployer } = await getNamedAccounts() await…
2
votes
0 answers

How metamask popup opens whenever something has to do with metamask provider?

I'm new to dapp development, I'm trying to build the similar wallet like metamask, I couldn't figure out how metamask popup opens whenever the code has to do something with metamask provider. Are they using any logic behind that?
2
votes
3 answers

Transaction reverted: function returned an unexpected amount of data while testing with ether.js (uniswapv2router.swapExactTokensForTokens function)

im testing UNISWAP_V2_ROUTER.swapExactTokensForTokens using ether.js and this line: await swapInstances.connect(accounts[0]).swap(tokenIn, tokenOut, amountIn, amountOutMin, to); cause this error : Transaction reverted: function returned an…
Matt
  • 53
  • 1
  • 6
2
votes
0 answers

How can we send ether to payable function in solidity?

I `ve got this function at my .sol file function enter() public payable{ require(msg.value > .01 ether); players.push(msg.sender); } But when i`m trying to send some eth on it from deployed file it says 'invalid address or ENS…
gsh1ne
  • 21
  • 4
2
votes
1 answer

How to properly deploy a smart contract and not lose money?

Yes, I have already read the information about how to pay ETH gas(website) and know approximately how to do it, but the amount of money to deploy is very large, so I want to ask if I will do it right: I am going to deploy smart contract at 10 am - 4…
maxet24
  • 111
  • 1
  • 10
2
votes
1 answer

Restrict function access ONLY to one other specific contract in Solidity

I have a security problem in my Solidity contracts and I can't figure out how to fix it. The flow goes like this: First, we create an instance of contract A; Create an instance of contract B, which receives the contract A instance in the…
Flendor
  • 119
  • 11
1
2
3
10 11