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
0
votes
0 answers

why ethereum.utils.privtoaddr(priv) generates an address

so i was looking at this script ethercheck and i gave it a private key...some crap i came out with FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364144 and to my surprize it came out with and…
Testdev01
  • 13
  • 3
0
votes
0 answers

ethersjs how to sign with raw transaction data

As the below picture display. If I know the raw transaction data, then how can I sign this transaction with the ethers.js? Thanks.
SylorHuang
  • 313
  • 4
  • 12
0
votes
2 answers

how does Ethereum accounts works with regards to balance of Ethereum and ERC20 tokens

I know that for Bitcoin, each address get its BTC balance from its history of transactions. What about for ethereum? How do we know the ETH balance and ERC20 token balance(s) of an Eth address? Thank you very much For each ethereum address, do we…
Tiaerys
  • 13
  • 1
0
votes
1 answer

How to get access to ETH/UNI pool in uniswap v3 on Goerli testnet?

I want to get pool instance of ETH/UNI pool in Uniswap V3 on Goerli testnet. I tried to pass WETH token address in Goerli to getPool() function, but it returns 0x0, which means that there is no such pool. Also, I tried to get balance of WETH of my…
0
votes
0 answers

Warning! Error encountered during contract execution [execution reverted] Ether

// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; contract Booster { address owner; mapping(address => uint256) public accountBalances; event PaymentAdded(address user, uint256 amount, uint256 timestamp); modifier…
Hashmi
  • 21
  • 3
0
votes
1 answer

Automatically pointing contract address to solidity interface

I'm trying to use a interface on remix IDE and my only issue is that I have to copy and paste the contract's address. Is there a way that I can point it automatically? ty.
0
votes
0 answers

getWeb.js is not returning anything

here is my getWeb.js import Web3 from "web3"; const getWeb3 = () => new Promise((resolve, reject) => { // Wait for loading completion to avoid race conditions with web3 injection timing. window.addEventListener("load", async () => { …
wasee
  • 1
  • 1
0
votes
0 answers

Is there a proper way to get swap values for both coins in Etherscan?

Using the Etherscan api (or bscscan in this case, but same idea) for a specific hash, you get a value based on the token that is being used. In cases of coin swaps, only one of the coins is acquired, nut through the inputs to the contract function…
Xouzoura
  • 1
  • 1
0
votes
0 answers

Uncaught TypeError: Cannot destructure property 'connectWallet' of 'useContext(...)' as it is undefined

So basically when i try to fill the form and exchange between two accounts , nothing happens and when i check the console sometimes there's no error appearing and sometimes there's this one "Uncaught TypeError: Cannot destructure property…
Raed.n
  • 1
  • 1
0
votes
0 answers

Transfer ether to smart contract user SOLIDITY

I am coding a coin flip contract. I have an issue with the amount sent by the smart contract to a player who wins the game. What I want to do is: when you loose the coin flip, you loose your bet and when you win, you get 2 x the bet amount - our…
Toune
  • 3
  • 2
0
votes
1 answer

ether.js accessing public views

I have 2 public views in my smart contract but when I try to access them with ether.js if I try with callStatic like that: NVAContract.callStatic.calculateTotal(address) it throws an error: callStatic undefined If I try like…
Hexye
  • 49
  • 5
0
votes
2 answers

TypeError: Cannot read properties of undefined (reading 'getBalance') - Getting this error when trying to get a balance for an address

const { expect, assert } = require("chai"); const { ethers, waffle } = require("hardhat"); const { impersonateFundErc20 } = require("../utils/utilities"); const { abi } = require("../artifacts/contracts/interfaces/IERC20.sol/IERC20.json"); const…
0
votes
1 answer

Getting "out of gas" when sending whole amount of eth

Here is an example of such transaction: etherscan It was 569730199030000 Wei on a balance, I used current gas price(by web3.eth.getGasPrice()) 19888345864 Wei. So my estimated fee was (19888345864 * 21000) 417655263144000 Wei. I was trying to send…
Artem
  • 364
  • 2
  • 18
0
votes
1 answer

Transfer Eth through smart contract to other account?

In the below code eth will be transferred in the form of Wei by default, but I want the amount will transfer in the form of Ether, how can I do that? function (uint amount) public payable { someaddress.transfer(amount); }
0
votes
1 answer

How to use transfer function in solidity

I created smart contract to transfer ETH from one account to another, ETH deduction occurs but send to other address(which is not specified). Please help me to resolve this problem. //SPDX-License-Identifier:MIT pragma solidity ^0.8.12; contract…
Ayush
  • 49
  • 2
  • 9