All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
3 views

Approve many tokens with one transaction

I need the users to approve the ERC-721 token before the smart contract and transfer it to someone. the default "approve" function works fine. but I'm wondering how to approve many tokens at ...
0
votes
0answers
3 views

How does Token Generation Event (TGE) work?

I can see ICO has been replaced with TGE for many token sales. Does Token Generation Event refer to the owner of contract minting the token everytime when it goes through an event like private seed, ...
0
votes
0answers
5 views

Is it possible to point a ERC721 TokenURI from an L1 to a tokenURI on an L2 (i.e. Ethereum to Arbitrum or Polygon)?

Is it possible to point a ERC721 TokenURI from L1 to a tokenURI on an L2 (i.e. Ethereum to Arbitrum or Polygon)? Other than using a centralized oracle, is there anyway to link data between an L1 and ...
0
votes
0answers
3 views

how do i get the last block of different erc20 tokens using etherscan and web3js

I'm trying to build my first application where I want to see the last block number and its price of various erc20 tokens. First I tried using the last transaction of the tokens and using the ...
0
votes
1answer
7 views

Metamask: is this the correct account? it is different from the currently selected account in your wallet

When I run transaction on metamask,it does always connected to one address and it does not detect address change: is this the correct account? it is different from the currently selected account in ...
0
votes
0answers
6 views

How to avoid high ERC20 transaction cost?

I need to send USDT from Binance to WazirX (local Indian exchange) through APIs over a hundred times a day. Binance supports ERC and TRC chains, while WazirX supports only ERC. Is there some ...
0
votes
0answers
3 views

How are updates rolled out?

if an update to Ethereum or any other cryptocurrency is rolled out, how to ensure that everyone in the network is running the same 'version'. Especially if the update is not backward-compatible with ...
0
votes
0answers
2 views

How to know when my ERC20 contract is being called for a Swap from an exchange?

I'm developing an ERC20 Token Contract in Solidity. I would like to know if there is a way to determine when transfers are called for Swap transactions via Exchanges that implement Uniswap v2 (Such as ...
0
votes
1answer
8 views

How to get contract address when receiving an ERC-721 token in a contract?

I'm writing an NFT staking contract and I want my contract to accept NFTs only from 3 specific contracts. I have implemented IERC721Receiver and the onERC721Received function successfully fires. What ...
0
votes
1answer
11 views

Can I check a transaction before executing it?

Let's assume a contract has some state and functions which will alter that state. How could I check what the state of the contract will be after I execute a function before making the transaction? (...
0
votes
1answer
9 views

When is best to buy an ENS domain?

I was wondering if it would be best to buy an ENS domain before or after the merge. Right now I can get one for 10 years at $50, but have to spend $148 is gas. Would ETH 2.0 make it $50 + a few ...
0
votes
1answer
6 views

Address of deployed contract in hardhat

Whenever you deploy a contract in truffle the generated abi is in build/contracts/contract.json. In this json there is also the address of the contract and I can import it in my other files. In ...
0
votes
0answers
5 views

I am trying to print out the variable (compiled_sol), so I can deploy my smart contract, but I keep running at this error

INFO: Could not find files for the given pattern(s). Traceback (most recent call last): File "C:\Users\jethr\demos\web3_py_simple_storage\deploy.py", line 8, in compiled_sol = ...
0
votes
0answers
6 views

How an external contract can access to my wrapped ether balance?

I deployed a fork of uniswap in mainnet and I add to it some liquidity, creating a pair between ETH and my token. I made some swaps, and after some days I noticed that someone stole the liquidity, I ...
0
votes
0answers
5 views

Randomizing values in mintable NFTs

I've read and written simple smart contracts in the past yet I'm relatively new to getting random data in a transaction, which seems to be harder than I've thought, due to the nature of determinism of ...
0
votes
1answer
6 views

When to use abi.encode, abi.encodePacked or abi.encodeWithSignature in solidity

I am new to solidity. I have a doubt. How and when to use these different abi encoding techniques that are there in solidity and what's the difference between them. For example, should we abi.encode ...
0
votes
0answers
7 views

ZeroEx Proxy Transaction on Uniswap / Coinbase

I first started using coinbase and transferred in my ETH & MATIC from the exchange. I was trying to swap out my ETH/MATIC into USDT/C via Uniswap. Instead of this transactions happening, I noticed ...
0
votes
0answers
5 views

