ethereum Questions
4
I have posted this here have created react-native app using
react-native init myapp
added web3 in package.json
npm install
react-native run-ios
but i am getting the error unable to resolve modul...
Centro asked 8/10, 2018 at 7:10
3
I have a mapping table whcich stores multiple hashes into that table. What I want to do is that I want the user to add another hash with setinstructors() function and then try to look whether the s...
Losel asked 3/4, 2018 at 19:22
3
Solved
I'm wondering what is the best way to express smart contracts in typed languages such as Haskell or Idris (so you could, for example, compile it to run on the Ethereum network). My main concern is:...
Calvin asked 13/2, 2017 at 21:26
2
I'm trying to get the balance of my wallet address to render on my frontend. Here's what I have so far.
const [balance, setBalance] = useState("");
const handleWalletBalance = async () ...
4
I am trying to send ETH to a contract function from a web app via metamask and ethers.js. So far I have tried:
const provider = new ethers.providers.Web3Provider(window.ethereum);
const signer = pr...
Rhizo asked 10/3, 2022 at 10:11
2
I'm trying to fetch the Buy or Sell Tax of a BSC token, but I haven't found a way yet.
I query the DEX via router_contract.functions.getAmountsOut(web3.toWei(1, 'Ether'), [ buying_token_address, pa...
1
Solved
I am working on a dapp that needs to verify users' signatures. When testing with Metamask, everything is okay.
When trying to verify a signature from Ambire wallet, I get "Error: invalid signa...
Epiphenomenalism asked 13/5, 2022 at 11:7
2
Solved
I have a solidity smart contract like this pragma solidity >=0.7.0 <0.9.0; can I still import SafeMath even if it's not needed for 0.8+ ? Since SafeMath is working with 0.7, but my contract s...
Venter asked 23/11, 2021 at 2:33
3
Solved
I'm writing an NFT smart contract using the OpenZeppelin ERC721Full contract. I'm able to mint NFTs, but I want to have a button that enables them to be bought. I'm trying writing this function:
fu...
Beauteous asked 29/4, 2021 at 12:29
3
I'm building a decentralized application where users can connect their cryptocurrency wallet (Metamask) to my website.
They can initiate a connection request by clicking a button. On success, the w...
Brittbritta asked 30/3, 2021 at 7:53
1
Solved
When using debug_traceCall, I get a low-level EVM trace of all opcodes and state changes during the execution. This is excessively detailed. When I use default callTracer, I can get a much nicer ca...
Eutherian asked 29/4, 2022 at 23:49
2
Solved
In the official waffle documentation you may find the next way to implement fixtures:
import {expect} from 'chai';
import {loadFixture, deployContract} from 'ethereum-waffle';
import BasicTokenMock...
Cantabile asked 29/6, 2021 at 16:47
0
I want to list two collections on Opensea but instead of creating two smart contracts for that, I want to create only one (to save gas fees of uploading a contract).
the only two ways I found to cr...
Nesta asked 27/4, 2022 at 21:50
2
Solved
I would like to verify an ethereum (ETH) signature made in MetaMask using python. I'm developing a website using flask as backend.
Javascript code send a POST requests to the back end containing th...
Joellejoellen asked 21/3, 2021 at 18:30
3
Solved
I want to compile my ethereum HelloWorld.sol smart contract. In all the tutorials is that you do it like this:
var solc = require('solc');
var compiledContract = solc.compile(fs.readFileSync('Hello...
Cantone asked 15/12, 2018 at 18:18
2
Concat two or more string values-
pragma solidity 0.8.9;
contract StringConcatation{
function AppendString(string memory a, string memory b) public pure returns (string memory) {
return string(a...
Sassenach asked 22/10, 2021 at 14:36
5
Solved
How can I programmatically discover how much ETH is in a given account on the Ethereum blockchain?
Elizbeth asked 31/8, 2015 at 13:50
4
I'm attempting to follow the NFT tutorial here. I have set up the accounts on Alchemy and Metamask created the .sol file. I have a .env file in root that looks like this:
API_URL = "https://et...
Zeralda asked 24/9, 2021 at 16:36
1
I'm calling window.ethereum and there are all these functions but it's confusing what they accept and the types. My understanding is that MetaMask injects something into window.ethereum... so I ass...
Donelladonelle asked 18/4, 2022 at 23:50
1
I am trying to sign a message with wallet connect using ethers, but I am facing an issue when verifying the message with ambire wallet, it's not returning any response.
const signMessage = async ()...
Kiyokokiyoshi asked 14/4, 2022 at 5:28
4
I need to calculate the nonce for successive transactions using web3js in Ethereum, but getTransactionCount does not return pending transactions.
Is there a way to get all transactions including bo...
Costello asked 11/12, 2018 at 6:58
1
Solved
I am trying to save gas by optimize code. In a flash, however, I was wondered what is the best practice of copying from array to array in Solidity.
I present two option. One is copying by pointer (...
1
Solved
I'm writing unit tests in Hardhat using Hardhat's mainnet fork, however it seems that the results from one test are affecting future tests and causing my assertions to fail. I'm forking using Alche...
4
I'm currently developing a dApp in Solidity and am working on a web3 library to handle communication with it.
I struggle with the process of new account creation and transaction signing in web3. Be...
3
Solved
I am learning Ethereum dev in Solidity and trying to run a simple HelloWorld program but ran into the following error:
Data location must be "memory" or "calldata" for return p...
© 2022 - 2024 — McMap. All rights reserved.