All Questions

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

How much can I trust on the truffle test gasUsed value?

I'm trying to guarantee that I'm not going to require more than the 200k gas limit on VRF fulfillrandomness call. I'm running the truffles test and they present to me gasUsed on the txn value of the ...
0
votes
3answers
21 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
0answers
2 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 ...
1
vote
1answer
762 views

How to see value of NFT / ERC 721 token on etherscan?

For instance here https://etherscan.io/token/0x06012c8cf97bead5deae237070f9587f8e7a266d?a=1 is token 1 of CryptoKitties and there are some transfers, but ether value is always set to 0 ether and I ...
0
votes
0answers
5 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
0answers
3 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
2 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
6 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
0answers
4 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
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-...
0
votes
0answers
5 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
1answer
294 views

Modifiers misunderstanding

pragma solidity ^0.4.0; contract test { bool test_bool1 = false; bool test_bool2 = true; modifier test_modifier(bool _test_bool){ if (_test_bool == false) throw; _; } ...
1
vote
1answer
19 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
4 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); ...
1
vote
1answer
17 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
15 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 ...
1
vote
1answer
2k views

Metamask export all acounts at once

Is there a way to export all metamask accounts at the same time and then load them in some other browser ? Say for eg I have around 20 accounts in metamask in firefox and then I want to load these ...
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....
0
votes
1answer
752 views

How to deploy a contract to parity using truffle?

I get this when trying to deploy to parity - Writing artifacts to ./build/contracts Invalid JSON RPC response: "Provided Host header is not whitelisted.\n" I am new to using truffle with ...
1
vote
2answers
24 views

How can blockchain be applied other than cryptocurrencies?

How can blockchain be applied other than cryptocurrencies? May I ask for some diagrams that abstractly explain the system behind the non-monetary application of blockchain? I cannot seem to wrap my ...
1
vote
2answers
617 views

How to get balances of all the accounts(~1000) in Geth node?

How can I get the balance of all the accounts in my Go Ethereum node? I have about 1000 accounts and it is too slow to use eth_getBalance to get balance for each address. Are there any ways to use ...
0
votes
1answer
16 views

How to test internal members of solidity library or contract in brownie?

Say I have the following SimpleMath solidity library defined as follows: library SimpleMath { function add(uint a, uint b) internal pure returns(uint) { return a + b; } } How do I import ...
1
vote
2answers
128 views

update balance into database [logic help]

If a user deposit money to his Ethereum address that is generated for user after signup. So how to get amount transferred by the user to update that amount into database field? I'm using web3 with ...
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
8 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
776 views

geth installation with homebrew stuck at Checking out tag v1.7.0

i am a complete newbie in the ethereum space and is trying to install geth on my mac using homebrew after the step : ==> Cloning https://github.com/ethereum/go-ethereum.git the process has stuck at ...
0
votes
2answers
9 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
1answer
3 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

how can i fix these loop warnings and gas fee warnings. the code is compiled fine just want to update these warnings before launch

Here's the contract code to the token "alex". Below are the warnings from remix. Thanks for any assistance // SPDX-License-Identifier: MIT pragma solidity 0.8.4; contract alex { ...
0
votes
1answer
8 views

How to call a base function from a derived object and not alter the variable assignments in the Base contract and other Derived objects

Our base function: pragma solidity ^0.8.0; import "hardhat/console.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; contract Token is ERC20{ address private ...
1
vote
2answers
91 views
+50

How can I put price on my nft with my token

I want to create an NFT Game in which users can buy NFT with my custom token. for example, Decentraland has a token called Mana. as you can see they listed the NFT with Mana! Decentraland NFT example ...
0
votes
0answers
12 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
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
4 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
2answers
603 views

View contract details in a Django application

I'm trying to create Crowdsale using Ethereum. I've done everything from Token creation, to DAO creation, to Crowdsale creation in Ethereum Wallet. Now, I want my web app (built in Django) to be able ...
0
votes
0answers
5 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, ...
1
vote
1answer
237 views

ERC token multiple address sending

Hi is it possible to send token XYZQ to two addresses in one transaction. here is example. 100 XYZQ ===> 99.9999 to XYZQ 1 address and 0.0001 XYZQ to second XYZQ address? For same amount of gas
0
votes
3answers
723 views

Found a Telegram ETH scammer/theif's main wallet address on Etherscan with $150,000 worth of stolen coin. What can be done?

Someone in my Telegram Telcoin group that I've talked to for months say they were a victim of ETH theft by a known ETH scammer in Telegram. This person sent me proof of pictures they took of ...
0
votes
1answer
12 views

How can I call contract which created from another contract (In TESTING)?

Hello guys now Im testing my contract, but I dont know how to call contract which created from another contract, If someone did it please help) Create I mean like following code. function ...
1
vote
1answer
390 views

Is there a way to debug a transaction, and see the gas used by that tx until any given point of the execution? (Ideally in Truffle)

I'm trying to figure out where are the big gas spender instructions from my contract, so I'm simulating some transactions in a forked local node using ganache-cli and debugging the tx using Truffle. ...
6
votes
1answer
3k views

How to automatically add a custom token to MetaMask with ethers.js

I was playing around with creating BEP-20 tokens on cointool.app and noticed that whenever you generate a new token and pay the gas fee to mint it, the website automatically prompts you to add this ...
0
votes
1answer
107 views

approve function not working while trying to add Liquidity

I have a created a pair of DAI (0x8e60C2Ab51Ea0dB31208F11FDc35CF30372eCE0a) and BUSD (0xe33a84F08326fdbcb4b6511eDEb90868113569dB) on BSC Testnet. The contracts are also verified there. I want to ...
2
votes
3answers
346 views

I keep getting nonce is too low when using truffle to call functions on contracts even though this works fine on remix.How can I fix this

I keep getting the nonce is too low when running functions with sub transactions on the kovan test net is there a way I can stop this from happening?these sub transactions are making transactions with ...
1
vote
2answers
188 views

Counters.Counter vs totalSupply

Creating my first contract and was taking a look at the Open Zeppelin wizard. I notice that it includes a Counters.Counter private _tokenIdCounter;, which tracks the amount of tokens minted. When I ...
1
vote
2answers
1k views

My ether was automatically sent to different address without my permission

My ethereum account is 0xfAd956B56be1298ee8ec1950cc305B46268d926f (generated by metamask) and the moment friend of mine sent me an ether, it was automatically directed to another account. This is the ...
0
votes
1answer
25 views

How is circuit integrity of ZK-rollups checked by the L1 contract?

TL;DR: what prevents an evil party forge a new evil operation (say mint 100 ETH for some account) and prove that the evil operation is executed correctly to the Layer 1 verifier contract? I am ...
0
votes
1answer
577 views

How do I add more gas to the ganache-cli

I started the ganache-cli with 'ganache-cli -l 800000000' I deployed my contract with 'truffle --network development' which is defined in the truffle-config.js file as: networks: { // Useful for ...
0
votes
1answer
205 views

Status is Successful but got internal transaction out of gas?

I call a function with the transaction like this https://ropsten.etherscan.io/tx/0x7d4dec3c0db2b700efae63ef3ffb5a33fc2335bd992fd37c48aa10560eb8156e this fuction is a call from other contract,I wrote ...
0
votes
1answer
18 views

Recovering data from Bytes using Assembly

I have im my js file 3 variables: var stringData = "stingData"; var intNonce = 1234; var hexData = "0x65225648"; I want to concatenate then and send to my contract: var data = ...

15 30 50 per page
1
2 3 4 5
827