Cors Issue with Hyper Ledger Private Block chain network on Aws

I am new to hyper ledger and trying to set up a private block chain network with clique as consensus protocol. I am deploying it on a AWS Ec2 Instance. Followed these steps and initiated a boot node ...
0
votes
0answers
7 views

Web3js Deploy contract is asking two transaction confirmation on metamask

I am new to web3js and trying to deploy smart contract using metamask. During the deployment, I am receiving two times the transaction confirmations from metamask. Could someone please help me. import ...
0
votes
1answer
12 views

How to decode string from bytes 32 in event log that is returned as hex on event log subscribe

I am using the web3.eth.subscribe method to listen for events on a contract. When an event occurs, I am using the web3.eth.abi.decodeLog to decode the data from the event. One of the parameters I am ...
0
votes
0answers
4 views

Acquiring Method data from smart contract (API Calls)

I managed to make API calls for "Normal Transactions" by address. But I'm missing 2nd column from the results which is "Method". When I use "export csv" method on the ...
0
votes
2answers
9 views

View function throws an error with block.number

Looking at https://docs.soliditylang.org/en/v0.8.11/contracts.html#view-functions I understood the solidity view function can work with any function unless it mutate states, emit events or perform any ...
0
votes
0answers
4 views

Use blockchair API to filter results by addresses balance range [from, to]

I'm trying to use blockchair's API for ethereum results but filtered by addresses balance range. Can I do something like: https://api.blockchair.com/ethereum/stats?balanceRange=[0.58,0.83] And if I ...
0
votes
1answer
12 views

how to fetch private key of metamask account while transaction using web3.js

I have a problem, What I want is to user to come at my website, from where he/she can connect to its metamask wallet account, after connecting I want them to allow to do transaction from some specific ...
1
vote
1answer
15 views

How do wallets generate new key-pairs?

The probability of collision for any two randomly chosen private-public key pairs is notoriously low. However, I wonder whether wallets or key generators use random or pseudorandom numbers to generate ...
1
vote
1answer
10 views

How can you identify if a transaction has been rejected on the gnosis safe transaction service using the core-sdk

I am using the safe-core-sdk to propose transactions to the Gnosis Safe Transaction Service. When the transaction has been proposed, I am then checking frequently via a job whether the transaction has ...
0
votes
0answers
7 views

Subscribing to event doesn't work after a while

I'm listening to Transfer Events for my ERC721 contract and it works perfectly on dev server start, but after a while it just doesn't show up the events that happen. Not sure where to look for the ...
0
votes
0answers
9 views

CryptoBatz - Out of Gas - Limit issue in contract?

I experienced an out of gas error with a transaction despite having a gas fee well above the norm. I've been told that this may be a contract issue and it should have been refunded. Could you confirm? ...
0
votes
0answers
3 views

Expected primary expression: {from: proposer}

According to the docs of TimelockController.sol The proposers are in charge of scheduling (and canceling) operations. This is a critical role, that should be given to governing entities. So, the ...
0
votes
0answers
7 views

Creating an Ethereum sidechain?

I'm doing some research on Ethereum sidechains like Axie Infinity Ronin. What I'm trying to understand is how someone goes about creating a sidechain and what does it take? Does this start as an ...
0
votes
1answer
8 views

How to call any smart contract functions without getting their ABI?

I make python bots for smart contracts, but I'm not too much of an expert. What I usually do is download the ABI from the block explorers. However, what if I want to call a function from any random ...
0
votes
0answers
9 views

Forwarding Ether from one contract to another

I am currently try to write two smart contracts. Here is the first one: // SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.0 <0.9.0; contract Token { mapping(address => uint) ...
0
votes
1answer
11 views

How to return mapping type in solidity?

I wrote a function that returns mapping type which contains all the tokenID and owner of the tokenID. But I get the following error when compiling. error: TypeError: Data location must be "memory&...
0
votes
0answers
8 views

Invalid value returned by GasPrice() (+)

I'm trying to calculate transaction fee using go-ethereum. For that I'm getting transaction and check gas price and gas to multiply them. But gas price has a wrong value. github.com/ethereum/go-...
1
vote
1answer
31 views

What does Web3 mean?

