ethereum Questions

4

This past week Metamask introduced a new function called "wallet_addEthereumChain" which allows the user to automatically add a new Etheruem RPC to their wallet when prompted. This functi...
Pneumatics asked 11/3, 2021 at 18:35

3

Solved

I am trying to create a smart contract using Solidity 0.4.4. I was wondering if there is a way to set a mapping with some values already entered to an empty one? For example: This initailises a new...
Graphite asked 31/12, 2017 at 21:31

3

Solved

How do you create a new Provider using a custom node url using the ethers package? Looking to do something like this: const provider = new ethers.providers.Web3Provider('http://my-node.com')
Feckless asked 14/7, 2022 at 20:2

3

Solved

Is there a way to add ETH to a Ganache account? I am aware that I can typically refresh the accounts by restarting ganache cli, but I'm using the --db option, which means the accounts are persisten...
Fusiform asked 29/3, 2018 at 19:47

1

Is there any UI similar to Etherscan or Ganache UI for debugging Hardhat transactions?
Agneta asked 29/5, 2022 at 3:18

3

Solved

I'm running ethereum/client-go docker image with the following flags: docker run -p 8545:8545 ethereum/client-go --rpcapi personal,db,eth,net,web3 --rpc --rpcaddr 0.0.0.0 --rpccorsdomain * --rinke...
Lichtenfeld asked 18/4, 2018 at 15:1

2

Solved

I've just started using Web3j and am having some basic trouble. I've successfully figured out how to get an EthBlock and retrieve all of the information inside of it. I'd like to see the list of tr...
Imputable asked 11/5, 2018 at 20:39

3

Solved

I am using web3 for my first dapp test and I'd like to make so MetaMask will prompt the user to change the network to Binance (BSC) network if it is not selected already, just like here: How to tr...
Furie asked 5/7, 2021 at 7:43

3

I had an issue with a solidity contract in which the error demanded I write my code as an abstract. Abstract means my code will be non-deployable. This is a contract that aims to transfer assets an...
Holocaine asked 31/5, 2023 at 8:23

3

I am new to blockchain. I have done a little bit research and here's my steps to fetching a list of NFTs owned by certain wallet with web3.js balance = ERC721.methods.balanceOf(walletAddress).call(...
Parabolize asked 9/5, 2021 at 17:29

5

Solved

With web3js, how do you figure out that there was 40000 tokens transfer from the transaction's hash?
Catherin asked 28/12, 2017 at 8:49

5

If a smart contract has the compiled bytecode for a contract can the first deploy a subsequent contract? According to Ethereum.org: "To deploy a smart contract, you merely send an Ethereum tra...
Pless asked 3/12, 2021 at 3:13

2

Solved

I tried to change token base URL to display the new images of NFTs on opensea.io. But it is not updated immediately. There is a way to update by specifying force_update=true on Rikeby testnet. But ...
Caning asked 26/8, 2021 at 9:26

4

I am getting the Property 'ethereum' does not exist on type 'Window & typeof globalThis' error in React. This is the line generating the issue: import { ethers } from 'ethers' const provider...
Stapleton asked 2/2, 2022 at 18:50

4

Can anyone explain to me what address(0) is in Solidity? I found the following in the docs but it doesn't really make sense to me: If the target account is the zero-account (the account with the...
Sumatra asked 12/1, 2018 at 4:47

10

I'm currently working on ethereum platform(node.js and solidity). My question is how do I trigger an event in solidity(contract) using node.js?
Thanatos asked 22/2, 2016 at 4:2

11

Solved

I've been working on a Hardhat project for sometime. After a while, when I run npx hardhat node to start the HH server, I get the error below: I tried researching the error and found this on the h...
Strachan asked 14/11, 2021 at 1:44

3

Solved

This may be simple in other languages but I can't figure out how to do it in Solidity. I have a bytes32 like this 0x05416460deb76d57af601be17e777b93592d8d4d4a4096c57876a91c84f4a712. I don't want to...
Antivenin asked 8/6, 2021 at 19:18

2

I have a local hardhat node spawned simply as: npx hardhat node I have a smart contract code that I want to test that mints 100 NFTs with a simple loop. The code basically adds the address to a map...
Monogamy asked 4/6, 2022 at 6:27

4

Solved

I had do some transaction in Binance Smart Chain in Binance-Peg BUSD-T and it worked successfully. But after 5 transactions. I face to a problem that said Returned error: transaction underpriced ! ...
Danadanae asked 14/6, 2021 at 15:1

3

I use web3 and provider mainnet. I do 2 transactions by contract. first is approve method and another transaction is multitransfer. I store second signature in database. if first transaction is suc...
Triplex asked 7/6, 2019 at 9:43

5

Solved

I'm currently building a ERC721 compliant contract and have published the contract here: https://ropsten.etherscan.io/address/0xa513bc0a0d3af384fefcd8bbc1cc0c9763307c39 - I'm now attempting to veri...

4

Solved

I'm looking at the uniswap docs which states this example: An example of finding the price of WETH in a WETH / USDC pool, where WETH is token0 and USDC is token1: You have an oracle reading that s...
Cartan asked 24/11, 2022 at 3:54

11

I have a couple of keccaks, which could be reduced to one if I would find a cheap way to get parts of the created uint. pragma solidity ^0.4.19; contract test { function test() { } function su...
Vintner asked 18/2, 2018 at 6:3

1

In the process of studying Ethereum smart contracts, the question arose of how to store large structures inside a contract (array or map). There is a contract pragma solidity ^ 0.8.6; contract Use...
Schear asked 10/8, 2021 at 15:34

© 2022 - 2024 — McMap. All rights reserved.