The term Web3 is used in the programming and marketing context a lot. But what does it mean? What does Web3 mean for a programmer? What does Web3 mean for a user?
0
votes
0answers
5 views

Can't check balance of a user using ethersjs

const lpERC20 = new ethers.Contract(pairAddress, lpABI); console.log(await lpERC20.callStatic.balanceOf(usr)); where pairAddress is const pairAddress = await factory.getPair(tA.address, tB.address); ...
0
votes
0answers
3 views

Where to include infura project id in brownie

I am trying to use infura with brownie. My env file looks like this: export WEB3_INFURA_PROJECT_ID = 9801991e384642dd9eeccecb7af46dfe My deploy.py file looks like this def main(): accounts.add(os....
1
vote
2answers
24 views

How to force smart contract to accept ether when deployed on Polygon chain

I have written a contract to mint NFT in solidity. I intend to deploy it to Polygon eventually. There’s a slight confusion, I have put the price in my contract as 0.1 ether which works fine on Rinkeby....
2
votes
1answer
18 views

How to floor or ceil a fixed point number?

Say I have a signed 64.64 fixed point number 18444899399302180000 or 0.9999 in floating point notation. How can I define a floor and ceil function that floors or ceils an int128 signed 64.64 fixed ...
0
votes
0answers
10 views

Can someone help me understand this eth transaction visualiser?

I have recently come across this visualiser which is great to help me understand how the transaction process works. https://txstreet.com/v/eth There is still something I don’t understand. From my ...
0
votes
0answers
9 views

Testnet, "error: out of gas" when calling other contract's function within contract

so i tried to use address.call(abi.encodeWithSignature("function()")) in my caller contract to call the callee contract's function. It seems every time i deployed it into testnet and then i ...
0
votes
0answers
2 views

Means by which a contract can "sign" a result without gas?

It seems fairly easy for an EOA owner to create a digital signature of arbitrary data using his private key and wallet, and that the recipient can then confirm that the data did in fact come from the ...
0
votes
1answer
12 views

Minting/Sending 0 Value ERC-20 Tokens in Response to Transaction in Another Contract

I currently have a working ERC-20 contract for a small group that I am in. I would like to make a new contract that mints or sends a 0 value token without liquidity similar to a rewards token that has ...
0
votes
0answers
6 views

Can't add liquidity pool for my ERC-20 token on uniswap

I created an ERC-20 token, tested it in truffle and remix, and deployed it to the Rinkeby testnet. I went to uniswap and connected my metamask (after verifying the contract on etherscan and adding my ...
0
votes
1answer
6 views

How to catch INSUFFICIENT_OUTPUT_AMOUNT Error?

I'm trying to create a trading bot and I noticed that even when a transaction is 100% gonna fail, the swapExactTokensForTokens still pushes through hence paying gas fee. My question is, how does ...
0
votes
0answers
8 views

Why did the ethash.unmineable.com:3333 Pool also connected to the us2.ethermine.org:4444 Pool?

While experimenting crypto mining in the unMineable pool with the PhoenixMiner_5.9d_Linux, I noticed an occasion where in addition to the ethash.unmineable.com:3333 Pool that is from unMineable, ...
0
votes
3answers
28 views

Error publishing source code

Here's my deploy.py: from brownie import FundMe from scripts.helpful_scripts import get_account def deploy_fund_me(): account = get_account() fund_me = FundMe.deploy({"from": ...
0
votes
2answers
11 views

How do I charge each user of my decentralized application a fee?

I'm just learning how to build a decentralized application, and I have one question. Suppose I want to charge each user a fee of 1 ETH to use the application. If they don't pay, they don't get to use ...
0
votes
0answers
13 views

Event not firing - Alchemy Polygon Mumbai API difference to Alchemy Eth Ropsten API?

I have a simple smart contract deployed via Hardhat to both Eth Ropsten and Polygon Mumbai testnets. It contains a function that my app calls, and the function fires an event as below. event ...
0
votes
0answers
18 views

Trying to Import Web3 into a react application

If I just run npm install web3 I get a bunch of errors Module not found: Error: Can't resolve 'stream' Module not found: Error: Can't resolve 'crypto' Module not found: Error: Can't resolve 'assert' ...

15 30 50 per page
1
2 3 4 5
827